From 2f88bd3a1296c522317f1c21377876de63de5be7 Mon Sep 17 00:00:00 2001 From: Michael Kubacki Date: Sun, 5 Dec 2021 14:54:05 -0800 Subject: MdePkg: Apply uncrustify changes REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the MdePkg package Cc: Andrew Fish Cc: Leif Lindholm Cc: Michael D Kinney Signed-off-by: Michael Kubacki Reviewed-by: Liming Gao --- MdePkg/Include/AArch64/ProcessorBind.h | 116 +- MdePkg/Include/Arm/ProcessorBind.h | 160 +- MdePkg/Include/Base.h | 585 ++-- MdePkg/Include/Ebc/ProcessorBind.h | 49 +- MdePkg/Include/Guid/Acpi.h | 10 +- MdePkg/Include/Guid/Apriori.h | 2 +- MdePkg/Include/Guid/AprioriFileName.h | 6 +- MdePkg/Include/Guid/Btt.h | 76 +- MdePkg/Include/Guid/CapsuleReport.h | 34 +- MdePkg/Include/Guid/Cper.h | 1271 +++++---- MdePkg/Include/Guid/DebugImageInfoTable.h | 30 +- MdePkg/Include/Guid/DxeServices.h | 2 +- MdePkg/Include/Guid/EventGroup.h | 16 +- MdePkg/Include/Guid/EventLegacyBios.h | 2 +- MdePkg/Include/Guid/FileInfo.h | 20 +- MdePkg/Include/Guid/FileSystemInfo.h | 14 +- MdePkg/Include/Guid/FileSystemVolumeLabelInfo.h | 4 +- MdePkg/Include/Guid/FirmwareContentsSigned.h | 2 +- MdePkg/Include/Guid/FirmwareFileSystem2.h | 5 +- MdePkg/Include/Guid/FirmwareFileSystem3.h | 2 +- MdePkg/Include/Guid/FmpCapsule.h | 34 +- MdePkg/Include/Guid/GlobalVariable.h | 64 +- MdePkg/Include/Guid/Gpt.h | 6 +- MdePkg/Include/Guid/GraphicsInfoHob.h | 22 +- MdePkg/Include/Guid/HardwareErrorVariable.h | 2 +- MdePkg/Include/Guid/HiiFormMapMethodGuid.h | 2 +- MdePkg/Include/Guid/HiiKeyBoardLayout.h | 2 +- MdePkg/Include/Guid/HiiPlatformSetupFormset.h | 8 +- MdePkg/Include/Guid/HobList.h | 2 +- MdePkg/Include/Guid/ImageAuthentication.h | 77 +- MdePkg/Include/Guid/JsonCapsule.h | 28 +- MdePkg/Include/Guid/LinuxEfiInitrdMedia.h | 2 +- MdePkg/Include/Guid/MdePkgTokenSpace.h | 2 +- MdePkg/Include/Guid/MemoryAllocationHob.h | 6 +- MdePkg/Include/Guid/MemoryAttributesTable.h | 14 +- MdePkg/Include/Guid/MemoryOverwriteControl.h | 16 +- MdePkg/Include/Guid/Mps.h | 4 +- MdePkg/Include/Guid/PcAnsi.h | 12 +- MdePkg/Include/Guid/RtPropertiesTable.h | 13 +- MdePkg/Include/Guid/SmBios.h | 4 +- MdePkg/Include/Guid/SmramMemoryReserve.h | 7 +- MdePkg/Include/Guid/StatusCodeDataTypeId.h | 184 +- MdePkg/Include/Guid/SystemResourceTable.h | 29 +- MdePkg/Include/Guid/VectorHandoffTable.h | 2 +- MdePkg/Include/Guid/WinCertificate.h | 32 +- MdePkg/Include/Ia32/ProcessorBind.h | 303 +- MdePkg/Include/IndustryStandard/Acpi10.h | 472 ++-- MdePkg/Include/IndustryStandard/Acpi20.h | 348 +-- MdePkg/Include/IndustryStandard/Acpi30.h | 450 +-- MdePkg/Include/IndustryStandard/Acpi40.h | 1034 +++---- MdePkg/Include/IndustryStandard/Acpi50.h | 1504 +++++----- MdePkg/Include/IndustryStandard/Acpi51.h | 1610 +++++------ MdePkg/Include/IndustryStandard/Acpi60.h | 1884 ++++++------- MdePkg/Include/IndustryStandard/Acpi61.h | 1946 ++++++------- MdePkg/Include/IndustryStandard/Acpi62.h | 2338 ++++++++-------- MdePkg/Include/IndustryStandard/Acpi63.h | 2372 ++++++++-------- MdePkg/Include/IndustryStandard/Acpi64.h | 2542 ++++++++--------- MdePkg/Include/IndustryStandard/AcpiAml.h | 300 +- .../IndustryStandard/AlertStandardFormatTable.h | 95 +- .../Include/IndustryStandard/ArmErrorSourceTable.h | 144 +- MdePkg/Include/IndustryStandard/Atapi.h | 1238 +++++---- MdePkg/Include/IndustryStandard/Bluetooth.h | 18 +- MdePkg/Include/IndustryStandard/Bmp.h | 40 +- MdePkg/Include/IndustryStandard/Cxl.h | 3 +- MdePkg/Include/IndustryStandard/Cxl11.h | 643 +++-- MdePkg/Include/IndustryStandard/DebugPort2Table.h | 35 +- MdePkg/Include/IndustryStandard/DebugPortTable.h | 3 +- MdePkg/Include/IndustryStandard/Dhcp.h | 397 ++- .../IndustryStandard/DmaRemappingReportingTable.h | 100 +- MdePkg/Include/IndustryStandard/ElTorito.h | 95 +- MdePkg/Include/IndustryStandard/Emmc.h | 496 ++-- .../HighPrecisionEventTimerTable.h | 33 +- MdePkg/Include/IndustryStandard/Hsti.h | 28 +- MdePkg/Include/IndustryStandard/Http11.h | 99 +- .../IndustryStandard/IScsiBootFirmwareTable.h | 157 +- MdePkg/Include/IndustryStandard/IoRemappingTable.h | 196 +- .../IndustryStandard/IpmiFruInformationStorage.h | 40 +- MdePkg/Include/IndustryStandard/IpmiNetFnApp.h | 509 ++-- MdePkg/Include/IndustryStandard/IpmiNetFnBridge.h | 16 +- MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h | 280 +- .../Include/IndustryStandard/IpmiNetFnFirmware.h | 6 +- .../IndustryStandard/IpmiNetFnSensorEvent.h | 20 +- MdePkg/Include/IndustryStandard/IpmiNetFnStorage.h | 622 ++--- .../Include/IndustryStandard/IpmiNetFnTransport.h | 579 ++-- .../Include/IndustryStandard/LegacyBiosMpTable.h | 288 +- .../Include/IndustryStandard/LowPowerIdleTable.h | 35 +- MdePkg/Include/IndustryStandard/Mbr.h | 40 +- .../MemoryMappedConfigurationSpaceAccessTable.h | 14 +- .../MemoryOverwriteRequestControlLock.h | 4 +- MdePkg/Include/IndustryStandard/Nvme.h | 726 +++-- MdePkg/Include/IndustryStandard/Pci22.h | 835 +++--- MdePkg/Include/IndustryStandard/Pci23.h | 68 +- MdePkg/Include/IndustryStandard/Pci30.h | 41 +- MdePkg/Include/IndustryStandard/PciCodeId.h | 49 +- MdePkg/Include/IndustryStandard/PciExpress21.h | 890 +++--- MdePkg/Include/IndustryStandard/PciExpress30.h | 30 +- MdePkg/Include/IndustryStandard/PciExpress31.h | 62 +- MdePkg/Include/IndustryStandard/PciExpress40.h | 90 +- MdePkg/Include/IndustryStandard/PciExpress50.h | 126 +- MdePkg/Include/IndustryStandard/PeImage.h | 587 ++-- MdePkg/Include/IndustryStandard/Scsi.h | 461 ++-- MdePkg/Include/IndustryStandard/Sd.h | 266 +- MdePkg/Include/IndustryStandard/SdramSpd.h | 70 +- MdePkg/Include/IndustryStandard/SdramSpdDdr3.h | 736 ++--- MdePkg/Include/IndustryStandard/SdramSpdDdr4.h | 950 +++---- MdePkg/Include/IndustryStandard/SdramSpdLpDdr.h | 438 +-- .../SerialPortConsoleRedirectionTable.h | 94 +- .../ServiceProcessorManagementInterfaceTable.h | 34 +- MdePkg/Include/IndustryStandard/SmBios.h | 2894 ++++++++++---------- MdePkg/Include/IndustryStandard/SmBus.h | 26 +- MdePkg/Include/IndustryStandard/Spdm.h | 246 +- .../Include/IndustryStandard/TcgPhysicalPresence.h | 138 +- MdePkg/Include/IndustryStandard/TcgStorageCore.h | 420 ++- MdePkg/Include/IndustryStandard/TcgStorageOpal.h | 268 +- MdePkg/Include/IndustryStandard/TcpaAcpi.h | 48 +- MdePkg/Include/IndustryStandard/Tls1.h | 85 +- MdePkg/Include/IndustryStandard/Tpm12.h | 1996 +++++++------- MdePkg/Include/IndustryStandard/Tpm20.h | 1996 +++++++------- MdePkg/Include/IndustryStandard/Tpm2Acpi.h | 52 +- MdePkg/Include/IndustryStandard/TpmPtp.h | 260 +- MdePkg/Include/IndustryStandard/TpmTis.h | 82 +- MdePkg/Include/IndustryStandard/Udf.h | 120 +- MdePkg/Include/IndustryStandard/UefiTcgPlatform.h | 331 ++- MdePkg/Include/IndustryStandard/Usb.h | 275 +- .../Include/IndustryStandard/WatchdogActionTable.h | 83 +- .../IndustryStandard/WatchdogResourceTable.h | 28 +- .../WindowsSmmSecurityMitigationTable.h | 11 +- MdePkg/Include/IndustryStandard/WindowsUxCapsule.h | 23 +- MdePkg/Include/Library/BaseLib.h | 1610 +++++------ MdePkg/Include/Library/CacheMaintenanceLib.h | 16 +- MdePkg/Include/Library/CpuLib.h | 1 - MdePkg/Include/Library/DebugLib.h | 87 +- MdePkg/Include/Library/DebugPrintErrorLevelLib.h | 2 + MdePkg/Include/Library/DevicePathLib.h | 32 +- MdePkg/Include/Library/DxeCoreEntryPoint.h | 4 - MdePkg/Include/Library/DxeServicesLib.h | 50 +- MdePkg/Include/Library/DxeServicesTableLib.h | 1 - MdePkg/Include/Library/ExtractGuidedSectionLib.h | 1 + MdePkg/Include/Library/FileHandleLib.h | 100 +- MdePkg/Include/Library/HobLib.h | 78 +- MdePkg/Include/Library/HstiLib.h | 40 +- MdePkg/Include/Library/IoLib.h | 568 ++-- MdePkg/Include/Library/MemoryAllocationLib.h | 2 +- MdePkg/Include/Library/MmServicesTableLib.h | 2 +- MdePkg/Include/Library/MmUnblockMemoryLib.h | 6 +- MdePkg/Include/Library/OrderedCollectionLib.h | 45 +- MdePkg/Include/Library/PcdLib.h | 326 +-- MdePkg/Include/Library/PciCf8Lib.h | 195 +- MdePkg/Include/Library/PciExpressLib.h | 194 +- MdePkg/Include/Library/PciLib.h | 194 +- MdePkg/Include/Library/PciSegmentInfoLib.h | 8 +- MdePkg/Include/Library/PciSegmentLib.h | 195 +- MdePkg/Include/Library/PeCoffGetEntryPointLib.h | 5 +- MdePkg/Include/Library/PeCoffLib.h | 65 +- MdePkg/Include/Library/PeiCoreEntryPoint.h | 7 +- MdePkg/Include/Library/PeiServicesLib.h | 123 +- .../Include/Library/PeiServicesTablePointerLib.h | 3 +- MdePkg/Include/Library/PeimEntryPoint.h | 20 +- MdePkg/Include/Library/PerformanceLib.h | 90 +- MdePkg/Include/Library/PostCodeLib.h | 6 +- MdePkg/Include/Library/PrintLib.h | 41 +- MdePkg/Include/Library/RegisterFilterLib.h | 35 +- MdePkg/Include/Library/ReportStatusCodeLib.h | 26 +- MdePkg/Include/Library/ResourcePublicationLib.h | 4 +- MdePkg/Include/Library/RngLib.h | 10 +- MdePkg/Include/Library/S3BootScriptLib.h | 58 +- MdePkg/Include/Library/S3IoLib.h | 30 +- MdePkg/Include/Library/S3PciLib.h | 2 +- MdePkg/Include/Library/S3PciSegmentLib.h | 195 +- MdePkg/Include/Library/SafeIntLib.h | 40 +- MdePkg/Include/Library/SerialPortLib.h | 25 +- MdePkg/Include/Library/SmbusLib.h | 21 +- MdePkg/Include/Library/SmiHandlerProfileLib.h | 18 +- MdePkg/Include/Library/SmmIoLib.h | 1 - MdePkg/Include/Library/SmmLib.h | 5 +- MdePkg/Include/Library/SmmPeriodicSmiLib.h | 2 +- MdePkg/Include/Library/SmmServicesTableLib.h | 2 +- .../Include/Library/StandaloneMmDriverEntryPoint.h | 23 +- MdePkg/Include/Library/SynchronizationLib.h | 50 +- MdePkg/Include/Library/TimerLib.h | 10 +- MdePkg/Include/Library/UefiApplicationEntryPoint.h | 7 +- MdePkg/Include/Library/UefiBootServicesTableLib.h | 4 +- MdePkg/Include/Library/UefiDriverEntryPoint.h | 15 +- MdePkg/Include/Library/UefiLib.h | 164 +- MdePkg/Include/Library/UefiRuntimeLib.h | 90 +- MdePkg/Include/Library/UefiScsiLib.h | 104 +- MdePkg/Include/Library/UefiUsbLib.h | 156 +- MdePkg/Include/Library/UnitTestLib.h | 28 +- MdePkg/Include/Pi/PiBootMode.h | 26 +- MdePkg/Include/Pi/PiDependency.h | 22 +- MdePkg/Include/Pi/PiDxeCis.h | 67 +- MdePkg/Include/Pi/PiFirmwareFile.h | 211 +- MdePkg/Include/Pi/PiFirmwareVolume.h | 128 +- MdePkg/Include/Pi/PiHob.h | 170 +- MdePkg/Include/Pi/PiI2c.h | 48 +- MdePkg/Include/Pi/PiMmCis.h | 66 +- MdePkg/Include/Pi/PiMultiPhase.h | 56 +- MdePkg/Include/Pi/PiPeiCis.h | 143 +- MdePkg/Include/Pi/PiS3BootScript.h | 42 +- MdePkg/Include/Pi/PiSmmCis.h | 76 +- MdePkg/Include/Pi/PiStatusCode.h | 265 +- MdePkg/Include/PiDxe.h | 1 - MdePkg/Include/PiMm.h | 1 - MdePkg/Include/PiPei.h | 1 - MdePkg/Include/PiSmm.h | 1 - MdePkg/Include/Ppi/BlockIo.h | 34 +- MdePkg/Include/Ppi/BlockIo2.h | 26 +- MdePkg/Include/Ppi/BootInRecoveryMode.h | 3 +- MdePkg/Include/Ppi/Capsule.h | 10 +- MdePkg/Include/Ppi/CpuIo.h | 52 +- MdePkg/Include/Ppi/Decompress.h | 10 +- MdePkg/Include/Ppi/DelayedDispatch.h | 15 +- MdePkg/Include/Ppi/DeviceRecoveryModule.h | 10 +- MdePkg/Include/Ppi/DxeIpl.h | 4 +- MdePkg/Include/Ppi/EndOfPeiPhase.h | 2 +- MdePkg/Include/Ppi/FirmwareVolume.h | 47 +- MdePkg/Include/Ppi/FirmwareVolumeInfo.h | 17 +- MdePkg/Include/Ppi/FirmwareVolumeInfo2.h | 19 +- MdePkg/Include/Ppi/Graphics.h | 10 +- MdePkg/Include/Ppi/GuidedSectionExtraction.h | 11 +- MdePkg/Include/Ppi/I2cMaster.h | 18 +- MdePkg/Include/Ppi/IsaHc.h | 18 +- MdePkg/Include/Ppi/LoadFile.h | 7 +- MdePkg/Include/Ppi/LoadImage.h | 12 +- MdePkg/Include/Ppi/MasterBootMode.h | 2 +- MdePkg/Include/Ppi/MemoryDiscovered.h | 2 +- MdePkg/Include/Ppi/MmAccess.h | 16 +- MdePkg/Include/Ppi/MmCommunication.h | 7 +- MdePkg/Include/Ppi/MmConfiguration.h | 10 +- MdePkg/Include/Ppi/MmControl.h | 17 +- MdePkg/Include/Ppi/MpServices.h | 32 +- MdePkg/Include/Ppi/Pcd.h | 136 +- MdePkg/Include/Ppi/PcdInfo.h | 23 +- MdePkg/Include/Ppi/PciCfg2.h | 32 +- MdePkg/Include/Ppi/PeiCoreFvLocation.h | 3 +- MdePkg/Include/Ppi/PiPcd.h | 78 +- MdePkg/Include/Ppi/PiPcdInfo.h | 17 +- MdePkg/Include/Ppi/ReadOnlyVariable2.h | 10 +- MdePkg/Include/Ppi/RecoveryModule.h | 4 +- MdePkg/Include/Ppi/ReportStatusCodeHandler.h | 12 +- MdePkg/Include/Ppi/Reset.h | 4 +- MdePkg/Include/Ppi/Reset2.h | 4 +- MdePkg/Include/Ppi/S3Resume2.h | 6 +- MdePkg/Include/Ppi/SecHobData.h | 8 +- MdePkg/Include/Ppi/SecPlatformInformation.h | 65 +- MdePkg/Include/Ppi/SecPlatformInformation2.h | 14 +- MdePkg/Include/Ppi/Security2.h | 10 +- MdePkg/Include/Ppi/Smbus2.h | 23 +- MdePkg/Include/Ppi/Stall.h | 6 +- MdePkg/Include/Ppi/StatusCode.h | 4 +- MdePkg/Include/Ppi/SuperIo.h | 32 +- MdePkg/Include/Ppi/TemporaryRamDone.h | 6 +- MdePkg/Include/Ppi/TemporaryRamSupport.h | 9 +- MdePkg/Include/Ppi/VectorHandoffInfo.h | 18 +- MdePkg/Include/Protocol/AbsolutePointer.h | 64 +- .../Include/Protocol/AcpiSystemDescriptionTable.h | 54 +- MdePkg/Include/Protocol/AcpiTable.h | 13 +- MdePkg/Include/Protocol/AdapterInformation.h | 42 +- MdePkg/Include/Protocol/Arp.h | 47 +- MdePkg/Include/Protocol/AtaPassThru.h | 144 +- MdePkg/Include/Protocol/AuthenticationInfo.h | 34 +- MdePkg/Include/Protocol/Bds.h | 6 +- MdePkg/Include/Protocol/Bis.h | 65 +- MdePkg/Include/Protocol/BlockIo.h | 53 +- MdePkg/Include/Protocol/BlockIo2.h | 31 +- MdePkg/Include/Protocol/BlockIoCrypto.h | 97 +- MdePkg/Include/Protocol/BluetoothAttribute.h | 113 +- MdePkg/Include/Protocol/BluetoothConfig.h | 49 +- MdePkg/Include/Protocol/BluetoothHc.h | 29 +- MdePkg/Include/Protocol/BluetoothIo.h | 24 +- MdePkg/Include/Protocol/BluetoothLeConfig.h | 100 +- MdePkg/Include/Protocol/BootManagerPolicy.h | 16 +- .../Include/Protocol/BusSpecificDriverOverride.h | 6 +- MdePkg/Include/Protocol/Capsule.h | 2 +- MdePkg/Include/Protocol/ComponentName.h | 12 +- MdePkg/Include/Protocol/ComponentName2.h | 12 +- MdePkg/Include/Protocol/Cpu.h | 32 +- MdePkg/Include/Protocol/CpuIo2.h | 10 +- MdePkg/Include/Protocol/DebugPort.h | 21 +- MdePkg/Include/Protocol/DebugSupport.h | 993 ++++--- MdePkg/Include/Protocol/Decompress.h | 8 +- MdePkg/Include/Protocol/DeferredImageLoad.h | 6 +- MdePkg/Include/Protocol/DeviceIo.h | 26 +- MdePkg/Include/Protocol/DevicePath.h | 570 ++-- MdePkg/Include/Protocol/DevicePathFromText.h | 11 +- MdePkg/Include/Protocol/DevicePathToText.h | 12 +- MdePkg/Include/Protocol/DevicePathUtilities.h | 33 +- MdePkg/Include/Protocol/Dhcp4.h | 184 +- MdePkg/Include/Protocol/Dhcp6.h | 144 +- MdePkg/Include/Protocol/DiskInfo.h | 28 +- MdePkg/Include/Protocol/DiskIo.h | 12 +- MdePkg/Include/Protocol/DiskIo2.h | 26 +- MdePkg/Include/Protocol/Dns4.h | 121 +- MdePkg/Include/Protocol/Dns6.h | 98 +- MdePkg/Include/Protocol/DriverBinding.h | 16 +- MdePkg/Include/Protocol/DriverConfiguration.h | 14 +- MdePkg/Include/Protocol/DriverConfiguration2.h | 26 +- MdePkg/Include/Protocol/DriverDiagnostics.h | 16 +- MdePkg/Include/Protocol/DriverDiagnostics2.h | 8 +- MdePkg/Include/Protocol/DriverFamilyOverride.h | 7 +- MdePkg/Include/Protocol/DriverHealth.h | 18 +- .../Include/Protocol/DriverSupportedEfiVersion.h | 7 +- MdePkg/Include/Protocol/DxeMmReadyToLock.h | 2 +- MdePkg/Include/Protocol/DxeSmmReadyToLock.h | 4 +- MdePkg/Include/Protocol/Eap.h | 18 +- MdePkg/Include/Protocol/EapConfiguration.h | 12 +- MdePkg/Include/Protocol/EapManagement.h | 55 +- MdePkg/Include/Protocol/EapManagement2.h | 4 +- MdePkg/Include/Protocol/Ebc.h | 88 +- MdePkg/Include/Protocol/EdidActive.h | 4 +- MdePkg/Include/Protocol/EdidDiscovered.h | 4 +- MdePkg/Include/Protocol/EdidOverride.h | 8 +- MdePkg/Include/Protocol/EraseBlock.h | 16 +- MdePkg/Include/Protocol/FirmwareManagement.h | 116 +- MdePkg/Include/Protocol/FirmwareVolume2.h | 167 +- MdePkg/Include/Protocol/FirmwareVolumeBlock.h | 58 +- MdePkg/Include/Protocol/FormBrowser2.h | 45 +- MdePkg/Include/Protocol/Ftp4.h | 51 +- MdePkg/Include/Protocol/GraphicsOutput.h | 54 +- MdePkg/Include/Protocol/GuidedSectionExtraction.h | 7 +- MdePkg/Include/Protocol/Hash.h | 48 +- MdePkg/Include/Protocol/Hash2.h | 38 +- MdePkg/Include/Protocol/HiiConfigAccess.h | 50 +- MdePkg/Include/Protocol/HiiConfigKeyword.h | 29 +- MdePkg/Include/Protocol/HiiConfigRouting.h | 42 +- MdePkg/Include/Protocol/HiiDatabase.h | 68 +- MdePkg/Include/Protocol/HiiFont.h | 68 +- MdePkg/Include/Protocol/HiiImage.h | 63 +- MdePkg/Include/Protocol/HiiImageDecoder.h | 28 +- MdePkg/Include/Protocol/HiiImageEx.h | 14 +- MdePkg/Include/Protocol/HiiPackageList.h | 8 +- MdePkg/Include/Protocol/HiiPopup.h | 13 +- MdePkg/Include/Protocol/HiiString.h | 27 +- MdePkg/Include/Protocol/Http.h | 74 +- MdePkg/Include/Protocol/HttpBootCallback.h | 10 +- MdePkg/Include/Protocol/HttpUtilities.h | 12 +- .../Protocol/I2cBusConfigurationManagement.h | 9 +- MdePkg/Include/Protocol/I2cEnumerate.h | 16 +- MdePkg/Include/Protocol/I2cHost.h | 11 +- MdePkg/Include/Protocol/I2cIo.h | 21 +- MdePkg/Include/Protocol/I2cMaster.h | 20 +- MdePkg/Include/Protocol/IScsiInitiatorName.h | 9 +- MdePkg/Include/Protocol/IdeControllerInit.h | 30 +- .../Protocol/IncompatiblePciDeviceSupport.h | 4 +- MdePkg/Include/Protocol/Ip4.h | 166 +- MdePkg/Include/Protocol/Ip4Config.h | 18 +- MdePkg/Include/Protocol/Ip4Config2.h | 41 +- MdePkg/Include/Protocol/Ip6.h | 231 +- MdePkg/Include/Protocol/Ip6Config.h | 37 +- MdePkg/Include/Protocol/IpSec.h | 31 +- MdePkg/Include/Protocol/IpSecConfig.h | 175 +- MdePkg/Include/Protocol/IsaHc.h | 20 +- MdePkg/Include/Protocol/Kms.h | 217 +- MdePkg/Include/Protocol/LegacyRegion2.h | 60 +- MdePkg/Include/Protocol/LegacySpiController.h | 38 +- MdePkg/Include/Protocol/LegacySpiFlash.h | 24 +- MdePkg/Include/Protocol/LegacySpiSmmController.h | 4 +- MdePkg/Include/Protocol/LegacySpiSmmFlash.h | 4 +- MdePkg/Include/Protocol/LoadFile.h | 8 +- MdePkg/Include/Protocol/LoadFile2.h | 7 +- MdePkg/Include/Protocol/LoadedImage.h | 40 +- MdePkg/Include/Protocol/ManagedNetwork.h | 76 +- MdePkg/Include/Protocol/Metronome.h | 12 +- MdePkg/Include/Protocol/MmAccess.h | 18 +- MdePkg/Include/Protocol/MmBase.h | 9 +- MdePkg/Include/Protocol/MmCommunication.h | 13 +- MdePkg/Include/Protocol/MmCommunication2.h | 7 +- MdePkg/Include/Protocol/MmConfiguration.h | 9 +- MdePkg/Include/Protocol/MmControl.h | 11 +- MdePkg/Include/Protocol/MmCpu.h | 172 +- MdePkg/Include/Protocol/MmCpuIo.h | 12 +- MdePkg/Include/Protocol/MmEndOfDxe.h | 2 +- MdePkg/Include/Protocol/MmGpiDispatch.h | 11 +- MdePkg/Include/Protocol/MmIoTrapDispatch.h | 17 +- MdePkg/Include/Protocol/MmMp.h | 58 +- MdePkg/Include/Protocol/MmPciRootBridgeIo.h | 5 +- MdePkg/Include/Protocol/MmPeriodicTimerDispatch.h | 17 +- MdePkg/Include/Protocol/MmPowerButtonDispatch.h | 9 +- MdePkg/Include/Protocol/MmReadyToLock.h | 2 +- .../Include/Protocol/MmReportStatusCodeHandler.h | 8 +- MdePkg/Include/Protocol/MmStandbyButtonDispatch.h | 9 +- MdePkg/Include/Protocol/MmStatusCode.h | 8 +- MdePkg/Include/Protocol/MmSwDispatch.h | 20 +- MdePkg/Include/Protocol/MmSxDispatch.h | 12 +- MdePkg/Include/Protocol/MmUsbDispatch.h | 11 +- MdePkg/Include/Protocol/MonotonicCounter.h | 2 +- MdePkg/Include/Protocol/MpService.h | 90 +- MdePkg/Include/Protocol/Mtftp4.h | 159 +- MdePkg/Include/Protocol/Mtftp6.h | 142 +- .../Include/Protocol/NetworkInterfaceIdentifier.h | 64 +- MdePkg/Include/Protocol/NvdimmLabel.h | 100 +- MdePkg/Include/Protocol/NvmExpressPassthru.h | 108 +- MdePkg/Include/Protocol/PartitionInfo.h | 23 +- MdePkg/Include/Protocol/Pcd.h | 139 +- MdePkg/Include/Protocol/PcdInfo.h | 23 +- MdePkg/Include/Protocol/PciEnumerationComplete.h | 2 +- .../Protocol/PciHostBridgeResourceAllocation.h | 22 +- MdePkg/Include/Protocol/PciHotPlugInit.h | 18 +- MdePkg/Include/Protocol/PciHotPlugRequest.h | 6 +- MdePkg/Include/Protocol/PciIo.h | 96 +- MdePkg/Include/Protocol/PciOverride.h | 3 +- MdePkg/Include/Protocol/PciPlatform.h | 22 +- MdePkg/Include/Protocol/PciRootBridgeIo.h | 86 +- MdePkg/Include/Protocol/PiPcd.h | 78 +- MdePkg/Include/Protocol/PiPcdInfo.h | 13 +- MdePkg/Include/Protocol/Pkcs7Verify.h | 11 +- MdePkg/Include/Protocol/PlatformDriverOverride.h | 10 +- .../Protocol/PlatformToDriverConfiguration.h | 99 +- MdePkg/Include/Protocol/PxeBaseCode.h | 266 +- MdePkg/Include/Protocol/PxeBaseCodeCallBack.h | 13 +- MdePkg/Include/Protocol/RamDisk.h | 12 +- MdePkg/Include/Protocol/RealTimeClock.h | 2 +- MdePkg/Include/Protocol/RedfishDiscover.h | 76 +- .../Include/Protocol/RegularExpressionProtocol.h | 28 +- MdePkg/Include/Protocol/ReportStatusCodeHandler.h | 12 +- MdePkg/Include/Protocol/Reset.h | 2 +- MdePkg/Include/Protocol/ResetNotification.h | 16 +- MdePkg/Include/Protocol/Rest.h | 10 +- MdePkg/Include/Protocol/RestEx.h | 110 +- MdePkg/Include/Protocol/RestJsonStructure.h | 41 +- MdePkg/Include/Protocol/Rng.h | 22 +- MdePkg/Include/Protocol/Runtime.h | 50 +- MdePkg/Include/Protocol/S3SaveState.h | 55 +- MdePkg/Include/Protocol/S3SmmSaveState.h | 4 +- MdePkg/Include/Protocol/ScsiIo.h | 106 +- MdePkg/Include/Protocol/ScsiPassThru.h | 66 +- MdePkg/Include/Protocol/ScsiPassThruExt.h | 86 +- MdePkg/Include/Protocol/SdMmcPassThru.h | 66 +- MdePkg/Include/Protocol/Security.h | 6 +- MdePkg/Include/Protocol/Security2.h | 10 +- MdePkg/Include/Protocol/SecurityPolicy.h | 2 +- MdePkg/Include/Protocol/SerialIo.h | 52 +- MdePkg/Include/Protocol/ServiceBinding.h | 4 +- MdePkg/Include/Protocol/Shell.h | 207 +- MdePkg/Include/Protocol/ShellDynamicCommand.h | 18 +- MdePkg/Include/Protocol/ShellParameters.h | 12 +- MdePkg/Include/Protocol/SimpleFileSystem.h | 91 +- MdePkg/Include/Protocol/SimpleNetwork.h | 142 +- MdePkg/Include/Protocol/SimplePointer.h | 32 +- MdePkg/Include/Protocol/SimpleTextIn.h | 18 +- MdePkg/Include/Protocol/SimpleTextInEx.h | 123 +- MdePkg/Include/Protocol/SimpleTextOut.h | 90 +- MdePkg/Include/Protocol/SmartCardEdge.h | 147 +- MdePkg/Include/Protocol/SmartCardReader.h | 79 +- MdePkg/Include/Protocol/Smbios.h | 148 +- MdePkg/Include/Protocol/SmbusHc.h | 26 +- MdePkg/Include/Protocol/SmmAccess2.h | 7 +- MdePkg/Include/Protocol/SmmBase2.h | 9 +- MdePkg/Include/Protocol/SmmCommunication.h | 6 +- MdePkg/Include/Protocol/SmmConfiguration.h | 11 +- MdePkg/Include/Protocol/SmmControl2.h | 7 +- MdePkg/Include/Protocol/SmmCpu.h | 27 +- MdePkg/Include/Protocol/SmmCpuIo2.h | 16 +- MdePkg/Include/Protocol/SmmEndOfDxe.h | 4 +- MdePkg/Include/Protocol/SmmGpiDispatch2.h | 9 +- MdePkg/Include/Protocol/SmmIoTrapDispatch2.h | 5 +- MdePkg/Include/Protocol/SmmPciRootBridgeIo.h | 7 +- .../Include/Protocol/SmmPeriodicTimerDispatch2.h | 17 +- MdePkg/Include/Protocol/SmmPowerButtonDispatch2.h | 5 +- MdePkg/Include/Protocol/SmmReadyToLock.h | 4 +- .../Include/Protocol/SmmReportStatusCodeHandler.h | 4 +- .../Include/Protocol/SmmStandbyButtonDispatch2.h | 5 +- MdePkg/Include/Protocol/SmmStatusCode.h | 7 +- MdePkg/Include/Protocol/SmmSwDispatch2.h | 22 +- MdePkg/Include/Protocol/SmmSxDispatch2.h | 6 +- MdePkg/Include/Protocol/SmmUsbDispatch2.h | 5 +- MdePkg/Include/Protocol/SpiConfiguration.h | 56 +- MdePkg/Include/Protocol/SpiHc.h | 20 +- MdePkg/Include/Protocol/SpiIo.h | 38 +- MdePkg/Include/Protocol/SpiNorFlash.h | 36 +- MdePkg/Include/Protocol/SpiSmmConfiguration.h | 4 +- MdePkg/Include/Protocol/SpiSmmHc.h | 4 +- MdePkg/Include/Protocol/SpiSmmNorFlash.h | 4 +- MdePkg/Include/Protocol/StatusCode.h | 4 +- MdePkg/Include/Protocol/StorageSecurityCommand.h | 12 +- MdePkg/Include/Protocol/SuperIo.h | 26 +- MdePkg/Include/Protocol/SuperIoControl.h | 12 +- MdePkg/Include/Protocol/Supplicant.h | 48 +- MdePkg/Include/Protocol/TapeIo.h | 52 +- MdePkg/Include/Protocol/Tcg2Protocol.h | 96 +- MdePkg/Include/Protocol/TcgService.h | 26 +- MdePkg/Include/Protocol/Tcp4.h | 142 +- MdePkg/Include/Protocol/Tcp6.h | 136 +- MdePkg/Include/Protocol/Timer.h | 15 +- MdePkg/Include/Protocol/Timestamp.h | 16 +- MdePkg/Include/Protocol/Tls.h | 77 +- MdePkg/Include/Protocol/TlsConfig.h | 10 +- MdePkg/Include/Protocol/TrEEProtocol.h | 60 +- MdePkg/Include/Protocol/Udp4.h | 94 +- MdePkg/Include/Protocol/Udp6.h | 80 +- MdePkg/Include/Protocol/UfsDeviceConfig.h | 10 +- MdePkg/Include/Protocol/UgaDraw.h | 25 +- MdePkg/Include/Protocol/UgaIo.h | 70 +- MdePkg/Include/Protocol/UnicodeCollation.h | 28 +- MdePkg/Include/Protocol/Usb2HostController.h | 89 +- MdePkg/Include/Protocol/UsbFunctionIo.h | 137 +- MdePkg/Include/Protocol/UsbHostController.h | 33 +- MdePkg/Include/Protocol/UsbIo.h | 61 +- MdePkg/Include/Protocol/UserCredential.h | 30 +- MdePkg/Include/Protocol/UserCredential2.h | 38 +- MdePkg/Include/Protocol/UserManager.h | 170 +- MdePkg/Include/Protocol/Variable.h | 2 +- MdePkg/Include/Protocol/VariableWrite.h | 2 +- MdePkg/Include/Protocol/VlanConfig.h | 15 +- MdePkg/Include/Protocol/WatchdogTimer.h | 12 +- MdePkg/Include/Protocol/WiFi.h | 284 +- MdePkg/Include/Protocol/WiFi2.h | 78 +- MdePkg/Include/Register/Amd/Cpuid.h | 230 +- MdePkg/Include/Register/Amd/Fam17Msr.h | 96 +- MdePkg/Include/Register/Amd/Ghcb.h | 304 +- MdePkg/Include/Register/Intel/ArchitecturalMsr.h | 2046 +++++++------- MdePkg/Include/Register/Intel/Cpuid.h | 982 ++++--- MdePkg/Include/Register/Intel/LocalApic.h | 171 +- MdePkg/Include/Register/Intel/Microcode.h | 58 +- MdePkg/Include/Register/Intel/Msr/AtomMsr.h | 247 +- MdePkg/Include/Register/Intel/Msr/BroadwellMsr.h | 105 +- MdePkg/Include/Register/Intel/Msr/Core2Msr.h | 317 +-- MdePkg/Include/Register/Intel/Msr/CoreMsr.h | 284 +- MdePkg/Include/Register/Intel/Msr/GoldmontMsr.h | 839 +++--- .../Include/Register/Intel/Msr/GoldmontPlusMsr.h | 216 +- MdePkg/Include/Register/Intel/Msr/HaswellEMsr.h | 1177 +++----- MdePkg/Include/Register/Intel/Msr/HaswellMsr.h | 741 +++-- MdePkg/Include/Register/Intel/Msr/IvyBridgeMsr.h | 604 ++-- MdePkg/Include/Register/Intel/Msr/NehalemMsr.h | 1417 ++++------ MdePkg/Include/Register/Intel/Msr/P6Msr.h | 474 ++-- MdePkg/Include/Register/Intel/Msr/Pentium4Msr.h | 600 ++-- MdePkg/Include/Register/Intel/Msr/PentiumMMsr.h | 181 +- MdePkg/Include/Register/Intel/Msr/PentiumMsr.h | 16 +- MdePkg/Include/Register/Intel/Msr/SandyBridgeMsr.h | 1146 ++++---- MdePkg/Include/Register/Intel/Msr/SilvermontMsr.h | 447 ++- MdePkg/Include/Register/Intel/Msr/SkylakeMsr.h | 1219 ++++----- MdePkg/Include/Register/Intel/Msr/Xeon5600Msr.h | 37 +- MdePkg/Include/Register/Intel/Msr/XeonDMsr.h | 410 ++- MdePkg/Include/Register/Intel/Msr/XeonE7Msr.h | 88 +- MdePkg/Include/Register/Intel/Msr/XeonPhiMsr.h | 435 ++- MdePkg/Include/Register/Intel/SmramSaveStateMap.h | 220 +- MdePkg/Include/Register/Intel/StmApi.h | 378 ++- .../Include/Register/Intel/StmResourceDescriptor.h | 134 +- MdePkg/Include/Register/Intel/StmStatusCode.h | 2 +- MdePkg/Include/RiscV64/ProcessorBind.h | 92 +- MdePkg/Include/Uefi.h | 1 - MdePkg/Include/Uefi/UefiAcpiDataTable.h | 7 +- MdePkg/Include/Uefi/UefiBaseType.h | 140 +- MdePkg/Include/Uefi/UefiGpt.h | 36 +- .../Include/Uefi/UefiInternalFormRepresentation.h | 1468 +++++----- MdePkg/Include/Uefi/UefiMultiPhase.h | 36 +- MdePkg/Include/Uefi/UefiPxe.h | 608 ++-- MdePkg/Include/Uefi/UefiSpec.h | 381 ++- MdePkg/Include/X64/ProcessorBind.h | 314 ++- MdePkg/Library/BaseCacheMaintenanceLib/ArmCache.c | 32 +- MdePkg/Library/BaseCacheMaintenanceLib/EbcCache.c | 16 +- .../Library/BaseCacheMaintenanceLib/RiscVCache.c | 28 +- MdePkg/Library/BaseCacheMaintenanceLib/X86Cache.c | 31 +- .../BaseCacheMaintenanceLibNull.c | 16 +- MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlb.c | 3 - MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlbGcc.c | 1 - MdePkg/Library/BaseCpuLib/Ia32/CpuSleep.c | 2 - MdePkg/Library/BaseCpuLib/Ia32/CpuSleepGcc.c | 2 - MdePkg/Library/BaseDebugLibNull/DebugLib.c | 23 +- MdePkg/Library/BaseDebugLibSerialPort/DebugLib.c | 52 +- .../BaseExtractGuidedSectionLib.c | 124 +- .../BaseIoLibIntrinsicInternal.h | 2 - MdePkg/Library/BaseIoLibIntrinsic/IoHighLevel.c | 456 +-- MdePkg/Library/BaseIoLibIntrinsic/IoLib.c | 80 +- MdePkg/Library/BaseIoLibIntrinsic/IoLibArmVirt.c | 140 +- MdePkg/Library/BaseIoLibIntrinsic/IoLibEbc.c | 55 +- MdePkg/Library/BaseIoLibIntrinsic/IoLibGcc.c | 41 +- .../Library/BaseIoLibIntrinsic/IoLibMmioBuffer.c | 124 +- MdePkg/Library/BaseIoLibIntrinsic/IoLibMsc.c | 96 +- MdePkg/Library/BaseIoLibIntrinsic/IoLibNoIo.c | 134 +- MdePkg/Library/BaseLib/ARShiftU64.c | 4 +- MdePkg/Library/BaseLib/Arm/InternalSwitchStack.c | 1 - MdePkg/Library/BaseLib/Arm/Unaligned.c | 66 +- MdePkg/Library/BaseLib/BaseLibInternals.h | 140 +- MdePkg/Library/BaseLib/BitField.c | 215 +- MdePkg/Library/BaseLib/CheckSum.c | 104 +- MdePkg/Library/BaseLib/ChkStkGcc.c | 4 +- MdePkg/Library/BaseLib/Cpu.c | 6 +- MdePkg/Library/BaseLib/CpuDeadLoop.c | 4 +- MdePkg/Library/BaseLib/DivS64x64Remainder.c | 9 +- MdePkg/Library/BaseLib/DivU64x32.c | 7 +- MdePkg/Library/BaseLib/DivU64x32Remainder.c | 9 +- MdePkg/Library/BaseLib/DivU64x64Remainder.c | 9 +- MdePkg/Library/BaseLib/Ebc/CpuBreakpoint.c | 3 +- MdePkg/Library/BaseLib/Ebc/SpeculationBarrier.c | 1 - MdePkg/Library/BaseLib/FilePaths.c | 39 +- MdePkg/Library/BaseLib/GetPowerOfTwo32.c | 5 +- MdePkg/Library/BaseLib/GetPowerOfTwo64.c | 7 +- MdePkg/Library/BaseLib/HighBitSet32.c | 14 +- MdePkg/Library/BaseLib/HighBitSet64.c | 7 +- MdePkg/Library/BaseLib/Ia32/ARShiftU64.c | 8 +- MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.c | 9 +- MdePkg/Library/BaseLib/Ia32/CpuId.c | 10 +- MdePkg/Library/BaseLib/Ia32/CpuIdEx.c | 12 +- MdePkg/Library/BaseLib/Ia32/CpuPause.c | 4 - MdePkg/Library/BaseLib/Ia32/DisableCache.c | 1 - MdePkg/Library/BaseLib/Ia32/DisableInterrupts.c | 4 - MdePkg/Library/BaseLib/Ia32/DisablePaging32.c | 2 +- MdePkg/Library/BaseLib/Ia32/DivS64x64Remainder.c | 17 +- MdePkg/Library/BaseLib/Ia32/DivU64x32.c | 8 +- MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.c | 7 +- MdePkg/Library/BaseLib/Ia32/EnableCache.c | 1 - .../Library/BaseLib/Ia32/EnableDisableInterrupts.c | 4 - MdePkg/Library/BaseLib/Ia32/EnableInterrupts.c | 4 - MdePkg/Library/BaseLib/Ia32/EnablePaging32.c | 2 +- MdePkg/Library/BaseLib/Ia32/FlushCacheLine.c | 6 +- MdePkg/Library/BaseLib/Ia32/FxRestore.c | 5 +- MdePkg/Library/BaseLib/Ia32/FxSave.c | 5 +- MdePkg/Library/BaseLib/Ia32/GccInline.c | 81 +- MdePkg/Library/BaseLib/Ia32/GccInlinePriv.c | 173 +- MdePkg/Library/BaseLib/Ia32/InternalSwitchStack.c | 10 +- MdePkg/Library/BaseLib/Ia32/Invd.c | 4 - MdePkg/Library/BaseLib/Ia32/LRotU64.c | 10 +- MdePkg/Library/BaseLib/Ia32/LShiftU64.c | 8 +- MdePkg/Library/BaseLib/Ia32/ModU64x32.c | 7 +- MdePkg/Library/BaseLib/Ia32/Monitor.c | 7 +- MdePkg/Library/BaseLib/Ia32/MultU64x32.c | 8 +- MdePkg/Library/BaseLib/Ia32/MultU64x64.c | 8 +- MdePkg/Library/BaseLib/Ia32/Mwait.c | 5 +- MdePkg/Library/BaseLib/Ia32/Non-existing.c | 10 +- MdePkg/Library/BaseLib/Ia32/RRotU64.c | 8 +- MdePkg/Library/BaseLib/Ia32/RShiftU64.c | 8 +- MdePkg/Library/BaseLib/Ia32/ReadCr0.c | 3 - MdePkg/Library/BaseLib/Ia32/ReadCr2.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadCr3.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadCr4.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadCs.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadDr0.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadDr1.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadDr2.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadDr3.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadDr4.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadDr5.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadDr6.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadDr7.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadDs.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadEflags.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadEs.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadFs.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadGdtr.c | 3 - MdePkg/Library/BaseLib/Ia32/ReadGs.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadIdtr.c | 4 +- MdePkg/Library/BaseLib/Ia32/ReadLdtr.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadMm0.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadMm1.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadMm2.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadMm3.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadMm4.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadMm5.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadMm6.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadMm7.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadMsr64.c | 6 +- MdePkg/Library/BaseLib/Ia32/ReadPmc.c | 3 +- MdePkg/Library/BaseLib/Ia32/ReadSs.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadTr.c | 4 - MdePkg/Library/BaseLib/Ia32/ReadTsc.c | 4 - MdePkg/Library/BaseLib/Ia32/SwapBytes64.c | 6 +- MdePkg/Library/BaseLib/Ia32/Wbinvd.c | 4 - MdePkg/Library/BaseLib/Ia32/WriteCr0.c | 1 - MdePkg/Library/BaseLib/Ia32/WriteCr2.c | 1 - MdePkg/Library/BaseLib/Ia32/WriteCr3.c | 1 - MdePkg/Library/BaseLib/Ia32/WriteCr4.c | 1 - MdePkg/Library/BaseLib/Ia32/WriteDr0.c | 3 +- MdePkg/Library/BaseLib/Ia32/WriteDr1.c | 3 +- MdePkg/Library/BaseLib/Ia32/WriteDr2.c | 3 +- MdePkg/Library/BaseLib/Ia32/WriteDr3.c | 3 +- MdePkg/Library/BaseLib/Ia32/WriteDr4.c | 3 +- MdePkg/Library/BaseLib/Ia32/WriteDr5.c | 3 +- MdePkg/Library/BaseLib/Ia32/WriteDr6.c | 3 +- MdePkg/Library/BaseLib/Ia32/WriteDr7.c | 3 +- MdePkg/Library/BaseLib/Ia32/WriteGdtr.c | 5 +- MdePkg/Library/BaseLib/Ia32/WriteIdtr.c | 4 +- MdePkg/Library/BaseLib/Ia32/WriteLdtr.c | 6 +- MdePkg/Library/BaseLib/Ia32/WriteMm0.c | 6 +- MdePkg/Library/BaseLib/Ia32/WriteMm1.c | 6 +- MdePkg/Library/BaseLib/Ia32/WriteMm2.c | 6 +- MdePkg/Library/BaseLib/Ia32/WriteMm3.c | 6 +- MdePkg/Library/BaseLib/Ia32/WriteMm4.c | 5 +- MdePkg/Library/BaseLib/Ia32/WriteMm5.c | 5 +- MdePkg/Library/BaseLib/Ia32/WriteMm6.c | 6 +- MdePkg/Library/BaseLib/Ia32/WriteMm7.c | 6 +- MdePkg/Library/BaseLib/Ia32/WriteMsr64.c | 5 +- MdePkg/Library/BaseLib/LRotU32.c | 4 +- MdePkg/Library/BaseLib/LRotU64.c | 4 +- MdePkg/Library/BaseLib/LShiftU64.c | 4 +- MdePkg/Library/BaseLib/LinkedList.c | 60 +- MdePkg/Library/BaseLib/LongJump.c | 3 - MdePkg/Library/BaseLib/LowBitSet32.c | 11 +- MdePkg/Library/BaseLib/LowBitSet64.c | 12 +- MdePkg/Library/BaseLib/Math64.c | 65 +- MdePkg/Library/BaseLib/ModU64x32.c | 7 +- MdePkg/Library/BaseLib/MultS64x64.c | 9 +- MdePkg/Library/BaseLib/MultU64x32.c | 9 +- MdePkg/Library/BaseLib/MultU64x64.c | 9 +- MdePkg/Library/BaseLib/QuickSort.c | 31 +- MdePkg/Library/BaseLib/RRotU32.c | 4 +- MdePkg/Library/BaseLib/RRotU64.c | 4 +- MdePkg/Library/BaseLib/RShiftU64.c | 4 +- MdePkg/Library/BaseLib/RiscV64/CpuBreakpoint.c | 5 +- MdePkg/Library/BaseLib/RiscV64/CpuPause.c | 7 +- MdePkg/Library/BaseLib/RiscV64/DisableInterrupts.c | 6 +- MdePkg/Library/BaseLib/RiscV64/EnableInterrupts.c | 6 +- MdePkg/Library/BaseLib/RiscV64/GetInterruptState.c | 11 +- .../Library/BaseLib/RiscV64/InternalSwitchStack.c | 12 +- MdePkg/Library/BaseLib/SafeString.c | 619 +++-- MdePkg/Library/BaseLib/SetJump.c | 3 - MdePkg/Library/BaseLib/String.c | 330 +-- MdePkg/Library/BaseLib/SwapBytes16.c | 7 +- MdePkg/Library/BaseLib/SwapBytes32.c | 9 +- MdePkg/Library/BaseLib/SwapBytes64.c | 5 +- MdePkg/Library/BaseLib/SwitchStack.c | 2 +- MdePkg/Library/BaseLib/Unaligned.c | 26 +- MdePkg/Library/BaseLib/UnitTestHost.c | 2 +- MdePkg/Library/BaseLib/X64/CpuBreakpoint.c | 7 +- MdePkg/Library/BaseLib/X64/GccInline.c | 87 +- MdePkg/Library/BaseLib/X64/GccInlinePriv.c | 198 +- MdePkg/Library/BaseLib/X64/Non-existing.c | 11 +- MdePkg/Library/BaseLib/X64/ReadMsr64.c | 11 +- MdePkg/Library/BaseLib/X64/WriteMsr64.c | 10 +- MdePkg/Library/BaseLib/X86DisablePaging32.c | 3 - MdePkg/Library/BaseLib/X86DisablePaging64.c | 13 +- MdePkg/Library/BaseLib/X86EnablePaging32.c | 3 - MdePkg/Library/BaseLib/X86EnablePaging64.c | 13 +- MdePkg/Library/BaseLib/X86FxRestore.c | 7 +- MdePkg/Library/BaseLib/X86FxSave.c | 7 +- MdePkg/Library/BaseLib/X86GetInterruptState.c | 6 +- MdePkg/Library/BaseLib/X86MemoryFence.c | 3 - MdePkg/Library/BaseLib/X86Msr.c | 116 +- MdePkg/Library/BaseLib/X86PatchInstruction.c | 48 +- MdePkg/Library/BaseLib/X86RdRand.c | 6 +- MdePkg/Library/BaseLib/X86ReadGdtr.c | 5 +- MdePkg/Library/BaseLib/X86ReadIdtr.c | 5 +- MdePkg/Library/BaseLib/X86Thunk.c | 51 +- MdePkg/Library/BaseLib/X86UnitTestHost.c | 196 +- MdePkg/Library/BaseLib/X86WriteGdtr.c | 5 +- MdePkg/Library/BaseLib/X86WriteIdtr.c | 5 +- MdePkg/Library/BaseMemoryLib/CompareMemWrapper.c | 3 +- MdePkg/Library/BaseMemoryLib/CopyMem.c | 82 +- MdePkg/Library/BaseMemoryLib/CopyMemWrapper.c | 2 + MdePkg/Library/BaseMemoryLib/MemLibGeneric.c | 106 +- MdePkg/Library/BaseMemoryLib/MemLibGuid.c | 34 +- MdePkg/Library/BaseMemoryLib/MemLibInternals.h | 64 +- MdePkg/Library/BaseMemoryLib/ScanMem16Wrapper.c | 2 +- MdePkg/Library/BaseMemoryLib/ScanMem32Wrapper.c | 2 +- MdePkg/Library/BaseMemoryLib/ScanMem64Wrapper.c | 2 +- MdePkg/Library/BaseMemoryLib/ScanMem8Wrapper.c | 4 +- MdePkg/Library/BaseMemoryLib/SetMem.c | 35 +- .../Library/BaseMemoryLibMmx/CompareMemWrapper.c | 3 +- MdePkg/Library/BaseMemoryLibMmx/CopyMemWrapper.c | 2 + MdePkg/Library/BaseMemoryLibMmx/MemLibGuid.c | 34 +- MdePkg/Library/BaseMemoryLibMmx/MemLibInternals.h | 64 +- MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c | 2 +- MdePkg/Library/BaseMemoryLibMmx/ScanMem32Wrapper.c | 2 +- MdePkg/Library/BaseMemoryLibMmx/ScanMem64Wrapper.c | 2 +- MdePkg/Library/BaseMemoryLibMmx/ScanMem8Wrapper.c | 4 +- .../Library/BaseMemoryLibOptDxe/Arm/MemLibGuid.c | 10 +- .../BaseMemoryLibOptDxe/Arm/ScanMemGeneric.c | 41 +- .../BaseMemoryLibOptDxe/CompareMemWrapper.c | 3 +- .../Library/BaseMemoryLibOptDxe/CopyMemWrapper.c | 2 + MdePkg/Library/BaseMemoryLibOptDxe/MemLibGuid.c | 34 +- .../Library/BaseMemoryLibOptDxe/MemLibInternals.h | 64 +- .../Library/BaseMemoryLibOptDxe/ScanMem16Wrapper.c | 2 +- .../Library/BaseMemoryLibOptDxe/ScanMem32Wrapper.c | 2 +- .../Library/BaseMemoryLibOptDxe/ScanMem64Wrapper.c | 2 +- .../Library/BaseMemoryLibOptDxe/ScanMem8Wrapper.c | 4 +- .../BaseMemoryLibOptPei/CompareMemWrapper.c | 3 +- .../Library/BaseMemoryLibOptPei/CopyMemWrapper.c | 2 + MdePkg/Library/BaseMemoryLibOptPei/MemLibGuid.c | 34 +- .../Library/BaseMemoryLibOptPei/MemLibInternals.h | 64 +- .../Library/BaseMemoryLibOptPei/ScanMem16Wrapper.c | 2 +- .../Library/BaseMemoryLibOptPei/ScanMem32Wrapper.c | 2 +- .../Library/BaseMemoryLibOptPei/ScanMem64Wrapper.c | 2 +- .../Library/BaseMemoryLibOptPei/ScanMem8Wrapper.c | 4 +- .../BaseMemoryLibRepStr/CompareMemWrapper.c | 3 +- .../Library/BaseMemoryLibRepStr/CopyMemWrapper.c | 2 + MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c | 34 +- .../Library/BaseMemoryLibRepStr/MemLibInternals.h | 64 +- .../Library/BaseMemoryLibRepStr/ScanMem16Wrapper.c | 2 +- .../Library/BaseMemoryLibRepStr/ScanMem32Wrapper.c | 2 +- .../Library/BaseMemoryLibRepStr/ScanMem64Wrapper.c | 2 +- .../Library/BaseMemoryLibRepStr/ScanMem8Wrapper.c | 4 +- .../Library/BaseMemoryLibSse2/CompareMemWrapper.c | 3 +- MdePkg/Library/BaseMemoryLibSse2/CopyMemWrapper.c | 2 + MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c | 34 +- MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h | 64 +- .../Library/BaseMemoryLibSse2/ScanMem16Wrapper.c | 2 +- .../Library/BaseMemoryLibSse2/ScanMem32Wrapper.c | 2 +- .../Library/BaseMemoryLibSse2/ScanMem64Wrapper.c | 2 +- MdePkg/Library/BaseMemoryLibSse2/ScanMem8Wrapper.c | 4 +- .../BaseOrderedCollectionRedBlackTreeLib.c | 317 ++- MdePkg/Library/BasePcdLibNull/PcdLib.c | 221 +- MdePkg/Library/BasePciCf8Lib/PciCf8Lib.c | 331 ++- MdePkg/Library/BasePciExpressLib/PciExpressLib.c | 478 ++-- MdePkg/Library/BasePciLibCf8/PciLib.c | 193 +- MdePkg/Library/BasePciLibPciExpress/PciLib.c | 193 +- .../Library/BasePciSegmentLibPci/PciSegmentLib.c | 254 +- .../PeCoffGetEntryPoint.c | 200 +- MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c | 107 +- MdePkg/Library/BasePeCoffLib/BasePeCoff.c | 991 +++---- .../Library/BasePeCoffLib/BasePeCoffLibInternals.h | 31 +- MdePkg/Library/BasePeCoffLib/PeCoffLoaderEx.c | 21 +- .../Library/BasePeCoffLib/RiscV/PeCoffLoaderEx.c | 71 +- .../BasePerformanceLibNull/PerformanceLib.c | 35 +- MdePkg/Library/BasePostCodeLibDebug/PostCode.c | 11 +- MdePkg/Library/BasePostCodeLibPort80/PostCode.c | 37 +- MdePkg/Library/BasePrintLib/PrintLib.c | 55 +- MdePkg/Library/BasePrintLib/PrintLibInternal.c | 938 ++++--- MdePkg/Library/BasePrintLib/PrintLibInternal.h | 77 +- .../BaseReportStatusCodeLib.c | 10 - MdePkg/Library/BaseRngLib/AArch64/ArmRng.h | 2 +- MdePkg/Library/BaseRngLib/AArch64/Rndr.c | 17 +- MdePkg/Library/BaseRngLib/BaseRng.c | 11 +- MdePkg/Library/BaseRngLib/BaseRngLibInternals.h | 10 +- MdePkg/Library/BaseRngLib/Rand/RdRand.c | 11 +- MdePkg/Library/BaseRngLibNull/BaseRngLibNull.c | 8 +- MdePkg/Library/BaseRngLibTimerLib/RngLibTimer.c | 39 +- .../BaseS3BootScriptLibNull/BootScriptLib.c | 173 +- MdePkg/Library/BaseS3IoLib/S3IoLib.c | 594 ++-- MdePkg/Library/BaseS3PciLib/S3PciLib.c | 219 +- .../Library/BaseS3PciSegmentLib/S3PciSegmentLib.c | 217 +- MdePkg/Library/BaseS3SmbusLib/S3SmbusLib.c | 33 +- MdePkg/Library/BaseS3StallLib/S3StallLib.c | 7 +- MdePkg/Library/BaseSafeIntLib/SafeIntLib.c | 346 +-- MdePkg/Library/BaseSafeIntLib/SafeIntLib32.c | 17 +- MdePkg/Library/BaseSafeIntLib/SafeIntLib64.c | 5 +- MdePkg/Library/BaseSafeIntLib/SafeIntLibEbc.c | 36 +- .../BaseSerialPortLibNull/BaseSerialPortLibNull.c | 31 +- MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.c | 18 +- .../Library/BaseStackCheckLib/BaseStackCheckGcc.c | 14 +- .../Library/BaseStackCheckLib/BaseStackCheckNull.c | 2 +- .../BaseSynchronizationLibInternals.h | 26 +- .../BaseSynchronizationLib/Ebc/Synchronization.c | 28 +- .../BaseSynchronizationLib/Ia32/GccInline.c | 40 +- .../Ia32/InterlockedCompareExchange16.c | 10 +- .../Ia32/InterlockedCompareExchange32.c | 10 +- .../Ia32/InterlockedCompareExchange64.c | 9 +- .../Ia32/InternalGetSpinLockProperties.c | 3 +- .../InterlockedDecrementMsc.c | 10 +- .../InterlockedIncrementMsc.c | 10 +- .../BaseSynchronizationLib/Synchronization.c | 86 +- .../BaseSynchronizationLib/SynchronizationGcc.c | 92 +- .../BaseSynchronizationLib/SynchronizationMsc.c | 99 +- .../Library/BaseSynchronizationLib/X64/GccInline.c | 40 +- .../X64/InterlockedCompareExchange16.c | 18 +- .../X64/InterlockedCompareExchange32.c | 18 +- .../X64/InterlockedCompareExchange64.c | 18 +- .../BaseTimerLibNullTemplate/TimerLibNull.c | 10 +- .../BaseUefiDecompressLib/BaseUefiDecompressLib.c | 181 +- .../BaseUefiDecompressLibInternals.h | 69 +- .../BaseUefiTianoCustomDecompressLib.c | 56 +- .../Library/DxeCoreEntryPoint/DxeCoreEntryPoint.c | 7 +- MdePkg/Library/DxeCoreHobLib/HobLib.c | 96 +- .../DxeExtractGuidedSectionLib.c | 105 +- MdePkg/Library/DxeHobLib/HobLib.c | 97 +- MdePkg/Library/DxeHstiLib/HstiAip.c | 17 +- MdePkg/Library/DxeHstiLib/HstiDxe.c | 179 +- MdePkg/Library/DxeHstiLib/HstiDxe.h | 18 +- .../Library/DxeIoLibCpuIo2/DxeCpuIo2LibInternal.h | 11 +- MdePkg/Library/DxeIoLibCpuIo2/IoHighLevel.c | 457 ++-- MdePkg/Library/DxeIoLibCpuIo2/IoLib.c | 90 +- MdePkg/Library/DxeIoLibCpuIo2/IoLibMmioBuffer.c | 124 +- MdePkg/Library/DxePcdLib/DxePcdLib.c | 314 +-- MdePkg/Library/DxeRngLib/DxeRngLib.c | 52 +- .../DxeRuntimeDebugLibSerialPort/DebugLib.c | 84 +- .../DxeRuntimePciExpressLib/PciExpressLib.c | 378 +-- MdePkg/Library/DxeServicesLib/Allocate.c | 5 +- MdePkg/Library/DxeServicesLib/DxeServicesLib.c | 434 +-- MdePkg/Library/DxeServicesLib/X64/Allocate.c | 3 +- .../DxeServicesTableLib/DxeServicesTableLib.c | 4 +- MdePkg/Library/DxeSmbusLib/DxeSmbusLib.c | 20 +- MdePkg/Library/DxeSmbusLib/InternalSmbusLib.h | 16 +- MdePkg/Library/DxeSmbusLib/SmbusLib.c | 20 +- .../MmServicesTableLib/MmServicesTableLib.c | 6 +- .../MmUnblockMemoryLib/MmUnblockMemoryLibNull.c | 4 +- .../PciSegmentLibSegmentInfo/BasePciSegmentLib.c | 4 +- .../DxeRuntimePciSegmentLib.c | 30 +- .../PciSegmentLibSegmentInfo/PciSegmentLibCommon.c | 409 +-- .../PciSegmentLibSegmentInfo/PciSegmentLibCommon.h | 8 +- .../Library/PeiCoreEntryPoint/PeiCoreEntryPoint.c | 8 +- .../PeiDxePostCodeLibReportStatusCode/PostCode.c | 9 +- .../PeiExtractGuidedSectionLib.c | 163 +- MdePkg/Library/PeiHobLib/HobLib.c | 173 +- MdePkg/Library/PeiIoLibCpuIo/IoHighLevel.c | 457 ++-- MdePkg/Library/PeiIoLibCpuIo/IoLib.c | 199 +- MdePkg/Library/PeiIoLibCpuIo/IoLibMmioBuffer.c | 125 +- .../PeiMemoryAllocationLib/MemoryAllocationLib.c | 52 +- MdePkg/Library/PeiMemoryLib/CompareMemWrapper.c | 3 +- MdePkg/Library/PeiMemoryLib/CopyMemWrapper.c | 2 + MdePkg/Library/PeiMemoryLib/MemLib.c | 14 +- MdePkg/Library/PeiMemoryLib/MemLibGeneric.c | 102 +- MdePkg/Library/PeiMemoryLib/MemLibGuid.c | 34 +- MdePkg/Library/PeiMemoryLib/MemLibInternals.h | 64 +- MdePkg/Library/PeiMemoryLib/ScanMem16Wrapper.c | 2 +- MdePkg/Library/PeiMemoryLib/ScanMem32Wrapper.c | 2 +- MdePkg/Library/PeiMemoryLib/ScanMem64Wrapper.c | 2 +- MdePkg/Library/PeiMemoryLib/ScanMem8Wrapper.c | 4 +- MdePkg/Library/PeiPcdLib/PeiPcdLib.c | 266 +- MdePkg/Library/PeiPciLibPciCfg2/PciLib.c | 288 +- .../PeiPciSegmentLibPciCfg2/PciSegmentLib.c | 299 +- .../PeiResourcePublicationLib.c | 15 +- MdePkg/Library/PeiServicesLib/PeiServicesLib.c | 207 +- .../PeiServicesTablePointer.c | 7 +- .../PeiServicesTablePointer.c | 34 +- .../PeiSmbusLibSmbus2Ppi/InternalSmbusLib.h | 11 +- MdePkg/Library/PeiSmbusLibSmbus2Ppi/PeiSmbusLib.c | 18 +- MdePkg/Library/PeiSmbusLibSmbus2Ppi/SmbusLib.c | 20 +- MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c | 11 +- .../RegisterFilterLibNull/RegisterFilterLibNull.c | 29 +- MdePkg/Library/SecPeiDxeTimerLibCpu/X86TimerLib.c | 68 +- .../SmiHandlerProfileLibNull.c | 18 +- MdePkg/Library/SmmIoLib/SmmIoLib.c | 63 +- MdePkg/Library/SmmIoLibSmmCpuIo2/IoHighLevel.c | 456 +-- MdePkg/Library/SmmIoLibSmmCpuIo2/IoLib.c | 128 +- MdePkg/Library/SmmIoLibSmmCpuIo2/IoLibMmioBuffer.c | 124 +- .../SmmIoLibSmmCpuIo2/SmmCpuIoLibInternal.h | 21 +- MdePkg/Library/SmmLibNull/SmmLibNull.c | 4 - MdePkg/Library/SmmMemLib/SmmMemLib.c | 194 +- .../SmmMemoryAllocationLib/MemoryAllocationLib.c | 60 +- MdePkg/Library/SmmPciExpressLib/PciExpressLib.c | 1058 +++---- MdePkg/Library/SmmPciLibPciRootBridgeIo/PciLib.c | 293 +- .../Library/SmmPeriodicSmiLib/SmmPeriodicSmiLib.c | 132 +- .../SmmServicesTableLib/SmmServicesTableLib.c | 2 +- .../StandaloneMmDriverEntryPoint.c | 6 +- .../StandaloneMmServicesTableLib.c | 2 +- .../ApplicationEntryPoint.c | 5 +- .../UefiBootServicesTableLib.c | 1 - MdePkg/Library/UefiDebugLibConOut/DebugLib.c | 56 +- .../UefiDebugLibConOut/DebugLibConstructor.c | 34 +- .../UefiDebugLibDebugPortProtocol/DebugLib.c | 83 +- .../DebugLibConstructor.c | 22 +- MdePkg/Library/UefiDebugLibStdErr/DebugLib.c | 59 +- .../UefiDebugLibStdErr/DebugLibConstructor.c | 34 +- .../Library/UefiDevicePathLib/DevicePathFromText.c | 1904 ++++++------- .../Library/UefiDevicePathLib/DevicePathToText.c | 817 +++--- .../UefiDevicePathLib/DevicePathUtilities.c | 101 +- .../UefiDevicePathLib/DevicePathUtilitiesDxeSmm.c | 6 +- .../DevicePathUtilitiesStandaloneMm.c | 3 +- .../Library/UefiDevicePathLib/UefiDevicePathLib.c | 21 +- .../Library/UefiDevicePathLib/UefiDevicePathLib.h | 152 +- .../UefiDevicePathLibOptionalDevicePathProtocol.c | 48 +- .../UefiDevicePathLib.c | 89 +- .../UefiDriverEntryPoint/DriverEntryPoint.c | 7 +- .../Library/UefiFileHandleLib/UefiFileHandleLib.c | 500 ++-- MdePkg/Library/UefiLib/Acpi.c | 130 +- MdePkg/Library/UefiLib/Console.c | 110 +- MdePkg/Library/UefiLib/UefiDriverModel.c | 2111 ++++++++------ MdePkg/Library/UefiLib/UefiLib.c | 276 +- MdePkg/Library/UefiLib/UefiLibInternal.h | 1 - MdePkg/Library/UefiLib/UefiLibPrint.c | 257 +- MdePkg/Library/UefiLib/UefiNotTiano.c | 26 +- .../UefiMemoryAllocationLib/MemoryAllocationLib.c | 43 +- MdePkg/Library/UefiMemoryLib/CompareMemWrapper.c | 3 +- MdePkg/Library/UefiMemoryLib/CopyMemWrapper.c | 2 + MdePkg/Library/UefiMemoryLib/MemLib.c | 14 +- MdePkg/Library/UefiMemoryLib/MemLibGeneric.c | 102 +- MdePkg/Library/UefiMemoryLib/MemLibGuid.c | 34 +- MdePkg/Library/UefiMemoryLib/MemLibInternals.h | 64 +- MdePkg/Library/UefiMemoryLib/ScanMem16Wrapper.c | 2 +- MdePkg/Library/UefiMemoryLib/ScanMem32Wrapper.c | 2 +- MdePkg/Library/UefiMemoryLib/ScanMem64Wrapper.c | 2 +- MdePkg/Library/UefiMemoryLib/ScanMem8Wrapper.c | 4 +- MdePkg/Library/UefiPciLibPciRootBridgeIo/PciLib.c | 268 +- .../PciSegmentLib.c | 307 ++- .../PciSegmentLib.h | 3 +- MdePkg/Library/UefiRuntimeLib/RuntimeLib.c | 134 +- MdePkg/Library/UefiScsiLib/UefiScsiLib.c | 614 ++--- MdePkg/Library/UefiUsbLib/Hid.c | 133 +- MdePkg/Library/UefiUsbLib/UefiUsbLibInternal.h | 1 - MdePkg/Library/UefiUsbLib/UsbDxeLib.c | 253 +- .../UnitTest/Include/Library/UnitTestHostBaseLib.h | 132 +- .../Test/UnitTest/Library/BaseLib/Base64UnitTest.c | 170 +- .../SafeIntLibUintnIntnUnitTests32.c | 276 +- .../SafeIntLibUintnIntnUnitTests64.c | 276 +- .../Library/BaseSafeIntLib/TestBaseSafeIntLib.c | 1794 ++++++------ .../Library/BaseSafeIntLib/TestBaseSafeIntLib.h | 68 +- 975 files changed, 55848 insertions(+), 57957 deletions(-) diff --git a/MdePkg/Include/AArch64/ProcessorBind.h b/MdePkg/Include/AArch64/ProcessorBind.h index 896bf27..abe2571 100644 --- a/MdePkg/Include/AArch64/ProcessorBind.h +++ b/MdePkg/Include/AArch64/ProcessorBind.h @@ -20,11 +20,11 @@ // // Make sure we are using the correct packing rules per EFI specification // -#if !defined(__GNUC__) && !defined(__ASSEMBLER__) -#pragma pack() +#if !defined (__GNUC__) && !defined (__ASSEMBLER__) + #pragma pack() #endif -#if defined(_MSC_EXTENSIONS) +#if defined (_MSC_EXTENSIONS) // // Disable some level 4 compilation warnings (same as IA32 and X64) @@ -33,75 +33,75 @@ // // Disabling bitfield type checking warnings. // -#pragma warning ( disable : 4214 ) + #pragma warning ( disable : 4214 ) // // Disabling the unreferenced formal parameter warnings. // -#pragma warning ( disable : 4100 ) + #pragma warning ( disable : 4100 ) // // Disable slightly different base types warning as CHAR8 * can not be set // to a constant string. // -#pragma warning ( disable : 4057 ) + #pragma warning ( disable : 4057 ) // // ASSERT(FALSE) or while (TRUE) are legal constructs so suppress this warning // -#pragma warning ( disable : 4127 ) + #pragma warning ( disable : 4127 ) // // This warning is caused by functions defined but not used. For precompiled header only. // -#pragma warning ( disable : 4505 ) + #pragma warning ( disable : 4505 ) // // This warning is caused by empty (after preprocessing) source file. For precompiled header only. // -#pragma warning ( disable : 4206 ) + #pragma warning ( disable : 4206 ) // // Disable 'potentially uninitialized local variable X used' warnings // -#pragma warning ( disable : 4701 ) + #pragma warning ( disable : 4701 ) // // Disable 'potentially uninitialized local pointer variable X used' warnings // -#pragma warning ( disable : 4703 ) - - // - // use Microsoft* C compiler dependent integer width types - // - typedef unsigned __int64 UINT64; - typedef __int64 INT64; - typedef unsigned __int32 UINT32; - typedef __int32 INT32; - typedef unsigned short UINT16; - typedef unsigned short CHAR16; - typedef short INT16; - typedef unsigned char BOOLEAN; - typedef unsigned char UINT8; - typedef char CHAR8; - typedef signed char INT8; + #pragma warning ( disable : 4703 ) + +// +// use Microsoft* C compiler dependent integer width types +// +typedef unsigned __int64 UINT64; +typedef __int64 INT64; +typedef unsigned __int32 UINT32; +typedef __int32 INT32; +typedef unsigned short UINT16; +typedef unsigned short CHAR16; +typedef short INT16; +typedef unsigned char BOOLEAN; +typedef unsigned char UINT8; +typedef char CHAR8; +typedef signed char INT8; #else - // - // Assume standard AARCH64 alignment. - // - typedef unsigned long long UINT64; - typedef long long INT64; - typedef unsigned int UINT32; - typedef int INT32; - typedef unsigned short UINT16; - typedef unsigned short CHAR16; - typedef short INT16; - typedef unsigned char BOOLEAN; - typedef unsigned char UINT8; - typedef char CHAR8; - typedef signed char INT8; +// +// Assume standard AARCH64 alignment. +// +typedef unsigned long long UINT64; +typedef long long INT64; +typedef unsigned int UINT32; +typedef int INT32; +typedef unsigned short UINT16; +typedef unsigned short CHAR16; +typedef short INT16; +typedef unsigned char BOOLEAN; +typedef unsigned char UINT8; +typedef char CHAR8; +typedef signed char INT8; #endif @@ -109,13 +109,13 @@ /// Unsigned value of native width. (4 bytes on supported 32-bit processor instructions, /// 8 bytes on supported 64-bit processor instructions) /// -typedef UINT64 UINTN; +typedef UINT64 UINTN; /// /// Signed value of native width. (4 bytes on supported 32-bit processor instructions, /// 8 bytes on supported 64-bit processor instructions) /// -typedef INT64 INTN; +typedef INT64 INTN; // // Processor specific defines @@ -124,7 +124,7 @@ typedef INT64 INTN; /// /// A value of native width with the highest bit set. /// -#define MAX_BIT 0x8000000000000000ULL +#define MAX_BIT 0x8000000000000000ULL /// /// A value of native width with the two highest bits set. @@ -134,12 +134,12 @@ typedef INT64 INTN; /// /// Maximum legal AARCH64 address /// -#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFFULL +#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFFULL /// /// Maximum usable address at boot time (48 bits using 4 KB pages) /// -#define MAX_ALLOC_ADDRESS 0xFFFFFFFFFFFFULL +#define MAX_ALLOC_ADDRESS 0xFFFFFFFFFFFFULL /// /// Maximum legal AArch64 INTN and UINTN values. @@ -150,7 +150,7 @@ typedef INT64 INTN; /// /// Minimum legal AArch64 INTN value. /// -#define MIN_INTN (((INTN)-9223372036854775807LL) - 1) +#define MIN_INTN (((INTN)-9223372036854775807LL) - 1) /// /// The stack alignment required for AARCH64 @@ -160,8 +160,8 @@ typedef INT64 INTN; /// /// Page allocation granularity for AARCH64 /// -#define DEFAULT_PAGE_ALLOCATION_GRANULARITY (0x1000) -#define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x10000) +#define DEFAULT_PAGE_ALLOCATION_GRANULARITY (0x1000) +#define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x10000) // // Modifier to ensure that all protocol member functions and EFI intrinsics @@ -172,18 +172,18 @@ typedef INT64 INTN; // When compiling with Clang, we still use GNU as for the assembler, so we still // need to define the GCC_ASM* macros. -#if defined(__GNUC__) || defined(__clang__) - /// - /// For GNU assembly code, .global or .globl can declare global symbols. - /// Define this macro to unify the usage. - /// - #define ASM_GLOBAL .globl - - #define GCC_ASM_EXPORT(func__) \ +#if defined (__GNUC__) || defined (__clang__) +/// +/// For GNU assembly code, .global or .globl can declare global symbols. +/// Define this macro to unify the usage. +/// +#define ASM_GLOBAL .globl + +#define GCC_ASM_EXPORT(func__) \ .global _CONCATENATE (__USER_LABEL_PREFIX__, func__) ;\ .type ASM_PFX(func__), %function - #define GCC_ASM_IMPORT(func__) \ +#define GCC_ASM_IMPORT(func__) \ .extern _CONCATENATE (__USER_LABEL_PREFIX__, func__) #endif @@ -198,7 +198,7 @@ typedef INT64 INTN; @return The pointer to the first instruction of a function given a function pointer. **/ -#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer) +#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer) #ifndef __USER_LABEL_PREFIX__ #define __USER_LABEL_PREFIX__ diff --git a/MdePkg/Include/Arm/ProcessorBind.h b/MdePkg/Include/Arm/ProcessorBind.h index 1264b44..5a8204b 100644 --- a/MdePkg/Include/Arm/ProcessorBind.h +++ b/MdePkg/Include/Arm/ProcessorBind.h @@ -18,11 +18,11 @@ // // Make sure we are using the correct packing rules per EFI specification // -#if !defined(__GNUC__) && !defined(__ASSEMBLER__) -#pragma pack() +#if !defined (__GNUC__) && !defined (__ASSEMBLER__) + #pragma pack() #endif -#if defined(_MSC_EXTENSIONS) +#if defined (_MSC_EXTENSIONS) // // Disable some level 4 compilation warnings (same as IA32 and X64) @@ -31,97 +31,97 @@ // // Disabling bitfield type checking warnings. // -#pragma warning ( disable : 4214 ) + #pragma warning ( disable : 4214 ) // // Disabling the unreferenced formal parameter warnings. // -#pragma warning ( disable : 4100 ) + #pragma warning ( disable : 4100 ) // // Disable slightly different base types warning as CHAR8 * can not be set // to a constant string. // -#pragma warning ( disable : 4057 ) + #pragma warning ( disable : 4057 ) // // ASSERT(FALSE) or while (TRUE) are legal constructs so suppress this warning // -#pragma warning ( disable : 4127 ) + #pragma warning ( disable : 4127 ) // // This warning is caused by functions defined but not used. For precompiled header only. // -#pragma warning ( disable : 4505 ) + #pragma warning ( disable : 4505 ) // // This warning is caused by empty (after preprocessing) source file. For precompiled header only. // -#pragma warning ( disable : 4206 ) + #pragma warning ( disable : 4206 ) // // Disable 'potentially uninitialized local variable X used' warnings // -#pragma warning ( disable : 4701 ) + #pragma warning ( disable : 4701 ) // // Disable 'potentially uninitialized local pointer variable X used' warnings // -#pragma warning ( disable : 4703 ) + #pragma warning ( disable : 4703 ) #endif // // RVCT and MSFT don't support the __builtin_unreachable() macro // -#if defined(__ARMCC_VERSION) || defined(_MSC_EXTENSIONS) +#if defined (__ARMCC_VERSION) || defined (_MSC_EXTENSIONS) #define UNREACHABLE() #endif -#if defined(_MSC_EXTENSIONS) - // - // use Microsoft* C compiler dependent integer width types - // - typedef unsigned __int64 UINT64; - typedef __int64 INT64; - typedef unsigned __int32 UINT32; - typedef __int32 INT32; - typedef unsigned short UINT16; - typedef unsigned short CHAR16; - typedef short INT16; - typedef unsigned char BOOLEAN; - typedef unsigned char UINT8; - typedef char CHAR8; - typedef signed char INT8; +#if defined (_MSC_EXTENSIONS) +// +// use Microsoft* C compiler dependent integer width types +// +typedef unsigned __int64 UINT64; +typedef __int64 INT64; +typedef unsigned __int32 UINT32; +typedef __int32 INT32; +typedef unsigned short UINT16; +typedef unsigned short CHAR16; +typedef short INT16; +typedef unsigned char BOOLEAN; +typedef unsigned char UINT8; +typedef char CHAR8; +typedef signed char INT8; #else - // - // Assume standard ARM alignment. - // Need to check portability of long long - // - typedef unsigned long long UINT64; - typedef long long INT64; - typedef unsigned int UINT32; - typedef int INT32; - typedef unsigned short UINT16; - typedef unsigned short CHAR16; - typedef short INT16; - typedef unsigned char BOOLEAN; - typedef unsigned char UINT8; - typedef char CHAR8; - typedef signed char INT8; +// +// Assume standard ARM alignment. +// Need to check portability of long long +// +typedef unsigned long long UINT64; +typedef long long INT64; +typedef unsigned int UINT32; +typedef int INT32; +typedef unsigned short UINT16; +typedef unsigned short CHAR16; +typedef short INT16; +typedef unsigned char BOOLEAN; +typedef unsigned char UINT8; +typedef char CHAR8; +typedef signed char INT8; #endif /// /// Unsigned value of native width. (4 bytes on supported 32-bit processor instructions, /// 8 bytes on supported 64-bit processor instructions) /// -typedef UINT32 UINTN; +typedef UINT32 UINTN; /// /// Signed value of native width. (4 bytes on supported 32-bit processor instructions, /// 8 bytes on supported 64-bit processor instructions) /// -typedef INT32 INTN; +typedef INT32 INTN; // // Processor specific defines @@ -130,12 +130,12 @@ typedef INT32 INTN; /// /// A value of native width with the highest bit set. /// -#define MAX_BIT 0x80000000 +#define MAX_BIT 0x80000000 /// /// A value of native width with the two highest bits set. /// -#define MAX_2_BITS 0xC0000000 +#define MAX_2_BITS 0xC0000000 /// /// Maximum legal ARM address @@ -145,7 +145,7 @@ typedef INT32 INTN; /// /// Maximum usable address at boot time /// -#define MAX_ALLOC_ADDRESS MAX_ADDRESS +#define MAX_ALLOC_ADDRESS MAX_ADDRESS /// /// Maximum legal ARM INTN and UINTN values. @@ -156,7 +156,7 @@ typedef INT32 INTN; /// /// Minimum legal ARM INTN value. /// -#define MIN_INTN (((INTN)-2147483647) - 1) +#define MIN_INTN (((INTN)-2147483647) - 1) /// /// The stack alignment required for ARM @@ -166,8 +166,8 @@ typedef INT32 INTN; /// /// Page allocation granularity for ARM /// -#define DEFAULT_PAGE_ALLOCATION_GRANULARITY (0x1000) -#define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x1000) +#define DEFAULT_PAGE_ALLOCATION_GRANULARITY (0x1000) +#define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x1000) // // Modifier to ensure that all protocol member functions and EFI intrinsics @@ -178,45 +178,45 @@ typedef INT32 INTN; // When compiling with Clang, we still use GNU as for the assembler, so we still // need to define the GCC_ASM* macros. -#if defined(__GNUC__) || defined(__clang__) - /// - /// For GNU assembly code, .global or .globl can declare global symbols. - /// Define this macro to unify the usage. - /// - #define ASM_GLOBAL .globl - - #if !defined(__APPLE__) - /// - /// ARM EABI defines that the linker should not manipulate call relocations - /// (do bl/blx conversion) unless the target symbol has function type. - /// CodeSourcery 2010.09 started requiring the .type to function properly - /// - #define INTERWORK_FUNC(func__) .type ASM_PFX(func__), %function - - #define GCC_ASM_EXPORT(func__) \ +#if defined (__GNUC__) || defined (__clang__) +/// +/// For GNU assembly code, .global or .globl can declare global symbols. +/// Define this macro to unify the usage. +/// +#define ASM_GLOBAL .globl + + #if !defined (__APPLE__) +/// +/// ARM EABI defines that the linker should not manipulate call relocations +/// (do bl/blx conversion) unless the target symbol has function type. +/// CodeSourcery 2010.09 started requiring the .type to function properly +/// +#define INTERWORK_FUNC(func__) .type ASM_PFX(func__), %function + +#define GCC_ASM_EXPORT(func__) \ .global _CONCATENATE (__USER_LABEL_PREFIX__, func__) ;\ .type ASM_PFX(func__), %function - #define GCC_ASM_IMPORT(func__) \ +#define GCC_ASM_IMPORT(func__) \ .extern _CONCATENATE (__USER_LABEL_PREFIX__, func__) #else - // - // .type not supported by Apple Xcode tools - // - #define INTERWORK_FUNC(func__) +// +// .type not supported by Apple Xcode tools +// +#define INTERWORK_FUNC(func__) - #define GCC_ASM_EXPORT(func__) \ +#define GCC_ASM_EXPORT(func__) \ .globl _CONCATENATE (__USER_LABEL_PREFIX__, func__) \ - #define GCC_ASM_IMPORT(name) +#define GCC_ASM_IMPORT(name) #endif -#elif defined(_MSC_EXTENSIONS) - // - // PRESERVE8 is not supported by the MSFT assembler. - // - #define PRESERVE8 +#elif defined (_MSC_EXTENSIONS) +// +// PRESERVE8 is not supported by the MSFT assembler. +// +#define PRESERVE8 #endif /** @@ -229,12 +229,10 @@ typedef INT32 INTN; @return The pointer to the first instruction of a function given a function pointer. **/ -#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer) +#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer) #ifndef __USER_LABEL_PREFIX__ #define __USER_LABEL_PREFIX__ #endif #endif - - diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index 2da08b0..ce7bded 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -12,7 +12,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ - #ifndef __BASE_H__ #define __BASE_H__ @@ -21,11 +20,11 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // #include -#if defined(_MSC_EXTENSIONS) +#if defined (_MSC_EXTENSIONS) // // Disable warning when last field of data structure is a zero sized array. // -#pragma warning ( disable : 4200 ) + #pragma warning ( disable : 4200 ) #endif // @@ -33,20 +32,20 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // if the /OPT:REF linker option is used. We defined a macro as this is a // a non standard extension // -#if defined(_MSC_VER) && _MSC_VER < 1800 && !defined (MDE_CPU_EBC) - /// - /// Remove global variable from the linked image if there are no references to - /// it after all compiler and linker optimizations have been performed. - /// - /// - #define GLOBAL_REMOVE_IF_UNREFERENCED __declspec(selectany) +#if defined (_MSC_VER) && _MSC_VER < 1800 && !defined (MDE_CPU_EBC) +/// +/// Remove global variable from the linked image if there are no references to +/// it after all compiler and linker optimizations have been performed. +/// +/// +#define GLOBAL_REMOVE_IF_UNREFERENCED __declspec(selectany) #else - /// - /// Remove the global variable from the linked image if there are no references - /// to it after all compiler and linker optimizations have been performed. - /// - /// - #define GLOBAL_REMOVE_IF_UNREFERENCED +/// +/// Remove the global variable from the linked image if there are no references +/// to it after all compiler and linker optimizations have been performed. +/// +/// +#define GLOBAL_REMOVE_IF_UNREFERENCED #endif // @@ -55,27 +54,27 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // #ifndef UNREACHABLE #ifdef __GNUC__ - /// - /// Signal compilers and analyzers that this call is not reachable. It is - /// up to the compiler to remove any code past that point. - /// - #define UNREACHABLE() __builtin_unreachable () +/// +/// Signal compilers and analyzers that this call is not reachable. It is +/// up to the compiler to remove any code past that point. +/// +#define UNREACHABLE() __builtin_unreachable () #elif defined (__has_feature) #if __has_builtin (__builtin_unreachable) - /// - /// Signal compilers and analyzers that this call is not reachable. It is - /// up to the compiler to remove any code past that point. - /// - #define UNREACHABLE() __builtin_unreachable () +/// +/// Signal compilers and analyzers that this call is not reachable. It is +/// up to the compiler to remove any code past that point. +/// +#define UNREACHABLE() __builtin_unreachable () #endif #endif #ifndef UNREACHABLE - /// - /// Signal compilers and analyzers that this call is not reachable. It is - /// up to the compiler to remove any code past that point. - /// - #define UNREACHABLE() +/// +/// Signal compilers and analyzers that this call is not reachable. It is +/// up to the compiler to remove any code past that point. +/// +#define UNREACHABLE() #endif #endif @@ -86,26 +85,26 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // #ifndef NORETURN #if defined (__GNUC__) || defined (__clang__) - /// - /// Signal compilers and analyzers that the function cannot return. - /// It is up to the compiler to remove any code past a call to functions - /// flagged with this attribute. - /// - #define NORETURN __attribute__((noreturn)) - #elif defined(_MSC_EXTENSIONS) && !defined(MDE_CPU_EBC) - /// - /// Signal compilers and analyzers that the function cannot return. - /// It is up to the compiler to remove any code past a call to functions - /// flagged with this attribute. - /// - #define NORETURN __declspec(noreturn) +/// +/// Signal compilers and analyzers that the function cannot return. +/// It is up to the compiler to remove any code past a call to functions +/// flagged with this attribute. +/// +#define NORETURN __attribute__((noreturn)) + #elif defined (_MSC_EXTENSIONS) && !defined (MDE_CPU_EBC) +/// +/// Signal compilers and analyzers that the function cannot return. +/// It is up to the compiler to remove any code past a call to functions +/// flagged with this attribute. +/// +#define NORETURN __declspec(noreturn) #else - /// - /// Signal compilers and analyzers that the function cannot return. - /// It is up to the compiler to remove any code past a call to functions - /// flagged with this attribute. - /// - #define NORETURN +/// +/// Signal compilers and analyzers that the function cannot return. +/// It is up to the compiler to remove any code past a call to functions +/// flagged with this attribute. +/// +#define NORETURN #endif #endif @@ -116,20 +115,20 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #ifndef ANALYZER_UNREACHABLE #ifdef __clang_analyzer__ #if __has_builtin (__builtin_unreachable) - /// - /// Signal the analyzer that this call is not reachable. - /// This excludes compilers. - /// - #define ANALYZER_UNREACHABLE() __builtin_unreachable () +/// +/// Signal the analyzer that this call is not reachable. +/// This excludes compilers. +/// +#define ANALYZER_UNREACHABLE() __builtin_unreachable () #endif #endif #ifndef ANALYZER_UNREACHABLE - /// - /// Signal the analyzer that this call is not reachable. - /// This excludes compilers. - /// - #define ANALYZER_UNREACHABLE() +/// +/// Signal the analyzer that this call is not reachable. +/// This excludes compilers. +/// +#define ANALYZER_UNREACHABLE() #endif #endif @@ -142,20 +141,20 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #ifndef ANALYZER_NORETURN #ifdef __has_feature #if __has_feature (attribute_analyzer_noreturn) - /// - /// Signal analyzers that the function cannot return. - /// This excludes compilers. - /// - #define ANALYZER_NORETURN __attribute__((analyzer_noreturn)) +/// +/// Signal analyzers that the function cannot return. +/// This excludes compilers. +/// +#define ANALYZER_NORETURN __attribute__((analyzer_noreturn)) #endif #endif #ifndef ANALYZER_NORETURN - /// - /// Signal the analyzer that the function cannot return. - /// This excludes compilers. - /// - #define ANALYZER_NORETURN +/// +/// Signal the analyzer that the function cannot return. +/// This excludes compilers. +/// +#define ANALYZER_NORETURN #endif #endif @@ -165,17 +164,17 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// #ifndef RETURNS_TWICE #if defined (__GNUC__) || defined (__clang__) - /// - /// Tell the code optimizer that the function will return twice. - /// This prevents wrong optimizations which can cause bugs. - /// - #define RETURNS_TWICE __attribute__((returns_twice)) +/// +/// Tell the code optimizer that the function will return twice. +/// This prevents wrong optimizations which can cause bugs. +/// +#define RETURNS_TWICE __attribute__((returns_twice)) #else - /// - /// Tell the code optimizer that the function will return twice. - /// This prevents wrong optimizations which can cause bugs. - /// - #define RETURNS_TWICE +/// +/// Tell the code optimizer that the function will return twice. +/// This prevents wrong optimizations which can cause bugs. +/// +#define RETURNS_TWICE #endif #endif @@ -186,33 +185,33 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// Private worker functions for ASM_PFX() /// -#define _CONCATENATE(a, b) __CONCATENATE(a, b) -#define __CONCATENATE(a, b) a ## b +#define _CONCATENATE(a, b) __CONCATENATE(a, b) +#define __CONCATENATE(a, b) a ## b /// /// The __USER_LABEL_PREFIX__ macro predefined by GNUC represents the prefix /// on symbols in assembly language. /// -#define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name) +#define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name) #ifdef __APPLE__ - // - // Apple extension that is used by the linker to optimize code size - // with assembly functions. Put at the end of your .S files - // - #define ASM_FUNCTION_REMOVE_IF_UNREFERENCED .subsections_via_symbols +// +// Apple extension that is used by the linker to optimize code size +// with assembly functions. Put at the end of your .S files +// +#define ASM_FUNCTION_REMOVE_IF_UNREFERENCED .subsections_via_symbols #else - #define ASM_FUNCTION_REMOVE_IF_UNREFERENCED +#define ASM_FUNCTION_REMOVE_IF_UNREFERENCED #endif #ifdef __CC_ARM - // - // Older RVCT ARM compilers don't fully support #pragma pack and require __packed - // as a prefix for the structure. - // - #define PACKED __packed +// +// Older RVCT ARM compilers don't fully support #pragma pack and require __packed +// as a prefix for the structure. +// +#define PACKED __packed #else - #define PACKED +#define PACKED #endif /// @@ -220,24 +219,24 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// Unless otherwise specified, aligned on a 64 bit boundary. /// typedef struct { - UINT32 Data1; - UINT16 Data2; - UINT16 Data3; - UINT8 Data4[8]; + UINT32 Data1; + UINT16 Data2; + UINT16 Data3; + UINT8 Data4[8]; } GUID; /// /// 4-byte buffer. An IPv4 internet protocol address. /// typedef struct { - UINT8 Addr[4]; + UINT8 Addr[4]; } IPv4_ADDRESS; /// /// 16-byte buffer. An IPv6 internet protocol address. /// typedef struct { - UINT8 Addr[16]; + UINT8 Addr[16]; } IPv6_ADDRESS; // @@ -254,8 +253,8 @@ typedef struct _LIST_ENTRY LIST_ENTRY; /// _LIST_ENTRY structure definition. /// struct _LIST_ENTRY { - LIST_ENTRY *ForwardLink; - LIST_ENTRY *BackLink; + LIST_ENTRY *ForwardLink; + LIST_ENTRY *BackLink; }; // @@ -265,17 +264,17 @@ struct _LIST_ENTRY { /// /// Datum is read-only. /// -#define CONST const +#define CONST const /// /// Datum is scoped to the current file or function. /// -#define STATIC static +#define STATIC static /// /// Undeclared type. /// -#define VOID void +#define VOID void // // Modifiers for Data Types used to self document code. @@ -313,7 +312,7 @@ struct _LIST_ENTRY { /// Boolean false value. UEFI Specification defines this value to be 0, /// but this form is more portable. /// -#define FALSE ((BOOLEAN)(0==1)) +#define FALSE ((BOOLEAN)(0==1)) /// /// NULL pointer (VOID *) @@ -323,7 +322,7 @@ struct _LIST_ENTRY { // // Null character // -#define CHAR_NULL 0x0000 +#define CHAR_NULL 0x0000 /// /// Maximum values for common UEFI Data Types @@ -345,70 +344,70 @@ struct _LIST_ENTRY { #define MIN_INT32 (((INT32) -2147483647) - 1) #define MIN_INT64 (((INT64) -9223372036854775807LL) - 1) -#define BIT0 0x00000001 -#define BIT1 0x00000002 -#define BIT2 0x00000004 -#define BIT3 0x00000008 -#define BIT4 0x00000010 -#define BIT5 0x00000020 -#define BIT6 0x00000040 -#define BIT7 0x00000080 -#define BIT8 0x00000100 -#define BIT9 0x00000200 -#define BIT10 0x00000400 -#define BIT11 0x00000800 -#define BIT12 0x00001000 -#define BIT13 0x00002000 -#define BIT14 0x00004000 -#define BIT15 0x00008000 -#define BIT16 0x00010000 -#define BIT17 0x00020000 -#define BIT18 0x00040000 -#define BIT19 0x00080000 -#define BIT20 0x00100000 -#define BIT21 0x00200000 -#define BIT22 0x00400000 -#define BIT23 0x00800000 -#define BIT24 0x01000000 -#define BIT25 0x02000000 -#define BIT26 0x04000000 -#define BIT27 0x08000000 -#define BIT28 0x10000000 -#define BIT29 0x20000000 -#define BIT30 0x40000000 -#define BIT31 0x80000000 -#define BIT32 0x0000000100000000ULL -#define BIT33 0x0000000200000000ULL -#define BIT34 0x0000000400000000ULL -#define BIT35 0x0000000800000000ULL -#define BIT36 0x0000001000000000ULL -#define BIT37 0x0000002000000000ULL -#define BIT38 0x0000004000000000ULL -#define BIT39 0x0000008000000000ULL -#define BIT40 0x0000010000000000ULL -#define BIT41 0x0000020000000000ULL -#define BIT42 0x0000040000000000ULL -#define BIT43 0x0000080000000000ULL -#define BIT44 0x0000100000000000ULL -#define BIT45 0x0000200000000000ULL -#define BIT46 0x0000400000000000ULL -#define BIT47 0x0000800000000000ULL -#define BIT48 0x0001000000000000ULL -#define BIT49 0x0002000000000000ULL -#define BIT50 0x0004000000000000ULL -#define BIT51 0x0008000000000000ULL -#define BIT52 0x0010000000000000ULL -#define BIT53 0x0020000000000000ULL -#define BIT54 0x0040000000000000ULL -#define BIT55 0x0080000000000000ULL -#define BIT56 0x0100000000000000ULL -#define BIT57 0x0200000000000000ULL -#define BIT58 0x0400000000000000ULL -#define BIT59 0x0800000000000000ULL -#define BIT60 0x1000000000000000ULL -#define BIT61 0x2000000000000000ULL -#define BIT62 0x4000000000000000ULL -#define BIT63 0x8000000000000000ULL +#define BIT0 0x00000001 +#define BIT1 0x00000002 +#define BIT2 0x00000004 +#define BIT3 0x00000008 +#define BIT4 0x00000010 +#define BIT5 0x00000020 +#define BIT6 0x00000040 +#define BIT7 0x00000080 +#define BIT8 0x00000100 +#define BIT9 0x00000200 +#define BIT10 0x00000400 +#define BIT11 0x00000800 +#define BIT12 0x00001000 +#define BIT13 0x00002000 +#define BIT14 0x00004000 +#define BIT15 0x00008000 +#define BIT16 0x00010000 +#define BIT17 0x00020000 +#define BIT18 0x00040000 +#define BIT19 0x00080000 +#define BIT20 0x00100000 +#define BIT21 0x00200000 +#define BIT22 0x00400000 +#define BIT23 0x00800000 +#define BIT24 0x01000000 +#define BIT25 0x02000000 +#define BIT26 0x04000000 +#define BIT27 0x08000000 +#define BIT28 0x10000000 +#define BIT29 0x20000000 +#define BIT30 0x40000000 +#define BIT31 0x80000000 +#define BIT32 0x0000000100000000ULL +#define BIT33 0x0000000200000000ULL +#define BIT34 0x0000000400000000ULL +#define BIT35 0x0000000800000000ULL +#define BIT36 0x0000001000000000ULL +#define BIT37 0x0000002000000000ULL +#define BIT38 0x0000004000000000ULL +#define BIT39 0x0000008000000000ULL +#define BIT40 0x0000010000000000ULL +#define BIT41 0x0000020000000000ULL +#define BIT42 0x0000040000000000ULL +#define BIT43 0x0000080000000000ULL +#define BIT44 0x0000100000000000ULL +#define BIT45 0x0000200000000000ULL +#define BIT46 0x0000400000000000ULL +#define BIT47 0x0000800000000000ULL +#define BIT48 0x0001000000000000ULL +#define BIT49 0x0002000000000000ULL +#define BIT50 0x0004000000000000ULL +#define BIT51 0x0008000000000000ULL +#define BIT52 0x0010000000000000ULL +#define BIT53 0x0020000000000000ULL +#define BIT54 0x0040000000000000ULL +#define BIT55 0x0080000000000000ULL +#define BIT56 0x0100000000000000ULL +#define BIT57 0x0200000000000000ULL +#define BIT58 0x0400000000000000ULL +#define BIT59 0x0800000000000000ULL +#define BIT60 0x1000000000000000ULL +#define BIT61 0x2000000000000000ULL +#define BIT62 0x4000000000000000ULL +#define BIT63 0x8000000000000000ULL #define SIZE_1KB 0x00000400 #define SIZE_2KB 0x00000800 @@ -577,9 +576,9 @@ struct _LIST_ENTRY { @return The aligned size. **/ -#define _INT_SIZE_OF(n) ((sizeof (n) + sizeof (UINTN) - 1) &~(sizeof (UINTN) - 1)) +#define _INT_SIZE_OF(n) ((sizeof (n) + sizeof (UINTN) - 1) &~(sizeof (UINTN) - 1)) -#if defined(__CC_ARM) +#if defined (__CC_ARM) // // RVCT ARM variable argument list support. // @@ -588,42 +587,44 @@ struct _LIST_ENTRY { /// Variable used to traverse the list of arguments. This type can vary by /// implementation and could be an array or structure. /// -#ifdef __APCS_ADSABI - typedef int *va_list[1]; - #define VA_LIST va_list -#else - typedef struct __va_list { void *__ap; } va_list; - #define VA_LIST va_list -#endif + #ifdef __APCS_ADSABI +typedef int *va_list[1]; +#define VA_LIST va_list + #else +typedef struct __va_list { + void *__ap; +} va_list; +#define VA_LIST va_list + #endif -#define VA_START(Marker, Parameter) __va_start(Marker, Parameter) +#define VA_START(Marker, Parameter) __va_start(Marker, Parameter) -#define VA_ARG(Marker, TYPE) __va_arg(Marker, TYPE) +#define VA_ARG(Marker, TYPE) __va_arg(Marker, TYPE) -#define VA_END(Marker) ((void)0) +#define VA_END(Marker) ((void)0) // For some ARM RVCT compilers, __va_copy is not defined -#ifndef __va_copy - #define __va_copy(dest, src) ((void)((dest) = (src))) -#endif + #ifndef __va_copy +#define __va_copy(dest, src) ((void)((dest) = (src))) + #endif -#define VA_COPY(Dest, Start) __va_copy (Dest, Start) +#define VA_COPY(Dest, Start) __va_copy (Dest, Start) -#elif defined(_M_ARM) || defined(_M_ARM64) +#elif defined (_M_ARM) || defined (_M_ARM64) // // MSFT ARM variable argument list support. // -typedef char* VA_LIST; +typedef char *VA_LIST; -#define VA_START(Marker, Parameter) __va_start (&Marker, &Parameter, _INT_SIZE_OF (Parameter), __alignof(Parameter), &Parameter) -#define VA_ARG(Marker, TYPE) (*(TYPE *) ((Marker += _INT_SIZE_OF (TYPE) + ((-(INTN)Marker) & (sizeof(TYPE) - 1))) - _INT_SIZE_OF (TYPE))) -#define VA_END(Marker) (Marker = (VA_LIST) 0) -#define VA_COPY(Dest, Start) ((void)((Dest) = (Start))) +#define VA_START(Marker, Parameter) __va_start (&Marker, &Parameter, _INT_SIZE_OF (Parameter), __alignof(Parameter), &Parameter) +#define VA_ARG(Marker, TYPE) (*(TYPE *) ((Marker += _INT_SIZE_OF (TYPE) + ((-(INTN)Marker) & (sizeof(TYPE) - 1))) - _INT_SIZE_OF (TYPE))) +#define VA_END(Marker) (Marker = (VA_LIST) 0) +#define VA_COPY(Dest, Start) ((void)((Dest) = (Start))) -#elif defined(__GNUC__) || defined(__clang__) +#elif defined (__GNUC__) || defined (__clang__) -#if defined(MDE_CPU_X64) && !defined(NO_MSABI_VA_FUNCS) + #if defined (MDE_CPU_X64) && !defined (NO_MSABI_VA_FUNCS) // // X64 only. Use MS ABI version of GCC built-in macros for variable argument lists. // @@ -639,13 +640,13 @@ typedef __builtin_ms_va_list VA_LIST; #define VA_START(Marker, Parameter) __builtin_ms_va_start (Marker, Parameter) -#define VA_ARG(Marker, TYPE) ((sizeof (TYPE) < sizeof (UINTN)) ? (TYPE)(__builtin_va_arg (Marker, UINTN)) : (TYPE)(__builtin_va_arg (Marker, TYPE))) +#define VA_ARG(Marker, TYPE) ((sizeof (TYPE) < sizeof (UINTN)) ? (TYPE)(__builtin_va_arg (Marker, UINTN)) : (TYPE)(__builtin_va_arg (Marker, TYPE))) -#define VA_END(Marker) __builtin_ms_va_end (Marker) +#define VA_END(Marker) __builtin_ms_va_end (Marker) -#define VA_COPY(Dest, Start) __builtin_ms_va_copy (Dest, Start) +#define VA_COPY(Dest, Start) __builtin_ms_va_copy (Dest, Start) -#else + #else // // Use GCC built-in macros for variable argument lists. // @@ -658,13 +659,13 @@ typedef __builtin_va_list VA_LIST; #define VA_START(Marker, Parameter) __builtin_va_start (Marker, Parameter) -#define VA_ARG(Marker, TYPE) ((sizeof (TYPE) < sizeof (UINTN)) ? (TYPE)(__builtin_va_arg (Marker, UINTN)) : (TYPE)(__builtin_va_arg (Marker, TYPE))) +#define VA_ARG(Marker, TYPE) ((sizeof (TYPE) < sizeof (UINTN)) ? (TYPE)(__builtin_va_arg (Marker, UINTN)) : (TYPE)(__builtin_va_arg (Marker, TYPE))) -#define VA_END(Marker) __builtin_va_end (Marker) +#define VA_END(Marker) __builtin_va_end (Marker) -#define VA_COPY(Dest, Start) __builtin_va_copy (Dest, Start) +#define VA_COPY(Dest, Start) __builtin_va_copy (Dest, Start) -#endif + #endif #else /// @@ -689,7 +690,7 @@ typedef CHAR8 *VA_LIST; @return A pointer to the beginning of a variable argument list. **/ -#define VA_START(Marker, Parameter) (Marker = (VA_LIST) ((UINTN) & (Parameter) + _INT_SIZE_OF (Parameter))) +#define VA_START(Marker, Parameter) (Marker = (VA_LIST) ((UINTN) & (Parameter) + _INT_SIZE_OF (Parameter))) /** Returns an argument of a specified type from a variable argument list and updates @@ -707,7 +708,7 @@ typedef CHAR8 *VA_LIST; @return An argument of the type specified by TYPE. **/ -#define VA_ARG(Marker, TYPE) (*(TYPE *) ((Marker += _INT_SIZE_OF (TYPE)) - _INT_SIZE_OF (TYPE))) +#define VA_ARG(Marker, TYPE) (*(TYPE *) ((Marker += _INT_SIZE_OF (TYPE)) - _INT_SIZE_OF (TYPE))) /** Terminates the use of a variable argument list. @@ -719,7 +720,7 @@ typedef CHAR8 *VA_LIST; @param Marker VA_LIST used to traverse the list of arguments. **/ -#define VA_END(Marker) (Marker = (VA_LIST) 0) +#define VA_END(Marker) (Marker = (VA_LIST) 0) /** Initializes a VA_LIST as a copy of an existing VA_LIST. @@ -739,7 +740,7 @@ typedef CHAR8 *VA_LIST; /// /// Pointer to the start of a variable argument list stored in a memory buffer. Same as UINT8 *. /// -typedef UINTN *BASE_LIST; +typedef UINTN *BASE_LIST; /** Returns the size of a data type in sizeof(UINTN) units rounded up to the nearest UINTN boundary. @@ -748,7 +749,7 @@ typedef UINTN *BASE_LIST; @return The size of TYPE in sizeof (UINTN) units rounded up to the nearest UINTN boundary. **/ -#define _BASE_INT_SIZE_OF(TYPE) ((sizeof (TYPE) + sizeof (UINTN) - 1) / sizeof (UINTN)) +#define _BASE_INT_SIZE_OF(TYPE) ((sizeof (TYPE) + sizeof (UINTN) - 1) / sizeof (UINTN)) /** Returns an argument of a specified type from a variable argument list and updates @@ -766,7 +767,7 @@ typedef UINTN *BASE_LIST; @return An argument of the type specified by TYPE. **/ -#define BASE_ARG(Marker, TYPE) (*(TYPE *) ((Marker += _BASE_INT_SIZE_OF (TYPE)) - _BASE_INT_SIZE_OF (TYPE))) +#define BASE_ARG(Marker, TYPE) (*(TYPE *) ((Marker += _BASE_INT_SIZE_OF (TYPE)) - _BASE_INT_SIZE_OF (TYPE))) /** The macro that returns the byte offset of a field in a data structure. @@ -781,12 +782,12 @@ typedef UINTN *BASE_LIST; @return Offset, in bytes, of field. **/ -#if (defined(__GNUC__) && __GNUC__ >= 4) || defined(__clang__) -#define OFFSET_OF(TYPE, Field) ((UINTN) __builtin_offsetof(TYPE, Field)) +#if (defined (__GNUC__) && __GNUC__ >= 4) || defined (__clang__) +#define OFFSET_OF(TYPE, Field) ((UINTN) __builtin_offsetof(TYPE, Field)) #endif #ifndef OFFSET_OF -#define OFFSET_OF(TYPE, Field) ((UINTN) &(((TYPE *)0)->Field)) +#define OFFSET_OF(TYPE, Field) ((UINTN) &(((TYPE *)0)->Field)) #endif /** @@ -798,11 +799,11 @@ typedef UINTN *BASE_LIST; **/ #ifdef MDE_CPU_EBC - #define STATIC_ASSERT(Expression, Message) -#elif defined(_MSC_EXTENSIONS) - #define STATIC_ASSERT static_assert +#define STATIC_ASSERT(Expression, Message) +#elif defined (_MSC_EXTENSIONS) +#define STATIC_ASSERT static_assert #else - #define STATIC_ASSERT _Static_assert +#define STATIC_ASSERT _Static_assert #endif // @@ -880,7 +881,7 @@ STATIC_ASSERT (sizeof (__VERIFY_UINT32_ENUM_SIZE) == 4, "Size of enum does not m @return A value up to the next boundary. **/ -#define ALIGN_VALUE(Value, Alignment) ((Value) + (((Alignment) - (Value)) & ((Alignment) - 1))) +#define ALIGN_VALUE(Value, Alignment) ((Value) + (((Alignment) - (Value)) & ((Alignment) - 1))) /** Adjust a pointer by adding the minimum offset required for it to be aligned on @@ -895,7 +896,7 @@ STATIC_ASSERT (sizeof (__VERIFY_UINT32_ENUM_SIZE) == 4, "Size of enum does not m @return Pointer to the aligned address. **/ -#define ALIGN_POINTER(Pointer, Alignment) ((VOID *) (ALIGN_VALUE ((UINTN)(Pointer), (Alignment)))) +#define ALIGN_POINTER(Pointer, Alignment) ((VOID *) (ALIGN_VALUE ((UINTN)(Pointer), (Alignment)))) /** Rounds a value up to the next natural boundary for the current CPU. @@ -911,7 +912,6 @@ STATIC_ASSERT (sizeof (__VERIFY_UINT32_ENUM_SIZE) == 4, "Size of enum does not m **/ #define ALIGN_VARIABLE(Value) ALIGN_VALUE ((Value), sizeof (UINTN)) - /** Return the maximum of two operands. @@ -970,7 +970,7 @@ typedef UINTN RETURN_STATUS; @return The value specified by StatusCode with the highest bit set. **/ -#define ENCODE_ERROR(StatusCode) ((RETURN_STATUS)(MAX_BIT | (StatusCode))) +#define ENCODE_ERROR(StatusCode) ((RETURN_STATUS)(MAX_BIT | (StatusCode))) /** Produces a RETURN_STATUS code with the highest bit clear. @@ -981,7 +981,7 @@ typedef UINTN RETURN_STATUS; @return The value specified by StatusCode with the highest bit clear. **/ -#define ENCODE_WARNING(StatusCode) ((RETURN_STATUS)(StatusCode)) +#define ENCODE_WARNING(StatusCode) ((RETURN_STATUS)(StatusCode)) /** Returns TRUE if a specified RETURN_STATUS code is an error code. @@ -994,138 +994,138 @@ typedef UINTN RETURN_STATUS; @retval FALSE The high bit of StatusCode is clear. **/ -#define RETURN_ERROR(StatusCode) (((INTN)(RETURN_STATUS)(StatusCode)) < 0) +#define RETURN_ERROR(StatusCode) (((INTN)(RETURN_STATUS)(StatusCode)) < 0) /// /// The operation completed successfully. /// -#define RETURN_SUCCESS 0 +#define RETURN_SUCCESS 0 /// /// The image failed to load. /// -#define RETURN_LOAD_ERROR ENCODE_ERROR (1) +#define RETURN_LOAD_ERROR ENCODE_ERROR (1) /// /// The parameter was incorrect. /// -#define RETURN_INVALID_PARAMETER ENCODE_ERROR (2) +#define RETURN_INVALID_PARAMETER ENCODE_ERROR (2) /// /// The operation is not supported. /// -#define RETURN_UNSUPPORTED ENCODE_ERROR (3) +#define RETURN_UNSUPPORTED ENCODE_ERROR (3) /// /// The buffer was not the proper size for the request. /// -#define RETURN_BAD_BUFFER_SIZE ENCODE_ERROR (4) +#define RETURN_BAD_BUFFER_SIZE ENCODE_ERROR (4) /// /// The buffer was not large enough to hold the requested data. /// The required buffer size is returned in the appropriate /// parameter when this error occurs. /// -#define RETURN_BUFFER_TOO_SMALL ENCODE_ERROR (5) +#define RETURN_BUFFER_TOO_SMALL ENCODE_ERROR (5) /// /// There is no data pending upon return. /// -#define RETURN_NOT_READY ENCODE_ERROR (6) +#define RETURN_NOT_READY ENCODE_ERROR (6) /// /// The physical device reported an error while attempting the /// operation. /// -#define RETURN_DEVICE_ERROR ENCODE_ERROR (7) +#define RETURN_DEVICE_ERROR ENCODE_ERROR (7) /// /// The device can not be written to. /// -#define RETURN_WRITE_PROTECTED ENCODE_ERROR (8) +#define RETURN_WRITE_PROTECTED ENCODE_ERROR (8) /// /// The resource has run out. /// -#define RETURN_OUT_OF_RESOURCES ENCODE_ERROR (9) +#define RETURN_OUT_OF_RESOURCES ENCODE_ERROR (9) /// /// An inconsistency was detected on the file system causing the /// operation to fail. /// -#define RETURN_VOLUME_CORRUPTED ENCODE_ERROR (10) +#define RETURN_VOLUME_CORRUPTED ENCODE_ERROR (10) /// /// There is no more space on the file system. /// -#define RETURN_VOLUME_FULL ENCODE_ERROR (11) +#define RETURN_VOLUME_FULL ENCODE_ERROR (11) /// /// The device does not contain any medium to perform the /// operation. /// -#define RETURN_NO_MEDIA ENCODE_ERROR (12) +#define RETURN_NO_MEDIA ENCODE_ERROR (12) /// /// The medium in the device has changed since the last /// access. /// -#define RETURN_MEDIA_CHANGED ENCODE_ERROR (13) +#define RETURN_MEDIA_CHANGED ENCODE_ERROR (13) /// /// The item was not found. /// -#define RETURN_NOT_FOUND ENCODE_ERROR (14) +#define RETURN_NOT_FOUND ENCODE_ERROR (14) /// /// Access was denied. /// -#define RETURN_ACCESS_DENIED ENCODE_ERROR (15) +#define RETURN_ACCESS_DENIED ENCODE_ERROR (15) /// /// The server was not found or did not respond to the request. /// -#define RETURN_NO_RESPONSE ENCODE_ERROR (16) +#define RETURN_NO_RESPONSE ENCODE_ERROR (16) /// /// A mapping to the device does not exist. /// -#define RETURN_NO_MAPPING ENCODE_ERROR (17) +#define RETURN_NO_MAPPING ENCODE_ERROR (17) /// /// A timeout time expired. /// -#define RETURN_TIMEOUT ENCODE_ERROR (18) +#define RETURN_TIMEOUT ENCODE_ERROR (18) /// /// The protocol has not been started. /// -#define RETURN_NOT_STARTED ENCODE_ERROR (19) +#define RETURN_NOT_STARTED ENCODE_ERROR (19) /// /// The protocol has already been started. /// -#define RETURN_ALREADY_STARTED ENCODE_ERROR (20) +#define RETURN_ALREADY_STARTED ENCODE_ERROR (20) /// /// The operation was aborted. /// -#define RETURN_ABORTED ENCODE_ERROR (21) +#define RETURN_ABORTED ENCODE_ERROR (21) /// /// An ICMP error occurred during the network operation. /// -#define RETURN_ICMP_ERROR ENCODE_ERROR (22) +#define RETURN_ICMP_ERROR ENCODE_ERROR (22) /// /// A TFTP error occurred during the network operation. /// -#define RETURN_TFTP_ERROR ENCODE_ERROR (23) +#define RETURN_TFTP_ERROR ENCODE_ERROR (23) /// /// A protocol error occurred during the network operation. /// -#define RETURN_PROTOCOL_ERROR ENCODE_ERROR (24) +#define RETURN_PROTOCOL_ERROR ENCODE_ERROR (24) /// /// A function encountered an internal version that was @@ -1136,74 +1136,73 @@ typedef UINTN RETURN_STATUS; /// /// The function was not performed due to a security violation. /// -#define RETURN_SECURITY_VIOLATION ENCODE_ERROR (26) +#define RETURN_SECURITY_VIOLATION ENCODE_ERROR (26) /// /// A CRC error was detected. /// -#define RETURN_CRC_ERROR ENCODE_ERROR (27) +#define RETURN_CRC_ERROR ENCODE_ERROR (27) /// /// The beginning or end of media was reached. /// -#define RETURN_END_OF_MEDIA ENCODE_ERROR (28) +#define RETURN_END_OF_MEDIA ENCODE_ERROR (28) /// /// The end of the file was reached. /// -#define RETURN_END_OF_FILE ENCODE_ERROR (31) +#define RETURN_END_OF_FILE ENCODE_ERROR (31) /// /// The language specified was invalid. /// -#define RETURN_INVALID_LANGUAGE ENCODE_ERROR (32) +#define RETURN_INVALID_LANGUAGE ENCODE_ERROR (32) /// /// The security status of the data is unknown or compromised /// and the data must be updated or replaced to restore a valid /// security status. /// -#define RETURN_COMPROMISED_DATA ENCODE_ERROR (33) +#define RETURN_COMPROMISED_DATA ENCODE_ERROR (33) /// /// A HTTP error occurred during the network operation. /// -#define RETURN_HTTP_ERROR ENCODE_ERROR (35) +#define RETURN_HTTP_ERROR ENCODE_ERROR (35) /// /// The string contained one or more characters that /// the device could not render and were skipped. /// -#define RETURN_WARN_UNKNOWN_GLYPH ENCODE_WARNING (1) +#define RETURN_WARN_UNKNOWN_GLYPH ENCODE_WARNING (1) /// /// The handle was closed, but the file was not deleted. /// -#define RETURN_WARN_DELETE_FAILURE ENCODE_WARNING (2) +#define RETURN_WARN_DELETE_FAILURE ENCODE_WARNING (2) /// /// The handle was closed, but the data to the file was not /// flushed properly. /// -#define RETURN_WARN_WRITE_FAILURE ENCODE_WARNING (3) +#define RETURN_WARN_WRITE_FAILURE ENCODE_WARNING (3) /// /// The resulting buffer was too small, and the data was /// truncated to the buffer size. /// -#define RETURN_WARN_BUFFER_TOO_SMALL ENCODE_WARNING (4) +#define RETURN_WARN_BUFFER_TOO_SMALL ENCODE_WARNING (4) /// /// The data has not been updated within the timeframe set by /// local policy for this type of data. /// -#define RETURN_WARN_STALE_DATA ENCODE_WARNING (5) +#define RETURN_WARN_STALE_DATA ENCODE_WARNING (5) /// /// The resulting buffer contains UEFI-compliant file system. /// -#define RETURN_WARN_FILE_SYSTEM ENCODE_WARNING (6) - +#define RETURN_WARN_FILE_SYSTEM ENCODE_WARNING (6) /** Returns a 16-bit signature built from 2 ASCII characters. @@ -1217,7 +1216,7 @@ typedef UINTN RETURN_STATUS; @return A 16-bit value built from the two ASCII characters specified by A and B. **/ -#define SIGNATURE_16(A, B) ((A) | (B << 8)) +#define SIGNATURE_16(A, B) ((A) | (B << 8)) /** Returns a 32-bit signature built from 4 ASCII characters. @@ -1258,45 +1257,52 @@ typedef UINTN RETURN_STATUS; #define SIGNATURE_64(A, B, C, D, E, F, G, H) \ (SIGNATURE_32 (A, B, C, D) | ((UINT64) (SIGNATURE_32 (E, F, G, H)) << 32)) -#if defined(_MSC_EXTENSIONS) && !defined (__INTEL_COMPILER) && !defined (MDE_CPU_EBC) - void * _ReturnAddress(void); +#if defined (_MSC_EXTENSIONS) && !defined (__INTEL_COMPILER) && !defined (MDE_CPU_EBC) +void * +_ReturnAddress ( + void + ); + #pragma intrinsic(_ReturnAddress) - /** - Get the return address of the calling function. - Based on intrinsic function _ReturnAddress that provides the address of - the instruction in the calling function that will be executed after - control returns to the caller. +/** + Get the return address of the calling function. + + Based on intrinsic function _ReturnAddress that provides the address of + the instruction in the calling function that will be executed after + control returns to the caller. - @param L Return Level. + @param L Return Level. - @return The return address of the calling function or 0 if L != 0. + @return The return address of the calling function or 0 if L != 0. - **/ - #define RETURN_ADDRESS(L) ((L == 0) ? _ReturnAddress() : (VOID *) 0) +**/ +#define RETURN_ADDRESS(L) ((L == 0) ? _ReturnAddress() : (VOID *) 0) #elif defined (__GNUC__) || defined (__clang__) - /** - Get the return address of the calling function. - Based on built-in Function __builtin_return_address that returns - the return address of the current function, or of one of its callers. +/** + Get the return address of the calling function. + + Based on built-in Function __builtin_return_address that returns + the return address of the current function, or of one of its callers. - @param L Return Level. + @param L Return Level. - @return The return address of the calling function. + @return The return address of the calling function. - **/ - #define RETURN_ADDRESS(L) __builtin_return_address (L) +**/ +#define RETURN_ADDRESS(L) __builtin_return_address (L) #else - /** - Get the return address of the calling function. - @param L Return Level. +/** + Get the return address of the calling function. - @return 0 as compilers don't support this feature. + @param L Return Level. - **/ - #define RETURN_ADDRESS(L) ((VOID *) 0) + @return 0 as compilers don't support this feature. + +**/ +#define RETURN_ADDRESS(L) ((VOID *) 0) #endif /** @@ -1310,7 +1316,6 @@ typedef UINTN RETURN_STATUS; @return The number of elements in Array. The result has type UINTN. **/ -#define ARRAY_SIZE(Array) (sizeof (Array) / sizeof ((Array)[0])) +#define ARRAY_SIZE(Array) (sizeof (Array) / sizeof ((Array)[0])) #endif - diff --git a/MdePkg/Include/Ebc/ProcessorBind.h b/MdePkg/Include/Ebc/ProcessorBind.h index 566c896..2ddab99 100644 --- a/MdePkg/Include/Ebc/ProcessorBind.h +++ b/MdePkg/Include/Ebc/ProcessorBind.h @@ -24,68 +24,68 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// 1-byte signed value /// -typedef signed char INT8; +typedef signed char INT8; /// /// Logical Boolean. 1-byte value containing 0 for FALSE or a 1 for TRUE. Other /// values are undefined. /// -typedef unsigned char BOOLEAN; +typedef unsigned char BOOLEAN; /// /// 1-byte unsigned value. /// -typedef unsigned char UINT8; +typedef unsigned char UINT8; /// /// 1-byte Character. /// -typedef char CHAR8; +typedef char CHAR8; /// /// 2-byte signed value. /// -typedef short INT16; +typedef short INT16; /// /// 2-byte unsigned value. /// -typedef unsigned short UINT16; +typedef unsigned short UINT16; /// /// 2-byte Character. Unless otherwise specified all strings are stored in the /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards. /// -typedef unsigned short CHAR16; +typedef unsigned short CHAR16; /// /// 4-byte signed value. /// -typedef int INT32; +typedef int INT32; /// /// 4-byte unsigned value. /// -typedef unsigned int UINT32; +typedef unsigned int UINT32; /// /// 8-byte signed value. /// -typedef __int64 INT64; +typedef __int64 INT64; /// /// 8-byte unsigned value. /// -typedef unsigned __int64 UINT64; +typedef unsigned __int64 UINT64; /// /// Signed value of native width. (4 bytes on supported 32-bit processor instructions, /// 8 bytes on supported 64-bit processor instructions) /// "long" type scales to the processor native size with EBC compiler /// -typedef long INTN; +typedef long INTN; /// /// The unsigned value of native width. (4 bytes on supported 32-bit processor instructions; /// 8 bytes on supported 64-bit processor instructions) /// "long" type scales to the processor native size with the EBC compiler. /// -typedef unsigned long UINTN; +typedef unsigned long UINTN; /// /// A value of native width with the highest bit set. /// Scalable macro to set the most significant bit in a natural number. /// -#define MAX_BIT ((UINTN)((1ULL << (sizeof (INTN) * 8 - 1)))) +#define MAX_BIT ((UINTN)((1ULL << (sizeof (INTN) * 8 - 1)))) /// /// A value of native width with the two highest bits set. /// Scalable macro to set the most 2 significant bits in a natural number. @@ -95,12 +95,12 @@ typedef unsigned long UINTN; /// /// Maximum legal EBC address /// -#define MAX_ADDRESS ((UINTN)(~0ULL >> (64 - sizeof (INTN) * 8))) +#define MAX_ADDRESS ((UINTN)(~0ULL >> (64 - sizeof (INTN) * 8))) /// /// Maximum usable address at boot time (48 bits using 4 KB pages) /// -#define MAX_ALLOC_ADDRESS MAX_ADDRESS +#define MAX_ALLOC_ADDRESS MAX_ADDRESS /// /// Maximum legal EBC INTN and UINTN values. @@ -111,18 +111,18 @@ typedef unsigned long UINTN; /// /// Minimum legal EBC INTN value. /// -#define MIN_INTN (((INTN)-MAX_INTN) - 1) +#define MIN_INTN (((INTN)-MAX_INTN) - 1) /// /// The stack alignment required for EBC /// -#define CPU_STACK_ALIGNMENT sizeof(UINTN) +#define CPU_STACK_ALIGNMENT sizeof(UINTN) /// /// Page allocation granularity for EBC /// -#define DEFAULT_PAGE_ALLOCATION_GRANULARITY (0x1000) -#define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x1000) +#define DEFAULT_PAGE_ALLOCATION_GRANULARITY (0x1000) +#define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x1000) /// /// Modifier to ensure that all protocol member functions and EFI intrinsics @@ -130,9 +130,9 @@ typedef unsigned long UINTN; /// EFI intrinsics are required to modify their member functions with EFIAPI. /// #ifdef EFIAPI - /// - /// If EFIAPI is already defined, then we use that definition. - /// +/// +/// If EFIAPI is already defined, then we use that definition. +/// #else #define EFIAPI #endif @@ -146,11 +146,10 @@ typedef unsigned long UINTN; @return The pointer to the first instruction of a function given a function pointer. **/ -#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer) +#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer) #ifndef __USER_LABEL_PREFIX__ #define __USER_LABEL_PREFIX__ #endif #endif - diff --git a/MdePkg/Include/Guid/Acpi.h b/MdePkg/Include/Guid/Acpi.h index b3c8f50..d00d611 100644 --- a/MdePkg/Include/Guid/Acpi.h +++ b/MdePkg/Include/Guid/Acpi.h @@ -26,15 +26,15 @@ 0x8868e871, 0xe4f1, 0x11d3, {0xbc, 0x22, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \ } -#define ACPI_10_TABLE_GUID ACPI_TABLE_GUID +#define ACPI_10_TABLE_GUID ACPI_TABLE_GUID // // ACPI 2.0 or newer tables should use EFI_ACPI_TABLE_GUID. // -#define EFI_ACPI_20_TABLE_GUID EFI_ACPI_TABLE_GUID +#define EFI_ACPI_20_TABLE_GUID EFI_ACPI_TABLE_GUID -extern EFI_GUID gEfiAcpiTableGuid; -extern EFI_GUID gEfiAcpi10TableGuid; -extern EFI_GUID gEfiAcpi20TableGuid; +extern EFI_GUID gEfiAcpiTableGuid; +extern EFI_GUID gEfiAcpi10TableGuid; +extern EFI_GUID gEfiAcpi20TableGuid; #endif diff --git a/MdePkg/Include/Guid/Apriori.h b/MdePkg/Include/Guid/Apriori.h index e9cb63f..23a2d19 100644 --- a/MdePkg/Include/Guid/Apriori.h +++ b/MdePkg/Include/Guid/Apriori.h @@ -19,6 +19,6 @@ 0xfc510ee7, 0xffdc, 0x11d4, {0xbd, 0x41, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \ } -extern EFI_GUID gAprioriGuid; +extern EFI_GUID gAprioriGuid; #endif diff --git a/MdePkg/Include/Guid/AprioriFileName.h b/MdePkg/Include/Guid/AprioriFileName.h index dc74d01..078162e 100644 --- a/MdePkg/Include/Guid/AprioriFileName.h +++ b/MdePkg/Include/Guid/AprioriFileName.h @@ -17,7 +17,6 @@ #define PEI_APRIORI_FILE_NAME_GUID \ { 0x1b45cc0a, 0x156a, 0x428a, { 0x62, 0XAF, 0x49, 0x86, 0x4d, 0xa0, 0xe6, 0xe6 } } - /// /// This file must be of type EFI_FV_FILETYPE_FREEFORM and must /// contain a single section of type EFI_SECTION_RAW. For details on @@ -29,10 +28,9 @@ typedef struct { /// An array of zero or more EFI_GUID type entries that match the file names of PEIM /// modules in the same Firmware Volume. The maximum number of entries. /// - EFI_GUID FileNamesWithinVolume[1]; + EFI_GUID FileNamesWithinVolume[1]; } PEI_APRIORI_FILE_CONTENTS; -extern EFI_GUID gPeiAprioriFileNameGuid; +extern EFI_GUID gPeiAprioriFileNameGuid; #endif - diff --git a/MdePkg/Include/Guid/Btt.h b/MdePkg/Include/Guid/Btt.h index a98fa6d..21523b8 100644 --- a/MdePkg/Include/Guid/Btt.h +++ b/MdePkg/Include/Guid/Btt.h @@ -26,19 +26,19 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // // Alignment of all BTT structures // -#define EFI_BTT_ALIGNMENT 4096 +#define EFI_BTT_ALIGNMENT 4096 -#define EFI_BTT_INFO_UNUSED_LEN 3968 +#define EFI_BTT_INFO_UNUSED_LEN 3968 -#define EFI_BTT_INFO_BLOCK_SIG_LEN 16 +#define EFI_BTT_INFO_BLOCK_SIG_LEN 16 /// /// Indicate inconsistent metadata or lost metadata due to unrecoverable media errors. /// -#define EFI_BTT_INFO_BLOCK_FLAGS_ERROR 0x00000001 +#define EFI_BTT_INFO_BLOCK_FLAGS_ERROR 0x00000001 -#define EFI_BTT_INFO_BLOCK_MAJOR_VERSION 2 -#define EFI_BTT_INFO_BLOCK_MINOR_VERSION 0 +#define EFI_BTT_INFO_BLOCK_MAJOR_VERSION 2 +#define EFI_BTT_INFO_BLOCK_MINOR_VERSION 0 /// /// Block Translation Table (BTT) Info Block @@ -48,97 +48,97 @@ typedef struct _EFI_BTT_INFO_BLOCK { /// Signature of the BTT Index Block data structure. /// Shall be "BTT_ARENA_INFO\0\0". /// - CHAR8 Sig[EFI_BTT_INFO_BLOCK_SIG_LEN]; + CHAR8 Sig[EFI_BTT_INFO_BLOCK_SIG_LEN]; /// /// UUID identifying this BTT instance. /// - GUID Uuid; + GUID Uuid; /// /// UUID of containing namespace. /// - GUID ParentUuid; + GUID ParentUuid; /// /// Attributes of this BTT Info Block. /// - UINT32 Flags; + UINT32 Flags; /// /// Major version number. Currently at version 2. /// - UINT16 Major; + UINT16 Major; /// /// Minor version number. Currently at version 0. /// - UINT16 Minor; + UINT16 Minor; /// /// Advertised LBA size in bytes. I/O requests shall be in this size chunk. /// - UINT32 ExternalLbaSize; + UINT32 ExternalLbaSize; /// /// Advertised number of LBAs in this arena. /// - UINT32 ExternalNLba; + UINT32 ExternalNLba; /// /// Internal LBA size shall be greater than or equal to ExternalLbaSize and shall not be smaller than 512 bytes. /// - UINT32 InternalLbaSize; + UINT32 InternalLbaSize; /// /// Number of internal blocks in the arena data area. /// - UINT32 InternalNLba; + UINT32 InternalNLba; /// /// Number of free blocks maintained for writes to this arena. /// - UINT32 NFree; + UINT32 NFree; /// /// The size of this info block in bytes. /// - UINT32 InfoSize; + UINT32 InfoSize; /// /// Offset of next arena, relative to the beginning of this arena. /// - UINT64 NextOff; + UINT64 NextOff; /// /// Offset of the data area for this arena, relative to the beginning of this arena. /// - UINT64 DataOff; + UINT64 DataOff; /// /// Offset of the map for this arena, relative to the beginning of this arena. /// - UINT64 MapOff; + UINT64 MapOff; /// /// Offset of the flog for this arena, relative to the beginning of this arena. /// - UINT64 FlogOff; + UINT64 FlogOff; /// /// Offset of the backup copy of this arena's info block, relative to the beginning of this arena. /// - UINT64 InfoOff; + UINT64 InfoOff; /// /// Shall be zero. /// - CHAR8 Unused[EFI_BTT_INFO_UNUSED_LEN]; + CHAR8 Unused[EFI_BTT_INFO_UNUSED_LEN]; /// /// 64-bit Fletcher64 checksum of all fields. /// - UINT64 Checksum; + UINT64 Checksum; } EFI_BTT_INFO_BLOCK; /// @@ -148,25 +148,25 @@ typedef struct _EFI_BTT_MAP_ENTRY { /// /// Post-map LBA number (block number in this arena's data area) /// - UINT32 PostMapLba : 30; + UINT32 PostMapLba : 30; /// /// When set and Zero is not set, reads on this block return an error. /// When set and Zero is set, indicate a map entry in its normal, non-error state. /// - UINT32 Error : 1; + UINT32 Error : 1; /// /// When set and Error is not set, reads on this block return a full block of zeros. /// When set and Error is set, indicate a map entry in its normal, non-error state. /// - UINT32 Zero : 1; + UINT32 Zero : 1; } EFI_BTT_MAP_ENTRY; /// /// Alignment of each flog structure /// -#define EFI_BTT_FLOG_ENTRY_ALIGNMENT 64 +#define EFI_BTT_FLOG_ENTRY_ALIGNMENT 64 /// /// The BTT Flog is both a free list and a log. @@ -178,45 +178,45 @@ typedef struct _EFI_BTT_FLOG { /// /// Last pre-map LBA written using this flog entry. /// - UINT32 Lba0; + UINT32 Lba0; /// /// Old post-map LBA. /// - UINT32 OldMap0; + UINT32 OldMap0; /// /// New post-map LBA. /// - UINT32 NewMap0; + UINT32 NewMap0; /// /// The Seq0 field in each flog entry is used to determine which set of fields is newer between the two sets /// (Lba0, OldMap0, NewMpa0, Seq0 vs Lba1, Oldmap1, NewMap1, Seq1). /// - UINT32 Seq0; + UINT32 Seq0; /// /// Alternate lba entry. /// - UINT32 Lba1; + UINT32 Lba1; /// /// Alternate old entry. /// - UINT32 OldMap1; + UINT32 OldMap1; /// /// Alternate new entry. /// - UINT32 NewMap1; + UINT32 NewMap1; /// /// Alternate Seq entry. /// - UINT32 Seq1; + UINT32 Seq1; } EFI_BTT_FLOG; -extern GUID gEfiBttAbstractionGuid; +extern GUID gEfiBttAbstractionGuid; #endif //_BTT_H_ diff --git a/MdePkg/Include/Guid/CapsuleReport.h b/MdePkg/Include/Guid/CapsuleReport.h index cd91e6d..28eceb6 100644 --- a/MdePkg/Include/Guid/CapsuleReport.h +++ b/MdePkg/Include/Guid/CapsuleReport.h @@ -9,7 +9,6 @@ **/ - #ifndef _CAPSULE_REPORT_GUID_H__ #define _CAPSULE_REPORT_GUID_H__ @@ -21,60 +20,56 @@ 0x39b68c46, 0xf7fb, 0x441b, {0xb6, 0xec, 0x16, 0xb0, 0xf6, 0x98, 0x21, 0xf3 } \ } - typedef struct { - /// /// Size in bytes of the variable including any data beyond header as specified by CapsuleGuid /// - UINT32 VariableTotalSize; + UINT32 VariableTotalSize; /// /// For alignment /// - UINT32 Reserved; + UINT32 Reserved; /// /// Guid from EFI_CAPSULE_HEADER /// - EFI_GUID CapsuleGuid; + EFI_GUID CapsuleGuid; /// /// Timestamp using system time when processing completed /// - EFI_TIME CapsuleProcessed; + EFI_TIME CapsuleProcessed; /// /// Result of the capsule processing. Exact interpretation of any error code may depend /// upon type of capsule processed /// - EFI_STATUS CapsuleStatus; + EFI_STATUS CapsuleStatus; } EFI_CAPSULE_RESULT_VARIABLE_HEADER; - typedef struct { - /// /// Version of this structure, currently 0x00000001 /// - UINT16 Version; + UINT16 Version; /// /// The index of the payload within the FMP capsule which was processed to generate this report /// Starting from zero /// - UINT8 PayloadIndex; + UINT8 PayloadIndex; /// /// The UpdateImageIndex from EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER /// (after unsigned conversion from UINT8 to UINT16). /// - UINT8 UpdateImageIndex; + UINT8 UpdateImageIndex; /// /// The UpdateImageTypeId Guid from EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER. /// - EFI_GUID UpdateImageTypeId; + EFI_GUID UpdateImageTypeId; /// /// In case of capsule loaded from disk, the zero-terminated array containing file name of capsule that was processed. @@ -94,7 +89,6 @@ typedef struct { } EFI_CAPSULE_RESULT_VARIABLE_FMP; typedef struct { - /// /// Version of this structure, currently 0x00000001 /// @@ -108,21 +102,21 @@ typedef struct { /// The JSON payload shall conform to a Redfish-defined JSON schema, see DMTF-Redfish /// Specification. /// - UINT32 CapsuleId; + UINT32 CapsuleId; /// /// The length of Resp in bytes. /// - UINT32 RespLength; + UINT32 RespLength; /// /// Variable length buffer containing the replied JSON payload to the caller who delivered JSON /// capsule to system. The definition of the JSON schema used in the replied payload is beyond /// the scope of this specification. /// - UINT8 Resp[]; - } EFI_CAPSULE_RESULT_VARIABLE_JSON; + UINT8 Resp[]; +} EFI_CAPSULE_RESULT_VARIABLE_JSON; -extern EFI_GUID gEfiCapsuleReportGuid; +extern EFI_GUID gEfiCapsuleReportGuid; #endif diff --git a/MdePkg/Include/Guid/Cper.h b/MdePkg/Include/Guid/Cper.h index 948f586..deb96d4 100644 --- a/MdePkg/Include/Guid/Cper.h +++ b/MdePkg/Include/Guid/Cper.h @@ -15,34 +15,34 @@ #pragma pack(1) -#define EFI_ERROR_RECORD_SIGNATURE_START SIGNATURE_32('C', 'P', 'E', 'R') -#define EFI_ERROR_RECORD_SIGNATURE_END 0xFFFFFFFF +#define EFI_ERROR_RECORD_SIGNATURE_START SIGNATURE_32('C', 'P', 'E', 'R') +#define EFI_ERROR_RECORD_SIGNATURE_END 0xFFFFFFFF -#define EFI_ERROR_RECORD_REVISION 0x0101 +#define EFI_ERROR_RECORD_REVISION 0x0101 /// /// Error Severity in Error Record Header and Error Section Descriptor ///@{ -#define EFI_GENERIC_ERROR_RECOVERABLE 0x00000000 -#define EFI_GENERIC_ERROR_FATAL 0x00000001 -#define EFI_GENERIC_ERROR_CORRECTED 0x00000002 -#define EFI_GENERIC_ERROR_INFO 0x00000003 +#define EFI_GENERIC_ERROR_RECOVERABLE 0x00000000 +#define EFI_GENERIC_ERROR_FATAL 0x00000001 +#define EFI_GENERIC_ERROR_CORRECTED 0x00000002 +#define EFI_GENERIC_ERROR_INFO 0x00000003 ///@} /// /// The validation bit mask indicates the validity of the following fields /// in Error Record Header. ///@{ -#define EFI_ERROR_RECORD_HEADER_PLATFORM_ID_VALID BIT0 -#define EFI_ERROR_RECORD_HEADER_TIME_STAMP_VALID BIT1 -#define EFI_ERROR_RECORD_HEADER_PARTITION_ID_VALID BIT2 +#define EFI_ERROR_RECORD_HEADER_PLATFORM_ID_VALID BIT0 +#define EFI_ERROR_RECORD_HEADER_TIME_STAMP_VALID BIT1 +#define EFI_ERROR_RECORD_HEADER_PARTITION_ID_VALID BIT2 ///@} /// /// Timestamp is precise if this bit is set and correlates to the time of the /// error event. /// -#define EFI_ERROR_TIME_STAMP_PRECISE BIT0 +#define EFI_ERROR_TIME_STAMP_PRECISE BIT0 /// /// The timestamp correlates to the time when the error information was collected @@ -50,14 +50,14 @@ /// event. The timestamp contains the local time in BCD format. /// typedef struct { - UINT8 Seconds; - UINT8 Minutes; - UINT8 Hours; - UINT8 Flag; - UINT8 Day; - UINT8 Month; - UINT8 Year; - UINT8 Century; + UINT8 Seconds; + UINT8 Minutes; + UINT8 Hours; + UINT8 Flag; + UINT8 Day; + UINT8 Month; + UINT8 Year; + UINT8 Century; } EFI_ERROR_TIME_STAMP; /// @@ -112,31 +112,31 @@ typedef struct { /// /// Error Record Header Flags ///@{ -#define EFI_HW_ERROR_FLAGS_RECOVERED 0x00000001 -#define EFI_HW_ERROR_FLAGS_PREVERR 0x00000002 -#define EFI_HW_ERROR_FLAGS_SIMULATED 0x00000004 +#define EFI_HW_ERROR_FLAGS_RECOVERED 0x00000001 +#define EFI_HW_ERROR_FLAGS_PREVERR 0x00000002 +#define EFI_HW_ERROR_FLAGS_SIMULATED 0x00000004 ///@} /// /// Common error record header /// typedef struct { - UINT32 SignatureStart; - UINT16 Revision; - UINT32 SignatureEnd; - UINT16 SectionCount; - UINT32 ErrorSeverity; - UINT32 ValidationBits; - UINT32 RecordLength; - EFI_ERROR_TIME_STAMP TimeStamp; - EFI_GUID PlatformID; - EFI_GUID PartitionID; - EFI_GUID CreatorID; - EFI_GUID NotificationType; - UINT64 RecordID; - UINT32 Flags; - UINT64 PersistenceInfo; - UINT8 Resv1[12]; + UINT32 SignatureStart; + UINT16 Revision; + UINT32 SignatureEnd; + UINT16 SectionCount; + UINT32 ErrorSeverity; + UINT32 ValidationBits; + UINT32 RecordLength; + EFI_ERROR_TIME_STAMP TimeStamp; + EFI_GUID PlatformID; + EFI_GUID PartitionID; + EFI_GUID CreatorID; + EFI_GUID NotificationType; + UINT64 RecordID; + UINT32 Flags; + UINT64 PersistenceInfo; + UINT8 Resv1[12]; /// /// An array of SectionCount descriptors for the associated /// sections. The number of valid sections is equivalent to the @@ -151,19 +151,19 @@ typedef struct { /// /// Validity Fields in Error Section Descriptor. /// -#define EFI_ERROR_SECTION_FRU_ID_VALID BIT0 -#define EFI_ERROR_SECTION_FRU_STRING_VALID BIT1 +#define EFI_ERROR_SECTION_FRU_ID_VALID BIT0 +#define EFI_ERROR_SECTION_FRU_STRING_VALID BIT1 /// /// Flag field contains information that describes the error section /// in Error Section Descriptor. /// -#define EFI_ERROR_SECTION_FLAGS_PRIMARY BIT0 -#define EFI_ERROR_SECTION_FLAGS_CONTAINMENT_WARNING BIT1 -#define EFI_ERROR_SECTION_FLAGS_RESET BIT2 -#define EFI_ERROR_SECTION_FLAGS_ERROR_THRESHOLD_EXCEEDED BIT3 -#define EFI_ERROR_SECTION_FLAGS_RESOURCE_NOT_ACCESSIBLE BIT4 -#define EFI_ERROR_SECTION_FLAGS_LATENT_ERROR BIT5 +#define EFI_ERROR_SECTION_FLAGS_PRIMARY BIT0 +#define EFI_ERROR_SECTION_FLAGS_CONTAINMENT_WARNING BIT1 +#define EFI_ERROR_SECTION_FLAGS_RESET BIT2 +#define EFI_ERROR_SECTION_FLAGS_ERROR_THRESHOLD_EXCEEDED BIT3 +#define EFI_ERROR_SECTION_FLAGS_RESOURCE_NOT_ACCESSIBLE BIT4 +#define EFI_ERROR_SECTION_FLAGS_LATENT_ERROR BIT5 /// /// Error Sectition Type GUIDs in Error Section Descriptor @@ -226,83 +226,83 @@ typedef struct { /// Error Section Descriptor /// typedef struct { - UINT32 SectionOffset; - UINT32 SectionLength; - UINT16 Revision; - UINT8 SecValidMask; - UINT8 Resv1; - UINT32 SectionFlags; - EFI_GUID SectionType; - EFI_GUID FruId; - UINT32 Severity; - CHAR8 FruString[20]; + UINT32 SectionOffset; + UINT32 SectionLength; + UINT16 Revision; + UINT8 SecValidMask; + UINT8 Resv1; + UINT32 SectionFlags; + EFI_GUID SectionType; + EFI_GUID FruId; + UINT32 Severity; + CHAR8 FruString[20]; } EFI_ERROR_SECTION_DESCRIPTOR; /// /// The validation bit mask indicates whether or not each of the following fields are /// valid in Proessor Generic Error section. ///@{ -#define EFI_GENERIC_ERROR_PROC_TYPE_VALID BIT0 -#define EFI_GENERIC_ERROR_PROC_ISA_VALID BIT1 -#define EFI_GENERIC_ERROR_PROC_ERROR_TYPE_VALID BIT2 -#define EFI_GENERIC_ERROR_PROC_OPERATION_VALID BIT3 -#define EFI_GENERIC_ERROR_PROC_FLAGS_VALID BIT4 -#define EFI_GENERIC_ERROR_PROC_LEVEL_VALID BIT5 -#define EFI_GENERIC_ERROR_PROC_VERSION_VALID BIT6 -#define EFI_GENERIC_ERROR_PROC_BRAND_VALID BIT7 -#define EFI_GENERIC_ERROR_PROC_ID_VALID BIT8 -#define EFI_GENERIC_ERROR_PROC_TARGET_ADDR_VALID BIT9 -#define EFI_GENERIC_ERROR_PROC_REQUESTER_ID_VALID BIT10 -#define EFI_GENERIC_ERROR_PROC_RESPONDER_ID_VALID BIT11 -#define EFI_GENERIC_ERROR_PROC_INST_IP_VALID BIT12 +#define EFI_GENERIC_ERROR_PROC_TYPE_VALID BIT0 +#define EFI_GENERIC_ERROR_PROC_ISA_VALID BIT1 +#define EFI_GENERIC_ERROR_PROC_ERROR_TYPE_VALID BIT2 +#define EFI_GENERIC_ERROR_PROC_OPERATION_VALID BIT3 +#define EFI_GENERIC_ERROR_PROC_FLAGS_VALID BIT4 +#define EFI_GENERIC_ERROR_PROC_LEVEL_VALID BIT5 +#define EFI_GENERIC_ERROR_PROC_VERSION_VALID BIT6 +#define EFI_GENERIC_ERROR_PROC_BRAND_VALID BIT7 +#define EFI_GENERIC_ERROR_PROC_ID_VALID BIT8 +#define EFI_GENERIC_ERROR_PROC_TARGET_ADDR_VALID BIT9 +#define EFI_GENERIC_ERROR_PROC_REQUESTER_ID_VALID BIT10 +#define EFI_GENERIC_ERROR_PROC_RESPONDER_ID_VALID BIT11 +#define EFI_GENERIC_ERROR_PROC_INST_IP_VALID BIT12 ///@} /// /// The type of the processor architecture in Proessor Generic Error section. ///@{ -#define EFI_GENERIC_ERROR_PROC_TYPE_IA32_X64 0x00 -#define EFI_GENERIC_ERROR_PROC_TYPE_IA64 0x01 -#define EFI_GENERIC_ERROR_PROC_TYPE_ARM 0x02 +#define EFI_GENERIC_ERROR_PROC_TYPE_IA32_X64 0x00 +#define EFI_GENERIC_ERROR_PROC_TYPE_IA64 0x01 +#define EFI_GENERIC_ERROR_PROC_TYPE_ARM 0x02 ///@} /// /// The type of the instruction set executing when the error occurred in Proessor /// Generic Error section. ///@{ -#define EFI_GENERIC_ERROR_PROC_ISA_IA32 0x00 -#define EFI_GENERIC_ERROR_PROC_ISA_IA64 0x01 -#define EFI_GENERIC_ERROR_PROC_ISA_X64 0x02 -#define EFI_GENERIC_ERROR_PROC_ISA_ARM_A32_T32 0x03 -#define EFI_GENERIC_ERROR_PROC_ISA_ARM_A64 0x04 +#define EFI_GENERIC_ERROR_PROC_ISA_IA32 0x00 +#define EFI_GENERIC_ERROR_PROC_ISA_IA64 0x01 +#define EFI_GENERIC_ERROR_PROC_ISA_X64 0x02 +#define EFI_GENERIC_ERROR_PROC_ISA_ARM_A32_T32 0x03 +#define EFI_GENERIC_ERROR_PROC_ISA_ARM_A64 0x04 ///@} /// /// The type of error that occurred in Proessor Generic Error section. ///@{ -#define EFI_GENERIC_ERROR_PROC_ERROR_TYPE_UNKNOWN 0x00 -#define EFI_GENERIC_ERROR_PROC_ERROR_TYPE_CACHE 0x01 -#define EFI_GENERIC_ERROR_PROC_ERROR_TYPE_TLB 0x02 -#define EFI_GENERIC_ERROR_PROC_ERROR_TYPE_BUS 0x04 -#define EFI_GENERIC_ERROR_PROC_ERROR_TYPE_MICRO_ARCH 0x08 +#define EFI_GENERIC_ERROR_PROC_ERROR_TYPE_UNKNOWN 0x00 +#define EFI_GENERIC_ERROR_PROC_ERROR_TYPE_CACHE 0x01 +#define EFI_GENERIC_ERROR_PROC_ERROR_TYPE_TLB 0x02 +#define EFI_GENERIC_ERROR_PROC_ERROR_TYPE_BUS 0x04 +#define EFI_GENERIC_ERROR_PROC_ERROR_TYPE_MICRO_ARCH 0x08 ///@} /// /// The type of operation in Proessor Generic Error section. ///@{ -#define EFI_GENERIC_ERROR_PROC_OPERATION_GENERIC 0x00 -#define EFI_GENERIC_ERROR_PROC_OPERATION_DATA_READ 0x01 -#define EFI_GENERIC_ERROR_PROC_OPERATION_DATA_WRITE 0x02 -#define EFI_GENERIC_ERROR_PROC_OPERATION_INSTRUCTION_EXEC 0x03 +#define EFI_GENERIC_ERROR_PROC_OPERATION_GENERIC 0x00 +#define EFI_GENERIC_ERROR_PROC_OPERATION_DATA_READ 0x01 +#define EFI_GENERIC_ERROR_PROC_OPERATION_DATA_WRITE 0x02 +#define EFI_GENERIC_ERROR_PROC_OPERATION_INSTRUCTION_EXEC 0x03 ///@} /// /// Flags bit mask indicates additional information about the error in Proessor Generic /// Error section ///@{ -#define EFI_GENERIC_ERROR_PROC_FLAGS_RESTARTABLE BIT0 -#define EFI_GENERIC_ERROR_PROC_FLAGS_PRECISE_IP BIT1 -#define EFI_GENERIC_ERROR_PROC_FLAGS_OVERFLOW BIT2 -#define EFI_GENERIC_ERROR_PROC_FLAGS_CORRECTED BIT3 +#define EFI_GENERIC_ERROR_PROC_FLAGS_RESTARTABLE BIT0 +#define EFI_GENERIC_ERROR_PROC_FLAGS_PRECISE_IP BIT1 +#define EFI_GENERIC_ERROR_PROC_FLAGS_OVERFLOW BIT2 +#define EFI_GENERIC_ERROR_PROC_FLAGS_CORRECTED BIT3 ///@} /// @@ -310,24 +310,23 @@ typedef struct { /// describes processor reported hardware errors for logical processors in the system. /// typedef struct { - UINT64 ValidFields; - UINT8 Type; - UINT8 Isa; - UINT8 ErrorType; - UINT8 Operation; - UINT8 Flags; - UINT8 Level; - UINT16 Resv1; - UINT64 VersionInfo; - CHAR8 BrandString[128]; - UINT64 ApicId; - UINT64 TargetAddr; - UINT64 RequestorId; - UINT64 ResponderId; - UINT64 InstructionIP; + UINT64 ValidFields; + UINT8 Type; + UINT8 Isa; + UINT8 ErrorType; + UINT8 Operation; + UINT8 Flags; + UINT8 Level; + UINT16 Resv1; + UINT64 VersionInfo; + CHAR8 BrandString[128]; + UINT64 ApicId; + UINT64 TargetAddr; + UINT64 RequestorId; + UINT64 ResponderId; + UINT64 InstructionIP; } EFI_PROCESSOR_GENERIC_ERROR_DATA; - #if defined (MDE_CPU_IA32) || defined (MDE_CPU_X64) /// /// IA32 and x64 Specific definitions. @@ -359,278 +358,278 @@ typedef struct { /// The validation bit mask indicates which fields in the IA32/X64 Processor /// Error Record structure are valid. ///@{ -#define EFI_IA32_X64_PROCESSOR_ERROR_APIC_ID_VALID BIT0 -#define EFI_IA32_X64_PROCESSOR_ERROR_CPU_ID_INFO_VALID BIT1 +#define EFI_IA32_X64_PROCESSOR_ERROR_APIC_ID_VALID BIT0 +#define EFI_IA32_X64_PROCESSOR_ERROR_CPU_ID_INFO_VALID BIT1 ///@} /// /// IA32/X64 Processor Error Record /// typedef struct { - UINT64 ValidFields; - UINT64 ApicId; - UINT8 CpuIdInfo[48]; + UINT64 ValidFields; + UINT64 ApicId; + UINT8 CpuIdInfo[48]; } EFI_IA32_X64_PROCESSOR_ERROR_RECORD; /// /// The validation bit mask indicates which fields in the Cache Check structure /// are valid. ///@{ -#define EFI_CACHE_CHECK_TRANSACTION_TYPE_VALID BIT0 -#define EFI_CACHE_CHECK_OPERATION_VALID BIT1 -#define EFI_CACHE_CHECK_LEVEL_VALID BIT2 -#define EFI_CACHE_CHECK_CONTEXT_CORRUPT_VALID BIT3 -#define EFI_CACHE_CHECK_UNCORRECTED_VALID BIT4 -#define EFI_CACHE_CHECK_PRECISE_IP_VALID BIT5 -#define EFI_CACHE_CHECK_RESTARTABLE_VALID BIT6 -#define EFI_CACHE_CHECK_OVERFLOW_VALID BIT7 +#define EFI_CACHE_CHECK_TRANSACTION_TYPE_VALID BIT0 +#define EFI_CACHE_CHECK_OPERATION_VALID BIT1 +#define EFI_CACHE_CHECK_LEVEL_VALID BIT2 +#define EFI_CACHE_CHECK_CONTEXT_CORRUPT_VALID BIT3 +#define EFI_CACHE_CHECK_UNCORRECTED_VALID BIT4 +#define EFI_CACHE_CHECK_PRECISE_IP_VALID BIT5 +#define EFI_CACHE_CHECK_RESTARTABLE_VALID BIT6 +#define EFI_CACHE_CHECK_OVERFLOW_VALID BIT7 ///@} /// /// Type of cache error in the Cache Check structure ///@{ -#define EFI_CACHE_CHECK_ERROR_TYPE_INSTRUCTION 0 -#define EFI_CACHE_CHECK_ERROR_TYPE_DATA_ACCESS 1 -#define EFI_CACHE_CHECK_ERROR_TYPE_GENERIC 2 +#define EFI_CACHE_CHECK_ERROR_TYPE_INSTRUCTION 0 +#define EFI_CACHE_CHECK_ERROR_TYPE_DATA_ACCESS 1 +#define EFI_CACHE_CHECK_ERROR_TYPE_GENERIC 2 ///@} /// /// Type of cache operation that caused the error in the Cache /// Check structure ///@{ -#define EFI_CACHE_CHECK_OPERATION_TYPE_GENERIC 0 -#define EFI_CACHE_CHECK_OPERATION_TYPE_GENERIC_READ 1 -#define EFI_CACHE_CHECK_OPERATION_TYPE_GENERIC_WRITE 2 -#define EFI_CACHE_CHECK_OPERATION_TYPE_DATA_READ 3 -#define EFI_CACHE_CHECK_OPERATION_TYPE_DATA_WRITE 4 -#define EFI_CACHE_CHECK_OPERATION_TYPE_INSTRUCTION_FETCH 5 -#define EFI_CACHE_CHECK_OPERATION_TYPE_PREFETCH 6 -#define EFI_CACHE_CHECK_OPERATION_TYPE_EVICTION 7 -#define EFI_CACHE_CHECK_OPERATION_TYPE_SNOOP 8 +#define EFI_CACHE_CHECK_OPERATION_TYPE_GENERIC 0 +#define EFI_CACHE_CHECK_OPERATION_TYPE_GENERIC_READ 1 +#define EFI_CACHE_CHECK_OPERATION_TYPE_GENERIC_WRITE 2 +#define EFI_CACHE_CHECK_OPERATION_TYPE_DATA_READ 3 +#define EFI_CACHE_CHECK_OPERATION_TYPE_DATA_WRITE 4 +#define EFI_CACHE_CHECK_OPERATION_TYPE_INSTRUCTION_FETCH 5 +#define EFI_CACHE_CHECK_OPERATION_TYPE_PREFETCH 6 +#define EFI_CACHE_CHECK_OPERATION_TYPE_EVICTION 7 +#define EFI_CACHE_CHECK_OPERATION_TYPE_SNOOP 8 ///@} /// /// IA32/X64 Cache Check Structure /// typedef struct { - UINT64 ValidFields:16; - UINT64 TransactionType:2; - UINT64 Operation:4; - UINT64 Level:3; - UINT64 ContextCorrupt:1; - UINT64 ErrorUncorrected:1; - UINT64 PreciseIp:1; - UINT64 RestartableIp:1; - UINT64 Overflow:1; - UINT64 Resv1:34; + UINT64 ValidFields : 16; + UINT64 TransactionType : 2; + UINT64 Operation : 4; + UINT64 Level : 3; + UINT64 ContextCorrupt : 1; + UINT64 ErrorUncorrected : 1; + UINT64 PreciseIp : 1; + UINT64 RestartableIp : 1; + UINT64 Overflow : 1; + UINT64 Resv1 : 34; } EFI_IA32_X64_CACHE_CHECK_INFO; /// /// The validation bit mask indicates which fields in the TLB Check structure /// are valid. ///@{ -#define EFI_TLB_CHECK_TRANSACTION_TYPE_VALID BIT0 -#define EFI_TLB_CHECK_OPERATION_VALID BIT1 -#define EFI_TLB_CHECK_LEVEL_VALID BIT2 -#define EFI_TLB_CHECK_CONTEXT_CORRUPT_VALID BIT3 -#define EFI_TLB_CHECK_UNCORRECTED_VALID BIT4 -#define EFI_TLB_CHECK_PRECISE_IP_VALID BIT5 -#define EFI_TLB_CHECK_RESTARTABLE_VALID BIT6 -#define EFI_TLB_CHECK_OVERFLOW_VALID BIT7 +#define EFI_TLB_CHECK_TRANSACTION_TYPE_VALID BIT0 +#define EFI_TLB_CHECK_OPERATION_VALID BIT1 +#define EFI_TLB_CHECK_LEVEL_VALID BIT2 +#define EFI_TLB_CHECK_CONTEXT_CORRUPT_VALID BIT3 +#define EFI_TLB_CHECK_UNCORRECTED_VALID BIT4 +#define EFI_TLB_CHECK_PRECISE_IP_VALID BIT5 +#define EFI_TLB_CHECK_RESTARTABLE_VALID BIT6 +#define EFI_TLB_CHECK_OVERFLOW_VALID BIT7 ///@} /// /// Type of cache error in the TLB Check structure ///@{ -#define EFI_TLB_CHECK_ERROR_TYPE_INSTRUCTION 0 -#define EFI_TLB_CHECK_ERROR_TYPE_DATA_ACCESS 1 -#define EFI_TLB_CHECK_ERROR_TYPE_GENERIC 2 +#define EFI_TLB_CHECK_ERROR_TYPE_INSTRUCTION 0 +#define EFI_TLB_CHECK_ERROR_TYPE_DATA_ACCESS 1 +#define EFI_TLB_CHECK_ERROR_TYPE_GENERIC 2 ///@} /// /// Type of cache operation that caused the error in the TLB /// Check structure ///@{ -#define EFI_TLB_CHECK_OPERATION_TYPE_GENERIC 0 -#define EFI_TLB_CHECK_OPERATION_TYPE_GENERIC_READ 1 -#define EFI_TLB_CHECK_OPERATION_TYPE_GENERIC_WRITE 2 -#define EFI_TLB_CHECK_OPERATION_TYPE_DATA_READ 3 -#define EFI_TLB_CHECK_OPERATION_TYPE_DATA_WRITE 4 -#define EFI_TLB_CHECK_OPERATION_TYPE_INST_FETCH 5 -#define EFI_TLB_CHECK_OPERATION_TYPE_PREFETCH 6 +#define EFI_TLB_CHECK_OPERATION_TYPE_GENERIC 0 +#define EFI_TLB_CHECK_OPERATION_TYPE_GENERIC_READ 1 +#define EFI_TLB_CHECK_OPERATION_TYPE_GENERIC_WRITE 2 +#define EFI_TLB_CHECK_OPERATION_TYPE_DATA_READ 3 +#define EFI_TLB_CHECK_OPERATION_TYPE_DATA_WRITE 4 +#define EFI_TLB_CHECK_OPERATION_TYPE_INST_FETCH 5 +#define EFI_TLB_CHECK_OPERATION_TYPE_PREFETCH 6 ///@} /// /// IA32/X64 TLB Check Structure /// typedef struct { - UINT64 ValidFields:16; - UINT64 TransactionType:2; - UINT64 Operation:4; - UINT64 Level:3; - UINT64 ContextCorrupt:1; - UINT64 ErrorUncorrected:1; - UINT64 PreciseIp:1; - UINT64 RestartableIp:1; - UINT64 Overflow:1; - UINT64 Resv1:34; + UINT64 ValidFields : 16; + UINT64 TransactionType : 2; + UINT64 Operation : 4; + UINT64 Level : 3; + UINT64 ContextCorrupt : 1; + UINT64 ErrorUncorrected : 1; + UINT64 PreciseIp : 1; + UINT64 RestartableIp : 1; + UINT64 Overflow : 1; + UINT64 Resv1 : 34; } EFI_IA32_X64_TLB_CHECK_INFO; /// /// The validation bit mask indicates which fields in the MS Check structure /// are valid. ///@{ -#define EFI_BUS_CHECK_TRANSACTION_TYPE_VALID BIT0 -#define EFI_BUS_CHECK_OPERATION_VALID BIT1 -#define EFI_BUS_CHECK_LEVEL_VALID BIT2 -#define EFI_BUS_CHECK_CONTEXT_CORRUPT_VALID BIT3 -#define EFI_BUS_CHECK_UNCORRECTED_VALID BIT4 -#define EFI_BUS_CHECK_PRECISE_IP_VALID BIT5 -#define EFI_BUS_CHECK_RESTARTABLE_VALID BIT6 -#define EFI_BUS_CHECK_OVERFLOW_VALID BIT7 -#define EFI_BUS_CHECK_PARTICIPATION_TYPE_VALID BIT8 -#define EFI_BUS_CHECK_TIME_OUT_VALID BIT9 -#define EFI_BUS_CHECK_ADDRESS_SPACE_VALID BIT10 +#define EFI_BUS_CHECK_TRANSACTION_TYPE_VALID BIT0 +#define EFI_BUS_CHECK_OPERATION_VALID BIT1 +#define EFI_BUS_CHECK_LEVEL_VALID BIT2 +#define EFI_BUS_CHECK_CONTEXT_CORRUPT_VALID BIT3 +#define EFI_BUS_CHECK_UNCORRECTED_VALID BIT4 +#define EFI_BUS_CHECK_PRECISE_IP_VALID BIT5 +#define EFI_BUS_CHECK_RESTARTABLE_VALID BIT6 +#define EFI_BUS_CHECK_OVERFLOW_VALID BIT7 +#define EFI_BUS_CHECK_PARTICIPATION_TYPE_VALID BIT8 +#define EFI_BUS_CHECK_TIME_OUT_VALID BIT9 +#define EFI_BUS_CHECK_ADDRESS_SPACE_VALID BIT10 ///@} /// /// Type of cache error in the Bus Check structure ///@{ -#define EFI_BUS_CHECK_ERROR_TYPE_INSTRUCTION 0 -#define EFI_BUS_CHECK_ERROR_TYPE_DATA_ACCESS 1 -#define EFI_BUS_CHECK_ERROR_TYPE_GENERIC 2 +#define EFI_BUS_CHECK_ERROR_TYPE_INSTRUCTION 0 +#define EFI_BUS_CHECK_ERROR_TYPE_DATA_ACCESS 1 +#define EFI_BUS_CHECK_ERROR_TYPE_GENERIC 2 ///@} /// /// Type of cache operation that caused the error in the Bus /// Check structure ///@{ -#define EFI_BUS_CHECK_OPERATION_TYPE_GENERIC 0 -#define EFI_BUS_CHECK_OPERATION_TYPE_GENERIC_READ 1 -#define EFI_BUS_CHECK_OPERATION_TYPE_GENERIC_WRITE 2 -#define EFI_BUS_CHECK_OPERATION_TYPE_DATA_READ 3 -#define EFI_BUS_CHECK_OPERATION_TYPE_DATA_WRITE 4 -#define EFI_BUS_CHECK_OPERATION_TYPE_INST_FETCH 5 -#define EFI_BUS_CHECK_OPERATION_TYPE_PREFETCH 6 +#define EFI_BUS_CHECK_OPERATION_TYPE_GENERIC 0 +#define EFI_BUS_CHECK_OPERATION_TYPE_GENERIC_READ 1 +#define EFI_BUS_CHECK_OPERATION_TYPE_GENERIC_WRITE 2 +#define EFI_BUS_CHECK_OPERATION_TYPE_DATA_READ 3 +#define EFI_BUS_CHECK_OPERATION_TYPE_DATA_WRITE 4 +#define EFI_BUS_CHECK_OPERATION_TYPE_INST_FETCH 5 +#define EFI_BUS_CHECK_OPERATION_TYPE_PREFETCH 6 ///@} /// /// Type of Participation ///@{ -#define EFI_BUS_CHECK_PARTICIPATION_TYPE_REQUEST 0 -#define EFI_BUS_CHECK_PARTICIPATION_TYPE_RESPONDED 1 -#define EFI_BUS_CHECK_PARTICIPATION_TYPE_OBSERVED 2 -#define EFI_BUS_CHECK_PARTICIPATION_TYPE_GENERIC 3 +#define EFI_BUS_CHECK_PARTICIPATION_TYPE_REQUEST 0 +#define EFI_BUS_CHECK_PARTICIPATION_TYPE_RESPONDED 1 +#define EFI_BUS_CHECK_PARTICIPATION_TYPE_OBSERVED 2 +#define EFI_BUS_CHECK_PARTICIPATION_TYPE_GENERIC 3 ///@} /// /// Type of Address Space ///@{ -#define EFI_BUS_CHECK_ADDRESS_SPACE_TYPE_MEMORY 0 -#define EFI_BUS_CHECK_ADDRESS_SPACE_TYPE_RESERVED 1 -#define EFI_BUS_CHECK_ADDRESS_SPACE_TYPE_IO 2 -#define EFI_BUS_CHECK_ADDRESS_SPACE_TYPE_OTHER 3 +#define EFI_BUS_CHECK_ADDRESS_SPACE_TYPE_MEMORY 0 +#define EFI_BUS_CHECK_ADDRESS_SPACE_TYPE_RESERVED 1 +#define EFI_BUS_CHECK_ADDRESS_SPACE_TYPE_IO 2 +#define EFI_BUS_CHECK_ADDRESS_SPACE_TYPE_OTHER 3 ///@} /// /// IA32/X64 Bus Check Structure /// typedef struct { - UINT64 ValidFields:16; - UINT64 TransactionType:2; - UINT64 Operation:4; - UINT64 Level:3; - UINT64 ContextCorrupt:1; - UINT64 ErrorUncorrected:1; - UINT64 PreciseIp:1; - UINT64 RestartableIp:1; - UINT64 Overflow:1; - UINT64 ParticipationType:2; - UINT64 TimeOut:1; - UINT64 AddressSpace:2; - UINT64 Resv1:29; + UINT64 ValidFields : 16; + UINT64 TransactionType : 2; + UINT64 Operation : 4; + UINT64 Level : 3; + UINT64 ContextCorrupt : 1; + UINT64 ErrorUncorrected : 1; + UINT64 PreciseIp : 1; + UINT64 RestartableIp : 1; + UINT64 Overflow : 1; + UINT64 ParticipationType : 2; + UINT64 TimeOut : 1; + UINT64 AddressSpace : 2; + UINT64 Resv1 : 29; } EFI_IA32_X64_BUS_CHECK_INFO; /// /// The validation bit mask indicates which fields in the MS Check structure /// are valid. ///@{ -#define EFI_MS_CHECK_ERROR_TYPE_VALID BIT0 -#define EFI_MS_CHECK_CONTEXT_CORRUPT_VALID BIT1 -#define EFI_MS_CHECK_UNCORRECTED_VALID BIT2 -#define EFI_MS_CHECK_PRECISE_IP_VALID BIT3 -#define EFI_MS_CHECK_RESTARTABLE_VALID BIT4 -#define EFI_MS_CHECK_OVERFLOW_VALID BIT5 +#define EFI_MS_CHECK_ERROR_TYPE_VALID BIT0 +#define EFI_MS_CHECK_CONTEXT_CORRUPT_VALID BIT1 +#define EFI_MS_CHECK_UNCORRECTED_VALID BIT2 +#define EFI_MS_CHECK_PRECISE_IP_VALID BIT3 +#define EFI_MS_CHECK_RESTARTABLE_VALID BIT4 +#define EFI_MS_CHECK_OVERFLOW_VALID BIT5 ///@} /// /// Error type identifies the operation that caused the error. ///@{ -#define EFI_MS_CHECK_ERROR_TYPE_NO 0 -#define EFI_MS_CHECK_ERROR_TYPE_UNCLASSIFIED 1 -#define EFI_MS_CHECK_ERROR_TYPE_MICROCODE_PARITY 2 -#define EFI_MS_CHECK_ERROR_TYPE_EXTERNAL 3 -#define EFI_MS_CHECK_ERROR_TYPE_FRC 4 -#define EFI_MS_CHECK_ERROR_TYPE_INTERNAL_UNCLASSIFIED 5 +#define EFI_MS_CHECK_ERROR_TYPE_NO 0 +#define EFI_MS_CHECK_ERROR_TYPE_UNCLASSIFIED 1 +#define EFI_MS_CHECK_ERROR_TYPE_MICROCODE_PARITY 2 +#define EFI_MS_CHECK_ERROR_TYPE_EXTERNAL 3 +#define EFI_MS_CHECK_ERROR_TYPE_FRC 4 +#define EFI_MS_CHECK_ERROR_TYPE_INTERNAL_UNCLASSIFIED 5 ///@} /// /// IA32/X64 MS Check Field Description /// typedef struct { - UINT64 ValidFields:16; - UINT64 ErrorType:3; - UINT64 ContextCorrupt:1; - UINT64 ErrorUncorrected:1; - UINT64 PreciseIp:1; - UINT64 RestartableIp:1; - UINT64 Overflow:1; - UINT64 Resv1:40; + UINT64 ValidFields : 16; + UINT64 ErrorType : 3; + UINT64 ContextCorrupt : 1; + UINT64 ErrorUncorrected : 1; + UINT64 PreciseIp : 1; + UINT64 RestartableIp : 1; + UINT64 Overflow : 1; + UINT64 Resv1 : 40; } EFI_IA32_X64_MS_CHECK_INFO; /// /// IA32/X64 Check Information Item /// typedef union { - EFI_IA32_X64_CACHE_CHECK_INFO CacheCheck; - EFI_IA32_X64_TLB_CHECK_INFO TlbCheck; - EFI_IA32_X64_BUS_CHECK_INFO BusCheck; - EFI_IA32_X64_MS_CHECK_INFO MsCheck; - UINT64 Data64; + EFI_IA32_X64_CACHE_CHECK_INFO CacheCheck; + EFI_IA32_X64_TLB_CHECK_INFO TlbCheck; + EFI_IA32_X64_BUS_CHECK_INFO BusCheck; + EFI_IA32_X64_MS_CHECK_INFO MsCheck; + UINT64 Data64; } EFI_IA32_X64_CHECK_INFO_ITEM; /// /// The validation bit mask indicates which fields in the IA32/X64 Processor Error /// Information Structure are valid. ///@{ -#define EFI_IA32_X64_ERROR_PROC_CHECK_INFO_VALID BIT0 -#define EFI_IA32_X64_ERROR_PROC_TARGET_ADDR_VALID BIT1 -#define EFI_IA32_X64_ERROR_PROC_REQUESTER_ID_VALID BIT2 -#define EFI_IA32_X64_ERROR_PROC_RESPONDER_ID_VALID BIT3 -#define EFI_IA32_X64_ERROR_PROC_INST_IP_VALID BIT4 +#define EFI_IA32_X64_ERROR_PROC_CHECK_INFO_VALID BIT0 +#define EFI_IA32_X64_ERROR_PROC_TARGET_ADDR_VALID BIT1 +#define EFI_IA32_X64_ERROR_PROC_REQUESTER_ID_VALID BIT2 +#define EFI_IA32_X64_ERROR_PROC_RESPONDER_ID_VALID BIT3 +#define EFI_IA32_X64_ERROR_PROC_INST_IP_VALID BIT4 ///@} /// /// IA32/X64 Processor Error Information Structure /// typedef struct { - EFI_GUID ErrorType; - UINT64 ValidFields; - EFI_IA32_X64_CHECK_INFO_ITEM CheckInfo; - UINT64 TargetId; - UINT64 RequestorId; - UINT64 ResponderId; - UINT64 InstructionIP; + EFI_GUID ErrorType; + UINT64 ValidFields; + EFI_IA32_X64_CHECK_INFO_ITEM CheckInfo; + UINT64 TargetId; + UINT64 RequestorId; + UINT64 ResponderId; + UINT64 InstructionIP; } EFI_IA32_X64_PROCESS_ERROR_INFO; /// /// IA32/X64 Processor Context Information Structure /// typedef struct { - UINT16 RegisterType; - UINT16 ArraySize; - UINT32 MsrAddress; - UINT64 MmRegisterAddress; + UINT16 RegisterType; + UINT16 ArraySize; + UINT32 MsrAddress; + UINT64 MmRegisterAddress; // // This field will provide the contents of the actual registers or raw data. // The number of Registers or size of the raw data reported is determined @@ -642,85 +641,85 @@ typedef struct { /// /// Register Context Type ///@{ -#define EFI_REG_CONTEXT_TYPE_UNCLASSIFIED 0x0000 -#define EFI_REG_CONTEXT_TYPE_MSR 0x0001 -#define EFI_REG_CONTEXT_TYPE_IA32 0x0002 -#define EFI_REG_CONTEXT_TYPE_X64 0x0003 -#define EFI_REG_CONTEXT_TYPE_FXSAVE 0x0004 -#define EFI_REG_CONTEXT_TYPE_DR_IA32 0x0005 -#define EFI_REG_CONTEXT_TYPE_DR_X64 0x0006 -#define EFI_REG_CONTEXT_TYPE_MEM_MAP 0x0007 +#define EFI_REG_CONTEXT_TYPE_UNCLASSIFIED 0x0000 +#define EFI_REG_CONTEXT_TYPE_MSR 0x0001 +#define EFI_REG_CONTEXT_TYPE_IA32 0x0002 +#define EFI_REG_CONTEXT_TYPE_X64 0x0003 +#define EFI_REG_CONTEXT_TYPE_FXSAVE 0x0004 +#define EFI_REG_CONTEXT_TYPE_DR_IA32 0x0005 +#define EFI_REG_CONTEXT_TYPE_DR_X64 0x0006 +#define EFI_REG_CONTEXT_TYPE_MEM_MAP 0x0007 ///@} /// /// IA32 Register State /// typedef struct { - UINT32 Eax; - UINT32 Ebx; - UINT32 Ecx; - UINT32 Edx; - UINT32 Esi; - UINT32 Edi; - UINT32 Ebp; - UINT32 Esp; - UINT16 Cs; - UINT16 Ds; - UINT16 Ss; - UINT16 Es; - UINT16 Fs; - UINT16 Gs; - UINT32 Eflags; - UINT32 Eip; - UINT32 Cr0; - UINT32 Cr1; - UINT32 Cr2; - UINT32 Cr3; - UINT32 Cr4; - UINT32 Gdtr[2]; - UINT32 Idtr[2]; - UINT16 Ldtr; - UINT16 Tr; + UINT32 Eax; + UINT32 Ebx; + UINT32 Ecx; + UINT32 Edx; + UINT32 Esi; + UINT32 Edi; + UINT32 Ebp; + UINT32 Esp; + UINT16 Cs; + UINT16 Ds; + UINT16 Ss; + UINT16 Es; + UINT16 Fs; + UINT16 Gs; + UINT32 Eflags; + UINT32 Eip; + UINT32 Cr0; + UINT32 Cr1; + UINT32 Cr2; + UINT32 Cr3; + UINT32 Cr4; + UINT32 Gdtr[2]; + UINT32 Idtr[2]; + UINT16 Ldtr; + UINT16 Tr; } EFI_CONTEXT_IA32_REGISTER_STATE; /// /// X64 Register State /// typedef struct { - UINT64 Rax; - UINT64 Rbx; - UINT64 Rcx; - UINT64 Rdx; - UINT64 Rsi; - UINT64 Rdi; - UINT64 Rbp; - UINT64 Rsp; - UINT64 R8; - UINT64 R9; - UINT64 R10; - UINT64 R11; - UINT64 R12; - UINT64 R13; - UINT64 R14; - UINT64 R15; - UINT16 Cs; - UINT16 Ds; - UINT16 Ss; - UINT16 Es; - UINT16 Fs; - UINT16 Gs; - UINT32 Resv1; - UINT64 Rflags; - UINT64 Rip; - UINT64 Cr0; - UINT64 Cr1; - UINT64 Cr2; - UINT64 Cr3; - UINT64 Cr4; - UINT64 Gdtr[2]; - UINT64 Idtr[2]; - UINT16 Ldtr; - UINT16 Tr; + UINT64 Rax; + UINT64 Rbx; + UINT64 Rcx; + UINT64 Rdx; + UINT64 Rsi; + UINT64 Rdi; + UINT64 Rbp; + UINT64 Rsp; + UINT64 R8; + UINT64 R9; + UINT64 R10; + UINT64 R11; + UINT64 R12; + UINT64 R13; + UINT64 R14; + UINT64 R15; + UINT16 Cs; + UINT16 Ds; + UINT16 Ss; + UINT16 Es; + UINT16 Fs; + UINT16 Gs; + UINT32 Resv1; + UINT64 Rflags; + UINT64 Rip; + UINT64 Cr0; + UINT64 Cr1; + UINT64 Cr2; + UINT64 Cr3; + UINT64 Cr4; + UINT64 Gdtr[2]; + UINT64 Idtr[2]; + UINT16 Ldtr; + UINT16 Tr; } EFI_CONTEXT_X64_REGISTER_STATE; /// @@ -728,11 +727,11 @@ typedef struct { /// Processor Error Section. /// typedef struct { - UINT64 ApicIdValid:1; - UINT64 CpuIdInforValid:1; - UINT64 ErrorInfoNum:6; - UINT64 ContextNum:6; - UINT64 Resv1:50; + UINT64 ApicIdValid : 1; + UINT64 CpuIdInforValid : 1; + UINT64 ErrorInfoNum : 6; + UINT64 ContextNum : 6; + UINT64 Resv1 : 50; } EFI_IA32_X64_VALID_BITS; #endif @@ -741,16 +740,16 @@ typedef struct { /// Error Status Fields /// typedef struct { - UINT64 Resv1:8; - UINT64 Type:8; - UINT64 AddressSignal:1; ///< Error in Address signals or in Address portion of transaction - UINT64 ControlSignal:1; ///< Error in Control signals or in Control portion of transaction - UINT64 DataSignal:1; ///< Error in Data signals or in Data portion of transaction - UINT64 DetectedByResponder:1; ///< Error detected by responder - UINT64 DetectedByRequester:1; ///< Error detected by requestor - UINT64 FirstError:1; ///< First Error in the sequence - option field - UINT64 OverflowNotLogged:1; ///< Additional errors were not logged due to lack of resources - UINT64 Resv2:41; + UINT64 Resv1 : 8; + UINT64 Type : 8; + UINT64 AddressSignal : 1; ///< Error in Address signals or in Address portion of transaction + UINT64 ControlSignal : 1; ///< Error in Control signals or in Control portion of transaction + UINT64 DataSignal : 1; ///< Error in Data signals or in Data portion of transaction + UINT64 DetectedByResponder : 1; ///< Error detected by responder + UINT64 DetectedByRequester : 1; ///< Error detected by requestor + UINT64 FirstError : 1; ///< First Error in the sequence - option field + UINT64 OverflowNotLogged : 1; ///< Additional errors were not logged due to lack of resources + UINT64 Resv2 : 41; } EFI_GENERIC_ERROR_STATUS; /// @@ -760,8 +759,8 @@ typedef enum { /// /// General Internal errors /// - ErrorInternal = 1, - ErrorBus = 16, + ErrorInternal = 1, + ErrorBus = 16, /// /// Component Internal errors /// @@ -774,206 +773,206 @@ typedef enum { /// /// Bus internal errors /// - ErrorVirtualMap = 17, - ErrorAccessInvalid = 18, // Improper access - ErrorUnimplAccess = 19, // Unimplemented memory access - ErrorLossOfLockstep = 20, - ErrorResponseInvalid= 21, // Response not associated with request - ErrorParity = 22, - ErrorProtocol = 23, - ErrorPath = 24, // Detected path error - ErrorTimeout = 25, // Bus timeout - ErrorPoisoned = 26 // Read data poisoned + ErrorVirtualMap = 17, + ErrorAccessInvalid = 18, // Improper access + ErrorUnimplAccess = 19, // Unimplemented memory access + ErrorLossOfLockstep = 20, + ErrorResponseInvalid = 21, // Response not associated with request + ErrorParity = 22, + ErrorProtocol = 23, + ErrorPath = 24, // Detected path error + ErrorTimeout = 25, // Bus timeout + ErrorPoisoned = 26 // Read data poisoned } EFI_GENERIC_ERROR_STATUS_ERROR_TYPE; /// /// Validation bit mask indicates which fields in the memory error record are valid /// in Memory Error section ///@{ -#define EFI_PLATFORM_MEMORY_ERROR_STATUS_VALID BIT0 -#define EFI_PLATFORM_MEMORY_PHY_ADDRESS_VALID BIT1 -#define EFI_PLATFORM_MEMORY_PHY_ADDRESS_MASK_VALID BIT2 -#define EFI_PLATFORM_MEMORY_NODE_VALID BIT3 -#define EFI_PLATFORM_MEMORY_CARD_VALID BIT4 -#define EFI_PLATFORM_MEMORY_MODULE_VALID BIT5 -#define EFI_PLATFORM_MEMORY_BANK_VALID BIT6 -#define EFI_PLATFORM_MEMORY_DEVICE_VALID BIT7 -#define EFI_PLATFORM_MEMORY_ROW_VALID BIT8 -#define EFI_PLATFORM_MEMORY_COLUMN_VALID BIT9 -#define EFI_PLATFORM_MEMORY_BIT_POS_VALID BIT10 -#define EFI_PLATFORM_MEMORY_REQUESTOR_ID_VALID BIT11 -#define EFI_PLATFORM_MEMORY_RESPONDER_ID_VALID BIT12 -#define EFI_PLATFORM_MEMORY_TARGET_ID_VALID BIT13 -#define EFI_PLATFORM_MEMORY_ERROR_TYPE_VALID BIT14 -#define EFI_PLATFORM_MEMORY_ERROR_RANK_NUM_VALID BIT15 -#define EFI_PLATFORM_MEMORY_ERROR_CARD_HANDLE_VALID BIT16 -#define EFI_PLATFORM_MEMORY_ERROR_MODULE_HANDLE_VALID BIT17 -#define EFI_PLATFORM_MEMORY_ERROR_EXTENDED_ROW_BIT_16_17_VALID BIT18 -#define EFI_PLATFORM_MEMORY_ERROR_BANK_GROUP_VALID BIT19 -#define EFI_PLATFORM_MEMORY_ERROR_BANK_ADDRESS_VALID BIT20 -#define EFI_PLATFORM_MEMORY_ERROR_CHIP_IDENTIFICATION_VALID BIT21 +#define EFI_PLATFORM_MEMORY_ERROR_STATUS_VALID BIT0 +#define EFI_PLATFORM_MEMORY_PHY_ADDRESS_VALID BIT1 +#define EFI_PLATFORM_MEMORY_PHY_ADDRESS_MASK_VALID BIT2 +#define EFI_PLATFORM_MEMORY_NODE_VALID BIT3 +#define EFI_PLATFORM_MEMORY_CARD_VALID BIT4 +#define EFI_PLATFORM_MEMORY_MODULE_VALID BIT5 +#define EFI_PLATFORM_MEMORY_BANK_VALID BIT6 +#define EFI_PLATFORM_MEMORY_DEVICE_VALID BIT7 +#define EFI_PLATFORM_MEMORY_ROW_VALID BIT8 +#define EFI_PLATFORM_MEMORY_COLUMN_VALID BIT9 +#define EFI_PLATFORM_MEMORY_BIT_POS_VALID BIT10 +#define EFI_PLATFORM_MEMORY_REQUESTOR_ID_VALID BIT11 +#define EFI_PLATFORM_MEMORY_RESPONDER_ID_VALID BIT12 +#define EFI_PLATFORM_MEMORY_TARGET_ID_VALID BIT13 +#define EFI_PLATFORM_MEMORY_ERROR_TYPE_VALID BIT14 +#define EFI_PLATFORM_MEMORY_ERROR_RANK_NUM_VALID BIT15 +#define EFI_PLATFORM_MEMORY_ERROR_CARD_HANDLE_VALID BIT16 +#define EFI_PLATFORM_MEMORY_ERROR_MODULE_HANDLE_VALID BIT17 +#define EFI_PLATFORM_MEMORY_ERROR_EXTENDED_ROW_BIT_16_17_VALID BIT18 +#define EFI_PLATFORM_MEMORY_ERROR_BANK_GROUP_VALID BIT19 +#define EFI_PLATFORM_MEMORY_ERROR_BANK_ADDRESS_VALID BIT20 +#define EFI_PLATFORM_MEMORY_ERROR_CHIP_IDENTIFICATION_VALID BIT21 ///@} /// /// Memory Error Type identifies the type of error that occurred in Memory /// Error section ///@{ -#define EFI_PLATFORM_MEMORY_ERROR_UNKNOWN 0x00 -#define EFI_PLATFORM_MEMORY_ERROR_NONE 0x01 -#define EFI_PLATFORM_MEMORY_ERROR_SINGLEBIT_ECC 0x02 -#define EFI_PLATFORM_MEMORY_ERROR_MLTIBIT_ECC 0x03 -#define EFI_PLATFORM_MEMORY_ERROR_SINGLESYMBOLS_CHIPKILL 0x04 -#define EFI_PLATFORM_MEMORY_ERROR_MULTISYMBOL_CHIPKILL 0x05 -#define EFI_PLATFORM_MEMORY_ERROR_MATER_ABORT 0x06 -#define EFI_PLATFORM_MEMORY_ERROR_TARGET_ABORT 0x07 -#define EFI_PLATFORM_MEMORY_ERROR_PARITY 0x08 -#define EFI_PLATFORM_MEMORY_ERROR_WDT 0x09 -#define EFI_PLATFORM_MEMORY_ERROR_INVALID_ADDRESS 0x0A -#define EFI_PLATFORM_MEMORY_ERROR_MIRROR_FAILED 0x0B -#define EFI_PLATFORM_MEMORY_ERROR_SPARING 0x0C -#define EFI_PLATFORM_MEMORY_ERROR_SCRUB_CORRECTED 0x0D -#define EFI_PLATFORM_MEMORY_ERROR_SCRUB_UNCORRECTED 0x0E -#define EFI_PLATFORM_MEMORY_ERROR_MEMORY_MAP_EVENT 0x0F +#define EFI_PLATFORM_MEMORY_ERROR_UNKNOWN 0x00 +#define EFI_PLATFORM_MEMORY_ERROR_NONE 0x01 +#define EFI_PLATFORM_MEMORY_ERROR_SINGLEBIT_ECC 0x02 +#define EFI_PLATFORM_MEMORY_ERROR_MLTIBIT_ECC 0x03 +#define EFI_PLATFORM_MEMORY_ERROR_SINGLESYMBOLS_CHIPKILL 0x04 +#define EFI_PLATFORM_MEMORY_ERROR_MULTISYMBOL_CHIPKILL 0x05 +#define EFI_PLATFORM_MEMORY_ERROR_MATER_ABORT 0x06 +#define EFI_PLATFORM_MEMORY_ERROR_TARGET_ABORT 0x07 +#define EFI_PLATFORM_MEMORY_ERROR_PARITY 0x08 +#define EFI_PLATFORM_MEMORY_ERROR_WDT 0x09 +#define EFI_PLATFORM_MEMORY_ERROR_INVALID_ADDRESS 0x0A +#define EFI_PLATFORM_MEMORY_ERROR_MIRROR_FAILED 0x0B +#define EFI_PLATFORM_MEMORY_ERROR_SPARING 0x0C +#define EFI_PLATFORM_MEMORY_ERROR_SCRUB_CORRECTED 0x0D +#define EFI_PLATFORM_MEMORY_ERROR_SCRUB_UNCORRECTED 0x0E +#define EFI_PLATFORM_MEMORY_ERROR_MEMORY_MAP_EVENT 0x0F ///@} /// /// Memory Error Section /// typedef struct { - UINT64 ValidFields; - EFI_GENERIC_ERROR_STATUS ErrorStatus; - UINT64 PhysicalAddress; // Error physical address - UINT64 PhysicalAddressMask; // Grnaularity - UINT16 Node; // Node # - UINT16 Card; - UINT16 ModuleRank; // Module or Rank# - UINT16 Bank; - UINT16 Device; - UINT16 Row; - UINT16 Column; - UINT16 BitPosition; - UINT64 RequestorId; - UINT64 ResponderId; - UINT64 TargetId; - UINT8 ErrorType; - UINT8 Extended; - UINT16 RankNum; - UINT16 CardHandle; - UINT16 ModuleHandle; + UINT64 ValidFields; + EFI_GENERIC_ERROR_STATUS ErrorStatus; + UINT64 PhysicalAddress; // Error physical address + UINT64 PhysicalAddressMask; // Grnaularity + UINT16 Node; // Node # + UINT16 Card; + UINT16 ModuleRank; // Module or Rank# + UINT16 Bank; + UINT16 Device; + UINT16 Row; + UINT16 Column; + UINT16 BitPosition; + UINT64 RequestorId; + UINT64 ResponderId; + UINT64 TargetId; + UINT8 ErrorType; + UINT8 Extended; + UINT16 RankNum; + UINT16 CardHandle; + UINT16 ModuleHandle; } EFI_PLATFORM_MEMORY_ERROR_DATA; /// /// Validation bit mask indicates which fields in the memory error record 2 are valid /// in Memory Error section 2 ///@{ -#define EFI_PLATFORM_MEMORY2_ERROR_STATUS_VALID BIT0 -#define EFI_PLATFORM_MEMORY2_PHY_ADDRESS_VALID BIT1 -#define EFI_PLATFORM_MEMORY2_PHY_ADDRESS_MASK_VALID BIT2 -#define EFI_PLATFORM_MEMORY2_NODE_VALID BIT3 -#define EFI_PLATFORM_MEMORY2_CARD_VALID BIT4 -#define EFI_PLATFORM_MEMORY2_MODULE_VALID BIT5 -#define EFI_PLATFORM_MEMORY2_BANK_VALID BIT6 -#define EFI_PLATFORM_MEMORY2_DEVICE_VALID BIT7 -#define EFI_PLATFORM_MEMORY2_ROW_VALID BIT8 -#define EFI_PLATFORM_MEMORY2_COLUMN_VALID BIT9 -#define EFI_PLATFORM_MEMORY2_RANK_VALID BIT10 -#define EFI_PLATFORM_MEMORY2_BIT_POS_VALID BIT11 -#define EFI_PLATFORM_MEMORY2_CHIP_ID_VALID BIT12 -#define EFI_PLATFORM_MEMORY2_MEMORY_ERROR_TYPE_VALID BIT13 -#define EFI_PLATFORM_MEMORY2_STATUS_VALID BIT14 -#define EFI_PLATFORM_MEMORY2_REQUESTOR_ID_VALID BIT15 -#define EFI_PLATFORM_MEMORY2_RESPONDER_ID_VALID BIT16 -#define EFI_PLATFORM_MEMORY2_TARGET_ID_VALID BIT17 -#define EFI_PLATFORM_MEMORY2_CARD_HANDLE_VALID BIT18 -#define EFI_PLATFORM_MEMORY2_MODULE_HANDLE_VALID BIT19 -#define EFI_PLATFORM_MEMORY2_BANK_GROUP_VALID BIT20 -#define EFI_PLATFORM_MEMORY2_BANK_ADDRESS_VALID BIT21 +#define EFI_PLATFORM_MEMORY2_ERROR_STATUS_VALID BIT0 +#define EFI_PLATFORM_MEMORY2_PHY_ADDRESS_VALID BIT1 +#define EFI_PLATFORM_MEMORY2_PHY_ADDRESS_MASK_VALID BIT2 +#define EFI_PLATFORM_MEMORY2_NODE_VALID BIT3 +#define EFI_PLATFORM_MEMORY2_CARD_VALID BIT4 +#define EFI_PLATFORM_MEMORY2_MODULE_VALID BIT5 +#define EFI_PLATFORM_MEMORY2_BANK_VALID BIT6 +#define EFI_PLATFORM_MEMORY2_DEVICE_VALID BIT7 +#define EFI_PLATFORM_MEMORY2_ROW_VALID BIT8 +#define EFI_PLATFORM_MEMORY2_COLUMN_VALID BIT9 +#define EFI_PLATFORM_MEMORY2_RANK_VALID BIT10 +#define EFI_PLATFORM_MEMORY2_BIT_POS_VALID BIT11 +#define EFI_PLATFORM_MEMORY2_CHIP_ID_VALID BIT12 +#define EFI_PLATFORM_MEMORY2_MEMORY_ERROR_TYPE_VALID BIT13 +#define EFI_PLATFORM_MEMORY2_STATUS_VALID BIT14 +#define EFI_PLATFORM_MEMORY2_REQUESTOR_ID_VALID BIT15 +#define EFI_PLATFORM_MEMORY2_RESPONDER_ID_VALID BIT16 +#define EFI_PLATFORM_MEMORY2_TARGET_ID_VALID BIT17 +#define EFI_PLATFORM_MEMORY2_CARD_HANDLE_VALID BIT18 +#define EFI_PLATFORM_MEMORY2_MODULE_HANDLE_VALID BIT19 +#define EFI_PLATFORM_MEMORY2_BANK_GROUP_VALID BIT20 +#define EFI_PLATFORM_MEMORY2_BANK_ADDRESS_VALID BIT21 ///@} /// /// Memory Error Type identifies the type of error that occurred in Memory /// Error section 2 ///@{ -#define EFI_PLATFORM_MEMORY2_ERROR_UNKNOWN 0x00 -#define EFI_PLATFORM_MEMORY2_ERROR_NONE 0x01 -#define EFI_PLATFORM_MEMORY2_ERROR_SINGLEBIT_ECC 0x02 -#define EFI_PLATFORM_MEMORY2_ERROR_MLTIBIT_ECC 0x03 -#define EFI_PLATFORM_MEMORY2_ERROR_SINGLESYMBOL_CHIPKILL 0x04 -#define EFI_PLATFORM_MEMORY2_ERROR_MULTISYMBOL_CHIPKILL 0x05 -#define EFI_PLATFORM_MEMORY2_ERROR_MASTER_ABORT 0x06 -#define EFI_PLATFORM_MEMORY2_ERROR_TARGET_ABORT 0x07 -#define EFI_PLATFORM_MEMORY2_ERROR_PARITY 0x08 -#define EFI_PLATFORM_MEMORY2_ERROR_WDT 0x09 -#define EFI_PLATFORM_MEMORY2_ERROR_INVALID_ADDRESS 0x0A -#define EFI_PLATFORM_MEMORY2_ERROR_MIRROR_BROKEN 0x0B -#define EFI_PLATFORM_MEMORY2_ERROR_MEMORY_SPARING 0x0C -#define EFI_PLATFORM_MEMORY2_ERROR_SCRUB_CORRECTED 0x0D -#define EFI_PLATFORM_MEMORY2_ERROR_SCRUB_UNCORRECTED 0x0E -#define EFI_PLATFORM_MEMORY2_ERROR_MEMORY_MAP_EVENT 0x0F +#define EFI_PLATFORM_MEMORY2_ERROR_UNKNOWN 0x00 +#define EFI_PLATFORM_MEMORY2_ERROR_NONE 0x01 +#define EFI_PLATFORM_MEMORY2_ERROR_SINGLEBIT_ECC 0x02 +#define EFI_PLATFORM_MEMORY2_ERROR_MLTIBIT_ECC 0x03 +#define EFI_PLATFORM_MEMORY2_ERROR_SINGLESYMBOL_CHIPKILL 0x04 +#define EFI_PLATFORM_MEMORY2_ERROR_MULTISYMBOL_CHIPKILL 0x05 +#define EFI_PLATFORM_MEMORY2_ERROR_MASTER_ABORT 0x06 +#define EFI_PLATFORM_MEMORY2_ERROR_TARGET_ABORT 0x07 +#define EFI_PLATFORM_MEMORY2_ERROR_PARITY 0x08 +#define EFI_PLATFORM_MEMORY2_ERROR_WDT 0x09 +#define EFI_PLATFORM_MEMORY2_ERROR_INVALID_ADDRESS 0x0A +#define EFI_PLATFORM_MEMORY2_ERROR_MIRROR_BROKEN 0x0B +#define EFI_PLATFORM_MEMORY2_ERROR_MEMORY_SPARING 0x0C +#define EFI_PLATFORM_MEMORY2_ERROR_SCRUB_CORRECTED 0x0D +#define EFI_PLATFORM_MEMORY2_ERROR_SCRUB_UNCORRECTED 0x0E +#define EFI_PLATFORM_MEMORY2_ERROR_MEMORY_MAP_EVENT 0x0F ///@} /// /// Memory Error Section 2 /// typedef struct { - UINT64 ValidFields; - EFI_GENERIC_ERROR_STATUS ErrorStatus; - UINT64 PhysicalAddress; // Error physical address - UINT64 PhysicalAddressMask; // Grnaularity - UINT16 Node; // Node # - UINT16 Card; - UINT16 Module; // Module or Rank# - UINT16 Bank; - UINT32 Device; - UINT32 Row; - UINT32 Column; - UINT32 Rank; - UINT32 BitPosition; - UINT8 ChipId; - UINT8 MemErrorType; - UINT8 Status; - UINT8 Reserved; - UINT64 RequestorId; - UINT64 ResponderId; - UINT64 TargetId; - UINT32 CardHandle; - UINT32 ModuleHandle; + UINT64 ValidFields; + EFI_GENERIC_ERROR_STATUS ErrorStatus; + UINT64 PhysicalAddress; // Error physical address + UINT64 PhysicalAddressMask; // Grnaularity + UINT16 Node; // Node # + UINT16 Card; + UINT16 Module; // Module or Rank# + UINT16 Bank; + UINT32 Device; + UINT32 Row; + UINT32 Column; + UINT32 Rank; + UINT32 BitPosition; + UINT8 ChipId; + UINT8 MemErrorType; + UINT8 Status; + UINT8 Reserved; + UINT64 RequestorId; + UINT64 ResponderId; + UINT64 TargetId; + UINT32 CardHandle; + UINT32 ModuleHandle; } EFI_PLATFORM_MEMORY2_ERROR_DATA; /// /// Validation bits mask indicates which of the following fields is valid /// in PCI Express Error Record. ///@{ -#define EFI_PCIE_ERROR_PORT_TYPE_VALID BIT0 -#define EFI_PCIE_ERROR_VERSION_VALID BIT1 -#define EFI_PCIE_ERROR_COMMAND_STATUS_VALID BIT2 -#define EFI_PCIE_ERROR_DEVICE_ID_VALID BIT3 -#define EFI_PCIE_ERROR_SERIAL_NO_VALID BIT4 -#define EFI_PCIE_ERROR_BRIDGE_CRL_STS_VALID BIT5 -#define EFI_PCIE_ERROR_CAPABILITY_INFO_VALID BIT6 -#define EFI_PCIE_ERROR_AER_INFO_VALID BIT7 +#define EFI_PCIE_ERROR_PORT_TYPE_VALID BIT0 +#define EFI_PCIE_ERROR_VERSION_VALID BIT1 +#define EFI_PCIE_ERROR_COMMAND_STATUS_VALID BIT2 +#define EFI_PCIE_ERROR_DEVICE_ID_VALID BIT3 +#define EFI_PCIE_ERROR_SERIAL_NO_VALID BIT4 +#define EFI_PCIE_ERROR_BRIDGE_CRL_STS_VALID BIT5 +#define EFI_PCIE_ERROR_CAPABILITY_INFO_VALID BIT6 +#define EFI_PCIE_ERROR_AER_INFO_VALID BIT7 ///@} /// /// PCIe Device/Port Type as defined in the PCI Express capabilities register ///@{ -#define EFI_PCIE_ERROR_PORT_PCIE_ENDPOINT 0x00000000 -#define EFI_PCIE_ERROR_PORT_PCI_ENDPOINT 0x00000001 -#define EFI_PCIE_ERROR_PORT_ROOT_PORT 0x00000004 -#define EFI_PCIE_ERROR_PORT_UPSWITCH_PORT 0x00000005 -#define EFI_PCIE_ERROR_PORT_DOWNSWITCH_PORT 0x00000006 -#define EFI_PCIE_ERROR_PORT_PCIE_TO_PCI_BRIDGE 0x00000007 -#define EFI_PCIE_ERROR_PORT_PCI_TO_PCIE_BRIDGE 0x00000008 -#define EFI_PCIE_ERROR_PORT_ROOT_INT_ENDPOINT 0x00000009 -#define EFI_PCIE_ERROR_PORT_ROOT_EVENT_COLLECTOR 0x0000000A +#define EFI_PCIE_ERROR_PORT_PCIE_ENDPOINT 0x00000000 +#define EFI_PCIE_ERROR_PORT_PCI_ENDPOINT 0x00000001 +#define EFI_PCIE_ERROR_PORT_ROOT_PORT 0x00000004 +#define EFI_PCIE_ERROR_PORT_UPSWITCH_PORT 0x00000005 +#define EFI_PCIE_ERROR_PORT_DOWNSWITCH_PORT 0x00000006 +#define EFI_PCIE_ERROR_PORT_PCIE_TO_PCI_BRIDGE 0x00000007 +#define EFI_PCIE_ERROR_PORT_PCI_TO_PCIE_BRIDGE 0x00000008 +#define EFI_PCIE_ERROR_PORT_ROOT_INT_ENDPOINT 0x00000009 +#define EFI_PCIE_ERROR_PORT_ROOT_EVENT_COLLECTOR 0x0000000A ///@} /// /// PCI Slot number /// typedef struct { - UINT16 Resv1:3; - UINT16 Number:13; + UINT16 Resv1 : 3; + UINT16 Number : 13; } EFI_GENERIC_ERROR_PCI_SLOT; /// @@ -982,125 +981,125 @@ typedef struct { /// bridge. Default values for both the bus numbers is zero. /// typedef struct { - UINT16 VendorId; - UINT16 DeviceId; - UINT8 ClassCode[3]; - UINT8 Function; - UINT8 Device; - UINT16 Segment; - UINT8 PrimaryOrDeviceBus; - UINT8 SecondaryBus; - EFI_GENERIC_ERROR_PCI_SLOT Slot; - UINT8 Resv1; + UINT16 VendorId; + UINT16 DeviceId; + UINT8 ClassCode[3]; + UINT8 Function; + UINT8 Device; + UINT16 Segment; + UINT8 PrimaryOrDeviceBus; + UINT8 SecondaryBus; + EFI_GENERIC_ERROR_PCI_SLOT Slot; + UINT8 Resv1; } EFI_GENERIC_ERROR_PCIE_DEV_BRIDGE_ID; /// /// PCIe Capability Structure /// typedef struct { - UINT8 PcieCap[60]; + UINT8 PcieCap[60]; } EFI_PCIE_ERROR_DATA_CAPABILITY; /// /// PCIe Advanced Error Reporting Extended Capability Structure. /// typedef struct { - UINT8 PcieAer[96]; + UINT8 PcieAer[96]; } EFI_PCIE_ERROR_DATA_AER; /// /// PCI Express Error Record /// typedef struct { - UINT64 ValidFields; - UINT32 PortType; - UINT32 Version; - UINT32 CommandStatus; - UINT32 Resv2; - EFI_GENERIC_ERROR_PCIE_DEV_BRIDGE_ID DevBridge; - UINT64 SerialNo; - UINT32 BridgeControlStatus; - EFI_PCIE_ERROR_DATA_CAPABILITY Capability; - EFI_PCIE_ERROR_DATA_AER AerInfo; + UINT64 ValidFields; + UINT32 PortType; + UINT32 Version; + UINT32 CommandStatus; + UINT32 Resv2; + EFI_GENERIC_ERROR_PCIE_DEV_BRIDGE_ID DevBridge; + UINT64 SerialNo; + UINT32 BridgeControlStatus; + EFI_PCIE_ERROR_DATA_CAPABILITY Capability; + EFI_PCIE_ERROR_DATA_AER AerInfo; } EFI_PCIE_ERROR_DATA; /// /// Validation bits Indicates which of the following fields is valid /// in PCI/PCI-X Bus Error Section. ///@{ -#define EFI_PCI_PCIX_BUS_ERROR_STATUS_VALID BIT0 -#define EFI_PCI_PCIX_BUS_ERROR_TYPE_VALID BIT1 -#define EFI_PCI_PCIX_BUS_ERROR_BUS_ID_VALID BIT2 -#define EFI_PCI_PCIX_BUS_ERROR_BUS_ADDRESS_VALID BIT3 -#define EFI_PCI_PCIX_BUS_ERROR_BUS_DATA_VALID BIT4 -#define EFI_PCI_PCIX_BUS_ERROR_COMMAND_VALID BIT5 -#define EFI_PCI_PCIX_BUS_ERROR_REQUESTOR_ID_VALID BIT6 -#define EFI_PCI_PCIX_BUS_ERROR_COMPLETER_ID_VALID BIT7 -#define EFI_PCI_PCIX_BUS_ERROR_TARGET_ID_VALID BIT8 +#define EFI_PCI_PCIX_BUS_ERROR_STATUS_VALID BIT0 +#define EFI_PCI_PCIX_BUS_ERROR_TYPE_VALID BIT1 +#define EFI_PCI_PCIX_BUS_ERROR_BUS_ID_VALID BIT2 +#define EFI_PCI_PCIX_BUS_ERROR_BUS_ADDRESS_VALID BIT3 +#define EFI_PCI_PCIX_BUS_ERROR_BUS_DATA_VALID BIT4 +#define EFI_PCI_PCIX_BUS_ERROR_COMMAND_VALID BIT5 +#define EFI_PCI_PCIX_BUS_ERROR_REQUESTOR_ID_VALID BIT6 +#define EFI_PCI_PCIX_BUS_ERROR_COMPLETER_ID_VALID BIT7 +#define EFI_PCI_PCIX_BUS_ERROR_TARGET_ID_VALID BIT8 ///@} /// /// PCI Bus Error Type in PCI/PCI-X Bus Error Section ///@{ -#define EFI_PCI_PCIX_BUS_ERROR_UNKNOWN 0x0000 -#define EFI_PCI_PCIX_BUS_ERROR_DATA_PARITY 0x0001 -#define EFI_PCI_PCIX_BUS_ERROR_SYSTEM 0x0002 -#define EFI_PCI_PCIX_BUS_ERROR_MASTER_ABORT 0x0003 -#define EFI_PCI_PCIX_BUS_ERROR_BUS_TIMEOUT 0x0004 -#define EFI_PCI_PCIX_BUS_ERROR_MASTER_DATA_PARITY 0x0005 -#define EFI_PCI_PCIX_BUS_ERROR_ADDRESS_PARITY 0x0006 -#define EFI_PCI_PCIX_BUS_ERROR_COMMAND_PARITY 0x0007 +#define EFI_PCI_PCIX_BUS_ERROR_UNKNOWN 0x0000 +#define EFI_PCI_PCIX_BUS_ERROR_DATA_PARITY 0x0001 +#define EFI_PCI_PCIX_BUS_ERROR_SYSTEM 0x0002 +#define EFI_PCI_PCIX_BUS_ERROR_MASTER_ABORT 0x0003 +#define EFI_PCI_PCIX_BUS_ERROR_BUS_TIMEOUT 0x0004 +#define EFI_PCI_PCIX_BUS_ERROR_MASTER_DATA_PARITY 0x0005 +#define EFI_PCI_PCIX_BUS_ERROR_ADDRESS_PARITY 0x0006 +#define EFI_PCI_PCIX_BUS_ERROR_COMMAND_PARITY 0x0007 ///@} /// /// PCI/PCI-X Bus Error Section /// typedef struct { - UINT64 ValidFields; - EFI_GENERIC_ERROR_STATUS ErrorStatus; - UINT16 Type; - UINT16 BusId; - UINT32 Resv2; - UINT64 BusAddress; - UINT64 BusData; - UINT64 BusCommand; - UINT64 RequestorId; - UINT64 ResponderId; - UINT64 TargetId; + UINT64 ValidFields; + EFI_GENERIC_ERROR_STATUS ErrorStatus; + UINT16 Type; + UINT16 BusId; + UINT32 Resv2; + UINT64 BusAddress; + UINT64 BusData; + UINT64 BusCommand; + UINT64 RequestorId; + UINT64 ResponderId; + UINT64 TargetId; } EFI_PCI_PCIX_BUS_ERROR_DATA; /// /// Validation bits Indicates which of the following fields is valid /// in PCI/PCI-X Component Error Section. ///@{ -#define EFI_PCI_PCIX_DEVICE_ERROR_STATUS_VALID BIT0 -#define EFI_PCI_PCIX_DEVICE_ERROR_ID_INFO_VALID BIT1 -#define EFI_PCI_PCIX_DEVICE_ERROR_MEM_NUM_VALID BIT2 -#define EFI_PCI_PCIX_DEVICE_ERROR_IO_NUM_VALID BIT3 -#define EFI_PCI_PCIX_DEVICE_ERROR_REG_DATA_PAIR_VALID BIT4 +#define EFI_PCI_PCIX_DEVICE_ERROR_STATUS_VALID BIT0 +#define EFI_PCI_PCIX_DEVICE_ERROR_ID_INFO_VALID BIT1 +#define EFI_PCI_PCIX_DEVICE_ERROR_MEM_NUM_VALID BIT2 +#define EFI_PCI_PCIX_DEVICE_ERROR_IO_NUM_VALID BIT3 +#define EFI_PCI_PCIX_DEVICE_ERROR_REG_DATA_PAIR_VALID BIT4 ///@} /// /// PCI/PCI-X Device Identification Information /// typedef struct { - UINT16 VendorId; - UINT16 DeviceId; - UINT8 ClassCode[3]; - UINT8 Function; - UINT8 Device; - UINT8 Bus; - UINT8 Segment; - UINT8 Resv1; - UINT32 Resv2; + UINT16 VendorId; + UINT16 DeviceId; + UINT8 ClassCode[3]; + UINT8 Function; + UINT8 Device; + UINT8 Bus; + UINT8 Segment; + UINT8 Resv1; + UINT32 Resv2; } EFI_GENERIC_ERROR_PCI_DEVICE_ID; /// /// Identifies the type of firmware error record ///@{ -#define EFI_FIRMWARE_ERROR_TYPE_IPF_SAL 0x00 -#define EFI_FIRMWARE_ERROR_TYPE_SOC_TYPE1 0x01 -#define EFI_FIRMWARE_ERROR_TYPE_SOC_TYPE2 0x02 +#define EFI_FIRMWARE_ERROR_TYPE_IPF_SAL 0x00 +#define EFI_FIRMWARE_ERROR_TYPE_SOC_TYPE1 0x01 +#define EFI_FIRMWARE_ERROR_TYPE_SOC_TYPE2 0x02 ///@} /// @@ -1117,135 +1116,135 @@ typedef struct { /// /// Fault Reason in DMAr Generic Error Section ///@{ -#define EFI_DMA_FAULT_REASON_TABLE_ENTRY_NOT_PRESENT 0x01 -#define EFI_DMA_FAULT_REASON_TABLE_ENTRY_INVALID 0x02 -#define EFI_DMA_FAULT_REASON_ACCESS_MAPPING_TABLE_ERROR 0x03 -#define EFI_DMA_FAULT_REASON_RESV_BIT_ERROR_IN_MAPPING_TABLE 0x04 -#define EFI_DMA_FAULT_REASON_ACCESS_ADDR_OUT_OF_SPACE 0x05 -#define EFI_DMA_FAULT_REASON_INVALID_ACCESS 0x06 -#define EFI_DMA_FAULT_REASON_INVALID_REQUEST 0x07 -#define EFI_DMA_FAULT_REASON_ACCESS_TRANSLATE_TABLE_ERROR 0x08 -#define EFI_DMA_FAULT_REASON_RESV_BIT_ERROR_IN_TRANSLATE_TABLE 0x09 -#define EFI_DMA_FAULT_REASON_INVALID_COMMAOND 0x0A -#define EFI_DMA_FAULT_REASON_ACCESS_COMMAND_BUFFER_ERROR 0x0B +#define EFI_DMA_FAULT_REASON_TABLE_ENTRY_NOT_PRESENT 0x01 +#define EFI_DMA_FAULT_REASON_TABLE_ENTRY_INVALID 0x02 +#define EFI_DMA_FAULT_REASON_ACCESS_MAPPING_TABLE_ERROR 0x03 +#define EFI_DMA_FAULT_REASON_RESV_BIT_ERROR_IN_MAPPING_TABLE 0x04 +#define EFI_DMA_FAULT_REASON_ACCESS_ADDR_OUT_OF_SPACE 0x05 +#define EFI_DMA_FAULT_REASON_INVALID_ACCESS 0x06 +#define EFI_DMA_FAULT_REASON_INVALID_REQUEST 0x07 +#define EFI_DMA_FAULT_REASON_ACCESS_TRANSLATE_TABLE_ERROR 0x08 +#define EFI_DMA_FAULT_REASON_RESV_BIT_ERROR_IN_TRANSLATE_TABLE 0x09 +#define EFI_DMA_FAULT_REASON_INVALID_COMMAOND 0x0A +#define EFI_DMA_FAULT_REASON_ACCESS_COMMAND_BUFFER_ERROR 0x0B ///@} /// /// DMA access type in DMAr Generic Error Section ///@{ -#define EFI_DMA_ACCESS_TYPE_READ 0x00 -#define EFI_DMA_ACCESS_TYPE_WRITE 0x01 +#define EFI_DMA_ACCESS_TYPE_READ 0x00 +#define EFI_DMA_ACCESS_TYPE_WRITE 0x01 ///@} /// /// DMA address type in DMAr Generic Error Section ///@{ -#define EFI_DMA_ADDRESS_UNTRANSLATED 0x00 -#define EFI_DMA_ADDRESS_TRANSLATION 0x01 +#define EFI_DMA_ADDRESS_UNTRANSLATED 0x00 +#define EFI_DMA_ADDRESS_TRANSLATION 0x01 ///@} /// /// Architecture type in DMAr Generic Error Section ///@{ -#define EFI_DMA_ARCH_TYPE_VT 0x01 -#define EFI_DMA_ARCH_TYPE_IOMMU 0x02 +#define EFI_DMA_ARCH_TYPE_VT 0x01 +#define EFI_DMA_ARCH_TYPE_IOMMU 0x02 ///@} /// /// DMAr Generic Error Section /// typedef struct { - UINT16 RequesterId; - UINT16 SegmentNumber; - UINT8 FaultReason; - UINT8 AccessType; - UINT8 AddressType; - UINT8 ArchType; - UINT64 DeviceAddr; - UINT8 Resv1[16]; + UINT16 RequesterId; + UINT16 SegmentNumber; + UINT8 FaultReason; + UINT8 AccessType; + UINT8 AddressType; + UINT8 ArchType; + UINT64 DeviceAddr; + UINT8 Resv1[16]; } EFI_DMAR_GENERIC_ERROR_DATA; /// /// Intel VT for Directed I/O specific DMAr Errors /// typedef struct { - UINT8 Version; - UINT8 Revision; - UINT8 OemId[6]; - UINT64 Capability; - UINT64 CapabilityEx; - UINT32 GlobalCommand; - UINT32 GlobalStatus; - UINT32 FaultStatus; - UINT8 Resv1[12]; - UINT64 FaultRecord[2]; - UINT64 RootEntry[2]; - UINT64 ContextEntry[2]; - UINT64 PteL6; - UINT64 PteL5; - UINT64 PteL4; - UINT64 PteL3; - UINT64 PteL2; - UINT64 PteL1; + UINT8 Version; + UINT8 Revision; + UINT8 OemId[6]; + UINT64 Capability; + UINT64 CapabilityEx; + UINT32 GlobalCommand; + UINT32 GlobalStatus; + UINT32 FaultStatus; + UINT8 Resv1[12]; + UINT64 FaultRecord[2]; + UINT64 RootEntry[2]; + UINT64 ContextEntry[2]; + UINT64 PteL6; + UINT64 PteL5; + UINT64 PteL4; + UINT64 PteL3; + UINT64 PteL2; + UINT64 PteL1; } EFI_DIRECTED_IO_DMAR_ERROR_DATA; /// /// IOMMU specific DMAr Errors /// typedef struct { - UINT8 Revision; - UINT8 Resv1[7]; - UINT64 Control; - UINT64 Status; - UINT8 Resv2[8]; - UINT64 EventLogEntry[2]; - UINT8 Resv3[16]; - UINT64 DeviceTableEntry[4]; - UINT64 PteL6; - UINT64 PteL5; - UINT64 PteL4; - UINT64 PteL3; - UINT64 PteL2; - UINT64 PteL1; + UINT8 Revision; + UINT8 Resv1[7]; + UINT64 Control; + UINT64 Status; + UINT8 Resv2[8]; + UINT64 EventLogEntry[2]; + UINT8 Resv3[16]; + UINT64 DeviceTableEntry[4]; + UINT64 PteL6; + UINT64 PteL5; + UINT64 PteL4; + UINT64 PteL3; + UINT64 PteL2; + UINT64 PteL1; } EFI_IOMMU_DMAR_ERROR_DATA; #pragma pack() -extern EFI_GUID gEfiEventNotificationTypeCmcGuid; -extern EFI_GUID gEfiEventNotificationTypeCpeGuid; -extern EFI_GUID gEfiEventNotificationTypeMceGuid; -extern EFI_GUID gEfiEventNotificationTypePcieGuid; -extern EFI_GUID gEfiEventNotificationTypeInitGuid; -extern EFI_GUID gEfiEventNotificationTypeNmiGuid; -extern EFI_GUID gEfiEventNotificationTypeBootGuid; -extern EFI_GUID gEfiEventNotificationTypeDmarGuid; -extern EFI_GUID gEfiEventNotificationTypeSeaGuid; -extern EFI_GUID gEfiEventNotificationTypeSeiGuid; -extern EFI_GUID gEfiEventNotificationTypePeiGuid; - -extern EFI_GUID gEfiProcessorGenericErrorSectionGuid; -extern EFI_GUID gEfiProcessorSpecificErrorSectionGuid; -extern EFI_GUID gEfiIa32X64ProcessorErrorSectionGuid; -extern EFI_GUID gEfiArmProcessorErrorSectionGuid ; -extern EFI_GUID gEfiPlatformMemoryErrorSectionGuid; -extern EFI_GUID gEfiPlatformMemory2ErrorSectionGuid; -extern EFI_GUID gEfiPcieErrorSectionGuid; -extern EFI_GUID gEfiFirmwareErrorSectionGuid; -extern EFI_GUID gEfiPciBusErrorSectionGuid; -extern EFI_GUID gEfiPciDevErrorSectionGuid; -extern EFI_GUID gEfiDMArGenericErrorSectionGuid; -extern EFI_GUID gEfiDirectedIoDMArErrorSectionGuid; -extern EFI_GUID gEfiIommuDMArErrorSectionGuid; +extern EFI_GUID gEfiEventNotificationTypeCmcGuid; +extern EFI_GUID gEfiEventNotificationTypeCpeGuid; +extern EFI_GUID gEfiEventNotificationTypeMceGuid; +extern EFI_GUID gEfiEventNotificationTypePcieGuid; +extern EFI_GUID gEfiEventNotificationTypeInitGuid; +extern EFI_GUID gEfiEventNotificationTypeNmiGuid; +extern EFI_GUID gEfiEventNotificationTypeBootGuid; +extern EFI_GUID gEfiEventNotificationTypeDmarGuid; +extern EFI_GUID gEfiEventNotificationTypeSeaGuid; +extern EFI_GUID gEfiEventNotificationTypeSeiGuid; +extern EFI_GUID gEfiEventNotificationTypePeiGuid; + +extern EFI_GUID gEfiProcessorGenericErrorSectionGuid; +extern EFI_GUID gEfiProcessorSpecificErrorSectionGuid; +extern EFI_GUID gEfiIa32X64ProcessorErrorSectionGuid; +extern EFI_GUID gEfiArmProcessorErrorSectionGuid; +extern EFI_GUID gEfiPlatformMemoryErrorSectionGuid; +extern EFI_GUID gEfiPlatformMemory2ErrorSectionGuid; +extern EFI_GUID gEfiPcieErrorSectionGuid; +extern EFI_GUID gEfiFirmwareErrorSectionGuid; +extern EFI_GUID gEfiPciBusErrorSectionGuid; +extern EFI_GUID gEfiPciDevErrorSectionGuid; +extern EFI_GUID gEfiDMArGenericErrorSectionGuid; +extern EFI_GUID gEfiDirectedIoDMArErrorSectionGuid; +extern EFI_GUID gEfiIommuDMArErrorSectionGuid; #if defined (MDE_CPU_IA32) || defined (MDE_CPU_X64) /// /// IA32 and x64 Specific definitions. /// -extern EFI_GUID gEfiIa32X64ErrorTypeCacheCheckGuid; -extern EFI_GUID gEfiIa32X64ErrorTypeTlbCheckGuid; -extern EFI_GUID gEfiIa32X64ErrorTypeBusCheckGuid; -extern EFI_GUID gEfiIa32X64ErrorTypeMsCheckGuid; +extern EFI_GUID gEfiIa32X64ErrorTypeCacheCheckGuid; +extern EFI_GUID gEfiIa32X64ErrorTypeTlbCheckGuid; +extern EFI_GUID gEfiIa32X64ErrorTypeBusCheckGuid; +extern EFI_GUID gEfiIa32X64ErrorTypeMsCheckGuid; #endif diff --git a/MdePkg/Include/Guid/DebugImageInfoTable.h b/MdePkg/Include/Guid/DebugImageInfoTable.h index ac1914d..6661c4d 100644 --- a/MdePkg/Include/Guid/DebugImageInfoTable.h +++ b/MdePkg/Include/Guid/DebugImageInfoTable.h @@ -22,15 +22,15 @@ 0x49152e77, 0x1ada, 0x4764, {0xb7, 0xa2, 0x7a, 0xfe, 0xfe, 0xd9, 0x5e, 0x8b } \ } -#define EFI_DEBUG_IMAGE_INFO_UPDATE_IN_PROGRESS 0x01 -#define EFI_DEBUG_IMAGE_INFO_TABLE_MODIFIED 0x02 +#define EFI_DEBUG_IMAGE_INFO_UPDATE_IN_PROGRESS 0x01 +#define EFI_DEBUG_IMAGE_INFO_TABLE_MODIFIED 0x02 -#define EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL 0x01 +#define EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL 0x01 typedef struct { - UINT64 Signature; ///< A constant UINT64 that has the value EFI_SYSTEM_TABLE_SIGNATURE - EFI_PHYSICAL_ADDRESS EfiSystemTableBase; ///< The physical address of the EFI system table. - UINT32 Crc32; ///< A 32-bit CRC value that is used to verify the EFI_SYSTEM_TABLE_POINTER structure is valid. + UINT64 Signature; ///< A constant UINT64 that has the value EFI_SYSTEM_TABLE_SIGNATURE + EFI_PHYSICAL_ADDRESS EfiSystemTableBase; ///< The physical address of the EFI system table. + UINT32 Crc32; ///< A 32-bit CRC value that is used to verify the EFI_SYSTEM_TABLE_POINTER structure is valid. } EFI_SYSTEM_TABLE_POINTER; typedef struct { @@ -38,37 +38,37 @@ typedef struct { /// Indicates the type of image info structure. For PE32 EFI images, /// this is set to EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL. /// - UINT32 ImageInfoType; + UINT32 ImageInfoType; /// /// A pointer to an instance of the loaded image protocol for the associated image. /// - EFI_LOADED_IMAGE_PROTOCOL *LoadedImageProtocolInstance; + EFI_LOADED_IMAGE_PROTOCOL *LoadedImageProtocolInstance; /// /// Indicates the image handle of the associated image. /// - EFI_HANDLE ImageHandle; + EFI_HANDLE ImageHandle; } EFI_DEBUG_IMAGE_INFO_NORMAL; typedef union { - UINT32 *ImageInfoType; - EFI_DEBUG_IMAGE_INFO_NORMAL *NormalImage; + UINT32 *ImageInfoType; + EFI_DEBUG_IMAGE_INFO_NORMAL *NormalImage; } EFI_DEBUG_IMAGE_INFO; typedef struct { /// /// UpdateStatus is used by the system to indicate the state of the debug image info table. /// - volatile UINT32 UpdateStatus; + volatile UINT32 UpdateStatus; /// /// The number of EFI_DEBUG_IMAGE_INFO elements in the array pointed to by EfiDebugImageInfoTable. /// - UINT32 TableSize; + UINT32 TableSize; /// /// A pointer to the first element of an array of EFI_DEBUG_IMAGE_INFO structures. /// - EFI_DEBUG_IMAGE_INFO *EfiDebugImageInfoTable; + EFI_DEBUG_IMAGE_INFO *EfiDebugImageInfoTable; } EFI_DEBUG_IMAGE_INFO_TABLE_HEADER; -extern EFI_GUID gEfiDebugImageInfoTableGuid; +extern EFI_GUID gEfiDebugImageInfoTableGuid; #endif diff --git a/MdePkg/Include/Guid/DxeServices.h b/MdePkg/Include/Guid/DxeServices.h index b210c11..e7b6b19 100644 --- a/MdePkg/Include/Guid/DxeServices.h +++ b/MdePkg/Include/Guid/DxeServices.h @@ -17,6 +17,6 @@ 0x5ad34ba, 0x6f02, 0x4214, {0x95, 0x2e, 0x4d, 0xa0, 0x39, 0x8e, 0x2b, 0xb9 } \ } -extern EFI_GUID gEfiDxeServicesTableGuid; +extern EFI_GUID gEfiDxeServicesTableGuid; #endif diff --git a/MdePkg/Include/Guid/EventGroup.h b/MdePkg/Include/Guid/EventGroup.h index 391d4fb..063d1f7 100644 --- a/MdePkg/Include/Guid/EventGroup.h +++ b/MdePkg/Include/Guid/EventGroup.h @@ -9,38 +9,34 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #ifndef __EVENT_GROUP_GUID__ #define __EVENT_GROUP_GUID__ - #define EFI_EVENT_GROUP_EXIT_BOOT_SERVICES \ { 0x27abf055, 0xb1b8, 0x4c26, { 0x80, 0x48, 0x74, 0x8f, 0x37, 0xba, 0xa2, 0xdf } } -extern EFI_GUID gEfiEventExitBootServicesGuid; - +extern EFI_GUID gEfiEventExitBootServicesGuid; #define EFI_EVENT_GROUP_VIRTUAL_ADDRESS_CHANGE \ { 0x13fa7698, 0xc831, 0x49c7, { 0x87, 0xea, 0x8f, 0x43, 0xfc, 0xc2, 0x51, 0x96 } } -extern EFI_GUID gEfiEventVirtualAddressChangeGuid; - +extern EFI_GUID gEfiEventVirtualAddressChangeGuid; #define EFI_EVENT_GROUP_MEMORY_MAP_CHANGE \ { 0x78bee926, 0x692f, 0x48fd, { 0x9e, 0xdb, 0x1, 0x42, 0x2e, 0xf0, 0xd7, 0xab } } -extern EFI_GUID gEfiEventMemoryMapChangeGuid; - +extern EFI_GUID gEfiEventMemoryMapChangeGuid; #define EFI_EVENT_GROUP_READY_TO_BOOT \ { 0x7ce88fb3, 0x4bd7, 0x4679, { 0x87, 0xa8, 0xa8, 0xd8, 0xde, 0xe5, 0x0d, 0x2b } } -extern EFI_GUID gEfiEventReadyToBootGuid; +extern EFI_GUID gEfiEventReadyToBootGuid; #define EFI_EVENT_GROUP_DXE_DISPATCH_GUID \ { 0x7081e22f, 0xcac6, 0x4053, { 0x94, 0x68, 0x67, 0x57, 0x82, 0xcf, 0x88, 0xe5 }} -extern EFI_GUID gEfiEventDxeDispatchGuid; +extern EFI_GUID gEfiEventDxeDispatchGuid; #define EFI_END_OF_DXE_EVENT_GROUP_GUID \ { 0x2ce967a, 0xdd7e, 0x4ffc, { 0x9e, 0xe7, 0x81, 0xc, 0xf0, 0x47, 0x8, 0x80 } } -extern EFI_GUID gEfiEndOfDxeEventGroupGuid; +extern EFI_GUID gEfiEndOfDxeEventGroupGuid; #endif diff --git a/MdePkg/Include/Guid/EventLegacyBios.h b/MdePkg/Include/Guid/EventLegacyBios.h index 1a7a0d1..c976c7b 100644 --- a/MdePkg/Include/Guid/EventLegacyBios.h +++ b/MdePkg/Include/Guid/EventLegacyBios.h @@ -17,6 +17,6 @@ #define EFI_EVENT_LEGACY_BOOT_GUID \ { 0x2a571201, 0x4966, 0x47f6, {0x8b, 0x86, 0xf3, 0x1e, 0x41, 0xf3, 0x2f, 0x10 } } -extern EFI_GUID gEfiEventLegacyBootGuid; +extern EFI_GUID gEfiEventLegacyBootGuid; #endif diff --git a/MdePkg/Include/Guid/FileInfo.h b/MdePkg/Include/Guid/FileInfo.h index 1fceee7..2b7edf3 100644 --- a/MdePkg/Include/Guid/FileInfo.h +++ b/MdePkg/Include/Guid/FileInfo.h @@ -20,35 +20,35 @@ typedef struct { /// /// The size of the EFI_FILE_INFO structure, including the Null-terminated FileName string. /// - UINT64 Size; + UINT64 Size; /// /// The size of the file in bytes. /// - UINT64 FileSize; + UINT64 FileSize; /// /// PhysicalSize The amount of physical space the file consumes on the file system volume. /// - UINT64 PhysicalSize; + UINT64 PhysicalSize; /// /// The time the file was created. /// - EFI_TIME CreateTime; + EFI_TIME CreateTime; /// /// The time when the file was last accessed. /// - EFI_TIME LastAccessTime; + EFI_TIME LastAccessTime; /// /// The time when the file's contents were last modified. /// - EFI_TIME ModificationTime; + EFI_TIME ModificationTime; /// /// The attribute bits for the file. /// - UINT64 Attribute; + UINT64 Attribute; /// /// The Null-terminated name of the file. /// - CHAR16 FileName[1]; + CHAR16 FileName[1]; } EFI_FILE_INFO; /// @@ -58,8 +58,8 @@ typedef struct { /// computes this size correctly no matter how big the FileName array is declared. /// This is required to make the EFI_FILE_INFO data structure ANSI compilant. /// -#define SIZE_OF_EFI_FILE_INFO OFFSET_OF (EFI_FILE_INFO, FileName) +#define SIZE_OF_EFI_FILE_INFO OFFSET_OF (EFI_FILE_INFO, FileName) -extern EFI_GUID gEfiFileInfoGuid; +extern EFI_GUID gEfiFileInfoGuid; #endif diff --git a/MdePkg/Include/Guid/FileSystemInfo.h b/MdePkg/Include/Guid/FileSystemInfo.h index 762cb94..1ce58c9 100644 --- a/MdePkg/Include/Guid/FileSystemInfo.h +++ b/MdePkg/Include/Guid/FileSystemInfo.h @@ -20,27 +20,27 @@ typedef struct { /// /// The size of the EFI_FILE_SYSTEM_INFO structure, including the Null-terminated VolumeLabel string. /// - UINT64 Size; + UINT64 Size; /// /// TRUE if the volume only supports read access. /// - BOOLEAN ReadOnly; + BOOLEAN ReadOnly; /// /// The number of bytes managed by the file system. /// - UINT64 VolumeSize; + UINT64 VolumeSize; /// /// The number of available bytes for use by the file system. /// - UINT64 FreeSpace; + UINT64 FreeSpace; /// /// The nominal block size by which files are typically grown. /// - UINT32 BlockSize; + UINT32 BlockSize; /// /// The Null-terminated string that is the volume's label. /// - CHAR16 VolumeLabel[1]; + CHAR16 VolumeLabel[1]; } EFI_FILE_SYSTEM_INFO; /// @@ -52,6 +52,6 @@ typedef struct { /// #define SIZE_OF_EFI_FILE_SYSTEM_INFO OFFSET_OF (EFI_FILE_SYSTEM_INFO, VolumeLabel) -extern EFI_GUID gEfiFileSystemInfoGuid; +extern EFI_GUID gEfiFileSystemInfoGuid; #endif diff --git a/MdePkg/Include/Guid/FileSystemVolumeLabelInfo.h b/MdePkg/Include/Guid/FileSystemVolumeLabelInfo.h index d055d0c..7776359 100644 --- a/MdePkg/Include/Guid/FileSystemVolumeLabelInfo.h +++ b/MdePkg/Include/Guid/FileSystemVolumeLabelInfo.h @@ -20,12 +20,12 @@ typedef struct { /// /// The Null-terminated string that is the volume's label. /// - CHAR16 VolumeLabel[1]; + CHAR16 VolumeLabel[1]; } EFI_FILE_SYSTEM_VOLUME_LABEL; #define SIZE_OF_EFI_FILE_SYSTEM_VOLUME_LABEL \ OFFSET_OF (EFI_FILE_SYSTEM_VOLUME_LABEL, VolumeLabel) -extern EFI_GUID gEfiFileSystemVolumeLabelInfoIdGuid; +extern EFI_GUID gEfiFileSystemVolumeLabelInfoIdGuid; #endif diff --git a/MdePkg/Include/Guid/FirmwareContentsSigned.h b/MdePkg/Include/Guid/FirmwareContentsSigned.h index 73089cb..dd241e1 100644 --- a/MdePkg/Include/Guid/FirmwareContentsSigned.h +++ b/MdePkg/Include/Guid/FirmwareContentsSigned.h @@ -15,6 +15,6 @@ #define EFI_FIRMWARE_CONTENTS_SIGNED_GUID \ { 0xf9d89e8, 0x9259, 0x4f76, {0xa5, 0xaf, 0xc, 0x89, 0xe3, 0x40, 0x23, 0xdf } } -extern EFI_GUID gEfiFirmwareContentsSignedGuid; +extern EFI_GUID gEfiFirmwareContentsSignedGuid; #endif diff --git a/MdePkg/Include/Guid/FirmwareFileSystem2.h b/MdePkg/Include/Guid/FirmwareFileSystem2.h index 64e2499..224db2a 100644 --- a/MdePkg/Include/Guid/FirmwareFileSystem2.h +++ b/MdePkg/Include/Guid/FirmwareFileSystem2.h @@ -27,8 +27,7 @@ #define EFI_FFS_VOLUME_TOP_FILE_GUID \ { 0x1BA0062E, 0xC779, 0x4582, { 0x85, 0x66, 0x33, 0x6A, 0xE8, 0xF7, 0x8F, 0x9 } } - -extern EFI_GUID gEfiFirmwareFileSystem2Guid; -extern EFI_GUID gEfiFirmwareVolumeTopFileGuid; +extern EFI_GUID gEfiFirmwareFileSystem2Guid; +extern EFI_GUID gEfiFirmwareVolumeTopFileGuid; #endif diff --git a/MdePkg/Include/Guid/FirmwareFileSystem3.h b/MdePkg/Include/Guid/FirmwareFileSystem3.h index af8d20a..23e58fc 100644 --- a/MdePkg/Include/Guid/FirmwareFileSystem3.h +++ b/MdePkg/Include/Guid/FirmwareFileSystem3.h @@ -19,6 +19,6 @@ #define EFI_FIRMWARE_FILE_SYSTEM3_GUID \ { 0x5473c07a, 0x3dcb, 0x4dca, { 0xbd, 0x6f, 0x1e, 0x96, 0x89, 0xe7, 0x34, 0x9a }} -extern EFI_GUID gEfiFirmwareFileSystem3Guid; +extern EFI_GUID gEfiFirmwareFileSystem3Guid; #endif // __FIRMWARE_FILE_SYSTEM3_GUID_H__ diff --git a/MdePkg/Include/Guid/FmpCapsule.h b/MdePkg/Include/Guid/FmpCapsule.h index bd5cb77..4d699b4 100644 --- a/MdePkg/Include/Guid/FmpCapsule.h +++ b/MdePkg/Include/Guid/FmpCapsule.h @@ -10,7 +10,6 @@ **/ - #ifndef _FMP_CAPSULE_GUID_H__ #define _FMP_CAPSULE_GUID_H__ @@ -25,19 +24,19 @@ #pragma pack(1) typedef struct { - UINT32 Version; + UINT32 Version; /// /// The number of drivers included in the capsule and the number of corresponding /// offsets stored in ItemOffsetList array. /// - UINT16 EmbeddedDriverCount; + UINT16 EmbeddedDriverCount; /// /// The number of payload items included in the capsule and the number of /// corresponding offsets stored in the ItemOffsetList array. /// - UINT16 PayloadItemCount; + UINT16 PayloadItemCount; /// /// Variable length array of dimension [EmbeddedDriverCount + PayloadItemCount] @@ -47,29 +46,29 @@ typedef struct { } EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER; typedef struct { - UINT32 Version; + UINT32 Version; /// /// Used to identify device firmware targeted by this update. This guid is matched by /// system firmware against ImageTypeId field within a EFI_FIRMWARE_IMAGE_DESCRIPTOR /// - EFI_GUID UpdateImageTypeId; + EFI_GUID UpdateImageTypeId; /// /// Passed as ImageIndex in call to EFI_FIRMWARE_MANAGEMENT_PROTOCOL.SetImage() /// - UINT8 UpdateImageIndex; - UINT8 reserved_bytes[3]; + UINT8 UpdateImageIndex; + UINT8 reserved_bytes[3]; /// /// Size of the binary update image which immediately follows this structure /// - UINT32 UpdateImageSize; + UINT32 UpdateImageSize; /// /// Size of the VendorCode bytes which optionally immediately follow binary update image in the capsule /// - UINT32 UpdateVendorCodeSize; + UINT32 UpdateVendorCodeSize; /// /// The HardwareInstance to target with this update. If value is zero it means match all @@ -78,24 +77,23 @@ typedef struct { /// This header is outside the signed data of the Authentication Info structure and /// therefore can be modified without changing the Auth data. /// - UINT64 UpdateHardwareInstance; + UINT64 UpdateHardwareInstance; /// /// A 64-bit bitmask that determines what sections are added to the payload. /// #define CAPSULE_SUPPORT_AUTHENTICATION 0x0000000000000001 /// #define CAPSULE_SUPPORT_DEPENDENCY 0x0000000000000002 /// - UINT64 ImageCapsuleSupport; + UINT64 ImageCapsuleSupport; } EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER; #pragma pack() +#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER_INIT_VERSION 0x00000001 +#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION 0x00000003 +#define CAPSULE_SUPPORT_AUTHENTICATION 0x0000000000000001 +#define CAPSULE_SUPPORT_DEPENDENCY 0x0000000000000002 -#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER_INIT_VERSION 0x00000001 -#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION 0x00000003 -#define CAPSULE_SUPPORT_AUTHENTICATION 0x0000000000000001 -#define CAPSULE_SUPPORT_DEPENDENCY 0x0000000000000002 - -extern EFI_GUID gEfiFmpCapsuleGuid; +extern EFI_GUID gEfiFmpCapsuleGuid; #endif diff --git a/MdePkg/Include/Guid/GlobalVariable.h b/MdePkg/Include/Guid/GlobalVariable.h index 7abc103..eb2ce6a 100644 --- a/MdePkg/Include/Guid/GlobalVariable.h +++ b/MdePkg/Include/Guid/GlobalVariable.h @@ -16,7 +16,7 @@ 0x8BE4DF61, 0x93CA, 0x11d2, {0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C } \ } -extern EFI_GUID gEfiGlobalVariableGuid; +extern EFI_GUID gEfiGlobalVariableGuid; // // Follow UEFI 2.4 spec: @@ -41,146 +41,146 @@ extern EFI_GUID gEfiGlobalVariableGuid; /// The language codes that the firmware supports. This value is deprecated. /// Its attribute is BS+RT. /// -#define EFI_LANG_CODES_VARIABLE_NAME L"LangCodes" +#define EFI_LANG_CODES_VARIABLE_NAME L"LangCodes" /// /// The language code that the system is configured for. This value is deprecated. /// Its attribute is NV+BS+RT. /// -#define EFI_LANG_VARIABLE_NAME L"Lang" +#define EFI_LANG_VARIABLE_NAME L"Lang" /// /// The firmware's boot managers timeout, in seconds, before initiating the default boot selection. /// Its attribute is NV+BS+RT. /// -#define EFI_TIME_OUT_VARIABLE_NAME L"Timeout" +#define EFI_TIME_OUT_VARIABLE_NAME L"Timeout" /// /// The language codes that the firmware supports. /// Its attribute is BS+RT. /// -#define EFI_PLATFORM_LANG_CODES_VARIABLE_NAME L"PlatformLangCodes" +#define EFI_PLATFORM_LANG_CODES_VARIABLE_NAME L"PlatformLangCodes" /// /// The language code that the system is configured for. /// Its attribute is NV+BS+RT. /// -#define EFI_PLATFORM_LANG_VARIABLE_NAME L"PlatformLang" +#define EFI_PLATFORM_LANG_VARIABLE_NAME L"PlatformLang" /// /// The device path of the default input/output/error output console. /// Its attribute is NV+BS+RT. /// -#define EFI_CON_IN_VARIABLE_NAME L"ConIn" -#define EFI_CON_OUT_VARIABLE_NAME L"ConOut" -#define EFI_ERR_OUT_VARIABLE_NAME L"ErrOut" +#define EFI_CON_IN_VARIABLE_NAME L"ConIn" +#define EFI_CON_OUT_VARIABLE_NAME L"ConOut" +#define EFI_ERR_OUT_VARIABLE_NAME L"ErrOut" /// /// The device path of all possible input/output/error output devices. /// Its attribute is BS+RT. /// -#define EFI_CON_IN_DEV_VARIABLE_NAME L"ConInDev" -#define EFI_CON_OUT_DEV_VARIABLE_NAME L"ConOutDev" -#define EFI_ERR_OUT_DEV_VARIABLE_NAME L"ErrOutDev" +#define EFI_CON_IN_DEV_VARIABLE_NAME L"ConInDev" +#define EFI_CON_OUT_DEV_VARIABLE_NAME L"ConOutDev" +#define EFI_ERR_OUT_DEV_VARIABLE_NAME L"ErrOutDev" /// /// The ordered boot option load list. /// Its attribute is NV+BS+RT. /// -#define EFI_BOOT_ORDER_VARIABLE_NAME L"BootOrder" +#define EFI_BOOT_ORDER_VARIABLE_NAME L"BootOrder" /// /// The boot option for the next boot only. /// Its attribute is NV+BS+RT. /// -#define EFI_BOOT_NEXT_VARIABLE_NAME L"BootNext" +#define EFI_BOOT_NEXT_VARIABLE_NAME L"BootNext" /// /// The boot option that was selected for the current boot. /// Its attribute is BS+RT. /// -#define EFI_BOOT_CURRENT_VARIABLE_NAME L"BootCurrent" +#define EFI_BOOT_CURRENT_VARIABLE_NAME L"BootCurrent" /// /// The types of boot options supported by the boot manager. Should be treated as read-only. /// Its attribute is BS+RT. /// -#define EFI_BOOT_OPTION_SUPPORT_VARIABLE_NAME L"BootOptionSupport" +#define EFI_BOOT_OPTION_SUPPORT_VARIABLE_NAME L"BootOptionSupport" /// /// The ordered driver load option list. /// Its attribute is NV+BS+RT. /// -#define EFI_DRIVER_ORDER_VARIABLE_NAME L"DriverOrder" +#define EFI_DRIVER_ORDER_VARIABLE_NAME L"DriverOrder" /// /// The ordered System Prep Application load option list. /// Its attribute is NV+BS+RT. /// -#define EFI_SYS_PREP_ORDER_VARIABLE_NAME L"SysPrepOrder" +#define EFI_SYS_PREP_ORDER_VARIABLE_NAME L"SysPrepOrder" /// /// Identifies the level of hardware error record persistence /// support implemented by the platform. This variable is /// only modified by firmware and is read-only to the OS. /// Its attribute is NV+BS+RT. /// -#define EFI_HW_ERR_REC_SUPPORT_VARIABLE_NAME L"HwErrRecSupport" +#define EFI_HW_ERR_REC_SUPPORT_VARIABLE_NAME L"HwErrRecSupport" /// /// Whether the system is operating in setup mode (1) or not (0). /// All other values are reserved. Should be treated as read-only. /// Its attribute is BS+RT. /// -#define EFI_SETUP_MODE_NAME L"SetupMode" +#define EFI_SETUP_MODE_NAME L"SetupMode" /// /// The Key Exchange Key Signature Database. /// Its attribute is NV+BS+RT+AT. /// -#define EFI_KEY_EXCHANGE_KEY_NAME L"KEK" +#define EFI_KEY_EXCHANGE_KEY_NAME L"KEK" /// /// The public Platform Key. /// Its attribute is NV+BS+RT+AT. /// -#define EFI_PLATFORM_KEY_NAME L"PK" +#define EFI_PLATFORM_KEY_NAME L"PK" /// /// Array of GUIDs representing the type of signatures supported /// by the platform firmware. Should be treated as read-only. /// Its attribute is BS+RT. /// -#define EFI_SIGNATURE_SUPPORT_NAME L"SignatureSupport" +#define EFI_SIGNATURE_SUPPORT_NAME L"SignatureSupport" /// /// Whether the platform firmware is operating in Secure boot mode (1) or not (0). /// All other values are reserved. Should be treated as read-only. /// Its attribute is BS+RT. /// -#define EFI_SECURE_BOOT_MODE_NAME L"SecureBoot" +#define EFI_SECURE_BOOT_MODE_NAME L"SecureBoot" /// /// The OEM's default Key Exchange Key Signature Database. Should be treated as read-only. /// Its attribute is BS+RT. /// -#define EFI_KEK_DEFAULT_VARIABLE_NAME L"KEKDefault" +#define EFI_KEK_DEFAULT_VARIABLE_NAME L"KEKDefault" /// /// The OEM's default public Platform Key. Should be treated as read-only. /// Its attribute is BS+RT. /// -#define EFI_PK_DEFAULT_VARIABLE_NAME L"PKDefault" +#define EFI_PK_DEFAULT_VARIABLE_NAME L"PKDefault" /// /// The OEM's default secure boot signature store. Should be treated as read-only. /// Its attribute is BS+RT. /// -#define EFI_DB_DEFAULT_VARIABLE_NAME L"dbDefault" +#define EFI_DB_DEFAULT_VARIABLE_NAME L"dbDefault" /// /// The OEM's default secure boot blacklist signature store. Should be treated as read-only. /// Its attribute is BS+RT. /// -#define EFI_DBX_DEFAULT_VARIABLE_NAME L"dbxDefault" +#define EFI_DBX_DEFAULT_VARIABLE_NAME L"dbxDefault" /// /// The OEM's default secure boot timestamp signature store. Should be treated as read-only. /// Its attribute is BS+RT. /// -#define EFI_DBT_DEFAULT_VARIABLE_NAME L"dbtDefault" +#define EFI_DBT_DEFAULT_VARIABLE_NAME L"dbtDefault" /// /// Allows the firmware to indicate supported features and actions to the OS. /// Its attribute is BS+RT. /// -#define EFI_OS_INDICATIONS_SUPPORT_VARIABLE_NAME L"OsIndicationsSupported" +#define EFI_OS_INDICATIONS_SUPPORT_VARIABLE_NAME L"OsIndicationsSupported" /// /// Allows the OS to request the firmware to enable certain features and to take certain actions. /// Its attribute is NV+BS+RT. /// -#define EFI_OS_INDICATIONS_VARIABLE_NAME L"OsIndications" +#define EFI_OS_INDICATIONS_VARIABLE_NAME L"OsIndications" /// /// Whether the system is configured to use only vendor provided /// keys or not. Should be treated as read-only. /// Its attribute is BS+RT. /// -#define EFI_VENDOR_KEYS_VARIABLE_NAME L"VendorKeys" +#define EFI_VENDOR_KEYS_VARIABLE_NAME L"VendorKeys" #endif diff --git a/MdePkg/Include/Guid/Gpt.h b/MdePkg/Include/Guid/Gpt.h index 2e98733..7c03eb3 100644 --- a/MdePkg/Include/Guid/Gpt.h +++ b/MdePkg/Include/Guid/Gpt.h @@ -30,8 +30,8 @@ 0x024dee41, 0x33e7, 0x11d3, {0x9d, 0x69, 0x00, 0x08, 0xc7, 0x81, 0xf3, 0x9f } \ } -extern EFI_GUID gEfiPartTypeUnusedGuid; -extern EFI_GUID gEfiPartTypeSystemPartGuid; -extern EFI_GUID gEfiPartTypeLegacyMbrGuid; +extern EFI_GUID gEfiPartTypeUnusedGuid; +extern EFI_GUID gEfiPartTypeSystemPartGuid; +extern EFI_GUID gEfiPartTypeLegacyMbrGuid; #endif diff --git a/MdePkg/Include/Guid/GraphicsInfoHob.h b/MdePkg/Include/Guid/GraphicsInfoHob.h index ced6b1e..237911e 100644 --- a/MdePkg/Include/Guid/GraphicsInfoHob.h +++ b/MdePkg/Include/Guid/GraphicsInfoHob.h @@ -25,21 +25,21 @@ } typedef struct { - EFI_PHYSICAL_ADDRESS FrameBufferBase; - UINT32 FrameBufferSize; - EFI_GRAPHICS_OUTPUT_MODE_INFORMATION GraphicsMode; + EFI_PHYSICAL_ADDRESS FrameBufferBase; + UINT32 FrameBufferSize; + EFI_GRAPHICS_OUTPUT_MODE_INFORMATION GraphicsMode; } EFI_PEI_GRAPHICS_INFO_HOB; typedef struct { - UINT16 VendorId; ///< Ignore if the value is 0xFFFF. - UINT16 DeviceId; ///< Ignore if the value is 0xFFFF. - UINT16 SubsystemVendorId; ///< Ignore if the value is 0xFFFF. - UINT16 SubsystemId; ///< Ignore if the value is 0xFFFF. - UINT8 RevisionId; ///< Ignore if the value is 0xFF. - UINT8 BarIndex; ///< Ignore if the value is 0xFF. + UINT16 VendorId; ///< Ignore if the value is 0xFFFF. + UINT16 DeviceId; ///< Ignore if the value is 0xFFFF. + UINT16 SubsystemVendorId; ///< Ignore if the value is 0xFFFF. + UINT16 SubsystemId; ///< Ignore if the value is 0xFFFF. + UINT8 RevisionId; ///< Ignore if the value is 0xFF. + UINT8 BarIndex; ///< Ignore if the value is 0xFF. } EFI_PEI_GRAPHICS_DEVICE_INFO_HOB; -extern EFI_GUID gEfiGraphicsInfoHobGuid; -extern EFI_GUID gEfiGraphicsDeviceInfoHobGuid; +extern EFI_GUID gEfiGraphicsInfoHobGuid; +extern EFI_GUID gEfiGraphicsDeviceInfoHobGuid; #endif diff --git a/MdePkg/Include/Guid/HardwareErrorVariable.h b/MdePkg/Include/Guid/HardwareErrorVariable.h index a09cd77..fba941c 100644 --- a/MdePkg/Include/Guid/HardwareErrorVariable.h +++ b/MdePkg/Include/Guid/HardwareErrorVariable.h @@ -17,6 +17,6 @@ 0x414E6BDD, 0xE47B, 0x47cc, {0xB2, 0x44, 0xBB, 0x61, 0x02, 0x0C, 0xF5, 0x16} \ } -extern EFI_GUID gEfiHardwareErrorVariableGuid; +extern EFI_GUID gEfiHardwareErrorVariableGuid; #endif diff --git a/MdePkg/Include/Guid/HiiFormMapMethodGuid.h b/MdePkg/Include/Guid/HiiFormMapMethodGuid.h index 4ff22a8..c2785b2 100644 --- a/MdePkg/Include/Guid/HiiFormMapMethodGuid.h +++ b/MdePkg/Include/Guid/HiiFormMapMethodGuid.h @@ -14,6 +14,6 @@ #define EFI_HII_STANDARD_FORM_GUID \ { 0x3bd2f4ec, 0xe524, 0x46e4, { 0xa9, 0xd8, 0x51, 0x1, 0x17, 0x42, 0x55, 0x62 } } -extern EFI_GUID gEfiHiiStandardFormGuid; +extern EFI_GUID gEfiHiiStandardFormGuid; #endif diff --git a/MdePkg/Include/Guid/HiiKeyBoardLayout.h b/MdePkg/Include/Guid/HiiKeyBoardLayout.h index 541c770..fb5f78d 100644 --- a/MdePkg/Include/Guid/HiiKeyBoardLayout.h +++ b/MdePkg/Include/Guid/HiiKeyBoardLayout.h @@ -16,6 +16,6 @@ #define EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID \ { 0x14982a4f, 0xb0ed, 0x45b8, { 0xa8, 0x11, 0x5a, 0x7a, 0x9b, 0xc2, 0x32, 0xdf }} -extern EFI_GUID gEfiHiiKeyBoardLayoutGuid; +extern EFI_GUID gEfiHiiKeyBoardLayoutGuid; #endif diff --git a/MdePkg/Include/Guid/HiiPlatformSetupFormset.h b/MdePkg/Include/Guid/HiiPlatformSetupFormset.h index db7b80b..ba5e897 100644 --- a/MdePkg/Include/Guid/HiiPlatformSetupFormset.h +++ b/MdePkg/Include/Guid/HiiPlatformSetupFormset.h @@ -25,9 +25,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define EFI_HII_REST_STYLE_FORMSET_GUID \ { 0x790217bd, 0xbecf, 0x485b, { 0x91, 0x70, 0x5f, 0xf7, 0x11, 0x31, 0x8b, 0x27 } } -extern EFI_GUID gEfiHiiPlatformSetupFormsetGuid; -extern EFI_GUID gEfiHiiDriverHealthFormsetGuid; -extern EFI_GUID gEfiHiiUserCredentialFormsetGuid; -extern EFI_GUID gEfiHiiRestStyleFormsetGuid; +extern EFI_GUID gEfiHiiPlatformSetupFormsetGuid; +extern EFI_GUID gEfiHiiDriverHealthFormsetGuid; +extern EFI_GUID gEfiHiiUserCredentialFormsetGuid; +extern EFI_GUID gEfiHiiRestStyleFormsetGuid; #endif diff --git a/MdePkg/Include/Guid/HobList.h b/MdePkg/Include/Guid/HobList.h index 6a54f43..435f010 100644 --- a/MdePkg/Include/Guid/HobList.h +++ b/MdePkg/Include/Guid/HobList.h @@ -19,6 +19,6 @@ 0x7739f24c, 0x93d7, 0x11d4, {0x9a, 0x3a, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ } -extern EFI_GUID gEfiHobListGuid; +extern EFI_GUID gEfiHobListGuid; #endif diff --git a/MdePkg/Include/Guid/ImageAuthentication.h b/MdePkg/Include/Guid/ImageAuthentication.h index 3ee5137..fe83596 100644 --- a/MdePkg/Include/Guid/ImageAuthentication.h +++ b/MdePkg/Include/Guid/ImageAuthentication.h @@ -23,27 +23,27 @@ /// Varialbe name with guid EFI_IMAGE_SECURITY_DATABASE_GUID /// for the authorized signature database. /// -#define EFI_IMAGE_SECURITY_DATABASE L"db" +#define EFI_IMAGE_SECURITY_DATABASE L"db" /// /// Varialbe name with guid EFI_IMAGE_SECURITY_DATABASE_GUID /// for the forbidden signature database. /// -#define EFI_IMAGE_SECURITY_DATABASE1 L"dbx" +#define EFI_IMAGE_SECURITY_DATABASE1 L"dbx" /// /// Variable name with guid EFI_IMAGE_SECURITY_DATABASE_GUID /// for the timestamp signature database. /// -#define EFI_IMAGE_SECURITY_DATABASE2 L"dbt" +#define EFI_IMAGE_SECURITY_DATABASE2 L"dbt" -#define SECURE_BOOT_MODE_ENABLE 1 -#define SECURE_BOOT_MODE_DISABLE 0 +#define SECURE_BOOT_MODE_ENABLE 1 +#define SECURE_BOOT_MODE_DISABLE 0 -#define SETUP_MODE 1 -#define USER_MODE 0 +#define SETUP_MODE 1 +#define USER_MODE 0 -//*********************************************************************** +// *********************************************************************** // Signature Database -//*********************************************************************** +// *********************************************************************** /// /// The format of a signature database. /// @@ -53,30 +53,30 @@ typedef struct { /// /// An identifier which identifies the agent which added the signature to the list. /// - EFI_GUID SignatureOwner; + EFI_GUID SignatureOwner; /// /// The format of the signature is defined by the SignatureType. /// - UINT8 SignatureData[1]; + UINT8 SignatureData[1]; } EFI_SIGNATURE_DATA; typedef struct { /// /// Type of the signature. GUID signature types are defined in below. /// - EFI_GUID SignatureType; + EFI_GUID SignatureType; /// /// Total size of the signature list, including this header. /// - UINT32 SignatureListSize; + UINT32 SignatureListSize; /// /// Size of the signature header which precedes the array of signatures. /// - UINT32 SignatureHeaderSize; + UINT32 SignatureHeaderSize; /// /// Size of each signature. /// - UINT32 SignatureSize; + UINT32 SignatureSize; /// /// Header before the array of signatures. The format of this header is specified /// by the SignatureType. @@ -91,33 +91,33 @@ typedef struct { /// /// The SHA256 hash of an X.509 certificate's To-Be-Signed contents. /// - EFI_SHA256_HASH ToBeSignedHash; + EFI_SHA256_HASH ToBeSignedHash; /// /// The time that the certificate shall be considered to be revoked. /// - EFI_TIME TimeOfRevocation; + EFI_TIME TimeOfRevocation; } EFI_CERT_X509_SHA256; typedef struct { /// /// The SHA384 hash of an X.509 certificate's To-Be-Signed contents. /// - EFI_SHA384_HASH ToBeSignedHash; + EFI_SHA384_HASH ToBeSignedHash; /// /// The time that the certificate shall be considered to be revoked. /// - EFI_TIME TimeOfRevocation; + EFI_TIME TimeOfRevocation; } EFI_CERT_X509_SHA384; typedef struct { /// /// The SHA512 hash of an X.509 certificate's To-Be-Signed contents. /// - EFI_SHA512_HASH ToBeSignedHash; + EFI_SHA512_HASH ToBeSignedHash; /// /// The time that the certificate shall be considered to be revoked. /// - EFI_TIME TimeOfRevocation; + EFI_TIME TimeOfRevocation; } EFI_CERT_X509_SHA512; #pragma pack() @@ -265,9 +265,9 @@ typedef struct { 0x4aafd29d, 0x68df, 0x49ee, {0x8a, 0xa9, 0x34, 0x7d, 0x37, 0x56, 0x65, 0xa7} \ } -//*********************************************************************** +// *********************************************************************** // Image Execution Information Table Definition -//*********************************************************************** +// *********************************************************************** typedef UINT32 EFI_IMAGE_EXECUTION_ACTION; #define EFI_IMAGE_EXECUTION_AUTHENTICATION 0x00000007 @@ -316,31 +316,30 @@ typedef struct { /// } EFI_IMAGE_EXECUTION_INFO; - typedef struct { /// /// Number of EFI_IMAGE_EXECUTION_INFO structures. /// - UINTN NumberOfImages; + UINTN NumberOfImages; /// /// Number of image instances of EFI_IMAGE_EXECUTION_INFO structures. /// // EFI_IMAGE_EXECUTION_INFO InformationInfo[] } EFI_IMAGE_EXECUTION_INFO_TABLE; -extern EFI_GUID gEfiImageSecurityDatabaseGuid; -extern EFI_GUID gEfiCertSha256Guid; -extern EFI_GUID gEfiCertRsa2048Guid; -extern EFI_GUID gEfiCertRsa2048Sha256Guid; -extern EFI_GUID gEfiCertSha1Guid; -extern EFI_GUID gEfiCertRsa2048Sha1Guid; -extern EFI_GUID gEfiCertX509Guid; -extern EFI_GUID gEfiCertSha224Guid; -extern EFI_GUID gEfiCertSha384Guid; -extern EFI_GUID gEfiCertSha512Guid; -extern EFI_GUID gEfiCertX509Sha256Guid; -extern EFI_GUID gEfiCertX509Sha384Guid; -extern EFI_GUID gEfiCertX509Sha512Guid; -extern EFI_GUID gEfiCertPkcs7Guid; +extern EFI_GUID gEfiImageSecurityDatabaseGuid; +extern EFI_GUID gEfiCertSha256Guid; +extern EFI_GUID gEfiCertRsa2048Guid; +extern EFI_GUID gEfiCertRsa2048Sha256Guid; +extern EFI_GUID gEfiCertSha1Guid; +extern EFI_GUID gEfiCertRsa2048Sha1Guid; +extern EFI_GUID gEfiCertX509Guid; +extern EFI_GUID gEfiCertSha224Guid; +extern EFI_GUID gEfiCertSha384Guid; +extern EFI_GUID gEfiCertSha512Guid; +extern EFI_GUID gEfiCertX509Sha256Guid; +extern EFI_GUID gEfiCertX509Sha384Guid; +extern EFI_GUID gEfiCertX509Sha512Guid; +extern EFI_GUID gEfiCertPkcs7Guid; #endif diff --git a/MdePkg/Include/Guid/JsonCapsule.h b/MdePkg/Include/Guid/JsonCapsule.h index b34d6e3..8f93795 100644 --- a/MdePkg/Include/Guid/JsonCapsule.h +++ b/MdePkg/Include/Guid/JsonCapsule.h @@ -31,68 +31,66 @@ SPDX-License-Identifier: BSD-2-Clause-Patent {0x67d6f4cd, 0xd6b8, 0x4573, \ {0xbf, 0x4a, 0xde, 0x5e, 0x25, 0x2d, 0x61, 0xae }} - #pragma pack(1) typedef struct { /// /// Version of the structure, initially 0x00000001. /// - UINT32 Version; + UINT32 Version; /// /// The unique identifier of this capsule. /// - UINT32 CapsuleId; + UINT32 CapsuleId; /// /// The length of the JSON payload immediately following this header, in bytes. /// - UINT32 PayloadLength; + UINT32 PayloadLength; /// /// Variable length buffer containing the JSON payload that should be parsed and applied to the system. The /// definition of the JSON schema used in the payload is beyond the scope of this specification. /// - UINT8 Payload[]; + UINT8 Payload[]; } EFI_JSON_CAPSULE_HEADER; typedef struct { /// /// The length of the following ConfigData, in bytes. /// - UINT32 ConfigDataLength; + UINT32 ConfigDataLength; /// /// Variable length buffer containing the JSON payload that describes one group of configuration data within /// current system. The definition of the JSON schema used in this payload is beyond the scope of this specification. /// - UINT8 ConfigData[]; + UINT8 ConfigData[]; } EFI_JSON_CONFIG_DATA_ITEM; typedef struct { /// /// Version of the structure, initially 0x00000001. /// - UINT32 Version; + UINT32 Version; /// ////The total length of EFI_JSON_CAPSULE_CONFIG_DATA, in bytes. /// - UINT32 TotalLength; + UINT32 TotalLength; /// /// Array of configuration data groups. /// - EFI_JSON_CONFIG_DATA_ITEM ConfigDataList[]; + EFI_JSON_CONFIG_DATA_ITEM ConfigDataList[]; } EFI_JSON_CAPSULE_CONFIG_DATA; #pragma pack() -extern EFI_GUID gEfiJsonConfigDataTableGuid; -extern EFI_GUID gEfiJsonCapsuleDataTableGuid; -extern EFI_GUID gEfiJsonCapsuleResultTableGuid; -extern EFI_GUID gEfiJsonCapsuleIdGuid; - +extern EFI_GUID gEfiJsonConfigDataTableGuid; +extern EFI_GUID gEfiJsonCapsuleDataTableGuid; +extern EFI_GUID gEfiJsonCapsuleResultTableGuid; +extern EFI_GUID gEfiJsonCapsuleIdGuid; #endif diff --git a/MdePkg/Include/Guid/LinuxEfiInitrdMedia.h b/MdePkg/Include/Guid/LinuxEfiInitrdMedia.h index d436a75..e22660e 100644 --- a/MdePkg/Include/Guid/LinuxEfiInitrdMedia.h +++ b/MdePkg/Include/Guid/LinuxEfiInitrdMedia.h @@ -25,6 +25,6 @@ #define LINUX_EFI_INITRD_MEDIA_GUID \ {0x5568e427, 0x68fc, 0x4f3d, {0xac, 0x74, 0xca, 0x55, 0x52, 0x31, 0xcc, 0x68}} -extern EFI_GUID gLinuxEfiInitrdMediaGuid; +extern EFI_GUID gLinuxEfiInitrdMediaGuid; #endif diff --git a/MdePkg/Include/Guid/MdePkgTokenSpace.h b/MdePkg/Include/Guid/MdePkgTokenSpace.h index f9bc776..f741646 100644 --- a/MdePkg/Include/Guid/MdePkgTokenSpace.h +++ b/MdePkg/Include/Guid/MdePkgTokenSpace.h @@ -14,6 +14,6 @@ 0x914AEBE7, 0x4635, 0x459b, { 0xAA, 0x1C, 0x11, 0xE2, 0x19, 0xB0, 0x3A, 0x10 } \ } -extern EFI_GUID gEfiMdePkgTokenSpaceGuid; +extern EFI_GUID gEfiMdePkgTokenSpaceGuid; #endif diff --git a/MdePkg/Include/Guid/MemoryAllocationHob.h b/MdePkg/Include/Guid/MemoryAllocationHob.h index 6fcd910..e4c57bf 100644 --- a/MdePkg/Include/Guid/MemoryAllocationHob.h +++ b/MdePkg/Include/Guid/MemoryAllocationHob.h @@ -21,8 +21,8 @@ #define EFI_HOB_MEMORY_ALLOC_MODULE_GUID \ {0xf8e21975, 0x899, 0x4f58, {0xa4, 0xbe, 0x55, 0x25, 0xa9, 0xc6, 0xd7, 0x7a} } -extern EFI_GUID gEfiHobMemoryAllocBspStoreGuid; -extern EFI_GUID gEfiHobMemoryAllocStackGuid; -extern EFI_GUID gEfiHobMemoryAllocModuleGuid; +extern EFI_GUID gEfiHobMemoryAllocBspStoreGuid; +extern EFI_GUID gEfiHobMemoryAllocStackGuid; +extern EFI_GUID gEfiHobMemoryAllocModuleGuid; #endif diff --git a/MdePkg/Include/Guid/MemoryAttributesTable.h b/MdePkg/Include/Guid/MemoryAttributesTable.h index cd8bfaf..82f83a6 100644 --- a/MdePkg/Include/Guid/MemoryAttributesTable.h +++ b/MdePkg/Include/Guid/MemoryAttributesTable.h @@ -9,20 +9,20 @@ #ifndef __UEFI_MEMORY_ATTRIBUTES_TABLE_H__ #define __UEFI_MEMORY_ATTRIBUTES_TABLE_H__ -#define EFI_MEMORY_ATTRIBUTES_TABLE_GUID {\ +#define EFI_MEMORY_ATTRIBUTES_TABLE_GUID {\ 0xdcfa911d, 0x26eb, 0x469f, {0xa2, 0x20, 0x38, 0xb7, 0xdc, 0x46, 0x12, 0x20} \ } typedef struct { - UINT32 Version; - UINT32 NumberOfEntries; - UINT32 DescriptorSize; - UINT32 Reserved; -//EFI_MEMORY_DESCRIPTOR Entry[1]; + UINT32 Version; + UINT32 NumberOfEntries; + UINT32 DescriptorSize; + UINT32 Reserved; + // EFI_MEMORY_DESCRIPTOR Entry[1]; } EFI_MEMORY_ATTRIBUTES_TABLE; #define EFI_MEMORY_ATTRIBUTES_TABLE_VERSION 0x00000001 -extern EFI_GUID gEfiMemoryAttributesTableGuid; +extern EFI_GUID gEfiMemoryAttributesTableGuid; #endif diff --git a/MdePkg/Include/Guid/MemoryOverwriteControl.h b/MdePkg/Include/Guid/MemoryOverwriteControl.h index 2aae90c..d61750c 100644 --- a/MdePkg/Include/Guid/MemoryOverwriteControl.h +++ b/MdePkg/Include/Guid/MemoryOverwriteControl.h @@ -27,25 +27,25 @@ /// EFI_VARIABLE_BOOTSERVICE_ACCESS | /// EFI_VARIABLE_RUNTIME_ACCESS /// -#define MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME L"MemoryOverwriteRequestControl" +#define MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME L"MemoryOverwriteRequestControl" /// /// 0 = Firmware MUST clear the MOR bit /// 1 = Firmware MUST set the MOR bit /// -#define MOR_CLEAR_MEMORY_BIT_MASK 0x01 +#define MOR_CLEAR_MEMORY_BIT_MASK 0x01 /// /// 0 = Firmware MAY autodetect a clean shutdown of the Static RTM OS. /// 1 = Firmware MUST NOT autodetect a clean shutdown of the Static RTM OS. /// -#define MOR_DISABLEAUTODETECT_BIT_MASK 0x10 +#define MOR_DISABLEAUTODETECT_BIT_MASK 0x10 /// /// MOR field bit offset /// -#define MOR_CLEAR_MEMORY_BIT_OFFSET 0 -#define MOR_DISABLEAUTODETECT_BIT_OFFSET 4 +#define MOR_CLEAR_MEMORY_BIT_OFFSET 0 +#define MOR_DISABLEAUTODETECT_BIT_OFFSET 4 /** Return the ClearMemory bit value 0 or 1. @@ -54,7 +54,7 @@ @return ClearMemory bit value **/ -#define MOR_CLEAR_MEMORY_VALUE(mor) (((UINT8)(mor) & MOR_CLEAR_MEMORY_BIT_MASK) >> MOR_CLEAR_MEMORY_BIT_OFFSET) +#define MOR_CLEAR_MEMORY_VALUE(mor) (((UINT8)(mor) & MOR_CLEAR_MEMORY_BIT_MASK) >> MOR_CLEAR_MEMORY_BIT_OFFSET) /** Return the DisableAutoDetect bit value 0 or 1. @@ -63,8 +63,8 @@ @return DisableAutoDetect bit value **/ -#define MOR_DISABLE_AUTO_DETECT_VALUE(mor) (((UINT8)(mor) & MOR_DISABLEAUTODETECT_BIT_MASK) >> MOR_DISABLEAUTODETECT_BIT_OFFSET) +#define MOR_DISABLE_AUTO_DETECT_VALUE(mor) (((UINT8)(mor) & MOR_DISABLEAUTODETECT_BIT_MASK) >> MOR_DISABLEAUTODETECT_BIT_OFFSET) -extern EFI_GUID gEfiMemoryOverwriteControlDataGuid; +extern EFI_GUID gEfiMemoryOverwriteControlDataGuid; #endif diff --git a/MdePkg/Include/Guid/Mps.h b/MdePkg/Include/Guid/Mps.h index 654d440..0edcdbf 100644 --- a/MdePkg/Include/Guid/Mps.h +++ b/MdePkg/Include/Guid/Mps.h @@ -22,8 +22,8 @@ // // GUID name defined in spec. // -#define MPS_TABLE_GUID EFI_MPS_TABLE_GUID +#define MPS_TABLE_GUID EFI_MPS_TABLE_GUID -extern EFI_GUID gEfiMpsTableGuid; +extern EFI_GUID gEfiMpsTableGuid; #endif diff --git a/MdePkg/Include/Guid/PcAnsi.h b/MdePkg/Include/Guid/PcAnsi.h index fd1f055..292bbec 100644 --- a/MdePkg/Include/Guid/PcAnsi.h +++ b/MdePkg/Include/Guid/PcAnsi.h @@ -42,11 +42,11 @@ 0xd487ddb4, 0x008b, 0x11d9, {0xaf, 0xdc, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d } \ } -extern EFI_GUID gEfiPcAnsiGuid; -extern EFI_GUID gEfiVT100Guid; -extern EFI_GUID gEfiVT100PlusGuid; -extern EFI_GUID gEfiVTUTF8Guid; -extern EFI_GUID gEfiUartDevicePathGuid; -extern EFI_GUID gEfiSasDevicePathGuid; +extern EFI_GUID gEfiPcAnsiGuid; +extern EFI_GUID gEfiVT100Guid; +extern EFI_GUID gEfiVT100PlusGuid; +extern EFI_GUID gEfiVTUTF8Guid; +extern EFI_GUID gEfiUartDevicePathGuid; +extern EFI_GUID gEfiSasDevicePathGuid; #endif diff --git a/MdePkg/Include/Guid/RtPropertiesTable.h b/MdePkg/Include/Guid/RtPropertiesTable.h index 6b6a1a1..c93f946 100644 --- a/MdePkg/Include/Guid/RtPropertiesTable.h +++ b/MdePkg/Include/Guid/RtPropertiesTable.h @@ -22,32 +22,29 @@ SPDX-License-Identifier: BSD-2-Clause-Patent { 0xeb66918a, 0x7eef, 0x402a, \ { 0x84, 0x2e, 0x93, 0x1d, 0x21, 0xc3, 0x8a, 0xe9 }} - - - #pragma pack(1) typedef struct { /// /// Version of the structure, must be 0x1. /// - UINT16 Version; + UINT16 Version; /// /// Size in bytes of the entire EFI_RT_PROPERTIES_TABLE, must be 8. /// - UINT16 Length; + UINT16 Length; /// /// Bitmask of which calls are or are not supported, where a bit set to 1 indicates /// that the call is supported, and 0 indicates that it is not. /// - UINT32 RuntimeServicesSupported; + UINT32 RuntimeServicesSupported; } EFI_RT_PROPERTIES_TABLE; #pragma pack() -#define EFI_RT_PROPERTIES_TABLE_VERSION 0x1 +#define EFI_RT_PROPERTIES_TABLE_VERSION 0x1 #define EFI_RT_SUPPORTED_GET_TIME 0x0001 #define EFI_RT_SUPPORTED_SET_TIME 0x0002 @@ -64,6 +61,6 @@ typedef struct { #define EFI_RT_SUPPORTED_QUERY_CAPSULE_CAPABILITIES 0x1000 #define EFI_RT_SUPPORTED_QUERY_VARIABLE_INFO 0x2000 -extern EFI_GUID gEfiRtPropertiesTableGuid; +extern EFI_GUID gEfiRtPropertiesTableGuid; #endif diff --git a/MdePkg/Include/Guid/SmBios.h b/MdePkg/Include/Guid/SmBios.h index dc25938..c9cbe8d 100644 --- a/MdePkg/Include/Guid/SmBios.h +++ b/MdePkg/Include/Guid/SmBios.h @@ -26,7 +26,7 @@ 0xf2fd1544, 0x9794, 0x4a2c, {0x99, 0x2e, 0xe5, 0xbb, 0xcf, 0x20, 0xe3, 0x94 } \ } -extern EFI_GUID gEfiSmbiosTableGuid; -extern EFI_GUID gEfiSmbios3TableGuid; +extern EFI_GUID gEfiSmbiosTableGuid; +extern EFI_GUID gEfiSmbios3TableGuid; #endif diff --git a/MdePkg/Include/Guid/SmramMemoryReserve.h b/MdePkg/Include/Guid/SmramMemoryReserve.h index 47320f3..37d55c6 100644 --- a/MdePkg/Include/Guid/SmramMemoryReserve.h +++ b/MdePkg/Include/Guid/SmramMemoryReserve.h @@ -31,15 +31,14 @@ typedef struct { /// Designates the number of possible regions in the system /// that can be usable for SMRAM. /// - UINT32 NumberOfSmmReservedRegions; + UINT32 NumberOfSmmReservedRegions; /// /// Used throughout this protocol to describe the candidate /// regions for SMRAM that are supported by this platform. /// - EFI_SMRAM_DESCRIPTOR Descriptor[1]; + EFI_SMRAM_DESCRIPTOR Descriptor[1]; } EFI_SMRAM_HOB_DESCRIPTOR_BLOCK; -extern EFI_GUID gEfiSmmSmramMemoryGuid; +extern EFI_GUID gEfiSmmSmramMemoryGuid; #endif - diff --git a/MdePkg/Include/Guid/StatusCodeDataTypeId.h b/MdePkg/Include/Guid/StatusCodeDataTypeId.h index a84177b..09c4664 100644 --- a/MdePkg/Include/Guid/StatusCodeDataTypeId.h +++ b/MdePkg/Include/Guid/StatusCodeDataTypeId.h @@ -47,27 +47,27 @@ typedef struct { /// not be the same for different boots. Type EFI_HII_HANDLE is defined in /// EFI_HII_DATABASE_PROTOCOL.NewPackageList() in the UEFI Specification. /// - EFI_HII_HANDLE Handle; + EFI_HII_HANDLE Handle; /// /// When combined with Handle, the string token can be used to retrieve the string. /// Type EFI_STRING_ID is defined in EFI_IFR_OP_HEADER in the UEFI Specification. /// - EFI_STRING_ID Token; + EFI_STRING_ID Token; } EFI_STATUS_CODE_STRING_TOKEN; typedef union { /// /// ASCII formatted string. /// - CHAR8 *Ascii; + CHAR8 *Ascii; /// /// Unicode formatted string. /// - CHAR16 *Unicode; + CHAR16 *Unicode; /// /// HII handle/token pair. /// - EFI_STATUS_CODE_STRING_TOKEN Hii; + EFI_STATUS_CODE_STRING_TOKEN Hii; } EFI_STATUS_CODE_STRING; /// @@ -84,19 +84,19 @@ typedef struct { /// DataHeader.Type should be /// EFI_STATUS_CODE_DATA_TYPE_STRING_GUID. /// - EFI_STATUS_CODE_DATA DataHeader; + EFI_STATUS_CODE_DATA DataHeader; /// /// Specifies the format of the data in String. /// - EFI_STRING_TYPE StringType; + EFI_STRING_TYPE StringType; /// /// A pointer to the extended data. The data follows the format specified by /// StringType. /// - EFI_STATUS_CODE_STRING String; + EFI_STATUS_CODE_STRING String; } EFI_STATUS_CODE_STRING_DATA; -extern EFI_GUID gEfiStatusCodeDataTypeStringGuid; +extern EFI_GUID gEfiStatusCodeDataTypeStringGuid; /// /// Global ID for the following structures: @@ -141,7 +141,7 @@ typedef struct { /// device that does not have a device path. DataHeader.Type should be /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. /// - EFI_STATUS_CODE_DATA DataHeader; + EFI_STATUS_CODE_DATA DataHeader; /// /// The device path to the controller or the hardware device. Note that this parameter is a /// variable-length device path structure and not a pointer to such a structure. This structure is @@ -168,11 +168,11 @@ typedef struct { /// sizeof (EFI_DEVICE_HANDLE_EXTENDED_DATA) - HeaderSize, and /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. /// - EFI_STATUS_CODE_DATA DataHeader; + EFI_STATUS_CODE_DATA DataHeader; /// /// The device handle. /// - EFI_HANDLE Handle; + EFI_HANDLE Handle; } EFI_DEVICE_HANDLE_EXTENDED_DATA; /// @@ -196,27 +196,27 @@ typedef struct { /// sizeof(UINT32) + 3 * sizeof (UINT16) ), and DataHeader.Type /// should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. /// - EFI_STATUS_CODE_DATA DataHeader; + EFI_STATUS_CODE_DATA DataHeader; /// /// The PCI BAR. Applicable only for PCI devices. Ignored for all other devices. /// - UINT32 Bar; + UINT32 Bar; /// /// DevicePathSize should be zero if it is a virtual device that is not associated with /// a device path. Otherwise, this parameter is the length of the variable-length /// DevicePath. /// - UINT16 DevicePathSize; + UINT16 DevicePathSize; /// /// Represents the size the ReqRes parameter. ReqResSize should be zero if the /// requested resources are not provided as a part of extended data. /// - UINT16 ReqResSize; + UINT16 ReqResSize; /// /// Represents the size the AllocRes parameter. AllocResSize should be zero if the /// allocated resources are not provided as a part of extended data. /// - UINT16 AllocResSize; + UINT16 AllocResSize; /// /// The device path to the controller or the hardware device that did not get the requested /// resources. Note that this parameter is the variable-length device path structure and not @@ -246,11 +246,11 @@ typedef struct { /// /// The INT16 number by which to multiply the base-2 representation. /// - INT16 Value; + INT16 Value; /// /// The INT16 number by which to raise the base-2 calculation. /// - INT16 Exponent; + INT16 Exponent; } EFI_EXP_BASE10_DATA; /// @@ -268,15 +268,15 @@ typedef struct { /// HeaderSize, and DataHeader.Type should be /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. /// - EFI_STATUS_CODE_DATA DataHeader; + EFI_STATUS_CODE_DATA DataHeader; /// /// The voltage value at the time of the error. /// - EFI_EXP_BASE10_DATA Voltage; + EFI_EXP_BASE10_DATA Voltage; /// /// The voltage threshold. /// - EFI_EXP_BASE10_DATA Threshold; + EFI_EXP_BASE10_DATA Threshold; } EFI_COMPUTING_UNIT_VOLTAGE_ERROR_DATA; /// @@ -290,11 +290,11 @@ typedef struct { /// HeaderSize, and DataHeader.Type should be /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. /// - EFI_STATUS_CODE_DATA DataHeader; + EFI_STATUS_CODE_DATA DataHeader; /// /// The version of the microcode update from the header. /// - UINT32 Version; + UINT32 Version; } EFI_COMPUTING_UNIT_MICROCODE_UPDATE_ERROR_DATA; /// @@ -309,11 +309,11 @@ typedef struct { /// HeaderSize, and DataHeader.Type should be /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. /// - EFI_STATUS_CODE_DATA DataHeader; + EFI_STATUS_CODE_DATA DataHeader; /// /// The number of seconds that the computing unit timer was configured to expire. /// - EFI_EXP_BASE10_DATA TimerLimit; + EFI_EXP_BASE10_DATA TimerLimit; } EFI_COMPUTING_UNIT_TIMER_EXPIRED_ERROR_DATA; /// @@ -351,15 +351,15 @@ typedef struct { /// HeaderSize , and DataHeader.Type should be /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. /// - EFI_STATUS_CODE_DATA DataHeader; + EFI_STATUS_CODE_DATA DataHeader; /// /// The unit number of the computing unit that does not match. /// - UINT32 Instance; + UINT32 Instance; /// /// The attributes describing the failure. /// - UINT16 Attributes; + UINT16 Attributes; } EFI_HOST_PROCESSOR_MISMATCH_ERROR_DATA; /// @@ -376,15 +376,15 @@ typedef struct { /// HeaderSize , and DataHeader.Type should be /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. /// - EFI_STATUS_CODE_DATA DataHeader; + EFI_STATUS_CODE_DATA DataHeader; /// /// The thermal value at the time of the error. /// - EFI_EXP_BASE10_DATA Temperature; + EFI_EXP_BASE10_DATA Temperature; /// /// The thermal threshold. /// - EFI_EXP_BASE10_DATA Threshold; + EFI_EXP_BASE10_DATA Threshold; } EFI_COMPUTING_UNIT_THERMAL_ERROR_DATA; /// @@ -407,36 +407,36 @@ typedef struct { /// sizeof (EFI_CACHE_INIT_DATA) - HeaderSize , and /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. /// - EFI_STATUS_CODE_DATA DataHeader; + EFI_STATUS_CODE_DATA DataHeader; /// /// The cache level. Starts with 1 for level 1 cache. /// - UINT32 Level; + UINT32 Level; /// /// The type of cache. /// - EFI_INIT_CACHE_TYPE Type; + EFI_INIT_CACHE_TYPE Type; } EFI_CACHE_INIT_DATA; /// /// /// -typedef UINT32 EFI_CPU_STATE_CHANGE_CAUSE; +typedef UINT32 EFI_CPU_STATE_CHANGE_CAUSE; /// /// The reasons that the processor is disabled. /// Used to fill in EFI_COMPUTING_UNIT_CPU_DISABLED_ERROR_DATA.Cause. /// ///@{ -#define EFI_CPU_CAUSE_INTERNAL_ERROR 0x0001 -#define EFI_CPU_CAUSE_THERMAL_ERROR 0x0002 -#define EFI_CPU_CAUSE_SELFTEST_FAILURE 0x0004 -#define EFI_CPU_CAUSE_PREBOOT_TIMEOUT 0x0008 -#define EFI_CPU_CAUSE_FAILED_TO_START 0x0010 -#define EFI_CPU_CAUSE_CONFIG_ERROR 0x0020 -#define EFI_CPU_CAUSE_USER_SELECTION 0x0080 -#define EFI_CPU_CAUSE_BY_ASSOCIATION 0x0100 -#define EFI_CPU_CAUSE_UNSPECIFIED 0x8000 +#define EFI_CPU_CAUSE_INTERNAL_ERROR 0x0001 +#define EFI_CPU_CAUSE_THERMAL_ERROR 0x0002 +#define EFI_CPU_CAUSE_SELFTEST_FAILURE 0x0004 +#define EFI_CPU_CAUSE_PREBOOT_TIMEOUT 0x0008 +#define EFI_CPU_CAUSE_FAILED_TO_START 0x0010 +#define EFI_CPU_CAUSE_CONFIG_ERROR 0x0020 +#define EFI_CPU_CAUSE_USER_SELECTION 0x0080 +#define EFI_CPU_CAUSE_BY_ASSOCIATION 0x0100 +#define EFI_CPU_CAUSE_UNSPECIFIED 0x8000 ///@} /// @@ -454,17 +454,17 @@ typedef struct { /// HeaderSize, and DataHeader.Type should be /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. /// - EFI_STATUS_CODE_DATA DataHeader; + EFI_STATUS_CODE_DATA DataHeader; /// /// The reason for disabling the processor. /// - UINT32 Cause; + UINT32 Cause; /// /// TRUE if the processor is disabled via software means such as not listing it in the ACPI tables. /// Such a processor will respond to Interprocessor Interrupts (IPIs). FALSE if the processor is hardware /// disabled, which means it is invisible to software and will not respond to IPIs. /// - BOOLEAN SoftwareDisabled; + BOOLEAN SoftwareDisabled; } EFI_COMPUTING_UNIT_CPU_DISABLED_ERROR_DATA; /// @@ -491,11 +491,11 @@ typedef UINT8 EFI_MEMORY_ERROR_OPERATION; /// Memory Error Operations. Used to fill in EFI_MEMORY_EXTENDED_ERROR_DATA.Operation. /// ///@{ -#define EFI_MEMORY_OPERATION_OTHER 0x01 -#define EFI_MEMORY_OPERATION_UNKNOWN 0x02 -#define EFI_MEMORY_OPERATION_READ 0x03 -#define EFI_MEMORY_OPERATION_WRITE 0x04 -#define EFI_MEMORY_OPERATION_PARTIAL_WRITE 0x05 +#define EFI_MEMORY_OPERATION_OTHER 0x01 +#define EFI_MEMORY_OPERATION_UNKNOWN 0x02 +#define EFI_MEMORY_OPERATION_READ 0x03 +#define EFI_MEMORY_OPERATION_WRITE 0x04 +#define EFI_MEMORY_OPERATION_PARTIAL_WRITE 0x05 ///@} /// @@ -510,55 +510,55 @@ typedef struct { /// sizeof (EFI_MEMORY_EXTENDED_ERROR_DATA) - HeaderSize, and /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. /// - EFI_STATUS_CODE_DATA DataHeader; + EFI_STATUS_CODE_DATA DataHeader; /// /// The error granularity type. /// - EFI_MEMORY_ERROR_GRANULARITY Granularity; + EFI_MEMORY_ERROR_GRANULARITY Granularity; /// /// The operation that resulted in the error being detected. /// - EFI_MEMORY_ERROR_OPERATION Operation; + EFI_MEMORY_ERROR_OPERATION Operation; /// /// The error syndrome, vendor-specific ECC syndrome, or CRC data associated with /// the error. If unknown, should be initialized to 0. /// Inconsistent with specification here: /// This field in StatusCodes spec0.9 is defined as UINT32, keep code unchanged. /// - UINTN Syndrome; + UINTN Syndrome; /// /// The physical address of the error. /// - EFI_PHYSICAL_ADDRESS Address; + EFI_PHYSICAL_ADDRESS Address; /// /// The range, in bytes, within which the error address can be determined. /// - UINTN Resolution; + UINTN Resolution; } EFI_MEMORY_EXTENDED_ERROR_DATA; /// /// A definition to describe that the operation is performed on multiple devices within the array. /// May be used for EFI_STATUS_CODE_DIMM_NUMBER.Array and EFI_STATUS_CODE_DIMM_NUMBER.Device. /// -#define EFI_MULTIPLE_MEMORY_DEVICE_OPERATION 0xfffe +#define EFI_MULTIPLE_MEMORY_DEVICE_OPERATION 0xfffe /// /// A definition to describe that the operation is performed on all devices within the array. /// May be used for EFI_STATUS_CODE_DIMM_NUMBER.Array and EFI_STATUS_CODE_DIMM_NUMBER.Device. /// -#define EFI_ALL_MEMORY_DEVICE_OPERATION 0xffff +#define EFI_ALL_MEMORY_DEVICE_OPERATION 0xffff /// /// A definition to describe that the operation is performed on multiple arrays. /// May be used for EFI_STATUS_CODE_DIMM_NUMBER.Array and EFI_STATUS_CODE_DIMM_NUMBER.Device. /// -#define EFI_MULTIPLE_MEMORY_ARRAY_OPERATION 0xfffe +#define EFI_MULTIPLE_MEMORY_ARRAY_OPERATION 0xfffe /// /// A definition to describe that the operation is performed on all the arrays. /// May be used for EFI_STATUS_CODE_DIMM_NUMBER.Array and EFI_STATUS_CODE_DIMM_NUMBER.Device. /// -#define EFI_ALL_MEMORY_ARRAY_OPERATION 0xffff +#define EFI_ALL_MEMORY_ARRAY_OPERATION 0xffff /// /// This extended data provides some context that consumers can use to locate a DIMM within the @@ -575,15 +575,15 @@ typedef struct { /// sizeof (EFI_STATUS_CODE_DIMM_NUMBER) - HeaderSize, and /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. /// - EFI_STATUS_CODE_DATA DataHeader; + EFI_STATUS_CODE_DATA DataHeader; /// /// The memory array number. /// - UINT16 Array; + UINT16 Array; /// /// The device number within that Array. /// - UINT16 Device; + UINT16 Device; } EFI_STATUS_CODE_DIMM_NUMBER; /// @@ -599,11 +599,11 @@ typedef struct { /// HeaderSize, and DataHeader.Type should be /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. /// - EFI_STATUS_CODE_DATA DataHeader; + EFI_STATUS_CODE_DATA DataHeader; /// /// The instance number of the memory module that does not match. /// - EFI_STATUS_CODE_DIMM_NUMBER Instance; + EFI_STATUS_CODE_DIMM_NUMBER Instance; } EFI_MEMORY_MODULE_MISMATCH_ERROR_DATA; /// @@ -619,15 +619,15 @@ typedef struct { /// sizeof (EFI_MEMORY_RANGE_EXTENDED_DATA) - HeaderSize, and /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. /// - EFI_STATUS_CODE_DATA DataHeader; + EFI_STATUS_CODE_DATA DataHeader; /// /// The starting address of the memory range. /// - EFI_PHYSICAL_ADDRESS Start; + EFI_PHYSICAL_ADDRESS Start; /// /// The length in bytes of the memory range. /// - EFI_PHYSICAL_ADDRESS Length; + EFI_PHYSICAL_ADDRESS Length; } EFI_MEMORY_RANGE_EXTENDED_DATA; /// @@ -643,20 +643,20 @@ typedef struct { /// sizeof (EFI_DEBUG_ASSERT_DATA) - HeaderSize , and /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. /// - EFI_STATUS_CODE_DATA DataHeader; + EFI_STATUS_CODE_DATA DataHeader; /// /// The line number of the source file where the fault was generated. /// - UINT32 LineNumber; + UINT32 LineNumber; /// /// The size in bytes of FileName. /// - UINT32 FileNameSize; + UINT32 FileNameSize; /// /// A pointer to a NULL-terminated ASCII or Unicode string that represents /// the file name of the source file where the fault was generated. /// - EFI_STATUS_CODE_STRING_DATA *FileName; + EFI_STATUS_CODE_STRING_DATA *FileName; } EFI_DEBUG_ASSERT_DATA; /// @@ -668,31 +668,31 @@ typedef union { /// EFI_SYSTEM_CONTEXT_EBC is defined in EFI_DEBUG_SUPPORT_PROTOCOL /// in the UEFI Specification. /// - EFI_SYSTEM_CONTEXT_EBC SystemContextEbc; + EFI_SYSTEM_CONTEXT_EBC SystemContextEbc; /// /// The context of the IA-32 processor when the exception was generated. Type /// EFI_SYSTEM_CONTEXT_IA32 is defined in the /// EFI_DEBUG_SUPPORT_PROTOCOL in the UEFI Specification. /// - EFI_SYSTEM_CONTEXT_IA32 SystemContextIa32; + EFI_SYSTEM_CONTEXT_IA32 SystemContextIa32; /// /// The context of the Itanium(R) processor when the exception was generated. Type /// EFI_SYSTEM_CONTEXT_IPF is defined in the /// EFI_DEBUG_SUPPORT_PROTOCOL in the UEFI Specification. /// - EFI_SYSTEM_CONTEXT_IPF SystemContextIpf; + EFI_SYSTEM_CONTEXT_IPF SystemContextIpf; /// /// The context of the X64 processor when the exception was generated. Type /// EFI_SYSTEM_CONTEXT_X64 is defined in the /// EFI_DEBUG_SUPPORT_PROTOCOL in the UEFI Specification. /// - EFI_SYSTEM_CONTEXT_X64 SystemContextX64; + EFI_SYSTEM_CONTEXT_X64 SystemContextX64; /// /// The context of the ARM processor when the exception was generated. Type /// EFI_SYSTEM_CONTEXT_ARM is defined in the /// EFI_DEBUG_SUPPORT_PROTOCOL in the UEFI Specification. /// - EFI_SYSTEM_CONTEXT_ARM SystemContextArm; + EFI_SYSTEM_CONTEXT_ARM SystemContextArm; } EFI_STATUS_CODE_EXCEP_SYSTEM_CONTEXT; /// @@ -710,11 +710,11 @@ typedef struct { /// and DataHeader.Type should be /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. /// - EFI_STATUS_CODE_DATA DataHeader; + EFI_STATUS_CODE_DATA DataHeader; /// /// The system context. /// - EFI_STATUS_CODE_EXCEP_SYSTEM_CONTEXT Context; + EFI_STATUS_CODE_EXCEP_SYSTEM_CONTEXT Context; } EFI_STATUS_CODE_EXCEP_EXTENDED_DATA; /// @@ -731,21 +731,21 @@ typedef struct { /// and DataHeader.Type should be /// EFI_STATUS_CODE_SPECIFIC_DATA_GUID. /// - EFI_STATUS_CODE_DATA DataHeader; + EFI_STATUS_CODE_DATA DataHeader; /// /// The controller handle. /// - EFI_HANDLE ControllerHandle; + EFI_HANDLE ControllerHandle; /// /// The driver binding handle. /// - EFI_HANDLE DriverBindingHandle; + EFI_HANDLE DriverBindingHandle; /// /// The size of the RemainingDevicePath. It is zero if the Start() function is /// called with RemainingDevicePath = NULL. The UEFI Specification allows /// that the Start() function of bus drivers can be called in this way. /// - UINT16 DevicePathSize; + UINT16 DevicePathSize; /// /// Matches the RemainingDevicePath parameter being passed to the Start() function. /// Note that this parameter is the variable-length device path and not a pointer @@ -768,15 +768,15 @@ typedef struct { /// sizeof (EFI_LEGACY_OPROM_EXTENDED_DATA) - HeaderSize, and /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. /// - EFI_STATUS_CODE_DATA DataHeader; + EFI_STATUS_CODE_DATA DataHeader; /// /// The handle corresponding to the device that this legacy option ROM is being invoked. /// - EFI_HANDLE DeviceHandle; + EFI_HANDLE DeviceHandle; /// /// The base address of the shadowed legacy ROM image. May or may not point to the shadow RAM area. /// - EFI_PHYSICAL_ADDRESS RomImageBase; + EFI_PHYSICAL_ADDRESS RomImageBase; } EFI_LEGACY_OPROM_EXTENDED_DATA; /// @@ -790,14 +790,14 @@ typedef struct { /// DataHeader.Size should be sizeof(EFI_RETURN_STATUS_EXTENDED_DATA) - HeaderSize, /// DataHeader.Type should be EFI_STATUS_CODE_SPECIFIC_DATA_GUID. /// - EFI_STATUS_CODE_DATA DataHeader; + EFI_STATUS_CODE_DATA DataHeader; /// /// The EFI_STATUS return value of the service or function whose failure triggered the /// reporting of the status code (generally an error code or a debug code). /// - EFI_STATUS ReturnStatus; + EFI_STATUS ReturnStatus; } EFI_RETURN_STATUS_EXTENDED_DATA; -extern EFI_GUID gEfiStatusCodeSpecificDataGuid; +extern EFI_GUID gEfiStatusCodeSpecificDataGuid; #endif diff --git a/MdePkg/Include/Guid/SystemResourceTable.h b/MdePkg/Include/Guid/SystemResourceTable.h index c330fd8..9b3a2fa 100644 --- a/MdePkg/Include/Guid/SystemResourceTable.h +++ b/MdePkg/Include/Guid/SystemResourceTable.h @@ -10,7 +10,6 @@ **/ - #ifndef _SYSTEM_RESOURCE_TABLE_H__ #define _SYSTEM_RESOURCE_TABLE_H__ @@ -54,8 +53,8 @@ /// When the UEFI Specification is updated, this comment block can be /// removed. /// -#define LAST_ATTEMPT_STATUS_ERROR_UNSUCCESSFUL_VENDOR_RANGE_MIN 0x00001000 -#define LAST_ATTEMPT_STATUS_ERROR_UNSUCCESSFUL_VENDOR_RANGE_MAX 0x00003FFF +#define LAST_ATTEMPT_STATUS_ERROR_UNSUCCESSFUL_VENDOR_RANGE_MIN 0x00001000 +#define LAST_ATTEMPT_STATUS_ERROR_UNSUCCESSFUL_VENDOR_RANGE_MAX 0x00003FFF typedef struct { /// @@ -63,28 +62,28 @@ typedef struct { /// that can be updated via UpdateCapsule(). This GUID must be unique within all /// entries of the ESRT. /// - EFI_GUID FwClass; + EFI_GUID FwClass; /// /// Identifies the type of firmware resource. /// - UINT32 FwType; + UINT32 FwType; /// /// The firmware version field represents the current version of the firmware /// resource, value must always increase as a larger number represents a newer /// version. /// - UINT32 FwVersion; + UINT32 FwVersion; /// /// The lowest firmware resource version to which a firmware resource can be /// rolled back for the given system/device. Generally this is used to protect /// against known and fixed security issues. /// - UINT32 LowestSupportedFwVersion; + UINT32 LowestSupportedFwVersion; /// /// The capsule flags field contains the CapsuleGuid flags (bits 0- 15) as defined /// in the EFI_CAPSULE_HEADER that will be set in the capsule header. /// - UINT32 CapsuleFlags; + UINT32 CapsuleFlags; /// /// The last attempt version field describes the last firmware version for which /// an update was attempted (uses the same format as Firmware Version). @@ -95,7 +94,7 @@ typedef struct { /// in the case of a removable device, this value is set to 0 in cases where the /// device has not been updated since being added to the system. /// - UINT32 LastAttemptVersion; + UINT32 LastAttemptVersion; /// /// The last attempt status field describes the result of the last firmware update /// attempt for the firmware resource entry. @@ -104,30 +103,30 @@ typedef struct { /// If a firmware update has never been attempted or is unknown, for example after /// fresh insertion of a removable device, LastAttemptStatus must be set to Success. /// - UINT32 LastAttemptStatus; + UINT32 LastAttemptStatus; } EFI_SYSTEM_RESOURCE_ENTRY; typedef struct { /// /// The number of firmware resources in the table, must not be zero. /// - UINT32 FwResourceCount; + UINT32 FwResourceCount; /// /// The maximum number of resource array entries that can be within the table /// without reallocating the table, must not be zero. /// - UINT32 FwResourceCountMax; + UINT32 FwResourceCountMax; /// /// The version of the EFI_SYSTEM_RESOURCE_ENTRY entities used in this table. /// This field should be set to 1. /// - UINT64 FwResourceVersion; + UINT64 FwResourceVersion; /// /// Array of EFI_SYSTEM_RESOURCE_ENTRY /// - //EFI_SYSTEM_RESOURCE_ENTRY Entries[]; + // EFI_SYSTEM_RESOURCE_ENTRY Entries[]; } EFI_SYSTEM_RESOURCE_TABLE; -extern EFI_GUID gEfiSystemResourceTableGuid; +extern EFI_GUID gEfiSystemResourceTableGuid; #endif diff --git a/MdePkg/Include/Guid/VectorHandoffTable.h b/MdePkg/Include/Guid/VectorHandoffTable.h index 2a3dccf..ef9841e 100644 --- a/MdePkg/Include/Guid/VectorHandoffTable.h +++ b/MdePkg/Include/Guid/VectorHandoffTable.h @@ -22,6 +22,6 @@ #define EFI_VECTOR_HANDOF_TABLE_GUID \ { 0x996ec11c, 0x5397, 0x4e73, { 0xb5, 0x8f, 0x82, 0x7e, 0x52, 0x90, 0x6d, 0xef }} -extern EFI_GUID gEfiVectorHandoffTableGuid; +extern EFI_GUID gEfiVectorHandoffTableGuid; #endif diff --git a/MdePkg/Include/Guid/WinCertificate.h b/MdePkg/Include/Guid/WinCertificate.h index 79872c0..3b81a8a 100644 --- a/MdePkg/Include/Guid/WinCertificate.h +++ b/MdePkg/Include/Guid/WinCertificate.h @@ -14,9 +14,9 @@ // // _WIN_CERTIFICATE.wCertificateType // -#define WIN_CERT_TYPE_PKCS_SIGNED_DATA 0x0002 -#define WIN_CERT_TYPE_EFI_PKCS115 0x0EF0 -#define WIN_CERT_TYPE_EFI_GUID 0x0EF1 +#define WIN_CERT_TYPE_PKCS_SIGNED_DATA 0x0002 +#define WIN_CERT_TYPE_EFI_PKCS115 0x0EF0 +#define WIN_CERT_TYPE_EFI_GUID 0x0EF1 /// /// The WIN_CERTIFICATE structure is part of the PE/COFF specification. @@ -26,18 +26,18 @@ typedef struct { /// The length of the entire certificate, /// including the length of the header, in bytes. /// - UINT32 dwLength; + UINT32 dwLength; /// /// The revision level of the WIN_CERTIFICATE /// structure. The current revision level is 0x0200. /// - UINT16 wRevision; + UINT16 wRevision; /// /// The certificate type. See WIN_CERT_TYPE_xxx for the UEFI /// certificate types. The UEFI specification reserves the range of /// certificate type values from 0x0EF0 to 0x0EFF. /// - UINT16 wCertificateType; + UINT16 wCertificateType; /// /// The following is the actual certificate. The format of /// the certificate depends on wCertificateType. @@ -56,12 +56,11 @@ typedef struct { /// WIN_CERTIFICATE_UEFI_GUID.CertData /// typedef struct { - EFI_GUID HashType; - UINT8 PublicKey[256]; - UINT8 Signature[256]; + EFI_GUID HashType; + UINT8 PublicKey[256]; + UINT8 Signature[256]; } EFI_CERT_BLOCK_RSA_2048_SHA256; - /// /// Certificate which encapsulates a GUID-specific digital signature /// @@ -70,22 +69,21 @@ typedef struct { /// This is the standard WIN_CERTIFICATE header, where /// wCertificateType is set to WIN_CERT_TYPE_EFI_GUID. /// - WIN_CERTIFICATE Hdr; + WIN_CERTIFICATE Hdr; /// /// This is the unique id which determines the /// format of the CertData. . /// - EFI_GUID CertType; + EFI_GUID CertType; /// /// The following is the certificate data. The format of /// the data is determined by the CertType. /// If CertType is EFI_CERT_TYPE_RSA2048_SHA256_GUID, /// the CertData will be EFI_CERT_BLOCK_RSA_2048_SHA256 structure. /// - UINT8 CertData[1]; + UINT8 CertData[1]; } WIN_CERTIFICATE_UEFI_GUID; - /// /// Certificate which encapsulates the RSASSA_PKCS1-v1_5 digital signature. /// @@ -99,12 +97,12 @@ typedef struct { /// This is the standard WIN_CERTIFICATE header, where /// wCertificateType is set to WIN_CERT_TYPE_UEFI_PKCS1_15. /// - WIN_CERTIFICATE Hdr; + WIN_CERTIFICATE Hdr; /// /// This is the hashing algorithm which was performed on the /// UEFI executable when creating the digital signature. /// - EFI_GUID HashAlgorithm; + EFI_GUID HashAlgorithm; /// /// The following is the actual digital signature. The /// size of the signature is the same size as the key @@ -117,6 +115,6 @@ typedef struct { /// } WIN_CERTIFICATE_EFI_PKCS1_15; -extern EFI_GUID gEfiCertTypeRsa2048Sha256Guid; +extern EFI_GUID gEfiCertTypeRsa2048Sha256Guid; #endif diff --git a/MdePkg/Include/Ia32/ProcessorBind.h b/MdePkg/Include/Ia32/ProcessorBind.h index 9380380..ee39d1c 100644 --- a/MdePkg/Include/Ia32/ProcessorBind.h +++ b/MdePkg/Include/Ia32/ProcessorBind.h @@ -17,39 +17,38 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // // Make sure we are using the correct packing rules per EFI specification // -#if !defined(__GNUC__) -#pragma pack() +#if !defined (__GNUC__) + #pragma pack() #endif -#if defined(__INTEL_COMPILER) +#if defined (__INTEL_COMPILER) // // Disable ICC's remark #869: "Parameter" was never referenced warning. // This is legal ANSI C code so we disable the remark that is turned on with -Wall // -#pragma warning ( disable : 869 ) + #pragma warning ( disable : 869 ) // // Disable ICC's remark #1418: external function definition with no prior declaration. // This is legal ANSI C code so we disable the remark that is turned on with /W4 // -#pragma warning ( disable : 1418 ) + #pragma warning ( disable : 1418 ) // // Disable ICC's remark #1419: external declaration in primary source file // This is legal ANSI C code so we disable the remark that is turned on with /W4 // -#pragma warning ( disable : 1419 ) + #pragma warning ( disable : 1419 ) // // Disable ICC's remark #593: "Variable" was set but never used. // This is legal ANSI C code so we disable the remark that is turned on with /W4 // -#pragma warning ( disable : 593 ) + #pragma warning ( disable : 593 ) #endif - -#if defined(_MSC_EXTENSIONS) +#if defined (_MSC_EXTENSIONS) // // Disable warning that make it impossible to compile at /W4 @@ -59,35 +58,35 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // // Disabling bitfield type checking warnings. // -#pragma warning ( disable : 4214 ) + #pragma warning ( disable : 4214 ) // // Disabling the unreferenced formal parameter warnings. // -#pragma warning ( disable : 4100 ) + #pragma warning ( disable : 4100 ) // // Disable slightly different base types warning as CHAR8 * can not be set // to a constant string. // -#pragma warning ( disable : 4057 ) + #pragma warning ( disable : 4057 ) // // ASSERT(FALSE) or while (TRUE) are legal constructs so suppress this warning // -#pragma warning ( disable : 4127 ) + #pragma warning ( disable : 4127 ) // // This warning is caused by functions defined but not used. For precompiled header only. // -#pragma warning ( disable : 4505 ) + #pragma warning ( disable : 4505 ) // // This warning is caused by empty (after preprocessing) source file. For precompiled header only. // -#pragma warning ( disable : 4206 ) + #pragma warning ( disable : 4206 ) -#if defined(_MSC_VER) && _MSC_VER >= 1800 + #if defined (_MSC_VER) && _MSC_VER >= 1800 // // Disable these warnings for VS2013. @@ -97,130 +96,129 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // This warning is for potentially uninitialized local variable, and it may cause false // positive issues in VS2013 and VS2015 build // -#pragma warning ( disable : 4701 ) + #pragma warning ( disable : 4701 ) // // This warning is for potentially uninitialized local pointer variable, and it may cause // false positive issues in VS2013 and VS2015 build // -#pragma warning ( disable : 4703 ) + #pragma warning ( disable : 4703 ) -#endif + #endif #endif +#if defined (_MSC_EXTENSIONS) + +// +// use Microsoft C compiler dependent integer width types +// -#if defined(_MSC_EXTENSIONS) - - // - // use Microsoft C compiler dependent integer width types - // - - /// - /// 8-byte unsigned value. - /// - typedef unsigned __int64 UINT64; - /// - /// 8-byte signed value. - /// - typedef __int64 INT64; - /// - /// 4-byte unsigned value. - /// - typedef unsigned __int32 UINT32; - /// - /// 4-byte signed value. - /// - typedef __int32 INT32; - /// - /// 2-byte unsigned value. - /// - typedef unsigned short UINT16; - /// - /// 2-byte Character. Unless otherwise specified all strings are stored in the - /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards. - /// - typedef unsigned short CHAR16; - /// - /// 2-byte signed value. - /// - typedef short INT16; - /// - /// Logical Boolean. 1-byte value containing 0 for FALSE or a 1 for TRUE. Other - /// values are undefined. - /// - typedef unsigned char BOOLEAN; - /// - /// 1-byte unsigned value. - /// - typedef unsigned char UINT8; - /// - /// 1-byte Character. - /// - typedef char CHAR8; - /// - /// 1-byte signed value. - /// - typedef signed char INT8; +/// +/// 8-byte unsigned value. +/// +typedef unsigned __int64 UINT64; +/// +/// 8-byte signed value. +/// +typedef __int64 INT64; +/// +/// 4-byte unsigned value. +/// +typedef unsigned __int32 UINT32; +/// +/// 4-byte signed value. +/// +typedef __int32 INT32; +/// +/// 2-byte unsigned value. +/// +typedef unsigned short UINT16; +/// +/// 2-byte Character. Unless otherwise specified all strings are stored in the +/// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards. +/// +typedef unsigned short CHAR16; +/// +/// 2-byte signed value. +/// +typedef short INT16; +/// +/// Logical Boolean. 1-byte value containing 0 for FALSE or a 1 for TRUE. Other +/// values are undefined. +/// +typedef unsigned char BOOLEAN; +/// +/// 1-byte unsigned value. +/// +typedef unsigned char UINT8; +/// +/// 1-byte Character. +/// +typedef char CHAR8; +/// +/// 1-byte signed value. +/// +typedef signed char INT8; #else - /// - /// 8-byte unsigned value. - /// - typedef unsigned long long UINT64; - /// - /// 8-byte signed value. - /// - typedef long long INT64; - /// - /// 4-byte unsigned value. - /// - typedef unsigned int UINT32; - /// - /// 4-byte signed value. - /// - typedef int INT32; - /// - /// 2-byte unsigned value. - /// - typedef unsigned short UINT16; - /// - /// 2-byte Character. Unless otherwise specified all strings are stored in the - /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards. - /// - typedef unsigned short CHAR16; - /// - /// 2-byte signed value. - /// - typedef short INT16; - /// - /// Logical Boolean. 1-byte value containing 0 for FALSE or a 1 for TRUE. Other - /// values are undefined. - /// - typedef unsigned char BOOLEAN; - /// - /// 1-byte unsigned value. - /// - typedef unsigned char UINT8; - /// - /// 1-byte Character - /// - typedef char CHAR8; - /// - /// 1-byte signed value - /// - typedef signed char INT8; +/// +/// 8-byte unsigned value. +/// +typedef unsigned long long UINT64; +/// +/// 8-byte signed value. +/// +typedef long long INT64; +/// +/// 4-byte unsigned value. +/// +typedef unsigned int UINT32; +/// +/// 4-byte signed value. +/// +typedef int INT32; +/// +/// 2-byte unsigned value. +/// +typedef unsigned short UINT16; +/// +/// 2-byte Character. Unless otherwise specified all strings are stored in the +/// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards. +/// +typedef unsigned short CHAR16; +/// +/// 2-byte signed value. +/// +typedef short INT16; +/// +/// Logical Boolean. 1-byte value containing 0 for FALSE or a 1 for TRUE. Other +/// values are undefined. +/// +typedef unsigned char BOOLEAN; +/// +/// 1-byte unsigned value. +/// +typedef unsigned char UINT8; +/// +/// 1-byte Character +/// +typedef char CHAR8; +/// +/// 1-byte signed value +/// +typedef signed char INT8; #endif /// /// Unsigned value of native width. (4 bytes on supported 32-bit processor instructions; /// 8 bytes on supported 64-bit processor instructions.) /// -typedef UINT32 UINTN; +typedef UINT32 UINTN; /// /// Signed value of native width. (4 bytes on supported 32-bit processor instructions; /// 8 bytes on supported 64-bit processor instructions.) /// -typedef INT32 INTN; +typedef INT32 INTN; // // Processor specific defines @@ -229,7 +227,7 @@ typedef INT32 INTN; /// /// A value of native width with the highest bit set. /// -#define MAX_BIT 0x80000000 +#define MAX_BIT 0x80000000 /// /// A value of native width with the two highest bits set. /// @@ -238,12 +236,12 @@ typedef INT32 INTN; /// /// Maximum legal IA-32 address. /// -#define MAX_ADDRESS 0xFFFFFFFF +#define MAX_ADDRESS 0xFFFFFFFF /// /// Maximum usable address at boot time /// -#define MAX_ALLOC_ADDRESS MAX_ADDRESS +#define MAX_ALLOC_ADDRESS MAX_ADDRESS /// /// Maximum legal IA-32 INTN and UINTN values. @@ -254,18 +252,18 @@ typedef INT32 INTN; /// /// Minimum legal IA-32 INTN value. /// -#define MIN_INTN (((INTN)-2147483647) - 1) +#define MIN_INTN (((INTN)-2147483647) - 1) /// /// The stack alignment required for IA-32. /// -#define CPU_STACK_ALIGNMENT sizeof(UINTN) +#define CPU_STACK_ALIGNMENT sizeof(UINTN) /// /// Page allocation granularity for IA-32. /// -#define DEFAULT_PAGE_ALLOCATION_GRANULARITY (0x1000) -#define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x1000) +#define DEFAULT_PAGE_ALLOCATION_GRANULARITY (0x1000) +#define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x1000) // // Modifier to ensure that all protocol member functions and EFI intrinsics @@ -273,33 +271,33 @@ typedef INT32 INTN; // EFI intrinsics are required to modify their member functions with EFIAPI. // #ifdef EFIAPI - /// - /// If EFIAPI is already defined, then we use that definition. - /// -#elif defined(_MSC_EXTENSIONS) - /// - /// Microsoft* compiler specific method for EFIAPI calling convention. - /// - #define EFIAPI __cdecl -#elif defined(__GNUC__) || defined(__clang__) - /// - /// GCC specific method for EFIAPI calling convention. - /// - #define EFIAPI __attribute__((cdecl)) +/// +/// If EFIAPI is already defined, then we use that definition. +/// +#elif defined (_MSC_EXTENSIONS) +/// +/// Microsoft* compiler specific method for EFIAPI calling convention. +/// +#define EFIAPI __cdecl +#elif defined (__GNUC__) || defined (__clang__) +/// +/// GCC specific method for EFIAPI calling convention. +/// +#define EFIAPI __attribute__((cdecl)) #else - /// - /// The default for a non Microsoft* or GCC compiler is to assume the EFI ABI - /// is the standard. - /// - #define EFIAPI +/// +/// The default for a non Microsoft* or GCC compiler is to assume the EFI ABI +/// is the standard. +/// +#define EFIAPI #endif -#if defined(__GNUC__) || defined(__clang__) - /// - /// For GNU assembly code, .global or .globl can declare global symbols. - /// Define this macro to unify the usage. - /// - #define ASM_GLOBAL .globl +#if defined (__GNUC__) || defined (__clang__) +/// +/// For GNU assembly code, .global or .globl can declare global symbols. +/// Define this macro to unify the usage. +/// +#define ASM_GLOBAL .globl #endif /** @@ -312,11 +310,10 @@ typedef INT32 INTN; @return The pointer to the first instruction of a function given a function pointer. **/ -#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer) +#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer) #ifndef __USER_LABEL_PREFIX__ -#define __USER_LABEL_PREFIX__ _ +#define __USER_LABEL_PREFIX__ _ #endif #endif - diff --git a/MdePkg/Include/IndustryStandard/Acpi10.h b/MdePkg/Include/IndustryStandard/Acpi10.h index 7ac9b96..9cc02ed 100644 --- a/MdePkg/Include/IndustryStandard/Acpi10.h +++ b/MdePkg/Include/IndustryStandard/Acpi10.h @@ -16,8 +16,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// excluding the RSD PTR structure. /// typedef struct { - UINT32 Signature; - UINT32 Length; + UINT32 Signature; + UINT32 Length; } EFI_ACPI_COMMON_HEADER; #pragma pack(1) @@ -25,84 +25,84 @@ typedef struct { /// The common ACPI description table header. This structure prefaces most ACPI tables. /// typedef struct { - UINT32 Signature; - UINT32 Length; - UINT8 Revision; - UINT8 Checksum; - UINT8 OemId[6]; - UINT64 OemTableId; - UINT32 OemRevision; - UINT32 CreatorId; - UINT32 CreatorRevision; + UINT32 Signature; + UINT32 Length; + UINT8 Revision; + UINT8 Checksum; + UINT8 OemId[6]; + UINT64 OemTableId; + UINT32 OemRevision; + UINT32 CreatorId; + UINT32 CreatorRevision; } EFI_ACPI_DESCRIPTION_HEADER; #pragma pack() // // Define for Descriptor // -#define ACPI_SMALL_ITEM_FLAG 0x00 -#define ACPI_LARGE_ITEM_FLAG 0x01 +#define ACPI_SMALL_ITEM_FLAG 0x00 +#define ACPI_LARGE_ITEM_FLAG 0x01 // // Small Item Descriptor Name // -#define ACPI_SMALL_IRQ_DESCRIPTOR_NAME 0x04 -#define ACPI_SMALL_DMA_DESCRIPTOR_NAME 0x05 -#define ACPI_SMALL_START_DEPENDENT_DESCRIPTOR_NAME 0x06 -#define ACPI_SMALL_END_DEPENDENT_DESCRIPTOR_NAME 0x07 -#define ACPI_SMALL_IO_PORT_DESCRIPTOR_NAME 0x08 -#define ACPI_SMALL_FIXED_IO_PORT_DESCRIPTOR_NAME 0x09 -#define ACPI_SMALL_VENDOR_DEFINED_DESCRIPTOR_NAME 0x0E -#define ACPI_SMALL_END_TAG_DESCRIPTOR_NAME 0x0F +#define ACPI_SMALL_IRQ_DESCRIPTOR_NAME 0x04 +#define ACPI_SMALL_DMA_DESCRIPTOR_NAME 0x05 +#define ACPI_SMALL_START_DEPENDENT_DESCRIPTOR_NAME 0x06 +#define ACPI_SMALL_END_DEPENDENT_DESCRIPTOR_NAME 0x07 +#define ACPI_SMALL_IO_PORT_DESCRIPTOR_NAME 0x08 +#define ACPI_SMALL_FIXED_IO_PORT_DESCRIPTOR_NAME 0x09 +#define ACPI_SMALL_VENDOR_DEFINED_DESCRIPTOR_NAME 0x0E +#define ACPI_SMALL_END_TAG_DESCRIPTOR_NAME 0x0F // // Large Item Descriptor Name // -#define ACPI_LARGE_24_BIT_MEMORY_RANGE_DESCRIPTOR_NAME 0x01 -#define ACPI_LARGE_VENDOR_DEFINED_DESCRIPTOR_NAME 0x04 -#define ACPI_LARGE_32_BIT_MEMORY_RANGE_DESCRIPTOR_NAME 0x05 -#define ACPI_LARGE_32_BIT_FIXED_MEMORY_RANGE_DESCRIPTOR_NAME 0x06 -#define ACPI_LARGE_DWORD_ADDRESS_SPACE_DESCRIPTOR_NAME 0x07 -#define ACPI_LARGE_WORD_ADDRESS_SPACE_DESCRIPTOR_NAME 0x08 -#define ACPI_LARGE_EXTENDED_IRQ_DESCRIPTOR_NAME 0x09 -#define ACPI_LARGE_QWORD_ADDRESS_SPACE_DESCRIPTOR_NAME 0x0A +#define ACPI_LARGE_24_BIT_MEMORY_RANGE_DESCRIPTOR_NAME 0x01 +#define ACPI_LARGE_VENDOR_DEFINED_DESCRIPTOR_NAME 0x04 +#define ACPI_LARGE_32_BIT_MEMORY_RANGE_DESCRIPTOR_NAME 0x05 +#define ACPI_LARGE_32_BIT_FIXED_MEMORY_RANGE_DESCRIPTOR_NAME 0x06 +#define ACPI_LARGE_DWORD_ADDRESS_SPACE_DESCRIPTOR_NAME 0x07 +#define ACPI_LARGE_WORD_ADDRESS_SPACE_DESCRIPTOR_NAME 0x08 +#define ACPI_LARGE_EXTENDED_IRQ_DESCRIPTOR_NAME 0x09 +#define ACPI_LARGE_QWORD_ADDRESS_SPACE_DESCRIPTOR_NAME 0x0A // // Small Item Descriptor Value // -#define ACPI_IRQ_NOFLAG_DESCRIPTOR 0x22 -#define ACPI_IRQ_DESCRIPTOR 0x23 -#define ACPI_DMA_DESCRIPTOR 0x2A -#define ACPI_START_DEPENDENT_DESCRIPTOR 0x30 -#define ACPI_START_DEPENDENT_EX_DESCRIPTOR 0x31 -#define ACPI_END_DEPENDENT_DESCRIPTOR 0x38 -#define ACPI_IO_PORT_DESCRIPTOR 0x47 -#define ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR 0x4B -#define ACPI_END_TAG_DESCRIPTOR 0x79 +#define ACPI_IRQ_NOFLAG_DESCRIPTOR 0x22 +#define ACPI_IRQ_DESCRIPTOR 0x23 +#define ACPI_DMA_DESCRIPTOR 0x2A +#define ACPI_START_DEPENDENT_DESCRIPTOR 0x30 +#define ACPI_START_DEPENDENT_EX_DESCRIPTOR 0x31 +#define ACPI_END_DEPENDENT_DESCRIPTOR 0x38 +#define ACPI_IO_PORT_DESCRIPTOR 0x47 +#define ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR 0x4B +#define ACPI_END_TAG_DESCRIPTOR 0x79 // // Large Item Descriptor Value // -#define ACPI_24_BIT_MEMORY_RANGE_DESCRIPTOR 0x81 -#define ACPI_32_BIT_MEMORY_RANGE_DESCRIPTOR 0x85 -#define ACPI_32_BIT_FIXED_MEMORY_RANGE_DESCRIPTOR 0x86 -#define ACPI_DWORD_ADDRESS_SPACE_DESCRIPTOR 0x87 -#define ACPI_WORD_ADDRESS_SPACE_DESCRIPTOR 0x88 -#define ACPI_EXTENDED_INTERRUPT_DESCRIPTOR 0x89 -#define ACPI_QWORD_ADDRESS_SPACE_DESCRIPTOR 0x8A -#define ACPI_ADDRESS_SPACE_DESCRIPTOR 0x8A +#define ACPI_24_BIT_MEMORY_RANGE_DESCRIPTOR 0x81 +#define ACPI_32_BIT_MEMORY_RANGE_DESCRIPTOR 0x85 +#define ACPI_32_BIT_FIXED_MEMORY_RANGE_DESCRIPTOR 0x86 +#define ACPI_DWORD_ADDRESS_SPACE_DESCRIPTOR 0x87 +#define ACPI_WORD_ADDRESS_SPACE_DESCRIPTOR 0x88 +#define ACPI_EXTENDED_INTERRUPT_DESCRIPTOR 0x89 +#define ACPI_QWORD_ADDRESS_SPACE_DESCRIPTOR 0x8A +#define ACPI_ADDRESS_SPACE_DESCRIPTOR 0x8A // // Resource Type // -#define ACPI_ADDRESS_SPACE_TYPE_MEM 0x00 -#define ACPI_ADDRESS_SPACE_TYPE_IO 0x01 -#define ACPI_ADDRESS_SPACE_TYPE_BUS 0x02 +#define ACPI_ADDRESS_SPACE_TYPE_MEM 0x00 +#define ACPI_ADDRESS_SPACE_TYPE_IO 0x01 +#define ACPI_ADDRESS_SPACE_TYPE_BUS 0x02 /// /// Power Management Timer frequency is fixed at 3.579545MHz. /// -#define ACPI_TIMER_FREQUENCY 3579545 +#define ACPI_TIMER_FREQUENCY 3579545 // // Ensure proper structure formats @@ -114,83 +114,83 @@ typedef struct { /// Address Space Descriptors. /// typedef PACKED struct { - UINT8 Desc; - UINT16 Len; - UINT8 ResType; - UINT8 GenFlag; - UINT8 SpecificFlag; - UINT64 AddrSpaceGranularity; - UINT64 AddrRangeMin; - UINT64 AddrRangeMax; - UINT64 AddrTranslationOffset; - UINT64 AddrLen; + UINT8 Desc; + UINT16 Len; + UINT8 ResType; + UINT8 GenFlag; + UINT8 SpecificFlag; + UINT64 AddrSpaceGranularity; + UINT64 AddrRangeMin; + UINT64 AddrRangeMax; + UINT64 AddrTranslationOffset; + UINT64 AddrLen; } EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR; typedef PACKED union { - UINT8 Byte; + UINT8 Byte; PACKED struct { - UINT8 Length : 3; - UINT8 Name : 4; - UINT8 Type : 1; + UINT8 Length : 3; + UINT8 Name : 4; + UINT8 Type : 1; } Bits; } ACPI_SMALL_RESOURCE_HEADER; typedef PACKED struct { PACKED union { - UINT8 Byte; + UINT8 Byte; PACKED struct { - UINT8 Name : 7; - UINT8 Type : 1; - }Bits; + UINT8 Name : 7; + UINT8 Type : 1; + } Bits; } Header; - UINT16 Length; + UINT16 Length; } ACPI_LARGE_RESOURCE_HEADER; /// /// IRQ Descriptor. /// typedef PACKED struct { - ACPI_SMALL_RESOURCE_HEADER Header; - UINT16 Mask; + ACPI_SMALL_RESOURCE_HEADER Header; + UINT16 Mask; } EFI_ACPI_IRQ_NOFLAG_DESCRIPTOR; /// /// IRQ Descriptor. /// typedef PACKED struct { - ACPI_SMALL_RESOURCE_HEADER Header; - UINT16 Mask; - UINT8 Information; + ACPI_SMALL_RESOURCE_HEADER Header; + UINT16 Mask; + UINT8 Information; } EFI_ACPI_IRQ_DESCRIPTOR; /// /// DMA Descriptor. /// typedef PACKED struct { - ACPI_SMALL_RESOURCE_HEADER Header; - UINT8 ChannelMask; - UINT8 Information; + ACPI_SMALL_RESOURCE_HEADER Header; + UINT8 ChannelMask; + UINT8 Information; } EFI_ACPI_DMA_DESCRIPTOR; /// /// I/O Port Descriptor /// typedef PACKED struct { - ACPI_SMALL_RESOURCE_HEADER Header; - UINT8 Information; - UINT16 BaseAddressMin; - UINT16 BaseAddressMax; - UINT8 Alignment; - UINT8 Length; + ACPI_SMALL_RESOURCE_HEADER Header; + UINT8 Information; + UINT16 BaseAddressMin; + UINT16 BaseAddressMax; + UINT8 Alignment; + UINT8 Length; } EFI_ACPI_IO_PORT_DESCRIPTOR; /// /// Fixed Location I/O Port Descriptor. /// typedef PACKED struct { - ACPI_SMALL_RESOURCE_HEADER Header; - UINT16 BaseAddress; - UINT8 Length; + ACPI_SMALL_RESOURCE_HEADER Header; + UINT16 BaseAddress; + UINT8 Length; } EFI_ACPI_FIXED_LOCATION_IO_PORT_DESCRIPTOR; /// @@ -288,17 +288,17 @@ typedef PACKED struct { /// The End tag identifies an end of resource data. /// typedef struct { - UINT8 Desc; - UINT8 Checksum; + UINT8 Desc; + UINT8 Checksum; } EFI_ACPI_END_TAG_DESCRIPTOR; // // General use definitions // -#define EFI_ACPI_RESERVED_BYTE 0x00 -#define EFI_ACPI_RESERVED_WORD 0x0000 -#define EFI_ACPI_RESERVED_DWORD 0x00000000 -#define EFI_ACPI_RESERVED_QWORD 0x0000000000000000 +#define EFI_ACPI_RESERVED_BYTE 0x00 +#define EFI_ACPI_RESERVED_WORD 0x0000 +#define EFI_ACPI_RESERVED_DWORD 0x00000000 +#define EFI_ACPI_RESERVED_QWORD 0x0000000000000000 // // Resource Type Specific Flags @@ -306,86 +306,86 @@ typedef struct { // // Bit [0] : Write Status, _RW // -#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_WRITE (1 << 0) -#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_ONLY (0 << 0) +#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_WRITE (1 << 0) +#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_READ_ONLY (0 << 0) // // Bit [2:1] : Memory Attributes, _MEM // -#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_NON_CACHEABLE (0 << 1) -#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE (1 << 1) -#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_WRITE_COMBINING (2 << 1) -#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE (3 << 1) +#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_NON_CACHEABLE (0 << 1) +#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE (1 << 1) +#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_WRITE_COMBINING (2 << 1) +#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE (3 << 1) // // Bit [4:3] : Memory Attributes, _MTP // -#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_MEMORY (0 << 3) -#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_RESERVED (1 << 3) -#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_ACPI (2 << 3) -#define EFI_APCI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_NVS (3 << 3) +#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_MEMORY (0 << 3) +#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_RESERVED (1 << 3) +#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_ACPI (2 << 3) +#define EFI_APCI_MEMORY_RESOURCE_SPECIFIC_FLAG_ADDRESS_RANGE_NVS (3 << 3) // // Bit [5] : Memory to I/O Translation, _TTP // -#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_TRANSLATION (1 << 5) -#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_STATIC (0 << 5) +#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_TRANSLATION (1 << 5) +#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_STATIC (0 << 5) // // IRQ Information // Ref ACPI specification 6.4.2.1 // -#define EFI_ACPI_IRQ_SHARABLE_MASK 0x10 -#define EFI_ACPI_IRQ_SHARABLE 0x10 +#define EFI_ACPI_IRQ_SHARABLE_MASK 0x10 +#define EFI_ACPI_IRQ_SHARABLE 0x10 -#define EFI_ACPI_IRQ_POLARITY_MASK 0x08 -#define EFI_ACPI_IRQ_HIGH_TRUE 0x00 -#define EFI_ACPI_IRQ_LOW_FALSE 0x08 +#define EFI_ACPI_IRQ_POLARITY_MASK 0x08 +#define EFI_ACPI_IRQ_HIGH_TRUE 0x00 +#define EFI_ACPI_IRQ_LOW_FALSE 0x08 -#define EFI_ACPI_IRQ_MODE 0x01 -#define EFI_ACPI_IRQ_LEVEL_TRIGGERED 0x00 -#define EFI_ACPI_IRQ_EDGE_TRIGGERED 0x01 +#define EFI_ACPI_IRQ_MODE 0x01 +#define EFI_ACPI_IRQ_LEVEL_TRIGGERED 0x00 +#define EFI_ACPI_IRQ_EDGE_TRIGGERED 0x01 // // DMA Information // Ref ACPI specification 6.4.2.2 // -#define EFI_ACPI_DMA_SPEED_TYPE_MASK 0x60 -#define EFI_ACPI_DMA_SPEED_TYPE_COMPATIBILITY 0x00 -#define EFI_ACPI_DMA_SPEED_TYPE_A 0x20 -#define EFI_ACPI_DMA_SPEED_TYPE_B 0x40 -#define EFI_ACPI_DMA_SPEED_TYPE_F 0x60 +#define EFI_ACPI_DMA_SPEED_TYPE_MASK 0x60 +#define EFI_ACPI_DMA_SPEED_TYPE_COMPATIBILITY 0x00 +#define EFI_ACPI_DMA_SPEED_TYPE_A 0x20 +#define EFI_ACPI_DMA_SPEED_TYPE_B 0x40 +#define EFI_ACPI_DMA_SPEED_TYPE_F 0x60 -#define EFI_ACPI_DMA_BUS_MASTER_MASK 0x04 -#define EFI_ACPI_DMA_BUS_MASTER 0x04 +#define EFI_ACPI_DMA_BUS_MASTER_MASK 0x04 +#define EFI_ACPI_DMA_BUS_MASTER 0x04 -#define EFI_ACPI_DMA_TRANSFER_TYPE_MASK 0x03 -#define EFI_ACPI_DMA_TRANSFER_TYPE_8_BIT 0x00 -#define EFI_ACPI_DMA_TRANSFER_TYPE_8_BIT_AND_16_BIT 0x01 -#define EFI_ACPI_DMA_TRANSFER_TYPE_16_BIT 0x02 +#define EFI_ACPI_DMA_TRANSFER_TYPE_MASK 0x03 +#define EFI_ACPI_DMA_TRANSFER_TYPE_8_BIT 0x00 +#define EFI_ACPI_DMA_TRANSFER_TYPE_8_BIT_AND_16_BIT 0x01 +#define EFI_ACPI_DMA_TRANSFER_TYPE_16_BIT 0x02 // // IO Information // Ref ACPI specification 6.4.2.5 // -#define EFI_ACPI_IO_DECODE_MASK 0x01 -#define EFI_ACPI_IO_DECODE_16_BIT 0x01 -#define EFI_ACPI_IO_DECODE_10_BIT 0x00 +#define EFI_ACPI_IO_DECODE_MASK 0x01 +#define EFI_ACPI_IO_DECODE_16_BIT 0x01 +#define EFI_ACPI_IO_DECODE_10_BIT 0x00 // // Memory Information // Ref ACPI specification 6.4.3.4 // -#define EFI_ACPI_MEMORY_WRITE_STATUS_MASK 0x01 -#define EFI_ACPI_MEMORY_WRITABLE 0x01 -#define EFI_ACPI_MEMORY_NON_WRITABLE 0x00 +#define EFI_ACPI_MEMORY_WRITE_STATUS_MASK 0x01 +#define EFI_ACPI_MEMORY_WRITABLE 0x01 +#define EFI_ACPI_MEMORY_NON_WRITABLE 0x00 // // Interrupt Vector Flags definitions for Extended Interrupt Descriptor // Ref ACPI specification 6.4.3.6 // -#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_PRODUCER_CONSUMER_MASK BIT0 -#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_MODE_MASK BIT1 -#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_POLARITY_MASK BIT2 -#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_SHARABLE_MASK BIT3 -#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_WAKE_CAPABLITY_MASK BIT4 +#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_PRODUCER_CONSUMER_MASK BIT0 +#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_MODE_MASK BIT1 +#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_POLARITY_MASK BIT2 +#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_SHARABLE_MASK BIT3 +#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_WAKE_CAPABLITY_MASK BIT4 // // Ensure proper structure formats @@ -399,11 +399,11 @@ typedef struct { /// Root System Description Pointer Structure. /// typedef struct { - UINT64 Signature; - UINT8 Checksum; - UINT8 OemId[6]; - UINT8 Reserved; - UINT32 RsdtAddress; + UINT64 Signature; + UINT8 Checksum; + UINT8 OemId[6]; + UINT8 Reserved; + UINT32 RsdtAddress; } EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER; // @@ -415,52 +415,52 @@ typedef struct { /// /// RSDT Revision (as defined in ACPI 1.0b specification). /// -#define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 /// /// Fixed ACPI Description Table Structure (FADT). /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 FirmwareCtrl; - UINT32 Dsdt; - UINT8 IntModel; - UINT8 Reserved1; - UINT16 SciInt; - UINT32 SmiCmd; - UINT8 AcpiEnable; - UINT8 AcpiDisable; - UINT8 S4BiosReq; - UINT8 Reserved2; - UINT32 Pm1aEvtBlk; - UINT32 Pm1bEvtBlk; - UINT32 Pm1aCntBlk; - UINT32 Pm1bCntBlk; - UINT32 Pm2CntBlk; - UINT32 PmTmrBlk; - UINT32 Gpe0Blk; - UINT32 Gpe1Blk; - UINT8 Pm1EvtLen; - UINT8 Pm1CntLen; - UINT8 Pm2CntLen; - UINT8 PmTmLen; - UINT8 Gpe0BlkLen; - UINT8 Gpe1BlkLen; - UINT8 Gpe1Base; - UINT8 Reserved3; - UINT16 PLvl2Lat; - UINT16 PLvl3Lat; - UINT16 FlushSize; - UINT16 FlushStride; - UINT8 DutyOffset; - UINT8 DutyWidth; - UINT8 DayAlrm; - UINT8 MonAlrm; - UINT8 Century; - UINT8 Reserved4; - UINT8 Reserved5; - UINT8 Reserved6; - UINT32 Flags; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 FirmwareCtrl; + UINT32 Dsdt; + UINT8 IntModel; + UINT8 Reserved1; + UINT16 SciInt; + UINT32 SmiCmd; + UINT8 AcpiEnable; + UINT8 AcpiDisable; + UINT8 S4BiosReq; + UINT8 Reserved2; + UINT32 Pm1aEvtBlk; + UINT32 Pm1bEvtBlk; + UINT32 Pm1aCntBlk; + UINT32 Pm1bCntBlk; + UINT32 Pm2CntBlk; + UINT32 PmTmrBlk; + UINT32 Gpe0Blk; + UINT32 Gpe1Blk; + UINT8 Pm1EvtLen; + UINT8 Pm1CntLen; + UINT8 Pm2CntLen; + UINT8 PmTmLen; + UINT8 Gpe0BlkLen; + UINT8 Gpe1BlkLen; + UINT8 Gpe1Base; + UINT8 Reserved3; + UINT16 PLvl2Lat; + UINT16 PLvl3Lat; + UINT16 FlushSize; + UINT16 FlushStride; + UINT8 DutyOffset; + UINT8 DutyWidth; + UINT8 DayAlrm; + UINT8 MonAlrm; + UINT8 Century; + UINT8 Reserved4; + UINT8 Reserved5; + UINT8 Reserved6; + UINT32 Flags; } EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE; /// @@ -468,63 +468,63 @@ typedef struct { /// #define EFI_ACPI_1_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x01 -#define EFI_ACPI_1_0_INT_MODE_DUAL_PIC 0 -#define EFI_ACPI_1_0_INT_MODE_MULTIPLE_APIC 1 +#define EFI_ACPI_1_0_INT_MODE_DUAL_PIC 0 +#define EFI_ACPI_1_0_INT_MODE_MULTIPLE_APIC 1 // // Fixed ACPI Description Table Fixed Feature Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_1_0_WBINVD BIT0 -#define EFI_ACPI_1_0_WBINVD_FLUSH BIT1 -#define EFI_ACPI_1_0_PROC_C1 BIT2 -#define EFI_ACPI_1_0_P_LVL2_UP BIT3 -#define EFI_ACPI_1_0_PWR_BUTTON BIT4 -#define EFI_ACPI_1_0_SLP_BUTTON BIT5 -#define EFI_ACPI_1_0_FIX_RTC BIT6 -#define EFI_ACPI_1_0_RTC_S4 BIT7 -#define EFI_ACPI_1_0_TMR_VAL_EXT BIT8 -#define EFI_ACPI_1_0_DCK_CAP BIT9 +#define EFI_ACPI_1_0_WBINVD BIT0 +#define EFI_ACPI_1_0_WBINVD_FLUSH BIT1 +#define EFI_ACPI_1_0_PROC_C1 BIT2 +#define EFI_ACPI_1_0_P_LVL2_UP BIT3 +#define EFI_ACPI_1_0_PWR_BUTTON BIT4 +#define EFI_ACPI_1_0_SLP_BUTTON BIT5 +#define EFI_ACPI_1_0_FIX_RTC BIT6 +#define EFI_ACPI_1_0_RTC_S4 BIT7 +#define EFI_ACPI_1_0_TMR_VAL_EXT BIT8 +#define EFI_ACPI_1_0_DCK_CAP BIT9 /// /// Firmware ACPI Control Structure. /// typedef struct { - UINT32 Signature; - UINT32 Length; - UINT32 HardwareSignature; - UINT32 FirmwareWakingVector; - UINT32 GlobalLock; - UINT32 Flags; - UINT8 Reserved[40]; + UINT32 Signature; + UINT32 Length; + UINT32 HardwareSignature; + UINT32 FirmwareWakingVector; + UINT32 GlobalLock; + UINT32 Flags; + UINT8 Reserved[40]; } EFI_ACPI_1_0_FIRMWARE_ACPI_CONTROL_STRUCTURE; /// /// Firmware Control Structure Feature Flags. /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_1_0_S4BIOS_F BIT0 +#define EFI_ACPI_1_0_S4BIOS_F BIT0 /// /// Multiple APIC Description Table header definition. The rest of the table /// must be defined in a platform-specific manner. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 LocalApicAddress; - UINT32 Flags; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 LocalApicAddress; + UINT32 Flags; } EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER; /// /// MADT Revision (as defined in ACPI 1.0b specification). /// -#define EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_1_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01 /// /// Multiple APIC Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_1_0_PCAT_COMPAT BIT0 +#define EFI_ACPI_1_0_PCAT_COMPAT BIT0 // // Multiple APIC Description Table APIC structure types @@ -545,71 +545,71 @@ typedef struct { /// Processor Local APIC Structure Definition. /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorId; - UINT8 ApicId; - UINT32 Flags; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorId; + UINT8 ApicId; + UINT32 Flags; } EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC_STRUCTURE; /// /// Local APIC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_1_0_LOCAL_APIC_ENABLED BIT0 +#define EFI_ACPI_1_0_LOCAL_APIC_ENABLED BIT0 /// /// IO APIC Structure. /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 IoApicId; - UINT8 Reserved; - UINT32 IoApicAddress; - UINT32 SystemVectorBase; + UINT8 Type; + UINT8 Length; + UINT8 IoApicId; + UINT8 Reserved; + UINT32 IoApicAddress; + UINT32 SystemVectorBase; } EFI_ACPI_1_0_IO_APIC_STRUCTURE; /// /// Interrupt Source Override Structure. /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Bus; - UINT8 Source; - UINT32 GlobalSystemInterruptVector; - UINT16 Flags; + UINT8 Type; + UINT8 Length; + UINT8 Bus; + UINT8 Source; + UINT32 GlobalSystemInterruptVector; + UINT16 Flags; } EFI_ACPI_1_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE; /// /// Non-Maskable Interrupt Source Structure. /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT32 GlobalSystemInterruptVector; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT32 GlobalSystemInterruptVector; } EFI_ACPI_1_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE; /// /// Local APIC NMI Structure. /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorId; - UINT16 Flags; - UINT8 LocalApicInti; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorId; + UINT16 Flags; + UINT8 LocalApicInti; } EFI_ACPI_1_0_LOCAL_APIC_NMI_STRUCTURE; /// /// Smart Battery Description Table (SBST) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 WarningEnergyLevel; - UINT32 LowEnergyLevel; - UINT32 CriticalEnergyLevel; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 WarningEnergyLevel; + UINT32 LowEnergyLevel; + UINT32 CriticalEnergyLevel; } EFI_ACPI_1_0_SMART_BATTERY_DESCRIPTION_TABLE; // diff --git a/MdePkg/Include/IndustryStandard/Acpi20.h b/MdePkg/Include/IndustryStandard/Acpi20.h index b63d494..c41fdb1 100644 --- a/MdePkg/Include/IndustryStandard/Acpi20.h +++ b/MdePkg/Include/IndustryStandard/Acpi20.h @@ -13,9 +13,9 @@ // // Define for Descriptor // -#define ACPI_LARGE_GENERIC_REGISTER_DESCRIPTOR_NAME 0x02 +#define ACPI_LARGE_GENERIC_REGISTER_DESCRIPTOR_NAME 0x02 -#define ACPI_GENERIC_REGISTER_DESCRIPTOR 0x82 +#define ACPI_GENERIC_REGISTER_DESCRIPTOR 0x82 // // Ensure proper structure formats @@ -45,11 +45,11 @@ typedef PACKED struct { /// ACPI 2.0 Generic Address Space definition /// typedef struct { - UINT8 AddressSpaceId; - UINT8 RegisterBitWidth; - UINT8 RegisterBitOffset; - UINT8 Reserved; - UINT64 Address; + UINT8 AddressSpaceId; + UINT8 RegisterBitWidth; + UINT8 RegisterBitOffset; + UINT8 Reserved; + UINT64 Address; } EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE; // @@ -70,29 +70,29 @@ typedef struct { /// Root System Description Pointer Structure /// typedef struct { - UINT64 Signature; - UINT8 Checksum; - UINT8 OemId[6]; - UINT8 Revision; - UINT32 RsdtAddress; - UINT32 Length; - UINT64 XsdtAddress; - UINT8 ExtendedChecksum; - UINT8 Reserved[3]; + UINT64 Signature; + UINT8 Checksum; + UINT8 OemId[6]; + UINT8 Revision; + UINT32 RsdtAddress; + UINT32 Length; + UINT64 XsdtAddress; + UINT8 ExtendedChecksum; + UINT8 Reserved[3]; } EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER; /// /// RSD_PTR Revision (as defined in ACPI 2.0 spec.) /// -#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 +#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 /// /// Common table header, this prefaces all ACPI tables, including FACS, but /// excluding the RSD PTR structure /// typedef struct { - UINT32 Signature; - UINT32 Length; + UINT32 Signature; + UINT32 Length; } EFI_ACPI_2_0_COMMON_HEADER; // @@ -104,7 +104,7 @@ typedef struct { /// /// RSDT Revision (as defined in ACPI 2.0 spec.) /// -#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 // // Extended System Description Table @@ -115,64 +115,64 @@ typedef struct { /// /// XSDT Revision (as defined in ACPI 2.0 spec.) /// -#define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_2_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 /// /// Fixed ACPI Description Table Structure (FADT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 FirmwareCtrl; - UINT32 Dsdt; - UINT8 Reserved0; - UINT8 PreferredPmProfile; - UINT16 SciInt; - UINT32 SmiCmd; - UINT8 AcpiEnable; - UINT8 AcpiDisable; - UINT8 S4BiosReq; - UINT8 PstateCnt; - UINT32 Pm1aEvtBlk; - UINT32 Pm1bEvtBlk; - UINT32 Pm1aCntBlk; - UINT32 Pm1bCntBlk; - UINT32 Pm2CntBlk; - UINT32 PmTmrBlk; - UINT32 Gpe0Blk; - UINT32 Gpe1Blk; - UINT8 Pm1EvtLen; - UINT8 Pm1CntLen; - UINT8 Pm2CntLen; - UINT8 PmTmrLen; - UINT8 Gpe0BlkLen; - UINT8 Gpe1BlkLen; - UINT8 Gpe1Base; - UINT8 CstCnt; - UINT16 PLvl2Lat; - UINT16 PLvl3Lat; - UINT16 FlushSize; - UINT16 FlushStride; - UINT8 DutyOffset; - UINT8 DutyWidth; - UINT8 DayAlrm; - UINT8 MonAlrm; - UINT8 Century; - UINT16 IaPcBootArch; - UINT8 Reserved1; - UINT32 Flags; - EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE ResetReg; - UINT8 ResetValue; - UINT8 Reserved2[3]; - UINT64 XFirmwareCtrl; - UINT64 XDsdt; - EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk; - EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk; - EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk; - EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk; - EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk; - EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk; - EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk; - EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 FirmwareCtrl; + UINT32 Dsdt; + UINT8 Reserved0; + UINT8 PreferredPmProfile; + UINT16 SciInt; + UINT32 SmiCmd; + UINT8 AcpiEnable; + UINT8 AcpiDisable; + UINT8 S4BiosReq; + UINT8 PstateCnt; + UINT32 Pm1aEvtBlk; + UINT32 Pm1bEvtBlk; + UINT32 Pm1aCntBlk; + UINT32 Pm1bCntBlk; + UINT32 Pm2CntBlk; + UINT32 PmTmrBlk; + UINT32 Gpe0Blk; + UINT32 Gpe1Blk; + UINT8 Pm1EvtLen; + UINT8 Pm1CntLen; + UINT8 Pm2CntLen; + UINT8 PmTmrLen; + UINT8 Gpe0BlkLen; + UINT8 Gpe1BlkLen; + UINT8 Gpe1Base; + UINT8 CstCnt; + UINT16 PLvl2Lat; + UINT16 PLvl3Lat; + UINT16 FlushSize; + UINT16 FlushStride; + UINT8 DutyOffset; + UINT8 DutyWidth; + UINT8 DayAlrm; + UINT8 MonAlrm; + UINT8 Century; + UINT16 IaPcBootArch; + UINT8 Reserved1; + UINT32 Flags; + EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE ResetReg; + UINT8 ResetValue; + UINT8 Reserved2[3]; + UINT64 XFirmwareCtrl; + UINT64 XDsdt; + EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk; + EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk; + EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk; + EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk; + EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk; + EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk; + EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk; + EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk; } EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE; /// @@ -183,53 +183,53 @@ typedef struct { // // Fixed ACPI Description Table Preferred Power Management Profile // -#define EFI_ACPI_2_0_PM_PROFILE_UNSPECIFIED 0 -#define EFI_ACPI_2_0_PM_PROFILE_DESKTOP 1 -#define EFI_ACPI_2_0_PM_PROFILE_MOBILE 2 -#define EFI_ACPI_2_0_PM_PROFILE_WORKSTATION 3 -#define EFI_ACPI_2_0_PM_PROFILE_ENTERPRISE_SERVER 4 -#define EFI_ACPI_2_0_PM_PROFILE_SOHO_SERVER 5 -#define EFI_ACPI_2_0_PM_PROFILE_APPLIANCE_PC 6 +#define EFI_ACPI_2_0_PM_PROFILE_UNSPECIFIED 0 +#define EFI_ACPI_2_0_PM_PROFILE_DESKTOP 1 +#define EFI_ACPI_2_0_PM_PROFILE_MOBILE 2 +#define EFI_ACPI_2_0_PM_PROFILE_WORKSTATION 3 +#define EFI_ACPI_2_0_PM_PROFILE_ENTERPRISE_SERVER 4 +#define EFI_ACPI_2_0_PM_PROFILE_SOHO_SERVER 5 +#define EFI_ACPI_2_0_PM_PROFILE_APPLIANCE_PC 6 // // Fixed ACPI Description Table Boot Architecture Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_2_0_LEGACY_DEVICES BIT0 -#define EFI_ACPI_2_0_8042 BIT1 +#define EFI_ACPI_2_0_LEGACY_DEVICES BIT0 +#define EFI_ACPI_2_0_8042 BIT1 // // Fixed ACPI Description Table Fixed Feature Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_2_0_WBINVD BIT0 -#define EFI_ACPI_2_0_WBINVD_FLUSH BIT1 -#define EFI_ACPI_2_0_PROC_C1 BIT2 -#define EFI_ACPI_2_0_P_LVL2_UP BIT3 -#define EFI_ACPI_2_0_PWR_BUTTON BIT4 -#define EFI_ACPI_2_0_SLP_BUTTON BIT5 -#define EFI_ACPI_2_0_FIX_RTC BIT6 -#define EFI_ACPI_2_0_RTC_S4 BIT7 -#define EFI_ACPI_2_0_TMR_VAL_EXT BIT8 -#define EFI_ACPI_2_0_DCK_CAP BIT9 -#define EFI_ACPI_2_0_RESET_REG_SUP BIT10 -#define EFI_ACPI_2_0_SEALED_CASE BIT11 -#define EFI_ACPI_2_0_HEADLESS BIT12 -#define EFI_ACPI_2_0_CPU_SW_SLP BIT13 +#define EFI_ACPI_2_0_WBINVD BIT0 +#define EFI_ACPI_2_0_WBINVD_FLUSH BIT1 +#define EFI_ACPI_2_0_PROC_C1 BIT2 +#define EFI_ACPI_2_0_P_LVL2_UP BIT3 +#define EFI_ACPI_2_0_PWR_BUTTON BIT4 +#define EFI_ACPI_2_0_SLP_BUTTON BIT5 +#define EFI_ACPI_2_0_FIX_RTC BIT6 +#define EFI_ACPI_2_0_RTC_S4 BIT7 +#define EFI_ACPI_2_0_TMR_VAL_EXT BIT8 +#define EFI_ACPI_2_0_DCK_CAP BIT9 +#define EFI_ACPI_2_0_RESET_REG_SUP BIT10 +#define EFI_ACPI_2_0_SEALED_CASE BIT11 +#define EFI_ACPI_2_0_HEADLESS BIT12 +#define EFI_ACPI_2_0_CPU_SW_SLP BIT13 /// /// Firmware ACPI Control Structure /// typedef struct { - UINT32 Signature; - UINT32 Length; - UINT32 HardwareSignature; - UINT32 FirmwareWakingVector; - UINT32 GlobalLock; - UINT32 Flags; - UINT64 XFirmwareWakingVector; - UINT8 Version; - UINT8 Reserved[31]; + UINT32 Signature; + UINT32 Length; + UINT32 HardwareSignature; + UINT32 FirmwareWakingVector; + UINT32 GlobalLock; + UINT32 Flags; + UINT64 XFirmwareWakingVector; + UINT8 Version; + UINT8 Reserved[31]; } EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE; /// @@ -241,28 +241,28 @@ typedef struct { /// Firmware Control Structure Feature Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_2_0_S4BIOS_F BIT0 +#define EFI_ACPI_2_0_S4BIOS_F BIT0 /// /// Multiple APIC Description Table header definition. The rest of the table /// must be defined in a platform specific manner. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 LocalApicAddress; - UINT32 Flags; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 LocalApicAddress; + UINT32 Flags; } EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER; /// /// MADT Revision (as defined in ACPI 2.0 spec.) /// -#define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x01 /// /// Multiple APIC Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_2_0_PCAT_COMPAT BIT0 +#define EFI_ACPI_2_0_PCAT_COMPAT BIT0 // // Multiple APIC Description Table APIC structure types @@ -287,127 +287,127 @@ typedef struct { /// Processor Local APIC Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorId; - UINT8 ApicId; - UINT32 Flags; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorId; + UINT8 ApicId; + UINT32 Flags; } EFI_ACPI_2_0_PROCESSOR_LOCAL_APIC_STRUCTURE; /// /// Local APIC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_2_0_LOCAL_APIC_ENABLED BIT0 +#define EFI_ACPI_2_0_LOCAL_APIC_ENABLED BIT0 /// /// IO APIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 IoApicId; - UINT8 Reserved; - UINT32 IoApicAddress; - UINT32 GlobalSystemInterruptBase; + UINT8 Type; + UINT8 Length; + UINT8 IoApicId; + UINT8 Reserved; + UINT32 IoApicAddress; + UINT32 GlobalSystemInterruptBase; } EFI_ACPI_2_0_IO_APIC_STRUCTURE; /// /// Interrupt Source Override Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Bus; - UINT8 Source; - UINT32 GlobalSystemInterrupt; - UINT16 Flags; + UINT8 Type; + UINT8 Length; + UINT8 Bus; + UINT8 Source; + UINT32 GlobalSystemInterrupt; + UINT16 Flags; } EFI_ACPI_2_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE; /// /// Non-Maskable Interrupt Source Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT32 GlobalSystemInterrupt; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT32 GlobalSystemInterrupt; } EFI_ACPI_2_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE; /// /// Local APIC NMI Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorId; - UINT16 Flags; - UINT8 LocalApicLint; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorId; + UINT16 Flags; + UINT8 LocalApicLint; } EFI_ACPI_2_0_LOCAL_APIC_NMI_STRUCTURE; /// /// Local APIC Address Override Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT64 LocalApicAddress; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT64 LocalApicAddress; } EFI_ACPI_2_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE; /// /// IO SAPIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 IoApicId; - UINT8 Reserved; - UINT32 GlobalSystemInterruptBase; - UINT64 IoSapicAddress; + UINT8 Type; + UINT8 Length; + UINT8 IoApicId; + UINT8 Reserved; + UINT32 GlobalSystemInterruptBase; + UINT64 IoSapicAddress; } EFI_ACPI_2_0_IO_SAPIC_STRUCTURE; /// /// Local SAPIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorId; - UINT8 LocalSapicId; - UINT8 LocalSapicEid; - UINT8 Reserved[3]; - UINT32 Flags; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorId; + UINT8 LocalSapicId; + UINT8 LocalSapicEid; + UINT8 Reserved[3]; + UINT32 Flags; } EFI_ACPI_2_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE; /// /// Platform Interrupt Sources Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT8 InterruptType; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT8 IoSapicVector; - UINT32 GlobalSystemInterrupt; - UINT32 Reserved; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT8 InterruptType; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT8 IoSapicVector; + UINT32 GlobalSystemInterrupt; + UINT32 Reserved; } EFI_ACPI_2_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE; /// /// Smart Battery Description Table (SBST) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 WarningEnergyLevel; - UINT32 LowEnergyLevel; - UINT32 CriticalEnergyLevel; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 WarningEnergyLevel; + UINT32 LowEnergyLevel; + UINT32 CriticalEnergyLevel; } EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE; /// /// SBST Version (as defined in ACPI 2.0 spec.) /// -#define EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_2_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01 /// /// Embedded Controller Boot Resources Table (ECDT) @@ -415,11 +415,11 @@ typedef struct { /// a fully qualified reference to the name space object. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE EcControl; - EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE EcData; - UINT32 Uid; - UINT8 GpeBit; + EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE EcControl; + EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE EcData; + UINT32 Uid; + UINT8 GpeBit; } EFI_ACPI_2_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE; /// diff --git a/MdePkg/Include/IndustryStandard/Acpi30.h b/MdePkg/Include/IndustryStandard/Acpi30.h index 6a7fc39..29f0d55 100644 --- a/MdePkg/Include/IndustryStandard/Acpi30.h +++ b/MdePkg/Include/IndustryStandard/Acpi30.h @@ -13,9 +13,9 @@ // // Define for Descriptor // -#define ACPI_LARGE_EXTENDED_ADDRESS_SPACE_DESCRIPTOR_NAME 0x0B +#define ACPI_LARGE_EXTENDED_ADDRESS_SPACE_DESCRIPTOR_NAME 0x0B -#define ACPI_EXTENDED_ADDRESS_SPACE_DESCRIPTOR 0x8B +#define ACPI_EXTENDED_ADDRESS_SPACE_DESCRIPTOR 0x8B // // Ensure proper structure formats @@ -45,12 +45,12 @@ typedef PACKED struct { // // Memory Type Specific Flags // -#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_UC 0x0000000000000001 -#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WC 0x0000000000000002 -#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WT 0x0000000000000004 -#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WB 0x0000000000000008 -#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_UCE 0x0000000000000010 -#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_NV 0x0000000000008000 +#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_UC 0x0000000000000001 +#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WC 0x0000000000000002 +#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WT 0x0000000000000004 +#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_WB 0x0000000000000008 +#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_UCE 0x0000000000000010 +#define EFI_ACPI_MEMORY_TYPE_SPECIFIC_ATTRIBUTES_NV 0x0000000000008000 // // Ensure proper structure formats @@ -61,11 +61,11 @@ typedef PACKED struct { /// ACPI 3.0 Generic Address Space definition /// typedef struct { - UINT8 AddressSpaceId; - UINT8 RegisterBitWidth; - UINT8 RegisterBitOffset; - UINT8 AccessSize; - UINT64 Address; + UINT8 AddressSpaceId; + UINT8 RegisterBitWidth; + UINT8 RegisterBitOffset; + UINT8 AccessSize; + UINT64 Address; } EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE; // @@ -95,29 +95,29 @@ typedef struct { /// Root System Description Pointer Structure /// typedef struct { - UINT64 Signature; - UINT8 Checksum; - UINT8 OemId[6]; - UINT8 Revision; - UINT32 RsdtAddress; - UINT32 Length; - UINT64 XsdtAddress; - UINT8 ExtendedChecksum; - UINT8 Reserved[3]; + UINT64 Signature; + UINT8 Checksum; + UINT8 OemId[6]; + UINT8 Revision; + UINT32 RsdtAddress; + UINT32 Length; + UINT64 XsdtAddress; + UINT8 ExtendedChecksum; + UINT8 Reserved[3]; } EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER; /// /// RSD_PTR Revision (as defined in ACPI 3.0b spec.) /// -#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 3.0b) says current value is 2 +#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 3.0b) says current value is 2 /// /// Common table header, this prefaces all ACPI tables, including FACS, but /// excluding the RSD PTR structure /// typedef struct { - UINT32 Signature; - UINT32 Length; + UINT32 Signature; + UINT32 Length; } EFI_ACPI_3_0_COMMON_HEADER; // @@ -129,7 +129,7 @@ typedef struct { /// /// RSDT Revision (as defined in ACPI 3.0 spec.) /// -#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 // // Extended System Description Table @@ -140,64 +140,64 @@ typedef struct { /// /// XSDT Revision (as defined in ACPI 3.0 spec.) /// -#define EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 /// /// Fixed ACPI Description Table Structure (FADT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 FirmwareCtrl; - UINT32 Dsdt; - UINT8 Reserved0; - UINT8 PreferredPmProfile; - UINT16 SciInt; - UINT32 SmiCmd; - UINT8 AcpiEnable; - UINT8 AcpiDisable; - UINT8 S4BiosReq; - UINT8 PstateCnt; - UINT32 Pm1aEvtBlk; - UINT32 Pm1bEvtBlk; - UINT32 Pm1aCntBlk; - UINT32 Pm1bCntBlk; - UINT32 Pm2CntBlk; - UINT32 PmTmrBlk; - UINT32 Gpe0Blk; - UINT32 Gpe1Blk; - UINT8 Pm1EvtLen; - UINT8 Pm1CntLen; - UINT8 Pm2CntLen; - UINT8 PmTmrLen; - UINT8 Gpe0BlkLen; - UINT8 Gpe1BlkLen; - UINT8 Gpe1Base; - UINT8 CstCnt; - UINT16 PLvl2Lat; - UINT16 PLvl3Lat; - UINT16 FlushSize; - UINT16 FlushStride; - UINT8 DutyOffset; - UINT8 DutyWidth; - UINT8 DayAlrm; - UINT8 MonAlrm; - UINT8 Century; - UINT16 IaPcBootArch; - UINT8 Reserved1; - UINT32 Flags; - EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE ResetReg; - UINT8 ResetValue; - UINT8 Reserved2[3]; - UINT64 XFirmwareCtrl; - UINT64 XDsdt; - EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk; - EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk; - EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk; - EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk; - EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk; - EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk; - EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk; - EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 FirmwareCtrl; + UINT32 Dsdt; + UINT8 Reserved0; + UINT8 PreferredPmProfile; + UINT16 SciInt; + UINT32 SmiCmd; + UINT8 AcpiEnable; + UINT8 AcpiDisable; + UINT8 S4BiosReq; + UINT8 PstateCnt; + UINT32 Pm1aEvtBlk; + UINT32 Pm1bEvtBlk; + UINT32 Pm1aCntBlk; + UINT32 Pm1bCntBlk; + UINT32 Pm2CntBlk; + UINT32 PmTmrBlk; + UINT32 Gpe0Blk; + UINT32 Gpe1Blk; + UINT8 Pm1EvtLen; + UINT8 Pm1CntLen; + UINT8 Pm2CntLen; + UINT8 PmTmrLen; + UINT8 Gpe0BlkLen; + UINT8 Gpe1BlkLen; + UINT8 Gpe1Base; + UINT8 CstCnt; + UINT16 PLvl2Lat; + UINT16 PLvl3Lat; + UINT16 FlushSize; + UINT16 FlushStride; + UINT8 DutyOffset; + UINT8 DutyWidth; + UINT8 DayAlrm; + UINT8 MonAlrm; + UINT8 Century; + UINT16 IaPcBootArch; + UINT8 Reserved1; + UINT32 Flags; + EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE ResetReg; + UINT8 ResetValue; + UINT8 Reserved2[3]; + UINT64 XFirmwareCtrl; + UINT64 XDsdt; + EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk; + EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk; + EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk; + EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk; + EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk; + EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk; + EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk; + EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk; } EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE; /// @@ -221,50 +221,50 @@ typedef struct { // Fixed ACPI Description Table Boot Architecture Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_3_0_LEGACY_DEVICES BIT0 -#define EFI_ACPI_3_0_8042 BIT1 -#define EFI_ACPI_3_0_VGA_NOT_PRESENT BIT2 -#define EFI_ACPI_3_0_MSI_NOT_SUPPORTED BIT3 -#define EFI_ACPI_3_0_PCIE_ASPM_CONTROLS BIT4 +#define EFI_ACPI_3_0_LEGACY_DEVICES BIT0 +#define EFI_ACPI_3_0_8042 BIT1 +#define EFI_ACPI_3_0_VGA_NOT_PRESENT BIT2 +#define EFI_ACPI_3_0_MSI_NOT_SUPPORTED BIT3 +#define EFI_ACPI_3_0_PCIE_ASPM_CONTROLS BIT4 // // Fixed ACPI Description Table Fixed Feature Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_3_0_WBINVD BIT0 -#define EFI_ACPI_3_0_WBINVD_FLUSH BIT1 -#define EFI_ACPI_3_0_PROC_C1 BIT2 -#define EFI_ACPI_3_0_P_LVL2_UP BIT3 -#define EFI_ACPI_3_0_PWR_BUTTON BIT4 -#define EFI_ACPI_3_0_SLP_BUTTON BIT5 -#define EFI_ACPI_3_0_FIX_RTC BIT6 -#define EFI_ACPI_3_0_RTC_S4 BIT7 -#define EFI_ACPI_3_0_TMR_VAL_EXT BIT8 -#define EFI_ACPI_3_0_DCK_CAP BIT9 -#define EFI_ACPI_3_0_RESET_REG_SUP BIT10 -#define EFI_ACPI_3_0_SEALED_CASE BIT11 -#define EFI_ACPI_3_0_HEADLESS BIT12 -#define EFI_ACPI_3_0_CPU_SW_SLP BIT13 -#define EFI_ACPI_3_0_PCI_EXP_WAK BIT14 -#define EFI_ACPI_3_0_USE_PLATFORM_CLOCK BIT15 -#define EFI_ACPI_3_0_S4_RTC_STS_VALID BIT16 -#define EFI_ACPI_3_0_REMOTE_POWER_ON_CAPABLE BIT17 -#define EFI_ACPI_3_0_FORCE_APIC_CLUSTER_MODEL BIT18 -#define EFI_ACPI_3_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19 +#define EFI_ACPI_3_0_WBINVD BIT0 +#define EFI_ACPI_3_0_WBINVD_FLUSH BIT1 +#define EFI_ACPI_3_0_PROC_C1 BIT2 +#define EFI_ACPI_3_0_P_LVL2_UP BIT3 +#define EFI_ACPI_3_0_PWR_BUTTON BIT4 +#define EFI_ACPI_3_0_SLP_BUTTON BIT5 +#define EFI_ACPI_3_0_FIX_RTC BIT6 +#define EFI_ACPI_3_0_RTC_S4 BIT7 +#define EFI_ACPI_3_0_TMR_VAL_EXT BIT8 +#define EFI_ACPI_3_0_DCK_CAP BIT9 +#define EFI_ACPI_3_0_RESET_REG_SUP BIT10 +#define EFI_ACPI_3_0_SEALED_CASE BIT11 +#define EFI_ACPI_3_0_HEADLESS BIT12 +#define EFI_ACPI_3_0_CPU_SW_SLP BIT13 +#define EFI_ACPI_3_0_PCI_EXP_WAK BIT14 +#define EFI_ACPI_3_0_USE_PLATFORM_CLOCK BIT15 +#define EFI_ACPI_3_0_S4_RTC_STS_VALID BIT16 +#define EFI_ACPI_3_0_REMOTE_POWER_ON_CAPABLE BIT17 +#define EFI_ACPI_3_0_FORCE_APIC_CLUSTER_MODEL BIT18 +#define EFI_ACPI_3_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19 /// /// Firmware ACPI Control Structure /// typedef struct { - UINT32 Signature; - UINT32 Length; - UINT32 HardwareSignature; - UINT32 FirmwareWakingVector; - UINT32 GlobalLock; - UINT32 Flags; - UINT64 XFirmwareWakingVector; - UINT8 Version; - UINT8 Reserved[31]; + UINT32 Signature; + UINT32 Length; + UINT32 HardwareSignature; + UINT32 FirmwareWakingVector; + UINT32 GlobalLock; + UINT32 Flags; + UINT64 XFirmwareWakingVector; + UINT8 Version; + UINT8 Reserved[31]; } EFI_ACPI_3_0_FIRMWARE_ACPI_CONTROL_STRUCTURE; /// @@ -276,7 +276,7 @@ typedef struct { /// Firmware Control Structure Feature Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_3_0_S4BIOS_F BIT0 +#define EFI_ACPI_3_0_S4BIOS_F BIT0 // // Differentiated System Description Table, @@ -285,29 +285,29 @@ typedef struct { // no definition needed as they are common description table header, the same with // EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block. // -#define EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 -#define EFI_ACPI_3_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 +#define EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 +#define EFI_ACPI_3_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 /// /// Multiple APIC Description Table header definition. The rest of the table /// must be defined in a platform specific manner. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 LocalApicAddress; - UINT32 Flags; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 LocalApicAddress; + UINT32 Flags; } EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER; /// /// MADT Revision (as defined in ACPI 3.0 spec.) /// -#define EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x02 +#define EFI_ACPI_3_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x02 /// /// Multiple APIC Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_3_0_PCAT_COMPAT BIT0 +#define EFI_ACPI_3_0_PCAT_COMPAT BIT0 // // Multiple APIC Description Table APIC structure types @@ -332,57 +332,57 @@ typedef struct { /// Processor Local APIC Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorId; - UINT8 ApicId; - UINT32 Flags; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorId; + UINT8 ApicId; + UINT32 Flags; } EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_STRUCTURE; /// /// Local APIC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_3_0_LOCAL_APIC_ENABLED BIT0 +#define EFI_ACPI_3_0_LOCAL_APIC_ENABLED BIT0 /// /// IO APIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 IoApicId; - UINT8 Reserved; - UINT32 IoApicAddress; - UINT32 GlobalSystemInterruptBase; + UINT8 Type; + UINT8 Length; + UINT8 IoApicId; + UINT8 Reserved; + UINT32 IoApicAddress; + UINT32 GlobalSystemInterruptBase; } EFI_ACPI_3_0_IO_APIC_STRUCTURE; /// /// Interrupt Source Override Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Bus; - UINT8 Source; - UINT32 GlobalSystemInterrupt; - UINT16 Flags; + UINT8 Type; + UINT8 Length; + UINT8 Bus; + UINT8 Source; + UINT32 GlobalSystemInterrupt; + UINT16 Flags; } EFI_ACPI_3_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE; /// /// Platform Interrupt Sources Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT8 InterruptType; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT8 IoSapicVector; - UINT32 GlobalSystemInterrupt; - UINT32 PlatformInterruptSourceFlags; - UINT8 CpeiProcessorOverride; - UINT8 Reserved[31]; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT8 InterruptType; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT8 IoSapicVector; + UINT32 GlobalSystemInterrupt; + UINT32 PlatformInterruptSourceFlags; + UINT8 CpeiProcessorOverride; + UINT8 Reserved[31]; } EFI_ACPI_3_0_PLATFORM_INTERRUPT_APIC_STRUCTURE; // @@ -396,43 +396,43 @@ typedef struct { /// Non-Maskable Interrupt Source Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT32 GlobalSystemInterrupt; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT32 GlobalSystemInterrupt; } EFI_ACPI_3_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE; /// /// Local APIC NMI Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorId; - UINT16 Flags; - UINT8 LocalApicLint; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorId; + UINT16 Flags; + UINT8 LocalApicLint; } EFI_ACPI_3_0_LOCAL_APIC_NMI_STRUCTURE; /// /// Local APIC Address Override Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT64 LocalApicAddress; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT64 LocalApicAddress; } EFI_ACPI_3_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE; /// /// IO SAPIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 IoApicId; - UINT8 Reserved; - UINT32 GlobalSystemInterruptBase; - UINT64 IoSapicAddress; + UINT8 Type; + UINT8 Length; + UINT8 IoApicId; + UINT8 Reserved; + UINT32 GlobalSystemInterruptBase; + UINT64 IoSapicAddress; } EFI_ACPI_3_0_IO_SAPIC_STRUCTURE; /// @@ -440,51 +440,51 @@ typedef struct { /// This struct followed by a null-terminated ASCII string - ACPI Processor UID String /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorId; - UINT8 LocalSapicId; - UINT8 LocalSapicEid; - UINT8 Reserved[3]; - UINT32 Flags; - UINT32 ACPIProcessorUIDValue; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorId; + UINT8 LocalSapicId; + UINT8 LocalSapicEid; + UINT8 Reserved[3]; + UINT32 Flags; + UINT32 ACPIProcessorUIDValue; } EFI_ACPI_3_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE; /// /// Platform Interrupt Sources Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT8 InterruptType; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT8 IoSapicVector; - UINT32 GlobalSystemInterrupt; - UINT32 PlatformInterruptSourceFlags; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT8 InterruptType; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT8 IoSapicVector; + UINT32 GlobalSystemInterrupt; + UINT32 PlatformInterruptSourceFlags; } EFI_ACPI_3_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE; /// /// Platform Interrupt Source Flags. /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_3_0_CPEI_PROCESSOR_OVERRIDE BIT0 +#define EFI_ACPI_3_0_CPEI_PROCESSOR_OVERRIDE BIT0 /// /// Smart Battery Description Table (SBST) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 WarningEnergyLevel; - UINT32 LowEnergyLevel; - UINT32 CriticalEnergyLevel; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 WarningEnergyLevel; + UINT32 LowEnergyLevel; + UINT32 CriticalEnergyLevel; } EFI_ACPI_3_0_SMART_BATTERY_DESCRIPTION_TABLE; /// /// SBST Version (as defined in ACPI 3.0 spec.) /// -#define EFI_ACPI_3_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_3_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01 /// /// Embedded Controller Boot Resources Table (ECDT) @@ -492,11 +492,11 @@ typedef struct { /// a fully qualified reference to the name space object. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE EcControl; - EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE EcData; - UINT32 Uid; - UINT8 GpeBit; + EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE EcControl; + EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE EcData; + UINT32 Uid; + UINT8 GpeBit; } EFI_ACPI_3_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE; /// @@ -509,9 +509,9 @@ typedef struct { /// must be defined in a platform specific manner. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 Reserved1; ///< Must be set to 1 - UINT64 Reserved2; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 Reserved1; ///< Must be set to 1 + UINT64 Reserved2; } EFI_ACPI_3_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER; /// @@ -531,52 +531,52 @@ typedef struct { /// Processor Local APIC/SAPIC Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 ProximityDomain7To0; - UINT8 ApicId; - UINT32 Flags; - UINT8 LocalSapicEid; - UINT8 ProximityDomain31To8[3]; - UINT8 Reserved[4]; + UINT8 Type; + UINT8 Length; + UINT8 ProximityDomain7To0; + UINT8 ApicId; + UINT32 Flags; + UINT8 LocalSapicEid; + UINT8 ProximityDomain31To8[3]; + UINT8 Reserved[4]; } EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE; /// /// Local APIC/SAPIC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0) +#define EFI_ACPI_3_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0) /// /// Memory Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 ProximityDomain; - UINT16 Reserved1; - UINT32 AddressBaseLow; - UINT32 AddressBaseHigh; - UINT32 LengthLow; - UINT32 LengthHigh; - UINT32 Reserved2; - UINT32 Flags; - UINT64 Reserved3; + UINT8 Type; + UINT8 Length; + UINT32 ProximityDomain; + UINT16 Reserved1; + UINT32 AddressBaseLow; + UINT32 AddressBaseHigh; + UINT32 LengthLow; + UINT32 LengthHigh; + UINT32 Reserved2; + UINT32 Flags; + UINT64 Reserved3; } EFI_ACPI_3_0_MEMORY_AFFINITY_STRUCTURE; // // Memory Flags. All other bits are reserved and must be 0. // -#define EFI_ACPI_3_0_MEMORY_ENABLED (1 << 0) -#define EFI_ACPI_3_0_MEMORY_HOT_PLUGGABLE (1 << 1) -#define EFI_ACPI_3_0_MEMORY_NONVOLATILE (1 << 2) +#define EFI_ACPI_3_0_MEMORY_ENABLED (1 << 0) +#define EFI_ACPI_3_0_MEMORY_HOT_PLUGGABLE (1 << 1) +#define EFI_ACPI_3_0_MEMORY_NONVOLATILE (1 << 2) /// /// System Locality Distance Information Table (SLIT). /// The rest of the table is a matrix. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT64 NumberOfSystemLocalities; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT64 NumberOfSystemLocalities; } EFI_ACPI_3_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER; /// diff --git a/MdePkg/Include/IndustryStandard/Acpi40.h b/MdePkg/Include/IndustryStandard/Acpi40.h index c03ba7a..862113d 100644 --- a/MdePkg/Include/IndustryStandard/Acpi40.h +++ b/MdePkg/Include/IndustryStandard/Acpi40.h @@ -19,11 +19,11 @@ /// ACPI 4.0 Generic Address Space definition /// typedef struct { - UINT8 AddressSpaceId; - UINT8 RegisterBitWidth; - UINT8 RegisterBitOffset; - UINT8 AccessSize; - UINT64 Address; + UINT8 AddressSpaceId; + UINT8 RegisterBitWidth; + UINT8 RegisterBitOffset; + UINT8 AccessSize; + UINT64 Address; } EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE; // @@ -53,29 +53,29 @@ typedef struct { /// Root System Description Pointer Structure /// typedef struct { - UINT64 Signature; - UINT8 Checksum; - UINT8 OemId[6]; - UINT8 Revision; - UINT32 RsdtAddress; - UINT32 Length; - UINT64 XsdtAddress; - UINT8 ExtendedChecksum; - UINT8 Reserved[3]; + UINT64 Signature; + UINT8 Checksum; + UINT8 OemId[6]; + UINT8 Revision; + UINT32 RsdtAddress; + UINT32 Length; + UINT64 XsdtAddress; + UINT8 ExtendedChecksum; + UINT8 Reserved[3]; } EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_POINTER; /// /// RSD_PTR Revision (as defined in ACPI 4.0b spec.) /// -#define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 4.0a) says current value is 2 +#define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 4.0a) says current value is 2 /// /// Common table header, this prefaces all ACPI tables, including FACS, but /// excluding the RSD PTR structure /// typedef struct { - UINT32 Signature; - UINT32 Length; + UINT32 Signature; + UINT32 Length; } EFI_ACPI_4_0_COMMON_HEADER; // @@ -87,7 +87,7 @@ typedef struct { /// /// RSDT Revision (as defined in ACPI 4.0 spec.) /// -#define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_4_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 // // Extended System Description Table @@ -98,64 +98,64 @@ typedef struct { /// /// XSDT Revision (as defined in ACPI 4.0 spec.) /// -#define EFI_ACPI_4_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_4_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 /// /// Fixed ACPI Description Table Structure (FADT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 FirmwareCtrl; - UINT32 Dsdt; - UINT8 Reserved0; - UINT8 PreferredPmProfile; - UINT16 SciInt; - UINT32 SmiCmd; - UINT8 AcpiEnable; - UINT8 AcpiDisable; - UINT8 S4BiosReq; - UINT8 PstateCnt; - UINT32 Pm1aEvtBlk; - UINT32 Pm1bEvtBlk; - UINT32 Pm1aCntBlk; - UINT32 Pm1bCntBlk; - UINT32 Pm2CntBlk; - UINT32 PmTmrBlk; - UINT32 Gpe0Blk; - UINT32 Gpe1Blk; - UINT8 Pm1EvtLen; - UINT8 Pm1CntLen; - UINT8 Pm2CntLen; - UINT8 PmTmrLen; - UINT8 Gpe0BlkLen; - UINT8 Gpe1BlkLen; - UINT8 Gpe1Base; - UINT8 CstCnt; - UINT16 PLvl2Lat; - UINT16 PLvl3Lat; - UINT16 FlushSize; - UINT16 FlushStride; - UINT8 DutyOffset; - UINT8 DutyWidth; - UINT8 DayAlrm; - UINT8 MonAlrm; - UINT8 Century; - UINT16 IaPcBootArch; - UINT8 Reserved1; - UINT32 Flags; - EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE ResetReg; - UINT8 ResetValue; - UINT8 Reserved2[3]; - UINT64 XFirmwareCtrl; - UINT64 XDsdt; - EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk; - EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk; - EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk; - EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk; - EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk; - EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk; - EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk; - EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 FirmwareCtrl; + UINT32 Dsdt; + UINT8 Reserved0; + UINT8 PreferredPmProfile; + UINT16 SciInt; + UINT32 SmiCmd; + UINT8 AcpiEnable; + UINT8 AcpiDisable; + UINT8 S4BiosReq; + UINT8 PstateCnt; + UINT32 Pm1aEvtBlk; + UINT32 Pm1bEvtBlk; + UINT32 Pm1aCntBlk; + UINT32 Pm1bCntBlk; + UINT32 Pm2CntBlk; + UINT32 PmTmrBlk; + UINT32 Gpe0Blk; + UINT32 Gpe1Blk; + UINT8 Pm1EvtLen; + UINT8 Pm1CntLen; + UINT8 Pm2CntLen; + UINT8 PmTmrLen; + UINT8 Gpe0BlkLen; + UINT8 Gpe1BlkLen; + UINT8 Gpe1Base; + UINT8 CstCnt; + UINT16 PLvl2Lat; + UINT16 PLvl3Lat; + UINT16 FlushSize; + UINT16 FlushStride; + UINT8 DutyOffset; + UINT8 DutyWidth; + UINT8 DayAlrm; + UINT8 MonAlrm; + UINT8 Century; + UINT16 IaPcBootArch; + UINT8 Reserved1; + UINT32 Flags; + EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE ResetReg; + UINT8 ResetValue; + UINT8 Reserved2[3]; + UINT64 XFirmwareCtrl; + UINT64 XDsdt; + EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk; + EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk; + EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk; + EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk; + EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk; + EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk; + EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk; + EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk; } EFI_ACPI_4_0_FIXED_ACPI_DESCRIPTION_TABLE; /// @@ -179,52 +179,52 @@ typedef struct { // Fixed ACPI Description Table Boot Architecture Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_4_0_LEGACY_DEVICES BIT0 -#define EFI_ACPI_4_0_8042 BIT1 -#define EFI_ACPI_4_0_VGA_NOT_PRESENT BIT2 -#define EFI_ACPI_4_0_MSI_NOT_SUPPORTED BIT3 -#define EFI_ACPI_4_0_PCIE_ASPM_CONTROLS BIT4 +#define EFI_ACPI_4_0_LEGACY_DEVICES BIT0 +#define EFI_ACPI_4_0_8042 BIT1 +#define EFI_ACPI_4_0_VGA_NOT_PRESENT BIT2 +#define EFI_ACPI_4_0_MSI_NOT_SUPPORTED BIT3 +#define EFI_ACPI_4_0_PCIE_ASPM_CONTROLS BIT4 // // Fixed ACPI Description Table Fixed Feature Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_4_0_WBINVD BIT0 -#define EFI_ACPI_4_0_WBINVD_FLUSH BIT1 -#define EFI_ACPI_4_0_PROC_C1 BIT2 -#define EFI_ACPI_4_0_P_LVL2_UP BIT3 -#define EFI_ACPI_4_0_PWR_BUTTON BIT4 -#define EFI_ACPI_4_0_SLP_BUTTON BIT5 -#define EFI_ACPI_4_0_FIX_RTC BIT6 -#define EFI_ACPI_4_0_RTC_S4 BIT7 -#define EFI_ACPI_4_0_TMR_VAL_EXT BIT8 -#define EFI_ACPI_4_0_DCK_CAP BIT9 -#define EFI_ACPI_4_0_RESET_REG_SUP BIT10 -#define EFI_ACPI_4_0_SEALED_CASE BIT11 -#define EFI_ACPI_4_0_HEADLESS BIT12 -#define EFI_ACPI_4_0_CPU_SW_SLP BIT13 -#define EFI_ACPI_4_0_PCI_EXP_WAK BIT14 -#define EFI_ACPI_4_0_USE_PLATFORM_CLOCK BIT15 -#define EFI_ACPI_4_0_S4_RTC_STS_VALID BIT16 -#define EFI_ACPI_4_0_REMOTE_POWER_ON_CAPABLE BIT17 -#define EFI_ACPI_4_0_FORCE_APIC_CLUSTER_MODEL BIT18 -#define EFI_ACPI_4_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19 +#define EFI_ACPI_4_0_WBINVD BIT0 +#define EFI_ACPI_4_0_WBINVD_FLUSH BIT1 +#define EFI_ACPI_4_0_PROC_C1 BIT2 +#define EFI_ACPI_4_0_P_LVL2_UP BIT3 +#define EFI_ACPI_4_0_PWR_BUTTON BIT4 +#define EFI_ACPI_4_0_SLP_BUTTON BIT5 +#define EFI_ACPI_4_0_FIX_RTC BIT6 +#define EFI_ACPI_4_0_RTC_S4 BIT7 +#define EFI_ACPI_4_0_TMR_VAL_EXT BIT8 +#define EFI_ACPI_4_0_DCK_CAP BIT9 +#define EFI_ACPI_4_0_RESET_REG_SUP BIT10 +#define EFI_ACPI_4_0_SEALED_CASE BIT11 +#define EFI_ACPI_4_0_HEADLESS BIT12 +#define EFI_ACPI_4_0_CPU_SW_SLP BIT13 +#define EFI_ACPI_4_0_PCI_EXP_WAK BIT14 +#define EFI_ACPI_4_0_USE_PLATFORM_CLOCK BIT15 +#define EFI_ACPI_4_0_S4_RTC_STS_VALID BIT16 +#define EFI_ACPI_4_0_REMOTE_POWER_ON_CAPABLE BIT17 +#define EFI_ACPI_4_0_FORCE_APIC_CLUSTER_MODEL BIT18 +#define EFI_ACPI_4_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19 /// /// Firmware ACPI Control Structure /// typedef struct { - UINT32 Signature; - UINT32 Length; - UINT32 HardwareSignature; - UINT32 FirmwareWakingVector; - UINT32 GlobalLock; - UINT32 Flags; - UINT64 XFirmwareWakingVector; - UINT8 Version; - UINT8 Reserved0[3]; - UINT32 OspmFlags; - UINT8 Reserved1[24]; + UINT32 Signature; + UINT32 Length; + UINT32 HardwareSignature; + UINT32 FirmwareWakingVector; + UINT32 GlobalLock; + UINT32 Flags; + UINT64 XFirmwareWakingVector; + UINT8 Version; + UINT8 Reserved0[3]; + UINT32 OspmFlags; + UINT8 Reserved1[24]; } EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE; /// @@ -236,14 +236,14 @@ typedef struct { /// Firmware Control Structure Feature Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_4_0_S4BIOS_F BIT0 -#define EFI_ACPI_4_0_64BIT_WAKE_SUPPORTED_F BIT1 +#define EFI_ACPI_4_0_S4BIOS_F BIT0 +#define EFI_ACPI_4_0_64BIT_WAKE_SUPPORTED_F BIT1 /// /// OSPM Enabled Firmware Control Structure Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_4_0_OSPM_64BIT_WAKE__F BIT0 +#define EFI_ACPI_4_0_OSPM_64BIT_WAKE__F BIT0 // // Differentiated System Description Table, @@ -252,29 +252,29 @@ typedef struct { // no definition needed as they are common description table header, the same with // EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block. // -#define EFI_ACPI_4_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 -#define EFI_ACPI_4_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 +#define EFI_ACPI_4_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 +#define EFI_ACPI_4_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 /// /// Multiple APIC Description Table header definition. The rest of the table /// must be defined in a platform specific manner. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 LocalApicAddress; - UINT32 Flags; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 LocalApicAddress; + UINT32 Flags; } EFI_ACPI_4_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER; /// /// MADT Revision (as defined in ACPI 4.0 spec.) /// -#define EFI_ACPI_4_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x03 +#define EFI_ACPI_4_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x03 /// /// Multiple APIC Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_4_0_PCAT_COMPAT BIT0 +#define EFI_ACPI_4_0_PCAT_COMPAT BIT0 // // Multiple APIC Description Table APIC structure types @@ -301,57 +301,57 @@ typedef struct { /// Processor Local APIC Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorId; - UINT8 ApicId; - UINT32 Flags; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorId; + UINT8 ApicId; + UINT32 Flags; } EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC_STRUCTURE; /// /// Local APIC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_4_0_LOCAL_APIC_ENABLED BIT0 +#define EFI_ACPI_4_0_LOCAL_APIC_ENABLED BIT0 /// /// IO APIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 IoApicId; - UINT8 Reserved; - UINT32 IoApicAddress; - UINT32 GlobalSystemInterruptBase; + UINT8 Type; + UINT8 Length; + UINT8 IoApicId; + UINT8 Reserved; + UINT32 IoApicAddress; + UINT32 GlobalSystemInterruptBase; } EFI_ACPI_4_0_IO_APIC_STRUCTURE; /// /// Interrupt Source Override Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Bus; - UINT8 Source; - UINT32 GlobalSystemInterrupt; - UINT16 Flags; + UINT8 Type; + UINT8 Length; + UINT8 Bus; + UINT8 Source; + UINT32 GlobalSystemInterrupt; + UINT16 Flags; } EFI_ACPI_4_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE; /// /// Platform Interrupt Sources Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT8 InterruptType; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT8 IoSapicVector; - UINT32 GlobalSystemInterrupt; - UINT32 PlatformInterruptSourceFlags; - UINT8 CpeiProcessorOverride; - UINT8 Reserved[31]; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT8 InterruptType; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT8 IoSapicVector; + UINT32 GlobalSystemInterrupt; + UINT32 PlatformInterruptSourceFlags; + UINT8 CpeiProcessorOverride; + UINT8 Reserved[31]; } EFI_ACPI_4_0_PLATFORM_INTERRUPT_APIC_STRUCTURE; // @@ -365,43 +365,43 @@ typedef struct { /// Non-Maskable Interrupt Source Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT32 GlobalSystemInterrupt; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT32 GlobalSystemInterrupt; } EFI_ACPI_4_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE; /// /// Local APIC NMI Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorId; - UINT16 Flags; - UINT8 LocalApicLint; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorId; + UINT16 Flags; + UINT8 LocalApicLint; } EFI_ACPI_4_0_LOCAL_APIC_NMI_STRUCTURE; /// /// Local APIC Address Override Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT64 LocalApicAddress; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT64 LocalApicAddress; } EFI_ACPI_4_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE; /// /// IO SAPIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 IoApicId; - UINT8 Reserved; - UINT32 GlobalSystemInterruptBase; - UINT64 IoSapicAddress; + UINT8 Type; + UINT8 Length; + UINT8 IoApicId; + UINT8 Reserved; + UINT32 GlobalSystemInterruptBase; + UINT64 IoSapicAddress; } EFI_ACPI_4_0_IO_SAPIC_STRUCTURE; /// @@ -409,75 +409,75 @@ typedef struct { /// This struct followed by a null-terminated ASCII string - ACPI Processor UID String /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorId; - UINT8 LocalSapicId; - UINT8 LocalSapicEid; - UINT8 Reserved[3]; - UINT32 Flags; - UINT32 ACPIProcessorUIDValue; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorId; + UINT8 LocalSapicId; + UINT8 LocalSapicEid; + UINT8 Reserved[3]; + UINT32 Flags; + UINT32 ACPIProcessorUIDValue; } EFI_ACPI_4_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE; /// /// Platform Interrupt Sources Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT8 InterruptType; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT8 IoSapicVector; - UINT32 GlobalSystemInterrupt; - UINT32 PlatformInterruptSourceFlags; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT8 InterruptType; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT8 IoSapicVector; + UINT32 GlobalSystemInterrupt; + UINT32 PlatformInterruptSourceFlags; } EFI_ACPI_4_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE; /// /// Platform Interrupt Source Flags. /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_4_0_CPEI_PROCESSOR_OVERRIDE BIT0 +#define EFI_ACPI_4_0_CPEI_PROCESSOR_OVERRIDE BIT0 /// /// Processor Local x2APIC Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[2]; - UINT32 X2ApicId; - UINT32 Flags; - UINT32 AcpiProcessorUid; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[2]; + UINT32 X2ApicId; + UINT32 Flags; + UINT32 AcpiProcessorUid; } EFI_ACPI_4_0_PROCESSOR_LOCAL_X2APIC_STRUCTURE; /// /// Local x2APIC NMI Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT32 AcpiProcessorUid; - UINT8 LocalX2ApicLint; - UINT8 Reserved[3]; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT32 AcpiProcessorUid; + UINT8 LocalX2ApicLint; + UINT8 Reserved[3]; } EFI_ACPI_4_0_LOCAL_X2APIC_NMI_STRUCTURE; /// /// Smart Battery Description Table (SBST) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 WarningEnergyLevel; - UINT32 LowEnergyLevel; - UINT32 CriticalEnergyLevel; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 WarningEnergyLevel; + UINT32 LowEnergyLevel; + UINT32 CriticalEnergyLevel; } EFI_ACPI_4_0_SMART_BATTERY_DESCRIPTION_TABLE; /// /// SBST Version (as defined in ACPI 4.0 spec.) /// -#define EFI_ACPI_4_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_4_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01 /// /// Embedded Controller Boot Resources Table (ECDT) @@ -485,11 +485,11 @@ typedef struct { /// a fully qualified reference to the name space object. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE EcControl; - EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE EcData; - UINT32 Uid; - UINT8 GpeBit; + EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE EcControl; + EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE EcData; + UINT32 Uid; + UINT8 GpeBit; } EFI_ACPI_4_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE; /// @@ -502,9 +502,9 @@ typedef struct { /// must be defined in a platform specific manner. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 Reserved1; ///< Must be set to 1 - UINT64 Reserved2; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 Reserved1; ///< Must be set to 1 + UINT64 Reserved2; } EFI_ACPI_4_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER; /// @@ -525,57 +525,57 @@ typedef struct { /// Processor Local APIC/SAPIC Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 ProximityDomain7To0; - UINT8 ApicId; - UINT32 Flags; - UINT8 LocalSapicEid; - UINT8 ProximityDomain31To8[3]; - UINT32 ClockDomain; + UINT8 Type; + UINT8 Length; + UINT8 ProximityDomain7To0; + UINT8 ApicId; + UINT32 Flags; + UINT8 LocalSapicEid; + UINT8 ProximityDomain31To8[3]; + UINT32 ClockDomain; } EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE; /// /// Local APIC/SAPIC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0) +#define EFI_ACPI_4_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0) /// /// Memory Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 ProximityDomain; - UINT16 Reserved1; - UINT32 AddressBaseLow; - UINT32 AddressBaseHigh; - UINT32 LengthLow; - UINT32 LengthHigh; - UINT32 Reserved2; - UINT32 Flags; - UINT64 Reserved3; + UINT8 Type; + UINT8 Length; + UINT32 ProximityDomain; + UINT16 Reserved1; + UINT32 AddressBaseLow; + UINT32 AddressBaseHigh; + UINT32 LengthLow; + UINT32 LengthHigh; + UINT32 Reserved2; + UINT32 Flags; + UINT64 Reserved3; } EFI_ACPI_4_0_MEMORY_AFFINITY_STRUCTURE; // // Memory Flags. All other bits are reserved and must be 0. // -#define EFI_ACPI_4_0_MEMORY_ENABLED (1 << 0) -#define EFI_ACPI_4_0_MEMORY_HOT_PLUGGABLE (1 << 1) -#define EFI_ACPI_4_0_MEMORY_NONVOLATILE (1 << 2) +#define EFI_ACPI_4_0_MEMORY_ENABLED (1 << 0) +#define EFI_ACPI_4_0_MEMORY_HOT_PLUGGABLE (1 << 1) +#define EFI_ACPI_4_0_MEMORY_NONVOLATILE (1 << 2) /// /// Processor Local x2APIC Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved1[2]; - UINT32 ProximityDomain; - UINT32 X2ApicId; - UINT32 Flags; - UINT32 ClockDomain; - UINT8 Reserved2[4]; + UINT8 Type; + UINT8 Length; + UINT8 Reserved1[2]; + UINT32 ProximityDomain; + UINT32 X2ApicId; + UINT32 Flags; + UINT32 ClockDomain; + UINT8 Reserved2[4]; } EFI_ACPI_4_0_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE; /// @@ -583,8 +583,8 @@ typedef struct { /// The rest of the table is a matrix. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT64 NumberOfSystemLocalities; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT64 NumberOfSystemLocalities; } EFI_ACPI_4_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER; /// @@ -596,14 +596,14 @@ typedef struct { /// Corrected Platform Error Polling Table (CPEP) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 Reserved[8]; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 Reserved[8]; } EFI_ACPI_4_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_HEADER; /// /// CPEP Version (as defined in ACPI 4.0 spec.) /// -#define EFI_ACPI_4_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01 +#define EFI_ACPI_4_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01 // // CPEP processor structure types. @@ -614,76 +614,76 @@ typedef struct { /// Corrected Platform Error Polling Processor Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT32 PollingInterval; + UINT8 Type; + UINT8 Length; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT32 PollingInterval; } EFI_ACPI_4_0_CPEP_PROCESSOR_APIC_SAPIC_STRUCTURE; /// /// Maximum System Characteristics Table (MSCT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 OffsetProxDomInfo; - UINT32 MaximumNumberOfProximityDomains; - UINT32 MaximumNumberOfClockDomains; - UINT64 MaximumPhysicalAddress; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 OffsetProxDomInfo; + UINT32 MaximumNumberOfProximityDomains; + UINT32 MaximumNumberOfClockDomains; + UINT64 MaximumPhysicalAddress; } EFI_ACPI_4_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_HEADER; /// /// MSCT Version (as defined in ACPI 4.0 spec.) /// -#define EFI_ACPI_4_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01 +#define EFI_ACPI_4_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01 /// /// Maximum Proximity Domain Information Structure Definition /// typedef struct { - UINT8 Revision; - UINT8 Length; - UINT32 ProximityDomainRangeLow; - UINT32 ProximityDomainRangeHigh; - UINT32 MaximumProcessorCapacity; - UINT64 MaximumMemoryCapacity; + UINT8 Revision; + UINT8 Length; + UINT32 ProximityDomainRangeLow; + UINT32 ProximityDomainRangeHigh; + UINT32 MaximumProcessorCapacity; + UINT64 MaximumMemoryCapacity; } EFI_ACPI_4_0_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE; /// /// Boot Error Record Table (BERT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 BootErrorRegionLength; - UINT64 BootErrorRegion; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 BootErrorRegionLength; + UINT64 BootErrorRegion; } EFI_ACPI_4_0_BOOT_ERROR_RECORD_TABLE_HEADER; /// /// BERT Version (as defined in ACPI 4.0 spec.) /// -#define EFI_ACPI_4_0_BOOT_ERROR_RECORD_TABLE_REVISION 0x01 +#define EFI_ACPI_4_0_BOOT_ERROR_RECORD_TABLE_REVISION 0x01 /// /// Boot Error Region Block Status Definition /// typedef struct { - UINT32 UncorrectableErrorValid:1; - UINT32 CorrectableErrorValid:1; - UINT32 MultipleUncorrectableErrors:1; - UINT32 MultipleCorrectableErrors:1; - UINT32 ErrorDataEntryCount:10; - UINT32 Reserved:18; + UINT32 UncorrectableErrorValid : 1; + UINT32 CorrectableErrorValid : 1; + UINT32 MultipleUncorrectableErrors : 1; + UINT32 MultipleCorrectableErrors : 1; + UINT32 ErrorDataEntryCount : 10; + UINT32 Reserved : 18; } EFI_ACPI_4_0_ERROR_BLOCK_STATUS; /// /// Boot Error Region Definition /// typedef struct { - EFI_ACPI_4_0_ERROR_BLOCK_STATUS BlockStatus; - UINT32 RawDataOffset; - UINT32 RawDataLength; - UINT32 DataLength; - UINT32 ErrorSeverity; + EFI_ACPI_4_0_ERROR_BLOCK_STATUS BlockStatus; + UINT32 RawDataOffset; + UINT32 RawDataLength; + UINT32 DataLength; + UINT32 ErrorSeverity; } EFI_ACPI_4_0_BOOT_ERROR_REGION_STRUCTURE; // @@ -698,14 +698,14 @@ typedef struct { /// Generic Error Data Entry Definition /// typedef struct { - UINT8 SectionType[16]; - UINT32 ErrorSeverity; - UINT16 Revision; - UINT8 ValidationBits; - UINT8 Flags; - UINT32 ErrorDataLength; - UINT8 FruId[16]; - UINT8 FruText[20]; + UINT8 SectionType[16]; + UINT32 ErrorSeverity; + UINT16 Revision; + UINT8 ValidationBits; + UINT8 Flags; + UINT32 ErrorDataLength; + UINT8 FruId[16]; + UINT8 FruText[20]; } EFI_ACPI_4_0_GENERIC_ERROR_DATA_ENTRY_STRUCTURE; /// @@ -717,14 +717,14 @@ typedef struct { /// HEST - Hardware Error Source Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 ErrorSourceCount; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 ErrorSourceCount; } EFI_ACPI_4_0_HARDWARE_ERROR_SOURCE_TABLE_HEADER; /// /// HEST Version (as defined in ACPI 4.0 spec.) /// -#define EFI_ACPI_4_0_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01 +#define EFI_ACPI_4_0_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01 // // Error Source structure types. @@ -740,383 +740,383 @@ typedef struct { // // Error Source structure flags. // -#define EFI_ACPI_4_0_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0) -#define EFI_ACPI_4_0_ERROR_SOURCE_FLAG_GLOBAL (1 << 1) +#define EFI_ACPI_4_0_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0) +#define EFI_ACPI_4_0_ERROR_SOURCE_FLAG_GLOBAL (1 << 1) /// /// IA-32 Architecture Machine Check Exception Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT64 GlobalCapabilityInitData; - UINT64 GlobalControlInitData; - UINT8 NumberOfHardwareBanks; - UINT8 Reserved1[7]; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT64 GlobalCapabilityInitData; + UINT64 GlobalControlInitData; + UINT8 NumberOfHardwareBanks; + UINT8 Reserved1[7]; } EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION_STRUCTURE; /// /// IA-32 Architecture Machine Check Bank Structure Definition /// typedef struct { - UINT8 BankNumber; - UINT8 ClearStatusOnInitialization; - UINT8 StatusDataFormat; - UINT8 Reserved0; - UINT32 ControlRegisterMsrAddress; - UINT64 ControlInitData; - UINT32 StatusRegisterMsrAddress; - UINT32 AddressRegisterMsrAddress; - UINT32 MiscRegisterMsrAddress; + UINT8 BankNumber; + UINT8 ClearStatusOnInitialization; + UINT8 StatusDataFormat; + UINT8 Reserved0; + UINT32 ControlRegisterMsrAddress; + UINT64 ControlInitData; + UINT32 StatusRegisterMsrAddress; + UINT32 AddressRegisterMsrAddress; + UINT32 MiscRegisterMsrAddress; } EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_BANK_STRUCTURE; /// /// IA-32 Architecture Machine Check Bank Structure MCA data format /// -#define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00 -#define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01 -#define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02 +#define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00 +#define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01 +#define EFI_ACPI_4_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02 // // Hardware Error Notification types. All other values are reserved // -#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00 -#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01 -#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02 -#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_SCI 0x03 -#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_NMI 0x04 +#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00 +#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01 +#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02 +#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_SCI 0x03 +#define EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_NMI 0x04 /// /// Hardware Error Notification Configuration Write Enable Structure Definition /// typedef struct { - UINT16 Type:1; - UINT16 PollInterval:1; - UINT16 SwitchToPollingThresholdValue:1; - UINT16 SwitchToPollingThresholdWindow:1; - UINT16 ErrorThresholdValue:1; - UINT16 ErrorThresholdWindow:1; - UINT16 Reserved:10; + UINT16 Type : 1; + UINT16 PollInterval : 1; + UINT16 SwitchToPollingThresholdValue : 1; + UINT16 SwitchToPollingThresholdWindow : 1; + UINT16 ErrorThresholdValue : 1; + UINT16 ErrorThresholdWindow : 1; + UINT16 Reserved : 10; } EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE; /// /// Hardware Error Notification Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable; - UINT32 PollInterval; - UINT32 Vector; - UINT32 SwitchToPollingThresholdValue; - UINT32 SwitchToPollingThresholdWindow; - UINT32 ErrorThresholdValue; - UINT32 ErrorThresholdWindow; + UINT8 Type; + UINT8 Length; + EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable; + UINT32 PollInterval; + UINT32 Vector; + UINT32 SwitchToPollingThresholdValue; + UINT32 SwitchToPollingThresholdWindow; + UINT32 ErrorThresholdValue; + UINT32 ErrorThresholdWindow; } EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE; /// /// IA-32 Architecture Corrected Machine Check Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; - UINT8 NumberOfHardwareBanks; - UINT8 Reserved1[3]; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; + UINT8 NumberOfHardwareBanks; + UINT8 Reserved1[3]; } EFI_ACPI_4_0_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK_STRUCTURE; /// /// IA-32 Architecture NMI Error Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 MaxRawDataLength; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 MaxRawDataLength; } EFI_ACPI_4_0_IA32_ARCHITECTURE_NMI_ERROR_STRUCTURE; /// /// PCI Express Root Port AER Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 Bus; - UINT16 Device; - UINT16 Function; - UINT16 DeviceControl; - UINT8 Reserved1[2]; - UINT32 UncorrectableErrorMask; - UINT32 UncorrectableErrorSeverity; - UINT32 CorrectableErrorMask; - UINT32 AdvancedErrorCapabilitiesAndControl; - UINT32 RootErrorCommand; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 Bus; + UINT16 Device; + UINT16 Function; + UINT16 DeviceControl; + UINT8 Reserved1[2]; + UINT32 UncorrectableErrorMask; + UINT32 UncorrectableErrorSeverity; + UINT32 CorrectableErrorMask; + UINT32 AdvancedErrorCapabilitiesAndControl; + UINT32 RootErrorCommand; } EFI_ACPI_4_0_PCI_EXPRESS_ROOT_PORT_AER_STRUCTURE; /// /// PCI Express Device AER Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 Bus; - UINT16 Device; - UINT16 Function; - UINT16 DeviceControl; - UINT8 Reserved1[2]; - UINT32 UncorrectableErrorMask; - UINT32 UncorrectableErrorSeverity; - UINT32 CorrectableErrorMask; - UINT32 AdvancedErrorCapabilitiesAndControl; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 Bus; + UINT16 Device; + UINT16 Function; + UINT16 DeviceControl; + UINT8 Reserved1[2]; + UINT32 UncorrectableErrorMask; + UINT32 UncorrectableErrorSeverity; + UINT32 CorrectableErrorMask; + UINT32 AdvancedErrorCapabilitiesAndControl; } EFI_ACPI_4_0_PCI_EXPRESS_DEVICE_AER_STRUCTURE; /// /// PCI Express Bridge AER Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 Bus; - UINT16 Device; - UINT16 Function; - UINT16 DeviceControl; - UINT8 Reserved1[2]; - UINT32 UncorrectableErrorMask; - UINT32 UncorrectableErrorSeverity; - UINT32 CorrectableErrorMask; - UINT32 AdvancedErrorCapabilitiesAndControl; - UINT32 SecondaryUncorrectableErrorMask; - UINT32 SecondaryUncorrectableErrorSeverity; - UINT32 SecondaryAdvancedErrorCapabilitiesAndControl; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 Bus; + UINT16 Device; + UINT16 Function; + UINT16 DeviceControl; + UINT8 Reserved1[2]; + UINT32 UncorrectableErrorMask; + UINT32 UncorrectableErrorSeverity; + UINT32 CorrectableErrorMask; + UINT32 AdvancedErrorCapabilitiesAndControl; + UINT32 SecondaryUncorrectableErrorMask; + UINT32 SecondaryUncorrectableErrorSeverity; + UINT32 SecondaryAdvancedErrorCapabilitiesAndControl; } EFI_ACPI_4_0_PCI_EXPRESS_BRIDGE_AER_STRUCTURE; /// /// Generic Hardware Error Source Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT16 RelatedSourceId; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 MaxRawDataLength; - EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress; - EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; - UINT32 ErrorStatusBlockLength; + UINT16 Type; + UINT16 SourceId; + UINT16 RelatedSourceId; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 MaxRawDataLength; + EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress; + EFI_ACPI_4_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; + UINT32 ErrorStatusBlockLength; } EFI_ACPI_4_0_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE; /// /// Generic Error Status Definition /// typedef struct { - EFI_ACPI_4_0_ERROR_BLOCK_STATUS BlockStatus; - UINT32 RawDataOffset; - UINT32 RawDataLength; - UINT32 DataLength; - UINT32 ErrorSeverity; + EFI_ACPI_4_0_ERROR_BLOCK_STATUS BlockStatus; + UINT32 RawDataOffset; + UINT32 RawDataLength; + UINT32 DataLength; + UINT32 ErrorSeverity; } EFI_ACPI_4_0_GENERIC_ERROR_STATUS_STRUCTURE; /// /// ERST - Error Record Serialization Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 SerializationHeaderSize; - UINT8 Reserved0[4]; - UINT32 InstructionEntryCount; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 SerializationHeaderSize; + UINT8 Reserved0[4]; + UINT32 InstructionEntryCount; } EFI_ACPI_4_0_ERROR_RECORD_SERIALIZATION_TABLE_HEADER; /// /// ERST Version (as defined in ACPI 4.0 spec.) /// -#define EFI_ACPI_4_0_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01 +#define EFI_ACPI_4_0_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01 /// /// ERST Serialization Actions /// -#define EFI_ACPI_4_0_ERST_BEGIN_WRITE_OPERATION 0x00 -#define EFI_ACPI_4_0_ERST_BEGIN_READ_OPERATION 0x01 -#define EFI_ACPI_4_0_ERST_BEGIN_CLEAR_OPERATION 0x02 -#define EFI_ACPI_4_0_ERST_END_OPERATION 0x03 -#define EFI_ACPI_4_0_ERST_SET_RECORD_OFFSET 0x04 -#define EFI_ACPI_4_0_ERST_EXECUTE_OPERATION 0x05 -#define EFI_ACPI_4_0_ERST_CHECK_BUSY_STATUS 0x06 -#define EFI_ACPI_4_0_ERST_GET_COMMAND_STATUS 0x07 -#define EFI_ACPI_4_0_ERST_GET_RECORD_IDENTIFIER 0x08 -#define EFI_ACPI_4_0_ERST_SET_RECORD_IDENTIFIER 0x09 -#define EFI_ACPI_4_0_ERST_GET_RECORD_COUNT 0x0A -#define EFI_ACPI_4_0_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B -#define EFI_ACPI_4_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D -#define EFI_ACPI_4_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E -#define EFI_ACPI_4_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F +#define EFI_ACPI_4_0_ERST_BEGIN_WRITE_OPERATION 0x00 +#define EFI_ACPI_4_0_ERST_BEGIN_READ_OPERATION 0x01 +#define EFI_ACPI_4_0_ERST_BEGIN_CLEAR_OPERATION 0x02 +#define EFI_ACPI_4_0_ERST_END_OPERATION 0x03 +#define EFI_ACPI_4_0_ERST_SET_RECORD_OFFSET 0x04 +#define EFI_ACPI_4_0_ERST_EXECUTE_OPERATION 0x05 +#define EFI_ACPI_4_0_ERST_CHECK_BUSY_STATUS 0x06 +#define EFI_ACPI_4_0_ERST_GET_COMMAND_STATUS 0x07 +#define EFI_ACPI_4_0_ERST_GET_RECORD_IDENTIFIER 0x08 +#define EFI_ACPI_4_0_ERST_SET_RECORD_IDENTIFIER 0x09 +#define EFI_ACPI_4_0_ERST_GET_RECORD_COUNT 0x0A +#define EFI_ACPI_4_0_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B +#define EFI_ACPI_4_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D +#define EFI_ACPI_4_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E +#define EFI_ACPI_4_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F /// /// ERST Action Command Status /// -#define EFI_ACPI_4_0_EINJ_STATUS_SUCCESS 0x00 -#define EFI_ACPI_4_0_EINJ_STATUS_NOT_ENOUGH_SPACE 0x01 -#define EFI_ACPI_4_0_EINJ_STATUS_HARDWARE_NOT_AVAILABLE 0x02 -#define EFI_ACPI_4_0_EINJ_STATUS_FAILED 0x03 -#define EFI_ACPI_4_0_EINJ_STATUS_RECORD_STORE_EMPTY 0x04 -#define EFI_ACPI_4_0_EINJ_STATUS_RECORD_NOT_FOUND 0x05 +#define EFI_ACPI_4_0_EINJ_STATUS_SUCCESS 0x00 +#define EFI_ACPI_4_0_EINJ_STATUS_NOT_ENOUGH_SPACE 0x01 +#define EFI_ACPI_4_0_EINJ_STATUS_HARDWARE_NOT_AVAILABLE 0x02 +#define EFI_ACPI_4_0_EINJ_STATUS_FAILED 0x03 +#define EFI_ACPI_4_0_EINJ_STATUS_RECORD_STORE_EMPTY 0x04 +#define EFI_ACPI_4_0_EINJ_STATUS_RECORD_NOT_FOUND 0x05 /// /// ERST Serialization Instructions /// -#define EFI_ACPI_4_0_ERST_READ_REGISTER 0x00 -#define EFI_ACPI_4_0_ERST_READ_REGISTER_VALUE 0x01 -#define EFI_ACPI_4_0_ERST_WRITE_REGISTER 0x02 -#define EFI_ACPI_4_0_ERST_WRITE_REGISTER_VALUE 0x03 -#define EFI_ACPI_4_0_ERST_NOOP 0x04 -#define EFI_ACPI_4_0_ERST_LOAD_VAR1 0x05 -#define EFI_ACPI_4_0_ERST_LOAD_VAR2 0x06 -#define EFI_ACPI_4_0_ERST_STORE_VAR1 0x07 -#define EFI_ACPI_4_0_ERST_ADD 0x08 -#define EFI_ACPI_4_0_ERST_SUBTRACT 0x09 -#define EFI_ACPI_4_0_ERST_ADD_VALUE 0x0A -#define EFI_ACPI_4_0_ERST_SUBTRACT_VALUE 0x0B -#define EFI_ACPI_4_0_ERST_STALL 0x0C -#define EFI_ACPI_4_0_ERST_STALL_WHILE_TRUE 0x0D -#define EFI_ACPI_4_0_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E -#define EFI_ACPI_4_0_ERST_GOTO 0x0F -#define EFI_ACPI_4_0_ERST_SET_SRC_ADDRESS_BASE 0x10 -#define EFI_ACPI_4_0_ERST_SET_DST_ADDRESS_BASE 0x11 -#define EFI_ACPI_4_0_ERST_MOVE_DATA 0x12 +#define EFI_ACPI_4_0_ERST_READ_REGISTER 0x00 +#define EFI_ACPI_4_0_ERST_READ_REGISTER_VALUE 0x01 +#define EFI_ACPI_4_0_ERST_WRITE_REGISTER 0x02 +#define EFI_ACPI_4_0_ERST_WRITE_REGISTER_VALUE 0x03 +#define EFI_ACPI_4_0_ERST_NOOP 0x04 +#define EFI_ACPI_4_0_ERST_LOAD_VAR1 0x05 +#define EFI_ACPI_4_0_ERST_LOAD_VAR2 0x06 +#define EFI_ACPI_4_0_ERST_STORE_VAR1 0x07 +#define EFI_ACPI_4_0_ERST_ADD 0x08 +#define EFI_ACPI_4_0_ERST_SUBTRACT 0x09 +#define EFI_ACPI_4_0_ERST_ADD_VALUE 0x0A +#define EFI_ACPI_4_0_ERST_SUBTRACT_VALUE 0x0B +#define EFI_ACPI_4_0_ERST_STALL 0x0C +#define EFI_ACPI_4_0_ERST_STALL_WHILE_TRUE 0x0D +#define EFI_ACPI_4_0_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E +#define EFI_ACPI_4_0_ERST_GOTO 0x0F +#define EFI_ACPI_4_0_ERST_SET_SRC_ADDRESS_BASE 0x10 +#define EFI_ACPI_4_0_ERST_SET_DST_ADDRESS_BASE 0x11 +#define EFI_ACPI_4_0_ERST_MOVE_DATA 0x12 /// /// ERST Instruction Flags /// -#define EFI_ACPI_4_0_ERST_PRESERVE_REGISTER 0x01 +#define EFI_ACPI_4_0_ERST_PRESERVE_REGISTER 0x01 /// /// ERST Serialization Instruction Entry /// typedef struct { - UINT8 SerializationAction; - UINT8 Instruction; - UINT8 Flags; - UINT8 Reserved0; - EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion; - UINT64 Value; - UINT64 Mask; + UINT8 SerializationAction; + UINT8 Instruction; + UINT8 Flags; + UINT8 Reserved0; + EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion; + UINT64 Value; + UINT64 Mask; } EFI_ACPI_4_0_ERST_SERIALIZATION_INSTRUCTION_ENTRY; /// /// EINJ - Error Injection Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 InjectionHeaderSize; - UINT8 InjectionFlags; - UINT8 Reserved0[3]; - UINT32 InjectionEntryCount; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 InjectionHeaderSize; + UINT8 InjectionFlags; + UINT8 Reserved0[3]; + UINT32 InjectionEntryCount; } EFI_ACPI_4_0_ERROR_INJECTION_TABLE_HEADER; /// /// EINJ Version (as defined in ACPI 4.0 spec.) /// -#define EFI_ACPI_4_0_ERROR_INJECTION_TABLE_REVISION 0x01 +#define EFI_ACPI_4_0_ERROR_INJECTION_TABLE_REVISION 0x01 /// /// EINJ Error Injection Actions /// -#define EFI_ACPI_4_0_EINJ_BEGIN_INJECTION_OPERATION 0x00 -#define EFI_ACPI_4_0_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01 -#define EFI_ACPI_4_0_EINJ_SET_ERROR_TYPE 0x02 -#define EFI_ACPI_4_0_EINJ_GET_ERROR_TYPE 0x03 -#define EFI_ACPI_4_0_EINJ_END_OPERATION 0x04 -#define EFI_ACPI_4_0_EINJ_EXECUTE_OPERATION 0x05 -#define EFI_ACPI_4_0_EINJ_CHECK_BUSY_STATUS 0x06 -#define EFI_ACPI_4_0_EINJ_GET_COMMAND_STATUS 0x07 -#define EFI_ACPI_4_0_EINJ_TRIGGER_ERROR 0xFF +#define EFI_ACPI_4_0_EINJ_BEGIN_INJECTION_OPERATION 0x00 +#define EFI_ACPI_4_0_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01 +#define EFI_ACPI_4_0_EINJ_SET_ERROR_TYPE 0x02 +#define EFI_ACPI_4_0_EINJ_GET_ERROR_TYPE 0x03 +#define EFI_ACPI_4_0_EINJ_END_OPERATION 0x04 +#define EFI_ACPI_4_0_EINJ_EXECUTE_OPERATION 0x05 +#define EFI_ACPI_4_0_EINJ_CHECK_BUSY_STATUS 0x06 +#define EFI_ACPI_4_0_EINJ_GET_COMMAND_STATUS 0x07 +#define EFI_ACPI_4_0_EINJ_TRIGGER_ERROR 0xFF /// /// EINJ Action Command Status /// -#define EFI_ACPI_4_0_EINJ_STATUS_SUCCESS 0x00 -#define EFI_ACPI_4_0_EINJ_STATUS_UNKNOWN_FAILURE 0x01 -#define EFI_ACPI_4_0_EINJ_STATUS_INVALID_ACCESS 0x02 +#define EFI_ACPI_4_0_EINJ_STATUS_SUCCESS 0x00 +#define EFI_ACPI_4_0_EINJ_STATUS_UNKNOWN_FAILURE 0x01 +#define EFI_ACPI_4_0_EINJ_STATUS_INVALID_ACCESS 0x02 /// /// EINJ Error Type Definition /// -#define EFI_ACPI_4_0_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0) -#define EFI_ACPI_4_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1) -#define EFI_ACPI_4_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2) -#define EFI_ACPI_4_0_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3) -#define EFI_ACPI_4_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4) -#define EFI_ACPI_4_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5) -#define EFI_ACPI_4_0_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6) -#define EFI_ACPI_4_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7) -#define EFI_ACPI_4_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8) -#define EFI_ACPI_4_0_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9) -#define EFI_ACPI_4_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10) -#define EFI_ACPI_4_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11) +#define EFI_ACPI_4_0_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0) +#define EFI_ACPI_4_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1) +#define EFI_ACPI_4_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2) +#define EFI_ACPI_4_0_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3) +#define EFI_ACPI_4_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4) +#define EFI_ACPI_4_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5) +#define EFI_ACPI_4_0_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6) +#define EFI_ACPI_4_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7) +#define EFI_ACPI_4_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8) +#define EFI_ACPI_4_0_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9) +#define EFI_ACPI_4_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10) +#define EFI_ACPI_4_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11) /// /// EINJ Injection Instructions /// -#define EFI_ACPI_4_0_EINJ_READ_REGISTER 0x00 -#define EFI_ACPI_4_0_EINJ_READ_REGISTER_VALUE 0x01 -#define EFI_ACPI_4_0_EINJ_WRITE_REGISTER 0x02 -#define EFI_ACPI_4_0_EINJ_WRITE_REGISTER_VALUE 0x03 -#define EFI_ACPI_4_0_EINJ_NOOP 0x04 +#define EFI_ACPI_4_0_EINJ_READ_REGISTER 0x00 +#define EFI_ACPI_4_0_EINJ_READ_REGISTER_VALUE 0x01 +#define EFI_ACPI_4_0_EINJ_WRITE_REGISTER 0x02 +#define EFI_ACPI_4_0_EINJ_WRITE_REGISTER_VALUE 0x03 +#define EFI_ACPI_4_0_EINJ_NOOP 0x04 /// /// EINJ Instruction Flags /// -#define EFI_ACPI_4_0_EINJ_PRESERVE_REGISTER 0x01 +#define EFI_ACPI_4_0_EINJ_PRESERVE_REGISTER 0x01 /// /// EINJ Injection Instruction Entry /// typedef struct { - UINT8 InjectionAction; - UINT8 Instruction; - UINT8 Flags; - UINT8 Reserved0; - EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion; - UINT64 Value; - UINT64 Mask; + UINT8 InjectionAction; + UINT8 Instruction; + UINT8 Flags; + UINT8 Reserved0; + EFI_ACPI_4_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion; + UINT64 Value; + UINT64 Mask; } EFI_ACPI_4_0_EINJ_INJECTION_INSTRUCTION_ENTRY; /// /// EINJ Trigger Action Table /// typedef struct { - UINT32 HeaderSize; - UINT32 Revision; - UINT32 TableSize; - UINT32 EntryCount; + UINT32 HeaderSize; + UINT32 Revision; + UINT32 TableSize; + UINT32 EntryCount; } EFI_ACPI_4_0_EINJ_TRIGGER_ACTION_TABLE; // diff --git a/MdePkg/Include/IndustryStandard/Acpi50.h b/MdePkg/Include/IndustryStandard/Acpi50.h index 83d787c..be8f85f 100644 --- a/MdePkg/Include/IndustryStandard/Acpi50.h +++ b/MdePkg/Include/IndustryStandard/Acpi50.h @@ -15,13 +15,13 @@ // // Define for Descriptor // -#define ACPI_SMALL_FIXED_DMA_DESCRIPTOR_NAME 0x0A -#define ACPI_LARGE_GPIO_CONNECTION_DESCRIPTOR_NAME 0x0C -#define ACPI_LARGE_GENERIC_SERIAL_BUS_CONNECTION_DESCRIPTOR_NAME 0x0E +#define ACPI_SMALL_FIXED_DMA_DESCRIPTOR_NAME 0x0A +#define ACPI_LARGE_GPIO_CONNECTION_DESCRIPTOR_NAME 0x0C +#define ACPI_LARGE_GENERIC_SERIAL_BUS_CONNECTION_DESCRIPTOR_NAME 0x0E -#define ACPI_FIXED_DMA_DESCRIPTOR 0x55 -#define ACPI_GPIO_CONNECTION_DESCRIPTOR 0x8C -#define ACPI_GENERIC_SERIAL_BUS_CONNECTION_DESCRIPTOR 0x8E +#define ACPI_FIXED_DMA_DESCRIPTOR 0x55 +#define ACPI_GPIO_CONNECTION_DESCRIPTOR 0x8C +#define ACPI_GENERIC_SERIAL_BUS_CONNECTION_DESCRIPTOR 0x8E #pragma pack(1) @@ -29,10 +29,10 @@ /// Generic DMA Descriptor. /// typedef PACKED struct { - ACPI_SMALL_RESOURCE_HEADER Header; - UINT16 DmaRequestLine; - UINT16 DmaChannel; - UINT8 DmaTransferWidth; + ACPI_SMALL_RESOURCE_HEADER Header; + UINT16 DmaRequestLine; + UINT16 DmaChannel; + UINT8 DmaTransferWidth; } EFI_ACPI_FIXED_DMA_DESCRIPTOR; /// @@ -54,8 +54,8 @@ typedef PACKED struct { UINT16 VendorDataLength; } EFI_ACPI_GPIO_CONNECTION_DESCRIPTOR; -#define EFI_ACPI_GPIO_CONNECTION_TYPE_INTERRUPT 0x0 -#define EFI_ACPI_GPIO_CONNECTION_TYPE_IO 0x1 +#define EFI_ACPI_GPIO_CONNECTION_TYPE_INTERRUPT 0x0 +#define EFI_ACPI_GPIO_CONNECTION_TYPE_IO 0x1 /// /// Serial Bus Resource Descriptor (Generic) @@ -69,7 +69,7 @@ typedef PACKED struct { UINT16 TypeSpecificFlags; UINT8 TypeSpecificRevisionId; UINT16 TypeDataLength; -// Type specific data + // Type specific data } EFI_ACPI_SERIAL_BUS_RESOURCE_DESCRIPTOR; #define EFI_ACPI_SERIAL_BUS_RESOURCE_TYPE_I2C 0x1 @@ -141,21 +141,21 @@ typedef PACKED struct { /// ACPI 5.0 Generic Address Space definition /// typedef struct { - UINT8 AddressSpaceId; - UINT8 RegisterBitWidth; - UINT8 RegisterBitOffset; - UINT8 AccessSize; - UINT64 Address; + UINT8 AddressSpaceId; + UINT8 RegisterBitWidth; + UINT8 RegisterBitOffset; + UINT8 AccessSize; + UINT64 Address; } EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE; // // Generic Address Space Address IDs // -#define EFI_ACPI_5_0_SYSTEM_MEMORY 0 -#define EFI_ACPI_5_0_SYSTEM_IO 1 -#define EFI_ACPI_5_0_PCI_CONFIGURATION_SPACE 2 -#define EFI_ACPI_5_0_EMBEDDED_CONTROLLER 3 -#define EFI_ACPI_5_0_SMBUS 4 +#define EFI_ACPI_5_0_SYSTEM_MEMORY 0 +#define EFI_ACPI_5_0_SYSTEM_IO 1 +#define EFI_ACPI_5_0_PCI_CONFIGURATION_SPACE 2 +#define EFI_ACPI_5_0_EMBEDDED_CONTROLLER 3 +#define EFI_ACPI_5_0_SMBUS 4 #define EFI_ACPI_5_0_PLATFORM_COMMUNICATION_CHANNEL 0x0A #define EFI_ACPI_5_0_FUNCTIONAL_FIXED_HARDWARE 0x7F @@ -176,29 +176,29 @@ typedef struct { /// Root System Description Pointer Structure /// typedef struct { - UINT64 Signature; - UINT8 Checksum; - UINT8 OemId[6]; - UINT8 Revision; - UINT32 RsdtAddress; - UINT32 Length; - UINT64 XsdtAddress; - UINT8 ExtendedChecksum; - UINT8 Reserved[3]; + UINT64 Signature; + UINT8 Checksum; + UINT8 OemId[6]; + UINT8 Revision; + UINT32 RsdtAddress; + UINT32 Length; + UINT64 XsdtAddress; + UINT8 ExtendedChecksum; + UINT8 Reserved[3]; } EFI_ACPI_5_0_ROOT_SYSTEM_DESCRIPTION_POINTER; /// /// RSD_PTR Revision (as defined in ACPI 5.0 spec.) /// -#define EFI_ACPI_5_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 5.0) says current value is 2 +#define EFI_ACPI_5_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 5.0) says current value is 2 /// /// Common table header, this prefaces all ACPI tables, including FACS, but /// excluding the RSD PTR structure /// typedef struct { - UINT32 Signature; - UINT32 Length; + UINT32 Signature; + UINT32 Length; } EFI_ACPI_5_0_COMMON_HEADER; // @@ -210,7 +210,7 @@ typedef struct { /// /// RSDT Revision (as defined in ACPI 5.0 spec.) /// -#define EFI_ACPI_5_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_5_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 // // Extended System Description Table @@ -221,66 +221,66 @@ typedef struct { /// /// XSDT Revision (as defined in ACPI 5.0 spec.) /// -#define EFI_ACPI_5_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_5_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 /// /// Fixed ACPI Description Table Structure (FADT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 FirmwareCtrl; - UINT32 Dsdt; - UINT8 Reserved0; - UINT8 PreferredPmProfile; - UINT16 SciInt; - UINT32 SmiCmd; - UINT8 AcpiEnable; - UINT8 AcpiDisable; - UINT8 S4BiosReq; - UINT8 PstateCnt; - UINT32 Pm1aEvtBlk; - UINT32 Pm1bEvtBlk; - UINT32 Pm1aCntBlk; - UINT32 Pm1bCntBlk; - UINT32 Pm2CntBlk; - UINT32 PmTmrBlk; - UINT32 Gpe0Blk; - UINT32 Gpe1Blk; - UINT8 Pm1EvtLen; - UINT8 Pm1CntLen; - UINT8 Pm2CntLen; - UINT8 PmTmrLen; - UINT8 Gpe0BlkLen; - UINT8 Gpe1BlkLen; - UINT8 Gpe1Base; - UINT8 CstCnt; - UINT16 PLvl2Lat; - UINT16 PLvl3Lat; - UINT16 FlushSize; - UINT16 FlushStride; - UINT8 DutyOffset; - UINT8 DutyWidth; - UINT8 DayAlrm; - UINT8 MonAlrm; - UINT8 Century; - UINT16 IaPcBootArch; - UINT8 Reserved1; - UINT32 Flags; - EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE ResetReg; - UINT8 ResetValue; - UINT8 Reserved2[3]; - UINT64 XFirmwareCtrl; - UINT64 XDsdt; - EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk; - EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk; - EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk; - EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk; - EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk; - EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk; - EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk; - EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk; - EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE SleepControlReg; - EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE SleepStatusReg; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 FirmwareCtrl; + UINT32 Dsdt; + UINT8 Reserved0; + UINT8 PreferredPmProfile; + UINT16 SciInt; + UINT32 SmiCmd; + UINT8 AcpiEnable; + UINT8 AcpiDisable; + UINT8 S4BiosReq; + UINT8 PstateCnt; + UINT32 Pm1aEvtBlk; + UINT32 Pm1bEvtBlk; + UINT32 Pm1aCntBlk; + UINT32 Pm1bCntBlk; + UINT32 Pm2CntBlk; + UINT32 PmTmrBlk; + UINT32 Gpe0Blk; + UINT32 Gpe1Blk; + UINT8 Pm1EvtLen; + UINT8 Pm1CntLen; + UINT8 Pm2CntLen; + UINT8 PmTmrLen; + UINT8 Gpe0BlkLen; + UINT8 Gpe1BlkLen; + UINT8 Gpe1Base; + UINT8 CstCnt; + UINT16 PLvl2Lat; + UINT16 PLvl3Lat; + UINT16 FlushSize; + UINT16 FlushStride; + UINT8 DutyOffset; + UINT8 DutyWidth; + UINT8 DayAlrm; + UINT8 MonAlrm; + UINT8 Century; + UINT16 IaPcBootArch; + UINT8 Reserved1; + UINT32 Flags; + EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE ResetReg; + UINT8 ResetValue; + UINT8 Reserved2[3]; + UINT64 XFirmwareCtrl; + UINT64 XDsdt; + EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk; + EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk; + EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk; + EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk; + EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk; + EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk; + EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk; + EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk; + EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE SleepControlReg; + EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE SleepStatusReg; } EFI_ACPI_5_0_FIXED_ACPI_DESCRIPTION_TABLE; /// @@ -305,55 +305,55 @@ typedef struct { // Fixed ACPI Description Table Boot Architecture Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_5_0_LEGACY_DEVICES BIT0 -#define EFI_ACPI_5_0_8042 BIT1 -#define EFI_ACPI_5_0_VGA_NOT_PRESENT BIT2 -#define EFI_ACPI_5_0_MSI_NOT_SUPPORTED BIT3 -#define EFI_ACPI_5_0_PCIE_ASPM_CONTROLS BIT4 -#define EFI_ACPI_5_0_CMOS_RTC_NOT_PRESENT BIT5 +#define EFI_ACPI_5_0_LEGACY_DEVICES BIT0 +#define EFI_ACPI_5_0_8042 BIT1 +#define EFI_ACPI_5_0_VGA_NOT_PRESENT BIT2 +#define EFI_ACPI_5_0_MSI_NOT_SUPPORTED BIT3 +#define EFI_ACPI_5_0_PCIE_ASPM_CONTROLS BIT4 +#define EFI_ACPI_5_0_CMOS_RTC_NOT_PRESENT BIT5 // // Fixed ACPI Description Table Fixed Feature Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_5_0_WBINVD BIT0 -#define EFI_ACPI_5_0_WBINVD_FLUSH BIT1 -#define EFI_ACPI_5_0_PROC_C1 BIT2 -#define EFI_ACPI_5_0_P_LVL2_UP BIT3 -#define EFI_ACPI_5_0_PWR_BUTTON BIT4 -#define EFI_ACPI_5_0_SLP_BUTTON BIT5 -#define EFI_ACPI_5_0_FIX_RTC BIT6 -#define EFI_ACPI_5_0_RTC_S4 BIT7 -#define EFI_ACPI_5_0_TMR_VAL_EXT BIT8 -#define EFI_ACPI_5_0_DCK_CAP BIT9 -#define EFI_ACPI_5_0_RESET_REG_SUP BIT10 -#define EFI_ACPI_5_0_SEALED_CASE BIT11 -#define EFI_ACPI_5_0_HEADLESS BIT12 -#define EFI_ACPI_5_0_CPU_SW_SLP BIT13 -#define EFI_ACPI_5_0_PCI_EXP_WAK BIT14 -#define EFI_ACPI_5_0_USE_PLATFORM_CLOCK BIT15 -#define EFI_ACPI_5_0_S4_RTC_STS_VALID BIT16 -#define EFI_ACPI_5_0_REMOTE_POWER_ON_CAPABLE BIT17 -#define EFI_ACPI_5_0_FORCE_APIC_CLUSTER_MODEL BIT18 -#define EFI_ACPI_5_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19 -#define EFI_ACPI_5_0_HW_REDUCED_ACPI BIT20 -#define EFI_ACPI_5_0_LOW_POWER_S0_IDLE_CAPABLE BIT21 +#define EFI_ACPI_5_0_WBINVD BIT0 +#define EFI_ACPI_5_0_WBINVD_FLUSH BIT1 +#define EFI_ACPI_5_0_PROC_C1 BIT2 +#define EFI_ACPI_5_0_P_LVL2_UP BIT3 +#define EFI_ACPI_5_0_PWR_BUTTON BIT4 +#define EFI_ACPI_5_0_SLP_BUTTON BIT5 +#define EFI_ACPI_5_0_FIX_RTC BIT6 +#define EFI_ACPI_5_0_RTC_S4 BIT7 +#define EFI_ACPI_5_0_TMR_VAL_EXT BIT8 +#define EFI_ACPI_5_0_DCK_CAP BIT9 +#define EFI_ACPI_5_0_RESET_REG_SUP BIT10 +#define EFI_ACPI_5_0_SEALED_CASE BIT11 +#define EFI_ACPI_5_0_HEADLESS BIT12 +#define EFI_ACPI_5_0_CPU_SW_SLP BIT13 +#define EFI_ACPI_5_0_PCI_EXP_WAK BIT14 +#define EFI_ACPI_5_0_USE_PLATFORM_CLOCK BIT15 +#define EFI_ACPI_5_0_S4_RTC_STS_VALID BIT16 +#define EFI_ACPI_5_0_REMOTE_POWER_ON_CAPABLE BIT17 +#define EFI_ACPI_5_0_FORCE_APIC_CLUSTER_MODEL BIT18 +#define EFI_ACPI_5_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19 +#define EFI_ACPI_5_0_HW_REDUCED_ACPI BIT20 +#define EFI_ACPI_5_0_LOW_POWER_S0_IDLE_CAPABLE BIT21 /// /// Firmware ACPI Control Structure /// typedef struct { - UINT32 Signature; - UINT32 Length; - UINT32 HardwareSignature; - UINT32 FirmwareWakingVector; - UINT32 GlobalLock; - UINT32 Flags; - UINT64 XFirmwareWakingVector; - UINT8 Version; - UINT8 Reserved0[3]; - UINT32 OspmFlags; - UINT8 Reserved1[24]; + UINT32 Signature; + UINT32 Length; + UINT32 HardwareSignature; + UINT32 FirmwareWakingVector; + UINT32 GlobalLock; + UINT32 Flags; + UINT64 XFirmwareWakingVector; + UINT8 Version; + UINT8 Reserved0[3]; + UINT32 OspmFlags; + UINT8 Reserved1[24]; } EFI_ACPI_5_0_FIRMWARE_ACPI_CONTROL_STRUCTURE; /// @@ -365,14 +365,14 @@ typedef struct { /// Firmware Control Structure Feature Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_5_0_S4BIOS_F BIT0 -#define EFI_ACPI_5_0_64BIT_WAKE_SUPPORTED_F BIT1 +#define EFI_ACPI_5_0_S4BIOS_F BIT0 +#define EFI_ACPI_5_0_64BIT_WAKE_SUPPORTED_F BIT1 /// /// OSPM Enabled Firmware Control Structure Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_5_0_OSPM_64BIT_WAKE_F BIT0 +#define EFI_ACPI_5_0_OSPM_64BIT_WAKE_F BIT0 // // Differentiated System Description Table, @@ -381,29 +381,29 @@ typedef struct { // no definition needed as they are common description table header, the same with // EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block. // -#define EFI_ACPI_5_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 -#define EFI_ACPI_5_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 +#define EFI_ACPI_5_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 +#define EFI_ACPI_5_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 /// /// Multiple APIC Description Table header definition. The rest of the table /// must be defined in a platform specific manner. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 LocalApicAddress; - UINT32 Flags; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 LocalApicAddress; + UINT32 Flags; } EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER; /// /// MADT Revision (as defined in ACPI 5.0 spec.) /// -#define EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x03 +#define EFI_ACPI_5_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x03 /// /// Multiple APIC Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_5_0_PCAT_COMPAT BIT0 +#define EFI_ACPI_5_0_PCAT_COMPAT BIT0 // // Multiple APIC Description Table APIC structure types @@ -432,57 +432,57 @@ typedef struct { /// Processor Local APIC Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorId; - UINT8 ApicId; - UINT32 Flags; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorId; + UINT8 ApicId; + UINT32 Flags; } EFI_ACPI_5_0_PROCESSOR_LOCAL_APIC_STRUCTURE; /// /// Local APIC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_5_0_LOCAL_APIC_ENABLED BIT0 +#define EFI_ACPI_5_0_LOCAL_APIC_ENABLED BIT0 /// /// IO APIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 IoApicId; - UINT8 Reserved; - UINT32 IoApicAddress; - UINT32 GlobalSystemInterruptBase; + UINT8 Type; + UINT8 Length; + UINT8 IoApicId; + UINT8 Reserved; + UINT32 IoApicAddress; + UINT32 GlobalSystemInterruptBase; } EFI_ACPI_5_0_IO_APIC_STRUCTURE; /// /// Interrupt Source Override Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Bus; - UINT8 Source; - UINT32 GlobalSystemInterrupt; - UINT16 Flags; + UINT8 Type; + UINT8 Length; + UINT8 Bus; + UINT8 Source; + UINT32 GlobalSystemInterrupt; + UINT16 Flags; } EFI_ACPI_5_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE; /// /// Platform Interrupt Sources Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT8 InterruptType; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT8 IoSapicVector; - UINT32 GlobalSystemInterrupt; - UINT32 PlatformInterruptSourceFlags; - UINT8 CpeiProcessorOverride; - UINT8 Reserved[31]; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT8 InterruptType; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT8 IoSapicVector; + UINT32 GlobalSystemInterrupt; + UINT32 PlatformInterruptSourceFlags; + UINT8 CpeiProcessorOverride; + UINT8 Reserved[31]; } EFI_ACPI_5_0_PLATFORM_INTERRUPT_APIC_STRUCTURE; // @@ -496,43 +496,43 @@ typedef struct { /// Non-Maskable Interrupt Source Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT32 GlobalSystemInterrupt; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT32 GlobalSystemInterrupt; } EFI_ACPI_5_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE; /// /// Local APIC NMI Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorId; - UINT16 Flags; - UINT8 LocalApicLint; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorId; + UINT16 Flags; + UINT8 LocalApicLint; } EFI_ACPI_5_0_LOCAL_APIC_NMI_STRUCTURE; /// /// Local APIC Address Override Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT64 LocalApicAddress; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT64 LocalApicAddress; } EFI_ACPI_5_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE; /// /// IO SAPIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 IoApicId; - UINT8 Reserved; - UINT32 GlobalSystemInterruptBase; - UINT64 IoSapicAddress; + UINT8 Type; + UINT8 Length; + UINT8 IoApicId; + UINT8 Reserved; + UINT32 GlobalSystemInterruptBase; + UINT64 IoSapicAddress; } EFI_ACPI_5_0_IO_SAPIC_STRUCTURE; /// @@ -540,110 +540,110 @@ typedef struct { /// This struct followed by a null-terminated ASCII string - ACPI Processor UID String /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorId; - UINT8 LocalSapicId; - UINT8 LocalSapicEid; - UINT8 Reserved[3]; - UINT32 Flags; - UINT32 ACPIProcessorUIDValue; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorId; + UINT8 LocalSapicId; + UINT8 LocalSapicEid; + UINT8 Reserved[3]; + UINT32 Flags; + UINT32 ACPIProcessorUIDValue; } EFI_ACPI_5_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE; /// /// Platform Interrupt Sources Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT8 InterruptType; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT8 IoSapicVector; - UINT32 GlobalSystemInterrupt; - UINT32 PlatformInterruptSourceFlags; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT8 InterruptType; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT8 IoSapicVector; + UINT32 GlobalSystemInterrupt; + UINT32 PlatformInterruptSourceFlags; } EFI_ACPI_5_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE; /// /// Platform Interrupt Source Flags. /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_5_0_CPEI_PROCESSOR_OVERRIDE BIT0 +#define EFI_ACPI_5_0_CPEI_PROCESSOR_OVERRIDE BIT0 /// /// Processor Local x2APIC Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[2]; - UINT32 X2ApicId; - UINT32 Flags; - UINT32 AcpiProcessorUid; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[2]; + UINT32 X2ApicId; + UINT32 Flags; + UINT32 AcpiProcessorUid; } EFI_ACPI_5_0_PROCESSOR_LOCAL_X2APIC_STRUCTURE; /// /// Local x2APIC NMI Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT32 AcpiProcessorUid; - UINT8 LocalX2ApicLint; - UINT8 Reserved[3]; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT32 AcpiProcessorUid; + UINT8 LocalX2ApicLint; + UINT8 Reserved[3]; } EFI_ACPI_5_0_LOCAL_X2APIC_NMI_STRUCTURE; /// /// GIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT32 GicId; - UINT32 AcpiProcessorUid; - UINT32 Flags; - UINT32 ParkingProtocolVersion; - UINT32 PerformanceInterruptGsiv; - UINT64 ParkedAddress; - UINT64 PhysicalBaseAddress; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT32 GicId; + UINT32 AcpiProcessorUid; + UINT32 Flags; + UINT32 ParkingProtocolVersion; + UINT32 PerformanceInterruptGsiv; + UINT64 ParkedAddress; + UINT64 PhysicalBaseAddress; } EFI_ACPI_5_0_GIC_STRUCTURE; /// /// GIC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_5_0_GIC_ENABLED BIT0 -#define EFI_ACPI_5_0_PERFORMANCE_INTERRUPT_MODEL BIT1 +#define EFI_ACPI_5_0_GIC_ENABLED BIT0 +#define EFI_ACPI_5_0_PERFORMANCE_INTERRUPT_MODEL BIT1 /// /// GIC Distributor Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved1; - UINT32 GicId; - UINT64 PhysicalBaseAddress; - UINT32 SystemVectorBase; - UINT32 Reserved2; + UINT8 Type; + UINT8 Length; + UINT16 Reserved1; + UINT32 GicId; + UINT64 PhysicalBaseAddress; + UINT32 SystemVectorBase; + UINT32 Reserved2; } EFI_ACPI_5_0_GIC_DISTRIBUTOR_STRUCTURE; /// /// Smart Battery Description Table (SBST) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 WarningEnergyLevel; - UINT32 LowEnergyLevel; - UINT32 CriticalEnergyLevel; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 WarningEnergyLevel; + UINT32 LowEnergyLevel; + UINT32 CriticalEnergyLevel; } EFI_ACPI_5_0_SMART_BATTERY_DESCRIPTION_TABLE; /// /// SBST Version (as defined in ACPI 5.0 spec.) /// -#define EFI_ACPI_5_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_5_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01 /// /// Embedded Controller Boot Resources Table (ECDT) @@ -651,11 +651,11 @@ typedef struct { /// a fully qualified reference to the name space object. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE EcControl; - EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE EcData; - UINT32 Uid; - UINT8 GpeBit; + EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE EcControl; + EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE EcData; + UINT32 Uid; + UINT8 GpeBit; } EFI_ACPI_5_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE; /// @@ -668,9 +668,9 @@ typedef struct { /// must be defined in a platform specific manner. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 Reserved1; ///< Must be set to 1 - UINT64 Reserved2; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 Reserved1; ///< Must be set to 1 + UINT64 Reserved2; } EFI_ACPI_5_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER; /// @@ -691,57 +691,57 @@ typedef struct { /// Processor Local APIC/SAPIC Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 ProximityDomain7To0; - UINT8 ApicId; - UINT32 Flags; - UINT8 LocalSapicEid; - UINT8 ProximityDomain31To8[3]; - UINT32 ClockDomain; + UINT8 Type; + UINT8 Length; + UINT8 ProximityDomain7To0; + UINT8 ApicId; + UINT32 Flags; + UINT8 LocalSapicEid; + UINT8 ProximityDomain31To8[3]; + UINT32 ClockDomain; } EFI_ACPI_5_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE; /// /// Local APIC/SAPIC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_5_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0) +#define EFI_ACPI_5_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0) /// /// Memory Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 ProximityDomain; - UINT16 Reserved1; - UINT32 AddressBaseLow; - UINT32 AddressBaseHigh; - UINT32 LengthLow; - UINT32 LengthHigh; - UINT32 Reserved2; - UINT32 Flags; - UINT64 Reserved3; + UINT8 Type; + UINT8 Length; + UINT32 ProximityDomain; + UINT16 Reserved1; + UINT32 AddressBaseLow; + UINT32 AddressBaseHigh; + UINT32 LengthLow; + UINT32 LengthHigh; + UINT32 Reserved2; + UINT32 Flags; + UINT64 Reserved3; } EFI_ACPI_5_0_MEMORY_AFFINITY_STRUCTURE; // // Memory Flags. All other bits are reserved and must be 0. // -#define EFI_ACPI_5_0_MEMORY_ENABLED (1 << 0) -#define EFI_ACPI_5_0_MEMORY_HOT_PLUGGABLE (1 << 1) -#define EFI_ACPI_5_0_MEMORY_NONVOLATILE (1 << 2) +#define EFI_ACPI_5_0_MEMORY_ENABLED (1 << 0) +#define EFI_ACPI_5_0_MEMORY_HOT_PLUGGABLE (1 << 1) +#define EFI_ACPI_5_0_MEMORY_NONVOLATILE (1 << 2) /// /// Processor Local x2APIC Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved1[2]; - UINT32 ProximityDomain; - UINT32 X2ApicId; - UINT32 Flags; - UINT32 ClockDomain; - UINT8 Reserved2[4]; + UINT8 Type; + UINT8 Length; + UINT8 Reserved1[2]; + UINT32 ProximityDomain; + UINT32 X2ApicId; + UINT32 Flags; + UINT32 ClockDomain; + UINT8 Reserved2[4]; } EFI_ACPI_5_0_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE; /// @@ -749,8 +749,8 @@ typedef struct { /// The rest of the table is a matrix. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT64 NumberOfSystemLocalities; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT64 NumberOfSystemLocalities; } EFI_ACPI_5_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER; /// @@ -762,14 +762,14 @@ typedef struct { /// Corrected Platform Error Polling Table (CPEP) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 Reserved[8]; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 Reserved[8]; } EFI_ACPI_5_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_HEADER; /// /// CPEP Version (as defined in ACPI 5.0 spec.) /// -#define EFI_ACPI_5_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01 +#define EFI_ACPI_5_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01 // // CPEP processor structure types. @@ -780,66 +780,66 @@ typedef struct { /// Corrected Platform Error Polling Processor Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT32 PollingInterval; + UINT8 Type; + UINT8 Length; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT32 PollingInterval; } EFI_ACPI_5_0_CPEP_PROCESSOR_APIC_SAPIC_STRUCTURE; /// /// Maximum System Characteristics Table (MSCT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 OffsetProxDomInfo; - UINT32 MaximumNumberOfProximityDomains; - UINT32 MaximumNumberOfClockDomains; - UINT64 MaximumPhysicalAddress; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 OffsetProxDomInfo; + UINT32 MaximumNumberOfProximityDomains; + UINT32 MaximumNumberOfClockDomains; + UINT64 MaximumPhysicalAddress; } EFI_ACPI_5_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_HEADER; /// /// MSCT Version (as defined in ACPI 5.0 spec.) /// -#define EFI_ACPI_5_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01 +#define EFI_ACPI_5_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01 /// /// Maximum Proximity Domain Information Structure Definition /// typedef struct { - UINT8 Revision; - UINT8 Length; - UINT32 ProximityDomainRangeLow; - UINT32 ProximityDomainRangeHigh; - UINT32 MaximumProcessorCapacity; - UINT64 MaximumMemoryCapacity; + UINT8 Revision; + UINT8 Length; + UINT32 ProximityDomainRangeLow; + UINT32 ProximityDomainRangeHigh; + UINT32 MaximumProcessorCapacity; + UINT64 MaximumMemoryCapacity; } EFI_ACPI_5_0_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE; /// /// ACPI RAS Feature Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 PlatformCommunicationChannelIdentifier[12]; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 PlatformCommunicationChannelIdentifier[12]; } EFI_ACPI_5_0_RAS_FEATURE_TABLE; /// /// RASF Version (as defined in ACPI 5.0 spec.) /// -#define EFI_ACPI_5_0_RAS_FEATURE_TABLE_REVISION 0x01 +#define EFI_ACPI_5_0_RAS_FEATURE_TABLE_REVISION 0x01 /// /// ACPI RASF Platform Communication Channel Shared Memory Region definition. /// typedef struct { - UINT32 Signature; - UINT16 Command; - UINT16 Status; - UINT16 Version; - UINT8 RASCapabilities[16]; - UINT8 SetRASCapabilities[16]; - UINT16 NumberOfRASFParameterBlocks; - UINT32 SetRASCapabilitiesStatus; + UINT32 Signature; + UINT16 Command; + UINT16 Status; + UINT16 Version; + UINT8 RASCapabilities[16]; + UINT8 SetRASCapabilities[16]; + UINT16 NumberOfRASFParameterBlocks; + UINT32 SetRASCapabilitiesStatus; } EFI_ACPI_5_0_RASF_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION; /// @@ -857,52 +857,52 @@ typedef struct { /// ACPI RASF Parameter Block structure for PATROL_SCRUB /// typedef struct { - UINT16 Type; - UINT16 Version; - UINT16 Length; - UINT16 PatrolScrubCommand; - UINT64 RequestedAddressRange[2]; - UINT64 ActualAddressRange[2]; - UINT16 Flags; - UINT8 RequestedSpeed; + UINT16 Type; + UINT16 Version; + UINT16 Length; + UINT16 PatrolScrubCommand; + UINT64 RequestedAddressRange[2]; + UINT64 ActualAddressRange[2]; + UINT16 Flags; + UINT8 RequestedSpeed; } EFI_ACPI_5_0_RASF_PATROL_SCRUB_PLATFORM_BLOCK_STRUCTURE; /// /// ACPI RASF Patrol Scrub command /// -#define EFI_ACPI_5_0_RASF_PATROL_SCRUB_COMMAND_GET_PATROL_PARAMETERS 0x01 -#define EFI_ACPI_5_0_RASF_PATROL_SCRUB_COMMAND_START_PATROL_SCRUBBER 0x02 -#define EFI_ACPI_5_0_RASF_PATROL_SCRUB_COMMAND_STOP_PATROL_SCRUBBER 0x03 +#define EFI_ACPI_5_0_RASF_PATROL_SCRUB_COMMAND_GET_PATROL_PARAMETERS 0x01 +#define EFI_ACPI_5_0_RASF_PATROL_SCRUB_COMMAND_START_PATROL_SCRUBBER 0x02 +#define EFI_ACPI_5_0_RASF_PATROL_SCRUB_COMMAND_STOP_PATROL_SCRUBBER 0x03 /// /// Memory Power State Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 PlatformCommunicationChannelIdentifier; - UINT8 Reserved[3]; -// Memory Power Node Structure -// Memory Power State Characteristics + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 PlatformCommunicationChannelIdentifier; + UINT8 Reserved[3]; + // Memory Power Node Structure + // Memory Power State Characteristics } EFI_ACPI_5_0_MEMORY_POWER_STATUS_TABLE; /// /// MPST Version (as defined in ACPI 5.0 spec.) /// -#define EFI_ACPI_5_0_MEMORY_POWER_STATE_TABLE_REVISION 0x01 +#define EFI_ACPI_5_0_MEMORY_POWER_STATE_TABLE_REVISION 0x01 /// /// MPST Platform Communication Channel Shared Memory Region definition. /// typedef struct { - UINT32 Signature; - UINT16 Command; - UINT16 Status; - UINT32 MemoryPowerCommandRegister; - UINT32 MemoryPowerStatusRegister; - UINT32 PowerStateId; - UINT32 MemoryPowerNodeId; - UINT64 MemoryEnergyConsumed; - UINT64 ExpectedAveragePowerComsuned; + UINT32 Signature; + UINT16 Command; + UINT16 Status; + UINT32 MemoryPowerCommandRegister; + UINT32 MemoryPowerStatusRegister; + UINT32 PowerStateId; + UINT32 MemoryPowerNodeId; + UINT64 MemoryEnergyConsumed; + UINT64 ExpectedAveragePowerComsuned; } EFI_ACPI_5_0_MPST_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION; /// @@ -913,188 +913,188 @@ typedef struct { /// /// ACPI MPST Memory Power command /// -#define EFI_ACPI_5_0_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_POWER_STATE 0x01 -#define EFI_ACPI_5_0_MPST_MEMORY_POWER_COMMAND_SET_MEMORY_POWER_STATE 0x02 -#define EFI_ACPI_5_0_MPST_MEMORY_POWER_COMMAND_GET_AVERAGE_POWER_CONSUMED 0x03 -#define EFI_ACPI_5_0_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_ENERGY_CONSUMED 0x04 +#define EFI_ACPI_5_0_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_POWER_STATE 0x01 +#define EFI_ACPI_5_0_MPST_MEMORY_POWER_COMMAND_SET_MEMORY_POWER_STATE 0x02 +#define EFI_ACPI_5_0_MPST_MEMORY_POWER_COMMAND_GET_AVERAGE_POWER_CONSUMED 0x03 +#define EFI_ACPI_5_0_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_ENERGY_CONSUMED 0x04 /// /// MPST Memory Power Node Table /// typedef struct { - UINT8 PowerStateValue; - UINT8 PowerStateInformationIndex; + UINT8 PowerStateValue; + UINT8 PowerStateInformationIndex; } EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE; typedef struct { - UINT8 Flag; - UINT8 Reserved; - UINT16 MemoryPowerNodeId; - UINT32 Length; - UINT64 AddressBase; - UINT64 AddressLength; - UINT32 NumberOfPowerStates; - UINT32 NumberOfPhysicalComponents; -//EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE MemoryPowerState[NumberOfPowerStates]; -//UINT16 PhysicalComponentIdentifier[NumberOfPhysicalComponents]; + UINT8 Flag; + UINT8 Reserved; + UINT16 MemoryPowerNodeId; + UINT32 Length; + UINT64 AddressBase; + UINT64 AddressLength; + UINT32 NumberOfPowerStates; + UINT32 NumberOfPhysicalComponents; + // EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE MemoryPowerState[NumberOfPowerStates]; + // UINT16 PhysicalComponentIdentifier[NumberOfPhysicalComponents]; } EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE; -#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_ENABLE 0x01 -#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_POWER_MANAGED 0x02 -#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_HOT_PLUGGABLE 0x04 +#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_ENABLE 0x01 +#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_POWER_MANAGED 0x02 +#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_HOT_PLUGGABLE 0x04 typedef struct { - UINT16 MemoryPowerNodeCount; - UINT8 Reserved[2]; + UINT16 MemoryPowerNodeCount; + UINT8 Reserved[2]; } EFI_ACPI_5_0_MPST_MEMORY_POWER_NODE_TABLE; /// /// MPST Memory Power State Characteristics Table /// typedef struct { - UINT8 PowerStateStructureID; - UINT8 Flag; - UINT16 Reserved; - UINT32 AveragePowerConsumedInMPS0; - UINT32 RelativePowerSavingToMPS0; - UINT64 ExitLatencyToMPS0; + UINT8 PowerStateStructureID; + UINT8 Flag; + UINT16 Reserved; + UINT32 AveragePowerConsumedInMPS0; + UINT32 RelativePowerSavingToMPS0; + UINT64 ExitLatencyToMPS0; } EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE; -#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_MEMORY_CONTENT_PRESERVED 0x01 -#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_ENTRY 0x02 -#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_EXIT 0x04 +#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_MEMORY_CONTENT_PRESERVED 0x01 +#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_ENTRY 0x02 +#define EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_EXIT 0x04 typedef struct { - UINT16 MemoryPowerStateCharacteristicsCount; - UINT8 Reserved[2]; + UINT16 MemoryPowerStateCharacteristicsCount; + UINT8 Reserved[2]; } EFI_ACPI_5_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_TABLE; /// /// Memory Topology Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 Reserved; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 Reserved; } EFI_ACPI_5_0_MEMORY_TOPOLOGY_TABLE; /// /// PMTT Version (as defined in ACPI 5.0 spec.) /// -#define EFI_ACPI_5_0_MEMORY_TOPOLOGY_TABLE_REVISION 0x01 +#define EFI_ACPI_5_0_MEMORY_TOPOLOGY_TABLE_REVISION 0x01 /// /// Common Memory Aggregator Device Structure. /// typedef struct { - UINT8 Type; - UINT8 Reserved; - UINT16 Length; - UINT16 Flags; - UINT16 Reserved1; + UINT8 Type; + UINT8 Reserved; + UINT16 Length; + UINT16 Flags; + UINT16 Reserved1; } EFI_ACPI_5_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE; /// /// Memory Aggregator Device Type /// -#define EFI_ACPI_5_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_SOCKET 0x0 -#define EFI_ACPI_5_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_MEMORY_CONTROLLER 0x1 -#define EFI_ACPI_5_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_DIMM 0x2 +#define EFI_ACPI_5_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_SOCKET 0x0 +#define EFI_ACPI_5_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_MEMORY_CONTROLLER 0x1 +#define EFI_ACPI_5_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_DIMM 0x2 /// /// Socket Memory Aggregator Device Structure. /// typedef struct { - EFI_ACPI_5_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; - UINT16 SocketIdentifier; - UINT16 Reserved; -//EFI_ACPI_5_0_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE MemoryController[]; + EFI_ACPI_5_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; + UINT16 SocketIdentifier; + UINT16 Reserved; + // EFI_ACPI_5_0_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE MemoryController[]; } EFI_ACPI_5_0_PMMT_SOCKET_MEMORY_AGGREGATOR_DEVICE_STRUCTURE; /// /// MemoryController Memory Aggregator Device Structure. /// typedef struct { - EFI_ACPI_5_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; - UINT32 ReadLatency; - UINT32 WriteLatency; - UINT32 ReadBandwidth; - UINT32 WriteBandwidth; - UINT16 OptimalAccessUnit; - UINT16 OptimalAccessAlignment; - UINT16 Reserved; - UINT16 NumberOfProximityDomains; -//UINT32 ProximityDomain[NumberOfProximityDomains]; -//EFI_ACPI_5_0_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE PhysicalComponent[]; + EFI_ACPI_5_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; + UINT32 ReadLatency; + UINT32 WriteLatency; + UINT32 ReadBandwidth; + UINT32 WriteBandwidth; + UINT16 OptimalAccessUnit; + UINT16 OptimalAccessAlignment; + UINT16 Reserved; + UINT16 NumberOfProximityDomains; + // UINT32 ProximityDomain[NumberOfProximityDomains]; + // EFI_ACPI_5_0_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE PhysicalComponent[]; } EFI_ACPI_5_0_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE; /// /// DIMM Memory Aggregator Device Structure. /// typedef struct { - EFI_ACPI_5_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; - UINT16 PhysicalComponentIdentifier; - UINT16 Reserved; - UINT32 SizeOfDimm; - UINT32 SmbiosHandle; + EFI_ACPI_5_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; + UINT16 PhysicalComponentIdentifier; + UINT16 Reserved; + UINT32 SizeOfDimm; + UINT32 SmbiosHandle; } EFI_ACPI_5_0_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE; /// /// Boot Graphics Resource Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_DESCRIPTION_HEADER Header; /// /// 2-bytes (16 bit) version ID. This value must be 1. /// - UINT16 Version; + UINT16 Version; /// /// 1-byte status field indicating current status about the table. /// Bits[7:1] = Reserved (must be zero) /// Bit [0] = Valid. A one indicates the boot image graphic is valid. /// - UINT8 Status; + UINT8 Status; /// /// 1-byte enumerated type field indicating format of the image. /// 0 = Bitmap /// 1 - 255 Reserved (for future use) /// - UINT8 ImageType; + UINT8 ImageType; /// /// 8-byte (64 bit) physical address pointing to the firmware's in-memory copy /// of the image bitmap. /// - UINT64 ImageAddress; + UINT64 ImageAddress; /// /// A 4-byte (32-bit) unsigned long describing the display X-offset of the boot image. /// (X, Y) display offset of the top left corner of the boot image. /// The top left corner of the display is at offset (0, 0). /// - UINT32 ImageOffsetX; + UINT32 ImageOffsetX; /// /// A 4-byte (32-bit) unsigned long describing the display Y-offset of the boot image. /// (X, Y) display offset of the top left corner of the boot image. /// The top left corner of the display is at offset (0, 0). /// - UINT32 ImageOffsetY; + UINT32 ImageOffsetY; } EFI_ACPI_5_0_BOOT_GRAPHICS_RESOURCE_TABLE; /// /// BGRT Revision /// -#define EFI_ACPI_5_0_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION 1 +#define EFI_ACPI_5_0_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION 1 /// /// BGRT Version /// -#define EFI_ACPI_5_0_BGRT_VERSION 0x01 +#define EFI_ACPI_5_0_BGRT_VERSION 0x01 /// /// BGRT Status /// -#define EFI_ACPI_5_0_BGRT_STATUS_NOT_DISPLAYED 0x00 -#define EFI_ACPI_5_0_BGRT_STATUS_DISPLAYED 0x01 -#define EFI_ACPI_5_0_BGRT_STATUS_INVALID EFI_ACPI_5_0_BGRT_STATUS_NOT_DISPLAYED -#define EFI_ACPI_5_0_BGRT_STATUS_VALID EFI_ACPI_5_0_BGRT_STATUS_DISPLAYED +#define EFI_ACPI_5_0_BGRT_STATUS_NOT_DISPLAYED 0x00 +#define EFI_ACPI_5_0_BGRT_STATUS_DISPLAYED 0x01 +#define EFI_ACPI_5_0_BGRT_STATUS_INVALID EFI_ACPI_5_0_BGRT_STATUS_NOT_DISPLAYED +#define EFI_ACPI_5_0_BGRT_STATUS_VALID EFI_ACPI_5_0_BGRT_STATUS_DISPLAYED /// /// BGRT Image Type @@ -1104,26 +1104,26 @@ typedef struct { /// /// FPDT Version (as defined in ACPI 5.0 spec.) /// -#define EFI_ACPI_5_0_FIRMWARE_PERFORMANCE_DATA_TABLE_REVISION 0x01 +#define EFI_ACPI_5_0_FIRMWARE_PERFORMANCE_DATA_TABLE_REVISION 0x01 /// /// FPDT Performance Record Types /// -#define EFI_ACPI_5_0_FPDT_RECORD_TYPE_FIRMWARE_BASIC_BOOT_POINTER 0x0000 -#define EFI_ACPI_5_0_FPDT_RECORD_TYPE_S3_PERFORMANCE_TABLE_POINTER 0x0001 +#define EFI_ACPI_5_0_FPDT_RECORD_TYPE_FIRMWARE_BASIC_BOOT_POINTER 0x0000 +#define EFI_ACPI_5_0_FPDT_RECORD_TYPE_S3_PERFORMANCE_TABLE_POINTER 0x0001 /// /// FPDT Performance Record Revision /// -#define EFI_ACPI_5_0_FPDT_RECORD_REVISION_FIRMWARE_BASIC_BOOT_POINTER 0x01 -#define EFI_ACPI_5_0_FPDT_RECORD_REVISION_S3_PERFORMANCE_TABLE_POINTER 0x01 +#define EFI_ACPI_5_0_FPDT_RECORD_REVISION_FIRMWARE_BASIC_BOOT_POINTER 0x01 +#define EFI_ACPI_5_0_FPDT_RECORD_REVISION_S3_PERFORMANCE_TABLE_POINTER 0x01 /// /// FPDT Runtime Performance Record Types /// -#define EFI_ACPI_5_0_FPDT_RUNTIME_RECORD_TYPE_S3_RESUME 0x0000 -#define EFI_ACPI_5_0_FPDT_RUNTIME_RECORD_TYPE_S3_SUSPEND 0x0001 -#define EFI_ACPI_5_0_FPDT_RUNTIME_RECORD_TYPE_FIRMWARE_BASIC_BOOT 0x0002 +#define EFI_ACPI_5_0_FPDT_RUNTIME_RECORD_TYPE_S3_RESUME 0x0000 +#define EFI_ACPI_5_0_FPDT_RUNTIME_RECORD_TYPE_S3_SUSPEND 0x0001 +#define EFI_ACPI_5_0_FPDT_RUNTIME_RECORD_TYPE_FIRMWARE_BASIC_BOOT 0x0002 /// /// FPDT Runtime Performance Record Revision @@ -1136,77 +1136,77 @@ typedef struct { /// FPDT Performance Record header /// typedef struct { - UINT16 Type; - UINT8 Length; - UINT8 Revision; + UINT16 Type; + UINT8 Length; + UINT8 Revision; } EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER; /// /// FPDT Performance Table header /// typedef struct { - UINT32 Signature; - UINT32 Length; + UINT32 Signature; + UINT32 Length; } EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER; /// /// FPDT Firmware Basic Boot Performance Pointer Record Structure /// typedef struct { - EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header; - UINT32 Reserved; + EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header; + UINT32 Reserved; /// /// 64-bit processor-relative physical address of the Basic Boot Performance Table. /// - UINT64 BootPerformanceTablePointer; + UINT64 BootPerformanceTablePointer; } EFI_ACPI_5_0_FPDT_BOOT_PERFORMANCE_TABLE_POINTER_RECORD; /// /// FPDT S3 Performance Table Pointer Record Structure /// typedef struct { - EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header; - UINT32 Reserved; + EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header; + UINT32 Reserved; /// /// 64-bit processor-relative physical address of the S3 Performance Table. /// - UINT64 S3PerformanceTablePointer; + UINT64 S3PerformanceTablePointer; } EFI_ACPI_5_0_FPDT_S3_PERFORMANCE_TABLE_POINTER_RECORD; /// /// FPDT Firmware Basic Boot Performance Record Structure /// typedef struct { - EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header; - UINT32 Reserved; + EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header; + UINT32 Reserved; /// /// Timer value logged at the beginning of firmware image execution. /// This may not always be zero or near zero. /// - UINT64 ResetEnd; + UINT64 ResetEnd; /// /// Timer value logged just prior to loading the OS boot loader into memory. /// For non-UEFI compatible boots, this field must be zero. /// - UINT64 OsLoaderLoadImageStart; + UINT64 OsLoaderLoadImageStart; /// /// Timer value logged just prior to launching the previously loaded OS boot loader image. /// For non-UEFI compatible boots, the timer value logged will be just prior /// to the INT 19h handler invocation. /// - UINT64 OsLoaderStartImageStart; + UINT64 OsLoaderStartImageStart; /// /// Timer value logged at the point when the OS loader calls the /// ExitBootServices function for UEFI compatible firmware. /// For non-UEFI compatible boots, this field must be zero. /// - UINT64 ExitBootServicesEntry; + UINT64 ExitBootServicesEntry; /// /// Timer value logged at the point just prior to when the OS loader gaining /// control back from calls the ExitBootServices function for UEFI compatible firmware. /// For non-UEFI compatible boots, this field must be zero. /// - UINT64 ExitBootServicesExit; + UINT64 ExitBootServicesExit; } EFI_ACPI_5_0_FPDT_FIRMWARE_BASIC_BOOT_RECORD; /// @@ -1218,7 +1218,7 @@ typedef struct { // FPDT Firmware Basic Boot Performance Table // typedef struct { - EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER Header; + EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER Header; // // one or more Performance Records. // @@ -1233,7 +1233,7 @@ typedef struct { // FPDT Firmware S3 Boot Performance Table // typedef struct { - EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER Header; + EFI_ACPI_5_0_FPDT_PERFORMANCE_TABLE_HEADER Header; // // one or more Performance Records. // @@ -1243,118 +1243,118 @@ typedef struct { /// FPDT Basic S3 Resume Performance Record /// typedef struct { - EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header; + EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header; /// /// A count of the number of S3 resume cycles since the last full boot sequence. /// - UINT32 ResumeCount; + UINT32 ResumeCount; /// /// Timer recorded at the end of BIOS S3 resume, just prior to handoff to the /// OS waking vector. Only the most recent resume cycle's time is retained. /// - UINT64 FullResume; + UINT64 FullResume; /// /// Average timer value of all resume cycles logged since the last full boot /// sequence, including the most recent resume. Note that the entire log of /// timer values does not need to be retained in order to calculate this average. /// - UINT64 AverageResume; + UINT64 AverageResume; } EFI_ACPI_5_0_FPDT_S3_RESUME_RECORD; /// /// FPDT Basic S3 Suspend Performance Record /// typedef struct { - EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header; + EFI_ACPI_5_0_FPDT_PERFORMANCE_RECORD_HEADER Header; /// /// Timer value recorded at the OS write to SLP_TYP upon entry to S3. /// Only the most recent suspend cycle's timer value is retained. /// - UINT64 SuspendStart; + UINT64 SuspendStart; /// /// Timer value recorded at the final firmware write to SLP_TYP (or other /// mechanism) used to trigger hardware entry to S3. /// Only the most recent suspend cycle's timer value is retained. /// - UINT64 SuspendEnd; + UINT64 SuspendEnd; } EFI_ACPI_5_0_FPDT_S3_SUSPEND_RECORD; /// /// Firmware Performance Record Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_DESCRIPTION_HEADER Header; } EFI_ACPI_5_0_FIRMWARE_PERFORMANCE_RECORD_TABLE; /// /// Generic Timer Description Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT64 PhysicalAddress; - UINT32 GlobalFlags; - UINT32 SecurePL1TimerGSIV; - UINT32 SecurePL1TimerFlags; - UINT32 NonSecurePL1TimerGSIV; - UINT32 NonSecurePL1TimerFlags; - UINT32 VirtualTimerGSIV; - UINT32 VirtualTimerFlags; - UINT32 NonSecurePL2TimerGSIV; - UINT32 NonSecurePL2TimerFlags; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT64 PhysicalAddress; + UINT32 GlobalFlags; + UINT32 SecurePL1TimerGSIV; + UINT32 SecurePL1TimerFlags; + UINT32 NonSecurePL1TimerGSIV; + UINT32 NonSecurePL1TimerFlags; + UINT32 VirtualTimerGSIV; + UINT32 VirtualTimerFlags; + UINT32 NonSecurePL2TimerGSIV; + UINT32 NonSecurePL2TimerFlags; } EFI_ACPI_5_0_GENERIC_TIMER_DESCRIPTION_TABLE; /// /// GTDT Version (as defined in ACPI 5.0 spec.) /// -#define EFI_ACPI_5_0_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_5_0_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION 0x01 /// /// Global Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_5_0_GTDT_GLOBAL_FLAG_MEMORY_MAPPED_BLOCK_PRESENT BIT0 -#define EFI_ACPI_5_0_GTDT_GLOBAL_FLAG_INTERRUPT_MODE BIT1 +#define EFI_ACPI_5_0_GTDT_GLOBAL_FLAG_MEMORY_MAPPED_BLOCK_PRESENT BIT0 +#define EFI_ACPI_5_0_GTDT_GLOBAL_FLAG_INTERRUPT_MODE BIT1 /// /// Timer Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_5_0_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 -#define EFI_ACPI_5_0_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 +#define EFI_ACPI_5_0_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 +#define EFI_ACPI_5_0_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 /// /// Boot Error Record Table (BERT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 BootErrorRegionLength; - UINT64 BootErrorRegion; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 BootErrorRegionLength; + UINT64 BootErrorRegion; } EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE_HEADER; /// /// BERT Version (as defined in ACPI 5.0 spec.) /// -#define EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE_REVISION 0x01 +#define EFI_ACPI_5_0_BOOT_ERROR_RECORD_TABLE_REVISION 0x01 /// /// Boot Error Region Block Status Definition /// typedef struct { - UINT32 UncorrectableErrorValid:1; - UINT32 CorrectableErrorValid:1; - UINT32 MultipleUncorrectableErrors:1; - UINT32 MultipleCorrectableErrors:1; - UINT32 ErrorDataEntryCount:10; - UINT32 Reserved:18; + UINT32 UncorrectableErrorValid : 1; + UINT32 CorrectableErrorValid : 1; + UINT32 MultipleUncorrectableErrors : 1; + UINT32 MultipleCorrectableErrors : 1; + UINT32 ErrorDataEntryCount : 10; + UINT32 Reserved : 18; } EFI_ACPI_5_0_ERROR_BLOCK_STATUS; /// /// Boot Error Region Definition /// typedef struct { - EFI_ACPI_5_0_ERROR_BLOCK_STATUS BlockStatus; - UINT32 RawDataOffset; - UINT32 RawDataLength; - UINT32 DataLength; - UINT32 ErrorSeverity; + EFI_ACPI_5_0_ERROR_BLOCK_STATUS BlockStatus; + UINT32 RawDataOffset; + UINT32 RawDataLength; + UINT32 DataLength; + UINT32 ErrorSeverity; } EFI_ACPI_5_0_BOOT_ERROR_REGION_STRUCTURE; // @@ -1369,14 +1369,14 @@ typedef struct { /// Generic Error Data Entry Definition /// typedef struct { - UINT8 SectionType[16]; - UINT32 ErrorSeverity; - UINT16 Revision; - UINT8 ValidationBits; - UINT8 Flags; - UINT32 ErrorDataLength; - UINT8 FruId[16]; - UINT8 FruText[20]; + UINT8 SectionType[16]; + UINT32 ErrorSeverity; + UINT16 Revision; + UINT8 ValidationBits; + UINT8 Flags; + UINT32 ErrorDataLength; + UINT8 FruId[16]; + UINT8 FruText[20]; } EFI_ACPI_5_0_GENERIC_ERROR_DATA_ENTRY_STRUCTURE; /// @@ -1388,14 +1388,14 @@ typedef struct { /// HEST - Hardware Error Source Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 ErrorSourceCount; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 ErrorSourceCount; } EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE_HEADER; /// /// HEST Version (as defined in ACPI 5.0 spec.) /// -#define EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01 +#define EFI_ACPI_5_0_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01 // // Error Source structure types. @@ -1411,403 +1411,403 @@ typedef struct { // // Error Source structure flags. // -#define EFI_ACPI_5_0_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0) -#define EFI_ACPI_5_0_ERROR_SOURCE_FLAG_GLOBAL (1 << 1) +#define EFI_ACPI_5_0_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0) +#define EFI_ACPI_5_0_ERROR_SOURCE_FLAG_GLOBAL (1 << 1) /// /// IA-32 Architecture Machine Check Exception Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT64 GlobalCapabilityInitData; - UINT64 GlobalControlInitData; - UINT8 NumberOfHardwareBanks; - UINT8 Reserved1[7]; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT64 GlobalCapabilityInitData; + UINT64 GlobalControlInitData; + UINT8 NumberOfHardwareBanks; + UINT8 Reserved1[7]; } EFI_ACPI_5_0_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION_STRUCTURE; /// /// IA-32 Architecture Machine Check Bank Structure Definition /// typedef struct { - UINT8 BankNumber; - UINT8 ClearStatusOnInitialization; - UINT8 StatusDataFormat; - UINT8 Reserved0; - UINT32 ControlRegisterMsrAddress; - UINT64 ControlInitData; - UINT32 StatusRegisterMsrAddress; - UINT32 AddressRegisterMsrAddress; - UINT32 MiscRegisterMsrAddress; + UINT8 BankNumber; + UINT8 ClearStatusOnInitialization; + UINT8 StatusDataFormat; + UINT8 Reserved0; + UINT32 ControlRegisterMsrAddress; + UINT64 ControlInitData; + UINT32 StatusRegisterMsrAddress; + UINT32 AddressRegisterMsrAddress; + UINT32 MiscRegisterMsrAddress; } EFI_ACPI_5_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_BANK_STRUCTURE; /// /// IA-32 Architecture Machine Check Bank Structure MCA data format /// -#define EFI_ACPI_5_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00 -#define EFI_ACPI_5_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01 -#define EFI_ACPI_5_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02 +#define EFI_ACPI_5_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00 +#define EFI_ACPI_5_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01 +#define EFI_ACPI_5_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02 // // Hardware Error Notification types. All other values are reserved // -#define EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00 -#define EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01 -#define EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02 -#define EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_SCI 0x03 -#define EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_NMI 0x04 +#define EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00 +#define EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01 +#define EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02 +#define EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_SCI 0x03 +#define EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_NMI 0x04 /// /// Hardware Error Notification Configuration Write Enable Structure Definition /// typedef struct { - UINT16 Type:1; - UINT16 PollInterval:1; - UINT16 SwitchToPollingThresholdValue:1; - UINT16 SwitchToPollingThresholdWindow:1; - UINT16 ErrorThresholdValue:1; - UINT16 ErrorThresholdWindow:1; - UINT16 Reserved:10; + UINT16 Type : 1; + UINT16 PollInterval : 1; + UINT16 SwitchToPollingThresholdValue : 1; + UINT16 SwitchToPollingThresholdWindow : 1; + UINT16 ErrorThresholdValue : 1; + UINT16 ErrorThresholdWindow : 1; + UINT16 Reserved : 10; } EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE; /// /// Hardware Error Notification Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable; - UINT32 PollInterval; - UINT32 Vector; - UINT32 SwitchToPollingThresholdValue; - UINT32 SwitchToPollingThresholdWindow; - UINT32 ErrorThresholdValue; - UINT32 ErrorThresholdWindow; + UINT8 Type; + UINT8 Length; + EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable; + UINT32 PollInterval; + UINT32 Vector; + UINT32 SwitchToPollingThresholdValue; + UINT32 SwitchToPollingThresholdWindow; + UINT32 ErrorThresholdValue; + UINT32 ErrorThresholdWindow; } EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE; /// /// IA-32 Architecture Corrected Machine Check Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; - UINT8 NumberOfHardwareBanks; - UINT8 Reserved1[3]; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; + UINT8 NumberOfHardwareBanks; + UINT8 Reserved1[3]; } EFI_ACPI_5_0_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK_STRUCTURE; /// /// IA-32 Architecture NMI Error Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 MaxRawDataLength; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 MaxRawDataLength; } EFI_ACPI_5_0_IA32_ARCHITECTURE_NMI_ERROR_STRUCTURE; /// /// PCI Express Root Port AER Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 Bus; - UINT16 Device; - UINT16 Function; - UINT16 DeviceControl; - UINT8 Reserved1[2]; - UINT32 UncorrectableErrorMask; - UINT32 UncorrectableErrorSeverity; - UINT32 CorrectableErrorMask; - UINT32 AdvancedErrorCapabilitiesAndControl; - UINT32 RootErrorCommand; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 Bus; + UINT16 Device; + UINT16 Function; + UINT16 DeviceControl; + UINT8 Reserved1[2]; + UINT32 UncorrectableErrorMask; + UINT32 UncorrectableErrorSeverity; + UINT32 CorrectableErrorMask; + UINT32 AdvancedErrorCapabilitiesAndControl; + UINT32 RootErrorCommand; } EFI_ACPI_5_0_PCI_EXPRESS_ROOT_PORT_AER_STRUCTURE; /// /// PCI Express Device AER Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 Bus; - UINT16 Device; - UINT16 Function; - UINT16 DeviceControl; - UINT8 Reserved1[2]; - UINT32 UncorrectableErrorMask; - UINT32 UncorrectableErrorSeverity; - UINT32 CorrectableErrorMask; - UINT32 AdvancedErrorCapabilitiesAndControl; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 Bus; + UINT16 Device; + UINT16 Function; + UINT16 DeviceControl; + UINT8 Reserved1[2]; + UINT32 UncorrectableErrorMask; + UINT32 UncorrectableErrorSeverity; + UINT32 CorrectableErrorMask; + UINT32 AdvancedErrorCapabilitiesAndControl; } EFI_ACPI_5_0_PCI_EXPRESS_DEVICE_AER_STRUCTURE; /// /// PCI Express Bridge AER Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 Bus; - UINT16 Device; - UINT16 Function; - UINT16 DeviceControl; - UINT8 Reserved1[2]; - UINT32 UncorrectableErrorMask; - UINT32 UncorrectableErrorSeverity; - UINT32 CorrectableErrorMask; - UINT32 AdvancedErrorCapabilitiesAndControl; - UINT32 SecondaryUncorrectableErrorMask; - UINT32 SecondaryUncorrectableErrorSeverity; - UINT32 SecondaryAdvancedErrorCapabilitiesAndControl; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 Bus; + UINT16 Device; + UINT16 Function; + UINT16 DeviceControl; + UINT8 Reserved1[2]; + UINT32 UncorrectableErrorMask; + UINT32 UncorrectableErrorSeverity; + UINT32 CorrectableErrorMask; + UINT32 AdvancedErrorCapabilitiesAndControl; + UINT32 SecondaryUncorrectableErrorMask; + UINT32 SecondaryUncorrectableErrorSeverity; + UINT32 SecondaryAdvancedErrorCapabilitiesAndControl; } EFI_ACPI_5_0_PCI_EXPRESS_BRIDGE_AER_STRUCTURE; /// /// Generic Hardware Error Source Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT16 RelatedSourceId; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 MaxRawDataLength; - EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress; - EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; - UINT32 ErrorStatusBlockLength; + UINT16 Type; + UINT16 SourceId; + UINT16 RelatedSourceId; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 MaxRawDataLength; + EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress; + EFI_ACPI_5_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; + UINT32 ErrorStatusBlockLength; } EFI_ACPI_5_0_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE; /// /// Generic Error Status Definition /// typedef struct { - EFI_ACPI_5_0_ERROR_BLOCK_STATUS BlockStatus; - UINT32 RawDataOffset; - UINT32 RawDataLength; - UINT32 DataLength; - UINT32 ErrorSeverity; + EFI_ACPI_5_0_ERROR_BLOCK_STATUS BlockStatus; + UINT32 RawDataOffset; + UINT32 RawDataLength; + UINT32 DataLength; + UINT32 ErrorSeverity; } EFI_ACPI_5_0_GENERIC_ERROR_STATUS_STRUCTURE; /// /// ERST - Error Record Serialization Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 SerializationHeaderSize; - UINT8 Reserved0[4]; - UINT32 InstructionEntryCount; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 SerializationHeaderSize; + UINT8 Reserved0[4]; + UINT32 InstructionEntryCount; } EFI_ACPI_5_0_ERROR_RECORD_SERIALIZATION_TABLE_HEADER; /// /// ERST Version (as defined in ACPI 5.0 spec.) /// -#define EFI_ACPI_5_0_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01 +#define EFI_ACPI_5_0_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01 /// /// ERST Serialization Actions /// -#define EFI_ACPI_5_0_ERST_BEGIN_WRITE_OPERATION 0x00 -#define EFI_ACPI_5_0_ERST_BEGIN_READ_OPERATION 0x01 -#define EFI_ACPI_5_0_ERST_BEGIN_CLEAR_OPERATION 0x02 -#define EFI_ACPI_5_0_ERST_END_OPERATION 0x03 -#define EFI_ACPI_5_0_ERST_SET_RECORD_OFFSET 0x04 -#define EFI_ACPI_5_0_ERST_EXECUTE_OPERATION 0x05 -#define EFI_ACPI_5_0_ERST_CHECK_BUSY_STATUS 0x06 -#define EFI_ACPI_5_0_ERST_GET_COMMAND_STATUS 0x07 -#define EFI_ACPI_5_0_ERST_GET_RECORD_IDENTIFIER 0x08 -#define EFI_ACPI_5_0_ERST_SET_RECORD_IDENTIFIER 0x09 -#define EFI_ACPI_5_0_ERST_GET_RECORD_COUNT 0x0A -#define EFI_ACPI_5_0_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B -#define EFI_ACPI_5_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D -#define EFI_ACPI_5_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E -#define EFI_ACPI_5_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F +#define EFI_ACPI_5_0_ERST_BEGIN_WRITE_OPERATION 0x00 +#define EFI_ACPI_5_0_ERST_BEGIN_READ_OPERATION 0x01 +#define EFI_ACPI_5_0_ERST_BEGIN_CLEAR_OPERATION 0x02 +#define EFI_ACPI_5_0_ERST_END_OPERATION 0x03 +#define EFI_ACPI_5_0_ERST_SET_RECORD_OFFSET 0x04 +#define EFI_ACPI_5_0_ERST_EXECUTE_OPERATION 0x05 +#define EFI_ACPI_5_0_ERST_CHECK_BUSY_STATUS 0x06 +#define EFI_ACPI_5_0_ERST_GET_COMMAND_STATUS 0x07 +#define EFI_ACPI_5_0_ERST_GET_RECORD_IDENTIFIER 0x08 +#define EFI_ACPI_5_0_ERST_SET_RECORD_IDENTIFIER 0x09 +#define EFI_ACPI_5_0_ERST_GET_RECORD_COUNT 0x0A +#define EFI_ACPI_5_0_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B +#define EFI_ACPI_5_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D +#define EFI_ACPI_5_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E +#define EFI_ACPI_5_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F /// /// ERST Action Command Status /// -#define EFI_ACPI_5_0_ERST_STATUS_SUCCESS 0x00 -#define EFI_ACPI_5_0_ERST_STATUS_NOT_ENOUGH_SPACE 0x01 -#define EFI_ACPI_5_0_ERST_STATUS_HARDWARE_NOT_AVAILABLE 0x02 -#define EFI_ACPI_5_0_ERST_STATUS_FAILED 0x03 -#define EFI_ACPI_5_0_ERST_STATUS_RECORD_STORE_EMPTY 0x04 -#define EFI_ACPI_5_0_ERST_STATUS_RECORD_NOT_FOUND 0x05 +#define EFI_ACPI_5_0_ERST_STATUS_SUCCESS 0x00 +#define EFI_ACPI_5_0_ERST_STATUS_NOT_ENOUGH_SPACE 0x01 +#define EFI_ACPI_5_0_ERST_STATUS_HARDWARE_NOT_AVAILABLE 0x02 +#define EFI_ACPI_5_0_ERST_STATUS_FAILED 0x03 +#define EFI_ACPI_5_0_ERST_STATUS_RECORD_STORE_EMPTY 0x04 +#define EFI_ACPI_5_0_ERST_STATUS_RECORD_NOT_FOUND 0x05 /// /// ERST Serialization Instructions /// -#define EFI_ACPI_5_0_ERST_READ_REGISTER 0x00 -#define EFI_ACPI_5_0_ERST_READ_REGISTER_VALUE 0x01 -#define EFI_ACPI_5_0_ERST_WRITE_REGISTER 0x02 -#define EFI_ACPI_5_0_ERST_WRITE_REGISTER_VALUE 0x03 -#define EFI_ACPI_5_0_ERST_NOOP 0x04 -#define EFI_ACPI_5_0_ERST_LOAD_VAR1 0x05 -#define EFI_ACPI_5_0_ERST_LOAD_VAR2 0x06 -#define EFI_ACPI_5_0_ERST_STORE_VAR1 0x07 -#define EFI_ACPI_5_0_ERST_ADD 0x08 -#define EFI_ACPI_5_0_ERST_SUBTRACT 0x09 -#define EFI_ACPI_5_0_ERST_ADD_VALUE 0x0A -#define EFI_ACPI_5_0_ERST_SUBTRACT_VALUE 0x0B -#define EFI_ACPI_5_0_ERST_STALL 0x0C -#define EFI_ACPI_5_0_ERST_STALL_WHILE_TRUE 0x0D -#define EFI_ACPI_5_0_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E -#define EFI_ACPI_5_0_ERST_GOTO 0x0F -#define EFI_ACPI_5_0_ERST_SET_SRC_ADDRESS_BASE 0x10 -#define EFI_ACPI_5_0_ERST_SET_DST_ADDRESS_BASE 0x11 -#define EFI_ACPI_5_0_ERST_MOVE_DATA 0x12 +#define EFI_ACPI_5_0_ERST_READ_REGISTER 0x00 +#define EFI_ACPI_5_0_ERST_READ_REGISTER_VALUE 0x01 +#define EFI_ACPI_5_0_ERST_WRITE_REGISTER 0x02 +#define EFI_ACPI_5_0_ERST_WRITE_REGISTER_VALUE 0x03 +#define EFI_ACPI_5_0_ERST_NOOP 0x04 +#define EFI_ACPI_5_0_ERST_LOAD_VAR1 0x05 +#define EFI_ACPI_5_0_ERST_LOAD_VAR2 0x06 +#define EFI_ACPI_5_0_ERST_STORE_VAR1 0x07 +#define EFI_ACPI_5_0_ERST_ADD 0x08 +#define EFI_ACPI_5_0_ERST_SUBTRACT 0x09 +#define EFI_ACPI_5_0_ERST_ADD_VALUE 0x0A +#define EFI_ACPI_5_0_ERST_SUBTRACT_VALUE 0x0B +#define EFI_ACPI_5_0_ERST_STALL 0x0C +#define EFI_ACPI_5_0_ERST_STALL_WHILE_TRUE 0x0D +#define EFI_ACPI_5_0_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E +#define EFI_ACPI_5_0_ERST_GOTO 0x0F +#define EFI_ACPI_5_0_ERST_SET_SRC_ADDRESS_BASE 0x10 +#define EFI_ACPI_5_0_ERST_SET_DST_ADDRESS_BASE 0x11 +#define EFI_ACPI_5_0_ERST_MOVE_DATA 0x12 /// /// ERST Instruction Flags /// -#define EFI_ACPI_5_0_ERST_PRESERVE_REGISTER 0x01 +#define EFI_ACPI_5_0_ERST_PRESERVE_REGISTER 0x01 /// /// ERST Serialization Instruction Entry /// typedef struct { - UINT8 SerializationAction; - UINT8 Instruction; - UINT8 Flags; - UINT8 Reserved0; - EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion; - UINT64 Value; - UINT64 Mask; + UINT8 SerializationAction; + UINT8 Instruction; + UINT8 Flags; + UINT8 Reserved0; + EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion; + UINT64 Value; + UINT64 Mask; } EFI_ACPI_5_0_ERST_SERIALIZATION_INSTRUCTION_ENTRY; /// /// EINJ - Error Injection Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 InjectionHeaderSize; - UINT8 InjectionFlags; - UINT8 Reserved0[3]; - UINT32 InjectionEntryCount; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 InjectionHeaderSize; + UINT8 InjectionFlags; + UINT8 Reserved0[3]; + UINT32 InjectionEntryCount; } EFI_ACPI_5_0_ERROR_INJECTION_TABLE_HEADER; /// /// EINJ Version (as defined in ACPI 5.0 spec.) /// -#define EFI_ACPI_5_0_ERROR_INJECTION_TABLE_REVISION 0x01 +#define EFI_ACPI_5_0_ERROR_INJECTION_TABLE_REVISION 0x01 /// /// EINJ Error Injection Actions /// -#define EFI_ACPI_5_0_EINJ_BEGIN_INJECTION_OPERATION 0x00 -#define EFI_ACPI_5_0_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01 -#define EFI_ACPI_5_0_EINJ_SET_ERROR_TYPE 0x02 -#define EFI_ACPI_5_0_EINJ_GET_ERROR_TYPE 0x03 -#define EFI_ACPI_5_0_EINJ_END_OPERATION 0x04 -#define EFI_ACPI_5_0_EINJ_EXECUTE_OPERATION 0x05 -#define EFI_ACPI_5_0_EINJ_CHECK_BUSY_STATUS 0x06 -#define EFI_ACPI_5_0_EINJ_GET_COMMAND_STATUS 0x07 -#define EFI_ACPI_5_0_EINJ_TRIGGER_ERROR 0xFF +#define EFI_ACPI_5_0_EINJ_BEGIN_INJECTION_OPERATION 0x00 +#define EFI_ACPI_5_0_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01 +#define EFI_ACPI_5_0_EINJ_SET_ERROR_TYPE 0x02 +#define EFI_ACPI_5_0_EINJ_GET_ERROR_TYPE 0x03 +#define EFI_ACPI_5_0_EINJ_END_OPERATION 0x04 +#define EFI_ACPI_5_0_EINJ_EXECUTE_OPERATION 0x05 +#define EFI_ACPI_5_0_EINJ_CHECK_BUSY_STATUS 0x06 +#define EFI_ACPI_5_0_EINJ_GET_COMMAND_STATUS 0x07 +#define EFI_ACPI_5_0_EINJ_TRIGGER_ERROR 0xFF /// /// EINJ Action Command Status /// -#define EFI_ACPI_5_0_EINJ_STATUS_SUCCESS 0x00 -#define EFI_ACPI_5_0_EINJ_STATUS_UNKNOWN_FAILURE 0x01 -#define EFI_ACPI_5_0_EINJ_STATUS_INVALID_ACCESS 0x02 +#define EFI_ACPI_5_0_EINJ_STATUS_SUCCESS 0x00 +#define EFI_ACPI_5_0_EINJ_STATUS_UNKNOWN_FAILURE 0x01 +#define EFI_ACPI_5_0_EINJ_STATUS_INVALID_ACCESS 0x02 /// /// EINJ Error Type Definition /// -#define EFI_ACPI_5_0_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0) -#define EFI_ACPI_5_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1) -#define EFI_ACPI_5_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2) -#define EFI_ACPI_5_0_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3) -#define EFI_ACPI_5_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4) -#define EFI_ACPI_5_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5) -#define EFI_ACPI_5_0_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6) -#define EFI_ACPI_5_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7) -#define EFI_ACPI_5_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8) -#define EFI_ACPI_5_0_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9) -#define EFI_ACPI_5_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10) -#define EFI_ACPI_5_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11) +#define EFI_ACPI_5_0_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0) +#define EFI_ACPI_5_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1) +#define EFI_ACPI_5_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2) +#define EFI_ACPI_5_0_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3) +#define EFI_ACPI_5_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4) +#define EFI_ACPI_5_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5) +#define EFI_ACPI_5_0_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6) +#define EFI_ACPI_5_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7) +#define EFI_ACPI_5_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8) +#define EFI_ACPI_5_0_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9) +#define EFI_ACPI_5_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10) +#define EFI_ACPI_5_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11) /// /// EINJ Injection Instructions /// -#define EFI_ACPI_5_0_EINJ_READ_REGISTER 0x00 -#define EFI_ACPI_5_0_EINJ_READ_REGISTER_VALUE 0x01 -#define EFI_ACPI_5_0_EINJ_WRITE_REGISTER 0x02 -#define EFI_ACPI_5_0_EINJ_WRITE_REGISTER_VALUE 0x03 -#define EFI_ACPI_5_0_EINJ_NOOP 0x04 +#define EFI_ACPI_5_0_EINJ_READ_REGISTER 0x00 +#define EFI_ACPI_5_0_EINJ_READ_REGISTER_VALUE 0x01 +#define EFI_ACPI_5_0_EINJ_WRITE_REGISTER 0x02 +#define EFI_ACPI_5_0_EINJ_WRITE_REGISTER_VALUE 0x03 +#define EFI_ACPI_5_0_EINJ_NOOP 0x04 /// /// EINJ Instruction Flags /// -#define EFI_ACPI_5_0_EINJ_PRESERVE_REGISTER 0x01 +#define EFI_ACPI_5_0_EINJ_PRESERVE_REGISTER 0x01 /// /// EINJ Injection Instruction Entry /// typedef struct { - UINT8 InjectionAction; - UINT8 Instruction; - UINT8 Flags; - UINT8 Reserved0; - EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion; - UINT64 Value; - UINT64 Mask; + UINT8 InjectionAction; + UINT8 Instruction; + UINT8 Flags; + UINT8 Reserved0; + EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion; + UINT64 Value; + UINT64 Mask; } EFI_ACPI_5_0_EINJ_INJECTION_INSTRUCTION_ENTRY; /// /// EINJ Trigger Action Table /// typedef struct { - UINT32 HeaderSize; - UINT32 Revision; - UINT32 TableSize; - UINT32 EntryCount; + UINT32 HeaderSize; + UINT32 Revision; + UINT32 TableSize; + UINT32 EntryCount; } EFI_ACPI_5_0_EINJ_TRIGGER_ACTION_TABLE; /// /// Platform Communications Channel Table (PCCT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 Flags; - UINT64 Reserved; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 Flags; + UINT64 Reserved; } EFI_ACPI_5_0_PLATFORM_COMMUNICATION_CHANNEL_TABLE_HEADER; /// /// PCCT Version (as defined in ACPI 5.0 spec.) /// -#define EFI_ACPI_5_0_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION 0x01 +#define EFI_ACPI_5_0_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION 0x01 /// /// PCCT Global Flags /// -#define EFI_ACPI_5_0_PCCT_FLAGS_SCI_DOORBELL BIT0 +#define EFI_ACPI_5_0_PCCT_FLAGS_SCI_DOORBELL BIT0 // // PCCT Subspace type @@ -1818,25 +1818,25 @@ typedef struct { /// PCC Subspace Structure Header /// typedef struct { - UINT8 Type; - UINT8 Length; + UINT8 Type; + UINT8 Length; } EFI_ACPI_5_0_PCCT_SUBSPACE_HEADER; /// /// Generic Communications Subspace Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[6]; - UINT64 BaseAddress; - UINT64 AddressLength; - EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; - UINT64 DoorbellPreserve; - UINT64 DoorbellWrite; - UINT32 NominalLatency; - UINT32 MaximumPeriodicAccessRate; - UINT16 MinimumRequestTurnaroundTime; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[6]; + UINT64 BaseAddress; + UINT64 AddressLength; + EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; + UINT64 DoorbellPreserve; + UINT64 DoorbellWrite; + UINT32 NominalLatency; + UINT32 MaximumPeriodicAccessRate; + UINT16 MinimumRequestTurnaroundTime; } EFI_ACPI_5_0_PCCT_SUBSPACE_GENERIC; /// @@ -1844,18 +1844,18 @@ typedef struct { /// typedef struct { - UINT8 Command; - UINT8 Reserved:7; - UINT8 GenerateSci:1; + UINT8 Command; + UINT8 Reserved : 7; + UINT8 GenerateSci : 1; } EFI_ACPI_5_0_PCCT_GENERIC_SHARED_MEMORY_REGION_COMMAND; typedef struct { - UINT8 CommandComplete:1; - UINT8 SciDoorbell:1; - UINT8 Error:1; - UINT8 PlatformNotification:1; - UINT8 Reserved:4; - UINT8 Reserved1; + UINT8 CommandComplete : 1; + UINT8 SciDoorbell : 1; + UINT8 Error : 1; + UINT8 PlatformNotification : 1; + UINT8 Reserved : 4; + UINT8 Reserved1; } EFI_ACPI_5_0_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS; typedef struct { @@ -2097,7 +2097,7 @@ typedef struct { /// "WAET" Windows ACPI Emulated Devices Table /// #define EFI_ACPI_5_0_WINDOWS_ACPI_EMULATED_DEVICES_TABLE_SIGNATURE SIGNATURE_32('W', 'A', 'E', 'T') -#define EFI_ACPI_5_0_WINDOWS_ACPI_ENLIGHTENMENT_TABLE_SIGNATURE EFI_ACPI_5_0_WINDOWS_ACPI_EMULATED_DEVICES_TABLE_SIGNATURE +#define EFI_ACPI_5_0_WINDOWS_ACPI_ENLIGHTENMENT_TABLE_SIGNATURE EFI_ACPI_5_0_WINDOWS_ACPI_EMULATED_DEVICES_TABLE_SIGNATURE /// /// "WDAT" Watchdog Action Table diff --git a/MdePkg/Include/IndustryStandard/Acpi51.h b/MdePkg/Include/IndustryStandard/Acpi51.h index 5fbf7c9..d8ee3ef 100644 --- a/MdePkg/Include/IndustryStandard/Acpi51.h +++ b/MdePkg/Include/IndustryStandard/Acpi51.h @@ -22,21 +22,21 @@ /// ACPI 5.1 Generic Address Space definition /// typedef struct { - UINT8 AddressSpaceId; - UINT8 RegisterBitWidth; - UINT8 RegisterBitOffset; - UINT8 AccessSize; - UINT64 Address; + UINT8 AddressSpaceId; + UINT8 RegisterBitWidth; + UINT8 RegisterBitOffset; + UINT8 AccessSize; + UINT64 Address; } EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE; // // Generic Address Space Address IDs // -#define EFI_ACPI_5_1_SYSTEM_MEMORY 0 -#define EFI_ACPI_5_1_SYSTEM_IO 1 -#define EFI_ACPI_5_1_PCI_CONFIGURATION_SPACE 2 -#define EFI_ACPI_5_1_EMBEDDED_CONTROLLER 3 -#define EFI_ACPI_5_1_SMBUS 4 +#define EFI_ACPI_5_1_SYSTEM_MEMORY 0 +#define EFI_ACPI_5_1_SYSTEM_IO 1 +#define EFI_ACPI_5_1_PCI_CONFIGURATION_SPACE 2 +#define EFI_ACPI_5_1_EMBEDDED_CONTROLLER 3 +#define EFI_ACPI_5_1_SMBUS 4 #define EFI_ACPI_5_1_PLATFORM_COMMUNICATION_CHANNEL 0x0A #define EFI_ACPI_5_1_FUNCTIONAL_FIXED_HARDWARE 0x7F @@ -57,29 +57,29 @@ typedef struct { /// Root System Description Pointer Structure /// typedef struct { - UINT64 Signature; - UINT8 Checksum; - UINT8 OemId[6]; - UINT8 Revision; - UINT32 RsdtAddress; - UINT32 Length; - UINT64 XsdtAddress; - UINT8 ExtendedChecksum; - UINT8 Reserved[3]; + UINT64 Signature; + UINT8 Checksum; + UINT8 OemId[6]; + UINT8 Revision; + UINT32 RsdtAddress; + UINT32 Length; + UINT64 XsdtAddress; + UINT8 ExtendedChecksum; + UINT8 Reserved[3]; } EFI_ACPI_5_1_ROOT_SYSTEM_DESCRIPTION_POINTER; /// /// RSD_PTR Revision (as defined in ACPI 5.1 spec.) /// -#define EFI_ACPI_5_1_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 5.1) says current value is 2 +#define EFI_ACPI_5_1_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 5.1) says current value is 2 /// /// Common table header, this prefaces all ACPI tables, including FACS, but /// excluding the RSD PTR structure /// typedef struct { - UINT32 Signature; - UINT32 Length; + UINT32 Signature; + UINT32 Length; } EFI_ACPI_5_1_COMMON_HEADER; // @@ -91,7 +91,7 @@ typedef struct { /// /// RSDT Revision (as defined in ACPI 5.1 spec.) /// -#define EFI_ACPI_5_1_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_5_1_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 // // Extended System Description Table @@ -102,73 +102,73 @@ typedef struct { /// /// XSDT Revision (as defined in ACPI 5.1 spec.) /// -#define EFI_ACPI_5_1_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_5_1_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 /// /// Fixed ACPI Description Table Structure (FADT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 FirmwareCtrl; - UINT32 Dsdt; - UINT8 Reserved0; - UINT8 PreferredPmProfile; - UINT16 SciInt; - UINT32 SmiCmd; - UINT8 AcpiEnable; - UINT8 AcpiDisable; - UINT8 S4BiosReq; - UINT8 PstateCnt; - UINT32 Pm1aEvtBlk; - UINT32 Pm1bEvtBlk; - UINT32 Pm1aCntBlk; - UINT32 Pm1bCntBlk; - UINT32 Pm2CntBlk; - UINT32 PmTmrBlk; - UINT32 Gpe0Blk; - UINT32 Gpe1Blk; - UINT8 Pm1EvtLen; - UINT8 Pm1CntLen; - UINT8 Pm2CntLen; - UINT8 PmTmrLen; - UINT8 Gpe0BlkLen; - UINT8 Gpe1BlkLen; - UINT8 Gpe1Base; - UINT8 CstCnt; - UINT16 PLvl2Lat; - UINT16 PLvl3Lat; - UINT16 FlushSize; - UINT16 FlushStride; - UINT8 DutyOffset; - UINT8 DutyWidth; - UINT8 DayAlrm; - UINT8 MonAlrm; - UINT8 Century; - UINT16 IaPcBootArch; - UINT8 Reserved1; - UINT32 Flags; - EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE ResetReg; - UINT8 ResetValue; - UINT16 ArmBootArch; - UINT8 MinorVersion; - UINT64 XFirmwareCtrl; - UINT64 XDsdt; - EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk; - EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk; - EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk; - EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk; - EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk; - EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk; - EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XGpe0Blk; - EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XGpe1Blk; - EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE SleepControlReg; - EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE SleepStatusReg; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 FirmwareCtrl; + UINT32 Dsdt; + UINT8 Reserved0; + UINT8 PreferredPmProfile; + UINT16 SciInt; + UINT32 SmiCmd; + UINT8 AcpiEnable; + UINT8 AcpiDisable; + UINT8 S4BiosReq; + UINT8 PstateCnt; + UINT32 Pm1aEvtBlk; + UINT32 Pm1bEvtBlk; + UINT32 Pm1aCntBlk; + UINT32 Pm1bCntBlk; + UINT32 Pm2CntBlk; + UINT32 PmTmrBlk; + UINT32 Gpe0Blk; + UINT32 Gpe1Blk; + UINT8 Pm1EvtLen; + UINT8 Pm1CntLen; + UINT8 Pm2CntLen; + UINT8 PmTmrLen; + UINT8 Gpe0BlkLen; + UINT8 Gpe1BlkLen; + UINT8 Gpe1Base; + UINT8 CstCnt; + UINT16 PLvl2Lat; + UINT16 PLvl3Lat; + UINT16 FlushSize; + UINT16 FlushStride; + UINT8 DutyOffset; + UINT8 DutyWidth; + UINT8 DayAlrm; + UINT8 MonAlrm; + UINT8 Century; + UINT16 IaPcBootArch; + UINT8 Reserved1; + UINT32 Flags; + EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE ResetReg; + UINT8 ResetValue; + UINT16 ArmBootArch; + UINT8 MinorVersion; + UINT64 XFirmwareCtrl; + UINT64 XDsdt; + EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk; + EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk; + EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk; + EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk; + EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk; + EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk; + EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XGpe0Blk; + EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XGpe1Blk; + EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE SleepControlReg; + EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE SleepStatusReg; } EFI_ACPI_5_1_FIXED_ACPI_DESCRIPTION_TABLE; /// /// FADT Version (as defined in ACPI 5.1 spec.) /// -#define EFI_ACPI_5_1_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x05 +#define EFI_ACPI_5_1_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x05 #define EFI_ACPI_5_1_FIXED_ACPI_DESCRIPTION_TABLE_MINOR_REVISION 0x01 // @@ -188,62 +188,62 @@ typedef struct { // Fixed ACPI Description Table Boot Architecture Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_5_1_LEGACY_DEVICES BIT0 -#define EFI_ACPI_5_1_8042 BIT1 -#define EFI_ACPI_5_1_VGA_NOT_PRESENT BIT2 -#define EFI_ACPI_5_1_MSI_NOT_SUPPORTED BIT3 -#define EFI_ACPI_5_1_PCIE_ASPM_CONTROLS BIT4 -#define EFI_ACPI_5_1_CMOS_RTC_NOT_PRESENT BIT5 +#define EFI_ACPI_5_1_LEGACY_DEVICES BIT0 +#define EFI_ACPI_5_1_8042 BIT1 +#define EFI_ACPI_5_1_VGA_NOT_PRESENT BIT2 +#define EFI_ACPI_5_1_MSI_NOT_SUPPORTED BIT3 +#define EFI_ACPI_5_1_PCIE_ASPM_CONTROLS BIT4 +#define EFI_ACPI_5_1_CMOS_RTC_NOT_PRESENT BIT5 // // Fixed ACPI Description Table Arm Boot Architecture Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_5_1_ARM_PSCI_COMPLIANT BIT0 -#define EFI_ACPI_5_1_ARM_PSCI_USE_HVC BIT1 +#define EFI_ACPI_5_1_ARM_PSCI_COMPLIANT BIT0 +#define EFI_ACPI_5_1_ARM_PSCI_USE_HVC BIT1 // // Fixed ACPI Description Table Fixed Feature Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_5_1_WBINVD BIT0 -#define EFI_ACPI_5_1_WBINVD_FLUSH BIT1 -#define EFI_ACPI_5_1_PROC_C1 BIT2 -#define EFI_ACPI_5_1_P_LVL2_UP BIT3 -#define EFI_ACPI_5_1_PWR_BUTTON BIT4 -#define EFI_ACPI_5_1_SLP_BUTTON BIT5 -#define EFI_ACPI_5_1_FIX_RTC BIT6 -#define EFI_ACPI_5_1_RTC_S4 BIT7 -#define EFI_ACPI_5_1_TMR_VAL_EXT BIT8 -#define EFI_ACPI_5_1_DCK_CAP BIT9 -#define EFI_ACPI_5_1_RESET_REG_SUP BIT10 -#define EFI_ACPI_5_1_SEALED_CASE BIT11 -#define EFI_ACPI_5_1_HEADLESS BIT12 -#define EFI_ACPI_5_1_CPU_SW_SLP BIT13 -#define EFI_ACPI_5_1_PCI_EXP_WAK BIT14 -#define EFI_ACPI_5_1_USE_PLATFORM_CLOCK BIT15 -#define EFI_ACPI_5_1_S4_RTC_STS_VALID BIT16 -#define EFI_ACPI_5_1_REMOTE_POWER_ON_CAPABLE BIT17 -#define EFI_ACPI_5_1_FORCE_APIC_CLUSTER_MODEL BIT18 -#define EFI_ACPI_5_1_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19 -#define EFI_ACPI_5_1_HW_REDUCED_ACPI BIT20 -#define EFI_ACPI_5_1_LOW_POWER_S0_IDLE_CAPABLE BIT21 +#define EFI_ACPI_5_1_WBINVD BIT0 +#define EFI_ACPI_5_1_WBINVD_FLUSH BIT1 +#define EFI_ACPI_5_1_PROC_C1 BIT2 +#define EFI_ACPI_5_1_P_LVL2_UP BIT3 +#define EFI_ACPI_5_1_PWR_BUTTON BIT4 +#define EFI_ACPI_5_1_SLP_BUTTON BIT5 +#define EFI_ACPI_5_1_FIX_RTC BIT6 +#define EFI_ACPI_5_1_RTC_S4 BIT7 +#define EFI_ACPI_5_1_TMR_VAL_EXT BIT8 +#define EFI_ACPI_5_1_DCK_CAP BIT9 +#define EFI_ACPI_5_1_RESET_REG_SUP BIT10 +#define EFI_ACPI_5_1_SEALED_CASE BIT11 +#define EFI_ACPI_5_1_HEADLESS BIT12 +#define EFI_ACPI_5_1_CPU_SW_SLP BIT13 +#define EFI_ACPI_5_1_PCI_EXP_WAK BIT14 +#define EFI_ACPI_5_1_USE_PLATFORM_CLOCK BIT15 +#define EFI_ACPI_5_1_S4_RTC_STS_VALID BIT16 +#define EFI_ACPI_5_1_REMOTE_POWER_ON_CAPABLE BIT17 +#define EFI_ACPI_5_1_FORCE_APIC_CLUSTER_MODEL BIT18 +#define EFI_ACPI_5_1_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19 +#define EFI_ACPI_5_1_HW_REDUCED_ACPI BIT20 +#define EFI_ACPI_5_1_LOW_POWER_S0_IDLE_CAPABLE BIT21 /// /// Firmware ACPI Control Structure /// typedef struct { - UINT32 Signature; - UINT32 Length; - UINT32 HardwareSignature; - UINT32 FirmwareWakingVector; - UINT32 GlobalLock; - UINT32 Flags; - UINT64 XFirmwareWakingVector; - UINT8 Version; - UINT8 Reserved0[3]; - UINT32 OspmFlags; - UINT8 Reserved1[24]; + UINT32 Signature; + UINT32 Length; + UINT32 HardwareSignature; + UINT32 FirmwareWakingVector; + UINT32 GlobalLock; + UINT32 Flags; + UINT64 XFirmwareWakingVector; + UINT8 Version; + UINT8 Reserved0[3]; + UINT32 OspmFlags; + UINT8 Reserved1[24]; } EFI_ACPI_5_1_FIRMWARE_ACPI_CONTROL_STRUCTURE; /// @@ -255,14 +255,14 @@ typedef struct { /// Firmware Control Structure Feature Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_5_1_S4BIOS_F BIT0 -#define EFI_ACPI_5_1_64BIT_WAKE_SUPPORTED_F BIT1 +#define EFI_ACPI_5_1_S4BIOS_F BIT0 +#define EFI_ACPI_5_1_64BIT_WAKE_SUPPORTED_F BIT1 /// /// OSPM Enabled Firmware Control Structure Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_5_1_OSPM_64BIT_WAKE_F BIT0 +#define EFI_ACPI_5_1_OSPM_64BIT_WAKE_F BIT0 // // Differentiated System Description Table, @@ -271,29 +271,29 @@ typedef struct { // no definition needed as they are common description table header, the same with // EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block. // -#define EFI_ACPI_5_1_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 -#define EFI_ACPI_5_1_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 +#define EFI_ACPI_5_1_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 +#define EFI_ACPI_5_1_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 /// /// Multiple APIC Description Table header definition. The rest of the table /// must be defined in a platform specific manner. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 LocalApicAddress; - UINT32 Flags; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 LocalApicAddress; + UINT32 Flags; } EFI_ACPI_5_1_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER; /// /// MADT Revision (as defined in ACPI 5.1 spec.) /// -#define EFI_ACPI_5_1_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x03 +#define EFI_ACPI_5_1_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x03 /// /// Multiple APIC Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_5_1_PCAT_COMPAT BIT0 +#define EFI_ACPI_5_1_PCAT_COMPAT BIT0 // // Multiple APIC Description Table APIC structure types @@ -324,57 +324,57 @@ typedef struct { /// Processor Local APIC Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorId; - UINT8 ApicId; - UINT32 Flags; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorId; + UINT8 ApicId; + UINT32 Flags; } EFI_ACPI_5_1_PROCESSOR_LOCAL_APIC_STRUCTURE; /// /// Local APIC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_5_1_LOCAL_APIC_ENABLED BIT0 +#define EFI_ACPI_5_1_LOCAL_APIC_ENABLED BIT0 /// /// IO APIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 IoApicId; - UINT8 Reserved; - UINT32 IoApicAddress; - UINT32 GlobalSystemInterruptBase; + UINT8 Type; + UINT8 Length; + UINT8 IoApicId; + UINT8 Reserved; + UINT32 IoApicAddress; + UINT32 GlobalSystemInterruptBase; } EFI_ACPI_5_1_IO_APIC_STRUCTURE; /// /// Interrupt Source Override Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Bus; - UINT8 Source; - UINT32 GlobalSystemInterrupt; - UINT16 Flags; + UINT8 Type; + UINT8 Length; + UINT8 Bus; + UINT8 Source; + UINT32 GlobalSystemInterrupt; + UINT16 Flags; } EFI_ACPI_5_1_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE; /// /// Platform Interrupt Sources Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT8 InterruptType; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT8 IoSapicVector; - UINT32 GlobalSystemInterrupt; - UINT32 PlatformInterruptSourceFlags; - UINT8 CpeiProcessorOverride; - UINT8 Reserved[31]; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT8 InterruptType; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT8 IoSapicVector; + UINT32 GlobalSystemInterrupt; + UINT32 PlatformInterruptSourceFlags; + UINT8 CpeiProcessorOverride; + UINT8 Reserved[31]; } EFI_ACPI_5_1_PLATFORM_INTERRUPT_APIC_STRUCTURE; // @@ -388,43 +388,43 @@ typedef struct { /// Non-Maskable Interrupt Source Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT32 GlobalSystemInterrupt; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT32 GlobalSystemInterrupt; } EFI_ACPI_5_1_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE; /// /// Local APIC NMI Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorId; - UINT16 Flags; - UINT8 LocalApicLint; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorId; + UINT16 Flags; + UINT8 LocalApicLint; } EFI_ACPI_5_1_LOCAL_APIC_NMI_STRUCTURE; /// /// Local APIC Address Override Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT64 LocalApicAddress; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT64 LocalApicAddress; } EFI_ACPI_5_1_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE; /// /// IO SAPIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 IoApicId; - UINT8 Reserved; - UINT32 GlobalSystemInterruptBase; - UINT64 IoSapicAddress; + UINT8 Type; + UINT8 Length; + UINT8 IoApicId; + UINT8 Reserved; + UINT32 GlobalSystemInterruptBase; + UINT64 IoSapicAddress; } EFI_ACPI_5_1_IO_SAPIC_STRUCTURE; /// @@ -432,155 +432,155 @@ typedef struct { /// This struct followed by a null-terminated ASCII string - ACPI Processor UID String /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorId; - UINT8 LocalSapicId; - UINT8 LocalSapicEid; - UINT8 Reserved[3]; - UINT32 Flags; - UINT32 ACPIProcessorUIDValue; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorId; + UINT8 LocalSapicId; + UINT8 LocalSapicEid; + UINT8 Reserved[3]; + UINT32 Flags; + UINT32 ACPIProcessorUIDValue; } EFI_ACPI_5_1_PROCESSOR_LOCAL_SAPIC_STRUCTURE; /// /// Platform Interrupt Sources Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT8 InterruptType; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT8 IoSapicVector; - UINT32 GlobalSystemInterrupt; - UINT32 PlatformInterruptSourceFlags; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT8 InterruptType; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT8 IoSapicVector; + UINT32 GlobalSystemInterrupt; + UINT32 PlatformInterruptSourceFlags; } EFI_ACPI_5_1_PLATFORM_INTERRUPT_SOURCES_STRUCTURE; /// /// Platform Interrupt Source Flags. /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_5_1_CPEI_PROCESSOR_OVERRIDE BIT0 +#define EFI_ACPI_5_1_CPEI_PROCESSOR_OVERRIDE BIT0 /// /// Processor Local x2APIC Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[2]; - UINT32 X2ApicId; - UINT32 Flags; - UINT32 AcpiProcessorUid; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[2]; + UINT32 X2ApicId; + UINT32 Flags; + UINT32 AcpiProcessorUid; } EFI_ACPI_5_1_PROCESSOR_LOCAL_X2APIC_STRUCTURE; /// /// Local x2APIC NMI Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT32 AcpiProcessorUid; - UINT8 LocalX2ApicLint; - UINT8 Reserved[3]; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT32 AcpiProcessorUid; + UINT8 LocalX2ApicLint; + UINT8 Reserved[3]; } EFI_ACPI_5_1_LOCAL_X2APIC_NMI_STRUCTURE; /// /// GIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT32 CPUInterfaceNumber; - UINT32 AcpiProcessorUid; - UINT32 Flags; - UINT32 ParkingProtocolVersion; - UINT32 PerformanceInterruptGsiv; - UINT64 ParkedAddress; - UINT64 PhysicalBaseAddress; - UINT64 GICV; - UINT64 GICH; - UINT32 VGICMaintenanceInterrupt; - UINT64 GICRBaseAddress; - UINT64 MPIDR; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT32 CPUInterfaceNumber; + UINT32 AcpiProcessorUid; + UINT32 Flags; + UINT32 ParkingProtocolVersion; + UINT32 PerformanceInterruptGsiv; + UINT64 ParkedAddress; + UINT64 PhysicalBaseAddress; + UINT64 GICV; + UINT64 GICH; + UINT32 VGICMaintenanceInterrupt; + UINT64 GICRBaseAddress; + UINT64 MPIDR; } EFI_ACPI_5_1_GIC_STRUCTURE; /// /// GIC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_5_1_GIC_ENABLED BIT0 -#define EFI_ACPI_5_1_PERFORMANCE_INTERRUPT_MODEL BIT1 -#define EFI_ACPI_5_1_VGIC_MAINTENANCE_INTERRUPT_MODE_FLAGS BIT2 +#define EFI_ACPI_5_1_GIC_ENABLED BIT0 +#define EFI_ACPI_5_1_PERFORMANCE_INTERRUPT_MODEL BIT1 +#define EFI_ACPI_5_1_VGIC_MAINTENANCE_INTERRUPT_MODE_FLAGS BIT2 /// /// GIC Distributor Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved1; - UINT32 GicId; - UINT64 PhysicalBaseAddress; - UINT32 SystemVectorBase; - UINT8 GicVersion; - UINT8 Reserved2[3]; + UINT8 Type; + UINT8 Length; + UINT16 Reserved1; + UINT32 GicId; + UINT64 PhysicalBaseAddress; + UINT32 SystemVectorBase; + UINT8 GicVersion; + UINT8 Reserved2[3]; } EFI_ACPI_5_1_GIC_DISTRIBUTOR_STRUCTURE; /// /// GIC Version /// -#define EFI_ACPI_5_1_GIC_V1 0x01 -#define EFI_ACPI_5_1_GIC_V2 0x02 -#define EFI_ACPI_5_1_GIC_V3 0x03 -#define EFI_ACPI_5_1_GIC_V4 0x04 +#define EFI_ACPI_5_1_GIC_V1 0x01 +#define EFI_ACPI_5_1_GIC_V2 0x02 +#define EFI_ACPI_5_1_GIC_V3 0x03 +#define EFI_ACPI_5_1_GIC_V4 0x04 /// /// GIC MSI Frame Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved1; - UINT32 GicMsiFrameId; - UINT64 PhysicalBaseAddress; - UINT32 Flags; - UINT16 SPICount; - UINT16 SPIBase; + UINT8 Type; + UINT8 Length; + UINT16 Reserved1; + UINT32 GicMsiFrameId; + UINT64 PhysicalBaseAddress; + UINT32 Flags; + UINT16 SPICount; + UINT16 SPIBase; } EFI_ACPI_5_1_GIC_MSI_FRAME_STRUCTURE; /// /// GIC MSI Frame Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_5_1_SPI_COUNT_BASE_SELECT BIT0 +#define EFI_ACPI_5_1_SPI_COUNT_BASE_SELECT BIT0 /// /// GICR Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT64 DiscoveryRangeBaseAddress; - UINT32 DiscoveryRangeLength; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT64 DiscoveryRangeBaseAddress; + UINT32 DiscoveryRangeLength; } EFI_ACPI_5_1_GICR_STRUCTURE; /// /// Smart Battery Description Table (SBST) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 WarningEnergyLevel; - UINT32 LowEnergyLevel; - UINT32 CriticalEnergyLevel; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 WarningEnergyLevel; + UINT32 LowEnergyLevel; + UINT32 CriticalEnergyLevel; } EFI_ACPI_5_1_SMART_BATTERY_DESCRIPTION_TABLE; /// /// SBST Version (as defined in ACPI 5.1 spec.) /// -#define EFI_ACPI_5_1_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_5_1_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01 /// /// Embedded Controller Boot Resources Table (ECDT) @@ -588,11 +588,11 @@ typedef struct { /// a fully qualified reference to the name space object. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE EcControl; - EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE EcData; - UINT32 Uid; - UINT8 GpeBit; + EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE EcControl; + EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE EcData; + UINT32 Uid; + UINT8 GpeBit; } EFI_ACPI_5_1_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE; /// @@ -605,9 +605,9 @@ typedef struct { /// must be defined in a platform specific manner. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 Reserved1; ///< Must be set to 1 - UINT64 Reserved2; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 Reserved1; ///< Must be set to 1 + UINT64 Reserved2; } EFI_ACPI_5_1_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER; /// @@ -629,83 +629,83 @@ typedef struct { /// Processor Local APIC/SAPIC Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 ProximityDomain7To0; - UINT8 ApicId; - UINT32 Flags; - UINT8 LocalSapicEid; - UINT8 ProximityDomain31To8[3]; - UINT32 ClockDomain; + UINT8 Type; + UINT8 Length; + UINT8 ProximityDomain7To0; + UINT8 ApicId; + UINT32 Flags; + UINT8 LocalSapicEid; + UINT8 ProximityDomain31To8[3]; + UINT32 ClockDomain; } EFI_ACPI_5_1_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE; /// /// Local APIC/SAPIC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_5_1_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0) +#define EFI_ACPI_5_1_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0) /// /// Memory Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 ProximityDomain; - UINT16 Reserved1; - UINT32 AddressBaseLow; - UINT32 AddressBaseHigh; - UINT32 LengthLow; - UINT32 LengthHigh; - UINT32 Reserved2; - UINT32 Flags; - UINT64 Reserved3; + UINT8 Type; + UINT8 Length; + UINT32 ProximityDomain; + UINT16 Reserved1; + UINT32 AddressBaseLow; + UINT32 AddressBaseHigh; + UINT32 LengthLow; + UINT32 LengthHigh; + UINT32 Reserved2; + UINT32 Flags; + UINT64 Reserved3; } EFI_ACPI_5_1_MEMORY_AFFINITY_STRUCTURE; // // Memory Flags. All other bits are reserved and must be 0. // -#define EFI_ACPI_5_1_MEMORY_ENABLED (1 << 0) -#define EFI_ACPI_5_1_MEMORY_HOT_PLUGGABLE (1 << 1) -#define EFI_ACPI_5_1_MEMORY_NONVOLATILE (1 << 2) +#define EFI_ACPI_5_1_MEMORY_ENABLED (1 << 0) +#define EFI_ACPI_5_1_MEMORY_HOT_PLUGGABLE (1 << 1) +#define EFI_ACPI_5_1_MEMORY_NONVOLATILE (1 << 2) /// /// Processor Local x2APIC Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved1[2]; - UINT32 ProximityDomain; - UINT32 X2ApicId; - UINT32 Flags; - UINT32 ClockDomain; - UINT8 Reserved2[4]; + UINT8 Type; + UINT8 Length; + UINT8 Reserved1[2]; + UINT32 ProximityDomain; + UINT32 X2ApicId; + UINT32 Flags; + UINT32 ClockDomain; + UINT8 Reserved2[4]; } EFI_ACPI_5_1_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE; /// /// GICC Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 ProximityDomain; - UINT32 AcpiProcessorUid; - UINT32 Flags; - UINT32 ClockDomain; + UINT8 Type; + UINT8 Length; + UINT32 ProximityDomain; + UINT32 AcpiProcessorUid; + UINT32 Flags; + UINT32 ClockDomain; } EFI_ACPI_5_1_GICC_AFFINITY_STRUCTURE; /// /// GICC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_5_1_GICC_ENABLED (1 << 0) +#define EFI_ACPI_5_1_GICC_ENABLED (1 << 0) /// /// System Locality Distance Information Table (SLIT). /// The rest of the table is a matrix. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT64 NumberOfSystemLocalities; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT64 NumberOfSystemLocalities; } EFI_ACPI_5_1_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER; /// @@ -717,14 +717,14 @@ typedef struct { /// Corrected Platform Error Polling Table (CPEP) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 Reserved[8]; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 Reserved[8]; } EFI_ACPI_5_1_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_HEADER; /// /// CPEP Version (as defined in ACPI 5.1 spec.) /// -#define EFI_ACPI_5_1_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01 +#define EFI_ACPI_5_1_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01 // // CPEP processor structure types. @@ -735,66 +735,66 @@ typedef struct { /// Corrected Platform Error Polling Processor Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT32 PollingInterval; + UINT8 Type; + UINT8 Length; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT32 PollingInterval; } EFI_ACPI_5_1_CPEP_PROCESSOR_APIC_SAPIC_STRUCTURE; /// /// Maximum System Characteristics Table (MSCT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 OffsetProxDomInfo; - UINT32 MaximumNumberOfProximityDomains; - UINT32 MaximumNumberOfClockDomains; - UINT64 MaximumPhysicalAddress; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 OffsetProxDomInfo; + UINT32 MaximumNumberOfProximityDomains; + UINT32 MaximumNumberOfClockDomains; + UINT64 MaximumPhysicalAddress; } EFI_ACPI_5_1_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_HEADER; /// /// MSCT Version (as defined in ACPI 5.1 spec.) /// -#define EFI_ACPI_5_1_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01 +#define EFI_ACPI_5_1_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01 /// /// Maximum Proximity Domain Information Structure Definition /// typedef struct { - UINT8 Revision; - UINT8 Length; - UINT32 ProximityDomainRangeLow; - UINT32 ProximityDomainRangeHigh; - UINT32 MaximumProcessorCapacity; - UINT64 MaximumMemoryCapacity; + UINT8 Revision; + UINT8 Length; + UINT32 ProximityDomainRangeLow; + UINT32 ProximityDomainRangeHigh; + UINT32 MaximumProcessorCapacity; + UINT64 MaximumMemoryCapacity; } EFI_ACPI_5_1_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE; /// /// ACPI RAS Feature Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 PlatformCommunicationChannelIdentifier[12]; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 PlatformCommunicationChannelIdentifier[12]; } EFI_ACPI_5_1_RAS_FEATURE_TABLE; /// /// RASF Version (as defined in ACPI 5.1 spec.) /// -#define EFI_ACPI_5_1_RAS_FEATURE_TABLE_REVISION 0x01 +#define EFI_ACPI_5_1_RAS_FEATURE_TABLE_REVISION 0x01 /// /// ACPI RASF Platform Communication Channel Shared Memory Region definition. /// typedef struct { - UINT32 Signature; - UINT16 Command; - UINT16 Status; - UINT16 Version; - UINT8 RASCapabilities[16]; - UINT8 SetRASCapabilities[16]; - UINT16 NumberOfRASFParameterBlocks; - UINT32 SetRASCapabilitiesStatus; + UINT32 Signature; + UINT16 Command; + UINT16 Status; + UINT16 Version; + UINT8 RASCapabilities[16]; + UINT8 SetRASCapabilities[16]; + UINT16 NumberOfRASFParameterBlocks; + UINT32 SetRASCapabilitiesStatus; } EFI_ACPI_5_1_RASF_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION; /// @@ -812,52 +812,52 @@ typedef struct { /// ACPI RASF Parameter Block structure for PATROL_SCRUB /// typedef struct { - UINT16 Type; - UINT16 Version; - UINT16 Length; - UINT16 PatrolScrubCommand; - UINT64 RequestedAddressRange[2]; - UINT64 ActualAddressRange[2]; - UINT16 Flags; - UINT8 RequestedSpeed; + UINT16 Type; + UINT16 Version; + UINT16 Length; + UINT16 PatrolScrubCommand; + UINT64 RequestedAddressRange[2]; + UINT64 ActualAddressRange[2]; + UINT16 Flags; + UINT8 RequestedSpeed; } EFI_ACPI_5_1_RASF_PATROL_SCRUB_PLATFORM_BLOCK_STRUCTURE; /// /// ACPI RASF Patrol Scrub command /// -#define EFI_ACPI_5_1_RASF_PATROL_SCRUB_COMMAND_GET_PATROL_PARAMETERS 0x01 -#define EFI_ACPI_5_1_RASF_PATROL_SCRUB_COMMAND_START_PATROL_SCRUBBER 0x02 -#define EFI_ACPI_5_1_RASF_PATROL_SCRUB_COMMAND_STOP_PATROL_SCRUBBER 0x03 +#define EFI_ACPI_5_1_RASF_PATROL_SCRUB_COMMAND_GET_PATROL_PARAMETERS 0x01 +#define EFI_ACPI_5_1_RASF_PATROL_SCRUB_COMMAND_START_PATROL_SCRUBBER 0x02 +#define EFI_ACPI_5_1_RASF_PATROL_SCRUB_COMMAND_STOP_PATROL_SCRUBBER 0x03 /// /// Memory Power State Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 PlatformCommunicationChannelIdentifier; - UINT8 Reserved[3]; -// Memory Power Node Structure -// Memory Power State Characteristics + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 PlatformCommunicationChannelIdentifier; + UINT8 Reserved[3]; + // Memory Power Node Structure + // Memory Power State Characteristics } EFI_ACPI_5_1_MEMORY_POWER_STATUS_TABLE; /// /// MPST Version (as defined in ACPI 5.1 spec.) /// -#define EFI_ACPI_5_1_MEMORY_POWER_STATE_TABLE_REVISION 0x01 +#define EFI_ACPI_5_1_MEMORY_POWER_STATE_TABLE_REVISION 0x01 /// /// MPST Platform Communication Channel Shared Memory Region definition. /// typedef struct { - UINT32 Signature; - UINT16 Command; - UINT16 Status; - UINT32 MemoryPowerCommandRegister; - UINT32 MemoryPowerStatusRegister; - UINT32 PowerStateId; - UINT32 MemoryPowerNodeId; - UINT64 MemoryEnergyConsumed; - UINT64 ExpectedAveragePowerComsuned; + UINT32 Signature; + UINT16 Command; + UINT16 Status; + UINT32 MemoryPowerCommandRegister; + UINT32 MemoryPowerStatusRegister; + UINT32 PowerStateId; + UINT32 MemoryPowerNodeId; + UINT64 MemoryEnergyConsumed; + UINT64 ExpectedAveragePowerComsuned; } EFI_ACPI_5_1_MPST_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION; /// @@ -868,186 +868,186 @@ typedef struct { /// /// ACPI MPST Memory Power command /// -#define EFI_ACPI_5_1_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_POWER_STATE 0x01 -#define EFI_ACPI_5_1_MPST_MEMORY_POWER_COMMAND_SET_MEMORY_POWER_STATE 0x02 -#define EFI_ACPI_5_1_MPST_MEMORY_POWER_COMMAND_GET_AVERAGE_POWER_CONSUMED 0x03 -#define EFI_ACPI_5_1_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_ENERGY_CONSUMED 0x04 +#define EFI_ACPI_5_1_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_POWER_STATE 0x01 +#define EFI_ACPI_5_1_MPST_MEMORY_POWER_COMMAND_SET_MEMORY_POWER_STATE 0x02 +#define EFI_ACPI_5_1_MPST_MEMORY_POWER_COMMAND_GET_AVERAGE_POWER_CONSUMED 0x03 +#define EFI_ACPI_5_1_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_ENERGY_CONSUMED 0x04 /// /// MPST Memory Power Node Table /// typedef struct { - UINT8 PowerStateValue; - UINT8 PowerStateInformationIndex; + UINT8 PowerStateValue; + UINT8 PowerStateInformationIndex; } EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE; typedef struct { - UINT8 Flag; - UINT8 Reserved; - UINT16 MemoryPowerNodeId; - UINT32 Length; - UINT64 AddressBase; - UINT64 AddressLength; - UINT32 NumberOfPowerStates; - UINT32 NumberOfPhysicalComponents; -//EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE MemoryPowerState[NumberOfPowerStates]; -//UINT16 PhysicalComponentIdentifier[NumberOfPhysicalComponents]; + UINT8 Flag; + UINT8 Reserved; + UINT16 MemoryPowerNodeId; + UINT32 Length; + UINT64 AddressBase; + UINT64 AddressLength; + UINT32 NumberOfPowerStates; + UINT32 NumberOfPhysicalComponents; + // EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE MemoryPowerState[NumberOfPowerStates]; + // UINT16 PhysicalComponentIdentifier[NumberOfPhysicalComponents]; } EFI_ACPI_5_1_MPST_MEMORY_POWER_STRUCTURE; -#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STRUCTURE_FLAG_ENABLE 0x01 -#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STRUCTURE_FLAG_POWER_MANAGED 0x02 -#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STRUCTURE_FLAG_HOT_PLUGGABLE 0x04 +#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STRUCTURE_FLAG_ENABLE 0x01 +#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STRUCTURE_FLAG_POWER_MANAGED 0x02 +#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STRUCTURE_FLAG_HOT_PLUGGABLE 0x04 typedef struct { - UINT16 MemoryPowerNodeCount; - UINT8 Reserved[2]; + UINT16 MemoryPowerNodeCount; + UINT8 Reserved[2]; } EFI_ACPI_5_1_MPST_MEMORY_POWER_NODE_TABLE; /// /// MPST Memory Power State Characteristics Table /// typedef struct { - UINT8 PowerStateStructureID; - UINT8 Flag; - UINT16 Reserved; - UINT32 AveragePowerConsumedInMPS0; - UINT32 RelativePowerSavingToMPS0; - UINT64 ExitLatencyToMPS0; + UINT8 PowerStateStructureID; + UINT8 Flag; + UINT16 Reserved; + UINT32 AveragePowerConsumedInMPS0; + UINT32 RelativePowerSavingToMPS0; + UINT64 ExitLatencyToMPS0; } EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE; -#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_MEMORY_CONTENT_PRESERVED 0x01 -#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_ENTRY 0x02 -#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_EXIT 0x04 +#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_MEMORY_CONTENT_PRESERVED 0x01 +#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_ENTRY 0x02 +#define EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_EXIT 0x04 typedef struct { - UINT16 MemoryPowerStateCharacteristicsCount; - UINT8 Reserved[2]; + UINT16 MemoryPowerStateCharacteristicsCount; + UINT8 Reserved[2]; } EFI_ACPI_5_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_TABLE; /// /// Memory Topology Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 Reserved; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 Reserved; } EFI_ACPI_5_1_MEMORY_TOPOLOGY_TABLE; /// /// PMTT Version (as defined in ACPI 5.1 spec.) /// -#define EFI_ACPI_5_1_MEMORY_TOPOLOGY_TABLE_REVISION 0x01 +#define EFI_ACPI_5_1_MEMORY_TOPOLOGY_TABLE_REVISION 0x01 /// /// Common Memory Aggregator Device Structure. /// typedef struct { - UINT8 Type; - UINT8 Reserved; - UINT16 Length; - UINT16 Flags; - UINT16 Reserved1; + UINT8 Type; + UINT8 Reserved; + UINT16 Length; + UINT16 Flags; + UINT16 Reserved1; } EFI_ACPI_5_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE; /// /// Memory Aggregator Device Type /// -#define EFI_ACPI_5_1_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_SOCKET 0x0 -#define EFI_ACPI_5_1_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_MEMORY_CONTROLLER 0x1 -#define EFI_ACPI_5_1_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_DIMM 0x2 +#define EFI_ACPI_5_1_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_SOCKET 0x0 +#define EFI_ACPI_5_1_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_MEMORY_CONTROLLER 0x1 +#define EFI_ACPI_5_1_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_DIMM 0x2 /// /// Socket Memory Aggregator Device Structure. /// typedef struct { - EFI_ACPI_5_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; - UINT16 SocketIdentifier; - UINT16 Reserved; -//EFI_ACPI_5_1_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE MemoryController[]; + EFI_ACPI_5_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; + UINT16 SocketIdentifier; + UINT16 Reserved; + // EFI_ACPI_5_1_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE MemoryController[]; } EFI_ACPI_5_1_PMMT_SOCKET_MEMORY_AGGREGATOR_DEVICE_STRUCTURE; /// /// MemoryController Memory Aggregator Device Structure. /// typedef struct { - EFI_ACPI_5_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; - UINT32 ReadLatency; - UINT32 WriteLatency; - UINT32 ReadBandwidth; - UINT32 WriteBandwidth; - UINT16 OptimalAccessUnit; - UINT16 OptimalAccessAlignment; - UINT16 Reserved; - UINT16 NumberOfProximityDomains; -//UINT32 ProximityDomain[NumberOfProximityDomains]; -//EFI_ACPI_5_1_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE PhysicalComponent[]; + EFI_ACPI_5_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; + UINT32 ReadLatency; + UINT32 WriteLatency; + UINT32 ReadBandwidth; + UINT32 WriteBandwidth; + UINT16 OptimalAccessUnit; + UINT16 OptimalAccessAlignment; + UINT16 Reserved; + UINT16 NumberOfProximityDomains; + // UINT32 ProximityDomain[NumberOfProximityDomains]; + // EFI_ACPI_5_1_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE PhysicalComponent[]; } EFI_ACPI_5_1_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE; /// /// DIMM Memory Aggregator Device Structure. /// typedef struct { - EFI_ACPI_5_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; - UINT16 PhysicalComponentIdentifier; - UINT16 Reserved; - UINT32 SizeOfDimm; - UINT32 SmbiosHandle; + EFI_ACPI_5_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; + UINT16 PhysicalComponentIdentifier; + UINT16 Reserved; + UINT32 SizeOfDimm; + UINT32 SmbiosHandle; } EFI_ACPI_5_1_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE; /// /// Boot Graphics Resource Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_DESCRIPTION_HEADER Header; /// /// 2-bytes (16 bit) version ID. This value must be 1. /// - UINT16 Version; + UINT16 Version; /// /// 1-byte status field indicating current status about the table. /// Bits[7:1] = Reserved (must be zero) /// Bit [0] = Valid. A one indicates the boot image graphic is valid. /// - UINT8 Status; + UINT8 Status; /// /// 1-byte enumerated type field indicating format of the image. /// 0 = Bitmap /// 1 - 255 Reserved (for future use) /// - UINT8 ImageType; + UINT8 ImageType; /// /// 8-byte (64 bit) physical address pointing to the firmware's in-memory copy /// of the image bitmap. /// - UINT64 ImageAddress; + UINT64 ImageAddress; /// /// A 4-byte (32-bit) unsigned long describing the display X-offset of the boot image. /// (X, Y) display offset of the top left corner of the boot image. /// The top left corner of the display is at offset (0, 0). /// - UINT32 ImageOffsetX; + UINT32 ImageOffsetX; /// /// A 4-byte (32-bit) unsigned long describing the display Y-offset of the boot image. /// (X, Y) display offset of the top left corner of the boot image. /// The top left corner of the display is at offset (0, 0). /// - UINT32 ImageOffsetY; + UINT32 ImageOffsetY; } EFI_ACPI_5_1_BOOT_GRAPHICS_RESOURCE_TABLE; /// /// BGRT Revision /// -#define EFI_ACPI_5_1_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION 1 +#define EFI_ACPI_5_1_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION 1 /// /// BGRT Version /// -#define EFI_ACPI_5_1_BGRT_VERSION 0x01 +#define EFI_ACPI_5_1_BGRT_VERSION 0x01 /// /// BGRT Status /// -#define EFI_ACPI_5_1_BGRT_STATUS_NOT_DISPLAYED 0x00 -#define EFI_ACPI_5_1_BGRT_STATUS_DISPLAYED 0x01 +#define EFI_ACPI_5_1_BGRT_STATUS_NOT_DISPLAYED 0x00 +#define EFI_ACPI_5_1_BGRT_STATUS_DISPLAYED 0x01 /// /// BGRT Image Type @@ -1057,26 +1057,26 @@ typedef struct { /// /// FPDT Version (as defined in ACPI 5.1 spec.) /// -#define EFI_ACPI_5_1_FIRMWARE_PERFORMANCE_DATA_TABLE_REVISION 0x01 +#define EFI_ACPI_5_1_FIRMWARE_PERFORMANCE_DATA_TABLE_REVISION 0x01 /// /// FPDT Performance Record Types /// -#define EFI_ACPI_5_1_FPDT_RECORD_TYPE_FIRMWARE_BASIC_BOOT_POINTER 0x0000 -#define EFI_ACPI_5_1_FPDT_RECORD_TYPE_S3_PERFORMANCE_TABLE_POINTER 0x0001 +#define EFI_ACPI_5_1_FPDT_RECORD_TYPE_FIRMWARE_BASIC_BOOT_POINTER 0x0000 +#define EFI_ACPI_5_1_FPDT_RECORD_TYPE_S3_PERFORMANCE_TABLE_POINTER 0x0001 /// /// FPDT Performance Record Revision /// -#define EFI_ACPI_5_1_FPDT_RECORD_REVISION_FIRMWARE_BASIC_BOOT_POINTER 0x01 -#define EFI_ACPI_5_1_FPDT_RECORD_REVISION_S3_PERFORMANCE_TABLE_POINTER 0x01 +#define EFI_ACPI_5_1_FPDT_RECORD_REVISION_FIRMWARE_BASIC_BOOT_POINTER 0x01 +#define EFI_ACPI_5_1_FPDT_RECORD_REVISION_S3_PERFORMANCE_TABLE_POINTER 0x01 /// /// FPDT Runtime Performance Record Types /// -#define EFI_ACPI_5_1_FPDT_RUNTIME_RECORD_TYPE_S3_RESUME 0x0000 -#define EFI_ACPI_5_1_FPDT_RUNTIME_RECORD_TYPE_S3_SUSPEND 0x0001 -#define EFI_ACPI_5_1_FPDT_RUNTIME_RECORD_TYPE_FIRMWARE_BASIC_BOOT 0x0002 +#define EFI_ACPI_5_1_FPDT_RUNTIME_RECORD_TYPE_S3_RESUME 0x0000 +#define EFI_ACPI_5_1_FPDT_RUNTIME_RECORD_TYPE_S3_SUSPEND 0x0001 +#define EFI_ACPI_5_1_FPDT_RUNTIME_RECORD_TYPE_FIRMWARE_BASIC_BOOT 0x0002 /// /// FPDT Runtime Performance Record Revision @@ -1089,77 +1089,77 @@ typedef struct { /// FPDT Performance Record header /// typedef struct { - UINT16 Type; - UINT8 Length; - UINT8 Revision; + UINT16 Type; + UINT8 Length; + UINT8 Revision; } EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER; /// /// FPDT Performance Table header /// typedef struct { - UINT32 Signature; - UINT32 Length; + UINT32 Signature; + UINT32 Length; } EFI_ACPI_5_1_FPDT_PERFORMANCE_TABLE_HEADER; /// /// FPDT Firmware Basic Boot Performance Pointer Record Structure /// typedef struct { - EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER Header; - UINT32 Reserved; + EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER Header; + UINT32 Reserved; /// /// 64-bit processor-relative physical address of the Basic Boot Performance Table. /// - UINT64 BootPerformanceTablePointer; + UINT64 BootPerformanceTablePointer; } EFI_ACPI_5_1_FPDT_BOOT_PERFORMANCE_TABLE_POINTER_RECORD; /// /// FPDT S3 Performance Table Pointer Record Structure /// typedef struct { - EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER Header; - UINT32 Reserved; + EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER Header; + UINT32 Reserved; /// /// 64-bit processor-relative physical address of the S3 Performance Table. /// - UINT64 S3PerformanceTablePointer; + UINT64 S3PerformanceTablePointer; } EFI_ACPI_5_1_FPDT_S3_PERFORMANCE_TABLE_POINTER_RECORD; /// /// FPDT Firmware Basic Boot Performance Record Structure /// typedef struct { - EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER Header; - UINT32 Reserved; + EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER Header; + UINT32 Reserved; /// /// Timer value logged at the beginning of firmware image execution. /// This may not always be zero or near zero. /// - UINT64 ResetEnd; + UINT64 ResetEnd; /// /// Timer value logged just prior to loading the OS boot loader into memory. /// For non-UEFI compatible boots, this field must be zero. /// - UINT64 OsLoaderLoadImageStart; + UINT64 OsLoaderLoadImageStart; /// /// Timer value logged just prior to launching the previously loaded OS boot loader image. /// For non-UEFI compatible boots, the timer value logged will be just prior /// to the INT 19h handler invocation. /// - UINT64 OsLoaderStartImageStart; + UINT64 OsLoaderStartImageStart; /// /// Timer value logged at the point when the OS loader calls the /// ExitBootServices function for UEFI compatible firmware. /// For non-UEFI compatible boots, this field must be zero. /// - UINT64 ExitBootServicesEntry; + UINT64 ExitBootServicesEntry; /// /// Timer value logged at the point just prior to when the OS loader gaining /// control back from calls the ExitBootServices function for UEFI compatible firmware. /// For non-UEFI compatible boots, this field must be zero. /// - UINT64 ExitBootServicesExit; + UINT64 ExitBootServicesExit; } EFI_ACPI_5_1_FPDT_FIRMWARE_BASIC_BOOT_RECORD; /// @@ -1171,7 +1171,7 @@ typedef struct { // FPDT Firmware Basic Boot Performance Table // typedef struct { - EFI_ACPI_5_1_FPDT_PERFORMANCE_TABLE_HEADER Header; + EFI_ACPI_5_1_FPDT_PERFORMANCE_TABLE_HEADER Header; // // one or more Performance Records. // @@ -1186,7 +1186,7 @@ typedef struct { // FPDT Firmware S3 Boot Performance Table // typedef struct { - EFI_ACPI_5_1_FPDT_PERFORMANCE_TABLE_HEADER Header; + EFI_ACPI_5_1_FPDT_PERFORMANCE_TABLE_HEADER Header; // // one or more Performance Records. // @@ -1196,181 +1196,181 @@ typedef struct { /// FPDT Basic S3 Resume Performance Record /// typedef struct { - EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER Header; + EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER Header; /// /// A count of the number of S3 resume cycles since the last full boot sequence. /// - UINT32 ResumeCount; + UINT32 ResumeCount; /// /// Timer recorded at the end of BIOS S3 resume, just prior to handoff to the /// OS waking vector. Only the most recent resume cycle's time is retained. /// - UINT64 FullResume; + UINT64 FullResume; /// /// Average timer value of all resume cycles logged since the last full boot /// sequence, including the most recent resume. Note that the entire log of /// timer values does not need to be retained in order to calculate this average. /// - UINT64 AverageResume; + UINT64 AverageResume; } EFI_ACPI_5_1_FPDT_S3_RESUME_RECORD; /// /// FPDT Basic S3 Suspend Performance Record /// typedef struct { - EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER Header; + EFI_ACPI_5_1_FPDT_PERFORMANCE_RECORD_HEADER Header; /// /// Timer value recorded at the OS write to SLP_TYP upon entry to S3. /// Only the most recent suspend cycle's timer value is retained. /// - UINT64 SuspendStart; + UINT64 SuspendStart; /// /// Timer value recorded at the final firmware write to SLP_TYP (or other /// mechanism) used to trigger hardware entry to S3. /// Only the most recent suspend cycle's timer value is retained. /// - UINT64 SuspendEnd; + UINT64 SuspendEnd; } EFI_ACPI_5_1_FPDT_S3_SUSPEND_RECORD; /// /// Firmware Performance Record Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_DESCRIPTION_HEADER Header; } EFI_ACPI_5_1_FIRMWARE_PERFORMANCE_RECORD_TABLE; /// /// Generic Timer Description Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT64 CntControlBasePhysicalAddress; - UINT32 Reserved; - UINT32 SecurePL1TimerGSIV; - UINT32 SecurePL1TimerFlags; - UINT32 NonSecurePL1TimerGSIV; - UINT32 NonSecurePL1TimerFlags; - UINT32 VirtualTimerGSIV; - UINT32 VirtualTimerFlags; - UINT32 NonSecurePL2TimerGSIV; - UINT32 NonSecurePL2TimerFlags; - UINT64 CntReadBasePhysicalAddress; - UINT32 PlatformTimerCount; - UINT32 PlatformTimerOffset; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT64 CntControlBasePhysicalAddress; + UINT32 Reserved; + UINT32 SecurePL1TimerGSIV; + UINT32 SecurePL1TimerFlags; + UINT32 NonSecurePL1TimerGSIV; + UINT32 NonSecurePL1TimerFlags; + UINT32 VirtualTimerGSIV; + UINT32 VirtualTimerFlags; + UINT32 NonSecurePL2TimerGSIV; + UINT32 NonSecurePL2TimerFlags; + UINT64 CntReadBasePhysicalAddress; + UINT32 PlatformTimerCount; + UINT32 PlatformTimerOffset; } EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE; /// /// GTDT Version (as defined in ACPI 5.1 spec.) /// -#define EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION 0x02 +#define EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION 0x02 /// /// Timer Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_5_1_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 -#define EFI_ACPI_5_1_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 -#define EFI_ACPI_5_1_GTDT_TIMER_FLAG_ALWAYS_ON_CAPABILITY BIT2 +#define EFI_ACPI_5_1_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 +#define EFI_ACPI_5_1_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 +#define EFI_ACPI_5_1_GTDT_TIMER_FLAG_ALWAYS_ON_CAPABILITY BIT2 /// /// Platform Timer Type /// -#define EFI_ACPI_5_1_GTDT_GT_BLOCK 0 -#define EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG 1 +#define EFI_ACPI_5_1_GTDT_GT_BLOCK 0 +#define EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG 1 /// /// GT Block Structure /// typedef struct { - UINT8 Type; - UINT16 Length; - UINT8 Reserved; - UINT64 CntCtlBase; - UINT32 GTBlockTimerCount; - UINT32 GTBlockTimerOffset; + UINT8 Type; + UINT16 Length; + UINT8 Reserved; + UINT64 CntCtlBase; + UINT32 GTBlockTimerCount; + UINT32 GTBlockTimerOffset; } EFI_ACPI_5_1_GTDT_GT_BLOCK_STRUCTURE; /// /// GT Block Timer Structure /// typedef struct { - UINT8 GTFrameNumber; - UINT8 Reserved[3]; - UINT64 CntBaseX; - UINT64 CntEL0BaseX; - UINT32 GTxPhysicalTimerGSIV; - UINT32 GTxPhysicalTimerFlags; - UINT32 GTxVirtualTimerGSIV; - UINT32 GTxVirtualTimerFlags; - UINT32 GTxCommonFlags; + UINT8 GTFrameNumber; + UINT8 Reserved[3]; + UINT64 CntBaseX; + UINT64 CntEL0BaseX; + UINT32 GTxPhysicalTimerGSIV; + UINT32 GTxPhysicalTimerFlags; + UINT32 GTxVirtualTimerGSIV; + UINT32 GTxVirtualTimerFlags; + UINT32 GTxCommonFlags; } EFI_ACPI_5_1_GTDT_GT_BLOCK_TIMER_STRUCTURE; /// /// GT Block Physical Timers and Virtual Timers Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_5_1_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 -#define EFI_ACPI_5_1_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 +#define EFI_ACPI_5_1_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 +#define EFI_ACPI_5_1_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 /// /// Common Flags Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_5_1_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER BIT0 -#define EFI_ACPI_5_1_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY BIT1 +#define EFI_ACPI_5_1_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER BIT0 +#define EFI_ACPI_5_1_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY BIT1 /// /// SBSA Generic Watchdog Structure /// typedef struct { - UINT8 Type; - UINT16 Length; - UINT8 Reserved; - UINT64 RefreshFramePhysicalAddress; - UINT64 WatchdogControlFramePhysicalAddress; - UINT32 WatchdogTimerGSIV; - UINT32 WatchdogTimerFlags; + UINT8 Type; + UINT16 Length; + UINT8 Reserved; + UINT64 RefreshFramePhysicalAddress; + UINT64 WatchdogControlFramePhysicalAddress; + UINT32 WatchdogTimerGSIV; + UINT32 WatchdogTimerFlags; } EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE; /// /// SBSA Generic Watchdog Timer Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_MODE BIT0 -#define EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_POLARITY BIT1 -#define EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER BIT2 +#define EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_MODE BIT0 +#define EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_POLARITY BIT1 +#define EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER BIT2 /// /// Boot Error Record Table (BERT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 BootErrorRegionLength; - UINT64 BootErrorRegion; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 BootErrorRegionLength; + UINT64 BootErrorRegion; } EFI_ACPI_5_1_BOOT_ERROR_RECORD_TABLE_HEADER; /// /// BERT Version (as defined in ACPI 5.1 spec.) /// -#define EFI_ACPI_5_1_BOOT_ERROR_RECORD_TABLE_REVISION 0x01 +#define EFI_ACPI_5_1_BOOT_ERROR_RECORD_TABLE_REVISION 0x01 /// /// Boot Error Region Block Status Definition /// typedef struct { - UINT32 UncorrectableErrorValid:1; - UINT32 CorrectableErrorValid:1; - UINT32 MultipleUncorrectableErrors:1; - UINT32 MultipleCorrectableErrors:1; - UINT32 ErrorDataEntryCount:10; - UINT32 Reserved:18; + UINT32 UncorrectableErrorValid : 1; + UINT32 CorrectableErrorValid : 1; + UINT32 MultipleUncorrectableErrors : 1; + UINT32 MultipleCorrectableErrors : 1; + UINT32 ErrorDataEntryCount : 10; + UINT32 Reserved : 18; } EFI_ACPI_5_1_ERROR_BLOCK_STATUS; /// /// Boot Error Region Definition /// typedef struct { - EFI_ACPI_5_1_ERROR_BLOCK_STATUS BlockStatus; - UINT32 RawDataOffset; - UINT32 RawDataLength; - UINT32 DataLength; - UINT32 ErrorSeverity; + EFI_ACPI_5_1_ERROR_BLOCK_STATUS BlockStatus; + UINT32 RawDataOffset; + UINT32 RawDataLength; + UINT32 DataLength; + UINT32 ErrorSeverity; } EFI_ACPI_5_1_BOOT_ERROR_REGION_STRUCTURE; // @@ -1385,14 +1385,14 @@ typedef struct { /// Generic Error Data Entry Definition /// typedef struct { - UINT8 SectionType[16]; - UINT32 ErrorSeverity; - UINT16 Revision; - UINT8 ValidationBits; - UINT8 Flags; - UINT32 ErrorDataLength; - UINT8 FruId[16]; - UINT8 FruText[20]; + UINT8 SectionType[16]; + UINT32 ErrorSeverity; + UINT16 Revision; + UINT8 ValidationBits; + UINT8 Flags; + UINT32 ErrorDataLength; + UINT8 FruId[16]; + UINT8 FruText[20]; } EFI_ACPI_5_1_GENERIC_ERROR_DATA_ENTRY_STRUCTURE; /// @@ -1404,14 +1404,14 @@ typedef struct { /// HEST - Hardware Error Source Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 ErrorSourceCount; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 ErrorSourceCount; } EFI_ACPI_5_1_HARDWARE_ERROR_SOURCE_TABLE_HEADER; /// /// HEST Version (as defined in ACPI 5.1 spec.) /// -#define EFI_ACPI_5_1_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01 +#define EFI_ACPI_5_1_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01 // // Error Source structure types. @@ -1427,403 +1427,403 @@ typedef struct { // // Error Source structure flags. // -#define EFI_ACPI_5_1_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0) -#define EFI_ACPI_5_1_ERROR_SOURCE_FLAG_GLOBAL (1 << 1) +#define EFI_ACPI_5_1_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0) +#define EFI_ACPI_5_1_ERROR_SOURCE_FLAG_GLOBAL (1 << 1) /// /// IA-32 Architecture Machine Check Exception Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT64 GlobalCapabilityInitData; - UINT64 GlobalControlInitData; - UINT8 NumberOfHardwareBanks; - UINT8 Reserved1[7]; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT64 GlobalCapabilityInitData; + UINT64 GlobalControlInitData; + UINT8 NumberOfHardwareBanks; + UINT8 Reserved1[7]; } EFI_ACPI_5_1_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION_STRUCTURE; /// /// IA-32 Architecture Machine Check Bank Structure Definition /// typedef struct { - UINT8 BankNumber; - UINT8 ClearStatusOnInitialization; - UINT8 StatusDataFormat; - UINT8 Reserved0; - UINT32 ControlRegisterMsrAddress; - UINT64 ControlInitData; - UINT32 StatusRegisterMsrAddress; - UINT32 AddressRegisterMsrAddress; - UINT32 MiscRegisterMsrAddress; + UINT8 BankNumber; + UINT8 ClearStatusOnInitialization; + UINT8 StatusDataFormat; + UINT8 Reserved0; + UINT32 ControlRegisterMsrAddress; + UINT64 ControlInitData; + UINT32 StatusRegisterMsrAddress; + UINT32 AddressRegisterMsrAddress; + UINT32 MiscRegisterMsrAddress; } EFI_ACPI_5_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_BANK_STRUCTURE; /// /// IA-32 Architecture Machine Check Bank Structure MCA data format /// -#define EFI_ACPI_5_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00 -#define EFI_ACPI_5_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01 -#define EFI_ACPI_5_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02 +#define EFI_ACPI_5_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00 +#define EFI_ACPI_5_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01 +#define EFI_ACPI_5_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02 // // Hardware Error Notification types. All other values are reserved // -#define EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00 -#define EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01 -#define EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02 -#define EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_SCI 0x03 -#define EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_NMI 0x04 +#define EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00 +#define EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01 +#define EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02 +#define EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_SCI 0x03 +#define EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_NMI 0x04 /// /// Hardware Error Notification Configuration Write Enable Structure Definition /// typedef struct { - UINT16 Type:1; - UINT16 PollInterval:1; - UINT16 SwitchToPollingThresholdValue:1; - UINT16 SwitchToPollingThresholdWindow:1; - UINT16 ErrorThresholdValue:1; - UINT16 ErrorThresholdWindow:1; - UINT16 Reserved:10; + UINT16 Type : 1; + UINT16 PollInterval : 1; + UINT16 SwitchToPollingThresholdValue : 1; + UINT16 SwitchToPollingThresholdWindow : 1; + UINT16 ErrorThresholdValue : 1; + UINT16 ErrorThresholdWindow : 1; + UINT16 Reserved : 10; } EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE; /// /// Hardware Error Notification Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable; - UINT32 PollInterval; - UINT32 Vector; - UINT32 SwitchToPollingThresholdValue; - UINT32 SwitchToPollingThresholdWindow; - UINT32 ErrorThresholdValue; - UINT32 ErrorThresholdWindow; + UINT8 Type; + UINT8 Length; + EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable; + UINT32 PollInterval; + UINT32 Vector; + UINT32 SwitchToPollingThresholdValue; + UINT32 SwitchToPollingThresholdWindow; + UINT32 ErrorThresholdValue; + UINT32 ErrorThresholdWindow; } EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_STRUCTURE; /// /// IA-32 Architecture Corrected Machine Check Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; - UINT8 NumberOfHardwareBanks; - UINT8 Reserved1[3]; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; + UINT8 NumberOfHardwareBanks; + UINT8 Reserved1[3]; } EFI_ACPI_5_1_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK_STRUCTURE; /// /// IA-32 Architecture NMI Error Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 MaxRawDataLength; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 MaxRawDataLength; } EFI_ACPI_5_1_IA32_ARCHITECTURE_NMI_ERROR_STRUCTURE; /// /// PCI Express Root Port AER Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 Bus; - UINT16 Device; - UINT16 Function; - UINT16 DeviceControl; - UINT8 Reserved1[2]; - UINT32 UncorrectableErrorMask; - UINT32 UncorrectableErrorSeverity; - UINT32 CorrectableErrorMask; - UINT32 AdvancedErrorCapabilitiesAndControl; - UINT32 RootErrorCommand; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 Bus; + UINT16 Device; + UINT16 Function; + UINT16 DeviceControl; + UINT8 Reserved1[2]; + UINT32 UncorrectableErrorMask; + UINT32 UncorrectableErrorSeverity; + UINT32 CorrectableErrorMask; + UINT32 AdvancedErrorCapabilitiesAndControl; + UINT32 RootErrorCommand; } EFI_ACPI_5_1_PCI_EXPRESS_ROOT_PORT_AER_STRUCTURE; /// /// PCI Express Device AER Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 Bus; - UINT16 Device; - UINT16 Function; - UINT16 DeviceControl; - UINT8 Reserved1[2]; - UINT32 UncorrectableErrorMask; - UINT32 UncorrectableErrorSeverity; - UINT32 CorrectableErrorMask; - UINT32 AdvancedErrorCapabilitiesAndControl; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 Bus; + UINT16 Device; + UINT16 Function; + UINT16 DeviceControl; + UINT8 Reserved1[2]; + UINT32 UncorrectableErrorMask; + UINT32 UncorrectableErrorSeverity; + UINT32 CorrectableErrorMask; + UINT32 AdvancedErrorCapabilitiesAndControl; } EFI_ACPI_5_1_PCI_EXPRESS_DEVICE_AER_STRUCTURE; /// /// PCI Express Bridge AER Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 Bus; - UINT16 Device; - UINT16 Function; - UINT16 DeviceControl; - UINT8 Reserved1[2]; - UINT32 UncorrectableErrorMask; - UINT32 UncorrectableErrorSeverity; - UINT32 CorrectableErrorMask; - UINT32 AdvancedErrorCapabilitiesAndControl; - UINT32 SecondaryUncorrectableErrorMask; - UINT32 SecondaryUncorrectableErrorSeverity; - UINT32 SecondaryAdvancedErrorCapabilitiesAndControl; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 Bus; + UINT16 Device; + UINT16 Function; + UINT16 DeviceControl; + UINT8 Reserved1[2]; + UINT32 UncorrectableErrorMask; + UINT32 UncorrectableErrorSeverity; + UINT32 CorrectableErrorMask; + UINT32 AdvancedErrorCapabilitiesAndControl; + UINT32 SecondaryUncorrectableErrorMask; + UINT32 SecondaryUncorrectableErrorSeverity; + UINT32 SecondaryAdvancedErrorCapabilitiesAndControl; } EFI_ACPI_5_1_PCI_EXPRESS_BRIDGE_AER_STRUCTURE; /// /// Generic Hardware Error Source Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT16 RelatedSourceId; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 MaxRawDataLength; - EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress; - EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; - UINT32 ErrorStatusBlockLength; + UINT16 Type; + UINT16 SourceId; + UINT16 RelatedSourceId; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 MaxRawDataLength; + EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress; + EFI_ACPI_5_1_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; + UINT32 ErrorStatusBlockLength; } EFI_ACPI_5_1_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE; /// /// Generic Error Status Definition /// typedef struct { - EFI_ACPI_5_1_ERROR_BLOCK_STATUS BlockStatus; - UINT32 RawDataOffset; - UINT32 RawDataLength; - UINT32 DataLength; - UINT32 ErrorSeverity; + EFI_ACPI_5_1_ERROR_BLOCK_STATUS BlockStatus; + UINT32 RawDataOffset; + UINT32 RawDataLength; + UINT32 DataLength; + UINT32 ErrorSeverity; } EFI_ACPI_5_1_GENERIC_ERROR_STATUS_STRUCTURE; /// /// ERST - Error Record Serialization Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 SerializationHeaderSize; - UINT8 Reserved0[4]; - UINT32 InstructionEntryCount; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 SerializationHeaderSize; + UINT8 Reserved0[4]; + UINT32 InstructionEntryCount; } EFI_ACPI_5_1_ERROR_RECORD_SERIALIZATION_TABLE_HEADER; /// /// ERST Version (as defined in ACPI 5.1 spec.) /// -#define EFI_ACPI_5_1_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01 +#define EFI_ACPI_5_1_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01 /// /// ERST Serialization Actions /// -#define EFI_ACPI_5_1_ERST_BEGIN_WRITE_OPERATION 0x00 -#define EFI_ACPI_5_1_ERST_BEGIN_READ_OPERATION 0x01 -#define EFI_ACPI_5_1_ERST_BEGIN_CLEAR_OPERATION 0x02 -#define EFI_ACPI_5_1_ERST_END_OPERATION 0x03 -#define EFI_ACPI_5_1_ERST_SET_RECORD_OFFSET 0x04 -#define EFI_ACPI_5_1_ERST_EXECUTE_OPERATION 0x05 -#define EFI_ACPI_5_1_ERST_CHECK_BUSY_STATUS 0x06 -#define EFI_ACPI_5_1_ERST_GET_COMMAND_STATUS 0x07 -#define EFI_ACPI_5_1_ERST_GET_RECORD_IDENTIFIER 0x08 -#define EFI_ACPI_5_1_ERST_SET_RECORD_IDENTIFIER 0x09 -#define EFI_ACPI_5_1_ERST_GET_RECORD_COUNT 0x0A -#define EFI_ACPI_5_1_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B -#define EFI_ACPI_5_1_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D -#define EFI_ACPI_5_1_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E -#define EFI_ACPI_5_1_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F +#define EFI_ACPI_5_1_ERST_BEGIN_WRITE_OPERATION 0x00 +#define EFI_ACPI_5_1_ERST_BEGIN_READ_OPERATION 0x01 +#define EFI_ACPI_5_1_ERST_BEGIN_CLEAR_OPERATION 0x02 +#define EFI_ACPI_5_1_ERST_END_OPERATION 0x03 +#define EFI_ACPI_5_1_ERST_SET_RECORD_OFFSET 0x04 +#define EFI_ACPI_5_1_ERST_EXECUTE_OPERATION 0x05 +#define EFI_ACPI_5_1_ERST_CHECK_BUSY_STATUS 0x06 +#define EFI_ACPI_5_1_ERST_GET_COMMAND_STATUS 0x07 +#define EFI_ACPI_5_1_ERST_GET_RECORD_IDENTIFIER 0x08 +#define EFI_ACPI_5_1_ERST_SET_RECORD_IDENTIFIER 0x09 +#define EFI_ACPI_5_1_ERST_GET_RECORD_COUNT 0x0A +#define EFI_ACPI_5_1_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B +#define EFI_ACPI_5_1_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D +#define EFI_ACPI_5_1_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E +#define EFI_ACPI_5_1_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F /// /// ERST Action Command Status /// -#define EFI_ACPI_5_1_ERST_STATUS_SUCCESS 0x00 -#define EFI_ACPI_5_1_ERST_STATUS_NOT_ENOUGH_SPACE 0x01 -#define EFI_ACPI_5_1_ERST_STATUS_HARDWARE_NOT_AVAILABLE 0x02 -#define EFI_ACPI_5_1_ERST_STATUS_FAILED 0x03 -#define EFI_ACPI_5_1_ERST_STATUS_RECORD_STORE_EMPTY 0x04 -#define EFI_ACPI_5_1_ERST_STATUS_RECORD_NOT_FOUND 0x05 +#define EFI_ACPI_5_1_ERST_STATUS_SUCCESS 0x00 +#define EFI_ACPI_5_1_ERST_STATUS_NOT_ENOUGH_SPACE 0x01 +#define EFI_ACPI_5_1_ERST_STATUS_HARDWARE_NOT_AVAILABLE 0x02 +#define EFI_ACPI_5_1_ERST_STATUS_FAILED 0x03 +#define EFI_ACPI_5_1_ERST_STATUS_RECORD_STORE_EMPTY 0x04 +#define EFI_ACPI_5_1_ERST_STATUS_RECORD_NOT_FOUND 0x05 /// /// ERST Serialization Instructions /// -#define EFI_ACPI_5_1_ERST_READ_REGISTER 0x00 -#define EFI_ACPI_5_1_ERST_READ_REGISTER_VALUE 0x01 -#define EFI_ACPI_5_1_ERST_WRITE_REGISTER 0x02 -#define EFI_ACPI_5_1_ERST_WRITE_REGISTER_VALUE 0x03 -#define EFI_ACPI_5_1_ERST_NOOP 0x04 -#define EFI_ACPI_5_1_ERST_LOAD_VAR1 0x05 -#define EFI_ACPI_5_1_ERST_LOAD_VAR2 0x06 -#define EFI_ACPI_5_1_ERST_STORE_VAR1 0x07 -#define EFI_ACPI_5_1_ERST_ADD 0x08 -#define EFI_ACPI_5_1_ERST_SUBTRACT 0x09 -#define EFI_ACPI_5_1_ERST_ADD_VALUE 0x0A -#define EFI_ACPI_5_1_ERST_SUBTRACT_VALUE 0x0B -#define EFI_ACPI_5_1_ERST_STALL 0x0C -#define EFI_ACPI_5_1_ERST_STALL_WHILE_TRUE 0x0D -#define EFI_ACPI_5_1_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E -#define EFI_ACPI_5_1_ERST_GOTO 0x0F -#define EFI_ACPI_5_1_ERST_SET_SRC_ADDRESS_BASE 0x10 -#define EFI_ACPI_5_1_ERST_SET_DST_ADDRESS_BASE 0x11 -#define EFI_ACPI_5_1_ERST_MOVE_DATA 0x12 +#define EFI_ACPI_5_1_ERST_READ_REGISTER 0x00 +#define EFI_ACPI_5_1_ERST_READ_REGISTER_VALUE 0x01 +#define EFI_ACPI_5_1_ERST_WRITE_REGISTER 0x02 +#define EFI_ACPI_5_1_ERST_WRITE_REGISTER_VALUE 0x03 +#define EFI_ACPI_5_1_ERST_NOOP 0x04 +#define EFI_ACPI_5_1_ERST_LOAD_VAR1 0x05 +#define EFI_ACPI_5_1_ERST_LOAD_VAR2 0x06 +#define EFI_ACPI_5_1_ERST_STORE_VAR1 0x07 +#define EFI_ACPI_5_1_ERST_ADD 0x08 +#define EFI_ACPI_5_1_ERST_SUBTRACT 0x09 +#define EFI_ACPI_5_1_ERST_ADD_VALUE 0x0A +#define EFI_ACPI_5_1_ERST_SUBTRACT_VALUE 0x0B +#define EFI_ACPI_5_1_ERST_STALL 0x0C +#define EFI_ACPI_5_1_ERST_STALL_WHILE_TRUE 0x0D +#define EFI_ACPI_5_1_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E +#define EFI_ACPI_5_1_ERST_GOTO 0x0F +#define EFI_ACPI_5_1_ERST_SET_SRC_ADDRESS_BASE 0x10 +#define EFI_ACPI_5_1_ERST_SET_DST_ADDRESS_BASE 0x11 +#define EFI_ACPI_5_1_ERST_MOVE_DATA 0x12 /// /// ERST Instruction Flags /// -#define EFI_ACPI_5_1_ERST_PRESERVE_REGISTER 0x01 +#define EFI_ACPI_5_1_ERST_PRESERVE_REGISTER 0x01 /// /// ERST Serialization Instruction Entry /// typedef struct { - UINT8 SerializationAction; - UINT8 Instruction; - UINT8 Flags; - UINT8 Reserved0; - EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE RegisterRegion; - UINT64 Value; - UINT64 Mask; + UINT8 SerializationAction; + UINT8 Instruction; + UINT8 Flags; + UINT8 Reserved0; + EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE RegisterRegion; + UINT64 Value; + UINT64 Mask; } EFI_ACPI_5_1_ERST_SERIALIZATION_INSTRUCTION_ENTRY; /// /// EINJ - Error Injection Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 InjectionHeaderSize; - UINT8 InjectionFlags; - UINT8 Reserved0[3]; - UINT32 InjectionEntryCount; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 InjectionHeaderSize; + UINT8 InjectionFlags; + UINT8 Reserved0[3]; + UINT32 InjectionEntryCount; } EFI_ACPI_5_1_ERROR_INJECTION_TABLE_HEADER; /// /// EINJ Version (as defined in ACPI 5.1 spec.) /// -#define EFI_ACPI_5_1_ERROR_INJECTION_TABLE_REVISION 0x01 +#define EFI_ACPI_5_1_ERROR_INJECTION_TABLE_REVISION 0x01 /// /// EINJ Error Injection Actions /// -#define EFI_ACPI_5_1_EINJ_BEGIN_INJECTION_OPERATION 0x00 -#define EFI_ACPI_5_1_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01 -#define EFI_ACPI_5_1_EINJ_SET_ERROR_TYPE 0x02 -#define EFI_ACPI_5_1_EINJ_GET_ERROR_TYPE 0x03 -#define EFI_ACPI_5_1_EINJ_END_OPERATION 0x04 -#define EFI_ACPI_5_1_EINJ_EXECUTE_OPERATION 0x05 -#define EFI_ACPI_5_1_EINJ_CHECK_BUSY_STATUS 0x06 -#define EFI_ACPI_5_1_EINJ_GET_COMMAND_STATUS 0x07 -#define EFI_ACPI_5_1_EINJ_TRIGGER_ERROR 0xFF +#define EFI_ACPI_5_1_EINJ_BEGIN_INJECTION_OPERATION 0x00 +#define EFI_ACPI_5_1_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01 +#define EFI_ACPI_5_1_EINJ_SET_ERROR_TYPE 0x02 +#define EFI_ACPI_5_1_EINJ_GET_ERROR_TYPE 0x03 +#define EFI_ACPI_5_1_EINJ_END_OPERATION 0x04 +#define EFI_ACPI_5_1_EINJ_EXECUTE_OPERATION 0x05 +#define EFI_ACPI_5_1_EINJ_CHECK_BUSY_STATUS 0x06 +#define EFI_ACPI_5_1_EINJ_GET_COMMAND_STATUS 0x07 +#define EFI_ACPI_5_1_EINJ_TRIGGER_ERROR 0xFF /// /// EINJ Action Command Status /// -#define EFI_ACPI_5_1_EINJ_STATUS_SUCCESS 0x00 -#define EFI_ACPI_5_1_EINJ_STATUS_UNKNOWN_FAILURE 0x01 -#define EFI_ACPI_5_1_EINJ_STATUS_INVALID_ACCESS 0x02 +#define EFI_ACPI_5_1_EINJ_STATUS_SUCCESS 0x00 +#define EFI_ACPI_5_1_EINJ_STATUS_UNKNOWN_FAILURE 0x01 +#define EFI_ACPI_5_1_EINJ_STATUS_INVALID_ACCESS 0x02 /// /// EINJ Error Type Definition /// -#define EFI_ACPI_5_1_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0) -#define EFI_ACPI_5_1_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1) -#define EFI_ACPI_5_1_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2) -#define EFI_ACPI_5_1_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3) -#define EFI_ACPI_5_1_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4) -#define EFI_ACPI_5_1_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5) -#define EFI_ACPI_5_1_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6) -#define EFI_ACPI_5_1_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7) -#define EFI_ACPI_5_1_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8) -#define EFI_ACPI_5_1_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9) -#define EFI_ACPI_5_1_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10) -#define EFI_ACPI_5_1_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11) +#define EFI_ACPI_5_1_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0) +#define EFI_ACPI_5_1_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1) +#define EFI_ACPI_5_1_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2) +#define EFI_ACPI_5_1_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3) +#define EFI_ACPI_5_1_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4) +#define EFI_ACPI_5_1_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5) +#define EFI_ACPI_5_1_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6) +#define EFI_ACPI_5_1_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7) +#define EFI_ACPI_5_1_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8) +#define EFI_ACPI_5_1_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9) +#define EFI_ACPI_5_1_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10) +#define EFI_ACPI_5_1_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11) /// /// EINJ Injection Instructions /// -#define EFI_ACPI_5_1_EINJ_READ_REGISTER 0x00 -#define EFI_ACPI_5_1_EINJ_READ_REGISTER_VALUE 0x01 -#define EFI_ACPI_5_1_EINJ_WRITE_REGISTER 0x02 -#define EFI_ACPI_5_1_EINJ_WRITE_REGISTER_VALUE 0x03 -#define EFI_ACPI_5_1_EINJ_NOOP 0x04 +#define EFI_ACPI_5_1_EINJ_READ_REGISTER 0x00 +#define EFI_ACPI_5_1_EINJ_READ_REGISTER_VALUE 0x01 +#define EFI_ACPI_5_1_EINJ_WRITE_REGISTER 0x02 +#define EFI_ACPI_5_1_EINJ_WRITE_REGISTER_VALUE 0x03 +#define EFI_ACPI_5_1_EINJ_NOOP 0x04 /// /// EINJ Instruction Flags /// -#define EFI_ACPI_5_1_EINJ_PRESERVE_REGISTER 0x01 +#define EFI_ACPI_5_1_EINJ_PRESERVE_REGISTER 0x01 /// /// EINJ Injection Instruction Entry /// typedef struct { - UINT8 InjectionAction; - UINT8 Instruction; - UINT8 Flags; - UINT8 Reserved0; - EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE RegisterRegion; - UINT64 Value; - UINT64 Mask; + UINT8 InjectionAction; + UINT8 Instruction; + UINT8 Flags; + UINT8 Reserved0; + EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE RegisterRegion; + UINT64 Value; + UINT64 Mask; } EFI_ACPI_5_1_EINJ_INJECTION_INSTRUCTION_ENTRY; /// /// EINJ Trigger Action Table /// typedef struct { - UINT32 HeaderSize; - UINT32 Revision; - UINT32 TableSize; - UINT32 EntryCount; + UINT32 HeaderSize; + UINT32 Revision; + UINT32 TableSize; + UINT32 EntryCount; } EFI_ACPI_5_1_EINJ_TRIGGER_ACTION_TABLE; /// /// Platform Communications Channel Table (PCCT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 Flags; - UINT64 Reserved; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 Flags; + UINT64 Reserved; } EFI_ACPI_5_1_PLATFORM_COMMUNICATION_CHANNEL_TABLE_HEADER; /// /// PCCT Version (as defined in ACPI 5.1 spec.) /// -#define EFI_ACPI_5_1_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION 0x01 +#define EFI_ACPI_5_1_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION 0x01 /// /// PCCT Global Flags /// -#define EFI_ACPI_5_1_PCCT_FLAGS_SCI_DOORBELL BIT0 +#define EFI_ACPI_5_1_PCCT_FLAGS_SCI_DOORBELL BIT0 // // PCCT Subspace type @@ -1834,25 +1834,25 @@ typedef struct { /// PCC Subspace Structure Header /// typedef struct { - UINT8 Type; - UINT8 Length; + UINT8 Type; + UINT8 Length; } EFI_ACPI_5_1_PCCT_SUBSPACE_HEADER; /// /// Generic Communications Subspace Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[6]; - UINT64 BaseAddress; - UINT64 AddressLength; - EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; - UINT64 DoorbellPreserve; - UINT64 DoorbellWrite; - UINT32 NominalLatency; - UINT32 MaximumPeriodicAccessRate; - UINT16 MinimumRequestTurnaroundTime; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[6]; + UINT64 BaseAddress; + UINT64 AddressLength; + EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; + UINT64 DoorbellPreserve; + UINT64 DoorbellWrite; + UINT32 NominalLatency; + UINT32 MaximumPeriodicAccessRate; + UINT16 MinimumRequestTurnaroundTime; } EFI_ACPI_5_1_PCCT_SUBSPACE_GENERIC; /// @@ -1860,18 +1860,18 @@ typedef struct { /// typedef struct { - UINT8 Command; - UINT8 Reserved:7; - UINT8 GenerateSci:1; + UINT8 Command; + UINT8 Reserved : 7; + UINT8 GenerateSci : 1; } EFI_ACPI_5_1_PCCT_GENERIC_SHARED_MEMORY_REGION_COMMAND; typedef struct { - UINT8 CommandComplete:1; - UINT8 SciDoorbell:1; - UINT8 Error:1; - UINT8 PlatformNotification:1; - UINT8 Reserved:4; - UINT8 Reserved1; + UINT8 CommandComplete : 1; + UINT8 SciDoorbell : 1; + UINT8 Error : 1; + UINT8 PlatformNotification : 1; + UINT8 Reserved : 4; + UINT8 Reserved1; } EFI_ACPI_5_1_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS; typedef struct { diff --git a/MdePkg/Include/IndustryStandard/Acpi60.h b/MdePkg/Include/IndustryStandard/Acpi60.h index eba4248..f4ab016 100644 --- a/MdePkg/Include/IndustryStandard/Acpi60.h +++ b/MdePkg/Include/IndustryStandard/Acpi60.h @@ -21,21 +21,21 @@ /// ACPI 6.0 Generic Address Space definition /// typedef struct { - UINT8 AddressSpaceId; - UINT8 RegisterBitWidth; - UINT8 RegisterBitOffset; - UINT8 AccessSize; - UINT64 Address; + UINT8 AddressSpaceId; + UINT8 RegisterBitWidth; + UINT8 RegisterBitOffset; + UINT8 AccessSize; + UINT64 Address; } EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE; // // Generic Address Space Address IDs // -#define EFI_ACPI_6_0_SYSTEM_MEMORY 0 -#define EFI_ACPI_6_0_SYSTEM_IO 1 -#define EFI_ACPI_6_0_PCI_CONFIGURATION_SPACE 2 -#define EFI_ACPI_6_0_EMBEDDED_CONTROLLER 3 -#define EFI_ACPI_6_0_SMBUS 4 +#define EFI_ACPI_6_0_SYSTEM_MEMORY 0 +#define EFI_ACPI_6_0_SYSTEM_IO 1 +#define EFI_ACPI_6_0_PCI_CONFIGURATION_SPACE 2 +#define EFI_ACPI_6_0_EMBEDDED_CONTROLLER 3 +#define EFI_ACPI_6_0_SMBUS 4 #define EFI_ACPI_6_0_PLATFORM_COMMUNICATION_CHANNEL 0x0A #define EFI_ACPI_6_0_FUNCTIONAL_FIXED_HARDWARE 0x7F @@ -56,29 +56,29 @@ typedef struct { /// Root System Description Pointer Structure /// typedef struct { - UINT64 Signature; - UINT8 Checksum; - UINT8 OemId[6]; - UINT8 Revision; - UINT32 RsdtAddress; - UINT32 Length; - UINT64 XsdtAddress; - UINT8 ExtendedChecksum; - UINT8 Reserved[3]; + UINT64 Signature; + UINT8 Checksum; + UINT8 OemId[6]; + UINT8 Revision; + UINT32 RsdtAddress; + UINT32 Length; + UINT64 XsdtAddress; + UINT8 ExtendedChecksum; + UINT8 Reserved[3]; } EFI_ACPI_6_0_ROOT_SYSTEM_DESCRIPTION_POINTER; /// /// RSD_PTR Revision (as defined in ACPI 6.0 spec.) /// -#define EFI_ACPI_6_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 6.0) says current value is 2 +#define EFI_ACPI_6_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 6.0) says current value is 2 /// /// Common table header, this prefaces all ACPI tables, including FACS, but /// excluding the RSD PTR structure /// typedef struct { - UINT32 Signature; - UINT32 Length; + UINT32 Signature; + UINT32 Length; } EFI_ACPI_6_0_COMMON_HEADER; // @@ -90,7 +90,7 @@ typedef struct { /// /// RSDT Revision (as defined in ACPI 6.0 spec.) /// -#define EFI_ACPI_6_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_6_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 // // Extended System Description Table @@ -101,74 +101,74 @@ typedef struct { /// /// XSDT Revision (as defined in ACPI 6.0 spec.) /// -#define EFI_ACPI_6_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_6_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 /// /// Fixed ACPI Description Table Structure (FADT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 FirmwareCtrl; - UINT32 Dsdt; - UINT8 Reserved0; - UINT8 PreferredPmProfile; - UINT16 SciInt; - UINT32 SmiCmd; - UINT8 AcpiEnable; - UINT8 AcpiDisable; - UINT8 S4BiosReq; - UINT8 PstateCnt; - UINT32 Pm1aEvtBlk; - UINT32 Pm1bEvtBlk; - UINT32 Pm1aCntBlk; - UINT32 Pm1bCntBlk; - UINT32 Pm2CntBlk; - UINT32 PmTmrBlk; - UINT32 Gpe0Blk; - UINT32 Gpe1Blk; - UINT8 Pm1EvtLen; - UINT8 Pm1CntLen; - UINT8 Pm2CntLen; - UINT8 PmTmrLen; - UINT8 Gpe0BlkLen; - UINT8 Gpe1BlkLen; - UINT8 Gpe1Base; - UINT8 CstCnt; - UINT16 PLvl2Lat; - UINT16 PLvl3Lat; - UINT16 FlushSize; - UINT16 FlushStride; - UINT8 DutyOffset; - UINT8 DutyWidth; - UINT8 DayAlrm; - UINT8 MonAlrm; - UINT8 Century; - UINT16 IaPcBootArch; - UINT8 Reserved1; - UINT32 Flags; - EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE ResetReg; - UINT8 ResetValue; - UINT16 ArmBootArch; - UINT8 MinorVersion; - UINT64 XFirmwareCtrl; - UINT64 XDsdt; - EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk; - EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk; - EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk; - EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk; - EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk; - EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk; - EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk; - EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk; - EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE SleepControlReg; - EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE SleepStatusReg; - UINT64 HypervisorVendorIdentity; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 FirmwareCtrl; + UINT32 Dsdt; + UINT8 Reserved0; + UINT8 PreferredPmProfile; + UINT16 SciInt; + UINT32 SmiCmd; + UINT8 AcpiEnable; + UINT8 AcpiDisable; + UINT8 S4BiosReq; + UINT8 PstateCnt; + UINT32 Pm1aEvtBlk; + UINT32 Pm1bEvtBlk; + UINT32 Pm1aCntBlk; + UINT32 Pm1bCntBlk; + UINT32 Pm2CntBlk; + UINT32 PmTmrBlk; + UINT32 Gpe0Blk; + UINT32 Gpe1Blk; + UINT8 Pm1EvtLen; + UINT8 Pm1CntLen; + UINT8 Pm2CntLen; + UINT8 PmTmrLen; + UINT8 Gpe0BlkLen; + UINT8 Gpe1BlkLen; + UINT8 Gpe1Base; + UINT8 CstCnt; + UINT16 PLvl2Lat; + UINT16 PLvl3Lat; + UINT16 FlushSize; + UINT16 FlushStride; + UINT8 DutyOffset; + UINT8 DutyWidth; + UINT8 DayAlrm; + UINT8 MonAlrm; + UINT8 Century; + UINT16 IaPcBootArch; + UINT8 Reserved1; + UINT32 Flags; + EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE ResetReg; + UINT8 ResetValue; + UINT16 ArmBootArch; + UINT8 MinorVersion; + UINT64 XFirmwareCtrl; + UINT64 XDsdt; + EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk; + EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk; + EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk; + EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk; + EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk; + EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk; + EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XGpe0Blk; + EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE XGpe1Blk; + EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE SleepControlReg; + EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE SleepStatusReg; + UINT64 HypervisorVendorIdentity; } EFI_ACPI_6_0_FIXED_ACPI_DESCRIPTION_TABLE; /// /// FADT Version (as defined in ACPI 6.0 spec.) /// -#define EFI_ACPI_6_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x06 +#define EFI_ACPI_6_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x06 #define EFI_ACPI_6_0_FIXED_ACPI_DESCRIPTION_TABLE_MINOR_REVISION 0x00 // @@ -188,62 +188,62 @@ typedef struct { // Fixed ACPI Description Table Boot Architecture Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_6_0_LEGACY_DEVICES BIT0 -#define EFI_ACPI_6_0_8042 BIT1 -#define EFI_ACPI_6_0_VGA_NOT_PRESENT BIT2 -#define EFI_ACPI_6_0_MSI_NOT_SUPPORTED BIT3 -#define EFI_ACPI_6_0_PCIE_ASPM_CONTROLS BIT4 -#define EFI_ACPI_6_0_CMOS_RTC_NOT_PRESENT BIT5 +#define EFI_ACPI_6_0_LEGACY_DEVICES BIT0 +#define EFI_ACPI_6_0_8042 BIT1 +#define EFI_ACPI_6_0_VGA_NOT_PRESENT BIT2 +#define EFI_ACPI_6_0_MSI_NOT_SUPPORTED BIT3 +#define EFI_ACPI_6_0_PCIE_ASPM_CONTROLS BIT4 +#define EFI_ACPI_6_0_CMOS_RTC_NOT_PRESENT BIT5 // // Fixed ACPI Description Table Arm Boot Architecture Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_6_0_ARM_PSCI_COMPLIANT BIT0 -#define EFI_ACPI_6_0_ARM_PSCI_USE_HVC BIT1 +#define EFI_ACPI_6_0_ARM_PSCI_COMPLIANT BIT0 +#define EFI_ACPI_6_0_ARM_PSCI_USE_HVC BIT1 // // Fixed ACPI Description Table Fixed Feature Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_6_0_WBINVD BIT0 -#define EFI_ACPI_6_0_WBINVD_FLUSH BIT1 -#define EFI_ACPI_6_0_PROC_C1 BIT2 -#define EFI_ACPI_6_0_P_LVL2_UP BIT3 -#define EFI_ACPI_6_0_PWR_BUTTON BIT4 -#define EFI_ACPI_6_0_SLP_BUTTON BIT5 -#define EFI_ACPI_6_0_FIX_RTC BIT6 -#define EFI_ACPI_6_0_RTC_S4 BIT7 -#define EFI_ACPI_6_0_TMR_VAL_EXT BIT8 -#define EFI_ACPI_6_0_DCK_CAP BIT9 -#define EFI_ACPI_6_0_RESET_REG_SUP BIT10 -#define EFI_ACPI_6_0_SEALED_CASE BIT11 -#define EFI_ACPI_6_0_HEADLESS BIT12 -#define EFI_ACPI_6_0_CPU_SW_SLP BIT13 -#define EFI_ACPI_6_0_PCI_EXP_WAK BIT14 -#define EFI_ACPI_6_0_USE_PLATFORM_CLOCK BIT15 -#define EFI_ACPI_6_0_S4_RTC_STS_VALID BIT16 -#define EFI_ACPI_6_0_REMOTE_POWER_ON_CAPABLE BIT17 -#define EFI_ACPI_6_0_FORCE_APIC_CLUSTER_MODEL BIT18 -#define EFI_ACPI_6_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19 -#define EFI_ACPI_6_0_HW_REDUCED_ACPI BIT20 -#define EFI_ACPI_6_0_LOW_POWER_S0_IDLE_CAPABLE BIT21 +#define EFI_ACPI_6_0_WBINVD BIT0 +#define EFI_ACPI_6_0_WBINVD_FLUSH BIT1 +#define EFI_ACPI_6_0_PROC_C1 BIT2 +#define EFI_ACPI_6_0_P_LVL2_UP BIT3 +#define EFI_ACPI_6_0_PWR_BUTTON BIT4 +#define EFI_ACPI_6_0_SLP_BUTTON BIT5 +#define EFI_ACPI_6_0_FIX_RTC BIT6 +#define EFI_ACPI_6_0_RTC_S4 BIT7 +#define EFI_ACPI_6_0_TMR_VAL_EXT BIT8 +#define EFI_ACPI_6_0_DCK_CAP BIT9 +#define EFI_ACPI_6_0_RESET_REG_SUP BIT10 +#define EFI_ACPI_6_0_SEALED_CASE BIT11 +#define EFI_ACPI_6_0_HEADLESS BIT12 +#define EFI_ACPI_6_0_CPU_SW_SLP BIT13 +#define EFI_ACPI_6_0_PCI_EXP_WAK BIT14 +#define EFI_ACPI_6_0_USE_PLATFORM_CLOCK BIT15 +#define EFI_ACPI_6_0_S4_RTC_STS_VALID BIT16 +#define EFI_ACPI_6_0_REMOTE_POWER_ON_CAPABLE BIT17 +#define EFI_ACPI_6_0_FORCE_APIC_CLUSTER_MODEL BIT18 +#define EFI_ACPI_6_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19 +#define EFI_ACPI_6_0_HW_REDUCED_ACPI BIT20 +#define EFI_ACPI_6_0_LOW_POWER_S0_IDLE_CAPABLE BIT21 /// /// Firmware ACPI Control Structure /// typedef struct { - UINT32 Signature; - UINT32 Length; - UINT32 HardwareSignature; - UINT32 FirmwareWakingVector; - UINT32 GlobalLock; - UINT32 Flags; - UINT64 XFirmwareWakingVector; - UINT8 Version; - UINT8 Reserved0[3]; - UINT32 OspmFlags; - UINT8 Reserved1[24]; + UINT32 Signature; + UINT32 Length; + UINT32 HardwareSignature; + UINT32 FirmwareWakingVector; + UINT32 GlobalLock; + UINT32 Flags; + UINT64 XFirmwareWakingVector; + UINT8 Version; + UINT8 Reserved0[3]; + UINT32 OspmFlags; + UINT8 Reserved1[24]; } EFI_ACPI_6_0_FIRMWARE_ACPI_CONTROL_STRUCTURE; /// @@ -255,14 +255,14 @@ typedef struct { /// Firmware Control Structure Feature Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_6_0_S4BIOS_F BIT0 -#define EFI_ACPI_6_0_64BIT_WAKE_SUPPORTED_F BIT1 +#define EFI_ACPI_6_0_S4BIOS_F BIT0 +#define EFI_ACPI_6_0_64BIT_WAKE_SUPPORTED_F BIT1 /// /// OSPM Enabled Firmware Control Structure Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_6_0_OSPM_64BIT_WAKE_F BIT0 +#define EFI_ACPI_6_0_OSPM_64BIT_WAKE_F BIT0 // // Differentiated System Description Table, @@ -271,29 +271,29 @@ typedef struct { // no definition needed as they are common description table header, the same with // EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block. // -#define EFI_ACPI_6_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 -#define EFI_ACPI_6_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 +#define EFI_ACPI_6_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 +#define EFI_ACPI_6_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 /// /// Multiple APIC Description Table header definition. The rest of the table /// must be defined in a platform specific manner. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 LocalApicAddress; - UINT32 Flags; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 LocalApicAddress; + UINT32 Flags; } EFI_ACPI_6_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER; /// /// MADT Revision (as defined in ACPI 6.0 Errata A spec.) /// -#define EFI_ACPI_6_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x04 +#define EFI_ACPI_6_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x04 /// /// Multiple APIC Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_6_0_PCAT_COMPAT BIT0 +#define EFI_ACPI_6_0_PCAT_COMPAT BIT0 // // Multiple APIC Description Table APIC structure types @@ -325,57 +325,57 @@ typedef struct { /// Processor Local APIC Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorUid; - UINT8 ApicId; - UINT32 Flags; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorUid; + UINT8 ApicId; + UINT32 Flags; } EFI_ACPI_6_0_PROCESSOR_LOCAL_APIC_STRUCTURE; /// /// Local APIC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_0_LOCAL_APIC_ENABLED BIT0 +#define EFI_ACPI_6_0_LOCAL_APIC_ENABLED BIT0 /// /// IO APIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 IoApicId; - UINT8 Reserved; - UINT32 IoApicAddress; - UINT32 GlobalSystemInterruptBase; + UINT8 Type; + UINT8 Length; + UINT8 IoApicId; + UINT8 Reserved; + UINT32 IoApicAddress; + UINT32 GlobalSystemInterruptBase; } EFI_ACPI_6_0_IO_APIC_STRUCTURE; /// /// Interrupt Source Override Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Bus; - UINT8 Source; - UINT32 GlobalSystemInterrupt; - UINT16 Flags; + UINT8 Type; + UINT8 Length; + UINT8 Bus; + UINT8 Source; + UINT32 GlobalSystemInterrupt; + UINT16 Flags; } EFI_ACPI_6_0_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE; /// /// Platform Interrupt Sources Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT8 InterruptType; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT8 IoSapicVector; - UINT32 GlobalSystemInterrupt; - UINT32 PlatformInterruptSourceFlags; - UINT8 CpeiProcessorOverride; - UINT8 Reserved[31]; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT8 InterruptType; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT8 IoSapicVector; + UINT32 GlobalSystemInterrupt; + UINT32 PlatformInterruptSourceFlags; + UINT8 CpeiProcessorOverride; + UINT8 Reserved[31]; } EFI_ACPI_6_0_PLATFORM_INTERRUPT_APIC_STRUCTURE; // @@ -389,43 +389,43 @@ typedef struct { /// Non-Maskable Interrupt Source Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT32 GlobalSystemInterrupt; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT32 GlobalSystemInterrupt; } EFI_ACPI_6_0_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE; /// /// Local APIC NMI Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorUid; - UINT16 Flags; - UINT8 LocalApicLint; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorUid; + UINT16 Flags; + UINT8 LocalApicLint; } EFI_ACPI_6_0_LOCAL_APIC_NMI_STRUCTURE; /// /// Local APIC Address Override Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT64 LocalApicAddress; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT64 LocalApicAddress; } EFI_ACPI_6_0_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE; /// /// IO SAPIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 IoApicId; - UINT8 Reserved; - UINT32 GlobalSystemInterruptBase; - UINT64 IoSapicAddress; + UINT8 Type; + UINT8 Length; + UINT8 IoApicId; + UINT8 Reserved; + UINT32 GlobalSystemInterruptBase; + UINT64 IoSapicAddress; } EFI_ACPI_6_0_IO_SAPIC_STRUCTURE; /// @@ -433,169 +433,169 @@ typedef struct { /// This struct followed by a null-terminated ASCII string - ACPI Processor UID String /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorId; - UINT8 LocalSapicId; - UINT8 LocalSapicEid; - UINT8 Reserved[3]; - UINT32 Flags; - UINT32 ACPIProcessorUIDValue; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorId; + UINT8 LocalSapicId; + UINT8 LocalSapicEid; + UINT8 Reserved[3]; + UINT32 Flags; + UINT32 ACPIProcessorUIDValue; } EFI_ACPI_6_0_PROCESSOR_LOCAL_SAPIC_STRUCTURE; /// /// Platform Interrupt Sources Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT8 InterruptType; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT8 IoSapicVector; - UINT32 GlobalSystemInterrupt; - UINT32 PlatformInterruptSourceFlags; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT8 InterruptType; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT8 IoSapicVector; + UINT32 GlobalSystemInterrupt; + UINT32 PlatformInterruptSourceFlags; } EFI_ACPI_6_0_PLATFORM_INTERRUPT_SOURCES_STRUCTURE; /// /// Platform Interrupt Source Flags. /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_6_0_CPEI_PROCESSOR_OVERRIDE BIT0 +#define EFI_ACPI_6_0_CPEI_PROCESSOR_OVERRIDE BIT0 /// /// Processor Local x2APIC Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[2]; - UINT32 X2ApicId; - UINT32 Flags; - UINT32 AcpiProcessorUid; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[2]; + UINT32 X2ApicId; + UINT32 Flags; + UINT32 AcpiProcessorUid; } EFI_ACPI_6_0_PROCESSOR_LOCAL_X2APIC_STRUCTURE; /// /// Local x2APIC NMI Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT32 AcpiProcessorUid; - UINT8 LocalX2ApicLint; - UINT8 Reserved[3]; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT32 AcpiProcessorUid; + UINT8 LocalX2ApicLint; + UINT8 Reserved[3]; } EFI_ACPI_6_0_LOCAL_X2APIC_NMI_STRUCTURE; /// /// GIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT32 CPUInterfaceNumber; - UINT32 AcpiProcessorUid; - UINT32 Flags; - UINT32 ParkingProtocolVersion; - UINT32 PerformanceInterruptGsiv; - UINT64 ParkedAddress; - UINT64 PhysicalBaseAddress; - UINT64 GICV; - UINT64 GICH; - UINT32 VGICMaintenanceInterrupt; - UINT64 GICRBaseAddress; - UINT64 MPIDR; - UINT8 ProcessorPowerEfficiencyClass; - UINT8 Reserved2[3]; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT32 CPUInterfaceNumber; + UINT32 AcpiProcessorUid; + UINT32 Flags; + UINT32 ParkingProtocolVersion; + UINT32 PerformanceInterruptGsiv; + UINT64 ParkedAddress; + UINT64 PhysicalBaseAddress; + UINT64 GICV; + UINT64 GICH; + UINT32 VGICMaintenanceInterrupt; + UINT64 GICRBaseAddress; + UINT64 MPIDR; + UINT8 ProcessorPowerEfficiencyClass; + UINT8 Reserved2[3]; } EFI_ACPI_6_0_GIC_STRUCTURE; /// /// GIC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_0_GIC_ENABLED BIT0 -#define EFI_ACPI_6_0_PERFORMANCE_INTERRUPT_MODEL BIT1 -#define EFI_ACPI_6_0_VGIC_MAINTENANCE_INTERRUPT_MODE_FLAGS BIT2 +#define EFI_ACPI_6_0_GIC_ENABLED BIT0 +#define EFI_ACPI_6_0_PERFORMANCE_INTERRUPT_MODEL BIT1 +#define EFI_ACPI_6_0_VGIC_MAINTENANCE_INTERRUPT_MODE_FLAGS BIT2 /// /// GIC Distributor Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved1; - UINT32 GicId; - UINT64 PhysicalBaseAddress; - UINT32 SystemVectorBase; - UINT8 GicVersion; - UINT8 Reserved2[3]; + UINT8 Type; + UINT8 Length; + UINT16 Reserved1; + UINT32 GicId; + UINT64 PhysicalBaseAddress; + UINT32 SystemVectorBase; + UINT8 GicVersion; + UINT8 Reserved2[3]; } EFI_ACPI_6_0_GIC_DISTRIBUTOR_STRUCTURE; /// /// GIC Version /// -#define EFI_ACPI_6_0_GIC_V1 0x01 -#define EFI_ACPI_6_0_GIC_V2 0x02 -#define EFI_ACPI_6_0_GIC_V3 0x03 -#define EFI_ACPI_6_0_GIC_V4 0x04 +#define EFI_ACPI_6_0_GIC_V1 0x01 +#define EFI_ACPI_6_0_GIC_V2 0x02 +#define EFI_ACPI_6_0_GIC_V3 0x03 +#define EFI_ACPI_6_0_GIC_V4 0x04 /// /// GIC MSI Frame Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved1; - UINT32 GicMsiFrameId; - UINT64 PhysicalBaseAddress; - UINT32 Flags; - UINT16 SPICount; - UINT16 SPIBase; + UINT8 Type; + UINT8 Length; + UINT16 Reserved1; + UINT32 GicMsiFrameId; + UINT64 PhysicalBaseAddress; + UINT32 Flags; + UINT16 SPICount; + UINT16 SPIBase; } EFI_ACPI_6_0_GIC_MSI_FRAME_STRUCTURE; /// /// GIC MSI Frame Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_0_SPI_COUNT_BASE_SELECT BIT0 +#define EFI_ACPI_6_0_SPI_COUNT_BASE_SELECT BIT0 /// /// GICR Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT64 DiscoveryRangeBaseAddress; - UINT32 DiscoveryRangeLength; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT64 DiscoveryRangeBaseAddress; + UINT32 DiscoveryRangeLength; } EFI_ACPI_6_0_GICR_STRUCTURE; /// /// GIC Interrupt Translation Service Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT32 GicItsId; - UINT64 PhysicalBaseAddress; - UINT32 Reserved2; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT32 GicItsId; + UINT64 PhysicalBaseAddress; + UINT32 Reserved2; } EFI_ACPI_6_0_GIC_ITS_STRUCTURE; /// /// Smart Battery Description Table (SBST) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 WarningEnergyLevel; - UINT32 LowEnergyLevel; - UINT32 CriticalEnergyLevel; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 WarningEnergyLevel; + UINT32 LowEnergyLevel; + UINT32 CriticalEnergyLevel; } EFI_ACPI_6_0_SMART_BATTERY_DESCRIPTION_TABLE; /// /// SBST Version (as defined in ACPI 6.0 spec.) /// -#define EFI_ACPI_6_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_6_0_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01 /// /// Embedded Controller Boot Resources Table (ECDT) @@ -603,11 +603,11 @@ typedef struct { /// a fully qualified reference to the name space object. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE EcControl; - EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE EcData; - UINT32 Uid; - UINT8 GpeBit; + EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE EcControl; + EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE EcData; + UINT32 Uid; + UINT8 GpeBit; } EFI_ACPI_6_0_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE; /// @@ -620,9 +620,9 @@ typedef struct { /// must be defined in a platform specific manner. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 Reserved1; ///< Must be set to 1 - UINT64 Reserved2; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 Reserved1; ///< Must be set to 1 + UINT64 Reserved2; } EFI_ACPI_6_0_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER; /// @@ -644,83 +644,83 @@ typedef struct { /// Processor Local APIC/SAPIC Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 ProximityDomain7To0; - UINT8 ApicId; - UINT32 Flags; - UINT8 LocalSapicEid; - UINT8 ProximityDomain31To8[3]; - UINT32 ClockDomain; + UINT8 Type; + UINT8 Length; + UINT8 ProximityDomain7To0; + UINT8 ApicId; + UINT32 Flags; + UINT8 LocalSapicEid; + UINT8 ProximityDomain31To8[3]; + UINT32 ClockDomain; } EFI_ACPI_6_0_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE; /// /// Local APIC/SAPIC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0) +#define EFI_ACPI_6_0_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0) /// /// Memory Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 ProximityDomain; - UINT16 Reserved1; - UINT32 AddressBaseLow; - UINT32 AddressBaseHigh; - UINT32 LengthLow; - UINT32 LengthHigh; - UINT32 Reserved2; - UINT32 Flags; - UINT64 Reserved3; + UINT8 Type; + UINT8 Length; + UINT32 ProximityDomain; + UINT16 Reserved1; + UINT32 AddressBaseLow; + UINT32 AddressBaseHigh; + UINT32 LengthLow; + UINT32 LengthHigh; + UINT32 Reserved2; + UINT32 Flags; + UINT64 Reserved3; } EFI_ACPI_6_0_MEMORY_AFFINITY_STRUCTURE; // // Memory Flags. All other bits are reserved and must be 0. // -#define EFI_ACPI_6_0_MEMORY_ENABLED (1 << 0) -#define EFI_ACPI_6_0_MEMORY_HOT_PLUGGABLE (1 << 1) -#define EFI_ACPI_6_0_MEMORY_NONVOLATILE (1 << 2) +#define EFI_ACPI_6_0_MEMORY_ENABLED (1 << 0) +#define EFI_ACPI_6_0_MEMORY_HOT_PLUGGABLE (1 << 1) +#define EFI_ACPI_6_0_MEMORY_NONVOLATILE (1 << 2) /// /// Processor Local x2APIC Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved1[2]; - UINT32 ProximityDomain; - UINT32 X2ApicId; - UINT32 Flags; - UINT32 ClockDomain; - UINT8 Reserved2[4]; + UINT8 Type; + UINT8 Length; + UINT8 Reserved1[2]; + UINT32 ProximityDomain; + UINT32 X2ApicId; + UINT32 Flags; + UINT32 ClockDomain; + UINT8 Reserved2[4]; } EFI_ACPI_6_0_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE; /// /// GICC Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 ProximityDomain; - UINT32 AcpiProcessorUid; - UINT32 Flags; - UINT32 ClockDomain; + UINT8 Type; + UINT8 Length; + UINT32 ProximityDomain; + UINT32 AcpiProcessorUid; + UINT32 Flags; + UINT32 ClockDomain; } EFI_ACPI_6_0_GICC_AFFINITY_STRUCTURE; /// /// GICC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_0_GICC_ENABLED (1 << 0) +#define EFI_ACPI_6_0_GICC_ENABLED (1 << 0) /// /// System Locality Distance Information Table (SLIT). /// The rest of the table is a matrix. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT64 NumberOfSystemLocalities; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT64 NumberOfSystemLocalities; } EFI_ACPI_6_0_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER; /// @@ -732,14 +732,14 @@ typedef struct { /// Corrected Platform Error Polling Table (CPEP) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 Reserved[8]; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 Reserved[8]; } EFI_ACPI_6_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_HEADER; /// /// CPEP Version (as defined in ACPI 6.0 spec.) /// -#define EFI_ACPI_6_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01 +#define EFI_ACPI_6_0_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01 // // CPEP processor structure types. @@ -750,66 +750,66 @@ typedef struct { /// Corrected Platform Error Polling Processor Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT32 PollingInterval; + UINT8 Type; + UINT8 Length; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT32 PollingInterval; } EFI_ACPI_6_0_CPEP_PROCESSOR_APIC_SAPIC_STRUCTURE; /// /// Maximum System Characteristics Table (MSCT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 OffsetProxDomInfo; - UINT32 MaximumNumberOfProximityDomains; - UINT32 MaximumNumberOfClockDomains; - UINT64 MaximumPhysicalAddress; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 OffsetProxDomInfo; + UINT32 MaximumNumberOfProximityDomains; + UINT32 MaximumNumberOfClockDomains; + UINT64 MaximumPhysicalAddress; } EFI_ACPI_6_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_HEADER; /// /// MSCT Version (as defined in ACPI 6.0 spec.) /// -#define EFI_ACPI_6_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01 +#define EFI_ACPI_6_0_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01 /// /// Maximum Proximity Domain Information Structure Definition /// typedef struct { - UINT8 Revision; - UINT8 Length; - UINT32 ProximityDomainRangeLow; - UINT32 ProximityDomainRangeHigh; - UINT32 MaximumProcessorCapacity; - UINT64 MaximumMemoryCapacity; + UINT8 Revision; + UINT8 Length; + UINT32 ProximityDomainRangeLow; + UINT32 ProximityDomainRangeHigh; + UINT32 MaximumProcessorCapacity; + UINT64 MaximumMemoryCapacity; } EFI_ACPI_6_0_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE; /// /// ACPI RAS Feature Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 PlatformCommunicationChannelIdentifier[12]; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 PlatformCommunicationChannelIdentifier[12]; } EFI_ACPI_6_0_RAS_FEATURE_TABLE; /// /// RASF Version (as defined in ACPI 6.0 spec.) /// -#define EFI_ACPI_6_0_RAS_FEATURE_TABLE_REVISION 0x01 +#define EFI_ACPI_6_0_RAS_FEATURE_TABLE_REVISION 0x01 /// /// ACPI RASF Platform Communication Channel Shared Memory Region definition. /// typedef struct { - UINT32 Signature; - UINT16 Command; - UINT16 Status; - UINT16 Version; - UINT8 RASCapabilities[16]; - UINT8 SetRASCapabilities[16]; - UINT16 NumberOfRASFParameterBlocks; - UINT32 SetRASCapabilitiesStatus; + UINT32 Signature; + UINT16 Command; + UINT16 Status; + UINT16 Version; + UINT8 RASCapabilities[16]; + UINT8 SetRASCapabilities[16]; + UINT16 NumberOfRASFParameterBlocks; + UINT32 SetRASCapabilitiesStatus; } EFI_ACPI_6_0_RASF_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION; /// @@ -827,52 +827,52 @@ typedef struct { /// ACPI RASF Parameter Block structure for PATROL_SCRUB /// typedef struct { - UINT16 Type; - UINT16 Version; - UINT16 Length; - UINT16 PatrolScrubCommand; - UINT64 RequestedAddressRange[2]; - UINT64 ActualAddressRange[2]; - UINT16 Flags; - UINT8 RequestedSpeed; + UINT16 Type; + UINT16 Version; + UINT16 Length; + UINT16 PatrolScrubCommand; + UINT64 RequestedAddressRange[2]; + UINT64 ActualAddressRange[2]; + UINT16 Flags; + UINT8 RequestedSpeed; } EFI_ACPI_6_0_RASF_PATROL_SCRUB_PLATFORM_BLOCK_STRUCTURE; /// /// ACPI RASF Patrol Scrub command /// -#define EFI_ACPI_6_0_RASF_PATROL_SCRUB_COMMAND_GET_PATROL_PARAMETERS 0x01 -#define EFI_ACPI_6_0_RASF_PATROL_SCRUB_COMMAND_START_PATROL_SCRUBBER 0x02 -#define EFI_ACPI_6_0_RASF_PATROL_SCRUB_COMMAND_STOP_PATROL_SCRUBBER 0x03 +#define EFI_ACPI_6_0_RASF_PATROL_SCRUB_COMMAND_GET_PATROL_PARAMETERS 0x01 +#define EFI_ACPI_6_0_RASF_PATROL_SCRUB_COMMAND_START_PATROL_SCRUBBER 0x02 +#define EFI_ACPI_6_0_RASF_PATROL_SCRUB_COMMAND_STOP_PATROL_SCRUBBER 0x03 /// /// Memory Power State Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 PlatformCommunicationChannelIdentifier; - UINT8 Reserved[3]; -// Memory Power Node Structure -// Memory Power State Characteristics + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 PlatformCommunicationChannelIdentifier; + UINT8 Reserved[3]; + // Memory Power Node Structure + // Memory Power State Characteristics } EFI_ACPI_6_0_MEMORY_POWER_STATUS_TABLE; /// /// MPST Version (as defined in ACPI 6.0 spec.) /// -#define EFI_ACPI_6_0_MEMORY_POWER_STATE_TABLE_REVISION 0x01 +#define EFI_ACPI_6_0_MEMORY_POWER_STATE_TABLE_REVISION 0x01 /// /// MPST Platform Communication Channel Shared Memory Region definition. /// typedef struct { - UINT32 Signature; - UINT16 Command; - UINT16 Status; - UINT32 MemoryPowerCommandRegister; - UINT32 MemoryPowerStatusRegister; - UINT32 PowerStateId; - UINT32 MemoryPowerNodeId; - UINT64 MemoryEnergyConsumed; - UINT64 ExpectedAveragePowerComsuned; + UINT32 Signature; + UINT16 Command; + UINT16 Status; + UINT32 MemoryPowerCommandRegister; + UINT32 MemoryPowerStatusRegister; + UINT32 PowerStateId; + UINT32 MemoryPowerNodeId; + UINT64 MemoryEnergyConsumed; + UINT64 ExpectedAveragePowerComsuned; } EFI_ACPI_6_0_MPST_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION; /// @@ -883,186 +883,186 @@ typedef struct { /// /// ACPI MPST Memory Power command /// -#define EFI_ACPI_6_0_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_POWER_STATE 0x01 -#define EFI_ACPI_6_0_MPST_MEMORY_POWER_COMMAND_SET_MEMORY_POWER_STATE 0x02 -#define EFI_ACPI_6_0_MPST_MEMORY_POWER_COMMAND_GET_AVERAGE_POWER_CONSUMED 0x03 -#define EFI_ACPI_6_0_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_ENERGY_CONSUMED 0x04 +#define EFI_ACPI_6_0_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_POWER_STATE 0x01 +#define EFI_ACPI_6_0_MPST_MEMORY_POWER_COMMAND_SET_MEMORY_POWER_STATE 0x02 +#define EFI_ACPI_6_0_MPST_MEMORY_POWER_COMMAND_GET_AVERAGE_POWER_CONSUMED 0x03 +#define EFI_ACPI_6_0_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_ENERGY_CONSUMED 0x04 /// /// MPST Memory Power Node Table /// typedef struct { - UINT8 PowerStateValue; - UINT8 PowerStateInformationIndex; + UINT8 PowerStateValue; + UINT8 PowerStateInformationIndex; } EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE; typedef struct { - UINT8 Flag; - UINT8 Reserved; - UINT16 MemoryPowerNodeId; - UINT32 Length; - UINT64 AddressBase; - UINT64 AddressLength; - UINT32 NumberOfPowerStates; - UINT32 NumberOfPhysicalComponents; -//EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE MemoryPowerState[NumberOfPowerStates]; -//UINT16 PhysicalComponentIdentifier[NumberOfPhysicalComponents]; + UINT8 Flag; + UINT8 Reserved; + UINT16 MemoryPowerNodeId; + UINT32 Length; + UINT64 AddressBase; + UINT64 AddressLength; + UINT32 NumberOfPowerStates; + UINT32 NumberOfPhysicalComponents; + // EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE MemoryPowerState[NumberOfPowerStates]; + // UINT16 PhysicalComponentIdentifier[NumberOfPhysicalComponents]; } EFI_ACPI_6_0_MPST_MEMORY_POWER_STRUCTURE; -#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_ENABLE 0x01 -#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_POWER_MANAGED 0x02 -#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_HOT_PLUGGABLE 0x04 +#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_ENABLE 0x01 +#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_POWER_MANAGED 0x02 +#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STRUCTURE_FLAG_HOT_PLUGGABLE 0x04 typedef struct { - UINT16 MemoryPowerNodeCount; - UINT8 Reserved[2]; + UINT16 MemoryPowerNodeCount; + UINT8 Reserved[2]; } EFI_ACPI_6_0_MPST_MEMORY_POWER_NODE_TABLE; /// /// MPST Memory Power State Characteristics Table /// typedef struct { - UINT8 PowerStateStructureID; - UINT8 Flag; - UINT16 Reserved; - UINT32 AveragePowerConsumedInMPS0; - UINT32 RelativePowerSavingToMPS0; - UINT64 ExitLatencyToMPS0; + UINT8 PowerStateStructureID; + UINT8 Flag; + UINT16 Reserved; + UINT32 AveragePowerConsumedInMPS0; + UINT32 RelativePowerSavingToMPS0; + UINT64 ExitLatencyToMPS0; } EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE; -#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_MEMORY_CONTENT_PRESERVED 0x01 -#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_ENTRY 0x02 -#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_EXIT 0x04 +#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_MEMORY_CONTENT_PRESERVED 0x01 +#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_ENTRY 0x02 +#define EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_EXIT 0x04 typedef struct { - UINT16 MemoryPowerStateCharacteristicsCount; - UINT8 Reserved[2]; + UINT16 MemoryPowerStateCharacteristicsCount; + UINT8 Reserved[2]; } EFI_ACPI_6_0_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_TABLE; /// /// Memory Topology Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 Reserved; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 Reserved; } EFI_ACPI_6_0_MEMORY_TOPOLOGY_TABLE; /// /// PMTT Version (as defined in ACPI 6.0 spec.) /// -#define EFI_ACPI_6_0_MEMORY_TOPOLOGY_TABLE_REVISION 0x01 +#define EFI_ACPI_6_0_MEMORY_TOPOLOGY_TABLE_REVISION 0x01 /// /// Common Memory Aggregator Device Structure. /// typedef struct { - UINT8 Type; - UINT8 Reserved; - UINT16 Length; - UINT16 Flags; - UINT16 Reserved1; + UINT8 Type; + UINT8 Reserved; + UINT16 Length; + UINT16 Flags; + UINT16 Reserved1; } EFI_ACPI_6_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE; /// /// Memory Aggregator Device Type /// -#define EFI_ACPI_6_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_SOCKET 0x0 -#define EFI_ACPI_6_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_MEMORY_CONTROLLER 0x1 -#define EFI_ACPI_6_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_DIMM 0x2 +#define EFI_ACPI_6_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_SOCKET 0x0 +#define EFI_ACPI_6_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_MEMORY_CONTROLLER 0x1 +#define EFI_ACPI_6_0_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_DIMM 0x2 /// /// Socket Memory Aggregator Device Structure. /// typedef struct { - EFI_ACPI_6_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; - UINT16 SocketIdentifier; - UINT16 Reserved; -//EFI_ACPI_6_0_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE MemoryController[]; + EFI_ACPI_6_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; + UINT16 SocketIdentifier; + UINT16 Reserved; + // EFI_ACPI_6_0_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE MemoryController[]; } EFI_ACPI_6_0_PMMT_SOCKET_MEMORY_AGGREGATOR_DEVICE_STRUCTURE; /// /// MemoryController Memory Aggregator Device Structure. /// typedef struct { - EFI_ACPI_6_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; - UINT32 ReadLatency; - UINT32 WriteLatency; - UINT32 ReadBandwidth; - UINT32 WriteBandwidth; - UINT16 OptimalAccessUnit; - UINT16 OptimalAccessAlignment; - UINT16 Reserved; - UINT16 NumberOfProximityDomains; -//UINT32 ProximityDomain[NumberOfProximityDomains]; -//EFI_ACPI_6_0_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE PhysicalComponent[]; + EFI_ACPI_6_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; + UINT32 ReadLatency; + UINT32 WriteLatency; + UINT32 ReadBandwidth; + UINT32 WriteBandwidth; + UINT16 OptimalAccessUnit; + UINT16 OptimalAccessAlignment; + UINT16 Reserved; + UINT16 NumberOfProximityDomains; + // UINT32 ProximityDomain[NumberOfProximityDomains]; + // EFI_ACPI_6_0_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE PhysicalComponent[]; } EFI_ACPI_6_0_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE; /// /// DIMM Memory Aggregator Device Structure. /// typedef struct { - EFI_ACPI_6_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; - UINT16 PhysicalComponentIdentifier; - UINT16 Reserved; - UINT32 SizeOfDimm; - UINT32 SmbiosHandle; + EFI_ACPI_6_0_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; + UINT16 PhysicalComponentIdentifier; + UINT16 Reserved; + UINT32 SizeOfDimm; + UINT32 SmbiosHandle; } EFI_ACPI_6_0_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE; /// /// Boot Graphics Resource Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_DESCRIPTION_HEADER Header; /// /// 2-bytes (16 bit) version ID. This value must be 1. /// - UINT16 Version; + UINT16 Version; /// /// 1-byte status field indicating current status about the table. /// Bits[7:1] = Reserved (must be zero) /// Bit [0] = Valid. A one indicates the boot image graphic is valid. /// - UINT8 Status; + UINT8 Status; /// /// 1-byte enumerated type field indicating format of the image. /// 0 = Bitmap /// 1 - 255 Reserved (for future use) /// - UINT8 ImageType; + UINT8 ImageType; /// /// 8-byte (64 bit) physical address pointing to the firmware's in-memory copy /// of the image bitmap. /// - UINT64 ImageAddress; + UINT64 ImageAddress; /// /// A 4-byte (32-bit) unsigned long describing the display X-offset of the boot image. /// (X, Y) display offset of the top left corner of the boot image. /// The top left corner of the display is at offset (0, 0). /// - UINT32 ImageOffsetX; + UINT32 ImageOffsetX; /// /// A 4-byte (32-bit) unsigned long describing the display Y-offset of the boot image. /// (X, Y) display offset of the top left corner of the boot image. /// The top left corner of the display is at offset (0, 0). /// - UINT32 ImageOffsetY; + UINT32 ImageOffsetY; } EFI_ACPI_6_0_BOOT_GRAPHICS_RESOURCE_TABLE; /// /// BGRT Revision /// -#define EFI_ACPI_6_0_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION 1 +#define EFI_ACPI_6_0_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION 1 /// /// BGRT Version /// -#define EFI_ACPI_6_0_BGRT_VERSION 0x01 +#define EFI_ACPI_6_0_BGRT_VERSION 0x01 /// /// BGRT Status /// -#define EFI_ACPI_6_0_BGRT_STATUS_NOT_DISPLAYED 0x00 -#define EFI_ACPI_6_0_BGRT_STATUS_DISPLAYED 0x01 +#define EFI_ACPI_6_0_BGRT_STATUS_NOT_DISPLAYED 0x00 +#define EFI_ACPI_6_0_BGRT_STATUS_DISPLAYED 0x01 /// /// BGRT Image Type @@ -1072,26 +1072,26 @@ typedef struct { /// /// FPDT Version (as defined in ACPI 6.0 spec.) /// -#define EFI_ACPI_6_0_FIRMWARE_PERFORMANCE_DATA_TABLE_REVISION 0x01 +#define EFI_ACPI_6_0_FIRMWARE_PERFORMANCE_DATA_TABLE_REVISION 0x01 /// /// FPDT Performance Record Types /// -#define EFI_ACPI_6_0_FPDT_RECORD_TYPE_FIRMWARE_BASIC_BOOT_POINTER 0x0000 -#define EFI_ACPI_6_0_FPDT_RECORD_TYPE_S3_PERFORMANCE_TABLE_POINTER 0x0001 +#define EFI_ACPI_6_0_FPDT_RECORD_TYPE_FIRMWARE_BASIC_BOOT_POINTER 0x0000 +#define EFI_ACPI_6_0_FPDT_RECORD_TYPE_S3_PERFORMANCE_TABLE_POINTER 0x0001 /// /// FPDT Performance Record Revision /// -#define EFI_ACPI_6_0_FPDT_RECORD_REVISION_FIRMWARE_BASIC_BOOT_POINTER 0x01 -#define EFI_ACPI_6_0_FPDT_RECORD_REVISION_S3_PERFORMANCE_TABLE_POINTER 0x01 +#define EFI_ACPI_6_0_FPDT_RECORD_REVISION_FIRMWARE_BASIC_BOOT_POINTER 0x01 +#define EFI_ACPI_6_0_FPDT_RECORD_REVISION_S3_PERFORMANCE_TABLE_POINTER 0x01 /// /// FPDT Runtime Performance Record Types /// -#define EFI_ACPI_6_0_FPDT_RUNTIME_RECORD_TYPE_S3_RESUME 0x0000 -#define EFI_ACPI_6_0_FPDT_RUNTIME_RECORD_TYPE_S3_SUSPEND 0x0001 -#define EFI_ACPI_6_0_FPDT_RUNTIME_RECORD_TYPE_FIRMWARE_BASIC_BOOT 0x0002 +#define EFI_ACPI_6_0_FPDT_RUNTIME_RECORD_TYPE_S3_RESUME 0x0000 +#define EFI_ACPI_6_0_FPDT_RUNTIME_RECORD_TYPE_S3_SUSPEND 0x0001 +#define EFI_ACPI_6_0_FPDT_RUNTIME_RECORD_TYPE_FIRMWARE_BASIC_BOOT 0x0002 /// /// FPDT Runtime Performance Record Revision @@ -1104,77 +1104,77 @@ typedef struct { /// FPDT Performance Record header /// typedef struct { - UINT16 Type; - UINT8 Length; - UINT8 Revision; + UINT16 Type; + UINT8 Length; + UINT8 Revision; } EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER; /// /// FPDT Performance Table header /// typedef struct { - UINT32 Signature; - UINT32 Length; + UINT32 Signature; + UINT32 Length; } EFI_ACPI_6_0_FPDT_PERFORMANCE_TABLE_HEADER; /// /// FPDT Firmware Basic Boot Performance Pointer Record Structure /// typedef struct { - EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER Header; - UINT32 Reserved; + EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER Header; + UINT32 Reserved; /// /// 64-bit processor-relative physical address of the Basic Boot Performance Table. /// - UINT64 BootPerformanceTablePointer; + UINT64 BootPerformanceTablePointer; } EFI_ACPI_6_0_FPDT_BOOT_PERFORMANCE_TABLE_POINTER_RECORD; /// /// FPDT S3 Performance Table Pointer Record Structure /// typedef struct { - EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER Header; - UINT32 Reserved; + EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER Header; + UINT32 Reserved; /// /// 64-bit processor-relative physical address of the S3 Performance Table. /// - UINT64 S3PerformanceTablePointer; + UINT64 S3PerformanceTablePointer; } EFI_ACPI_6_0_FPDT_S3_PERFORMANCE_TABLE_POINTER_RECORD; /// /// FPDT Firmware Basic Boot Performance Record Structure /// typedef struct { - EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER Header; - UINT32 Reserved; + EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER Header; + UINT32 Reserved; /// /// Timer value logged at the beginning of firmware image execution. /// This may not always be zero or near zero. /// - UINT64 ResetEnd; + UINT64 ResetEnd; /// /// Timer value logged just prior to loading the OS boot loader into memory. /// For non-UEFI compatible boots, this field must be zero. /// - UINT64 OsLoaderLoadImageStart; + UINT64 OsLoaderLoadImageStart; /// /// Timer value logged just prior to launching the previously loaded OS boot loader image. /// For non-UEFI compatible boots, the timer value logged will be just prior /// to the INT 19h handler invocation. /// - UINT64 OsLoaderStartImageStart; + UINT64 OsLoaderStartImageStart; /// /// Timer value logged at the point when the OS loader calls the /// ExitBootServices function for UEFI compatible firmware. /// For non-UEFI compatible boots, this field must be zero. /// - UINT64 ExitBootServicesEntry; + UINT64 ExitBootServicesEntry; /// /// Timer value logged at the point just prior to when the OS loader gaining /// control back from calls the ExitBootServices function for UEFI compatible firmware. /// For non-UEFI compatible boots, this field must be zero. /// - UINT64 ExitBootServicesExit; + UINT64 ExitBootServicesExit; } EFI_ACPI_6_0_FPDT_FIRMWARE_BASIC_BOOT_RECORD; /// @@ -1186,7 +1186,7 @@ typedef struct { // FPDT Firmware Basic Boot Performance Table // typedef struct { - EFI_ACPI_6_0_FPDT_PERFORMANCE_TABLE_HEADER Header; + EFI_ACPI_6_0_FPDT_PERFORMANCE_TABLE_HEADER Header; // // one or more Performance Records. // @@ -1201,7 +1201,7 @@ typedef struct { // FPDT Firmware S3 Boot Performance Table // typedef struct { - EFI_ACPI_6_0_FPDT_PERFORMANCE_TABLE_HEADER Header; + EFI_ACPI_6_0_FPDT_PERFORMANCE_TABLE_HEADER Header; // // one or more Performance Records. // @@ -1211,145 +1211,145 @@ typedef struct { /// FPDT Basic S3 Resume Performance Record /// typedef struct { - EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER Header; + EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER Header; /// /// A count of the number of S3 resume cycles since the last full boot sequence. /// - UINT32 ResumeCount; + UINT32 ResumeCount; /// /// Timer recorded at the end of BIOS S3 resume, just prior to handoff to the /// OS waking vector. Only the most recent resume cycle's time is retained. /// - UINT64 FullResume; + UINT64 FullResume; /// /// Average timer value of all resume cycles logged since the last full boot /// sequence, including the most recent resume. Note that the entire log of /// timer values does not need to be retained in order to calculate this average. /// - UINT64 AverageResume; + UINT64 AverageResume; } EFI_ACPI_6_0_FPDT_S3_RESUME_RECORD; /// /// FPDT Basic S3 Suspend Performance Record /// typedef struct { - EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER Header; + EFI_ACPI_6_0_FPDT_PERFORMANCE_RECORD_HEADER Header; /// /// Timer value recorded at the OS write to SLP_TYP upon entry to S3. /// Only the most recent suspend cycle's timer value is retained. /// - UINT64 SuspendStart; + UINT64 SuspendStart; /// /// Timer value recorded at the final firmware write to SLP_TYP (or other /// mechanism) used to trigger hardware entry to S3. /// Only the most recent suspend cycle's timer value is retained. /// - UINT64 SuspendEnd; + UINT64 SuspendEnd; } EFI_ACPI_6_0_FPDT_S3_SUSPEND_RECORD; /// /// Firmware Performance Record Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_DESCRIPTION_HEADER Header; } EFI_ACPI_6_0_FIRMWARE_PERFORMANCE_RECORD_TABLE; /// /// Generic Timer Description Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT64 CntControlBasePhysicalAddress; - UINT32 Reserved; - UINT32 SecurePL1TimerGSIV; - UINT32 SecurePL1TimerFlags; - UINT32 NonSecurePL1TimerGSIV; - UINT32 NonSecurePL1TimerFlags; - UINT32 VirtualTimerGSIV; - UINT32 VirtualTimerFlags; - UINT32 NonSecurePL2TimerGSIV; - UINT32 NonSecurePL2TimerFlags; - UINT64 CntReadBasePhysicalAddress; - UINT32 PlatformTimerCount; - UINT32 PlatformTimerOffset; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT64 CntControlBasePhysicalAddress; + UINT32 Reserved; + UINT32 SecurePL1TimerGSIV; + UINT32 SecurePL1TimerFlags; + UINT32 NonSecurePL1TimerGSIV; + UINT32 NonSecurePL1TimerFlags; + UINT32 VirtualTimerGSIV; + UINT32 VirtualTimerFlags; + UINT32 NonSecurePL2TimerGSIV; + UINT32 NonSecurePL2TimerFlags; + UINT64 CntReadBasePhysicalAddress; + UINT32 PlatformTimerCount; + UINT32 PlatformTimerOffset; } EFI_ACPI_6_0_GENERIC_TIMER_DESCRIPTION_TABLE; /// /// GTDT Version (as defined in ACPI 6.0 spec.) /// -#define EFI_ACPI_6_0_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION 0x02 +#define EFI_ACPI_6_0_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION 0x02 /// /// Timer Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_0_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 -#define EFI_ACPI_6_0_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 -#define EFI_ACPI_6_0_GTDT_TIMER_FLAG_ALWAYS_ON_CAPABILITY BIT2 +#define EFI_ACPI_6_0_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 +#define EFI_ACPI_6_0_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 +#define EFI_ACPI_6_0_GTDT_TIMER_FLAG_ALWAYS_ON_CAPABILITY BIT2 /// /// Platform Timer Type /// -#define EFI_ACPI_6_0_GTDT_GT_BLOCK 0 -#define EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG 1 +#define EFI_ACPI_6_0_GTDT_GT_BLOCK 0 +#define EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG 1 /// /// GT Block Structure /// typedef struct { - UINT8 Type; - UINT16 Length; - UINT8 Reserved; - UINT64 CntCtlBase; - UINT32 GTBlockTimerCount; - UINT32 GTBlockTimerOffset; + UINT8 Type; + UINT16 Length; + UINT8 Reserved; + UINT64 CntCtlBase; + UINT32 GTBlockTimerCount; + UINT32 GTBlockTimerOffset; } EFI_ACPI_6_0_GTDT_GT_BLOCK_STRUCTURE; /// /// GT Block Timer Structure /// typedef struct { - UINT8 GTFrameNumber; - UINT8 Reserved[3]; - UINT64 CntBaseX; - UINT64 CntEL0BaseX; - UINT32 GTxPhysicalTimerGSIV; - UINT32 GTxPhysicalTimerFlags; - UINT32 GTxVirtualTimerGSIV; - UINT32 GTxVirtualTimerFlags; - UINT32 GTxCommonFlags; + UINT8 GTFrameNumber; + UINT8 Reserved[3]; + UINT64 CntBaseX; + UINT64 CntEL0BaseX; + UINT32 GTxPhysicalTimerGSIV; + UINT32 GTxPhysicalTimerFlags; + UINT32 GTxVirtualTimerGSIV; + UINT32 GTxVirtualTimerFlags; + UINT32 GTxCommonFlags; } EFI_ACPI_6_0_GTDT_GT_BLOCK_TIMER_STRUCTURE; /// /// GT Block Physical Timers and Virtual Timers Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_0_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 -#define EFI_ACPI_6_0_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 +#define EFI_ACPI_6_0_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 +#define EFI_ACPI_6_0_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 /// /// Common Flags Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_0_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER BIT0 -#define EFI_ACPI_6_0_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY BIT1 +#define EFI_ACPI_6_0_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER BIT0 +#define EFI_ACPI_6_0_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY BIT1 /// /// SBSA Generic Watchdog Structure /// typedef struct { - UINT8 Type; - UINT16 Length; - UINT8 Reserved; - UINT64 RefreshFramePhysicalAddress; - UINT64 WatchdogControlFramePhysicalAddress; - UINT32 WatchdogTimerGSIV; - UINT32 WatchdogTimerFlags; + UINT8 Type; + UINT16 Length; + UINT8 Reserved; + UINT64 RefreshFramePhysicalAddress; + UINT64 WatchdogControlFramePhysicalAddress; + UINT32 WatchdogTimerGSIV; + UINT32 WatchdogTimerFlags; } EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE; /// /// SBSA Generic Watchdog Timer Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_MODE BIT0 -#define EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_POLARITY BIT1 -#define EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER BIT2 +#define EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_MODE BIT0 +#define EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_POLARITY BIT1 +#define EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER BIT2 // // NVDIMM Firmware Interface Table definition. @@ -1362,7 +1362,7 @@ typedef struct { // // NFIT Version (as defined in ACPI 6.0 spec.) // -#define EFI_ACPI_6_0_NVDIMM_FIRMWARE_INTERFACE_TABLE_REVISION 0x1 +#define EFI_ACPI_6_0_NVDIMM_FIRMWARE_INTERFACE_TABLE_REVISION 0x1 // // Definition for NFIT Table Structure Types @@ -1379,46 +1379,46 @@ typedef struct { // Definition for NFIT Structure Header // typedef struct { - UINT16 Type; - UINT16 Length; + UINT16 Type; + UINT16 Length; } EFI_ACPI_6_0_NFIT_STRUCTURE_HEADER; // // Definition for System Physical Address Range Structure // -#define EFI_ACPI_6_0_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_CONTROL_REGION_FOR_MANAGEMENT BIT0 -#define EFI_ACPI_6_0_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_PROXIMITY_DOMAIN_VALID BIT1 -#define EFI_ACPI_6_0_NFIT_GUID_VOLATILE_MEMORY_REGION { 0x7305944F, 0xFDDA, 0x44E3, { 0xB1, 0x6C, 0x3F, 0x22, 0xD2, 0x52, 0xE5, 0xD0 }} -#define EFI_ACPI_6_0_NFIT_GUID_BYTE_ADDRESSABLE_PERSISTENT_MEMORY_REGION { 0x66F0D379, 0xB4F3, 0x4074, { 0xAC, 0x43, 0x0D, 0x33, 0x18, 0xB7, 0x8C, 0xDB }} -#define EFI_ACPI_6_0_NFIT_GUID_NVDIMM_CONTROL_REGION { 0x92F701F6, 0x13B4, 0x405D, { 0x91, 0x0B, 0x29, 0x93, 0x67, 0xE8, 0x23, 0x4C }} -#define EFI_ACPI_6_0_NFIT_GUID_NVDIMM_BLOCK_DATA_WINDOW_REGION { 0x91AF0530, 0x5D86, 0x470E, { 0xA6, 0xB0, 0x0A, 0x2D, 0xB9, 0x40, 0x82, 0x49 }} -#define EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE { 0x77AB535A, 0x45FC, 0x624B, { 0x55, 0x60, 0xF7, 0xB2, 0x81, 0xD1, 0xF9, 0x6E }} -#define EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE { 0x3D5ABD30, 0x4175, 0x87CE, { 0x6D, 0x64, 0xD2, 0xAD, 0xE5, 0x23, 0xC4, 0xBB }} -#define EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT { 0x5CEA02C9, 0x4D07, 0x69D3, { 0x26, 0x9F ,0x44, 0x96, 0xFB, 0xE0, 0x96, 0xF9 }} -#define EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT { 0x08018188, 0x42CD, 0xBB48, { 0x10, 0x0F, 0x53, 0x87, 0xD5, 0x3D, 0xED, 0x3D }} -typedef struct { - UINT16 Type; - UINT16 Length; - UINT16 SPARangeStructureIndex; - UINT16 Flags; - UINT32 Reserved_8; - UINT32 ProximityDomain; - GUID AddressRangeTypeGUID; - UINT64 SystemPhysicalAddressRangeBase; - UINT64 SystemPhysicalAddressRangeLength; - UINT64 AddressRangeMemoryMappingAttribute; +#define EFI_ACPI_6_0_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_CONTROL_REGION_FOR_MANAGEMENT BIT0 +#define EFI_ACPI_6_0_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_PROXIMITY_DOMAIN_VALID BIT1 +#define EFI_ACPI_6_0_NFIT_GUID_VOLATILE_MEMORY_REGION { 0x7305944F, 0xFDDA, 0x44E3, { 0xB1, 0x6C, 0x3F, 0x22, 0xD2, 0x52, 0xE5, 0xD0 }} +#define EFI_ACPI_6_0_NFIT_GUID_BYTE_ADDRESSABLE_PERSISTENT_MEMORY_REGION { 0x66F0D379, 0xB4F3, 0x4074, { 0xAC, 0x43, 0x0D, 0x33, 0x18, 0xB7, 0x8C, 0xDB }} +#define EFI_ACPI_6_0_NFIT_GUID_NVDIMM_CONTROL_REGION { 0x92F701F6, 0x13B4, 0x405D, { 0x91, 0x0B, 0x29, 0x93, 0x67, 0xE8, 0x23, 0x4C }} +#define EFI_ACPI_6_0_NFIT_GUID_NVDIMM_BLOCK_DATA_WINDOW_REGION { 0x91AF0530, 0x5D86, 0x470E, { 0xA6, 0xB0, 0x0A, 0x2D, 0xB9, 0x40, 0x82, 0x49 }} +#define EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE { 0x77AB535A, 0x45FC, 0x624B, { 0x55, 0x60, 0xF7, 0xB2, 0x81, 0xD1, 0xF9, 0x6E }} +#define EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE { 0x3D5ABD30, 0x4175, 0x87CE, { 0x6D, 0x64, 0xD2, 0xAD, 0xE5, 0x23, 0xC4, 0xBB }} +#define EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT { 0x5CEA02C9, 0x4D07, 0x69D3, { 0x26, 0x9F ,0x44, 0x96, 0xFB, 0xE0, 0x96, 0xF9 }} +#define EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT { 0x08018188, 0x42CD, 0xBB48, { 0x10, 0x0F, 0x53, 0x87, 0xD5, 0x3D, 0xED, 0x3D }} +typedef struct { + UINT16 Type; + UINT16 Length; + UINT16 SPARangeStructureIndex; + UINT16 Flags; + UINT32 Reserved_8; + UINT32 ProximityDomain; + GUID AddressRangeTypeGUID; + UINT64 SystemPhysicalAddressRangeBase; + UINT64 SystemPhysicalAddressRangeLength; + UINT64 AddressRangeMemoryMappingAttribute; } EFI_ACPI_6_0_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_STRUCTURE; // // Definition for Memory Device to System Physical Address Range Mapping Structure // typedef struct { - UINT32 DIMMNumber:4; - UINT32 MemoryChannelNumber:4; - UINT32 MemoryControllerID:4; - UINT32 SocketID:4; - UINT32 NodeControllerID:12; - UINT32 Reserved_28:4; + UINT32 DIMMNumber : 4; + UINT32 MemoryChannelNumber : 4; + UINT32 MemoryControllerID : 4; + UINT32 SocketID : 4; + UINT32 NodeControllerID : 12; + UINT32 Reserved_28 : 4; } EFI_ACPI_6_0_NFIT_DEVICE_HANDLE; #define EFI_ACPI_6_0_NFIT_MEMORY_DEVICE_STATE_FLAGS_PREVIOUS_SAVE_FAIL BIT0 @@ -1428,133 +1428,133 @@ typedef struct { #define EFI_ACPI_6_0_NFIT_MEMORY_DEVICE_STATE_FLAGS_SMART_HEALTH_EVENTS_PRIOR_OSPM_HAND_OFF BIT4 #define EFI_ACPI_6_0_NFIT_MEMORY_DEVICE_STATE_FLAGS_FIRMWARE_ENABLED_TO_NOTIFY_OSPM_ON_SMART_HEALTH_EVENTS BIT5 typedef struct { - UINT16 Type; - UINT16 Length; - EFI_ACPI_6_0_NFIT_DEVICE_HANDLE NFITDeviceHandle; - UINT16 MemoryDevicePhysicalID; - UINT16 MemoryDeviceRegionID; - UINT16 SPARangeStructureIndex ; - UINT16 NVDIMMControlRegionStructureIndex; - UINT64 MemoryDeviceRegionSize; - UINT64 RegionOffset; - UINT64 MemoryDevicePhysicalAddressRegionBase; - UINT16 InterleaveStructureIndex; - UINT16 InterleaveWays; - UINT16 MemoryDeviceStateFlags; - UINT16 Reserved_46; + UINT16 Type; + UINT16 Length; + EFI_ACPI_6_0_NFIT_DEVICE_HANDLE NFITDeviceHandle; + UINT16 MemoryDevicePhysicalID; + UINT16 MemoryDeviceRegionID; + UINT16 SPARangeStructureIndex; + UINT16 NVDIMMControlRegionStructureIndex; + UINT64 MemoryDeviceRegionSize; + UINT64 RegionOffset; + UINT64 MemoryDevicePhysicalAddressRegionBase; + UINT16 InterleaveStructureIndex; + UINT16 InterleaveWays; + UINT16 MemoryDeviceStateFlags; + UINT16 Reserved_46; } EFI_ACPI_6_0_NFIT_MEMORY_DEVICE_TO_SYSTEM_ADDRESS_RANGE_MAP_STRUCTURE; // // Definition for Interleave Structure // typedef struct { - UINT16 Type; - UINT16 Length; - UINT16 InterleaveStructureIndex; - UINT16 Reserved_6; - UINT32 NumberOfLines; - UINT32 LineSize; -//UINT32 LineOffset[NumberOfLines]; + UINT16 Type; + UINT16 Length; + UINT16 InterleaveStructureIndex; + UINT16 Reserved_6; + UINT32 NumberOfLines; + UINT32 LineSize; + // UINT32 LineOffset[NumberOfLines]; } EFI_ACPI_6_0_NFIT_INTERLEAVE_STRUCTURE; // // Definition for SMBIOS Management Information Structure // typedef struct { - UINT16 Type; - UINT16 Length; - UINT32 Reserved_4; -//UINT8 Data[]; + UINT16 Type; + UINT16 Length; + UINT32 Reserved_4; + // UINT8 Data[]; } EFI_ACPI_6_0_NFIT_SMBIOS_MANAGEMENT_INFORMATION_STRUCTURE; // // Definition for NVDIMM Control Region Structure // -#define EFI_ACPI_6_0_NFIT_NVDIMM_CONTROL_REGION_FLAGS_BLOCK_DATA_WINDOWS_BUFFERED BIT0 -typedef struct { - UINT16 Type; - UINT16 Length; - UINT16 NVDIMMControlRegionStructureIndex; - UINT16 VendorID; - UINT16 DeviceID; - UINT16 RevisionID; - UINT16 SubsystemVendorID; - UINT16 SubsystemDeviceID; - UINT16 SubsystemRevisionID; - UINT8 Reserved_18[6]; - UINT32 SerialNumber; - UINT16 RegionFormatInterfaceCode; - UINT16 NumberOfBlockControlWindows; - UINT64 SizeOfBlockControlWindow; - UINT64 CommandRegisterOffsetInBlockControlWindow; - UINT64 SizeOfCommandRegisterInBlockControlWindows; - UINT64 StatusRegisterOffsetInBlockControlWindow; - UINT64 SizeOfStatusRegisterInBlockControlWindows; - UINT16 NVDIMMControlRegionFlag; - UINT8 Reserved_74[6]; +#define EFI_ACPI_6_0_NFIT_NVDIMM_CONTROL_REGION_FLAGS_BLOCK_DATA_WINDOWS_BUFFERED BIT0 +typedef struct { + UINT16 Type; + UINT16 Length; + UINT16 NVDIMMControlRegionStructureIndex; + UINT16 VendorID; + UINT16 DeviceID; + UINT16 RevisionID; + UINT16 SubsystemVendorID; + UINT16 SubsystemDeviceID; + UINT16 SubsystemRevisionID; + UINT8 Reserved_18[6]; + UINT32 SerialNumber; + UINT16 RegionFormatInterfaceCode; + UINT16 NumberOfBlockControlWindows; + UINT64 SizeOfBlockControlWindow; + UINT64 CommandRegisterOffsetInBlockControlWindow; + UINT64 SizeOfCommandRegisterInBlockControlWindows; + UINT64 StatusRegisterOffsetInBlockControlWindow; + UINT64 SizeOfStatusRegisterInBlockControlWindows; + UINT16 NVDIMMControlRegionFlag; + UINT8 Reserved_74[6]; } EFI_ACPI_6_0_NFIT_NVDIMM_CONTROL_REGION_STRUCTURE; // // Definition for NVDIMM Block Data Window Region Structure // typedef struct { - UINT16 Type; - UINT16 Length; - UINT16 NVDIMMControlRegionStructureIndex; - UINT16 NumberOfBlockDataWindows; - UINT64 BlockDataWindowStartOffset; - UINT64 SizeOfBlockDataWindow; - UINT64 BlockAccessibleMemoryCapacity; - UINT64 BeginningAddressOfFirstBlockInBlockAccessibleMemory; + UINT16 Type; + UINT16 Length; + UINT16 NVDIMMControlRegionStructureIndex; + UINT16 NumberOfBlockDataWindows; + UINT64 BlockDataWindowStartOffset; + UINT64 SizeOfBlockDataWindow; + UINT64 BlockAccessibleMemoryCapacity; + UINT64 BeginningAddressOfFirstBlockInBlockAccessibleMemory; } EFI_ACPI_6_0_NFIT_NVDIMM_BLOCK_DATA_WINDOW_REGION_STRUCTURE; // // Definition for Flush Hint Address Structure // typedef struct { - UINT16 Type; - UINT16 Length; - EFI_ACPI_6_0_NFIT_DEVICE_HANDLE NFITDeviceHandle; - UINT16 NumberOfFlushHintAddresses; - UINT8 Reserved_10[6]; -//UINT64 FlushHintAddress[NumberOfFlushHintAddresses]; + UINT16 Type; + UINT16 Length; + EFI_ACPI_6_0_NFIT_DEVICE_HANDLE NFITDeviceHandle; + UINT16 NumberOfFlushHintAddresses; + UINT8 Reserved_10[6]; + // UINT64 FlushHintAddress[NumberOfFlushHintAddresses]; } EFI_ACPI_6_0_NFIT_FLUSH_HINT_ADDRESS_STRUCTURE; /// /// Boot Error Record Table (BERT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 BootErrorRegionLength; - UINT64 BootErrorRegion; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 BootErrorRegionLength; + UINT64 BootErrorRegion; } EFI_ACPI_6_0_BOOT_ERROR_RECORD_TABLE_HEADER; /// /// BERT Version (as defined in ACPI 6.0 spec.) /// -#define EFI_ACPI_6_0_BOOT_ERROR_RECORD_TABLE_REVISION 0x01 +#define EFI_ACPI_6_0_BOOT_ERROR_RECORD_TABLE_REVISION 0x01 /// /// Boot Error Region Block Status Definition /// typedef struct { - UINT32 UncorrectableErrorValid:1; - UINT32 CorrectableErrorValid:1; - UINT32 MultipleUncorrectableErrors:1; - UINT32 MultipleCorrectableErrors:1; - UINT32 ErrorDataEntryCount:10; - UINT32 Reserved:18; + UINT32 UncorrectableErrorValid : 1; + UINT32 CorrectableErrorValid : 1; + UINT32 MultipleUncorrectableErrors : 1; + UINT32 MultipleCorrectableErrors : 1; + UINT32 ErrorDataEntryCount : 10; + UINT32 Reserved : 18; } EFI_ACPI_6_0_ERROR_BLOCK_STATUS; /// /// Boot Error Region Definition /// typedef struct { - EFI_ACPI_6_0_ERROR_BLOCK_STATUS BlockStatus; - UINT32 RawDataOffset; - UINT32 RawDataLength; - UINT32 DataLength; - UINT32 ErrorSeverity; + EFI_ACPI_6_0_ERROR_BLOCK_STATUS BlockStatus; + UINT32 RawDataOffset; + UINT32 RawDataLength; + UINT32 DataLength; + UINT32 ErrorSeverity; } EFI_ACPI_6_0_BOOT_ERROR_REGION_STRUCTURE; // @@ -1569,14 +1569,14 @@ typedef struct { /// Generic Error Data Entry Definition /// typedef struct { - UINT8 SectionType[16]; - UINT32 ErrorSeverity; - UINT16 Revision; - UINT8 ValidationBits; - UINT8 Flags; - UINT32 ErrorDataLength; - UINT8 FruId[16]; - UINT8 FruText[20]; + UINT8 SectionType[16]; + UINT32 ErrorSeverity; + UINT16 Revision; + UINT8 ValidationBits; + UINT8 Flags; + UINT32 ErrorDataLength; + UINT8 FruId[16]; + UINT8 FruText[20]; } EFI_ACPI_6_0_GENERIC_ERROR_DATA_ENTRY_STRUCTURE; /// @@ -1588,14 +1588,14 @@ typedef struct { /// HEST - Hardware Error Source Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 ErrorSourceCount; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 ErrorSourceCount; } EFI_ACPI_6_0_HARDWARE_ERROR_SOURCE_TABLE_HEADER; /// /// HEST Version (as defined in ACPI 6.0 spec.) /// -#define EFI_ACPI_6_0_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01 +#define EFI_ACPI_6_0_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01 // // Error Source structure types. @@ -1611,437 +1611,437 @@ typedef struct { // // Error Source structure flags. // -#define EFI_ACPI_6_0_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0) -#define EFI_ACPI_6_0_ERROR_SOURCE_FLAG_GLOBAL (1 << 1) +#define EFI_ACPI_6_0_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0) +#define EFI_ACPI_6_0_ERROR_SOURCE_FLAG_GLOBAL (1 << 1) /// /// IA-32 Architecture Machine Check Exception Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT64 GlobalCapabilityInitData; - UINT64 GlobalControlInitData; - UINT8 NumberOfHardwareBanks; - UINT8 Reserved1[7]; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT64 GlobalCapabilityInitData; + UINT64 GlobalControlInitData; + UINT8 NumberOfHardwareBanks; + UINT8 Reserved1[7]; } EFI_ACPI_6_0_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION_STRUCTURE; /// /// IA-32 Architecture Machine Check Bank Structure Definition /// typedef struct { - UINT8 BankNumber; - UINT8 ClearStatusOnInitialization; - UINT8 StatusDataFormat; - UINT8 Reserved0; - UINT32 ControlRegisterMsrAddress; - UINT64 ControlInitData; - UINT32 StatusRegisterMsrAddress; - UINT32 AddressRegisterMsrAddress; - UINT32 MiscRegisterMsrAddress; + UINT8 BankNumber; + UINT8 ClearStatusOnInitialization; + UINT8 StatusDataFormat; + UINT8 Reserved0; + UINT32 ControlRegisterMsrAddress; + UINT64 ControlInitData; + UINT32 StatusRegisterMsrAddress; + UINT32 AddressRegisterMsrAddress; + UINT32 MiscRegisterMsrAddress; } EFI_ACPI_6_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_BANK_STRUCTURE; /// /// IA-32 Architecture Machine Check Bank Structure MCA data format /// -#define EFI_ACPI_6_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00 -#define EFI_ACPI_6_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01 -#define EFI_ACPI_6_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02 +#define EFI_ACPI_6_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00 +#define EFI_ACPI_6_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01 +#define EFI_ACPI_6_0_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02 // // Hardware Error Notification types. All other values are reserved // -#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00 -#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01 -#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02 -#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_SCI 0x03 -#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_NMI 0x04 -#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_CMCI 0x05 -#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_MCE 0x06 -#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_GPIO_SIGNAL 0x07 +#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00 +#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01 +#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02 +#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_SCI 0x03 +#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_NMI 0x04 +#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_CMCI 0x05 +#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_MCE 0x06 +#define EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_GPIO_SIGNAL 0x07 /// /// Hardware Error Notification Configuration Write Enable Structure Definition /// typedef struct { - UINT16 Type:1; - UINT16 PollInterval:1; - UINT16 SwitchToPollingThresholdValue:1; - UINT16 SwitchToPollingThresholdWindow:1; - UINT16 ErrorThresholdValue:1; - UINT16 ErrorThresholdWindow:1; - UINT16 Reserved:10; + UINT16 Type : 1; + UINT16 PollInterval : 1; + UINT16 SwitchToPollingThresholdValue : 1; + UINT16 SwitchToPollingThresholdWindow : 1; + UINT16 ErrorThresholdValue : 1; + UINT16 ErrorThresholdWindow : 1; + UINT16 Reserved : 10; } EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE; /// /// Hardware Error Notification Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable; - UINT32 PollInterval; - UINT32 Vector; - UINT32 SwitchToPollingThresholdValue; - UINT32 SwitchToPollingThresholdWindow; - UINT32 ErrorThresholdValue; - UINT32 ErrorThresholdWindow; + UINT8 Type; + UINT8 Length; + EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable; + UINT32 PollInterval; + UINT32 Vector; + UINT32 SwitchToPollingThresholdValue; + UINT32 SwitchToPollingThresholdWindow; + UINT32 ErrorThresholdValue; + UINT32 ErrorThresholdWindow; } EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE; /// /// IA-32 Architecture Corrected Machine Check Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; - UINT8 NumberOfHardwareBanks; - UINT8 Reserved1[3]; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; + UINT8 NumberOfHardwareBanks; + UINT8 Reserved1[3]; } EFI_ACPI_6_0_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK_STRUCTURE; /// /// IA-32 Architecture NMI Error Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 MaxRawDataLength; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 MaxRawDataLength; } EFI_ACPI_6_0_IA32_ARCHITECTURE_NMI_ERROR_STRUCTURE; /// /// PCI Express Root Port AER Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 Bus; - UINT16 Device; - UINT16 Function; - UINT16 DeviceControl; - UINT8 Reserved1[2]; - UINT32 UncorrectableErrorMask; - UINT32 UncorrectableErrorSeverity; - UINT32 CorrectableErrorMask; - UINT32 AdvancedErrorCapabilitiesAndControl; - UINT32 RootErrorCommand; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 Bus; + UINT16 Device; + UINT16 Function; + UINT16 DeviceControl; + UINT8 Reserved1[2]; + UINT32 UncorrectableErrorMask; + UINT32 UncorrectableErrorSeverity; + UINT32 CorrectableErrorMask; + UINT32 AdvancedErrorCapabilitiesAndControl; + UINT32 RootErrorCommand; } EFI_ACPI_6_0_PCI_EXPRESS_ROOT_PORT_AER_STRUCTURE; /// /// PCI Express Device AER Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 Bus; - UINT16 Device; - UINT16 Function; - UINT16 DeviceControl; - UINT8 Reserved1[2]; - UINT32 UncorrectableErrorMask; - UINT32 UncorrectableErrorSeverity; - UINT32 CorrectableErrorMask; - UINT32 AdvancedErrorCapabilitiesAndControl; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 Bus; + UINT16 Device; + UINT16 Function; + UINT16 DeviceControl; + UINT8 Reserved1[2]; + UINT32 UncorrectableErrorMask; + UINT32 UncorrectableErrorSeverity; + UINT32 CorrectableErrorMask; + UINT32 AdvancedErrorCapabilitiesAndControl; } EFI_ACPI_6_0_PCI_EXPRESS_DEVICE_AER_STRUCTURE; /// /// PCI Express Bridge AER Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 Bus; - UINT16 Device; - UINT16 Function; - UINT16 DeviceControl; - UINT8 Reserved1[2]; - UINT32 UncorrectableErrorMask; - UINT32 UncorrectableErrorSeverity; - UINT32 CorrectableErrorMask; - UINT32 AdvancedErrorCapabilitiesAndControl; - UINT32 SecondaryUncorrectableErrorMask; - UINT32 SecondaryUncorrectableErrorSeverity; - UINT32 SecondaryAdvancedErrorCapabilitiesAndControl; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 Bus; + UINT16 Device; + UINT16 Function; + UINT16 DeviceControl; + UINT8 Reserved1[2]; + UINT32 UncorrectableErrorMask; + UINT32 UncorrectableErrorSeverity; + UINT32 CorrectableErrorMask; + UINT32 AdvancedErrorCapabilitiesAndControl; + UINT32 SecondaryUncorrectableErrorMask; + UINT32 SecondaryUncorrectableErrorSeverity; + UINT32 SecondaryAdvancedErrorCapabilitiesAndControl; } EFI_ACPI_6_0_PCI_EXPRESS_BRIDGE_AER_STRUCTURE; /// /// Generic Hardware Error Source Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT16 RelatedSourceId; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 MaxRawDataLength; - EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress; - EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; - UINT32 ErrorStatusBlockLength; + UINT16 Type; + UINT16 SourceId; + UINT16 RelatedSourceId; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 MaxRawDataLength; + EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress; + EFI_ACPI_6_0_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; + UINT32 ErrorStatusBlockLength; } EFI_ACPI_6_0_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE; /// /// Generic Error Status Definition /// typedef struct { - EFI_ACPI_6_0_ERROR_BLOCK_STATUS BlockStatus; - UINT32 RawDataOffset; - UINT32 RawDataLength; - UINT32 DataLength; - UINT32 ErrorSeverity; + EFI_ACPI_6_0_ERROR_BLOCK_STATUS BlockStatus; + UINT32 RawDataOffset; + UINT32 RawDataLength; + UINT32 DataLength; + UINT32 ErrorSeverity; } EFI_ACPI_6_0_GENERIC_ERROR_STATUS_STRUCTURE; /// /// ERST - Error Record Serialization Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 SerializationHeaderSize; - UINT8 Reserved0[4]; - UINT32 InstructionEntryCount; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 SerializationHeaderSize; + UINT8 Reserved0[4]; + UINT32 InstructionEntryCount; } EFI_ACPI_6_0_ERROR_RECORD_SERIALIZATION_TABLE_HEADER; /// /// ERST Version (as defined in ACPI 6.0 spec.) /// -#define EFI_ACPI_6_0_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01 +#define EFI_ACPI_6_0_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01 /// /// ERST Serialization Actions /// -#define EFI_ACPI_6_0_ERST_BEGIN_WRITE_OPERATION 0x00 -#define EFI_ACPI_6_0_ERST_BEGIN_READ_OPERATION 0x01 -#define EFI_ACPI_6_0_ERST_BEGIN_CLEAR_OPERATION 0x02 -#define EFI_ACPI_6_0_ERST_END_OPERATION 0x03 -#define EFI_ACPI_6_0_ERST_SET_RECORD_OFFSET 0x04 -#define EFI_ACPI_6_0_ERST_EXECUTE_OPERATION 0x05 -#define EFI_ACPI_6_0_ERST_CHECK_BUSY_STATUS 0x06 -#define EFI_ACPI_6_0_ERST_GET_COMMAND_STATUS 0x07 -#define EFI_ACPI_6_0_ERST_GET_RECORD_IDENTIFIER 0x08 -#define EFI_ACPI_6_0_ERST_SET_RECORD_IDENTIFIER 0x09 -#define EFI_ACPI_6_0_ERST_GET_RECORD_COUNT 0x0A -#define EFI_ACPI_6_0_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B -#define EFI_ACPI_6_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D -#define EFI_ACPI_6_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E -#define EFI_ACPI_6_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F +#define EFI_ACPI_6_0_ERST_BEGIN_WRITE_OPERATION 0x00 +#define EFI_ACPI_6_0_ERST_BEGIN_READ_OPERATION 0x01 +#define EFI_ACPI_6_0_ERST_BEGIN_CLEAR_OPERATION 0x02 +#define EFI_ACPI_6_0_ERST_END_OPERATION 0x03 +#define EFI_ACPI_6_0_ERST_SET_RECORD_OFFSET 0x04 +#define EFI_ACPI_6_0_ERST_EXECUTE_OPERATION 0x05 +#define EFI_ACPI_6_0_ERST_CHECK_BUSY_STATUS 0x06 +#define EFI_ACPI_6_0_ERST_GET_COMMAND_STATUS 0x07 +#define EFI_ACPI_6_0_ERST_GET_RECORD_IDENTIFIER 0x08 +#define EFI_ACPI_6_0_ERST_SET_RECORD_IDENTIFIER 0x09 +#define EFI_ACPI_6_0_ERST_GET_RECORD_COUNT 0x0A +#define EFI_ACPI_6_0_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B +#define EFI_ACPI_6_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D +#define EFI_ACPI_6_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E +#define EFI_ACPI_6_0_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F /// /// ERST Action Command Status /// -#define EFI_ACPI_6_0_ERST_STATUS_SUCCESS 0x00 -#define EFI_ACPI_6_0_ERST_STATUS_NOT_ENOUGH_SPACE 0x01 -#define EFI_ACPI_6_0_ERST_STATUS_HARDWARE_NOT_AVAILABLE 0x02 -#define EFI_ACPI_6_0_ERST_STATUS_FAILED 0x03 -#define EFI_ACPI_6_0_ERST_STATUS_RECORD_STORE_EMPTY 0x04 -#define EFI_ACPI_6_0_ERST_STATUS_RECORD_NOT_FOUND 0x05 +#define EFI_ACPI_6_0_ERST_STATUS_SUCCESS 0x00 +#define EFI_ACPI_6_0_ERST_STATUS_NOT_ENOUGH_SPACE 0x01 +#define EFI_ACPI_6_0_ERST_STATUS_HARDWARE_NOT_AVAILABLE 0x02 +#define EFI_ACPI_6_0_ERST_STATUS_FAILED 0x03 +#define EFI_ACPI_6_0_ERST_STATUS_RECORD_STORE_EMPTY 0x04 +#define EFI_ACPI_6_0_ERST_STATUS_RECORD_NOT_FOUND 0x05 /// /// ERST Serialization Instructions /// -#define EFI_ACPI_6_0_ERST_READ_REGISTER 0x00 -#define EFI_ACPI_6_0_ERST_READ_REGISTER_VALUE 0x01 -#define EFI_ACPI_6_0_ERST_WRITE_REGISTER 0x02 -#define EFI_ACPI_6_0_ERST_WRITE_REGISTER_VALUE 0x03 -#define EFI_ACPI_6_0_ERST_NOOP 0x04 -#define EFI_ACPI_6_0_ERST_LOAD_VAR1 0x05 -#define EFI_ACPI_6_0_ERST_LOAD_VAR2 0x06 -#define EFI_ACPI_6_0_ERST_STORE_VAR1 0x07 -#define EFI_ACPI_6_0_ERST_ADD 0x08 -#define EFI_ACPI_6_0_ERST_SUBTRACT 0x09 -#define EFI_ACPI_6_0_ERST_ADD_VALUE 0x0A -#define EFI_ACPI_6_0_ERST_SUBTRACT_VALUE 0x0B -#define EFI_ACPI_6_0_ERST_STALL 0x0C -#define EFI_ACPI_6_0_ERST_STALL_WHILE_TRUE 0x0D -#define EFI_ACPI_6_0_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E -#define EFI_ACPI_6_0_ERST_GOTO 0x0F -#define EFI_ACPI_6_0_ERST_SET_SRC_ADDRESS_BASE 0x10 -#define EFI_ACPI_6_0_ERST_SET_DST_ADDRESS_BASE 0x11 -#define EFI_ACPI_6_0_ERST_MOVE_DATA 0x12 +#define EFI_ACPI_6_0_ERST_READ_REGISTER 0x00 +#define EFI_ACPI_6_0_ERST_READ_REGISTER_VALUE 0x01 +#define EFI_ACPI_6_0_ERST_WRITE_REGISTER 0x02 +#define EFI_ACPI_6_0_ERST_WRITE_REGISTER_VALUE 0x03 +#define EFI_ACPI_6_0_ERST_NOOP 0x04 +#define EFI_ACPI_6_0_ERST_LOAD_VAR1 0x05 +#define EFI_ACPI_6_0_ERST_LOAD_VAR2 0x06 +#define EFI_ACPI_6_0_ERST_STORE_VAR1 0x07 +#define EFI_ACPI_6_0_ERST_ADD 0x08 +#define EFI_ACPI_6_0_ERST_SUBTRACT 0x09 +#define EFI_ACPI_6_0_ERST_ADD_VALUE 0x0A +#define EFI_ACPI_6_0_ERST_SUBTRACT_VALUE 0x0B +#define EFI_ACPI_6_0_ERST_STALL 0x0C +#define EFI_ACPI_6_0_ERST_STALL_WHILE_TRUE 0x0D +#define EFI_ACPI_6_0_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E +#define EFI_ACPI_6_0_ERST_GOTO 0x0F +#define EFI_ACPI_6_0_ERST_SET_SRC_ADDRESS_BASE 0x10 +#define EFI_ACPI_6_0_ERST_SET_DST_ADDRESS_BASE 0x11 +#define EFI_ACPI_6_0_ERST_MOVE_DATA 0x12 /// /// ERST Instruction Flags /// -#define EFI_ACPI_6_0_ERST_PRESERVE_REGISTER 0x01 +#define EFI_ACPI_6_0_ERST_PRESERVE_REGISTER 0x01 /// /// ERST Serialization Instruction Entry /// typedef struct { - UINT8 SerializationAction; - UINT8 Instruction; - UINT8 Flags; - UINT8 Reserved0; - EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion; - UINT64 Value; - UINT64 Mask; + UINT8 SerializationAction; + UINT8 Instruction; + UINT8 Flags; + UINT8 Reserved0; + EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion; + UINT64 Value; + UINT64 Mask; } EFI_ACPI_6_0_ERST_SERIALIZATION_INSTRUCTION_ENTRY; /// /// EINJ - Error Injection Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 InjectionHeaderSize; - UINT8 InjectionFlags; - UINT8 Reserved0[3]; - UINT32 InjectionEntryCount; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 InjectionHeaderSize; + UINT8 InjectionFlags; + UINT8 Reserved0[3]; + UINT32 InjectionEntryCount; } EFI_ACPI_6_0_ERROR_INJECTION_TABLE_HEADER; /// /// EINJ Version (as defined in ACPI 6.0 spec.) /// -#define EFI_ACPI_6_0_ERROR_INJECTION_TABLE_REVISION 0x01 +#define EFI_ACPI_6_0_ERROR_INJECTION_TABLE_REVISION 0x01 /// /// EINJ Error Injection Actions /// -#define EFI_ACPI_6_0_EINJ_BEGIN_INJECTION_OPERATION 0x00 -#define EFI_ACPI_6_0_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01 -#define EFI_ACPI_6_0_EINJ_SET_ERROR_TYPE 0x02 -#define EFI_ACPI_6_0_EINJ_GET_ERROR_TYPE 0x03 -#define EFI_ACPI_6_0_EINJ_END_OPERATION 0x04 -#define EFI_ACPI_6_0_EINJ_EXECUTE_OPERATION 0x05 -#define EFI_ACPI_6_0_EINJ_CHECK_BUSY_STATUS 0x06 -#define EFI_ACPI_6_0_EINJ_GET_COMMAND_STATUS 0x07 -#define EFI_ACPI_6_0_EINJ_TRIGGER_ERROR 0xFF +#define EFI_ACPI_6_0_EINJ_BEGIN_INJECTION_OPERATION 0x00 +#define EFI_ACPI_6_0_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01 +#define EFI_ACPI_6_0_EINJ_SET_ERROR_TYPE 0x02 +#define EFI_ACPI_6_0_EINJ_GET_ERROR_TYPE 0x03 +#define EFI_ACPI_6_0_EINJ_END_OPERATION 0x04 +#define EFI_ACPI_6_0_EINJ_EXECUTE_OPERATION 0x05 +#define EFI_ACPI_6_0_EINJ_CHECK_BUSY_STATUS 0x06 +#define EFI_ACPI_6_0_EINJ_GET_COMMAND_STATUS 0x07 +#define EFI_ACPI_6_0_EINJ_TRIGGER_ERROR 0xFF /// /// EINJ Action Command Status /// -#define EFI_ACPI_6_0_EINJ_STATUS_SUCCESS 0x00 -#define EFI_ACPI_6_0_EINJ_STATUS_UNKNOWN_FAILURE 0x01 -#define EFI_ACPI_6_0_EINJ_STATUS_INVALID_ACCESS 0x02 +#define EFI_ACPI_6_0_EINJ_STATUS_SUCCESS 0x00 +#define EFI_ACPI_6_0_EINJ_STATUS_UNKNOWN_FAILURE 0x01 +#define EFI_ACPI_6_0_EINJ_STATUS_INVALID_ACCESS 0x02 /// /// EINJ Error Type Definition /// -#define EFI_ACPI_6_0_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0) -#define EFI_ACPI_6_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1) -#define EFI_ACPI_6_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2) -#define EFI_ACPI_6_0_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3) -#define EFI_ACPI_6_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4) -#define EFI_ACPI_6_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5) -#define EFI_ACPI_6_0_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6) -#define EFI_ACPI_6_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7) -#define EFI_ACPI_6_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8) -#define EFI_ACPI_6_0_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9) -#define EFI_ACPI_6_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10) -#define EFI_ACPI_6_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11) +#define EFI_ACPI_6_0_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0) +#define EFI_ACPI_6_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1) +#define EFI_ACPI_6_0_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2) +#define EFI_ACPI_6_0_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3) +#define EFI_ACPI_6_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4) +#define EFI_ACPI_6_0_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5) +#define EFI_ACPI_6_0_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6) +#define EFI_ACPI_6_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7) +#define EFI_ACPI_6_0_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8) +#define EFI_ACPI_6_0_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9) +#define EFI_ACPI_6_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10) +#define EFI_ACPI_6_0_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11) /// /// EINJ Injection Instructions /// -#define EFI_ACPI_6_0_EINJ_READ_REGISTER 0x00 -#define EFI_ACPI_6_0_EINJ_READ_REGISTER_VALUE 0x01 -#define EFI_ACPI_6_0_EINJ_WRITE_REGISTER 0x02 -#define EFI_ACPI_6_0_EINJ_WRITE_REGISTER_VALUE 0x03 -#define EFI_ACPI_6_0_EINJ_NOOP 0x04 +#define EFI_ACPI_6_0_EINJ_READ_REGISTER 0x00 +#define EFI_ACPI_6_0_EINJ_READ_REGISTER_VALUE 0x01 +#define EFI_ACPI_6_0_EINJ_WRITE_REGISTER 0x02 +#define EFI_ACPI_6_0_EINJ_WRITE_REGISTER_VALUE 0x03 +#define EFI_ACPI_6_0_EINJ_NOOP 0x04 /// /// EINJ Instruction Flags /// -#define EFI_ACPI_6_0_EINJ_PRESERVE_REGISTER 0x01 +#define EFI_ACPI_6_0_EINJ_PRESERVE_REGISTER 0x01 /// /// EINJ Injection Instruction Entry /// typedef struct { - UINT8 InjectionAction; - UINT8 Instruction; - UINT8 Flags; - UINT8 Reserved0; - EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion; - UINT64 Value; - UINT64 Mask; + UINT8 InjectionAction; + UINT8 Instruction; + UINT8 Flags; + UINT8 Reserved0; + EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion; + UINT64 Value; + UINT64 Mask; } EFI_ACPI_6_0_EINJ_INJECTION_INSTRUCTION_ENTRY; /// /// EINJ Trigger Action Table /// typedef struct { - UINT32 HeaderSize; - UINT32 Revision; - UINT32 TableSize; - UINT32 EntryCount; + UINT32 HeaderSize; + UINT32 Revision; + UINT32 TableSize; + UINT32 EntryCount; } EFI_ACPI_6_0_EINJ_TRIGGER_ACTION_TABLE; /// /// Platform Communications Channel Table (PCCT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 Flags; - UINT64 Reserved; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 Flags; + UINT64 Reserved; } EFI_ACPI_6_0_PLATFORM_COMMUNICATION_CHANNEL_TABLE_HEADER; /// /// PCCT Version (as defined in ACPI 6.0 spec.) /// -#define EFI_ACPI_6_0_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION 0x01 +#define EFI_ACPI_6_0_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION 0x01 /// /// PCCT Global Flags /// -#define EFI_ACPI_6_0_PCCT_FLAGS_SCI_DOORBELL BIT0 +#define EFI_ACPI_6_0_PCCT_FLAGS_SCI_DOORBELL BIT0 // // PCCT Subspace type // -#define EFI_ACPI_6_0_PCCT_SUBSPACE_TYPE_GENERIC 0x00 -#define EFI_ACPI_6_0_PCCT_SUBSPACE_TYPE_1_HW_REDUCED_COMMUNICATIONS 0x01 -#define EFI_ACPI_6_0_PCCT_SUBSPACE_TYPE_2_HW_REDUCED_COMMUNICATIONS 0x02 +#define EFI_ACPI_6_0_PCCT_SUBSPACE_TYPE_GENERIC 0x00 +#define EFI_ACPI_6_0_PCCT_SUBSPACE_TYPE_1_HW_REDUCED_COMMUNICATIONS 0x01 +#define EFI_ACPI_6_0_PCCT_SUBSPACE_TYPE_2_HW_REDUCED_COMMUNICATIONS 0x02 /// /// PCC Subspace Structure Header /// typedef struct { - UINT8 Type; - UINT8 Length; + UINT8 Type; + UINT8 Length; } EFI_ACPI_6_0_PCCT_SUBSPACE_HEADER; /// /// Generic Communications Subspace Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[6]; - UINT64 BaseAddress; - UINT64 AddressLength; - EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; - UINT64 DoorbellPreserve; - UINT64 DoorbellWrite; - UINT32 NominalLatency; - UINT32 MaximumPeriodicAccessRate; - UINT16 MinimumRequestTurnaroundTime; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[6]; + UINT64 BaseAddress; + UINT64 AddressLength; + EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; + UINT64 DoorbellPreserve; + UINT64 DoorbellWrite; + UINT32 NominalLatency; + UINT32 MaximumPeriodicAccessRate; + UINT16 MinimumRequestTurnaroundTime; } EFI_ACPI_6_0_PCCT_SUBSPACE_GENERIC; /// @@ -2049,18 +2049,18 @@ typedef struct { /// typedef struct { - UINT8 Command; - UINT8 Reserved:7; - UINT8 GenerateSci:1; + UINT8 Command; + UINT8 Reserved : 7; + UINT8 GenerateSci : 1; } EFI_ACPI_6_0_PCCT_GENERIC_SHARED_MEMORY_REGION_COMMAND; typedef struct { - UINT8 CommandComplete:1; - UINT8 SciDoorbell:1; - UINT8 Error:1; - UINT8 PlatformNotification:1; - UINT8 Reserved:4; - UINT8 Reserved1; + UINT8 CommandComplete : 1; + UINT8 SciDoorbell : 1; + UINT8 Error : 1; + UINT8 PlatformNotification : 1; + UINT8 Reserved : 4; + UINT8 Reserved1; } EFI_ACPI_6_0_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS; typedef struct { @@ -2069,48 +2069,48 @@ typedef struct { EFI_ACPI_6_0_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS Status; } EFI_ACPI_6_0_PCCT_GENERIC_SHARED_MEMORY_REGION_HEADER; -#define EFI_ACPI_6_0_PCCT_SUBSPACE_DOORBELL_INTERRUPT_FLAGS_POLARITY BIT0 -#define EFI_ACPI_6_0_PCCT_SUBSPACE_DOORBELL_INTERRUPT_FLAGS_MODE BIT1 +#define EFI_ACPI_6_0_PCCT_SUBSPACE_DOORBELL_INTERRUPT_FLAGS_POLARITY BIT0 +#define EFI_ACPI_6_0_PCCT_SUBSPACE_DOORBELL_INTERRUPT_FLAGS_MODE BIT1 /// /// Type 1 HW-Reduced Communications Subspace Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 DoorbellInterrupt; - UINT8 DoorbellInterruptFlags; - UINT8 Reserved; - UINT64 BaseAddress; - UINT64 AddressLength; - EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; - UINT64 DoorbellPreserve; - UINT64 DoorbellWrite; - UINT32 NominalLatency; - UINT32 MaximumPeriodicAccessRate; - UINT16 MinimumRequestTurnaroundTime; + UINT8 Type; + UINT8 Length; + UINT32 DoorbellInterrupt; + UINT8 DoorbellInterruptFlags; + UINT8 Reserved; + UINT64 BaseAddress; + UINT64 AddressLength; + EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; + UINT64 DoorbellPreserve; + UINT64 DoorbellWrite; + UINT32 NominalLatency; + UINT32 MaximumPeriodicAccessRate; + UINT16 MinimumRequestTurnaroundTime; } EFI_ACPI_6_0_PCCT_SUBSPACE_1_HW_REDUCED_COMMUNICATIONS; /// /// Type 2 HW-Reduced Communications Subspace Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 DoorbellInterrupt; - UINT8 DoorbellInterruptFlags; - UINT8 Reserved; - UINT64 BaseAddress; - UINT64 AddressLength; - EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; - UINT64 DoorbellPreserve; - UINT64 DoorbellWrite; - UINT32 NominalLatency; - UINT32 MaximumPeriodicAccessRate; - UINT16 MinimumRequestTurnaroundTime; - EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE DoorbellAckRegister; - UINT64 DoorbellAckPreserve; - UINT64 DoorbellAckWrite; + UINT8 Type; + UINT8 Length; + UINT32 DoorbellInterrupt; + UINT8 DoorbellInterruptFlags; + UINT8 Reserved; + UINT64 BaseAddress; + UINT64 AddressLength; + EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; + UINT64 DoorbellPreserve; + UINT64 DoorbellWrite; + UINT32 NominalLatency; + UINT32 MaximumPeriodicAccessRate; + UINT16 MinimumRequestTurnaroundTime; + EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE DoorbellAckRegister; + UINT64 DoorbellAckPreserve; + UINT64 DoorbellAckWrite; } EFI_ACPI_6_0_PCCT_SUBSPACE_2_HW_REDUCED_COMMUNICATIONS; // diff --git a/MdePkg/Include/IndustryStandard/Acpi61.h b/MdePkg/Include/IndustryStandard/Acpi61.h index 7a77602..5ab31e7 100644 --- a/MdePkg/Include/IndustryStandard/Acpi61.h +++ b/MdePkg/Include/IndustryStandard/Acpi61.h @@ -21,21 +21,21 @@ /// ACPI 6.1 Generic Address Space definition /// typedef struct { - UINT8 AddressSpaceId; - UINT8 RegisterBitWidth; - UINT8 RegisterBitOffset; - UINT8 AccessSize; - UINT64 Address; + UINT8 AddressSpaceId; + UINT8 RegisterBitWidth; + UINT8 RegisterBitOffset; + UINT8 AccessSize; + UINT64 Address; } EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE; // // Generic Address Space Address IDs // -#define EFI_ACPI_6_1_SYSTEM_MEMORY 0 -#define EFI_ACPI_6_1_SYSTEM_IO 1 -#define EFI_ACPI_6_1_PCI_CONFIGURATION_SPACE 2 -#define EFI_ACPI_6_1_EMBEDDED_CONTROLLER 3 -#define EFI_ACPI_6_1_SMBUS 4 +#define EFI_ACPI_6_1_SYSTEM_MEMORY 0 +#define EFI_ACPI_6_1_SYSTEM_IO 1 +#define EFI_ACPI_6_1_PCI_CONFIGURATION_SPACE 2 +#define EFI_ACPI_6_1_EMBEDDED_CONTROLLER 3 +#define EFI_ACPI_6_1_SMBUS 4 #define EFI_ACPI_6_1_PLATFORM_COMMUNICATION_CHANNEL 0x0A #define EFI_ACPI_6_1_FUNCTIONAL_FIXED_HARDWARE 0x7F @@ -56,29 +56,29 @@ typedef struct { /// Root System Description Pointer Structure /// typedef struct { - UINT64 Signature; - UINT8 Checksum; - UINT8 OemId[6]; - UINT8 Revision; - UINT32 RsdtAddress; - UINT32 Length; - UINT64 XsdtAddress; - UINT8 ExtendedChecksum; - UINT8 Reserved[3]; + UINT64 Signature; + UINT8 Checksum; + UINT8 OemId[6]; + UINT8 Revision; + UINT32 RsdtAddress; + UINT32 Length; + UINT64 XsdtAddress; + UINT8 ExtendedChecksum; + UINT8 Reserved[3]; } EFI_ACPI_6_1_ROOT_SYSTEM_DESCRIPTION_POINTER; /// /// RSD_PTR Revision (as defined in ACPI 6.1 spec.) /// -#define EFI_ACPI_6_1_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 6.1) says current value is 2 +#define EFI_ACPI_6_1_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 6.1) says current value is 2 /// /// Common table header, this prefaces all ACPI tables, including FACS, but /// excluding the RSD PTR structure /// typedef struct { - UINT32 Signature; - UINT32 Length; + UINT32 Signature; + UINT32 Length; } EFI_ACPI_6_1_COMMON_HEADER; // @@ -90,7 +90,7 @@ typedef struct { /// /// RSDT Revision (as defined in ACPI 6.1 spec.) /// -#define EFI_ACPI_6_1_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_6_1_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 // // Extended System Description Table @@ -101,74 +101,74 @@ typedef struct { /// /// XSDT Revision (as defined in ACPI 6.1 spec.) /// -#define EFI_ACPI_6_1_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_6_1_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 /// /// Fixed ACPI Description Table Structure (FADT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 FirmwareCtrl; - UINT32 Dsdt; - UINT8 Reserved0; - UINT8 PreferredPmProfile; - UINT16 SciInt; - UINT32 SmiCmd; - UINT8 AcpiEnable; - UINT8 AcpiDisable; - UINT8 S4BiosReq; - UINT8 PstateCnt; - UINT32 Pm1aEvtBlk; - UINT32 Pm1bEvtBlk; - UINT32 Pm1aCntBlk; - UINT32 Pm1bCntBlk; - UINT32 Pm2CntBlk; - UINT32 PmTmrBlk; - UINT32 Gpe0Blk; - UINT32 Gpe1Blk; - UINT8 Pm1EvtLen; - UINT8 Pm1CntLen; - UINT8 Pm2CntLen; - UINT8 PmTmrLen; - UINT8 Gpe0BlkLen; - UINT8 Gpe1BlkLen; - UINT8 Gpe1Base; - UINT8 CstCnt; - UINT16 PLvl2Lat; - UINT16 PLvl3Lat; - UINT16 FlushSize; - UINT16 FlushStride; - UINT8 DutyOffset; - UINT8 DutyWidth; - UINT8 DayAlrm; - UINT8 MonAlrm; - UINT8 Century; - UINT16 IaPcBootArch; - UINT8 Reserved1; - UINT32 Flags; - EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE ResetReg; - UINT8 ResetValue; - UINT16 ArmBootArch; - UINT8 MinorVersion; - UINT64 XFirmwareCtrl; - UINT64 XDsdt; - EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk; - EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk; - EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk; - EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk; - EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk; - EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk; - EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE XGpe0Blk; - EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE XGpe1Blk; - EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE SleepControlReg; - EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE SleepStatusReg; - UINT64 HypervisorVendorIdentity; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 FirmwareCtrl; + UINT32 Dsdt; + UINT8 Reserved0; + UINT8 PreferredPmProfile; + UINT16 SciInt; + UINT32 SmiCmd; + UINT8 AcpiEnable; + UINT8 AcpiDisable; + UINT8 S4BiosReq; + UINT8 PstateCnt; + UINT32 Pm1aEvtBlk; + UINT32 Pm1bEvtBlk; + UINT32 Pm1aCntBlk; + UINT32 Pm1bCntBlk; + UINT32 Pm2CntBlk; + UINT32 PmTmrBlk; + UINT32 Gpe0Blk; + UINT32 Gpe1Blk; + UINT8 Pm1EvtLen; + UINT8 Pm1CntLen; + UINT8 Pm2CntLen; + UINT8 PmTmrLen; + UINT8 Gpe0BlkLen; + UINT8 Gpe1BlkLen; + UINT8 Gpe1Base; + UINT8 CstCnt; + UINT16 PLvl2Lat; + UINT16 PLvl3Lat; + UINT16 FlushSize; + UINT16 FlushStride; + UINT8 DutyOffset; + UINT8 DutyWidth; + UINT8 DayAlrm; + UINT8 MonAlrm; + UINT8 Century; + UINT16 IaPcBootArch; + UINT8 Reserved1; + UINT32 Flags; + EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE ResetReg; + UINT8 ResetValue; + UINT16 ArmBootArch; + UINT8 MinorVersion; + UINT64 XFirmwareCtrl; + UINT64 XDsdt; + EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk; + EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk; + EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk; + EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk; + EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk; + EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk; + EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE XGpe0Blk; + EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE XGpe1Blk; + EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE SleepControlReg; + EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE SleepStatusReg; + UINT64 HypervisorVendorIdentity; } EFI_ACPI_6_1_FIXED_ACPI_DESCRIPTION_TABLE; /// /// FADT Version (as defined in ACPI 6.1 spec.) /// -#define EFI_ACPI_6_1_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x06 +#define EFI_ACPI_6_1_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x06 #define EFI_ACPI_6_1_FIXED_ACPI_DESCRIPTION_TABLE_MINOR_REVISION 0x01 // @@ -188,62 +188,62 @@ typedef struct { // Fixed ACPI Description Table Boot Architecture Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_6_1_LEGACY_DEVICES BIT0 -#define EFI_ACPI_6_1_8042 BIT1 -#define EFI_ACPI_6_1_VGA_NOT_PRESENT BIT2 -#define EFI_ACPI_6_1_MSI_NOT_SUPPORTED BIT3 -#define EFI_ACPI_6_1_PCIE_ASPM_CONTROLS BIT4 -#define EFI_ACPI_6_1_CMOS_RTC_NOT_PRESENT BIT5 +#define EFI_ACPI_6_1_LEGACY_DEVICES BIT0 +#define EFI_ACPI_6_1_8042 BIT1 +#define EFI_ACPI_6_1_VGA_NOT_PRESENT BIT2 +#define EFI_ACPI_6_1_MSI_NOT_SUPPORTED BIT3 +#define EFI_ACPI_6_1_PCIE_ASPM_CONTROLS BIT4 +#define EFI_ACPI_6_1_CMOS_RTC_NOT_PRESENT BIT5 // // Fixed ACPI Description Table Arm Boot Architecture Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_6_1_ARM_PSCI_COMPLIANT BIT0 -#define EFI_ACPI_6_1_ARM_PSCI_USE_HVC BIT1 +#define EFI_ACPI_6_1_ARM_PSCI_COMPLIANT BIT0 +#define EFI_ACPI_6_1_ARM_PSCI_USE_HVC BIT1 // // Fixed ACPI Description Table Fixed Feature Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_6_1_WBINVD BIT0 -#define EFI_ACPI_6_1_WBINVD_FLUSH BIT1 -#define EFI_ACPI_6_1_PROC_C1 BIT2 -#define EFI_ACPI_6_1_P_LVL2_UP BIT3 -#define EFI_ACPI_6_1_PWR_BUTTON BIT4 -#define EFI_ACPI_6_1_SLP_BUTTON BIT5 -#define EFI_ACPI_6_1_FIX_RTC BIT6 -#define EFI_ACPI_6_1_RTC_S4 BIT7 -#define EFI_ACPI_6_1_TMR_VAL_EXT BIT8 -#define EFI_ACPI_6_1_DCK_CAP BIT9 -#define EFI_ACPI_6_1_RESET_REG_SUP BIT10 -#define EFI_ACPI_6_1_SEALED_CASE BIT11 -#define EFI_ACPI_6_1_HEADLESS BIT12 -#define EFI_ACPI_6_1_CPU_SW_SLP BIT13 -#define EFI_ACPI_6_1_PCI_EXP_WAK BIT14 -#define EFI_ACPI_6_1_USE_PLATFORM_CLOCK BIT15 -#define EFI_ACPI_6_1_S4_RTC_STS_VALID BIT16 -#define EFI_ACPI_6_1_REMOTE_POWER_ON_CAPABLE BIT17 -#define EFI_ACPI_6_1_FORCE_APIC_CLUSTER_MODEL BIT18 -#define EFI_ACPI_6_1_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19 -#define EFI_ACPI_6_1_HW_REDUCED_ACPI BIT20 -#define EFI_ACPI_6_1_LOW_POWER_S0_IDLE_CAPABLE BIT21 +#define EFI_ACPI_6_1_WBINVD BIT0 +#define EFI_ACPI_6_1_WBINVD_FLUSH BIT1 +#define EFI_ACPI_6_1_PROC_C1 BIT2 +#define EFI_ACPI_6_1_P_LVL2_UP BIT3 +#define EFI_ACPI_6_1_PWR_BUTTON BIT4 +#define EFI_ACPI_6_1_SLP_BUTTON BIT5 +#define EFI_ACPI_6_1_FIX_RTC BIT6 +#define EFI_ACPI_6_1_RTC_S4 BIT7 +#define EFI_ACPI_6_1_TMR_VAL_EXT BIT8 +#define EFI_ACPI_6_1_DCK_CAP BIT9 +#define EFI_ACPI_6_1_RESET_REG_SUP BIT10 +#define EFI_ACPI_6_1_SEALED_CASE BIT11 +#define EFI_ACPI_6_1_HEADLESS BIT12 +#define EFI_ACPI_6_1_CPU_SW_SLP BIT13 +#define EFI_ACPI_6_1_PCI_EXP_WAK BIT14 +#define EFI_ACPI_6_1_USE_PLATFORM_CLOCK BIT15 +#define EFI_ACPI_6_1_S4_RTC_STS_VALID BIT16 +#define EFI_ACPI_6_1_REMOTE_POWER_ON_CAPABLE BIT17 +#define EFI_ACPI_6_1_FORCE_APIC_CLUSTER_MODEL BIT18 +#define EFI_ACPI_6_1_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19 +#define EFI_ACPI_6_1_HW_REDUCED_ACPI BIT20 +#define EFI_ACPI_6_1_LOW_POWER_S0_IDLE_CAPABLE BIT21 /// /// Firmware ACPI Control Structure /// typedef struct { - UINT32 Signature; - UINT32 Length; - UINT32 HardwareSignature; - UINT32 FirmwareWakingVector; - UINT32 GlobalLock; - UINT32 Flags; - UINT64 XFirmwareWakingVector; - UINT8 Version; - UINT8 Reserved0[3]; - UINT32 OspmFlags; - UINT8 Reserved1[24]; + UINT32 Signature; + UINT32 Length; + UINT32 HardwareSignature; + UINT32 FirmwareWakingVector; + UINT32 GlobalLock; + UINT32 Flags; + UINT64 XFirmwareWakingVector; + UINT8 Version; + UINT8 Reserved0[3]; + UINT32 OspmFlags; + UINT8 Reserved1[24]; } EFI_ACPI_6_1_FIRMWARE_ACPI_CONTROL_STRUCTURE; /// @@ -255,14 +255,14 @@ typedef struct { /// Firmware Control Structure Feature Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_6_1_S4BIOS_F BIT0 -#define EFI_ACPI_6_1_64BIT_WAKE_SUPPORTED_F BIT1 +#define EFI_ACPI_6_1_S4BIOS_F BIT0 +#define EFI_ACPI_6_1_64BIT_WAKE_SUPPORTED_F BIT1 /// /// OSPM Enabled Firmware Control Structure Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_6_1_OSPM_64BIT_WAKE_F BIT0 +#define EFI_ACPI_6_1_OSPM_64BIT_WAKE_F BIT0 // // Differentiated System Description Table, @@ -271,29 +271,29 @@ typedef struct { // no definition needed as they are common description table header, the same with // EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block. // -#define EFI_ACPI_6_1_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 -#define EFI_ACPI_6_1_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 +#define EFI_ACPI_6_1_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 +#define EFI_ACPI_6_1_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 /// /// Multiple APIC Description Table header definition. The rest of the table /// must be defined in a platform specific manner. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 LocalApicAddress; - UINT32 Flags; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 LocalApicAddress; + UINT32 Flags; } EFI_ACPI_6_1_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER; /// /// MADT Revision (as defined in ACPI 6.1 spec.) /// -#define EFI_ACPI_6_1_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x04 +#define EFI_ACPI_6_1_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x04 /// /// Multiple APIC Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_6_1_PCAT_COMPAT BIT0 +#define EFI_ACPI_6_1_PCAT_COMPAT BIT0 // // Multiple APIC Description Table APIC structure types @@ -325,57 +325,57 @@ typedef struct { /// Processor Local APIC Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorUid; - UINT8 ApicId; - UINT32 Flags; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorUid; + UINT8 ApicId; + UINT32 Flags; } EFI_ACPI_6_1_PROCESSOR_LOCAL_APIC_STRUCTURE; /// /// Local APIC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_1_LOCAL_APIC_ENABLED BIT0 +#define EFI_ACPI_6_1_LOCAL_APIC_ENABLED BIT0 /// /// IO APIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 IoApicId; - UINT8 Reserved; - UINT32 IoApicAddress; - UINT32 GlobalSystemInterruptBase; + UINT8 Type; + UINT8 Length; + UINT8 IoApicId; + UINT8 Reserved; + UINT32 IoApicAddress; + UINT32 GlobalSystemInterruptBase; } EFI_ACPI_6_1_IO_APIC_STRUCTURE; /// /// Interrupt Source Override Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Bus; - UINT8 Source; - UINT32 GlobalSystemInterrupt; - UINT16 Flags; + UINT8 Type; + UINT8 Length; + UINT8 Bus; + UINT8 Source; + UINT32 GlobalSystemInterrupt; + UINT16 Flags; } EFI_ACPI_6_1_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE; /// /// Platform Interrupt Sources Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT8 InterruptType; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT8 IoSapicVector; - UINT32 GlobalSystemInterrupt; - UINT32 PlatformInterruptSourceFlags; - UINT8 CpeiProcessorOverride; - UINT8 Reserved[31]; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT8 InterruptType; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT8 IoSapicVector; + UINT32 GlobalSystemInterrupt; + UINT32 PlatformInterruptSourceFlags; + UINT8 CpeiProcessorOverride; + UINT8 Reserved[31]; } EFI_ACPI_6_1_PLATFORM_INTERRUPT_APIC_STRUCTURE; // @@ -389,43 +389,43 @@ typedef struct { /// Non-Maskable Interrupt Source Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT32 GlobalSystemInterrupt; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT32 GlobalSystemInterrupt; } EFI_ACPI_6_1_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE; /// /// Local APIC NMI Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorUid; - UINT16 Flags; - UINT8 LocalApicLint; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorUid; + UINT16 Flags; + UINT8 LocalApicLint; } EFI_ACPI_6_1_LOCAL_APIC_NMI_STRUCTURE; /// /// Local APIC Address Override Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT64 LocalApicAddress; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT64 LocalApicAddress; } EFI_ACPI_6_1_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE; /// /// IO SAPIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 IoApicId; - UINT8 Reserved; - UINT32 GlobalSystemInterruptBase; - UINT64 IoSapicAddress; + UINT8 Type; + UINT8 Length; + UINT8 IoApicId; + UINT8 Reserved; + UINT32 GlobalSystemInterruptBase; + UINT64 IoSapicAddress; } EFI_ACPI_6_1_IO_SAPIC_STRUCTURE; /// @@ -433,169 +433,169 @@ typedef struct { /// This struct followed by a null-terminated ASCII string - ACPI Processor UID String /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorId; - UINT8 LocalSapicId; - UINT8 LocalSapicEid; - UINT8 Reserved[3]; - UINT32 Flags; - UINT32 ACPIProcessorUIDValue; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorId; + UINT8 LocalSapicId; + UINT8 LocalSapicEid; + UINT8 Reserved[3]; + UINT32 Flags; + UINT32 ACPIProcessorUIDValue; } EFI_ACPI_6_1_PROCESSOR_LOCAL_SAPIC_STRUCTURE; /// /// Platform Interrupt Sources Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT8 InterruptType; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT8 IoSapicVector; - UINT32 GlobalSystemInterrupt; - UINT32 PlatformInterruptSourceFlags; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT8 InterruptType; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT8 IoSapicVector; + UINT32 GlobalSystemInterrupt; + UINT32 PlatformInterruptSourceFlags; } EFI_ACPI_6_1_PLATFORM_INTERRUPT_SOURCES_STRUCTURE; /// /// Platform Interrupt Source Flags. /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_6_1_CPEI_PROCESSOR_OVERRIDE BIT0 +#define EFI_ACPI_6_1_CPEI_PROCESSOR_OVERRIDE BIT0 /// /// Processor Local x2APIC Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[2]; - UINT32 X2ApicId; - UINT32 Flags; - UINT32 AcpiProcessorUid; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[2]; + UINT32 X2ApicId; + UINT32 Flags; + UINT32 AcpiProcessorUid; } EFI_ACPI_6_1_PROCESSOR_LOCAL_X2APIC_STRUCTURE; /// /// Local x2APIC NMI Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT32 AcpiProcessorUid; - UINT8 LocalX2ApicLint; - UINT8 Reserved[3]; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT32 AcpiProcessorUid; + UINT8 LocalX2ApicLint; + UINT8 Reserved[3]; } EFI_ACPI_6_1_LOCAL_X2APIC_NMI_STRUCTURE; /// /// GIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT32 CPUInterfaceNumber; - UINT32 AcpiProcessorUid; - UINT32 Flags; - UINT32 ParkingProtocolVersion; - UINT32 PerformanceInterruptGsiv; - UINT64 ParkedAddress; - UINT64 PhysicalBaseAddress; - UINT64 GICV; - UINT64 GICH; - UINT32 VGICMaintenanceInterrupt; - UINT64 GICRBaseAddress; - UINT64 MPIDR; - UINT8 ProcessorPowerEfficiencyClass; - UINT8 Reserved2[3]; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT32 CPUInterfaceNumber; + UINT32 AcpiProcessorUid; + UINT32 Flags; + UINT32 ParkingProtocolVersion; + UINT32 PerformanceInterruptGsiv; + UINT64 ParkedAddress; + UINT64 PhysicalBaseAddress; + UINT64 GICV; + UINT64 GICH; + UINT32 VGICMaintenanceInterrupt; + UINT64 GICRBaseAddress; + UINT64 MPIDR; + UINT8 ProcessorPowerEfficiencyClass; + UINT8 Reserved2[3]; } EFI_ACPI_6_1_GIC_STRUCTURE; /// /// GIC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_1_GIC_ENABLED BIT0 -#define EFI_ACPI_6_1_PERFORMANCE_INTERRUPT_MODEL BIT1 -#define EFI_ACPI_6_1_VGIC_MAINTENANCE_INTERRUPT_MODE_FLAGS BIT2 +#define EFI_ACPI_6_1_GIC_ENABLED BIT0 +#define EFI_ACPI_6_1_PERFORMANCE_INTERRUPT_MODEL BIT1 +#define EFI_ACPI_6_1_VGIC_MAINTENANCE_INTERRUPT_MODE_FLAGS BIT2 /// /// GIC Distributor Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved1; - UINT32 GicId; - UINT64 PhysicalBaseAddress; - UINT32 SystemVectorBase; - UINT8 GicVersion; - UINT8 Reserved2[3]; + UINT8 Type; + UINT8 Length; + UINT16 Reserved1; + UINT32 GicId; + UINT64 PhysicalBaseAddress; + UINT32 SystemVectorBase; + UINT8 GicVersion; + UINT8 Reserved2[3]; } EFI_ACPI_6_1_GIC_DISTRIBUTOR_STRUCTURE; /// /// GIC Version /// -#define EFI_ACPI_6_1_GIC_V1 0x01 -#define EFI_ACPI_6_1_GIC_V2 0x02 -#define EFI_ACPI_6_1_GIC_V3 0x03 -#define EFI_ACPI_6_1_GIC_V4 0x04 +#define EFI_ACPI_6_1_GIC_V1 0x01 +#define EFI_ACPI_6_1_GIC_V2 0x02 +#define EFI_ACPI_6_1_GIC_V3 0x03 +#define EFI_ACPI_6_1_GIC_V4 0x04 /// /// GIC MSI Frame Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved1; - UINT32 GicMsiFrameId; - UINT64 PhysicalBaseAddress; - UINT32 Flags; - UINT16 SPICount; - UINT16 SPIBase; + UINT8 Type; + UINT8 Length; + UINT16 Reserved1; + UINT32 GicMsiFrameId; + UINT64 PhysicalBaseAddress; + UINT32 Flags; + UINT16 SPICount; + UINT16 SPIBase; } EFI_ACPI_6_1_GIC_MSI_FRAME_STRUCTURE; /// /// GIC MSI Frame Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_1_SPI_COUNT_BASE_SELECT BIT0 +#define EFI_ACPI_6_1_SPI_COUNT_BASE_SELECT BIT0 /// /// GICR Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT64 DiscoveryRangeBaseAddress; - UINT32 DiscoveryRangeLength; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT64 DiscoveryRangeBaseAddress; + UINT32 DiscoveryRangeLength; } EFI_ACPI_6_1_GICR_STRUCTURE; /// /// GIC Interrupt Translation Service Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT32 GicItsId; - UINT64 PhysicalBaseAddress; - UINT32 Reserved2; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT32 GicItsId; + UINT64 PhysicalBaseAddress; + UINT32 Reserved2; } EFI_ACPI_6_1_GIC_ITS_STRUCTURE; /// /// Smart Battery Description Table (SBST) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 WarningEnergyLevel; - UINT32 LowEnergyLevel; - UINT32 CriticalEnergyLevel; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 WarningEnergyLevel; + UINT32 LowEnergyLevel; + UINT32 CriticalEnergyLevel; } EFI_ACPI_6_1_SMART_BATTERY_DESCRIPTION_TABLE; /// /// SBST Version (as defined in ACPI 6.1 spec.) /// -#define EFI_ACPI_6_1_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_6_1_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01 /// /// Embedded Controller Boot Resources Table (ECDT) @@ -603,11 +603,11 @@ typedef struct { /// a fully qualified reference to the name space object. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE EcControl; - EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE EcData; - UINT32 Uid; - UINT8 GpeBit; + EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE EcControl; + EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE EcData; + UINT32 Uid; + UINT8 GpeBit; } EFI_ACPI_6_1_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE; /// @@ -620,9 +620,9 @@ typedef struct { /// must be defined in a platform specific manner. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 Reserved1; ///< Must be set to 1 - UINT64 Reserved2; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 Reserved1; ///< Must be set to 1 + UINT64 Reserved2; } EFI_ACPI_6_1_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER; /// @@ -644,83 +644,83 @@ typedef struct { /// Processor Local APIC/SAPIC Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 ProximityDomain7To0; - UINT8 ApicId; - UINT32 Flags; - UINT8 LocalSapicEid; - UINT8 ProximityDomain31To8[3]; - UINT32 ClockDomain; + UINT8 Type; + UINT8 Length; + UINT8 ProximityDomain7To0; + UINT8 ApicId; + UINT32 Flags; + UINT8 LocalSapicEid; + UINT8 ProximityDomain31To8[3]; + UINT32 ClockDomain; } EFI_ACPI_6_1_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE; /// /// Local APIC/SAPIC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_1_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0) +#define EFI_ACPI_6_1_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0) /// /// Memory Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 ProximityDomain; - UINT16 Reserved1; - UINT32 AddressBaseLow; - UINT32 AddressBaseHigh; - UINT32 LengthLow; - UINT32 LengthHigh; - UINT32 Reserved2; - UINT32 Flags; - UINT64 Reserved3; + UINT8 Type; + UINT8 Length; + UINT32 ProximityDomain; + UINT16 Reserved1; + UINT32 AddressBaseLow; + UINT32 AddressBaseHigh; + UINT32 LengthLow; + UINT32 LengthHigh; + UINT32 Reserved2; + UINT32 Flags; + UINT64 Reserved3; } EFI_ACPI_6_1_MEMORY_AFFINITY_STRUCTURE; // // Memory Flags. All other bits are reserved and must be 0. // -#define EFI_ACPI_6_1_MEMORY_ENABLED (1 << 0) -#define EFI_ACPI_6_1_MEMORY_HOT_PLUGGABLE (1 << 1) -#define EFI_ACPI_6_1_MEMORY_NONVOLATILE (1 << 2) +#define EFI_ACPI_6_1_MEMORY_ENABLED (1 << 0) +#define EFI_ACPI_6_1_MEMORY_HOT_PLUGGABLE (1 << 1) +#define EFI_ACPI_6_1_MEMORY_NONVOLATILE (1 << 2) /// /// Processor Local x2APIC Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved1[2]; - UINT32 ProximityDomain; - UINT32 X2ApicId; - UINT32 Flags; - UINT32 ClockDomain; - UINT8 Reserved2[4]; + UINT8 Type; + UINT8 Length; + UINT8 Reserved1[2]; + UINT32 ProximityDomain; + UINT32 X2ApicId; + UINT32 Flags; + UINT32 ClockDomain; + UINT8 Reserved2[4]; } EFI_ACPI_6_1_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE; /// /// GICC Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 ProximityDomain; - UINT32 AcpiProcessorUid; - UINT32 Flags; - UINT32 ClockDomain; + UINT8 Type; + UINT8 Length; + UINT32 ProximityDomain; + UINT32 AcpiProcessorUid; + UINT32 Flags; + UINT32 ClockDomain; } EFI_ACPI_6_1_GICC_AFFINITY_STRUCTURE; /// /// GICC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_1_GICC_ENABLED (1 << 0) +#define EFI_ACPI_6_1_GICC_ENABLED (1 << 0) /// /// System Locality Distance Information Table (SLIT). /// The rest of the table is a matrix. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT64 NumberOfSystemLocalities; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT64 NumberOfSystemLocalities; } EFI_ACPI_6_1_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER; /// @@ -732,14 +732,14 @@ typedef struct { /// Corrected Platform Error Polling Table (CPEP) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 Reserved[8]; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 Reserved[8]; } EFI_ACPI_6_1_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_HEADER; /// /// CPEP Version (as defined in ACPI 6.1 spec.) /// -#define EFI_ACPI_6_1_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01 +#define EFI_ACPI_6_1_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01 // // CPEP processor structure types. @@ -750,66 +750,66 @@ typedef struct { /// Corrected Platform Error Polling Processor Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT32 PollingInterval; + UINT8 Type; + UINT8 Length; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT32 PollingInterval; } EFI_ACPI_6_1_CPEP_PROCESSOR_APIC_SAPIC_STRUCTURE; /// /// Maximum System Characteristics Table (MSCT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 OffsetProxDomInfo; - UINT32 MaximumNumberOfProximityDomains; - UINT32 MaximumNumberOfClockDomains; - UINT64 MaximumPhysicalAddress; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 OffsetProxDomInfo; + UINT32 MaximumNumberOfProximityDomains; + UINT32 MaximumNumberOfClockDomains; + UINT64 MaximumPhysicalAddress; } EFI_ACPI_6_1_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_HEADER; /// /// MSCT Version (as defined in ACPI 6.1 spec.) /// -#define EFI_ACPI_6_1_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01 +#define EFI_ACPI_6_1_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01 /// /// Maximum Proximity Domain Information Structure Definition /// typedef struct { - UINT8 Revision; - UINT8 Length; - UINT32 ProximityDomainRangeLow; - UINT32 ProximityDomainRangeHigh; - UINT32 MaximumProcessorCapacity; - UINT64 MaximumMemoryCapacity; + UINT8 Revision; + UINT8 Length; + UINT32 ProximityDomainRangeLow; + UINT32 ProximityDomainRangeHigh; + UINT32 MaximumProcessorCapacity; + UINT64 MaximumMemoryCapacity; } EFI_ACPI_6_1_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE; /// /// ACPI RAS Feature Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 PlatformCommunicationChannelIdentifier[12]; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 PlatformCommunicationChannelIdentifier[12]; } EFI_ACPI_6_1_RAS_FEATURE_TABLE; /// /// RASF Version (as defined in ACPI 6.1 spec.) /// -#define EFI_ACPI_6_1_RAS_FEATURE_TABLE_REVISION 0x01 +#define EFI_ACPI_6_1_RAS_FEATURE_TABLE_REVISION 0x01 /// /// ACPI RASF Platform Communication Channel Shared Memory Region definition. /// typedef struct { - UINT32 Signature; - UINT16 Command; - UINT16 Status; - UINT16 Version; - UINT8 RASCapabilities[16]; - UINT8 SetRASCapabilities[16]; - UINT16 NumberOfRASFParameterBlocks; - UINT32 SetRASCapabilitiesStatus; + UINT32 Signature; + UINT16 Command; + UINT16 Status; + UINT16 Version; + UINT8 RASCapabilities[16]; + UINT8 SetRASCapabilities[16]; + UINT16 NumberOfRASFParameterBlocks; + UINT32 SetRASCapabilitiesStatus; } EFI_ACPI_6_1_RASF_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION; /// @@ -827,52 +827,52 @@ typedef struct { /// ACPI RASF Parameter Block structure for PATROL_SCRUB /// typedef struct { - UINT16 Type; - UINT16 Version; - UINT16 Length; - UINT16 PatrolScrubCommand; - UINT64 RequestedAddressRange[2]; - UINT64 ActualAddressRange[2]; - UINT16 Flags; - UINT8 RequestedSpeed; + UINT16 Type; + UINT16 Version; + UINT16 Length; + UINT16 PatrolScrubCommand; + UINT64 RequestedAddressRange[2]; + UINT64 ActualAddressRange[2]; + UINT16 Flags; + UINT8 RequestedSpeed; } EFI_ACPI_6_1_RASF_PATROL_SCRUB_PLATFORM_BLOCK_STRUCTURE; /// /// ACPI RASF Patrol Scrub command /// -#define EFI_ACPI_6_1_RASF_PATROL_SCRUB_COMMAND_GET_PATROL_PARAMETERS 0x01 -#define EFI_ACPI_6_1_RASF_PATROL_SCRUB_COMMAND_START_PATROL_SCRUBBER 0x02 -#define EFI_ACPI_6_1_RASF_PATROL_SCRUB_COMMAND_STOP_PATROL_SCRUBBER 0x03 +#define EFI_ACPI_6_1_RASF_PATROL_SCRUB_COMMAND_GET_PATROL_PARAMETERS 0x01 +#define EFI_ACPI_6_1_RASF_PATROL_SCRUB_COMMAND_START_PATROL_SCRUBBER 0x02 +#define EFI_ACPI_6_1_RASF_PATROL_SCRUB_COMMAND_STOP_PATROL_SCRUBBER 0x03 /// /// Memory Power State Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 PlatformCommunicationChannelIdentifier; - UINT8 Reserved[3]; -// Memory Power Node Structure -// Memory Power State Characteristics + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 PlatformCommunicationChannelIdentifier; + UINT8 Reserved[3]; + // Memory Power Node Structure + // Memory Power State Characteristics } EFI_ACPI_6_1_MEMORY_POWER_STATUS_TABLE; /// /// MPST Version (as defined in ACPI 6.1 spec.) /// -#define EFI_ACPI_6_1_MEMORY_POWER_STATE_TABLE_REVISION 0x01 +#define EFI_ACPI_6_1_MEMORY_POWER_STATE_TABLE_REVISION 0x01 /// /// MPST Platform Communication Channel Shared Memory Region definition. /// typedef struct { - UINT32 Signature; - UINT16 Command; - UINT16 Status; - UINT32 MemoryPowerCommandRegister; - UINT32 MemoryPowerStatusRegister; - UINT32 PowerStateId; - UINT32 MemoryPowerNodeId; - UINT64 MemoryEnergyConsumed; - UINT64 ExpectedAveragePowerComsuned; + UINT32 Signature; + UINT16 Command; + UINT16 Status; + UINT32 MemoryPowerCommandRegister; + UINT32 MemoryPowerStatusRegister; + UINT32 PowerStateId; + UINT32 MemoryPowerNodeId; + UINT64 MemoryEnergyConsumed; + UINT64 ExpectedAveragePowerComsuned; } EFI_ACPI_6_1_MPST_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION; /// @@ -883,186 +883,186 @@ typedef struct { /// /// ACPI MPST Memory Power command /// -#define EFI_ACPI_6_1_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_POWER_STATE 0x01 -#define EFI_ACPI_6_1_MPST_MEMORY_POWER_COMMAND_SET_MEMORY_POWER_STATE 0x02 -#define EFI_ACPI_6_1_MPST_MEMORY_POWER_COMMAND_GET_AVERAGE_POWER_CONSUMED 0x03 -#define EFI_ACPI_6_1_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_ENERGY_CONSUMED 0x04 +#define EFI_ACPI_6_1_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_POWER_STATE 0x01 +#define EFI_ACPI_6_1_MPST_MEMORY_POWER_COMMAND_SET_MEMORY_POWER_STATE 0x02 +#define EFI_ACPI_6_1_MPST_MEMORY_POWER_COMMAND_GET_AVERAGE_POWER_CONSUMED 0x03 +#define EFI_ACPI_6_1_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_ENERGY_CONSUMED 0x04 /// /// MPST Memory Power Node Table /// typedef struct { - UINT8 PowerStateValue; - UINT8 PowerStateInformationIndex; + UINT8 PowerStateValue; + UINT8 PowerStateInformationIndex; } EFI_ACPI_6_1_MPST_MEMORY_POWER_STATE; typedef struct { - UINT8 Flag; - UINT8 Reserved; - UINT16 MemoryPowerNodeId; - UINT32 Length; - UINT64 AddressBase; - UINT64 AddressLength; - UINT32 NumberOfPowerStates; - UINT32 NumberOfPhysicalComponents; -//EFI_ACPI_6_1_MPST_MEMORY_POWER_STATE MemoryPowerState[NumberOfPowerStates]; -//UINT16 PhysicalComponentIdentifier[NumberOfPhysicalComponents]; + UINT8 Flag; + UINT8 Reserved; + UINT16 MemoryPowerNodeId; + UINT32 Length; + UINT64 AddressBase; + UINT64 AddressLength; + UINT32 NumberOfPowerStates; + UINT32 NumberOfPhysicalComponents; + // EFI_ACPI_6_1_MPST_MEMORY_POWER_STATE MemoryPowerState[NumberOfPowerStates]; + // UINT16 PhysicalComponentIdentifier[NumberOfPhysicalComponents]; } EFI_ACPI_6_1_MPST_MEMORY_POWER_STRUCTURE; -#define EFI_ACPI_6_1_MPST_MEMORY_POWER_STRUCTURE_FLAG_ENABLE 0x01 -#define EFI_ACPI_6_1_MPST_MEMORY_POWER_STRUCTURE_FLAG_POWER_MANAGED 0x02 -#define EFI_ACPI_6_1_MPST_MEMORY_POWER_STRUCTURE_FLAG_HOT_PLUGGABLE 0x04 +#define EFI_ACPI_6_1_MPST_MEMORY_POWER_STRUCTURE_FLAG_ENABLE 0x01 +#define EFI_ACPI_6_1_MPST_MEMORY_POWER_STRUCTURE_FLAG_POWER_MANAGED 0x02 +#define EFI_ACPI_6_1_MPST_MEMORY_POWER_STRUCTURE_FLAG_HOT_PLUGGABLE 0x04 typedef struct { - UINT16 MemoryPowerNodeCount; - UINT8 Reserved[2]; + UINT16 MemoryPowerNodeCount; + UINT8 Reserved[2]; } EFI_ACPI_6_1_MPST_MEMORY_POWER_NODE_TABLE; /// /// MPST Memory Power State Characteristics Table /// typedef struct { - UINT8 PowerStateStructureID; - UINT8 Flag; - UINT16 Reserved; - UINT32 AveragePowerConsumedInMPS0; - UINT32 RelativePowerSavingToMPS0; - UINT64 ExitLatencyToMPS0; + UINT8 PowerStateStructureID; + UINT8 Flag; + UINT16 Reserved; + UINT32 AveragePowerConsumedInMPS0; + UINT32 RelativePowerSavingToMPS0; + UINT64 ExitLatencyToMPS0; } EFI_ACPI_6_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE; -#define EFI_ACPI_6_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_MEMORY_CONTENT_PRESERVED 0x01 -#define EFI_ACPI_6_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_ENTRY 0x02 -#define EFI_ACPI_6_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_EXIT 0x04 +#define EFI_ACPI_6_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_MEMORY_CONTENT_PRESERVED 0x01 +#define EFI_ACPI_6_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_ENTRY 0x02 +#define EFI_ACPI_6_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_EXIT 0x04 typedef struct { - UINT16 MemoryPowerStateCharacteristicsCount; - UINT8 Reserved[2]; + UINT16 MemoryPowerStateCharacteristicsCount; + UINT8 Reserved[2]; } EFI_ACPI_6_1_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_TABLE; /// /// Memory Topology Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 Reserved; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 Reserved; } EFI_ACPI_6_1_MEMORY_TOPOLOGY_TABLE; /// /// PMTT Version (as defined in ACPI 6.1 spec.) /// -#define EFI_ACPI_6_1_MEMORY_TOPOLOGY_TABLE_REVISION 0x01 +#define EFI_ACPI_6_1_MEMORY_TOPOLOGY_TABLE_REVISION 0x01 /// /// Common Memory Aggregator Device Structure. /// typedef struct { - UINT8 Type; - UINT8 Reserved; - UINT16 Length; - UINT16 Flags; - UINT16 Reserved1; + UINT8 Type; + UINT8 Reserved; + UINT16 Length; + UINT16 Flags; + UINT16 Reserved1; } EFI_ACPI_6_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE; /// /// Memory Aggregator Device Type /// -#define EFI_ACPI_6_1_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_SOCKET 0x0 -#define EFI_ACPI_6_1_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_MEMORY_CONTROLLER 0x1 -#define EFI_ACPI_6_1_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_DIMM 0x2 +#define EFI_ACPI_6_1_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_SOCKET 0x0 +#define EFI_ACPI_6_1_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_MEMORY_CONTROLLER 0x1 +#define EFI_ACPI_6_1_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_DIMM 0x2 /// /// Socket Memory Aggregator Device Structure. /// typedef struct { - EFI_ACPI_6_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; - UINT16 SocketIdentifier; - UINT16 Reserved; -//EFI_ACPI_6_1_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE MemoryController[]; + EFI_ACPI_6_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; + UINT16 SocketIdentifier; + UINT16 Reserved; + // EFI_ACPI_6_1_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE MemoryController[]; } EFI_ACPI_6_1_PMMT_SOCKET_MEMORY_AGGREGATOR_DEVICE_STRUCTURE; /// /// MemoryController Memory Aggregator Device Structure. /// typedef struct { - EFI_ACPI_6_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; - UINT32 ReadLatency; - UINT32 WriteLatency; - UINT32 ReadBandwidth; - UINT32 WriteBandwidth; - UINT16 OptimalAccessUnit; - UINT16 OptimalAccessAlignment; - UINT16 Reserved; - UINT16 NumberOfProximityDomains; -//UINT32 ProximityDomain[NumberOfProximityDomains]; -//EFI_ACPI_6_1_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE PhysicalComponent[]; + EFI_ACPI_6_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; + UINT32 ReadLatency; + UINT32 WriteLatency; + UINT32 ReadBandwidth; + UINT32 WriteBandwidth; + UINT16 OptimalAccessUnit; + UINT16 OptimalAccessAlignment; + UINT16 Reserved; + UINT16 NumberOfProximityDomains; + // UINT32 ProximityDomain[NumberOfProximityDomains]; + // EFI_ACPI_6_1_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE PhysicalComponent[]; } EFI_ACPI_6_1_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE; /// /// DIMM Memory Aggregator Device Structure. /// typedef struct { - EFI_ACPI_6_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; - UINT16 PhysicalComponentIdentifier; - UINT16 Reserved; - UINT32 SizeOfDimm; - UINT32 SmbiosHandle; + EFI_ACPI_6_1_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; + UINT16 PhysicalComponentIdentifier; + UINT16 Reserved; + UINT32 SizeOfDimm; + UINT32 SmbiosHandle; } EFI_ACPI_6_1_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE; /// /// Boot Graphics Resource Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_DESCRIPTION_HEADER Header; /// /// 2-bytes (16 bit) version ID. This value must be 1. /// - UINT16 Version; + UINT16 Version; /// /// 1-byte status field indicating current status about the table. /// Bits[7:1] = Reserved (must be zero) /// Bit [0] = Valid. A one indicates the boot image graphic is valid. /// - UINT8 Status; + UINT8 Status; /// /// 1-byte enumerated type field indicating format of the image. /// 0 = Bitmap /// 1 - 255 Reserved (for future use) /// - UINT8 ImageType; + UINT8 ImageType; /// /// 8-byte (64 bit) physical address pointing to the firmware's in-memory copy /// of the image bitmap. /// - UINT64 ImageAddress; + UINT64 ImageAddress; /// /// A 4-byte (32-bit) unsigned long describing the display X-offset of the boot image. /// (X, Y) display offset of the top left corner of the boot image. /// The top left corner of the display is at offset (0, 0). /// - UINT32 ImageOffsetX; + UINT32 ImageOffsetX; /// /// A 4-byte (32-bit) unsigned long describing the display Y-offset of the boot image. /// (X, Y) display offset of the top left corner of the boot image. /// The top left corner of the display is at offset (0, 0). /// - UINT32 ImageOffsetY; + UINT32 ImageOffsetY; } EFI_ACPI_6_1_BOOT_GRAPHICS_RESOURCE_TABLE; /// /// BGRT Revision /// -#define EFI_ACPI_6_1_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION 1 +#define EFI_ACPI_6_1_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION 1 /// /// BGRT Version /// -#define EFI_ACPI_6_1_BGRT_VERSION 0x01 +#define EFI_ACPI_6_1_BGRT_VERSION 0x01 /// /// BGRT Status /// -#define EFI_ACPI_6_1_BGRT_STATUS_NOT_DISPLAYED 0x00 -#define EFI_ACPI_6_1_BGRT_STATUS_DISPLAYED 0x01 +#define EFI_ACPI_6_1_BGRT_STATUS_NOT_DISPLAYED 0x00 +#define EFI_ACPI_6_1_BGRT_STATUS_DISPLAYED 0x01 /// /// BGRT Image Type @@ -1072,26 +1072,26 @@ typedef struct { /// /// FPDT Version (as defined in ACPI 6.1 spec.) /// -#define EFI_ACPI_6_1_FIRMWARE_PERFORMANCE_DATA_TABLE_REVISION 0x01 +#define EFI_ACPI_6_1_FIRMWARE_PERFORMANCE_DATA_TABLE_REVISION 0x01 /// /// FPDT Performance Record Types /// -#define EFI_ACPI_6_1_FPDT_RECORD_TYPE_FIRMWARE_BASIC_BOOT_POINTER 0x0000 -#define EFI_ACPI_6_1_FPDT_RECORD_TYPE_S3_PERFORMANCE_TABLE_POINTER 0x0001 +#define EFI_ACPI_6_1_FPDT_RECORD_TYPE_FIRMWARE_BASIC_BOOT_POINTER 0x0000 +#define EFI_ACPI_6_1_FPDT_RECORD_TYPE_S3_PERFORMANCE_TABLE_POINTER 0x0001 /// /// FPDT Performance Record Revision /// -#define EFI_ACPI_6_1_FPDT_RECORD_REVISION_FIRMWARE_BASIC_BOOT_POINTER 0x01 -#define EFI_ACPI_6_1_FPDT_RECORD_REVISION_S3_PERFORMANCE_TABLE_POINTER 0x01 +#define EFI_ACPI_6_1_FPDT_RECORD_REVISION_FIRMWARE_BASIC_BOOT_POINTER 0x01 +#define EFI_ACPI_6_1_FPDT_RECORD_REVISION_S3_PERFORMANCE_TABLE_POINTER 0x01 /// /// FPDT Runtime Performance Record Types /// -#define EFI_ACPI_6_1_FPDT_RUNTIME_RECORD_TYPE_S3_RESUME 0x0000 -#define EFI_ACPI_6_1_FPDT_RUNTIME_RECORD_TYPE_S3_SUSPEND 0x0001 -#define EFI_ACPI_6_1_FPDT_RUNTIME_RECORD_TYPE_FIRMWARE_BASIC_BOOT 0x0002 +#define EFI_ACPI_6_1_FPDT_RUNTIME_RECORD_TYPE_S3_RESUME 0x0000 +#define EFI_ACPI_6_1_FPDT_RUNTIME_RECORD_TYPE_S3_SUSPEND 0x0001 +#define EFI_ACPI_6_1_FPDT_RUNTIME_RECORD_TYPE_FIRMWARE_BASIC_BOOT 0x0002 /// /// FPDT Runtime Performance Record Revision @@ -1104,77 +1104,77 @@ typedef struct { /// FPDT Performance Record header /// typedef struct { - UINT16 Type; - UINT8 Length; - UINT8 Revision; + UINT16 Type; + UINT8 Length; + UINT8 Revision; } EFI_ACPI_6_1_FPDT_PERFORMANCE_RECORD_HEADER; /// /// FPDT Performance Table header /// typedef struct { - UINT32 Signature; - UINT32 Length; + UINT32 Signature; + UINT32 Length; } EFI_ACPI_6_1_FPDT_PERFORMANCE_TABLE_HEADER; /// /// FPDT Firmware Basic Boot Performance Pointer Record Structure /// typedef struct { - EFI_ACPI_6_1_FPDT_PERFORMANCE_RECORD_HEADER Header; - UINT32 Reserved; + EFI_ACPI_6_1_FPDT_PERFORMANCE_RECORD_HEADER Header; + UINT32 Reserved; /// /// 64-bit processor-relative physical address of the Basic Boot Performance Table. /// - UINT64 BootPerformanceTablePointer; + UINT64 BootPerformanceTablePointer; } EFI_ACPI_6_1_FPDT_BOOT_PERFORMANCE_TABLE_POINTER_RECORD; /// /// FPDT S3 Performance Table Pointer Record Structure /// typedef struct { - EFI_ACPI_6_1_FPDT_PERFORMANCE_RECORD_HEADER Header; - UINT32 Reserved; + EFI_ACPI_6_1_FPDT_PERFORMANCE_RECORD_HEADER Header; + UINT32 Reserved; /// /// 64-bit processor-relative physical address of the S3 Performance Table. /// - UINT64 S3PerformanceTablePointer; + UINT64 S3PerformanceTablePointer; } EFI_ACPI_6_1_FPDT_S3_PERFORMANCE_TABLE_POINTER_RECORD; /// /// FPDT Firmware Basic Boot Performance Record Structure /// typedef struct { - EFI_ACPI_6_1_FPDT_PERFORMANCE_RECORD_HEADER Header; - UINT32 Reserved; + EFI_ACPI_6_1_FPDT_PERFORMANCE_RECORD_HEADER Header; + UINT32 Reserved; /// /// Timer value logged at the beginning of firmware image execution. /// This may not always be zero or near zero. /// - UINT64 ResetEnd; + UINT64 ResetEnd; /// /// Timer value logged just prior to loading the OS boot loader into memory. /// For non-UEFI compatible boots, this field must be zero. /// - UINT64 OsLoaderLoadImageStart; + UINT64 OsLoaderLoadImageStart; /// /// Timer value logged just prior to launching the previously loaded OS boot loader image. /// For non-UEFI compatible boots, the timer value logged will be just prior /// to the INT 19h handler invocation. /// - UINT64 OsLoaderStartImageStart; + UINT64 OsLoaderStartImageStart; /// /// Timer value logged at the point when the OS loader calls the /// ExitBootServices function for UEFI compatible firmware. /// For non-UEFI compatible boots, this field must be zero. /// - UINT64 ExitBootServicesEntry; + UINT64 ExitBootServicesEntry; /// /// Timer value logged at the point just prior to when the OS loader gaining /// control back from calls the ExitBootServices function for UEFI compatible firmware. /// For non-UEFI compatible boots, this field must be zero. /// - UINT64 ExitBootServicesExit; + UINT64 ExitBootServicesExit; } EFI_ACPI_6_1_FPDT_FIRMWARE_BASIC_BOOT_RECORD; /// @@ -1186,7 +1186,7 @@ typedef struct { // FPDT Firmware Basic Boot Performance Table // typedef struct { - EFI_ACPI_6_1_FPDT_PERFORMANCE_TABLE_HEADER Header; + EFI_ACPI_6_1_FPDT_PERFORMANCE_TABLE_HEADER Header; // // one or more Performance Records. // @@ -1201,7 +1201,7 @@ typedef struct { // FPDT Firmware S3 Boot Performance Table // typedef struct { - EFI_ACPI_6_1_FPDT_PERFORMANCE_TABLE_HEADER Header; + EFI_ACPI_6_1_FPDT_PERFORMANCE_TABLE_HEADER Header; // // one or more Performance Records. // @@ -1211,145 +1211,145 @@ typedef struct { /// FPDT Basic S3 Resume Performance Record /// typedef struct { - EFI_ACPI_6_1_FPDT_PERFORMANCE_RECORD_HEADER Header; + EFI_ACPI_6_1_FPDT_PERFORMANCE_RECORD_HEADER Header; /// /// A count of the number of S3 resume cycles since the last full boot sequence. /// - UINT32 ResumeCount; + UINT32 ResumeCount; /// /// Timer recorded at the end of BIOS S3 resume, just prior to handoff to the /// OS waking vector. Only the most recent resume cycle's time is retained. /// - UINT64 FullResume; + UINT64 FullResume; /// /// Average timer value of all resume cycles logged since the last full boot /// sequence, including the most recent resume. Note that the entire log of /// timer values does not need to be retained in order to calculate this average. /// - UINT64 AverageResume; + UINT64 AverageResume; } EFI_ACPI_6_1_FPDT_S3_RESUME_RECORD; /// /// FPDT Basic S3 Suspend Performance Record /// typedef struct { - EFI_ACPI_6_1_FPDT_PERFORMANCE_RECORD_HEADER Header; + EFI_ACPI_6_1_FPDT_PERFORMANCE_RECORD_HEADER Header; /// /// Timer value recorded at the OS write to SLP_TYP upon entry to S3. /// Only the most recent suspend cycle's timer value is retained. /// - UINT64 SuspendStart; + UINT64 SuspendStart; /// /// Timer value recorded at the final firmware write to SLP_TYP (or other /// mechanism) used to trigger hardware entry to S3. /// Only the most recent suspend cycle's timer value is retained. /// - UINT64 SuspendEnd; + UINT64 SuspendEnd; } EFI_ACPI_6_1_FPDT_S3_SUSPEND_RECORD; /// /// Firmware Performance Record Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_DESCRIPTION_HEADER Header; } EFI_ACPI_6_1_FIRMWARE_PERFORMANCE_RECORD_TABLE; /// /// Generic Timer Description Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT64 CntControlBasePhysicalAddress; - UINT32 Reserved; - UINT32 SecurePL1TimerGSIV; - UINT32 SecurePL1TimerFlags; - UINT32 NonSecurePL1TimerGSIV; - UINT32 NonSecurePL1TimerFlags; - UINT32 VirtualTimerGSIV; - UINT32 VirtualTimerFlags; - UINT32 NonSecurePL2TimerGSIV; - UINT32 NonSecurePL2TimerFlags; - UINT64 CntReadBasePhysicalAddress; - UINT32 PlatformTimerCount; - UINT32 PlatformTimerOffset; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT64 CntControlBasePhysicalAddress; + UINT32 Reserved; + UINT32 SecurePL1TimerGSIV; + UINT32 SecurePL1TimerFlags; + UINT32 NonSecurePL1TimerGSIV; + UINT32 NonSecurePL1TimerFlags; + UINT32 VirtualTimerGSIV; + UINT32 VirtualTimerFlags; + UINT32 NonSecurePL2TimerGSIV; + UINT32 NonSecurePL2TimerFlags; + UINT64 CntReadBasePhysicalAddress; + UINT32 PlatformTimerCount; + UINT32 PlatformTimerOffset; } EFI_ACPI_6_1_GENERIC_TIMER_DESCRIPTION_TABLE; /// /// GTDT Version (as defined in ACPI 6.1 spec.) /// -#define EFI_ACPI_6_1_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION 0x02 +#define EFI_ACPI_6_1_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION 0x02 /// /// Timer Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_1_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 -#define EFI_ACPI_6_1_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 -#define EFI_ACPI_6_1_GTDT_TIMER_FLAG_ALWAYS_ON_CAPABILITY BIT2 +#define EFI_ACPI_6_1_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 +#define EFI_ACPI_6_1_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 +#define EFI_ACPI_6_1_GTDT_TIMER_FLAG_ALWAYS_ON_CAPABILITY BIT2 /// /// Platform Timer Type /// -#define EFI_ACPI_6_1_GTDT_GT_BLOCK 0 -#define EFI_ACPI_6_1_GTDT_SBSA_GENERIC_WATCHDOG 1 +#define EFI_ACPI_6_1_GTDT_GT_BLOCK 0 +#define EFI_ACPI_6_1_GTDT_SBSA_GENERIC_WATCHDOG 1 /// /// GT Block Structure /// typedef struct { - UINT8 Type; - UINT16 Length; - UINT8 Reserved; - UINT64 CntCtlBase; - UINT32 GTBlockTimerCount; - UINT32 GTBlockTimerOffset; + UINT8 Type; + UINT16 Length; + UINT8 Reserved; + UINT64 CntCtlBase; + UINT32 GTBlockTimerCount; + UINT32 GTBlockTimerOffset; } EFI_ACPI_6_1_GTDT_GT_BLOCK_STRUCTURE; /// /// GT Block Timer Structure /// typedef struct { - UINT8 GTFrameNumber; - UINT8 Reserved[3]; - UINT64 CntBaseX; - UINT64 CntEL0BaseX; - UINT32 GTxPhysicalTimerGSIV; - UINT32 GTxPhysicalTimerFlags; - UINT32 GTxVirtualTimerGSIV; - UINT32 GTxVirtualTimerFlags; - UINT32 GTxCommonFlags; + UINT8 GTFrameNumber; + UINT8 Reserved[3]; + UINT64 CntBaseX; + UINT64 CntEL0BaseX; + UINT32 GTxPhysicalTimerGSIV; + UINT32 GTxPhysicalTimerFlags; + UINT32 GTxVirtualTimerGSIV; + UINT32 GTxVirtualTimerFlags; + UINT32 GTxCommonFlags; } EFI_ACPI_6_1_GTDT_GT_BLOCK_TIMER_STRUCTURE; /// /// GT Block Physical Timers and Virtual Timers Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_1_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 -#define EFI_ACPI_6_1_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 +#define EFI_ACPI_6_1_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 +#define EFI_ACPI_6_1_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 /// /// Common Flags Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_1_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER BIT0 -#define EFI_ACPI_6_1_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY BIT1 +#define EFI_ACPI_6_1_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER BIT0 +#define EFI_ACPI_6_1_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY BIT1 /// /// SBSA Generic Watchdog Structure /// typedef struct { - UINT8 Type; - UINT16 Length; - UINT8 Reserved; - UINT64 RefreshFramePhysicalAddress; - UINT64 WatchdogControlFramePhysicalAddress; - UINT32 WatchdogTimerGSIV; - UINT32 WatchdogTimerFlags; + UINT8 Type; + UINT16 Length; + UINT8 Reserved; + UINT64 RefreshFramePhysicalAddress; + UINT64 WatchdogControlFramePhysicalAddress; + UINT32 WatchdogTimerGSIV; + UINT32 WatchdogTimerFlags; } EFI_ACPI_6_1_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE; /// /// SBSA Generic Watchdog Timer Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_MODE BIT0 -#define EFI_ACPI_6_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_POLARITY BIT1 -#define EFI_ACPI_6_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER BIT2 +#define EFI_ACPI_6_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_MODE BIT0 +#define EFI_ACPI_6_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_POLARITY BIT1 +#define EFI_ACPI_6_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER BIT2 // // NVDIMM Firmware Interface Table definition. @@ -1362,63 +1362,63 @@ typedef struct { // // NFIT Version (as defined in ACPI 6.1 spec.) // -#define EFI_ACPI_6_1_NVDIMM_FIRMWARE_INTERFACE_TABLE_REVISION 0x1 +#define EFI_ACPI_6_1_NVDIMM_FIRMWARE_INTERFACE_TABLE_REVISION 0x1 // // Definition for NFIT Table Structure Types // -#define EFI_ACPI_6_1_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_STRUCTURE_TYPE 0 -#define EFI_ACPI_6_1_NFIT_NVDIMM_REGION_MAPPING_STRUCTURE_TYPE 1 -#define EFI_ACPI_6_1_NFIT_INTERLEAVE_STRUCTURE_TYPE 2 -#define EFI_ACPI_6_1_NFIT_SMBIOS_MANAGEMENT_INFORMATION_STRUCTURE_TYPE 3 -#define EFI_ACPI_6_1_NFIT_NVDIMM_CONTROL_REGION_STRUCTURE_TYPE 4 -#define EFI_ACPI_6_1_NFIT_NVDIMM_BLOCK_DATA_WINDOW_REGION_STRUCTURE_TYPE 5 -#define EFI_ACPI_6_1_NFIT_FLUSH_HINT_ADDRESS_STRUCTURE_TYPE 6 +#define EFI_ACPI_6_1_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_STRUCTURE_TYPE 0 +#define EFI_ACPI_6_1_NFIT_NVDIMM_REGION_MAPPING_STRUCTURE_TYPE 1 +#define EFI_ACPI_6_1_NFIT_INTERLEAVE_STRUCTURE_TYPE 2 +#define EFI_ACPI_6_1_NFIT_SMBIOS_MANAGEMENT_INFORMATION_STRUCTURE_TYPE 3 +#define EFI_ACPI_6_1_NFIT_NVDIMM_CONTROL_REGION_STRUCTURE_TYPE 4 +#define EFI_ACPI_6_1_NFIT_NVDIMM_BLOCK_DATA_WINDOW_REGION_STRUCTURE_TYPE 5 +#define EFI_ACPI_6_1_NFIT_FLUSH_HINT_ADDRESS_STRUCTURE_TYPE 6 // // Definition for NFIT Structure Header // typedef struct { - UINT16 Type; - UINT16 Length; + UINT16 Type; + UINT16 Length; } EFI_ACPI_6_1_NFIT_STRUCTURE_HEADER; // // Definition for System Physical Address Range Structure // -#define EFI_ACPI_6_1_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_CONTROL_REGION_FOR_MANAGEMENT BIT0 -#define EFI_ACPI_6_1_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_PROXIMITY_DOMAIN_VALID BIT1 -#define EFI_ACPI_6_1_NFIT_GUID_VOLATILE_MEMORY_REGION { 0x7305944F, 0xFDDA, 0x44E3, { 0xB1, 0x6C, 0x3F, 0x22, 0xD2, 0x52, 0xE5, 0xD0 }} -#define EFI_ACPI_6_1_NFIT_GUID_BYTE_ADDRESSABLE_PERSISTENT_MEMORY_REGION { 0x66F0D379, 0xB4F3, 0x4074, { 0xAC, 0x43, 0x0D, 0x33, 0x18, 0xB7, 0x8C, 0xDB }} -#define EFI_ACPI_6_1_NFIT_GUID_NVDIMM_CONTROL_REGION { 0x92F701F6, 0x13B4, 0x405D, { 0x91, 0x0B, 0x29, 0x93, 0x67, 0xE8, 0x23, 0x4C }} -#define EFI_ACPI_6_1_NFIT_GUID_NVDIMM_BLOCK_DATA_WINDOW_REGION { 0x91AF0530, 0x5D86, 0x470E, { 0xA6, 0xB0, 0x0A, 0x2D, 0xB9, 0x40, 0x82, 0x49 }} -#define EFI_ACPI_6_1_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE { 0x77AB535A, 0x45FC, 0x624B, { 0x55, 0x60, 0xF7, 0xB2, 0x81, 0xD1, 0xF9, 0x6E }} -#define EFI_ACPI_6_1_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE { 0x3D5ABD30, 0x4175, 0x87CE, { 0x6D, 0x64, 0xD2, 0xAD, 0xE5, 0x23, 0xC4, 0xBB }} -#define EFI_ACPI_6_1_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT { 0x5CEA02C9, 0x4D07, 0x69D3, { 0x26, 0x9F ,0x44, 0x96, 0xFB, 0xE0, 0x96, 0xF9 }} -#define EFI_ACPI_6_1_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT { 0x08018188, 0x42CD, 0xBB48, { 0x10, 0x0F, 0x53, 0x87, 0xD5, 0x3D, 0xED, 0x3D }} -typedef struct { - UINT16 Type; - UINT16 Length; - UINT16 SPARangeStructureIndex; - UINT16 Flags; - UINT32 Reserved_8; - UINT32 ProximityDomain; - GUID AddressRangeTypeGUID; - UINT64 SystemPhysicalAddressRangeBase; - UINT64 SystemPhysicalAddressRangeLength; - UINT64 AddressRangeMemoryMappingAttribute; +#define EFI_ACPI_6_1_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_CONTROL_REGION_FOR_MANAGEMENT BIT0 +#define EFI_ACPI_6_1_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_PROXIMITY_DOMAIN_VALID BIT1 +#define EFI_ACPI_6_1_NFIT_GUID_VOLATILE_MEMORY_REGION { 0x7305944F, 0xFDDA, 0x44E3, { 0xB1, 0x6C, 0x3F, 0x22, 0xD2, 0x52, 0xE5, 0xD0 }} +#define EFI_ACPI_6_1_NFIT_GUID_BYTE_ADDRESSABLE_PERSISTENT_MEMORY_REGION { 0x66F0D379, 0xB4F3, 0x4074, { 0xAC, 0x43, 0x0D, 0x33, 0x18, 0xB7, 0x8C, 0xDB }} +#define EFI_ACPI_6_1_NFIT_GUID_NVDIMM_CONTROL_REGION { 0x92F701F6, 0x13B4, 0x405D, { 0x91, 0x0B, 0x29, 0x93, 0x67, 0xE8, 0x23, 0x4C }} +#define EFI_ACPI_6_1_NFIT_GUID_NVDIMM_BLOCK_DATA_WINDOW_REGION { 0x91AF0530, 0x5D86, 0x470E, { 0xA6, 0xB0, 0x0A, 0x2D, 0xB9, 0x40, 0x82, 0x49 }} +#define EFI_ACPI_6_1_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE { 0x77AB535A, 0x45FC, 0x624B, { 0x55, 0x60, 0xF7, 0xB2, 0x81, 0xD1, 0xF9, 0x6E }} +#define EFI_ACPI_6_1_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE { 0x3D5ABD30, 0x4175, 0x87CE, { 0x6D, 0x64, 0xD2, 0xAD, 0xE5, 0x23, 0xC4, 0xBB }} +#define EFI_ACPI_6_1_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT { 0x5CEA02C9, 0x4D07, 0x69D3, { 0x26, 0x9F ,0x44, 0x96, 0xFB, 0xE0, 0x96, 0xF9 }} +#define EFI_ACPI_6_1_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT { 0x08018188, 0x42CD, 0xBB48, { 0x10, 0x0F, 0x53, 0x87, 0xD5, 0x3D, 0xED, 0x3D }} +typedef struct { + UINT16 Type; + UINT16 Length; + UINT16 SPARangeStructureIndex; + UINT16 Flags; + UINT32 Reserved_8; + UINT32 ProximityDomain; + GUID AddressRangeTypeGUID; + UINT64 SystemPhysicalAddressRangeBase; + UINT64 SystemPhysicalAddressRangeLength; + UINT64 AddressRangeMemoryMappingAttribute; } EFI_ACPI_6_1_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_STRUCTURE; // // Definition for Memory Device to System Physical Address Range Mapping Structure // typedef struct { - UINT32 DIMMNumber:4; - UINT32 MemoryChannelNumber:4; - UINT32 MemoryControllerID:4; - UINT32 SocketID:4; - UINT32 NodeControllerID:12; - UINT32 Reserved_28:4; + UINT32 DIMMNumber : 4; + UINT32 MemoryChannelNumber : 4; + UINT32 MemoryControllerID : 4; + UINT32 SocketID : 4; + UINT32 NodeControllerID : 12; + UINT32 Reserved_28 : 4; } EFI_ACPI_6_1_NFIT_DEVICE_HANDLE; #define EFI_ACPI_6_1_NFIT_MEMORY_DEVICE_STATE_FLAGS_PREVIOUS_SAVE_FAIL BIT0 @@ -1429,138 +1429,138 @@ typedef struct { #define EFI_ACPI_6_1_NFIT_MEMORY_DEVICE_STATE_FLAGS_FIRMWARE_ENABLED_TO_NOTIFY_OSPM_ON_SMART_HEALTH_EVENTS BIT5 #define EFI_ACPI_6_1_NFIT_MEMORY_DEVICE_STATE_FLAGS_FIRMWARE_NOT_MAP_NVDIMM_TO_SPA BIT6 typedef struct { - UINT16 Type; - UINT16 Length; - EFI_ACPI_6_1_NFIT_DEVICE_HANDLE NFITDeviceHandle; - UINT16 NVDIMMPhysicalID; - UINT16 NVDIMMRegionID; - UINT16 SPARangeStructureIndex ; - UINT16 NVDIMMControlRegionStructureIndex; - UINT64 NVDIMMRegionSize; - UINT64 RegionOffset; - UINT64 NVDIMMPhysicalAddressRegionBase; - UINT16 InterleaveStructureIndex; - UINT16 InterleaveWays; - UINT16 NVDIMMStateFlags; - UINT16 Reserved_46; + UINT16 Type; + UINT16 Length; + EFI_ACPI_6_1_NFIT_DEVICE_HANDLE NFITDeviceHandle; + UINT16 NVDIMMPhysicalID; + UINT16 NVDIMMRegionID; + UINT16 SPARangeStructureIndex; + UINT16 NVDIMMControlRegionStructureIndex; + UINT64 NVDIMMRegionSize; + UINT64 RegionOffset; + UINT64 NVDIMMPhysicalAddressRegionBase; + UINT16 InterleaveStructureIndex; + UINT16 InterleaveWays; + UINT16 NVDIMMStateFlags; + UINT16 Reserved_46; } EFI_ACPI_6_1_NFIT_NVDIMM_REGION_MAPPING_STRUCTURE; // // Definition for Interleave Structure // typedef struct { - UINT16 Type; - UINT16 Length; - UINT16 InterleaveStructureIndex; - UINT16 Reserved_6; - UINT32 NumberOfLines; - UINT32 LineSize; -//UINT32 LineOffset[NumberOfLines]; + UINT16 Type; + UINT16 Length; + UINT16 InterleaveStructureIndex; + UINT16 Reserved_6; + UINT32 NumberOfLines; + UINT32 LineSize; + // UINT32 LineOffset[NumberOfLines]; } EFI_ACPI_6_1_NFIT_INTERLEAVE_STRUCTURE; // // Definition for SMBIOS Management Information Structure // typedef struct { - UINT16 Type; - UINT16 Length; - UINT32 Reserved_4; -//UINT8 Data[]; + UINT16 Type; + UINT16 Length; + UINT32 Reserved_4; + // UINT8 Data[]; } EFI_ACPI_6_1_NFIT_SMBIOS_MANAGEMENT_INFORMATION_STRUCTURE; // // Definition for NVDIMM Control Region Structure // -#define EFI_ACPI_6_1_NFIT_NVDIMM_CONTROL_REGION_VALID_FIELDS_MANUFACTURING BIT0 - -#define EFI_ACPI_6_1_NFIT_NVDIMM_CONTROL_REGION_FLAGS_BLOCK_DATA_WINDOWS_BUFFERED BIT0 -typedef struct { - UINT16 Type; - UINT16 Length; - UINT16 NVDIMMControlRegionStructureIndex; - UINT16 VendorID; - UINT16 DeviceID; - UINT16 RevisionID; - UINT16 SubsystemVendorID; - UINT16 SubsystemDeviceID; - UINT16 SubsystemRevisionID; - UINT8 ValidFields; - UINT8 ManufacturingLocation; - UINT16 ManufacturingDate; - UINT8 Reserved_22[2]; - UINT32 SerialNumber; - UINT16 RegionFormatInterfaceCode; - UINT16 NumberOfBlockControlWindows; - UINT64 SizeOfBlockControlWindow; - UINT64 CommandRegisterOffsetInBlockControlWindow; - UINT64 SizeOfCommandRegisterInBlockControlWindows; - UINT64 StatusRegisterOffsetInBlockControlWindow; - UINT64 SizeOfStatusRegisterInBlockControlWindows; - UINT16 NVDIMMControlRegionFlag; - UINT8 Reserved_74[6]; +#define EFI_ACPI_6_1_NFIT_NVDIMM_CONTROL_REGION_VALID_FIELDS_MANUFACTURING BIT0 + +#define EFI_ACPI_6_1_NFIT_NVDIMM_CONTROL_REGION_FLAGS_BLOCK_DATA_WINDOWS_BUFFERED BIT0 +typedef struct { + UINT16 Type; + UINT16 Length; + UINT16 NVDIMMControlRegionStructureIndex; + UINT16 VendorID; + UINT16 DeviceID; + UINT16 RevisionID; + UINT16 SubsystemVendorID; + UINT16 SubsystemDeviceID; + UINT16 SubsystemRevisionID; + UINT8 ValidFields; + UINT8 ManufacturingLocation; + UINT16 ManufacturingDate; + UINT8 Reserved_22[2]; + UINT32 SerialNumber; + UINT16 RegionFormatInterfaceCode; + UINT16 NumberOfBlockControlWindows; + UINT64 SizeOfBlockControlWindow; + UINT64 CommandRegisterOffsetInBlockControlWindow; + UINT64 SizeOfCommandRegisterInBlockControlWindows; + UINT64 StatusRegisterOffsetInBlockControlWindow; + UINT64 SizeOfStatusRegisterInBlockControlWindows; + UINT16 NVDIMMControlRegionFlag; + UINT8 Reserved_74[6]; } EFI_ACPI_6_1_NFIT_NVDIMM_CONTROL_REGION_STRUCTURE; // // Definition for NVDIMM Block Data Window Region Structure // typedef struct { - UINT16 Type; - UINT16 Length; - UINT16 NVDIMMControlRegionStructureIndex; - UINT16 NumberOfBlockDataWindows; - UINT64 BlockDataWindowStartOffset; - UINT64 SizeOfBlockDataWindow; - UINT64 BlockAccessibleMemoryCapacity; - UINT64 BeginningAddressOfFirstBlockInBlockAccessibleMemory; + UINT16 Type; + UINT16 Length; + UINT16 NVDIMMControlRegionStructureIndex; + UINT16 NumberOfBlockDataWindows; + UINT64 BlockDataWindowStartOffset; + UINT64 SizeOfBlockDataWindow; + UINT64 BlockAccessibleMemoryCapacity; + UINT64 BeginningAddressOfFirstBlockInBlockAccessibleMemory; } EFI_ACPI_6_1_NFIT_NVDIMM_BLOCK_DATA_WINDOW_REGION_STRUCTURE; // // Definition for Flush Hint Address Structure // typedef struct { - UINT16 Type; - UINT16 Length; - EFI_ACPI_6_1_NFIT_DEVICE_HANDLE NFITDeviceHandle; - UINT16 NumberOfFlushHintAddresses; - UINT8 Reserved_10[6]; -//UINT64 FlushHintAddress[NumberOfFlushHintAddresses]; + UINT16 Type; + UINT16 Length; + EFI_ACPI_6_1_NFIT_DEVICE_HANDLE NFITDeviceHandle; + UINT16 NumberOfFlushHintAddresses; + UINT8 Reserved_10[6]; + // UINT64 FlushHintAddress[NumberOfFlushHintAddresses]; } EFI_ACPI_6_1_NFIT_FLUSH_HINT_ADDRESS_STRUCTURE; /// /// Boot Error Record Table (BERT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 BootErrorRegionLength; - UINT64 BootErrorRegion; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 BootErrorRegionLength; + UINT64 BootErrorRegion; } EFI_ACPI_6_1_BOOT_ERROR_RECORD_TABLE_HEADER; /// /// BERT Version (as defined in ACPI 6.1 spec.) /// -#define EFI_ACPI_6_1_BOOT_ERROR_RECORD_TABLE_REVISION 0x01 +#define EFI_ACPI_6_1_BOOT_ERROR_RECORD_TABLE_REVISION 0x01 /// /// Boot Error Region Block Status Definition /// typedef struct { - UINT32 UncorrectableErrorValid:1; - UINT32 CorrectableErrorValid:1; - UINT32 MultipleUncorrectableErrors:1; - UINT32 MultipleCorrectableErrors:1; - UINT32 ErrorDataEntryCount:10; - UINT32 Reserved:18; + UINT32 UncorrectableErrorValid : 1; + UINT32 CorrectableErrorValid : 1; + UINT32 MultipleUncorrectableErrors : 1; + UINT32 MultipleCorrectableErrors : 1; + UINT32 ErrorDataEntryCount : 10; + UINT32 Reserved : 18; } EFI_ACPI_6_1_ERROR_BLOCK_STATUS; /// /// Boot Error Region Definition /// typedef struct { - EFI_ACPI_6_1_ERROR_BLOCK_STATUS BlockStatus; - UINT32 RawDataOffset; - UINT32 RawDataLength; - UINT32 DataLength; - UINT32 ErrorSeverity; + EFI_ACPI_6_1_ERROR_BLOCK_STATUS BlockStatus; + UINT32 RawDataOffset; + UINT32 RawDataLength; + UINT32 DataLength; + UINT32 ErrorSeverity; } EFI_ACPI_6_1_BOOT_ERROR_REGION_STRUCTURE; // @@ -1575,15 +1575,15 @@ typedef struct { /// Generic Error Data Entry Definition /// typedef struct { - UINT8 SectionType[16]; - UINT32 ErrorSeverity; - UINT16 Revision; - UINT8 ValidationBits; - UINT8 Flags; - UINT32 ErrorDataLength; - UINT8 FruId[16]; - UINT8 FruText[20]; - UINT8 Timestamp[8]; + UINT8 SectionType[16]; + UINT32 ErrorSeverity; + UINT16 Revision; + UINT8 ValidationBits; + UINT8 Flags; + UINT32 ErrorDataLength; + UINT8 FruId[16]; + UINT8 FruText[20]; + UINT8 Timestamp[8]; } EFI_ACPI_6_1_GENERIC_ERROR_DATA_ENTRY_STRUCTURE; /// @@ -1595,14 +1595,14 @@ typedef struct { /// HEST - Hardware Error Source Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 ErrorSourceCount; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 ErrorSourceCount; } EFI_ACPI_6_1_HARDWARE_ERROR_SOURCE_TABLE_HEADER; /// /// HEST Version (as defined in ACPI 6.1 spec.) /// -#define EFI_ACPI_6_1_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01 +#define EFI_ACPI_6_1_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01 // // Error Source structure types. @@ -1619,461 +1619,461 @@ typedef struct { // // Error Source structure flags. // -#define EFI_ACPI_6_1_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0) -#define EFI_ACPI_6_1_ERROR_SOURCE_FLAG_GLOBAL (1 << 1) +#define EFI_ACPI_6_1_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0) +#define EFI_ACPI_6_1_ERROR_SOURCE_FLAG_GLOBAL (1 << 1) /// /// IA-32 Architecture Machine Check Exception Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT64 GlobalCapabilityInitData; - UINT64 GlobalControlInitData; - UINT8 NumberOfHardwareBanks; - UINT8 Reserved1[7]; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT64 GlobalCapabilityInitData; + UINT64 GlobalControlInitData; + UINT8 NumberOfHardwareBanks; + UINT8 Reserved1[7]; } EFI_ACPI_6_1_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION_STRUCTURE; /// /// IA-32 Architecture Machine Check Bank Structure Definition /// typedef struct { - UINT8 BankNumber; - UINT8 ClearStatusOnInitialization; - UINT8 StatusDataFormat; - UINT8 Reserved0; - UINT32 ControlRegisterMsrAddress; - UINT64 ControlInitData; - UINT32 StatusRegisterMsrAddress; - UINT32 AddressRegisterMsrAddress; - UINT32 MiscRegisterMsrAddress; + UINT8 BankNumber; + UINT8 ClearStatusOnInitialization; + UINT8 StatusDataFormat; + UINT8 Reserved0; + UINT32 ControlRegisterMsrAddress; + UINT64 ControlInitData; + UINT32 StatusRegisterMsrAddress; + UINT32 AddressRegisterMsrAddress; + UINT32 MiscRegisterMsrAddress; } EFI_ACPI_6_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_BANK_STRUCTURE; /// /// IA-32 Architecture Machine Check Bank Structure MCA data format /// -#define EFI_ACPI_6_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00 -#define EFI_ACPI_6_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01 -#define EFI_ACPI_6_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02 +#define EFI_ACPI_6_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00 +#define EFI_ACPI_6_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01 +#define EFI_ACPI_6_1_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02 // // Hardware Error Notification types. All other values are reserved // -#define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00 -#define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01 -#define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02 -#define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_SCI 0x03 -#define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_NMI 0x04 -#define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_CMCI 0x05 -#define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_MCE 0x06 -#define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_GPIO_SIGNAL 0x07 -#define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_ARMV8_SEA 0x08 -#define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_ARMV8_SEI 0x09 -#define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_GSIV 0x0A +#define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00 +#define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01 +#define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02 +#define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_SCI 0x03 +#define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_NMI 0x04 +#define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_CMCI 0x05 +#define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_MCE 0x06 +#define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_GPIO_SIGNAL 0x07 +#define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_ARMV8_SEA 0x08 +#define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_ARMV8_SEI 0x09 +#define EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_GSIV 0x0A /// /// Hardware Error Notification Configuration Write Enable Structure Definition /// typedef struct { - UINT16 Type:1; - UINT16 PollInterval:1; - UINT16 SwitchToPollingThresholdValue:1; - UINT16 SwitchToPollingThresholdWindow:1; - UINT16 ErrorThresholdValue:1; - UINT16 ErrorThresholdWindow:1; - UINT16 Reserved:10; + UINT16 Type : 1; + UINT16 PollInterval : 1; + UINT16 SwitchToPollingThresholdValue : 1; + UINT16 SwitchToPollingThresholdWindow : 1; + UINT16 ErrorThresholdValue : 1; + UINT16 ErrorThresholdWindow : 1; + UINT16 Reserved : 10; } EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE; /// /// Hardware Error Notification Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable; - UINT32 PollInterval; - UINT32 Vector; - UINT32 SwitchToPollingThresholdValue; - UINT32 SwitchToPollingThresholdWindow; - UINT32 ErrorThresholdValue; - UINT32 ErrorThresholdWindow; + UINT8 Type; + UINT8 Length; + EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable; + UINT32 PollInterval; + UINT32 Vector; + UINT32 SwitchToPollingThresholdValue; + UINT32 SwitchToPollingThresholdWindow; + UINT32 ErrorThresholdValue; + UINT32 ErrorThresholdWindow; } EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_STRUCTURE; /// /// IA-32 Architecture Corrected Machine Check Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; - UINT8 NumberOfHardwareBanks; - UINT8 Reserved1[3]; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; + UINT8 NumberOfHardwareBanks; + UINT8 Reserved1[3]; } EFI_ACPI_6_1_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK_STRUCTURE; /// /// IA-32 Architecture NMI Error Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 MaxRawDataLength; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 MaxRawDataLength; } EFI_ACPI_6_1_IA32_ARCHITECTURE_NMI_ERROR_STRUCTURE; /// /// PCI Express Root Port AER Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 Bus; - UINT16 Device; - UINT16 Function; - UINT16 DeviceControl; - UINT8 Reserved1[2]; - UINT32 UncorrectableErrorMask; - UINT32 UncorrectableErrorSeverity; - UINT32 CorrectableErrorMask; - UINT32 AdvancedErrorCapabilitiesAndControl; - UINT32 RootErrorCommand; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 Bus; + UINT16 Device; + UINT16 Function; + UINT16 DeviceControl; + UINT8 Reserved1[2]; + UINT32 UncorrectableErrorMask; + UINT32 UncorrectableErrorSeverity; + UINT32 CorrectableErrorMask; + UINT32 AdvancedErrorCapabilitiesAndControl; + UINT32 RootErrorCommand; } EFI_ACPI_6_1_PCI_EXPRESS_ROOT_PORT_AER_STRUCTURE; /// /// PCI Express Device AER Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 Bus; - UINT16 Device; - UINT16 Function; - UINT16 DeviceControl; - UINT8 Reserved1[2]; - UINT32 UncorrectableErrorMask; - UINT32 UncorrectableErrorSeverity; - UINT32 CorrectableErrorMask; - UINT32 AdvancedErrorCapabilitiesAndControl; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 Bus; + UINT16 Device; + UINT16 Function; + UINT16 DeviceControl; + UINT8 Reserved1[2]; + UINT32 UncorrectableErrorMask; + UINT32 UncorrectableErrorSeverity; + UINT32 CorrectableErrorMask; + UINT32 AdvancedErrorCapabilitiesAndControl; } EFI_ACPI_6_1_PCI_EXPRESS_DEVICE_AER_STRUCTURE; /// /// PCI Express Bridge AER Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 Bus; - UINT16 Device; - UINT16 Function; - UINT16 DeviceControl; - UINT8 Reserved1[2]; - UINT32 UncorrectableErrorMask; - UINT32 UncorrectableErrorSeverity; - UINT32 CorrectableErrorMask; - UINT32 AdvancedErrorCapabilitiesAndControl; - UINT32 SecondaryUncorrectableErrorMask; - UINT32 SecondaryUncorrectableErrorSeverity; - UINT32 SecondaryAdvancedErrorCapabilitiesAndControl; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 Bus; + UINT16 Device; + UINT16 Function; + UINT16 DeviceControl; + UINT8 Reserved1[2]; + UINT32 UncorrectableErrorMask; + UINT32 UncorrectableErrorSeverity; + UINT32 CorrectableErrorMask; + UINT32 AdvancedErrorCapabilitiesAndControl; + UINT32 SecondaryUncorrectableErrorMask; + UINT32 SecondaryUncorrectableErrorSeverity; + UINT32 SecondaryAdvancedErrorCapabilitiesAndControl; } EFI_ACPI_6_1_PCI_EXPRESS_BRIDGE_AER_STRUCTURE; /// /// Generic Hardware Error Source Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT16 RelatedSourceId; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 MaxRawDataLength; - EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress; - EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; - UINT32 ErrorStatusBlockLength; + UINT16 Type; + UINT16 SourceId; + UINT16 RelatedSourceId; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 MaxRawDataLength; + EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress; + EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; + UINT32 ErrorStatusBlockLength; } EFI_ACPI_6_1_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE; /// /// Generic Hardware Error Source Version 2 Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT16 RelatedSourceId; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 MaxRawDataLength; - EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress; - EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; - UINT32 ErrorStatusBlockLength; - EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE ReadAckRegister; - UINT64 ReadAckPreserve; - UINT64 ReadAckWrite; + UINT16 Type; + UINT16 SourceId; + UINT16 RelatedSourceId; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 MaxRawDataLength; + EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress; + EFI_ACPI_6_1_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; + UINT32 ErrorStatusBlockLength; + EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE ReadAckRegister; + UINT64 ReadAckPreserve; + UINT64 ReadAckWrite; } EFI_ACPI_6_1_GENERIC_HARDWARE_ERROR_SOURCE_VERSION_2_STRUCTURE; /// /// Generic Error Status Definition /// typedef struct { - EFI_ACPI_6_1_ERROR_BLOCK_STATUS BlockStatus; - UINT32 RawDataOffset; - UINT32 RawDataLength; - UINT32 DataLength; - UINT32 ErrorSeverity; + EFI_ACPI_6_1_ERROR_BLOCK_STATUS BlockStatus; + UINT32 RawDataOffset; + UINT32 RawDataLength; + UINT32 DataLength; + UINT32 ErrorSeverity; } EFI_ACPI_6_1_GENERIC_ERROR_STATUS_STRUCTURE; /// /// ERST - Error Record Serialization Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 SerializationHeaderSize; - UINT8 Reserved0[4]; - UINT32 InstructionEntryCount; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 SerializationHeaderSize; + UINT8 Reserved0[4]; + UINT32 InstructionEntryCount; } EFI_ACPI_6_1_ERROR_RECORD_SERIALIZATION_TABLE_HEADER; /// /// ERST Version (as defined in ACPI 6.1 spec.) /// -#define EFI_ACPI_6_1_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01 +#define EFI_ACPI_6_1_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01 /// /// ERST Serialization Actions /// -#define EFI_ACPI_6_1_ERST_BEGIN_WRITE_OPERATION 0x00 -#define EFI_ACPI_6_1_ERST_BEGIN_READ_OPERATION 0x01 -#define EFI_ACPI_6_1_ERST_BEGIN_CLEAR_OPERATION 0x02 -#define EFI_ACPI_6_1_ERST_END_OPERATION 0x03 -#define EFI_ACPI_6_1_ERST_SET_RECORD_OFFSET 0x04 -#define EFI_ACPI_6_1_ERST_EXECUTE_OPERATION 0x05 -#define EFI_ACPI_6_1_ERST_CHECK_BUSY_STATUS 0x06 -#define EFI_ACPI_6_1_ERST_GET_COMMAND_STATUS 0x07 -#define EFI_ACPI_6_1_ERST_GET_RECORD_IDENTIFIER 0x08 -#define EFI_ACPI_6_1_ERST_SET_RECORD_IDENTIFIER 0x09 -#define EFI_ACPI_6_1_ERST_GET_RECORD_COUNT 0x0A -#define EFI_ACPI_6_1_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B -#define EFI_ACPI_6_1_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D -#define EFI_ACPI_6_1_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E -#define EFI_ACPI_6_1_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F -#define EFI_ACPI_6_1_ERST_GET_EXECUTE_OPERATION_TIMINGS 0x10 +#define EFI_ACPI_6_1_ERST_BEGIN_WRITE_OPERATION 0x00 +#define EFI_ACPI_6_1_ERST_BEGIN_READ_OPERATION 0x01 +#define EFI_ACPI_6_1_ERST_BEGIN_CLEAR_OPERATION 0x02 +#define EFI_ACPI_6_1_ERST_END_OPERATION 0x03 +#define EFI_ACPI_6_1_ERST_SET_RECORD_OFFSET 0x04 +#define EFI_ACPI_6_1_ERST_EXECUTE_OPERATION 0x05 +#define EFI_ACPI_6_1_ERST_CHECK_BUSY_STATUS 0x06 +#define EFI_ACPI_6_1_ERST_GET_COMMAND_STATUS 0x07 +#define EFI_ACPI_6_1_ERST_GET_RECORD_IDENTIFIER 0x08 +#define EFI_ACPI_6_1_ERST_SET_RECORD_IDENTIFIER 0x09 +#define EFI_ACPI_6_1_ERST_GET_RECORD_COUNT 0x0A +#define EFI_ACPI_6_1_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B +#define EFI_ACPI_6_1_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D +#define EFI_ACPI_6_1_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E +#define EFI_ACPI_6_1_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F +#define EFI_ACPI_6_1_ERST_GET_EXECUTE_OPERATION_TIMINGS 0x10 /// /// ERST Action Command Status /// -#define EFI_ACPI_6_1_ERST_STATUS_SUCCESS 0x00 -#define EFI_ACPI_6_1_ERST_STATUS_NOT_ENOUGH_SPACE 0x01 -#define EFI_ACPI_6_1_ERST_STATUS_HARDWARE_NOT_AVAILABLE 0x02 -#define EFI_ACPI_6_1_ERST_STATUS_FAILED 0x03 -#define EFI_ACPI_6_1_ERST_STATUS_RECORD_STORE_EMPTY 0x04 -#define EFI_ACPI_6_1_ERST_STATUS_RECORD_NOT_FOUND 0x05 +#define EFI_ACPI_6_1_ERST_STATUS_SUCCESS 0x00 +#define EFI_ACPI_6_1_ERST_STATUS_NOT_ENOUGH_SPACE 0x01 +#define EFI_ACPI_6_1_ERST_STATUS_HARDWARE_NOT_AVAILABLE 0x02 +#define EFI_ACPI_6_1_ERST_STATUS_FAILED 0x03 +#define EFI_ACPI_6_1_ERST_STATUS_RECORD_STORE_EMPTY 0x04 +#define EFI_ACPI_6_1_ERST_STATUS_RECORD_NOT_FOUND 0x05 /// /// ERST Serialization Instructions /// -#define EFI_ACPI_6_1_ERST_READ_REGISTER 0x00 -#define EFI_ACPI_6_1_ERST_READ_REGISTER_VALUE 0x01 -#define EFI_ACPI_6_1_ERST_WRITE_REGISTER 0x02 -#define EFI_ACPI_6_1_ERST_WRITE_REGISTER_VALUE 0x03 -#define EFI_ACPI_6_1_ERST_NOOP 0x04 -#define EFI_ACPI_6_1_ERST_LOAD_VAR1 0x05 -#define EFI_ACPI_6_1_ERST_LOAD_VAR2 0x06 -#define EFI_ACPI_6_1_ERST_STORE_VAR1 0x07 -#define EFI_ACPI_6_1_ERST_ADD 0x08 -#define EFI_ACPI_6_1_ERST_SUBTRACT 0x09 -#define EFI_ACPI_6_1_ERST_ADD_VALUE 0x0A -#define EFI_ACPI_6_1_ERST_SUBTRACT_VALUE 0x0B -#define EFI_ACPI_6_1_ERST_STALL 0x0C -#define EFI_ACPI_6_1_ERST_STALL_WHILE_TRUE 0x0D -#define EFI_ACPI_6_1_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E -#define EFI_ACPI_6_1_ERST_GOTO 0x0F -#define EFI_ACPI_6_1_ERST_SET_SRC_ADDRESS_BASE 0x10 -#define EFI_ACPI_6_1_ERST_SET_DST_ADDRESS_BASE 0x11 -#define EFI_ACPI_6_1_ERST_MOVE_DATA 0x12 +#define EFI_ACPI_6_1_ERST_READ_REGISTER 0x00 +#define EFI_ACPI_6_1_ERST_READ_REGISTER_VALUE 0x01 +#define EFI_ACPI_6_1_ERST_WRITE_REGISTER 0x02 +#define EFI_ACPI_6_1_ERST_WRITE_REGISTER_VALUE 0x03 +#define EFI_ACPI_6_1_ERST_NOOP 0x04 +#define EFI_ACPI_6_1_ERST_LOAD_VAR1 0x05 +#define EFI_ACPI_6_1_ERST_LOAD_VAR2 0x06 +#define EFI_ACPI_6_1_ERST_STORE_VAR1 0x07 +#define EFI_ACPI_6_1_ERST_ADD 0x08 +#define EFI_ACPI_6_1_ERST_SUBTRACT 0x09 +#define EFI_ACPI_6_1_ERST_ADD_VALUE 0x0A +#define EFI_ACPI_6_1_ERST_SUBTRACT_VALUE 0x0B +#define EFI_ACPI_6_1_ERST_STALL 0x0C +#define EFI_ACPI_6_1_ERST_STALL_WHILE_TRUE 0x0D +#define EFI_ACPI_6_1_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E +#define EFI_ACPI_6_1_ERST_GOTO 0x0F +#define EFI_ACPI_6_1_ERST_SET_SRC_ADDRESS_BASE 0x10 +#define EFI_ACPI_6_1_ERST_SET_DST_ADDRESS_BASE 0x11 +#define EFI_ACPI_6_1_ERST_MOVE_DATA 0x12 /// /// ERST Instruction Flags /// -#define EFI_ACPI_6_1_ERST_PRESERVE_REGISTER 0x01 +#define EFI_ACPI_6_1_ERST_PRESERVE_REGISTER 0x01 /// /// ERST Serialization Instruction Entry /// typedef struct { - UINT8 SerializationAction; - UINT8 Instruction; - UINT8 Flags; - UINT8 Reserved0; - EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE RegisterRegion; - UINT64 Value; - UINT64 Mask; + UINT8 SerializationAction; + UINT8 Instruction; + UINT8 Flags; + UINT8 Reserved0; + EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE RegisterRegion; + UINT64 Value; + UINT64 Mask; } EFI_ACPI_6_1_ERST_SERIALIZATION_INSTRUCTION_ENTRY; /// /// EINJ - Error Injection Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 InjectionHeaderSize; - UINT8 InjectionFlags; - UINT8 Reserved0[3]; - UINT32 InjectionEntryCount; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 InjectionHeaderSize; + UINT8 InjectionFlags; + UINT8 Reserved0[3]; + UINT32 InjectionEntryCount; } EFI_ACPI_6_1_ERROR_INJECTION_TABLE_HEADER; /// /// EINJ Version (as defined in ACPI 6.1 spec.) /// -#define EFI_ACPI_6_1_ERROR_INJECTION_TABLE_REVISION 0x01 +#define EFI_ACPI_6_1_ERROR_INJECTION_TABLE_REVISION 0x01 /// /// EINJ Error Injection Actions /// -#define EFI_ACPI_6_1_EINJ_BEGIN_INJECTION_OPERATION 0x00 -#define EFI_ACPI_6_1_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01 -#define EFI_ACPI_6_1_EINJ_SET_ERROR_TYPE 0x02 -#define EFI_ACPI_6_1_EINJ_GET_ERROR_TYPE 0x03 -#define EFI_ACPI_6_1_EINJ_END_OPERATION 0x04 -#define EFI_ACPI_6_1_EINJ_EXECUTE_OPERATION 0x05 -#define EFI_ACPI_6_1_EINJ_CHECK_BUSY_STATUS 0x06 -#define EFI_ACPI_6_1_EINJ_GET_COMMAND_STATUS 0x07 -#define EFI_ACPI_6_1_EINJ_TRIGGER_ERROR 0xFF +#define EFI_ACPI_6_1_EINJ_BEGIN_INJECTION_OPERATION 0x00 +#define EFI_ACPI_6_1_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01 +#define EFI_ACPI_6_1_EINJ_SET_ERROR_TYPE 0x02 +#define EFI_ACPI_6_1_EINJ_GET_ERROR_TYPE 0x03 +#define EFI_ACPI_6_1_EINJ_END_OPERATION 0x04 +#define EFI_ACPI_6_1_EINJ_EXECUTE_OPERATION 0x05 +#define EFI_ACPI_6_1_EINJ_CHECK_BUSY_STATUS 0x06 +#define EFI_ACPI_6_1_EINJ_GET_COMMAND_STATUS 0x07 +#define EFI_ACPI_6_1_EINJ_TRIGGER_ERROR 0xFF /// /// EINJ Action Command Status /// -#define EFI_ACPI_6_1_EINJ_STATUS_SUCCESS 0x00 -#define EFI_ACPI_6_1_EINJ_STATUS_UNKNOWN_FAILURE 0x01 -#define EFI_ACPI_6_1_EINJ_STATUS_INVALID_ACCESS 0x02 +#define EFI_ACPI_6_1_EINJ_STATUS_SUCCESS 0x00 +#define EFI_ACPI_6_1_EINJ_STATUS_UNKNOWN_FAILURE 0x01 +#define EFI_ACPI_6_1_EINJ_STATUS_INVALID_ACCESS 0x02 /// /// EINJ Error Type Definition /// -#define EFI_ACPI_6_1_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0) -#define EFI_ACPI_6_1_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1) -#define EFI_ACPI_6_1_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2) -#define EFI_ACPI_6_1_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3) -#define EFI_ACPI_6_1_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4) -#define EFI_ACPI_6_1_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5) -#define EFI_ACPI_6_1_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6) -#define EFI_ACPI_6_1_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7) -#define EFI_ACPI_6_1_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8) -#define EFI_ACPI_6_1_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9) -#define EFI_ACPI_6_1_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10) -#define EFI_ACPI_6_1_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11) +#define EFI_ACPI_6_1_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0) +#define EFI_ACPI_6_1_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1) +#define EFI_ACPI_6_1_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2) +#define EFI_ACPI_6_1_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3) +#define EFI_ACPI_6_1_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4) +#define EFI_ACPI_6_1_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5) +#define EFI_ACPI_6_1_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6) +#define EFI_ACPI_6_1_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7) +#define EFI_ACPI_6_1_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8) +#define EFI_ACPI_6_1_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9) +#define EFI_ACPI_6_1_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10) +#define EFI_ACPI_6_1_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11) /// /// EINJ Injection Instructions /// -#define EFI_ACPI_6_1_EINJ_READ_REGISTER 0x00 -#define EFI_ACPI_6_1_EINJ_READ_REGISTER_VALUE 0x01 -#define EFI_ACPI_6_1_EINJ_WRITE_REGISTER 0x02 -#define EFI_ACPI_6_1_EINJ_WRITE_REGISTER_VALUE 0x03 -#define EFI_ACPI_6_1_EINJ_NOOP 0x04 +#define EFI_ACPI_6_1_EINJ_READ_REGISTER 0x00 +#define EFI_ACPI_6_1_EINJ_READ_REGISTER_VALUE 0x01 +#define EFI_ACPI_6_1_EINJ_WRITE_REGISTER 0x02 +#define EFI_ACPI_6_1_EINJ_WRITE_REGISTER_VALUE 0x03 +#define EFI_ACPI_6_1_EINJ_NOOP 0x04 /// /// EINJ Instruction Flags /// -#define EFI_ACPI_6_1_EINJ_PRESERVE_REGISTER 0x01 +#define EFI_ACPI_6_1_EINJ_PRESERVE_REGISTER 0x01 /// /// EINJ Injection Instruction Entry /// typedef struct { - UINT8 InjectionAction; - UINT8 Instruction; - UINT8 Flags; - UINT8 Reserved0; - EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE RegisterRegion; - UINT64 Value; - UINT64 Mask; + UINT8 InjectionAction; + UINT8 Instruction; + UINT8 Flags; + UINT8 Reserved0; + EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE RegisterRegion; + UINT64 Value; + UINT64 Mask; } EFI_ACPI_6_1_EINJ_INJECTION_INSTRUCTION_ENTRY; /// /// EINJ Trigger Action Table /// typedef struct { - UINT32 HeaderSize; - UINT32 Revision; - UINT32 TableSize; - UINT32 EntryCount; + UINT32 HeaderSize; + UINT32 Revision; + UINT32 TableSize; + UINT32 EntryCount; } EFI_ACPI_6_1_EINJ_TRIGGER_ACTION_TABLE; /// /// Platform Communications Channel Table (PCCT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 Flags; - UINT64 Reserved; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 Flags; + UINT64 Reserved; } EFI_ACPI_6_1_PLATFORM_COMMUNICATION_CHANNEL_TABLE_HEADER; /// /// PCCT Version (as defined in ACPI 6.1 spec.) /// -#define EFI_ACPI_6_1_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION 0x01 +#define EFI_ACPI_6_1_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION 0x01 /// /// PCCT Global Flags /// -#define EFI_ACPI_6_1_PCCT_FLAGS_SCI_DOORBELL BIT0 +#define EFI_ACPI_6_1_PCCT_FLAGS_SCI_DOORBELL BIT0 // // PCCT Subspace type // -#define EFI_ACPI_6_1_PCCT_SUBSPACE_TYPE_GENERIC 0x00 -#define EFI_ACPI_6_1_PCCT_SUBSPACE_TYPE_1_HW_REDUCED_COMMUNICATIONS 0x01 -#define EFI_ACPI_6_1_PCCT_SUBSPACE_TYPE_2_HW_REDUCED_COMMUNICATIONS 0x02 +#define EFI_ACPI_6_1_PCCT_SUBSPACE_TYPE_GENERIC 0x00 +#define EFI_ACPI_6_1_PCCT_SUBSPACE_TYPE_1_HW_REDUCED_COMMUNICATIONS 0x01 +#define EFI_ACPI_6_1_PCCT_SUBSPACE_TYPE_2_HW_REDUCED_COMMUNICATIONS 0x02 /// /// PCC Subspace Structure Header /// typedef struct { - UINT8 Type; - UINT8 Length; + UINT8 Type; + UINT8 Length; } EFI_ACPI_6_1_PCCT_SUBSPACE_HEADER; /// /// Generic Communications Subspace Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[6]; - UINT64 BaseAddress; - UINT64 AddressLength; - EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; - UINT64 DoorbellPreserve; - UINT64 DoorbellWrite; - UINT32 NominalLatency; - UINT32 MaximumPeriodicAccessRate; - UINT16 MinimumRequestTurnaroundTime; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[6]; + UINT64 BaseAddress; + UINT64 AddressLength; + EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; + UINT64 DoorbellPreserve; + UINT64 DoorbellWrite; + UINT32 NominalLatency; + UINT32 MaximumPeriodicAccessRate; + UINT16 MinimumRequestTurnaroundTime; } EFI_ACPI_6_1_PCCT_SUBSPACE_GENERIC; /// @@ -2081,18 +2081,18 @@ typedef struct { /// typedef struct { - UINT8 Command; - UINT8 Reserved:7; - UINT8 GenerateSci:1; + UINT8 Command; + UINT8 Reserved : 7; + UINT8 GenerateSci : 1; } EFI_ACPI_6_1_PCCT_GENERIC_SHARED_MEMORY_REGION_COMMAND; typedef struct { - UINT8 CommandComplete:1; - UINT8 SciDoorbell:1; - UINT8 Error:1; - UINT8 PlatformNotification:1; - UINT8 Reserved:4; - UINT8 Reserved1; + UINT8 CommandComplete : 1; + UINT8 SciDoorbell : 1; + UINT8 Error : 1; + UINT8 PlatformNotification : 1; + UINT8 Reserved : 4; + UINT8 Reserved1; } EFI_ACPI_6_1_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS; typedef struct { @@ -2101,48 +2101,48 @@ typedef struct { EFI_ACPI_6_1_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS Status; } EFI_ACPI_6_1_PCCT_GENERIC_SHARED_MEMORY_REGION_HEADER; -#define EFI_ACPI_6_1_PCCT_SUBSPACE_DOORBELL_INTERRUPT_FLAGS_POLARITY BIT0 -#define EFI_ACPI_6_1_PCCT_SUBSPACE_DOORBELL_INTERRUPT_FLAGS_MODE BIT1 +#define EFI_ACPI_6_1_PCCT_SUBSPACE_DOORBELL_INTERRUPT_FLAGS_POLARITY BIT0 +#define EFI_ACPI_6_1_PCCT_SUBSPACE_DOORBELL_INTERRUPT_FLAGS_MODE BIT1 /// /// Type 1 HW-Reduced Communications Subspace Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 DoorbellInterrupt; - UINT8 DoorbellInterruptFlags; - UINT8 Reserved; - UINT64 BaseAddress; - UINT64 AddressLength; - EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; - UINT64 DoorbellPreserve; - UINT64 DoorbellWrite; - UINT32 NominalLatency; - UINT32 MaximumPeriodicAccessRate; - UINT16 MinimumRequestTurnaroundTime; + UINT8 Type; + UINT8 Length; + UINT32 DoorbellInterrupt; + UINT8 DoorbellInterruptFlags; + UINT8 Reserved; + UINT64 BaseAddress; + UINT64 AddressLength; + EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; + UINT64 DoorbellPreserve; + UINT64 DoorbellWrite; + UINT32 NominalLatency; + UINT32 MaximumPeriodicAccessRate; + UINT16 MinimumRequestTurnaroundTime; } EFI_ACPI_6_1_PCCT_SUBSPACE_1_HW_REDUCED_COMMUNICATIONS; /// /// Type 2 HW-Reduced Communications Subspace Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 DoorbellInterrupt; - UINT8 DoorbellInterruptFlags; - UINT8 Reserved; - UINT64 BaseAddress; - UINT64 AddressLength; - EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; - UINT64 DoorbellPreserve; - UINT64 DoorbellWrite; - UINT32 NominalLatency; - UINT32 MaximumPeriodicAccessRate; - UINT16 MinimumRequestTurnaroundTime; - EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE DoorbellAckRegister; - UINT64 DoorbellAckPreserve; - UINT64 DoorbellAckWrite; + UINT8 Type; + UINT8 Length; + UINT32 DoorbellInterrupt; + UINT8 DoorbellInterruptFlags; + UINT8 Reserved; + UINT64 BaseAddress; + UINT64 AddressLength; + EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; + UINT64 DoorbellPreserve; + UINT64 DoorbellWrite; + UINT32 NominalLatency; + UINT32 MaximumPeriodicAccessRate; + UINT16 MinimumRequestTurnaroundTime; + EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE DoorbellAckRegister; + UINT64 DoorbellAckPreserve; + UINT64 DoorbellAckWrite; } EFI_ACPI_6_1_PCCT_SUBSPACE_2_HW_REDUCED_COMMUNICATIONS; // diff --git a/MdePkg/Include/IndustryStandard/Acpi62.h b/MdePkg/Include/IndustryStandard/Acpi62.h index 33a0a0f..0ede23c 100644 --- a/MdePkg/Include/IndustryStandard/Acpi62.h +++ b/MdePkg/Include/IndustryStandard/Acpi62.h @@ -14,20 +14,20 @@ // // Large Item Descriptor Name // -#define ACPI_LARGE_PIN_FUNCTION_DESCRIPTOR_NAME 0x0D -#define ACPI_LARGE_PIN_CONFIGURATION_DESCRIPTOR_NAME 0x0F -#define ACPI_LARGE_PIN_GROUP_DESCRIPTOR_NAME 0x10 -#define ACPI_LARGE_PIN_GROUP_FUNCTION_DESCRIPTOR_NAME 0x11 -#define ACPI_LARGE_PIN_GROUP_CONFIGURATION_DESCRIPTOR_NAME 0x12 +#define ACPI_LARGE_PIN_FUNCTION_DESCRIPTOR_NAME 0x0D +#define ACPI_LARGE_PIN_CONFIGURATION_DESCRIPTOR_NAME 0x0F +#define ACPI_LARGE_PIN_GROUP_DESCRIPTOR_NAME 0x10 +#define ACPI_LARGE_PIN_GROUP_FUNCTION_DESCRIPTOR_NAME 0x11 +#define ACPI_LARGE_PIN_GROUP_CONFIGURATION_DESCRIPTOR_NAME 0x12 // // Large Item Descriptor Value // -#define ACPI_PIN_FUNCTION_DESCRIPTOR 0x8D -#define ACPI_PIN_CONFIGURATION_DESCRIPTOR 0x8F -#define ACPI_PIN_GROUP_DESCRIPTOR 0x90 -#define ACPI_PIN_GROUP_FUNCTION_DESCRIPTOR 0x91 -#define ACPI_PIN_GROUP_CONFIGURATION_DESCRIPTOR 0x92 +#define ACPI_PIN_FUNCTION_DESCRIPTOR 0x8D +#define ACPI_PIN_CONFIGURATION_DESCRIPTOR 0x8F +#define ACPI_PIN_GROUP_DESCRIPTOR 0x90 +#define ACPI_PIN_GROUP_FUNCTION_DESCRIPTOR 0x91 +#define ACPI_PIN_GROUP_CONFIGURATION_DESCRIPTOR 0x92 #pragma pack(1) @@ -118,21 +118,21 @@ typedef PACKED struct { /// ACPI 6.2 Generic Address Space definition /// typedef struct { - UINT8 AddressSpaceId; - UINT8 RegisterBitWidth; - UINT8 RegisterBitOffset; - UINT8 AccessSize; - UINT64 Address; + UINT8 AddressSpaceId; + UINT8 RegisterBitWidth; + UINT8 RegisterBitOffset; + UINT8 AccessSize; + UINT64 Address; } EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE; // // Generic Address Space Address IDs // -#define EFI_ACPI_6_2_SYSTEM_MEMORY 0 -#define EFI_ACPI_6_2_SYSTEM_IO 1 -#define EFI_ACPI_6_2_PCI_CONFIGURATION_SPACE 2 -#define EFI_ACPI_6_2_EMBEDDED_CONTROLLER 3 -#define EFI_ACPI_6_2_SMBUS 4 +#define EFI_ACPI_6_2_SYSTEM_MEMORY 0 +#define EFI_ACPI_6_2_SYSTEM_IO 1 +#define EFI_ACPI_6_2_PCI_CONFIGURATION_SPACE 2 +#define EFI_ACPI_6_2_EMBEDDED_CONTROLLER 3 +#define EFI_ACPI_6_2_SMBUS 4 #define EFI_ACPI_6_2_PLATFORM_COMMUNICATION_CHANNEL 0x0A #define EFI_ACPI_6_2_FUNCTIONAL_FIXED_HARDWARE 0x7F @@ -153,29 +153,29 @@ typedef struct { /// Root System Description Pointer Structure /// typedef struct { - UINT64 Signature; - UINT8 Checksum; - UINT8 OemId[6]; - UINT8 Revision; - UINT32 RsdtAddress; - UINT32 Length; - UINT64 XsdtAddress; - UINT8 ExtendedChecksum; - UINT8 Reserved[3]; + UINT64 Signature; + UINT8 Checksum; + UINT8 OemId[6]; + UINT8 Revision; + UINT32 RsdtAddress; + UINT32 Length; + UINT64 XsdtAddress; + UINT8 ExtendedChecksum; + UINT8 Reserved[3]; } EFI_ACPI_6_2_ROOT_SYSTEM_DESCRIPTION_POINTER; /// /// RSD_PTR Revision (as defined in ACPI 6.2 spec.) /// -#define EFI_ACPI_6_2_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 6.2) says current value is 2 +#define EFI_ACPI_6_2_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 6.2) says current value is 2 /// /// Common table header, this prefaces all ACPI tables, including FACS, but /// excluding the RSD PTR structure /// typedef struct { - UINT32 Signature; - UINT32 Length; + UINT32 Signature; + UINT32 Length; } EFI_ACPI_6_2_COMMON_HEADER; // @@ -187,7 +187,7 @@ typedef struct { /// /// RSDT Revision (as defined in ACPI 6.2 spec.) /// -#define EFI_ACPI_6_2_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_6_2_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 // // Extended System Description Table @@ -198,74 +198,74 @@ typedef struct { /// /// XSDT Revision (as defined in ACPI 6.2 spec.) /// -#define EFI_ACPI_6_2_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_6_2_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 /// /// Fixed ACPI Description Table Structure (FADT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 FirmwareCtrl; - UINT32 Dsdt; - UINT8 Reserved0; - UINT8 PreferredPmProfile; - UINT16 SciInt; - UINT32 SmiCmd; - UINT8 AcpiEnable; - UINT8 AcpiDisable; - UINT8 S4BiosReq; - UINT8 PstateCnt; - UINT32 Pm1aEvtBlk; - UINT32 Pm1bEvtBlk; - UINT32 Pm1aCntBlk; - UINT32 Pm1bCntBlk; - UINT32 Pm2CntBlk; - UINT32 PmTmrBlk; - UINT32 Gpe0Blk; - UINT32 Gpe1Blk; - UINT8 Pm1EvtLen; - UINT8 Pm1CntLen; - UINT8 Pm2CntLen; - UINT8 PmTmrLen; - UINT8 Gpe0BlkLen; - UINT8 Gpe1BlkLen; - UINT8 Gpe1Base; - UINT8 CstCnt; - UINT16 PLvl2Lat; - UINT16 PLvl3Lat; - UINT16 FlushSize; - UINT16 FlushStride; - UINT8 DutyOffset; - UINT8 DutyWidth; - UINT8 DayAlrm; - UINT8 MonAlrm; - UINT8 Century; - UINT16 IaPcBootArch; - UINT8 Reserved1; - UINT32 Flags; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE ResetReg; - UINT8 ResetValue; - UINT16 ArmBootArch; - UINT8 MinorVersion; - UINT64 XFirmwareCtrl; - UINT64 XDsdt; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE XGpe0Blk; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE XGpe1Blk; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE SleepControlReg; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE SleepStatusReg; - UINT64 HypervisorVendorIdentity; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 FirmwareCtrl; + UINT32 Dsdt; + UINT8 Reserved0; + UINT8 PreferredPmProfile; + UINT16 SciInt; + UINT32 SmiCmd; + UINT8 AcpiEnable; + UINT8 AcpiDisable; + UINT8 S4BiosReq; + UINT8 PstateCnt; + UINT32 Pm1aEvtBlk; + UINT32 Pm1bEvtBlk; + UINT32 Pm1aCntBlk; + UINT32 Pm1bCntBlk; + UINT32 Pm2CntBlk; + UINT32 PmTmrBlk; + UINT32 Gpe0Blk; + UINT32 Gpe1Blk; + UINT8 Pm1EvtLen; + UINT8 Pm1CntLen; + UINT8 Pm2CntLen; + UINT8 PmTmrLen; + UINT8 Gpe0BlkLen; + UINT8 Gpe1BlkLen; + UINT8 Gpe1Base; + UINT8 CstCnt; + UINT16 PLvl2Lat; + UINT16 PLvl3Lat; + UINT16 FlushSize; + UINT16 FlushStride; + UINT8 DutyOffset; + UINT8 DutyWidth; + UINT8 DayAlrm; + UINT8 MonAlrm; + UINT8 Century; + UINT16 IaPcBootArch; + UINT8 Reserved1; + UINT32 Flags; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE ResetReg; + UINT8 ResetValue; + UINT16 ArmBootArch; + UINT8 MinorVersion; + UINT64 XFirmwareCtrl; + UINT64 XDsdt; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE XGpe0Blk; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE XGpe1Blk; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE SleepControlReg; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE SleepStatusReg; + UINT64 HypervisorVendorIdentity; } EFI_ACPI_6_2_FIXED_ACPI_DESCRIPTION_TABLE; /// /// FADT Version (as defined in ACPI 6.2 spec.) /// -#define EFI_ACPI_6_2_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x06 +#define EFI_ACPI_6_2_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x06 #define EFI_ACPI_6_2_FIXED_ACPI_DESCRIPTION_TABLE_MINOR_REVISION 0x02 // @@ -285,62 +285,62 @@ typedef struct { // Fixed ACPI Description Table Boot Architecture Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_6_2_LEGACY_DEVICES BIT0 -#define EFI_ACPI_6_2_8042 BIT1 -#define EFI_ACPI_6_2_VGA_NOT_PRESENT BIT2 -#define EFI_ACPI_6_2_MSI_NOT_SUPPORTED BIT3 -#define EFI_ACPI_6_2_PCIE_ASPM_CONTROLS BIT4 -#define EFI_ACPI_6_2_CMOS_RTC_NOT_PRESENT BIT5 +#define EFI_ACPI_6_2_LEGACY_DEVICES BIT0 +#define EFI_ACPI_6_2_8042 BIT1 +#define EFI_ACPI_6_2_VGA_NOT_PRESENT BIT2 +#define EFI_ACPI_6_2_MSI_NOT_SUPPORTED BIT3 +#define EFI_ACPI_6_2_PCIE_ASPM_CONTROLS BIT4 +#define EFI_ACPI_6_2_CMOS_RTC_NOT_PRESENT BIT5 // // Fixed ACPI Description Table Arm Boot Architecture Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_6_2_ARM_PSCI_COMPLIANT BIT0 -#define EFI_ACPI_6_2_ARM_PSCI_USE_HVC BIT1 +#define EFI_ACPI_6_2_ARM_PSCI_COMPLIANT BIT0 +#define EFI_ACPI_6_2_ARM_PSCI_USE_HVC BIT1 // // Fixed ACPI Description Table Fixed Feature Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_6_2_WBINVD BIT0 -#define EFI_ACPI_6_2_WBINVD_FLUSH BIT1 -#define EFI_ACPI_6_2_PROC_C1 BIT2 -#define EFI_ACPI_6_2_P_LVL2_UP BIT3 -#define EFI_ACPI_6_2_PWR_BUTTON BIT4 -#define EFI_ACPI_6_2_SLP_BUTTON BIT5 -#define EFI_ACPI_6_2_FIX_RTC BIT6 -#define EFI_ACPI_6_2_RTC_S4 BIT7 -#define EFI_ACPI_6_2_TMR_VAL_EXT BIT8 -#define EFI_ACPI_6_2_DCK_CAP BIT9 -#define EFI_ACPI_6_2_RESET_REG_SUP BIT10 -#define EFI_ACPI_6_2_SEALED_CASE BIT11 -#define EFI_ACPI_6_2_HEADLESS BIT12 -#define EFI_ACPI_6_2_CPU_SW_SLP BIT13 -#define EFI_ACPI_6_2_PCI_EXP_WAK BIT14 -#define EFI_ACPI_6_2_USE_PLATFORM_CLOCK BIT15 -#define EFI_ACPI_6_2_S4_RTC_STS_VALID BIT16 -#define EFI_ACPI_6_2_REMOTE_POWER_ON_CAPABLE BIT17 -#define EFI_ACPI_6_2_FORCE_APIC_CLUSTER_MODEL BIT18 -#define EFI_ACPI_6_2_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19 -#define EFI_ACPI_6_2_HW_REDUCED_ACPI BIT20 -#define EFI_ACPI_6_2_LOW_POWER_S0_IDLE_CAPABLE BIT21 +#define EFI_ACPI_6_2_WBINVD BIT0 +#define EFI_ACPI_6_2_WBINVD_FLUSH BIT1 +#define EFI_ACPI_6_2_PROC_C1 BIT2 +#define EFI_ACPI_6_2_P_LVL2_UP BIT3 +#define EFI_ACPI_6_2_PWR_BUTTON BIT4 +#define EFI_ACPI_6_2_SLP_BUTTON BIT5 +#define EFI_ACPI_6_2_FIX_RTC BIT6 +#define EFI_ACPI_6_2_RTC_S4 BIT7 +#define EFI_ACPI_6_2_TMR_VAL_EXT BIT8 +#define EFI_ACPI_6_2_DCK_CAP BIT9 +#define EFI_ACPI_6_2_RESET_REG_SUP BIT10 +#define EFI_ACPI_6_2_SEALED_CASE BIT11 +#define EFI_ACPI_6_2_HEADLESS BIT12 +#define EFI_ACPI_6_2_CPU_SW_SLP BIT13 +#define EFI_ACPI_6_2_PCI_EXP_WAK BIT14 +#define EFI_ACPI_6_2_USE_PLATFORM_CLOCK BIT15 +#define EFI_ACPI_6_2_S4_RTC_STS_VALID BIT16 +#define EFI_ACPI_6_2_REMOTE_POWER_ON_CAPABLE BIT17 +#define EFI_ACPI_6_2_FORCE_APIC_CLUSTER_MODEL BIT18 +#define EFI_ACPI_6_2_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19 +#define EFI_ACPI_6_2_HW_REDUCED_ACPI BIT20 +#define EFI_ACPI_6_2_LOW_POWER_S0_IDLE_CAPABLE BIT21 /// /// Firmware ACPI Control Structure /// typedef struct { - UINT32 Signature; - UINT32 Length; - UINT32 HardwareSignature; - UINT32 FirmwareWakingVector; - UINT32 GlobalLock; - UINT32 Flags; - UINT64 XFirmwareWakingVector; - UINT8 Version; - UINT8 Reserved0[3]; - UINT32 OspmFlags; - UINT8 Reserved1[24]; + UINT32 Signature; + UINT32 Length; + UINT32 HardwareSignature; + UINT32 FirmwareWakingVector; + UINT32 GlobalLock; + UINT32 Flags; + UINT64 XFirmwareWakingVector; + UINT8 Version; + UINT8 Reserved0[3]; + UINT32 OspmFlags; + UINT8 Reserved1[24]; } EFI_ACPI_6_2_FIRMWARE_ACPI_CONTROL_STRUCTURE; /// @@ -352,14 +352,14 @@ typedef struct { /// Firmware Control Structure Feature Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_6_2_S4BIOS_F BIT0 -#define EFI_ACPI_6_2_64BIT_WAKE_SUPPORTED_F BIT1 +#define EFI_ACPI_6_2_S4BIOS_F BIT0 +#define EFI_ACPI_6_2_64BIT_WAKE_SUPPORTED_F BIT1 /// /// OSPM Enabled Firmware Control Structure Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_6_2_OSPM_64BIT_WAKE_F BIT0 +#define EFI_ACPI_6_2_OSPM_64BIT_WAKE_F BIT0 // // Differentiated System Description Table, @@ -368,29 +368,29 @@ typedef struct { // no definition needed as they are common description table header, the same with // EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block. // -#define EFI_ACPI_6_2_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 -#define EFI_ACPI_6_2_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 +#define EFI_ACPI_6_2_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 +#define EFI_ACPI_6_2_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 /// /// Multiple APIC Description Table header definition. The rest of the table /// must be defined in a platform specific manner. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 LocalApicAddress; - UINT32 Flags; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 LocalApicAddress; + UINT32 Flags; } EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER; /// /// MADT Revision (as defined in ACPI 6.2 spec.) /// -#define EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x04 +#define EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x04 /// /// Multiple APIC Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_6_2_PCAT_COMPAT BIT0 +#define EFI_ACPI_6_2_PCAT_COMPAT BIT0 // // Multiple APIC Description Table APIC structure types @@ -422,57 +422,57 @@ typedef struct { /// Processor Local APIC Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorUid; - UINT8 ApicId; - UINT32 Flags; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorUid; + UINT8 ApicId; + UINT32 Flags; } EFI_ACPI_6_2_PROCESSOR_LOCAL_APIC_STRUCTURE; /// /// Local APIC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_2_LOCAL_APIC_ENABLED BIT0 +#define EFI_ACPI_6_2_LOCAL_APIC_ENABLED BIT0 /// /// IO APIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 IoApicId; - UINT8 Reserved; - UINT32 IoApicAddress; - UINT32 GlobalSystemInterruptBase; + UINT8 Type; + UINT8 Length; + UINT8 IoApicId; + UINT8 Reserved; + UINT32 IoApicAddress; + UINT32 GlobalSystemInterruptBase; } EFI_ACPI_6_2_IO_APIC_STRUCTURE; /// /// Interrupt Source Override Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Bus; - UINT8 Source; - UINT32 GlobalSystemInterrupt; - UINT16 Flags; + UINT8 Type; + UINT8 Length; + UINT8 Bus; + UINT8 Source; + UINT32 GlobalSystemInterrupt; + UINT16 Flags; } EFI_ACPI_6_2_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE; /// /// Platform Interrupt Sources Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT8 InterruptType; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT8 IoSapicVector; - UINT32 GlobalSystemInterrupt; - UINT32 PlatformInterruptSourceFlags; - UINT8 CpeiProcessorOverride; - UINT8 Reserved[31]; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT8 InterruptType; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT8 IoSapicVector; + UINT32 GlobalSystemInterrupt; + UINT32 PlatformInterruptSourceFlags; + UINT8 CpeiProcessorOverride; + UINT8 Reserved[31]; } EFI_ACPI_6_2_PLATFORM_INTERRUPT_APIC_STRUCTURE; // @@ -486,43 +486,43 @@ typedef struct { /// Non-Maskable Interrupt Source Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT32 GlobalSystemInterrupt; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT32 GlobalSystemInterrupt; } EFI_ACPI_6_2_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE; /// /// Local APIC NMI Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorUid; - UINT16 Flags; - UINT8 LocalApicLint; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorUid; + UINT16 Flags; + UINT8 LocalApicLint; } EFI_ACPI_6_2_LOCAL_APIC_NMI_STRUCTURE; /// /// Local APIC Address Override Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT64 LocalApicAddress; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT64 LocalApicAddress; } EFI_ACPI_6_2_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE; /// /// IO SAPIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 IoApicId; - UINT8 Reserved; - UINT32 GlobalSystemInterruptBase; - UINT64 IoSapicAddress; + UINT8 Type; + UINT8 Length; + UINT8 IoApicId; + UINT8 Reserved; + UINT32 GlobalSystemInterruptBase; + UINT64 IoSapicAddress; } EFI_ACPI_6_2_IO_SAPIC_STRUCTURE; /// @@ -530,169 +530,169 @@ typedef struct { /// This struct followed by a null-terminated ASCII string - ACPI Processor UID String /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorId; - UINT8 LocalSapicId; - UINT8 LocalSapicEid; - UINT8 Reserved[3]; - UINT32 Flags; - UINT32 ACPIProcessorUIDValue; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorId; + UINT8 LocalSapicId; + UINT8 LocalSapicEid; + UINT8 Reserved[3]; + UINT32 Flags; + UINT32 ACPIProcessorUIDValue; } EFI_ACPI_6_2_PROCESSOR_LOCAL_SAPIC_STRUCTURE; /// /// Platform Interrupt Sources Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT8 InterruptType; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT8 IoSapicVector; - UINT32 GlobalSystemInterrupt; - UINT32 PlatformInterruptSourceFlags; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT8 InterruptType; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT8 IoSapicVector; + UINT32 GlobalSystemInterrupt; + UINT32 PlatformInterruptSourceFlags; } EFI_ACPI_6_2_PLATFORM_INTERRUPT_SOURCES_STRUCTURE; /// /// Platform Interrupt Source Flags. /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_6_2_CPEI_PROCESSOR_OVERRIDE BIT0 +#define EFI_ACPI_6_2_CPEI_PROCESSOR_OVERRIDE BIT0 /// /// Processor Local x2APIC Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[2]; - UINT32 X2ApicId; - UINT32 Flags; - UINT32 AcpiProcessorUid; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[2]; + UINT32 X2ApicId; + UINT32 Flags; + UINT32 AcpiProcessorUid; } EFI_ACPI_6_2_PROCESSOR_LOCAL_X2APIC_STRUCTURE; /// /// Local x2APIC NMI Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT32 AcpiProcessorUid; - UINT8 LocalX2ApicLint; - UINT8 Reserved[3]; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT32 AcpiProcessorUid; + UINT8 LocalX2ApicLint; + UINT8 Reserved[3]; } EFI_ACPI_6_2_LOCAL_X2APIC_NMI_STRUCTURE; /// /// GIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT32 CPUInterfaceNumber; - UINT32 AcpiProcessorUid; - UINT32 Flags; - UINT32 ParkingProtocolVersion; - UINT32 PerformanceInterruptGsiv; - UINT64 ParkedAddress; - UINT64 PhysicalBaseAddress; - UINT64 GICV; - UINT64 GICH; - UINT32 VGICMaintenanceInterrupt; - UINT64 GICRBaseAddress; - UINT64 MPIDR; - UINT8 ProcessorPowerEfficiencyClass; - UINT8 Reserved2[3]; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT32 CPUInterfaceNumber; + UINT32 AcpiProcessorUid; + UINT32 Flags; + UINT32 ParkingProtocolVersion; + UINT32 PerformanceInterruptGsiv; + UINT64 ParkedAddress; + UINT64 PhysicalBaseAddress; + UINT64 GICV; + UINT64 GICH; + UINT32 VGICMaintenanceInterrupt; + UINT64 GICRBaseAddress; + UINT64 MPIDR; + UINT8 ProcessorPowerEfficiencyClass; + UINT8 Reserved2[3]; } EFI_ACPI_6_2_GIC_STRUCTURE; /// /// GIC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_2_GIC_ENABLED BIT0 -#define EFI_ACPI_6_2_PERFORMANCE_INTERRUPT_MODEL BIT1 -#define EFI_ACPI_6_2_VGIC_MAINTENANCE_INTERRUPT_MODE_FLAGS BIT2 +#define EFI_ACPI_6_2_GIC_ENABLED BIT0 +#define EFI_ACPI_6_2_PERFORMANCE_INTERRUPT_MODEL BIT1 +#define EFI_ACPI_6_2_VGIC_MAINTENANCE_INTERRUPT_MODE_FLAGS BIT2 /// /// GIC Distributor Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved1; - UINT32 GicId; - UINT64 PhysicalBaseAddress; - UINT32 SystemVectorBase; - UINT8 GicVersion; - UINT8 Reserved2[3]; + UINT8 Type; + UINT8 Length; + UINT16 Reserved1; + UINT32 GicId; + UINT64 PhysicalBaseAddress; + UINT32 SystemVectorBase; + UINT8 GicVersion; + UINT8 Reserved2[3]; } EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE; /// /// GIC Version /// -#define EFI_ACPI_6_2_GIC_V1 0x01 -#define EFI_ACPI_6_2_GIC_V2 0x02 -#define EFI_ACPI_6_2_GIC_V3 0x03 -#define EFI_ACPI_6_2_GIC_V4 0x04 +#define EFI_ACPI_6_2_GIC_V1 0x01 +#define EFI_ACPI_6_2_GIC_V2 0x02 +#define EFI_ACPI_6_2_GIC_V3 0x03 +#define EFI_ACPI_6_2_GIC_V4 0x04 /// /// GIC MSI Frame Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved1; - UINT32 GicMsiFrameId; - UINT64 PhysicalBaseAddress; - UINT32 Flags; - UINT16 SPICount; - UINT16 SPIBase; + UINT8 Type; + UINT8 Length; + UINT16 Reserved1; + UINT32 GicMsiFrameId; + UINT64 PhysicalBaseAddress; + UINT32 Flags; + UINT16 SPICount; + UINT16 SPIBase; } EFI_ACPI_6_2_GIC_MSI_FRAME_STRUCTURE; /// /// GIC MSI Frame Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_2_SPI_COUNT_BASE_SELECT BIT0 +#define EFI_ACPI_6_2_SPI_COUNT_BASE_SELECT BIT0 /// /// GICR Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT64 DiscoveryRangeBaseAddress; - UINT32 DiscoveryRangeLength; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT64 DiscoveryRangeBaseAddress; + UINT32 DiscoveryRangeLength; } EFI_ACPI_6_2_GICR_STRUCTURE; /// /// GIC Interrupt Translation Service Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT32 GicItsId; - UINT64 PhysicalBaseAddress; - UINT32 Reserved2; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT32 GicItsId; + UINT64 PhysicalBaseAddress; + UINT32 Reserved2; } EFI_ACPI_6_2_GIC_ITS_STRUCTURE; /// /// Smart Battery Description Table (SBST) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 WarningEnergyLevel; - UINT32 LowEnergyLevel; - UINT32 CriticalEnergyLevel; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 WarningEnergyLevel; + UINT32 LowEnergyLevel; + UINT32 CriticalEnergyLevel; } EFI_ACPI_6_2_SMART_BATTERY_DESCRIPTION_TABLE; /// /// SBST Version (as defined in ACPI 6.2 spec.) /// -#define EFI_ACPI_6_2_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_6_2_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01 /// /// Embedded Controller Boot Resources Table (ECDT) @@ -700,11 +700,11 @@ typedef struct { /// a fully qualified reference to the name space object. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE EcControl; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE EcData; - UINT32 Uid; - UINT8 GpeBit; + EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE EcControl; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE EcData; + UINT32 Uid; + UINT8 GpeBit; } EFI_ACPI_6_2_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE; /// @@ -717,9 +717,9 @@ typedef struct { /// must be defined in a platform specific manner. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 Reserved1; ///< Must be set to 1 - UINT64 Reserved2; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 Reserved1; ///< Must be set to 1 + UINT64 Reserved2; } EFI_ACPI_6_2_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER; /// @@ -742,85 +742,85 @@ typedef struct { /// Processor Local APIC/SAPIC Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 ProximityDomain7To0; - UINT8 ApicId; - UINT32 Flags; - UINT8 LocalSapicEid; - UINT8 ProximityDomain31To8[3]; - UINT32 ClockDomain; + UINT8 Type; + UINT8 Length; + UINT8 ProximityDomain7To0; + UINT8 ApicId; + UINT32 Flags; + UINT8 LocalSapicEid; + UINT8 ProximityDomain31To8[3]; + UINT32 ClockDomain; } EFI_ACPI_6_2_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE; /// /// Local APIC/SAPIC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_2_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0) +#define EFI_ACPI_6_2_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0) /// /// Memory Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 ProximityDomain; - UINT16 Reserved1; - UINT32 AddressBaseLow; - UINT32 AddressBaseHigh; - UINT32 LengthLow; - UINT32 LengthHigh; - UINT32 Reserved2; - UINT32 Flags; - UINT64 Reserved3; + UINT8 Type; + UINT8 Length; + UINT32 ProximityDomain; + UINT16 Reserved1; + UINT32 AddressBaseLow; + UINT32 AddressBaseHigh; + UINT32 LengthLow; + UINT32 LengthHigh; + UINT32 Reserved2; + UINT32 Flags; + UINT64 Reserved3; } EFI_ACPI_6_2_MEMORY_AFFINITY_STRUCTURE; // // Memory Flags. All other bits are reserved and must be 0. // -#define EFI_ACPI_6_2_MEMORY_ENABLED (1 << 0) -#define EFI_ACPI_6_2_MEMORY_HOT_PLUGGABLE (1 << 1) -#define EFI_ACPI_6_2_MEMORY_NONVOLATILE (1 << 2) +#define EFI_ACPI_6_2_MEMORY_ENABLED (1 << 0) +#define EFI_ACPI_6_2_MEMORY_HOT_PLUGGABLE (1 << 1) +#define EFI_ACPI_6_2_MEMORY_NONVOLATILE (1 << 2) /// /// Processor Local x2APIC Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved1[2]; - UINT32 ProximityDomain; - UINT32 X2ApicId; - UINT32 Flags; - UINT32 ClockDomain; - UINT8 Reserved2[4]; + UINT8 Type; + UINT8 Length; + UINT8 Reserved1[2]; + UINT32 ProximityDomain; + UINT32 X2ApicId; + UINT32 Flags; + UINT32 ClockDomain; + UINT8 Reserved2[4]; } EFI_ACPI_6_2_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE; /// /// GICC Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 ProximityDomain; - UINT32 AcpiProcessorUid; - UINT32 Flags; - UINT32 ClockDomain; + UINT8 Type; + UINT8 Length; + UINT32 ProximityDomain; + UINT32 AcpiProcessorUid; + UINT32 Flags; + UINT32 ClockDomain; } EFI_ACPI_6_2_GICC_AFFINITY_STRUCTURE; /// /// GICC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_2_GICC_ENABLED (1 << 0) +#define EFI_ACPI_6_2_GICC_ENABLED (1 << 0) /// /// GIC Interrupt Translation Service (ITS) Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 ProximityDomain; - UINT8 Reserved[2]; - UINT32 ItsId; + UINT8 Type; + UINT8 Length; + UINT32 ProximityDomain; + UINT8 Reserved[2]; + UINT32 ItsId; } EFI_ACPI_6_2_GIC_ITS_AFFINITY_STRUCTURE; /// @@ -828,8 +828,8 @@ typedef struct { /// The rest of the table is a matrix. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT64 NumberOfSystemLocalities; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT64 NumberOfSystemLocalities; } EFI_ACPI_6_2_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER; /// @@ -841,14 +841,14 @@ typedef struct { /// Corrected Platform Error Polling Table (CPEP) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 Reserved[8]; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 Reserved[8]; } EFI_ACPI_6_2_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_HEADER; /// /// CPEP Version (as defined in ACPI 6.2 spec.) /// -#define EFI_ACPI_6_2_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01 +#define EFI_ACPI_6_2_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01 // // CPEP processor structure types. @@ -859,66 +859,66 @@ typedef struct { /// Corrected Platform Error Polling Processor Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT32 PollingInterval; + UINT8 Type; + UINT8 Length; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT32 PollingInterval; } EFI_ACPI_6_2_CPEP_PROCESSOR_APIC_SAPIC_STRUCTURE; /// /// Maximum System Characteristics Table (MSCT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 OffsetProxDomInfo; - UINT32 MaximumNumberOfProximityDomains; - UINT32 MaximumNumberOfClockDomains; - UINT64 MaximumPhysicalAddress; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 OffsetProxDomInfo; + UINT32 MaximumNumberOfProximityDomains; + UINT32 MaximumNumberOfClockDomains; + UINT64 MaximumPhysicalAddress; } EFI_ACPI_6_2_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_HEADER; /// /// MSCT Version (as defined in ACPI 6.2 spec.) /// -#define EFI_ACPI_6_2_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01 +#define EFI_ACPI_6_2_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01 /// /// Maximum Proximity Domain Information Structure Definition /// typedef struct { - UINT8 Revision; - UINT8 Length; - UINT32 ProximityDomainRangeLow; - UINT32 ProximityDomainRangeHigh; - UINT32 MaximumProcessorCapacity; - UINT64 MaximumMemoryCapacity; + UINT8 Revision; + UINT8 Length; + UINT32 ProximityDomainRangeLow; + UINT32 ProximityDomainRangeHigh; + UINT32 MaximumProcessorCapacity; + UINT64 MaximumMemoryCapacity; } EFI_ACPI_6_2_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE; /// /// ACPI RAS Feature Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 PlatformCommunicationChannelIdentifier[12]; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 PlatformCommunicationChannelIdentifier[12]; } EFI_ACPI_6_2_RAS_FEATURE_TABLE; /// /// RASF Version (as defined in ACPI 6.2 spec.) /// -#define EFI_ACPI_6_2_RAS_FEATURE_TABLE_REVISION 0x01 +#define EFI_ACPI_6_2_RAS_FEATURE_TABLE_REVISION 0x01 /// /// ACPI RASF Platform Communication Channel Shared Memory Region definition. /// typedef struct { - UINT32 Signature; - UINT16 Command; - UINT16 Status; - UINT16 Version; - UINT8 RASCapabilities[16]; - UINT8 SetRASCapabilities[16]; - UINT16 NumberOfRASFParameterBlocks; - UINT32 SetRASCapabilitiesStatus; + UINT32 Signature; + UINT16 Command; + UINT16 Status; + UINT16 Version; + UINT8 RASCapabilities[16]; + UINT8 SetRASCapabilities[16]; + UINT16 NumberOfRASFParameterBlocks; + UINT32 SetRASCapabilitiesStatus; } EFI_ACPI_6_2_RASF_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION; /// @@ -929,62 +929,62 @@ typedef struct { /// /// ACPI RASF Platform RAS Capabilities /// -#define EFI_ACPI_6_2_RASF_PLATFORM_RAS_CAPABILITY_HARDWARE_BASED_PATROL_SCRUB_SUPPORTED BIT0 -#define EFI_ACPI_6_2_RASF_PLATFORM_RAS_CAPABILITY_HARDWARE_BASED_PATROL_SCRUB_SUPPORTED_AND_EXPOSED_TO_SOFTWARE BIT1 -#define EFI_ACPI_6_2_RASF_PLATFORM_RAS_CAPABILITY_CPU_CACHE_FLUSH_TO_NVDIMM_DURABILITY_ON_POWER_LOSS BIT2 -#define EFI_ACPI_6_2_RASF_PLATFORM_RAS_CAPABILITY_MEMORY_CONTROLLER_FLUSH_TO_NVDIMM_DURABILITY_ON_POWER_LOSS BIT3 -#define EFI_ACPI_6_2_RASF_PLATFORM_RAS_CAPABILITY_BYTE_ADDRESSABLE_PERSISTENT_MEMORY_HARDWARE_MIRRORING BIT4 +#define EFI_ACPI_6_2_RASF_PLATFORM_RAS_CAPABILITY_HARDWARE_BASED_PATROL_SCRUB_SUPPORTED BIT0 +#define EFI_ACPI_6_2_RASF_PLATFORM_RAS_CAPABILITY_HARDWARE_BASED_PATROL_SCRUB_SUPPORTED_AND_EXPOSED_TO_SOFTWARE BIT1 +#define EFI_ACPI_6_2_RASF_PLATFORM_RAS_CAPABILITY_CPU_CACHE_FLUSH_TO_NVDIMM_DURABILITY_ON_POWER_LOSS BIT2 +#define EFI_ACPI_6_2_RASF_PLATFORM_RAS_CAPABILITY_MEMORY_CONTROLLER_FLUSH_TO_NVDIMM_DURABILITY_ON_POWER_LOSS BIT3 +#define EFI_ACPI_6_2_RASF_PLATFORM_RAS_CAPABILITY_BYTE_ADDRESSABLE_PERSISTENT_MEMORY_HARDWARE_MIRRORING BIT4 /// /// ACPI RASF Parameter Block structure for PATROL_SCRUB /// typedef struct { - UINT16 Type; - UINT16 Version; - UINT16 Length; - UINT16 PatrolScrubCommand; - UINT64 RequestedAddressRange[2]; - UINT64 ActualAddressRange[2]; - UINT16 Flags; - UINT8 RequestedSpeed; + UINT16 Type; + UINT16 Version; + UINT16 Length; + UINT16 PatrolScrubCommand; + UINT64 RequestedAddressRange[2]; + UINT64 ActualAddressRange[2]; + UINT16 Flags; + UINT8 RequestedSpeed; } EFI_ACPI_6_2_RASF_PATROL_SCRUB_PLATFORM_BLOCK_STRUCTURE; /// /// ACPI RASF Patrol Scrub command /// -#define EFI_ACPI_6_2_RASF_PATROL_SCRUB_COMMAND_GET_PATROL_PARAMETERS 0x01 -#define EFI_ACPI_6_2_RASF_PATROL_SCRUB_COMMAND_START_PATROL_SCRUBBER 0x02 -#define EFI_ACPI_6_2_RASF_PATROL_SCRUB_COMMAND_STOP_PATROL_SCRUBBER 0x03 +#define EFI_ACPI_6_2_RASF_PATROL_SCRUB_COMMAND_GET_PATROL_PARAMETERS 0x01 +#define EFI_ACPI_6_2_RASF_PATROL_SCRUB_COMMAND_START_PATROL_SCRUBBER 0x02 +#define EFI_ACPI_6_2_RASF_PATROL_SCRUB_COMMAND_STOP_PATROL_SCRUBBER 0x03 /// /// Memory Power State Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 PlatformCommunicationChannelIdentifier; - UINT8 Reserved[3]; -// Memory Power Node Structure -// Memory Power State Characteristics + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 PlatformCommunicationChannelIdentifier; + UINT8 Reserved[3]; + // Memory Power Node Structure + // Memory Power State Characteristics } EFI_ACPI_6_2_MEMORY_POWER_STATUS_TABLE; /// /// MPST Version (as defined in ACPI 6.2 spec.) /// -#define EFI_ACPI_6_2_MEMORY_POWER_STATE_TABLE_REVISION 0x01 +#define EFI_ACPI_6_2_MEMORY_POWER_STATE_TABLE_REVISION 0x01 /// /// MPST Platform Communication Channel Shared Memory Region definition. /// typedef struct { - UINT32 Signature; - UINT16 Command; - UINT16 Status; - UINT32 MemoryPowerCommandRegister; - UINT32 MemoryPowerStatusRegister; - UINT32 PowerStateId; - UINT32 MemoryPowerNodeId; - UINT64 MemoryEnergyConsumed; - UINT64 ExpectedAveragePowerComsuned; + UINT32 Signature; + UINT16 Command; + UINT16 Status; + UINT32 MemoryPowerCommandRegister; + UINT32 MemoryPowerStatusRegister; + UINT32 PowerStateId; + UINT32 MemoryPowerNodeId; + UINT64 MemoryEnergyConsumed; + UINT64 ExpectedAveragePowerComsuned; } EFI_ACPI_6_2_MPST_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION; /// @@ -995,186 +995,186 @@ typedef struct { /// /// ACPI MPST Memory Power command /// -#define EFI_ACPI_6_2_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_POWER_STATE 0x01 -#define EFI_ACPI_6_2_MPST_MEMORY_POWER_COMMAND_SET_MEMORY_POWER_STATE 0x02 -#define EFI_ACPI_6_2_MPST_MEMORY_POWER_COMMAND_GET_AVERAGE_POWER_CONSUMED 0x03 -#define EFI_ACPI_6_2_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_ENERGY_CONSUMED 0x04 +#define EFI_ACPI_6_2_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_POWER_STATE 0x01 +#define EFI_ACPI_6_2_MPST_MEMORY_POWER_COMMAND_SET_MEMORY_POWER_STATE 0x02 +#define EFI_ACPI_6_2_MPST_MEMORY_POWER_COMMAND_GET_AVERAGE_POWER_CONSUMED 0x03 +#define EFI_ACPI_6_2_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_ENERGY_CONSUMED 0x04 /// /// MPST Memory Power Node Table /// typedef struct { - UINT8 PowerStateValue; - UINT8 PowerStateInformationIndex; + UINT8 PowerStateValue; + UINT8 PowerStateInformationIndex; } EFI_ACPI_6_2_MPST_MEMORY_POWER_STATE; typedef struct { - UINT8 Flag; - UINT8 Reserved; - UINT16 MemoryPowerNodeId; - UINT32 Length; - UINT64 AddressBase; - UINT64 AddressLength; - UINT32 NumberOfPowerStates; - UINT32 NumberOfPhysicalComponents; -//EFI_ACPI_6_2_MPST_MEMORY_POWER_STATE MemoryPowerState[NumberOfPowerStates]; -//UINT16 PhysicalComponentIdentifier[NumberOfPhysicalComponents]; + UINT8 Flag; + UINT8 Reserved; + UINT16 MemoryPowerNodeId; + UINT32 Length; + UINT64 AddressBase; + UINT64 AddressLength; + UINT32 NumberOfPowerStates; + UINT32 NumberOfPhysicalComponents; + // EFI_ACPI_6_2_MPST_MEMORY_POWER_STATE MemoryPowerState[NumberOfPowerStates]; + // UINT16 PhysicalComponentIdentifier[NumberOfPhysicalComponents]; } EFI_ACPI_6_2_MPST_MEMORY_POWER_STRUCTURE; -#define EFI_ACPI_6_2_MPST_MEMORY_POWER_STRUCTURE_FLAG_ENABLE 0x01 -#define EFI_ACPI_6_2_MPST_MEMORY_POWER_STRUCTURE_FLAG_POWER_MANAGED 0x02 -#define EFI_ACPI_6_2_MPST_MEMORY_POWER_STRUCTURE_FLAG_HOT_PLUGGABLE 0x04 +#define EFI_ACPI_6_2_MPST_MEMORY_POWER_STRUCTURE_FLAG_ENABLE 0x01 +#define EFI_ACPI_6_2_MPST_MEMORY_POWER_STRUCTURE_FLAG_POWER_MANAGED 0x02 +#define EFI_ACPI_6_2_MPST_MEMORY_POWER_STRUCTURE_FLAG_HOT_PLUGGABLE 0x04 typedef struct { - UINT16 MemoryPowerNodeCount; - UINT8 Reserved[2]; + UINT16 MemoryPowerNodeCount; + UINT8 Reserved[2]; } EFI_ACPI_6_2_MPST_MEMORY_POWER_NODE_TABLE; /// /// MPST Memory Power State Characteristics Table /// typedef struct { - UINT8 PowerStateStructureID; - UINT8 Flag; - UINT16 Reserved; - UINT32 AveragePowerConsumedInMPS0; - UINT32 RelativePowerSavingToMPS0; - UINT64 ExitLatencyToMPS0; + UINT8 PowerStateStructureID; + UINT8 Flag; + UINT16 Reserved; + UINT32 AveragePowerConsumedInMPS0; + UINT32 RelativePowerSavingToMPS0; + UINT64 ExitLatencyToMPS0; } EFI_ACPI_6_2_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE; -#define EFI_ACPI_6_2_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_MEMORY_CONTENT_PRESERVED 0x01 -#define EFI_ACPI_6_2_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_ENTRY 0x02 -#define EFI_ACPI_6_2_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_EXIT 0x04 +#define EFI_ACPI_6_2_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_MEMORY_CONTENT_PRESERVED 0x01 +#define EFI_ACPI_6_2_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_ENTRY 0x02 +#define EFI_ACPI_6_2_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_EXIT 0x04 typedef struct { - UINT16 MemoryPowerStateCharacteristicsCount; - UINT8 Reserved[2]; + UINT16 MemoryPowerStateCharacteristicsCount; + UINT8 Reserved[2]; } EFI_ACPI_6_2_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_TABLE; /// /// Memory Topology Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 Reserved; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 Reserved; } EFI_ACPI_6_2_MEMORY_TOPOLOGY_TABLE; /// /// PMTT Version (as defined in ACPI 6.2 spec.) /// -#define EFI_ACPI_6_2_MEMORY_TOPOLOGY_TABLE_REVISION 0x01 +#define EFI_ACPI_6_2_MEMORY_TOPOLOGY_TABLE_REVISION 0x01 /// /// Common Memory Aggregator Device Structure. /// typedef struct { - UINT8 Type; - UINT8 Reserved; - UINT16 Length; - UINT16 Flags; - UINT16 Reserved1; + UINT8 Type; + UINT8 Reserved; + UINT16 Length; + UINT16 Flags; + UINT16 Reserved1; } EFI_ACPI_6_2_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE; /// /// Memory Aggregator Device Type /// -#define EFI_ACPI_6_2_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_SOCKET 0x0 -#define EFI_ACPI_6_2_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_MEMORY_CONTROLLER 0x1 -#define EFI_ACPI_6_2_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_DIMM 0x2 +#define EFI_ACPI_6_2_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_SOCKET 0x0 +#define EFI_ACPI_6_2_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_MEMORY_CONTROLLER 0x1 +#define EFI_ACPI_6_2_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_DIMM 0x2 /// /// Socket Memory Aggregator Device Structure. /// typedef struct { - EFI_ACPI_6_2_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; - UINT16 SocketIdentifier; - UINT16 Reserved; -//EFI_ACPI_6_2_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE MemoryController[]; + EFI_ACPI_6_2_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; + UINT16 SocketIdentifier; + UINT16 Reserved; + // EFI_ACPI_6_2_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE MemoryController[]; } EFI_ACPI_6_2_PMMT_SOCKET_MEMORY_AGGREGATOR_DEVICE_STRUCTURE; /// /// MemoryController Memory Aggregator Device Structure. /// typedef struct { - EFI_ACPI_6_2_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; - UINT32 ReadLatency; - UINT32 WriteLatency; - UINT32 ReadBandwidth; - UINT32 WriteBandwidth; - UINT16 OptimalAccessUnit; - UINT16 OptimalAccessAlignment; - UINT16 Reserved; - UINT16 NumberOfProximityDomains; -//UINT32 ProximityDomain[NumberOfProximityDomains]; -//EFI_ACPI_6_2_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE PhysicalComponent[]; + EFI_ACPI_6_2_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; + UINT32 ReadLatency; + UINT32 WriteLatency; + UINT32 ReadBandwidth; + UINT32 WriteBandwidth; + UINT16 OptimalAccessUnit; + UINT16 OptimalAccessAlignment; + UINT16 Reserved; + UINT16 NumberOfProximityDomains; + // UINT32 ProximityDomain[NumberOfProximityDomains]; + // EFI_ACPI_6_2_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE PhysicalComponent[]; } EFI_ACPI_6_2_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE; /// /// DIMM Memory Aggregator Device Structure. /// typedef struct { - EFI_ACPI_6_2_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; - UINT16 PhysicalComponentIdentifier; - UINT16 Reserved; - UINT32 SizeOfDimm; - UINT32 SmbiosHandle; + EFI_ACPI_6_2_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; + UINT16 PhysicalComponentIdentifier; + UINT16 Reserved; + UINT32 SizeOfDimm; + UINT32 SmbiosHandle; } EFI_ACPI_6_2_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE; /// /// Boot Graphics Resource Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_DESCRIPTION_HEADER Header; /// /// 2-bytes (16 bit) version ID. This value must be 1. /// - UINT16 Version; + UINT16 Version; /// /// 1-byte status field indicating current status about the table. /// Bits[7:1] = Reserved (must be zero) /// Bit [0] = Valid. A one indicates the boot image graphic is valid. /// - UINT8 Status; + UINT8 Status; /// /// 1-byte enumerated type field indicating format of the image. /// 0 = Bitmap /// 1 - 255 Reserved (for future use) /// - UINT8 ImageType; + UINT8 ImageType; /// /// 8-byte (64 bit) physical address pointing to the firmware's in-memory copy /// of the image bitmap. /// - UINT64 ImageAddress; + UINT64 ImageAddress; /// /// A 4-byte (32-bit) unsigned long describing the display X-offset of the boot image. /// (X, Y) display offset of the top left corner of the boot image. /// The top left corner of the display is at offset (0, 0). /// - UINT32 ImageOffsetX; + UINT32 ImageOffsetX; /// /// A 4-byte (32-bit) unsigned long describing the display Y-offset of the boot image. /// (X, Y) display offset of the top left corner of the boot image. /// The top left corner of the display is at offset (0, 0). /// - UINT32 ImageOffsetY; + UINT32 ImageOffsetY; } EFI_ACPI_6_2_BOOT_GRAPHICS_RESOURCE_TABLE; /// /// BGRT Revision /// -#define EFI_ACPI_6_2_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION 1 +#define EFI_ACPI_6_2_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION 1 /// /// BGRT Version /// -#define EFI_ACPI_6_2_BGRT_VERSION 0x01 +#define EFI_ACPI_6_2_BGRT_VERSION 0x01 /// /// BGRT Status /// -#define EFI_ACPI_6_2_BGRT_STATUS_NOT_DISPLAYED 0x00 -#define EFI_ACPI_6_2_BGRT_STATUS_DISPLAYED 0x01 +#define EFI_ACPI_6_2_BGRT_STATUS_NOT_DISPLAYED 0x00 +#define EFI_ACPI_6_2_BGRT_STATUS_DISPLAYED 0x01 /// /// BGRT Image Type @@ -1184,26 +1184,26 @@ typedef struct { /// /// FPDT Version (as defined in ACPI 6.2 spec.) /// -#define EFI_ACPI_6_2_FIRMWARE_PERFORMANCE_DATA_TABLE_REVISION 0x01 +#define EFI_ACPI_6_2_FIRMWARE_PERFORMANCE_DATA_TABLE_REVISION 0x01 /// /// FPDT Performance Record Types /// -#define EFI_ACPI_6_2_FPDT_RECORD_TYPE_FIRMWARE_BASIC_BOOT_POINTER 0x0000 -#define EFI_ACPI_6_2_FPDT_RECORD_TYPE_S3_PERFORMANCE_TABLE_POINTER 0x0001 +#define EFI_ACPI_6_2_FPDT_RECORD_TYPE_FIRMWARE_BASIC_BOOT_POINTER 0x0000 +#define EFI_ACPI_6_2_FPDT_RECORD_TYPE_S3_PERFORMANCE_TABLE_POINTER 0x0001 /// /// FPDT Performance Record Revision /// -#define EFI_ACPI_6_2_FPDT_RECORD_REVISION_FIRMWARE_BASIC_BOOT_POINTER 0x01 -#define EFI_ACPI_6_2_FPDT_RECORD_REVISION_S3_PERFORMANCE_TABLE_POINTER 0x01 +#define EFI_ACPI_6_2_FPDT_RECORD_REVISION_FIRMWARE_BASIC_BOOT_POINTER 0x01 +#define EFI_ACPI_6_2_FPDT_RECORD_REVISION_S3_PERFORMANCE_TABLE_POINTER 0x01 /// /// FPDT Runtime Performance Record Types /// -#define EFI_ACPI_6_2_FPDT_RUNTIME_RECORD_TYPE_S3_RESUME 0x0000 -#define EFI_ACPI_6_2_FPDT_RUNTIME_RECORD_TYPE_S3_SUSPEND 0x0001 -#define EFI_ACPI_6_2_FPDT_RUNTIME_RECORD_TYPE_FIRMWARE_BASIC_BOOT 0x0002 +#define EFI_ACPI_6_2_FPDT_RUNTIME_RECORD_TYPE_S3_RESUME 0x0000 +#define EFI_ACPI_6_2_FPDT_RUNTIME_RECORD_TYPE_S3_SUSPEND 0x0001 +#define EFI_ACPI_6_2_FPDT_RUNTIME_RECORD_TYPE_FIRMWARE_BASIC_BOOT 0x0002 /// /// FPDT Runtime Performance Record Revision @@ -1216,77 +1216,77 @@ typedef struct { /// FPDT Performance Record header /// typedef struct { - UINT16 Type; - UINT8 Length; - UINT8 Revision; + UINT16 Type; + UINT8 Length; + UINT8 Revision; } EFI_ACPI_6_2_FPDT_PERFORMANCE_RECORD_HEADER; /// /// FPDT Performance Table header /// typedef struct { - UINT32 Signature; - UINT32 Length; + UINT32 Signature; + UINT32 Length; } EFI_ACPI_6_2_FPDT_PERFORMANCE_TABLE_HEADER; /// /// FPDT Firmware Basic Boot Performance Pointer Record Structure /// typedef struct { - EFI_ACPI_6_2_FPDT_PERFORMANCE_RECORD_HEADER Header; - UINT32 Reserved; + EFI_ACPI_6_2_FPDT_PERFORMANCE_RECORD_HEADER Header; + UINT32 Reserved; /// /// 64-bit processor-relative physical address of the Basic Boot Performance Table. /// - UINT64 BootPerformanceTablePointer; + UINT64 BootPerformanceTablePointer; } EFI_ACPI_6_2_FPDT_BOOT_PERFORMANCE_TABLE_POINTER_RECORD; /// /// FPDT S3 Performance Table Pointer Record Structure /// typedef struct { - EFI_ACPI_6_2_FPDT_PERFORMANCE_RECORD_HEADER Header; - UINT32 Reserved; + EFI_ACPI_6_2_FPDT_PERFORMANCE_RECORD_HEADER Header; + UINT32 Reserved; /// /// 64-bit processor-relative physical address of the S3 Performance Table. /// - UINT64 S3PerformanceTablePointer; + UINT64 S3PerformanceTablePointer; } EFI_ACPI_6_2_FPDT_S3_PERFORMANCE_TABLE_POINTER_RECORD; /// /// FPDT Firmware Basic Boot Performance Record Structure /// typedef struct { - EFI_ACPI_6_2_FPDT_PERFORMANCE_RECORD_HEADER Header; - UINT32 Reserved; + EFI_ACPI_6_2_FPDT_PERFORMANCE_RECORD_HEADER Header; + UINT32 Reserved; /// /// Timer value logged at the beginning of firmware image execution. /// This may not always be zero or near zero. /// - UINT64 ResetEnd; + UINT64 ResetEnd; /// /// Timer value logged just prior to loading the OS boot loader into memory. /// For non-UEFI compatible boots, this field must be zero. /// - UINT64 OsLoaderLoadImageStart; + UINT64 OsLoaderLoadImageStart; /// /// Timer value logged just prior to launching the previously loaded OS boot loader image. /// For non-UEFI compatible boots, the timer value logged will be just prior /// to the INT 19h handler invocation. /// - UINT64 OsLoaderStartImageStart; + UINT64 OsLoaderStartImageStart; /// /// Timer value logged at the point when the OS loader calls the /// ExitBootServices function for UEFI compatible firmware. /// For non-UEFI compatible boots, this field must be zero. /// - UINT64 ExitBootServicesEntry; + UINT64 ExitBootServicesEntry; /// /// Timer value logged at the point just prior to when the OS loader gaining /// control back from calls the ExitBootServices function for UEFI compatible firmware. /// For non-UEFI compatible boots, this field must be zero. /// - UINT64 ExitBootServicesExit; + UINT64 ExitBootServicesExit; } EFI_ACPI_6_2_FPDT_FIRMWARE_BASIC_BOOT_RECORD; /// @@ -1298,7 +1298,7 @@ typedef struct { // FPDT Firmware Basic Boot Performance Table // typedef struct { - EFI_ACPI_6_2_FPDT_PERFORMANCE_TABLE_HEADER Header; + EFI_ACPI_6_2_FPDT_PERFORMANCE_TABLE_HEADER Header; // // one or more Performance Records. // @@ -1313,7 +1313,7 @@ typedef struct { // FPDT Firmware S3 Boot Performance Table // typedef struct { - EFI_ACPI_6_2_FPDT_PERFORMANCE_TABLE_HEADER Header; + EFI_ACPI_6_2_FPDT_PERFORMANCE_TABLE_HEADER Header; // // one or more Performance Records. // @@ -1323,145 +1323,145 @@ typedef struct { /// FPDT Basic S3 Resume Performance Record /// typedef struct { - EFI_ACPI_6_2_FPDT_PERFORMANCE_RECORD_HEADER Header; + EFI_ACPI_6_2_FPDT_PERFORMANCE_RECORD_HEADER Header; /// /// A count of the number of S3 resume cycles since the last full boot sequence. /// - UINT32 ResumeCount; + UINT32 ResumeCount; /// /// Timer recorded at the end of BIOS S3 resume, just prior to handoff to the /// OS waking vector. Only the most recent resume cycle's time is retained. /// - UINT64 FullResume; + UINT64 FullResume; /// /// Average timer value of all resume cycles logged since the last full boot /// sequence, including the most recent resume. Note that the entire log of /// timer values does not need to be retained in order to calculate this average. /// - UINT64 AverageResume; + UINT64 AverageResume; } EFI_ACPI_6_2_FPDT_S3_RESUME_RECORD; /// /// FPDT Basic S3 Suspend Performance Record /// typedef struct { - EFI_ACPI_6_2_FPDT_PERFORMANCE_RECORD_HEADER Header; + EFI_ACPI_6_2_FPDT_PERFORMANCE_RECORD_HEADER Header; /// /// Timer value recorded at the OS write to SLP_TYP upon entry to S3. /// Only the most recent suspend cycle's timer value is retained. /// - UINT64 SuspendStart; + UINT64 SuspendStart; /// /// Timer value recorded at the final firmware write to SLP_TYP (or other /// mechanism) used to trigger hardware entry to S3. /// Only the most recent suspend cycle's timer value is retained. /// - UINT64 SuspendEnd; + UINT64 SuspendEnd; } EFI_ACPI_6_2_FPDT_S3_SUSPEND_RECORD; /// /// Firmware Performance Record Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_DESCRIPTION_HEADER Header; } EFI_ACPI_6_2_FIRMWARE_PERFORMANCE_RECORD_TABLE; /// /// Generic Timer Description Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT64 CntControlBasePhysicalAddress; - UINT32 Reserved; - UINT32 SecurePL1TimerGSIV; - UINT32 SecurePL1TimerFlags; - UINT32 NonSecurePL1TimerGSIV; - UINT32 NonSecurePL1TimerFlags; - UINT32 VirtualTimerGSIV; - UINT32 VirtualTimerFlags; - UINT32 NonSecurePL2TimerGSIV; - UINT32 NonSecurePL2TimerFlags; - UINT64 CntReadBasePhysicalAddress; - UINT32 PlatformTimerCount; - UINT32 PlatformTimerOffset; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT64 CntControlBasePhysicalAddress; + UINT32 Reserved; + UINT32 SecurePL1TimerGSIV; + UINT32 SecurePL1TimerFlags; + UINT32 NonSecurePL1TimerGSIV; + UINT32 NonSecurePL1TimerFlags; + UINT32 VirtualTimerGSIV; + UINT32 VirtualTimerFlags; + UINT32 NonSecurePL2TimerGSIV; + UINT32 NonSecurePL2TimerFlags; + UINT64 CntReadBasePhysicalAddress; + UINT32 PlatformTimerCount; + UINT32 PlatformTimerOffset; } EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE; /// /// GTDT Version (as defined in ACPI 6.2 spec.) /// -#define EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION 0x02 +#define EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION 0x02 /// /// Timer Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_2_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 -#define EFI_ACPI_6_2_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 -#define EFI_ACPI_6_2_GTDT_TIMER_FLAG_ALWAYS_ON_CAPABILITY BIT2 +#define EFI_ACPI_6_2_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 +#define EFI_ACPI_6_2_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 +#define EFI_ACPI_6_2_GTDT_TIMER_FLAG_ALWAYS_ON_CAPABILITY BIT2 /// /// Platform Timer Type /// -#define EFI_ACPI_6_2_GTDT_GT_BLOCK 0 -#define EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG 1 +#define EFI_ACPI_6_2_GTDT_GT_BLOCK 0 +#define EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG 1 /// /// GT Block Structure /// typedef struct { - UINT8 Type; - UINT16 Length; - UINT8 Reserved; - UINT64 CntCtlBase; - UINT32 GTBlockTimerCount; - UINT32 GTBlockTimerOffset; + UINT8 Type; + UINT16 Length; + UINT8 Reserved; + UINT64 CntCtlBase; + UINT32 GTBlockTimerCount; + UINT32 GTBlockTimerOffset; } EFI_ACPI_6_2_GTDT_GT_BLOCK_STRUCTURE; /// /// GT Block Timer Structure /// typedef struct { - UINT8 GTFrameNumber; - UINT8 Reserved[3]; - UINT64 CntBaseX; - UINT64 CntEL0BaseX; - UINT32 GTxPhysicalTimerGSIV; - UINT32 GTxPhysicalTimerFlags; - UINT32 GTxVirtualTimerGSIV; - UINT32 GTxVirtualTimerFlags; - UINT32 GTxCommonFlags; + UINT8 GTFrameNumber; + UINT8 Reserved[3]; + UINT64 CntBaseX; + UINT64 CntEL0BaseX; + UINT32 GTxPhysicalTimerGSIV; + UINT32 GTxPhysicalTimerFlags; + UINT32 GTxVirtualTimerGSIV; + UINT32 GTxVirtualTimerFlags; + UINT32 GTxCommonFlags; } EFI_ACPI_6_2_GTDT_GT_BLOCK_TIMER_STRUCTURE; /// /// GT Block Physical Timers and Virtual Timers Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_2_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 -#define EFI_ACPI_6_2_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 +#define EFI_ACPI_6_2_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 +#define EFI_ACPI_6_2_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 /// /// Common Flags Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_2_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER BIT0 -#define EFI_ACPI_6_2_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY BIT1 +#define EFI_ACPI_6_2_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER BIT0 +#define EFI_ACPI_6_2_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY BIT1 /// /// SBSA Generic Watchdog Structure /// typedef struct { - UINT8 Type; - UINT16 Length; - UINT8 Reserved; - UINT64 RefreshFramePhysicalAddress; - UINT64 WatchdogControlFramePhysicalAddress; - UINT32 WatchdogTimerGSIV; - UINT32 WatchdogTimerFlags; + UINT8 Type; + UINT16 Length; + UINT8 Reserved; + UINT64 RefreshFramePhysicalAddress; + UINT64 WatchdogControlFramePhysicalAddress; + UINT32 WatchdogTimerGSIV; + UINT32 WatchdogTimerFlags; } EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE; /// /// SBSA Generic Watchdog Timer Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_MODE BIT0 -#define EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_POLARITY BIT1 -#define EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER BIT2 +#define EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_MODE BIT0 +#define EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_POLARITY BIT1 +#define EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER BIT2 // // NVDIMM Firmware Interface Table definition. @@ -1474,63 +1474,63 @@ typedef struct { // // NFIT Version (as defined in ACPI 6.2 spec.) // -#define EFI_ACPI_6_2_NVDIMM_FIRMWARE_INTERFACE_TABLE_REVISION 0x1 +#define EFI_ACPI_6_2_NVDIMM_FIRMWARE_INTERFACE_TABLE_REVISION 0x1 // // Definition for NFIT Table Structure Types // -#define EFI_ACPI_6_2_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_STRUCTURE_TYPE 0 -#define EFI_ACPI_6_2_NFIT_NVDIMM_REGION_MAPPING_STRUCTURE_TYPE 1 -#define EFI_ACPI_6_2_NFIT_INTERLEAVE_STRUCTURE_TYPE 2 -#define EFI_ACPI_6_2_NFIT_SMBIOS_MANAGEMENT_INFORMATION_STRUCTURE_TYPE 3 -#define EFI_ACPI_6_2_NFIT_NVDIMM_CONTROL_REGION_STRUCTURE_TYPE 4 -#define EFI_ACPI_6_2_NFIT_NVDIMM_BLOCK_DATA_WINDOW_REGION_STRUCTURE_TYPE 5 -#define EFI_ACPI_6_2_NFIT_FLUSH_HINT_ADDRESS_STRUCTURE_TYPE 6 +#define EFI_ACPI_6_2_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_STRUCTURE_TYPE 0 +#define EFI_ACPI_6_2_NFIT_NVDIMM_REGION_MAPPING_STRUCTURE_TYPE 1 +#define EFI_ACPI_6_2_NFIT_INTERLEAVE_STRUCTURE_TYPE 2 +#define EFI_ACPI_6_2_NFIT_SMBIOS_MANAGEMENT_INFORMATION_STRUCTURE_TYPE 3 +#define EFI_ACPI_6_2_NFIT_NVDIMM_CONTROL_REGION_STRUCTURE_TYPE 4 +#define EFI_ACPI_6_2_NFIT_NVDIMM_BLOCK_DATA_WINDOW_REGION_STRUCTURE_TYPE 5 +#define EFI_ACPI_6_2_NFIT_FLUSH_HINT_ADDRESS_STRUCTURE_TYPE 6 // // Definition for NFIT Structure Header // typedef struct { - UINT16 Type; - UINT16 Length; + UINT16 Type; + UINT16 Length; } EFI_ACPI_6_2_NFIT_STRUCTURE_HEADER; // // Definition for System Physical Address Range Structure // -#define EFI_ACPI_6_2_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_CONTROL_REGION_FOR_MANAGEMENT BIT0 -#define EFI_ACPI_6_2_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_PROXIMITY_DOMAIN_VALID BIT1 -#define EFI_ACPI_6_2_NFIT_GUID_VOLATILE_MEMORY_REGION { 0x7305944F, 0xFDDA, 0x44E3, { 0xB1, 0x6C, 0x3F, 0x22, 0xD2, 0x52, 0xE5, 0xD0 }} -#define EFI_ACPI_6_2_NFIT_GUID_BYTE_ADDRESSABLE_PERSISTENT_MEMORY_REGION { 0x66F0D379, 0xB4F3, 0x4074, { 0xAC, 0x43, 0x0D, 0x33, 0x18, 0xB7, 0x8C, 0xDB }} -#define EFI_ACPI_6_2_NFIT_GUID_NVDIMM_CONTROL_REGION { 0x92F701F6, 0x13B4, 0x405D, { 0x91, 0x0B, 0x29, 0x93, 0x67, 0xE8, 0x23, 0x4C }} -#define EFI_ACPI_6_2_NFIT_GUID_NVDIMM_BLOCK_DATA_WINDOW_REGION { 0x91AF0530, 0x5D86, 0x470E, { 0xA6, 0xB0, 0x0A, 0x2D, 0xB9, 0x40, 0x82, 0x49 }} -#define EFI_ACPI_6_2_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE { 0x77AB535A, 0x45FC, 0x624B, { 0x55, 0x60, 0xF7, 0xB2, 0x81, 0xD1, 0xF9, 0x6E }} -#define EFI_ACPI_6_2_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE { 0x3D5ABD30, 0x4175, 0x87CE, { 0x6D, 0x64, 0xD2, 0xAD, 0xE5, 0x23, 0xC4, 0xBB }} -#define EFI_ACPI_6_2_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT { 0x5CEA02C9, 0x4D07, 0x69D3, { 0x26, 0x9F ,0x44, 0x96, 0xFB, 0xE0, 0x96, 0xF9 }} -#define EFI_ACPI_6_2_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT { 0x08018188, 0x42CD, 0xBB48, { 0x10, 0x0F, 0x53, 0x87, 0xD5, 0x3D, 0xED, 0x3D }} -typedef struct { - UINT16 Type; - UINT16 Length; - UINT16 SPARangeStructureIndex; - UINT16 Flags; - UINT32 Reserved_8; - UINT32 ProximityDomain; - GUID AddressRangeTypeGUID; - UINT64 SystemPhysicalAddressRangeBase; - UINT64 SystemPhysicalAddressRangeLength; - UINT64 AddressRangeMemoryMappingAttribute; +#define EFI_ACPI_6_2_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_CONTROL_REGION_FOR_MANAGEMENT BIT0 +#define EFI_ACPI_6_2_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_PROXIMITY_DOMAIN_VALID BIT1 +#define EFI_ACPI_6_2_NFIT_GUID_VOLATILE_MEMORY_REGION { 0x7305944F, 0xFDDA, 0x44E3, { 0xB1, 0x6C, 0x3F, 0x22, 0xD2, 0x52, 0xE5, 0xD0 }} +#define EFI_ACPI_6_2_NFIT_GUID_BYTE_ADDRESSABLE_PERSISTENT_MEMORY_REGION { 0x66F0D379, 0xB4F3, 0x4074, { 0xAC, 0x43, 0x0D, 0x33, 0x18, 0xB7, 0x8C, 0xDB }} +#define EFI_ACPI_6_2_NFIT_GUID_NVDIMM_CONTROL_REGION { 0x92F701F6, 0x13B4, 0x405D, { 0x91, 0x0B, 0x29, 0x93, 0x67, 0xE8, 0x23, 0x4C }} +#define EFI_ACPI_6_2_NFIT_GUID_NVDIMM_BLOCK_DATA_WINDOW_REGION { 0x91AF0530, 0x5D86, 0x470E, { 0xA6, 0xB0, 0x0A, 0x2D, 0xB9, 0x40, 0x82, 0x49 }} +#define EFI_ACPI_6_2_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE { 0x77AB535A, 0x45FC, 0x624B, { 0x55, 0x60, 0xF7, 0xB2, 0x81, 0xD1, 0xF9, 0x6E }} +#define EFI_ACPI_6_2_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE { 0x3D5ABD30, 0x4175, 0x87CE, { 0x6D, 0x64, 0xD2, 0xAD, 0xE5, 0x23, 0xC4, 0xBB }} +#define EFI_ACPI_6_2_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT { 0x5CEA02C9, 0x4D07, 0x69D3, { 0x26, 0x9F ,0x44, 0x96, 0xFB, 0xE0, 0x96, 0xF9 }} +#define EFI_ACPI_6_2_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT { 0x08018188, 0x42CD, 0xBB48, { 0x10, 0x0F, 0x53, 0x87, 0xD5, 0x3D, 0xED, 0x3D }} +typedef struct { + UINT16 Type; + UINT16 Length; + UINT16 SPARangeStructureIndex; + UINT16 Flags; + UINT32 Reserved_8; + UINT32 ProximityDomain; + GUID AddressRangeTypeGUID; + UINT64 SystemPhysicalAddressRangeBase; + UINT64 SystemPhysicalAddressRangeLength; + UINT64 AddressRangeMemoryMappingAttribute; } EFI_ACPI_6_2_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_STRUCTURE; // // Definition for Memory Device to System Physical Address Range Mapping Structure // typedef struct { - UINT32 DIMMNumber:4; - UINT32 MemoryChannelNumber:4; - UINT32 MemoryControllerID:4; - UINT32 SocketID:4; - UINT32 NodeControllerID:12; - UINT32 Reserved_28:4; + UINT32 DIMMNumber : 4; + UINT32 MemoryChannelNumber : 4; + UINT32 MemoryControllerID : 4; + UINT32 SocketID : 4; + UINT32 NodeControllerID : 12; + UINT32 Reserved_28 : 4; } EFI_ACPI_6_2_NFIT_DEVICE_HANDLE; #define EFI_ACPI_6_2_NFIT_MEMORY_DEVICE_STATE_FLAGS_PREVIOUS_SAVE_FAIL BIT0 @@ -1541,198 +1541,198 @@ typedef struct { #define EFI_ACPI_6_2_NFIT_MEMORY_DEVICE_STATE_FLAGS_FIRMWARE_ENABLED_TO_NOTIFY_OSPM_ON_SMART_HEALTH_EVENTS BIT5 #define EFI_ACPI_6_2_NFIT_MEMORY_DEVICE_STATE_FLAGS_FIRMWARE_NOT_MAP_NVDIMM_TO_SPA BIT6 typedef struct { - UINT16 Type; - UINT16 Length; - EFI_ACPI_6_2_NFIT_DEVICE_HANDLE NFITDeviceHandle; - UINT16 NVDIMMPhysicalID; - UINT16 NVDIMMRegionID; - UINT16 SPARangeStructureIndex ; - UINT16 NVDIMMControlRegionStructureIndex; - UINT64 NVDIMMRegionSize; - UINT64 RegionOffset; - UINT64 NVDIMMPhysicalAddressRegionBase; - UINT16 InterleaveStructureIndex; - UINT16 InterleaveWays; - UINT16 NVDIMMStateFlags; - UINT16 Reserved_46; + UINT16 Type; + UINT16 Length; + EFI_ACPI_6_2_NFIT_DEVICE_HANDLE NFITDeviceHandle; + UINT16 NVDIMMPhysicalID; + UINT16 NVDIMMRegionID; + UINT16 SPARangeStructureIndex; + UINT16 NVDIMMControlRegionStructureIndex; + UINT64 NVDIMMRegionSize; + UINT64 RegionOffset; + UINT64 NVDIMMPhysicalAddressRegionBase; + UINT16 InterleaveStructureIndex; + UINT16 InterleaveWays; + UINT16 NVDIMMStateFlags; + UINT16 Reserved_46; } EFI_ACPI_6_2_NFIT_NVDIMM_REGION_MAPPING_STRUCTURE; // // Definition for Interleave Structure // typedef struct { - UINT16 Type; - UINT16 Length; - UINT16 InterleaveStructureIndex; - UINT16 Reserved_6; - UINT32 NumberOfLines; - UINT32 LineSize; -//UINT32 LineOffset[NumberOfLines]; + UINT16 Type; + UINT16 Length; + UINT16 InterleaveStructureIndex; + UINT16 Reserved_6; + UINT32 NumberOfLines; + UINT32 LineSize; + // UINT32 LineOffset[NumberOfLines]; } EFI_ACPI_6_2_NFIT_INTERLEAVE_STRUCTURE; // // Definition for SMBIOS Management Information Structure // typedef struct { - UINT16 Type; - UINT16 Length; - UINT32 Reserved_4; -//UINT8 Data[]; + UINT16 Type; + UINT16 Length; + UINT32 Reserved_4; + // UINT8 Data[]; } EFI_ACPI_6_2_NFIT_SMBIOS_MANAGEMENT_INFORMATION_STRUCTURE; // // Definition for NVDIMM Control Region Structure // -#define EFI_ACPI_6_2_NFIT_NVDIMM_CONTROL_REGION_VALID_FIELDS_MANUFACTURING BIT0 - -#define EFI_ACPI_6_2_NFIT_NVDIMM_CONTROL_REGION_FLAGS_BLOCK_DATA_WINDOWS_BUFFERED BIT0 -typedef struct { - UINT16 Type; - UINT16 Length; - UINT16 NVDIMMControlRegionStructureIndex; - UINT16 VendorID; - UINT16 DeviceID; - UINT16 RevisionID; - UINT16 SubsystemVendorID; - UINT16 SubsystemDeviceID; - UINT16 SubsystemRevisionID; - UINT8 ValidFields; - UINT8 ManufacturingLocation; - UINT16 ManufacturingDate; - UINT8 Reserved_22[2]; - UINT32 SerialNumber; - UINT16 RegionFormatInterfaceCode; - UINT16 NumberOfBlockControlWindows; - UINT64 SizeOfBlockControlWindow; - UINT64 CommandRegisterOffsetInBlockControlWindow; - UINT64 SizeOfCommandRegisterInBlockControlWindows; - UINT64 StatusRegisterOffsetInBlockControlWindow; - UINT64 SizeOfStatusRegisterInBlockControlWindows; - UINT16 NVDIMMControlRegionFlag; - UINT8 Reserved_74[6]; +#define EFI_ACPI_6_2_NFIT_NVDIMM_CONTROL_REGION_VALID_FIELDS_MANUFACTURING BIT0 + +#define EFI_ACPI_6_2_NFIT_NVDIMM_CONTROL_REGION_FLAGS_BLOCK_DATA_WINDOWS_BUFFERED BIT0 +typedef struct { + UINT16 Type; + UINT16 Length; + UINT16 NVDIMMControlRegionStructureIndex; + UINT16 VendorID; + UINT16 DeviceID; + UINT16 RevisionID; + UINT16 SubsystemVendorID; + UINT16 SubsystemDeviceID; + UINT16 SubsystemRevisionID; + UINT8 ValidFields; + UINT8 ManufacturingLocation; + UINT16 ManufacturingDate; + UINT8 Reserved_22[2]; + UINT32 SerialNumber; + UINT16 RegionFormatInterfaceCode; + UINT16 NumberOfBlockControlWindows; + UINT64 SizeOfBlockControlWindow; + UINT64 CommandRegisterOffsetInBlockControlWindow; + UINT64 SizeOfCommandRegisterInBlockControlWindows; + UINT64 StatusRegisterOffsetInBlockControlWindow; + UINT64 SizeOfStatusRegisterInBlockControlWindows; + UINT16 NVDIMMControlRegionFlag; + UINT8 Reserved_74[6]; } EFI_ACPI_6_2_NFIT_NVDIMM_CONTROL_REGION_STRUCTURE; // // Definition for NVDIMM Block Data Window Region Structure // typedef struct { - UINT16 Type; - UINT16 Length; - UINT16 NVDIMMControlRegionStructureIndex; - UINT16 NumberOfBlockDataWindows; - UINT64 BlockDataWindowStartOffset; - UINT64 SizeOfBlockDataWindow; - UINT64 BlockAccessibleMemoryCapacity; - UINT64 BeginningAddressOfFirstBlockInBlockAccessibleMemory; + UINT16 Type; + UINT16 Length; + UINT16 NVDIMMControlRegionStructureIndex; + UINT16 NumberOfBlockDataWindows; + UINT64 BlockDataWindowStartOffset; + UINT64 SizeOfBlockDataWindow; + UINT64 BlockAccessibleMemoryCapacity; + UINT64 BeginningAddressOfFirstBlockInBlockAccessibleMemory; } EFI_ACPI_6_2_NFIT_NVDIMM_BLOCK_DATA_WINDOW_REGION_STRUCTURE; // // Definition for Flush Hint Address Structure // typedef struct { - UINT16 Type; - UINT16 Length; - EFI_ACPI_6_2_NFIT_DEVICE_HANDLE NFITDeviceHandle; - UINT16 NumberOfFlushHintAddresses; - UINT8 Reserved_10[6]; -//UINT64 FlushHintAddress[NumberOfFlushHintAddresses]; + UINT16 Type; + UINT16 Length; + EFI_ACPI_6_2_NFIT_DEVICE_HANDLE NFITDeviceHandle; + UINT16 NumberOfFlushHintAddresses; + UINT8 Reserved_10[6]; + // UINT64 FlushHintAddress[NumberOfFlushHintAddresses]; } EFI_ACPI_6_2_NFIT_FLUSH_HINT_ADDRESS_STRUCTURE; /// /// Secure DEVices Table (SDEV) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_DESCRIPTION_HEADER Header; } EFI_ACPI_6_2_SECURE_DEVICES_TABLE_HEADER; /// /// SDEV Revision (as defined in ACPI 6.2 spec.) /// -#define EFI_ACPI_6_2_SECURE_DEVICES_TABLE_REVISION 0x01 +#define EFI_ACPI_6_2_SECURE_DEVICES_TABLE_REVISION 0x01 /// /// Secure Device types /// -#define EFI_ACPI_6_2_SDEV_TYPE_PCIE_ENDPOINT_DEVICE 0x01 -#define EFI_ACPI_6_2_SDEV_TYPE_ACPI_NAMESPACE_DEVICE 0x00 +#define EFI_ACPI_6_2_SDEV_TYPE_PCIE_ENDPOINT_DEVICE 0x01 +#define EFI_ACPI_6_2_SDEV_TYPE_ACPI_NAMESPACE_DEVICE 0x00 /// /// Secure Device flags /// -#define EFI_ACPI_6_2_SDEV_FLAG_ALLOW_HANDOFF BIT0 +#define EFI_ACPI_6_2_SDEV_FLAG_ALLOW_HANDOFF BIT0 /// /// SDEV Structure Header /// typedef struct { - UINT8 Type; - UINT8 Flags; - UINT16 Length; + UINT8 Type; + UINT8 Flags; + UINT16 Length; } EFI_ACPI_6_2_SDEV_STRUCTURE_HEADER; /// /// PCIe Endpoint Device based Secure Device Structure /// typedef struct { - UINT8 Type; - UINT8 Flags; - UINT16 Length; - UINT16 PciSegmentNumber; - UINT16 StartBusNumber; - UINT16 PciPathOffset; - UINT16 PciPathLength; - UINT16 VendorSpecificDataOffset; - UINT16 VendorSpecificDataLength; + UINT8 Type; + UINT8 Flags; + UINT16 Length; + UINT16 PciSegmentNumber; + UINT16 StartBusNumber; + UINT16 PciPathOffset; + UINT16 PciPathLength; + UINT16 VendorSpecificDataOffset; + UINT16 VendorSpecificDataLength; } EFI_ACPI_6_2_SDEV_STRUCTURE_PCIE_ENDPOINT_DEVICE; /// /// ACPI_NAMESPACE_DEVICE based Secure Device Structure /// typedef struct { - UINT8 Type; - UINT8 Flags; - UINT16 Length; - UINT16 DeviceIdentifierOffset; - UINT16 DeviceIdentifierLength; - UINT16 VendorSpecificDataOffset; - UINT16 VendorSpecificDataLength; + UINT8 Type; + UINT8 Flags; + UINT16 Length; + UINT16 DeviceIdentifierOffset; + UINT16 DeviceIdentifierLength; + UINT16 VendorSpecificDataOffset; + UINT16 VendorSpecificDataLength; } EFI_ACPI_6_2_SDEV_STRUCTURE_ACPI_NAMESPACE_DEVICE; /// /// Boot Error Record Table (BERT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 BootErrorRegionLength; - UINT64 BootErrorRegion; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 BootErrorRegionLength; + UINT64 BootErrorRegion; } EFI_ACPI_6_2_BOOT_ERROR_RECORD_TABLE_HEADER; /// /// BERT Version (as defined in ACPI 6.2 spec.) /// -#define EFI_ACPI_6_2_BOOT_ERROR_RECORD_TABLE_REVISION 0x01 +#define EFI_ACPI_6_2_BOOT_ERROR_RECORD_TABLE_REVISION 0x01 /// /// Boot Error Region Block Status Definition /// typedef struct { - UINT32 UncorrectableErrorValid:1; - UINT32 CorrectableErrorValid:1; - UINT32 MultipleUncorrectableErrors:1; - UINT32 MultipleCorrectableErrors:1; - UINT32 ErrorDataEntryCount:10; - UINT32 Reserved:18; + UINT32 UncorrectableErrorValid : 1; + UINT32 CorrectableErrorValid : 1; + UINT32 MultipleUncorrectableErrors : 1; + UINT32 MultipleCorrectableErrors : 1; + UINT32 ErrorDataEntryCount : 10; + UINT32 Reserved : 18; } EFI_ACPI_6_2_ERROR_BLOCK_STATUS; /// /// Boot Error Region Definition /// typedef struct { - EFI_ACPI_6_2_ERROR_BLOCK_STATUS BlockStatus; - UINT32 RawDataOffset; - UINT32 RawDataLength; - UINT32 DataLength; - UINT32 ErrorSeverity; + EFI_ACPI_6_2_ERROR_BLOCK_STATUS BlockStatus; + UINT32 RawDataOffset; + UINT32 RawDataLength; + UINT32 DataLength; + UINT32 ErrorSeverity; } EFI_ACPI_6_2_BOOT_ERROR_REGION_STRUCTURE; // @@ -1747,15 +1747,15 @@ typedef struct { /// Generic Error Data Entry Definition /// typedef struct { - UINT8 SectionType[16]; - UINT32 ErrorSeverity; - UINT16 Revision; - UINT8 ValidationBits; - UINT8 Flags; - UINT32 ErrorDataLength; - UINT8 FruId[16]; - UINT8 FruText[20]; - UINT8 Timestamp[8]; + UINT8 SectionType[16]; + UINT32 ErrorSeverity; + UINT16 Revision; + UINT8 ValidationBits; + UINT8 Flags; + UINT32 ErrorDataLength; + UINT8 FruId[16]; + UINT8 FruText[20]; + UINT8 Timestamp[8]; } EFI_ACPI_6_2_GENERIC_ERROR_DATA_ENTRY_STRUCTURE; /// @@ -1767,14 +1767,14 @@ typedef struct { /// HEST - Hardware Error Source Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 ErrorSourceCount; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 ErrorSourceCount; } EFI_ACPI_6_2_HARDWARE_ERROR_SOURCE_TABLE_HEADER; /// /// HEST Version (as defined in ACPI 6.2 spec.) /// -#define EFI_ACPI_6_2_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01 +#define EFI_ACPI_6_2_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01 // // Error Source structure types. @@ -1792,237 +1792,237 @@ typedef struct { // // Error Source structure flags. // -#define EFI_ACPI_6_2_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0) -#define EFI_ACPI_6_2_ERROR_SOURCE_FLAG_GLOBAL (1 << 1) -#define EFI_ACPI_6_2_ERROR_SOURCE_FLAG_GHES_ASSIST (1 << 2) +#define EFI_ACPI_6_2_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0) +#define EFI_ACPI_6_2_ERROR_SOURCE_FLAG_GLOBAL (1 << 1) +#define EFI_ACPI_6_2_ERROR_SOURCE_FLAG_GHES_ASSIST (1 << 2) /// /// IA-32 Architecture Machine Check Exception Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT64 GlobalCapabilityInitData; - UINT64 GlobalControlInitData; - UINT8 NumberOfHardwareBanks; - UINT8 Reserved1[7]; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT64 GlobalCapabilityInitData; + UINT64 GlobalControlInitData; + UINT8 NumberOfHardwareBanks; + UINT8 Reserved1[7]; } EFI_ACPI_6_2_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION_STRUCTURE; /// /// IA-32 Architecture Machine Check Bank Structure Definition /// typedef struct { - UINT8 BankNumber; - UINT8 ClearStatusOnInitialization; - UINT8 StatusDataFormat; - UINT8 Reserved0; - UINT32 ControlRegisterMsrAddress; - UINT64 ControlInitData; - UINT32 StatusRegisterMsrAddress; - UINT32 AddressRegisterMsrAddress; - UINT32 MiscRegisterMsrAddress; + UINT8 BankNumber; + UINT8 ClearStatusOnInitialization; + UINT8 StatusDataFormat; + UINT8 Reserved0; + UINT32 ControlRegisterMsrAddress; + UINT64 ControlInitData; + UINT32 StatusRegisterMsrAddress; + UINT32 AddressRegisterMsrAddress; + UINT32 MiscRegisterMsrAddress; } EFI_ACPI_6_2_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_BANK_STRUCTURE; /// /// IA-32 Architecture Machine Check Bank Structure MCA data format /// -#define EFI_ACPI_6_2_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00 -#define EFI_ACPI_6_2_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01 -#define EFI_ACPI_6_2_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02 +#define EFI_ACPI_6_2_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00 +#define EFI_ACPI_6_2_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01 +#define EFI_ACPI_6_2_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02 // // Hardware Error Notification types. All other values are reserved // -#define EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00 -#define EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01 -#define EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02 -#define EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_SCI 0x03 -#define EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_NMI 0x04 -#define EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_CMCI 0x05 -#define EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_MCE 0x06 -#define EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_GPIO_SIGNAL 0x07 -#define EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_ARMV8_SEA 0x08 -#define EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_ARMV8_SEI 0x09 -#define EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_GSIV 0x0A -#define EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_SOFTWARE_DELEGATED_EXCEPTION 0x0B +#define EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00 +#define EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01 +#define EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02 +#define EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_SCI 0x03 +#define EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_NMI 0x04 +#define EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_CMCI 0x05 +#define EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_MCE 0x06 +#define EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_GPIO_SIGNAL 0x07 +#define EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_ARMV8_SEA 0x08 +#define EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_ARMV8_SEI 0x09 +#define EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_GSIV 0x0A +#define EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_SOFTWARE_DELEGATED_EXCEPTION 0x0B /// /// Hardware Error Notification Configuration Write Enable Structure Definition /// typedef struct { - UINT16 Type:1; - UINT16 PollInterval:1; - UINT16 SwitchToPollingThresholdValue:1; - UINT16 SwitchToPollingThresholdWindow:1; - UINT16 ErrorThresholdValue:1; - UINT16 ErrorThresholdWindow:1; - UINT16 Reserved:10; + UINT16 Type : 1; + UINT16 PollInterval : 1; + UINT16 SwitchToPollingThresholdValue : 1; + UINT16 SwitchToPollingThresholdWindow : 1; + UINT16 ErrorThresholdValue : 1; + UINT16 ErrorThresholdWindow : 1; + UINT16 Reserved : 10; } EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE; /// /// Hardware Error Notification Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable; - UINT32 PollInterval; - UINT32 Vector; - UINT32 SwitchToPollingThresholdValue; - UINT32 SwitchToPollingThresholdWindow; - UINT32 ErrorThresholdValue; - UINT32 ErrorThresholdWindow; + UINT8 Type; + UINT8 Length; + EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable; + UINT32 PollInterval; + UINT32 Vector; + UINT32 SwitchToPollingThresholdValue; + UINT32 SwitchToPollingThresholdWindow; + UINT32 ErrorThresholdValue; + UINT32 ErrorThresholdWindow; } EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_STRUCTURE; /// /// IA-32 Architecture Corrected Machine Check Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; - UINT8 NumberOfHardwareBanks; - UINT8 Reserved1[3]; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; + UINT8 NumberOfHardwareBanks; + UINT8 Reserved1[3]; } EFI_ACPI_6_2_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK_STRUCTURE; /// /// IA-32 Architecture NMI Error Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 MaxRawDataLength; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 MaxRawDataLength; } EFI_ACPI_6_2_IA32_ARCHITECTURE_NMI_ERROR_STRUCTURE; /// /// PCI Express Root Port AER Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 Bus; - UINT16 Device; - UINT16 Function; - UINT16 DeviceControl; - UINT8 Reserved1[2]; - UINT32 UncorrectableErrorMask; - UINT32 UncorrectableErrorSeverity; - UINT32 CorrectableErrorMask; - UINT32 AdvancedErrorCapabilitiesAndControl; - UINT32 RootErrorCommand; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 Bus; + UINT16 Device; + UINT16 Function; + UINT16 DeviceControl; + UINT8 Reserved1[2]; + UINT32 UncorrectableErrorMask; + UINT32 UncorrectableErrorSeverity; + UINT32 CorrectableErrorMask; + UINT32 AdvancedErrorCapabilitiesAndControl; + UINT32 RootErrorCommand; } EFI_ACPI_6_2_PCI_EXPRESS_ROOT_PORT_AER_STRUCTURE; /// /// PCI Express Device AER Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 Bus; - UINT16 Device; - UINT16 Function; - UINT16 DeviceControl; - UINT8 Reserved1[2]; - UINT32 UncorrectableErrorMask; - UINT32 UncorrectableErrorSeverity; - UINT32 CorrectableErrorMask; - UINT32 AdvancedErrorCapabilitiesAndControl; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 Bus; + UINT16 Device; + UINT16 Function; + UINT16 DeviceControl; + UINT8 Reserved1[2]; + UINT32 UncorrectableErrorMask; + UINT32 UncorrectableErrorSeverity; + UINT32 CorrectableErrorMask; + UINT32 AdvancedErrorCapabilitiesAndControl; } EFI_ACPI_6_2_PCI_EXPRESS_DEVICE_AER_STRUCTURE; /// /// PCI Express Bridge AER Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 Bus; - UINT16 Device; - UINT16 Function; - UINT16 DeviceControl; - UINT8 Reserved1[2]; - UINT32 UncorrectableErrorMask; - UINT32 UncorrectableErrorSeverity; - UINT32 CorrectableErrorMask; - UINT32 AdvancedErrorCapabilitiesAndControl; - UINT32 SecondaryUncorrectableErrorMask; - UINT32 SecondaryUncorrectableErrorSeverity; - UINT32 SecondaryAdvancedErrorCapabilitiesAndControl; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 Bus; + UINT16 Device; + UINT16 Function; + UINT16 DeviceControl; + UINT8 Reserved1[2]; + UINT32 UncorrectableErrorMask; + UINT32 UncorrectableErrorSeverity; + UINT32 CorrectableErrorMask; + UINT32 AdvancedErrorCapabilitiesAndControl; + UINT32 SecondaryUncorrectableErrorMask; + UINT32 SecondaryUncorrectableErrorSeverity; + UINT32 SecondaryAdvancedErrorCapabilitiesAndControl; } EFI_ACPI_6_2_PCI_EXPRESS_BRIDGE_AER_STRUCTURE; /// /// Generic Hardware Error Source Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT16 RelatedSourceId; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 MaxRawDataLength; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress; - EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; - UINT32 ErrorStatusBlockLength; + UINT16 Type; + UINT16 SourceId; + UINT16 RelatedSourceId; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 MaxRawDataLength; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress; + EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; + UINT32 ErrorStatusBlockLength; } EFI_ACPI_6_2_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE; /// /// Generic Hardware Error Source Version 2 Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT16 RelatedSourceId; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 MaxRawDataLength; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress; - EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; - UINT32 ErrorStatusBlockLength; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE ReadAckRegister; - UINT64 ReadAckPreserve; - UINT64 ReadAckWrite; + UINT16 Type; + UINT16 SourceId; + UINT16 RelatedSourceId; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 MaxRawDataLength; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress; + EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; + UINT32 ErrorStatusBlockLength; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE ReadAckRegister; + UINT64 ReadAckPreserve; + UINT64 ReadAckWrite; } EFI_ACPI_6_2_GENERIC_HARDWARE_ERROR_SOURCE_VERSION_2_STRUCTURE; /// /// Generic Error Status Definition /// typedef struct { - EFI_ACPI_6_2_ERROR_BLOCK_STATUS BlockStatus; - UINT32 RawDataOffset; - UINT32 RawDataLength; - UINT32 DataLength; - UINT32 ErrorSeverity; + EFI_ACPI_6_2_ERROR_BLOCK_STATUS BlockStatus; + UINT32 RawDataOffset; + UINT32 RawDataLength; + UINT32 DataLength; + UINT32 ErrorSeverity; } EFI_ACPI_6_2_GENERIC_ERROR_STATUS_STRUCTURE; /// @@ -2039,301 +2039,301 @@ typedef struct { EFI_ACPI_6_2_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; UINT8 NumberOfHardwareBanks; UINT8 Reserved1[3]; -} EFI_ACPI_6_2_IA32_ARCHITECTURE_DEFERRED_MACHINE_CHECK_STRUCTURE;; +} EFI_ACPI_6_2_IA32_ARCHITECTURE_DEFERRED_MACHINE_CHECK_STRUCTURE; /// /// HMAT - Heterogeneous Memory Attribute Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 Reserved[4]; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 Reserved[4]; } EFI_ACPI_6_2_HETEROGENEOUS_MEMORY_ATTRIBUTE_TABLE_HEADER; /// /// HMAT Revision (as defined in ACPI 6.2 spec.) /// -#define EFI_ACPI_6_2_HETEROGENEOUS_MEMORY_ATTRIBUTE_TABLE_REVISION 0x01 +#define EFI_ACPI_6_2_HETEROGENEOUS_MEMORY_ATTRIBUTE_TABLE_REVISION 0x01 /// /// HMAT types /// -#define EFI_ACPI_6_2_HMAT_TYPE_MEMORY_SUBSYSTEM_ADDRESS_RANGE 0x00 -#define EFI_ACPI_6_2_HMAT_TYPE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO 0x01 -#define EFI_ACPI_6_2_HMAT_TYPE_MEMORY_SIDE_CACHE_INFO 0x02 +#define EFI_ACPI_6_2_HMAT_TYPE_MEMORY_SUBSYSTEM_ADDRESS_RANGE 0x00 +#define EFI_ACPI_6_2_HMAT_TYPE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO 0x01 +#define EFI_ACPI_6_2_HMAT_TYPE_MEMORY_SIDE_CACHE_INFO 0x02 /// /// HMAT Structure Header /// typedef struct { - UINT16 Type; - UINT8 Reserved[2]; - UINT32 Length; + UINT16 Type; + UINT8 Reserved[2]; + UINT32 Length; } EFI_ACPI_6_2_HMAT_STRUCTURE_HEADER; /// /// Memory Subsystem Address Range Structure flags /// typedef struct { - UINT16 ProcessorProximityDomainValid:1; - UINT16 MemoryProximityDomainValid:1; - UINT16 ReservationHint:1; - UINT16 Reserved:13; + UINT16 ProcessorProximityDomainValid : 1; + UINT16 MemoryProximityDomainValid : 1; + UINT16 ReservationHint : 1; + UINT16 Reserved : 13; } EFI_ACPI_6_2_HMAT_STRUCTURE_MEMORY_SUBSYSTEM_ADDRESS_RANGE_FLAGS; /// /// Memory Subsystem Address Range Structure /// typedef struct { - UINT16 Type; - UINT8 Reserved[2]; - UINT32 Length; - EFI_ACPI_6_2_HMAT_STRUCTURE_MEMORY_SUBSYSTEM_ADDRESS_RANGE_FLAGS Flags; - UINT8 Reserved1[2]; - UINT32 ProcessorProximityDomain; - UINT32 MemoryProximityDomain; - UINT8 Reserved2[4]; - UINT64 SystemPhysicalAddressRangeBase; - UINT64 SystemPhysicalAddressRangeLength; + UINT16 Type; + UINT8 Reserved[2]; + UINT32 Length; + EFI_ACPI_6_2_HMAT_STRUCTURE_MEMORY_SUBSYSTEM_ADDRESS_RANGE_FLAGS Flags; + UINT8 Reserved1[2]; + UINT32 ProcessorProximityDomain; + UINT32 MemoryProximityDomain; + UINT8 Reserved2[4]; + UINT64 SystemPhysicalAddressRangeBase; + UINT64 SystemPhysicalAddressRangeLength; } EFI_ACPI_6_2_HMAT_STRUCTURE_MEMORY_SUBSYSTEM_ADDRESS_RANGE; /// /// System Locality Latency and Bandwidth Information Structure flags /// typedef struct { - UINT8 MemoryHierarchy:5; - UINT8 Reserved:3; + UINT8 MemoryHierarchy : 5; + UINT8 Reserved : 3; } EFI_ACPI_6_2_HMAT_STRUCTURE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO_FLAGS; /// /// System Locality Latency and Bandwidth Information Structure /// typedef struct { - UINT16 Type; - UINT8 Reserved[2]; - UINT32 Length; - EFI_ACPI_6_2_HMAT_STRUCTURE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO_FLAGS Flags; - UINT8 DataType; - UINT8 Reserved1[2]; - UINT32 NumberOfInitiatorProximityDomains; - UINT32 NumberOfTargetProximityDomains; - UINT8 Reserved2[4]; - UINT64 EntryBaseUnit; + UINT16 Type; + UINT8 Reserved[2]; + UINT32 Length; + EFI_ACPI_6_2_HMAT_STRUCTURE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO_FLAGS Flags; + UINT8 DataType; + UINT8 Reserved1[2]; + UINT32 NumberOfInitiatorProximityDomains; + UINT32 NumberOfTargetProximityDomains; + UINT8 Reserved2[4]; + UINT64 EntryBaseUnit; } EFI_ACPI_6_2_HMAT_STRUCTURE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO; /// /// Memory Side Cache Information Structure cache attributes /// typedef struct { - UINT32 TotalCacheLevels:4; - UINT32 CacheLevel:4; - UINT32 CacheAssociativity:4; - UINT32 WritePolicy:4; - UINT32 CacheLineSize:16; + UINT32 TotalCacheLevels : 4; + UINT32 CacheLevel : 4; + UINT32 CacheAssociativity : 4; + UINT32 WritePolicy : 4; + UINT32 CacheLineSize : 16; } EFI_ACPI_6_2_HMAT_STRUCTURE_MEMORY_SIDE_CACHE_INFO_CACHE_ATTRIBUTES; /// /// Memory Side Cache Information Structure /// typedef struct { - UINT16 Type; - UINT8 Reserved[2]; - UINT32 Length; - UINT32 MemoryProximityDomain; - UINT8 Reserved1[4]; - UINT64 MemorySideCacheSize; - EFI_ACPI_6_2_HMAT_STRUCTURE_MEMORY_SIDE_CACHE_INFO_CACHE_ATTRIBUTES CacheAttributes; - UINT8 Reserved2[2]; - UINT16 NumberOfSmbiosHandles; + UINT16 Type; + UINT8 Reserved[2]; + UINT32 Length; + UINT32 MemoryProximityDomain; + UINT8 Reserved1[4]; + UINT64 MemorySideCacheSize; + EFI_ACPI_6_2_HMAT_STRUCTURE_MEMORY_SIDE_CACHE_INFO_CACHE_ATTRIBUTES CacheAttributes; + UINT8 Reserved2[2]; + UINT16 NumberOfSmbiosHandles; } EFI_ACPI_6_2_HMAT_STRUCTURE_MEMORY_SIDE_CACHE_INFO; /// /// ERST - Error Record Serialization Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 SerializationHeaderSize; - UINT8 Reserved0[4]; - UINT32 InstructionEntryCount; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 SerializationHeaderSize; + UINT8 Reserved0[4]; + UINT32 InstructionEntryCount; } EFI_ACPI_6_2_ERROR_RECORD_SERIALIZATION_TABLE_HEADER; /// /// ERST Version (as defined in ACPI 6.2 spec.) /// -#define EFI_ACPI_6_2_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01 +#define EFI_ACPI_6_2_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01 /// /// ERST Serialization Actions /// -#define EFI_ACPI_6_2_ERST_BEGIN_WRITE_OPERATION 0x00 -#define EFI_ACPI_6_2_ERST_BEGIN_READ_OPERATION 0x01 -#define EFI_ACPI_6_2_ERST_BEGIN_CLEAR_OPERATION 0x02 -#define EFI_ACPI_6_2_ERST_END_OPERATION 0x03 -#define EFI_ACPI_6_2_ERST_SET_RECORD_OFFSET 0x04 -#define EFI_ACPI_6_2_ERST_EXECUTE_OPERATION 0x05 -#define EFI_ACPI_6_2_ERST_CHECK_BUSY_STATUS 0x06 -#define EFI_ACPI_6_2_ERST_GET_COMMAND_STATUS 0x07 -#define EFI_ACPI_6_2_ERST_GET_RECORD_IDENTIFIER 0x08 -#define EFI_ACPI_6_2_ERST_SET_RECORD_IDENTIFIER 0x09 -#define EFI_ACPI_6_2_ERST_GET_RECORD_COUNT 0x0A -#define EFI_ACPI_6_2_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B -#define EFI_ACPI_6_2_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D -#define EFI_ACPI_6_2_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E -#define EFI_ACPI_6_2_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F -#define EFI_ACPI_6_2_ERST_GET_EXECUTE_OPERATION_TIMINGS 0x10 +#define EFI_ACPI_6_2_ERST_BEGIN_WRITE_OPERATION 0x00 +#define EFI_ACPI_6_2_ERST_BEGIN_READ_OPERATION 0x01 +#define EFI_ACPI_6_2_ERST_BEGIN_CLEAR_OPERATION 0x02 +#define EFI_ACPI_6_2_ERST_END_OPERATION 0x03 +#define EFI_ACPI_6_2_ERST_SET_RECORD_OFFSET 0x04 +#define EFI_ACPI_6_2_ERST_EXECUTE_OPERATION 0x05 +#define EFI_ACPI_6_2_ERST_CHECK_BUSY_STATUS 0x06 +#define EFI_ACPI_6_2_ERST_GET_COMMAND_STATUS 0x07 +#define EFI_ACPI_6_2_ERST_GET_RECORD_IDENTIFIER 0x08 +#define EFI_ACPI_6_2_ERST_SET_RECORD_IDENTIFIER 0x09 +#define EFI_ACPI_6_2_ERST_GET_RECORD_COUNT 0x0A +#define EFI_ACPI_6_2_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B +#define EFI_ACPI_6_2_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D +#define EFI_ACPI_6_2_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E +#define EFI_ACPI_6_2_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F +#define EFI_ACPI_6_2_ERST_GET_EXECUTE_OPERATION_TIMINGS 0x10 /// /// ERST Action Command Status /// -#define EFI_ACPI_6_2_ERST_STATUS_SUCCESS 0x00 -#define EFI_ACPI_6_2_ERST_STATUS_NOT_ENOUGH_SPACE 0x01 -#define EFI_ACPI_6_2_ERST_STATUS_HARDWARE_NOT_AVAILABLE 0x02 -#define EFI_ACPI_6_2_ERST_STATUS_FAILED 0x03 -#define EFI_ACPI_6_2_ERST_STATUS_RECORD_STORE_EMPTY 0x04 -#define EFI_ACPI_6_2_ERST_STATUS_RECORD_NOT_FOUND 0x05 +#define EFI_ACPI_6_2_ERST_STATUS_SUCCESS 0x00 +#define EFI_ACPI_6_2_ERST_STATUS_NOT_ENOUGH_SPACE 0x01 +#define EFI_ACPI_6_2_ERST_STATUS_HARDWARE_NOT_AVAILABLE 0x02 +#define EFI_ACPI_6_2_ERST_STATUS_FAILED 0x03 +#define EFI_ACPI_6_2_ERST_STATUS_RECORD_STORE_EMPTY 0x04 +#define EFI_ACPI_6_2_ERST_STATUS_RECORD_NOT_FOUND 0x05 /// /// ERST Serialization Instructions /// -#define EFI_ACPI_6_2_ERST_READ_REGISTER 0x00 -#define EFI_ACPI_6_2_ERST_READ_REGISTER_VALUE 0x01 -#define EFI_ACPI_6_2_ERST_WRITE_REGISTER 0x02 -#define EFI_ACPI_6_2_ERST_WRITE_REGISTER_VALUE 0x03 -#define EFI_ACPI_6_2_ERST_NOOP 0x04 -#define EFI_ACPI_6_2_ERST_LOAD_VAR1 0x05 -#define EFI_ACPI_6_2_ERST_LOAD_VAR2 0x06 -#define EFI_ACPI_6_2_ERST_STORE_VAR1 0x07 -#define EFI_ACPI_6_2_ERST_ADD 0x08 -#define EFI_ACPI_6_2_ERST_SUBTRACT 0x09 -#define EFI_ACPI_6_2_ERST_ADD_VALUE 0x0A -#define EFI_ACPI_6_2_ERST_SUBTRACT_VALUE 0x0B -#define EFI_ACPI_6_2_ERST_STALL 0x0C -#define EFI_ACPI_6_2_ERST_STALL_WHILE_TRUE 0x0D -#define EFI_ACPI_6_2_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E -#define EFI_ACPI_6_2_ERST_GOTO 0x0F -#define EFI_ACPI_6_2_ERST_SET_SRC_ADDRESS_BASE 0x10 -#define EFI_ACPI_6_2_ERST_SET_DST_ADDRESS_BASE 0x11 -#define EFI_ACPI_6_2_ERST_MOVE_DATA 0x12 +#define EFI_ACPI_6_2_ERST_READ_REGISTER 0x00 +#define EFI_ACPI_6_2_ERST_READ_REGISTER_VALUE 0x01 +#define EFI_ACPI_6_2_ERST_WRITE_REGISTER 0x02 +#define EFI_ACPI_6_2_ERST_WRITE_REGISTER_VALUE 0x03 +#define EFI_ACPI_6_2_ERST_NOOP 0x04 +#define EFI_ACPI_6_2_ERST_LOAD_VAR1 0x05 +#define EFI_ACPI_6_2_ERST_LOAD_VAR2 0x06 +#define EFI_ACPI_6_2_ERST_STORE_VAR1 0x07 +#define EFI_ACPI_6_2_ERST_ADD 0x08 +#define EFI_ACPI_6_2_ERST_SUBTRACT 0x09 +#define EFI_ACPI_6_2_ERST_ADD_VALUE 0x0A +#define EFI_ACPI_6_2_ERST_SUBTRACT_VALUE 0x0B +#define EFI_ACPI_6_2_ERST_STALL 0x0C +#define EFI_ACPI_6_2_ERST_STALL_WHILE_TRUE 0x0D +#define EFI_ACPI_6_2_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E +#define EFI_ACPI_6_2_ERST_GOTO 0x0F +#define EFI_ACPI_6_2_ERST_SET_SRC_ADDRESS_BASE 0x10 +#define EFI_ACPI_6_2_ERST_SET_DST_ADDRESS_BASE 0x11 +#define EFI_ACPI_6_2_ERST_MOVE_DATA 0x12 /// /// ERST Instruction Flags /// -#define EFI_ACPI_6_2_ERST_PRESERVE_REGISTER 0x01 +#define EFI_ACPI_6_2_ERST_PRESERVE_REGISTER 0x01 /// /// ERST Serialization Instruction Entry /// typedef struct { - UINT8 SerializationAction; - UINT8 Instruction; - UINT8 Flags; - UINT8 Reserved0; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE RegisterRegion; - UINT64 Value; - UINT64 Mask; + UINT8 SerializationAction; + UINT8 Instruction; + UINT8 Flags; + UINT8 Reserved0; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE RegisterRegion; + UINT64 Value; + UINT64 Mask; } EFI_ACPI_6_2_ERST_SERIALIZATION_INSTRUCTION_ENTRY; /// /// EINJ - Error Injection Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 InjectionHeaderSize; - UINT8 InjectionFlags; - UINT8 Reserved0[3]; - UINT32 InjectionEntryCount; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 InjectionHeaderSize; + UINT8 InjectionFlags; + UINT8 Reserved0[3]; + UINT32 InjectionEntryCount; } EFI_ACPI_6_2_ERROR_INJECTION_TABLE_HEADER; /// /// EINJ Version (as defined in ACPI 6.2 spec.) /// -#define EFI_ACPI_6_2_ERROR_INJECTION_TABLE_REVISION 0x01 +#define EFI_ACPI_6_2_ERROR_INJECTION_TABLE_REVISION 0x01 /// /// EINJ Error Injection Actions /// -#define EFI_ACPI_6_2_EINJ_BEGIN_INJECTION_OPERATION 0x00 -#define EFI_ACPI_6_2_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01 -#define EFI_ACPI_6_2_EINJ_SET_ERROR_TYPE 0x02 -#define EFI_ACPI_6_2_EINJ_GET_ERROR_TYPE 0x03 -#define EFI_ACPI_6_2_EINJ_END_OPERATION 0x04 -#define EFI_ACPI_6_2_EINJ_EXECUTE_OPERATION 0x05 -#define EFI_ACPI_6_2_EINJ_CHECK_BUSY_STATUS 0x06 -#define EFI_ACPI_6_2_EINJ_GET_COMMAND_STATUS 0x07 -#define EFI_ACPI_6_2_EINJ_TRIGGER_ERROR 0xFF +#define EFI_ACPI_6_2_EINJ_BEGIN_INJECTION_OPERATION 0x00 +#define EFI_ACPI_6_2_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01 +#define EFI_ACPI_6_2_EINJ_SET_ERROR_TYPE 0x02 +#define EFI_ACPI_6_2_EINJ_GET_ERROR_TYPE 0x03 +#define EFI_ACPI_6_2_EINJ_END_OPERATION 0x04 +#define EFI_ACPI_6_2_EINJ_EXECUTE_OPERATION 0x05 +#define EFI_ACPI_6_2_EINJ_CHECK_BUSY_STATUS 0x06 +#define EFI_ACPI_6_2_EINJ_GET_COMMAND_STATUS 0x07 +#define EFI_ACPI_6_2_EINJ_TRIGGER_ERROR 0xFF /// /// EINJ Action Command Status /// -#define EFI_ACPI_6_2_EINJ_STATUS_SUCCESS 0x00 -#define EFI_ACPI_6_2_EINJ_STATUS_UNKNOWN_FAILURE 0x01 -#define EFI_ACPI_6_2_EINJ_STATUS_INVALID_ACCESS 0x02 +#define EFI_ACPI_6_2_EINJ_STATUS_SUCCESS 0x00 +#define EFI_ACPI_6_2_EINJ_STATUS_UNKNOWN_FAILURE 0x01 +#define EFI_ACPI_6_2_EINJ_STATUS_INVALID_ACCESS 0x02 /// /// EINJ Error Type Definition /// -#define EFI_ACPI_6_2_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0) -#define EFI_ACPI_6_2_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1) -#define EFI_ACPI_6_2_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2) -#define EFI_ACPI_6_2_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3) -#define EFI_ACPI_6_2_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4) -#define EFI_ACPI_6_2_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5) -#define EFI_ACPI_6_2_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6) -#define EFI_ACPI_6_2_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7) -#define EFI_ACPI_6_2_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8) -#define EFI_ACPI_6_2_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9) -#define EFI_ACPI_6_2_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10) -#define EFI_ACPI_6_2_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11) +#define EFI_ACPI_6_2_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0) +#define EFI_ACPI_6_2_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1) +#define EFI_ACPI_6_2_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2) +#define EFI_ACPI_6_2_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3) +#define EFI_ACPI_6_2_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4) +#define EFI_ACPI_6_2_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5) +#define EFI_ACPI_6_2_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6) +#define EFI_ACPI_6_2_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7) +#define EFI_ACPI_6_2_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8) +#define EFI_ACPI_6_2_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9) +#define EFI_ACPI_6_2_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10) +#define EFI_ACPI_6_2_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11) /// /// EINJ Injection Instructions /// -#define EFI_ACPI_6_2_EINJ_READ_REGISTER 0x00 -#define EFI_ACPI_6_2_EINJ_READ_REGISTER_VALUE 0x01 -#define EFI_ACPI_6_2_EINJ_WRITE_REGISTER 0x02 -#define EFI_ACPI_6_2_EINJ_WRITE_REGISTER_VALUE 0x03 -#define EFI_ACPI_6_2_EINJ_NOOP 0x04 +#define EFI_ACPI_6_2_EINJ_READ_REGISTER 0x00 +#define EFI_ACPI_6_2_EINJ_READ_REGISTER_VALUE 0x01 +#define EFI_ACPI_6_2_EINJ_WRITE_REGISTER 0x02 +#define EFI_ACPI_6_2_EINJ_WRITE_REGISTER_VALUE 0x03 +#define EFI_ACPI_6_2_EINJ_NOOP 0x04 /// /// EINJ Instruction Flags /// -#define EFI_ACPI_6_2_EINJ_PRESERVE_REGISTER 0x01 +#define EFI_ACPI_6_2_EINJ_PRESERVE_REGISTER 0x01 /// /// EINJ Injection Instruction Entry /// typedef struct { - UINT8 InjectionAction; - UINT8 Instruction; - UINT8 Flags; - UINT8 Reserved0; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE RegisterRegion; - UINT64 Value; - UINT64 Mask; + UINT8 InjectionAction; + UINT8 Instruction; + UINT8 Flags; + UINT8 Reserved0; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE RegisterRegion; + UINT64 Value; + UINT64 Mask; } EFI_ACPI_6_2_EINJ_INJECTION_INSTRUCTION_ENTRY; /// /// EINJ Trigger Action Table /// typedef struct { - UINT32 HeaderSize; - UINT32 Revision; - UINT32 TableSize; - UINT32 EntryCount; + UINT32 HeaderSize; + UINT32 Revision; + UINT32 TableSize; + UINT32 EntryCount; } EFI_ACPI_6_2_EINJ_TRIGGER_ACTION_TABLE; /// /// Platform Communications Channel Table (PCCT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 Flags; - UINT64 Reserved; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 Flags; + UINT64 Reserved; } EFI_ACPI_6_2_PLATFORM_COMMUNICATION_CHANNEL_TABLE_HEADER; /// /// PCCT Version (as defined in ACPI 6.2 spec.) /// -#define EFI_ACPI_6_2_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION 0x02 +#define EFI_ACPI_6_2_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION 0x02 /// /// PCCT Global Flags @@ -2343,35 +2343,35 @@ typedef struct { // // PCCT Subspace type // -#define EFI_ACPI_6_2_PCCT_SUBSPACE_TYPE_GENERIC 0x00 -#define EFI_ACPI_6_2_PCCT_SUBSPACE_TYPE_1_HW_REDUCED_COMMUNICATIONS 0x01 -#define EFI_ACPI_6_2_PCCT_SUBSPACE_TYPE_2_HW_REDUCED_COMMUNICATIONS 0x02 -#define EFI_ACPI_6_2_PCCT_SUBSPACE_TYPE_3_EXTENDED_PCC 0x03 -#define EFI_ACPI_6_2_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC 0x04 +#define EFI_ACPI_6_2_PCCT_SUBSPACE_TYPE_GENERIC 0x00 +#define EFI_ACPI_6_2_PCCT_SUBSPACE_TYPE_1_HW_REDUCED_COMMUNICATIONS 0x01 +#define EFI_ACPI_6_2_PCCT_SUBSPACE_TYPE_2_HW_REDUCED_COMMUNICATIONS 0x02 +#define EFI_ACPI_6_2_PCCT_SUBSPACE_TYPE_3_EXTENDED_PCC 0x03 +#define EFI_ACPI_6_2_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC 0x04 /// /// PCC Subspace Structure Header /// typedef struct { - UINT8 Type; - UINT8 Length; + UINT8 Type; + UINT8 Length; } EFI_ACPI_6_2_PCCT_SUBSPACE_HEADER; /// /// Generic Communications Subspace Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[6]; - UINT64 BaseAddress; - UINT64 AddressLength; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; - UINT64 DoorbellPreserve; - UINT64 DoorbellWrite; - UINT32 NominalLatency; - UINT32 MaximumPeriodicAccessRate; - UINT16 MinimumRequestTurnaroundTime; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[6]; + UINT64 BaseAddress; + UINT64 AddressLength; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; + UINT64 DoorbellPreserve; + UINT64 DoorbellWrite; + UINT32 NominalLatency; + UINT32 MaximumPeriodicAccessRate; + UINT16 MinimumRequestTurnaroundTime; } EFI_ACPI_6_2_PCCT_SUBSPACE_GENERIC; /// @@ -2379,18 +2379,18 @@ typedef struct { /// typedef struct { - UINT8 Command; - UINT8 Reserved:7; - UINT8 NotifyOnCompletion:1; + UINT8 Command; + UINT8 Reserved : 7; + UINT8 NotifyOnCompletion : 1; } EFI_ACPI_6_2_PCCT_GENERIC_SHARED_MEMORY_REGION_COMMAND; typedef struct { - UINT8 CommandComplete:1; - UINT8 PlatformInterrupt:1; - UINT8 Error:1; - UINT8 PlatformNotification:1; - UINT8 Reserved:4; - UINT8 Reserved1; + UINT8 CommandComplete : 1; + UINT8 PlatformInterrupt : 1; + UINT8 Error : 1; + UINT8 PlatformNotification : 1; + UINT8 Reserved : 4; + UINT8 Reserved1; } EFI_ACPI_6_2_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS; typedef struct { @@ -2399,78 +2399,78 @@ typedef struct { EFI_ACPI_6_2_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS Status; } EFI_ACPI_6_2_PCCT_GENERIC_SHARED_MEMORY_REGION_HEADER; -#define EFI_ACPI_6_2_PCCT_SUBSPACE_PLATFORM_INTERRUPT_FLAGS_POLARITY BIT0 -#define EFI_ACPI_6_2_PCCT_SUBSPACE_PLATFORM_INTERRUPT_FLAGS_MODE BIT1 +#define EFI_ACPI_6_2_PCCT_SUBSPACE_PLATFORM_INTERRUPT_FLAGS_POLARITY BIT0 +#define EFI_ACPI_6_2_PCCT_SUBSPACE_PLATFORM_INTERRUPT_FLAGS_MODE BIT1 /// /// Type 1 HW-Reduced Communications Subspace Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 PlatformInterrupt; - UINT8 PlatformInterruptFlags; - UINT8 Reserved; - UINT64 BaseAddress; - UINT64 AddressLength; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; - UINT64 DoorbellPreserve; - UINT64 DoorbellWrite; - UINT32 NominalLatency; - UINT32 MaximumPeriodicAccessRate; - UINT16 MinimumRequestTurnaroundTime; + UINT8 Type; + UINT8 Length; + UINT32 PlatformInterrupt; + UINT8 PlatformInterruptFlags; + UINT8 Reserved; + UINT64 BaseAddress; + UINT64 AddressLength; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; + UINT64 DoorbellPreserve; + UINT64 DoorbellWrite; + UINT32 NominalLatency; + UINT32 MaximumPeriodicAccessRate; + UINT16 MinimumRequestTurnaroundTime; } EFI_ACPI_6_2_PCCT_SUBSPACE_1_HW_REDUCED_COMMUNICATIONS; /// /// Type 2 HW-Reduced Communications Subspace Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 PlatformInterrupt; - UINT8 PlatformInterruptFlags; - UINT8 Reserved; - UINT64 BaseAddress; - UINT64 AddressLength; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; - UINT64 DoorbellPreserve; - UINT64 DoorbellWrite; - UINT32 NominalLatency; - UINT32 MaximumPeriodicAccessRate; - UINT16 MinimumRequestTurnaroundTime; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE PlatformInterruptAckRegister; - UINT64 PlatformInterruptAckPreserve; - UINT64 PlatformInterruptAckWrite; + UINT8 Type; + UINT8 Length; + UINT32 PlatformInterrupt; + UINT8 PlatformInterruptFlags; + UINT8 Reserved; + UINT64 BaseAddress; + UINT64 AddressLength; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; + UINT64 DoorbellPreserve; + UINT64 DoorbellWrite; + UINT32 NominalLatency; + UINT32 MaximumPeriodicAccessRate; + UINT16 MinimumRequestTurnaroundTime; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE PlatformInterruptAckRegister; + UINT64 PlatformInterruptAckPreserve; + UINT64 PlatformInterruptAckWrite; } EFI_ACPI_6_2_PCCT_SUBSPACE_2_HW_REDUCED_COMMUNICATIONS; /// /// Type 3 Extended PCC Subspace Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 PlatformInterrupt; - UINT8 PlatformInterruptFlags; - UINT8 Reserved; - UINT64 BaseAddress; - UINT32 AddressLength; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; - UINT64 DoorbellPreserve; - UINT64 DoorbellWrite; - UINT32 NominalLatency; - UINT32 MaximumPeriodicAccessRate; - UINT32 MinimumRequestTurnaroundTime; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE PlatformInterruptAckRegister; - UINT64 PlatformInterruptAckPreserve; - UINT64 PlatformInterruptAckSet; - UINT8 Reserved1[8]; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE CommandCompleteCheckRegister; - UINT64 CommandCompleteCheckMask; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE CommandCompleteUpdateRegister; - UINT64 CommandCompleteUpdatePreserve; - UINT64 CommandCompleteUpdateSet; - EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE ErrorStatusRegister; - UINT64 ErrorStatusMask; + UINT8 Type; + UINT8 Length; + UINT32 PlatformInterrupt; + UINT8 PlatformInterruptFlags; + UINT8 Reserved; + UINT64 BaseAddress; + UINT32 AddressLength; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; + UINT64 DoorbellPreserve; + UINT64 DoorbellWrite; + UINT32 NominalLatency; + UINT32 MaximumPeriodicAccessRate; + UINT32 MinimumRequestTurnaroundTime; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE PlatformInterruptAckRegister; + UINT64 PlatformInterruptAckPreserve; + UINT64 PlatformInterruptAckSet; + UINT8 Reserved1[8]; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE CommandCompleteCheckRegister; + UINT64 CommandCompleteCheckMask; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE CommandCompleteUpdateRegister; + UINT64 CommandCompleteUpdatePreserve; + UINT64 CommandCompleteUpdateSet; + EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE ErrorStatusRegister; + UINT64 ErrorStatusMask; } EFI_ACPI_6_2_PCCT_SUBSPACE_3_EXTENDED_PCC; /// @@ -2478,45 +2478,45 @@ typedef struct { /// typedef EFI_ACPI_6_2_PCCT_SUBSPACE_3_EXTENDED_PCC EFI_ACPI_6_2_PCCT_SUBSPACE_4_EXTENDED_PCC; -#define EFI_ACPI_6_2_PCCT_MASTER_SLAVE_COMMUNICATIONS_CHANNEL_FLAGS_NOTIFY_ON_COMPLETION BIT0 +#define EFI_ACPI_6_2_PCCT_MASTER_SLAVE_COMMUNICATIONS_CHANNEL_FLAGS_NOTIFY_ON_COMPLETION BIT0 typedef struct { - UINT32 Signature; - UINT32 Flags; - UINT32 Length; - UINT32 Command; + UINT32 Signature; + UINT32 Flags; + UINT32 Length; + UINT32 Command; } EFI_ACPI_6_2_PCCT_EXTENDED_PCC_SHARED_MEMORY_REGION_HEADER; /// /// Platform Debug Trigger Table (PDTT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 TriggerCount; - UINT8 Reserved[3]; - UINT32 TriggerIdentifierArrayOffset; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 TriggerCount; + UINT8 Reserved[3]; + UINT32 TriggerIdentifierArrayOffset; } EFI_ACPI_6_2_PLATFORM_DEBUG_TRIGGER_TABLE_HEADER; /// /// PDTT Revision (as defined in ACPI 6.2 spec.) /// -#define EFI_ACPI_6_2_PLATFORM_DEBUG_TRIGGER_TABLE_REVISION 0x00 +#define EFI_ACPI_6_2_PLATFORM_DEBUG_TRIGGER_TABLE_REVISION 0x00 /// /// PDTT Platform Communication Channel Identifier Structure /// typedef struct { - UINT16 SubChannelIdentifer:8; - UINT16 Runtime:1; - UINT16 WaitForCompletion:1; - UINT16 Reserved:6; + UINT16 SubChannelIdentifer : 8; + UINT16 Runtime : 1; + UINT16 WaitForCompletion : 1; + UINT16 Reserved : 6; } EFI_ACPI_6_2_PDTT_PCC_IDENTIFIER; /// /// PCC Commands Codes used by Platform Debug Trigger Table /// -#define EFI_ACPI_6_2_PDTT_PCC_COMMAND_DOORBELL_ONLY 0x00 -#define EFI_ACPI_6_2_PDTT_PCC_COMMAND_VENDOR_SPECIFIC 0x01 +#define EFI_ACPI_6_2_PDTT_PCC_COMMAND_DOORBELL_ONLY 0x00 +#define EFI_ACPI_6_2_PDTT_PCC_COMMAND_VENDOR_SPECIFIC 0x01 /// /// PPTT Platform Communication Channel @@ -2527,123 +2527,123 @@ typedef EFI_ACPI_6_2_PCCT_GENERIC_SHARED_MEMORY_REGION_HEADER EFI_ACPI_6_2_PDTT_ /// Processor Properties Topology Table (PPTT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_DESCRIPTION_HEADER Header; } EFI_ACPI_6_2_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_HEADER; /// /// PPTT Revision (as defined in ACPI 6.2 spec.) /// -#define EFI_ACPI_6_2_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_REVISION 0x01 +#define EFI_ACPI_6_2_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_REVISION 0x01 /// /// PPTT types /// -#define EFI_ACPI_6_2_PPTT_TYPE_PROCESSOR 0x00 -#define EFI_ACPI_6_2_PPTT_TYPE_CACHE 0x01 -#define EFI_ACPI_6_2_PPTT_TYPE_ID 0x02 +#define EFI_ACPI_6_2_PPTT_TYPE_PROCESSOR 0x00 +#define EFI_ACPI_6_2_PPTT_TYPE_CACHE 0x01 +#define EFI_ACPI_6_2_PPTT_TYPE_ID 0x02 /// /// PPTT Structure Header /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[2]; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[2]; } EFI_ACPI_6_2_PPTT_STRUCTURE_HEADER; /// /// For PPTT struct processor flags /// -#define EFI_ACPI_6_2_PPTT_PROCESSOR_ID_INVALID 0x0 -#define EFI_ACPI_6_2_PPTT_PROCESSOR_ID_VALID 0x1 +#define EFI_ACPI_6_2_PPTT_PROCESSOR_ID_INVALID 0x0 +#define EFI_ACPI_6_2_PPTT_PROCESSOR_ID_VALID 0x1 /// /// Processor hierarchy node structure flags /// typedef struct { - UINT32 PhysicalPackage:1; - UINT32 AcpiProcessorIdValid:1; - UINT32 Reserved:30; + UINT32 PhysicalPackage : 1; + UINT32 AcpiProcessorIdValid : 1; + UINT32 Reserved : 30; } EFI_ACPI_6_2_PPTT_STRUCTURE_PROCESSOR_FLAGS; /// /// Processor hierarchy node structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[2]; - EFI_ACPI_6_2_PPTT_STRUCTURE_PROCESSOR_FLAGS Flags; - UINT32 Parent; - UINT32 AcpiProcessorId; - UINT32 NumberOfPrivateResources; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[2]; + EFI_ACPI_6_2_PPTT_STRUCTURE_PROCESSOR_FLAGS Flags; + UINT32 Parent; + UINT32 AcpiProcessorId; + UINT32 NumberOfPrivateResources; } EFI_ACPI_6_2_PPTT_STRUCTURE_PROCESSOR; /// /// Cache Type Structure flags /// typedef struct { - UINT32 SizePropertyValid:1; - UINT32 NumberOfSetsValid:1; - UINT32 AssociativityValid:1; - UINT32 AllocationTypeValid:1; - UINT32 CacheTypeValid:1; - UINT32 WritePolicyValid:1; - UINT32 LineSizeValid:1; - UINT32 Reserved:25; + UINT32 SizePropertyValid : 1; + UINT32 NumberOfSetsValid : 1; + UINT32 AssociativityValid : 1; + UINT32 AllocationTypeValid : 1; + UINT32 CacheTypeValid : 1; + UINT32 WritePolicyValid : 1; + UINT32 LineSizeValid : 1; + UINT32 Reserved : 25; } EFI_ACPI_6_2_PPTT_STRUCTURE_CACHE_FLAGS; /// /// For cache attributes /// -#define EFI_ACPI_6_2_CACHE_ATTRIBUTES_ALLOCATION_READ 0x0 -#define EFI_ACPI_6_2_CACHE_ATTRIBUTES_ALLOCATION_WRITE 0x1 -#define EFI_ACPI_6_2_CACHE_ATTRIBUTES_ALLOCATION_READ_WRITE 0x2 -#define EFI_ACPI_6_2_CACHE_ATTRIBUTES_CACHE_TYPE_DATA 0x0 -#define EFI_ACPI_6_2_CACHE_ATTRIBUTES_CACHE_TYPE_INSTRUCTION 0x1 -#define EFI_ACPI_6_2_CACHE_ATTRIBUTES_CACHE_TYPE_UNIFIED 0x2 -#define EFI_ACPI_6_2_CACHE_ATTRIBUTES_WRITE_POLICY_WRITE_BACK 0x0 -#define EFI_ACPI_6_2_CACHE_ATTRIBUTES_WRITE_POLICY_WRITE_THROUGH 0x1 +#define EFI_ACPI_6_2_CACHE_ATTRIBUTES_ALLOCATION_READ 0x0 +#define EFI_ACPI_6_2_CACHE_ATTRIBUTES_ALLOCATION_WRITE 0x1 +#define EFI_ACPI_6_2_CACHE_ATTRIBUTES_ALLOCATION_READ_WRITE 0x2 +#define EFI_ACPI_6_2_CACHE_ATTRIBUTES_CACHE_TYPE_DATA 0x0 +#define EFI_ACPI_6_2_CACHE_ATTRIBUTES_CACHE_TYPE_INSTRUCTION 0x1 +#define EFI_ACPI_6_2_CACHE_ATTRIBUTES_CACHE_TYPE_UNIFIED 0x2 +#define EFI_ACPI_6_2_CACHE_ATTRIBUTES_WRITE_POLICY_WRITE_BACK 0x0 +#define EFI_ACPI_6_2_CACHE_ATTRIBUTES_WRITE_POLICY_WRITE_THROUGH 0x1 /// /// Cache Type Structure cache attributes /// typedef struct { - UINT8 AllocationType:2; - UINT8 CacheType:2; - UINT8 WritePolicy:1; - UINT8 Reserved:3; + UINT8 AllocationType : 2; + UINT8 CacheType : 2; + UINT8 WritePolicy : 1; + UINT8 Reserved : 3; } EFI_ACPI_6_2_PPTT_STRUCTURE_CACHE_ATTRIBUTES; /// /// Cache Type Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[2]; - EFI_ACPI_6_2_PPTT_STRUCTURE_CACHE_FLAGS Flags; - UINT32 NextLevelOfCache; - UINT32 Size; - UINT32 NumberOfSets; - UINT8 Associativity; - EFI_ACPI_6_2_PPTT_STRUCTURE_CACHE_ATTRIBUTES Attributes; - UINT16 LineSize; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[2]; + EFI_ACPI_6_2_PPTT_STRUCTURE_CACHE_FLAGS Flags; + UINT32 NextLevelOfCache; + UINT32 Size; + UINT32 NumberOfSets; + UINT8 Associativity; + EFI_ACPI_6_2_PPTT_STRUCTURE_CACHE_ATTRIBUTES Attributes; + UINT16 LineSize; } EFI_ACPI_6_2_PPTT_STRUCTURE_CACHE; /// /// ID structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[2]; - UINT32 VendorId; - UINT64 Level1Id; - UINT64 Level2Id; - UINT16 MajorRev; - UINT16 MinorRev; - UINT16 SpinRev; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[2]; + UINT32 VendorId; + UINT64 Level1Id; + UINT64 Level2Id; + UINT16 MajorRev; + UINT16 MinorRev; + UINT16 SpinRev; } EFI_ACPI_6_2_PPTT_STRUCTURE_ID; // diff --git a/MdePkg/Include/IndustryStandard/Acpi63.h b/MdePkg/Include/IndustryStandard/Acpi63.h index 3b1426a..e4d5825 100644 --- a/MdePkg/Include/IndustryStandard/Acpi63.h +++ b/MdePkg/Include/IndustryStandard/Acpi63.h @@ -21,11 +21,11 @@ /// ACPI 6.3 Generic Address Space definition /// typedef struct { - UINT8 AddressSpaceId; - UINT8 RegisterBitWidth; - UINT8 RegisterBitOffset; - UINT8 AccessSize; - UINT64 Address; + UINT8 AddressSpaceId; + UINT8 RegisterBitWidth; + UINT8 RegisterBitOffset; + UINT8 AccessSize; + UINT64 Address; } EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE; // @@ -61,29 +61,29 @@ typedef struct { /// Root System Description Pointer Structure /// typedef struct { - UINT64 Signature; - UINT8 Checksum; - UINT8 OemId[6]; - UINT8 Revision; - UINT32 RsdtAddress; - UINT32 Length; - UINT64 XsdtAddress; - UINT8 ExtendedChecksum; - UINT8 Reserved[3]; + UINT64 Signature; + UINT8 Checksum; + UINT8 OemId[6]; + UINT8 Revision; + UINT32 RsdtAddress; + UINT32 Length; + UINT64 XsdtAddress; + UINT8 ExtendedChecksum; + UINT8 Reserved[3]; } EFI_ACPI_6_3_ROOT_SYSTEM_DESCRIPTION_POINTER; /// /// RSD_PTR Revision (as defined in ACPI 6.3 spec.) /// -#define EFI_ACPI_6_3_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 6.3) says current value is 2 +#define EFI_ACPI_6_3_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 6.3) says current value is 2 /// /// Common table header, this prefaces all ACPI tables, including FACS, but /// excluding the RSD PTR structure /// typedef struct { - UINT32 Signature; - UINT32 Length; + UINT32 Signature; + UINT32 Length; } EFI_ACPI_6_3_COMMON_HEADER; // @@ -95,7 +95,7 @@ typedef struct { /// /// RSDT Revision (as defined in ACPI 6.3 spec.) /// -#define EFI_ACPI_6_3_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_6_3_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 // // Extended System Description Table @@ -106,74 +106,74 @@ typedef struct { /// /// XSDT Revision (as defined in ACPI 6.3 spec.) /// -#define EFI_ACPI_6_3_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_6_3_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 /// /// Fixed ACPI Description Table Structure (FADT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 FirmwareCtrl; - UINT32 Dsdt; - UINT8 Reserved0; - UINT8 PreferredPmProfile; - UINT16 SciInt; - UINT32 SmiCmd; - UINT8 AcpiEnable; - UINT8 AcpiDisable; - UINT8 S4BiosReq; - UINT8 PstateCnt; - UINT32 Pm1aEvtBlk; - UINT32 Pm1bEvtBlk; - UINT32 Pm1aCntBlk; - UINT32 Pm1bCntBlk; - UINT32 Pm2CntBlk; - UINT32 PmTmrBlk; - UINT32 Gpe0Blk; - UINT32 Gpe1Blk; - UINT8 Pm1EvtLen; - UINT8 Pm1CntLen; - UINT8 Pm2CntLen; - UINT8 PmTmrLen; - UINT8 Gpe0BlkLen; - UINT8 Gpe1BlkLen; - UINT8 Gpe1Base; - UINT8 CstCnt; - UINT16 PLvl2Lat; - UINT16 PLvl3Lat; - UINT16 FlushSize; - UINT16 FlushStride; - UINT8 DutyOffset; - UINT8 DutyWidth; - UINT8 DayAlrm; - UINT8 MonAlrm; - UINT8 Century; - UINT16 IaPcBootArch; - UINT8 Reserved1; - UINT32 Flags; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE ResetReg; - UINT8 ResetValue; - UINT16 ArmBootArch; - UINT8 MinorVersion; - UINT64 XFirmwareCtrl; - UINT64 XDsdt; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE XGpe0Blk; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE XGpe1Blk; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE SleepControlReg; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE SleepStatusReg; - UINT64 HypervisorVendorIdentity; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 FirmwareCtrl; + UINT32 Dsdt; + UINT8 Reserved0; + UINT8 PreferredPmProfile; + UINT16 SciInt; + UINT32 SmiCmd; + UINT8 AcpiEnable; + UINT8 AcpiDisable; + UINT8 S4BiosReq; + UINT8 PstateCnt; + UINT32 Pm1aEvtBlk; + UINT32 Pm1bEvtBlk; + UINT32 Pm1aCntBlk; + UINT32 Pm1bCntBlk; + UINT32 Pm2CntBlk; + UINT32 PmTmrBlk; + UINT32 Gpe0Blk; + UINT32 Gpe1Blk; + UINT8 Pm1EvtLen; + UINT8 Pm1CntLen; + UINT8 Pm2CntLen; + UINT8 PmTmrLen; + UINT8 Gpe0BlkLen; + UINT8 Gpe1BlkLen; + UINT8 Gpe1Base; + UINT8 CstCnt; + UINT16 PLvl2Lat; + UINT16 PLvl3Lat; + UINT16 FlushSize; + UINT16 FlushStride; + UINT8 DutyOffset; + UINT8 DutyWidth; + UINT8 DayAlrm; + UINT8 MonAlrm; + UINT8 Century; + UINT16 IaPcBootArch; + UINT8 Reserved1; + UINT32 Flags; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE ResetReg; + UINT8 ResetValue; + UINT16 ArmBootArch; + UINT8 MinorVersion; + UINT64 XFirmwareCtrl; + UINT64 XDsdt; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE XGpe0Blk; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE XGpe1Blk; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE SleepControlReg; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE SleepStatusReg; + UINT64 HypervisorVendorIdentity; } EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLE; /// /// FADT Version (as defined in ACPI 6.3 spec.) /// -#define EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x06 +#define EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x06 #define EFI_ACPI_6_3_FIXED_ACPI_DESCRIPTION_TABLE_MINOR_REVISION 0x03 // @@ -193,62 +193,62 @@ typedef struct { // Fixed ACPI Description Table Boot Architecture Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_6_3_LEGACY_DEVICES BIT0 -#define EFI_ACPI_6_3_8042 BIT1 -#define EFI_ACPI_6_3_VGA_NOT_PRESENT BIT2 -#define EFI_ACPI_6_3_MSI_NOT_SUPPORTED BIT3 -#define EFI_ACPI_6_3_PCIE_ASPM_CONTROLS BIT4 -#define EFI_ACPI_6_3_CMOS_RTC_NOT_PRESENT BIT5 +#define EFI_ACPI_6_3_LEGACY_DEVICES BIT0 +#define EFI_ACPI_6_3_8042 BIT1 +#define EFI_ACPI_6_3_VGA_NOT_PRESENT BIT2 +#define EFI_ACPI_6_3_MSI_NOT_SUPPORTED BIT3 +#define EFI_ACPI_6_3_PCIE_ASPM_CONTROLS BIT4 +#define EFI_ACPI_6_3_CMOS_RTC_NOT_PRESENT BIT5 // // Fixed ACPI Description Table Arm Boot Architecture Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_6_3_ARM_PSCI_COMPLIANT BIT0 -#define EFI_ACPI_6_3_ARM_PSCI_USE_HVC BIT1 +#define EFI_ACPI_6_3_ARM_PSCI_COMPLIANT BIT0 +#define EFI_ACPI_6_3_ARM_PSCI_USE_HVC BIT1 // // Fixed ACPI Description Table Fixed Feature Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_6_3_WBINVD BIT0 -#define EFI_ACPI_6_3_WBINVD_FLUSH BIT1 -#define EFI_ACPI_6_3_PROC_C1 BIT2 -#define EFI_ACPI_6_3_P_LVL2_UP BIT3 -#define EFI_ACPI_6_3_PWR_BUTTON BIT4 -#define EFI_ACPI_6_3_SLP_BUTTON BIT5 -#define EFI_ACPI_6_3_FIX_RTC BIT6 -#define EFI_ACPI_6_3_RTC_S4 BIT7 -#define EFI_ACPI_6_3_TMR_VAL_EXT BIT8 -#define EFI_ACPI_6_3_DCK_CAP BIT9 -#define EFI_ACPI_6_3_RESET_REG_SUP BIT10 -#define EFI_ACPI_6_3_SEALED_CASE BIT11 -#define EFI_ACPI_6_3_HEADLESS BIT12 -#define EFI_ACPI_6_3_CPU_SW_SLP BIT13 -#define EFI_ACPI_6_3_PCI_EXP_WAK BIT14 -#define EFI_ACPI_6_3_USE_PLATFORM_CLOCK BIT15 -#define EFI_ACPI_6_3_S4_RTC_STS_VALID BIT16 -#define EFI_ACPI_6_3_REMOTE_POWER_ON_CAPABLE BIT17 -#define EFI_ACPI_6_3_FORCE_APIC_CLUSTER_MODEL BIT18 -#define EFI_ACPI_6_3_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19 -#define EFI_ACPI_6_3_HW_REDUCED_ACPI BIT20 -#define EFI_ACPI_6_3_LOW_POWER_S0_IDLE_CAPABLE BIT21 +#define EFI_ACPI_6_3_WBINVD BIT0 +#define EFI_ACPI_6_3_WBINVD_FLUSH BIT1 +#define EFI_ACPI_6_3_PROC_C1 BIT2 +#define EFI_ACPI_6_3_P_LVL2_UP BIT3 +#define EFI_ACPI_6_3_PWR_BUTTON BIT4 +#define EFI_ACPI_6_3_SLP_BUTTON BIT5 +#define EFI_ACPI_6_3_FIX_RTC BIT6 +#define EFI_ACPI_6_3_RTC_S4 BIT7 +#define EFI_ACPI_6_3_TMR_VAL_EXT BIT8 +#define EFI_ACPI_6_3_DCK_CAP BIT9 +#define EFI_ACPI_6_3_RESET_REG_SUP BIT10 +#define EFI_ACPI_6_3_SEALED_CASE BIT11 +#define EFI_ACPI_6_3_HEADLESS BIT12 +#define EFI_ACPI_6_3_CPU_SW_SLP BIT13 +#define EFI_ACPI_6_3_PCI_EXP_WAK BIT14 +#define EFI_ACPI_6_3_USE_PLATFORM_CLOCK BIT15 +#define EFI_ACPI_6_3_S4_RTC_STS_VALID BIT16 +#define EFI_ACPI_6_3_REMOTE_POWER_ON_CAPABLE BIT17 +#define EFI_ACPI_6_3_FORCE_APIC_CLUSTER_MODEL BIT18 +#define EFI_ACPI_6_3_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19 +#define EFI_ACPI_6_3_HW_REDUCED_ACPI BIT20 +#define EFI_ACPI_6_3_LOW_POWER_S0_IDLE_CAPABLE BIT21 /// /// Firmware ACPI Control Structure /// typedef struct { - UINT32 Signature; - UINT32 Length; - UINT32 HardwareSignature; - UINT32 FirmwareWakingVector; - UINT32 GlobalLock; - UINT32 Flags; - UINT64 XFirmwareWakingVector; - UINT8 Version; - UINT8 Reserved0[3]; - UINT32 OspmFlags; - UINT8 Reserved1[24]; + UINT32 Signature; + UINT32 Length; + UINT32 HardwareSignature; + UINT32 FirmwareWakingVector; + UINT32 GlobalLock; + UINT32 Flags; + UINT64 XFirmwareWakingVector; + UINT8 Version; + UINT8 Reserved0[3]; + UINT32 OspmFlags; + UINT8 Reserved1[24]; } EFI_ACPI_6_3_FIRMWARE_ACPI_CONTROL_STRUCTURE; /// @@ -260,14 +260,14 @@ typedef struct { /// Firmware Control Structure Feature Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_6_3_S4BIOS_F BIT0 -#define EFI_ACPI_6_3_64BIT_WAKE_SUPPORTED_F BIT1 +#define EFI_ACPI_6_3_S4BIOS_F BIT0 +#define EFI_ACPI_6_3_64BIT_WAKE_SUPPORTED_F BIT1 /// /// OSPM Enabled Firmware Control Structure Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_6_3_OSPM_64BIT_WAKE_F BIT0 +#define EFI_ACPI_6_3_OSPM_64BIT_WAKE_F BIT0 // // Differentiated System Description Table, @@ -276,29 +276,29 @@ typedef struct { // no definition needed as they are common description table header, the same with // EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block. // -#define EFI_ACPI_6_3_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 -#define EFI_ACPI_6_3_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 +#define EFI_ACPI_6_3_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 +#define EFI_ACPI_6_3_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 /// /// Multiple APIC Description Table header definition. The rest of the table /// must be defined in a platform specific manner. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 LocalApicAddress; - UINT32 Flags; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 LocalApicAddress; + UINT32 Flags; } EFI_ACPI_6_3_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER; /// /// MADT Revision (as defined in ACPI 6.3 spec.) /// -#define EFI_ACPI_6_3_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x05 +#define EFI_ACPI_6_3_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x05 /// /// Multiple APIC Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_6_3_PCAT_COMPAT BIT0 +#define EFI_ACPI_6_3_PCAT_COMPAT BIT0 // // Multiple APIC Description Table APIC structure types @@ -330,11 +330,11 @@ typedef struct { /// Processor Local APIC Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorUid; - UINT8 ApicId; - UINT32 Flags; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorUid; + UINT8 ApicId; + UINT32 Flags; } EFI_ACPI_6_3_PROCESSOR_LOCAL_APIC_STRUCTURE; /// @@ -347,41 +347,41 @@ typedef struct { /// IO APIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 IoApicId; - UINT8 Reserved; - UINT32 IoApicAddress; - UINT32 GlobalSystemInterruptBase; + UINT8 Type; + UINT8 Length; + UINT8 IoApicId; + UINT8 Reserved; + UINT32 IoApicAddress; + UINT32 GlobalSystemInterruptBase; } EFI_ACPI_6_3_IO_APIC_STRUCTURE; /// /// Interrupt Source Override Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Bus; - UINT8 Source; - UINT32 GlobalSystemInterrupt; - UINT16 Flags; + UINT8 Type; + UINT8 Length; + UINT8 Bus; + UINT8 Source; + UINT32 GlobalSystemInterrupt; + UINT16 Flags; } EFI_ACPI_6_3_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE; /// /// Platform Interrupt Sources Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT8 InterruptType; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT8 IoSapicVector; - UINT32 GlobalSystemInterrupt; - UINT32 PlatformInterruptSourceFlags; - UINT8 CpeiProcessorOverride; - UINT8 Reserved[31]; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT8 InterruptType; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT8 IoSapicVector; + UINT32 GlobalSystemInterrupt; + UINT32 PlatformInterruptSourceFlags; + UINT8 CpeiProcessorOverride; + UINT8 Reserved[31]; } EFI_ACPI_6_3_PLATFORM_INTERRUPT_APIC_STRUCTURE; // @@ -395,43 +395,43 @@ typedef struct { /// Non-Maskable Interrupt Source Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT32 GlobalSystemInterrupt; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT32 GlobalSystemInterrupt; } EFI_ACPI_6_3_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE; /// /// Local APIC NMI Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorUid; - UINT16 Flags; - UINT8 LocalApicLint; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorUid; + UINT16 Flags; + UINT8 LocalApicLint; } EFI_ACPI_6_3_LOCAL_APIC_NMI_STRUCTURE; /// /// Local APIC Address Override Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT64 LocalApicAddress; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT64 LocalApicAddress; } EFI_ACPI_6_3_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE; /// /// IO SAPIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 IoApicId; - UINT8 Reserved; - UINT32 GlobalSystemInterruptBase; - UINT64 IoSapicAddress; + UINT8 Type; + UINT8 Length; + UINT8 IoApicId; + UINT8 Reserved; + UINT32 GlobalSystemInterruptBase; + UINT64 IoSapicAddress; } EFI_ACPI_6_3_IO_SAPIC_STRUCTURE; /// @@ -439,170 +439,170 @@ typedef struct { /// This struct followed by a null-terminated ASCII string - ACPI Processor UID String /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorId; - UINT8 LocalSapicId; - UINT8 LocalSapicEid; - UINT8 Reserved[3]; - UINT32 Flags; - UINT32 ACPIProcessorUIDValue; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorId; + UINT8 LocalSapicId; + UINT8 LocalSapicEid; + UINT8 Reserved[3]; + UINT32 Flags; + UINT32 ACPIProcessorUIDValue; } EFI_ACPI_6_3_PROCESSOR_LOCAL_SAPIC_STRUCTURE; /// /// Platform Interrupt Sources Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT8 InterruptType; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT8 IoSapicVector; - UINT32 GlobalSystemInterrupt; - UINT32 PlatformInterruptSourceFlags; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT8 InterruptType; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT8 IoSapicVector; + UINT32 GlobalSystemInterrupt; + UINT32 PlatformInterruptSourceFlags; } EFI_ACPI_6_3_PLATFORM_INTERRUPT_SOURCES_STRUCTURE; /// /// Platform Interrupt Source Flags. /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_6_3_CPEI_PROCESSOR_OVERRIDE BIT0 +#define EFI_ACPI_6_3_CPEI_PROCESSOR_OVERRIDE BIT0 /// /// Processor Local x2APIC Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[2]; - UINT32 X2ApicId; - UINT32 Flags; - UINT32 AcpiProcessorUid; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[2]; + UINT32 X2ApicId; + UINT32 Flags; + UINT32 AcpiProcessorUid; } EFI_ACPI_6_3_PROCESSOR_LOCAL_X2APIC_STRUCTURE; /// /// Local x2APIC NMI Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT32 AcpiProcessorUid; - UINT8 LocalX2ApicLint; - UINT8 Reserved[3]; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT32 AcpiProcessorUid; + UINT8 LocalX2ApicLint; + UINT8 Reserved[3]; } EFI_ACPI_6_3_LOCAL_X2APIC_NMI_STRUCTURE; /// /// GIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT32 CPUInterfaceNumber; - UINT32 AcpiProcessorUid; - UINT32 Flags; - UINT32 ParkingProtocolVersion; - UINT32 PerformanceInterruptGsiv; - UINT64 ParkedAddress; - UINT64 PhysicalBaseAddress; - UINT64 GICV; - UINT64 GICH; - UINT32 VGICMaintenanceInterrupt; - UINT64 GICRBaseAddress; - UINT64 MPIDR; - UINT8 ProcessorPowerEfficiencyClass; - UINT8 Reserved2; - UINT16 SpeOverflowInterrupt; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT32 CPUInterfaceNumber; + UINT32 AcpiProcessorUid; + UINT32 Flags; + UINT32 ParkingProtocolVersion; + UINT32 PerformanceInterruptGsiv; + UINT64 ParkedAddress; + UINT64 PhysicalBaseAddress; + UINT64 GICV; + UINT64 GICH; + UINT32 VGICMaintenanceInterrupt; + UINT64 GICRBaseAddress; + UINT64 MPIDR; + UINT8 ProcessorPowerEfficiencyClass; + UINT8 Reserved2; + UINT16 SpeOverflowInterrupt; } EFI_ACPI_6_3_GIC_STRUCTURE; /// /// GIC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_3_GIC_ENABLED BIT0 -#define EFI_ACPI_6_3_PERFORMANCE_INTERRUPT_MODEL BIT1 -#define EFI_ACPI_6_3_VGIC_MAINTENANCE_INTERRUPT_MODE_FLAGS BIT2 +#define EFI_ACPI_6_3_GIC_ENABLED BIT0 +#define EFI_ACPI_6_3_PERFORMANCE_INTERRUPT_MODEL BIT1 +#define EFI_ACPI_6_3_VGIC_MAINTENANCE_INTERRUPT_MODE_FLAGS BIT2 /// /// GIC Distributor Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved1; - UINT32 GicId; - UINT64 PhysicalBaseAddress; - UINT32 SystemVectorBase; - UINT8 GicVersion; - UINT8 Reserved2[3]; + UINT8 Type; + UINT8 Length; + UINT16 Reserved1; + UINT32 GicId; + UINT64 PhysicalBaseAddress; + UINT32 SystemVectorBase; + UINT8 GicVersion; + UINT8 Reserved2[3]; } EFI_ACPI_6_3_GIC_DISTRIBUTOR_STRUCTURE; /// /// GIC Version /// -#define EFI_ACPI_6_3_GIC_V1 0x01 -#define EFI_ACPI_6_3_GIC_V2 0x02 -#define EFI_ACPI_6_3_GIC_V3 0x03 -#define EFI_ACPI_6_3_GIC_V4 0x04 +#define EFI_ACPI_6_3_GIC_V1 0x01 +#define EFI_ACPI_6_3_GIC_V2 0x02 +#define EFI_ACPI_6_3_GIC_V3 0x03 +#define EFI_ACPI_6_3_GIC_V4 0x04 /// /// GIC MSI Frame Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved1; - UINT32 GicMsiFrameId; - UINT64 PhysicalBaseAddress; - UINT32 Flags; - UINT16 SPICount; - UINT16 SPIBase; + UINT8 Type; + UINT8 Length; + UINT16 Reserved1; + UINT32 GicMsiFrameId; + UINT64 PhysicalBaseAddress; + UINT32 Flags; + UINT16 SPICount; + UINT16 SPIBase; } EFI_ACPI_6_3_GIC_MSI_FRAME_STRUCTURE; /// /// GIC MSI Frame Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_3_SPI_COUNT_BASE_SELECT BIT0 +#define EFI_ACPI_6_3_SPI_COUNT_BASE_SELECT BIT0 /// /// GICR Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT64 DiscoveryRangeBaseAddress; - UINT32 DiscoveryRangeLength; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT64 DiscoveryRangeBaseAddress; + UINT32 DiscoveryRangeLength; } EFI_ACPI_6_3_GICR_STRUCTURE; /// /// GIC Interrupt Translation Service Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT32 GicItsId; - UINT64 PhysicalBaseAddress; - UINT32 Reserved2; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT32 GicItsId; + UINT64 PhysicalBaseAddress; + UINT32 Reserved2; } EFI_ACPI_6_3_GIC_ITS_STRUCTURE; /// /// Smart Battery Description Table (SBST) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 WarningEnergyLevel; - UINT32 LowEnergyLevel; - UINT32 CriticalEnergyLevel; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 WarningEnergyLevel; + UINT32 LowEnergyLevel; + UINT32 CriticalEnergyLevel; } EFI_ACPI_6_3_SMART_BATTERY_DESCRIPTION_TABLE; /// /// SBST Version (as defined in ACPI 6.3 spec.) /// -#define EFI_ACPI_6_3_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_6_3_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01 /// /// Embedded Controller Boot Resources Table (ECDT) @@ -610,11 +610,11 @@ typedef struct { /// a fully qualified reference to the name space object. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE EcControl; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE EcData; - UINT32 Uid; - UINT8 GpeBit; + EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE EcControl; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE EcData; + UINT32 Uid; + UINT8 GpeBit; } EFI_ACPI_6_3_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE; /// @@ -627,9 +627,9 @@ typedef struct { /// must be defined in a platform specific manner. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 Reserved1; ///< Must be set to 1 - UINT64 Reserved2; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 Reserved1; ///< Must be set to 1 + UINT64 Reserved2; } EFI_ACPI_6_3_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER; /// @@ -653,85 +653,85 @@ typedef struct { /// Processor Local APIC/SAPIC Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 ProximityDomain7To0; - UINT8 ApicId; - UINT32 Flags; - UINT8 LocalSapicEid; - UINT8 ProximityDomain31To8[3]; - UINT32 ClockDomain; + UINT8 Type; + UINT8 Length; + UINT8 ProximityDomain7To0; + UINT8 ApicId; + UINT32 Flags; + UINT8 LocalSapicEid; + UINT8 ProximityDomain31To8[3]; + UINT32 ClockDomain; } EFI_ACPI_6_3_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE; /// /// Local APIC/SAPIC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_3_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0) +#define EFI_ACPI_6_3_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0) /// /// Memory Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 ProximityDomain; - UINT16 Reserved1; - UINT32 AddressBaseLow; - UINT32 AddressBaseHigh; - UINT32 LengthLow; - UINT32 LengthHigh; - UINT32 Reserved2; - UINT32 Flags; - UINT64 Reserved3; + UINT8 Type; + UINT8 Length; + UINT32 ProximityDomain; + UINT16 Reserved1; + UINT32 AddressBaseLow; + UINT32 AddressBaseHigh; + UINT32 LengthLow; + UINT32 LengthHigh; + UINT32 Reserved2; + UINT32 Flags; + UINT64 Reserved3; } EFI_ACPI_6_3_MEMORY_AFFINITY_STRUCTURE; // // Memory Flags. All other bits are reserved and must be 0. // -#define EFI_ACPI_6_3_MEMORY_ENABLED (1 << 0) -#define EFI_ACPI_6_3_MEMORY_HOT_PLUGGABLE (1 << 1) -#define EFI_ACPI_6_3_MEMORY_NONVOLATILE (1 << 2) +#define EFI_ACPI_6_3_MEMORY_ENABLED (1 << 0) +#define EFI_ACPI_6_3_MEMORY_HOT_PLUGGABLE (1 << 1) +#define EFI_ACPI_6_3_MEMORY_NONVOLATILE (1 << 2) /// /// Processor Local x2APIC Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved1[2]; - UINT32 ProximityDomain; - UINT32 X2ApicId; - UINT32 Flags; - UINT32 ClockDomain; - UINT8 Reserved2[4]; + UINT8 Type; + UINT8 Length; + UINT8 Reserved1[2]; + UINT32 ProximityDomain; + UINT32 X2ApicId; + UINT32 Flags; + UINT32 ClockDomain; + UINT8 Reserved2[4]; } EFI_ACPI_6_3_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE; /// /// GICC Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 ProximityDomain; - UINT32 AcpiProcessorUid; - UINT32 Flags; - UINT32 ClockDomain; + UINT8 Type; + UINT8 Length; + UINT32 ProximityDomain; + UINT32 AcpiProcessorUid; + UINT32 Flags; + UINT32 ClockDomain; } EFI_ACPI_6_3_GICC_AFFINITY_STRUCTURE; /// /// GICC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_3_GICC_ENABLED (1 << 0) +#define EFI_ACPI_6_3_GICC_ENABLED (1 << 0) /// /// GIC Interrupt Translation Service (ITS) Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 ProximityDomain; - UINT8 Reserved[2]; - UINT32 ItsId; + UINT8 Type; + UINT8 Length; + UINT32 ProximityDomain; + UINT8 Reserved[2]; + UINT32 ItsId; } EFI_ACPI_6_3_GIC_ITS_AFFINITY_STRUCTURE; // @@ -739,59 +739,59 @@ typedef struct { // All other values between 0x02 an 0xFF are reserved and // will be ignored by OSPM. // -#define EFI_ACPI_6_3_ACPI_DEVICE_HANDLE 0x00 -#define EFI_ACPI_6_3_PCI_DEVICE_HANDLE 0x01 +#define EFI_ACPI_6_3_ACPI_DEVICE_HANDLE 0x00 +#define EFI_ACPI_6_3_PCI_DEVICE_HANDLE 0x01 /// /// Device Handle - ACPI /// typedef struct { - UINT64 AcpiHid; - UINT32 AcpiUid; - UINT8 Reserved[4]; + UINT64 AcpiHid; + UINT32 AcpiUid; + UINT8 Reserved[4]; } EFI_ACPI_6_3_DEVICE_HANDLE_ACPI; /// /// Device Handle - PCI /// typedef struct { - UINT16 PciSegment; - UINT16 PciBdfNumber; - UINT8 Reserved[12]; + UINT16 PciSegment; + UINT16 PciBdfNumber; + UINT8 Reserved[12]; } EFI_ACPI_6_3_DEVICE_HANDLE_PCI; /// /// Generic Initiator Affinity Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved1; - UINT8 DeviceHandleType; - UINT32 ProximityDomain; + UINT8 Type; + UINT8 Length; + UINT8 Reserved1; + UINT8 DeviceHandleType; + UINT32 ProximityDomain; union { - EFI_ACPI_6_3_DEVICE_HANDLE_ACPI Acpi; - EFI_ACPI_6_3_DEVICE_HANDLE_PCI Pci; + EFI_ACPI_6_3_DEVICE_HANDLE_ACPI Acpi; + EFI_ACPI_6_3_DEVICE_HANDLE_PCI Pci; } DeviceHandle; - UINT32 Flags; - UINT8 Reserved2[4]; + UINT32 Flags; + UINT8 Reserved2[4]; } EFI_ACPI_6_3_GENERIC_INITIATOR_AFFINITY_STRUCTURE; /// /// Generic Initiator Affinity Structure Flags. All other bits are reserved /// and must be 0. /// -#define EFI_ACPI_6_3_GENERIC_INITIATOR_AFFINITY_STRUCTURE_ENABLED (1 << 0) +#define EFI_ACPI_6_3_GENERIC_INITIATOR_AFFINITY_STRUCTURE_ENABLED (1 << 0) /// /// System Locality Distance Information Table (SLIT). /// The rest of the table is a matrix. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT64 NumberOfSystemLocalities; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT64 NumberOfSystemLocalities; } EFI_ACPI_6_3_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER; /// @@ -803,14 +803,14 @@ typedef struct { /// Corrected Platform Error Polling Table (CPEP) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 Reserved[8]; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 Reserved[8]; } EFI_ACPI_6_3_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_HEADER; /// /// CPEP Version (as defined in ACPI 6.3 spec.) /// -#define EFI_ACPI_6_3_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01 +#define EFI_ACPI_6_3_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01 // // CPEP processor structure types. @@ -821,66 +821,66 @@ typedef struct { /// Corrected Platform Error Polling Processor Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT32 PollingInterval; + UINT8 Type; + UINT8 Length; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT32 PollingInterval; } EFI_ACPI_6_3_CPEP_PROCESSOR_APIC_SAPIC_STRUCTURE; /// /// Maximum System Characteristics Table (MSCT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 OffsetProxDomInfo; - UINT32 MaximumNumberOfProximityDomains; - UINT32 MaximumNumberOfClockDomains; - UINT64 MaximumPhysicalAddress; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 OffsetProxDomInfo; + UINT32 MaximumNumberOfProximityDomains; + UINT32 MaximumNumberOfClockDomains; + UINT64 MaximumPhysicalAddress; } EFI_ACPI_6_3_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_HEADER; /// /// MSCT Version (as defined in ACPI 6.3 spec.) /// -#define EFI_ACPI_6_3_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01 +#define EFI_ACPI_6_3_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01 /// /// Maximum Proximity Domain Information Structure Definition /// typedef struct { - UINT8 Revision; - UINT8 Length; - UINT32 ProximityDomainRangeLow; - UINT32 ProximityDomainRangeHigh; - UINT32 MaximumProcessorCapacity; - UINT64 MaximumMemoryCapacity; + UINT8 Revision; + UINT8 Length; + UINT32 ProximityDomainRangeLow; + UINT32 ProximityDomainRangeHigh; + UINT32 MaximumProcessorCapacity; + UINT64 MaximumMemoryCapacity; } EFI_ACPI_6_3_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE; /// /// ACPI RAS Feature Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 PlatformCommunicationChannelIdentifier[12]; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 PlatformCommunicationChannelIdentifier[12]; } EFI_ACPI_6_3_RAS_FEATURE_TABLE; /// /// RASF Version (as defined in ACPI 6.3 spec.) /// -#define EFI_ACPI_6_3_RAS_FEATURE_TABLE_REVISION 0x01 +#define EFI_ACPI_6_3_RAS_FEATURE_TABLE_REVISION 0x01 /// /// ACPI RASF Platform Communication Channel Shared Memory Region definition. /// typedef struct { - UINT32 Signature; - UINT16 Command; - UINT16 Status; - UINT16 Version; - UINT8 RASCapabilities[16]; - UINT8 SetRASCapabilities[16]; - UINT16 NumberOfRASFParameterBlocks; - UINT32 SetRASCapabilitiesStatus; + UINT32 Signature; + UINT16 Command; + UINT16 Status; + UINT16 Version; + UINT8 RASCapabilities[16]; + UINT8 SetRASCapabilities[16]; + UINT16 NumberOfRASFParameterBlocks; + UINT32 SetRASCapabilitiesStatus; } EFI_ACPI_6_3_RASF_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION; /// @@ -891,62 +891,62 @@ typedef struct { /// /// ACPI RASF Platform RAS Capabilities /// -#define EFI_ACPI_6_3_RASF_PLATFORM_RAS_CAPABILITY_HARDWARE_BASED_PATROL_SCRUB_SUPPORTED BIT0 -#define EFI_ACPI_6_3_RASF_PLATFORM_RAS_CAPABILITY_HARDWARE_BASED_PATROL_SCRUB_SUPPORTED_AND_EXPOSED_TO_SOFTWARE BIT1 -#define EFI_ACPI_6_3_RASF_PLATFORM_RAS_CAPABILITY_CPU_CACHE_FLUSH_TO_NVDIMM_DURABILITY_ON_POWER_LOSS BIT2 -#define EFI_ACPI_6_3_RASF_PLATFORM_RAS_CAPABILITY_MEMORY_CONTROLLER_FLUSH_TO_NVDIMM_DURABILITY_ON_POWER_LOSS BIT3 -#define EFI_ACPI_6_3_RASF_PLATFORM_RAS_CAPABILITY_BYTE_ADDRESSABLE_PERSISTENT_MEMORY_HARDWARE_MIRRORING BIT4 +#define EFI_ACPI_6_3_RASF_PLATFORM_RAS_CAPABILITY_HARDWARE_BASED_PATROL_SCRUB_SUPPORTED BIT0 +#define EFI_ACPI_6_3_RASF_PLATFORM_RAS_CAPABILITY_HARDWARE_BASED_PATROL_SCRUB_SUPPORTED_AND_EXPOSED_TO_SOFTWARE BIT1 +#define EFI_ACPI_6_3_RASF_PLATFORM_RAS_CAPABILITY_CPU_CACHE_FLUSH_TO_NVDIMM_DURABILITY_ON_POWER_LOSS BIT2 +#define EFI_ACPI_6_3_RASF_PLATFORM_RAS_CAPABILITY_MEMORY_CONTROLLER_FLUSH_TO_NVDIMM_DURABILITY_ON_POWER_LOSS BIT3 +#define EFI_ACPI_6_3_RASF_PLATFORM_RAS_CAPABILITY_BYTE_ADDRESSABLE_PERSISTENT_MEMORY_HARDWARE_MIRRORING BIT4 /// /// ACPI RASF Parameter Block structure for PATROL_SCRUB /// typedef struct { - UINT16 Type; - UINT16 Version; - UINT16 Length; - UINT16 PatrolScrubCommand; - UINT64 RequestedAddressRange[2]; - UINT64 ActualAddressRange[2]; - UINT16 Flags; - UINT8 RequestedSpeed; + UINT16 Type; + UINT16 Version; + UINT16 Length; + UINT16 PatrolScrubCommand; + UINT64 RequestedAddressRange[2]; + UINT64 ActualAddressRange[2]; + UINT16 Flags; + UINT8 RequestedSpeed; } EFI_ACPI_6_3_RASF_PATROL_SCRUB_PLATFORM_BLOCK_STRUCTURE; /// /// ACPI RASF Patrol Scrub command /// -#define EFI_ACPI_6_3_RASF_PATROL_SCRUB_COMMAND_GET_PATROL_PARAMETERS 0x01 -#define EFI_ACPI_6_3_RASF_PATROL_SCRUB_COMMAND_START_PATROL_SCRUBBER 0x02 -#define EFI_ACPI_6_3_RASF_PATROL_SCRUB_COMMAND_STOP_PATROL_SCRUBBER 0x03 +#define EFI_ACPI_6_3_RASF_PATROL_SCRUB_COMMAND_GET_PATROL_PARAMETERS 0x01 +#define EFI_ACPI_6_3_RASF_PATROL_SCRUB_COMMAND_START_PATROL_SCRUBBER 0x02 +#define EFI_ACPI_6_3_RASF_PATROL_SCRUB_COMMAND_STOP_PATROL_SCRUBBER 0x03 /// /// Memory Power State Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 PlatformCommunicationChannelIdentifier; - UINT8 Reserved[3]; -// Memory Power Node Structure -// Memory Power State Characteristics + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 PlatformCommunicationChannelIdentifier; + UINT8 Reserved[3]; + // Memory Power Node Structure + // Memory Power State Characteristics } EFI_ACPI_6_3_MEMORY_POWER_STATUS_TABLE; /// /// MPST Version (as defined in ACPI 6.3 spec.) /// -#define EFI_ACPI_6_3_MEMORY_POWER_STATE_TABLE_REVISION 0x01 +#define EFI_ACPI_6_3_MEMORY_POWER_STATE_TABLE_REVISION 0x01 /// /// MPST Platform Communication Channel Shared Memory Region definition. /// typedef struct { - UINT32 Signature; - UINT16 Command; - UINT16 Status; - UINT32 MemoryPowerCommandRegister; - UINT32 MemoryPowerStatusRegister; - UINT32 PowerStateId; - UINT32 MemoryPowerNodeId; - UINT64 MemoryEnergyConsumed; - UINT64 ExpectedAveragePowerComsuned; + UINT32 Signature; + UINT16 Command; + UINT16 Status; + UINT32 MemoryPowerCommandRegister; + UINT32 MemoryPowerStatusRegister; + UINT32 PowerStateId; + UINT32 MemoryPowerNodeId; + UINT64 MemoryEnergyConsumed; + UINT64 ExpectedAveragePowerComsuned; } EFI_ACPI_6_3_MPST_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION; /// @@ -957,186 +957,186 @@ typedef struct { /// /// ACPI MPST Memory Power command /// -#define EFI_ACPI_6_3_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_POWER_STATE 0x01 -#define EFI_ACPI_6_3_MPST_MEMORY_POWER_COMMAND_SET_MEMORY_POWER_STATE 0x02 -#define EFI_ACPI_6_3_MPST_MEMORY_POWER_COMMAND_GET_AVERAGE_POWER_CONSUMED 0x03 -#define EFI_ACPI_6_3_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_ENERGY_CONSUMED 0x04 +#define EFI_ACPI_6_3_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_POWER_STATE 0x01 +#define EFI_ACPI_6_3_MPST_MEMORY_POWER_COMMAND_SET_MEMORY_POWER_STATE 0x02 +#define EFI_ACPI_6_3_MPST_MEMORY_POWER_COMMAND_GET_AVERAGE_POWER_CONSUMED 0x03 +#define EFI_ACPI_6_3_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_ENERGY_CONSUMED 0x04 /// /// MPST Memory Power Node Table /// typedef struct { - UINT8 PowerStateValue; - UINT8 PowerStateInformationIndex; + UINT8 PowerStateValue; + UINT8 PowerStateInformationIndex; } EFI_ACPI_6_3_MPST_MEMORY_POWER_STATE; typedef struct { - UINT8 Flag; - UINT8 Reserved; - UINT16 MemoryPowerNodeId; - UINT32 Length; - UINT64 AddressBase; - UINT64 AddressLength; - UINT32 NumberOfPowerStates; - UINT32 NumberOfPhysicalComponents; -//EFI_ACPI_6_3_MPST_MEMORY_POWER_STATE MemoryPowerState[NumberOfPowerStates]; -//UINT16 PhysicalComponentIdentifier[NumberOfPhysicalComponents]; + UINT8 Flag; + UINT8 Reserved; + UINT16 MemoryPowerNodeId; + UINT32 Length; + UINT64 AddressBase; + UINT64 AddressLength; + UINT32 NumberOfPowerStates; + UINT32 NumberOfPhysicalComponents; + // EFI_ACPI_6_3_MPST_MEMORY_POWER_STATE MemoryPowerState[NumberOfPowerStates]; + // UINT16 PhysicalComponentIdentifier[NumberOfPhysicalComponents]; } EFI_ACPI_6_3_MPST_MEMORY_POWER_STRUCTURE; -#define EFI_ACPI_6_3_MPST_MEMORY_POWER_STRUCTURE_FLAG_ENABLE 0x01 -#define EFI_ACPI_6_3_MPST_MEMORY_POWER_STRUCTURE_FLAG_POWER_MANAGED 0x02 -#define EFI_ACPI_6_3_MPST_MEMORY_POWER_STRUCTURE_FLAG_HOT_PLUGGABLE 0x04 +#define EFI_ACPI_6_3_MPST_MEMORY_POWER_STRUCTURE_FLAG_ENABLE 0x01 +#define EFI_ACPI_6_3_MPST_MEMORY_POWER_STRUCTURE_FLAG_POWER_MANAGED 0x02 +#define EFI_ACPI_6_3_MPST_MEMORY_POWER_STRUCTURE_FLAG_HOT_PLUGGABLE 0x04 typedef struct { - UINT16 MemoryPowerNodeCount; - UINT8 Reserved[2]; + UINT16 MemoryPowerNodeCount; + UINT8 Reserved[2]; } EFI_ACPI_6_3_MPST_MEMORY_POWER_NODE_TABLE; /// /// MPST Memory Power State Characteristics Table /// typedef struct { - UINT8 PowerStateStructureID; - UINT8 Flag; - UINT16 Reserved; - UINT32 AveragePowerConsumedInMPS0; - UINT32 RelativePowerSavingToMPS0; - UINT64 ExitLatencyToMPS0; + UINT8 PowerStateStructureID; + UINT8 Flag; + UINT16 Reserved; + UINT32 AveragePowerConsumedInMPS0; + UINT32 RelativePowerSavingToMPS0; + UINT64 ExitLatencyToMPS0; } EFI_ACPI_6_3_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE; -#define EFI_ACPI_6_3_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_MEMORY_CONTENT_PRESERVED 0x01 -#define EFI_ACPI_6_3_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_ENTRY 0x02 -#define EFI_ACPI_6_3_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_EXIT 0x04 +#define EFI_ACPI_6_3_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_MEMORY_CONTENT_PRESERVED 0x01 +#define EFI_ACPI_6_3_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_ENTRY 0x02 +#define EFI_ACPI_6_3_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_EXIT 0x04 typedef struct { - UINT16 MemoryPowerStateCharacteristicsCount; - UINT8 Reserved[2]; + UINT16 MemoryPowerStateCharacteristicsCount; + UINT8 Reserved[2]; } EFI_ACPI_6_3_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_TABLE; /// /// Memory Topology Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 Reserved; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 Reserved; } EFI_ACPI_6_3_MEMORY_TOPOLOGY_TABLE; /// /// PMTT Version (as defined in ACPI 6.3 spec.) /// -#define EFI_ACPI_6_3_MEMORY_TOPOLOGY_TABLE_REVISION 0x01 +#define EFI_ACPI_6_3_MEMORY_TOPOLOGY_TABLE_REVISION 0x01 /// /// Common Memory Aggregator Device Structure. /// typedef struct { - UINT8 Type; - UINT8 Reserved; - UINT16 Length; - UINT16 Flags; - UINT16 Reserved1; + UINT8 Type; + UINT8 Reserved; + UINT16 Length; + UINT16 Flags; + UINT16 Reserved1; } EFI_ACPI_6_3_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE; /// /// Memory Aggregator Device Type /// -#define EFI_ACPI_6_3_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_SOCKET 0x0 -#define EFI_ACPI_6_3_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_MEMORY_CONTROLLER 0x1 -#define EFI_ACPI_6_3_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_DIMM 0x2 +#define EFI_ACPI_6_3_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_SOCKET 0x0 +#define EFI_ACPI_6_3_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_MEMORY_CONTROLLER 0x1 +#define EFI_ACPI_6_3_PMMT_MEMORY_AGGREGATOR_DEVICE_TYPE_DIMM 0x2 /// /// Socket Memory Aggregator Device Structure. /// typedef struct { - EFI_ACPI_6_3_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; - UINT16 SocketIdentifier; - UINT16 Reserved; -//EFI_ACPI_6_3_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE MemoryController[]; + EFI_ACPI_6_3_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; + UINT16 SocketIdentifier; + UINT16 Reserved; + // EFI_ACPI_6_3_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE MemoryController[]; } EFI_ACPI_6_3_PMMT_SOCKET_MEMORY_AGGREGATOR_DEVICE_STRUCTURE; /// /// MemoryController Memory Aggregator Device Structure. /// typedef struct { - EFI_ACPI_6_3_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; - UINT32 ReadLatency; - UINT32 WriteLatency; - UINT32 ReadBandwidth; - UINT32 WriteBandwidth; - UINT16 OptimalAccessUnit; - UINT16 OptimalAccessAlignment; - UINT16 Reserved; - UINT16 NumberOfProximityDomains; -//UINT32 ProximityDomain[NumberOfProximityDomains]; -//EFI_ACPI_6_3_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE PhysicalComponent[]; + EFI_ACPI_6_3_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; + UINT32 ReadLatency; + UINT32 WriteLatency; + UINT32 ReadBandwidth; + UINT32 WriteBandwidth; + UINT16 OptimalAccessUnit; + UINT16 OptimalAccessAlignment; + UINT16 Reserved; + UINT16 NumberOfProximityDomains; + // UINT32 ProximityDomain[NumberOfProximityDomains]; + // EFI_ACPI_6_3_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE PhysicalComponent[]; } EFI_ACPI_6_3_PMMT_MEMORY_CONTROLLER_MEMORY_AGGREGATOR_DEVICE_STRUCTURE; /// /// DIMM Memory Aggregator Device Structure. /// typedef struct { - EFI_ACPI_6_3_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; - UINT16 PhysicalComponentIdentifier; - UINT16 Reserved; - UINT32 SizeOfDimm; - UINT32 SmbiosHandle; + EFI_ACPI_6_3_PMMT_COMMON_MEMORY_AGGREGATOR_DEVICE_STRUCTURE Header; + UINT16 PhysicalComponentIdentifier; + UINT16 Reserved; + UINT32 SizeOfDimm; + UINT32 SmbiosHandle; } EFI_ACPI_6_3_PMMT_DIMM_MEMORY_AGGREGATOR_DEVICE_STRUCTURE; /// /// Boot Graphics Resource Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_DESCRIPTION_HEADER Header; /// /// 2-bytes (16 bit) version ID. This value must be 1. /// - UINT16 Version; + UINT16 Version; /// /// 1-byte status field indicating current status about the table. /// Bits[7:1] = Reserved (must be zero) /// Bit [0] = Valid. A one indicates the boot image graphic is valid. /// - UINT8 Status; + UINT8 Status; /// /// 1-byte enumerated type field indicating format of the image. /// 0 = Bitmap /// 1 - 255 Reserved (for future use) /// - UINT8 ImageType; + UINT8 ImageType; /// /// 8-byte (64 bit) physical address pointing to the firmware's in-memory copy /// of the image bitmap. /// - UINT64 ImageAddress; + UINT64 ImageAddress; /// /// A 4-byte (32-bit) unsigned long describing the display X-offset of the boot image. /// (X, Y) display offset of the top left corner of the boot image. /// The top left corner of the display is at offset (0, 0). /// - UINT32 ImageOffsetX; + UINT32 ImageOffsetX; /// /// A 4-byte (32-bit) unsigned long describing the display Y-offset of the boot image. /// (X, Y) display offset of the top left corner of the boot image. /// The top left corner of the display is at offset (0, 0). /// - UINT32 ImageOffsetY; + UINT32 ImageOffsetY; } EFI_ACPI_6_3_BOOT_GRAPHICS_RESOURCE_TABLE; /// /// BGRT Revision /// -#define EFI_ACPI_6_3_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION 1 +#define EFI_ACPI_6_3_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION 1 /// /// BGRT Version /// -#define EFI_ACPI_6_3_BGRT_VERSION 0x01 +#define EFI_ACPI_6_3_BGRT_VERSION 0x01 /// /// BGRT Status /// -#define EFI_ACPI_6_3_BGRT_STATUS_NOT_DISPLAYED 0x00 -#define EFI_ACPI_6_3_BGRT_STATUS_DISPLAYED 0x01 +#define EFI_ACPI_6_3_BGRT_STATUS_NOT_DISPLAYED 0x00 +#define EFI_ACPI_6_3_BGRT_STATUS_DISPLAYED 0x01 /// /// BGRT Image Type @@ -1146,26 +1146,26 @@ typedef struct { /// /// FPDT Version (as defined in ACPI 6.3 spec.) /// -#define EFI_ACPI_6_3_FIRMWARE_PERFORMANCE_DATA_TABLE_REVISION 0x01 +#define EFI_ACPI_6_3_FIRMWARE_PERFORMANCE_DATA_TABLE_REVISION 0x01 /// /// FPDT Performance Record Types /// -#define EFI_ACPI_6_3_FPDT_RECORD_TYPE_FIRMWARE_BASIC_BOOT_POINTER 0x0000 -#define EFI_ACPI_6_3_FPDT_RECORD_TYPE_S3_PERFORMANCE_TABLE_POINTER 0x0001 +#define EFI_ACPI_6_3_FPDT_RECORD_TYPE_FIRMWARE_BASIC_BOOT_POINTER 0x0000 +#define EFI_ACPI_6_3_FPDT_RECORD_TYPE_S3_PERFORMANCE_TABLE_POINTER 0x0001 /// /// FPDT Performance Record Revision /// -#define EFI_ACPI_6_3_FPDT_RECORD_REVISION_FIRMWARE_BASIC_BOOT_POINTER 0x01 -#define EFI_ACPI_6_3_FPDT_RECORD_REVISION_S3_PERFORMANCE_TABLE_POINTER 0x01 +#define EFI_ACPI_6_3_FPDT_RECORD_REVISION_FIRMWARE_BASIC_BOOT_POINTER 0x01 +#define EFI_ACPI_6_3_FPDT_RECORD_REVISION_S3_PERFORMANCE_TABLE_POINTER 0x01 /// /// FPDT Runtime Performance Record Types /// -#define EFI_ACPI_6_3_FPDT_RUNTIME_RECORD_TYPE_S3_RESUME 0x0000 -#define EFI_ACPI_6_3_FPDT_RUNTIME_RECORD_TYPE_S3_SUSPEND 0x0001 -#define EFI_ACPI_6_3_FPDT_RUNTIME_RECORD_TYPE_FIRMWARE_BASIC_BOOT 0x0002 +#define EFI_ACPI_6_3_FPDT_RUNTIME_RECORD_TYPE_S3_RESUME 0x0000 +#define EFI_ACPI_6_3_FPDT_RUNTIME_RECORD_TYPE_S3_SUSPEND 0x0001 +#define EFI_ACPI_6_3_FPDT_RUNTIME_RECORD_TYPE_FIRMWARE_BASIC_BOOT 0x0002 /// /// FPDT Runtime Performance Record Revision @@ -1178,77 +1178,77 @@ typedef struct { /// FPDT Performance Record header /// typedef struct { - UINT16 Type; - UINT8 Length; - UINT8 Revision; + UINT16 Type; + UINT8 Length; + UINT8 Revision; } EFI_ACPI_6_3_FPDT_PERFORMANCE_RECORD_HEADER; /// /// FPDT Performance Table header /// typedef struct { - UINT32 Signature; - UINT32 Length; + UINT32 Signature; + UINT32 Length; } EFI_ACPI_6_3_FPDT_PERFORMANCE_TABLE_HEADER; /// /// FPDT Firmware Basic Boot Performance Pointer Record Structure /// typedef struct { - EFI_ACPI_6_3_FPDT_PERFORMANCE_RECORD_HEADER Header; - UINT32 Reserved; + EFI_ACPI_6_3_FPDT_PERFORMANCE_RECORD_HEADER Header; + UINT32 Reserved; /// /// 64-bit processor-relative physical address of the Basic Boot Performance Table. /// - UINT64 BootPerformanceTablePointer; + UINT64 BootPerformanceTablePointer; } EFI_ACPI_6_3_FPDT_BOOT_PERFORMANCE_TABLE_POINTER_RECORD; /// /// FPDT S3 Performance Table Pointer Record Structure /// typedef struct { - EFI_ACPI_6_3_FPDT_PERFORMANCE_RECORD_HEADER Header; - UINT32 Reserved; + EFI_ACPI_6_3_FPDT_PERFORMANCE_RECORD_HEADER Header; + UINT32 Reserved; /// /// 64-bit processor-relative physical address of the S3 Performance Table. /// - UINT64 S3PerformanceTablePointer; + UINT64 S3PerformanceTablePointer; } EFI_ACPI_6_3_FPDT_S3_PERFORMANCE_TABLE_POINTER_RECORD; /// /// FPDT Firmware Basic Boot Performance Record Structure /// typedef struct { - EFI_ACPI_6_3_FPDT_PERFORMANCE_RECORD_HEADER Header; - UINT32 Reserved; + EFI_ACPI_6_3_FPDT_PERFORMANCE_RECORD_HEADER Header; + UINT32 Reserved; /// /// Timer value logged at the beginning of firmware image execution. /// This may not always be zero or near zero. /// - UINT64 ResetEnd; + UINT64 ResetEnd; /// /// Timer value logged just prior to loading the OS boot loader into memory. /// For non-UEFI compatible boots, this field must be zero. /// - UINT64 OsLoaderLoadImageStart; + UINT64 OsLoaderLoadImageStart; /// /// Timer value logged just prior to launching the previously loaded OS boot loader image. /// For non-UEFI compatible boots, the timer value logged will be just prior /// to the INT 19h handler invocation. /// - UINT64 OsLoaderStartImageStart; + UINT64 OsLoaderStartImageStart; /// /// Timer value logged at the point when the OS loader calls the /// ExitBootServices function for UEFI compatible firmware. /// For non-UEFI compatible boots, this field must be zero. /// - UINT64 ExitBootServicesEntry; + UINT64 ExitBootServicesEntry; /// /// Timer value logged at the point just prior towhen the OS loader gaining /// control back from calls the ExitBootServices function for UEFI compatible firmware. /// For non-UEFI compatible boots, this field must be zero. /// - UINT64 ExitBootServicesExit; + UINT64 ExitBootServicesExit; } EFI_ACPI_6_3_FPDT_FIRMWARE_BASIC_BOOT_RECORD; /// @@ -1260,7 +1260,7 @@ typedef struct { // FPDT Firmware Basic Boot Performance Table // typedef struct { - EFI_ACPI_6_3_FPDT_PERFORMANCE_TABLE_HEADER Header; + EFI_ACPI_6_3_FPDT_PERFORMANCE_TABLE_HEADER Header; // // one or more Performance Records. // @@ -1275,7 +1275,7 @@ typedef struct { // FPDT Firmware S3 Boot Performance Table // typedef struct { - EFI_ACPI_6_3_FPDT_PERFORMANCE_TABLE_HEADER Header; + EFI_ACPI_6_3_FPDT_PERFORMANCE_TABLE_HEADER Header; // // one or more Performance Records. // @@ -1285,147 +1285,147 @@ typedef struct { /// FPDT Basic S3 Resume Performance Record /// typedef struct { - EFI_ACPI_6_3_FPDT_PERFORMANCE_RECORD_HEADER Header; + EFI_ACPI_6_3_FPDT_PERFORMANCE_RECORD_HEADER Header; /// /// A count of the number of S3 resume cycles since the last full boot sequence. /// - UINT32 ResumeCount; + UINT32 ResumeCount; /// /// Timer recorded at the end of BIOS S3 resume, just prior to handoff to the /// OS waking vector. Only the most recent resume cycle's time is retained. /// - UINT64 FullResume; + UINT64 FullResume; /// /// Average timer value of all resume cycles logged since the last full boot /// sequence, including the most recent resume. Note that the entire log of /// timer values does not need to be retained in order to calculate this average. /// - UINT64 AverageResume; + UINT64 AverageResume; } EFI_ACPI_6_3_FPDT_S3_RESUME_RECORD; /// /// FPDT Basic S3 Suspend Performance Record /// typedef struct { - EFI_ACPI_6_3_FPDT_PERFORMANCE_RECORD_HEADER Header; + EFI_ACPI_6_3_FPDT_PERFORMANCE_RECORD_HEADER Header; /// /// Timer value recorded at the OS write to SLP_TYP upon entry to S3. /// Only the most recent suspend cycle's timer value is retained. /// - UINT64 SuspendStart; + UINT64 SuspendStart; /// /// Timer value recorded at the final firmware write to SLP_TYP (or other /// mechanism) used to trigger hardware entry to S3. /// Only the most recent suspend cycle's timer value is retained. /// - UINT64 SuspendEnd; + UINT64 SuspendEnd; } EFI_ACPI_6_3_FPDT_S3_SUSPEND_RECORD; /// /// Firmware Performance Record Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_DESCRIPTION_HEADER Header; } EFI_ACPI_6_3_FIRMWARE_PERFORMANCE_RECORD_TABLE; /// /// Generic Timer Description Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT64 CntControlBasePhysicalAddress; - UINT32 Reserved; - UINT32 SecurePL1TimerGSIV; - UINT32 SecurePL1TimerFlags; - UINT32 NonSecurePL1TimerGSIV; - UINT32 NonSecurePL1TimerFlags; - UINT32 VirtualTimerGSIV; - UINT32 VirtualTimerFlags; - UINT32 NonSecurePL2TimerGSIV; - UINT32 NonSecurePL2TimerFlags; - UINT64 CntReadBasePhysicalAddress; - UINT32 PlatformTimerCount; - UINT32 PlatformTimerOffset; - UINT32 VirtualPL2TimerGSIV; - UINT32 VirtualPL2TimerFlags; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT64 CntControlBasePhysicalAddress; + UINT32 Reserved; + UINT32 SecurePL1TimerGSIV; + UINT32 SecurePL1TimerFlags; + UINT32 NonSecurePL1TimerGSIV; + UINT32 NonSecurePL1TimerFlags; + UINT32 VirtualTimerGSIV; + UINT32 VirtualTimerFlags; + UINT32 NonSecurePL2TimerGSIV; + UINT32 NonSecurePL2TimerFlags; + UINT64 CntReadBasePhysicalAddress; + UINT32 PlatformTimerCount; + UINT32 PlatformTimerOffset; + UINT32 VirtualPL2TimerGSIV; + UINT32 VirtualPL2TimerFlags; } EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE; /// /// GTDT Version (as defined in ACPI 6.3 spec.) /// -#define EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION 0x03 +#define EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION 0x03 /// /// Timer Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_3_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 -#define EFI_ACPI_6_3_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 -#define EFI_ACPI_6_3_GTDT_TIMER_FLAG_ALWAYS_ON_CAPABILITY BIT2 +#define EFI_ACPI_6_3_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 +#define EFI_ACPI_6_3_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 +#define EFI_ACPI_6_3_GTDT_TIMER_FLAG_ALWAYS_ON_CAPABILITY BIT2 /// /// Platform Timer Type /// -#define EFI_ACPI_6_3_GTDT_GT_BLOCK 0 -#define EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG 1 +#define EFI_ACPI_6_3_GTDT_GT_BLOCK 0 +#define EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG 1 /// /// GT Block Structure /// typedef struct { - UINT8 Type; - UINT16 Length; - UINT8 Reserved; - UINT64 CntCtlBase; - UINT32 GTBlockTimerCount; - UINT32 GTBlockTimerOffset; + UINT8 Type; + UINT16 Length; + UINT8 Reserved; + UINT64 CntCtlBase; + UINT32 GTBlockTimerCount; + UINT32 GTBlockTimerOffset; } EFI_ACPI_6_3_GTDT_GT_BLOCK_STRUCTURE; /// /// GT Block Timer Structure /// typedef struct { - UINT8 GTFrameNumber; - UINT8 Reserved[3]; - UINT64 CntBaseX; - UINT64 CntEL0BaseX; - UINT32 GTxPhysicalTimerGSIV; - UINT32 GTxPhysicalTimerFlags; - UINT32 GTxVirtualTimerGSIV; - UINT32 GTxVirtualTimerFlags; - UINT32 GTxCommonFlags; + UINT8 GTFrameNumber; + UINT8 Reserved[3]; + UINT64 CntBaseX; + UINT64 CntEL0BaseX; + UINT32 GTxPhysicalTimerGSIV; + UINT32 GTxPhysicalTimerFlags; + UINT32 GTxVirtualTimerGSIV; + UINT32 GTxVirtualTimerFlags; + UINT32 GTxCommonFlags; } EFI_ACPI_6_3_GTDT_GT_BLOCK_TIMER_STRUCTURE; /// /// GT Block Physical Timers and Virtual Timers Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_3_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 -#define EFI_ACPI_6_3_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 +#define EFI_ACPI_6_3_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 +#define EFI_ACPI_6_3_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 /// /// Common Flags Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_3_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER BIT0 -#define EFI_ACPI_6_3_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY BIT1 +#define EFI_ACPI_6_3_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER BIT0 +#define EFI_ACPI_6_3_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY BIT1 /// /// SBSA Generic Watchdog Structure /// typedef struct { - UINT8 Type; - UINT16 Length; - UINT8 Reserved; - UINT64 RefreshFramePhysicalAddress; - UINT64 WatchdogControlFramePhysicalAddress; - UINT32 WatchdogTimerGSIV; - UINT32 WatchdogTimerFlags; + UINT8 Type; + UINT16 Length; + UINT8 Reserved; + UINT64 RefreshFramePhysicalAddress; + UINT64 WatchdogControlFramePhysicalAddress; + UINT32 WatchdogTimerGSIV; + UINT32 WatchdogTimerFlags; } EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE; /// /// SBSA Generic Watchdog Timer Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_MODE BIT0 -#define EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_POLARITY BIT1 -#define EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER BIT2 +#define EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_MODE BIT0 +#define EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_POLARITY BIT1 +#define EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER BIT2 // // NVDIMM Firmware Interface Table definition. @@ -1438,63 +1438,63 @@ typedef struct { // // NFIT Version (as defined in ACPI 6.3 spec.) // -#define EFI_ACPI_6_3_NVDIMM_FIRMWARE_INTERFACE_TABLE_REVISION 0x1 +#define EFI_ACPI_6_3_NVDIMM_FIRMWARE_INTERFACE_TABLE_REVISION 0x1 // // Definition for NFIT Table Structure Types // -#define EFI_ACPI_6_3_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_STRUCTURE_TYPE 0 -#define EFI_ACPI_6_3_NFIT_NVDIMM_REGION_MAPPING_STRUCTURE_TYPE 1 -#define EFI_ACPI_6_3_NFIT_INTERLEAVE_STRUCTURE_TYPE 2 -#define EFI_ACPI_6_3_NFIT_SMBIOS_MANAGEMENT_INFORMATION_STRUCTURE_TYPE 3 -#define EFI_ACPI_6_3_NFIT_NVDIMM_CONTROL_REGION_STRUCTURE_TYPE 4 -#define EFI_ACPI_6_3_NFIT_NVDIMM_BLOCK_DATA_WINDOW_REGION_STRUCTURE_TYPE 5 -#define EFI_ACPI_6_3_NFIT_FLUSH_HINT_ADDRESS_STRUCTURE_TYPE 6 +#define EFI_ACPI_6_3_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_STRUCTURE_TYPE 0 +#define EFI_ACPI_6_3_NFIT_NVDIMM_REGION_MAPPING_STRUCTURE_TYPE 1 +#define EFI_ACPI_6_3_NFIT_INTERLEAVE_STRUCTURE_TYPE 2 +#define EFI_ACPI_6_3_NFIT_SMBIOS_MANAGEMENT_INFORMATION_STRUCTURE_TYPE 3 +#define EFI_ACPI_6_3_NFIT_NVDIMM_CONTROL_REGION_STRUCTURE_TYPE 4 +#define EFI_ACPI_6_3_NFIT_NVDIMM_BLOCK_DATA_WINDOW_REGION_STRUCTURE_TYPE 5 +#define EFI_ACPI_6_3_NFIT_FLUSH_HINT_ADDRESS_STRUCTURE_TYPE 6 // // Definition for NFIT Structure Header // typedef struct { - UINT16 Type; - UINT16 Length; + UINT16 Type; + UINT16 Length; } EFI_ACPI_6_3_NFIT_STRUCTURE_HEADER; // // Definition for System Physical Address Range Structure // -#define EFI_ACPI_6_3_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_CONTROL_REGION_FOR_MANAGEMENT BIT0 -#define EFI_ACPI_6_3_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_PROXIMITY_DOMAIN_VALID BIT1 -#define EFI_ACPI_6_3_NFIT_GUID_VOLATILE_MEMORY_REGION { 0x7305944F, 0xFDDA, 0x44E3, { 0xB1, 0x6C, 0x3F, 0x22, 0xD2, 0x52, 0xE5, 0xD0 }} -#define EFI_ACPI_6_3_NFIT_GUID_BYTE_ADDRESSABLE_PERSISTENT_MEMORY_REGION { 0x66F0D379, 0xB4F3, 0x4074, { 0xAC, 0x43, 0x0D, 0x33, 0x18, 0xB7, 0x8C, 0xDB }} -#define EFI_ACPI_6_3_NFIT_GUID_NVDIMM_CONTROL_REGION { 0x92F701F6, 0x13B4, 0x405D, { 0x91, 0x0B, 0x29, 0x93, 0x67, 0xE8, 0x23, 0x4C }} -#define EFI_ACPI_6_3_NFIT_GUID_NVDIMM_BLOCK_DATA_WINDOW_REGION { 0x91AF0530, 0x5D86, 0x470E, { 0xA6, 0xB0, 0x0A, 0x2D, 0xB9, 0x40, 0x82, 0x49 }} -#define EFI_ACPI_6_3_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE { 0x77AB535A, 0x45FC, 0x624B, { 0x55, 0x60, 0xF7, 0xB2, 0x81, 0xD1, 0xF9, 0x6E }} -#define EFI_ACPI_6_3_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE { 0x3D5ABD30, 0x4175, 0x87CE, { 0x6D, 0x64, 0xD2, 0xAD, 0xE5, 0x23, 0xC4, 0xBB }} -#define EFI_ACPI_6_3_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT { 0x5CEA02C9, 0x4D07, 0x69D3, { 0x26, 0x9F ,0x44, 0x96, 0xFB, 0xE0, 0x96, 0xF9 }} -#define EFI_ACPI_6_3_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT { 0x08018188, 0x42CD, 0xBB48, { 0x10, 0x0F, 0x53, 0x87, 0xD5, 0x3D, 0xED, 0x3D }} -typedef struct { - UINT16 Type; - UINT16 Length; - UINT16 SPARangeStructureIndex; - UINT16 Flags; - UINT32 Reserved_8; - UINT32 ProximityDomain; - GUID AddressRangeTypeGUID; - UINT64 SystemPhysicalAddressRangeBase; - UINT64 SystemPhysicalAddressRangeLength; - UINT64 AddressRangeMemoryMappingAttribute; +#define EFI_ACPI_6_3_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_CONTROL_REGION_FOR_MANAGEMENT BIT0 +#define EFI_ACPI_6_3_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_PROXIMITY_DOMAIN_VALID BIT1 +#define EFI_ACPI_6_3_NFIT_GUID_VOLATILE_MEMORY_REGION { 0x7305944F, 0xFDDA, 0x44E3, { 0xB1, 0x6C, 0x3F, 0x22, 0xD2, 0x52, 0xE5, 0xD0 }} +#define EFI_ACPI_6_3_NFIT_GUID_BYTE_ADDRESSABLE_PERSISTENT_MEMORY_REGION { 0x66F0D379, 0xB4F3, 0x4074, { 0xAC, 0x43, 0x0D, 0x33, 0x18, 0xB7, 0x8C, 0xDB }} +#define EFI_ACPI_6_3_NFIT_GUID_NVDIMM_CONTROL_REGION { 0x92F701F6, 0x13B4, 0x405D, { 0x91, 0x0B, 0x29, 0x93, 0x67, 0xE8, 0x23, 0x4C }} +#define EFI_ACPI_6_3_NFIT_GUID_NVDIMM_BLOCK_DATA_WINDOW_REGION { 0x91AF0530, 0x5D86, 0x470E, { 0xA6, 0xB0, 0x0A, 0x2D, 0xB9, 0x40, 0x82, 0x49 }} +#define EFI_ACPI_6_3_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE { 0x77AB535A, 0x45FC, 0x624B, { 0x55, 0x60, 0xF7, 0xB2, 0x81, 0xD1, 0xF9, 0x6E }} +#define EFI_ACPI_6_3_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE { 0x3D5ABD30, 0x4175, 0x87CE, { 0x6D, 0x64, 0xD2, 0xAD, 0xE5, 0x23, 0xC4, 0xBB }} +#define EFI_ACPI_6_3_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT { 0x5CEA02C9, 0x4D07, 0x69D3, { 0x26, 0x9F ,0x44, 0x96, 0xFB, 0xE0, 0x96, 0xF9 }} +#define EFI_ACPI_6_3_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT { 0x08018188, 0x42CD, 0xBB48, { 0x10, 0x0F, 0x53, 0x87, 0xD5, 0x3D, 0xED, 0x3D }} +typedef struct { + UINT16 Type; + UINT16 Length; + UINT16 SPARangeStructureIndex; + UINT16 Flags; + UINT32 Reserved_8; + UINT32 ProximityDomain; + GUID AddressRangeTypeGUID; + UINT64 SystemPhysicalAddressRangeBase; + UINT64 SystemPhysicalAddressRangeLength; + UINT64 AddressRangeMemoryMappingAttribute; } EFI_ACPI_6_3_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_STRUCTURE; // // Definition for Memory Device to System Physical Address Range Mapping Structure // typedef struct { - UINT32 DIMMNumber:4; - UINT32 MemoryChannelNumber:4; - UINT32 MemoryControllerID:4; - UINT32 SocketID:4; - UINT32 NodeControllerID:12; - UINT32 Reserved_28:4; + UINT32 DIMMNumber : 4; + UINT32 MemoryChannelNumber : 4; + UINT32 MemoryControllerID : 4; + UINT32 SocketID : 4; + UINT32 NodeControllerID : 12; + UINT32 Reserved_28 : 4; } EFI_ACPI_6_3_NFIT_DEVICE_HANDLE; #define EFI_ACPI_6_3_NFIT_MEMORY_DEVICE_STATE_FLAGS_PREVIOUS_SAVE_FAIL BIT0 @@ -1505,198 +1505,198 @@ typedef struct { #define EFI_ACPI_6_3_NFIT_MEMORY_DEVICE_STATE_FLAGS_FIRMWARE_ENABLED_TO_NOTIFY_OSPM_ON_SMART_HEALTH_EVENTS BIT5 #define EFI_ACPI_6_3_NFIT_MEMORY_DEVICE_STATE_FLAGS_FIRMWARE_NOT_MAP_NVDIMM_TO_SPA BIT6 typedef struct { - UINT16 Type; - UINT16 Length; - EFI_ACPI_6_3_NFIT_DEVICE_HANDLE NFITDeviceHandle; - UINT16 NVDIMMPhysicalID; - UINT16 NVDIMMRegionID; - UINT16 SPARangeStructureIndex ; - UINT16 NVDIMMControlRegionStructureIndex; - UINT64 NVDIMMRegionSize; - UINT64 RegionOffset; - UINT64 NVDIMMPhysicalAddressRegionBase; - UINT16 InterleaveStructureIndex; - UINT16 InterleaveWays; - UINT16 NVDIMMStateFlags; - UINT16 Reserved_46; + UINT16 Type; + UINT16 Length; + EFI_ACPI_6_3_NFIT_DEVICE_HANDLE NFITDeviceHandle; + UINT16 NVDIMMPhysicalID; + UINT16 NVDIMMRegionID; + UINT16 SPARangeStructureIndex; + UINT16 NVDIMMControlRegionStructureIndex; + UINT64 NVDIMMRegionSize; + UINT64 RegionOffset; + UINT64 NVDIMMPhysicalAddressRegionBase; + UINT16 InterleaveStructureIndex; + UINT16 InterleaveWays; + UINT16 NVDIMMStateFlags; + UINT16 Reserved_46; } EFI_ACPI_6_3_NFIT_NVDIMM_REGION_MAPPING_STRUCTURE; // // Definition for Interleave Structure // typedef struct { - UINT16 Type; - UINT16 Length; - UINT16 InterleaveStructureIndex; - UINT16 Reserved_6; - UINT32 NumberOfLines; - UINT32 LineSize; -//UINT32 LineOffset[NumberOfLines]; + UINT16 Type; + UINT16 Length; + UINT16 InterleaveStructureIndex; + UINT16 Reserved_6; + UINT32 NumberOfLines; + UINT32 LineSize; + // UINT32 LineOffset[NumberOfLines]; } EFI_ACPI_6_3_NFIT_INTERLEAVE_STRUCTURE; // // Definition for SMBIOS Management Information Structure // typedef struct { - UINT16 Type; - UINT16 Length; - UINT32 Reserved_4; -//UINT8 Data[]; + UINT16 Type; + UINT16 Length; + UINT32 Reserved_4; + // UINT8 Data[]; } EFI_ACPI_6_3_NFIT_SMBIOS_MANAGEMENT_INFORMATION_STRUCTURE; // // Definition for NVDIMM Control Region Structure // -#define EFI_ACPI_6_3_NFIT_NVDIMM_CONTROL_REGION_VALID_FIELDS_MANUFACTURING BIT0 - -#define EFI_ACPI_6_3_NFIT_NVDIMM_CONTROL_REGION_FLAGS_BLOCK_DATA_WINDOWS_BUFFERED BIT0 -typedef struct { - UINT16 Type; - UINT16 Length; - UINT16 NVDIMMControlRegionStructureIndex; - UINT16 VendorID; - UINT16 DeviceID; - UINT16 RevisionID; - UINT16 SubsystemVendorID; - UINT16 SubsystemDeviceID; - UINT16 SubsystemRevisionID; - UINT8 ValidFields; - UINT8 ManufacturingLocation; - UINT16 ManufacturingDate; - UINT8 Reserved_22[2]; - UINT32 SerialNumber; - UINT16 RegionFormatInterfaceCode; - UINT16 NumberOfBlockControlWindows; - UINT64 SizeOfBlockControlWindow; - UINT64 CommandRegisterOffsetInBlockControlWindow; - UINT64 SizeOfCommandRegisterInBlockControlWindows; - UINT64 StatusRegisterOffsetInBlockControlWindow; - UINT64 SizeOfStatusRegisterInBlockControlWindows; - UINT16 NVDIMMControlRegionFlag; - UINT8 Reserved_74[6]; +#define EFI_ACPI_6_3_NFIT_NVDIMM_CONTROL_REGION_VALID_FIELDS_MANUFACTURING BIT0 + +#define EFI_ACPI_6_3_NFIT_NVDIMM_CONTROL_REGION_FLAGS_BLOCK_DATA_WINDOWS_BUFFERED BIT0 +typedef struct { + UINT16 Type; + UINT16 Length; + UINT16 NVDIMMControlRegionStructureIndex; + UINT16 VendorID; + UINT16 DeviceID; + UINT16 RevisionID; + UINT16 SubsystemVendorID; + UINT16 SubsystemDeviceID; + UINT16 SubsystemRevisionID; + UINT8 ValidFields; + UINT8 ManufacturingLocation; + UINT16 ManufacturingDate; + UINT8 Reserved_22[2]; + UINT32 SerialNumber; + UINT16 RegionFormatInterfaceCode; + UINT16 NumberOfBlockControlWindows; + UINT64 SizeOfBlockControlWindow; + UINT64 CommandRegisterOffsetInBlockControlWindow; + UINT64 SizeOfCommandRegisterInBlockControlWindows; + UINT64 StatusRegisterOffsetInBlockControlWindow; + UINT64 SizeOfStatusRegisterInBlockControlWindows; + UINT16 NVDIMMControlRegionFlag; + UINT8 Reserved_74[6]; } EFI_ACPI_6_3_NFIT_NVDIMM_CONTROL_REGION_STRUCTURE; // // Definition for NVDIMM Block Data Window Region Structure // typedef struct { - UINT16 Type; - UINT16 Length; - UINT16 NVDIMMControlRegionStructureIndex; - UINT16 NumberOfBlockDataWindows; - UINT64 BlockDataWindowStartOffset; - UINT64 SizeOfBlockDataWindow; - UINT64 BlockAccessibleMemoryCapacity; - UINT64 BeginningAddressOfFirstBlockInBlockAccessibleMemory; + UINT16 Type; + UINT16 Length; + UINT16 NVDIMMControlRegionStructureIndex; + UINT16 NumberOfBlockDataWindows; + UINT64 BlockDataWindowStartOffset; + UINT64 SizeOfBlockDataWindow; + UINT64 BlockAccessibleMemoryCapacity; + UINT64 BeginningAddressOfFirstBlockInBlockAccessibleMemory; } EFI_ACPI_6_3_NFIT_NVDIMM_BLOCK_DATA_WINDOW_REGION_STRUCTURE; // // Definition for Flush Hint Address Structure // typedef struct { - UINT16 Type; - UINT16 Length; - EFI_ACPI_6_3_NFIT_DEVICE_HANDLE NFITDeviceHandle; - UINT16 NumberOfFlushHintAddresses; - UINT8 Reserved_10[6]; -//UINT64 FlushHintAddress[NumberOfFlushHintAddresses]; + UINT16 Type; + UINT16 Length; + EFI_ACPI_6_3_NFIT_DEVICE_HANDLE NFITDeviceHandle; + UINT16 NumberOfFlushHintAddresses; + UINT8 Reserved_10[6]; + // UINT64 FlushHintAddress[NumberOfFlushHintAddresses]; } EFI_ACPI_6_3_NFIT_FLUSH_HINT_ADDRESS_STRUCTURE; /// /// Secure DEVices Table (SDEV) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_DESCRIPTION_HEADER Header; } EFI_ACPI_6_3_SECURE_DEVICES_TABLE_HEADER; /// /// SDEV Revision (as defined in ACPI 6.3 spec.) /// -#define EFI_ACPI_6_3_SECURE_DEVICES_TABLE_REVISION 0x01 +#define EFI_ACPI_6_3_SECURE_DEVICES_TABLE_REVISION 0x01 /// /// Secure Devcice types /// -#define EFI_ACPI_6_3_SDEV_TYPE_PCIE_ENDPOINT_DEVICE 0x01 -#define EFI_ACPI_6_3_SDEV_TYPE_ACPI_NAMESPACE_DEVICE 0x00 +#define EFI_ACPI_6_3_SDEV_TYPE_PCIE_ENDPOINT_DEVICE 0x01 +#define EFI_ACPI_6_3_SDEV_TYPE_ACPI_NAMESPACE_DEVICE 0x00 /// /// Secure Devcice flags /// -#define EFI_ACPI_6_3_SDEV_FLAG_ALLOW_HANDOFF BIT0 +#define EFI_ACPI_6_3_SDEV_FLAG_ALLOW_HANDOFF BIT0 /// /// SDEV Structure Header /// typedef struct { - UINT8 Type; - UINT8 Flags; - UINT16 Length; + UINT8 Type; + UINT8 Flags; + UINT16 Length; } EFI_ACPI_6_3_SDEV_STRUCTURE_HEADER; /// /// PCIe Endpoint Device based Secure Device Structure /// typedef struct { - UINT8 Type; - UINT8 Flags; - UINT16 Length; - UINT16 PciSegmentNumber; - UINT16 StartBusNumber; - UINT16 PciPathOffset; - UINT16 PciPathLength; - UINT16 VendorSpecificDataOffset; - UINT16 VendorSpecificDataLength; + UINT8 Type; + UINT8 Flags; + UINT16 Length; + UINT16 PciSegmentNumber; + UINT16 StartBusNumber; + UINT16 PciPathOffset; + UINT16 PciPathLength; + UINT16 VendorSpecificDataOffset; + UINT16 VendorSpecificDataLength; } EFI_ACPI_6_3_SDEV_STRUCTURE_PCIE_ENDPOINT_DEVICE; /// /// ACPI_NAMESPACE_DEVICE based Secure Device Structure /// typedef struct { - UINT8 Type; - UINT8 Flags; - UINT16 Length; - UINT16 DeviceIdentifierOffset; - UINT16 DeviceIdentifierLength; - UINT16 VendorSpecificDataOffset; - UINT16 VendorSpecificDataLength; + UINT8 Type; + UINT8 Flags; + UINT16 Length; + UINT16 DeviceIdentifierOffset; + UINT16 DeviceIdentifierLength; + UINT16 VendorSpecificDataOffset; + UINT16 VendorSpecificDataLength; } EFI_ACPI_6_3_SDEV_STRUCTURE_ACPI_NAMESPACE_DEVICE; /// /// Boot Error Record Table (BERT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 BootErrorRegionLength; - UINT64 BootErrorRegion; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 BootErrorRegionLength; + UINT64 BootErrorRegion; } EFI_ACPI_6_3_BOOT_ERROR_RECORD_TABLE_HEADER; /// /// BERT Version (as defined in ACPI 6.3 spec.) /// -#define EFI_ACPI_6_3_BOOT_ERROR_RECORD_TABLE_REVISION 0x01 +#define EFI_ACPI_6_3_BOOT_ERROR_RECORD_TABLE_REVISION 0x01 /// /// Boot Error Region Block Status Definition /// typedef struct { - UINT32 UncorrectableErrorValid:1; - UINT32 CorrectableErrorValid:1; - UINT32 MultipleUncorrectableErrors:1; - UINT32 MultipleCorrectableErrors:1; - UINT32 ErrorDataEntryCount:10; - UINT32 Reserved:18; + UINT32 UncorrectableErrorValid : 1; + UINT32 CorrectableErrorValid : 1; + UINT32 MultipleUncorrectableErrors : 1; + UINT32 MultipleCorrectableErrors : 1; + UINT32 ErrorDataEntryCount : 10; + UINT32 Reserved : 18; } EFI_ACPI_6_3_ERROR_BLOCK_STATUS; /// /// Boot Error Region Definition /// typedef struct { - EFI_ACPI_6_3_ERROR_BLOCK_STATUS BlockStatus; - UINT32 RawDataOffset; - UINT32 RawDataLength; - UINT32 DataLength; - UINT32 ErrorSeverity; + EFI_ACPI_6_3_ERROR_BLOCK_STATUS BlockStatus; + UINT32 RawDataOffset; + UINT32 RawDataLength; + UINT32 DataLength; + UINT32 ErrorSeverity; } EFI_ACPI_6_3_BOOT_ERROR_REGION_STRUCTURE; // @@ -1711,15 +1711,15 @@ typedef struct { /// Generic Error Data Entry Definition /// typedef struct { - UINT8 SectionType[16]; - UINT32 ErrorSeverity; - UINT16 Revision; - UINT8 ValidationBits; - UINT8 Flags; - UINT32 ErrorDataLength; - UINT8 FruId[16]; - UINT8 FruText[20]; - UINT8 Timestamp[8]; + UINT8 SectionType[16]; + UINT32 ErrorSeverity; + UINT16 Revision; + UINT8 ValidationBits; + UINT8 Flags; + UINT32 ErrorDataLength; + UINT8 FruId[16]; + UINT8 FruText[20]; + UINT8 Timestamp[8]; } EFI_ACPI_6_3_GENERIC_ERROR_DATA_ENTRY_STRUCTURE; /// @@ -1731,14 +1731,14 @@ typedef struct { /// HEST - Hardware Error Source Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 ErrorSourceCount; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 ErrorSourceCount; } EFI_ACPI_6_3_HARDWARE_ERROR_SOURCE_TABLE_HEADER; /// /// HEST Version (as defined in ACPI 6.3 spec.) /// -#define EFI_ACPI_6_3_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01 +#define EFI_ACPI_6_3_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01 // // Error Source structure types. @@ -1756,237 +1756,237 @@ typedef struct { // // Error Source structure flags. // -#define EFI_ACPI_6_3_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0) -#define EFI_ACPI_6_3_ERROR_SOURCE_FLAG_GLOBAL (1 << 1) -#define EFI_ACPI_6_3_ERROR_SOURCE_FLAG_GHES_ASSIST (1 << 2) +#define EFI_ACPI_6_3_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0) +#define EFI_ACPI_6_3_ERROR_SOURCE_FLAG_GLOBAL (1 << 1) +#define EFI_ACPI_6_3_ERROR_SOURCE_FLAG_GHES_ASSIST (1 << 2) /// /// IA-32 Architecture Machine Check Exception Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT64 GlobalCapabilityInitData; - UINT64 GlobalControlInitData; - UINT8 NumberOfHardwareBanks; - UINT8 Reserved1[7]; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT64 GlobalCapabilityInitData; + UINT64 GlobalControlInitData; + UINT8 NumberOfHardwareBanks; + UINT8 Reserved1[7]; } EFI_ACPI_6_3_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION_STRUCTURE; /// /// IA-32 Architecture Machine Check Bank Structure Definition /// typedef struct { - UINT8 BankNumber; - UINT8 ClearStatusOnInitialization; - UINT8 StatusDataFormat; - UINT8 Reserved0; - UINT32 ControlRegisterMsrAddress; - UINT64 ControlInitData; - UINT32 StatusRegisterMsrAddress; - UINT32 AddressRegisterMsrAddress; - UINT32 MiscRegisterMsrAddress; + UINT8 BankNumber; + UINT8 ClearStatusOnInitialization; + UINT8 StatusDataFormat; + UINT8 Reserved0; + UINT32 ControlRegisterMsrAddress; + UINT64 ControlInitData; + UINT32 StatusRegisterMsrAddress; + UINT32 AddressRegisterMsrAddress; + UINT32 MiscRegisterMsrAddress; } EFI_ACPI_6_3_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_BANK_STRUCTURE; /// /// IA-32 Architecture Machine Check Bank Structure MCA data format /// -#define EFI_ACPI_6_3_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00 -#define EFI_ACPI_6_3_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01 -#define EFI_ACPI_6_3_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02 +#define EFI_ACPI_6_3_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00 +#define EFI_ACPI_6_3_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01 +#define EFI_ACPI_6_3_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02 // // Hardware Error Notification types. All other values are reserved // -#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00 -#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01 -#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02 -#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_SCI 0x03 -#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_NMI 0x04 -#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_CMCI 0x05 -#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_MCE 0x06 -#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_GPIO_SIGNAL 0x07 -#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_ARMV8_SEA 0x08 -#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_ARMV8_SEI 0x09 -#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_GSIV 0x0A -#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_SOFTWARE_DELEGATED_EXCEPTION 0x0B +#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00 +#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01 +#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02 +#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_SCI 0x03 +#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_NMI 0x04 +#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_CMCI 0x05 +#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_MCE 0x06 +#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_GPIO_SIGNAL 0x07 +#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_ARMV8_SEA 0x08 +#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_ARMV8_SEI 0x09 +#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_GSIV 0x0A +#define EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_SOFTWARE_DELEGATED_EXCEPTION 0x0B /// /// Hardware Error Notification Configuration Write Enable Structure Definition /// typedef struct { - UINT16 Type:1; - UINT16 PollInterval:1; - UINT16 SwitchToPollingThresholdValue:1; - UINT16 SwitchToPollingThresholdWindow:1; - UINT16 ErrorThresholdValue:1; - UINT16 ErrorThresholdWindow:1; - UINT16 Reserved:10; + UINT16 Type : 1; + UINT16 PollInterval : 1; + UINT16 SwitchToPollingThresholdValue : 1; + UINT16 SwitchToPollingThresholdWindow : 1; + UINT16 ErrorThresholdValue : 1; + UINT16 ErrorThresholdWindow : 1; + UINT16 Reserved : 10; } EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE; /// /// Hardware Error Notification Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable; - UINT32 PollInterval; - UINT32 Vector; - UINT32 SwitchToPollingThresholdValue; - UINT32 SwitchToPollingThresholdWindow; - UINT32 ErrorThresholdValue; - UINT32 ErrorThresholdWindow; + UINT8 Type; + UINT8 Length; + EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable; + UINT32 PollInterval; + UINT32 Vector; + UINT32 SwitchToPollingThresholdValue; + UINT32 SwitchToPollingThresholdWindow; + UINT32 ErrorThresholdValue; + UINT32 ErrorThresholdWindow; } EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_STRUCTURE; /// /// IA-32 Architecture Corrected Machine Check Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; - UINT8 NumberOfHardwareBanks; - UINT8 Reserved1[3]; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; + UINT8 NumberOfHardwareBanks; + UINT8 Reserved1[3]; } EFI_ACPI_6_3_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK_STRUCTURE; /// /// IA-32 Architecture NMI Error Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 MaxRawDataLength; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 MaxRawDataLength; } EFI_ACPI_6_3_IA32_ARCHITECTURE_NMI_ERROR_STRUCTURE; /// /// PCI Express Root Port AER Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 Bus; - UINT16 Device; - UINT16 Function; - UINT16 DeviceControl; - UINT8 Reserved1[2]; - UINT32 UncorrectableErrorMask; - UINT32 UncorrectableErrorSeverity; - UINT32 CorrectableErrorMask; - UINT32 AdvancedErrorCapabilitiesAndControl; - UINT32 RootErrorCommand; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 Bus; + UINT16 Device; + UINT16 Function; + UINT16 DeviceControl; + UINT8 Reserved1[2]; + UINT32 UncorrectableErrorMask; + UINT32 UncorrectableErrorSeverity; + UINT32 CorrectableErrorMask; + UINT32 AdvancedErrorCapabilitiesAndControl; + UINT32 RootErrorCommand; } EFI_ACPI_6_3_PCI_EXPRESS_ROOT_PORT_AER_STRUCTURE; /// /// PCI Express Device AER Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 Bus; - UINT16 Device; - UINT16 Function; - UINT16 DeviceControl; - UINT8 Reserved1[2]; - UINT32 UncorrectableErrorMask; - UINT32 UncorrectableErrorSeverity; - UINT32 CorrectableErrorMask; - UINT32 AdvancedErrorCapabilitiesAndControl; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 Bus; + UINT16 Device; + UINT16 Function; + UINT16 DeviceControl; + UINT8 Reserved1[2]; + UINT32 UncorrectableErrorMask; + UINT32 UncorrectableErrorSeverity; + UINT32 CorrectableErrorMask; + UINT32 AdvancedErrorCapabilitiesAndControl; } EFI_ACPI_6_3_PCI_EXPRESS_DEVICE_AER_STRUCTURE; /// /// PCI Express Bridge AER Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 Bus; - UINT16 Device; - UINT16 Function; - UINT16 DeviceControl; - UINT8 Reserved1[2]; - UINT32 UncorrectableErrorMask; - UINT32 UncorrectableErrorSeverity; - UINT32 CorrectableErrorMask; - UINT32 AdvancedErrorCapabilitiesAndControl; - UINT32 SecondaryUncorrectableErrorMask; - UINT32 SecondaryUncorrectableErrorSeverity; - UINT32 SecondaryAdvancedErrorCapabilitiesAndControl; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 Bus; + UINT16 Device; + UINT16 Function; + UINT16 DeviceControl; + UINT8 Reserved1[2]; + UINT32 UncorrectableErrorMask; + UINT32 UncorrectableErrorSeverity; + UINT32 CorrectableErrorMask; + UINT32 AdvancedErrorCapabilitiesAndControl; + UINT32 SecondaryUncorrectableErrorMask; + UINT32 SecondaryUncorrectableErrorSeverity; + UINT32 SecondaryAdvancedErrorCapabilitiesAndControl; } EFI_ACPI_6_3_PCI_EXPRESS_BRIDGE_AER_STRUCTURE; /// /// Generic Hardware Error Source Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT16 RelatedSourceId; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 MaxRawDataLength; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress; - EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; - UINT32 ErrorStatusBlockLength; + UINT16 Type; + UINT16 SourceId; + UINT16 RelatedSourceId; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 MaxRawDataLength; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress; + EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; + UINT32 ErrorStatusBlockLength; } EFI_ACPI_6_3_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE; /// /// Generic Hardware Error Source Version 2 Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT16 RelatedSourceId; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 MaxRawDataLength; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress; - EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; - UINT32 ErrorStatusBlockLength; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE ReadAckRegister; - UINT64 ReadAckPreserve; - UINT64 ReadAckWrite; + UINT16 Type; + UINT16 SourceId; + UINT16 RelatedSourceId; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 MaxRawDataLength; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress; + EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; + UINT32 ErrorStatusBlockLength; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE ReadAckRegister; + UINT64 ReadAckPreserve; + UINT64 ReadAckWrite; } EFI_ACPI_6_3_GENERIC_HARDWARE_ERROR_SOURCE_VERSION_2_STRUCTURE; /// /// Generic Error Status Definition /// typedef struct { - EFI_ACPI_6_3_ERROR_BLOCK_STATUS BlockStatus; - UINT32 RawDataOffset; - UINT32 RawDataLength; - UINT32 DataLength; - UINT32 ErrorSeverity; + EFI_ACPI_6_3_ERROR_BLOCK_STATUS BlockStatus; + UINT32 RawDataOffset; + UINT32 RawDataLength; + UINT32 DataLength; + UINT32 ErrorSeverity; } EFI_ACPI_6_3_GENERIC_ERROR_STATUS_STRUCTURE; /// @@ -2003,297 +2003,297 @@ typedef struct { EFI_ACPI_6_3_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; UINT8 NumberOfHardwareBanks; UINT8 Reserved1[3]; -} EFI_ACPI_6_3_IA32_ARCHITECTURE_DEFERRED_MACHINE_CHECK_STRUCTURE;; +} EFI_ACPI_6_3_IA32_ARCHITECTURE_DEFERRED_MACHINE_CHECK_STRUCTURE; /// /// HMAT - Heterogeneous Memory Attribute Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 Reserved[4]; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 Reserved[4]; } EFI_ACPI_6_3_HETEROGENEOUS_MEMORY_ATTRIBUTE_TABLE_HEADER; /// /// HMAT Revision (as defined in ACPI 6.3 spec.) /// -#define EFI_ACPI_6_3_HETEROGENEOUS_MEMORY_ATTRIBUTE_TABLE_REVISION 0x02 +#define EFI_ACPI_6_3_HETEROGENEOUS_MEMORY_ATTRIBUTE_TABLE_REVISION 0x02 /// /// HMAT types /// -#define EFI_ACPI_6_3_HMAT_TYPE_MEMORY_PROXIMITY_DOMAIN_ATTRIBUTES 0x00 -#define EFI_ACPI_6_3_HMAT_TYPE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO 0x01 -#define EFI_ACPI_6_3_HMAT_TYPE_MEMORY_SIDE_CACHE_INFO 0x02 +#define EFI_ACPI_6_3_HMAT_TYPE_MEMORY_PROXIMITY_DOMAIN_ATTRIBUTES 0x00 +#define EFI_ACPI_6_3_HMAT_TYPE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO 0x01 +#define EFI_ACPI_6_3_HMAT_TYPE_MEMORY_SIDE_CACHE_INFO 0x02 /// /// HMAT Structure Header /// typedef struct { - UINT16 Type; - UINT8 Reserved[2]; - UINT32 Length; + UINT16 Type; + UINT8 Reserved[2]; + UINT32 Length; } EFI_ACPI_6_3_HMAT_STRUCTURE_HEADER; /// /// Memory Proximity Domain Attributes Structure flags /// typedef struct { - UINT16 InitiatorProximityDomainValid:1; - UINT16 Reserved:15; + UINT16 InitiatorProximityDomainValid : 1; + UINT16 Reserved : 15; } EFI_ACPI_6_3_HMAT_STRUCTURE_MEMORY_PROXIMITY_DOMAIN_ATTRIBUTES_FLAGS; /// /// Memory Proximity Domain Attributes Structure /// typedef struct { - UINT16 Type; - UINT8 Reserved[2]; - UINT32 Length; - EFI_ACPI_6_3_HMAT_STRUCTURE_MEMORY_PROXIMITY_DOMAIN_ATTRIBUTES_FLAGS Flags; - UINT8 Reserved1[2]; - UINT32 InitiatorProximityDomain; - UINT32 MemoryProximityDomain; - UINT8 Reserved2[20]; + UINT16 Type; + UINT8 Reserved[2]; + UINT32 Length; + EFI_ACPI_6_3_HMAT_STRUCTURE_MEMORY_PROXIMITY_DOMAIN_ATTRIBUTES_FLAGS Flags; + UINT8 Reserved1[2]; + UINT32 InitiatorProximityDomain; + UINT32 MemoryProximityDomain; + UINT8 Reserved2[20]; } EFI_ACPI_6_3_HMAT_STRUCTURE_MEMORY_PROXIMITY_DOMAIN_ATTRIBUTES; /// /// System Locality Latency and Bandwidth Information Structure flags /// typedef struct { - UINT8 MemoryHierarchy:4; - UINT8 Reserved:4; + UINT8 MemoryHierarchy : 4; + UINT8 Reserved : 4; } EFI_ACPI_6_3_HMAT_STRUCTURE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO_FLAGS; /// /// System Locality Latency and Bandwidth Information Structure /// typedef struct { - UINT16 Type; - UINT8 Reserved[2]; - UINT32 Length; - EFI_ACPI_6_3_HMAT_STRUCTURE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO_FLAGS Flags; - UINT8 DataType; - UINT8 Reserved1[2]; - UINT32 NumberOfInitiatorProximityDomains; - UINT32 NumberOfTargetProximityDomains; - UINT8 Reserved2[4]; - UINT64 EntryBaseUnit; + UINT16 Type; + UINT8 Reserved[2]; + UINT32 Length; + EFI_ACPI_6_3_HMAT_STRUCTURE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO_FLAGS Flags; + UINT8 DataType; + UINT8 Reserved1[2]; + UINT32 NumberOfInitiatorProximityDomains; + UINT32 NumberOfTargetProximityDomains; + UINT8 Reserved2[4]; + UINT64 EntryBaseUnit; } EFI_ACPI_6_3_HMAT_STRUCTURE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO; /// /// Memory Side Cache Information Structure cache attributes /// typedef struct { - UINT32 TotalCacheLevels:4; - UINT32 CacheLevel:4; - UINT32 CacheAssociativity:4; - UINT32 WritePolicy:4; - UINT32 CacheLineSize:16; + UINT32 TotalCacheLevels : 4; + UINT32 CacheLevel : 4; + UINT32 CacheAssociativity : 4; + UINT32 WritePolicy : 4; + UINT32 CacheLineSize : 16; } EFI_ACPI_6_3_HMAT_STRUCTURE_MEMORY_SIDE_CACHE_INFO_CACHE_ATTRIBUTES; /// /// Memory Side Cache Information Structure /// typedef struct { - UINT16 Type; - UINT8 Reserved[2]; - UINT32 Length; - UINT32 MemoryProximityDomain; - UINT8 Reserved1[4]; - UINT64 MemorySideCacheSize; - EFI_ACPI_6_3_HMAT_STRUCTURE_MEMORY_SIDE_CACHE_INFO_CACHE_ATTRIBUTES CacheAttributes; - UINT8 Reserved2[2]; - UINT16 NumberOfSmbiosHandles; + UINT16 Type; + UINT8 Reserved[2]; + UINT32 Length; + UINT32 MemoryProximityDomain; + UINT8 Reserved1[4]; + UINT64 MemorySideCacheSize; + EFI_ACPI_6_3_HMAT_STRUCTURE_MEMORY_SIDE_CACHE_INFO_CACHE_ATTRIBUTES CacheAttributes; + UINT8 Reserved2[2]; + UINT16 NumberOfSmbiosHandles; } EFI_ACPI_6_3_HMAT_STRUCTURE_MEMORY_SIDE_CACHE_INFO; /// /// ERST - Error Record Serialization Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 SerializationHeaderSize; - UINT8 Reserved0[4]; - UINT32 InstructionEntryCount; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 SerializationHeaderSize; + UINT8 Reserved0[4]; + UINT32 InstructionEntryCount; } EFI_ACPI_6_3_ERROR_RECORD_SERIALIZATION_TABLE_HEADER; /// /// ERST Version (as defined in ACPI 6.3 spec.) /// -#define EFI_ACPI_6_3_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01 +#define EFI_ACPI_6_3_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01 /// /// ERST Serialization Actions /// -#define EFI_ACPI_6_3_ERST_BEGIN_WRITE_OPERATION 0x00 -#define EFI_ACPI_6_3_ERST_BEGIN_READ_OPERATION 0x01 -#define EFI_ACPI_6_3_ERST_BEGIN_CLEAR_OPERATION 0x02 -#define EFI_ACPI_6_3_ERST_END_OPERATION 0x03 -#define EFI_ACPI_6_3_ERST_SET_RECORD_OFFSET 0x04 -#define EFI_ACPI_6_3_ERST_EXECUTE_OPERATION 0x05 -#define EFI_ACPI_6_3_ERST_CHECK_BUSY_STATUS 0x06 -#define EFI_ACPI_6_3_ERST_GET_COMMAND_STATUS 0x07 -#define EFI_ACPI_6_3_ERST_GET_RECORD_IDENTIFIER 0x08 -#define EFI_ACPI_6_3_ERST_SET_RECORD_IDENTIFIER 0x09 -#define EFI_ACPI_6_3_ERST_GET_RECORD_COUNT 0x0A -#define EFI_ACPI_6_3_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B -#define EFI_ACPI_6_3_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D -#define EFI_ACPI_6_3_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E -#define EFI_ACPI_6_3_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F -#define EFI_ACPI_6_3_ERST_GET_EXECUTE_OPERATION_TIMINGS 0x10 +#define EFI_ACPI_6_3_ERST_BEGIN_WRITE_OPERATION 0x00 +#define EFI_ACPI_6_3_ERST_BEGIN_READ_OPERATION 0x01 +#define EFI_ACPI_6_3_ERST_BEGIN_CLEAR_OPERATION 0x02 +#define EFI_ACPI_6_3_ERST_END_OPERATION 0x03 +#define EFI_ACPI_6_3_ERST_SET_RECORD_OFFSET 0x04 +#define EFI_ACPI_6_3_ERST_EXECUTE_OPERATION 0x05 +#define EFI_ACPI_6_3_ERST_CHECK_BUSY_STATUS 0x06 +#define EFI_ACPI_6_3_ERST_GET_COMMAND_STATUS 0x07 +#define EFI_ACPI_6_3_ERST_GET_RECORD_IDENTIFIER 0x08 +#define EFI_ACPI_6_3_ERST_SET_RECORD_IDENTIFIER 0x09 +#define EFI_ACPI_6_3_ERST_GET_RECORD_COUNT 0x0A +#define EFI_ACPI_6_3_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B +#define EFI_ACPI_6_3_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D +#define EFI_ACPI_6_3_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E +#define EFI_ACPI_6_3_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F +#define EFI_ACPI_6_3_ERST_GET_EXECUTE_OPERATION_TIMINGS 0x10 /// /// ERST Action Command Status /// -#define EFI_ACPI_6_3_ERST_STATUS_SUCCESS 0x00 -#define EFI_ACPI_6_3_ERST_STATUS_NOT_ENOUGH_SPACE 0x01 -#define EFI_ACPI_6_3_ERST_STATUS_HARDWARE_NOT_AVAILABLE 0x02 -#define EFI_ACPI_6_3_ERST_STATUS_FAILED 0x03 -#define EFI_ACPI_6_3_ERST_STATUS_RECORD_STORE_EMPTY 0x04 -#define EFI_ACPI_6_3_ERST_STATUS_RECORD_NOT_FOUND 0x05 +#define EFI_ACPI_6_3_ERST_STATUS_SUCCESS 0x00 +#define EFI_ACPI_6_3_ERST_STATUS_NOT_ENOUGH_SPACE 0x01 +#define EFI_ACPI_6_3_ERST_STATUS_HARDWARE_NOT_AVAILABLE 0x02 +#define EFI_ACPI_6_3_ERST_STATUS_FAILED 0x03 +#define EFI_ACPI_6_3_ERST_STATUS_RECORD_STORE_EMPTY 0x04 +#define EFI_ACPI_6_3_ERST_STATUS_RECORD_NOT_FOUND 0x05 /// /// ERST Serialization Instructions /// -#define EFI_ACPI_6_3_ERST_READ_REGISTER 0x00 -#define EFI_ACPI_6_3_ERST_READ_REGISTER_VALUE 0x01 -#define EFI_ACPI_6_3_ERST_WRITE_REGISTER 0x02 -#define EFI_ACPI_6_3_ERST_WRITE_REGISTER_VALUE 0x03 -#define EFI_ACPI_6_3_ERST_NOOP 0x04 -#define EFI_ACPI_6_3_ERST_LOAD_VAR1 0x05 -#define EFI_ACPI_6_3_ERST_LOAD_VAR2 0x06 -#define EFI_ACPI_6_3_ERST_STORE_VAR1 0x07 -#define EFI_ACPI_6_3_ERST_ADD 0x08 -#define EFI_ACPI_6_3_ERST_SUBTRACT 0x09 -#define EFI_ACPI_6_3_ERST_ADD_VALUE 0x0A -#define EFI_ACPI_6_3_ERST_SUBTRACT_VALUE 0x0B -#define EFI_ACPI_6_3_ERST_STALL 0x0C -#define EFI_ACPI_6_3_ERST_STALL_WHILE_TRUE 0x0D -#define EFI_ACPI_6_3_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E -#define EFI_ACPI_6_3_ERST_GOTO 0x0F -#define EFI_ACPI_6_3_ERST_SET_SRC_ADDRESS_BASE 0x10 -#define EFI_ACPI_6_3_ERST_SET_DST_ADDRESS_BASE 0x11 -#define EFI_ACPI_6_3_ERST_MOVE_DATA 0x12 +#define EFI_ACPI_6_3_ERST_READ_REGISTER 0x00 +#define EFI_ACPI_6_3_ERST_READ_REGISTER_VALUE 0x01 +#define EFI_ACPI_6_3_ERST_WRITE_REGISTER 0x02 +#define EFI_ACPI_6_3_ERST_WRITE_REGISTER_VALUE 0x03 +#define EFI_ACPI_6_3_ERST_NOOP 0x04 +#define EFI_ACPI_6_3_ERST_LOAD_VAR1 0x05 +#define EFI_ACPI_6_3_ERST_LOAD_VAR2 0x06 +#define EFI_ACPI_6_3_ERST_STORE_VAR1 0x07 +#define EFI_ACPI_6_3_ERST_ADD 0x08 +#define EFI_ACPI_6_3_ERST_SUBTRACT 0x09 +#define EFI_ACPI_6_3_ERST_ADD_VALUE 0x0A +#define EFI_ACPI_6_3_ERST_SUBTRACT_VALUE 0x0B +#define EFI_ACPI_6_3_ERST_STALL 0x0C +#define EFI_ACPI_6_3_ERST_STALL_WHILE_TRUE 0x0D +#define EFI_ACPI_6_3_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E +#define EFI_ACPI_6_3_ERST_GOTO 0x0F +#define EFI_ACPI_6_3_ERST_SET_SRC_ADDRESS_BASE 0x10 +#define EFI_ACPI_6_3_ERST_SET_DST_ADDRESS_BASE 0x11 +#define EFI_ACPI_6_3_ERST_MOVE_DATA 0x12 /// /// ERST Instruction Flags /// -#define EFI_ACPI_6_3_ERST_PRESERVE_REGISTER 0x01 +#define EFI_ACPI_6_3_ERST_PRESERVE_REGISTER 0x01 /// /// ERST Serialization Instruction Entry /// typedef struct { - UINT8 SerializationAction; - UINT8 Instruction; - UINT8 Flags; - UINT8 Reserved0; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE RegisterRegion; - UINT64 Value; - UINT64 Mask; + UINT8 SerializationAction; + UINT8 Instruction; + UINT8 Flags; + UINT8 Reserved0; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE RegisterRegion; + UINT64 Value; + UINT64 Mask; } EFI_ACPI_6_3_ERST_SERIALIZATION_INSTRUCTION_ENTRY; /// /// EINJ - Error Injection Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 InjectionHeaderSize; - UINT8 InjectionFlags; - UINT8 Reserved0[3]; - UINT32 InjectionEntryCount; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 InjectionHeaderSize; + UINT8 InjectionFlags; + UINT8 Reserved0[3]; + UINT32 InjectionEntryCount; } EFI_ACPI_6_3_ERROR_INJECTION_TABLE_HEADER; /// /// EINJ Version (as defined in ACPI 6.3 spec.) /// -#define EFI_ACPI_6_3_ERROR_INJECTION_TABLE_REVISION 0x01 +#define EFI_ACPI_6_3_ERROR_INJECTION_TABLE_REVISION 0x01 /// /// EINJ Error Injection Actions /// -#define EFI_ACPI_6_3_EINJ_BEGIN_INJECTION_OPERATION 0x00 -#define EFI_ACPI_6_3_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01 -#define EFI_ACPI_6_3_EINJ_SET_ERROR_TYPE 0x02 -#define EFI_ACPI_6_3_EINJ_GET_ERROR_TYPE 0x03 -#define EFI_ACPI_6_3_EINJ_END_OPERATION 0x04 -#define EFI_ACPI_6_3_EINJ_EXECUTE_OPERATION 0x05 -#define EFI_ACPI_6_3_EINJ_CHECK_BUSY_STATUS 0x06 -#define EFI_ACPI_6_3_EINJ_GET_COMMAND_STATUS 0x07 -#define EFI_ACPI_6_3_EINJ_TRIGGER_ERROR 0xFF +#define EFI_ACPI_6_3_EINJ_BEGIN_INJECTION_OPERATION 0x00 +#define EFI_ACPI_6_3_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01 +#define EFI_ACPI_6_3_EINJ_SET_ERROR_TYPE 0x02 +#define EFI_ACPI_6_3_EINJ_GET_ERROR_TYPE 0x03 +#define EFI_ACPI_6_3_EINJ_END_OPERATION 0x04 +#define EFI_ACPI_6_3_EINJ_EXECUTE_OPERATION 0x05 +#define EFI_ACPI_6_3_EINJ_CHECK_BUSY_STATUS 0x06 +#define EFI_ACPI_6_3_EINJ_GET_COMMAND_STATUS 0x07 +#define EFI_ACPI_6_3_EINJ_TRIGGER_ERROR 0xFF /// /// EINJ Action Command Status /// -#define EFI_ACPI_6_3_EINJ_STATUS_SUCCESS 0x00 -#define EFI_ACPI_6_3_EINJ_STATUS_UNKNOWN_FAILURE 0x01 -#define EFI_ACPI_6_3_EINJ_STATUS_INVALID_ACCESS 0x02 +#define EFI_ACPI_6_3_EINJ_STATUS_SUCCESS 0x00 +#define EFI_ACPI_6_3_EINJ_STATUS_UNKNOWN_FAILURE 0x01 +#define EFI_ACPI_6_3_EINJ_STATUS_INVALID_ACCESS 0x02 /// /// EINJ Error Type Definition /// -#define EFI_ACPI_6_3_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0) -#define EFI_ACPI_6_3_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1) -#define EFI_ACPI_6_3_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2) -#define EFI_ACPI_6_3_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3) -#define EFI_ACPI_6_3_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4) -#define EFI_ACPI_6_3_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5) -#define EFI_ACPI_6_3_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6) -#define EFI_ACPI_6_3_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7) -#define EFI_ACPI_6_3_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8) -#define EFI_ACPI_6_3_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9) -#define EFI_ACPI_6_3_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10) -#define EFI_ACPI_6_3_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11) +#define EFI_ACPI_6_3_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0) +#define EFI_ACPI_6_3_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1) +#define EFI_ACPI_6_3_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2) +#define EFI_ACPI_6_3_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3) +#define EFI_ACPI_6_3_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4) +#define EFI_ACPI_6_3_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5) +#define EFI_ACPI_6_3_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6) +#define EFI_ACPI_6_3_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7) +#define EFI_ACPI_6_3_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8) +#define EFI_ACPI_6_3_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9) +#define EFI_ACPI_6_3_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10) +#define EFI_ACPI_6_3_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11) /// /// EINJ Injection Instructions /// -#define EFI_ACPI_6_3_EINJ_READ_REGISTER 0x00 -#define EFI_ACPI_6_3_EINJ_READ_REGISTER_VALUE 0x01 -#define EFI_ACPI_6_3_EINJ_WRITE_REGISTER 0x02 -#define EFI_ACPI_6_3_EINJ_WRITE_REGISTER_VALUE 0x03 -#define EFI_ACPI_6_3_EINJ_NOOP 0x04 +#define EFI_ACPI_6_3_EINJ_READ_REGISTER 0x00 +#define EFI_ACPI_6_3_EINJ_READ_REGISTER_VALUE 0x01 +#define EFI_ACPI_6_3_EINJ_WRITE_REGISTER 0x02 +#define EFI_ACPI_6_3_EINJ_WRITE_REGISTER_VALUE 0x03 +#define EFI_ACPI_6_3_EINJ_NOOP 0x04 /// /// EINJ Instruction Flags /// -#define EFI_ACPI_6_3_EINJ_PRESERVE_REGISTER 0x01 +#define EFI_ACPI_6_3_EINJ_PRESERVE_REGISTER 0x01 /// /// EINJ Injection Instruction Entry /// typedef struct { - UINT8 InjectionAction; - UINT8 Instruction; - UINT8 Flags; - UINT8 Reserved0; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE RegisterRegion; - UINT64 Value; - UINT64 Mask; + UINT8 InjectionAction; + UINT8 Instruction; + UINT8 Flags; + UINT8 Reserved0; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE RegisterRegion; + UINT64 Value; + UINT64 Mask; } EFI_ACPI_6_3_EINJ_INJECTION_INSTRUCTION_ENTRY; /// /// EINJ Trigger Action Table /// typedef struct { - UINT32 HeaderSize; - UINT32 Revision; - UINT32 TableSize; - UINT32 EntryCount; + UINT32 HeaderSize; + UINT32 Revision; + UINT32 TableSize; + UINT32 EntryCount; } EFI_ACPI_6_3_EINJ_TRIGGER_ACTION_TABLE; /// /// Platform Communications Channel Table (PCCT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 Flags; - UINT64 Reserved; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 Flags; + UINT64 Reserved; } EFI_ACPI_6_3_PLATFORM_COMMUNICATION_CHANNEL_TABLE_HEADER; /// /// PCCT Version (as defined in ACPI 6.3 spec.) /// -#define EFI_ACPI_6_3_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION 0x02 +#define EFI_ACPI_6_3_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION 0x02 /// /// PCCT Global Flags @@ -2303,35 +2303,35 @@ typedef struct { // // PCCT Subspace type // -#define EFI_ACPI_6_3_PCCT_SUBSPACE_TYPE_GENERIC 0x00 -#define EFI_ACPI_6_3_PCCT_SUBSPACE_TYPE_1_HW_REDUCED_COMMUNICATIONS 0x01 -#define EFI_ACPI_6_3_PCCT_SUBSPACE_TYPE_2_HW_REDUCED_COMMUNICATIONS 0x02 -#define EFI_ACPI_6_3_PCCT_SUBSPACE_TYPE_3_EXTENDED_PCC 0x03 -#define EFI_ACPI_6_3_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC 0x04 +#define EFI_ACPI_6_3_PCCT_SUBSPACE_TYPE_GENERIC 0x00 +#define EFI_ACPI_6_3_PCCT_SUBSPACE_TYPE_1_HW_REDUCED_COMMUNICATIONS 0x01 +#define EFI_ACPI_6_3_PCCT_SUBSPACE_TYPE_2_HW_REDUCED_COMMUNICATIONS 0x02 +#define EFI_ACPI_6_3_PCCT_SUBSPACE_TYPE_3_EXTENDED_PCC 0x03 +#define EFI_ACPI_6_3_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC 0x04 /// /// PCC Subspace Structure Header /// typedef struct { - UINT8 Type; - UINT8 Length; + UINT8 Type; + UINT8 Length; } EFI_ACPI_6_3_PCCT_SUBSPACE_HEADER; /// /// Generic Communications Subspace Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[6]; - UINT64 BaseAddress; - UINT64 AddressLength; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; - UINT64 DoorbellPreserve; - UINT64 DoorbellWrite; - UINT32 NominalLatency; - UINT32 MaximumPeriodicAccessRate; - UINT16 MinimumRequestTurnaroundTime; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[6]; + UINT64 BaseAddress; + UINT64 AddressLength; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; + UINT64 DoorbellPreserve; + UINT64 DoorbellWrite; + UINT32 NominalLatency; + UINT32 MaximumPeriodicAccessRate; + UINT16 MinimumRequestTurnaroundTime; } EFI_ACPI_6_3_PCCT_SUBSPACE_GENERIC; /// @@ -2339,18 +2339,18 @@ typedef struct { /// typedef struct { - UINT8 Command; - UINT8 Reserved:7; - UINT8 NotifyOnCompletion:1; + UINT8 Command; + UINT8 Reserved : 7; + UINT8 NotifyOnCompletion : 1; } EFI_ACPI_6_3_PCCT_GENERIC_SHARED_MEMORY_REGION_COMMAND; typedef struct { - UINT8 CommandComplete:1; - UINT8 PlatformInterrupt:1; - UINT8 Error:1; - UINT8 PlatformNotification:1; - UINT8 Reserved:4; - UINT8 Reserved1; + UINT8 CommandComplete : 1; + UINT8 PlatformInterrupt : 1; + UINT8 Error : 1; + UINT8 PlatformNotification : 1; + UINT8 Reserved : 4; + UINT8 Reserved1; } EFI_ACPI_6_3_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS; typedef struct { @@ -2359,78 +2359,78 @@ typedef struct { EFI_ACPI_6_3_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS Status; } EFI_ACPI_6_3_PCCT_GENERIC_SHARED_MEMORY_REGION_HEADER; -#define EFI_ACPI_6_3_PCCT_SUBSPACE_PLATFORM_INTERRUPT_FLAGS_POLARITY BIT0 -#define EFI_ACPI_6_3_PCCT_SUBSPACE_PLATFORM_INTERRUPT_FLAGS_MODE BIT1 +#define EFI_ACPI_6_3_PCCT_SUBSPACE_PLATFORM_INTERRUPT_FLAGS_POLARITY BIT0 +#define EFI_ACPI_6_3_PCCT_SUBSPACE_PLATFORM_INTERRUPT_FLAGS_MODE BIT1 /// /// Type 1 HW-Reduced Communications Subspace Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 PlatformInterrupt; - UINT8 PlatformInterruptFlags; - UINT8 Reserved; - UINT64 BaseAddress; - UINT64 AddressLength; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; - UINT64 DoorbellPreserve; - UINT64 DoorbellWrite; - UINT32 NominalLatency; - UINT32 MaximumPeriodicAccessRate; - UINT16 MinimumRequestTurnaroundTime; + UINT8 Type; + UINT8 Length; + UINT32 PlatformInterrupt; + UINT8 PlatformInterruptFlags; + UINT8 Reserved; + UINT64 BaseAddress; + UINT64 AddressLength; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; + UINT64 DoorbellPreserve; + UINT64 DoorbellWrite; + UINT32 NominalLatency; + UINT32 MaximumPeriodicAccessRate; + UINT16 MinimumRequestTurnaroundTime; } EFI_ACPI_6_3_PCCT_SUBSPACE_1_HW_REDUCED_COMMUNICATIONS; /// /// Type 2 HW-Reduced Communications Subspace Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 PlatformInterrupt; - UINT8 PlatformInterruptFlags; - UINT8 Reserved; - UINT64 BaseAddress; - UINT64 AddressLength; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; - UINT64 DoorbellPreserve; - UINT64 DoorbellWrite; - UINT32 NominalLatency; - UINT32 MaximumPeriodicAccessRate; - UINT16 MinimumRequestTurnaroundTime; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE PlatformInterruptAckRegister; - UINT64 PlatformInterruptAckPreserve; - UINT64 PlatformInterruptAckWrite; + UINT8 Type; + UINT8 Length; + UINT32 PlatformInterrupt; + UINT8 PlatformInterruptFlags; + UINT8 Reserved; + UINT64 BaseAddress; + UINT64 AddressLength; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; + UINT64 DoorbellPreserve; + UINT64 DoorbellWrite; + UINT32 NominalLatency; + UINT32 MaximumPeriodicAccessRate; + UINT16 MinimumRequestTurnaroundTime; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE PlatformInterruptAckRegister; + UINT64 PlatformInterruptAckPreserve; + UINT64 PlatformInterruptAckWrite; } EFI_ACPI_6_3_PCCT_SUBSPACE_2_HW_REDUCED_COMMUNICATIONS; /// /// Type 3 Extended PCC Subspace Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 PlatformInterrupt; - UINT8 PlatformInterruptFlags; - UINT8 Reserved; - UINT64 BaseAddress; - UINT32 AddressLength; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; - UINT64 DoorbellPreserve; - UINT64 DoorbellWrite; - UINT32 NominalLatency; - UINT32 MaximumPeriodicAccessRate; - UINT32 MinimumRequestTurnaroundTime; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE PlatformInterruptAckRegister; - UINT64 PlatformInterruptAckPreserve; - UINT64 PlatformInterruptAckSet; - UINT8 Reserved1[8]; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE CommandCompleteCheckRegister; - UINT64 CommandCompleteCheckMask; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE CommandCompleteUpdateRegister; - UINT64 CommandCompleteUpdatePreserve; - UINT64 CommandCompleteUpdateSet; - EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE ErrorStatusRegister; - UINT64 ErrorStatusMask; + UINT8 Type; + UINT8 Length; + UINT32 PlatformInterrupt; + UINT8 PlatformInterruptFlags; + UINT8 Reserved; + UINT64 BaseAddress; + UINT32 AddressLength; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; + UINT64 DoorbellPreserve; + UINT64 DoorbellWrite; + UINT32 NominalLatency; + UINT32 MaximumPeriodicAccessRate; + UINT32 MinimumRequestTurnaroundTime; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE PlatformInterruptAckRegister; + UINT64 PlatformInterruptAckPreserve; + UINT64 PlatformInterruptAckSet; + UINT8 Reserved1[8]; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE CommandCompleteCheckRegister; + UINT64 CommandCompleteCheckMask; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE CommandCompleteUpdateRegister; + UINT64 CommandCompleteUpdatePreserve; + UINT64 CommandCompleteUpdateSet; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE ErrorStatusRegister; + UINT64 ErrorStatusMask; } EFI_ACPI_6_3_PCCT_SUBSPACE_3_EXTENDED_PCC; /// @@ -2438,46 +2438,46 @@ typedef struct { /// typedef EFI_ACPI_6_3_PCCT_SUBSPACE_3_EXTENDED_PCC EFI_ACPI_6_3_PCCT_SUBSPACE_4_EXTENDED_PCC; -#define EFI_ACPI_6_3_PCCT_MASTER_SLAVE_COMMUNICATIONS_CHANNEL_FLAGS_NOTIFY_ON_COMPLETION BIT0 +#define EFI_ACPI_6_3_PCCT_MASTER_SLAVE_COMMUNICATIONS_CHANNEL_FLAGS_NOTIFY_ON_COMPLETION BIT0 typedef struct { - UINT32 Signature; - UINT32 Flags; - UINT32 Length; - UINT32 Command; + UINT32 Signature; + UINT32 Flags; + UINT32 Length; + UINT32 Command; } EFI_ACPI_6_3_PCCT_EXTENDED_PCC_SHARED_MEMORY_REGION_HEADER; /// /// Platform Debug Trigger Table (PDTT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 TriggerCount; - UINT8 Reserved[3]; - UINT32 TriggerIdentifierArrayOffset; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 TriggerCount; + UINT8 Reserved[3]; + UINT32 TriggerIdentifierArrayOffset; } EFI_ACPI_6_3_PLATFORM_DEBUG_TRIGGER_TABLE_HEADER; /// /// PDTT Revision (as defined in ACPI 6.3 spec.) /// -#define EFI_ACPI_6_3_PLATFORM_DEBUG_TRIGGER_TABLE_REVISION 0x00 +#define EFI_ACPI_6_3_PLATFORM_DEBUG_TRIGGER_TABLE_REVISION 0x00 /// /// PDTT Platform Communication Channel Identifier Structure /// typedef struct { - UINT16 SubChannelIdentifer:8; - UINT16 Runtime:1; - UINT16 WaitForCompletion:1; - UINT16 TriggerOrder:1; - UINT16 Reserved:5; + UINT16 SubChannelIdentifer : 8; + UINT16 Runtime : 1; + UINT16 WaitForCompletion : 1; + UINT16 TriggerOrder : 1; + UINT16 Reserved : 5; } EFI_ACPI_6_3_PDTT_PCC_IDENTIFIER; /// /// PCC Commands Codes used by Platform Debug Trigger Table /// -#define EFI_ACPI_6_3_PDTT_PCC_COMMAND_DOORBELL_ONLY 0x00 -#define EFI_ACPI_6_3_PDTT_PCC_COMMAND_VENDOR_SPECIFIC 0x01 +#define EFI_ACPI_6_3_PDTT_PCC_COMMAND_DOORBELL_ONLY 0x00 +#define EFI_ACPI_6_3_PDTT_PCC_COMMAND_VENDOR_SPECIFIC 0x01 /// /// PPTT Platform Communication Channel @@ -2488,28 +2488,28 @@ typedef EFI_ACPI_6_3_PCCT_GENERIC_SHARED_MEMORY_REGION_HEADER EFI_ACPI_6_3_PDTT_ /// Processor Properties Topology Table (PPTT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_DESCRIPTION_HEADER Header; } EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_HEADER; /// /// PPTT Revision (as defined in ACPI 6.3 spec.) /// -#define EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_REVISION 0x02 +#define EFI_ACPI_6_3_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_REVISION 0x02 /// /// PPTT types /// -#define EFI_ACPI_6_3_PPTT_TYPE_PROCESSOR 0x00 -#define EFI_ACPI_6_3_PPTT_TYPE_CACHE 0x01 -#define EFI_ACPI_6_3_PPTT_TYPE_ID 0x02 +#define EFI_ACPI_6_3_PPTT_TYPE_PROCESSOR 0x00 +#define EFI_ACPI_6_3_PPTT_TYPE_CACHE 0x01 +#define EFI_ACPI_6_3_PPTT_TYPE_ID 0x02 /// /// PPTT Structure Header /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[2]; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[2]; } EFI_ACPI_6_3_PPTT_STRUCTURE_HEADER; /// @@ -2530,110 +2530,110 @@ typedef struct { /// Processor hierarchy node structure flags /// typedef struct { - UINT32 PhysicalPackage:1; - UINT32 AcpiProcessorIdValid:1; - UINT32 ProcessorIsAThread:1; - UINT32 NodeIsALeaf:1; - UINT32 IdenticalImplementation:1; - UINT32 Reserved:27; + UINT32 PhysicalPackage : 1; + UINT32 AcpiProcessorIdValid : 1; + UINT32 ProcessorIsAThread : 1; + UINT32 NodeIsALeaf : 1; + UINT32 IdenticalImplementation : 1; + UINT32 Reserved : 27; } EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR_FLAGS; /// /// Processor hierarchy node structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[2]; - EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR_FLAGS Flags; - UINT32 Parent; - UINT32 AcpiProcessorId; - UINT32 NumberOfPrivateResources; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[2]; + EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR_FLAGS Flags; + UINT32 Parent; + UINT32 AcpiProcessorId; + UINT32 NumberOfPrivateResources; } EFI_ACPI_6_3_PPTT_STRUCTURE_PROCESSOR; /// /// For PPTT struct cache flags /// -#define EFI_ACPI_6_3_PPTT_CACHE_SIZE_INVALID 0x0 -#define EFI_ACPI_6_3_PPTT_CACHE_SIZE_VALID 0x1 -#define EFI_ACPI_6_3_PPTT_NUMBER_OF_SETS_INVALID 0x0 -#define EFI_ACPI_6_3_PPTT_NUMBER_OF_SETS_VALID 0x1 -#define EFI_ACPI_6_3_PPTT_ASSOCIATIVITY_INVALID 0x0 -#define EFI_ACPI_6_3_PPTT_ASSOCIATIVITY_VALID 0x1 -#define EFI_ACPI_6_3_PPTT_ALLOCATION_TYPE_INVALID 0x0 -#define EFI_ACPI_6_3_PPTT_ALLOCATION_TYPE_VALID 0x1 -#define EFI_ACPI_6_3_PPTT_CACHE_TYPE_INVALID 0x0 -#define EFI_ACPI_6_3_PPTT_CACHE_TYPE_VALID 0x1 -#define EFI_ACPI_6_3_PPTT_WRITE_POLICY_INVALID 0x0 -#define EFI_ACPI_6_3_PPTT_WRITE_POLICY_VALID 0x1 -#define EFI_ACPI_6_3_PPTT_LINE_SIZE_INVALID 0x0 -#define EFI_ACPI_6_3_PPTT_LINE_SIZE_VALID 0x1 +#define EFI_ACPI_6_3_PPTT_CACHE_SIZE_INVALID 0x0 +#define EFI_ACPI_6_3_PPTT_CACHE_SIZE_VALID 0x1 +#define EFI_ACPI_6_3_PPTT_NUMBER_OF_SETS_INVALID 0x0 +#define EFI_ACPI_6_3_PPTT_NUMBER_OF_SETS_VALID 0x1 +#define EFI_ACPI_6_3_PPTT_ASSOCIATIVITY_INVALID 0x0 +#define EFI_ACPI_6_3_PPTT_ASSOCIATIVITY_VALID 0x1 +#define EFI_ACPI_6_3_PPTT_ALLOCATION_TYPE_INVALID 0x0 +#define EFI_ACPI_6_3_PPTT_ALLOCATION_TYPE_VALID 0x1 +#define EFI_ACPI_6_3_PPTT_CACHE_TYPE_INVALID 0x0 +#define EFI_ACPI_6_3_PPTT_CACHE_TYPE_VALID 0x1 +#define EFI_ACPI_6_3_PPTT_WRITE_POLICY_INVALID 0x0 +#define EFI_ACPI_6_3_PPTT_WRITE_POLICY_VALID 0x1 +#define EFI_ACPI_6_3_PPTT_LINE_SIZE_INVALID 0x0 +#define EFI_ACPI_6_3_PPTT_LINE_SIZE_VALID 0x1 /// /// Cache Type Structure flags /// typedef struct { - UINT32 SizePropertyValid:1; - UINT32 NumberOfSetsValid:1; - UINT32 AssociativityValid:1; - UINT32 AllocationTypeValid:1; - UINT32 CacheTypeValid:1; - UINT32 WritePolicyValid:1; - UINT32 LineSizeValid:1; - UINT32 Reserved:25; + UINT32 SizePropertyValid : 1; + UINT32 NumberOfSetsValid : 1; + UINT32 AssociativityValid : 1; + UINT32 AllocationTypeValid : 1; + UINT32 CacheTypeValid : 1; + UINT32 WritePolicyValid : 1; + UINT32 LineSizeValid : 1; + UINT32 Reserved : 25; } EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE_FLAGS; /// /// For cache attributes /// -#define EFI_ACPI_6_3_CACHE_ATTRIBUTES_ALLOCATION_READ 0x0 -#define EFI_ACPI_6_3_CACHE_ATTRIBUTES_ALLOCATION_WRITE 0x1 -#define EFI_ACPI_6_3_CACHE_ATTRIBUTES_ALLOCATION_READ_WRITE 0x2 -#define EFI_ACPI_6_3_CACHE_ATTRIBUTES_CACHE_TYPE_DATA 0x0 -#define EFI_ACPI_6_3_CACHE_ATTRIBUTES_CACHE_TYPE_INSTRUCTION 0x1 -#define EFI_ACPI_6_3_CACHE_ATTRIBUTES_CACHE_TYPE_UNIFIED 0x2 -#define EFI_ACPI_6_3_CACHE_ATTRIBUTES_WRITE_POLICY_WRITE_BACK 0x0 -#define EFI_ACPI_6_3_CACHE_ATTRIBUTES_WRITE_POLICY_WRITE_THROUGH 0x1 +#define EFI_ACPI_6_3_CACHE_ATTRIBUTES_ALLOCATION_READ 0x0 +#define EFI_ACPI_6_3_CACHE_ATTRIBUTES_ALLOCATION_WRITE 0x1 +#define EFI_ACPI_6_3_CACHE_ATTRIBUTES_ALLOCATION_READ_WRITE 0x2 +#define EFI_ACPI_6_3_CACHE_ATTRIBUTES_CACHE_TYPE_DATA 0x0 +#define EFI_ACPI_6_3_CACHE_ATTRIBUTES_CACHE_TYPE_INSTRUCTION 0x1 +#define EFI_ACPI_6_3_CACHE_ATTRIBUTES_CACHE_TYPE_UNIFIED 0x2 +#define EFI_ACPI_6_3_CACHE_ATTRIBUTES_WRITE_POLICY_WRITE_BACK 0x0 +#define EFI_ACPI_6_3_CACHE_ATTRIBUTES_WRITE_POLICY_WRITE_THROUGH 0x1 /// /// Cache Type Structure cache attributes /// typedef struct { - UINT8 AllocationType:2; - UINT8 CacheType:2; - UINT8 WritePolicy:1; - UINT8 Reserved:3; + UINT8 AllocationType : 2; + UINT8 CacheType : 2; + UINT8 WritePolicy : 1; + UINT8 Reserved : 3; } EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE_ATTRIBUTES; /// /// Cache Type Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[2]; - EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE_FLAGS Flags; - UINT32 NextLevelOfCache; - UINT32 Size; - UINT32 NumberOfSets; - UINT8 Associativity; - EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE_ATTRIBUTES Attributes; - UINT16 LineSize; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[2]; + EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE_FLAGS Flags; + UINT32 NextLevelOfCache; + UINT32 Size; + UINT32 NumberOfSets; + UINT8 Associativity; + EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE_ATTRIBUTES Attributes; + UINT16 LineSize; } EFI_ACPI_6_3_PPTT_STRUCTURE_CACHE; /// /// ID structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[2]; - UINT32 VendorId; - UINT64 Level1Id; - UINT64 Level2Id; - UINT16 MajorRev; - UINT16 MinorRev; - UINT16 SpinRev; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[2]; + UINT32 VendorId; + UINT64 Level1Id; + UINT64 Level2Id; + UINT16 MajorRev; + UINT16 MinorRev; + UINT16 SpinRev; } EFI_ACPI_6_3_PPTT_STRUCTURE_ID; // diff --git a/MdePkg/Include/IndustryStandard/Acpi64.h b/MdePkg/Include/IndustryStandard/Acpi64.h index 8346d83..9cdd35b 100644 --- a/MdePkg/Include/IndustryStandard/Acpi64.h +++ b/MdePkg/Include/IndustryStandard/Acpi64.h @@ -21,11 +21,11 @@ /// ACPI 6.4 Generic Address Space definition /// typedef struct { - UINT8 AddressSpaceId; - UINT8 RegisterBitWidth; - UINT8 RegisterBitOffset; - UINT8 AccessSize; - UINT64 Address; + UINT8 AddressSpaceId; + UINT8 RegisterBitWidth; + UINT8 RegisterBitOffset; + UINT8 AccessSize; + UINT64 Address; } EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE; // @@ -61,29 +61,29 @@ typedef struct { /// Root System Description Pointer Structure /// typedef struct { - UINT64 Signature; - UINT8 Checksum; - UINT8 OemId[6]; - UINT8 Revision; - UINT32 RsdtAddress; - UINT32 Length; - UINT64 XsdtAddress; - UINT8 ExtendedChecksum; - UINT8 Reserved[3]; + UINT64 Signature; + UINT8 Checksum; + UINT8 OemId[6]; + UINT8 Revision; + UINT32 RsdtAddress; + UINT32 Length; + UINT64 XsdtAddress; + UINT8 ExtendedChecksum; + UINT8 Reserved[3]; } EFI_ACPI_6_4_ROOT_SYSTEM_DESCRIPTION_POINTER; /// /// RSD_PTR Revision (as defined in ACPI 6.4 spec.) /// -#define EFI_ACPI_6_4_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 6.4) says current value is 2 +#define EFI_ACPI_6_4_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 6.4) says current value is 2 /// /// Common table header, this prefaces all ACPI tables, including FACS, but /// excluding the RSD PTR structure /// typedef struct { - UINT32 Signature; - UINT32 Length; + UINT32 Signature; + UINT32 Length; } EFI_ACPI_6_4_COMMON_HEADER; // @@ -95,7 +95,7 @@ typedef struct { /// /// RSDT Revision (as defined in ACPI 6.4 spec.) /// -#define EFI_ACPI_6_4_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_6_4_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 // // Extended System Description Table @@ -106,74 +106,74 @@ typedef struct { /// /// XSDT Revision (as defined in ACPI 6.4 spec.) /// -#define EFI_ACPI_6_4_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_6_4_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x01 /// /// Fixed ACPI Description Table Structure (FADT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 FirmwareCtrl; - UINT32 Dsdt; - UINT8 Reserved0; - UINT8 PreferredPmProfile; - UINT16 SciInt; - UINT32 SmiCmd; - UINT8 AcpiEnable; - UINT8 AcpiDisable; - UINT8 S4BiosReq; - UINT8 PstateCnt; - UINT32 Pm1aEvtBlk; - UINT32 Pm1bEvtBlk; - UINT32 Pm1aCntBlk; - UINT32 Pm1bCntBlk; - UINT32 Pm2CntBlk; - UINT32 PmTmrBlk; - UINT32 Gpe0Blk; - UINT32 Gpe1Blk; - UINT8 Pm1EvtLen; - UINT8 Pm1CntLen; - UINT8 Pm2CntLen; - UINT8 PmTmrLen; - UINT8 Gpe0BlkLen; - UINT8 Gpe1BlkLen; - UINT8 Gpe1Base; - UINT8 CstCnt; - UINT16 PLvl2Lat; - UINT16 PLvl3Lat; - UINT16 FlushSize; - UINT16 FlushStride; - UINT8 DutyOffset; - UINT8 DutyWidth; - UINT8 DayAlrm; - UINT8 MonAlrm; - UINT8 Century; - UINT16 IaPcBootArch; - UINT8 Reserved1; - UINT32 Flags; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE ResetReg; - UINT8 ResetValue; - UINT16 ArmBootArch; - UINT8 MinorVersion; - UINT64 XFirmwareCtrl; - UINT64 XDsdt; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE XGpe0Blk; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE XGpe1Blk; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE SleepControlReg; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE SleepStatusReg; - UINT64 HypervisorVendorIdentity; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 FirmwareCtrl; + UINT32 Dsdt; + UINT8 Reserved0; + UINT8 PreferredPmProfile; + UINT16 SciInt; + UINT32 SmiCmd; + UINT8 AcpiEnable; + UINT8 AcpiDisable; + UINT8 S4BiosReq; + UINT8 PstateCnt; + UINT32 Pm1aEvtBlk; + UINT32 Pm1bEvtBlk; + UINT32 Pm1aCntBlk; + UINT32 Pm1bCntBlk; + UINT32 Pm2CntBlk; + UINT32 PmTmrBlk; + UINT32 Gpe0Blk; + UINT32 Gpe1Blk; + UINT8 Pm1EvtLen; + UINT8 Pm1CntLen; + UINT8 Pm2CntLen; + UINT8 PmTmrLen; + UINT8 Gpe0BlkLen; + UINT8 Gpe1BlkLen; + UINT8 Gpe1Base; + UINT8 CstCnt; + UINT16 PLvl2Lat; + UINT16 PLvl3Lat; + UINT16 FlushSize; + UINT16 FlushStride; + UINT8 DutyOffset; + UINT8 DutyWidth; + UINT8 DayAlrm; + UINT8 MonAlrm; + UINT8 Century; + UINT16 IaPcBootArch; + UINT8 Reserved1; + UINT32 Flags; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE ResetReg; + UINT8 ResetValue; + UINT16 ArmBootArch; + UINT8 MinorVersion; + UINT64 XFirmwareCtrl; + UINT64 XDsdt; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE XGpe0Blk; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE XGpe1Blk; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE SleepControlReg; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE SleepStatusReg; + UINT64 HypervisorVendorIdentity; } EFI_ACPI_6_4_FIXED_ACPI_DESCRIPTION_TABLE; /// /// FADT Version (as defined in ACPI 6.4 spec.) /// -#define EFI_ACPI_6_4_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x06 +#define EFI_ACPI_6_4_FIXED_ACPI_DESCRIPTION_TABLE_REVISION 0x06 #define EFI_ACPI_6_4_FIXED_ACPI_DESCRIPTION_TABLE_MINOR_REVISION 0x04 // @@ -193,62 +193,62 @@ typedef struct { // Fixed ACPI Description Table Boot Architecture Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_6_4_LEGACY_DEVICES BIT0 -#define EFI_ACPI_6_4_8042 BIT1 -#define EFI_ACPI_6_4_VGA_NOT_PRESENT BIT2 -#define EFI_ACPI_6_4_MSI_NOT_SUPPORTED BIT3 -#define EFI_ACPI_6_4_PCIE_ASPM_CONTROLS BIT4 -#define EFI_ACPI_6_4_CMOS_RTC_NOT_PRESENT BIT5 +#define EFI_ACPI_6_4_LEGACY_DEVICES BIT0 +#define EFI_ACPI_6_4_8042 BIT1 +#define EFI_ACPI_6_4_VGA_NOT_PRESENT BIT2 +#define EFI_ACPI_6_4_MSI_NOT_SUPPORTED BIT3 +#define EFI_ACPI_6_4_PCIE_ASPM_CONTROLS BIT4 +#define EFI_ACPI_6_4_CMOS_RTC_NOT_PRESENT BIT5 // // Fixed ACPI Description Table Arm Boot Architecture Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_6_4_ARM_PSCI_COMPLIANT BIT0 -#define EFI_ACPI_6_4_ARM_PSCI_USE_HVC BIT1 +#define EFI_ACPI_6_4_ARM_PSCI_COMPLIANT BIT0 +#define EFI_ACPI_6_4_ARM_PSCI_USE_HVC BIT1 // // Fixed ACPI Description Table Fixed Feature Flags // All other bits are reserved and must be set to 0. // -#define EFI_ACPI_6_4_WBINVD BIT0 -#define EFI_ACPI_6_4_WBINVD_FLUSH BIT1 -#define EFI_ACPI_6_4_PROC_C1 BIT2 -#define EFI_ACPI_6_4_P_LVL2_UP BIT3 -#define EFI_ACPI_6_4_PWR_BUTTON BIT4 -#define EFI_ACPI_6_4_SLP_BUTTON BIT5 -#define EFI_ACPI_6_4_FIX_RTC BIT6 -#define EFI_ACPI_6_4_RTC_S4 BIT7 -#define EFI_ACPI_6_4_TMR_VAL_EXT BIT8 -#define EFI_ACPI_6_4_DCK_CAP BIT9 -#define EFI_ACPI_6_4_RESET_REG_SUP BIT10 -#define EFI_ACPI_6_4_SEALED_CASE BIT11 -#define EFI_ACPI_6_4_HEADLESS BIT12 -#define EFI_ACPI_6_4_CPU_SW_SLP BIT13 -#define EFI_ACPI_6_4_PCI_EXP_WAK BIT14 -#define EFI_ACPI_6_4_USE_PLATFORM_CLOCK BIT15 -#define EFI_ACPI_6_4_S4_RTC_STS_VALID BIT16 -#define EFI_ACPI_6_4_REMOTE_POWER_ON_CAPABLE BIT17 -#define EFI_ACPI_6_4_FORCE_APIC_CLUSTER_MODEL BIT18 -#define EFI_ACPI_6_4_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19 -#define EFI_ACPI_6_4_HW_REDUCED_ACPI BIT20 -#define EFI_ACPI_6_4_LOW_POWER_S0_IDLE_CAPABLE BIT21 +#define EFI_ACPI_6_4_WBINVD BIT0 +#define EFI_ACPI_6_4_WBINVD_FLUSH BIT1 +#define EFI_ACPI_6_4_PROC_C1 BIT2 +#define EFI_ACPI_6_4_P_LVL2_UP BIT3 +#define EFI_ACPI_6_4_PWR_BUTTON BIT4 +#define EFI_ACPI_6_4_SLP_BUTTON BIT5 +#define EFI_ACPI_6_4_FIX_RTC BIT6 +#define EFI_ACPI_6_4_RTC_S4 BIT7 +#define EFI_ACPI_6_4_TMR_VAL_EXT BIT8 +#define EFI_ACPI_6_4_DCK_CAP BIT9 +#define EFI_ACPI_6_4_RESET_REG_SUP BIT10 +#define EFI_ACPI_6_4_SEALED_CASE BIT11 +#define EFI_ACPI_6_4_HEADLESS BIT12 +#define EFI_ACPI_6_4_CPU_SW_SLP BIT13 +#define EFI_ACPI_6_4_PCI_EXP_WAK BIT14 +#define EFI_ACPI_6_4_USE_PLATFORM_CLOCK BIT15 +#define EFI_ACPI_6_4_S4_RTC_STS_VALID BIT16 +#define EFI_ACPI_6_4_REMOTE_POWER_ON_CAPABLE BIT17 +#define EFI_ACPI_6_4_FORCE_APIC_CLUSTER_MODEL BIT18 +#define EFI_ACPI_6_4_FORCE_APIC_PHYSICAL_DESTINATION_MODE BIT19 +#define EFI_ACPI_6_4_HW_REDUCED_ACPI BIT20 +#define EFI_ACPI_6_4_LOW_POWER_S0_IDLE_CAPABLE BIT21 /// /// Firmware ACPI Control Structure /// typedef struct { - UINT32 Signature; - UINT32 Length; - UINT32 HardwareSignature; - UINT32 FirmwareWakingVector; - UINT32 GlobalLock; - UINT32 Flags; - UINT64 XFirmwareWakingVector; - UINT8 Version; - UINT8 Reserved0[3]; - UINT32 OspmFlags; - UINT8 Reserved1[24]; + UINT32 Signature; + UINT32 Length; + UINT32 HardwareSignature; + UINT32 FirmwareWakingVector; + UINT32 GlobalLock; + UINT32 Flags; + UINT64 XFirmwareWakingVector; + UINT8 Version; + UINT8 Reserved0[3]; + UINT32 OspmFlags; + UINT8 Reserved1[24]; } EFI_ACPI_6_4_FIRMWARE_ACPI_CONTROL_STRUCTURE; /// @@ -260,14 +260,14 @@ typedef struct { /// Firmware Control Structure Feature Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_6_4_S4BIOS_F BIT0 -#define EFI_ACPI_6_4_64BIT_WAKE_SUPPORTED_F BIT1 +#define EFI_ACPI_6_4_S4BIOS_F BIT0 +#define EFI_ACPI_6_4_64BIT_WAKE_SUPPORTED_F BIT1 /// /// OSPM Enabled Firmware Control Structure Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_6_4_OSPM_64BIT_WAKE_F BIT0 +#define EFI_ACPI_6_4_OSPM_64BIT_WAKE_F BIT0 // // Differentiated System Description Table, @@ -276,29 +276,29 @@ typedef struct { // no definition needed as they are common description table header, the same with // EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block. // -#define EFI_ACPI_6_4_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 -#define EFI_ACPI_6_4_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 +#define EFI_ACPI_6_4_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 +#define EFI_ACPI_6_4_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 /// /// Multiple APIC Description Table header definition. The rest of the table /// must be defined in a platform specific manner. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 LocalApicAddress; - UINT32 Flags; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 LocalApicAddress; + UINT32 Flags; } EFI_ACPI_6_4_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER; /// /// MADT Revision (as defined in ACPI 6.4 spec.) /// -#define EFI_ACPI_6_4_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x05 +#define EFI_ACPI_6_4_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION 0x05 /// /// Multiple APIC Flags /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_6_4_PCAT_COMPAT BIT0 +#define EFI_ACPI_6_4_PCAT_COMPAT BIT0 // // Multiple APIC Description Table APIC structure types @@ -331,11 +331,11 @@ typedef struct { /// Processor Local APIC Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorUid; - UINT8 ApicId; - UINT32 Flags; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorUid; + UINT8 ApicId; + UINT32 Flags; } EFI_ACPI_6_4_PROCESSOR_LOCAL_APIC_STRUCTURE; /// @@ -348,41 +348,41 @@ typedef struct { /// IO APIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 IoApicId; - UINT8 Reserved; - UINT32 IoApicAddress; - UINT32 GlobalSystemInterruptBase; + UINT8 Type; + UINT8 Length; + UINT8 IoApicId; + UINT8 Reserved; + UINT32 IoApicAddress; + UINT32 GlobalSystemInterruptBase; } EFI_ACPI_6_4_IO_APIC_STRUCTURE; /// /// Interrupt Source Override Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Bus; - UINT8 Source; - UINT32 GlobalSystemInterrupt; - UINT16 Flags; + UINT8 Type; + UINT8 Length; + UINT8 Bus; + UINT8 Source; + UINT32 GlobalSystemInterrupt; + UINT16 Flags; } EFI_ACPI_6_4_INTERRUPT_SOURCE_OVERRIDE_STRUCTURE; /// /// Platform Interrupt Sources Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT8 InterruptType; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT8 IoSapicVector; - UINT32 GlobalSystemInterrupt; - UINT32 PlatformInterruptSourceFlags; - UINT8 CpeiProcessorOverride; - UINT8 Reserved[31]; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT8 InterruptType; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT8 IoSapicVector; + UINT32 GlobalSystemInterrupt; + UINT32 PlatformInterruptSourceFlags; + UINT8 CpeiProcessorOverride; + UINT8 Reserved[31]; } EFI_ACPI_6_4_PLATFORM_INTERRUPT_APIC_STRUCTURE; // @@ -396,43 +396,43 @@ typedef struct { /// Non-Maskable Interrupt Source Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT32 GlobalSystemInterrupt; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT32 GlobalSystemInterrupt; } EFI_ACPI_6_4_NON_MASKABLE_INTERRUPT_SOURCE_STRUCTURE; /// /// Local APIC NMI Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorUid; - UINT16 Flags; - UINT8 LocalApicLint; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorUid; + UINT16 Flags; + UINT8 LocalApicLint; } EFI_ACPI_6_4_LOCAL_APIC_NMI_STRUCTURE; /// /// Local APIC Address Override Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT64 LocalApicAddress; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT64 LocalApicAddress; } EFI_ACPI_6_4_LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE; /// /// IO SAPIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 IoApicId; - UINT8 Reserved; - UINT32 GlobalSystemInterruptBase; - UINT64 IoSapicAddress; + UINT8 Type; + UINT8 Length; + UINT8 IoApicId; + UINT8 Reserved; + UINT32 GlobalSystemInterruptBase; + UINT64 IoSapicAddress; } EFI_ACPI_6_4_IO_SAPIC_STRUCTURE; /// @@ -440,196 +440,196 @@ typedef struct { /// This struct followed by a null-terminated ASCII string - ACPI Processor UID String /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 AcpiProcessorId; - UINT8 LocalSapicId; - UINT8 LocalSapicEid; - UINT8 Reserved[3]; - UINT32 Flags; - UINT32 ACPIProcessorUIDValue; + UINT8 Type; + UINT8 Length; + UINT8 AcpiProcessorId; + UINT8 LocalSapicId; + UINT8 LocalSapicEid; + UINT8 Reserved[3]; + UINT32 Flags; + UINT32 ACPIProcessorUIDValue; } EFI_ACPI_6_4_PROCESSOR_LOCAL_SAPIC_STRUCTURE; /// /// Platform Interrupt Sources Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT8 InterruptType; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT8 IoSapicVector; - UINT32 GlobalSystemInterrupt; - UINT32 PlatformInterruptSourceFlags; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT8 InterruptType; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT8 IoSapicVector; + UINT32 GlobalSystemInterrupt; + UINT32 PlatformInterruptSourceFlags; } EFI_ACPI_6_4_PLATFORM_INTERRUPT_SOURCES_STRUCTURE; /// /// Platform Interrupt Source Flags. /// All other bits are reserved and must be set to 0. /// -#define EFI_ACPI_6_4_CPEI_PROCESSOR_OVERRIDE BIT0 +#define EFI_ACPI_6_4_CPEI_PROCESSOR_OVERRIDE BIT0 /// /// Processor Local x2APIC Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[2]; - UINT32 X2ApicId; - UINT32 Flags; - UINT32 AcpiProcessorUid; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[2]; + UINT32 X2ApicId; + UINT32 Flags; + UINT32 AcpiProcessorUid; } EFI_ACPI_6_4_PROCESSOR_LOCAL_X2APIC_STRUCTURE; /// /// Local x2APIC NMI Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Flags; - UINT32 AcpiProcessorUid; - UINT8 LocalX2ApicLint; - UINT8 Reserved[3]; + UINT8 Type; + UINT8 Length; + UINT16 Flags; + UINT32 AcpiProcessorUid; + UINT8 LocalX2ApicLint; + UINT8 Reserved[3]; } EFI_ACPI_6_4_LOCAL_X2APIC_NMI_STRUCTURE; /// /// GIC Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT32 CPUInterfaceNumber; - UINT32 AcpiProcessorUid; - UINT32 Flags; - UINT32 ParkingProtocolVersion; - UINT32 PerformanceInterruptGsiv; - UINT64 ParkedAddress; - UINT64 PhysicalBaseAddress; - UINT64 GICV; - UINT64 GICH; - UINT32 VGICMaintenanceInterrupt; - UINT64 GICRBaseAddress; - UINT64 MPIDR; - UINT8 ProcessorPowerEfficiencyClass; - UINT8 Reserved2; - UINT16 SpeOverflowInterrupt; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT32 CPUInterfaceNumber; + UINT32 AcpiProcessorUid; + UINT32 Flags; + UINT32 ParkingProtocolVersion; + UINT32 PerformanceInterruptGsiv; + UINT64 ParkedAddress; + UINT64 PhysicalBaseAddress; + UINT64 GICV; + UINT64 GICH; + UINT32 VGICMaintenanceInterrupt; + UINT64 GICRBaseAddress; + UINT64 MPIDR; + UINT8 ProcessorPowerEfficiencyClass; + UINT8 Reserved2; + UINT16 SpeOverflowInterrupt; } EFI_ACPI_6_4_GIC_STRUCTURE; /// /// GIC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_4_GIC_ENABLED BIT0 -#define EFI_ACPI_6_4_PERFORMANCE_INTERRUPT_MODEL BIT1 -#define EFI_ACPI_6_4_VGIC_MAINTENANCE_INTERRUPT_MODE_FLAGS BIT2 +#define EFI_ACPI_6_4_GIC_ENABLED BIT0 +#define EFI_ACPI_6_4_PERFORMANCE_INTERRUPT_MODEL BIT1 +#define EFI_ACPI_6_4_VGIC_MAINTENANCE_INTERRUPT_MODE_FLAGS BIT2 /// /// GIC Distributor Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved1; - UINT32 GicId; - UINT64 PhysicalBaseAddress; - UINT32 SystemVectorBase; - UINT8 GicVersion; - UINT8 Reserved2[3]; + UINT8 Type; + UINT8 Length; + UINT16 Reserved1; + UINT32 GicId; + UINT64 PhysicalBaseAddress; + UINT32 SystemVectorBase; + UINT8 GicVersion; + UINT8 Reserved2[3]; } EFI_ACPI_6_4_GIC_DISTRIBUTOR_STRUCTURE; /// /// GIC Version /// -#define EFI_ACPI_6_4_GIC_V1 0x01 -#define EFI_ACPI_6_4_GIC_V2 0x02 -#define EFI_ACPI_6_4_GIC_V3 0x03 -#define EFI_ACPI_6_4_GIC_V4 0x04 +#define EFI_ACPI_6_4_GIC_V1 0x01 +#define EFI_ACPI_6_4_GIC_V2 0x02 +#define EFI_ACPI_6_4_GIC_V3 0x03 +#define EFI_ACPI_6_4_GIC_V4 0x04 /// /// GIC MSI Frame Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved1; - UINT32 GicMsiFrameId; - UINT64 PhysicalBaseAddress; - UINT32 Flags; - UINT16 SPICount; - UINT16 SPIBase; + UINT8 Type; + UINT8 Length; + UINT16 Reserved1; + UINT32 GicMsiFrameId; + UINT64 PhysicalBaseAddress; + UINT32 Flags; + UINT16 SPICount; + UINT16 SPIBase; } EFI_ACPI_6_4_GIC_MSI_FRAME_STRUCTURE; /// /// GIC MSI Frame Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_4_SPI_COUNT_BASE_SELECT BIT0 +#define EFI_ACPI_6_4_SPI_COUNT_BASE_SELECT BIT0 /// /// GICR Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT64 DiscoveryRangeBaseAddress; - UINT32 DiscoveryRangeLength; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT64 DiscoveryRangeBaseAddress; + UINT32 DiscoveryRangeLength; } EFI_ACPI_6_4_GICR_STRUCTURE; /// /// GIC Interrupt Translation Service Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved; - UINT32 GicItsId; - UINT64 PhysicalBaseAddress; - UINT32 Reserved2; + UINT8 Type; + UINT8 Length; + UINT16 Reserved; + UINT32 GicItsId; + UINT64 PhysicalBaseAddress; + UINT32 Reserved2; } EFI_ACPI_6_4_GIC_ITS_STRUCTURE; /// /// Multiprocessor Wakeup Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 MailBoxVersion; - UINT32 Reserved; - UINT64 MailBoxAddress; + UINT8 Type; + UINT8 Length; + UINT16 MailBoxVersion; + UINT32 Reserved; + UINT64 MailBoxAddress; } EFI_ACPI_6_4_MULTIPROCESSOR_WAKEUP_STRUCTURE; /// /// Multiprocessor Wakeup Mailbox Structure /// typedef struct { - UINT16 Command; - UINT16 Reserved; - UINT32 AcpiId; - UINT64 WakeupVector; - UINT8 ReservedForOs[2032]; - UINT8 ReservedForFirmware[2048]; + UINT16 Command; + UINT16 Reserved; + UINT32 AcpiId; + UINT64 WakeupVector; + UINT8 ReservedForOs[2032]; + UINT8 ReservedForFirmware[2048]; } EFI_ACPI_6_4_MULTIPROCESSOR_WAKEUP_MAILBOX_STRUCTURE; -#define EFI_ACPI_6_4_MULTIPROCESSOR_WAKEUP_MAILBOX_COMMAND_NOOP 0x0000 -#define EFI_ACPI_6_4_MULTIPROCESSOR_WAKEUP_MAILBOX_COMMAND_WAKEUP 0x0001 +#define EFI_ACPI_6_4_MULTIPROCESSOR_WAKEUP_MAILBOX_COMMAND_NOOP 0x0000 +#define EFI_ACPI_6_4_MULTIPROCESSOR_WAKEUP_MAILBOX_COMMAND_WAKEUP 0x0001 /// /// Smart Battery Description Table (SBST) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 WarningEnergyLevel; - UINT32 LowEnergyLevel; - UINT32 CriticalEnergyLevel; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 WarningEnergyLevel; + UINT32 LowEnergyLevel; + UINT32 CriticalEnergyLevel; } EFI_ACPI_6_4_SMART_BATTERY_DESCRIPTION_TABLE; /// /// SBST Version (as defined in ACPI 6.4 spec.) /// -#define EFI_ACPI_6_4_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01 +#define EFI_ACPI_6_4_SMART_BATTERY_DESCRIPTION_TABLE_REVISION 0x01 /// /// Embedded Controller Boot Resources Table (ECDT) @@ -637,11 +637,11 @@ typedef struct { /// a fully qualified reference to the name space object. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE EcControl; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE EcData; - UINT32 Uid; - UINT8 GpeBit; + EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE EcControl; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE EcData; + UINT32 Uid; + UINT8 GpeBit; } EFI_ACPI_6_4_EMBEDDED_CONTROLLER_BOOT_RESOURCES_TABLE; /// @@ -654,9 +654,9 @@ typedef struct { /// must be defined in a platform specific manner. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 Reserved1; ///< Must be set to 1 - UINT64 Reserved2; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 Reserved1; ///< Must be set to 1 + UINT64 Reserved2; } EFI_ACPI_6_4_SYSTEM_RESOURCE_AFFINITY_TABLE_HEADER; /// @@ -680,85 +680,85 @@ typedef struct { /// Processor Local APIC/SAPIC Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 ProximityDomain7To0; - UINT8 ApicId; - UINT32 Flags; - UINT8 LocalSapicEid; - UINT8 ProximityDomain31To8[3]; - UINT32 ClockDomain; + UINT8 Type; + UINT8 Length; + UINT8 ProximityDomain7To0; + UINT8 ApicId; + UINT32 Flags; + UINT8 LocalSapicEid; + UINT8 ProximityDomain31To8[3]; + UINT32 ClockDomain; } EFI_ACPI_6_4_PROCESSOR_LOCAL_APIC_SAPIC_AFFINITY_STRUCTURE; /// /// Local APIC/SAPIC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_4_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0) +#define EFI_ACPI_6_4_PROCESSOR_LOCAL_APIC_SAPIC_ENABLED (1 << 0) /// /// Memory Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 ProximityDomain; - UINT16 Reserved1; - UINT32 AddressBaseLow; - UINT32 AddressBaseHigh; - UINT32 LengthLow; - UINT32 LengthHigh; - UINT32 Reserved2; - UINT32 Flags; - UINT64 Reserved3; + UINT8 Type; + UINT8 Length; + UINT32 ProximityDomain; + UINT16 Reserved1; + UINT32 AddressBaseLow; + UINT32 AddressBaseHigh; + UINT32 LengthLow; + UINT32 LengthHigh; + UINT32 Reserved2; + UINT32 Flags; + UINT64 Reserved3; } EFI_ACPI_6_4_MEMORY_AFFINITY_STRUCTURE; // // Memory Flags. All other bits are reserved and must be 0. // -#define EFI_ACPI_6_4_MEMORY_ENABLED (1 << 0) -#define EFI_ACPI_6_4_MEMORY_HOT_PLUGGABLE (1 << 1) -#define EFI_ACPI_6_4_MEMORY_NONVOLATILE (1 << 2) +#define EFI_ACPI_6_4_MEMORY_ENABLED (1 << 0) +#define EFI_ACPI_6_4_MEMORY_HOT_PLUGGABLE (1 << 1) +#define EFI_ACPI_6_4_MEMORY_NONVOLATILE (1 << 2) /// /// Processor Local x2APIC Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved1[2]; - UINT32 ProximityDomain; - UINT32 X2ApicId; - UINT32 Flags; - UINT32 ClockDomain; - UINT8 Reserved2[4]; + UINT8 Type; + UINT8 Length; + UINT8 Reserved1[2]; + UINT32 ProximityDomain; + UINT32 X2ApicId; + UINT32 Flags; + UINT32 ClockDomain; + UINT8 Reserved2[4]; } EFI_ACPI_6_4_PROCESSOR_LOCAL_X2APIC_AFFINITY_STRUCTURE; /// /// GICC Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 ProximityDomain; - UINT32 AcpiProcessorUid; - UINT32 Flags; - UINT32 ClockDomain; + UINT8 Type; + UINT8 Length; + UINT32 ProximityDomain; + UINT32 AcpiProcessorUid; + UINT32 Flags; + UINT32 ClockDomain; } EFI_ACPI_6_4_GICC_AFFINITY_STRUCTURE; /// /// GICC Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_4_GICC_ENABLED (1 << 0) +#define EFI_ACPI_6_4_GICC_ENABLED (1 << 0) /// /// GIC Interrupt Translation Service (ITS) Affinity Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 ProximityDomain; - UINT8 Reserved[2]; - UINT32 ItsId; + UINT8 Type; + UINT8 Length; + UINT32 ProximityDomain; + UINT8 Reserved[2]; + UINT32 ItsId; } EFI_ACPI_6_4_GIC_ITS_AFFINITY_STRUCTURE; // @@ -766,47 +766,47 @@ typedef struct { // All other values between 0x02 an 0xFF are reserved and // will be ignored by OSPM. // -#define EFI_ACPI_6_4_ACPI_DEVICE_HANDLE 0x00 -#define EFI_ACPI_6_4_PCI_DEVICE_HANDLE 0x01 +#define EFI_ACPI_6_4_ACPI_DEVICE_HANDLE 0x00 +#define EFI_ACPI_6_4_PCI_DEVICE_HANDLE 0x01 /// /// Device Handle - ACPI /// typedef struct { - UINT64 AcpiHid; - UINT32 AcpiUid; - UINT8 Reserved[4]; + UINT64 AcpiHid; + UINT32 AcpiUid; + UINT8 Reserved[4]; } EFI_ACPI_6_4_DEVICE_HANDLE_ACPI; /// /// Device Handle - PCI /// typedef struct { - UINT16 PciSegment; - UINT16 PciBdfNumber; - UINT8 Reserved[12]; + UINT16 PciSegment; + UINT16 PciBdfNumber; + UINT8 Reserved[12]; } EFI_ACPI_6_4_DEVICE_HANDLE_PCI; /// /// Device Handle /// typedef union { - EFI_ACPI_6_4_DEVICE_HANDLE_ACPI Acpi; - EFI_ACPI_6_4_DEVICE_HANDLE_PCI Pci; + EFI_ACPI_6_4_DEVICE_HANDLE_ACPI Acpi; + EFI_ACPI_6_4_DEVICE_HANDLE_PCI Pci; } EFI_ACPI_6_4_DEVICE_HANDLE; /// /// Generic Initiator Affinity Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved1; - UINT8 DeviceHandleType; - UINT32 ProximityDomain; - EFI_ACPI_6_4_DEVICE_HANDLE DeviceHandle; - UINT32 Flags; - UINT8 Reserved2[4]; + UINT8 Type; + UINT8 Length; + UINT8 Reserved1; + UINT8 DeviceHandleType; + UINT32 ProximityDomain; + EFI_ACPI_6_4_DEVICE_HANDLE DeviceHandle; + UINT32 Flags; + UINT8 Reserved2[4]; } EFI_ACPI_6_4_GENERIC_INITIATOR_AFFINITY_STRUCTURE; /// @@ -821,8 +821,8 @@ typedef struct { /// The rest of the table is a matrix. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT64 NumberOfSystemLocalities; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT64 NumberOfSystemLocalities; } EFI_ACPI_6_4_SYSTEM_LOCALITY_DISTANCE_INFORMATION_TABLE_HEADER; /// @@ -834,14 +834,14 @@ typedef struct { /// Corrected Platform Error Polling Table (CPEP) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 Reserved[8]; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 Reserved[8]; } EFI_ACPI_6_4_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_HEADER; /// /// CPEP Version (as defined in ACPI 6.4 spec.) /// -#define EFI_ACPI_6_4_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01 +#define EFI_ACPI_6_4_CORRECTED_PLATFORM_ERROR_POLLING_TABLE_REVISION 0x01 // // CPEP processor structure types. @@ -852,66 +852,66 @@ typedef struct { /// Corrected Platform Error Polling Processor Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 ProcessorId; - UINT8 ProcessorEid; - UINT32 PollingInterval; + UINT8 Type; + UINT8 Length; + UINT8 ProcessorId; + UINT8 ProcessorEid; + UINT32 PollingInterval; } EFI_ACPI_6_4_CPEP_PROCESSOR_APIC_SAPIC_STRUCTURE; /// /// Maximum System Characteristics Table (MSCT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 OffsetProxDomInfo; - UINT32 MaximumNumberOfProximityDomains; - UINT32 MaximumNumberOfClockDomains; - UINT64 MaximumPhysicalAddress; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 OffsetProxDomInfo; + UINT32 MaximumNumberOfProximityDomains; + UINT32 MaximumNumberOfClockDomains; + UINT64 MaximumPhysicalAddress; } EFI_ACPI_6_4_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_HEADER; /// /// MSCT Version (as defined in ACPI 6.4 spec.) /// -#define EFI_ACPI_6_4_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01 +#define EFI_ACPI_6_4_MAXIMUM_SYSTEM_CHARACTERISTICS_TABLE_REVISION 0x01 /// /// Maximum Proximity Domain Information Structure Definition /// typedef struct { - UINT8 Revision; - UINT8 Length; - UINT32 ProximityDomainRangeLow; - UINT32 ProximityDomainRangeHigh; - UINT32 MaximumProcessorCapacity; - UINT64 MaximumMemoryCapacity; + UINT8 Revision; + UINT8 Length; + UINT32 ProximityDomainRangeLow; + UINT32 ProximityDomainRangeHigh; + UINT32 MaximumProcessorCapacity; + UINT64 MaximumMemoryCapacity; } EFI_ACPI_6_4_MAXIMUM_PROXIMITY_DOMAIN_INFORMATION_STRUCTURE; /// /// ACPI RAS Feature Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 PlatformCommunicationChannelIdentifier[12]; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 PlatformCommunicationChannelIdentifier[12]; } EFI_ACPI_6_4_RAS_FEATURE_TABLE; /// /// RASF Version (as defined in ACPI 6.4 spec.) /// -#define EFI_ACPI_6_4_RAS_FEATURE_TABLE_REVISION 0x01 +#define EFI_ACPI_6_4_RAS_FEATURE_TABLE_REVISION 0x01 /// /// ACPI RASF Platform Communication Channel Shared Memory Region definition. /// typedef struct { - UINT32 Signature; - UINT16 Command; - UINT16 Status; - UINT16 Version; - UINT8 RASCapabilities[16]; - UINT8 SetRASCapabilities[16]; - UINT16 NumberOfRASFParameterBlocks; - UINT32 SetRASCapabilitiesStatus; + UINT32 Signature; + UINT16 Command; + UINT16 Status; + UINT16 Version; + UINT8 RASCapabilities[16]; + UINT8 SetRASCapabilities[16]; + UINT16 NumberOfRASFParameterBlocks; + UINT32 SetRASCapabilitiesStatus; } EFI_ACPI_6_4_RASF_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION; /// @@ -922,62 +922,62 @@ typedef struct { /// /// ACPI RASF Platform RAS Capabilities /// -#define EFI_ACPI_6_4_RASF_PLATFORM_RAS_CAPABILITY_HARDWARE_BASED_PATROL_SCRUB_SUPPORTED BIT0 -#define EFI_ACPI_6_4_RASF_PLATFORM_RAS_CAPABILITY_HARDWARE_BASED_PATROL_SCRUB_SUPPORTED_AND_EXPOSED_TO_SOFTWARE BIT1 -#define EFI_ACPI_6_4_RASF_PLATFORM_RAS_CAPABILITY_CPU_CACHE_FLUSH_TO_NVDIMM_DURABILITY_ON_POWER_LOSS BIT2 -#define EFI_ACPI_6_4_RASF_PLATFORM_RAS_CAPABILITY_MEMORY_CONTROLLER_FLUSH_TO_NVDIMM_DURABILITY_ON_POWER_LOSS BIT3 -#define EFI_ACPI_6_4_RASF_PLATFORM_RAS_CAPABILITY_BYTE_ADDRESSABLE_PERSISTENT_MEMORY_HARDWARE_MIRRORING BIT4 +#define EFI_ACPI_6_4_RASF_PLATFORM_RAS_CAPABILITY_HARDWARE_BASED_PATROL_SCRUB_SUPPORTED BIT0 +#define EFI_ACPI_6_4_RASF_PLATFORM_RAS_CAPABILITY_HARDWARE_BASED_PATROL_SCRUB_SUPPORTED_AND_EXPOSED_TO_SOFTWARE BIT1 +#define EFI_ACPI_6_4_RASF_PLATFORM_RAS_CAPABILITY_CPU_CACHE_FLUSH_TO_NVDIMM_DURABILITY_ON_POWER_LOSS BIT2 +#define EFI_ACPI_6_4_RASF_PLATFORM_RAS_CAPABILITY_MEMORY_CONTROLLER_FLUSH_TO_NVDIMM_DURABILITY_ON_POWER_LOSS BIT3 +#define EFI_ACPI_6_4_RASF_PLATFORM_RAS_CAPABILITY_BYTE_ADDRESSABLE_PERSISTENT_MEMORY_HARDWARE_MIRRORING BIT4 /// /// ACPI RASF Parameter Block structure for PATROL_SCRUB /// typedef struct { - UINT16 Type; - UINT16 Version; - UINT16 Length; - UINT16 PatrolScrubCommand; - UINT64 RequestedAddressRange[2]; - UINT64 ActualAddressRange[2]; - UINT16 Flags; - UINT8 RequestedSpeed; + UINT16 Type; + UINT16 Version; + UINT16 Length; + UINT16 PatrolScrubCommand; + UINT64 RequestedAddressRange[2]; + UINT64 ActualAddressRange[2]; + UINT16 Flags; + UINT8 RequestedSpeed; } EFI_ACPI_6_4_RASF_PATROL_SCRUB_PLATFORM_BLOCK_STRUCTURE; /// /// ACPI RASF Patrol Scrub command /// -#define EFI_ACPI_6_4_RASF_PATROL_SCRUB_COMMAND_GET_PATROL_PARAMETERS 0x01 -#define EFI_ACPI_6_4_RASF_PATROL_SCRUB_COMMAND_START_PATROL_SCRUBBER 0x02 -#define EFI_ACPI_6_4_RASF_PATROL_SCRUB_COMMAND_STOP_PATROL_SCRUBBER 0x03 +#define EFI_ACPI_6_4_RASF_PATROL_SCRUB_COMMAND_GET_PATROL_PARAMETERS 0x01 +#define EFI_ACPI_6_4_RASF_PATROL_SCRUB_COMMAND_START_PATROL_SCRUBBER 0x02 +#define EFI_ACPI_6_4_RASF_PATROL_SCRUB_COMMAND_STOP_PATROL_SCRUBBER 0x03 /// /// Memory Power State Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 PlatformCommunicationChannelIdentifier; - UINT8 Reserved[3]; -// Memory Power Node Structure -// Memory Power State Characteristics + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 PlatformCommunicationChannelIdentifier; + UINT8 Reserved[3]; + // Memory Power Node Structure + // Memory Power State Characteristics } EFI_ACPI_6_4_MEMORY_POWER_STATUS_TABLE; /// /// MPST Version (as defined in ACPI 6.4 spec.) /// -#define EFI_ACPI_6_4_MEMORY_POWER_STATE_TABLE_REVISION 0x01 +#define EFI_ACPI_6_4_MEMORY_POWER_STATE_TABLE_REVISION 0x01 /// /// MPST Platform Communication Channel Shared Memory Region definition. /// typedef struct { - UINT32 Signature; - UINT16 Command; - UINT16 Status; - UINT32 MemoryPowerCommandRegister; - UINT32 MemoryPowerStatusRegister; - UINT32 PowerStateId; - UINT32 MemoryPowerNodeId; - UINT64 MemoryEnergyConsumed; - UINT64 ExpectedAveragePowerComsuned; + UINT32 Signature; + UINT16 Command; + UINT16 Status; + UINT32 MemoryPowerCommandRegister; + UINT32 MemoryPowerStatusRegister; + UINT32 PowerStateId; + UINT32 MemoryPowerNodeId; + UINT64 MemoryEnergyConsumed; + UINT64 ExpectedAveragePowerComsuned; } EFI_ACPI_6_4_MPST_PLATFORM_COMMUNICATION_CHANNEL_SHARED_MEMORY_REGION; /// @@ -988,145 +988,145 @@ typedef struct { /// /// ACPI MPST Memory Power command /// -#define EFI_ACPI_6_4_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_POWER_STATE 0x01 -#define EFI_ACPI_6_4_MPST_MEMORY_POWER_COMMAND_SET_MEMORY_POWER_STATE 0x02 -#define EFI_ACPI_6_4_MPST_MEMORY_POWER_COMMAND_GET_AVERAGE_POWER_CONSUMED 0x03 -#define EFI_ACPI_6_4_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_ENERGY_CONSUMED 0x04 +#define EFI_ACPI_6_4_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_POWER_STATE 0x01 +#define EFI_ACPI_6_4_MPST_MEMORY_POWER_COMMAND_SET_MEMORY_POWER_STATE 0x02 +#define EFI_ACPI_6_4_MPST_MEMORY_POWER_COMMAND_GET_AVERAGE_POWER_CONSUMED 0x03 +#define EFI_ACPI_6_4_MPST_MEMORY_POWER_COMMAND_GET_MEMORY_ENERGY_CONSUMED 0x04 /// /// MPST Memory Power Node Table /// typedef struct { - UINT8 PowerStateValue; - UINT8 PowerStateInformationIndex; + UINT8 PowerStateValue; + UINT8 PowerStateInformationIndex; } EFI_ACPI_6_4_MPST_MEMORY_POWER_STATE; typedef struct { - UINT8 Flag; - UINT8 Reserved; - UINT16 MemoryPowerNodeId; - UINT32 Length; - UINT64 AddressBase; - UINT64 AddressLength; - UINT32 NumberOfPowerStates; - UINT32 NumberOfPhysicalComponents; -//EFI_ACPI_6_4_MPST_MEMORY_POWER_STATE MemoryPowerState[NumberOfPowerStates]; -//UINT16 PhysicalComponentIdentifier[NumberOfPhysicalComponents]; + UINT8 Flag; + UINT8 Reserved; + UINT16 MemoryPowerNodeId; + UINT32 Length; + UINT64 AddressBase; + UINT64 AddressLength; + UINT32 NumberOfPowerStates; + UINT32 NumberOfPhysicalComponents; + // EFI_ACPI_6_4_MPST_MEMORY_POWER_STATE MemoryPowerState[NumberOfPowerStates]; + // UINT16 PhysicalComponentIdentifier[NumberOfPhysicalComponents]; } EFI_ACPI_6_4_MPST_MEMORY_POWER_STRUCTURE; -#define EFI_ACPI_6_4_MPST_MEMORY_POWER_STRUCTURE_FLAG_ENABLE 0x01 -#define EFI_ACPI_6_4_MPST_MEMORY_POWER_STRUCTURE_FLAG_POWER_MANAGED 0x02 -#define EFI_ACPI_6_4_MPST_MEMORY_POWER_STRUCTURE_FLAG_HOT_PLUGGABLE 0x04 +#define EFI_ACPI_6_4_MPST_MEMORY_POWER_STRUCTURE_FLAG_ENABLE 0x01 +#define EFI_ACPI_6_4_MPST_MEMORY_POWER_STRUCTURE_FLAG_POWER_MANAGED 0x02 +#define EFI_ACPI_6_4_MPST_MEMORY_POWER_STRUCTURE_FLAG_HOT_PLUGGABLE 0x04 typedef struct { - UINT16 MemoryPowerNodeCount; - UINT8 Reserved[2]; + UINT16 MemoryPowerNodeCount; + UINT8 Reserved[2]; } EFI_ACPI_6_4_MPST_MEMORY_POWER_NODE_TABLE; /// /// MPST Memory Power State Characteristics Table /// typedef struct { - UINT8 PowerStateStructureID; - UINT8 Flag; - UINT16 Reserved; - UINT32 AveragePowerConsumedInMPS0; - UINT32 RelativePowerSavingToMPS0; - UINT64 ExitLatencyToMPS0; + UINT8 PowerStateStructureID; + UINT8 Flag; + UINT16 Reserved; + UINT32 AveragePowerConsumedInMPS0; + UINT32 RelativePowerSavingToMPS0; + UINT64 ExitLatencyToMPS0; } EFI_ACPI_6_4_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE; -#define EFI_ACPI_6_4_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_MEMORY_CONTENT_PRESERVED 0x01 -#define EFI_ACPI_6_4_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_ENTRY 0x02 -#define EFI_ACPI_6_4_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_EXIT 0x04 +#define EFI_ACPI_6_4_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_MEMORY_CONTENT_PRESERVED 0x01 +#define EFI_ACPI_6_4_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_ENTRY 0x02 +#define EFI_ACPI_6_4_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_STRUCTURE_FLAG_AUTONOMOUS_MEMORY_POWER_STATE_EXIT 0x04 typedef struct { - UINT16 MemoryPowerStateCharacteristicsCount; - UINT8 Reserved[2]; + UINT16 MemoryPowerStateCharacteristicsCount; + UINT8 Reserved[2]; } EFI_ACPI_6_4_MPST_MEMORY_POWER_STATE_CHARACTERISTICS_TABLE; /// /// Platform Memory Topology Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 NumberOfMemoryDevices; -//EFI_ACPI_6_4_PMTT_COMMON_MEMORY_DEVICE MemoryDeviceStructure[NumberOfMemoryDevices]; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 NumberOfMemoryDevices; + // EFI_ACPI_6_4_PMTT_COMMON_MEMORY_DEVICE MemoryDeviceStructure[NumberOfMemoryDevices]; } EFI_ACPI_6_4_PLATFORM_MEMORY_TOPOLOGY_TABLE; /// /// PMTT Version (as defined in ACPI 6.4 spec.) /// -#define EFI_ACPI_6_4_MEMORY_TOPOLOGY_TABLE_REVISION 0x02 +#define EFI_ACPI_6_4_MEMORY_TOPOLOGY_TABLE_REVISION 0x02 /// /// Common Memory Device. /// typedef struct { - UINT8 Type; - UINT8 Reserved; - UINT16 Length; - UINT16 Flags; - UINT16 Reserved1; - UINT32 NumberOfMemoryDevices; -//UINT8 TypeSpecificData[]; -//EFI_ACPI_6_4_PMTT_COMMON_MEMORY_DEVICE MemoryDeviceStructure[NumberOfMemoryDevices]; + UINT8 Type; + UINT8 Reserved; + UINT16 Length; + UINT16 Flags; + UINT16 Reserved1; + UINT32 NumberOfMemoryDevices; + // UINT8 TypeSpecificData[]; + // EFI_ACPI_6_4_PMTT_COMMON_MEMORY_DEVICE MemoryDeviceStructure[NumberOfMemoryDevices]; } EFI_ACPI_6_4_PMTT_COMMON_MEMORY_DEVICE; /// /// Memory Device Type. /// -#define EFI_ACPI_6_4_PMTT_MEMORY_DEVICE_TYPE_SOCKET 0x0 -#define EFI_ACPI_6_4_PMTT_MEMORY_DEVICE_TYPE_MEMORY_CONTROLLER 0x1 -#define EFI_ACPI_6_4_PMTT_MEMORY_DEVICE_TYPE_DIMM 0x2 -#define EFI_ACPI_6_4_PMTT_MEMORY_DEVICE_TYPE_VENDOR_SPECIFIC_TYPE 0xFF +#define EFI_ACPI_6_4_PMTT_MEMORY_DEVICE_TYPE_SOCKET 0x0 +#define EFI_ACPI_6_4_PMTT_MEMORY_DEVICE_TYPE_MEMORY_CONTROLLER 0x1 +#define EFI_ACPI_6_4_PMTT_MEMORY_DEVICE_TYPE_DIMM 0x2 +#define EFI_ACPI_6_4_PMTT_MEMORY_DEVICE_TYPE_VENDOR_SPECIFIC_TYPE 0xFF /// /// Socket Type Data. /// typedef struct { - EFI_ACPI_6_4_PMTT_COMMON_MEMORY_DEVICE CommonMemoryDeviceHeader; - UINT16 SocketIdentifier; - UINT16 Reserved; -//EFI_ACPI_6_4_PMTT_COMMON_MEMORY_DEVICE MemoryDeviceStructure[]; + EFI_ACPI_6_4_PMTT_COMMON_MEMORY_DEVICE CommonMemoryDeviceHeader; + UINT16 SocketIdentifier; + UINT16 Reserved; + // EFI_ACPI_6_4_PMTT_COMMON_MEMORY_DEVICE MemoryDeviceStructure[]; } EFI_ACPI_6_4_PMTT_SOCKET_TYPE_DATA; /// /// Memory Controller Type Data. /// typedef struct { - EFI_ACPI_6_4_PMTT_COMMON_MEMORY_DEVICE CommonMemoryDeviceHeader; - UINT16 MemoryControllerIdentifier; - UINT16 Reserved; -//EFI_ACPI_6_4_PMTT_COMMON_MEMORY_DEVICE MemoryDeviceStructure[]; + EFI_ACPI_6_4_PMTT_COMMON_MEMORY_DEVICE CommonMemoryDeviceHeader; + UINT16 MemoryControllerIdentifier; + UINT16 Reserved; + // EFI_ACPI_6_4_PMTT_COMMON_MEMORY_DEVICE MemoryDeviceStructure[]; } EFI_ACPI_6_4_PMTT_MEMORY_CONTROLLER_TYPE_DATA; /// /// DIMM Type Specific Data. /// typedef struct { - EFI_ACPI_6_4_PMTT_COMMON_MEMORY_DEVICE CommonMemoryDeviceHeader; - UINT32 SmbiosHandle; + EFI_ACPI_6_4_PMTT_COMMON_MEMORY_DEVICE CommonMemoryDeviceHeader; + UINT32 SmbiosHandle; } EFI_ACPI_6_4_PMTT_DIMM_TYPE_SPECIFIC_DATA; /// /// Vendor Specific Type Data. /// typedef struct { - EFI_ACPI_6_4_PMTT_COMMON_MEMORY_DEVICE CommonMemoryDeviceHeader; - UINT8 TypeUuid[16]; -//EFI_ACPI_6_4_PMTT_VENDOR_SPECIFIC_TYPE_DATA VendorSpecificData[]; -//EFI_ACPI_6_4_PMTT_COMMON_MEMORY_DEVICE MemoryDeviceStructure[]; + EFI_ACPI_6_4_PMTT_COMMON_MEMORY_DEVICE CommonMemoryDeviceHeader; + UINT8 TypeUuid[16]; + // EFI_ACPI_6_4_PMTT_VENDOR_SPECIFIC_TYPE_DATA VendorSpecificData[]; + // EFI_ACPI_6_4_PMTT_COMMON_MEMORY_DEVICE MemoryDeviceStructure[]; } EFI_ACPI_6_4_PMTT_VENDOR_SPECIFIC_TYPE_DATA; /// /// Boot Graphics Resource Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_DESCRIPTION_HEADER Header; /// /// 2-bytes (16 bit) version ID. This value must be 1. /// - UINT16 Version; + UINT16 Version; /// /// 1-byte status field indicating current status about the table. /// Bits[7:3] = Reserved (must be zero) @@ -1139,47 +1139,47 @@ typedef struct { /// Bit [0] = Displayed. A one indicates the boot image graphic is /// displayed. /// - UINT8 Status; + UINT8 Status; /// /// 1-byte enumerated type field indicating format of the image. /// 0 = Bitmap /// 1 - 255 Reserved (for future use) /// - UINT8 ImageType; + UINT8 ImageType; /// /// 8-byte (64 bit) physical address pointing to the firmware's in-memory copy /// of the image bitmap. /// - UINT64 ImageAddress; + UINT64 ImageAddress; /// /// A 4-byte (32-bit) unsigned long describing the display X-offset of the boot image. /// (X, Y) display offset of the top left corner of the boot image. /// The top left corner of the display is at offset (0, 0). /// - UINT32 ImageOffsetX; + UINT32 ImageOffsetX; /// /// A 4-byte (32-bit) unsigned long describing the display Y-offset of the boot image. /// (X, Y) display offset of the top left corner of the boot image. /// The top left corner of the display is at offset (0, 0). /// - UINT32 ImageOffsetY; + UINT32 ImageOffsetY; } EFI_ACPI_6_4_BOOT_GRAPHICS_RESOURCE_TABLE; /// /// BGRT Revision /// -#define EFI_ACPI_6_4_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION 1 +#define EFI_ACPI_6_4_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION 1 /// /// BGRT Version /// -#define EFI_ACPI_6_4_BGRT_VERSION 0x01 +#define EFI_ACPI_6_4_BGRT_VERSION 0x01 /// /// BGRT Status /// -#define EFI_ACPI_6_4_BGRT_STATUS_NOT_DISPLAYED 0x00 -#define EFI_ACPI_6_4_BGRT_STATUS_DISPLAYED 0x01 +#define EFI_ACPI_6_4_BGRT_STATUS_NOT_DISPLAYED 0x00 +#define EFI_ACPI_6_4_BGRT_STATUS_DISPLAYED 0x01 /// /// BGRT Image Type @@ -1189,26 +1189,26 @@ typedef struct { /// /// FPDT Version (as defined in ACPI 6.4 spec.) /// -#define EFI_ACPI_6_4_FIRMWARE_PERFORMANCE_DATA_TABLE_REVISION 0x01 +#define EFI_ACPI_6_4_FIRMWARE_PERFORMANCE_DATA_TABLE_REVISION 0x01 /// /// FPDT Performance Record Types /// -#define EFI_ACPI_6_4_FPDT_RECORD_TYPE_FIRMWARE_BASIC_BOOT_POINTER 0x0000 -#define EFI_ACPI_6_4_FPDT_RECORD_TYPE_S3_PERFORMANCE_TABLE_POINTER 0x0001 +#define EFI_ACPI_6_4_FPDT_RECORD_TYPE_FIRMWARE_BASIC_BOOT_POINTER 0x0000 +#define EFI_ACPI_6_4_FPDT_RECORD_TYPE_S3_PERFORMANCE_TABLE_POINTER 0x0001 /// /// FPDT Performance Record Revision /// -#define EFI_ACPI_6_4_FPDT_RECORD_REVISION_FIRMWARE_BASIC_BOOT_POINTER 0x01 -#define EFI_ACPI_6_4_FPDT_RECORD_REVISION_S3_PERFORMANCE_TABLE_POINTER 0x01 +#define EFI_ACPI_6_4_FPDT_RECORD_REVISION_FIRMWARE_BASIC_BOOT_POINTER 0x01 +#define EFI_ACPI_6_4_FPDT_RECORD_REVISION_S3_PERFORMANCE_TABLE_POINTER 0x01 /// /// FPDT Runtime Performance Record Types /// -#define EFI_ACPI_6_4_FPDT_RUNTIME_RECORD_TYPE_S3_RESUME 0x0000 -#define EFI_ACPI_6_4_FPDT_RUNTIME_RECORD_TYPE_S3_SUSPEND 0x0001 -#define EFI_ACPI_6_4_FPDT_RUNTIME_RECORD_TYPE_FIRMWARE_BASIC_BOOT 0x0002 +#define EFI_ACPI_6_4_FPDT_RUNTIME_RECORD_TYPE_S3_RESUME 0x0000 +#define EFI_ACPI_6_4_FPDT_RUNTIME_RECORD_TYPE_S3_SUSPEND 0x0001 +#define EFI_ACPI_6_4_FPDT_RUNTIME_RECORD_TYPE_FIRMWARE_BASIC_BOOT 0x0002 /// /// FPDT Runtime Performance Record Revision @@ -1221,77 +1221,77 @@ typedef struct { /// FPDT Performance Record header /// typedef struct { - UINT16 Type; - UINT8 Length; - UINT8 Revision; + UINT16 Type; + UINT8 Length; + UINT8 Revision; } EFI_ACPI_6_4_FPDT_PERFORMANCE_RECORD_HEADER; /// /// FPDT Performance Table header /// typedef struct { - UINT32 Signature; - UINT32 Length; + UINT32 Signature; + UINT32 Length; } EFI_ACPI_6_4_FPDT_PERFORMANCE_TABLE_HEADER; /// /// FPDT Firmware Basic Boot Performance Pointer Record Structure /// typedef struct { - EFI_ACPI_6_4_FPDT_PERFORMANCE_RECORD_HEADER Header; - UINT32 Reserved; + EFI_ACPI_6_4_FPDT_PERFORMANCE_RECORD_HEADER Header; + UINT32 Reserved; /// /// 64-bit processor-relative physical address of the Basic Boot Performance Table. /// - UINT64 BootPerformanceTablePointer; + UINT64 BootPerformanceTablePointer; } EFI_ACPI_6_4_FPDT_BOOT_PERFORMANCE_TABLE_POINTER_RECORD; /// /// FPDT S3 Performance Table Pointer Record Structure /// typedef struct { - EFI_ACPI_6_4_FPDT_PERFORMANCE_RECORD_HEADER Header; - UINT32 Reserved; + EFI_ACPI_6_4_FPDT_PERFORMANCE_RECORD_HEADER Header; + UINT32 Reserved; /// /// 64-bit processor-relative physical address of the S3 Performance Table. /// - UINT64 S3PerformanceTablePointer; + UINT64 S3PerformanceTablePointer; } EFI_ACPI_6_4_FPDT_S3_PERFORMANCE_TABLE_POINTER_RECORD; /// /// FPDT Firmware Basic Boot Performance Record Structure /// typedef struct { - EFI_ACPI_6_4_FPDT_PERFORMANCE_RECORD_HEADER Header; - UINT32 Reserved; + EFI_ACPI_6_4_FPDT_PERFORMANCE_RECORD_HEADER Header; + UINT32 Reserved; /// /// Timer value logged at the beginning of firmware image execution. /// This may not always be zero or near zero. /// - UINT64 ResetEnd; + UINT64 ResetEnd; /// /// Timer value logged just prior to loading the OS boot loader into memory. /// For non-UEFI compatible boots, this field must be zero. /// - UINT64 OsLoaderLoadImageStart; + UINT64 OsLoaderLoadImageStart; /// /// Timer value logged just prior to launching the previously loaded OS boot loader image. /// For non-UEFI compatible boots, the timer value logged will be just prior /// to the INT 19h handler invocation. /// - UINT64 OsLoaderStartImageStart; + UINT64 OsLoaderStartImageStart; /// /// Timer value logged at the point when the OS loader calls the /// ExitBootServices function for UEFI compatible firmware. /// For non-UEFI compatible boots, this field must be zero. /// - UINT64 ExitBootServicesEntry; + UINT64 ExitBootServicesEntry; /// /// Timer value logged at the point just prior towhen the OS loader gaining /// control back from calls the ExitBootServices function for UEFI compatible firmware. /// For non-UEFI compatible boots, this field must be zero. /// - UINT64 ExitBootServicesExit; + UINT64 ExitBootServicesExit; } EFI_ACPI_6_4_FPDT_FIRMWARE_BASIC_BOOT_RECORD; /// @@ -1303,7 +1303,7 @@ typedef struct { // FPDT Firmware Basic Boot Performance Table // typedef struct { - EFI_ACPI_6_4_FPDT_PERFORMANCE_TABLE_HEADER Header; + EFI_ACPI_6_4_FPDT_PERFORMANCE_TABLE_HEADER Header; // // one or more Performance Records. // @@ -1318,7 +1318,7 @@ typedef struct { // FPDT Firmware S3 Boot Performance Table // typedef struct { - EFI_ACPI_6_4_FPDT_PERFORMANCE_TABLE_HEADER Header; + EFI_ACPI_6_4_FPDT_PERFORMANCE_TABLE_HEADER Header; // // one or more Performance Records. // @@ -1328,147 +1328,147 @@ typedef struct { /// FPDT Basic S3 Resume Performance Record /// typedef struct { - EFI_ACPI_6_4_FPDT_PERFORMANCE_RECORD_HEADER Header; + EFI_ACPI_6_4_FPDT_PERFORMANCE_RECORD_HEADER Header; /// /// A count of the number of S3 resume cycles since the last full boot sequence. /// - UINT32 ResumeCount; + UINT32 ResumeCount; /// /// Timer recorded at the end of BIOS S3 resume, just prior to handoff to the /// OS waking vector. Only the most recent resume cycle's time is retained. /// - UINT64 FullResume; + UINT64 FullResume; /// /// Average timer value of all resume cycles logged since the last full boot /// sequence, including the most recent resume. Note that the entire log of /// timer values does not need to be retained in order to calculate this average. /// - UINT64 AverageResume; + UINT64 AverageResume; } EFI_ACPI_6_4_FPDT_S3_RESUME_RECORD; /// /// FPDT Basic S3 Suspend Performance Record /// typedef struct { - EFI_ACPI_6_4_FPDT_PERFORMANCE_RECORD_HEADER Header; + EFI_ACPI_6_4_FPDT_PERFORMANCE_RECORD_HEADER Header; /// /// Timer value recorded at the OS write to SLP_TYP upon entry to S3. /// Only the most recent suspend cycle's timer value is retained. /// - UINT64 SuspendStart; + UINT64 SuspendStart; /// /// Timer value recorded at the final firmware write to SLP_TYP (or other /// mechanism) used to trigger hardware entry to S3. /// Only the most recent suspend cycle's timer value is retained. /// - UINT64 SuspendEnd; + UINT64 SuspendEnd; } EFI_ACPI_6_4_FPDT_S3_SUSPEND_RECORD; /// /// Firmware Performance Record Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_DESCRIPTION_HEADER Header; } EFI_ACPI_6_4_FIRMWARE_PERFORMANCE_RECORD_TABLE; /// /// Generic Timer Description Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT64 CntControlBasePhysicalAddress; - UINT32 Reserved; - UINT32 SecurePL1TimerGSIV; - UINT32 SecurePL1TimerFlags; - UINT32 NonSecurePL1TimerGSIV; - UINT32 NonSecurePL1TimerFlags; - UINT32 VirtualTimerGSIV; - UINT32 VirtualTimerFlags; - UINT32 NonSecurePL2TimerGSIV; - UINT32 NonSecurePL2TimerFlags; - UINT64 CntReadBasePhysicalAddress; - UINT32 PlatformTimerCount; - UINT32 PlatformTimerOffset; - UINT32 VirtualPL2TimerGSIV; - UINT32 VirtualPL2TimerFlags; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT64 CntControlBasePhysicalAddress; + UINT32 Reserved; + UINT32 SecurePL1TimerGSIV; + UINT32 SecurePL1TimerFlags; + UINT32 NonSecurePL1TimerGSIV; + UINT32 NonSecurePL1TimerFlags; + UINT32 VirtualTimerGSIV; + UINT32 VirtualTimerFlags; + UINT32 NonSecurePL2TimerGSIV; + UINT32 NonSecurePL2TimerFlags; + UINT64 CntReadBasePhysicalAddress; + UINT32 PlatformTimerCount; + UINT32 PlatformTimerOffset; + UINT32 VirtualPL2TimerGSIV; + UINT32 VirtualPL2TimerFlags; } EFI_ACPI_6_4_GENERIC_TIMER_DESCRIPTION_TABLE; /// /// GTDT Version (as defined in ACPI 6.4 spec.) /// -#define EFI_ACPI_6_4_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION 0x03 +#define EFI_ACPI_6_4_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION 0x03 /// /// Timer Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_4_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 -#define EFI_ACPI_6_4_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 -#define EFI_ACPI_6_4_GTDT_TIMER_FLAG_ALWAYS_ON_CAPABILITY BIT2 +#define EFI_ACPI_6_4_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 +#define EFI_ACPI_6_4_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 +#define EFI_ACPI_6_4_GTDT_TIMER_FLAG_ALWAYS_ON_CAPABILITY BIT2 /// /// Platform Timer Type /// -#define EFI_ACPI_6_4_GTDT_GT_BLOCK 0 -#define EFI_ACPI_6_4_GTDT_ARM_GENERIC_WATCHDOG 1 +#define EFI_ACPI_6_4_GTDT_GT_BLOCK 0 +#define EFI_ACPI_6_4_GTDT_ARM_GENERIC_WATCHDOG 1 /// /// GT Block Structure /// typedef struct { - UINT8 Type; - UINT16 Length; - UINT8 Reserved; - UINT64 CntCtlBase; - UINT32 GTBlockTimerCount; - UINT32 GTBlockTimerOffset; + UINT8 Type; + UINT16 Length; + UINT8 Reserved; + UINT64 CntCtlBase; + UINT32 GTBlockTimerCount; + UINT32 GTBlockTimerOffset; } EFI_ACPI_6_4_GTDT_GT_BLOCK_STRUCTURE; /// /// GT Block Timer Structure /// typedef struct { - UINT8 GTFrameNumber; - UINT8 Reserved[3]; - UINT64 CntBaseX; - UINT64 CntEL0BaseX; - UINT32 GTxPhysicalTimerGSIV; - UINT32 GTxPhysicalTimerFlags; - UINT32 GTxVirtualTimerGSIV; - UINT32 GTxVirtualTimerFlags; - UINT32 GTxCommonFlags; + UINT8 GTFrameNumber; + UINT8 Reserved[3]; + UINT64 CntBaseX; + UINT64 CntEL0BaseX; + UINT32 GTxPhysicalTimerGSIV; + UINT32 GTxPhysicalTimerFlags; + UINT32 GTxVirtualTimerGSIV; + UINT32 GTxVirtualTimerFlags; + UINT32 GTxCommonFlags; } EFI_ACPI_6_4_GTDT_GT_BLOCK_TIMER_STRUCTURE; /// /// GT Block Physical Timers and Virtual Timers Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_4_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 -#define EFI_ACPI_6_4_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 +#define EFI_ACPI_6_4_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_MODE BIT0 +#define EFI_ACPI_6_4_GTDT_GT_BLOCK_TIMER_FLAG_TIMER_INTERRUPT_POLARITY BIT1 /// /// Common Flags Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_4_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER BIT0 -#define EFI_ACPI_6_4_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY BIT1 +#define EFI_ACPI_6_4_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER BIT0 +#define EFI_ACPI_6_4_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY BIT1 /// /// Arm Generic Watchdog Structure /// typedef struct { - UINT8 Type; - UINT16 Length; - UINT8 Reserved; - UINT64 RefreshFramePhysicalAddress; - UINT64 WatchdogControlFramePhysicalAddress; - UINT32 WatchdogTimerGSIV; - UINT32 WatchdogTimerFlags; + UINT8 Type; + UINT16 Length; + UINT8 Reserved; + UINT64 RefreshFramePhysicalAddress; + UINT64 WatchdogControlFramePhysicalAddress; + UINT32 WatchdogTimerGSIV; + UINT32 WatchdogTimerFlags; } EFI_ACPI_6_4_GTDT_ARM_GENERIC_WATCHDOG_STRUCTURE; /// /// Arm Generic Watchdog Timer Flags. All other bits are reserved and must be 0. /// -#define EFI_ACPI_6_4_GTDT_ARM_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_MODE BIT0 -#define EFI_ACPI_6_4_GTDT_ARM_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_POLARITY BIT1 -#define EFI_ACPI_6_4_GTDT_ARM_GENERIC_WATCHDOG_FLAG_SECURE_TIMER BIT2 +#define EFI_ACPI_6_4_GTDT_ARM_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_MODE BIT0 +#define EFI_ACPI_6_4_GTDT_ARM_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_POLARITY BIT1 +#define EFI_ACPI_6_4_GTDT_ARM_GENERIC_WATCHDOG_FLAG_SECURE_TIMER BIT2 // // NVDIMM Firmware Interface Table definition. @@ -1481,67 +1481,67 @@ typedef struct { // // NFIT Version (as defined in ACPI 6.4 spec.) // -#define EFI_ACPI_6_4_NVDIMM_FIRMWARE_INTERFACE_TABLE_REVISION 0x1 +#define EFI_ACPI_6_4_NVDIMM_FIRMWARE_INTERFACE_TABLE_REVISION 0x1 // // Definition for NFIT Table Structure Types // -#define EFI_ACPI_6_4_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_STRUCTURE_TYPE 0 -#define EFI_ACPI_6_4_NFIT_NVDIMM_REGION_MAPPING_STRUCTURE_TYPE 1 -#define EFI_ACPI_6_4_NFIT_INTERLEAVE_STRUCTURE_TYPE 2 -#define EFI_ACPI_6_4_NFIT_SMBIOS_MANAGEMENT_INFORMATION_STRUCTURE_TYPE 3 -#define EFI_ACPI_6_4_NFIT_NVDIMM_CONTROL_REGION_STRUCTURE_TYPE 4 -#define EFI_ACPI_6_4_NFIT_NVDIMM_BLOCK_DATA_WINDOW_REGION_STRUCTURE_TYPE 5 -#define EFI_ACPI_6_4_NFIT_FLUSH_HINT_ADDRESS_STRUCTURE_TYPE 6 +#define EFI_ACPI_6_4_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_STRUCTURE_TYPE 0 +#define EFI_ACPI_6_4_NFIT_NVDIMM_REGION_MAPPING_STRUCTURE_TYPE 1 +#define EFI_ACPI_6_4_NFIT_INTERLEAVE_STRUCTURE_TYPE 2 +#define EFI_ACPI_6_4_NFIT_SMBIOS_MANAGEMENT_INFORMATION_STRUCTURE_TYPE 3 +#define EFI_ACPI_6_4_NFIT_NVDIMM_CONTROL_REGION_STRUCTURE_TYPE 4 +#define EFI_ACPI_6_4_NFIT_NVDIMM_BLOCK_DATA_WINDOW_REGION_STRUCTURE_TYPE 5 +#define EFI_ACPI_6_4_NFIT_FLUSH_HINT_ADDRESS_STRUCTURE_TYPE 6 // // Definition for NFIT Structure Header // typedef struct { - UINT16 Type; - UINT16 Length; + UINT16 Type; + UINT16 Length; } EFI_ACPI_6_4_NFIT_STRUCTURE_HEADER; // // Definition for System Physical Address Range Structure // -#define EFI_ACPI_6_4_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_CONTROL_REGION_FOR_MANAGEMENT BIT0 -#define EFI_ACPI_6_4_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_PROXIMITY_DOMAIN_VALID BIT1 -#define EFI_ACPI_6_4_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_SPA_LOCATION_COOKIE_VALID BIT2 - -#define EFI_ACPI_6_4_NFIT_GUID_VOLATILE_MEMORY_REGION { 0x7305944F, 0xFDDA, 0x44E3, { 0xB1, 0x6C, 0x3F, 0x22, 0xD2, 0x52, 0xE5, 0xD0 }} -#define EFI_ACPI_6_4_NFIT_GUID_BYTE_ADDRESSABLE_PERSISTENT_MEMORY_REGION { 0x66F0D379, 0xB4F3, 0x4074, { 0xAC, 0x43, 0x0D, 0x33, 0x18, 0xB7, 0x8C, 0xDB }} -#define EFI_ACPI_6_4_NFIT_GUID_NVDIMM_CONTROL_REGION { 0x92F701F6, 0x13B4, 0x405D, { 0x91, 0x0B, 0x29, 0x93, 0x67, 0xE8, 0x23, 0x4C }} -#define EFI_ACPI_6_4_NFIT_GUID_NVDIMM_BLOCK_DATA_WINDOW_REGION { 0x91AF0530, 0x5D86, 0x470E, { 0xA6, 0xB0, 0x0A, 0x2D, 0xB9, 0x40, 0x82, 0x49 }} -#define EFI_ACPI_6_4_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE { 0x77AB535A, 0x45FC, 0x624B, { 0x55, 0x60, 0xF7, 0xB2, 0x81, 0xD1, 0xF9, 0x6E }} -#define EFI_ACPI_6_4_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE { 0x3D5ABD30, 0x4175, 0x87CE, { 0x6D, 0x64, 0xD2, 0xAD, 0xE5, 0x23, 0xC4, 0xBB }} -#define EFI_ACPI_6_4_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT { 0x5CEA02C9, 0x4D07, 0x69D3, { 0x26, 0x9F ,0x44, 0x96, 0xFB, 0xE0, 0x96, 0xF9 }} -#define EFI_ACPI_6_4_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT { 0x08018188, 0x42CD, 0xBB48, { 0x10, 0x0F, 0x53, 0x87, 0xD5, 0x3D, 0xED, 0x3D }} - -typedef struct { - UINT16 Type; - UINT16 Length; - UINT16 SPARangeStructureIndex; - UINT16 Flags; - UINT32 Reserved_8; - UINT32 ProximityDomain; - GUID AddressRangeTypeGUID; - UINT64 SystemPhysicalAddressRangeBase; - UINT64 SystemPhysicalAddressRangeLength; - UINT64 AddressRangeMemoryMappingAttribute; - UINT64 SPALocationCookie; +#define EFI_ACPI_6_4_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_CONTROL_REGION_FOR_MANAGEMENT BIT0 +#define EFI_ACPI_6_4_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_PROXIMITY_DOMAIN_VALID BIT1 +#define EFI_ACPI_6_4_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_FLAGS_SPA_LOCATION_COOKIE_VALID BIT2 + +#define EFI_ACPI_6_4_NFIT_GUID_VOLATILE_MEMORY_REGION { 0x7305944F, 0xFDDA, 0x44E3, { 0xB1, 0x6C, 0x3F, 0x22, 0xD2, 0x52, 0xE5, 0xD0 }} +#define EFI_ACPI_6_4_NFIT_GUID_BYTE_ADDRESSABLE_PERSISTENT_MEMORY_REGION { 0x66F0D379, 0xB4F3, 0x4074, { 0xAC, 0x43, 0x0D, 0x33, 0x18, 0xB7, 0x8C, 0xDB }} +#define EFI_ACPI_6_4_NFIT_GUID_NVDIMM_CONTROL_REGION { 0x92F701F6, 0x13B4, 0x405D, { 0x91, 0x0B, 0x29, 0x93, 0x67, 0xE8, 0x23, 0x4C }} +#define EFI_ACPI_6_4_NFIT_GUID_NVDIMM_BLOCK_DATA_WINDOW_REGION { 0x91AF0530, 0x5D86, 0x470E, { 0xA6, 0xB0, 0x0A, 0x2D, 0xB9, 0x40, 0x82, 0x49 }} +#define EFI_ACPI_6_4_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE { 0x77AB535A, 0x45FC, 0x624B, { 0x55, 0x60, 0xF7, 0xB2, 0x81, 0xD1, 0xF9, 0x6E }} +#define EFI_ACPI_6_4_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE { 0x3D5ABD30, 0x4175, 0x87CE, { 0x6D, 0x64, 0xD2, 0xAD, 0xE5, 0x23, 0xC4, 0xBB }} +#define EFI_ACPI_6_4_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT { 0x5CEA02C9, 0x4D07, 0x69D3, { 0x26, 0x9F ,0x44, 0x96, 0xFB, 0xE0, 0x96, 0xF9 }} +#define EFI_ACPI_6_4_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT { 0x08018188, 0x42CD, 0xBB48, { 0x10, 0x0F, 0x53, 0x87, 0xD5, 0x3D, 0xED, 0x3D }} + +typedef struct { + UINT16 Type; + UINT16 Length; + UINT16 SPARangeStructureIndex; + UINT16 Flags; + UINT32 Reserved_8; + UINT32 ProximityDomain; + GUID AddressRangeTypeGUID; + UINT64 SystemPhysicalAddressRangeBase; + UINT64 SystemPhysicalAddressRangeLength; + UINT64 AddressRangeMemoryMappingAttribute; + UINT64 SPALocationCookie; } EFI_ACPI_6_4_NFIT_SYSTEM_PHYSICAL_ADDRESS_RANGE_STRUCTURE; // // Definition for Memory Device to System Physical Address Range Mapping Structure // typedef struct { - UINT32 DIMMNumber:4; - UINT32 MemoryChannelNumber:4; - UINT32 MemoryControllerID:4; - UINT32 SocketID:4; - UINT32 NodeControllerID:12; - UINT32 Reserved_28:4; + UINT32 DIMMNumber : 4; + UINT32 MemoryChannelNumber : 4; + UINT32 MemoryControllerID : 4; + UINT32 SocketID : 4; + UINT32 NodeControllerID : 12; + UINT32 Reserved_28 : 4; } EFI_ACPI_6_4_NFIT_DEVICE_HANDLE; #define EFI_ACPI_6_4_NFIT_MEMORY_DEVICE_STATE_FLAGS_PREVIOUS_SAVE_FAIL BIT0 @@ -1553,231 +1553,231 @@ typedef struct { #define EFI_ACPI_6_4_NFIT_MEMORY_DEVICE_STATE_FLAGS_FIRMWARE_NOT_MAP_NVDIMM_TO_SPA BIT6 typedef struct { - UINT16 Type; - UINT16 Length; - EFI_ACPI_6_4_NFIT_DEVICE_HANDLE NFITDeviceHandle; - UINT16 NVDIMMPhysicalID; - UINT16 NVDIMMRegionID; - UINT16 SPARangeStructureIndex ; - UINT16 NVDIMMControlRegionStructureIndex; - UINT64 NVDIMMRegionSize; - UINT64 RegionOffset; - UINT64 NVDIMMPhysicalAddressRegionBase; - UINT16 InterleaveStructureIndex; - UINT16 InterleaveWays; - UINT16 NVDIMMStateFlags; - UINT16 Reserved_46; + UINT16 Type; + UINT16 Length; + EFI_ACPI_6_4_NFIT_DEVICE_HANDLE NFITDeviceHandle; + UINT16 NVDIMMPhysicalID; + UINT16 NVDIMMRegionID; + UINT16 SPARangeStructureIndex; + UINT16 NVDIMMControlRegionStructureIndex; + UINT64 NVDIMMRegionSize; + UINT64 RegionOffset; + UINT64 NVDIMMPhysicalAddressRegionBase; + UINT16 InterleaveStructureIndex; + UINT16 InterleaveWays; + UINT16 NVDIMMStateFlags; + UINT16 Reserved_46; } EFI_ACPI_6_4_NFIT_NVDIMM_REGION_MAPPING_STRUCTURE; // // Definition for Interleave Structure // typedef struct { - UINT16 Type; - UINT16 Length; - UINT16 InterleaveStructureIndex; - UINT16 Reserved_6; - UINT32 NumberOfLines; - UINT32 LineSize; -//UINT32 LineOffset[NumberOfLines]; + UINT16 Type; + UINT16 Length; + UINT16 InterleaveStructureIndex; + UINT16 Reserved_6; + UINT32 NumberOfLines; + UINT32 LineSize; + // UINT32 LineOffset[NumberOfLines]; } EFI_ACPI_6_4_NFIT_INTERLEAVE_STRUCTURE; // // Definition for SMBIOS Management Information Structure // typedef struct { - UINT16 Type; - UINT16 Length; - UINT32 Reserved_4; -//UINT8 Data[]; + UINT16 Type; + UINT16 Length; + UINT32 Reserved_4; + // UINT8 Data[]; } EFI_ACPI_6_4_NFIT_SMBIOS_MANAGEMENT_INFORMATION_STRUCTURE; // // Definition for NVDIMM Control Region Structure // -#define EFI_ACPI_6_4_NFIT_NVDIMM_CONTROL_REGION_VALID_FIELDS_MANUFACTURING BIT0 - -#define EFI_ACPI_6_4_NFIT_NVDIMM_CONTROL_REGION_FLAGS_BLOCK_DATA_WINDOWS_BUFFERED BIT0 - -typedef struct { - UINT16 Type; - UINT16 Length; - UINT16 NVDIMMControlRegionStructureIndex; - UINT16 VendorID; - UINT16 DeviceID; - UINT16 RevisionID; - UINT16 SubsystemVendorID; - UINT16 SubsystemDeviceID; - UINT16 SubsystemRevisionID; - UINT8 ValidFields; - UINT8 ManufacturingLocation; - UINT16 ManufacturingDate; - UINT8 Reserved_22[2]; - UINT32 SerialNumber; - UINT16 RegionFormatInterfaceCode; - UINT16 NumberOfBlockControlWindows; - UINT64 SizeOfBlockControlWindow; - UINT64 CommandRegisterOffsetInBlockControlWindow; - UINT64 SizeOfCommandRegisterInBlockControlWindows; - UINT64 StatusRegisterOffsetInBlockControlWindow; - UINT64 SizeOfStatusRegisterInBlockControlWindows; - UINT16 NVDIMMControlRegionFlag; - UINT8 Reserved_74[6]; +#define EFI_ACPI_6_4_NFIT_NVDIMM_CONTROL_REGION_VALID_FIELDS_MANUFACTURING BIT0 + +#define EFI_ACPI_6_4_NFIT_NVDIMM_CONTROL_REGION_FLAGS_BLOCK_DATA_WINDOWS_BUFFERED BIT0 + +typedef struct { + UINT16 Type; + UINT16 Length; + UINT16 NVDIMMControlRegionStructureIndex; + UINT16 VendorID; + UINT16 DeviceID; + UINT16 RevisionID; + UINT16 SubsystemVendorID; + UINT16 SubsystemDeviceID; + UINT16 SubsystemRevisionID; + UINT8 ValidFields; + UINT8 ManufacturingLocation; + UINT16 ManufacturingDate; + UINT8 Reserved_22[2]; + UINT32 SerialNumber; + UINT16 RegionFormatInterfaceCode; + UINT16 NumberOfBlockControlWindows; + UINT64 SizeOfBlockControlWindow; + UINT64 CommandRegisterOffsetInBlockControlWindow; + UINT64 SizeOfCommandRegisterInBlockControlWindows; + UINT64 StatusRegisterOffsetInBlockControlWindow; + UINT64 SizeOfStatusRegisterInBlockControlWindows; + UINT16 NVDIMMControlRegionFlag; + UINT8 Reserved_74[6]; } EFI_ACPI_6_4_NFIT_NVDIMM_CONTROL_REGION_STRUCTURE; // // Definition for NVDIMM Block Data Window Region Structure // typedef struct { - UINT16 Type; - UINT16 Length; - UINT16 NVDIMMControlRegionStructureIndex; - UINT16 NumberOfBlockDataWindows; - UINT64 BlockDataWindowStartOffset; - UINT64 SizeOfBlockDataWindow; - UINT64 BlockAccessibleMemoryCapacity; - UINT64 BeginningAddressOfFirstBlockInBlockAccessibleMemory; + UINT16 Type; + UINT16 Length; + UINT16 NVDIMMControlRegionStructureIndex; + UINT16 NumberOfBlockDataWindows; + UINT64 BlockDataWindowStartOffset; + UINT64 SizeOfBlockDataWindow; + UINT64 BlockAccessibleMemoryCapacity; + UINT64 BeginningAddressOfFirstBlockInBlockAccessibleMemory; } EFI_ACPI_6_4_NFIT_NVDIMM_BLOCK_DATA_WINDOW_REGION_STRUCTURE; // // Definition for Flush Hint Address Structure // typedef struct { - UINT16 Type; - UINT16 Length; - EFI_ACPI_6_4_NFIT_DEVICE_HANDLE NFITDeviceHandle; - UINT16 NumberOfFlushHintAddresses; - UINT8 Reserved_10[6]; -//UINT64 FlushHintAddress[NumberOfFlushHintAddresses]; + UINT16 Type; + UINT16 Length; + EFI_ACPI_6_4_NFIT_DEVICE_HANDLE NFITDeviceHandle; + UINT16 NumberOfFlushHintAddresses; + UINT8 Reserved_10[6]; + // UINT64 FlushHintAddress[NumberOfFlushHintAddresses]; } EFI_ACPI_6_4_NFIT_FLUSH_HINT_ADDRESS_STRUCTURE; /// /// Secure DEVices Table (SDEV) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_DESCRIPTION_HEADER Header; } EFI_ACPI_6_4_SECURE_DEVICES_TABLE_HEADER; /// /// SDEV Revision (as defined in ACPI 6.4 spec.) /// -#define EFI_ACPI_6_4_SECURE_DEVICES_TABLE_REVISION 0x01 +#define EFI_ACPI_6_4_SECURE_DEVICES_TABLE_REVISION 0x01 /// /// Secure Device types /// -#define EFI_ACPI_6_4_SDEV_TYPE_ACPI_NAMESPACE_DEVICE 0x00 -#define EFI_ACPI_6_4_SDEV_TYPE_PCIE_ENDPOINT_DEVICE 0x01 +#define EFI_ACPI_6_4_SDEV_TYPE_ACPI_NAMESPACE_DEVICE 0x00 +#define EFI_ACPI_6_4_SDEV_TYPE_PCIE_ENDPOINT_DEVICE 0x01 /// /// Secure Device flags /// -#define EFI_ACPI_6_4_SDEV_FLAG_ALLOW_HANDOFF BIT0 -#define EFI_ACPI_6_4_SDEV_FLAG_SECURE_ACCESS_COMPONENTS_PRESENT BIT1 +#define EFI_ACPI_6_4_SDEV_FLAG_ALLOW_HANDOFF BIT0 +#define EFI_ACPI_6_4_SDEV_FLAG_SECURE_ACCESS_COMPONENTS_PRESENT BIT1 /// /// SDEV Structure Header /// typedef struct { - UINT8 Type; - UINT8 Flags; - UINT16 Length; + UINT8 Type; + UINT8 Flags; + UINT16 Length; } EFI_ACPI_6_4_SDEV_STRUCTURE_HEADER; /// /// ACPI_NAMESPACE_DEVICE based Secure Device Structure /// typedef struct { - EFI_ACPI_6_4_SDEV_STRUCTURE_HEADER Header; - UINT16 DeviceIdentifierOffset; - UINT16 DeviceIdentifierLength; - UINT16 VendorSpecificDataOffset; - UINT16 VendorSpecificDataLength; - UINT16 SecureAccessComponentsOffset; - UINT16 SecureAccessComponentsLength; + EFI_ACPI_6_4_SDEV_STRUCTURE_HEADER Header; + UINT16 DeviceIdentifierOffset; + UINT16 DeviceIdentifierLength; + UINT16 VendorSpecificDataOffset; + UINT16 VendorSpecificDataLength; + UINT16 SecureAccessComponentsOffset; + UINT16 SecureAccessComponentsLength; } EFI_ACPI_6_4_SDEV_STRUCTURE_ACPI_NAMESPACE_DEVICE; /// /// Secure Access Component Types /// -#define EFI_ACPI_6_4_SDEV_SECURE_ACCESS_COMPONENT_TYPE_IDENTIFICATION 0x00 -#define EFI_ACPI_6_4_SDEV_SECURE_ACCESS_COMPONENT_TYPE_MEMORY 0x01 +#define EFI_ACPI_6_4_SDEV_SECURE_ACCESS_COMPONENT_TYPE_IDENTIFICATION 0x00 +#define EFI_ACPI_6_4_SDEV_SECURE_ACCESS_COMPONENT_TYPE_MEMORY 0x01 /// /// Identification Based Secure Access Component /// typedef struct { - EFI_ACPI_6_4_SDEV_STRUCTURE_HEADER Header; - UINT16 HardwareIdentifierOffset; - UINT16 HardwareIdentifierLength; - UINT16 SubsystemIdentifierOffset; - UINT16 SubsystemIdentifierLength; - UINT16 HardwareRevision; - UINT8 HardwareRevisionPresent; - UINT8 ClassCodePresent; - UINT8 PciCompatibleBaseClass; - UINT8 PciCompatibleSubClass; - UINT8 PciCompatibleProgrammingInterface; + EFI_ACPI_6_4_SDEV_STRUCTURE_HEADER Header; + UINT16 HardwareIdentifierOffset; + UINT16 HardwareIdentifierLength; + UINT16 SubsystemIdentifierOffset; + UINT16 SubsystemIdentifierLength; + UINT16 HardwareRevision; + UINT8 HardwareRevisionPresent; + UINT8 ClassCodePresent; + UINT8 PciCompatibleBaseClass; + UINT8 PciCompatibleSubClass; + UINT8 PciCompatibleProgrammingInterface; } EFI_ACPI_6_4_SDEV_SECURE_ACCESS_COMPONENT_IDENTIFICATION_STRUCTURE; /// /// Memory-based Secure Access Component /// typedef struct { - EFI_ACPI_6_4_SDEV_STRUCTURE_HEADER Header; - UINT32 Reserved; - UINT64 MemoryAddressBase; - UINT64 MemoryLength; + EFI_ACPI_6_4_SDEV_STRUCTURE_HEADER Header; + UINT32 Reserved; + UINT64 MemoryAddressBase; + UINT64 MemoryLength; } EFI_ACPI_6_4_SDEV_SECURE_ACCESS_COMPONENT_MEMORY_STRUCTURE; /// /// PCIe Endpoint Device based Secure Device Structure /// typedef struct { - EFI_ACPI_6_4_SDEV_STRUCTURE_HEADER Header; - UINT16 PciSegmentNumber; - UINT16 StartBusNumber; - UINT16 PciPathOffset; - UINT16 PciPathLength; - UINT16 VendorSpecificDataOffset; - UINT16 VendorSpecificDataLength; + EFI_ACPI_6_4_SDEV_STRUCTURE_HEADER Header; + UINT16 PciSegmentNumber; + UINT16 StartBusNumber; + UINT16 PciPathOffset; + UINT16 PciPathLength; + UINT16 VendorSpecificDataOffset; + UINT16 VendorSpecificDataLength; } EFI_ACPI_6_4_SDEV_STRUCTURE_PCIE_ENDPOINT_DEVICE; /// /// Boot Error Record Table (BERT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 BootErrorRegionLength; - UINT64 BootErrorRegion; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 BootErrorRegionLength; + UINT64 BootErrorRegion; } EFI_ACPI_6_4_BOOT_ERROR_RECORD_TABLE_HEADER; /// /// BERT Version (as defined in ACPI 6.4 spec.) /// -#define EFI_ACPI_6_4_BOOT_ERROR_RECORD_TABLE_REVISION 0x01 +#define EFI_ACPI_6_4_BOOT_ERROR_RECORD_TABLE_REVISION 0x01 /// /// Boot Error Region Block Status Definition /// typedef struct { - UINT32 UncorrectableErrorValid:1; - UINT32 CorrectableErrorValid:1; - UINT32 MultipleUncorrectableErrors:1; - UINT32 MultipleCorrectableErrors:1; - UINT32 ErrorDataEntryCount:10; - UINT32 Reserved:18; + UINT32 UncorrectableErrorValid : 1; + UINT32 CorrectableErrorValid : 1; + UINT32 MultipleUncorrectableErrors : 1; + UINT32 MultipleCorrectableErrors : 1; + UINT32 ErrorDataEntryCount : 10; + UINT32 Reserved : 18; } EFI_ACPI_6_4_ERROR_BLOCK_STATUS; /// /// Boot Error Region Definition /// typedef struct { - EFI_ACPI_6_4_ERROR_BLOCK_STATUS BlockStatus; - UINT32 RawDataOffset; - UINT32 RawDataLength; - UINT32 DataLength; - UINT32 ErrorSeverity; + EFI_ACPI_6_4_ERROR_BLOCK_STATUS BlockStatus; + UINT32 RawDataOffset; + UINT32 RawDataLength; + UINT32 DataLength; + UINT32 ErrorSeverity; } EFI_ACPI_6_4_BOOT_ERROR_REGION_STRUCTURE; // @@ -1792,15 +1792,15 @@ typedef struct { /// Generic Error Data Entry Definition /// typedef struct { - UINT8 SectionType[16]; - UINT32 ErrorSeverity; - UINT16 Revision; - UINT8 ValidationBits; - UINT8 Flags; - UINT32 ErrorDataLength; - UINT8 FruId[16]; - UINT8 FruText[20]; - UINT8 Timestamp[8]; + UINT8 SectionType[16]; + UINT32 ErrorSeverity; + UINT16 Revision; + UINT8 ValidationBits; + UINT8 Flags; + UINT32 ErrorDataLength; + UINT8 FruId[16]; + UINT8 FruText[20]; + UINT8 Timestamp[8]; } EFI_ACPI_6_4_GENERIC_ERROR_DATA_ENTRY_STRUCTURE; /// @@ -1812,14 +1812,14 @@ typedef struct { /// HEST - Hardware Error Source Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 ErrorSourceCount; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 ErrorSourceCount; } EFI_ACPI_6_4_HARDWARE_ERROR_SOURCE_TABLE_HEADER; /// /// HEST Version (as defined in ACPI 6.4 spec.) /// -#define EFI_ACPI_6_4_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01 +#define EFI_ACPI_6_4_HARDWARE_ERROR_SOURCE_TABLE_REVISION 0x01 // // Error Source structure types. @@ -1837,237 +1837,237 @@ typedef struct { // // Error Source structure flags. // -#define EFI_ACPI_6_4_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0) -#define EFI_ACPI_6_4_ERROR_SOURCE_FLAG_GLOBAL (1 << 1) -#define EFI_ACPI_6_4_ERROR_SOURCE_FLAG_GHES_ASSIST (1 << 2) +#define EFI_ACPI_6_4_ERROR_SOURCE_FLAG_FIRMWARE_FIRST (1 << 0) +#define EFI_ACPI_6_4_ERROR_SOURCE_FLAG_GLOBAL (1 << 1) +#define EFI_ACPI_6_4_ERROR_SOURCE_FLAG_GHES_ASSIST (1 << 2) /// /// IA-32 Architecture Machine Check Exception Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT64 GlobalCapabilityInitData; - UINT64 GlobalControlInitData; - UINT8 NumberOfHardwareBanks; - UINT8 Reserved1[7]; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT64 GlobalCapabilityInitData; + UINT64 GlobalControlInitData; + UINT8 NumberOfHardwareBanks; + UINT8 Reserved1[7]; } EFI_ACPI_6_4_IA32_ARCHITECTURE_MACHINE_CHECK_EXCEPTION_STRUCTURE; /// /// IA-32 Architecture Machine Check Bank Structure Definition /// typedef struct { - UINT8 BankNumber; - UINT8 ClearStatusOnInitialization; - UINT8 StatusDataFormat; - UINT8 Reserved0; - UINT32 ControlRegisterMsrAddress; - UINT64 ControlInitData; - UINT32 StatusRegisterMsrAddress; - UINT32 AddressRegisterMsrAddress; - UINT32 MiscRegisterMsrAddress; + UINT8 BankNumber; + UINT8 ClearStatusOnInitialization; + UINT8 StatusDataFormat; + UINT8 Reserved0; + UINT32 ControlRegisterMsrAddress; + UINT64 ControlInitData; + UINT32 StatusRegisterMsrAddress; + UINT32 AddressRegisterMsrAddress; + UINT32 MiscRegisterMsrAddress; } EFI_ACPI_6_4_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_BANK_STRUCTURE; /// /// IA-32 Architecture Machine Check Bank Structure MCA data format /// -#define EFI_ACPI_6_4_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00 -#define EFI_ACPI_6_4_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01 -#define EFI_ACPI_6_4_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02 +#define EFI_ACPI_6_4_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_IA32 0x00 +#define EFI_ACPI_6_4_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_INTEL64 0x01 +#define EFI_ACPI_6_4_IA32_ARCHITECTURE_MACHINE_CHECK_ERROR_DATA_FORMAT_AMD64 0x02 // // Hardware Error Notification types. All other values are reserved // -#define EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00 -#define EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01 -#define EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02 -#define EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_SCI 0x03 -#define EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_NMI 0x04 -#define EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_CMCI 0x05 -#define EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_MCE 0x06 -#define EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_GPIO_SIGNAL 0x07 -#define EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_ARMV8_SEA 0x08 -#define EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_ARMV8_SEI 0x09 -#define EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_GSIV 0x0A -#define EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_SOFTWARE_DELEGATED_EXCEPTION 0x0B +#define EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_POLLED 0x00 +#define EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_EXTERNAL_INTERRUPT 0x01 +#define EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_LOCAL_INTERRUPT 0x02 +#define EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_SCI 0x03 +#define EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_NMI 0x04 +#define EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_CMCI 0x05 +#define EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_MCE 0x06 +#define EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_GPIO_SIGNAL 0x07 +#define EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_ARMV8_SEA 0x08 +#define EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_ARMV8_SEI 0x09 +#define EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_GSIV 0x0A +#define EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_SOFTWARE_DELEGATED_EXCEPTION 0x0B /// /// Hardware Error Notification Configuration Write Enable Structure Definition /// typedef struct { - UINT16 Type:1; - UINT16 PollInterval:1; - UINT16 SwitchToPollingThresholdValue:1; - UINT16 SwitchToPollingThresholdWindow:1; - UINT16 ErrorThresholdValue:1; - UINT16 ErrorThresholdWindow:1; - UINT16 Reserved:10; + UINT16 Type : 1; + UINT16 PollInterval : 1; + UINT16 SwitchToPollingThresholdValue : 1; + UINT16 SwitchToPollingThresholdWindow : 1; + UINT16 ErrorThresholdValue : 1; + UINT16 ErrorThresholdWindow : 1; + UINT16 Reserved : 10; } EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE; /// /// Hardware Error Notification Structure Definition /// typedef struct { - UINT8 Type; - UINT8 Length; - EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable; - UINT32 PollInterval; - UINT32 Vector; - UINT32 SwitchToPollingThresholdValue; - UINT32 SwitchToPollingThresholdWindow; - UINT32 ErrorThresholdValue; - UINT32 ErrorThresholdWindow; + UINT8 Type; + UINT8 Length; + EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_CONFIGURATION_WRITE_ENABLE_STRUCTURE ConfigurationWriteEnable; + UINT32 PollInterval; + UINT32 Vector; + UINT32 SwitchToPollingThresholdValue; + UINT32 SwitchToPollingThresholdWindow; + UINT32 ErrorThresholdValue; + UINT32 ErrorThresholdWindow; } EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_STRUCTURE; /// /// IA-32 Architecture Corrected Machine Check Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; - UINT8 NumberOfHardwareBanks; - UINT8 Reserved1[3]; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; + UINT8 NumberOfHardwareBanks; + UINT8 Reserved1[3]; } EFI_ACPI_6_4_IA32_ARCHITECTURE_CORRECTED_MACHINE_CHECK_STRUCTURE; /// /// IA-32 Architecture NMI Error Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 MaxRawDataLength; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 MaxRawDataLength; } EFI_ACPI_6_4_IA32_ARCHITECTURE_NMI_ERROR_STRUCTURE; /// /// PCI Express Root Port AER Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 Bus; - UINT16 Device; - UINT16 Function; - UINT16 DeviceControl; - UINT8 Reserved1[2]; - UINT32 UncorrectableErrorMask; - UINT32 UncorrectableErrorSeverity; - UINT32 CorrectableErrorMask; - UINT32 AdvancedErrorCapabilitiesAndControl; - UINT32 RootErrorCommand; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 Bus; + UINT16 Device; + UINT16 Function; + UINT16 DeviceControl; + UINT8 Reserved1[2]; + UINT32 UncorrectableErrorMask; + UINT32 UncorrectableErrorSeverity; + UINT32 CorrectableErrorMask; + UINT32 AdvancedErrorCapabilitiesAndControl; + UINT32 RootErrorCommand; } EFI_ACPI_6_4_PCI_EXPRESS_ROOT_PORT_AER_STRUCTURE; /// /// PCI Express Device AER Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 Bus; - UINT16 Device; - UINT16 Function; - UINT16 DeviceControl; - UINT8 Reserved1[2]; - UINT32 UncorrectableErrorMask; - UINT32 UncorrectableErrorSeverity; - UINT32 CorrectableErrorMask; - UINT32 AdvancedErrorCapabilitiesAndControl; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 Bus; + UINT16 Device; + UINT16 Function; + UINT16 DeviceControl; + UINT8 Reserved1[2]; + UINT32 UncorrectableErrorMask; + UINT32 UncorrectableErrorSeverity; + UINT32 CorrectableErrorMask; + UINT32 AdvancedErrorCapabilitiesAndControl; } EFI_ACPI_6_4_PCI_EXPRESS_DEVICE_AER_STRUCTURE; /// /// PCI Express Bridge AER Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT8 Reserved0[2]; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 Bus; - UINT16 Device; - UINT16 Function; - UINT16 DeviceControl; - UINT8 Reserved1[2]; - UINT32 UncorrectableErrorMask; - UINT32 UncorrectableErrorSeverity; - UINT32 CorrectableErrorMask; - UINT32 AdvancedErrorCapabilitiesAndControl; - UINT32 SecondaryUncorrectableErrorMask; - UINT32 SecondaryUncorrectableErrorSeverity; - UINT32 SecondaryAdvancedErrorCapabilitiesAndControl; + UINT16 Type; + UINT16 SourceId; + UINT8 Reserved0[2]; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 Bus; + UINT16 Device; + UINT16 Function; + UINT16 DeviceControl; + UINT8 Reserved1[2]; + UINT32 UncorrectableErrorMask; + UINT32 UncorrectableErrorSeverity; + UINT32 CorrectableErrorMask; + UINT32 AdvancedErrorCapabilitiesAndControl; + UINT32 SecondaryUncorrectableErrorMask; + UINT32 SecondaryUncorrectableErrorSeverity; + UINT32 SecondaryAdvancedErrorCapabilitiesAndControl; } EFI_ACPI_6_4_PCI_EXPRESS_BRIDGE_AER_STRUCTURE; /// /// Generic Hardware Error Source Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT16 RelatedSourceId; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 MaxRawDataLength; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress; - EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; - UINT32 ErrorStatusBlockLength; + UINT16 Type; + UINT16 SourceId; + UINT16 RelatedSourceId; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 MaxRawDataLength; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress; + EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; + UINT32 ErrorStatusBlockLength; } EFI_ACPI_6_4_GENERIC_HARDWARE_ERROR_SOURCE_STRUCTURE; /// /// Generic Hardware Error Source Version 2 Structure Definition /// typedef struct { - UINT16 Type; - UINT16 SourceId; - UINT16 RelatedSourceId; - UINT8 Flags; - UINT8 Enabled; - UINT32 NumberOfRecordsToPreAllocate; - UINT32 MaxSectionsPerRecord; - UINT32 MaxRawDataLength; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress; - EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; - UINT32 ErrorStatusBlockLength; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE ReadAckRegister; - UINT64 ReadAckPreserve; - UINT64 ReadAckWrite; + UINT16 Type; + UINT16 SourceId; + UINT16 RelatedSourceId; + UINT8 Flags; + UINT8 Enabled; + UINT32 NumberOfRecordsToPreAllocate; + UINT32 MaxSectionsPerRecord; + UINT32 MaxRawDataLength; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE ErrorStatusAddress; + EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; + UINT32 ErrorStatusBlockLength; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE ReadAckRegister; + UINT64 ReadAckPreserve; + UINT64 ReadAckWrite; } EFI_ACPI_6_4_GENERIC_HARDWARE_ERROR_SOURCE_VERSION_2_STRUCTURE; /// /// Generic Error Status Definition /// typedef struct { - EFI_ACPI_6_4_ERROR_BLOCK_STATUS BlockStatus; - UINT32 RawDataOffset; - UINT32 RawDataLength; - UINT32 DataLength; - UINT32 ErrorSeverity; + EFI_ACPI_6_4_ERROR_BLOCK_STATUS BlockStatus; + UINT32 RawDataOffset; + UINT32 RawDataLength; + UINT32 DataLength; + UINT32 ErrorSeverity; } EFI_ACPI_6_4_GENERIC_ERROR_STATUS_STRUCTURE; /// @@ -2084,299 +2084,299 @@ typedef struct { EFI_ACPI_6_4_HARDWARE_ERROR_NOTIFICATION_STRUCTURE NotificationStructure; UINT8 NumberOfHardwareBanks; UINT8 Reserved1[3]; -} EFI_ACPI_6_4_IA32_ARCHITECTURE_DEFERRED_MACHINE_CHECK_STRUCTURE;; +} EFI_ACPI_6_4_IA32_ARCHITECTURE_DEFERRED_MACHINE_CHECK_STRUCTURE; /// /// HMAT - Heterogeneous Memory Attribute Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 Reserved[4]; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 Reserved[4]; } EFI_ACPI_6_4_HETEROGENEOUS_MEMORY_ATTRIBUTE_TABLE_HEADER; /// /// HMAT Revision (as defined in ACPI 6.4 spec.) /// -#define EFI_ACPI_6_4_HETEROGENEOUS_MEMORY_ATTRIBUTE_TABLE_REVISION 0x02 +#define EFI_ACPI_6_4_HETEROGENEOUS_MEMORY_ATTRIBUTE_TABLE_REVISION 0x02 /// /// HMAT types /// -#define EFI_ACPI_6_4_HMAT_TYPE_MEMORY_PROXIMITY_DOMAIN_ATTRIBUTES 0x00 -#define EFI_ACPI_6_4_HMAT_TYPE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO 0x01 -#define EFI_ACPI_6_4_HMAT_TYPE_MEMORY_SIDE_CACHE_INFO 0x02 +#define EFI_ACPI_6_4_HMAT_TYPE_MEMORY_PROXIMITY_DOMAIN_ATTRIBUTES 0x00 +#define EFI_ACPI_6_4_HMAT_TYPE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO 0x01 +#define EFI_ACPI_6_4_HMAT_TYPE_MEMORY_SIDE_CACHE_INFO 0x02 /// /// HMAT Structure Header /// typedef struct { - UINT16 Type; - UINT8 Reserved[2]; - UINT32 Length; + UINT16 Type; + UINT8 Reserved[2]; + UINT32 Length; } EFI_ACPI_6_4_HMAT_STRUCTURE_HEADER; /// /// Memory Proximity Domain Attributes Structure flags /// typedef struct { - UINT16 InitiatorProximityDomainValid:1; - UINT16 Reserved:15; + UINT16 InitiatorProximityDomainValid : 1; + UINT16 Reserved : 15; } EFI_ACPI_6_4_HMAT_STRUCTURE_MEMORY_PROXIMITY_DOMAIN_ATTRIBUTES_FLAGS; /// /// Memory Proximity Domain Attributes Structure /// typedef struct { - UINT16 Type; - UINT8 Reserved[2]; - UINT32 Length; - EFI_ACPI_6_4_HMAT_STRUCTURE_MEMORY_PROXIMITY_DOMAIN_ATTRIBUTES_FLAGS Flags; - UINT8 Reserved1[2]; - UINT32 InitiatorProximityDomain; - UINT32 MemoryProximityDomain; - UINT8 Reserved2[20]; + UINT16 Type; + UINT8 Reserved[2]; + UINT32 Length; + EFI_ACPI_6_4_HMAT_STRUCTURE_MEMORY_PROXIMITY_DOMAIN_ATTRIBUTES_FLAGS Flags; + UINT8 Reserved1[2]; + UINT32 InitiatorProximityDomain; + UINT32 MemoryProximityDomain; + UINT8 Reserved2[20]; } EFI_ACPI_6_4_HMAT_STRUCTURE_MEMORY_PROXIMITY_DOMAIN_ATTRIBUTES; /// /// System Locality Latency and Bandwidth Information Structure flags /// typedef struct { - UINT8 MemoryHierarchy:4; - UINT8 AccessAttributes:2; - UINT8 Reserved:2; + UINT8 MemoryHierarchy : 4; + UINT8 AccessAttributes : 2; + UINT8 Reserved : 2; } EFI_ACPI_6_4_HMAT_STRUCTURE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO_FLAGS; /// /// System Locality Latency and Bandwidth Information Structure /// typedef struct { - UINT16 Type; - UINT8 Reserved[2]; - UINT32 Length; - EFI_ACPI_6_4_HMAT_STRUCTURE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO_FLAGS Flags; - UINT8 DataType; - UINT8 MinTransferSize; - UINT8 Reserved1; - UINT32 NumberOfInitiatorProximityDomains; - UINT32 NumberOfTargetProximityDomains; - UINT8 Reserved2[4]; - UINT64 EntryBaseUnit; + UINT16 Type; + UINT8 Reserved[2]; + UINT32 Length; + EFI_ACPI_6_4_HMAT_STRUCTURE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO_FLAGS Flags; + UINT8 DataType; + UINT8 MinTransferSize; + UINT8 Reserved1; + UINT32 NumberOfInitiatorProximityDomains; + UINT32 NumberOfTargetProximityDomains; + UINT8 Reserved2[4]; + UINT64 EntryBaseUnit; } EFI_ACPI_6_4_HMAT_STRUCTURE_SYSTEM_LOCALITY_LATENCY_AND_BANDWIDTH_INFO; /// /// Memory Side Cache Information Structure cache attributes /// typedef struct { - UINT32 TotalCacheLevels:4; - UINT32 CacheLevel:4; - UINT32 CacheAssociativity:4; - UINT32 WritePolicy:4; - UINT32 CacheLineSize:16; + UINT32 TotalCacheLevels : 4; + UINT32 CacheLevel : 4; + UINT32 CacheAssociativity : 4; + UINT32 WritePolicy : 4; + UINT32 CacheLineSize : 16; } EFI_ACPI_6_4_HMAT_STRUCTURE_MEMORY_SIDE_CACHE_INFO_CACHE_ATTRIBUTES; /// /// Memory Side Cache Information Structure /// typedef struct { - UINT16 Type; - UINT8 Reserved[2]; - UINT32 Length; - UINT32 MemoryProximityDomain; - UINT8 Reserved1[4]; - UINT64 MemorySideCacheSize; - EFI_ACPI_6_4_HMAT_STRUCTURE_MEMORY_SIDE_CACHE_INFO_CACHE_ATTRIBUTES CacheAttributes; - UINT8 Reserved2[2]; - UINT16 NumberOfSmbiosHandles; + UINT16 Type; + UINT8 Reserved[2]; + UINT32 Length; + UINT32 MemoryProximityDomain; + UINT8 Reserved1[4]; + UINT64 MemorySideCacheSize; + EFI_ACPI_6_4_HMAT_STRUCTURE_MEMORY_SIDE_CACHE_INFO_CACHE_ATTRIBUTES CacheAttributes; + UINT8 Reserved2[2]; + UINT16 NumberOfSmbiosHandles; } EFI_ACPI_6_4_HMAT_STRUCTURE_MEMORY_SIDE_CACHE_INFO; /// /// ERST - Error Record Serialization Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 SerializationHeaderSize; - UINT8 Reserved0[4]; - UINT32 InstructionEntryCount; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 SerializationHeaderSize; + UINT8 Reserved0[4]; + UINT32 InstructionEntryCount; } EFI_ACPI_6_4_ERROR_RECORD_SERIALIZATION_TABLE_HEADER; /// /// ERST Version (as defined in ACPI 6.4 spec.) /// -#define EFI_ACPI_6_4_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01 +#define EFI_ACPI_6_4_ERROR_RECORD_SERIALIZATION_TABLE_REVISION 0x01 /// /// ERST Serialization Actions /// -#define EFI_ACPI_6_4_ERST_BEGIN_WRITE_OPERATION 0x00 -#define EFI_ACPI_6_4_ERST_BEGIN_READ_OPERATION 0x01 -#define EFI_ACPI_6_4_ERST_BEGIN_CLEAR_OPERATION 0x02 -#define EFI_ACPI_6_4_ERST_END_OPERATION 0x03 -#define EFI_ACPI_6_4_ERST_SET_RECORD_OFFSET 0x04 -#define EFI_ACPI_6_4_ERST_EXECUTE_OPERATION 0x05 -#define EFI_ACPI_6_4_ERST_CHECK_BUSY_STATUS 0x06 -#define EFI_ACPI_6_4_ERST_GET_COMMAND_STATUS 0x07 -#define EFI_ACPI_6_4_ERST_GET_RECORD_IDENTIFIER 0x08 -#define EFI_ACPI_6_4_ERST_SET_RECORD_IDENTIFIER 0x09 -#define EFI_ACPI_6_4_ERST_GET_RECORD_COUNT 0x0A -#define EFI_ACPI_6_4_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B -#define EFI_ACPI_6_4_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D -#define EFI_ACPI_6_4_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E -#define EFI_ACPI_6_4_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F -#define EFI_ACPI_6_4_ERST_GET_EXECUTE_OPERATION_TIMINGS 0x10 +#define EFI_ACPI_6_4_ERST_BEGIN_WRITE_OPERATION 0x00 +#define EFI_ACPI_6_4_ERST_BEGIN_READ_OPERATION 0x01 +#define EFI_ACPI_6_4_ERST_BEGIN_CLEAR_OPERATION 0x02 +#define EFI_ACPI_6_4_ERST_END_OPERATION 0x03 +#define EFI_ACPI_6_4_ERST_SET_RECORD_OFFSET 0x04 +#define EFI_ACPI_6_4_ERST_EXECUTE_OPERATION 0x05 +#define EFI_ACPI_6_4_ERST_CHECK_BUSY_STATUS 0x06 +#define EFI_ACPI_6_4_ERST_GET_COMMAND_STATUS 0x07 +#define EFI_ACPI_6_4_ERST_GET_RECORD_IDENTIFIER 0x08 +#define EFI_ACPI_6_4_ERST_SET_RECORD_IDENTIFIER 0x09 +#define EFI_ACPI_6_4_ERST_GET_RECORD_COUNT 0x0A +#define EFI_ACPI_6_4_ERST_BEGIN_DUMMY_WRITE_OPERATION 0x0B +#define EFI_ACPI_6_4_ERST_GET_ERROR_LOG_ADDRESS_RANGE 0x0D +#define EFI_ACPI_6_4_ERST_GET_ERROR_LOG_ADDRESS_RANGE_LENGTH 0x0E +#define EFI_ACPI_6_4_ERST_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES 0x0F +#define EFI_ACPI_6_4_ERST_GET_EXECUTE_OPERATION_TIMINGS 0x10 /// /// ERST Action Command Status /// -#define EFI_ACPI_6_4_ERST_STATUS_SUCCESS 0x00 -#define EFI_ACPI_6_4_ERST_STATUS_NOT_ENOUGH_SPACE 0x01 -#define EFI_ACPI_6_4_ERST_STATUS_HARDWARE_NOT_AVAILABLE 0x02 -#define EFI_ACPI_6_4_ERST_STATUS_FAILED 0x03 -#define EFI_ACPI_6_4_ERST_STATUS_RECORD_STORE_EMPTY 0x04 -#define EFI_ACPI_6_4_ERST_STATUS_RECORD_NOT_FOUND 0x05 +#define EFI_ACPI_6_4_ERST_STATUS_SUCCESS 0x00 +#define EFI_ACPI_6_4_ERST_STATUS_NOT_ENOUGH_SPACE 0x01 +#define EFI_ACPI_6_4_ERST_STATUS_HARDWARE_NOT_AVAILABLE 0x02 +#define EFI_ACPI_6_4_ERST_STATUS_FAILED 0x03 +#define EFI_ACPI_6_4_ERST_STATUS_RECORD_STORE_EMPTY 0x04 +#define EFI_ACPI_6_4_ERST_STATUS_RECORD_NOT_FOUND 0x05 /// /// ERST Serialization Instructions /// -#define EFI_ACPI_6_4_ERST_READ_REGISTER 0x00 -#define EFI_ACPI_6_4_ERST_READ_REGISTER_VALUE 0x01 -#define EFI_ACPI_6_4_ERST_WRITE_REGISTER 0x02 -#define EFI_ACPI_6_4_ERST_WRITE_REGISTER_VALUE 0x03 -#define EFI_ACPI_6_4_ERST_NOOP 0x04 -#define EFI_ACPI_6_4_ERST_LOAD_VAR1 0x05 -#define EFI_ACPI_6_4_ERST_LOAD_VAR2 0x06 -#define EFI_ACPI_6_4_ERST_STORE_VAR1 0x07 -#define EFI_ACPI_6_4_ERST_ADD 0x08 -#define EFI_ACPI_6_4_ERST_SUBTRACT 0x09 -#define EFI_ACPI_6_4_ERST_ADD_VALUE 0x0A -#define EFI_ACPI_6_4_ERST_SUBTRACT_VALUE 0x0B -#define EFI_ACPI_6_4_ERST_STALL 0x0C -#define EFI_ACPI_6_4_ERST_STALL_WHILE_TRUE 0x0D -#define EFI_ACPI_6_4_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E -#define EFI_ACPI_6_4_ERST_GOTO 0x0F -#define EFI_ACPI_6_4_ERST_SET_SRC_ADDRESS_BASE 0x10 -#define EFI_ACPI_6_4_ERST_SET_DST_ADDRESS_BASE 0x11 -#define EFI_ACPI_6_4_ERST_MOVE_DATA 0x12 +#define EFI_ACPI_6_4_ERST_READ_REGISTER 0x00 +#define EFI_ACPI_6_4_ERST_READ_REGISTER_VALUE 0x01 +#define EFI_ACPI_6_4_ERST_WRITE_REGISTER 0x02 +#define EFI_ACPI_6_4_ERST_WRITE_REGISTER_VALUE 0x03 +#define EFI_ACPI_6_4_ERST_NOOP 0x04 +#define EFI_ACPI_6_4_ERST_LOAD_VAR1 0x05 +#define EFI_ACPI_6_4_ERST_LOAD_VAR2 0x06 +#define EFI_ACPI_6_4_ERST_STORE_VAR1 0x07 +#define EFI_ACPI_6_4_ERST_ADD 0x08 +#define EFI_ACPI_6_4_ERST_SUBTRACT 0x09 +#define EFI_ACPI_6_4_ERST_ADD_VALUE 0x0A +#define EFI_ACPI_6_4_ERST_SUBTRACT_VALUE 0x0B +#define EFI_ACPI_6_4_ERST_STALL 0x0C +#define EFI_ACPI_6_4_ERST_STALL_WHILE_TRUE 0x0D +#define EFI_ACPI_6_4_ERST_SKIP_NEXT_INSTRUCTION_IF_TRUE 0x0E +#define EFI_ACPI_6_4_ERST_GOTO 0x0F +#define EFI_ACPI_6_4_ERST_SET_SRC_ADDRESS_BASE 0x10 +#define EFI_ACPI_6_4_ERST_SET_DST_ADDRESS_BASE 0x11 +#define EFI_ACPI_6_4_ERST_MOVE_DATA 0x12 /// /// ERST Instruction Flags /// -#define EFI_ACPI_6_4_ERST_PRESERVE_REGISTER 0x01 +#define EFI_ACPI_6_4_ERST_PRESERVE_REGISTER 0x01 /// /// ERST Serialization Instruction Entry /// typedef struct { - UINT8 SerializationAction; - UINT8 Instruction; - UINT8 Flags; - UINT8 Reserved0; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE RegisterRegion; - UINT64 Value; - UINT64 Mask; + UINT8 SerializationAction; + UINT8 Instruction; + UINT8 Flags; + UINT8 Reserved0; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE RegisterRegion; + UINT64 Value; + UINT64 Mask; } EFI_ACPI_6_4_ERST_SERIALIZATION_INSTRUCTION_ENTRY; /// /// EINJ - Error Injection Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 InjectionHeaderSize; - UINT8 InjectionFlags; - UINT8 Reserved0[3]; - UINT32 InjectionEntryCount; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 InjectionHeaderSize; + UINT8 InjectionFlags; + UINT8 Reserved0[3]; + UINT32 InjectionEntryCount; } EFI_ACPI_6_4_ERROR_INJECTION_TABLE_HEADER; /// /// EINJ Version (as defined in ACPI 6.4 spec.) /// -#define EFI_ACPI_6_4_ERROR_INJECTION_TABLE_REVISION 0x01 +#define EFI_ACPI_6_4_ERROR_INJECTION_TABLE_REVISION 0x01 /// /// EINJ Error Injection Actions /// -#define EFI_ACPI_6_4_EINJ_BEGIN_INJECTION_OPERATION 0x00 -#define EFI_ACPI_6_4_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01 -#define EFI_ACPI_6_4_EINJ_SET_ERROR_TYPE 0x02 -#define EFI_ACPI_6_4_EINJ_GET_ERROR_TYPE 0x03 -#define EFI_ACPI_6_4_EINJ_END_OPERATION 0x04 -#define EFI_ACPI_6_4_EINJ_EXECUTE_OPERATION 0x05 -#define EFI_ACPI_6_4_EINJ_CHECK_BUSY_STATUS 0x06 -#define EFI_ACPI_6_4_EINJ_GET_COMMAND_STATUS 0x07 -#define EFI_ACPI_6_4_EINJ_TRIGGER_ERROR 0xFF +#define EFI_ACPI_6_4_EINJ_BEGIN_INJECTION_OPERATION 0x00 +#define EFI_ACPI_6_4_EINJ_GET_TRIGGER_ERROR_ACTION_TABLE 0x01 +#define EFI_ACPI_6_4_EINJ_SET_ERROR_TYPE 0x02 +#define EFI_ACPI_6_4_EINJ_GET_ERROR_TYPE 0x03 +#define EFI_ACPI_6_4_EINJ_END_OPERATION 0x04 +#define EFI_ACPI_6_4_EINJ_EXECUTE_OPERATION 0x05 +#define EFI_ACPI_6_4_EINJ_CHECK_BUSY_STATUS 0x06 +#define EFI_ACPI_6_4_EINJ_GET_COMMAND_STATUS 0x07 +#define EFI_ACPI_6_4_EINJ_TRIGGER_ERROR 0xFF /// /// EINJ Action Command Status /// -#define EFI_ACPI_6_4_EINJ_STATUS_SUCCESS 0x00 -#define EFI_ACPI_6_4_EINJ_STATUS_UNKNOWN_FAILURE 0x01 -#define EFI_ACPI_6_4_EINJ_STATUS_INVALID_ACCESS 0x02 +#define EFI_ACPI_6_4_EINJ_STATUS_SUCCESS 0x00 +#define EFI_ACPI_6_4_EINJ_STATUS_UNKNOWN_FAILURE 0x01 +#define EFI_ACPI_6_4_EINJ_STATUS_INVALID_ACCESS 0x02 /// /// EINJ Error Type Definition /// -#define EFI_ACPI_6_4_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0) -#define EFI_ACPI_6_4_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1) -#define EFI_ACPI_6_4_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2) -#define EFI_ACPI_6_4_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3) -#define EFI_ACPI_6_4_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4) -#define EFI_ACPI_6_4_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5) -#define EFI_ACPI_6_4_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6) -#define EFI_ACPI_6_4_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7) -#define EFI_ACPI_6_4_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8) -#define EFI_ACPI_6_4_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9) -#define EFI_ACPI_6_4_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10) -#define EFI_ACPI_6_4_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11) +#define EFI_ACPI_6_4_EINJ_ERROR_PROCESSOR_CORRECTABLE (1 << 0) +#define EFI_ACPI_6_4_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_NONFATAL (1 << 1) +#define EFI_ACPI_6_4_EINJ_ERROR_PROCESSOR_UNCORRECTABLE_FATAL (1 << 2) +#define EFI_ACPI_6_4_EINJ_ERROR_MEMORY_CORRECTABLE (1 << 3) +#define EFI_ACPI_6_4_EINJ_ERROR_MEMORY_UNCORRECTABLE_NONFATAL (1 << 4) +#define EFI_ACPI_6_4_EINJ_ERROR_MEMORY_UNCORRECTABLE_FATAL (1 << 5) +#define EFI_ACPI_6_4_EINJ_ERROR_PCI_EXPRESS_CORRECTABLE (1 << 6) +#define EFI_ACPI_6_4_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_NONFATAL (1 << 7) +#define EFI_ACPI_6_4_EINJ_ERROR_PCI_EXPRESS_UNCORRECTABLE_FATAL (1 << 8) +#define EFI_ACPI_6_4_EINJ_ERROR_PLATFORM_CORRECTABLE (1 << 9) +#define EFI_ACPI_6_4_EINJ_ERROR_PLATFORM_UNCORRECTABLE_NONFATAL (1 << 10) +#define EFI_ACPI_6_4_EINJ_ERROR_PLATFORM_UNCORRECTABLE_FATAL (1 << 11) /// /// EINJ Injection Instructions /// -#define EFI_ACPI_6_4_EINJ_READ_REGISTER 0x00 -#define EFI_ACPI_6_4_EINJ_READ_REGISTER_VALUE 0x01 -#define EFI_ACPI_6_4_EINJ_WRITE_REGISTER 0x02 -#define EFI_ACPI_6_4_EINJ_WRITE_REGISTER_VALUE 0x03 -#define EFI_ACPI_6_4_EINJ_NOOP 0x04 +#define EFI_ACPI_6_4_EINJ_READ_REGISTER 0x00 +#define EFI_ACPI_6_4_EINJ_READ_REGISTER_VALUE 0x01 +#define EFI_ACPI_6_4_EINJ_WRITE_REGISTER 0x02 +#define EFI_ACPI_6_4_EINJ_WRITE_REGISTER_VALUE 0x03 +#define EFI_ACPI_6_4_EINJ_NOOP 0x04 /// /// EINJ Instruction Flags /// -#define EFI_ACPI_6_4_EINJ_PRESERVE_REGISTER 0x01 +#define EFI_ACPI_6_4_EINJ_PRESERVE_REGISTER 0x01 /// /// EINJ Injection Instruction Entry /// typedef struct { - UINT8 InjectionAction; - UINT8 Instruction; - UINT8 Flags; - UINT8 Reserved0; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE RegisterRegion; - UINT64 Value; - UINT64 Mask; + UINT8 InjectionAction; + UINT8 Instruction; + UINT8 Flags; + UINT8 Reserved0; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE RegisterRegion; + UINT64 Value; + UINT64 Mask; } EFI_ACPI_6_4_EINJ_INJECTION_INSTRUCTION_ENTRY; /// /// EINJ Trigger Action Table /// typedef struct { - UINT32 HeaderSize; - UINT32 Revision; - UINT32 TableSize; - UINT32 EntryCount; + UINT32 HeaderSize; + UINT32 Revision; + UINT32 TableSize; + UINT32 EntryCount; } EFI_ACPI_6_4_EINJ_TRIGGER_ACTION_TABLE; /// /// Platform Communications Channel Table (PCCT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 Flags; - UINT64 Reserved; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 Flags; + UINT64 Reserved; } EFI_ACPI_6_4_PLATFORM_COMMUNICATION_CHANNEL_TABLE_HEADER; /// /// PCCT Version (as defined in ACPI 6.4 spec.) /// -#define EFI_ACPI_6_4_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION 0x02 +#define EFI_ACPI_6_4_PLATFORM_COMMUNICATION_CHANNEL_TABLE_REVISION 0x02 /// /// PCCT Global Flags @@ -2386,36 +2386,36 @@ typedef struct { // // PCCT Subspace type // -#define EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_GENERIC 0x00 -#define EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_1_HW_REDUCED_COMMUNICATIONS 0x01 -#define EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_2_HW_REDUCED_COMMUNICATIONS 0x02 -#define EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_3_EXTENDED_PCC 0x03 -#define EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC 0x04 -#define EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_5_HW_REGISTERS_COMMUNICATIONS 0x05 +#define EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_GENERIC 0x00 +#define EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_1_HW_REDUCED_COMMUNICATIONS 0x01 +#define EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_2_HW_REDUCED_COMMUNICATIONS 0x02 +#define EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_3_EXTENDED_PCC 0x03 +#define EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC 0x04 +#define EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_5_HW_REGISTERS_COMMUNICATIONS 0x05 /// /// PCC Subspace Structure Header /// typedef struct { - UINT8 Type; - UINT8 Length; + UINT8 Type; + UINT8 Length; } EFI_ACPI_6_4_PCCT_SUBSPACE_HEADER; /// /// Generic Communications Subspace Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[6]; - UINT64 BaseAddress; - UINT64 AddressLength; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; - UINT64 DoorbellPreserve; - UINT64 DoorbellWrite; - UINT32 NominalLatency; - UINT32 MaximumPeriodicAccessRate; - UINT16 MinimumRequestTurnaroundTime; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[6]; + UINT64 BaseAddress; + UINT64 AddressLength; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; + UINT64 DoorbellPreserve; + UINT64 DoorbellWrite; + UINT32 NominalLatency; + UINT32 MaximumPeriodicAccessRate; + UINT16 MinimumRequestTurnaroundTime; } EFI_ACPI_6_4_PCCT_SUBSPACE_GENERIC; /// @@ -2423,18 +2423,18 @@ typedef struct { /// typedef struct { - UINT8 Command; - UINT8 Reserved:7; - UINT8 NotifyOnCompletion:1; + UINT8 Command; + UINT8 Reserved : 7; + UINT8 NotifyOnCompletion : 1; } EFI_ACPI_6_4_PCCT_GENERIC_SHARED_MEMORY_REGION_COMMAND; typedef struct { - UINT8 CommandComplete:1; - UINT8 PlatformInterrupt:1; - UINT8 Error:1; - UINT8 PlatformNotification:1; - UINT8 Reserved:4; - UINT8 Reserved1; + UINT8 CommandComplete : 1; + UINT8 PlatformInterrupt : 1; + UINT8 Error : 1; + UINT8 PlatformNotification : 1; + UINT8 Reserved : 4; + UINT8 Reserved1; } EFI_ACPI_6_4_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS; typedef struct { @@ -2443,78 +2443,78 @@ typedef struct { EFI_ACPI_6_4_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS Status; } EFI_ACPI_6_4_PCCT_GENERIC_SHARED_MEMORY_REGION_HEADER; -#define EFI_ACPI_6_4_PCCT_SUBSPACE_PLATFORM_INTERRUPT_FLAGS_POLARITY BIT0 -#define EFI_ACPI_6_4_PCCT_SUBSPACE_PLATFORM_INTERRUPT_FLAGS_MODE BIT1 +#define EFI_ACPI_6_4_PCCT_SUBSPACE_PLATFORM_INTERRUPT_FLAGS_POLARITY BIT0 +#define EFI_ACPI_6_4_PCCT_SUBSPACE_PLATFORM_INTERRUPT_FLAGS_MODE BIT1 /// /// Type 1 HW-Reduced Communications Subspace Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 PlatformInterrupt; - UINT8 PlatformInterruptFlags; - UINT8 Reserved; - UINT64 BaseAddress; - UINT64 AddressLength; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; - UINT64 DoorbellPreserve; - UINT64 DoorbellWrite; - UINT32 NominalLatency; - UINT32 MaximumPeriodicAccessRate; - UINT16 MinimumRequestTurnaroundTime; + UINT8 Type; + UINT8 Length; + UINT32 PlatformInterrupt; + UINT8 PlatformInterruptFlags; + UINT8 Reserved; + UINT64 BaseAddress; + UINT64 AddressLength; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; + UINT64 DoorbellPreserve; + UINT64 DoorbellWrite; + UINT32 NominalLatency; + UINT32 MaximumPeriodicAccessRate; + UINT16 MinimumRequestTurnaroundTime; } EFI_ACPI_6_4_PCCT_SUBSPACE_1_HW_REDUCED_COMMUNICATIONS; /// /// Type 2 HW-Reduced Communications Subspace Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 PlatformInterrupt; - UINT8 PlatformInterruptFlags; - UINT8 Reserved; - UINT64 BaseAddress; - UINT64 AddressLength; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; - UINT64 DoorbellPreserve; - UINT64 DoorbellWrite; - UINT32 NominalLatency; - UINT32 MaximumPeriodicAccessRate; - UINT16 MinimumRequestTurnaroundTime; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE PlatformInterruptAckRegister; - UINT64 PlatformInterruptAckPreserve; - UINT64 PlatformInterruptAckWrite; + UINT8 Type; + UINT8 Length; + UINT32 PlatformInterrupt; + UINT8 PlatformInterruptFlags; + UINT8 Reserved; + UINT64 BaseAddress; + UINT64 AddressLength; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; + UINT64 DoorbellPreserve; + UINT64 DoorbellWrite; + UINT32 NominalLatency; + UINT32 MaximumPeriodicAccessRate; + UINT16 MinimumRequestTurnaroundTime; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE PlatformInterruptAckRegister; + UINT64 PlatformInterruptAckPreserve; + UINT64 PlatformInterruptAckWrite; } EFI_ACPI_6_4_PCCT_SUBSPACE_2_HW_REDUCED_COMMUNICATIONS; /// /// Type 3 Extended PCC Subspace Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT32 PlatformInterrupt; - UINT8 PlatformInterruptFlags; - UINT8 Reserved; - UINT64 BaseAddress; - UINT32 AddressLength; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; - UINT64 DoorbellPreserve; - UINT64 DoorbellWrite; - UINT32 NominalLatency; - UINT32 MaximumPeriodicAccessRate; - UINT32 MinimumRequestTurnaroundTime; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE PlatformInterruptAckRegister; - UINT64 PlatformInterruptAckPreserve; - UINT64 PlatformInterruptAckSet; - UINT8 Reserved1[8]; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE CommandCompleteCheckRegister; - UINT64 CommandCompleteCheckMask; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE CommandCompleteUpdateRegister; - UINT64 CommandCompleteUpdatePreserve; - UINT64 CommandCompleteUpdateSet; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE ErrorStatusRegister; - UINT64 ErrorStatusMask; + UINT8 Type; + UINT8 Length; + UINT32 PlatformInterrupt; + UINT8 PlatformInterruptFlags; + UINT8 Reserved; + UINT64 BaseAddress; + UINT32 AddressLength; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; + UINT64 DoorbellPreserve; + UINT64 DoorbellWrite; + UINT32 NominalLatency; + UINT32 MaximumPeriodicAccessRate; + UINT32 MinimumRequestTurnaroundTime; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE PlatformInterruptAckRegister; + UINT64 PlatformInterruptAckPreserve; + UINT64 PlatformInterruptAckSet; + UINT8 Reserved1[8]; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE CommandCompleteCheckRegister; + UINT64 CommandCompleteCheckMask; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE CommandCompleteUpdateRegister; + UINT64 CommandCompleteUpdatePreserve; + UINT64 CommandCompleteUpdateSet; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE ErrorStatusRegister; + UINT64 ErrorStatusMask; } EFI_ACPI_6_4_PCCT_SUBSPACE_3_EXTENDED_PCC; /// @@ -2522,74 +2522,74 @@ typedef struct { /// typedef EFI_ACPI_6_4_PCCT_SUBSPACE_3_EXTENDED_PCC EFI_ACPI_6_4_PCCT_SUBSPACE_4_EXTENDED_PCC; -#define EFI_ACPI_6_4_PCCT_MASTER_SLAVE_COMMUNICATIONS_CHANNEL_FLAGS_NOTIFY_ON_COMPLETION BIT0 +#define EFI_ACPI_6_4_PCCT_MASTER_SLAVE_COMMUNICATIONS_CHANNEL_FLAGS_NOTIFY_ON_COMPLETION BIT0 typedef struct { - UINT32 Signature; - UINT32 Flags; - UINT32 Length; - UINT32 Command; + UINT32 Signature; + UINT32 Flags; + UINT32 Length; + UINT32 Command; } EFI_ACPI_6_4_PCCT_EXTENDED_PCC_SHARED_MEMORY_REGION_HEADER; /// /// Type 5 HW Registers based Communications Subspace Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Version; - UINT64 BaseAddress; - UINT64 SharedMemoryRangeLength; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; - UINT64 DoorbellPreserve; - UINT64 DoorbellWrite; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE CommandCompleteCheckRegister; - UINT64 CommandCompleteCheckMask; - EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE ErrorStatusRegister; - UINT64 ErrorStatusMask; - UINT32 NominalLatency; - UINT32 MinimumRequestTurnaroundTime; + UINT8 Type; + UINT8 Length; + UINT16 Version; + UINT64 BaseAddress; + UINT64 SharedMemoryRangeLength; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE DoorbellRegister; + UINT64 DoorbellPreserve; + UINT64 DoorbellWrite; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE CommandCompleteCheckRegister; + UINT64 CommandCompleteCheckMask; + EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE ErrorStatusRegister; + UINT64 ErrorStatusMask; + UINT32 NominalLatency; + UINT32 MinimumRequestTurnaroundTime; } EFI_ACPI_6_4_PCCT_SUBSPACE_5_HW_REGISTERS_COMMUNICATIONS; /// /// Reduced PCC Subspace Shared Memory Region /// typedef struct { - UINT32 Signature; -//UINT8 CommunicationSubspace[]; + UINT32 Signature; + // UINT8 CommunicationSubspace[]; } EFI_6_4_PCCT_REDUCED_PCC_SUBSPACE_SHARED_MEMORY_REGION; /// /// Platform Debug Trigger Table (PDTT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 TriggerCount; - UINT8 Reserved[3]; - UINT32 TriggerIdentifierArrayOffset; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 TriggerCount; + UINT8 Reserved[3]; + UINT32 TriggerIdentifierArrayOffset; } EFI_ACPI_6_4_PLATFORM_DEBUG_TRIGGER_TABLE_HEADER; /// /// PDTT Revision (as defined in ACPI 6.4 spec.) /// -#define EFI_ACPI_6_4_PLATFORM_DEBUG_TRIGGER_TABLE_REVISION 0x00 +#define EFI_ACPI_6_4_PLATFORM_DEBUG_TRIGGER_TABLE_REVISION 0x00 /// /// PDTT Platform Communication Channel Identifier Structure /// typedef struct { - UINT16 SubChannelIdentifer:8; - UINT16 Runtime:1; - UINT16 WaitForCompletion:1; - UINT16 TriggerOrder:1; - UINT16 Reserved:5; + UINT16 SubChannelIdentifer : 8; + UINT16 Runtime : 1; + UINT16 WaitForCompletion : 1; + UINT16 TriggerOrder : 1; + UINT16 Reserved : 5; } EFI_ACPI_6_4_PDTT_PCC_IDENTIFIER; /// /// PCC Commands Codes used by Platform Debug Trigger Table /// -#define EFI_ACPI_6_4_PDTT_PCC_COMMAND_DOORBELL_ONLY 0x00 -#define EFI_ACPI_6_4_PDTT_PCC_COMMAND_VENDOR_SPECIFIC 0x01 +#define EFI_ACPI_6_4_PDTT_PCC_COMMAND_DOORBELL_ONLY 0x00 +#define EFI_ACPI_6_4_PDTT_PCC_COMMAND_VENDOR_SPECIFIC 0x01 /// /// PDTT Platform Communication Channel @@ -2600,28 +2600,28 @@ typedef EFI_ACPI_6_4_PCCT_GENERIC_SHARED_MEMORY_REGION_HEADER EFI_ACPI_6_4_PDTT_ /// Processor Properties Topology Table (PPTT) /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_DESCRIPTION_HEADER Header; } EFI_ACPI_6_4_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_HEADER; /// /// PPTT Revision (as defined in ACPI 6.4 spec.) /// -#define EFI_ACPI_6_4_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_REVISION 0x03 +#define EFI_ACPI_6_4_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_REVISION 0x03 /// /// PPTT types /// -#define EFI_ACPI_6_4_PPTT_TYPE_PROCESSOR 0x00 -#define EFI_ACPI_6_4_PPTT_TYPE_CACHE 0x01 -#define EFI_ACPI_6_4_PPTT_TYPE_ID 0x02 +#define EFI_ACPI_6_4_PPTT_TYPE_PROCESSOR 0x00 +#define EFI_ACPI_6_4_PPTT_TYPE_CACHE 0x01 +#define EFI_ACPI_6_4_PPTT_TYPE_ID 0x02 /// /// PPTT Structure Header /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[2]; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[2]; } EFI_ACPI_6_4_PPTT_STRUCTURE_HEADER; /// @@ -2642,132 +2642,132 @@ typedef struct { /// Processor hierarchy node structure flags /// typedef struct { - UINT32 PhysicalPackage:1; - UINT32 AcpiProcessorIdValid:1; - UINT32 ProcessorIsAThread:1; - UINT32 NodeIsALeaf:1; - UINT32 IdenticalImplementation:1; - UINT32 Reserved:27; + UINT32 PhysicalPackage : 1; + UINT32 AcpiProcessorIdValid : 1; + UINT32 ProcessorIsAThread : 1; + UINT32 NodeIsALeaf : 1; + UINT32 IdenticalImplementation : 1; + UINT32 Reserved : 27; } EFI_ACPI_6_4_PPTT_STRUCTURE_PROCESSOR_FLAGS; /// /// Processor hierarchy node structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[2]; - EFI_ACPI_6_4_PPTT_STRUCTURE_PROCESSOR_FLAGS Flags; - UINT32 Parent; - UINT32 AcpiProcessorId; - UINT32 NumberOfPrivateResources; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[2]; + EFI_ACPI_6_4_PPTT_STRUCTURE_PROCESSOR_FLAGS Flags; + UINT32 Parent; + UINT32 AcpiProcessorId; + UINT32 NumberOfPrivateResources; } EFI_ACPI_6_4_PPTT_STRUCTURE_PROCESSOR; /// /// For PPTT struct cache flags /// -#define EFI_ACPI_6_4_PPTT_CACHE_SIZE_INVALID 0x0 -#define EFI_ACPI_6_4_PPTT_CACHE_SIZE_VALID 0x1 -#define EFI_ACPI_6_4_PPTT_NUMBER_OF_SETS_INVALID 0x0 -#define EFI_ACPI_6_4_PPTT_NUMBER_OF_SETS_VALID 0x1 -#define EFI_ACPI_6_4_PPTT_ASSOCIATIVITY_INVALID 0x0 -#define EFI_ACPI_6_4_PPTT_ASSOCIATIVITY_VALID 0x1 -#define EFI_ACPI_6_4_PPTT_ALLOCATION_TYPE_INVALID 0x0 -#define EFI_ACPI_6_4_PPTT_ALLOCATION_TYPE_VALID 0x1 -#define EFI_ACPI_6_4_PPTT_CACHE_TYPE_INVALID 0x0 -#define EFI_ACPI_6_4_PPTT_CACHE_TYPE_VALID 0x1 -#define EFI_ACPI_6_4_PPTT_WRITE_POLICY_INVALID 0x0 -#define EFI_ACPI_6_4_PPTT_WRITE_POLICY_VALID 0x1 -#define EFI_ACPI_6_4_PPTT_LINE_SIZE_INVALID 0x0 -#define EFI_ACPI_6_4_PPTT_LINE_SIZE_VALID 0x1 +#define EFI_ACPI_6_4_PPTT_CACHE_SIZE_INVALID 0x0 +#define EFI_ACPI_6_4_PPTT_CACHE_SIZE_VALID 0x1 +#define EFI_ACPI_6_4_PPTT_NUMBER_OF_SETS_INVALID 0x0 +#define EFI_ACPI_6_4_PPTT_NUMBER_OF_SETS_VALID 0x1 +#define EFI_ACPI_6_4_PPTT_ASSOCIATIVITY_INVALID 0x0 +#define EFI_ACPI_6_4_PPTT_ASSOCIATIVITY_VALID 0x1 +#define EFI_ACPI_6_4_PPTT_ALLOCATION_TYPE_INVALID 0x0 +#define EFI_ACPI_6_4_PPTT_ALLOCATION_TYPE_VALID 0x1 +#define EFI_ACPI_6_4_PPTT_CACHE_TYPE_INVALID 0x0 +#define EFI_ACPI_6_4_PPTT_CACHE_TYPE_VALID 0x1 +#define EFI_ACPI_6_4_PPTT_WRITE_POLICY_INVALID 0x0 +#define EFI_ACPI_6_4_PPTT_WRITE_POLICY_VALID 0x1 +#define EFI_ACPI_6_4_PPTT_LINE_SIZE_INVALID 0x0 +#define EFI_ACPI_6_4_PPTT_LINE_SIZE_VALID 0x1 /// /// Cache Type Structure flags /// typedef struct { - UINT32 SizePropertyValid:1; - UINT32 NumberOfSetsValid:1; - UINT32 AssociativityValid:1; - UINT32 AllocationTypeValid:1; - UINT32 CacheTypeValid:1; - UINT32 WritePolicyValid:1; - UINT32 LineSizeValid:1; - UINT32 CacheIdValid:1; - UINT32 Reserved:24; + UINT32 SizePropertyValid : 1; + UINT32 NumberOfSetsValid : 1; + UINT32 AssociativityValid : 1; + UINT32 AllocationTypeValid : 1; + UINT32 CacheTypeValid : 1; + UINT32 WritePolicyValid : 1; + UINT32 LineSizeValid : 1; + UINT32 CacheIdValid : 1; + UINT32 Reserved : 24; } EFI_ACPI_6_4_PPTT_STRUCTURE_CACHE_FLAGS; /// /// For cache attributes /// -#define EFI_ACPI_6_4_CACHE_ATTRIBUTES_ALLOCATION_READ 0x0 -#define EFI_ACPI_6_4_CACHE_ATTRIBUTES_ALLOCATION_WRITE 0x1 -#define EFI_ACPI_6_4_CACHE_ATTRIBUTES_ALLOCATION_READ_WRITE 0x2 -#define EFI_ACPI_6_4_CACHE_ATTRIBUTES_CACHE_TYPE_DATA 0x0 -#define EFI_ACPI_6_4_CACHE_ATTRIBUTES_CACHE_TYPE_INSTRUCTION 0x1 -#define EFI_ACPI_6_4_CACHE_ATTRIBUTES_CACHE_TYPE_UNIFIED 0x2 -#define EFI_ACPI_6_4_CACHE_ATTRIBUTES_WRITE_POLICY_WRITE_BACK 0x0 -#define EFI_ACPI_6_4_CACHE_ATTRIBUTES_WRITE_POLICY_WRITE_THROUGH 0x1 +#define EFI_ACPI_6_4_CACHE_ATTRIBUTES_ALLOCATION_READ 0x0 +#define EFI_ACPI_6_4_CACHE_ATTRIBUTES_ALLOCATION_WRITE 0x1 +#define EFI_ACPI_6_4_CACHE_ATTRIBUTES_ALLOCATION_READ_WRITE 0x2 +#define EFI_ACPI_6_4_CACHE_ATTRIBUTES_CACHE_TYPE_DATA 0x0 +#define EFI_ACPI_6_4_CACHE_ATTRIBUTES_CACHE_TYPE_INSTRUCTION 0x1 +#define EFI_ACPI_6_4_CACHE_ATTRIBUTES_CACHE_TYPE_UNIFIED 0x2 +#define EFI_ACPI_6_4_CACHE_ATTRIBUTES_WRITE_POLICY_WRITE_BACK 0x0 +#define EFI_ACPI_6_4_CACHE_ATTRIBUTES_WRITE_POLICY_WRITE_THROUGH 0x1 /// /// Cache Type Structure cache attributes /// typedef struct { - UINT8 AllocationType:2; - UINT8 CacheType:2; - UINT8 WritePolicy:1; - UINT8 Reserved:3; + UINT8 AllocationType : 2; + UINT8 CacheType : 2; + UINT8 WritePolicy : 1; + UINT8 Reserved : 3; } EFI_ACPI_6_4_PPTT_STRUCTURE_CACHE_ATTRIBUTES; /// /// Cache Type Structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[2]; - EFI_ACPI_6_4_PPTT_STRUCTURE_CACHE_FLAGS Flags; - UINT32 NextLevelOfCache; - UINT32 Size; - UINT32 NumberOfSets; - UINT8 Associativity; - EFI_ACPI_6_4_PPTT_STRUCTURE_CACHE_ATTRIBUTES Attributes; - UINT16 LineSize; - UINT32 CacheId; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[2]; + EFI_ACPI_6_4_PPTT_STRUCTURE_CACHE_FLAGS Flags; + UINT32 NextLevelOfCache; + UINT32 Size; + UINT32 NumberOfSets; + UINT8 Associativity; + EFI_ACPI_6_4_PPTT_STRUCTURE_CACHE_ATTRIBUTES Attributes; + UINT16 LineSize; + UINT32 CacheId; } EFI_ACPI_6_4_PPTT_STRUCTURE_CACHE; /// /// ID structure /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT8 Reserved[2]; - UINT32 VendorId; - UINT64 Level1Id; - UINT64 Level2Id; - UINT16 MajorRev; - UINT16 MinorRev; - UINT16 SpinRev; + UINT8 Type; + UINT8 Length; + UINT8 Reserved[2]; + UINT32 VendorId; + UINT64 Level1Id; + UINT64 Level2Id; + UINT16 MajorRev; + UINT16 MinorRev; + UINT16 SpinRev; } EFI_ACPI_6_4_PPTT_STRUCTURE_ID; /// /// Platform Health Assessment Table (PHAT) Format /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; -//UINT8 PlatformTelemetryRecords[]; + EFI_ACPI_DESCRIPTION_HEADER Header; + // UINT8 PlatformTelemetryRecords[]; } EFI_ACPI_6_4_PLATFORM_HEALTH_ASSESSMENT_TABLE; -#define EFI_ACPI_6_4_PLATFORM_HEALTH_ASSESSMENT_TABLE_REVISION 0x01 +#define EFI_ACPI_6_4_PLATFORM_HEALTH_ASSESSMENT_TABLE_REVISION 0x01 /// /// PHAT Record Format /// typedef struct { - UINT16 PlatformHealthAssessmentRecordType; - UINT16 RecordLength; - UINT8 Revision; -//UINT8 Data[]; + UINT16 PlatformHealthAssessmentRecordType; + UINT16 RecordLength; + UINT8 Revision; + // UINT8 Data[]; } EFI_ACPI_6_4_PHAT_RECORD; /// @@ -2780,38 +2780,38 @@ typedef struct { /// PHAT Version Element /// typedef struct { - GUID ComponentId; - UINT64 VersionValue; - UINT32 ProducerId; + GUID ComponentId; + UINT64 VersionValue; + UINT32 ProducerId; } EFI_ACPI_6_4_PHAT_VERSION_ELEMENT; /// /// PHAT Firmware Version Data Record /// typedef struct { - UINT16 PlatformRecordType; - UINT16 RecordLength; - UINT8 Revision; - UINT8 Reserved[3]; - UINT32 RecordCount; -//UINT8 PhatVersionElement[]; + UINT16 PlatformRecordType; + UINT16 RecordLength; + UINT8 Revision; + UINT8 Reserved[3]; + UINT32 RecordCount; + // UINT8 PhatVersionElement[]; } EFI_ACPI_6_4_PHAT_FIRMWARE_VERISON_DATA_RECORD; -#define EFI_ACPI_6_4_PHAT_FIRMWARE_VERSION_DATA_RECORD_REVISION 0x01 +#define EFI_ACPI_6_4_PHAT_FIRMWARE_VERSION_DATA_RECORD_REVISION 0x01 /// /// Firmware Health Data Record Structure /// typedef struct { - UINT16 PlatformRecordType; - UINT16 RecordLength; - UINT8 Revision; - UINT16 Reserved; - UINT8 AmHealthy; - GUID DeviceSignature; - UINT32 DeviceSpecificDataOffset; -//UINT8 DevicePath[]; -//UINT8 DeviceSpecificData[]; + UINT16 PlatformRecordType; + UINT16 RecordLength; + UINT8 Revision; + UINT16 Reserved; + UINT8 AmHealthy; + GUID DeviceSignature; + UINT32 DeviceSpecificDataOffset; + // UINT8 DevicePath[]; + // UINT8 DeviceSpecificData[]; } EFI_ACPI_6_4_PHAT_FIRMWARE_HEALTH_DATA_RECORD_STRUCTURE; #define EFI_ACPI_6_4_PHAT_FIRMWARE_HEALTH_DATA_RECORD_REVISION 0x01 @@ -2819,10 +2819,10 @@ typedef struct { /// /// Firmware Health Data Record device health state /// -#define EFI_ACPI_6_4_PHAT_FIRMWARE_HEALTH_DATA_RECORD_ERRORS_FOUND 0x00 -#define EFI_ACPI_6_4_PHAT_FIRMWARE_HEALTH_DATA_RECORD_NO_ERRORS_FOUND 0x01 -#define EFI_ACPI_6_4_PHAT_FIRMWARE_HEALTH_DATA_RECORD_UNKNOWN 0x02 -#define EFI_ACPI_6_4_PHAT_FIRMWARE_HEALTH_DATA_RECORD_ADVISORY 0x03 +#define EFI_ACPI_6_4_PHAT_FIRMWARE_HEALTH_DATA_RECORD_ERRORS_FOUND 0x00 +#define EFI_ACPI_6_4_PHAT_FIRMWARE_HEALTH_DATA_RECORD_NO_ERRORS_FOUND 0x01 +#define EFI_ACPI_6_4_PHAT_FIRMWARE_HEALTH_DATA_RECORD_UNKNOWN 0x02 +#define EFI_ACPI_6_4_PHAT_FIRMWARE_HEALTH_DATA_RECORD_ADVISORY 0x03 // // Known table signatures @@ -3071,7 +3071,7 @@ typedef struct { /// /// "PHAT" Platform Health Assessment Table /// -#define EFI_ACPI_6_4_PLATFORM_HEALTH_ASSESSMENT_TABLE_SIGNATURE SIGNATURE_32('P', 'H', 'A', 'T') +#define EFI_ACPI_6_4_PLATFORM_HEALTH_ASSESSMENT_TABLE_SIGNATURE SIGNATURE_32('P', 'H', 'A', 'T') /// /// "SDEI" Software Delegated Exceptions Interface Table diff --git a/MdePkg/Include/IndustryStandard/AcpiAml.h b/MdePkg/Include/IndustryStandard/AcpiAml.h index 4255ca3..157978f 100644 --- a/MdePkg/Include/IndustryStandard/AcpiAml.h +++ b/MdePkg/Include/IndustryStandard/AcpiAml.h @@ -17,168 +17,168 @@ // // Primary OpCode // -#define AML_ZERO_OP 0x00 -#define AML_ONE_OP 0x01 -#define AML_ALIAS_OP 0x06 -#define AML_NAME_OP 0x08 -#define AML_BYTE_PREFIX 0x0a -#define AML_WORD_PREFIX 0x0b -#define AML_DWORD_PREFIX 0x0c -#define AML_STRING_PREFIX 0x0d -#define AML_QWORD_PREFIX 0x0e -#define AML_SCOPE_OP 0x10 -#define AML_BUFFER_OP 0x11 -#define AML_PACKAGE_OP 0x12 -#define AML_VAR_PACKAGE_OP 0x13 -#define AML_METHOD_OP 0x14 -#define AML_EXTERNAL_OP 0x15 -#define AML_DUAL_NAME_PREFIX 0x2e -#define AML_MULTI_NAME_PREFIX 0x2f -#define AML_NAME_CHAR_A 0x41 -#define AML_NAME_CHAR_B 0x42 -#define AML_NAME_CHAR_C 0x43 -#define AML_NAME_CHAR_D 0x44 -#define AML_NAME_CHAR_E 0x45 -#define AML_NAME_CHAR_F 0x46 -#define AML_NAME_CHAR_G 0x47 -#define AML_NAME_CHAR_H 0x48 -#define AML_NAME_CHAR_I 0x49 -#define AML_NAME_CHAR_J 0x4a -#define AML_NAME_CHAR_K 0x4b -#define AML_NAME_CHAR_L 0x4c -#define AML_NAME_CHAR_M 0x4d -#define AML_NAME_CHAR_N 0x4e -#define AML_NAME_CHAR_O 0x4f -#define AML_NAME_CHAR_P 0x50 -#define AML_NAME_CHAR_Q 0x51 -#define AML_NAME_CHAR_R 0x52 -#define AML_NAME_CHAR_S 0x53 -#define AML_NAME_CHAR_T 0x54 -#define AML_NAME_CHAR_U 0x55 -#define AML_NAME_CHAR_V 0x56 -#define AML_NAME_CHAR_W 0x57 -#define AML_NAME_CHAR_X 0x58 -#define AML_NAME_CHAR_Y 0x59 -#define AML_NAME_CHAR_Z 0x5a -#define AML_ROOT_CHAR 0x5c -#define AML_PARENT_PREFIX_CHAR 0x5e -#define AML_NAME_CHAR__ 0x5f -#define AML_LOCAL0 0x60 -#define AML_LOCAL1 0x61 -#define AML_LOCAL2 0x62 -#define AML_LOCAL3 0x63 -#define AML_LOCAL4 0x64 -#define AML_LOCAL5 0x65 -#define AML_LOCAL6 0x66 -#define AML_LOCAL7 0x67 -#define AML_ARG0 0x68 -#define AML_ARG1 0x69 -#define AML_ARG2 0x6a -#define AML_ARG3 0x6b -#define AML_ARG4 0x6c -#define AML_ARG5 0x6d -#define AML_ARG6 0x6e -#define AML_STORE_OP 0x70 -#define AML_REF_OF_OP 0x71 -#define AML_ADD_OP 0x72 -#define AML_CONCAT_OP 0x73 -#define AML_SUBTRACT_OP 0x74 -#define AML_INCREMENT_OP 0x75 -#define AML_DECREMENT_OP 0x76 -#define AML_MULTIPLY_OP 0x77 -#define AML_DIVIDE_OP 0x78 -#define AML_SHIFT_LEFT_OP 0x79 -#define AML_SHIFT_RIGHT_OP 0x7a -#define AML_AND_OP 0x7b -#define AML_NAND_OP 0x7c -#define AML_OR_OP 0x7d -#define AML_NOR_OP 0x7e -#define AML_XOR_OP 0x7f -#define AML_NOT_OP 0x80 -#define AML_FIND_SET_LEFT_BIT_OP 0x81 -#define AML_FIND_SET_RIGHT_BIT_OP 0x82 -#define AML_DEREF_OF_OP 0x83 -#define AML_CONCAT_RES_OP 0x84 -#define AML_MOD_OP 0x85 -#define AML_NOTIFY_OP 0x86 -#define AML_SIZE_OF_OP 0x87 -#define AML_INDEX_OP 0x88 -#define AML_MATCH_OP 0x89 -#define AML_CREATE_DWORD_FIELD_OP 0x8a -#define AML_CREATE_WORD_FIELD_OP 0x8b -#define AML_CREATE_BYTE_FIELD_OP 0x8c -#define AML_CREATE_BIT_FIELD_OP 0x8d -#define AML_OBJECT_TYPE_OP 0x8e -#define AML_CREATE_QWORD_FIELD_OP 0x8f -#define AML_LAND_OP 0x90 -#define AML_LOR_OP 0x91 -#define AML_LNOT_OP 0x92 -#define AML_LEQUAL_OP 0x93 -#define AML_LGREATER_OP 0x94 -#define AML_LLESS_OP 0x95 -#define AML_TO_BUFFER_OP 0x96 -#define AML_TO_DEC_STRING_OP 0x97 -#define AML_TO_HEX_STRING_OP 0x98 -#define AML_TO_INTEGER_OP 0x99 -#define AML_TO_STRING_OP 0x9c -#define AML_COPY_OBJECT_OP 0x9d -#define AML_MID_OP 0x9e -#define AML_CONTINUE_OP 0x9f -#define AML_IF_OP 0xa0 -#define AML_ELSE_OP 0xa1 -#define AML_WHILE_OP 0xa2 -#define AML_NOOP_OP 0xa3 -#define AML_RETURN_OP 0xa4 -#define AML_BREAK_OP 0xa5 -#define AML_BREAK_POINT_OP 0xcc -#define AML_ONES_OP 0xff +#define AML_ZERO_OP 0x00 +#define AML_ONE_OP 0x01 +#define AML_ALIAS_OP 0x06 +#define AML_NAME_OP 0x08 +#define AML_BYTE_PREFIX 0x0a +#define AML_WORD_PREFIX 0x0b +#define AML_DWORD_PREFIX 0x0c +#define AML_STRING_PREFIX 0x0d +#define AML_QWORD_PREFIX 0x0e +#define AML_SCOPE_OP 0x10 +#define AML_BUFFER_OP 0x11 +#define AML_PACKAGE_OP 0x12 +#define AML_VAR_PACKAGE_OP 0x13 +#define AML_METHOD_OP 0x14 +#define AML_EXTERNAL_OP 0x15 +#define AML_DUAL_NAME_PREFIX 0x2e +#define AML_MULTI_NAME_PREFIX 0x2f +#define AML_NAME_CHAR_A 0x41 +#define AML_NAME_CHAR_B 0x42 +#define AML_NAME_CHAR_C 0x43 +#define AML_NAME_CHAR_D 0x44 +#define AML_NAME_CHAR_E 0x45 +#define AML_NAME_CHAR_F 0x46 +#define AML_NAME_CHAR_G 0x47 +#define AML_NAME_CHAR_H 0x48 +#define AML_NAME_CHAR_I 0x49 +#define AML_NAME_CHAR_J 0x4a +#define AML_NAME_CHAR_K 0x4b +#define AML_NAME_CHAR_L 0x4c +#define AML_NAME_CHAR_M 0x4d +#define AML_NAME_CHAR_N 0x4e +#define AML_NAME_CHAR_O 0x4f +#define AML_NAME_CHAR_P 0x50 +#define AML_NAME_CHAR_Q 0x51 +#define AML_NAME_CHAR_R 0x52 +#define AML_NAME_CHAR_S 0x53 +#define AML_NAME_CHAR_T 0x54 +#define AML_NAME_CHAR_U 0x55 +#define AML_NAME_CHAR_V 0x56 +#define AML_NAME_CHAR_W 0x57 +#define AML_NAME_CHAR_X 0x58 +#define AML_NAME_CHAR_Y 0x59 +#define AML_NAME_CHAR_Z 0x5a +#define AML_ROOT_CHAR 0x5c +#define AML_PARENT_PREFIX_CHAR 0x5e +#define AML_NAME_CHAR__ 0x5f +#define AML_LOCAL0 0x60 +#define AML_LOCAL1 0x61 +#define AML_LOCAL2 0x62 +#define AML_LOCAL3 0x63 +#define AML_LOCAL4 0x64 +#define AML_LOCAL5 0x65 +#define AML_LOCAL6 0x66 +#define AML_LOCAL7 0x67 +#define AML_ARG0 0x68 +#define AML_ARG1 0x69 +#define AML_ARG2 0x6a +#define AML_ARG3 0x6b +#define AML_ARG4 0x6c +#define AML_ARG5 0x6d +#define AML_ARG6 0x6e +#define AML_STORE_OP 0x70 +#define AML_REF_OF_OP 0x71 +#define AML_ADD_OP 0x72 +#define AML_CONCAT_OP 0x73 +#define AML_SUBTRACT_OP 0x74 +#define AML_INCREMENT_OP 0x75 +#define AML_DECREMENT_OP 0x76 +#define AML_MULTIPLY_OP 0x77 +#define AML_DIVIDE_OP 0x78 +#define AML_SHIFT_LEFT_OP 0x79 +#define AML_SHIFT_RIGHT_OP 0x7a +#define AML_AND_OP 0x7b +#define AML_NAND_OP 0x7c +#define AML_OR_OP 0x7d +#define AML_NOR_OP 0x7e +#define AML_XOR_OP 0x7f +#define AML_NOT_OP 0x80 +#define AML_FIND_SET_LEFT_BIT_OP 0x81 +#define AML_FIND_SET_RIGHT_BIT_OP 0x82 +#define AML_DEREF_OF_OP 0x83 +#define AML_CONCAT_RES_OP 0x84 +#define AML_MOD_OP 0x85 +#define AML_NOTIFY_OP 0x86 +#define AML_SIZE_OF_OP 0x87 +#define AML_INDEX_OP 0x88 +#define AML_MATCH_OP 0x89 +#define AML_CREATE_DWORD_FIELD_OP 0x8a +#define AML_CREATE_WORD_FIELD_OP 0x8b +#define AML_CREATE_BYTE_FIELD_OP 0x8c +#define AML_CREATE_BIT_FIELD_OP 0x8d +#define AML_OBJECT_TYPE_OP 0x8e +#define AML_CREATE_QWORD_FIELD_OP 0x8f +#define AML_LAND_OP 0x90 +#define AML_LOR_OP 0x91 +#define AML_LNOT_OP 0x92 +#define AML_LEQUAL_OP 0x93 +#define AML_LGREATER_OP 0x94 +#define AML_LLESS_OP 0x95 +#define AML_TO_BUFFER_OP 0x96 +#define AML_TO_DEC_STRING_OP 0x97 +#define AML_TO_HEX_STRING_OP 0x98 +#define AML_TO_INTEGER_OP 0x99 +#define AML_TO_STRING_OP 0x9c +#define AML_COPY_OBJECT_OP 0x9d +#define AML_MID_OP 0x9e +#define AML_CONTINUE_OP 0x9f +#define AML_IF_OP 0xa0 +#define AML_ELSE_OP 0xa1 +#define AML_WHILE_OP 0xa2 +#define AML_NOOP_OP 0xa3 +#define AML_RETURN_OP 0xa4 +#define AML_BREAK_OP 0xa5 +#define AML_BREAK_POINT_OP 0xcc +#define AML_ONES_OP 0xff // // Extended OpCode // -#define AML_EXT_OP 0x5b +#define AML_EXT_OP 0x5b -#define AML_EXT_MUTEX_OP 0x01 -#define AML_EXT_EVENT_OP 0x02 -#define AML_EXT_COND_REF_OF_OP 0x12 -#define AML_EXT_CREATE_FIELD_OP 0x13 -#define AML_EXT_LOAD_TABLE_OP 0x1f -#define AML_EXT_LOAD_OP 0x20 -#define AML_EXT_STALL_OP 0x21 -#define AML_EXT_SLEEP_OP 0x22 -#define AML_EXT_ACQUIRE_OP 0x23 -#define AML_EXT_SIGNAL_OP 0x24 -#define AML_EXT_WAIT_OP 0x25 -#define AML_EXT_RESET_OP 0x26 -#define AML_EXT_RELEASE_OP 0x27 -#define AML_EXT_FROM_BCD_OP 0x28 -#define AML_EXT_TO_BCD_OP 0x29 -#define AML_EXT_UNLOAD_OP 0x2a -#define AML_EXT_REVISION_OP 0x30 -#define AML_EXT_DEBUG_OP 0x31 -#define AML_EXT_FATAL_OP 0x32 -#define AML_EXT_TIMER_OP 0x33 -#define AML_EXT_REGION_OP 0x80 -#define AML_EXT_FIELD_OP 0x81 -#define AML_EXT_DEVICE_OP 0x82 -#define AML_EXT_PROCESSOR_OP 0x83 -#define AML_EXT_POWER_RES_OP 0x84 -#define AML_EXT_THERMAL_ZONE_OP 0x85 -#define AML_EXT_INDEX_FIELD_OP 0x86 -#define AML_EXT_BANK_FIELD_OP 0x87 -#define AML_EXT_DATA_REGION_OP 0x88 +#define AML_EXT_MUTEX_OP 0x01 +#define AML_EXT_EVENT_OP 0x02 +#define AML_EXT_COND_REF_OF_OP 0x12 +#define AML_EXT_CREATE_FIELD_OP 0x13 +#define AML_EXT_LOAD_TABLE_OP 0x1f +#define AML_EXT_LOAD_OP 0x20 +#define AML_EXT_STALL_OP 0x21 +#define AML_EXT_SLEEP_OP 0x22 +#define AML_EXT_ACQUIRE_OP 0x23 +#define AML_EXT_SIGNAL_OP 0x24 +#define AML_EXT_WAIT_OP 0x25 +#define AML_EXT_RESET_OP 0x26 +#define AML_EXT_RELEASE_OP 0x27 +#define AML_EXT_FROM_BCD_OP 0x28 +#define AML_EXT_TO_BCD_OP 0x29 +#define AML_EXT_UNLOAD_OP 0x2a +#define AML_EXT_REVISION_OP 0x30 +#define AML_EXT_DEBUG_OP 0x31 +#define AML_EXT_FATAL_OP 0x32 +#define AML_EXT_TIMER_OP 0x33 +#define AML_EXT_REGION_OP 0x80 +#define AML_EXT_FIELD_OP 0x81 +#define AML_EXT_DEVICE_OP 0x82 +#define AML_EXT_PROCESSOR_OP 0x83 +#define AML_EXT_POWER_RES_OP 0x84 +#define AML_EXT_THERMAL_ZONE_OP 0x85 +#define AML_EXT_INDEX_FIELD_OP 0x86 +#define AML_EXT_BANK_FIELD_OP 0x87 +#define AML_EXT_DATA_REGION_OP 0x88 // // FieldElement OpCode // -#define AML_FIELD_RESERVED_OP 0x00 -#define AML_FIELD_ACCESS_OP 0x01 -#define AML_FIELD_CONNECTION_OP 0x02 -#define AML_FIELD_EXT_ACCESS_OP 0x03 +#define AML_FIELD_RESERVED_OP 0x00 +#define AML_FIELD_ACCESS_OP 0x01 +#define AML_FIELD_CONNECTION_OP 0x02 +#define AML_FIELD_EXT_ACCESS_OP 0x03 // // AML Name segment definitions // -#define AML_NAME_SEG_SIZE 4 +#define AML_NAME_SEG_SIZE 4 #endif diff --git a/MdePkg/Include/IndustryStandard/AlertStandardFormatTable.h b/MdePkg/Include/IndustryStandard/AlertStandardFormatTable.h index 4497586..ee1fbdc 100644 --- a/MdePkg/Include/IndustryStandard/AlertStandardFormatTable.h +++ b/MdePkg/Include/IndustryStandard/AlertStandardFormatTable.h @@ -19,9 +19,9 @@ /// Information Record header that appears at the beginning of each record /// typedef struct { - UINT8 Type; - UINT8 Reserved; - UINT16 RecordLength; + UINT8 Type; + UINT8 Reserved; + UINT16 RecordLength; } EFI_ACPI_ASF_RECORD_HEADER; /// @@ -29,42 +29,42 @@ typedef struct { /// and configuration /// typedef struct { - EFI_ACPI_ASF_RECORD_HEADER RecordHeader; - UINT8 MinWatchDogResetValue; - UINT8 MinPollingInterval; - UINT16 SystemID; - UINT32 IANAManufactureID; - UINT8 FeatureFlags; - UINT8 Reserved[3]; + EFI_ACPI_ASF_RECORD_HEADER RecordHeader; + UINT8 MinWatchDogResetValue; + UINT8 MinPollingInterval; + UINT16 SystemID; + UINT32 IANAManufactureID; + UINT8 FeatureFlags; + UINT8 Reserved[3]; } EFI_ACPI_ASF_INFO; /// /// ASF Alert Data /// typedef struct { - UINT8 DeviceAddress; - UINT8 Command; - UINT8 DataMask; - UINT8 CompareValue; - UINT8 EventSenseType; - UINT8 EventType; - UINT8 EventOffset; - UINT8 EventSourceType; - UINT8 EventSeverity; - UINT8 SensorNumber; - UINT8 Entity; - UINT8 EntityInstance; + UINT8 DeviceAddress; + UINT8 Command; + UINT8 DataMask; + UINT8 CompareValue; + UINT8 EventSenseType; + UINT8 EventType; + UINT8 EventOffset; + UINT8 EventSourceType; + UINT8 EventSeverity; + UINT8 SensorNumber; + UINT8 Entity; + UINT8 EntityInstance; } EFI_ACPI_ASF_ALERTDATA; /// /// Alert sensors definition /// typedef struct { - EFI_ACPI_ASF_RECORD_HEADER RecordHeader; - UINT8 AssertionEventBitMask; - UINT8 DeassertionEventBitMask; - UINT8 NumberOfAlerts; - UINT8 ArrayElementLength; ///< For ASF version 1.0 and later, this filed is set to 0x0C + EFI_ACPI_ASF_RECORD_HEADER RecordHeader; + UINT8 AssertionEventBitMask; + UINT8 DeassertionEventBitMask; + UINT8 NumberOfAlerts; + UINT8 ArrayElementLength; ///< For ASF version 1.0 and later, this filed is set to 0x0C /// /// EFI_ACPI_ASF_ALERTDATA DeviceArray[ANYSIZE_ARRAY]; /// @@ -74,47 +74,46 @@ typedef struct { /// Alert Control Data /// typedef struct { - UINT8 Function; - UINT8 DeviceAddress; - UINT8 Command; - UINT8 DataValue; + UINT8 Function; + UINT8 DeviceAddress; + UINT8 Command; + UINT8 DataValue; } EFI_ACPI_ASF_CONTROLDATA; /// /// Alert Remote Control System Actions /// typedef struct { - EFI_ACPI_ASF_RECORD_HEADER RecordHeader; - UINT8 NumberOfControls; - UINT8 ArrayElementLength; ///< For ASF version 1.0 and later, this filed is set to 0x4 - UINT16 RctlReserved; + EFI_ACPI_ASF_RECORD_HEADER RecordHeader; + UINT8 NumberOfControls; + UINT8 ArrayElementLength; ///< For ASF version 1.0 and later, this filed is set to 0x4 + UINT16 RctlReserved; /// /// EFI_ACPI_ASF_CONTROLDATA; DeviceArray[ANYSIZE_ARRAY]; /// } EFI_ACPI_ASF_RCTL; - /// /// Remote Control Capabilities /// typedef struct { - EFI_ACPI_ASF_RECORD_HEADER RecordHeader; - UINT8 RemoteControlCapabilities[7]; - UINT8 RMCPCompletionCode; - UINT32 RMCPIANA; - UINT8 RMCPSpecialCommand; - UINT8 RMCPSpecialCommandParameter[2]; - UINT8 RMCPBootOptions[2]; - UINT8 RMCPOEMParameters[2]; + EFI_ACPI_ASF_RECORD_HEADER RecordHeader; + UINT8 RemoteControlCapabilities[7]; + UINT8 RMCPCompletionCode; + UINT32 RMCPIANA; + UINT8 RMCPSpecialCommand; + UINT8 RMCPSpecialCommandParameter[2]; + UINT8 RMCPBootOptions[2]; + UINT8 RMCPOEMParameters[2]; } EFI_ACPI_ASF_RMCP; /// /// SMBus Devices with fixed addresses /// typedef struct { - EFI_ACPI_ASF_RECORD_HEADER RecordHeader; - UINT8 SEEPROMAddress; - UINT8 NumberOfDevices; + EFI_ACPI_ASF_RECORD_HEADER RecordHeader; + UINT8 SEEPROMAddress; + UINT8 NumberOfDevices; /// /// UINT8 FixedSmbusAddresses[ANYSIZE_ARRAY]; /// @@ -128,7 +127,7 @@ typedef EFI_ACPI_DESCRIPTION_HEADER EFI_ACPI_ASF_DESCRIPTION_HEADER; /// /// The revision stored in ASF! DESCRIPTION TABLE as BCD value /// -#define EFI_ACPI_2_0_ASF_DESCRIPTION_TABLE_REVISION 0x20 +#define EFI_ACPI_2_0_ASF_DESCRIPTION_TABLE_REVISION 0x20 /// /// "ASF!" ASF Description Table Signature diff --git a/MdePkg/Include/IndustryStandard/ArmErrorSourceTable.h b/MdePkg/Include/IndustryStandard/ArmErrorSourceTable.h index 369b03a..edc2537 100644 --- a/MdePkg/Include/IndustryStandard/ArmErrorSourceTable.h +++ b/MdePkg/Include/IndustryStandard/ArmErrorSourceTable.h @@ -31,7 +31,7 @@ /// Arm Error Source Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_DESCRIPTION_HEADER Header; } EFI_ACPI_ARM_ERROR_SOURCE_TABLE; /// @@ -44,36 +44,36 @@ typedef struct { /// 0x02 - SMMU error node /// 0x03 - Vendor-defined error node /// 0x04 - GIC error node - UINT8 Type; + UINT8 Type; /// Length of structure in bytes. - UINT16 Length; + UINT16 Length; /// Reserved - Must be zero. - UINT8 Reserved; + UINT8 Reserved; /// Offset from the start of the node to node-specific data. - UINT32 DataOffset; + UINT32 DataOffset; /// Offset from the start of the node to the node interface structure. - UINT32 InterfaceOffset; + UINT32 InterfaceOffset; /// Offset from the start of the node to node interrupt array. - UINT32 InterruptArrayOffset; + UINT32 InterruptArrayOffset; /// Number of entries in the interrupt array. - UINT32 InterruptArrayCount; + UINT32 InterruptArrayCount; // Generic node data /// The timestamp frequency of the counter in Hz. - UINT64 TimestampRate; + UINT64 TimestampRate; /// Reserved - Must be zero. - UINT64 Reserved1; + UINT64 Reserved1; /// The rate in Hz at which the Error Generation Counter decrements. - UINT64 ErrorInjectionCountdownRate; + UINT64 ErrorInjectionCountdownRate; } EFI_ACPI_AEST_NODE_STRUCT; // AEST Node type definitions @@ -90,46 +90,46 @@ typedef struct { /// Interface type: /// 0x0 - System register (SR) /// 0x1 - Memory mapped (MMIO) - UINT8 Type; + UINT8 Type; /// Reserved - Must be zero. - UINT8 Reserved[3]; + UINT8 Reserved[3]; /// AEST node interface flags. - UINT32 Flags; + UINT32 Flags; /// Base address of error group that contains the error node. - UINT64 BaseAddress; + UINT64 BaseAddress; /// Zero-based index of the first standard error record that /// belongs to this node. - UINT32 StartErrorRecordIndex; + UINT32 StartErrorRecordIndex; /// Number of error records in this node including both /// implemented and unimplemented records. - UINT32 NumberErrorRecords; + UINT32 NumberErrorRecords; /// A bitmap indicating the error records within this /// node that are implemented in the current system. - UINT64 ErrorRecordImplemented; + UINT64 ErrorRecordImplemented; /// A bitmap indicating the error records within this node that /// support error status reporting through the ERRGSR register. - UINT64 ErrorRecordStatusReportingSupported; + UINT64 ErrorRecordStatusReportingSupported; /// A bitmap indicating the addressing mode used by each error /// record within this node to populate the ERR_ADDR register. - UINT64 AddressingMode; + UINT64 AddressingMode; } EFI_ACPI_AEST_INTERFACE_STRUCT; // AEST Interface node type definitions. -#define EFI_ACPI_AEST_INTERFACE_TYPE_SR 0x0 -#define EFI_ACPI_AEST_INTERFACE_TYPE_MMIO 0x1 +#define EFI_ACPI_AEST_INTERFACE_TYPE_SR 0x0 +#define EFI_ACPI_AEST_INTERFACE_TYPE_MMIO 0x1 // AEST node interface flag definitions. -#define EFI_ACPI_AEST_INTERFACE_FLAG_PRIVATE 0 -#define EFI_ACPI_AEST_INTERFACE_FLAG_SHARED BIT0 -#define EFI_ACPI_AEST_INTERFACE_FLAG_CLEAR_MISCX BIT1 +#define EFI_ACPI_AEST_INTERFACE_FLAG_PRIVATE 0 +#define EFI_ACPI_AEST_INTERFACE_FLAG_SHARED BIT0 +#define EFI_ACPI_AEST_INTERFACE_FLAG_CLEAR_MISCX BIT1 /// /// AEST Node Interrupt structure. @@ -138,46 +138,46 @@ typedef struct { /// Interrupt type: /// 0x0 - Fault Handling Interrupt /// 0x1 - Error Recovery Interrupt - UINT8 InterruptType; + UINT8 InterruptType; /// Reserved - Must be zero. - UINT8 Reserved[2]; + UINT8 Reserved[2]; /// Interrupt flags /// Bits [31:1]: Must be zero. /// Bit 0: /// 0b - Interrupt is edge-triggered /// 1b - Interrupt is level-triggered - UINT8 InterruptFlags; + UINT8 InterruptFlags; /// GSIV of interrupt, if interrupt is an SPI or a PPI. - UINT32 InterruptGsiv; + UINT32 InterruptGsiv; /// If MSI is supported, then this field must be set to the /// Identifier field of the IORT ITS Group node. - UINT8 ItsGroupRefId; + UINT8 ItsGroupRefId; /// Reserved - must be zero. - UINT8 Reserved1[3]; + UINT8 Reserved1[3]; } EFI_ACPI_AEST_INTERRUPT_STRUCT; // AEST Interrupt node - interrupt type defintions. -#define EFI_ACPI_AEST_INTERRUPT_TYPE_FAULT_HANDLING 0x0 -#define EFI_ACPI_AEST_INTERRUPT_TYPE_ERROR_RECOVERY 0x1 +#define EFI_ACPI_AEST_INTERRUPT_TYPE_FAULT_HANDLING 0x0 +#define EFI_ACPI_AEST_INTERRUPT_TYPE_ERROR_RECOVERY 0x1 // AEST Interrupt node - interrupt flag defintions. -#define EFI_ACPI_AEST_INTERRUPT_FLAG_TRIGGER_TYPE_EDGE 0 -#define EFI_ACPI_AEST_INTERRUPT_FLAG_TRIGGER_TYPE_LEVEL BIT0 +#define EFI_ACPI_AEST_INTERRUPT_FLAG_TRIGGER_TYPE_EDGE 0 +#define EFI_ACPI_AEST_INTERRUPT_FLAG_TRIGGER_TYPE_LEVEL BIT0 /// /// Cache Processor Resource structure. /// typedef struct { /// Reference to the cache structure in the PPTT table. - UINT32 CacheRefId; + UINT32 CacheRefId; /// Reserved - UINT32 Reserved; + UINT32 Reserved; } EFI_ACPI_AEST_PROCESSOR_CACHE_RESOURCE_STRUCT; /// @@ -185,10 +185,10 @@ typedef struct { /// typedef struct { /// TLB level from perspective of current processor. - UINT32 TlbRefId; + UINT32 TlbRefId; /// Reserved - UINT32 Reserved; + UINT32 Reserved; } EFI_ACPI_AEST_PROCESSOR_TLB_RESOURCE_STRUCT; /// @@ -196,7 +196,7 @@ typedef struct { /// typedef struct { /// Vendor-defined supplementary data. - UINT32 Data; + UINT32 Data; } EFI_ACPI_AEST_PROCESSOR_GENERIC_RESOURCE_STRUCT; /// @@ -204,13 +204,13 @@ typedef struct { /// typedef union { /// Processor Cache resource. - EFI_ACPI_AEST_PROCESSOR_CACHE_RESOURCE_STRUCT Cache; + EFI_ACPI_AEST_PROCESSOR_CACHE_RESOURCE_STRUCT Cache; /// Processor TLB resource. - EFI_ACPI_AEST_PROCESSOR_TLB_RESOURCE_STRUCT Tlb; + EFI_ACPI_AEST_PROCESSOR_TLB_RESOURCE_STRUCT Tlb; /// Processor Generic resource. - EFI_ACPI_AEST_PROCESSOR_GENERIC_RESOURCE_STRUCT Generic; + EFI_ACPI_AEST_PROCESSOR_GENERIC_RESOURCE_STRUCT Generic; } EFI_ACPI_AEST_PROCESSOR_RESOURCE; /// @@ -218,32 +218,32 @@ typedef union { /// typedef struct { /// AEST Node header - EFI_ACPI_AEST_NODE_STRUCT NodeHeader; + EFI_ACPI_AEST_NODE_STRUCT NodeHeader; /// Processor ID of node. - UINT32 AcpiProcessorId; + UINT32 AcpiProcessorId; /// Resource type of the processor node. /// 0x0 - Cache /// 0x1 - TLB /// 0x2 - Generic - UINT8 ResourceType; + UINT8 ResourceType; /// Reserved - must be zero. - UINT8 Reserved; + UINT8 Reserved; /// Processor structure flags. - UINT8 Flags; + UINT8 Flags; /// Processor structure revision. - UINT8 Revision; + UINT8 Revision; /// Processor affinity descriptor for the resource that this /// error node pertains to. - UINT64 ProcessorAffinityLevelIndicator; + UINT64 ProcessorAffinityLevelIndicator; /// Processor resource - EFI_ACPI_AEST_PROCESSOR_RESOURCE Resource; + EFI_ACPI_AEST_PROCESSOR_RESOURCE Resource; // Node Interface // EFI_ACPI_AEST_INTERFACE_STRUCT NodeInterface; @@ -253,23 +253,23 @@ typedef struct { } EFI_ACPI_AEST_PROCESSOR_STRUCT; // AEST Processor resource type definitions. -#define EFI_ACPI_AEST_PROCESSOR_RESOURCE_TYPE_CACHE 0x0 -#define EFI_ACPI_AEST_PROCESSOR_RESOURCE_TYPE_TLB 0x1 -#define EFI_ACPI_AEST_PROCESSOR_RESOURCE_TYPE_GENERIC 0x2 +#define EFI_ACPI_AEST_PROCESSOR_RESOURCE_TYPE_CACHE 0x0 +#define EFI_ACPI_AEST_PROCESSOR_RESOURCE_TYPE_TLB 0x1 +#define EFI_ACPI_AEST_PROCESSOR_RESOURCE_TYPE_GENERIC 0x2 // AEST Processor flag definitions. -#define EFI_ACPI_AEST_PROCESSOR_FLAG_GLOBAL BIT0 -#define EFI_ACPI_AEST_PROCESSOR_FLAG_SHARED BIT1 +#define EFI_ACPI_AEST_PROCESSOR_FLAG_GLOBAL BIT0 +#define EFI_ACPI_AEST_PROCESSOR_FLAG_SHARED BIT1 /// /// Memory Controller structure. /// typedef struct { /// AEST Node header - EFI_ACPI_AEST_NODE_STRUCT NodeHeader; + EFI_ACPI_AEST_NODE_STRUCT NodeHeader; /// SRAT proximity domain. - UINT32 ProximityDomain; + UINT32 ProximityDomain; // Node Interface // EFI_ACPI_AEST_INTERFACE_STRUCT NodeInterface; @@ -283,14 +283,14 @@ typedef struct { /// typedef struct { /// AEST Node header - EFI_ACPI_AEST_NODE_STRUCT NodeHeader; + EFI_ACPI_AEST_NODE_STRUCT NodeHeader; /// Reference to the IORT table node that describes this SMMU. - UINT32 SmmuRefId; + UINT32 SmmuRefId; /// Reference to the IORT table node that is associated with the /// sub-component within this SMMU. - UINT32 SubComponentRefId; + UINT32 SubComponentRefId; // Node Interface // EFI_ACPI_AEST_INTERFACE_STRUCT NodeInterface; @@ -304,16 +304,16 @@ typedef struct { /// typedef struct { /// AEST Node header - EFI_ACPI_AEST_NODE_STRUCT NodeHeader; + EFI_ACPI_AEST_NODE_STRUCT NodeHeader; /// ACPI HID of the component. - UINT32 HardwareId; + UINT32 HardwareId; /// The ACPI Unique identifier of the component. - UINT32 UniqueId; + UINT32 UniqueId; /// Vendor-specific data, for example to identify this error source. - UINT8 VendorData[16]; + UINT8 VendorData[16]; // Node Interface // EFI_ACPI_AEST_INTERFACE_STRUCT NodeInterface; @@ -327,17 +327,17 @@ typedef struct { /// typedef struct { /// AEST Node header - EFI_ACPI_AEST_NODE_STRUCT NodeHeader; + EFI_ACPI_AEST_NODE_STRUCT NodeHeader; /// Type of GIC interface that is associated with this error node. /// 0x0 - GIC CPU (GICC) /// 0x1 - GIC Distributor (GICD) /// 0x2 - GIC Resistributor (GICR) /// 0x3 - GIC ITS (GITS) - UINT32 InterfaceType; + UINT32 InterfaceType; /// Identifier for the interface instance. - UINT32 GicInterfaceRefId; + UINT32 GicInterfaceRefId; // Node Interface // EFI_ACPI_AEST_INTERFACE_STRUCT NodeInterface; @@ -347,10 +347,10 @@ typedef struct { } EFI_ACPI_AEST_GIC_STRUCT; // AEST GIC interface type definitions. -#define EFI_ACPI_AEST_GIC_INTERFACE_TYPE_GICC 0x0 -#define EFI_ACPI_AEST_GIC_INTERFACE_TYPE_GICD 0x1 -#define EFI_ACPI_AEST_GIC_INTERFACE_TYPE_GICR 0x2 -#define EFI_ACPI_AEST_GIC_INTERFACE_TYPE_GITS 0x3 +#define EFI_ACPI_AEST_GIC_INTERFACE_TYPE_GICC 0x0 +#define EFI_ACPI_AEST_GIC_INTERFACE_TYPE_GICD 0x1 +#define EFI_ACPI_AEST_GIC_INTERFACE_TYPE_GICR 0x2 +#define EFI_ACPI_AEST_GIC_INTERFACE_TYPE_GITS 0x3 #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/Atapi.h b/MdePkg/Include/IndustryStandard/Atapi.h index d9abe7f..3887027 100644 --- a/MdePkg/Include/IndustryStandard/Atapi.h +++ b/MdePkg/Include/IndustryStandard/Atapi.h @@ -19,55 +19,55 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// ATA_IDENTIFY_DATA, which currently conforms to ATA-8.) /// typedef struct { - UINT16 config; ///< General Configuration. - UINT16 cylinders; ///< Number of Cylinders. - UINT16 reserved_2; - UINT16 heads; ///< Number of logical heads. - UINT16 vendor_data1; - UINT16 vendor_data2; - UINT16 sectors_per_track; - UINT16 vendor_specific_7_9[3]; - CHAR8 SerialNo[20]; ///< ASCII - UINT16 vendor_specific_20_21[2]; - UINT16 ecc_bytes_available; - CHAR8 FirmwareVer[8]; ///< ASCII - CHAR8 ModelName[40]; ///< ASCII - UINT16 multi_sector_cmd_max_sct_cnt; - UINT16 reserved_48; - UINT16 capabilities; - UINT16 reserved_50; - UINT16 pio_cycle_timing; - UINT16 reserved_52; - UINT16 field_validity; - UINT16 current_cylinders; - UINT16 current_heads; - UINT16 current_sectors; - UINT16 CurrentCapacityLsb; - UINT16 CurrentCapacityMsb; - UINT16 reserved_59; - UINT16 user_addressable_sectors_lo; - UINT16 user_addressable_sectors_hi; - UINT16 reserved_62; - UINT16 multi_word_dma_mode; - UINT16 advanced_pio_modes; - UINT16 min_multi_word_dma_cycle_time; - UINT16 rec_multi_word_dma_cycle_time; - UINT16 min_pio_cycle_time_without_flow_control; - UINT16 min_pio_cycle_time_with_flow_control; - UINT16 reserved_69_79[11]; - UINT16 major_version_no; - UINT16 minor_version_no; - UINT16 command_set_supported_82; ///< word 82 - UINT16 command_set_supported_83; ///< word 83 - UINT16 command_set_feature_extn; ///< word 84 - UINT16 command_set_feature_enb_85; ///< word 85 - UINT16 command_set_feature_enb_86; ///< word 86 - UINT16 command_set_feature_default; ///< word 87 - UINT16 ultra_dma_mode; ///< word 88 - UINT16 reserved_89_127[39]; - UINT16 security_status; - UINT16 vendor_data_129_159[31]; - UINT16 reserved_160_255[96]; + UINT16 config; ///< General Configuration. + UINT16 cylinders; ///< Number of Cylinders. + UINT16 reserved_2; + UINT16 heads; ///< Number of logical heads. + UINT16 vendor_data1; + UINT16 vendor_data2; + UINT16 sectors_per_track; + UINT16 vendor_specific_7_9[3]; + CHAR8 SerialNo[20]; ///< ASCII + UINT16 vendor_specific_20_21[2]; + UINT16 ecc_bytes_available; + CHAR8 FirmwareVer[8]; ///< ASCII + CHAR8 ModelName[40]; ///< ASCII + UINT16 multi_sector_cmd_max_sct_cnt; + UINT16 reserved_48; + UINT16 capabilities; + UINT16 reserved_50; + UINT16 pio_cycle_timing; + UINT16 reserved_52; + UINT16 field_validity; + UINT16 current_cylinders; + UINT16 current_heads; + UINT16 current_sectors; + UINT16 CurrentCapacityLsb; + UINT16 CurrentCapacityMsb; + UINT16 reserved_59; + UINT16 user_addressable_sectors_lo; + UINT16 user_addressable_sectors_hi; + UINT16 reserved_62; + UINT16 multi_word_dma_mode; + UINT16 advanced_pio_modes; + UINT16 min_multi_word_dma_cycle_time; + UINT16 rec_multi_word_dma_cycle_time; + UINT16 min_pio_cycle_time_without_flow_control; + UINT16 min_pio_cycle_time_with_flow_control; + UINT16 reserved_69_79[11]; + UINT16 major_version_no; + UINT16 minor_version_no; + UINT16 command_set_supported_82; ///< word 82 + UINT16 command_set_supported_83; ///< word 83 + UINT16 command_set_feature_extn; ///< word 84 + UINT16 command_set_feature_enb_85; ///< word 85 + UINT16 command_set_feature_enb_86; ///< word 86 + UINT16 command_set_feature_default; ///< word 87 + UINT16 ultra_dma_mode; ///< word 88 + UINT16 reserved_89_127[39]; + UINT16 security_status; + UINT16 vendor_data_129_159[31]; + UINT16 reserved_160_255[96]; } ATA5_IDENTIFY_DATA; /// @@ -76,107 +76,107 @@ typedef struct { /// completion of the ATA IDENTIFY_DEVICE command. /// typedef struct { - UINT16 config; ///< General Configuration. - UINT16 obsolete_1; - UINT16 specific_config; ///< Specific Configuration. - UINT16 obsolete_3; - UINT16 retired_4_5[2]; - UINT16 obsolete_6; - UINT16 cfa_reserved_7_8[2]; - UINT16 retired_9; - CHAR8 SerialNo[20]; ///< word 10~19 - UINT16 retired_20_21[2]; - UINT16 obsolete_22; - CHAR8 FirmwareVer[8]; ///< word 23~26 - CHAR8 ModelName[40]; ///< word 27~46 - UINT16 multi_sector_cmd_max_sct_cnt; - UINT16 trusted_computing_support; - UINT16 capabilities_49; - UINT16 capabilities_50; - UINT16 obsolete_51_52[2]; - UINT16 field_validity; - UINT16 obsolete_54_58[5]; - UINT16 multi_sector_setting; - UINT16 user_addressable_sectors_lo; - UINT16 user_addressable_sectors_hi; - UINT16 obsolete_62; - UINT16 multi_word_dma_mode; - UINT16 advanced_pio_modes; - UINT16 min_multi_word_dma_cycle_time; - UINT16 rec_multi_word_dma_cycle_time; - UINT16 min_pio_cycle_time_without_flow_control; - UINT16 min_pio_cycle_time_with_flow_control; - UINT16 additional_supported; ///< word 69 - UINT16 reserved_70; - UINT16 reserved_71_74[4]; ///< Reserved for IDENTIFY PACKET DEVICE cmd. - UINT16 queue_depth; - UINT16 serial_ata_capabilities; - UINT16 reserved_77; ///< Reserved for Serial ATA - UINT16 serial_ata_features_supported; - UINT16 serial_ata_features_enabled; - UINT16 major_version_no; - UINT16 minor_version_no; - UINT16 command_set_supported_82; ///< word 82 - UINT16 command_set_supported_83; ///< word 83 - UINT16 command_set_feature_extn; ///< word 84 - UINT16 command_set_feature_enb_85; ///< word 85 - UINT16 command_set_feature_enb_86; ///< word 86 - UINT16 command_set_feature_default; ///< word 87 - UINT16 ultra_dma_mode; ///< word 88 - UINT16 time_for_security_erase_unit; - UINT16 time_for_enhanced_security_erase_unit; - UINT16 advanced_power_management_level; - UINT16 master_password_identifier; - UINT16 hardware_configuration_test_result; - UINT16 obsolete_94; - UINT16 stream_minimum_request_size; - UINT16 streaming_transfer_time_for_dma; - UINT16 streaming_access_latency_for_dma_and_pio; - UINT16 streaming_performance_granularity[2]; ///< word 98~99 - UINT16 maximum_lba_for_48bit_addressing[4]; ///< word 100~103 - UINT16 streaming_transfer_time_for_pio; - UINT16 max_no_of_512byte_blocks_per_data_set_cmd; - UINT16 phy_logic_sector_support; ///< word 106 - UINT16 interseek_delay_for_iso7779; - UINT16 world_wide_name[4]; ///< word 108~111 - UINT16 reserved_for_128bit_wwn_112_115[4]; - UINT16 reserved_for_technical_report; - UINT16 logic_sector_size_lo; ///< word 117 - UINT16 logic_sector_size_hi; ///< word 118 - UINT16 features_and_command_sets_supported_ext; ///< word 119 - UINT16 features_and_command_sets_enabled_ext; ///< word 120 - UINT16 reserved_121_126[6]; - UINT16 obsolete_127; - UINT16 security_status; ///< word 128 - UINT16 vendor_specific_129_159[31]; - UINT16 cfa_power_mode; ///< word 160 - UINT16 reserved_for_compactflash_161_167[7]; - UINT16 device_nominal_form_factor; - UINT16 is_data_set_cmd_supported; - CHAR8 additional_product_identifier[8]; - UINT16 reserved_174_175[2]; - CHAR8 media_serial_number[60]; ///< word 176~205 - UINT16 sct_command_transport; ///< word 206 - UINT16 reserved_207_208[2]; - UINT16 alignment_logic_in_phy_blocks; ///< word 209 - UINT16 write_read_verify_sector_count_mode3[2]; ///< word 210~211 - UINT16 verify_sector_count_mode2[2]; - UINT16 nv_cache_capabilities; - UINT16 nv_cache_size_in_logical_block_lsw; ///< word 215 - UINT16 nv_cache_size_in_logical_block_msw; ///< word 216 - UINT16 nominal_media_rotation_rate; - UINT16 reserved_218; - UINT16 nv_cache_options; ///< word 219 - UINT16 write_read_verify_mode; ///< word 220 - UINT16 reserved_221; - UINT16 transport_major_revision_number; - UINT16 transport_minor_revision_number; - UINT16 reserved_224_229[6]; - UINT64 extended_no_of_addressable_sectors; - UINT16 min_number_per_download_microcode_mode3; ///< word 234 - UINT16 max_number_per_download_microcode_mode3; ///< word 235 - UINT16 reserved_236_254[19]; - UINT16 integrity_word; + UINT16 config; ///< General Configuration. + UINT16 obsolete_1; + UINT16 specific_config; ///< Specific Configuration. + UINT16 obsolete_3; + UINT16 retired_4_5[2]; + UINT16 obsolete_6; + UINT16 cfa_reserved_7_8[2]; + UINT16 retired_9; + CHAR8 SerialNo[20]; ///< word 10~19 + UINT16 retired_20_21[2]; + UINT16 obsolete_22; + CHAR8 FirmwareVer[8]; ///< word 23~26 + CHAR8 ModelName[40]; ///< word 27~46 + UINT16 multi_sector_cmd_max_sct_cnt; + UINT16 trusted_computing_support; + UINT16 capabilities_49; + UINT16 capabilities_50; + UINT16 obsolete_51_52[2]; + UINT16 field_validity; + UINT16 obsolete_54_58[5]; + UINT16 multi_sector_setting; + UINT16 user_addressable_sectors_lo; + UINT16 user_addressable_sectors_hi; + UINT16 obsolete_62; + UINT16 multi_word_dma_mode; + UINT16 advanced_pio_modes; + UINT16 min_multi_word_dma_cycle_time; + UINT16 rec_multi_word_dma_cycle_time; + UINT16 min_pio_cycle_time_without_flow_control; + UINT16 min_pio_cycle_time_with_flow_control; + UINT16 additional_supported; ///< word 69 + UINT16 reserved_70; + UINT16 reserved_71_74[4]; ///< Reserved for IDENTIFY PACKET DEVICE cmd. + UINT16 queue_depth; + UINT16 serial_ata_capabilities; + UINT16 reserved_77; ///< Reserved for Serial ATA + UINT16 serial_ata_features_supported; + UINT16 serial_ata_features_enabled; + UINT16 major_version_no; + UINT16 minor_version_no; + UINT16 command_set_supported_82; ///< word 82 + UINT16 command_set_supported_83; ///< word 83 + UINT16 command_set_feature_extn; ///< word 84 + UINT16 command_set_feature_enb_85; ///< word 85 + UINT16 command_set_feature_enb_86; ///< word 86 + UINT16 command_set_feature_default; ///< word 87 + UINT16 ultra_dma_mode; ///< word 88 + UINT16 time_for_security_erase_unit; + UINT16 time_for_enhanced_security_erase_unit; + UINT16 advanced_power_management_level; + UINT16 master_password_identifier; + UINT16 hardware_configuration_test_result; + UINT16 obsolete_94; + UINT16 stream_minimum_request_size; + UINT16 streaming_transfer_time_for_dma; + UINT16 streaming_access_latency_for_dma_and_pio; + UINT16 streaming_performance_granularity[2]; ///< word 98~99 + UINT16 maximum_lba_for_48bit_addressing[4]; ///< word 100~103 + UINT16 streaming_transfer_time_for_pio; + UINT16 max_no_of_512byte_blocks_per_data_set_cmd; + UINT16 phy_logic_sector_support; ///< word 106 + UINT16 interseek_delay_for_iso7779; + UINT16 world_wide_name[4]; ///< word 108~111 + UINT16 reserved_for_128bit_wwn_112_115[4]; + UINT16 reserved_for_technical_report; + UINT16 logic_sector_size_lo; ///< word 117 + UINT16 logic_sector_size_hi; ///< word 118 + UINT16 features_and_command_sets_supported_ext; ///< word 119 + UINT16 features_and_command_sets_enabled_ext; ///< word 120 + UINT16 reserved_121_126[6]; + UINT16 obsolete_127; + UINT16 security_status; ///< word 128 + UINT16 vendor_specific_129_159[31]; + UINT16 cfa_power_mode; ///< word 160 + UINT16 reserved_for_compactflash_161_167[7]; + UINT16 device_nominal_form_factor; + UINT16 is_data_set_cmd_supported; + CHAR8 additional_product_identifier[8]; + UINT16 reserved_174_175[2]; + CHAR8 media_serial_number[60]; ///< word 176~205 + UINT16 sct_command_transport; ///< word 206 + UINT16 reserved_207_208[2]; + UINT16 alignment_logic_in_phy_blocks; ///< word 209 + UINT16 write_read_verify_sector_count_mode3[2]; ///< word 210~211 + UINT16 verify_sector_count_mode2[2]; + UINT16 nv_cache_capabilities; + UINT16 nv_cache_size_in_logical_block_lsw; ///< word 215 + UINT16 nv_cache_size_in_logical_block_msw; ///< word 216 + UINT16 nominal_media_rotation_rate; + UINT16 reserved_218; + UINT16 nv_cache_options; ///< word 219 + UINT16 write_read_verify_mode; ///< word 220 + UINT16 reserved_221; + UINT16 transport_major_revision_number; + UINT16 transport_minor_revision_number; + UINT16 reserved_224_229[6]; + UINT64 extended_no_of_addressable_sectors; + UINT16 min_number_per_download_microcode_mode3; ///< word 234 + UINT16 max_number_per_download_microcode_mode3; ///< word 235 + UINT16 reserved_236_254[19]; + UINT16 integrity_word; } ATA_IDENTIFY_DATA; /// @@ -185,135 +185,134 @@ typedef struct { /// completion of the ATA IDENTIFY_PACKET_DEVICE command. /// typedef struct { - UINT16 config; ///< General Configuration. - UINT16 reserved_1; - UINT16 specific_config; ///< Specific Configuration. - UINT16 reserved_3_9[7]; - CHAR8 SerialNo[20]; ///< word 10~19 - UINT16 reserved_20_22[3]; - CHAR8 FirmwareVer[8]; ///< word 23~26 - CHAR8 ModelName[40]; ///< word 27~46 - UINT16 reserved_47_48[2]; - UINT16 capabilities_49; - UINT16 capabilities_50; - UINT16 obsolete_51; - UINT16 reserved_52; - UINT16 field_validity; ///< word 53 - UINT16 reserved_54_61[8]; - UINT16 dma_dir; - UINT16 multi_word_dma_mode; ///< word 63 - UINT16 advanced_pio_modes; ///< word 64 - UINT16 min_multi_word_dma_cycle_time; - UINT16 rec_multi_word_dma_cycle_time; - UINT16 min_pio_cycle_time_without_flow_control; - UINT16 min_pio_cycle_time_with_flow_control; - UINT16 reserved_69_70[2]; - UINT16 obsolete_71_72[2]; - UINT16 reserved_73_74[2]; - UINT16 obsolete_75; - UINT16 serial_ata_capabilities; - UINT16 reserved_77; ///< Reserved for Serial ATA - UINT16 serial_ata_features_supported; - UINT16 serial_ata_features_enabled; - UINT16 major_version_no; ///< word 80 - UINT16 minor_version_no; ///< word 81 - UINT16 cmd_set_support_82; - UINT16 cmd_set_support_83; - UINT16 cmd_feature_support; - UINT16 cmd_feature_enable_85; - UINT16 cmd_feature_enable_86; - UINT16 cmd_feature_default; - UINT16 ultra_dma_select; - UINT16 time_required_for_sec_erase; ///< word 89 - UINT16 time_required_for_enhanced_sec_erase; ///< word 90 - UINT16 advanced_power_management_level; - UINT16 master_pwd_revison_code; - UINT16 hardware_reset_result; ///< word 93 - UINT16 obsolete_94; - UINT16 reserved_95_107[13]; - UINT16 world_wide_name[4]; ///< word 108~111 - UINT16 reserved_for_128bit_wwn_112_115[4]; - UINT16 reserved_116_118[3]; - UINT16 command_and_feature_sets_supported; ///< word 119 - UINT16 command_and_feature_sets_supported_enabled; - UINT16 reserved_121_124[4]; - UINT16 atapi_byte_count_0_behavior; ///< word 125 - UINT16 obsolete_126_127[2]; - UINT16 security_status; - UINT16 reserved_129_159[31]; - UINT16 cfa_reserved_160_175[16]; - UINT16 reserved_176_221[46]; - UINT16 transport_major_version; - UINT16 transport_minor_version; - UINT16 reserved_224_254[31]; - UINT16 integrity_word; + UINT16 config; ///< General Configuration. + UINT16 reserved_1; + UINT16 specific_config; ///< Specific Configuration. + UINT16 reserved_3_9[7]; + CHAR8 SerialNo[20]; ///< word 10~19 + UINT16 reserved_20_22[3]; + CHAR8 FirmwareVer[8]; ///< word 23~26 + CHAR8 ModelName[40]; ///< word 27~46 + UINT16 reserved_47_48[2]; + UINT16 capabilities_49; + UINT16 capabilities_50; + UINT16 obsolete_51; + UINT16 reserved_52; + UINT16 field_validity; ///< word 53 + UINT16 reserved_54_61[8]; + UINT16 dma_dir; + UINT16 multi_word_dma_mode; ///< word 63 + UINT16 advanced_pio_modes; ///< word 64 + UINT16 min_multi_word_dma_cycle_time; + UINT16 rec_multi_word_dma_cycle_time; + UINT16 min_pio_cycle_time_without_flow_control; + UINT16 min_pio_cycle_time_with_flow_control; + UINT16 reserved_69_70[2]; + UINT16 obsolete_71_72[2]; + UINT16 reserved_73_74[2]; + UINT16 obsolete_75; + UINT16 serial_ata_capabilities; + UINT16 reserved_77; ///< Reserved for Serial ATA + UINT16 serial_ata_features_supported; + UINT16 serial_ata_features_enabled; + UINT16 major_version_no; ///< word 80 + UINT16 minor_version_no; ///< word 81 + UINT16 cmd_set_support_82; + UINT16 cmd_set_support_83; + UINT16 cmd_feature_support; + UINT16 cmd_feature_enable_85; + UINT16 cmd_feature_enable_86; + UINT16 cmd_feature_default; + UINT16 ultra_dma_select; + UINT16 time_required_for_sec_erase; ///< word 89 + UINT16 time_required_for_enhanced_sec_erase; ///< word 90 + UINT16 advanced_power_management_level; + UINT16 master_pwd_revison_code; + UINT16 hardware_reset_result; ///< word 93 + UINT16 obsolete_94; + UINT16 reserved_95_107[13]; + UINT16 world_wide_name[4]; ///< word 108~111 + UINT16 reserved_for_128bit_wwn_112_115[4]; + UINT16 reserved_116_118[3]; + UINT16 command_and_feature_sets_supported; ///< word 119 + UINT16 command_and_feature_sets_supported_enabled; + UINT16 reserved_121_124[4]; + UINT16 atapi_byte_count_0_behavior; ///< word 125 + UINT16 obsolete_126_127[2]; + UINT16 security_status; + UINT16 reserved_129_159[31]; + UINT16 cfa_reserved_160_175[16]; + UINT16 reserved_176_221[46]; + UINT16 transport_major_version; + UINT16 transport_minor_version; + UINT16 reserved_224_254[31]; + UINT16 integrity_word; } ATAPI_IDENTIFY_DATA; - /// /// Standard Quiry Data format, defined in SFF-8070i(ATAPI Removable Rewritable Specification). /// typedef struct { - UINT8 peripheral_type; - UINT8 RMB; - UINT8 version; - UINT8 response_data_format; - UINT8 addnl_length; ///< n - 4, Numbers of bytes following this one. - UINT8 reserved_5; - UINT8 reserved_6; - UINT8 reserved_7; - UINT8 vendor_info[8]; - UINT8 product_id[16]; - UINT8 product_revision_level[4]; - UINT8 vendor_specific_36_55[55 - 36 + 1]; - UINT8 reserved_56_95[95 - 56 + 1]; + UINT8 peripheral_type; + UINT8 RMB; + UINT8 version; + UINT8 response_data_format; + UINT8 addnl_length; ///< n - 4, Numbers of bytes following this one. + UINT8 reserved_5; + UINT8 reserved_6; + UINT8 reserved_7; + UINT8 vendor_info[8]; + UINT8 product_id[16]; + UINT8 product_revision_level[4]; + UINT8 vendor_specific_36_55[55 - 36 + 1]; + UINT8 reserved_56_95[95 - 56 + 1]; /// /// Vendor-specific parameters fields. The sizeof (ATAPI_INQUIRY_DATA) is 254 /// since allocation_length is one byte in ATAPI_INQUIRY_CMD. /// - UINT8 vendor_specific_96_253[253 - 96 + 1]; + UINT8 vendor_specific_96_253[253 - 96 + 1]; } ATAPI_INQUIRY_DATA; /// /// Request Sense Standard Data, defined in SFF-8070i(ATAPI Removable Rewritable Specification). /// typedef struct { - UINT8 error_code : 7; - UINT8 valid : 1; - UINT8 reserved_1; - UINT8 sense_key : 4; - UINT8 reserved_2 : 1; - UINT8 Vendor_specifc_1 : 3; - UINT8 vendor_specific_3; - UINT8 vendor_specific_4; - UINT8 vendor_specific_5; - UINT8 vendor_specific_6; - UINT8 addnl_sense_length; ///< n - 7 - UINT8 vendor_specific_8; - UINT8 vendor_specific_9; - UINT8 vendor_specific_10; - UINT8 vendor_specific_11; - UINT8 addnl_sense_code; ///< mandatory - UINT8 addnl_sense_code_qualifier; ///< mandatory - UINT8 field_replaceable_unit_code; ///< optional - UINT8 sense_key_specific_15 : 7; - UINT8 SKSV : 1; - UINT8 sense_key_specific_16; - UINT8 sense_key_specific_17; + UINT8 error_code : 7; + UINT8 valid : 1; + UINT8 reserved_1; + UINT8 sense_key : 4; + UINT8 reserved_2 : 1; + UINT8 Vendor_specifc_1 : 3; + UINT8 vendor_specific_3; + UINT8 vendor_specific_4; + UINT8 vendor_specific_5; + UINT8 vendor_specific_6; + UINT8 addnl_sense_length; ///< n - 7 + UINT8 vendor_specific_8; + UINT8 vendor_specific_9; + UINT8 vendor_specific_10; + UINT8 vendor_specific_11; + UINT8 addnl_sense_code; ///< mandatory + UINT8 addnl_sense_code_qualifier; ///< mandatory + UINT8 field_replaceable_unit_code; ///< optional + UINT8 sense_key_specific_15 : 7; + UINT8 SKSV : 1; + UINT8 sense_key_specific_16; + UINT8 sense_key_specific_17; } ATAPI_REQUEST_SENSE_DATA; /// /// READ CAPACITY Data, defined in SFF-8070i(ATAPI Removable Rewritable Specification). /// typedef struct { - UINT8 LastLba3; - UINT8 LastLba2; - UINT8 LastLba1; - UINT8 LastLba0; - UINT8 BlockSize3; - UINT8 BlockSize2; - UINT8 BlockSize1; - UINT8 BlockSize0; + UINT8 LastLba3; + UINT8 LastLba2; + UINT8 LastLba1; + UINT8 LastLba0; + UINT8 BlockSize3; + UINT8 BlockSize2; + UINT8 BlockSize1; + UINT8 BlockSize0; } ATAPI_READ_CAPACITY_DATA; /// @@ -321,133 +320,133 @@ typedef struct { /// defined in SFF-8070i(ATAPI Removable Rewritable Specification). /// typedef struct { - UINT8 reserved_0; - UINT8 reserved_1; - UINT8 reserved_2; - UINT8 Capacity_Length; - UINT8 LastLba3; - UINT8 LastLba2; - UINT8 LastLba1; - UINT8 LastLba0; - UINT8 DesCode : 2; - UINT8 reserved_9 : 6; - UINT8 BlockSize2; - UINT8 BlockSize1; - UINT8 BlockSize0; + UINT8 reserved_0; + UINT8 reserved_1; + UINT8 reserved_2; + UINT8 Capacity_Length; + UINT8 LastLba3; + UINT8 LastLba2; + UINT8 LastLba1; + UINT8 LastLba0; + UINT8 DesCode : 2; + UINT8 reserved_9 : 6; + UINT8 BlockSize2; + UINT8 BlockSize1; + UINT8 BlockSize0; } ATAPI_READ_FORMAT_CAPACITY_DATA; /// /// Test Unit Ready Command, defined in SFF-8070i(ATAPI Removable Rewritable Specification). /// typedef struct { - UINT8 opcode; - UINT8 reserved_1; - UINT8 reserved_2; - UINT8 reserved_3; - UINT8 reserved_4; - UINT8 reserved_5; - UINT8 reserved_6; - UINT8 reserved_7; - UINT8 reserved_8; - UINT8 reserved_9; - UINT8 reserved_10; - UINT8 reserved_11; + UINT8 opcode; + UINT8 reserved_1; + UINT8 reserved_2; + UINT8 reserved_3; + UINT8 reserved_4; + UINT8 reserved_5; + UINT8 reserved_6; + UINT8 reserved_7; + UINT8 reserved_8; + UINT8 reserved_9; + UINT8 reserved_10; + UINT8 reserved_11; } ATAPI_TEST_UNIT_READY_CMD; /// /// INQUIRY Command, defined in SFF-8070i(ATAPI Removable Rewritable Specification). /// typedef struct { - UINT8 opcode; - UINT8 reserved_1 : 5; - UINT8 lun : 3; - UINT8 page_code; ///< defined in SFF8090i, V6 - UINT8 reserved_3; - UINT8 allocation_length; - UINT8 reserved_5; - UINT8 reserved_6; - UINT8 reserved_7; - UINT8 reserved_8; - UINT8 reserved_9; - UINT8 reserved_10; - UINT8 reserved_11; + UINT8 opcode; + UINT8 reserved_1 : 5; + UINT8 lun : 3; + UINT8 page_code; ///< defined in SFF8090i, V6 + UINT8 reserved_3; + UINT8 allocation_length; + UINT8 reserved_5; + UINT8 reserved_6; + UINT8 reserved_7; + UINT8 reserved_8; + UINT8 reserved_9; + UINT8 reserved_10; + UINT8 reserved_11; } ATAPI_INQUIRY_CMD; /// /// REQUEST SENSE Command, defined in SFF-8070i(ATAPI Removable Rewritable Specification). /// typedef struct { - UINT8 opcode; - UINT8 reserved_1 : 5; - UINT8 lun : 3; - UINT8 reserved_2; - UINT8 reserved_3; - UINT8 allocation_length; - UINT8 reserved_5; - UINT8 reserved_6; - UINT8 reserved_7; - UINT8 reserved_8; - UINT8 reserved_9; - UINT8 reserved_10; - UINT8 reserved_11; + UINT8 opcode; + UINT8 reserved_1 : 5; + UINT8 lun : 3; + UINT8 reserved_2; + UINT8 reserved_3; + UINT8 allocation_length; + UINT8 reserved_5; + UINT8 reserved_6; + UINT8 reserved_7; + UINT8 reserved_8; + UINT8 reserved_9; + UINT8 reserved_10; + UINT8 reserved_11; } ATAPI_REQUEST_SENSE_CMD; /// /// READ (10) Command, defined in SFF-8070i(ATAPI Removable Rewritable Specification). /// typedef struct { - UINT8 opcode; - UINT8 reserved_1 : 5; - UINT8 lun : 3; - UINT8 Lba0; - UINT8 Lba1; - UINT8 Lba2; - UINT8 Lba3; - UINT8 reserved_6; - UINT8 TranLen0; - UINT8 TranLen1; - UINT8 reserved_9; - UINT8 reserved_10; - UINT8 reserved_11; + UINT8 opcode; + UINT8 reserved_1 : 5; + UINT8 lun : 3; + UINT8 Lba0; + UINT8 Lba1; + UINT8 Lba2; + UINT8 Lba3; + UINT8 reserved_6; + UINT8 TranLen0; + UINT8 TranLen1; + UINT8 reserved_9; + UINT8 reserved_10; + UINT8 reserved_11; } ATAPI_READ10_CMD; /// /// READ Format Capacity Command, defined in SFF-8070i(ATAPI Removable Rewritable Specification). /// typedef struct { - UINT8 opcode; - UINT8 reserved_1 : 5; - UINT8 lun : 3; - UINT8 reserved_2; - UINT8 reserved_3; - UINT8 reserved_4; - UINT8 reserved_5; - UINT8 reserved_6; - UINT8 allocation_length_hi; - UINT8 allocation_length_lo; - UINT8 reserved_9; - UINT8 reserved_10; - UINT8 reserved_11; + UINT8 opcode; + UINT8 reserved_1 : 5; + UINT8 lun : 3; + UINT8 reserved_2; + UINT8 reserved_3; + UINT8 reserved_4; + UINT8 reserved_5; + UINT8 reserved_6; + UINT8 allocation_length_hi; + UINT8 allocation_length_lo; + UINT8 reserved_9; + UINT8 reserved_10; + UINT8 reserved_11; } ATAPI_READ_FORMAT_CAP_CMD; /// /// MODE SENSE Command, defined in SFF-8070i(ATAPI Removable Rewritable Specification). /// typedef struct { - UINT8 opcode; - UINT8 reserved_1 : 5; - UINT8 lun : 3; - UINT8 page_code : 6; - UINT8 page_control : 2; - UINT8 reserved_3; - UINT8 reserved_4; - UINT8 reserved_5; - UINT8 reserved_6; - UINT8 parameter_list_length_hi; - UINT8 parameter_list_length_lo; - UINT8 reserved_9; - UINT8 reserved_10; - UINT8 reserved_11; + UINT8 opcode; + UINT8 reserved_1 : 5; + UINT8 lun : 3; + UINT8 page_code : 6; + UINT8 page_control : 2; + UINT8 reserved_3; + UINT8 reserved_4; + UINT8 reserved_5; + UINT8 reserved_6; + UINT8 parameter_list_length_hi; + UINT8 parameter_list_length_lo; + UINT8 reserved_9; + UINT8 reserved_10; + UINT8 reserved_11; } ATAPI_MODE_SENSE_CMD; /// @@ -455,83 +454,82 @@ typedef struct { /// We add it here for the convenience of ATA/ATAPI module writers. /// typedef union { - UINT16 Data16[6]; - ATAPI_TEST_UNIT_READY_CMD TestUnitReady; - ATAPI_READ10_CMD Read10; - ATAPI_REQUEST_SENSE_CMD RequestSence; - ATAPI_INQUIRY_CMD Inquiry; - ATAPI_MODE_SENSE_CMD ModeSense; - ATAPI_READ_FORMAT_CAP_CMD ReadFormatCapacity; + UINT16 Data16[6]; + ATAPI_TEST_UNIT_READY_CMD TestUnitReady; + ATAPI_READ10_CMD Read10; + ATAPI_REQUEST_SENSE_CMD RequestSence; + ATAPI_INQUIRY_CMD Inquiry; + ATAPI_MODE_SENSE_CMD ModeSense; + ATAPI_READ_FORMAT_CAP_CMD ReadFormatCapacity; } ATAPI_PACKET_COMMAND; #pragma pack() - -#define ATAPI_MAX_DMA_EXT_CMD_SECTORS 0x10000 -#define ATAPI_MAX_DMA_CMD_SECTORS 0x100 +#define ATAPI_MAX_DMA_EXT_CMD_SECTORS 0x10000 +#define ATAPI_MAX_DMA_CMD_SECTORS 0x100 // ATA/ATAPI Signature equates -#define ATA_SIGNATURE 0x0101 ///< defined in ACS-3 -#define ATAPI_SIGNATURE 0xeb14 ///< defined in ACS-3 -#define ATAPI_SIGNATURE_32 0xeb140101 ///< defined in ACS-3 +#define ATA_SIGNATURE 0x0101 ///< defined in ACS-3 +#define ATAPI_SIGNATURE 0xeb14 ///< defined in ACS-3 +#define ATAPI_SIGNATURE_32 0xeb140101 ///< defined in ACS-3 // Spin Up Configuration definitions -#define ATA_SPINUP_CFG_REQUIRED_IDD_INCOMPLETE 0x37c8 ///< defined in ACS-3 -#define ATA_SPINUP_CFG_REQUIRED_IDD_COMPLETE 0x738c ///< defined in ACS-3 -#define ATA_SPINUP_CFG_NOT_REQUIRED_IDD_INCOMPLETE 0x8c73 ///< defined in ACS-3 -#define ATA_SPINUP_CFG_NOT_REQUIRED_IDD_COMPLETE 0xc837 ///< defined in ACS-3 +#define ATA_SPINUP_CFG_REQUIRED_IDD_INCOMPLETE 0x37c8 ///< defined in ACS-3 +#define ATA_SPINUP_CFG_REQUIRED_IDD_COMPLETE 0x738c ///< defined in ACS-3 +#define ATA_SPINUP_CFG_NOT_REQUIRED_IDD_INCOMPLETE 0x8c73 ///< defined in ACS-3 +#define ATA_SPINUP_CFG_NOT_REQUIRED_IDD_COMPLETE 0xc837 ///< defined in ACS-3 // // ATA Packet Command Code // -#define ATA_CMD_FORMAT_UNIT 0x04 ///< defined in ATAPI Removable Rewritable Media Devices -#define ATA_CMD_SOFT_RESET 0x08 ///< defined from ATA-3 -#define ATA_CMD_PACKET 0xA0 ///< defined from ATA-3 -#define ATA_CMD_IDENTIFY_DEVICE 0xA1 ///< defined from ATA-3 -#define ATA_CMD_SERVICE 0xA2 ///< defined from ATA-3 -#define ATA_CMD_TEST_UNIT_READY 0x00 ///< defined from ATA-1 -#define ATA_CMD_REQUEST_SENSE 0x03 ///< defined from ATA-4 -#define ATA_CMD_INQUIRY 0x12 ///< defined in ATAPI Removable Rewritable Media Devices -#define ATA_CMD_READ_FORMAT_CAPACITY 0x23 ///< defined in ATAPI Removable Rewritable Media Devices -#define ATA_CMD_READ_CAPACITY 0x25 ///< defined in ATAPI Removable Rewritable Media Devices -#define ATA_CMD_READ_10 0x28 ///< defined in ATAPI Removable Rewritable Media Devices -#define ATA_CMD_WRITE_10 0x2A ///< defined in ATAPI Removable Rewritable Media Devices -#define ATA_CMD_ATAPI_SEEK 0x2B ///< defined in ATAPI Removable Rewritable Media Devices -#define ATA_CMD_WRITE_AND_VERIFY 0x2E ///< defined in ATAPI Removable Rewritable Media Devices -#define ATA_CMD_VERIFY 0x2F ///< defined in ATAPI Removable Rewritable Media Devices -#define ATA_CMD_READ_12 0xA8 ///< defined in ATAPI Removable Rewritable Media Devices -#define ATA_CMD_WRITE_12 0xAA ///< defined in ATAPI Removable Rewritable Media Devices -#define ATA_CMD_START_STOP_UNIT 0x1B ///< defined in ATAPI Removable Rewritable Media Devices -#define ATA_CMD_PREVENT_ALLOW_MEDIA_REMOVAL 0x1E ///< defined in ATAPI Removable Rewritable Media Devices -#define ATA_CMD_MODE_SELECT 0x55 ///< defined in ATAPI Removable Rewritable Media Devices - -#define ATA_CMD_MODE_SENSE 0x5A ///< defined in ATAPI Removable Rewritable Media Devices - #define ATA_PAGE_CODE_READ_WRITE_ERROR 0x01 ///< defined in ATAPI Removable Rewritable Media Devices - #define ATA_PAGE_CODE_CACHING_PAGE 0x08 ///< defined in ATAPI Removable Rewritable Media Devices - #define ATA_PAGE_CODE_REMOVABLE_BLOCK_CAPABILITIES 0x1B ///< defined in ATAPI Removable Rewritable Media Devices - #define ATA_PAGE_CODE_TIMER_PROTECT_PAGE 0x1C ///< defined in ATAPI Removable Rewritable Media Devices - #define ATA_PAGE_CODE_RETURN_ALL_PAGES 0x3F ///< defined in ATAPI Removable Rewritable Media Devices - -#define ATA_CMD_GET_CONFIGURATION 0x46 ///< defined in ATAPI Multimedia Devices - #define ATA_GCCD_RT_FIELD_VALUE_ALL 0x00 ///< defined in ATAPI Multimedia Devices - #define ATA_GCCD_RT_FIELD_VALUE_CURRENT 0x01 ///< defined in ATAPI Multimedia Devices - #define ATA_GCCD_RT_FIELD_VALUE_SINGLE 0x02 ///< defined in ATAPI Multimedia Devices - #define ATA_GCCD_RT_FIELD_VALUE_RESERVED 0x03 ///< defined in ATAPI Multimedia Devices - - #define ATA_FEATURE_LIST_PROFILE_LIST 0x0000 ///< defined in ATAPI Multimedia Devices - #define ATA_FEATURE_LIST_CORE 0x0001 ///< defined in ATAPI Multimedia Devices - #define ATA_FEATURE_LIST_MORPHING 0x0002 ///< defined in ATAPI Multimedia Devices - #define ATA_FEATURE_LIST_REMOVEABLE_MEDIUM 0x0003 ///< defined in ATAPI Multimedia Devices - #define ATA_FEATURE_LIST_WRITE_PROTECT 0x0004 ///< defined in ATAPI Multimedia Devices +#define ATA_CMD_FORMAT_UNIT 0x04 ///< defined in ATAPI Removable Rewritable Media Devices +#define ATA_CMD_SOFT_RESET 0x08 ///< defined from ATA-3 +#define ATA_CMD_PACKET 0xA0 ///< defined from ATA-3 +#define ATA_CMD_IDENTIFY_DEVICE 0xA1 ///< defined from ATA-3 +#define ATA_CMD_SERVICE 0xA2 ///< defined from ATA-3 +#define ATA_CMD_TEST_UNIT_READY 0x00 ///< defined from ATA-1 +#define ATA_CMD_REQUEST_SENSE 0x03 ///< defined from ATA-4 +#define ATA_CMD_INQUIRY 0x12 ///< defined in ATAPI Removable Rewritable Media Devices +#define ATA_CMD_READ_FORMAT_CAPACITY 0x23 ///< defined in ATAPI Removable Rewritable Media Devices +#define ATA_CMD_READ_CAPACITY 0x25 ///< defined in ATAPI Removable Rewritable Media Devices +#define ATA_CMD_READ_10 0x28 ///< defined in ATAPI Removable Rewritable Media Devices +#define ATA_CMD_WRITE_10 0x2A ///< defined in ATAPI Removable Rewritable Media Devices +#define ATA_CMD_ATAPI_SEEK 0x2B ///< defined in ATAPI Removable Rewritable Media Devices +#define ATA_CMD_WRITE_AND_VERIFY 0x2E ///< defined in ATAPI Removable Rewritable Media Devices +#define ATA_CMD_VERIFY 0x2F ///< defined in ATAPI Removable Rewritable Media Devices +#define ATA_CMD_READ_12 0xA8 ///< defined in ATAPI Removable Rewritable Media Devices +#define ATA_CMD_WRITE_12 0xAA ///< defined in ATAPI Removable Rewritable Media Devices +#define ATA_CMD_START_STOP_UNIT 0x1B ///< defined in ATAPI Removable Rewritable Media Devices +#define ATA_CMD_PREVENT_ALLOW_MEDIA_REMOVAL 0x1E ///< defined in ATAPI Removable Rewritable Media Devices +#define ATA_CMD_MODE_SELECT 0x55 ///< defined in ATAPI Removable Rewritable Media Devices + +#define ATA_CMD_MODE_SENSE 0x5A ///< defined in ATAPI Removable Rewritable Media Devices +#define ATA_PAGE_CODE_READ_WRITE_ERROR 0x01 ///< defined in ATAPI Removable Rewritable Media Devices +#define ATA_PAGE_CODE_CACHING_PAGE 0x08 ///< defined in ATAPI Removable Rewritable Media Devices +#define ATA_PAGE_CODE_REMOVABLE_BLOCK_CAPABILITIES 0x1B ///< defined in ATAPI Removable Rewritable Media Devices +#define ATA_PAGE_CODE_TIMER_PROTECT_PAGE 0x1C ///< defined in ATAPI Removable Rewritable Media Devices +#define ATA_PAGE_CODE_RETURN_ALL_PAGES 0x3F ///< defined in ATAPI Removable Rewritable Media Devices + +#define ATA_CMD_GET_CONFIGURATION 0x46 ///< defined in ATAPI Multimedia Devices +#define ATA_GCCD_RT_FIELD_VALUE_ALL 0x00 ///< defined in ATAPI Multimedia Devices +#define ATA_GCCD_RT_FIELD_VALUE_CURRENT 0x01 ///< defined in ATAPI Multimedia Devices +#define ATA_GCCD_RT_FIELD_VALUE_SINGLE 0x02 ///< defined in ATAPI Multimedia Devices +#define ATA_GCCD_RT_FIELD_VALUE_RESERVED 0x03 ///< defined in ATAPI Multimedia Devices + +#define ATA_FEATURE_LIST_PROFILE_LIST 0x0000 ///< defined in ATAPI Multimedia Devices +#define ATA_FEATURE_LIST_CORE 0x0001 ///< defined in ATAPI Multimedia Devices +#define ATA_FEATURE_LIST_MORPHING 0x0002 ///< defined in ATAPI Multimedia Devices +#define ATA_FEATURE_LIST_REMOVEABLE_MEDIUM 0x0003 ///< defined in ATAPI Multimedia Devices +#define ATA_FEATURE_LIST_WRITE_PROTECT 0x0004 ///< defined in ATAPI Multimedia Devices /// /// Start/Stop and Eject Operations /// ///@{ -#define ATA_CMD_SUBOP_STOP_DISC 0x00 ///< Stop the Disc -#define ATA_CMD_SUBOP_START_DISC 0x01 ///< Start the Disc and acquire the format type -#define ATA_CMD_SUBOP_EJECT_DISC 0x02 ///< Eject the Disc if possible -#define ATA_CMD_SUBOP_CLOSE_TRAY 0x03 ///< Load the Disc (Close Tray) +#define ATA_CMD_SUBOP_STOP_DISC 0x00 ///< Stop the Disc +#define ATA_CMD_SUBOP_START_DISC 0x01 ///< Start the Disc and acquire the format type +#define ATA_CMD_SUBOP_EJECT_DISC 0x02 ///< Eject the Disc if possible +#define ATA_CMD_SUBOP_CLOSE_TRAY 0x03 ///< Load the Disc (Close Tray) ///@} // @@ -541,234 +539,234 @@ typedef union { // // Class 1: PIO Data-In Commands // -#define ATA_CMD_IDENTIFY_DRIVE 0xec ///< defined from ATA-3 -#define ATA_CMD_READ_BUFFER 0xe4 ///< defined from ATA-1 -#define ATA_CMD_READ_SECTORS 0x20 ///< defined from ATA-1 -#define ATA_CMD_READ_SECTORS_WITH_RETRY 0x21 ///< defined from ATA-1, obsoleted from ATA-5 -#define ATA_CMD_READ_LONG 0x22 ///< defined from ATA-1, obsoleted from ATA-5 -#define ATA_CMD_READ_LONG_WITH_RETRY 0x23 ///< defined from ATA-1, obsoleted from ATA-5 -#define ATA_CMD_READ_SECTORS_EXT 0x24 ///< defined from ATA-6 -#define ATA_CMD_READ_MULTIPLE 0xc4 ///< defined in ACS-3 -#define ATA_CMD_READ_MULTIPLE_EXT 0x29 ///< defined in ACS-3 -#define ATA_CMD_READ_LOG_EXT 0x2f ///< defined in ACS-3 +#define ATA_CMD_IDENTIFY_DRIVE 0xec ///< defined from ATA-3 +#define ATA_CMD_READ_BUFFER 0xe4 ///< defined from ATA-1 +#define ATA_CMD_READ_SECTORS 0x20 ///< defined from ATA-1 +#define ATA_CMD_READ_SECTORS_WITH_RETRY 0x21 ///< defined from ATA-1, obsoleted from ATA-5 +#define ATA_CMD_READ_LONG 0x22 ///< defined from ATA-1, obsoleted from ATA-5 +#define ATA_CMD_READ_LONG_WITH_RETRY 0x23 ///< defined from ATA-1, obsoleted from ATA-5 +#define ATA_CMD_READ_SECTORS_EXT 0x24 ///< defined from ATA-6 +#define ATA_CMD_READ_MULTIPLE 0xc4 ///< defined in ACS-3 +#define ATA_CMD_READ_MULTIPLE_EXT 0x29 ///< defined in ACS-3 +#define ATA_CMD_READ_LOG_EXT 0x2f ///< defined in ACS-3 // // Class 2: PIO Data-Out Commands // -#define ATA_CMD_FORMAT_TRACK 0x50 ///< defined from ATA-1, obsoleted from ATA-4 -#define ATA_CMD_WRITE_BUFFER 0xe8 ///< defined from ATA-1 -#define ATA_CMD_WRITE_SECTORS 0x30 ///< defined from ATA-1 -#define ATA_CMD_WRITE_SECTORS_WITH_RETRY 0x31 ///< defined from ATA-1, obsoleted from ATA-5 -#define ATA_CMD_WRITE_LONG 0x32 ///< defined from ATA-1, obsoleted from ATA-5 -#define ATA_CMD_WRITE_LONG_WITH_RETRY 0x33 ///< defined from ATA-1, obsoleted from ATA-5 -#define ATA_CMD_WRITE_VERIFY 0x3c ///< defined from ATA-1, obsoleted from ATA-5 -#define ATA_CMD_WRITE_SECTORS_EXT 0x34 ///< defined from ATA-6 -#define ATA_CMD_WRITE_MULTIPLE 0xc5 ///< defined in ACS-3 -#define ATA_CMD_WRITE_MULTIPLE_EXT 0x39 ///< defined in ACS-3 +#define ATA_CMD_FORMAT_TRACK 0x50 ///< defined from ATA-1, obsoleted from ATA-4 +#define ATA_CMD_WRITE_BUFFER 0xe8 ///< defined from ATA-1 +#define ATA_CMD_WRITE_SECTORS 0x30 ///< defined from ATA-1 +#define ATA_CMD_WRITE_SECTORS_WITH_RETRY 0x31 ///< defined from ATA-1, obsoleted from ATA-5 +#define ATA_CMD_WRITE_LONG 0x32 ///< defined from ATA-1, obsoleted from ATA-5 +#define ATA_CMD_WRITE_LONG_WITH_RETRY 0x33 ///< defined from ATA-1, obsoleted from ATA-5 +#define ATA_CMD_WRITE_VERIFY 0x3c ///< defined from ATA-1, obsoleted from ATA-5 +#define ATA_CMD_WRITE_SECTORS_EXT 0x34 ///< defined from ATA-6 +#define ATA_CMD_WRITE_MULTIPLE 0xc5 ///< defined in ACS-3 +#define ATA_CMD_WRITE_MULTIPLE_EXT 0x39 ///< defined in ACS-3 // // Class 3 No Data Command // -#define ATA_CMD_ACK_MEDIA_CHANGE 0xdb ///< defined from ATA-1, obsoleted from ATA-5 -#define ATA_CMD_BOOT_POST_BOOT 0xdc ///< defined from ATA-1, obsoleted from ATA-3 -#define ATA_CMD_BOOT_PRE_BOOT 0xdd ///< defined from ATA-1, obsoleted from ATA-3 -#define ATA_CMD_CHECK_POWER_MODE 0x98 ///< defined from ATA-1, obsoleted from ATA-4 -#define ATA_CMD_CHECK_POWER_MODE_ALIAS 0xe5 ///< defined from ATA-1 -#define ATA_CMD_DOOR_LOCK 0xde ///< defined from ATA-1 -#define ATA_CMD_DOOR_UNLOCK 0xdf ///< defined from ATA-1 -#define ATA_CMD_EXEC_DRIVE_DIAG 0x90 ///< defined from ATA-1 -#define ATA_CMD_IDLE_ALIAS 0x97 ///< defined from ATA-1, obsoleted from ATA-4 -#define ATA_CMD_IDLE 0xe3 ///< defined from ATA-1 -#define ATA_CMD_IDLE_IMMEDIATE 0x95 ///< defined from ATA-1, obsoleted from ATA-4 -#define ATA_CMD_IDLE_IMMEDIATE_ALIAS 0xe1 ///< defined from ATA-1 -#define ATA_CMD_INIT_DRIVE_PARAM 0x91 ///< defined from ATA-1, obsoleted from ATA-6 -#define ATA_CMD_RECALIBRATE 0x10 ///< defined from ATA-1, obsoleted from ATA-4 -#define ATA_CMD_READ_DRIVE_STATE 0xe9 ///< defined from ATA-1, obsoleted from ATA-3 -#define ATA_CMD_SET_MULTIPLE_MODE 0xC6 ///< defined from ATA-2 -#define ATA_CMD_READ_VERIFY 0x40 ///< defined from ATA-1 -#define ATA_CMD_READ_VERIFY_WITH_RETRY 0x41 ///< defined from ATA-1, obsoleted from ATA-5 -#define ATA_CMD_SEEK 0x70 ///< defined from ATA-1 -#define ATA_CMD_SET_FEATURES 0xef ///< defined from ATA-1 -#define ATA_CMD_STANDBY 0x96 ///< defined from ATA-1, obsoleted from ATA-4 -#define ATA_CMD_STANDBY_ALIAS 0xe2 ///< defined from ATA-1 -#define ATA_CMD_STANDBY_IMMEDIATE 0x94 ///< defined from ATA-1, obsoleted from ATA-4 -#define ATA_CMD_STANDBY_IMMEDIATE_ALIAS 0xe0 ///< defined from ATA-1 -#define ATA_CMD_SLEEP 0xe6 ///< defined in ACS-3 -#define ATA_CMD_READ_NATIVE_MAX_ADDRESS 0xf8 ///< defined in ATA-6 -#define ATA_CMD_READ_NATIVE_MAX_ADDRESS_EXT 0x27 ///< defined in ATA-6 +#define ATA_CMD_ACK_MEDIA_CHANGE 0xdb ///< defined from ATA-1, obsoleted from ATA-5 +#define ATA_CMD_BOOT_POST_BOOT 0xdc ///< defined from ATA-1, obsoleted from ATA-3 +#define ATA_CMD_BOOT_PRE_BOOT 0xdd ///< defined from ATA-1, obsoleted from ATA-3 +#define ATA_CMD_CHECK_POWER_MODE 0x98 ///< defined from ATA-1, obsoleted from ATA-4 +#define ATA_CMD_CHECK_POWER_MODE_ALIAS 0xe5 ///< defined from ATA-1 +#define ATA_CMD_DOOR_LOCK 0xde ///< defined from ATA-1 +#define ATA_CMD_DOOR_UNLOCK 0xdf ///< defined from ATA-1 +#define ATA_CMD_EXEC_DRIVE_DIAG 0x90 ///< defined from ATA-1 +#define ATA_CMD_IDLE_ALIAS 0x97 ///< defined from ATA-1, obsoleted from ATA-4 +#define ATA_CMD_IDLE 0xe3 ///< defined from ATA-1 +#define ATA_CMD_IDLE_IMMEDIATE 0x95 ///< defined from ATA-1, obsoleted from ATA-4 +#define ATA_CMD_IDLE_IMMEDIATE_ALIAS 0xe1 ///< defined from ATA-1 +#define ATA_CMD_INIT_DRIVE_PARAM 0x91 ///< defined from ATA-1, obsoleted from ATA-6 +#define ATA_CMD_RECALIBRATE 0x10 ///< defined from ATA-1, obsoleted from ATA-4 +#define ATA_CMD_READ_DRIVE_STATE 0xe9 ///< defined from ATA-1, obsoleted from ATA-3 +#define ATA_CMD_SET_MULTIPLE_MODE 0xC6 ///< defined from ATA-2 +#define ATA_CMD_READ_VERIFY 0x40 ///< defined from ATA-1 +#define ATA_CMD_READ_VERIFY_WITH_RETRY 0x41 ///< defined from ATA-1, obsoleted from ATA-5 +#define ATA_CMD_SEEK 0x70 ///< defined from ATA-1 +#define ATA_CMD_SET_FEATURES 0xef ///< defined from ATA-1 +#define ATA_CMD_STANDBY 0x96 ///< defined from ATA-1, obsoleted from ATA-4 +#define ATA_CMD_STANDBY_ALIAS 0xe2 ///< defined from ATA-1 +#define ATA_CMD_STANDBY_IMMEDIATE 0x94 ///< defined from ATA-1, obsoleted from ATA-4 +#define ATA_CMD_STANDBY_IMMEDIATE_ALIAS 0xe0 ///< defined from ATA-1 +#define ATA_CMD_SLEEP 0xe6 ///< defined in ACS-3 +#define ATA_CMD_READ_NATIVE_MAX_ADDRESS 0xf8 ///< defined in ATA-6 +#define ATA_CMD_READ_NATIVE_MAX_ADDRESS_EXT 0x27 ///< defined in ATA-6 // // Set Features Sub Command // -#define ATA_SUB_CMD_ENABLE_VOLATILE_WRITE_CACHE 0x02 ///< defined in ACS-3 -#define ATA_SUB_CMD_SET_TRANSFER_MODE 0x03 ///< defined in ACS-3 -#define ATA_SUB_CMD_ENABLE_APM 0x05 ///< defined in ACS-3 -#define ATA_SUB_CMD_ENABLE_PUIS 0x06 ///< defined in ACS-3 -#define ATA_SUB_CMD_PUIS_SET_DEVICE_SPINUP 0x07 ///< defined in ACS-3 -#define ATA_SUB_CMD_ENABLE_WRITE_READ_VERIFY 0x0b ///< defined in ACS-3 -#define ATA_SUB_CMD_ENABLE_SATA_FEATURE 0x10 ///< defined in ACS-3 -#define ATA_SUB_CMD_DISABLE_MEDIA_STATUS_NOTIFICATION 0x31 ///< defined in ACS-3 -#define ATA_SUB_CMD_ENABLE_FREE_FALL_CONTROL 0x41 ///< defined in ACS-3 -#define ATA_SUB_CMD_ACOUSTIC_MANAGEMENT_ENABLE 0x42 ///< defined in ACS-3 -#define ATA_SUB_CMD_SET_MAX_HOST_INTERFACE_SECTOR_TIMES 0x43 ///< defined in ACS-3 -#define ATA_SUB_CMD_EXTENDED_POWER_CONDITIONS 0x4a ///< defined in ACS-3 -#define ATA_SUB_CMD_DISABLE_READ_LOOK_AHEAD 0x55 ///< defined in ACS-3 -#define ATA_SUB_CMD_EN_DIS_DSN_FEATURE 0x63 ///< defined in ACS-3 -#define ATA_SUB_CMD_DISABLE_REVERT_TO_POWER_ON_DEFAULTS 0x66 ///< defined in ACS-3 -#define ATA_SUB_CMD_DISABLE_VOLATILE_WRITE_CACHE 0x82 ///< defined in ACS-3 -#define ATA_SUB_CMD_DISABLE_APM 0x85 ///< defined in ACS-3 -#define ATA_SUB_CMD_DISABLE_PUIS 0x86 ///< defined in ACS-3 -#define ATA_SUB_CMD_DISABLE_WRITE_READ_VERIFY 0x8b ///< defined in ACS-3 -#define ATA_SUB_CMD_DISABLE_SATA_FEATURE 0x90 ///< defined in ACS-3 -#define ATA_SUB_CMD_ENABLE_MEDIA_STATUS_NOTIFICATION 0x95 ///< defined in ACS-3 -#define ATA_SUB_CMD_ENABLE_READ_LOOK_AHEAD 0xaa ///< defined in ACS-3 -#define ATA_SUB_CMD_DISABLE_FREE_FALL_CONTROL 0xc1 ///< defined in ACS-3 -#define ATA_SUB_CMD_ACOUSTIC_MANAGEMENT_DISABLE 0xc2 ///< defined in ACS-3 -#define ATA_SUB_CMD_EN_DIS_SENSE_DATA_REPORTING 0xc3 ///< defined in ACS-3 -#define ATA_SUB_CMD_ENABLE_REVERT_TO_POWER_ON_DEFAULTS 0xcc ///< defined in ACS-3 +#define ATA_SUB_CMD_ENABLE_VOLATILE_WRITE_CACHE 0x02 ///< defined in ACS-3 +#define ATA_SUB_CMD_SET_TRANSFER_MODE 0x03 ///< defined in ACS-3 +#define ATA_SUB_CMD_ENABLE_APM 0x05 ///< defined in ACS-3 +#define ATA_SUB_CMD_ENABLE_PUIS 0x06 ///< defined in ACS-3 +#define ATA_SUB_CMD_PUIS_SET_DEVICE_SPINUP 0x07 ///< defined in ACS-3 +#define ATA_SUB_CMD_ENABLE_WRITE_READ_VERIFY 0x0b ///< defined in ACS-3 +#define ATA_SUB_CMD_ENABLE_SATA_FEATURE 0x10 ///< defined in ACS-3 +#define ATA_SUB_CMD_DISABLE_MEDIA_STATUS_NOTIFICATION 0x31 ///< defined in ACS-3 +#define ATA_SUB_CMD_ENABLE_FREE_FALL_CONTROL 0x41 ///< defined in ACS-3 +#define ATA_SUB_CMD_ACOUSTIC_MANAGEMENT_ENABLE 0x42 ///< defined in ACS-3 +#define ATA_SUB_CMD_SET_MAX_HOST_INTERFACE_SECTOR_TIMES 0x43 ///< defined in ACS-3 +#define ATA_SUB_CMD_EXTENDED_POWER_CONDITIONS 0x4a ///< defined in ACS-3 +#define ATA_SUB_CMD_DISABLE_READ_LOOK_AHEAD 0x55 ///< defined in ACS-3 +#define ATA_SUB_CMD_EN_DIS_DSN_FEATURE 0x63 ///< defined in ACS-3 +#define ATA_SUB_CMD_DISABLE_REVERT_TO_POWER_ON_DEFAULTS 0x66 ///< defined in ACS-3 +#define ATA_SUB_CMD_DISABLE_VOLATILE_WRITE_CACHE 0x82 ///< defined in ACS-3 +#define ATA_SUB_CMD_DISABLE_APM 0x85 ///< defined in ACS-3 +#define ATA_SUB_CMD_DISABLE_PUIS 0x86 ///< defined in ACS-3 +#define ATA_SUB_CMD_DISABLE_WRITE_READ_VERIFY 0x8b ///< defined in ACS-3 +#define ATA_SUB_CMD_DISABLE_SATA_FEATURE 0x90 ///< defined in ACS-3 +#define ATA_SUB_CMD_ENABLE_MEDIA_STATUS_NOTIFICATION 0x95 ///< defined in ACS-3 +#define ATA_SUB_CMD_ENABLE_READ_LOOK_AHEAD 0xaa ///< defined in ACS-3 +#define ATA_SUB_CMD_DISABLE_FREE_FALL_CONTROL 0xc1 ///< defined in ACS-3 +#define ATA_SUB_CMD_ACOUSTIC_MANAGEMENT_DISABLE 0xc2 ///< defined in ACS-3 +#define ATA_SUB_CMD_EN_DIS_SENSE_DATA_REPORTING 0xc3 ///< defined in ACS-3 +#define ATA_SUB_CMD_ENABLE_REVERT_TO_POWER_ON_DEFAULTS 0xcc ///< defined in ACS-3 // // S.M.A.R.T // -#define ATA_CMD_SMART 0xb0 ///< defined from ATA-3 -#define ATA_CONSTANT_C2 0xc2 ///< reserved -#define ATA_CONSTANT_4F 0x4f ///< reserved - -#define ATA_SMART_READ_DATA 0xd0 ///< defined in ACS-3 - -#define ATA_SMART_AUTOSAVE 0xd2 ///< defined in ACS-3 - #define ATA_AUTOSAVE_DISABLE_ATTR 0x00 - #define ATA_AUTOSAVE_ENABLE_ATTR 0xf1 - -#define ATA_SMART_EXECUTE_OFFLINE_IMMEDIATE 0xd4 ///< defined in ACS-3 - #define ATA_EXECUTE_SMART_OFFLINE_ROUTINE 0x00 ///< defined in ACS-3 - #define ATA_EXECUTE_SMART_OFFLINE_SHORT_SELFTEST 0x01 ///< defined in ACS-3 - #define ATA_EXECUTE_SMART_OFFLINE_EXTENDED_SELFTEST 0x02 ///< defined in ACS-3 - #define ATA_EXECUTE_SMART_OFFLINE_CONVEYANCE_SELFTEST 0x03 ///< defined in ACS-3 - #define ATA_EXECUTE_SMART_OFFLINE_SELECTIVE_SELFTEST 0x04 ///< defined in ACS-3 - #define ATA_SMART_ABORT_SELF_TEST_SUBROUTINE 0x7f ///< defined in ACS-3 - #define ATA_EXECUTE_SMART_CAPTIVE_SHORT_SELFTEST 0x81 ///< defined in ACS-3 - #define ATA_EXECUTE_SMART_CAPTIVE_EXTENDED_SELFTEST 0x82 ///< defined in ACS-3 - #define ATA_EXECUTE_SMART_CAPTIVE_CONVEYANCE_SELFTEST 0x83 ///< defined in ACS-3 - #define ATA_EXECUTE_SMART_CAPTIVE_SELECTIVE_SELFTEST 0x84 ///< defined in ACS-3 - -#define ATA_SMART_READLOG 0xd5 ///< defined in ACS-3 -#define ATA_SMART_WRITELOG 0xd6 ///< defined in ACS-3 -#define ATA_SMART_ENABLE_OPERATION 0xd8 ///< reserved -#define ATA_SMART_DISABLE_OPERATION 0xd9 ///< defined in ACS-3 -#define ATA_SMART_RETURN_STATUS 0xda ///< defined from ATA-3 - -#define ATA_SMART_THRESHOLD_NOT_EXCEEDED_VALUE 0xc24f ///< defined in ACS-3 -#define ATA_SMART_THRESHOLD_EXCEEDED_VALUE 0x2cf4 ///< defined in ACS-3 +#define ATA_CMD_SMART 0xb0 ///< defined from ATA-3 +#define ATA_CONSTANT_C2 0xc2 ///< reserved +#define ATA_CONSTANT_4F 0x4f ///< reserved + +#define ATA_SMART_READ_DATA 0xd0 ///< defined in ACS-3 + +#define ATA_SMART_AUTOSAVE 0xd2 ///< defined in ACS-3 +#define ATA_AUTOSAVE_DISABLE_ATTR 0x00 +#define ATA_AUTOSAVE_ENABLE_ATTR 0xf1 + +#define ATA_SMART_EXECUTE_OFFLINE_IMMEDIATE 0xd4 ///< defined in ACS-3 +#define ATA_EXECUTE_SMART_OFFLINE_ROUTINE 0x00 ///< defined in ACS-3 +#define ATA_EXECUTE_SMART_OFFLINE_SHORT_SELFTEST 0x01 ///< defined in ACS-3 +#define ATA_EXECUTE_SMART_OFFLINE_EXTENDED_SELFTEST 0x02 ///< defined in ACS-3 +#define ATA_EXECUTE_SMART_OFFLINE_CONVEYANCE_SELFTEST 0x03 ///< defined in ACS-3 +#define ATA_EXECUTE_SMART_OFFLINE_SELECTIVE_SELFTEST 0x04 ///< defined in ACS-3 +#define ATA_SMART_ABORT_SELF_TEST_SUBROUTINE 0x7f ///< defined in ACS-3 +#define ATA_EXECUTE_SMART_CAPTIVE_SHORT_SELFTEST 0x81 ///< defined in ACS-3 +#define ATA_EXECUTE_SMART_CAPTIVE_EXTENDED_SELFTEST 0x82 ///< defined in ACS-3 +#define ATA_EXECUTE_SMART_CAPTIVE_CONVEYANCE_SELFTEST 0x83 ///< defined in ACS-3 +#define ATA_EXECUTE_SMART_CAPTIVE_SELECTIVE_SELFTEST 0x84 ///< defined in ACS-3 + +#define ATA_SMART_READLOG 0xd5 ///< defined in ACS-3 +#define ATA_SMART_WRITELOG 0xd6 ///< defined in ACS-3 +#define ATA_SMART_ENABLE_OPERATION 0xd8 ///< reserved +#define ATA_SMART_DISABLE_OPERATION 0xd9 ///< defined in ACS-3 +#define ATA_SMART_RETURN_STATUS 0xda ///< defined from ATA-3 + +#define ATA_SMART_THRESHOLD_NOT_EXCEEDED_VALUE 0xc24f ///< defined in ACS-3 +#define ATA_SMART_THRESHOLD_EXCEEDED_VALUE 0x2cf4 ///< defined in ACS-3 // SMART Log Definitions -#define ATA_SMART_LOG_DIRECTORY 0x00 ///< defined in ACS-3 -#define ATA_SMART_SUM_SMART_ERROR_LOG 0x01 ///< defined in ACS-3 -#define ATA_SMART_COMP_SMART_ERROR_LOG 0x02 ///< defined in ACS-3 -#define ATA_SMART_EXT_COMP_SMART_ERROR_LOG 0x03 ///< defined in ACS-3 -#define ATA_SMART_SMART_SELFTEST_LOG 0x06 ///< defined in ACS-3 -#define ATA_SMART_EXT_SMART_SELFTEST_LOG 0x07 ///< defined in ACS-3 -#define ATA_SMART_SELECTIVE_SELFTEST_LOG 0x09 ///< defined in ACS-3 -#define ATA_SMART_HOST_VENDOR_SPECIFIC 0x80 ///< defined in ACS-3 -#define ATA_SMART_DEVICE_VENDOR_SPECIFIC 0xa0 ///< defined in ACS-3 +#define ATA_SMART_LOG_DIRECTORY 0x00 ///< defined in ACS-3 +#define ATA_SMART_SUM_SMART_ERROR_LOG 0x01 ///< defined in ACS-3 +#define ATA_SMART_COMP_SMART_ERROR_LOG 0x02 ///< defined in ACS-3 +#define ATA_SMART_EXT_COMP_SMART_ERROR_LOG 0x03 ///< defined in ACS-3 +#define ATA_SMART_SMART_SELFTEST_LOG 0x06 ///< defined in ACS-3 +#define ATA_SMART_EXT_SMART_SELFTEST_LOG 0x07 ///< defined in ACS-3 +#define ATA_SMART_SELECTIVE_SELFTEST_LOG 0x09 ///< defined in ACS-3 +#define ATA_SMART_HOST_VENDOR_SPECIFIC 0x80 ///< defined in ACS-3 +#define ATA_SMART_DEVICE_VENDOR_SPECIFIC 0xa0 ///< defined in ACS-3 // // Class 4: DMA Command // -#define ATA_CMD_READ_DMA 0xc8 ///< defined from ATA-1 -#define ATA_CMD_READ_DMA_WITH_RETRY 0xc9 ///< defined from ATA-1, obsoleted from ATA-5 -#define ATA_CMD_READ_DMA_EXT 0x25 ///< defined from ATA-6 -#define ATA_CMD_WRITE_DMA 0xca ///< defined from ATA-1 -#define ATA_CMD_WRITE_DMA_WITH_RETRY 0xcb ///< defined from ATA-1, obsoleted from ATA- -#define ATA_CMD_WRITE_DMA_EXT 0x35 ///< defined from ATA-6 +#define ATA_CMD_READ_DMA 0xc8 ///< defined from ATA-1 +#define ATA_CMD_READ_DMA_WITH_RETRY 0xc9 ///< defined from ATA-1, obsoleted from ATA-5 +#define ATA_CMD_READ_DMA_EXT 0x25 ///< defined from ATA-6 +#define ATA_CMD_WRITE_DMA 0xca ///< defined from ATA-1 +#define ATA_CMD_WRITE_DMA_WITH_RETRY 0xcb ///< defined from ATA-1, obsoleted from ATA- +#define ATA_CMD_WRITE_DMA_EXT 0x35 ///< defined from ATA-6 // // ATA Security commands // -#define ATA_CMD_SECURITY_SET_PASSWORD 0xf1 ///< defined in ACS-3 -#define ATA_CMD_SECURITY_UNLOCK 0xf2 ///< defined in ACS-3 -#define ATA_CMD_SECURITY_ERASE_PREPARE 0xf3 ///< defined in ACS-3 -#define ATA_CMD_SECURITY_ERASE_UNIT 0xf4 ///< defined in ACS-3 -#define ATA_CMD_SECURITY_FREEZE_LOCK 0xf5 ///< defined in ACS-3 -#define ATA_CMD_SECURITY_DISABLE_PASSWORD 0xf6 ///< defined in ACS-3 +#define ATA_CMD_SECURITY_SET_PASSWORD 0xf1 ///< defined in ACS-3 +#define ATA_CMD_SECURITY_UNLOCK 0xf2 ///< defined in ACS-3 +#define ATA_CMD_SECURITY_ERASE_PREPARE 0xf3 ///< defined in ACS-3 +#define ATA_CMD_SECURITY_ERASE_UNIT 0xf4 ///< defined in ACS-3 +#define ATA_CMD_SECURITY_FREEZE_LOCK 0xf5 ///< defined in ACS-3 +#define ATA_CMD_SECURITY_DISABLE_PASSWORD 0xf6 ///< defined in ACS-3 -#define ATA_SECURITY_BUFFER_LENGTH 512 ///< defined in ACS-3 +#define ATA_SECURITY_BUFFER_LENGTH 512 ///< defined in ACS-3 // // ATA Device Config Overlay // -#define ATA_CMD_DEV_CONFIG_OVERLAY 0xb1 ///< defined from ATA-6 - #define ATA_CMD_DEV_CONFIG_RESTORE_FEATURE 0xc0 ///< defined from ATA-6 - #define ATA_CMD_DEV_CONFIG_FREEZELOCK_FEATURE 0xc1 ///< defined from ATA-6 - #define ATA_CMD_DEV_CONFIG_IDENTIFY_FEATURE 0xc2 ///< defined from ATA-6 - #define ATA_CMD_DEV_CONFIG_SET_FEATURE 0xc3 ///< defined from ATA-6 +#define ATA_CMD_DEV_CONFIG_OVERLAY 0xb1 ///< defined from ATA-6 +#define ATA_CMD_DEV_CONFIG_RESTORE_FEATURE 0xc0 ///< defined from ATA-6 +#define ATA_CMD_DEV_CONFIG_FREEZELOCK_FEATURE 0xc1 ///< defined from ATA-6 +#define ATA_CMD_DEV_CONFIG_IDENTIFY_FEATURE 0xc2 ///< defined from ATA-6 +#define ATA_CMD_DEV_CONFIG_SET_FEATURE 0xc3 ///< defined from ATA-6 // // ATA Trusted Computing Feature Set Commands // -#define ATA_CMD_TRUSTED_NON_DATA 0x5b ///< defined in ACS-3 -#define ATA_CMD_TRUSTED_RECEIVE 0x5c ///< defined in ACS-3 -#define ATA_CMD_TRUSTED_RECEIVE_DMA 0x5d ///< defined in ACS-3 -#define ATA_CMD_TRUSTED_SEND 0x5e ///< defined in ACS-3 -#define ATA_CMD_TRUSTED_SEND_DMA 0x5f ///< defined in ACS-3 +#define ATA_CMD_TRUSTED_NON_DATA 0x5b ///< defined in ACS-3 +#define ATA_CMD_TRUSTED_RECEIVE 0x5c ///< defined in ACS-3 +#define ATA_CMD_TRUSTED_RECEIVE_DMA 0x5d ///< defined in ACS-3 +#define ATA_CMD_TRUSTED_SEND 0x5e ///< defined in ACS-3 +#define ATA_CMD_TRUSTED_SEND_DMA 0x5f ///< defined in ACS-3 // // ATA Trusted Receive Fields // -#define ATA_TR_RETURN_SECURITY_PROTOCOL_INFORMATION 0x00 ///< defined in ACS-3 -#define ATA_TR_SECURITY_PROTOCOL_JEDEC_RESERVED 0xec ///< defined in ACS-3 -#define ATA_TR_SECURITY_PROTOCOL_SDCARD_RESERVED 0xed ///< defined in ACS-3 -#define ATA_TR_SECURITY_PROTOCOL_IEEE1667_RESERVED 0xee ///< defined in ACS-3 +#define ATA_TR_RETURN_SECURITY_PROTOCOL_INFORMATION 0x00 ///< defined in ACS-3 +#define ATA_TR_SECURITY_PROTOCOL_JEDEC_RESERVED 0xec ///< defined in ACS-3 +#define ATA_TR_SECURITY_PROTOCOL_SDCARD_RESERVED 0xed ///< defined in ACS-3 +#define ATA_TR_SECURITY_PROTOCOL_IEEE1667_RESERVED 0xee ///< defined in ACS-3 // // Equates used for Acoustic Flags // -#define ATA_ACOUSTIC_LEVEL_BYPASS 0xff ///< defined from ATA-6 -#define ATA_ACOUSTIC_LEVEL_MAXIMUM_PERFORMANCE 0xfe ///< defined from ATA-6 -#define ATA_ACOUSTIC_LEVEL_QUIET 0x80 ///< defined from ATA-6 +#define ATA_ACOUSTIC_LEVEL_BYPASS 0xff ///< defined from ATA-6 +#define ATA_ACOUSTIC_LEVEL_MAXIMUM_PERFORMANCE 0xfe ///< defined from ATA-6 +#define ATA_ACOUSTIC_LEVEL_QUIET 0x80 ///< defined from ATA-6 // // Equates used for DiPM Support // -#define ATA_CMD_DIPM_SUB 0x03 // defined in ACS-3 : Count value in SetFeature identification : 03h Device-initiated interface power state transitions - #define ATA_DIPM_ENABLE 0x10 // defined in ACS-3 - #define ATA_DIPM_DISABLE 0x90 // defined in ACS-3 +#define ATA_CMD_DIPM_SUB 0x03 // defined in ACS-3 : Count value in SetFeature identification : 03h Device-initiated interface power state transitions +#define ATA_DIPM_ENABLE 0x10 // defined in ACS-3 +#define ATA_DIPM_DISABLE 0x90 // defined in ACS-3 // // Equates used for DevSleep Support // -#define ATA_CMD_DEVSLEEP_SUB 0x09 // defined in SATA 3.2 Gold Spec : Count value in SetFeature identification : 09h Device Sleep - #define ATA_DEVSLEEP_ENABLE 0x10 // defined in SATA 3.2 Gold Spec - #define ATA_DEVSLEEP_DISABLE 0x90 // defined in SATA 3.2 Gold Spec +#define ATA_CMD_DEVSLEEP_SUB 0x09 // defined in SATA 3.2 Gold Spec : Count value in SetFeature identification : 09h Device Sleep +#define ATA_DEVSLEEP_ENABLE 0x10 // defined in SATA 3.2 Gold Spec +#define ATA_DEVSLEEP_DISABLE 0x90 // defined in SATA 3.2 Gold Spec -#define ATA_DEVSLP_EXIT_TIMEOUT 20 // MDAT - 20 ms -#define ATA_DEVSLP_MINIMUM_DETECTION_TIME 10 // DMDT - 10 us -#define ATA_DEVSLP_MINIMUM_ASSERTION_TIME 10 // DETO - 10 ms +#define ATA_DEVSLP_EXIT_TIMEOUT 20 // MDAT - 20 ms +#define ATA_DEVSLP_MINIMUM_DETECTION_TIME 10 // DMDT - 10 us +#define ATA_DEVSLP_MINIMUM_ASSERTION_TIME 10 // DETO - 10 ms // // Set MAX Commands // -#define ATA_CMD_SET_MAX_ADDRESS_EXT 0x37 ///< defined from ATA-6 -#define ATA_CMD_SET_MAX_ADDRESS 0xf9 ///< defined from ATA-6 - #define ATA_SET_MAX_SET_PASSWORD 0x01 ///< defined from ATA-6 - #define ATA_SET_MAX_LOCK 0x02 ///< defined from ATA-6 - #define ATA_SET_MAX_UNLOCK 0x03 ///< defined from ATA-6 - #define ATA_SET_MAX_FREEZE_LOCK 0x04 ///< defined from ATA-6 +#define ATA_CMD_SET_MAX_ADDRESS_EXT 0x37 ///< defined from ATA-6 +#define ATA_CMD_SET_MAX_ADDRESS 0xf9 ///< defined from ATA-6 +#define ATA_SET_MAX_SET_PASSWORD 0x01 ///< defined from ATA-6 +#define ATA_SET_MAX_LOCK 0x02 ///< defined from ATA-6 +#define ATA_SET_MAX_UNLOCK 0x03 ///< defined from ATA-6 +#define ATA_SET_MAX_FREEZE_LOCK 0x04 ///< defined from ATA-6 /// /// Default content of device control register, disable INT, /// Bit3 is set to 1 according ATA-1 /// -#define ATA_DEFAULT_CTL (0x0a) +#define ATA_DEFAULT_CTL (0x0a) /// /// Default context of Device/Head Register, /// Bit7 and Bit5 are set to 1 for back-compatibilities. /// -#define ATA_DEFAULT_CMD (0xa0) +#define ATA_DEFAULT_CMD (0xa0) -#define ATAPI_MAX_BYTE_COUNT (0xfffe) +#define ATAPI_MAX_BYTE_COUNT (0xfffe) -#define ATA_REQUEST_SENSE_ERROR (0x70) ///< defined in SFF-8070i +#define ATA_REQUEST_SENSE_ERROR (0x70) ///< defined in SFF-8070i // // Sense Key, Additional Sense Codes and Additional Sense Code Qualifier @@ -776,76 +774,76 @@ typedef union { // // Sense Key // -#define ATA_SK_NO_SENSE (0x0) -#define ATA_SK_RECOVERY_ERROR (0x1) -#define ATA_SK_NOT_READY (0x2) -#define ATA_SK_MEDIUM_ERROR (0x3) -#define ATA_SK_HARDWARE_ERROR (0x4) -#define ATA_SK_ILLEGAL_REQUEST (0x5) -#define ATA_SK_UNIT_ATTENTION (0x6) -#define ATA_SK_DATA_PROTECT (0x7) -#define ATA_SK_BLANK_CHECK (0x8) -#define ATA_SK_VENDOR_SPECIFIC (0x9) -#define ATA_SK_RESERVED_A (0xA) -#define ATA_SK_ABORT (0xB) -#define ATA_SK_RESERVED_C (0xC) -#define ATA_SK_OVERFLOW (0xD) -#define ATA_SK_MISCOMPARE (0xE) -#define ATA_SK_RESERVED_F (0xF) +#define ATA_SK_NO_SENSE (0x0) +#define ATA_SK_RECOVERY_ERROR (0x1) +#define ATA_SK_NOT_READY (0x2) +#define ATA_SK_MEDIUM_ERROR (0x3) +#define ATA_SK_HARDWARE_ERROR (0x4) +#define ATA_SK_ILLEGAL_REQUEST (0x5) +#define ATA_SK_UNIT_ATTENTION (0x6) +#define ATA_SK_DATA_PROTECT (0x7) +#define ATA_SK_BLANK_CHECK (0x8) +#define ATA_SK_VENDOR_SPECIFIC (0x9) +#define ATA_SK_RESERVED_A (0xA) +#define ATA_SK_ABORT (0xB) +#define ATA_SK_RESERVED_C (0xC) +#define ATA_SK_OVERFLOW (0xD) +#define ATA_SK_MISCOMPARE (0xE) +#define ATA_SK_RESERVED_F (0xF) // // Additional Sense Codes // -#define ATA_ASC_NOT_READY (0x04) -#define ATA_ASC_MEDIA_ERR1 (0x10) -#define ATA_ASC_MEDIA_ERR2 (0x11) -#define ATA_ASC_MEDIA_ERR3 (0x14) -#define ATA_ASC_MEDIA_ERR4 (0x30) -#define ATA_ASC_MEDIA_UPSIDE_DOWN (0x06) -#define ATA_ASC_INVALID_CMD (0x20) -#define ATA_ASC_LBA_OUT_OF_RANGE (0x21) -#define ATA_ASC_INVALID_FIELD (0x24) -#define ATA_ASC_WRITE_PROTECTED (0x27) -#define ATA_ASC_MEDIA_CHANGE (0x28) -#define ATA_ASC_RESET (0x29) ///< Power On Reset or Bus Reset occurred. -#define ATA_ASC_ILLEGAL_FIELD (0x26) -#define ATA_ASC_NO_MEDIA (0x3A) -#define ATA_ASC_ILLEGAL_MODE_FOR_THIS_TRACK (0x64) +#define ATA_ASC_NOT_READY (0x04) +#define ATA_ASC_MEDIA_ERR1 (0x10) +#define ATA_ASC_MEDIA_ERR2 (0x11) +#define ATA_ASC_MEDIA_ERR3 (0x14) +#define ATA_ASC_MEDIA_ERR4 (0x30) +#define ATA_ASC_MEDIA_UPSIDE_DOWN (0x06) +#define ATA_ASC_INVALID_CMD (0x20) +#define ATA_ASC_LBA_OUT_OF_RANGE (0x21) +#define ATA_ASC_INVALID_FIELD (0x24) +#define ATA_ASC_WRITE_PROTECTED (0x27) +#define ATA_ASC_MEDIA_CHANGE (0x28) +#define ATA_ASC_RESET (0x29) ///< Power On Reset or Bus Reset occurred. +#define ATA_ASC_ILLEGAL_FIELD (0x26) +#define ATA_ASC_NO_MEDIA (0x3A) +#define ATA_ASC_ILLEGAL_MODE_FOR_THIS_TRACK (0x64) // // Additional Sense Code Qualifier // -#define ATA_ASCQ_IN_PROGRESS (0x01) +#define ATA_ASCQ_IN_PROGRESS (0x01) // // Error Register // -#define ATA_ERRREG_BBK BIT7 ///< Bad block detected defined from ATA-1, obsoleted from ATA-2 -#define ATA_ERRREG_UNC BIT6 ///< Uncorrectable Data defined from ATA-1, obsoleted from ATA-4 -#define ATA_ERRREG_MC BIT5 ///< Media Change defined from ATA-1, obsoleted from ATA-4 -#define ATA_ERRREG_IDNF BIT4 ///< ID Not Found defined from ATA-1, obsoleted from ATA-4 -#define ATA_ERRREG_MCR BIT3 ///< Media Change Requested defined from ATA-1, obsoleted from ATA-4 -#define ATA_ERRREG_ABRT BIT2 ///< Aborted Command defined from ATA-1 -#define ATA_ERRREG_TK0NF BIT1 ///< Track 0 Not Found defined from ATA-1, obsoleted from ATA-4 -#define ATA_ERRREG_AMNF BIT0 ///< Address Mark Not Found defined from ATA-1, obsoleted from ATA-4 +#define ATA_ERRREG_BBK BIT7 ///< Bad block detected defined from ATA-1, obsoleted from ATA-2 +#define ATA_ERRREG_UNC BIT6 ///< Uncorrectable Data defined from ATA-1, obsoleted from ATA-4 +#define ATA_ERRREG_MC BIT5 ///< Media Change defined from ATA-1, obsoleted from ATA-4 +#define ATA_ERRREG_IDNF BIT4 ///< ID Not Found defined from ATA-1, obsoleted from ATA-4 +#define ATA_ERRREG_MCR BIT3 ///< Media Change Requested defined from ATA-1, obsoleted from ATA-4 +#define ATA_ERRREG_ABRT BIT2 ///< Aborted Command defined from ATA-1 +#define ATA_ERRREG_TK0NF BIT1 ///< Track 0 Not Found defined from ATA-1, obsoleted from ATA-4 +#define ATA_ERRREG_AMNF BIT0 ///< Address Mark Not Found defined from ATA-1, obsoleted from ATA-4 // // Status Register // -#define ATA_STSREG_BSY BIT7 ///< Controller Busy defined from ATA-1 -#define ATA_STSREG_DRDY BIT6 ///< Drive Ready defined from ATA-1 -#define ATA_STSREG_DWF BIT5 ///< Drive Write Fault defined from ATA-1, obsoleted from ATA-4 -#define ATA_STSREG_DF BIT5 ///< Drive Fault defined from ATA-6 -#define ATA_STSREG_DSC BIT4 ///< Disk Seek Complete defined from ATA-1, obsoleted from ATA-4 -#define ATA_STSREG_DRQ BIT3 ///< Data Request defined from ATA-1 -#define ATA_STSREG_CORR BIT2 ///< Corrected Data defined from ATA-1, obsoleted from ATA-4 -#define ATA_STSREG_IDX BIT1 ///< Index defined from ATA-1, obsoleted from ATA-4 -#define ATA_STSREG_ERR BIT0 ///< Error defined from ATA-1 +#define ATA_STSREG_BSY BIT7 ///< Controller Busy defined from ATA-1 +#define ATA_STSREG_DRDY BIT6 ///< Drive Ready defined from ATA-1 +#define ATA_STSREG_DWF BIT5 ///< Drive Write Fault defined from ATA-1, obsoleted from ATA-4 +#define ATA_STSREG_DF BIT5 ///< Drive Fault defined from ATA-6 +#define ATA_STSREG_DSC BIT4 ///< Disk Seek Complete defined from ATA-1, obsoleted from ATA-4 +#define ATA_STSREG_DRQ BIT3 ///< Data Request defined from ATA-1 +#define ATA_STSREG_CORR BIT2 ///< Corrected Data defined from ATA-1, obsoleted from ATA-4 +#define ATA_STSREG_IDX BIT1 ///< Index defined from ATA-1, obsoleted from ATA-4 +#define ATA_STSREG_ERR BIT0 ///< Error defined from ATA-1 // // Device Control Register // -#define ATA_CTLREG_SRST BIT2 ///< Software Reset. -#define ATA_CTLREG_IEN_L BIT1 ///< Interrupt Enable #. +#define ATA_CTLREG_SRST BIT2 ///< Software Reset. +#define ATA_CTLREG_IEN_L BIT1 ///< Interrupt Enable #. #endif diff --git a/MdePkg/Include/IndustryStandard/Bluetooth.h b/MdePkg/Include/IndustryStandard/Bluetooth.h index 7597f76..5952830 100644 --- a/MdePkg/Include/IndustryStandard/Bluetooth.h +++ b/MdePkg/Include/IndustryStandard/Bluetooth.h @@ -19,17 +19,17 @@ typedef struct { /// /// 48bit Bluetooth device address. /// - UINT8 Address[6]; + UINT8 Address[6]; } BLUETOOTH_ADDRESS; /// /// BLUETOOTH_CLASS_OF_DEVICE. See Bluetooth specification for detail. /// typedef struct { - UINT8 FormatType:2; - UINT8 MinorDeviceClass: 6; - UINT16 MajorDeviceClass: 5; - UINT16 MajorServiceClass:11; + UINT8 FormatType : 2; + UINT8 MinorDeviceClass : 6; + UINT16 MajorDeviceClass : 5; + UINT16 MajorServiceClass : 11; } BLUETOOTH_CLASS_OF_DEVICE; /// @@ -39,18 +39,18 @@ typedef struct { /// /// 48-bit Bluetooth device address /// - UINT8 Address[6]; + UINT8 Address[6]; /// /// 0x00 - Public Device Address /// 0x01 - Random Device Address /// - UINT8 Type; + UINT8 Type; } BLUETOOTH_LE_ADDRESS; #pragma pack() -#define BLUETOOTH_HCI_COMMAND_LOCAL_READABLE_NAME_MAX_SIZE 248 +#define BLUETOOTH_HCI_COMMAND_LOCAL_READABLE_NAME_MAX_SIZE 248 -#define BLUETOOTH_HCI_LINK_KEY_SIZE 16 +#define BLUETOOTH_HCI_LINK_KEY_SIZE 16 #endif diff --git a/MdePkg/Include/IndustryStandard/Bmp.h b/MdePkg/Include/IndustryStandard/Bmp.h index dd8c26d..ae7dfa9 100644 --- a/MdePkg/Include/IndustryStandard/Bmp.h +++ b/MdePkg/Include/IndustryStandard/Bmp.h @@ -12,29 +12,29 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #pragma pack(1) typedef struct { - UINT8 Blue; - UINT8 Green; - UINT8 Red; - UINT8 Reserved; + UINT8 Blue; + UINT8 Green; + UINT8 Red; + UINT8 Reserved; } BMP_COLOR_MAP; typedef struct { - CHAR8 CharB; - CHAR8 CharM; - UINT32 Size; - UINT16 Reserved[2]; - UINT32 ImageOffset; - UINT32 HeaderSize; - UINT32 PixelWidth; - UINT32 PixelHeight; - UINT16 Planes; ///< Must be 1 - UINT16 BitPerPixel; ///< 1, 4, 8, or 24 - UINT32 CompressionType; - UINT32 ImageSize; ///< Compressed image size in bytes - UINT32 XPixelsPerMeter; - UINT32 YPixelsPerMeter; - UINT32 NumberOfColors; - UINT32 ImportantColors; + CHAR8 CharB; + CHAR8 CharM; + UINT32 Size; + UINT16 Reserved[2]; + UINT32 ImageOffset; + UINT32 HeaderSize; + UINT32 PixelWidth; + UINT32 PixelHeight; + UINT16 Planes; ///< Must be 1 + UINT16 BitPerPixel; ///< 1, 4, 8, or 24 + UINT32 CompressionType; + UINT32 ImageSize; ///< Compressed image size in bytes + UINT32 XPixelsPerMeter; + UINT32 YPixelsPerMeter; + UINT32 NumberOfColors; + UINT32 ImportantColors; } BMP_IMAGE_HEADER; #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/Cxl.h b/MdePkg/Include/IndustryStandard/Cxl.h index 632aa14..06c1230 100644 --- a/MdePkg/Include/IndustryStandard/Cxl.h +++ b/MdePkg/Include/IndustryStandard/Cxl.h @@ -16,7 +16,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // // CXL assigned new Vendor ID // -#define CXL_DVSEC_VENDOR_ID 0x1E98 +#define CXL_DVSEC_VENDOR_ID 0x1E98 #endif - diff --git a/MdePkg/Include/IndustryStandard/Cxl11.h b/MdePkg/Include/IndustryStandard/Cxl11.h index 46cb271..b30bbcc 100644 --- a/MdePkg/Include/IndustryStandard/Cxl11.h +++ b/MdePkg/Include/IndustryStandard/Cxl11.h @@ -18,14 +18,14 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // Compute Express Link Specification Revision: 1.1 - Chapter 7.1.1 - Table 58 // (subject to change as per CXL assigned Vendor ID) // -#define INTEL_CXL_DVSEC_VENDOR_ID 0x8086 +#define INTEL_CXL_DVSEC_VENDOR_ID 0x8086 // // CXL Flex Bus Device default device and function number // Compute Express Link Specification Revision: 1.1 - Chapter 7.1.1 // -#define CXL_DEV_DEV 0 -#define CXL_DEV_FUNC 0 +#define CXL_DEV_DEV 0 +#define CXL_DEV_FUNC 0 // // Ensure proper structure formats @@ -71,189 +71,188 @@ SPDX-License-Identifier: BSD-2-Clause-Patent ///@{ typedef union { struct { - UINT16 CacheCapable : 1; // bit 0 - UINT16 IoCapable : 1; // bit 1 - UINT16 MemCapable : 1; // bit 2 - UINT16 MemHwInitMode : 1; // bit 3 - UINT16 HdmCount : 2; // bit 4..5 - UINT16 Reserved1 : 8; // bit 6..13 - UINT16 ViralCapable : 1; // bit 14 - UINT16 Reserved2 : 1; // bit 15 + UINT16 CacheCapable : 1; // bit 0 + UINT16 IoCapable : 1; // bit 1 + UINT16 MemCapable : 1; // bit 2 + UINT16 MemHwInitMode : 1; // bit 3 + UINT16 HdmCount : 2; // bit 4..5 + UINT16 Reserved1 : 8; // bit 6..13 + UINT16 ViralCapable : 1; // bit 14 + UINT16 Reserved2 : 1; // bit 15 } Bits; - UINT16 Uint16; + UINT16 Uint16; } CXL_DVSEC_FLEX_BUS_DEVICE_CAPABILITY; typedef union { struct { - UINT16 CacheEnable : 1; // bit 0 - UINT16 IoEnable : 1; // bit 1 - UINT16 MemEnable : 1; // bit 2 - UINT16 CacheSfCoverage : 5; // bit 3..7 - UINT16 CacheSfGranularity : 3; // bit 8..10 - UINT16 CacheCleanEviction : 1; // bit 11 - UINT16 Reserved1 : 2; // bit 12..13 - UINT16 ViralEnable : 1; // bit 14 - UINT16 Reserved2 : 1; // bit 15 + UINT16 CacheEnable : 1; // bit 0 + UINT16 IoEnable : 1; // bit 1 + UINT16 MemEnable : 1; // bit 2 + UINT16 CacheSfCoverage : 5; // bit 3..7 + UINT16 CacheSfGranularity : 3; // bit 8..10 + UINT16 CacheCleanEviction : 1; // bit 11 + UINT16 Reserved1 : 2; // bit 12..13 + UINT16 ViralEnable : 1; // bit 14 + UINT16 Reserved2 : 1; // bit 15 } Bits; - UINT16 Uint16; + UINT16 Uint16; } CXL_DVSEC_FLEX_BUS_DEVICE_CONTROL; typedef union { struct { - UINT16 Reserved1 : 14; // bit 0..13 - UINT16 ViralStatus : 1; // bit 14 - UINT16 Reserved2 : 1; // bit 15 + UINT16 Reserved1 : 14; // bit 0..13 + UINT16 ViralStatus : 1; // bit 14 + UINT16 Reserved2 : 1; // bit 15 } Bits; - UINT16 Uint16; + UINT16 Uint16; } CXL_DVSEC_FLEX_BUS_DEVICE_STATUS; typedef union { struct { - UINT16 Reserved1 : 1; // bit 0 - UINT16 Reserved2 : 1; // bit 1 - UINT16 Reserved3 : 1; // bit 2 - UINT16 Reserved4 : 13; // bit 3..15 + UINT16 Reserved1 : 1; // bit 0 + UINT16 Reserved2 : 1; // bit 1 + UINT16 Reserved3 : 1; // bit 2 + UINT16 Reserved4 : 13; // bit 3..15 } Bits; - UINT16 Uint16; + UINT16 Uint16; } CXL_1_1_DVSEC_FLEX_BUS_DEVICE_CONTROL2; typedef union { struct { - UINT16 Reserved1 : 1; // bit 0 - UINT16 Reserved2 : 1; // bit 1 - UINT16 Reserved3 : 14; // bit 2..15 + UINT16 Reserved1 : 1; // bit 0 + UINT16 Reserved2 : 1; // bit 1 + UINT16 Reserved3 : 14; // bit 2..15 } Bits; - UINT16 Uint16; + UINT16 Uint16; } CXL_1_1_DVSEC_FLEX_BUS_DEVICE_STATUS2; typedef union { struct { - UINT16 ConfigLock : 1; // bit 0 - UINT16 Reserved1 : 15; // bit 1..15 + UINT16 ConfigLock : 1; // bit 0 + UINT16 Reserved1 : 15; // bit 1..15 } Bits; - UINT16 Uint16; + UINT16 Uint16; } CXL_DVSEC_FLEX_BUS_DEVICE_LOCK; typedef union { struct { - UINT32 MemorySizeHigh : 32; // bit 0..31 + UINT32 MemorySizeHigh : 32; // bit 0..31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } CXL_DVSEC_FLEX_BUS_DEVICE_RANGE1_SIZE_HIGH; typedef union { struct { - UINT32 MemoryInfoValid : 1; // bit 0 - UINT32 MemoryActive : 1; // bit 1 - UINT32 MediaType : 3; // bit 2..4 - UINT32 MemoryClass : 3; // bit 5..7 - UINT32 DesiredInterleave : 3; // bit 8..10 - UINT32 Reserved : 17; // bit 11..27 - UINT32 MemorySizeLow : 4; // bit 28..31 + UINT32 MemoryInfoValid : 1; // bit 0 + UINT32 MemoryActive : 1; // bit 1 + UINT32 MediaType : 3; // bit 2..4 + UINT32 MemoryClass : 3; // bit 5..7 + UINT32 DesiredInterleave : 3; // bit 8..10 + UINT32 Reserved : 17; // bit 11..27 + UINT32 MemorySizeLow : 4; // bit 28..31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } CXL_DVSEC_FLEX_BUS_DEVICE_RANGE1_SIZE_LOW; typedef union { struct { - UINT32 MemoryBaseHigh : 32; // bit 0..31 + UINT32 MemoryBaseHigh : 32; // bit 0..31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } CXL_DVSEC_FLEX_BUS_DEVICE_RANGE1_BASE_HIGH; typedef union { struct { - UINT32 Reserved : 28; // bit 0..27 - UINT32 MemoryBaseLow : 4; // bit 28..31 + UINT32 Reserved : 28; // bit 0..27 + UINT32 MemoryBaseLow : 4; // bit 28..31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } CXL_DVSEC_FLEX_BUS_DEVICE_RANGE1_BASE_LOW; - typedef union { struct { - UINT32 MemorySizeHigh : 32; // bit 0..31 + UINT32 MemorySizeHigh : 32; // bit 0..31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } CXL_DVSEC_FLEX_BUS_DEVICE_RANGE2_SIZE_HIGH; typedef union { struct { - UINT32 MemoryInfoValid : 1; // bit 0 - UINT32 MemoryActive : 1; // bit 1 - UINT32 MediaType : 3; // bit 2..4 - UINT32 MemoryClass : 3; // bit 5..7 - UINT32 DesiredInterleave : 3; // bit 8..10 - UINT32 Reserved : 17; // bit 11..27 - UINT32 MemorySizeLow : 4; // bit 28..31 + UINT32 MemoryInfoValid : 1; // bit 0 + UINT32 MemoryActive : 1; // bit 1 + UINT32 MediaType : 3; // bit 2..4 + UINT32 MemoryClass : 3; // bit 5..7 + UINT32 DesiredInterleave : 3; // bit 8..10 + UINT32 Reserved : 17; // bit 11..27 + UINT32 MemorySizeLow : 4; // bit 28..31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } CXL_DVSEC_FLEX_BUS_DEVICE_RANGE2_SIZE_LOW; typedef union { struct { - UINT32 MemoryBaseHigh : 32; // bit 0..31 + UINT32 MemoryBaseHigh : 32; // bit 0..31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } CXL_DVSEC_FLEX_BUS_DEVICE_RANGE2_BASE_HIGH; typedef union { struct { - UINT32 Reserved : 28; // bit 0..27 - UINT32 MemoryBaseLow : 4; // bit 28..31 + UINT32 Reserved : 28; // bit 0..27 + UINT32 MemoryBaseLow : 4; // bit 28..31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } CXL_DVSEC_FLEX_BUS_DEVICE_RANGE2_BASE_LOW; // // Flex Bus Device DVSEC ID // Compute Express Link Specification Revision: 1.1 - Chapter 7.1.1, Table 58 // -#define FLEX_BUS_DEVICE_DVSEC_ID 0 +#define FLEX_BUS_DEVICE_DVSEC_ID 0 // // PCIe DVSEC for Flex Bus Device // Compute Express Link Specification Revision: 1.1 - Chapter 7.1.1, Figure 95 // typedef struct { - PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; // offset 0 - PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1 DesignatedVendorSpecificHeader1; // offset 4 - PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2 DesignatedVendorSpecificHeader2; // offset 8 - CXL_DVSEC_FLEX_BUS_DEVICE_CAPABILITY DeviceCapability; // offset 10 - CXL_DVSEC_FLEX_BUS_DEVICE_CONTROL DeviceControl; // offset 12 - CXL_DVSEC_FLEX_BUS_DEVICE_STATUS DeviceStatus; // offset 14 - CXL_1_1_DVSEC_FLEX_BUS_DEVICE_CONTROL2 DeviceControl2; // offset 16 - CXL_1_1_DVSEC_FLEX_BUS_DEVICE_STATUS2 DeviceStatus2; // offset 18 - CXL_DVSEC_FLEX_BUS_DEVICE_LOCK DeviceLock; // offset 20 - UINT16 Reserved; // offset 22 - CXL_DVSEC_FLEX_BUS_DEVICE_RANGE1_SIZE_HIGH DeviceRange1SizeHigh; // offset 24 - CXL_DVSEC_FLEX_BUS_DEVICE_RANGE1_SIZE_LOW DeviceRange1SizeLow; // offset 28 - CXL_DVSEC_FLEX_BUS_DEVICE_RANGE1_BASE_HIGH DeviceRange1BaseHigh; // offset 32 - CXL_DVSEC_FLEX_BUS_DEVICE_RANGE1_BASE_LOW DeviceRange1BaseLow; // offset 36 - CXL_DVSEC_FLEX_BUS_DEVICE_RANGE2_SIZE_HIGH DeviceRange2SizeHigh; // offset 40 - CXL_DVSEC_FLEX_BUS_DEVICE_RANGE2_SIZE_LOW DeviceRange2SizeLow; // offset 44 - CXL_DVSEC_FLEX_BUS_DEVICE_RANGE2_BASE_HIGH DeviceRange2BaseHigh; // offset 48 - CXL_DVSEC_FLEX_BUS_DEVICE_RANGE2_BASE_LOW DeviceRange2BaseLow; // offset 52 + PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; // offset 0 + PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1 DesignatedVendorSpecificHeader1; // offset 4 + PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2 DesignatedVendorSpecificHeader2; // offset 8 + CXL_DVSEC_FLEX_BUS_DEVICE_CAPABILITY DeviceCapability; // offset 10 + CXL_DVSEC_FLEX_BUS_DEVICE_CONTROL DeviceControl; // offset 12 + CXL_DVSEC_FLEX_BUS_DEVICE_STATUS DeviceStatus; // offset 14 + CXL_1_1_DVSEC_FLEX_BUS_DEVICE_CONTROL2 DeviceControl2; // offset 16 + CXL_1_1_DVSEC_FLEX_BUS_DEVICE_STATUS2 DeviceStatus2; // offset 18 + CXL_DVSEC_FLEX_BUS_DEVICE_LOCK DeviceLock; // offset 20 + UINT16 Reserved; // offset 22 + CXL_DVSEC_FLEX_BUS_DEVICE_RANGE1_SIZE_HIGH DeviceRange1SizeHigh; // offset 24 + CXL_DVSEC_FLEX_BUS_DEVICE_RANGE1_SIZE_LOW DeviceRange1SizeLow; // offset 28 + CXL_DVSEC_FLEX_BUS_DEVICE_RANGE1_BASE_HIGH DeviceRange1BaseHigh; // offset 32 + CXL_DVSEC_FLEX_BUS_DEVICE_RANGE1_BASE_LOW DeviceRange1BaseLow; // offset 36 + CXL_DVSEC_FLEX_BUS_DEVICE_RANGE2_SIZE_HIGH DeviceRange2SizeHigh; // offset 40 + CXL_DVSEC_FLEX_BUS_DEVICE_RANGE2_SIZE_LOW DeviceRange2SizeLow; // offset 44 + CXL_DVSEC_FLEX_BUS_DEVICE_RANGE2_BASE_HIGH DeviceRange2BaseHigh; // offset 48 + CXL_DVSEC_FLEX_BUS_DEVICE_RANGE2_BASE_LOW DeviceRange2BaseLow; // offset 52 } CXL_1_1_DVSEC_FLEX_BUS_DEVICE; -CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, Header , 0x00); +CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, Header, 0x00); CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DesignatedVendorSpecificHeader1, 0x04); CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DesignatedVendorSpecificHeader2, 0x08); -CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceCapability , 0x0A); -CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceControl , 0x0C); -CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceStatus , 0x0E); -CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceControl2 , 0x10); -CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceStatus2 , 0x12); -CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceLock , 0x14); -CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceRange1SizeHigh , 0x18); -CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceRange1SizeLow , 0x1C); -CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceRange1BaseHigh , 0x20); -CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceRange1BaseLow , 0x24); -CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceRange2SizeHigh , 0x28); -CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceRange2SizeLow , 0x2C); -CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceRange2BaseHigh , 0x30); -CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceRange2BaseLow , 0x34); -CXL_11_SIZE_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE , 0x38); +CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceCapability, 0x0A); +CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceControl, 0x0C); +CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceStatus, 0x0E); +CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceControl2, 0x10); +CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceStatus2, 0x12); +CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceLock, 0x14); +CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceRange1SizeHigh, 0x18); +CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceRange1SizeLow, 0x1C); +CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceRange1BaseHigh, 0x20); +CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceRange1BaseLow, 0x24); +CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceRange2SizeHigh, 0x28); +CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceRange2SizeLow, 0x2C); +CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceRange2BaseHigh, 0x30); +CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, DeviceRange2BaseLow, 0x34); +CXL_11_SIZE_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE, 0x38); ///@} /// @@ -261,71 +260,71 @@ CXL_11_SIZE_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_DEVICE ///@{ typedef union { struct { - UINT16 CacheCapable : 1; // bit 0 - UINT16 IoCapable : 1; // bit 1 - UINT16 MemCapable : 1; // bit 2 - UINT16 Reserved : 13; // bit 3..15 + UINT16 CacheCapable : 1; // bit 0 + UINT16 IoCapable : 1; // bit 1 + UINT16 MemCapable : 1; // bit 2 + UINT16 Reserved : 13; // bit 3..15 } Bits; - UINT16 Uint16; + UINT16 Uint16; } CXL_1_1_DVSEC_FLEX_BUS_PORT_CAPABILITY; typedef union { struct { - UINT16 CacheEnable : 1; // bit 0 - UINT16 IoEnable : 1; // bit 1 - UINT16 MemEnable : 1; // bit 2 - UINT16 CxlSyncBypassEnable : 1; // bit 3 - UINT16 DriftBufferEnable : 1; // bit 4 - UINT16 Reserved : 3; // bit 5..7 - UINT16 Retimer1Present : 1; // bit 8 - UINT16 Retimer2Present : 1; // bit 9 - UINT16 Reserved2 : 6; // bit 10..15 + UINT16 CacheEnable : 1; // bit 0 + UINT16 IoEnable : 1; // bit 1 + UINT16 MemEnable : 1; // bit 2 + UINT16 CxlSyncBypassEnable : 1; // bit 3 + UINT16 DriftBufferEnable : 1; // bit 4 + UINT16 Reserved : 3; // bit 5..7 + UINT16 Retimer1Present : 1; // bit 8 + UINT16 Retimer2Present : 1; // bit 9 + UINT16 Reserved2 : 6; // bit 10..15 } Bits; - UINT16 Uint16; + UINT16 Uint16; } CXL_1_1_DVSEC_FLEX_BUS_PORT_CONTROL; typedef union { struct { - UINT16 CacheEnable : 1; // bit 0 - UINT16 IoEnable : 1; // bit 1 - UINT16 MemEnable : 1; // bit 2 - UINT16 CxlSyncBypassEnable : 1; // bit 3 - UINT16 DriftBufferEnable : 1; // bit 4 - UINT16 Reserved : 3; // bit 5..7 - UINT16 CxlCorrectableProtocolIdFramingError : 1; // bit 8 - UINT16 CxlUncorrectableProtocolIdFramingError : 1; // bit 9 - UINT16 CxlUnexpectedProtocolIdDropped : 1; // bit 10 - UINT16 Reserved2 : 5; // bit 11..15 + UINT16 CacheEnable : 1; // bit 0 + UINT16 IoEnable : 1; // bit 1 + UINT16 MemEnable : 1; // bit 2 + UINT16 CxlSyncBypassEnable : 1; // bit 3 + UINT16 DriftBufferEnable : 1; // bit 4 + UINT16 Reserved : 3; // bit 5..7 + UINT16 CxlCorrectableProtocolIdFramingError : 1; // bit 8 + UINT16 CxlUncorrectableProtocolIdFramingError : 1; // bit 9 + UINT16 CxlUnexpectedProtocolIdDropped : 1; // bit 10 + UINT16 Reserved2 : 5; // bit 11..15 } Bits; - UINT16 Uint16; + UINT16 Uint16; } CXL_1_1_DVSEC_FLEX_BUS_PORT_STATUS; // // Flex Bus Port DVSEC ID // Compute Express Link Specification Revision: 1.1 - Chapter 7.2.1.3, Table 62 // -#define FLEX_BUS_PORT_DVSEC_ID 7 +#define FLEX_BUS_PORT_DVSEC_ID 7 // // PCIe DVSEC for Flex Bus Port // Compute Express Link Specification Revision: 1.1 - Chapter 7.2.1.3, Figure 99 // typedef struct { - PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; // offset 0 - PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1 DesignatedVendorSpecificHeader1; // offset 4 - PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2 DesignatedVendorSpecificHeader2; // offset 8 - CXL_1_1_DVSEC_FLEX_BUS_PORT_CAPABILITY PortCapability; // offset 10 - CXL_1_1_DVSEC_FLEX_BUS_PORT_CONTROL PortControl; // offset 12 - CXL_1_1_DVSEC_FLEX_BUS_PORT_STATUS PortStatus; // offset 14 + PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; // offset 0 + PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1 DesignatedVendorSpecificHeader1; // offset 4 + PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2 DesignatedVendorSpecificHeader2; // offset 8 + CXL_1_1_DVSEC_FLEX_BUS_PORT_CAPABILITY PortCapability; // offset 10 + CXL_1_1_DVSEC_FLEX_BUS_PORT_CONTROL PortControl; // offset 12 + CXL_1_1_DVSEC_FLEX_BUS_PORT_STATUS PortStatus; // offset 14 } CXL_1_1_DVSEC_FLEX_BUS_PORT; -CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_PORT, Header , 0x00); +CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_PORT, Header, 0x00); CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_PORT, DesignatedVendorSpecificHeader1, 0x04); CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_PORT, DesignatedVendorSpecificHeader2, 0x08); -CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_PORT, PortCapability , 0x0A); -CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_PORT, PortControl , 0x0C); -CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_PORT, PortStatus , 0x0E); -CXL_11_SIZE_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_PORT , 0x10); +CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_PORT, PortCapability, 0x0A); +CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_PORT, PortControl, 0x0C); +CXL_11_OFFSET_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_PORT, PortStatus, 0x0E); +CXL_11_SIZE_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_PORT, 0x10); ///@} /// @@ -336,294 +335,294 @@ CXL_11_SIZE_ASSERT (CXL_1_1_DVSEC_FLEX_BUS_PORT /// Based on chapter 7.2.2 of Compute Express Link Specification Revision: 1.1 ///@{ -#define CXL_CAPABILITY_HEADER_OFFSET 0 +#define CXL_CAPABILITY_HEADER_OFFSET 0 typedef union { struct { - UINT32 CxlCapabilityId : 16; // bit 0..15 - UINT32 CxlCapabilityVersion : 4; // bit 16..19 - UINT32 CxlCacheMemVersion : 4; // bit 20..23 - UINT32 ArraySize : 8; // bit 24..31 + UINT32 CxlCapabilityId : 16; // bit 0..15 + UINT32 CxlCapabilityVersion : 4; // bit 16..19 + UINT32 CxlCacheMemVersion : 4; // bit 20..23 + UINT32 ArraySize : 8; // bit 24..31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } CXL_CAPABILITY_HEADER; -#define CXL_RAS_CAPABILITY_HEADER_OFFSET 4 +#define CXL_RAS_CAPABILITY_HEADER_OFFSET 4 typedef union { struct { - UINT32 CxlCapabilityId : 16; // bit 0..15 - UINT32 CxlCapabilityVersion : 4; // bit 16..19 - UINT32 CxlRasCapabilityPointer : 12; // bit 20..31 + UINT32 CxlCapabilityId : 16; // bit 0..15 + UINT32 CxlCapabilityVersion : 4; // bit 16..19 + UINT32 CxlRasCapabilityPointer : 12; // bit 20..31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } CXL_RAS_CAPABILITY_HEADER; -#define CXL_SECURITY_CAPABILITY_HEADER_OFFSET 8 +#define CXL_SECURITY_CAPABILITY_HEADER_OFFSET 8 typedef union { struct { - UINT32 CxlCapabilityId : 16; // bit 0..15 - UINT32 CxlCapabilityVersion : 4; // bit 16..19 - UINT32 CxlSecurityCapabilityPointer : 12; // bit 20..31 + UINT32 CxlCapabilityId : 16; // bit 0..15 + UINT32 CxlCapabilityVersion : 4; // bit 16..19 + UINT32 CxlSecurityCapabilityPointer : 12; // bit 20..31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } CXL_SECURITY_CAPABILITY_HEADER; -#define CXL_LINK_CAPABILITY_HEADER_OFFSET 0xC +#define CXL_LINK_CAPABILITY_HEADER_OFFSET 0xC typedef union { struct { - UINT32 CxlCapabilityId : 16; // bit 0..15 - UINT32 CxlCapabilityVersion : 4; // bit 16..19 - UINT32 CxlLinkCapabilityPointer : 12; // bit 20..31 + UINT32 CxlCapabilityId : 16; // bit 0..15 + UINT32 CxlCapabilityVersion : 4; // bit 16..19 + UINT32 CxlLinkCapabilityPointer : 12; // bit 20..31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } CXL_LINK_CAPABILITY_HEADER; typedef union { struct { - UINT32 CacheDataParity : 1; // bit 0..0 - UINT32 CacheAddressParity : 1; // bit 1..1 - UINT32 CacheByteEnableParity : 1; // bit 2..2 - UINT32 CacheDataEcc : 1; // bit 3..3 - UINT32 MemDataParity : 1; // bit 4..4 - UINT32 MemAddressParity : 1; // bit 5..5 - UINT32 MemByteEnableParity : 1; // bit 6..6 - UINT32 MemDataEcc : 1; // bit 7..7 - UINT32 ReInitThreshold : 1; // bit 8..8 - UINT32 RsvdEncodingViolation : 1; // bit 9..9 - UINT32 PoisonReceived : 1; // bit 10..10 - UINT32 ReceiverOverflow : 1; // bit 11..11 - UINT32 Reserved : 20; // bit 12..31 + UINT32 CacheDataParity : 1; // bit 0..0 + UINT32 CacheAddressParity : 1; // bit 1..1 + UINT32 CacheByteEnableParity : 1; // bit 2..2 + UINT32 CacheDataEcc : 1; // bit 3..3 + UINT32 MemDataParity : 1; // bit 4..4 + UINT32 MemAddressParity : 1; // bit 5..5 + UINT32 MemByteEnableParity : 1; // bit 6..6 + UINT32 MemDataEcc : 1; // bit 7..7 + UINT32 ReInitThreshold : 1; // bit 8..8 + UINT32 RsvdEncodingViolation : 1; // bit 9..9 + UINT32 PoisonReceived : 1; // bit 10..10 + UINT32 ReceiverOverflow : 1; // bit 11..11 + UINT32 Reserved : 20; // bit 12..31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } CXL_1_1_UNCORRECTABLE_ERROR_STATUS; typedef union { struct { - UINT32 CacheDataParityMask : 1; // bit 0..0 - UINT32 CacheAddressParityMask : 1; // bit 1..1 - UINT32 CacheByteEnableParityMask : 1; // bit 2..2 - UINT32 CacheDataEccMask : 1; // bit 3..3 - UINT32 MemDataParityMask : 1; // bit 4..4 - UINT32 MemAddressParityMask : 1; // bit 5..5 - UINT32 MemByteEnableParityMask : 1; // bit 6..6 - UINT32 MemDataEccMask : 1; // bit 7..7 - UINT32 ReInitThresholdMask : 1; // bit 8..8 - UINT32 RsvdEncodingViolationMask : 1; // bit 9..9 - UINT32 PoisonReceivedMask : 1; // bit 10..10 - UINT32 ReceiverOverflowMask : 1; // bit 11..11 - UINT32 Reserved : 20; // bit 12..31 + UINT32 CacheDataParityMask : 1; // bit 0..0 + UINT32 CacheAddressParityMask : 1; // bit 1..1 + UINT32 CacheByteEnableParityMask : 1; // bit 2..2 + UINT32 CacheDataEccMask : 1; // bit 3..3 + UINT32 MemDataParityMask : 1; // bit 4..4 + UINT32 MemAddressParityMask : 1; // bit 5..5 + UINT32 MemByteEnableParityMask : 1; // bit 6..6 + UINT32 MemDataEccMask : 1; // bit 7..7 + UINT32 ReInitThresholdMask : 1; // bit 8..8 + UINT32 RsvdEncodingViolationMask : 1; // bit 9..9 + UINT32 PoisonReceivedMask : 1; // bit 10..10 + UINT32 ReceiverOverflowMask : 1; // bit 11..11 + UINT32 Reserved : 20; // bit 12..31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } CXL_1_1_UNCORRECTABLE_ERROR_MASK; typedef union { struct { - UINT32 CacheDataParitySeverity : 1; // bit 0..0 - UINT32 CacheAddressParitySeverity : 1; // bit 1..1 - UINT32 CacheByteEnableParitySeverity : 1; // bit 2..2 - UINT32 CacheDataEccSeverity : 1; // bit 3..3 - UINT32 MemDataParitySeverity : 1; // bit 4..4 - UINT32 MemAddressParitySeverity : 1; // bit 5..5 - UINT32 MemByteEnableParitySeverity : 1; // bit 6..6 - UINT32 MemDataEccSeverity : 1; // bit 7..7 - UINT32 ReInitThresholdSeverity : 1; // bit 8..8 - UINT32 RsvdEncodingViolationSeverity : 1; // bit 9..9 - UINT32 PoisonReceivedSeverity : 1; // bit 10..10 - UINT32 ReceiverOverflowSeverity : 1; // bit 11..11 - UINT32 Reserved : 20; // bit 12..31 + UINT32 CacheDataParitySeverity : 1; // bit 0..0 + UINT32 CacheAddressParitySeverity : 1; // bit 1..1 + UINT32 CacheByteEnableParitySeverity : 1; // bit 2..2 + UINT32 CacheDataEccSeverity : 1; // bit 3..3 + UINT32 MemDataParitySeverity : 1; // bit 4..4 + UINT32 MemAddressParitySeverity : 1; // bit 5..5 + UINT32 MemByteEnableParitySeverity : 1; // bit 6..6 + UINT32 MemDataEccSeverity : 1; // bit 7..7 + UINT32 ReInitThresholdSeverity : 1; // bit 8..8 + UINT32 RsvdEncodingViolationSeverity : 1; // bit 9..9 + UINT32 PoisonReceivedSeverity : 1; // bit 10..10 + UINT32 ReceiverOverflowSeverity : 1; // bit 11..11 + UINT32 Reserved : 20; // bit 12..31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } CXL_1_1_UNCORRECTABLE_ERROR_SEVERITY; typedef union { struct { - UINT32 CacheDataEcc : 1; // bit 0..0 - UINT32 MemoryDataEcc : 1; // bit 1..1 - UINT32 CrcThreshold : 1; // bit 2..2 - UINT32 RetryThreshold : 1; // bit 3..3 - UINT32 CachePoisonReceived : 1; // bit 4..4 - UINT32 MemoryPoisonReceived : 1; // bit 5..5 - UINT32 PhysicalLayerError : 1; // bit 6..6 - UINT32 Reserved : 25; // bit 7..31 + UINT32 CacheDataEcc : 1; // bit 0..0 + UINT32 MemoryDataEcc : 1; // bit 1..1 + UINT32 CrcThreshold : 1; // bit 2..2 + UINT32 RetryThreshold : 1; // bit 3..3 + UINT32 CachePoisonReceived : 1; // bit 4..4 + UINT32 MemoryPoisonReceived : 1; // bit 5..5 + UINT32 PhysicalLayerError : 1; // bit 6..6 + UINT32 Reserved : 25; // bit 7..31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } CXL_CORRECTABLE_ERROR_STATUS; typedef union { struct { - UINT32 CacheDataEccMask : 1; // bit 0..0 - UINT32 MemoryDataEccMask : 1; // bit 1..1 - UINT32 CrcThresholdMask : 1; // bit 2..2 - UINT32 RetryThresholdMask : 1; // bit 3..3 - UINT32 CachePoisonReceivedMask : 1; // bit 4..4 - UINT32 MemoryPoisonReceivedMask : 1; // bit 5..5 - UINT32 PhysicalLayerErrorMask : 1; // bit 6..6 - UINT32 Reserved : 25; // bit 7..31 + UINT32 CacheDataEccMask : 1; // bit 0..0 + UINT32 MemoryDataEccMask : 1; // bit 1..1 + UINT32 CrcThresholdMask : 1; // bit 2..2 + UINT32 RetryThresholdMask : 1; // bit 3..3 + UINT32 CachePoisonReceivedMask : 1; // bit 4..4 + UINT32 MemoryPoisonReceivedMask : 1; // bit 5..5 + UINT32 PhysicalLayerErrorMask : 1; // bit 6..6 + UINT32 Reserved : 25; // bit 7..31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } CXL_CORRECTABLE_ERROR_MASK; typedef union { struct { - UINT32 FirstErrorPointer : 4; // bit 0..3 - UINT32 Reserved1 : 5; // bit 4..8 - UINT32 MultipleHeaderRecordingCapability : 1; // bit 9..9 - UINT32 Reserved2 : 3; // bit 10..12 - UINT32 PoisonEnabled : 1; // bit 13..13 - UINT32 Reserved3 : 18; // bit 14..31 + UINT32 FirstErrorPointer : 4; // bit 0..3 + UINT32 Reserved1 : 5; // bit 4..8 + UINT32 MultipleHeaderRecordingCapability : 1; // bit 9..9 + UINT32 Reserved2 : 3; // bit 10..12 + UINT32 PoisonEnabled : 1; // bit 13..13 + UINT32 Reserved3 : 18; // bit 14..31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } CXL_ERROR_CAPABILITIES_AND_CONTROL; typedef struct { - CXL_1_1_UNCORRECTABLE_ERROR_STATUS UncorrectableErrorStatus; - CXL_1_1_UNCORRECTABLE_ERROR_MASK UncorrectableErrorMask; - CXL_1_1_UNCORRECTABLE_ERROR_SEVERITY UncorrectableErrorSeverity; - CXL_CORRECTABLE_ERROR_STATUS CorrectableErrorStatus; - CXL_CORRECTABLE_ERROR_MASK CorrectableErrorMask; - CXL_ERROR_CAPABILITIES_AND_CONTROL ErrorCapabilitiesAndControl; - UINT32 HeaderLog[16]; + CXL_1_1_UNCORRECTABLE_ERROR_STATUS UncorrectableErrorStatus; + CXL_1_1_UNCORRECTABLE_ERROR_MASK UncorrectableErrorMask; + CXL_1_1_UNCORRECTABLE_ERROR_SEVERITY UncorrectableErrorSeverity; + CXL_CORRECTABLE_ERROR_STATUS CorrectableErrorStatus; + CXL_CORRECTABLE_ERROR_MASK CorrectableErrorMask; + CXL_ERROR_CAPABILITIES_AND_CONTROL ErrorCapabilitiesAndControl; + UINT32 HeaderLog[16]; } CXL_1_1_RAS_CAPABILITY_STRUCTURE; -CXL_11_OFFSET_ASSERT (CXL_1_1_RAS_CAPABILITY_STRUCTURE, UncorrectableErrorStatus , 0x00); -CXL_11_OFFSET_ASSERT (CXL_1_1_RAS_CAPABILITY_STRUCTURE, UncorrectableErrorMask , 0x04); -CXL_11_OFFSET_ASSERT (CXL_1_1_RAS_CAPABILITY_STRUCTURE, UncorrectableErrorSeverity , 0x08); -CXL_11_OFFSET_ASSERT (CXL_1_1_RAS_CAPABILITY_STRUCTURE, CorrectableErrorStatus , 0x0C); -CXL_11_OFFSET_ASSERT (CXL_1_1_RAS_CAPABILITY_STRUCTURE, CorrectableErrorMask , 0x10); +CXL_11_OFFSET_ASSERT (CXL_1_1_RAS_CAPABILITY_STRUCTURE, UncorrectableErrorStatus, 0x00); +CXL_11_OFFSET_ASSERT (CXL_1_1_RAS_CAPABILITY_STRUCTURE, UncorrectableErrorMask, 0x04); +CXL_11_OFFSET_ASSERT (CXL_1_1_RAS_CAPABILITY_STRUCTURE, UncorrectableErrorSeverity, 0x08); +CXL_11_OFFSET_ASSERT (CXL_1_1_RAS_CAPABILITY_STRUCTURE, CorrectableErrorStatus, 0x0C); +CXL_11_OFFSET_ASSERT (CXL_1_1_RAS_CAPABILITY_STRUCTURE, CorrectableErrorMask, 0x10); CXL_11_OFFSET_ASSERT (CXL_1_1_RAS_CAPABILITY_STRUCTURE, ErrorCapabilitiesAndControl, 0x14); -CXL_11_OFFSET_ASSERT (CXL_1_1_RAS_CAPABILITY_STRUCTURE, HeaderLog , 0x18); -CXL_11_SIZE_ASSERT (CXL_1_1_RAS_CAPABILITY_STRUCTURE , 0x58); +CXL_11_OFFSET_ASSERT (CXL_1_1_RAS_CAPABILITY_STRUCTURE, HeaderLog, 0x18); +CXL_11_SIZE_ASSERT (CXL_1_1_RAS_CAPABILITY_STRUCTURE, 0x58); typedef union { struct { - UINT32 DeviceTrustLevel : 2; // bit 0..1 - UINT32 Reserved : 30; // bit 2..31 + UINT32 DeviceTrustLevel : 2; // bit 0..1 + UINT32 Reserved : 30; // bit 2..31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } CXL_1_1_SECURITY_POLICY; typedef struct { - CXL_1_1_SECURITY_POLICY SecurityPolicy; + CXL_1_1_SECURITY_POLICY SecurityPolicy; } CXL_1_1_SECURITY_CAPABILITY_STRUCTURE; CXL_11_OFFSET_ASSERT (CXL_1_1_SECURITY_CAPABILITY_STRUCTURE, SecurityPolicy, 0x0); -CXL_11_SIZE_ASSERT (CXL_1_1_SECURITY_CAPABILITY_STRUCTURE, 0x4); +CXL_11_SIZE_ASSERT (CXL_1_1_SECURITY_CAPABILITY_STRUCTURE, 0x4); typedef union { struct { - UINT64 CxlLinkVersionSupported : 4; // bit 0..3 - UINT64 CxlLinkVersionReceived : 4; // bit 4..7 - UINT64 LlrWrapValueSupported : 8; // bit 8..15 - UINT64 LlrWrapValueReceived : 8; // bit 16..23 - UINT64 NumRetryReceived : 5; // bit 24..28 - UINT64 NumPhyReinitReceived : 5; // bit 29..33 - UINT64 WrPtrReceived : 8; // bit 34..41 - UINT64 EchoEseqReceived : 8; // bit 42..49 - UINT64 NumFreeBufReceived : 8; // bit 50..57 - UINT64 Reserved : 6; // bit 58..63 + UINT64 CxlLinkVersionSupported : 4; // bit 0..3 + UINT64 CxlLinkVersionReceived : 4; // bit 4..7 + UINT64 LlrWrapValueSupported : 8; // bit 8..15 + UINT64 LlrWrapValueReceived : 8; // bit 16..23 + UINT64 NumRetryReceived : 5; // bit 24..28 + UINT64 NumPhyReinitReceived : 5; // bit 29..33 + UINT64 WrPtrReceived : 8; // bit 34..41 + UINT64 EchoEseqReceived : 8; // bit 42..49 + UINT64 NumFreeBufReceived : 8; // bit 50..57 + UINT64 Reserved : 6; // bit 58..63 } Bits; - UINT64 Uint64; + UINT64 Uint64; } CXL_LINK_LAYER_CAPABILITY; typedef union { struct { - UINT16 LlReset : 1; // bit 0..0 - UINT16 LlInitStall : 1; // bit 1..1 - UINT16 LlCrdStall : 1; // bit 2..2 - UINT16 InitState : 2; // bit 3..4 - UINT16 LlRetryBufferConsumed : 8; // bit 5..12 - UINT16 Reserved : 3; // bit 13..15 + UINT16 LlReset : 1; // bit 0..0 + UINT16 LlInitStall : 1; // bit 1..1 + UINT16 LlCrdStall : 1; // bit 2..2 + UINT16 InitState : 2; // bit 3..4 + UINT16 LlRetryBufferConsumed : 8; // bit 5..12 + UINT16 Reserved : 3; // bit 13..15 } Bits; - UINT64 Uint64; + UINT64 Uint64; } CXL_LINK_LAYER_CONTROL_AND_STATUS; typedef union { struct { - UINT64 CacheReqCredits : 10; // bit 0..9 - UINT64 CacheRspCredits : 10; // bit 10..19 - UINT64 CacheDataCredits : 10; // bit 20..29 - UINT64 MemReqRspCredits : 10; // bit 30..39 - UINT64 MemDataCredits : 10; // bit 40..49 + UINT64 CacheReqCredits : 10; // bit 0..9 + UINT64 CacheRspCredits : 10; // bit 10..19 + UINT64 CacheDataCredits : 10; // bit 20..29 + UINT64 MemReqRspCredits : 10; // bit 30..39 + UINT64 MemDataCredits : 10; // bit 40..49 } Bits; - UINT64 Uint64; + UINT64 Uint64; } CXL_LINK_LAYER_RX_CREDIT_CONTROL; typedef union { struct { - UINT64 CacheReqCredits : 10; // bit 0..9 - UINT64 CacheRspCredits : 10; // bit 10..19 - UINT64 CacheDataCredits : 10; // bit 20..29 - UINT64 MemReqRspCredits : 10; // bit 30..39 - UINT64 MemDataCredits : 10; // bit 40..49 + UINT64 CacheReqCredits : 10; // bit 0..9 + UINT64 CacheRspCredits : 10; // bit 10..19 + UINT64 CacheDataCredits : 10; // bit 20..29 + UINT64 MemReqRspCredits : 10; // bit 30..39 + UINT64 MemDataCredits : 10; // bit 40..49 } Bits; - UINT64 Uint64; + UINT64 Uint64; } CXL_LINK_LAYER_RX_CREDIT_RETURN_STATUS; typedef union { struct { - UINT64 CacheReqCredits : 10; // bit 0..9 - UINT64 CacheRspCredits : 10; // bit 10..19 - UINT64 CacheDataCredits : 10; // bit 20..29 - UINT64 MemReqRspCredits : 10; // bit 30..39 - UINT64 MemDataCredits : 10; // bit 40..49 + UINT64 CacheReqCredits : 10; // bit 0..9 + UINT64 CacheRspCredits : 10; // bit 10..19 + UINT64 CacheDataCredits : 10; // bit 20..29 + UINT64 MemReqRspCredits : 10; // bit 30..39 + UINT64 MemDataCredits : 10; // bit 40..49 } Bits; - UINT64 Uint64; + UINT64 Uint64; } CXL_LINK_LAYER_TX_CREDIT_STATUS; typedef union { struct { - UINT32 AckForceThreshold : 8; // bit 0..7 - UINT32 AckFLushRetimer : 10; // bit 8..17 + UINT32 AckForceThreshold : 8; // bit 0..7 + UINT32 AckFLushRetimer : 10; // bit 8..17 } Bits; - UINT64 Uint64; + UINT64 Uint64; } CXL_LINK_LAYER_ACK_TIMER_CONTROL; typedef union { struct { - UINT32 MdhDisable : 1; // bit 0..0 - UINT32 Reserved : 31; // bit 1..31 + UINT32 MdhDisable : 1; // bit 0..0 + UINT32 Reserved : 31; // bit 1..31 } Bits; - UINT64 Uint64; + UINT64 Uint64; } CXL_LINK_LAYER_DEFEATURE; typedef struct { - CXL_LINK_LAYER_CAPABILITY LinkLayerCapability; - CXL_LINK_LAYER_CONTROL_AND_STATUS LinkLayerControlStatus; - CXL_LINK_LAYER_RX_CREDIT_CONTROL LinkLayerRxCreditControl; - CXL_LINK_LAYER_RX_CREDIT_RETURN_STATUS LinkLayerRxCreditReturnStatus; - CXL_LINK_LAYER_TX_CREDIT_STATUS LinkLayerTxCreditStatus; - CXL_LINK_LAYER_ACK_TIMER_CONTROL LinkLayerAckTimerControl; - CXL_LINK_LAYER_DEFEATURE LinkLayerDefeature; + CXL_LINK_LAYER_CAPABILITY LinkLayerCapability; + CXL_LINK_LAYER_CONTROL_AND_STATUS LinkLayerControlStatus; + CXL_LINK_LAYER_RX_CREDIT_CONTROL LinkLayerRxCreditControl; + CXL_LINK_LAYER_RX_CREDIT_RETURN_STATUS LinkLayerRxCreditReturnStatus; + CXL_LINK_LAYER_TX_CREDIT_STATUS LinkLayerTxCreditStatus; + CXL_LINK_LAYER_ACK_TIMER_CONTROL LinkLayerAckTimerControl; + CXL_LINK_LAYER_DEFEATURE LinkLayerDefeature; } CXL_1_1_LINK_CAPABILITY_STRUCTURE; -CXL_11_OFFSET_ASSERT (CXL_1_1_LINK_CAPABILITY_STRUCTURE, LinkLayerCapability , 0x00); -CXL_11_OFFSET_ASSERT (CXL_1_1_LINK_CAPABILITY_STRUCTURE, LinkLayerControlStatus , 0x08); -CXL_11_OFFSET_ASSERT (CXL_1_1_LINK_CAPABILITY_STRUCTURE, LinkLayerRxCreditControl , 0x10); +CXL_11_OFFSET_ASSERT (CXL_1_1_LINK_CAPABILITY_STRUCTURE, LinkLayerCapability, 0x00); +CXL_11_OFFSET_ASSERT (CXL_1_1_LINK_CAPABILITY_STRUCTURE, LinkLayerControlStatus, 0x08); +CXL_11_OFFSET_ASSERT (CXL_1_1_LINK_CAPABILITY_STRUCTURE, LinkLayerRxCreditControl, 0x10); CXL_11_OFFSET_ASSERT (CXL_1_1_LINK_CAPABILITY_STRUCTURE, LinkLayerRxCreditReturnStatus, 0x18); -CXL_11_OFFSET_ASSERT (CXL_1_1_LINK_CAPABILITY_STRUCTURE, LinkLayerTxCreditStatus , 0x20); -CXL_11_OFFSET_ASSERT (CXL_1_1_LINK_CAPABILITY_STRUCTURE, LinkLayerAckTimerControl , 0x28); -CXL_11_OFFSET_ASSERT (CXL_1_1_LINK_CAPABILITY_STRUCTURE, LinkLayerDefeature , 0x30); -CXL_11_SIZE_ASSERT (CXL_1_1_LINK_CAPABILITY_STRUCTURE , 0x38); +CXL_11_OFFSET_ASSERT (CXL_1_1_LINK_CAPABILITY_STRUCTURE, LinkLayerTxCreditStatus, 0x20); +CXL_11_OFFSET_ASSERT (CXL_1_1_LINK_CAPABILITY_STRUCTURE, LinkLayerAckTimerControl, 0x28); +CXL_11_OFFSET_ASSERT (CXL_1_1_LINK_CAPABILITY_STRUCTURE, LinkLayerDefeature, 0x30); +CXL_11_SIZE_ASSERT (CXL_1_1_LINK_CAPABILITY_STRUCTURE, 0x38); -#define CXL_IO_ARBITRATION_CONTROL_OFFSET 0x180 +#define CXL_IO_ARBITRATION_CONTROL_OFFSET 0x180 typedef union { struct { - UINT32 Reserved1 : 4; // bit 0..3 - UINT32 WeightedRoundRobinArbitrationWeight : 4; // bit 4..7 - UINT32 Reserved2 : 24; // bit 8..31 + UINT32 Reserved1 : 4; // bit 0..3 + UINT32 WeightedRoundRobinArbitrationWeight : 4; // bit 4..7 + UINT32 Reserved2 : 24; // bit 8..31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } CXL_IO_ARBITRATION_CONTROL; CXL_11_SIZE_ASSERT (CXL_IO_ARBITRATION_CONTROL, 0x4); -#define CXL_CACHE_MEMORY_ARBITRATION_CONTROL_OFFSET 0x1C0 +#define CXL_CACHE_MEMORY_ARBITRATION_CONTROL_OFFSET 0x1C0 typedef union { struct { - UINT32 Reserved1 : 4; // bit 0..3 - UINT32 WeightedRoundRobinArbitrationWeight : 4; // bit 4..7 - UINT32 Reserved2 : 24; // bit 8..31 + UINT32 Reserved1 : 4; // bit 0..3 + UINT32 WeightedRoundRobinArbitrationWeight : 4; // bit 4..7 + UINT32 Reserved2 : 24; // bit 8..31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } CXL_CACHE_MEMORY_ARBITRATION_CONTROL; CXL_11_SIZE_ASSERT (CXL_CACHE_MEMORY_ARBITRATION_CONTROL, 0x4); @@ -635,11 +634,11 @@ CXL_11_SIZE_ASSERT (CXL_CACHE_MEMORY_ARBITRATION_CONTROL, 0x4); ///@{ typedef union { struct { - UINT64 RcrbEnable : 1; // bit 0..0 - UINT64 Reserved : 12; // bit 1..12 - UINT64 RcrbBaseAddress : 51; // bit 13..63 + UINT64 RcrbEnable : 1; // bit 0..0 + UINT64 Reserved : 12; // bit 1..12 + UINT64 RcrbBaseAddress : 51; // bit 13..63 } Bits; - UINT64 Uint64; + UINT64 Uint64; } CXL_RCRB_BASE; CXL_11_SIZE_ASSERT (CXL_RCRB_BASE, 0x8); @@ -652,8 +651,8 @@ CXL_11_SIZE_ASSERT (CXL_RCRB_BASE, 0x8); // CXL Downstream / Upstream Port RCRB space register offsets // Compute Express Link Specification Revision: 1.1 - Chapter 7.2.1.1 - Figure 97 // -#define CXL_PORT_RCRB_MEMBAR0_LOW_OFFSET 0x010 -#define CXL_PORT_RCRB_MEMBAR0_HIGH_OFFSET 0x014 -#define CXL_PORT_RCRB_EXTENDED_CAPABILITY_BASE_OFFSET 0x100 +#define CXL_PORT_RCRB_MEMBAR0_LOW_OFFSET 0x010 +#define CXL_PORT_RCRB_MEMBAR0_HIGH_OFFSET 0x014 +#define CXL_PORT_RCRB_EXTENDED_CAPABILITY_BASE_OFFSET 0x100 #endif diff --git a/MdePkg/Include/IndustryStandard/DebugPort2Table.h b/MdePkg/Include/IndustryStandard/DebugPort2Table.h index 8aab77b..d6d468b 100644 --- a/MdePkg/Include/IndustryStandard/DebugPort2Table.h +++ b/MdePkg/Include/IndustryStandard/DebugPort2Table.h @@ -8,7 +8,6 @@ **/ - #ifndef _DEBUG_PORT_2_TABLE_H_ #define _DEBUG_PORT_2_TABLE_H_ @@ -23,21 +22,21 @@ // Debug Device Information structure. // typedef struct { - UINT8 Revision; - UINT16 Length; - UINT8 NumberofGenericAddressRegisters; - UINT16 NameSpaceStringLength; - UINT16 NameSpaceStringOffset; - UINT16 OemDataLength; - UINT16 OemDataOffset; - UINT16 PortType; - UINT16 PortSubtype; - UINT8 Reserved[2]; - UINT16 BaseAddressRegisterOffset; - UINT16 AddressSizeOffset; + UINT8 Revision; + UINT16 Length; + UINT8 NumberofGenericAddressRegisters; + UINT16 NameSpaceStringLength; + UINT16 NameSpaceStringOffset; + UINT16 OemDataLength; + UINT16 OemDataOffset; + UINT16 PortType; + UINT16 PortSubtype; + UINT8 Reserved[2]; + UINT16 BaseAddressRegisterOffset; + UINT16 AddressSizeOffset; } EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT; -#define EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT_REVISION 0x00 +#define EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT_REVISION 0x00 #define EFI_ACPI_DBG2_PORT_TYPE_SERIAL 0x8000 #define EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_FULL_16550 0x0000 @@ -60,9 +59,9 @@ typedef struct { // Debug Port 2 Table definition. // typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 OffsetDbgDeviceInfo; - UINT32 NumberDbgDeviceInfo; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 OffsetDbgDeviceInfo; + UINT32 NumberDbgDeviceInfo; } EFI_ACPI_DEBUG_PORT_2_DESCRIPTION_TABLE; #pragma pack() @@ -70,6 +69,6 @@ typedef struct { // // DBG2 Revision (defined in spec) // -#define EFI_ACPI_DEBUG_PORT_2_TABLE_REVISION 0x00 +#define EFI_ACPI_DEBUG_PORT_2_TABLE_REVISION 0x00 #endif diff --git a/MdePkg/Include/IndustryStandard/DebugPortTable.h b/MdePkg/Include/IndustryStandard/DebugPortTable.h index 8fec2f6..a4923fb 100644 --- a/MdePkg/Include/IndustryStandard/DebugPortTable.h +++ b/MdePkg/Include/IndustryStandard/DebugPortTable.h @@ -7,7 +7,6 @@ **/ - #ifndef _DEBUG_PORT_TABLE_H_ #define _DEBUG_PORT_TABLE_H_ @@ -33,7 +32,7 @@ typedef struct { // // DBGP Revision (defined in spec) // -#define EFI_ACPI_DEBUG_PORT_TABLE_REVISION 0x01 +#define EFI_ACPI_DEBUG_PORT_TABLE_REVISION 0x01 // // Interface Type diff --git a/MdePkg/Include/IndustryStandard/Dhcp.h b/MdePkg/Include/IndustryStandard/Dhcp.h index 121c48c..f209f1b 100644 --- a/MdePkg/Include/IndustryStandard/Dhcp.h +++ b/MdePkg/Include/IndustryStandard/Dhcp.h @@ -15,88 +15,87 @@ /// /// Dhcpv4 Options, definitions from RFC 2132 /// -#define DHCP4_TAG_PAD 0 /// Pad Option -#define DHCP4_TAG_EOP 255 /// End Option -#define DHCP4_TAG_NETMASK 1 /// Subnet Mask -#define DHCP4_TAG_TIME_OFFSET 2 /// Time Offset from UTC -#define DHCP4_TAG_ROUTER 3 /// Router option, -#define DHCP4_TAG_TIME_SERVER 4 /// Time Server -#define DHCP4_TAG_NAME_SERVER 5 /// Name Server -#define DHCP4_TAG_DNS_SERVER 6 /// Domain Name Server -#define DHCP4_TAG_LOG_SERVER 7 /// Log Server -#define DHCP4_TAG_COOKIE_SERVER 8 /// Cookie Server -#define DHCP4_TAG_LPR_SERVER 9 /// LPR Print Server -#define DHCP4_TAG_IMPRESS_SERVER 10 /// Impress Server -#define DHCP4_TAG_RL_SERVER 11 /// Resource Location Server -#define DHCP4_TAG_HOSTNAME 12 /// Host Name -#define DHCP4_TAG_BOOTFILE_LEN 13 /// Boot File Size -#define DHCP4_TAG_DUMP 14 /// Merit Dump File -#define DHCP4_TAG_DOMAINNAME 15 /// Domain Name -#define DHCP4_TAG_SWAP_SERVER 16 /// Swap Server -#define DHCP4_TAG_ROOTPATH 17 /// Root path -#define DHCP4_TAG_EXTEND_PATH 18 /// Extensions Path -#define DHCP4_TAG_IPFORWARD 19 /// IP Forwarding Enable/Disable -#define DHCP4_TAG_NONLOCAL_SRR 20 /// on-Local Source Routing Enable/Disable -#define DHCP4_TAG_POLICY_SRR 21 /// Policy Filter -#define DHCP4_TAG_EMTU 22 /// Maximum Datagram Reassembly Size -#define DHCP4_TAG_TTL 23 /// Default IP Time-to-live -#define DHCP4_TAG_PATHMTU_AGE 24 /// Path MTU Aging Timeout -#define DHCP4_TAG_PATHMTU_PLATEAU 25 /// Path MTU Plateau Table -#define DHCP4_TAG_IFMTU 26 /// Interface MTU -#define DHCP4_TAG_SUBNET_LOCAL 27 /// All Subnets are Local -#define DHCP4_TAG_BROADCAST 28 /// Broadcast Address -#define DHCP4_TAG_DISCOVER_MASK 29 /// Perform Mask Discovery -#define DHCP4_TAG_SUPPLY_MASK 30 /// Mask Supplier -#define DHCP4_TAG_DISCOVER_ROUTE 31 /// Perform Router Discovery -#define DHCP4_TAG_ROUTER_SOLICIT 32 /// Router Solicitation Address -#define DHCP4_TAG_STATIC_ROUTE 33 /// Static Route -#define DHCP4_TAG_TRAILER 34 /// Trailer Encapsulation -#define DHCP4_TAG_ARPAGE 35 /// ARP Cache Timeout -#define DHCP4_TAG_ETHER_ENCAP 36 /// Ethernet Encapsulation -#define DHCP4_TAG_TCP_TTL 37 /// TCP Default TTL -#define DHCP4_TAG_KEEP_INTERVAL 38 /// TCP Keepalive Interval -#define DHCP4_TAG_KEEP_GARBAGE 39 /// TCP Keepalive Garbage -#define DHCP4_TAG_NIS_DOMAIN 40 /// Network Information Service Domain -#define DHCP4_TAG_NIS_SERVER 41 /// Network Information Servers -#define DHCP4_TAG_NTP_SERVER 42 /// Network Time Protocol Servers -#define DHCP4_TAG_VENDOR 43 /// Vendor Specific Information -#define DHCP4_TAG_NBNS 44 /// NetBIOS over TCP/IP Name Server -#define DHCP4_TAG_NBDD 45 /// NetBIOS Datagram Distribution Server -#define DHCP4_TAG_NBTYPE 46 /// NetBIOS over TCP/IP Node Type -#define DHCP4_TAG_NBSCOPE 47 /// NetBIOS over TCP/IP Scope -#define DHCP4_TAG_XFONT 48 /// X Window System Font Server -#define DHCP4_TAG_XDM 49 /// X Window System Display Manager -#define DHCP4_TAG_REQUEST_IP 50 /// Requested IP Address -#define DHCP4_TAG_LEASE 51 /// IP Address Lease Time -#define DHCP4_TAG_OVERLOAD 52 /// Option Overload -#define DHCP4_TAG_MSG_TYPE 53 /// DHCP Message Type -#define DHCP4_TAG_SERVER_ID 54 /// Server Identifier -#define DHCP4_TAG_PARA_LIST 55 /// Parameter Request List -#define DHCP4_TAG_MESSAGE 56 /// Message -#define DHCP4_TAG_MAXMSG 57 /// Maximum DHCP Message Size -#define DHCP4_TAG_T1 58 /// Renewal (T1) Time Value -#define DHCP4_TAG_T2 59 /// Rebinding (T2) Time Value -#define DHCP4_TAG_VENDOR_CLASS_ID 60 /// Vendor class identifier -#define DHCP4_TAG_CLIENT_ID 61 /// Client-identifier -#define DHCP4_TAG_NISPLUS 64 /// Network Information Service+ Domain -#define DHCP4_TAG_NISPLUS_SERVER 65 /// Network Information Service+ Servers -#define DHCP4_TAG_TFTP 66 /// TFTP server name -#define DHCP4_TAG_BOOTFILE 67 /// Bootfile name -#define DHCP4_TAG_MOBILEIP 68 /// Mobile IP Home Agent -#define DHCP4_TAG_SMTP 69 /// Simple Mail Transport Protocol Server -#define DHCP4_TAG_POP3 70 /// Post Office Protocol (POP3) Server -#define DHCP4_TAG_NNTP 71 /// Network News Transport Protocol Server -#define DHCP4_TAG_WWW 72 /// Default World Wide Web (WWW) Server -#define DHCP4_TAG_FINGER 73 /// Default Finger Server -#define DHCP4_TAG_IRC 74 /// Default Internet Relay Chat (IRC) Server -#define DHCP4_TAG_STTALK 75 /// StreetTalk Server -#define DHCP4_TAG_STDA 76 /// StreetTalk Directory Assistance Server -#define DHCP4_TAG_USER_CLASS_ID 77 /// User class identifier -#define DHCP4_TAG_ARCH 93 /// Client System Architecture Type, RFC 4578 -#define DHCP4_TAG_UNDI 94 /// Client Network Interface Identifier, RFC 4578 -#define DHCP4_TAG_UUID 97 /// Client Machine Identifier, RFC 4578 -#define DHCP4_TAG_CLASSLESS_ROUTE 121 /// Classless Route - +#define DHCP4_TAG_PAD 0 /// Pad Option +#define DHCP4_TAG_EOP 255 /// End Option +#define DHCP4_TAG_NETMASK 1 /// Subnet Mask +#define DHCP4_TAG_TIME_OFFSET 2 /// Time Offset from UTC +#define DHCP4_TAG_ROUTER 3 /// Router option, +#define DHCP4_TAG_TIME_SERVER 4 /// Time Server +#define DHCP4_TAG_NAME_SERVER 5 /// Name Server +#define DHCP4_TAG_DNS_SERVER 6 /// Domain Name Server +#define DHCP4_TAG_LOG_SERVER 7 /// Log Server +#define DHCP4_TAG_COOKIE_SERVER 8 /// Cookie Server +#define DHCP4_TAG_LPR_SERVER 9 /// LPR Print Server +#define DHCP4_TAG_IMPRESS_SERVER 10 /// Impress Server +#define DHCP4_TAG_RL_SERVER 11 /// Resource Location Server +#define DHCP4_TAG_HOSTNAME 12 /// Host Name +#define DHCP4_TAG_BOOTFILE_LEN 13 /// Boot File Size +#define DHCP4_TAG_DUMP 14 /// Merit Dump File +#define DHCP4_TAG_DOMAINNAME 15 /// Domain Name +#define DHCP4_TAG_SWAP_SERVER 16 /// Swap Server +#define DHCP4_TAG_ROOTPATH 17 /// Root path +#define DHCP4_TAG_EXTEND_PATH 18 /// Extensions Path +#define DHCP4_TAG_IPFORWARD 19 /// IP Forwarding Enable/Disable +#define DHCP4_TAG_NONLOCAL_SRR 20 /// on-Local Source Routing Enable/Disable +#define DHCP4_TAG_POLICY_SRR 21 /// Policy Filter +#define DHCP4_TAG_EMTU 22 /// Maximum Datagram Reassembly Size +#define DHCP4_TAG_TTL 23 /// Default IP Time-to-live +#define DHCP4_TAG_PATHMTU_AGE 24 /// Path MTU Aging Timeout +#define DHCP4_TAG_PATHMTU_PLATEAU 25 /// Path MTU Plateau Table +#define DHCP4_TAG_IFMTU 26 /// Interface MTU +#define DHCP4_TAG_SUBNET_LOCAL 27 /// All Subnets are Local +#define DHCP4_TAG_BROADCAST 28 /// Broadcast Address +#define DHCP4_TAG_DISCOVER_MASK 29 /// Perform Mask Discovery +#define DHCP4_TAG_SUPPLY_MASK 30 /// Mask Supplier +#define DHCP4_TAG_DISCOVER_ROUTE 31 /// Perform Router Discovery +#define DHCP4_TAG_ROUTER_SOLICIT 32 /// Router Solicitation Address +#define DHCP4_TAG_STATIC_ROUTE 33 /// Static Route +#define DHCP4_TAG_TRAILER 34 /// Trailer Encapsulation +#define DHCP4_TAG_ARPAGE 35 /// ARP Cache Timeout +#define DHCP4_TAG_ETHER_ENCAP 36 /// Ethernet Encapsulation +#define DHCP4_TAG_TCP_TTL 37 /// TCP Default TTL +#define DHCP4_TAG_KEEP_INTERVAL 38 /// TCP Keepalive Interval +#define DHCP4_TAG_KEEP_GARBAGE 39 /// TCP Keepalive Garbage +#define DHCP4_TAG_NIS_DOMAIN 40 /// Network Information Service Domain +#define DHCP4_TAG_NIS_SERVER 41 /// Network Information Servers +#define DHCP4_TAG_NTP_SERVER 42 /// Network Time Protocol Servers +#define DHCP4_TAG_VENDOR 43 /// Vendor Specific Information +#define DHCP4_TAG_NBNS 44 /// NetBIOS over TCP/IP Name Server +#define DHCP4_TAG_NBDD 45 /// NetBIOS Datagram Distribution Server +#define DHCP4_TAG_NBTYPE 46 /// NetBIOS over TCP/IP Node Type +#define DHCP4_TAG_NBSCOPE 47 /// NetBIOS over TCP/IP Scope +#define DHCP4_TAG_XFONT 48 /// X Window System Font Server +#define DHCP4_TAG_XDM 49 /// X Window System Display Manager +#define DHCP4_TAG_REQUEST_IP 50 /// Requested IP Address +#define DHCP4_TAG_LEASE 51 /// IP Address Lease Time +#define DHCP4_TAG_OVERLOAD 52 /// Option Overload +#define DHCP4_TAG_MSG_TYPE 53 /// DHCP Message Type +#define DHCP4_TAG_SERVER_ID 54 /// Server Identifier +#define DHCP4_TAG_PARA_LIST 55 /// Parameter Request List +#define DHCP4_TAG_MESSAGE 56 /// Message +#define DHCP4_TAG_MAXMSG 57 /// Maximum DHCP Message Size +#define DHCP4_TAG_T1 58 /// Renewal (T1) Time Value +#define DHCP4_TAG_T2 59 /// Rebinding (T2) Time Value +#define DHCP4_TAG_VENDOR_CLASS_ID 60 /// Vendor class identifier +#define DHCP4_TAG_CLIENT_ID 61 /// Client-identifier +#define DHCP4_TAG_NISPLUS 64 /// Network Information Service+ Domain +#define DHCP4_TAG_NISPLUS_SERVER 65 /// Network Information Service+ Servers +#define DHCP4_TAG_TFTP 66 /// TFTP server name +#define DHCP4_TAG_BOOTFILE 67 /// Bootfile name +#define DHCP4_TAG_MOBILEIP 68 /// Mobile IP Home Agent +#define DHCP4_TAG_SMTP 69 /// Simple Mail Transport Protocol Server +#define DHCP4_TAG_POP3 70 /// Post Office Protocol (POP3) Server +#define DHCP4_TAG_NNTP 71 /// Network News Transport Protocol Server +#define DHCP4_TAG_WWW 72 /// Default World Wide Web (WWW) Server +#define DHCP4_TAG_FINGER 73 /// Default Finger Server +#define DHCP4_TAG_IRC 74 /// Default Internet Relay Chat (IRC) Server +#define DHCP4_TAG_STTALK 75 /// StreetTalk Server +#define DHCP4_TAG_STDA 76 /// StreetTalk Directory Assistance Server +#define DHCP4_TAG_USER_CLASS_ID 77 /// User class identifier +#define DHCP4_TAG_ARCH 93 /// Client System Architecture Type, RFC 4578 +#define DHCP4_TAG_UNDI 94 /// Client Network Interface Identifier, RFC 4578 +#define DHCP4_TAG_UUID 97 /// Client Machine Identifier, RFC 4578 +#define DHCP4_TAG_CLASSLESS_ROUTE 121 /// Classless Route /// /// Dynamic Host Configuration Protocol for IPv6 (DHCPv6) @@ -104,64 +103,64 @@ /// Enumeration of Dhcp6 message type, refers to section-5.3 of rfc-3315. /// typedef enum { - Dhcp6MsgSolicit = 1, - Dhcp6MsgAdvertise = 2, - Dhcp6MsgRequest = 3, - Dhcp6MsgConfirm = 4, - Dhcp6MsgRenew = 5, - Dhcp6MsgRebind = 6, - Dhcp6MsgReply = 7, - Dhcp6MsgRelease = 8, - Dhcp6MsgDecline = 9, - Dhcp6MsgReconfigure = 10, - Dhcp6MsgInfoRequest = 11 + Dhcp6MsgSolicit = 1, + Dhcp6MsgAdvertise = 2, + Dhcp6MsgRequest = 3, + Dhcp6MsgConfirm = 4, + Dhcp6MsgRenew = 5, + Dhcp6MsgRebind = 6, + Dhcp6MsgReply = 7, + Dhcp6MsgRelease = 8, + Dhcp6MsgDecline = 9, + Dhcp6MsgReconfigure = 10, + Dhcp6MsgInfoRequest = 11 } DHCP6_MSG_TYPE; /// /// Enumeration of option code in Dhcp6 packet, refers to section-24.3 of rfc-3315. /// typedef enum { - Dhcp6OptClientId = 1, - Dhcp6OptServerId = 2, - Dhcp6OptIana = 3, - Dhcp6OptIata = 4, - Dhcp6OptIaAddr = 5, - Dhcp6OptRequestOption = 6, - Dhcp6OptPreference = 7, - Dhcp6OptElapsedTime = 8, - Dhcp6OptReplayMessage = 9, - Dhcp6OptAuthentication = 11, - Dhcp6OptServerUnicast = 12, - Dhcp6OptStatusCode = 13, - Dhcp6OptRapidCommit = 14, - Dhcp6OptUserClass = 15, - Dhcp6OptVendorClass = 16, - Dhcp6OptVendorInfo = 17, - Dhcp6OptInterfaceId = 18, - Dhcp6OptReconfigMessage = 19, - Dhcp6OptReconfigureAccept = 20 + Dhcp6OptClientId = 1, + Dhcp6OptServerId = 2, + Dhcp6OptIana = 3, + Dhcp6OptIata = 4, + Dhcp6OptIaAddr = 5, + Dhcp6OptRequestOption = 6, + Dhcp6OptPreference = 7, + Dhcp6OptElapsedTime = 8, + Dhcp6OptReplayMessage = 9, + Dhcp6OptAuthentication = 11, + Dhcp6OptServerUnicast = 12, + Dhcp6OptStatusCode = 13, + Dhcp6OptRapidCommit = 14, + Dhcp6OptUserClass = 15, + Dhcp6OptVendorClass = 16, + Dhcp6OptVendorInfo = 17, + Dhcp6OptInterfaceId = 18, + Dhcp6OptReconfigMessage = 19, + Dhcp6OptReconfigureAccept = 20 } DHCP6_OPT_CODE; /// /// Enumeration of status code recorded by IANA, refers to section-24.4 of rfc-3315. /// typedef enum { - Dhcp6StsSuccess = 0, - Dhcp6StsUnspecFail = 1, - Dhcp6StsNoAddrsAvail = 2, - Dhcp6StsNoBinding = 3, - Dhcp6StsNotOnLink = 4, - Dhcp6StsUseMulticast = 5 + Dhcp6StsSuccess = 0, + Dhcp6StsUnspecFail = 1, + Dhcp6StsNoAddrsAvail = 2, + Dhcp6StsNoBinding = 3, + Dhcp6StsNotOnLink = 4, + Dhcp6StsUseMulticast = 5 } DHCP6_STS_CODE; /// /// Enumeration of Duid type recorded by IANA, refers to section-24.5 of rfc-3315. /// typedef enum { - Dhcp6DuidTypeLlt = 1, - Dhcp6DuidTypeEn = 2, - Dhcp6DuidTypeLl = 3, - Dhcp6DuidTypeUuid = 4 + Dhcp6DuidTypeLlt = 1, + Dhcp6DuidTypeEn = 2, + Dhcp6DuidTypeLl = 3, + Dhcp6DuidTypeUuid = 4 } DHCP6_DUID_TYPE; /// Transmission and Retransmission Parameters @@ -170,114 +169,114 @@ typedef enum { /// /// Transmit parameters of solicit message, refers to section-5.5 of rfc-3315. /// -#define DHCP6_SOL_MAX_DELAY 1 -#define DHCP6_SOL_IRT 1 -#define DHCP6_SOL_MRC 0 -#define DHCP6_SOL_MRT 120 -#define DHCP6_SOL_MRD 0 +#define DHCP6_SOL_MAX_DELAY 1 +#define DHCP6_SOL_IRT 1 +#define DHCP6_SOL_MRC 0 +#define DHCP6_SOL_MRT 120 +#define DHCP6_SOL_MRD 0 /// /// Transmit parameters of request message, refers to section-5.5 of rfc-3315. /// -#define DHCP6_REQ_IRT 1 -#define DHCP6_REQ_MRC 10 -#define DHCP6_REQ_MRT 30 -#define DHCP6_REQ_MRD 0 +#define DHCP6_REQ_IRT 1 +#define DHCP6_REQ_MRC 10 +#define DHCP6_REQ_MRT 30 +#define DHCP6_REQ_MRD 0 /// /// Transmit parameters of confirm message, refers to section-5.5 of rfc-3315. /// -#define DHCP6_CNF_MAX_DELAY 1 -#define DHCP6_CNF_IRT 1 -#define DHCP6_CNF_MRC 0 -#define DHCP6_CNF_MRT 4 -#define DHCP6_CNF_MRD 10 +#define DHCP6_CNF_MAX_DELAY 1 +#define DHCP6_CNF_IRT 1 +#define DHCP6_CNF_MRC 0 +#define DHCP6_CNF_MRT 4 +#define DHCP6_CNF_MRD 10 /// /// Transmit parameters of renew message, refers to section-5.5 of rfc-3315. /// -#define DHCP6_REN_IRT 10 -#define DHCP6_REN_MRC 0 -#define DHCP6_REN_MRT 600 -#define DHCP6_REN_MRD 0 +#define DHCP6_REN_IRT 10 +#define DHCP6_REN_MRC 0 +#define DHCP6_REN_MRT 600 +#define DHCP6_REN_MRD 0 /// /// Transmit parameters of rebind message, refers to section-5.5 of rfc-3315. /// -#define DHCP6_REB_IRT 10 -#define DHCP6_REB_MRC 0 -#define DHCP6_REB_MRT 600 -#define DHCP6_REB_MRD 0 +#define DHCP6_REB_IRT 10 +#define DHCP6_REB_MRC 0 +#define DHCP6_REB_MRT 600 +#define DHCP6_REB_MRD 0 /// /// Transmit parameters of information request message, refers to section-5.5 of rfc-3315. /// -#define DHCP6_INF_MAX_DELAY 1 -#define DHCP6_INF_IRT 1 -#define DHCP6_INF_MRC 0 -#define DHCP6_INF_MRT 120 -#define DHCP6_INF_MRD 0 +#define DHCP6_INF_MAX_DELAY 1 +#define DHCP6_INF_IRT 1 +#define DHCP6_INF_MRC 0 +#define DHCP6_INF_MRT 120 +#define DHCP6_INF_MRD 0 /// /// Transmit parameters of release message, refers to section-5.5 of rfc-3315. /// -#define DHCP6_REL_IRT 1 -#define DHCP6_REL_MRC 5 -#define DHCP6_REL_MRT 0 -#define DHCP6_REL_MRD 0 +#define DHCP6_REL_IRT 1 +#define DHCP6_REL_MRC 5 +#define DHCP6_REL_MRT 0 +#define DHCP6_REL_MRD 0 /// /// Transmit parameters of decline message, refers to section-5.5 of rfc-3315. /// -#define DHCP6_DEC_IRT 1 -#define DHCP6_DEC_MRC 5 -#define DHCP6_DEC_MRT 0 -#define DHCP6_DEC_MRD 0 +#define DHCP6_DEC_IRT 1 +#define DHCP6_DEC_MRC 5 +#define DHCP6_DEC_MRT 0 +#define DHCP6_DEC_MRD 0 //// //// DHCPv6 Options, definitions from RFC 3315,RFC 5970 and RFC 3646. //// -#define DHCP6_OPT_CLIENT_ID 1 /// Client Identifier Option -#define DHCP6_OPT_SERVER_ID 2 /// Server Identifier Option -#define DHCP6_OPT_IA_NA 3 /// The Identity Association for Non-temporary Addresses option -#define DHCP6_OPT_IA_TA 4 /// The Identity Association for the Temporary Addresses -#define DHCP6_OPT_IAADDR 5 /// IA Address option -#define DHCP6_OPT_ORO 6 /// Request option -#define DHCP6_OPT_PREFERENCE 7 /// Preference option -#define DHCP6_OPT_ELAPSED_TIME 8 /// Elapsed Time Option -#define DHCP6_OPT_REPLAY_MSG 9 /// Relay Message option -#define DHCP6_OPT_AUTH 11 /// Authentication option -#define DHCP6_OPT_UNICAST 12 /// Server Unicast Option -#define DHCP6_OPT_STATUS_CODE 13 /// Status Code Option -#define DHCP6_OPT_RAPID_COMMIT 14 /// Rapid Commit option -#define DHCP6_OPT_USER_CLASS 15 /// User Class option -#define DHCP6_OPT_VENDOR_CLASS 16 /// Vendor Class Option -#define DHCP6_OPT_VENDOR_OPTS 17 /// Vendor-specific Information Option -#define DHCP6_OPT_INTERFACE_ID 18 /// Interface-Id Option -#define DHCP6_OPT_RECONFIG_MSG 19 /// Reconfigure Message Option -#define DHCP6_OPT_RECONFIG_ACCEPT 20 /// Reconfigure Accept Option -#define DHCP6_OPT_DNS_SERVERS 23 /// DNS Configuration options, RFC 3646 -#define DHCP6_OPT_BOOT_FILE_URL 59 /// Assigned by IANA, RFC 5970 -#define DHCP6_OPT_BOOT_FILE_PARAM 60 /// Assigned by IANA, RFC 5970 -#define DHCP6_OPT_ARCH 61 /// Assigned by IANA, RFC 5970 -#define DHCP6_OPT_UNDI 62 /// Assigned by IANA, RFC 5970 +#define DHCP6_OPT_CLIENT_ID 1 /// Client Identifier Option +#define DHCP6_OPT_SERVER_ID 2 /// Server Identifier Option +#define DHCP6_OPT_IA_NA 3 /// The Identity Association for Non-temporary Addresses option +#define DHCP6_OPT_IA_TA 4 /// The Identity Association for the Temporary Addresses +#define DHCP6_OPT_IAADDR 5 /// IA Address option +#define DHCP6_OPT_ORO 6 /// Request option +#define DHCP6_OPT_PREFERENCE 7 /// Preference option +#define DHCP6_OPT_ELAPSED_TIME 8 /// Elapsed Time Option +#define DHCP6_OPT_REPLAY_MSG 9 /// Relay Message option +#define DHCP6_OPT_AUTH 11 /// Authentication option +#define DHCP6_OPT_UNICAST 12 /// Server Unicast Option +#define DHCP6_OPT_STATUS_CODE 13 /// Status Code Option +#define DHCP6_OPT_RAPID_COMMIT 14 /// Rapid Commit option +#define DHCP6_OPT_USER_CLASS 15 /// User Class option +#define DHCP6_OPT_VENDOR_CLASS 16 /// Vendor Class Option +#define DHCP6_OPT_VENDOR_OPTS 17 /// Vendor-specific Information Option +#define DHCP6_OPT_INTERFACE_ID 18 /// Interface-Id Option +#define DHCP6_OPT_RECONFIG_MSG 19 /// Reconfigure Message Option +#define DHCP6_OPT_RECONFIG_ACCEPT 20 /// Reconfigure Accept Option +#define DHCP6_OPT_DNS_SERVERS 23 /// DNS Configuration options, RFC 3646 +#define DHCP6_OPT_BOOT_FILE_URL 59 /// Assigned by IANA, RFC 5970 +#define DHCP6_OPT_BOOT_FILE_PARAM 60 /// Assigned by IANA, RFC 5970 +#define DHCP6_OPT_ARCH 61 /// Assigned by IANA, RFC 5970 +#define DHCP6_OPT_UNDI 62 /// Assigned by IANA, RFC 5970 /// /// Processor Architecture Types /// These identifiers are defined by IETF: /// http://www.ietf.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xml /// -#define PXE_CLIENT_ARCH_X86_BIOS 0x0000 /// x86 BIOS for PXE -#define PXE_CLIENT_ARCH_IPF 0x0002 /// Itanium for PXE -#define PXE_CLIENT_ARCH_IA32 0x0006 /// x86 uefi for PXE -#define PXE_CLIENT_ARCH_X64 0x0007 /// x64 uefi for PXE -#define PXE_CLIENT_ARCH_EBC 0x0009 /// EBC for PXE -#define PXE_CLIENT_ARCH_ARM 0x000A /// Arm uefi 32 for PXE -#define PXE_CLIENT_ARCH_AARCH64 0x000B /// Arm uefi 64 for PXE -#define PXE_CLIENT_ARCH_RISCV32 0x0019 /// RISC-V uefi 32 for PXE -#define PXE_CLIENT_ARCH_RISCV64 0x001B /// RISC-V uefi 64 for PXE -#define PXE_CLIENT_ARCH_RISCV128 0x001D /// RISC-V uefi 128 for PXE +#define PXE_CLIENT_ARCH_X86_BIOS 0x0000 /// x86 BIOS for PXE +#define PXE_CLIENT_ARCH_IPF 0x0002 /// Itanium for PXE +#define PXE_CLIENT_ARCH_IA32 0x0006 /// x86 uefi for PXE +#define PXE_CLIENT_ARCH_X64 0x0007 /// x64 uefi for PXE +#define PXE_CLIENT_ARCH_EBC 0x0009 /// EBC for PXE +#define PXE_CLIENT_ARCH_ARM 0x000A /// Arm uefi 32 for PXE +#define PXE_CLIENT_ARCH_AARCH64 0x000B /// Arm uefi 64 for PXE +#define PXE_CLIENT_ARCH_RISCV32 0x0019 /// RISC-V uefi 32 for PXE +#define PXE_CLIENT_ARCH_RISCV64 0x001B /// RISC-V uefi 64 for PXE +#define PXE_CLIENT_ARCH_RISCV128 0x001D /// RISC-V uefi 128 for PXE -#define HTTP_CLIENT_ARCH_IA32 0x000F /// x86 uefi boot from http -#define HTTP_CLIENT_ARCH_X64 0x0010 /// x64 uefi boot from http -#define HTTP_CLIENT_ARCH_EBC 0x0011 /// EBC boot from http -#define HTTP_CLIENT_ARCH_ARM 0x0012 /// Arm uefi 32 boot from http -#define HTTP_CLIENT_ARCH_AARCH64 0x0013 /// Arm uefi 64 boot from http -#define HTTP_CLIENT_ARCH_RISCV32 0x001A /// RISC-V uefi 32 boot from http -#define HTTP_CLIENT_ARCH_RISCV64 0x001C /// RISC-V uefi 64 boot from http -#define HTTP_CLIENT_ARCH_RISCV128 0x001E /// RISC-V uefi 128 boot from http +#define HTTP_CLIENT_ARCH_IA32 0x000F /// x86 uefi boot from http +#define HTTP_CLIENT_ARCH_X64 0x0010 /// x64 uefi boot from http +#define HTTP_CLIENT_ARCH_EBC 0x0011 /// EBC boot from http +#define HTTP_CLIENT_ARCH_ARM 0x0012 /// Arm uefi 32 boot from http +#define HTTP_CLIENT_ARCH_AARCH64 0x0013 /// Arm uefi 64 boot from http +#define HTTP_CLIENT_ARCH_RISCV32 0x001A /// RISC-V uefi 32 boot from http +#define HTTP_CLIENT_ARCH_RISCV64 0x001C /// RISC-V uefi 64 boot from http +#define HTTP_CLIENT_ARCH_RISCV128 0x001E /// RISC-V uefi 128 boot from http #endif diff --git a/MdePkg/Include/IndustryStandard/DmaRemappingReportingTable.h b/MdePkg/Include/IndustryStandard/DmaRemappingReportingTable.h index 48f6959..193e4bc 100644 --- a/MdePkg/Include/IndustryStandard/DmaRemappingReportingTable.h +++ b/MdePkg/Include/IndustryStandard/DmaRemappingReportingTable.h @@ -14,6 +14,7 @@ - HPET - High Precision Event Timer - NUMA - Non-uniform Memory Access **/ + #ifndef _DMA_REMAPPING_REPORTING_TABLE_H_ #define _DMA_REMAPPING_REPORTING_TABLE_H_ @@ -24,7 +25,7 @@ /// /// DMA-Remapping Reporting Structure definitions from section 8.1 ///@{ -#define EFI_ACPI_DMAR_REVISION 0x01 +#define EFI_ACPI_DMAR_REVISION 0x01 #define EFI_ACPI_DMAR_FLAGS_INTR_REMAP BIT0 #define EFI_ACPI_DMAR_FLAGS_X2APIC_OPT_OUT BIT1 @@ -34,12 +35,12 @@ /// /// Remapping Structure Types definitions from section 8.2 ///@{ -#define EFI_ACPI_DMAR_TYPE_DRHD 0x00 -#define EFI_ACPI_DMAR_TYPE_RMRR 0x01 -#define EFI_ACPI_DMAR_TYPE_ATSR 0x02 -#define EFI_ACPI_DMAR_TYPE_RHSA 0x03 -#define EFI_ACPI_DMAR_TYPE_ANDD 0x04 -#define EFI_ACPI_DMAR_TYPE_SATC 0x05 +#define EFI_ACPI_DMAR_TYPE_DRHD 0x00 +#define EFI_ACPI_DMAR_TYPE_RMRR 0x01 +#define EFI_ACPI_DMAR_TYPE_ATSR 0x02 +#define EFI_ACPI_DMAR_TYPE_RHSA 0x03 +#define EFI_ACPI_DMAR_TYPE_ANDD 0x04 +#define EFI_ACPI_DMAR_TYPE_SATC 0x05 ///@} /// @@ -60,33 +61,33 @@ /// /// Root Port ATS Capability Reporting Structure definitions from section 8.5 /// -#define EFI_ACPI_DMAR_ATSR_FLAGS_ALL_PORTS BIT0 +#define EFI_ACPI_DMAR_ATSR_FLAGS_ALL_PORTS BIT0 /// /// Definition for DMA Remapping Structure Header /// typedef struct { - UINT16 Type; - UINT16 Length; + UINT16 Type; + UINT16 Length; } EFI_ACPI_DMAR_STRUCTURE_HEADER; /// /// Definition for DMA-Remapping PCI Path /// typedef struct { - UINT8 Device; - UINT8 Function; + UINT8 Device; + UINT8 Function; } EFI_ACPI_DMAR_PCI_PATH; /// /// Device Scope Structure is defined in section 8.3.1 /// typedef struct { - UINT8 Type; - UINT8 Length; - UINT16 Reserved2; - UINT8 EnumerationId; - UINT8 StartBusNumber; + UINT8 Type; + UINT8 Length; + UINT16 Reserved2; + UINT8 EnumerationId; + UINT8 StartBusNumber; } EFI_ACPI_DMAR_DEVICE_SCOPE_STRUCTURE_HEADER; /** @@ -96,7 +97,8 @@ typedef struct { for each PCI segment in the platform. **/ typedef struct { - EFI_ACPI_DMAR_STRUCTURE_HEADER Header; + EFI_ACPI_DMAR_STRUCTURE_HEADER Header; + /** - Bit[0]: INCLUDE_PCI_ALL - If Set, this remapping hardware unit has under its scope all @@ -108,16 +110,16 @@ typedef struct { through the DeviceScope field. - Bits[7:1] Reserved. **/ - UINT8 Flags; - UINT8 Reserved; + UINT8 Flags; + UINT8 Reserved; /// /// The PCI Segment associated with this unit. /// - UINT16 SegmentNumber; + UINT16 SegmentNumber; /// /// Base address of remapping hardware register-set for this unit. /// - UINT64 RegisterBaseAddress; + UINT64 RegisterBaseAddress; } EFI_ACPI_DMAR_DRHD_HEADER; /** @@ -127,24 +129,25 @@ typedef struct { reserved memory region. **/ typedef struct { - EFI_ACPI_DMAR_STRUCTURE_HEADER Header; - UINT8 Reserved[2]; + EFI_ACPI_DMAR_STRUCTURE_HEADER Header; + UINT8 Reserved[2]; /// /// PCI Segment Number associated with devices identified through /// the Device Scope field. /// - UINT16 SegmentNumber; + UINT16 SegmentNumber; /// /// Base address of 4KB-aligned reserved memory region /// - UINT64 ReservedMemoryRegionBaseAddress; + UINT64 ReservedMemoryRegionBaseAddress; + /** Last address of the reserved memory region. Value in this field must be greater than the value in Reserved Memory Region Base Address field. The reserved memory region size (Limit - Base + 1) must be an integer multiple of 4KB. **/ - UINT64 ReservedMemoryRegionLimitAddress; + UINT64 ReservedMemoryRegionLimitAddress; } EFI_ACPI_DMAR_RMRR_HEADER; /** @@ -158,7 +161,8 @@ typedef struct { ATS transactions. **/ typedef struct { - EFI_ACPI_DMAR_STRUCTURE_HEADER Header; + EFI_ACPI_DMAR_STRUCTURE_HEADER Header; + /** - Bit[0]: ALL_PORTS: - If Set, indicates all PCI Express Root Ports in the specified @@ -167,12 +171,12 @@ typedef struct { Root Ports identified through the Device Scope field. - Bits[7:1] Reserved. **/ - UINT8 Flags; - UINT8 Reserved; + UINT8 Flags; + UINT8 Reserved; /// /// The PCI Segment associated with this ATSR structure /// - UINT16 SegmentNumber; + UINT16 SegmentNumber; } EFI_ACPI_DMAR_ATSR_HEADER; /** @@ -183,18 +187,18 @@ typedef struct { reported through DRHD structure. **/ typedef struct { - EFI_ACPI_DMAR_STRUCTURE_HEADER Header; - UINT8 Reserved[4]; + EFI_ACPI_DMAR_STRUCTURE_HEADER Header; + UINT8 Reserved[4]; /// /// Register Base Address of this Remap hardware unit reported in the /// corresponding DRHD structure. /// - UINT64 RegisterBaseAddress; + UINT64 RegisterBaseAddress; /// /// Proximity Domain to which the Remap hardware unit identified by the /// Register Base Address field belongs. /// - UINT32 ProximityDomain; + UINT32 ProximityDomain; } EFI_ACPI_DMAR_RHSA_HEADER; /** @@ -204,8 +208,9 @@ typedef struct { with Device-Scope entries of type ACPI_NAMESPACE_DEVICE. **/ typedef struct { - EFI_ACPI_DMAR_STRUCTURE_HEADER Header; - UINT8 Reserved[3]; + EFI_ACPI_DMAR_STRUCTURE_HEADER Header; + UINT8 Reserved[3]; + /** Each ACPI device enumerated through an ANDD structure must have a unique value for this field. To report an ACPI device with ACPI Device Number @@ -214,7 +219,7 @@ typedef struct { The Start Bus Number and Path fields in the Device-Scope together provides the 16-bit source-id allocated by platform for the ACPI device. **/ - UINT8 AcpiDeviceNumber; + UINT8 AcpiDeviceNumber; } EFI_ACPI_DMAR_ANDD_HEADER; /** @@ -222,7 +227,8 @@ typedef struct { defined in section 8.8. **/ typedef struct { - EFI_ACPI_DMAR_STRUCTURE_HEADER Header; + EFI_ACPI_DMAR_STRUCTURE_HEADER Header; + /** - Bit[0]: ATC_REQUIRED: - If Set, indicates that every SoC integrated device enumerated @@ -233,14 +239,14 @@ typedef struct { performance or functionality). - Bits[7:1] Reserved. **/ - UINT8 Flags; - UINT8 Reserved; + UINT8 Flags; + UINT8 Reserved; /// /// The PCI Segment associated with this SATC structure. All SoC integrated /// devices within a PCI segment with same value for Flags field must be /// enumerated in the same SATC structure. /// - UINT16 SegmentNumber; + UINT16 SegmentNumber; } EFI_ACPI_DMAR_SATC_HEADER; /** @@ -257,7 +263,8 @@ typedef struct { structures of type 1 (RMRR), and so forth. **/ typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_DESCRIPTION_HEADER Header; + /** This field indicates the maximum DMA physical addressability supported by this platform. The system address map reported by the BIOS indicates what @@ -267,7 +274,8 @@ typedef struct { For example, for a platform supporting 40 bits of physical addressability, the value of 100111b is reported in this field. **/ - UINT8 HostAddressWidth; + UINT8 HostAddressWidth; + /** - Bit[0]: INTR_REMAP - If Clear, the platform does not support interrupt remapping. If Set, the platform supports interrupt remapping. @@ -282,8 +290,8 @@ typedef struct { such as on ExitBootServices(). - Bits[7:3] Reserved. **/ - UINT8 Flags; - UINT8 Reserved[10]; + UINT8 Flags; + UINT8 Reserved[10]; } EFI_ACPI_DMAR_HEADER; #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/ElTorito.h b/MdePkg/Include/IndustryStandard/ElTorito.h index 94b55d8..ea76744 100644 --- a/MdePkg/Include/IndustryStandard/ElTorito.h +++ b/MdePkg/Include/IndustryStandard/ElTorito.h @@ -16,9 +16,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // // CDROM_VOLUME_DESCRIPTOR.Types, defined in ISO 9660 // -#define CDVOL_TYPE_STANDARD 0x0 -#define CDVOL_TYPE_CODED 0x1 -#define CDVOL_TYPE_END 0xFF +#define CDVOL_TYPE_STANDARD 0x0 +#define CDVOL_TYPE_CODED 0x1 +#define CDVOL_TYPE_END 0xFF /// /// CDROM_VOLUME_DESCRIPTOR.Id @@ -28,7 +28,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// CDROM_VOLUME_DESCRIPTOR.SystemId /// -#define CDVOL_ELTORITO_ID "EL TORITO SPECIFICATION" +#define CDVOL_ELTORITO_ID "EL TORITO SPECIFICATION" // // Indicator types @@ -42,12 +42,11 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // // ELTORITO_CATALOG.Boot.MediaTypes // -#define ELTORITO_NO_EMULATION 0x00 -#define ELTORITO_12_DISKETTE 0x01 -#define ELTORITO_14_DISKETTE 0x02 -#define ELTORITO_28_DISKETTE 0x03 -#define ELTORITO_HARD_DISK 0x04 - +#define ELTORITO_NO_EMULATION 0x00 +#define ELTORITO_12_DISKETTE 0x01 +#define ELTORITO_14_DISKETTE 0x02 +#define ELTORITO_28_DISKETTE 0x03 +#define ELTORITO_HARD_DISK 0x04 #pragma pack(1) @@ -56,38 +55,37 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// typedef union { struct { - UINT8 Type; - CHAR8 Id[5]; ///< "CD001" - CHAR8 Reserved[82]; + UINT8 Type; + CHAR8 Id[5]; ///< "CD001" + CHAR8 Reserved[82]; } Unknown; /// /// Boot Record Volume Descriptor, defined in "El Torito" Specification. /// struct { - UINT8 Type; ///< Must be 0 - CHAR8 Id[5]; ///< "CD001" - UINT8 Version; ///< Must be 1 - CHAR8 SystemId[32]; ///< "EL TORITO SPECIFICATION" - CHAR8 Unused[32]; ///< Must be 0 - UINT8 EltCatalog[4]; ///< Absolute pointer to first sector of Boot Catalog - CHAR8 Unused2[13]; ///< Must be 0 + UINT8 Type; ///< Must be 0 + CHAR8 Id[5]; ///< "CD001" + UINT8 Version; ///< Must be 1 + CHAR8 SystemId[32]; ///< "EL TORITO SPECIFICATION" + CHAR8 Unused[32]; ///< Must be 0 + UINT8 EltCatalog[4]; ///< Absolute pointer to first sector of Boot Catalog + CHAR8 Unused2[13]; ///< Must be 0 } BootRecordVolume; /// /// Primary Volume Descriptor, defined in ISO 9660. /// struct { - UINT8 Type; - CHAR8 Id[5]; ///< "CD001" - UINT8 Version; - UINT8 Unused; ///< Must be 0 - CHAR8 SystemId[32]; - CHAR8 VolumeId[32]; - UINT8 Unused2[8]; ///< Must be 0 - UINT32 VolSpaceSize[2]; ///< the number of Logical Blocks + UINT8 Type; + CHAR8 Id[5]; ///< "CD001" + UINT8 Version; + UINT8 Unused; ///< Must be 0 + CHAR8 SystemId[32]; + CHAR8 VolumeId[32]; + UINT8 Unused2[8]; ///< Must be 0 + UINT32 VolSpaceSize[2]; ///< the number of Logical Blocks } PrimaryVolume; - } CDROM_VOLUME_DESCRIPTOR; /// @@ -95,45 +93,44 @@ typedef union { /// typedef union { struct { - CHAR8 Reserved[0x20]; + CHAR8 Reserved[0x20]; } Unknown; /// /// Catalog validation entry (Catalog header) /// struct { - UINT8 Indicator; ///< Must be 01 - UINT8 PlatformId; - UINT16 Reserved; - CHAR8 ManufacId[24]; - UINT16 Checksum; - UINT16 Id55AA; + UINT8 Indicator; ///< Must be 01 + UINT8 PlatformId; + UINT16 Reserved; + CHAR8 ManufacId[24]; + UINT16 Checksum; + UINT16 Id55AA; } Catalog; /// /// Initial/Default Entry or Section Entry /// struct { - UINT8 Indicator; ///< 88 = Bootable, 00 = Not Bootable - UINT8 MediaType : 4; - UINT8 Reserved1 : 4; ///< Must be 0 - UINT16 LoadSegment; - UINT8 SystemType; - UINT8 Reserved2; ///< Must be 0 - UINT16 SectorCount; - UINT32 Lba; + UINT8 Indicator; ///< 88 = Bootable, 00 = Not Bootable + UINT8 MediaType : 4; + UINT8 Reserved1 : 4; ///< Must be 0 + UINT16 LoadSegment; + UINT8 SystemType; + UINT8 Reserved2; ///< Must be 0 + UINT16 SectorCount; + UINT32 Lba; } Boot; /// /// Section Header Entry /// struct { - UINT8 Indicator; ///< 90 - Header, more header follw, 91 - Final Header - UINT8 PlatformId; - UINT16 SectionEntries; ///< Number of section entries following this header - CHAR8 Id[28]; + UINT8 Indicator; ///< 90 - Header, more header follw, 91 - Final Header + UINT8 PlatformId; + UINT16 SectionEntries; ///< Number of section entries following this header + CHAR8 Id[28]; } Section; - } ELTORITO_CATALOG; #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/Emmc.h b/MdePkg/Include/IndustryStandard/Emmc.h index 5cfc958..3a4394f 100644 --- a/MdePkg/Include/IndustryStandard/Emmc.h +++ b/MdePkg/Include/IndustryStandard/Emmc.h @@ -14,276 +14,276 @@ // // EMMC command index // -#define EMMC_GO_IDLE_STATE 0 -#define EMMC_SEND_OP_COND 1 -#define EMMC_ALL_SEND_CID 2 -#define EMMC_SET_RELATIVE_ADDR 3 -#define EMMC_SET_DSR 4 -#define EMMC_SLEEP_AWAKE 5 -#define EMMC_SWITCH 6 -#define EMMC_SELECT_DESELECT_CARD 7 -#define EMMC_SEND_EXT_CSD 8 -#define EMMC_SEND_CSD 9 -#define EMMC_SEND_CID 10 -#define EMMC_STOP_TRANSMISSION 12 -#define EMMC_SEND_STATUS 13 -#define EMMC_BUSTEST_R 14 -#define EMMC_GO_INACTIVE_STATE 15 -#define EMMC_SET_BLOCKLEN 16 -#define EMMC_READ_SINGLE_BLOCK 17 -#define EMMC_READ_MULTIPLE_BLOCK 18 -#define EMMC_BUSTEST_W 19 -#define EMMC_SEND_TUNING_BLOCK 21 -#define EMMC_SET_BLOCK_COUNT 23 -#define EMMC_WRITE_BLOCK 24 -#define EMMC_WRITE_MULTIPLE_BLOCK 25 -#define EMMC_PROGRAM_CID 26 -#define EMMC_PROGRAM_CSD 27 -#define EMMC_SET_WRITE_PROT 28 -#define EMMC_CLR_WRITE_PROT 29 -#define EMMC_SEND_WRITE_PROT 30 -#define EMMC_SEND_WRITE_PROT_TYPE 31 -#define EMMC_ERASE_GROUP_START 35 -#define EMMC_ERASE_GROUP_END 36 -#define EMMC_ERASE 38 -#define EMMC_FAST_IO 39 -#define EMMC_GO_IRQ_STATE 40 -#define EMMC_LOCK_UNLOCK 42 -#define EMMC_SET_TIME 49 -#define EMMC_PROTOCOL_RD 53 -#define EMMC_PROTOCOL_WR 54 -#define EMMC_APP_CMD 55 -#define EMMC_GEN_CMD 56 +#define EMMC_GO_IDLE_STATE 0 +#define EMMC_SEND_OP_COND 1 +#define EMMC_ALL_SEND_CID 2 +#define EMMC_SET_RELATIVE_ADDR 3 +#define EMMC_SET_DSR 4 +#define EMMC_SLEEP_AWAKE 5 +#define EMMC_SWITCH 6 +#define EMMC_SELECT_DESELECT_CARD 7 +#define EMMC_SEND_EXT_CSD 8 +#define EMMC_SEND_CSD 9 +#define EMMC_SEND_CID 10 +#define EMMC_STOP_TRANSMISSION 12 +#define EMMC_SEND_STATUS 13 +#define EMMC_BUSTEST_R 14 +#define EMMC_GO_INACTIVE_STATE 15 +#define EMMC_SET_BLOCKLEN 16 +#define EMMC_READ_SINGLE_BLOCK 17 +#define EMMC_READ_MULTIPLE_BLOCK 18 +#define EMMC_BUSTEST_W 19 +#define EMMC_SEND_TUNING_BLOCK 21 +#define EMMC_SET_BLOCK_COUNT 23 +#define EMMC_WRITE_BLOCK 24 +#define EMMC_WRITE_MULTIPLE_BLOCK 25 +#define EMMC_PROGRAM_CID 26 +#define EMMC_PROGRAM_CSD 27 +#define EMMC_SET_WRITE_PROT 28 +#define EMMC_CLR_WRITE_PROT 29 +#define EMMC_SEND_WRITE_PROT 30 +#define EMMC_SEND_WRITE_PROT_TYPE 31 +#define EMMC_ERASE_GROUP_START 35 +#define EMMC_ERASE_GROUP_END 36 +#define EMMC_ERASE 38 +#define EMMC_FAST_IO 39 +#define EMMC_GO_IRQ_STATE 40 +#define EMMC_LOCK_UNLOCK 42 +#define EMMC_SET_TIME 49 +#define EMMC_PROTOCOL_RD 53 +#define EMMC_PROTOCOL_WR 54 +#define EMMC_APP_CMD 55 +#define EMMC_GEN_CMD 56 typedef enum { - EmmcPartitionUserData = 0, - EmmcPartitionBoot1 = 1, - EmmcPartitionBoot2 = 2, - EmmcPartitionRPMB = 3, - EmmcPartitionGP1 = 4, - EmmcPartitionGP2 = 5, - EmmcPartitionGP3 = 6, - EmmcPartitionGP4 = 7, + EmmcPartitionUserData = 0, + EmmcPartitionBoot1 = 1, + EmmcPartitionBoot2 = 2, + EmmcPartitionRPMB = 3, + EmmcPartitionGP1 = 4, + EmmcPartitionGP2 = 5, + EmmcPartitionGP3 = 6, + EmmcPartitionGP4 = 7, EmmcPartitionUnknown } EMMC_PARTITION_TYPE; #pragma pack(1) typedef struct { - UINT8 NotUsed:1; // Not used [0:0] - UINT8 Crc:7; // CRC [7:1] - UINT8 ManufacturingDate; // Manufacturing date [15:8] - UINT8 ProductSerialNumber[4]; // Product serial number [47:16] - UINT8 ProductRevision; // Product revision [55:48] - UINT8 ProductName[6]; // Product name [103:56] - UINT8 OemId; // OEM/Application ID [111:104] - UINT8 DeviceType:2; // Device/BGA [113:112] - UINT8 Reserved:6; // Reserved [119:114] - UINT8 ManufacturerId; // Manufacturer ID [127:120] + UINT8 NotUsed : 1; // Not used [0:0] + UINT8 Crc : 7; // CRC [7:1] + UINT8 ManufacturingDate; // Manufacturing date [15:8] + UINT8 ProductSerialNumber[4]; // Product serial number [47:16] + UINT8 ProductRevision; // Product revision [55:48] + UINT8 ProductName[6]; // Product name [103:56] + UINT8 OemId; // OEM/Application ID [111:104] + UINT8 DeviceType : 2; // Device/BGA [113:112] + UINT8 Reserved : 6; // Reserved [119:114] + UINT8 ManufacturerId; // Manufacturer ID [127:120] } EMMC_CID; typedef struct { - UINT32 NotUsed:1; // Not used [0:0] - UINT32 Crc:7; // CRC [7:1] - UINT32 Ecc:2; // ECC code [9:8] - UINT32 FileFormat:2; // File format [11:10] - UINT32 TmpWriteProtect:1; // Temporary write protection [12:12] - UINT32 PermWriteProtect:1; // Permanent write protection [13:13] - UINT32 Copy:1; // Copy flag (OTP) [14:14] - UINT32 FileFormatGrp:1; // File format group [15:15] - UINT32 ContentProtApp:1; // Content protection application [16:16] - UINT32 Reserved:4; // Reserved [20:17] - UINT32 WriteBlPartial:1; // Partial blocks for write allowed [21:21] - UINT32 WriteBlLen:4; // Max. write data block length [25:22] - UINT32 R2WFactor:3; // Write speed factor [28:26] - UINT32 DefaultEcc:2; // Manufacturer default ECC [30:29] - UINT32 WpGrpEnable:1; // Write protect group enable [31:31] + UINT32 NotUsed : 1; // Not used [0:0] + UINT32 Crc : 7; // CRC [7:1] + UINT32 Ecc : 2; // ECC code [9:8] + UINT32 FileFormat : 2; // File format [11:10] + UINT32 TmpWriteProtect : 1; // Temporary write protection [12:12] + UINT32 PermWriteProtect : 1; // Permanent write protection [13:13] + UINT32 Copy : 1; // Copy flag (OTP) [14:14] + UINT32 FileFormatGrp : 1; // File format group [15:15] + UINT32 ContentProtApp : 1; // Content protection application [16:16] + UINT32 Reserved : 4; // Reserved [20:17] + UINT32 WriteBlPartial : 1; // Partial blocks for write allowed [21:21] + UINT32 WriteBlLen : 4; // Max. write data block length [25:22] + UINT32 R2WFactor : 3; // Write speed factor [28:26] + UINT32 DefaultEcc : 2; // Manufacturer default ECC [30:29] + UINT32 WpGrpEnable : 1; // Write protect group enable [31:31] - UINT32 WpGrpSize:5; // Write protect group size [36:32] - UINT32 EraseGrpMult:5; // Erase group size multiplier [41:37] - UINT32 EraseGrpSize:5; // Erase group size [46:42] - UINT32 CSizeMult:3; // Device size multiplier [49:47] - UINT32 VddWCurrMax:3; // Max. write current @ VDD max [52:50] - UINT32 VddWCurrMin:3; // Max. write current @ VDD min [55:53] - UINT32 VddRCurrMax:3; // Max. read current @ VDD max [58:56] - UINT32 VddRCurrMin:3; // Max. read current @ VDD min [61:59] - UINT32 CSizeLow:2; // Device size low two bits [63:62] + UINT32 WpGrpSize : 5; // Write protect group size [36:32] + UINT32 EraseGrpMult : 5; // Erase group size multiplier [41:37] + UINT32 EraseGrpSize : 5; // Erase group size [46:42] + UINT32 CSizeMult : 3; // Device size multiplier [49:47] + UINT32 VddWCurrMax : 3; // Max. write current @ VDD max [52:50] + UINT32 VddWCurrMin : 3; // Max. write current @ VDD min [55:53] + UINT32 VddRCurrMax : 3; // Max. read current @ VDD max [58:56] + UINT32 VddRCurrMin : 3; // Max. read current @ VDD min [61:59] + UINT32 CSizeLow : 2; // Device size low two bits [63:62] - UINT32 CSizeHigh:10; // Device size high eight bits [73:64] - UINT32 Reserved1:2; // Reserved [75:74] - UINT32 DsrImp:1; // DSR implemented [76:76] - UINT32 ReadBlkMisalign:1; // Read block misalignment [77:77] - UINT32 WriteBlkMisalign:1; // Write block misalignment [78:78] - UINT32 ReadBlPartial:1; // Partial blocks for read allowed [79:79] - UINT32 ReadBlLen:4; // Max. read data block length [83:80] - UINT32 Ccc:12; // Device command classes [95:84] + UINT32 CSizeHigh : 10; // Device size high eight bits [73:64] + UINT32 Reserved1 : 2; // Reserved [75:74] + UINT32 DsrImp : 1; // DSR implemented [76:76] + UINT32 ReadBlkMisalign : 1; // Read block misalignment [77:77] + UINT32 WriteBlkMisalign : 1; // Write block misalignment [78:78] + UINT32 ReadBlPartial : 1; // Partial blocks for read allowed [79:79] + UINT32 ReadBlLen : 4; // Max. read data block length [83:80] + UINT32 Ccc : 12; // Device command classes [95:84] - UINT32 TranSpeed:8; // Max. bus clock frequency [103:96] - UINT32 Nsac:8; // Data read access-time 2 in CLK cycles (NSAC*100) [111:104] - UINT32 Taac:8; // Data read access-time 1 [119:112] - UINT32 Reserved2:2; // Reserved [121:120] - UINT32 SpecVers:4; // System specification version [125:122] - UINT32 CsdStructure:2; // CSD structure [127:126] + UINT32 TranSpeed : 8; // Max. bus clock frequency [103:96] + UINT32 Nsac : 8; // Data read access-time 2 in CLK cycles (NSAC*100) [111:104] + UINT32 Taac : 8; // Data read access-time 1 [119:112] + UINT32 Reserved2 : 2; // Reserved [121:120] + UINT32 SpecVers : 4; // System specification version [125:122] + UINT32 CsdStructure : 2; // CSD structure [127:126] } EMMC_CSD; typedef struct { // // Modes Segment // - UINT8 Reserved[16]; // Reserved [15:0] - UINT8 SecureRemovalType; // Secure Removal Type R/W & R [16] - UINT8 ProductStateAwarenessEnablement; // Product state awareness enablement R/W/E & R [17] - UINT8 MaxPreLoadingDataSize[4]; // Max pre loading data size R [21:18] - UINT8 PreLoadingDataSize[4]; // Pre loading data size R/W/EP [25:22] - UINT8 FfuStatus; // FFU status R [26] - UINT8 Reserved1[2]; // Reserved [28:27] - UINT8 ModeOperationCodes; // Mode operation codes W/EP [29] - UINT8 ModeConfig; // Mode config R/W/EP [30] - UINT8 Reserved2; // Reserved [31] - UINT8 FlushCache; // Flushing of the cache W/EP [32] - UINT8 CacheCtrl; // Control to turn the Cache ON/OFF R/W/EP [33] - UINT8 PowerOffNotification; // Power Off Notification R/W/EP [34] - UINT8 PackedFailureIndex; // Packed command failure index R [35] - UINT8 PackedCommandStatus; // Packed command status R [36] - UINT8 ContextConf[15]; // Context configuration R/W/EP [51:37] - UINT8 ExtPartitionsAttribute[2]; // Extended Partitions Attribute R/W [53:52] - UINT8 ExceptionEventsStatus[2]; // Exception events status R [55:54] - UINT8 ExceptionEventsCtrl[2]; // Exception events control R/W/EP [57:56] - UINT8 DyncapNeeded; // Number of addressed group to be Released R [58] - UINT8 Class6Ctrl; // Class 6 commands control R/W/EP [59] - UINT8 IniTimeoutEmu; // 1st initialization after disabling sector size emulation R [60] - UINT8 DataSectorSize; // Sector size R [61] - UINT8 UseNativeSector; // Sector size emulation R/W [62] - UINT8 NativeSectorSize; // Native sector size R [63] - UINT8 VendorSpecificField[64]; // Vendor Specific Fields [127:64] - UINT8 Reserved3[2]; // Reserved [129:128] - UINT8 ProgramCidCsdDdrSupport; // Program CID/CSD in DDR mode support R [130] - UINT8 PeriodicWakeup; // Periodic Wake-up R/W/E [131] - UINT8 TcaseSupport; // Package Case Temperature is controlled W/EP [132] - UINT8 ProductionStateAwareness; // Production state awareness R/W/E [133] - UINT8 SecBadBlkMgmnt; // Bad Block Management mode R/W [134] - UINT8 Reserved4; // Reserved [135] - UINT8 EnhStartAddr[4]; // Enhanced User Data Start Address R/W [139:136] - UINT8 EnhSizeMult[3]; // Enhanced User Data Area Size R/W [142:140] - UINT8 GpSizeMult[12]; // General Purpose Partition Size R/W [154:143] - UINT8 PartitionSettingCompleted; // Partitioning Setting R/W [155] - UINT8 PartitionsAttribute; // Partitions attribute R/W [156] - UINT8 MaxEnhSizeMult[3]; // Max Enhanced Area Size R [159:157] - UINT8 PartitioningSupport; // Partitioning Support R [160] - UINT8 HpiMgmt; // HPI management R/W/EP [161] - UINT8 RstFunction; // H/W reset function R/W [162] - UINT8 BkopsEn; // Enable background operations handshake R/W [163] - UINT8 BkopsStart; // Manually start background operations W/EP [164] - UINT8 SanitizeStart; // Start Sanitize operation W/EP [165] - UINT8 WrRelParam; // Write reliability parameter register R [166] - UINT8 WrRelSet; // Write reliability setting register R/W [167] - UINT8 RpmbSizeMult; // RPMB Size R [168] - UINT8 FwConfig; // FW configuration R/W [169] - UINT8 Reserved5; // Reserved [170] - UINT8 UserWp; // User area write protection register R/W,R/W/CP&R/W/EP [171] - UINT8 Reserved6; // Reserved [172] - UINT8 BootWp; // Boot area write protection register R/W&R/W/CP[173] - UINT8 BootWpStatus; // Boot write protection status registers R [174] - UINT8 EraseGroupDef; // High-density erase group definition R/W/EP [175] - UINT8 Reserved7; // Reserved [176] - UINT8 BootBusConditions; // Boot bus Conditions R/W/E [177] - UINT8 BootConfigProt; // Boot config protection R/W&R/W/CP[178] - UINT8 PartitionConfig; // Partition configuration R/W/E&R/W/EP[179] - UINT8 Reserved8; // Reserved [180] - UINT8 ErasedMemCont; // Erased memory content R [181] - UINT8 Reserved9; // Reserved [182] - UINT8 BusWidth; // Bus width mode W/EP [183] - UINT8 Reserved10; // Reserved [184] - UINT8 HsTiming; // High-speed interface timing R/W/EP [185] - UINT8 Reserved11; // Reserved [186] - UINT8 PowerClass; // Power class R/W/EP [187] - UINT8 Reserved12; // Reserved [188] - UINT8 CmdSetRev; // Command set revision R [189] - UINT8 Reserved13; // Reserved [190] - UINT8 CmdSet; // Command set R/W/EP [191] + UINT8 Reserved[16]; // Reserved [15:0] + UINT8 SecureRemovalType; // Secure Removal Type R/W & R [16] + UINT8 ProductStateAwarenessEnablement; // Product state awareness enablement R/W/E & R [17] + UINT8 MaxPreLoadingDataSize[4]; // Max pre loading data size R [21:18] + UINT8 PreLoadingDataSize[4]; // Pre loading data size R/W/EP [25:22] + UINT8 FfuStatus; // FFU status R [26] + UINT8 Reserved1[2]; // Reserved [28:27] + UINT8 ModeOperationCodes; // Mode operation codes W/EP [29] + UINT8 ModeConfig; // Mode config R/W/EP [30] + UINT8 Reserved2; // Reserved [31] + UINT8 FlushCache; // Flushing of the cache W/EP [32] + UINT8 CacheCtrl; // Control to turn the Cache ON/OFF R/W/EP [33] + UINT8 PowerOffNotification; // Power Off Notification R/W/EP [34] + UINT8 PackedFailureIndex; // Packed command failure index R [35] + UINT8 PackedCommandStatus; // Packed command status R [36] + UINT8 ContextConf[15]; // Context configuration R/W/EP [51:37] + UINT8 ExtPartitionsAttribute[2]; // Extended Partitions Attribute R/W [53:52] + UINT8 ExceptionEventsStatus[2]; // Exception events status R [55:54] + UINT8 ExceptionEventsCtrl[2]; // Exception events control R/W/EP [57:56] + UINT8 DyncapNeeded; // Number of addressed group to be Released R [58] + UINT8 Class6Ctrl; // Class 6 commands control R/W/EP [59] + UINT8 IniTimeoutEmu; // 1st initialization after disabling sector size emulation R [60] + UINT8 DataSectorSize; // Sector size R [61] + UINT8 UseNativeSector; // Sector size emulation R/W [62] + UINT8 NativeSectorSize; // Native sector size R [63] + UINT8 VendorSpecificField[64]; // Vendor Specific Fields [127:64] + UINT8 Reserved3[2]; // Reserved [129:128] + UINT8 ProgramCidCsdDdrSupport; // Program CID/CSD in DDR mode support R [130] + UINT8 PeriodicWakeup; // Periodic Wake-up R/W/E [131] + UINT8 TcaseSupport; // Package Case Temperature is controlled W/EP [132] + UINT8 ProductionStateAwareness; // Production state awareness R/W/E [133] + UINT8 SecBadBlkMgmnt; // Bad Block Management mode R/W [134] + UINT8 Reserved4; // Reserved [135] + UINT8 EnhStartAddr[4]; // Enhanced User Data Start Address R/W [139:136] + UINT8 EnhSizeMult[3]; // Enhanced User Data Area Size R/W [142:140] + UINT8 GpSizeMult[12]; // General Purpose Partition Size R/W [154:143] + UINT8 PartitionSettingCompleted; // Partitioning Setting R/W [155] + UINT8 PartitionsAttribute; // Partitions attribute R/W [156] + UINT8 MaxEnhSizeMult[3]; // Max Enhanced Area Size R [159:157] + UINT8 PartitioningSupport; // Partitioning Support R [160] + UINT8 HpiMgmt; // HPI management R/W/EP [161] + UINT8 RstFunction; // H/W reset function R/W [162] + UINT8 BkopsEn; // Enable background operations handshake R/W [163] + UINT8 BkopsStart; // Manually start background operations W/EP [164] + UINT8 SanitizeStart; // Start Sanitize operation W/EP [165] + UINT8 WrRelParam; // Write reliability parameter register R [166] + UINT8 WrRelSet; // Write reliability setting register R/W [167] + UINT8 RpmbSizeMult; // RPMB Size R [168] + UINT8 FwConfig; // FW configuration R/W [169] + UINT8 Reserved5; // Reserved [170] + UINT8 UserWp; // User area write protection register R/W,R/W/CP&R/W/EP [171] + UINT8 Reserved6; // Reserved [172] + UINT8 BootWp; // Boot area write protection register R/W&R/W/CP[173] + UINT8 BootWpStatus; // Boot write protection status registers R [174] + UINT8 EraseGroupDef; // High-density erase group definition R/W/EP [175] + UINT8 Reserved7; // Reserved [176] + UINT8 BootBusConditions; // Boot bus Conditions R/W/E [177] + UINT8 BootConfigProt; // Boot config protection R/W&R/W/CP[178] + UINT8 PartitionConfig; // Partition configuration R/W/E&R/W/EP[179] + UINT8 Reserved8; // Reserved [180] + UINT8 ErasedMemCont; // Erased memory content R [181] + UINT8 Reserved9; // Reserved [182] + UINT8 BusWidth; // Bus width mode W/EP [183] + UINT8 Reserved10; // Reserved [184] + UINT8 HsTiming; // High-speed interface timing R/W/EP [185] + UINT8 Reserved11; // Reserved [186] + UINT8 PowerClass; // Power class R/W/EP [187] + UINT8 Reserved12; // Reserved [188] + UINT8 CmdSetRev; // Command set revision R [189] + UINT8 Reserved13; // Reserved [190] + UINT8 CmdSet; // Command set R/W/EP [191] // // Properties Segment // - UINT8 ExtCsdRev; // Extended CSD revision [192] - UINT8 Reserved14; // Reserved [193] - UINT8 CsdStructure; // CSD STRUCTURE [194] - UINT8 Reserved15; // Reserved [195] - UINT8 DeviceType; // Device type [196] - UINT8 DriverStrength; // I/O Driver Strength [197] - UINT8 OutOfInterruptTime; // Out-of-interrupt busy timing[198] - UINT8 PartitionSwitchTime; // Partition switching timing [199] - UINT8 PwrCl52M195V; // Power class for 52MHz at 1.95V [200] - UINT8 PwrCl26M195V; // Power class for 26MHz at 1.95V [201] - UINT8 PwrCl52M360V; // Power class for 52MHz at 3.6V [202] - UINT8 PwrCl26M360V; // Power class for 26MHz at 3.6V [203] - UINT8 Reserved16; // Reserved [204] - UINT8 MinPerfR4B26M; // Minimum Read Performance for 4bit at 26MHz [205] - UINT8 MinPerfW4B26M; // Minimum Write Performance for 4bit at 26MHz [206] - UINT8 MinPerfR8B26M4B52M; // Minimum Read Performance for 8bit at 26MHz, for 4bit at 52MHz [207] - UINT8 MinPerfW8B26M4B52M; // Minimum Write Performance for 8bit at 26MHz, for 4bit at 52MHz [208] - UINT8 MinPerfR8B52M; // Minimum Read Performance for 8bit at 52MHz [209] - UINT8 MinPerfW8B52M; // Minimum Write Performance for 8bit at 52MHz [210] - UINT8 Reserved17; // Reserved [211] - UINT8 SecCount[4]; // Sector Count [215:212] - UINT8 SleepNotificationTime; // Sleep Notification Timeout [216] - UINT8 SATimeout; // Sleep/awake timeout [217] - UINT8 ProductionStateAwarenessTimeout; // Production state awareness timeout [218] - UINT8 SCVccq; // Sleep current (VCCQ) [219] - UINT8 SCVcc; // Sleep current (VCC) [220] - UINT8 HcWpGrpSize; // High-capacity write protect group size [221] - UINT8 RelWrSecC; // Reliable write sector count [222] - UINT8 EraseTimeoutMult; // High-capacity erase timeout [223] - UINT8 HcEraseGrpSize; // High-capacity erase unit size [224] - UINT8 AccSize; // Access size [225] - UINT8 BootSizeMult; // Boot partition size [226] - UINT8 Reserved18; // Reserved [227] - UINT8 BootInfo; // Boot information [228] - UINT8 SecTrimMult; // Secure TRIM Multiplier [229] - UINT8 SecEraseMult; // Secure Erase Multiplier [230] - UINT8 SecFeatureSupport; // Secure Feature support [231] - UINT8 TrimMult; // TRIM Multiplier [232] - UINT8 Reserved19; // Reserved [233] - UINT8 MinPerfDdrR8b52M; // Minimum Read Performance for 8bit at 52MHz in DDR mode [234] - UINT8 MinPerfDdrW8b52M; // Minimum Write Performance for 8bit at 52MHz in DDR mode [235] - UINT8 PwrCl200M130V; // Power class for 200MHz, at VCCQ=1.3V, VCC = 3.6V [236] - UINT8 PwrCl200M195V; // Power class for 200MHz at VCCQ=1.95V, VCC = 3.6V [237] - UINT8 PwrClDdr52M195V; // Power class for 52MHz, DDR at VCC= 1.95V [238] - UINT8 PwrClDdr52M360V; // Power class for 52MHz, DDR at VCC= 3.6V [239] - UINT8 Reserved20; // Reserved [240] - UINT8 IniTimeoutAp; // 1st initialization time after partitioning [241] - UINT8 CorrectlyPrgSectorsNum[4]; // Number of correctly programmed sectors [245:242] - UINT8 BkopsStatus; // Background operations status [246] - UINT8 PowerOffLongTime; // Power off notification(long) timeout [247] - UINT8 GenericCmd6Time; // Generic CMD6 timeout [248] - UINT8 CacheSize[4]; // Cache size [252:249] - UINT8 PwrClDdr200M360V; // Power class for 200MHz, DDR at VCC= 3.6V [253] - UINT8 FirmwareVersion[8]; // Firmware version [261:254] - UINT8 DeviceVersion[2]; // Device version [263:262] - UINT8 OptimalTrimUnitSize; // Optimal trim unit size[264] - UINT8 OptimalWriteSize; // Optimal write size [265] - UINT8 OptimalReadSize; // Optimal read size [266] - UINT8 PreEolInfo; // Pre EOL information [267] - UINT8 DeviceLifeTimeEstTypA; // Device life time estimation type A [268] - UINT8 DeviceLifeTimeEstTypB; // Device life time estimation type B [269] - UINT8 VendorProprietaryHealthReport[32]; // Vendor proprietary health report [301:270] - UINT8 NumOfFwSectorsProgrammed[4]; // Number of FW sectors correctly programmed [305:302] - UINT8 Reserved21[181]; // Reserved [486:306] - UINT8 FfuArg[4]; // FFU Argument [490:487] - UINT8 OperationCodeTimeout; // Operation codes timeout [491] - UINT8 FfuFeatures; // FFU features [492] - UINT8 SupportedModes; // Supported modes [493] - UINT8 ExtSupport; // Extended partitions attribute support [494] - UINT8 LargeUnitSizeM1; // Large Unit size [495] - UINT8 ContextCapabilities; // Context management capabilities [496] - UINT8 TagResSize; // Tag Resources Size [497] - UINT8 TagUnitSize; // Tag Unit Size [498] - UINT8 DataTagSupport; // Data Tag Support [499] - UINT8 MaxPackedWrites; // Max packed write commands [500] - UINT8 MaxPackedReads; // Max packed read commands[501] - UINT8 BkOpsSupport; // Background operations support [502] - UINT8 HpiFeatures; // HPI features [503] - UINT8 SupportedCmdSet; // Supported Command Sets [504] - UINT8 ExtSecurityErr; // Extended Security Commands Error [505] - UINT8 Reserved22[6]; // Reserved [511:506] + UINT8 ExtCsdRev; // Extended CSD revision [192] + UINT8 Reserved14; // Reserved [193] + UINT8 CsdStructure; // CSD STRUCTURE [194] + UINT8 Reserved15; // Reserved [195] + UINT8 DeviceType; // Device type [196] + UINT8 DriverStrength; // I/O Driver Strength [197] + UINT8 OutOfInterruptTime; // Out-of-interrupt busy timing[198] + UINT8 PartitionSwitchTime; // Partition switching timing [199] + UINT8 PwrCl52M195V; // Power class for 52MHz at 1.95V [200] + UINT8 PwrCl26M195V; // Power class for 26MHz at 1.95V [201] + UINT8 PwrCl52M360V; // Power class for 52MHz at 3.6V [202] + UINT8 PwrCl26M360V; // Power class for 26MHz at 3.6V [203] + UINT8 Reserved16; // Reserved [204] + UINT8 MinPerfR4B26M; // Minimum Read Performance for 4bit at 26MHz [205] + UINT8 MinPerfW4B26M; // Minimum Write Performance for 4bit at 26MHz [206] + UINT8 MinPerfR8B26M4B52M; // Minimum Read Performance for 8bit at 26MHz, for 4bit at 52MHz [207] + UINT8 MinPerfW8B26M4B52M; // Minimum Write Performance for 8bit at 26MHz, for 4bit at 52MHz [208] + UINT8 MinPerfR8B52M; // Minimum Read Performance for 8bit at 52MHz [209] + UINT8 MinPerfW8B52M; // Minimum Write Performance for 8bit at 52MHz [210] + UINT8 Reserved17; // Reserved [211] + UINT8 SecCount[4]; // Sector Count [215:212] + UINT8 SleepNotificationTime; // Sleep Notification Timeout [216] + UINT8 SATimeout; // Sleep/awake timeout [217] + UINT8 ProductionStateAwarenessTimeout; // Production state awareness timeout [218] + UINT8 SCVccq; // Sleep current (VCCQ) [219] + UINT8 SCVcc; // Sleep current (VCC) [220] + UINT8 HcWpGrpSize; // High-capacity write protect group size [221] + UINT8 RelWrSecC; // Reliable write sector count [222] + UINT8 EraseTimeoutMult; // High-capacity erase timeout [223] + UINT8 HcEraseGrpSize; // High-capacity erase unit size [224] + UINT8 AccSize; // Access size [225] + UINT8 BootSizeMult; // Boot partition size [226] + UINT8 Reserved18; // Reserved [227] + UINT8 BootInfo; // Boot information [228] + UINT8 SecTrimMult; // Secure TRIM Multiplier [229] + UINT8 SecEraseMult; // Secure Erase Multiplier [230] + UINT8 SecFeatureSupport; // Secure Feature support [231] + UINT8 TrimMult; // TRIM Multiplier [232] + UINT8 Reserved19; // Reserved [233] + UINT8 MinPerfDdrR8b52M; // Minimum Read Performance for 8bit at 52MHz in DDR mode [234] + UINT8 MinPerfDdrW8b52M; // Minimum Write Performance for 8bit at 52MHz in DDR mode [235] + UINT8 PwrCl200M130V; // Power class for 200MHz, at VCCQ=1.3V, VCC = 3.6V [236] + UINT8 PwrCl200M195V; // Power class for 200MHz at VCCQ=1.95V, VCC = 3.6V [237] + UINT8 PwrClDdr52M195V; // Power class for 52MHz, DDR at VCC= 1.95V [238] + UINT8 PwrClDdr52M360V; // Power class for 52MHz, DDR at VCC= 3.6V [239] + UINT8 Reserved20; // Reserved [240] + UINT8 IniTimeoutAp; // 1st initialization time after partitioning [241] + UINT8 CorrectlyPrgSectorsNum[4]; // Number of correctly programmed sectors [245:242] + UINT8 BkopsStatus; // Background operations status [246] + UINT8 PowerOffLongTime; // Power off notification(long) timeout [247] + UINT8 GenericCmd6Time; // Generic CMD6 timeout [248] + UINT8 CacheSize[4]; // Cache size [252:249] + UINT8 PwrClDdr200M360V; // Power class for 200MHz, DDR at VCC= 3.6V [253] + UINT8 FirmwareVersion[8]; // Firmware version [261:254] + UINT8 DeviceVersion[2]; // Device version [263:262] + UINT8 OptimalTrimUnitSize; // Optimal trim unit size[264] + UINT8 OptimalWriteSize; // Optimal write size [265] + UINT8 OptimalReadSize; // Optimal read size [266] + UINT8 PreEolInfo; // Pre EOL information [267] + UINT8 DeviceLifeTimeEstTypA; // Device life time estimation type A [268] + UINT8 DeviceLifeTimeEstTypB; // Device life time estimation type B [269] + UINT8 VendorProprietaryHealthReport[32]; // Vendor proprietary health report [301:270] + UINT8 NumOfFwSectorsProgrammed[4]; // Number of FW sectors correctly programmed [305:302] + UINT8 Reserved21[181]; // Reserved [486:306] + UINT8 FfuArg[4]; // FFU Argument [490:487] + UINT8 OperationCodeTimeout; // Operation codes timeout [491] + UINT8 FfuFeatures; // FFU features [492] + UINT8 SupportedModes; // Supported modes [493] + UINT8 ExtSupport; // Extended partitions attribute support [494] + UINT8 LargeUnitSizeM1; // Large Unit size [495] + UINT8 ContextCapabilities; // Context management capabilities [496] + UINT8 TagResSize; // Tag Resources Size [497] + UINT8 TagUnitSize; // Tag Unit Size [498] + UINT8 DataTagSupport; // Data Tag Support [499] + UINT8 MaxPackedWrites; // Max packed write commands [500] + UINT8 MaxPackedReads; // Max packed read commands[501] + UINT8 BkOpsSupport; // Background operations support [502] + UINT8 HpiFeatures; // HPI features [503] + UINT8 SupportedCmdSet; // Supported Command Sets [504] + UINT8 ExtSecurityErr; // Extended Security Commands Error [505] + UINT8 Reserved22[6]; // Reserved [511:506] } EMMC_EXT_CSD; #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/HighPrecisionEventTimerTable.h b/MdePkg/Include/IndustryStandard/HighPrecisionEventTimerTable.h index 168770f..676a456 100644 --- a/MdePkg/Include/IndustryStandard/HighPrecisionEventTimerTable.h +++ b/MdePkg/Include/IndustryStandard/HighPrecisionEventTimerTable.h @@ -21,27 +21,26 @@ /// typedef union { struct { - UINT32 Revision : 8; - UINT32 NumberOfTimers : 5; - UINT32 CounterSize : 1; - UINT32 Reserved : 1; - UINT32 LegacyRoute : 1; - UINT32 VendorId : 16; + UINT32 Revision : 8; + UINT32 NumberOfTimers : 5; + UINT32 CounterSize : 1; + UINT32 Reserved : 1; + UINT32 LegacyRoute : 1; + UINT32 VendorId : 16; } Bits; - UINT32 Uint32; + UINT32 Uint32; } EFI_ACPI_HIGH_PRECISION_EVENT_TIMER_BLOCK_ID; - /// /// High Precision Event Timer Table header definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 EventTimerBlockId; - EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE BaseAddressLower32Bit; - UINT8 HpetNumber; - UINT16 MainCounterMinimumClockTickInPeriodicMode; - UINT8 PageProtectionAndOemAttribute; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 EventTimerBlockId; + EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE BaseAddressLower32Bit; + UINT8 HpetNumber; + UINT16 MainCounterMinimumClockTickInPeriodicMode; + UINT8 PageProtectionAndOemAttribute; } EFI_ACPI_HIGH_PRECISION_EVENT_TIMER_TABLE_HEADER; /// @@ -53,9 +52,9 @@ typedef struct { // Page protection setting // Values 3 through 15 are reserved for use by the specification // -#define EFI_ACPI_NO_PAGE_PROTECTION 0 -#define EFI_ACPI_4KB_PAGE_PROTECTION 1 -#define EFI_ACPI_64KB_PAGE_PROTECTION 2 +#define EFI_ACPI_NO_PAGE_PROTECTION 0 +#define EFI_ACPI_4KB_PAGE_PROTECTION 1 +#define EFI_ACPI_64KB_PAGE_PROTECTION 2 #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/Hsti.h b/MdePkg/Include/IndustryStandard/Hsti.h index 9973a58..79e7c5d 100644 --- a/MdePkg/Include/IndustryStandard/Hsti.h +++ b/MdePkg/Include/IndustryStandard/Hsti.h @@ -15,18 +15,18 @@ #define ADAPTER_INFO_PLATFORM_SECURITY_GUID \ {0x6be272c7, 0x1320, 0x4ccd, { 0x90, 0x17, 0xd4, 0x61, 0x2c, 0x01, 0x2b, 0x25 }} -#define PLATFORM_SECURITY_VERSION_VNEXTCS 0x00000003 +#define PLATFORM_SECURITY_VERSION_VNEXTCS 0x00000003 -#define PLATFORM_SECURITY_ROLE_PLATFORM_REFERENCE 0x00000001 // IHV -#define PLATFORM_SECURITY_ROLE_PLATFORM_IBV 0x00000002 -#define PLATFORM_SECURITY_ROLE_IMPLEMENTOR_OEM 0x00000003 -#define PLATFORM_SECURITY_ROLE_IMPLEMENTOR_ODM 0x00000004 +#define PLATFORM_SECURITY_ROLE_PLATFORM_REFERENCE 0x00000001 // IHV +#define PLATFORM_SECURITY_ROLE_PLATFORM_IBV 0x00000002 +#define PLATFORM_SECURITY_ROLE_IMPLEMENTOR_OEM 0x00000003 +#define PLATFORM_SECURITY_ROLE_IMPLEMENTOR_ODM 0x00000004 typedef struct { // // Return PLATFORM_SECURITY_VERSION_VNEXTCS // - UINT32 Version; + UINT32 Version; // // The role of the publisher of this interface. Reference platform designers // such as IHVs and IBVs are expected to return PLATFORM_SECURITY_ROLE_PLATFORM_REFERENCE @@ -35,42 +35,42 @@ typedef struct { // security features, then the platform implementers, OEMs and ODMs, will // need to publish this interface with a role of Implementer. // - UINT32 Role; + UINT32 Role; // // Human readable vendor, model, & version of this implementation. // - CHAR16 ImplementationID[256]; + CHAR16 ImplementationID[256]; // // The size in bytes of the SecurityFeaturesRequired and SecurityFeaturesEnabled arrays. // The arrays must be the same size. // - UINT32 SecurityFeaturesSize; + UINT32 SecurityFeaturesSize; // // IHV-defined bitfield corresponding to all security features which must be // implemented to meet the security requirements defined by PLATFORM_SECURITY_VERSION Version. // -//UINT8 SecurityFeaturesRequired[]; //Ignored for non-IHV + // UINT8 SecurityFeaturesRequired[]; //Ignored for non-IHV // // Publisher-defined bitfield corresponding to all security features which // have implemented programmatic tests in this module. // -//UINT8 SecurityFeaturesImplemented[]; + // UINT8 SecurityFeaturesImplemented[]; // // Publisher-defined bitfield corresponding to all security features which // have been verified implemented by this implementation. // -//UINT8 SecurityFeaturesVerified[]; + // UINT8 SecurityFeaturesVerified[]; // // A Null-terminated string, one failure per line (CR/LF terminated), with a // unique identifier that the OEM/ODM can use to locate the documentation // which will describe the steps to remediate the failure - a URL to the // documentation is recommended. // -//CHAR16 ErrorString[]; + // CHAR16 ErrorString[]; } ADAPTER_INFO_PLATFORM_SECURITY; #pragma pack() -extern EFI_GUID gAdapterInfoPlatformSecurityGuid; +extern EFI_GUID gAdapterInfoPlatformSecurityGuid; #endif diff --git a/MdePkg/Include/IndustryStandard/Http11.h b/MdePkg/Include/IndustryStandard/Http11.h index 220fba0..f1f113e 100644 --- a/MdePkg/Include/IndustryStandard/Http11.h +++ b/MdePkg/Include/IndustryStandard/Http11.h @@ -18,7 +18,7 @@ /// The version of an HTTP message is indicated by an HTTP-Version field /// in the first line of the message. /// -#define HTTP_VERSION "HTTP/1.1" +#define HTTP_VERSION "HTTP/1.1" /// /// HTTP Request Method definitions @@ -26,15 +26,15 @@ /// The Method token indicates the method to be performed on the /// resource identified by the Request-URI. The method is case-sensitive. /// -#define HTTP_METHOD_OPTIONS "OPTIONS" -#define HTTP_METHOD_GET "GET" -#define HTTP_METHOD_HEAD "HEAD" -#define HTTP_METHOD_POST "POST" -#define HTTP_METHOD_PUT "PUT" -#define HTTP_METHOD_DELETE "DELETE" -#define HTTP_METHOD_TRACE "TRACE" -#define HTTP_METHOD_CONNECT "CONNECT" -#define HTTP_METHOD_PATCH "PATCH" +#define HTTP_METHOD_OPTIONS "OPTIONS" +#define HTTP_METHOD_GET "GET" +#define HTTP_METHOD_HEAD "HEAD" +#define HTTP_METHOD_POST "POST" +#define HTTP_METHOD_PUT "PUT" +#define HTTP_METHOD_DELETE "DELETE" +#define HTTP_METHOD_TRACE "TRACE" +#define HTTP_METHOD_CONNECT "CONNECT" +#define HTTP_METHOD_PATCH "PATCH" /// /// Connect method has maximum length according to EFI_HTTP_METHOD defined in @@ -49,8 +49,7 @@ /// is specifically limited to a small set of desired types, as in the case of a request /// for an in-line image. /// -#define HTTP_HEADER_ACCEPT "Accept" - +#define HTTP_HEADER_ACCEPT "Accept" /// /// Accept-Charset Request Header @@ -59,7 +58,7 @@ /// more comprehensive or special-purpose character sets to signal that capability to a /// server which is capable of representing documents in those character sets. /// -#define HTTP_HEADER_ACCEPT_CHARSET "Accept-Charset" +#define HTTP_HEADER_ACCEPT_CHARSET "Accept-Charset" /// /// Accept-Language Request Header @@ -67,22 +66,21 @@ /// but restricts the set of natural languages that are preferred /// as a response to the request. /// -#define HTTP_HEADER_ACCEPT_LANGUAGE "Accept-Language" +#define HTTP_HEADER_ACCEPT_LANGUAGE "Accept-Language" /// /// Accept-Ranges Request Header /// The Accept-Ranges response-header field allows the server to /// indicate its acceptance of range requests for a resource: /// -#define HTTP_HEADER_ACCEPT_RANGES "Accept-Ranges" - +#define HTTP_HEADER_ACCEPT_RANGES "Accept-Ranges" /// /// Accept-Encoding Request Header /// The Accept-Encoding request-header field is similar to Accept, /// but restricts the content-codings that are acceptable in the response. /// -#define HTTP_HEADER_ACCEPT_ENCODING "Accept-Encoding" +#define HTTP_HEADER_ACCEPT_ENCODING "Accept-Encoding" /// /// Content-Encoding Header @@ -93,42 +91,40 @@ /// is primarily used to allow a document to be compressed without losing the identity /// of its underlying media type. /// -#define HTTP_HEADER_CONTENT_ENCODING "Content-Encoding" +#define HTTP_HEADER_CONTENT_ENCODING "Content-Encoding" /// /// HTTP Content-Encoding Compression types /// -#define HTTP_CONTENT_ENCODING_IDENTITY "identity" /// No transformation is used. This is the default value for content coding. -#define HTTP_CONTENT_ENCODING_GZIP "gzip" /// Content-Encoding: GNU zip format (described in RFC 1952). -#define HTTP_CONTENT_ENCODING_COMPRESS "compress" /// encoding format produced by the common UNIX file compression program "compress". -#define HTTP_CONTENT_ENCODING_DEFLATE "deflate" /// The "zlib" format defined in RFC 1950 in combination with the "deflate" +#define HTTP_CONTENT_ENCODING_IDENTITY "identity" /// No transformation is used. This is the default value for content coding. +#define HTTP_CONTENT_ENCODING_GZIP "gzip" /// Content-Encoding: GNU zip format (described in RFC 1952). +#define HTTP_CONTENT_ENCODING_COMPRESS "compress" /// encoding format produced by the common UNIX file compression program "compress". +#define HTTP_CONTENT_ENCODING_DEFLATE "deflate" /// The "zlib" format defined in RFC 1950 in combination with the "deflate" /// compression mechanism described in RFC 1951. - /// /// Content-Type Header /// The Content-Type entity-header field indicates the media type of the entity-body sent to /// the recipient or, in the case of the HEAD method, the media type that would have been sent /// had the request been a GET. /// -#define HTTP_HEADER_CONTENT_TYPE "Content-Type" +#define HTTP_HEADER_CONTENT_TYPE "Content-Type" // // Common Media Types defined in http://www.iana.org/assignments/media-types/media-types.xhtml // #define HTTP_CONTENT_TYPE_APP_JSON "application/json" #define HTTP_CONTENT_TYPE_APP_OCTET_STREAM "application/octet-stream" -#define HTTP_CONTENT_TYPE_TEXT_HTML "text/html" -#define HTTP_CONTENT_TYPE_TEXT_PLAIN "text/plain" -#define HTTP_CONTENT_TYPE_TEXT_CSS "text/css" -#define HTTP_CONTENT_TYPE_TEXT_XML "text/xml" - -#define HTTP_CONTENT_TYPE_IMAGE_GIF "image/gif" -#define HTTP_CONTENT_TYPE_IMAGE_JPEG "image/jpeg" -#define HTTP_CONTENT_TYPE_IMAGE_PNG "image/png" -#define HTTP_CONTENT_TYPE_IMAGE_SVG_XML "image/svg+xml" +#define HTTP_CONTENT_TYPE_TEXT_HTML "text/html" +#define HTTP_CONTENT_TYPE_TEXT_PLAIN "text/plain" +#define HTTP_CONTENT_TYPE_TEXT_CSS "text/css" +#define HTTP_CONTENT_TYPE_TEXT_XML "text/xml" +#define HTTP_CONTENT_TYPE_IMAGE_GIF "image/gif" +#define HTTP_CONTENT_TYPE_IMAGE_JPEG "image/jpeg" +#define HTTP_CONTENT_TYPE_IMAGE_PNG "image/png" +#define HTTP_CONTENT_TYPE_IMAGE_SVG_XML "image/svg+xml" /// /// Content-Length Header @@ -136,7 +132,7 @@ /// in decimal number of OCTETs, sent to the recipient or, in the case of the HEAD /// method, the size of the entity-body that would have been sent had the request been a GET. /// -#define HTTP_HEADER_CONTENT_LENGTH "Content-Length" +#define HTTP_HEADER_CONTENT_LENGTH "Content-Length" /// /// Transfer-Encoding Header @@ -145,12 +141,12 @@ /// and the recipient. This differs from the content-coding in that the transfer-coding /// is a property of the message, not of the entity. /// -#define HTTP_HEADER_TRANSFER_ENCODING "Transfer-Encoding" -#define HTTP_HEADER_TRANSFER_ENCODING_CHUNKED "chunked" -#define CHUNKED_TRANSFER_CODING_CR '\r' -#define CHUNKED_TRANSFER_CODING_LF '\n' -#define CHUNKED_TRANSFER_CODING_LAST_CHUNK '0' -#define CHUNKED_TRANSFER_CODING_EXTENSION_SEPARATOR ';' +#define HTTP_HEADER_TRANSFER_ENCODING "Transfer-Encoding" +#define HTTP_HEADER_TRANSFER_ENCODING_CHUNKED "chunked" +#define CHUNKED_TRANSFER_CODING_CR '\r' +#define CHUNKED_TRANSFER_CODING_LF '\n' +#define CHUNKED_TRANSFER_CODING_LAST_CHUNK '0' +#define CHUNKED_TRANSFER_CODING_EXTENSION_SEPARATOR ';' /// /// User Agent Request Header @@ -164,7 +160,7 @@ /// By convention, the product tokens are listed in order of their significance for /// identifying the application. /// -#define HTTP_HEADER_USER_AGENT "User-Agent" +#define HTTP_HEADER_USER_AGENT "User-Agent" /// /// Host Request Header @@ -172,7 +168,7 @@ /// The Host request-header field specifies the Internet host and port number of the resource /// being requested, as obtained from the original URI given by the user or referring resource /// -#define HTTP_HEADER_HOST "Host" +#define HTTP_HEADER_HOST "Host" /// /// Location Response Header @@ -183,7 +179,7 @@ /// the request. For 3xx responses, the location SHOULD indicate the server's preferred URI for /// automatic redirection to the resource. The field value consists of a single absolute URI. /// -#define HTTP_HEADER_LOCATION "Location" +#define HTTP_HEADER_LOCATION "Location" /// /// The If-Match request-header field is used with a method to make it conditional. @@ -195,8 +191,7 @@ /// to prevent inadvertent modification of the wrong version of a resource. /// As a special case, the value "*" matches any current entity of the resource. /// -#define HTTP_HEADER_IF_MATCH "If-Match" - +#define HTTP_HEADER_IF_MATCH "If-Match" /// /// The If-None-Match request-header field is used with a method to make it conditional. @@ -207,9 +202,7 @@ /// to prevent a method (e.g. PUT) from inadvertently modifying an existing resource when the /// client believes that the resource does not exist. /// -#define HTTP_HEADER_IF_NONE_MATCH "If-None-Match" - - +#define HTTP_HEADER_IF_NONE_MATCH "If-None-Match" /// /// Authorization Request Header @@ -217,21 +210,21 @@ /// containing the authentication information of the user agent for /// the realm of the resource being requested. /// -#define HTTP_HEADER_AUTHORIZATION "Authorization" +#define HTTP_HEADER_AUTHORIZATION "Authorization" /// /// ETAG Response Header /// The ETag response-header field provides the current value of the entity tag /// for the requested variant. /// -#define HTTP_HEADER_ETAG "ETag" +#define HTTP_HEADER_ETAG "ETag" /// /// Custom header field checked by the iLO web server to /// specify a client session key. /// Example: X-Auth-Token: 24de6b1f8fa147ad59f6452def628798 /// -#define HTTP_HEADER_X_AUTH_TOKEN "X-Auth-Token" +#define HTTP_HEADER_X_AUTH_TOKEN "X-Auth-Token" /// /// Expect Header @@ -240,12 +233,12 @@ /// order to properly handle this request. The only such expectation /// defined by this specification is 100-continue. /// -#define HTTP_HEADER_EXPECT "Expect" +#define HTTP_HEADER_EXPECT "Expect" /// /// Expect Header Value /// -#define HTTP_EXPECT_100_CONTINUE "100-continue" +#define HTTP_EXPECT_100_CONTINUE "100-continue" #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/IScsiBootFirmwareTable.h b/MdePkg/Include/IndustryStandard/IScsiBootFirmwareTable.h index df08dc1..1fd2d6d 100644 --- a/MdePkg/Include/IndustryStandard/IScsiBootFirmwareTable.h +++ b/MdePkg/Include/IndustryStandard/IScsiBootFirmwareTable.h @@ -10,18 +10,18 @@ #ifndef _ISCSI_BOOT_FIRMWARE_TABLE_H_ #define _ISCSI_BOOT_FIRMWARE_TABLE_H_ -#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_REVISION 0x01 -#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_STRUCTURE_ALIGNMENT 8 +#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_REVISION 0x01 +#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_STRUCTURE_ALIGNMENT 8 /// /// Structure Type/ID /// -#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_RESERVED_STRUCTURE_ID 0 -#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_CONTROL_STRUCTURE_ID 1 -#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_INITIATOR_STRUCTURE_ID 2 -#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_NIC_STRUCTURE_ID 3 -#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_ID 4 -#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_EXTERNSIONS_STRUCTURE_ID 5 +#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_RESERVED_STRUCTURE_ID 0 +#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_CONTROL_STRUCTURE_ID 1 +#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_INITIATOR_STRUCTURE_ID 2 +#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_NIC_STRUCTURE_ID 3 +#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_ID 4 +#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_EXTERNSIONS_STRUCTURE_ID 5 /// /// from the definition of IP_PREFIX_ORIGIN Enumeration in MSDN, @@ -42,57 +42,57 @@ typedef enum { /// iBF Table Header /// typedef struct { - UINT32 Signature; - UINT32 Length; - UINT8 Revision; - UINT8 Checksum; - UINT8 OemId[6]; - UINT64 OemTableId; - UINT8 Reserved[24]; + UINT32 Signature; + UINT32 Length; + UINT8 Revision; + UINT8 Checksum; + UINT8 OemId[6]; + UINT64 OemTableId; + UINT8 Reserved[24]; } EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_HEADER; /// /// Common Header of Boot Firmware Table Structure /// typedef struct { - UINT8 StructureId; - UINT8 Version; - UINT16 Length; - UINT8 Index; - UINT8 Flags; + UINT8 StructureId; + UINT8 Version; + UINT16 Length; + UINT8 Index; + UINT8 Flags; } EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_STRUCTURE_HEADER; /// /// Control Structure /// typedef struct { - EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_STRUCTURE_HEADER Header; - UINT16 Extensions; - UINT16 InitiatorOffset; - UINT16 NIC0Offset; - UINT16 Target0Offset; - UINT16 NIC1Offset; - UINT16 Target1Offset; + EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_STRUCTURE_HEADER Header; + UINT16 Extensions; + UINT16 InitiatorOffset; + UINT16 NIC0Offset; + UINT16 Target0Offset; + UINT16 NIC1Offset; + UINT16 Target1Offset; } EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_CONTROL_STRUCTURE; -#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_CONTROL_STRUCTURE_VERSION 0x1 +#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_CONTROL_STRUCTURE_VERSION 0x1 -#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_CONTROL_STRUCTURE_FLAG_BOOT_FAILOVER BIT0 +#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_CONTROL_STRUCTURE_FLAG_BOOT_FAILOVER BIT0 /// /// Initiator Structure /// typedef struct { - EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_STRUCTURE_HEADER Header; - EFI_IPv6_ADDRESS ISnsServer; - EFI_IPv6_ADDRESS SlpServer; - EFI_IPv6_ADDRESS PrimaryRadiusServer; - EFI_IPv6_ADDRESS SecondaryRadiusServer; - UINT16 IScsiNameLength; - UINT16 IScsiNameOffset; + EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_STRUCTURE_HEADER Header; + EFI_IPv6_ADDRESS ISnsServer; + EFI_IPv6_ADDRESS SlpServer; + EFI_IPv6_ADDRESS PrimaryRadiusServer; + EFI_IPv6_ADDRESS SecondaryRadiusServer; + UINT16 IScsiNameLength; + UINT16 IScsiNameOffset; } EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_INITIATOR_STRUCTURE; -#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_INITIATOR_STRUCTURE_VERSION 0x1 +#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_INITIATOR_STRUCTURE_VERSION 0x1 #define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_INITIATOR_STRUCTURE_FLAG_BLOCK_VALID BIT0 #define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_INITIATOR_STRUCTURE_FLAG_BOOT_SELECTED BIT1 @@ -101,61 +101,60 @@ typedef struct { /// NIC Structure /// typedef struct { - EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_STRUCTURE_HEADER Header; - EFI_IPv6_ADDRESS Ip; - UINT8 SubnetMaskPrefixLength; - UINT8 Origin; - EFI_IPv6_ADDRESS Gateway; - EFI_IPv6_ADDRESS PrimaryDns; - EFI_IPv6_ADDRESS SecondaryDns; - EFI_IPv6_ADDRESS DhcpServer; - UINT16 VLanTag; - UINT8 Mac[6]; - UINT16 PciLocation; - UINT16 HostNameLength; - UINT16 HostNameOffset; + EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_STRUCTURE_HEADER Header; + EFI_IPv6_ADDRESS Ip; + UINT8 SubnetMaskPrefixLength; + UINT8 Origin; + EFI_IPv6_ADDRESS Gateway; + EFI_IPv6_ADDRESS PrimaryDns; + EFI_IPv6_ADDRESS SecondaryDns; + EFI_IPv6_ADDRESS DhcpServer; + UINT16 VLanTag; + UINT8 Mac[6]; + UINT16 PciLocation; + UINT16 HostNameLength; + UINT16 HostNameOffset; } EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_NIC_STRUCTURE; -#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_NIC_STRUCTURE_VERSION 0x1 +#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_NIC_STRUCTURE_VERSION 0x1 -#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_NIC_STRUCTURE_FLAG_BLOCK_VALID BIT0 -#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_NIC_STRUCTURE_FLAG_BOOT_SELECTED BIT1 -#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_NIC_STRUCTURE_FLAG_GLOBAL BIT2 +#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_NIC_STRUCTURE_FLAG_BLOCK_VALID BIT0 +#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_NIC_STRUCTURE_FLAG_BOOT_SELECTED BIT1 +#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_NIC_STRUCTURE_FLAG_GLOBAL BIT2 /// /// Target Structure /// typedef struct { - EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_STRUCTURE_HEADER Header; - EFI_IPv6_ADDRESS Ip; - UINT16 Port; - UINT8 BootLun[8]; - UINT8 CHAPType; - UINT8 NicIndex; - UINT16 IScsiNameLength; - UINT16 IScsiNameOffset; - UINT16 CHAPNameLength; - UINT16 CHAPNameOffset; - UINT16 CHAPSecretLength; - UINT16 CHAPSecretOffset; - UINT16 ReverseCHAPNameLength; - UINT16 ReverseCHAPNameOffset; - UINT16 ReverseCHAPSecretLength; - UINT16 ReverseCHAPSecretOffset; + EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_STRUCTURE_HEADER Header; + EFI_IPv6_ADDRESS Ip; + UINT16 Port; + UINT8 BootLun[8]; + UINT8 CHAPType; + UINT8 NicIndex; + UINT16 IScsiNameLength; + UINT16 IScsiNameOffset; + UINT16 CHAPNameLength; + UINT16 CHAPNameOffset; + UINT16 CHAPSecretLength; + UINT16 CHAPSecretOffset; + UINT16 ReverseCHAPNameLength; + UINT16 ReverseCHAPNameOffset; + UINT16 ReverseCHAPSecretLength; + UINT16 ReverseCHAPSecretOffset; } EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE; -#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_VERSION 0x1 +#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_VERSION 0x1 -#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_FLAG_BLOCK_VALID BIT0 -#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_FLAG_BOOT_SELECTED BIT1 -#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_FLAG_RADIUS_CHAP BIT2 -#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_FLAG_RADIUS_RCHAP BIT3 +#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_FLAG_BLOCK_VALID BIT0 +#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_FLAG_BOOT_SELECTED BIT1 +#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_FLAG_RADIUS_CHAP BIT2 +#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_FLAG_RADIUS_RCHAP BIT3 -#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_NO_CHAP 0 -#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_CHAP 1 -#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_MUTUAL_CHAP 2 +#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_NO_CHAP 0 +#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_CHAP 1 +#define EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_TARGET_STRUCTURE_CHAP_TYPE_MUTUAL_CHAP 2 #pragma pack() #endif - diff --git a/MdePkg/Include/IndustryStandard/IoRemappingTable.h b/MdePkg/Include/IndustryStandard/IoRemappingTable.h index 90504e3..79a3467 100644 --- a/MdePkg/Include/IndustryStandard/IoRemappingTable.h +++ b/MdePkg/Include/IndustryStandard/IoRemappingTable.h @@ -14,24 +14,24 @@ #include -#define EFI_ACPI_IO_REMAPPING_TABLE_REVISION 0x0 +#define EFI_ACPI_IO_REMAPPING_TABLE_REVISION 0x0 -#define EFI_ACPI_IORT_TYPE_ITS_GROUP 0x0 -#define EFI_ACPI_IORT_TYPE_NAMED_COMP 0x1 -#define EFI_ACPI_IORT_TYPE_ROOT_COMPLEX 0x2 -#define EFI_ACPI_IORT_TYPE_SMMUv1v2 0x3 -#define EFI_ACPI_IORT_TYPE_SMMUv3 0x4 -#define EFI_ACPI_IORT_TYPE_PMCG 0x5 +#define EFI_ACPI_IORT_TYPE_ITS_GROUP 0x0 +#define EFI_ACPI_IORT_TYPE_NAMED_COMP 0x1 +#define EFI_ACPI_IORT_TYPE_ROOT_COMPLEX 0x2 +#define EFI_ACPI_IORT_TYPE_SMMUv1v2 0x3 +#define EFI_ACPI_IORT_TYPE_SMMUv3 0x4 +#define EFI_ACPI_IORT_TYPE_PMCG 0x5 -#define EFI_ACPI_IORT_MEM_ACCESS_PROP_CCA BIT0 +#define EFI_ACPI_IORT_MEM_ACCESS_PROP_CCA BIT0 -#define EFI_ACPI_IORT_MEM_ACCESS_PROP_AH_TR BIT0 -#define EFI_ACPI_IORT_MEM_ACCESS_PROP_AH_WA BIT1 -#define EFI_ACPI_IORT_MEM_ACCESS_PROP_AH_RA BIT2 -#define EFI_ACPI_IORT_MEM_ACCESS_PROP_AH_AHO BIT3 +#define EFI_ACPI_IORT_MEM_ACCESS_PROP_AH_TR BIT0 +#define EFI_ACPI_IORT_MEM_ACCESS_PROP_AH_WA BIT1 +#define EFI_ACPI_IORT_MEM_ACCESS_PROP_AH_RA BIT2 +#define EFI_ACPI_IORT_MEM_ACCESS_PROP_AH_AHO BIT3 -#define EFI_ACPI_IORT_MEM_ACCESS_FLAGS_CPM BIT0 -#define EFI_ACPI_IORT_MEM_ACCESS_FLAGS_DACS BIT1 +#define EFI_ACPI_IORT_MEM_ACCESS_FLAGS_CPM BIT0 +#define EFI_ACPI_IORT_MEM_ACCESS_FLAGS_DACS BIT1 #define EFI_ACPI_IORT_SMMUv1v2_MODEL_v1 0x0 #define EFI_ACPI_IORT_SMMUv1v2_MODEL_v2 0x1 @@ -40,24 +40,24 @@ #define EFI_ACPI_IORT_SMMUv1v2_MODEL_MMU401 0x4 #define EFI_ACPI_IORT_SMMUv1v2_MODEL_CAVIUM_THX_v2 0x5 -#define EFI_ACPI_IORT_SMMUv1v2_FLAG_DVM BIT0 -#define EFI_ACPI_IORT_SMMUv1v2_FLAG_COH_WALK BIT1 +#define EFI_ACPI_IORT_SMMUv1v2_FLAG_DVM BIT0 +#define EFI_ACPI_IORT_SMMUv1v2_FLAG_COH_WALK BIT1 -#define EFI_ACPI_IORT_SMMUv1v2_INT_FLAG_LEVEL 0x0 -#define EFI_ACPI_IORT_SMMUv1v2_INT_FLAG_EDGE 0x1 +#define EFI_ACPI_IORT_SMMUv1v2_INT_FLAG_LEVEL 0x0 +#define EFI_ACPI_IORT_SMMUv1v2_INT_FLAG_EDGE 0x1 #define EFI_ACPI_IORT_SMMUv3_FLAG_COHAC_OVERRIDE BIT0 #define EFI_ACPI_IORT_SMMUv3_FLAG_HTTU_OVERRIDE BIT1 #define EFI_ACPI_IORT_SMMUv3_FLAG_PROXIMITY_DOMAIN BIT3 -#define EFI_ACPI_IORT_SMMUv3_MODEL_GENERIC 0x0 -#define EFI_ACPI_IORT_SMMUv3_MODEL_HISILICON_HI161X 0x1 -#define EFI_ACPI_IORT_SMMUv3_MODEL_CAVIUM_CN99XX 0x2 +#define EFI_ACPI_IORT_SMMUv3_MODEL_GENERIC 0x0 +#define EFI_ACPI_IORT_SMMUv3_MODEL_HISILICON_HI161X 0x1 +#define EFI_ACPI_IORT_SMMUv3_MODEL_CAVIUM_CN99XX 0x2 #define EFI_ACPI_IORT_ROOT_COMPLEX_ATS_UNSUPPORTED 0x0 #define EFI_ACPI_IORT_ROOT_COMPLEX_ATS_SUPPORTED 0x1 -#define EFI_ACPI_IORT_ID_MAPPING_FLAGS_SINGLE BIT0 +#define EFI_ACPI_IORT_ID_MAPPING_FLAGS_SINGLE BIT0 #pragma pack(1) @@ -65,137 +65,137 @@ /// Table header /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 NumNodes; - UINT32 NodeOffset; - UINT32 Reserved; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 NumNodes; + UINT32 NodeOffset; + UINT32 Reserved; } EFI_ACPI_6_0_IO_REMAPPING_TABLE; /// /// Definition for ID mapping table shared by all node types /// typedef struct { - UINT32 InputBase; - UINT32 NumIds; - UINT32 OutputBase; - UINT32 OutputReference; - UINT32 Flags; + UINT32 InputBase; + UINT32 NumIds; + UINT32 OutputBase; + UINT32 OutputReference; + UINT32 Flags; } EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE; /// /// Node header definition shared by all node types /// typedef struct { - UINT8 Type; - UINT16 Length; - UINT8 Revision; - UINT32 Reserved; - UINT32 NumIdMappings; - UINT32 IdReference; + UINT8 Type; + UINT16 Length; + UINT8 Revision; + UINT32 Reserved; + UINT32 NumIdMappings; + UINT32 IdReference; } EFI_ACPI_6_0_IO_REMAPPING_NODE; /// /// Node type 0: ITS node /// typedef struct { - EFI_ACPI_6_0_IO_REMAPPING_NODE Node; + EFI_ACPI_6_0_IO_REMAPPING_NODE Node; - UINT32 NumItsIdentifiers; -//UINT32 ItsIdentifiers[NumItsIdentifiers]; + UINT32 NumItsIdentifiers; + // UINT32 ItsIdentifiers[NumItsIdentifiers]; } EFI_ACPI_6_0_IO_REMAPPING_ITS_NODE; /// /// Node type 1: root complex node /// typedef struct { - EFI_ACPI_6_0_IO_REMAPPING_NODE Node; + EFI_ACPI_6_0_IO_REMAPPING_NODE Node; - UINT32 CacheCoherent; - UINT8 AllocationHints; - UINT16 Reserved; - UINT8 MemoryAccessFlags; + UINT32 CacheCoherent; + UINT8 AllocationHints; + UINT16 Reserved; + UINT8 MemoryAccessFlags; - UINT32 AtsAttribute; - UINT32 PciSegmentNumber; - UINT8 MemoryAddressSize; - UINT8 Reserved1[3]; + UINT32 AtsAttribute; + UINT32 PciSegmentNumber; + UINT8 MemoryAddressSize; + UINT8 Reserved1[3]; } EFI_ACPI_6_0_IO_REMAPPING_RC_NODE; /// /// Node type 2: named component node /// typedef struct { - EFI_ACPI_6_0_IO_REMAPPING_NODE Node; - - UINT32 Flags; - UINT32 CacheCoherent; - UINT8 AllocationHints; - UINT16 Reserved; - UINT8 MemoryAccessFlags; - UINT8 AddressSizeLimit; -//UINT8 ObjectName[]; + EFI_ACPI_6_0_IO_REMAPPING_NODE Node; + + UINT32 Flags; + UINT32 CacheCoherent; + UINT8 AllocationHints; + UINT16 Reserved; + UINT8 MemoryAccessFlags; + UINT8 AddressSizeLimit; + // UINT8 ObjectName[]; } EFI_ACPI_6_0_IO_REMAPPING_NAMED_COMP_NODE; /// /// Node type 3: SMMUv1 or SMMUv2 node /// typedef struct { - UINT32 Interrupt; - UINT32 InterruptFlags; + UINT32 Interrupt; + UINT32 InterruptFlags; } EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT; typedef struct { - EFI_ACPI_6_0_IO_REMAPPING_NODE Node; - - UINT64 Base; - UINT64 Span; - UINT32 Model; - UINT32 Flags; - UINT32 GlobalInterruptArrayRef; - UINT32 NumContextInterrupts; - UINT32 ContextInterruptArrayRef; - UINT32 NumPmuInterrupts; - UINT32 PmuInterruptArrayRef; - - UINT32 SMMU_NSgIrpt; - UINT32 SMMU_NSgIrptFlags; - UINT32 SMMU_NSgCfgIrpt; - UINT32 SMMU_NSgCfgIrptFlags; - -//EFI_ACPI_6_0_IO_REMAPPING_SMMU_CTX_INT ContextInterrupt[NumContextInterrupts]; -//EFI_ACPI_6_0_IO_REMAPPING_SMMU_CTX_INT PmuInterrupt[NumPmuInterrupts]; + EFI_ACPI_6_0_IO_REMAPPING_NODE Node; + + UINT64 Base; + UINT64 Span; + UINT32 Model; + UINT32 Flags; + UINT32 GlobalInterruptArrayRef; + UINT32 NumContextInterrupts; + UINT32 ContextInterruptArrayRef; + UINT32 NumPmuInterrupts; + UINT32 PmuInterruptArrayRef; + + UINT32 SMMU_NSgIrpt; + UINT32 SMMU_NSgIrptFlags; + UINT32 SMMU_NSgCfgIrpt; + UINT32 SMMU_NSgCfgIrptFlags; + + // EFI_ACPI_6_0_IO_REMAPPING_SMMU_CTX_INT ContextInterrupt[NumContextInterrupts]; + // EFI_ACPI_6_0_IO_REMAPPING_SMMU_CTX_INT PmuInterrupt[NumPmuInterrupts]; } EFI_ACPI_6_0_IO_REMAPPING_SMMU_NODE; /// /// Node type 4: SMMUv3 node /// typedef struct { - EFI_ACPI_6_0_IO_REMAPPING_NODE Node; - - UINT64 Base; - UINT32 Flags; - UINT32 Reserved; - UINT64 VatosAddress; - UINT32 Model; - UINT32 Event; - UINT32 Pri; - UINT32 Gerr; - UINT32 Sync; - UINT32 ProximityDomain; - UINT32 DeviceIdMappingIndex; + EFI_ACPI_6_0_IO_REMAPPING_NODE Node; + + UINT64 Base; + UINT32 Flags; + UINT32 Reserved; + UINT64 VatosAddress; + UINT32 Model; + UINT32 Event; + UINT32 Pri; + UINT32 Gerr; + UINT32 Sync; + UINT32 ProximityDomain; + UINT32 DeviceIdMappingIndex; } EFI_ACPI_6_0_IO_REMAPPING_SMMU3_NODE; /// /// Node type 5: PMCG node /// typedef struct { - EFI_ACPI_6_0_IO_REMAPPING_NODE Node; + EFI_ACPI_6_0_IO_REMAPPING_NODE Node; - UINT64 Base; - UINT32 OverflowInterruptGsiv; - UINT32 NodeReference; - UINT64 Page1Base; -//EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE OverflowInterruptMsiMapping[1]; + UINT64 Base; + UINT32 OverflowInterruptGsiv; + UINT32 NodeReference; + UINT64 Page1Base; + // EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE OverflowInterruptMsiMapping[1]; } EFI_ACPI_6_0_IO_REMAPPING_PMCG_NODE; #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/IpmiFruInformationStorage.h b/MdePkg/Include/IndustryStandard/IpmiFruInformationStorage.h index e1fe0e3..5045254 100644 --- a/MdePkg/Include/IndustryStandard/IpmiFruInformationStorage.h +++ b/MdePkg/Include/IndustryStandard/IpmiFruInformationStorage.h @@ -27,24 +27,24 @@ typedef union { /// Individual bit fields /// struct { - UINT8 FormatVersionNumber:4; - UINT8 Reserved:4; + UINT8 FormatVersionNumber : 4; + UINT8 Reserved : 4; } Bits; /// /// All bit fields as a 8-bit value /// - UINT8 Uint8; + UINT8 Uint8; } IPMI_FRU_COMMON_HEADER_FORMAT_VERSION; typedef struct { - IPMI_FRU_COMMON_HEADER_FORMAT_VERSION FormatVersion; - UINT8 InternalUseStartingOffset; - UINT8 ChassisInfoStartingOffset; - UINT8 BoardAreaStartingOffset; - UINT8 ProductInfoStartingOffset; - UINT8 MultiRecInfoStartingOffset; - UINT8 Pad; - UINT8 Checksum; + IPMI_FRU_COMMON_HEADER_FORMAT_VERSION FormatVersion; + UINT8 InternalUseStartingOffset; + UINT8 ChassisInfoStartingOffset; + UINT8 BoardAreaStartingOffset; + UINT8 ProductInfoStartingOffset; + UINT8 MultiRecInfoStartingOffset; + UINT8 Pad; + UINT8 Checksum; } IPMI_FRU_COMMON_HEADER; // @@ -55,22 +55,22 @@ typedef union { /// Individual bit fields /// struct { - UINT8 RecordFormatVersion:4; - UINT8 Reserved:3; - UINT8 EndofList:1; + UINT8 RecordFormatVersion : 4; + UINT8 Reserved : 3; + UINT8 EndofList : 1; } Bits; /// /// All bit fields as a 8-bit value /// - UINT8 Uint8; + UINT8 Uint8; } IPMI_FRU_MULTI_RECORD_HEADER_FORMAT_VERSION; typedef struct { - UINT8 RecordTypeId; - IPMI_FRU_MULTI_RECORD_HEADER_FORMAT_VERSION FormatVersion; - UINT8 RecordLength; - UINT8 RecordChecksum; - UINT8 HeaderChecksum; + UINT8 RecordTypeId; + IPMI_FRU_MULTI_RECORD_HEADER_FORMAT_VERSION FormatVersion; + UINT8 RecordLength; + UINT8 RecordChecksum; + UINT8 HeaderChecksum; } IPMI_FRU_MULTI_RECORD_HEADER; // diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h b/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h index fed79ad..0721bc6 100644 --- a/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h +++ b/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h @@ -31,56 +31,55 @@ // // Definitions for Get Device ID command // -#define IPMI_APP_GET_DEVICE_ID 0x1 +#define IPMI_APP_GET_DEVICE_ID 0x1 // // Constants and Structure definitions for "Get Device ID" command to follow here // typedef union { struct { - UINT8 DeviceRevision : 4; - UINT8 Reserved : 3; - UINT8 DeviceSdr : 1; + UINT8 DeviceRevision : 4; + UINT8 Reserved : 3; + UINT8 DeviceSdr : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_GET_DEVICE_ID_DEVICE_REV; typedef union { struct { - UINT8 MajorFirmwareRev : 7; - UINT8 UpdateMode : 1; + UINT8 MajorFirmwareRev : 7; + UINT8 UpdateMode : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_GET_DEVICE_ID_FIRMWARE_REV_1; typedef union { struct { - UINT8 SensorDeviceSupport : 1; - UINT8 SdrRepositorySupport : 1; - UINT8 SelDeviceSupport : 1; - UINT8 FruInventorySupport : 1; - UINT8 IpmbMessageReceiver : 1; - UINT8 IpmbMessageGenerator : 1; - UINT8 BridgeSupport : 1; - UINT8 ChassisSupport : 1; + UINT8 SensorDeviceSupport : 1; + UINT8 SdrRepositorySupport : 1; + UINT8 SelDeviceSupport : 1; + UINT8 FruInventorySupport : 1; + UINT8 IpmbMessageReceiver : 1; + UINT8 IpmbMessageGenerator : 1; + UINT8 BridgeSupport : 1; + UINT8 ChassisSupport : 1; } Bits; UINT8 Uint8; } IPMI_GET_DEVICE_ID_DEVICE_SUPPORT; typedef struct { - UINT8 CompletionCode; - UINT8 DeviceId; - IPMI_GET_DEVICE_ID_DEVICE_REV DeviceRevision; - IPMI_GET_DEVICE_ID_FIRMWARE_REV_1 FirmwareRev1; - UINT8 MinorFirmwareRev; - UINT8 SpecificationVersion; - IPMI_GET_DEVICE_ID_DEVICE_SUPPORT DeviceSupport; - UINT8 ManufacturerId[3]; - UINT16 ProductId; - UINT32 AuxFirmwareRevInfo; + UINT8 CompletionCode; + UINT8 DeviceId; + IPMI_GET_DEVICE_ID_DEVICE_REV DeviceRevision; + IPMI_GET_DEVICE_ID_FIRMWARE_REV_1 FirmwareRev1; + UINT8 MinorFirmwareRev; + UINT8 SpecificationVersion; + IPMI_GET_DEVICE_ID_DEVICE_SUPPORT DeviceSupport; + UINT8 ManufacturerId[3]; + UINT16 ProductId; + UINT32 AuxFirmwareRevInfo; } IPMI_GET_DEVICE_ID_RESPONSE; - // // Definitions for Cold Reset command // @@ -108,28 +107,28 @@ typedef struct { // Constants and Structure definitions for "Get Self Test Results" command to follow here // typedef struct { - UINT8 CompletionCode; - UINT8 Result; - UINT8 Param; + UINT8 CompletionCode; + UINT8 Result; + UINT8 Param; } IPMI_SELF_TEST_RESULT_RESPONSE; -#define IPMI_APP_SELFTEST_NO_ERROR 0x55 -#define IPMI_APP_SELFTEST_NOT_IMPLEMENTED 0x56 -#define IPMI_APP_SELFTEST_ERROR 0x57 -#define IPMI_APP_SELFTEST_FATAL_HW_ERROR 0x58 -#define IPMI_APP_SELFTEST_INACCESSIBLE_SEL 0x80 -#define IPMI_APP_SELFTEST_INACCESSIBLE_SDR 0x40 -#define IPMI_APP_SELFTEST_INACCESSIBLE_FRU 0x20 -#define IPMI_APP_SELFTEST_IPMB_SIGNAL_FAIL 0x10 -#define IPMI_APP_SELFTEST_SDR_REPOSITORY_EMPTY 0x08 -#define IPMI_APP_SELFTEST_FRU_CORRUPT 0x04 -#define IPMI_APP_SELFTEST_FW_BOOTBLOCK_CORRUPT 0x02 -#define IPMI_APP_SELFTEST_FW_CORRUPT 0x01 +#define IPMI_APP_SELFTEST_NO_ERROR 0x55 +#define IPMI_APP_SELFTEST_NOT_IMPLEMENTED 0x56 +#define IPMI_APP_SELFTEST_ERROR 0x57 +#define IPMI_APP_SELFTEST_FATAL_HW_ERROR 0x58 +#define IPMI_APP_SELFTEST_INACCESSIBLE_SEL 0x80 +#define IPMI_APP_SELFTEST_INACCESSIBLE_SDR 0x40 +#define IPMI_APP_SELFTEST_INACCESSIBLE_FRU 0x20 +#define IPMI_APP_SELFTEST_IPMB_SIGNAL_FAIL 0x10 +#define IPMI_APP_SELFTEST_SDR_REPOSITORY_EMPTY 0x08 +#define IPMI_APP_SELFTEST_FRU_CORRUPT 0x04 +#define IPMI_APP_SELFTEST_FW_BOOTBLOCK_CORRUPT 0x02 +#define IPMI_APP_SELFTEST_FW_CORRUPT 0x01 // // Definitions for Manufacturing Test ON command // -#define IPMI_APP_MANUFACTURING_TEST_ON 0x5 +#define IPMI_APP_MANUFACTURING_TEST_ON 0x5 // // Constants and Structure definitions for "Manufacturing Test ON" command to follow here @@ -138,7 +137,7 @@ typedef struct { // // Definitions for Set ACPI Power State command // -#define IPMI_APP_SET_ACPI_POWERSTATE 0x6 +#define IPMI_APP_SET_ACPI_POWERSTATE 0x6 // // Constants and Structure definitions for "Set ACPI Power State" command to follow here @@ -148,55 +147,55 @@ typedef struct { // Definitions for System Power State // // Working -#define IPMI_SYSTEM_POWER_STATE_S0_G0 0x0 -#define IPMI_SYSTEM_POWER_STATE_S1 0x1 -#define IPMI_SYSTEM_POWER_STATE_S2 0x2 -#define IPMI_SYSTEM_POWER_STATE_S3 0x3 -#define IPMI_SYSTEM_POWER_STATE_S4 0x4 +#define IPMI_SYSTEM_POWER_STATE_S0_G0 0x0 +#define IPMI_SYSTEM_POWER_STATE_S1 0x1 +#define IPMI_SYSTEM_POWER_STATE_S2 0x2 +#define IPMI_SYSTEM_POWER_STATE_S3 0x3 +#define IPMI_SYSTEM_POWER_STATE_S4 0x4 // Soft off -#define IPMI_SYSTEM_POWER_STATE_S5_G2 0x5 +#define IPMI_SYSTEM_POWER_STATE_S5_G2 0x5 // Sent when message source cannot differentiate between S4 and S5 -#define IPMI_SYSTEM_POWER_STATE_S4_S5 0x6 +#define IPMI_SYSTEM_POWER_STATE_S4_S5 0x6 // Mechanical off -#define IPMI_SYSTEM_POWER_STATE_G3 0x7 +#define IPMI_SYSTEM_POWER_STATE_G3 0x7 // Sleeping - cannot differentiate between S1-S3 -#define IPMI_SYSTEM_POWER_STATE_SLEEPING 0x8 +#define IPMI_SYSTEM_POWER_STATE_SLEEPING 0x8 // Sleeping - cannot differentiate between S1-S4 #define IPMI_SYSTEM_POWER_STATE_G1_SLEEPING 0x9 // S5 entered by override -#define IPMI_SYSTEM_POWER_STATE_OVERRIDE 0xA -#define IPMI_SYSTEM_POWER_STATE_LEGACY_ON 0x20 -#define IPMI_SYSTEM_POWER_STATE_LEGACY_OFF 0x21 -#define IPMI_SYSTEM_POWER_STATE_UNKNOWN 0x2A -#define IPMI_SYSTEM_POWER_STATE_NO_CHANGE 0x7F +#define IPMI_SYSTEM_POWER_STATE_OVERRIDE 0xA +#define IPMI_SYSTEM_POWER_STATE_LEGACY_ON 0x20 +#define IPMI_SYSTEM_POWER_STATE_LEGACY_OFF 0x21 +#define IPMI_SYSTEM_POWER_STATE_UNKNOWN 0x2A +#define IPMI_SYSTEM_POWER_STATE_NO_CHANGE 0x7F // // Definitions for Device Power State // -#define IPMI_DEVICE_POWER_STATE_D0 0x0 -#define IPMI_DEVICE_POWER_STATE_D1 0x1 -#define IPMI_DEVICE_POWER_STATE_D2 0x2 -#define IPMI_DEVICE_POWER_STATE_D3 0x3 -#define IPMI_DEVICE_POWER_STATE_UNKNOWN 0x2A -#define IPMI_DEVICE_POWER_STATE_NO_CHANGE 0x7F +#define IPMI_DEVICE_POWER_STATE_D0 0x0 +#define IPMI_DEVICE_POWER_STATE_D1 0x1 +#define IPMI_DEVICE_POWER_STATE_D2 0x2 +#define IPMI_DEVICE_POWER_STATE_D3 0x3 +#define IPMI_DEVICE_POWER_STATE_UNKNOWN 0x2A +#define IPMI_DEVICE_POWER_STATE_NO_CHANGE 0x7F typedef union { struct { - UINT8 PowerState : 7; - UINT8 StateChange : 1; + UINT8 PowerState : 7; + UINT8 StateChange : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_ACPI_POWER_STATE; typedef struct { - IPMI_ACPI_POWER_STATE SystemPowerState; - IPMI_ACPI_POWER_STATE DevicePowerState; + IPMI_ACPI_POWER_STATE SystemPowerState; + IPMI_ACPI_POWER_STATE DevicePowerState; } IPMI_SET_ACPI_POWER_STATE_REQUEST; // // Definitions for Get ACPI Power State command // -#define IPMI_APP_GET_ACPI_POWERSTATE 0x7 +#define IPMI_APP_GET_ACPI_POWERSTATE 0x7 // // Constants and Structure definitions for "Get ACPI Power State" command to follow here @@ -205,7 +204,7 @@ typedef struct { // // Definitions for Get Device GUID command // -#define IPMI_APP_GET_DEVICE_GUID 0x8 +#define IPMI_APP_GET_DEVICE_GUID 0x8 // // Constants and Structure definitions for "Get Device GUID" command to follow here @@ -214,8 +213,8 @@ typedef struct { // Message structure definition for "Get Device Guid" IPMI command // typedef struct { - UINT8 CompletionCode; - UINT8 Guid[16]; + UINT8 CompletionCode; + UINT8 Guid[16]; } IPMI_GET_DEVICE_GUID_RESPONSE; // @@ -250,12 +249,12 @@ typedef struct { // typedef union { struct { - UINT8 TimerUse : 3; - UINT8 Reserved : 3; - UINT8 TimerRunning : 1; - UINT8 TimerUseExpirationFlagLog : 1; + UINT8 TimerUse : 3; + UINT8 Reserved : 3; + UINT8 TimerRunning : 1; + UINT8 TimerUseExpirationFlagLog : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_WATCHDOG_TIMER_USE; // @@ -279,12 +278,12 @@ typedef union { // typedef union { struct { - UINT8 TimeoutAction : 3; - UINT8 Reserved1 : 1; - UINT8 PreTimeoutInterrupt : 3; - UINT8 Reserved2 : 1; + UINT8 TimeoutAction : 3; + UINT8 Reserved1 : 1; + UINT8 PreTimeoutInterrupt : 3; + UINT8 Reserved2 : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_WATCHDOG_TIMER_ACTIONS; // @@ -297,11 +296,11 @@ typedef union { #define IPMI_WATCHDOG_TIMER_EXPIRATION_FLAG_OEM BIT5 typedef struct { - IPMI_WATCHDOG_TIMER_USE TimerUse; - IPMI_WATCHDOG_TIMER_ACTIONS TimerActions; - UINT8 PretimeoutInterval; - UINT8 TimerUseExpirationFlagsClear; - UINT16 InitialCountdownValue; + IPMI_WATCHDOG_TIMER_USE TimerUse; + IPMI_WATCHDOG_TIMER_ACTIONS TimerActions; + UINT8 PretimeoutInterval; + UINT8 TimerUseExpirationFlagsClear; + UINT16 InitialCountdownValue; } IPMI_SET_WATCHDOG_TIMER_REQUEST; // @@ -313,13 +312,13 @@ typedef struct { // Constants and Structure definitions for "Get WatchDog Timer" command to follow here // typedef struct { - UINT8 CompletionCode; - IPMI_WATCHDOG_TIMER_USE TimerUse; - IPMI_WATCHDOG_TIMER_ACTIONS TimerActions; - UINT8 PretimeoutInterval; - UINT8 TimerUseExpirationFlagsClear; - UINT16 InitialCountdownValue; - UINT16 PresentCountdownValue; + UINT8 CompletionCode; + IPMI_WATCHDOG_TIMER_USE TimerUse; + IPMI_WATCHDOG_TIMER_ACTIONS TimerActions; + UINT8 PretimeoutInterval; + UINT8 TimerUseExpirationFlagsClear; + UINT16 InitialCountdownValue; + UINT16 PresentCountdownValue; } IPMI_GET_WATCHDOG_TIMER_RESPONSE; // @@ -336,20 +335,20 @@ typedef struct { // typedef union { struct { - UINT8 ReceiveMessageQueueInterrupt : 1; - UINT8 EventMessageBufferFullInterrupt : 1; - UINT8 EventMessageBuffer : 1; - UINT8 SystemEventLogging : 1; - UINT8 Reserved : 1; - UINT8 Oem0Enable : 1; - UINT8 Oem1Enable : 1; - UINT8 Oem2Enable : 1; + UINT8 ReceiveMessageQueueInterrupt : 1; + UINT8 EventMessageBufferFullInterrupt : 1; + UINT8 EventMessageBuffer : 1; + UINT8 SystemEventLogging : 1; + UINT8 Reserved : 1; + UINT8 Oem0Enable : 1; + UINT8 Oem1Enable : 1; + UINT8 Oem2Enable : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_BMC_GLOBAL_ENABLES; typedef struct { - IPMI_BMC_GLOBAL_ENABLES SetEnables; + IPMI_BMC_GLOBAL_ENABLES SetEnables; } IPMI_SET_BMC_GLOBAL_ENABLES_REQUEST; // @@ -361,47 +360,47 @@ typedef struct { // Constants and Structure definitions for "Get BMC Global Enables " command to follow here // typedef struct { - UINT8 CompletionCode; - IPMI_BMC_GLOBAL_ENABLES GetEnables; + UINT8 CompletionCode; + IPMI_BMC_GLOBAL_ENABLES GetEnables; } IPMI_GET_BMC_GLOBAL_ENABLES_RESPONSE; // // Definitions for Clear Message Flags command // -#define IPMI_APP_CLEAR_MESSAGE_FLAGS 0x30 +#define IPMI_APP_CLEAR_MESSAGE_FLAGS 0x30 // // Constants and Structure definitions for "Clear Message Flags" command to follow here // typedef union { struct { - UINT8 ReceiveMessageQueue : 1; - UINT8 EventMessageBuffer : 1; - UINT8 Reserved1 : 1; - UINT8 WatchdogPerTimeoutInterrupt : 1; - UINT8 Reserved2 : 1; - UINT8 Oem0 : 1; - UINT8 Oem1 : 1; - UINT8 Oem2 : 1; + UINT8 ReceiveMessageQueue : 1; + UINT8 EventMessageBuffer : 1; + UINT8 Reserved1 : 1; + UINT8 WatchdogPerTimeoutInterrupt : 1; + UINT8 Reserved2 : 1; + UINT8 Oem0 : 1; + UINT8 Oem1 : 1; + UINT8 Oem2 : 1; } Bits; UINT8 Uint8; } IPMI_MESSAGE_FLAGS; typedef struct { - IPMI_MESSAGE_FLAGS ClearFlags; + IPMI_MESSAGE_FLAGS ClearFlags; } IPMI_CLEAR_MESSAGE_FLAGS_REQUEST; // // Definitions for Get Message Flags command // -#define IPMI_APP_GET_MESSAGE_FLAGS 0x31 +#define IPMI_APP_GET_MESSAGE_FLAGS 0x31 // // Constants and Structure definitions for "Get Message Flags" command to follow here // typedef struct { - UINT8 CompletionCode; - IPMI_MESSAGE_FLAGS GetFlags; + UINT8 CompletionCode; + IPMI_MESSAGE_FLAGS GetFlags; } IPMI_GET_MESSAGE_FLAGS_RESPONSE; // @@ -416,23 +415,23 @@ typedef struct { // // Definitions for Get Message command // -#define IPMI_APP_GET_MESSAGE 0x33 +#define IPMI_APP_GET_MESSAGE 0x33 // // Constants and Structure definitions for "Get Message" command to follow here // typedef union { struct { - UINT8 ChannelNumber : 4; - UINT8 InferredPrivilegeLevel : 4; + UINT8 ChannelNumber : 4; + UINT8 InferredPrivilegeLevel : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_GET_MESSAGE_CHANNEL_NUMBER; typedef struct { - UINT8 CompletionCode; - IPMI_GET_MESSAGE_CHANNEL_NUMBER ChannelNumber; - UINT8 MessageData[0]; + UINT8 CompletionCode; + IPMI_GET_MESSAGE_CHANNEL_NUMBER ChannelNumber; + UINT8 MessageData[0]; } IPMI_GET_MESSAGE_RESPONSE; // @@ -445,29 +444,29 @@ typedef struct { // typedef union { struct { - UINT8 ChannelNumber : 4; - UINT8 Authentication : 1; - UINT8 Encryption : 1; - UINT8 Tracking : 2; + UINT8 ChannelNumber : 4; + UINT8 Authentication : 1; + UINT8 Encryption : 1; + UINT8 Tracking : 2; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_SEND_MESSAGE_CHANNEL_NUMBER; typedef struct { - UINT8 CompletionCode; - IPMI_SEND_MESSAGE_CHANNEL_NUMBER ChannelNumber; - UINT8 MessageData[0]; + UINT8 CompletionCode; + IPMI_SEND_MESSAGE_CHANNEL_NUMBER ChannelNumber; + UINT8 MessageData[0]; } IPMI_SEND_MESSAGE_REQUEST; typedef struct { - UINT8 CompletionCode; - UINT8 ResponseData[0]; + UINT8 CompletionCode; + UINT8 ResponseData[0]; } IPMI_SEND_MESSAGE_RESPONSE; // // Definitions for Read Event Message Buffer command // -#define IPMI_APP_READ_EVENT_MSG_BUFFER 0x35 +#define IPMI_APP_READ_EVENT_MSG_BUFFER 0x35 // // Constants and Structure definitions for "Read Event Message Buffer" command to follow here @@ -476,7 +475,7 @@ typedef struct { // // Definitions for Get BT Interface Capabilities command // -#define IPMI_APP_GET_BT_INTERFACE_CAPABILITY 0x36 +#define IPMI_APP_GET_BT_INTERFACE_CAPABILITY 0x36 // // Constants and Structure definitions for "Get BT Interface Capabilities" command to follow here @@ -485,7 +484,7 @@ typedef struct { // // Definitions for Get System GUID command // -#define IPMI_APP_GET_SYSTEM_GUID 0x37 +#define IPMI_APP_GET_SYSTEM_GUID 0x37 // // Constants and Structure definitions for "Get System GUID" command to follow here @@ -494,7 +493,7 @@ typedef struct { // // Definitions for Get Channel Authentication Capabilities command // -#define IPMI_APP_GET_CHANNEL_AUTHENTICATION_CAPABILITIES 0x38 +#define IPMI_APP_GET_CHANNEL_AUTHENTICATION_CAPABILITIES 0x38 // // Constants and Structure definitions for "Get Channel Authentication Capabilities" command to follow here @@ -503,7 +502,7 @@ typedef struct { // // Definitions for Get Session Challenge command // -#define IPMI_APP_GET_SESSION_CHALLENGE 0x39 +#define IPMI_APP_GET_SESSION_CHALLENGE 0x39 // // Constants and Structure definitions for "Get Session Challenge" command to follow here @@ -521,7 +520,7 @@ typedef struct { // // Definitions for Set Session Privelege Level command // -#define IPMI_APP_SET_SESSION_PRIVELEGE_LEVEL 0x3B +#define IPMI_APP_SET_SESSION_PRIVELEGE_LEVEL 0x3B // // Constants and Structure definitions for "Set Session Privelege Level" command to follow here @@ -530,7 +529,7 @@ typedef struct { // // Definitions for Close Session command // -#define IPMI_APP_CLOSE_SESSION 0x3C +#define IPMI_APP_CLOSE_SESSION 0x3C // // Constants and Structure definitions for "Close Session" command to follow here @@ -588,48 +587,48 @@ typedef struct { typedef union { struct { - UINT8 ChannelNo : 4; - UINT8 Reserved : 4; + UINT8 ChannelNo : 4; + UINT8 Reserved : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_GET_CHANNEL_ACCESS_CHANNEL_NUMBER; typedef union { struct { - UINT8 Reserved : 6; - UINT8 MemoryType : 2; + UINT8 Reserved : 6; + UINT8 MemoryType : 2; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_GET_CHANNEL_ACCESS_TYPE; typedef struct { - IPMI_GET_CHANNEL_ACCESS_CHANNEL_NUMBER ChannelNumber; - IPMI_GET_CHANNEL_ACCESS_TYPE AccessType; + IPMI_GET_CHANNEL_ACCESS_CHANNEL_NUMBER ChannelNumber; + IPMI_GET_CHANNEL_ACCESS_TYPE AccessType; } IPMI_GET_CHANNEL_ACCESS_REQUEST; typedef union { struct { - UINT8 AccessMode : 3; - UINT8 UserLevelAuthEnabled : 1; - UINT8 MessageAuthEnable : 1; - UINT8 Alert : 1; - UINT8 Reserved : 2; + UINT8 AccessMode : 3; + UINT8 UserLevelAuthEnabled : 1; + UINT8 MessageAuthEnable : 1; + UINT8 Alert : 1; + UINT8 Reserved : 2; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_GET_CHANNEL_ACCESS_CHANNEL_ACCESS; typedef union { struct { - UINT8 ChannelPriviledgeLimit : 4; - UINT8 Reserved : 4; + UINT8 ChannelPriviledgeLimit : 4; + UINT8 Reserved : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_GET_CHANNEL_ACCESS_PRIVILEGE_LIMIT; typedef struct { - UINT8 CompletionCode; - IPMI_GET_CHANNEL_ACCESS_CHANNEL_ACCESS ChannelAccess; - IPMI_GET_CHANNEL_ACCESS_PRIVILEGE_LIMIT PrivilegeLimit; + UINT8 CompletionCode; + IPMI_GET_CHANNEL_ACCESS_CHANNEL_ACCESS ChannelAccess; + IPMI_GET_CHANNEL_ACCESS_PRIVILEGE_LIMIT PrivilegeLimit; } IPMI_GET_CHANNEL_ACCESS_RESPONSE; // @@ -645,73 +644,73 @@ typedef struct { // Definitions for channel media type // // IPMB (I2C) -#define IPMI_CHANNEL_MEDIA_TYPE_IPMB 0x1 +#define IPMI_CHANNEL_MEDIA_TYPE_IPMB 0x1 // ICMB v1.0 -#define IPMI_CHANNEL_MEDIA_TYPE_ICMB_1_0 0x2 +#define IPMI_CHANNEL_MEDIA_TYPE_ICMB_1_0 0x2 // ICMB v0.9 -#define IPMI_CHANNEL_MEDIA_TYPE_ICMB_0_9 0x3 +#define IPMI_CHANNEL_MEDIA_TYPE_ICMB_0_9 0x3 // 802.3 LAN -#define IPMI_CHANNEL_MEDIA_TYPE_802_3_LAN 0x4 +#define IPMI_CHANNEL_MEDIA_TYPE_802_3_LAN 0x4 // Asynch. Serial/Modem (RS-232) -#define IPMI_CHANNEL_MEDIA_TYPE_RS_232 0x5 +#define IPMI_CHANNEL_MEDIA_TYPE_RS_232 0x5 // Other LAN -#define IPMI_CHANNEL_MEDIA_TYPE_OTHER_LAN 0x6 +#define IPMI_CHANNEL_MEDIA_TYPE_OTHER_LAN 0x6 // PCI SMBus -#define IPMI_CHANNEL_MEDIA_TYPE_PCI_SM_BUS 0x7 +#define IPMI_CHANNEL_MEDIA_TYPE_PCI_SM_BUS 0x7 // SMBus v1.0/1.1 -#define IPMI_CHANNEL_MEDIA_TYPE_SM_BUS_V1 0x8 +#define IPMI_CHANNEL_MEDIA_TYPE_SM_BUS_V1 0x8 // SMBus v2.0 -#define IPMI_CHANNEL_MEDIA_TYPE_SM_BUS_V2 0x9 +#define IPMI_CHANNEL_MEDIA_TYPE_SM_BUS_V2 0x9 // USB 1.x -#define IPMI_CHANNEL_MEDIA_TYPE_USB1 0xA +#define IPMI_CHANNEL_MEDIA_TYPE_USB1 0xA // USB 2.x -#define IPMI_CHANNEL_MEDIA_TYPE_USB2 0xB +#define IPMI_CHANNEL_MEDIA_TYPE_USB2 0xB // System Interface (KCS, SMIC, or BT) #define IPMI_CHANNEL_MEDIA_TYPE_SYSTEM_INTERFACE 0xC // OEM -#define IPMI_CHANNEL_MEDIA_TYPE_OEM_START 0x60 -#define IPMI_CHANNEL_MEDIA_TYPE_OEM_END 0x7F +#define IPMI_CHANNEL_MEDIA_TYPE_OEM_START 0x60 +#define IPMI_CHANNEL_MEDIA_TYPE_OEM_END 0x7F typedef union { struct { - UINT8 ChannelNo : 4; - UINT8 Reserved : 4; + UINT8 ChannelNo : 4; + UINT8 Reserved : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_CHANNEL_INFO_CHANNEL_NUMBER; typedef union { struct { - UINT8 ChannelMediumType : 7; - UINT8 Reserved : 1; + UINT8 ChannelMediumType : 7; + UINT8 Reserved : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_CHANNEL_INFO_MEDIUM_TYPE; typedef union { struct { - UINT8 ChannelProtocolType : 5; - UINT8 Reserved : 3; + UINT8 ChannelProtocolType : 5; + UINT8 Reserved : 3; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_CHANNEL_INFO_PROTOCOL_TYPE; typedef union { struct { - UINT8 ActiveSessionCount : 6; - UINT8 SessionSupport : 2; + UINT8 ActiveSessionCount : 6; + UINT8 SessionSupport : 2; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_CHANNEL_INFO_SESSION_SUPPORT; typedef struct { - UINT8 CompletionCode; - IPMI_CHANNEL_INFO_CHANNEL_NUMBER ChannelNumber; - IPMI_CHANNEL_INFO_MEDIUM_TYPE MediumType; - IPMI_CHANNEL_INFO_PROTOCOL_TYPE ProtocolType; - IPMI_CHANNEL_INFO_SESSION_SUPPORT SessionSupport; - UINT8 VendorId[3]; - UINT16 AuxChannelInfo; + UINT8 CompletionCode; + IPMI_CHANNEL_INFO_CHANNEL_NUMBER ChannelNumber; + IPMI_CHANNEL_INFO_MEDIUM_TYPE MediumType; + IPMI_CHANNEL_INFO_PROTOCOL_TYPE ProtocolType; + IPMI_CHANNEL_INFO_SESSION_SUPPORT SessionSupport; + UINT8 VendorId[3]; + UINT16 AuxChannelInfo; } IPMI_GET_CHANNEL_INFO_RESPONSE; // @@ -726,7 +725,7 @@ typedef struct { // // Definitions for Set User Access command // -#define IPMI_APP_SET_USER_ACCESS 0x43 +#define IPMI_APP_SET_USER_ACCESS 0x43 // // Constants and Structure definitions for "Set User Access" command to follow here @@ -735,109 +734,109 @@ typedef struct { // // Definitions for Get User Access command // -#define IPMI_APP_GET_USER_ACCESS 0x44 +#define IPMI_APP_GET_USER_ACCESS 0x44 // // Constants and Structure definitions for "Get User Access" command to follow here // typedef union { struct { - UINT8 ChannelNo : 4; - UINT8 Reserved : 4; + UINT8 ChannelNo : 4; + UINT8 Reserved : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_GET_USER_ACCESS_CHANNEL_NUMBER; typedef union { struct { - UINT8 UserId : 6; - UINT8 Reserved : 2; + UINT8 UserId : 6; + UINT8 Reserved : 2; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_USER_ID; typedef struct { - IPMI_GET_USER_ACCESS_CHANNEL_NUMBER ChannelNumber; - IPMI_USER_ID UserId; + IPMI_GET_USER_ACCESS_CHANNEL_NUMBER ChannelNumber; + IPMI_USER_ID UserId; } IPMI_GET_USER_ACCESS_REQUEST; typedef union { struct { - UINT8 MaxUserId : 6; - UINT8 Reserved : 2; + UINT8 MaxUserId : 6; + UINT8 Reserved : 2; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_GET_USER_ACCESS_MAX_USER_ID; typedef union { struct { - UINT8 CurrentUserId : 6; - UINT8 UserIdEnableStatus : 2; + UINT8 CurrentUserId : 6; + UINT8 UserIdEnableStatus : 2; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_GET_USER_ACCESS_CURRENT_USER; typedef union { struct { - UINT8 FixedUserId : 6; - UINT8 Reserved : 2; + UINT8 FixedUserId : 6; + UINT8 Reserved : 2; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_GET_USER_ACCESS_FIXED_NAME_USER; typedef union { struct { - UINT8 UserPrivilegeLimit : 4; - UINT8 EnableIpmiMessaging : 1; - UINT8 EnableUserLinkAuthetication : 1; - UINT8 UserAccessAvailable : 1; - UINT8 Reserved : 1; + UINT8 UserPrivilegeLimit : 4; + UINT8 EnableIpmiMessaging : 1; + UINT8 EnableUserLinkAuthetication : 1; + UINT8 UserAccessAvailable : 1; + UINT8 Reserved : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_GET_USER_ACCESS_CHANNEL_ACCESS; typedef struct { - UINT8 CompletionCode; - IPMI_GET_USER_ACCESS_MAX_USER_ID MaxUserId; - IPMI_GET_USER_ACCESS_CURRENT_USER CurrentUser; - IPMI_GET_USER_ACCESS_FIXED_NAME_USER FixedNameUser; - IPMI_GET_USER_ACCESS_CHANNEL_ACCESS ChannelAccess; + UINT8 CompletionCode; + IPMI_GET_USER_ACCESS_MAX_USER_ID MaxUserId; + IPMI_GET_USER_ACCESS_CURRENT_USER CurrentUser; + IPMI_GET_USER_ACCESS_FIXED_NAME_USER FixedNameUser; + IPMI_GET_USER_ACCESS_CHANNEL_ACCESS ChannelAccess; } IPMI_GET_USER_ACCESS_RESPONSE; // // Definitions for Set User Name command // -#define IPMI_APP_SET_USER_NAME 0x45 +#define IPMI_APP_SET_USER_NAME 0x45 // // Constants and Structure definitions for "Set User Name" command to follow here // typedef struct { - IPMI_USER_ID UserId; - UINT8 UserName[16]; + IPMI_USER_ID UserId; + UINT8 UserName[16]; } IPMI_SET_USER_NAME_REQUEST; // // Definitions for Get User Name command // -#define IPMI_APP_GET_USER_NAME 0x46 +#define IPMI_APP_GET_USER_NAME 0x46 // // Constants and Structure definitions for "Get User Name" command to follow here // typedef struct { - IPMI_USER_ID UserId; + IPMI_USER_ID UserId; } IPMI_GET_USER_NAME_REQUEST; typedef struct { - UINT8 CompletionCode; - UINT8 UserName[16]; + UINT8 CompletionCode; + UINT8 UserName[16]; } IPMI_GET_USER_NAME_RESPONSE; // // Definitions for Set User Password command // -#define IPMI_APP_SET_USER_PASSWORD 0x47 +#define IPMI_APP_SET_USER_PASSWORD 0x47 // // Constants and Structure definitions for "Set User Password" command to follow here @@ -859,25 +858,25 @@ typedef struct { typedef union { struct { - UINT8 UserId : 6; - UINT8 Reserved : 1; - UINT8 PasswordSize : 1; + UINT8 UserId : 6; + UINT8 Reserved : 1; + UINT8 PasswordSize : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_SET_USER_PASSWORD_USER_ID; typedef union { struct { - UINT8 Operation : 2; - UINT8 Reserved : 6; + UINT8 Operation : 2; + UINT8 Reserved : 6; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_SET_USER_PASSWORD_OPERATION; typedef struct { - IPMI_SET_USER_PASSWORD_USER_ID UserId; - IPMI_SET_USER_PASSWORD_OPERATION Operation; - UINT8 PasswordData[0]; // 16 or 20 bytes, depending on the 'PasswordSize' field + IPMI_SET_USER_PASSWORD_USER_ID UserId; + IPMI_SET_USER_PASSWORD_OPERATION Operation; + UINT8 PasswordData[0]; // 16 or 20 bytes, depending on the 'PasswordSize' field } IPMI_SET_USER_PASSWORD_REQUEST; // @@ -905,7 +904,7 @@ typedef struct { // // Definitions for Get Payload activation Status command // -#define IPMI_APP_GET_PAYLOAD_ACTIVATION_STATUS 0x4a +#define IPMI_APP_GET_PAYLOAD_ACTIVATION_STATUS 0x4a // // Constants and Structure definitions for "Get Payload activation Status" command to follow here @@ -914,7 +913,7 @@ typedef struct { // // Definitions for Get Payload Instance Info command // -#define IPMI_APP_GET_PAYLOAD_INSTANCE_INFO 0x4b +#define IPMI_APP_GET_PAYLOAD_INSTANCE_INFO 0x4b // // Constants and Structure definitions for "Get Payload Instance Info" command to follow here @@ -923,7 +922,7 @@ typedef struct { // // Definitions for Set User Payload Access command // -#define IPMI_APP_SET_USER_PAYLOAD_ACCESS 0x4C +#define IPMI_APP_SET_USER_PAYLOAD_ACCESS 0x4C // // Constants and Structure definitions for "Set User Payload Access" command to follow here @@ -932,7 +931,7 @@ typedef struct { // // Definitions for Get User Payload Access command // -#define IPMI_APP_GET_USER_PAYLOAD_ACCESS 0x4D +#define IPMI_APP_GET_USER_PAYLOAD_ACCESS 0x4D // // Constants and Structure definitions for "Get User Payload Access" command to follow here @@ -941,7 +940,7 @@ typedef struct { // // Definitions for Get Channel Payload Support command // -#define IPMI_APP_GET_CHANNEL_PAYLOAD_SUPPORT 0x4E +#define IPMI_APP_GET_CHANNEL_PAYLOAD_SUPPORT 0x4E // // Constants and Structure definitions for "Get Channel Payload Support" command to follow here @@ -950,7 +949,7 @@ typedef struct { // // Definitions for Get Channel Payload Version command // -#define IPMI_APP_GET_CHANNEL_PAYLOAD_VERSION 0x4F +#define IPMI_APP_GET_CHANNEL_PAYLOAD_VERSION 0x4F // // Constants and Structure definitions for "Get Channel Payload Version" command to follow here @@ -968,7 +967,7 @@ typedef struct { // // Definitions for Master Write-Read command // -#define IPMI_APP_MASTER_WRITE_READ 0x52 +#define IPMI_APP_MASTER_WRITE_READ 0x52 // // Constants and Structure definitions for "Master Write Read" command to follow here @@ -977,7 +976,7 @@ typedef struct { // // Definitions for Get Channel Cipher Suites command // -#define IPMI_APP_GET_CHANNEL_CIPHER_SUITES 0x54 +#define IPMI_APP_GET_CHANNEL_CIPHER_SUITES 0x54 // // Constants and Structure definitions for "Get Channel Cipher Suites" command to follow here @@ -990,7 +989,7 @@ typedef struct { // // Definitions for Suspend-Resume Payload Encryption command // -#define IPMI_APP_SUSPEND_RESUME_PAYLOAD_ENCRYPTION 0x55 +#define IPMI_APP_SUSPEND_RESUME_PAYLOAD_ENCRYPTION 0x55 // // Constants and Structure definitions for "Suspend-Resume Payload Encryption" command to follow here @@ -1003,7 +1002,7 @@ typedef struct { // // Definitions for Set Channel Security Keys command // -#define IPMI_APP_SET_CHANNEL_SECURITY_KEYS 0x56 +#define IPMI_APP_SET_CHANNEL_SECURITY_KEYS 0x56 // // Constants and Structure definitions for "Set Channel Security Keys" command to follow here @@ -1012,7 +1011,7 @@ typedef struct { // // Definitions for Get System Interface Capabilities command // -#define IPMI_APP_GET_SYSTEM_INTERFACE_CAPABILITIES 0x57 +#define IPMI_APP_GET_SYSTEM_INTERFACE_CAPABILITIES 0x57 // // Constants and Structure definitions for "Get System Interface Capabilities" command to follow here diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnBridge.h b/MdePkg/Include/IndustryStandard/IpmiNetFnBridge.h index 3c20840..a8d148a 100644 --- a/MdePkg/Include/IndustryStandard/IpmiNetFnBridge.h +++ b/MdePkg/Include/IndustryStandard/IpmiNetFnBridge.h @@ -16,7 +16,7 @@ // // Net function definition for Bridge command // -#define IPMI_NETFN_BRIDGE 0x02 +#define IPMI_NETFN_BRIDGE 0x02 // // Definitions for Get Bridge State command @@ -39,7 +39,7 @@ // // Definitions for Get ICMB Address command // -#define IPMI_BRIDGE_GET_ICMB_ADDRESS 0x02 +#define IPMI_BRIDGE_GET_ICMB_ADDRESS 0x02 // // Constants and Structure definitions for "Get ICMB Address" command to follow here @@ -48,7 +48,7 @@ // // Definitions for Set ICMB Address command // -#define IPMI_BRIDGE_SET_ICMB_ADDRESS 0x03 +#define IPMI_BRIDGE_SET_ICMB_ADDRESS 0x03 // // Constants and Structure definitions for "Set ICMB Address" command to follow here @@ -84,7 +84,7 @@ // // Definitions for Clear Bridge Statistics command // -#define IPMI_BRIDGE_CLEAR_STATISTICS 0x08 +#define IPMI_BRIDGE_CLEAR_STATISTICS 0x08 // // Constants and Structure definitions for "Clear Bridge Statistics" command to follow here @@ -111,7 +111,7 @@ // // Definitions for Get ICMB Connection ID command // -#define IPMI_BRIDGE_GET_ICMB_CONNECTION_ID 0x0B +#define IPMI_BRIDGE_GET_ICMB_CONNECTION_ID 0x0B // // Constants and Structure definitions for "Get ICMB Connection ID" command to follow here @@ -147,7 +147,7 @@ // // Definitions for Set Discovered command // -#define IPMI_BRIDGE_SET_DISCOVERED 0x12 +#define IPMI_BRIDGE_SET_DISCOVERED 0x12 // // Constants and Structure definitions for "Set Discovered" command to follow here @@ -156,7 +156,7 @@ // // Definitions for Get Chassis Device ID command // -#define IPMI_BRIDGE_GET_CHASSIS_DEVICEID 0x13 +#define IPMI_BRIDGE_GET_CHASSIS_DEVICEID 0x13 // // Constants and Structure definitions for "Get Chassis Device ID" command to follow here @@ -165,7 +165,7 @@ // // Definitions for Set Chassis Device ID command // -#define IPMI_BRIDGE_SET_CHASSIS_DEVICEID 0x14 +#define IPMI_BRIDGE_SET_CHASSIS_DEVICEID 0x14 // // Constants and Structure definitions for "Set Chassis Device ID" command to follow here diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h b/MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h index d7cdd3a..e3b8a62 100644 --- a/MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h +++ b/MdePkg/Include/IndustryStandard/IpmiNetFnChassis.h @@ -33,13 +33,13 @@ // Constants and Structure definitions for "Get Chassis Capabilities" command to follow here // typedef struct { - UINT8 CompletionCode; - UINT8 CapabilitiesFlags; - UINT8 ChassisFruInfoDeviceAddress; - UINT8 ChassisSDRDeviceAddress; - UINT8 ChassisSELDeviceAddress; - UINT8 ChassisSystemManagementDeviceAddress; - UINT8 ChassisBridgeDeviceAddress; + UINT8 CompletionCode; + UINT8 CapabilitiesFlags; + UINT8 ChassisFruInfoDeviceAddress; + UINT8 ChassisSDRDeviceAddress; + UINT8 ChassisSELDeviceAddress; + UINT8 ChassisSystemManagementDeviceAddress; + UINT8 ChassisBridgeDeviceAddress; } IPMI_GET_CHASSIS_CAPABILITIES_RESPONSE; // @@ -51,37 +51,37 @@ typedef struct { // Constants and Structure definitions for "Get Chassis Status" command to follow here // typedef struct { - UINT8 CompletionCode; - UINT8 CurrentPowerState; - UINT8 LastPowerEvent; - UINT8 MiscChassisState; - UINT8 FrontPanelButtonCapabilities; + UINT8 CompletionCode; + UINT8 CurrentPowerState; + UINT8 LastPowerEvent; + UINT8 MiscChassisState; + UINT8 FrontPanelButtonCapabilities; } IPMI_GET_CHASSIS_STATUS_RESPONSE; // // Definitions for Chassis Control command // -#define IPMI_CHASSIS_CONTROL 0x02 +#define IPMI_CHASSIS_CONTROL 0x02 // // Constants and Structure definitions for "Chassis Control" command to follow here // typedef union { struct { - UINT8 ChassisControl:4; - UINT8 Reserved:4; + UINT8 ChassisControl : 4; + UINT8 Reserved : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_CHASSIS_CONTROL_CHASSIS_CONTROL; typedef struct { - IPMI_CHASSIS_CONTROL_CHASSIS_CONTROL ChassisControl; + IPMI_CHASSIS_CONTROL_CHASSIS_CONTROL ChassisControl; } IPMI_CHASSIS_CONTROL_REQUEST; // // Definitions for Chassis Reset command // -#define IPMI_CHASSIS_RESET 0x03 +#define IPMI_CHASSIS_RESET 0x03 // // Constants and Structure definitions for "Chassis Reset" command to follow here @@ -115,19 +115,19 @@ typedef struct { // typedef union { struct { - UINT8 PowerRestorePolicy : 3; - UINT8 Reserved : 5; + UINT8 PowerRestorePolicy : 3; + UINT8 Reserved : 5; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_POWER_RESTORE_POLICY; typedef struct { - IPMI_POWER_RESTORE_POLICY PowerRestorePolicy; + IPMI_POWER_RESTORE_POLICY PowerRestorePolicy; } IPMI_SET_POWER_RESTORE_POLICY_REQUEST; typedef struct { - UINT8 CompletionCode; - UINT8 PowerRestorePolicySupport; + UINT8 CompletionCode; + UINT8 PowerRestorePolicySupport; } IPMI_SET_POWER_RESTORE_POLICY_RESPONSE; // @@ -153,82 +153,82 @@ typedef struct { typedef union { struct { - UINT8 Cause:4; - UINT8 Reserved:4; + UINT8 Cause : 4; + UINT8 Reserved : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_SYSTEM_RESTART_CAUSE; typedef struct { - UINT8 CompletionCode; - IPMI_SYSTEM_RESTART_CAUSE RestartCause; - UINT8 ChannelNumber; + UINT8 CompletionCode; + IPMI_SYSTEM_RESTART_CAUSE RestartCause; + UINT8 ChannelNumber; } IPMI_GET_SYSTEM_RESTART_CAUSE_RESPONSE; // // Definitions for Set System BOOT options command // -#define IPMI_CHASSIS_SET_SYSTEM_BOOT_OPTIONS 0x08 +#define IPMI_CHASSIS_SET_SYSTEM_BOOT_OPTIONS 0x08 // // Constants and Structure definitions for "Set System boot options" command to follow here // typedef union { struct { - UINT8 ParameterSelector:7; - UINT8 MarkParameterInvalid:1; + UINT8 ParameterSelector : 7; + UINT8 MarkParameterInvalid : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_SET_BOOT_OPTIONS_PARAMETER_VALID; typedef struct { - IPMI_SET_BOOT_OPTIONS_PARAMETER_VALID ParameterValid; - UINT8 ParameterData[0]; + IPMI_SET_BOOT_OPTIONS_PARAMETER_VALID ParameterValid; + UINT8 ParameterData[0]; } IPMI_SET_BOOT_OPTIONS_REQUEST; typedef struct { - UINT8 CompletionCode:8; + UINT8 CompletionCode : 8; } IPMI_SET_BOOT_OPTIONS_RESPONSE; // // Definitions for Get System Boot options command // -#define IPMI_CHASSIS_GET_SYSTEM_BOOT_OPTIONS 0x09 +#define IPMI_CHASSIS_GET_SYSTEM_BOOT_OPTIONS 0x09 // // Constants and Structure definitions for "Get System boot options" command to follow here // typedef union { struct { - UINT8 ParameterSelector:7; - UINT8 Reserved:1; + UINT8 ParameterSelector : 7; + UINT8 Reserved : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_GET_BOOT_OPTIONS_PARAMETER_SELECTOR; typedef struct { - IPMI_GET_BOOT_OPTIONS_PARAMETER_SELECTOR ParameterSelector; - UINT8 SetSelector; - UINT8 BlockSelector; + IPMI_GET_BOOT_OPTIONS_PARAMETER_SELECTOR ParameterSelector; + UINT8 SetSelector; + UINT8 BlockSelector; } IPMI_GET_BOOT_OPTIONS_REQUEST; typedef struct { - UINT8 Parameter; - UINT8 Valid; - UINT8 Data1; - UINT8 Data2; - UINT8 Data3; - UINT8 Data4; - UINT8 Data5; + UINT8 Parameter; + UINT8 Valid; + UINT8 Data1; + UINT8 Data2; + UINT8 Data3; + UINT8 Data4; + UINT8 Data5; } IPMI_GET_THE_SYSTEM_BOOT_OPTIONS; typedef struct { - UINT8 ParameterVersion; - UINT8 ParameterValid; - UINT8 ChannelNumber; - UINT32 SessionId; - UINT32 TimeStamp; - UINT8 Reserved[3]; + UINT8 ParameterVersion; + UINT8 ParameterValid; + UINT8 ChannelNumber; + UINT32 SessionId; + UINT32 TimeStamp; + UINT8 Reserved[3]; } IPMI_BOOT_INITIATOR; // @@ -250,36 +250,36 @@ typedef struct { // typedef union { struct { - UINT8 SetInProgress : 2; - UINT8 Reserved : 6; + UINT8 SetInProgress : 2; + UINT8 Reserved : 6; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_0; typedef struct { - UINT8 ServicePartitionSelector; + UINT8 ServicePartitionSelector; } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_1; typedef union { struct { - UINT8 ServicePartitionDiscovered : 1; - UINT8 ServicePartitionScanRequest : 1; - UINT8 Reserved: 6; + UINT8 ServicePartitionDiscovered : 1; + UINT8 ServicePartitionScanRequest : 1; + UINT8 Reserved : 6; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_2; typedef union { struct { - UINT8 BmcBootFlagValid : 5; - UINT8 Reserved : 3; + UINT8 BmcBootFlagValid : 5; + UINT8 Reserved : 3; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_3; typedef struct { - UINT8 WriteMask; - UINT8 BootInitiatorAcknowledgeData; + UINT8 WriteMask; + UINT8 BootInitiatorAcknowledgeData; } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_4; // @@ -298,153 +298,153 @@ typedef struct { #define IPMI_BOOT_DEVICE_SELECTOR_REMOTE_HARDDRIVE 0xB #define IPMI_BOOT_DEVICE_SELECTOR_FLOPPY 0xF -#define BOOT_OPTION_HANDLED_BY_BIOS 0x01 +#define BOOT_OPTION_HANDLED_BY_BIOS 0x01 // // Constant definitions for the 'BIOS Mux Control Override' field of Boot Option Parameters #5 // -#define BIOS_MUX_CONTROL_OVERRIDE_RECOMMEND_SETTING 0x00 -#define BIOS_MUX_CONTROL_OVERRIDE_FORCE_TO_BMC 0x01 -#define BIOS_MUX_CONTROL_OVERRIDE_FORCE_TO_SYSTEM 0x02 +#define BIOS_MUX_CONTROL_OVERRIDE_RECOMMEND_SETTING 0x00 +#define BIOS_MUX_CONTROL_OVERRIDE_FORCE_TO_BMC 0x01 +#define BIOS_MUX_CONTROL_OVERRIDE_FORCE_TO_SYSTEM 0x02 typedef union { struct { - UINT8 Reserved:5; - UINT8 BiosBootType:1; - UINT8 PersistentOptions:1; - UINT8 BootFlagValid:1; + UINT8 Reserved : 5; + UINT8 BiosBootType : 1; + UINT8 PersistentOptions : 1; + UINT8 BootFlagValid : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_1; typedef union { struct { - UINT8 LockReset:1; - UINT8 ScreenBlank:1; - UINT8 BootDeviceSelector:4; - UINT8 LockKeyboard:1; - UINT8 CmosClear:1; + UINT8 LockReset : 1; + UINT8 ScreenBlank : 1; + UINT8 BootDeviceSelector : 4; + UINT8 LockKeyboard : 1; + UINT8 CmosClear : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_2; typedef union { struct { - UINT8 ConsoleRedirection:2; - UINT8 LockSleep:1; - UINT8 UserPasswordBypass:1; - UINT8 ForceProgressEventTrap:1; - UINT8 BiosVerbosity:2; - UINT8 LockPower:1; + UINT8 ConsoleRedirection : 2; + UINT8 LockSleep : 1; + UINT8 UserPasswordBypass : 1; + UINT8 ForceProgressEventTrap : 1; + UINT8 BiosVerbosity : 2; + UINT8 LockPower : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_3; typedef union { struct { - UINT8 BiosMuxControlOverride:3; - UINT8 BiosSharedModeOverride:1; - UINT8 Reserved:4; + UINT8 BiosMuxControlOverride : 3; + UINT8 BiosSharedModeOverride : 1; + UINT8 Reserved : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_4; typedef union { struct { - UINT8 DeviceInstanceSelector:5; - UINT8 Reserved:3; + UINT8 DeviceInstanceSelector : 5; + UINT8 Reserved : 3; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_5; typedef struct { - IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_1 Data1; - IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_2 Data2; - IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_3 Data3; - IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_4 Data4; - IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_5 Data5; + IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_1 Data1; + IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_2 Data2; + IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_3 Data3; + IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_4 Data4; + IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5_DATA_5 Data5; } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5; typedef union { struct { - UINT8 ChannelNumber:4; - UINT8 Reserved:4; + UINT8 ChannelNumber : 4; + UINT8 Reserved : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_BOOT_OPTIONS_CHANNEL_NUMBER; typedef struct { - IPMI_BOOT_OPTIONS_CHANNEL_NUMBER ChannelNumber; - UINT8 SessionId[4]; - UINT8 BootInfoTimeStamp[4]; + IPMI_BOOT_OPTIONS_CHANNEL_NUMBER ChannelNumber; + UINT8 SessionId[4]; + UINT8 BootInfoTimeStamp[4]; } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_6; typedef struct { - UINT8 SetSelector; - UINT8 BlockData[16]; + UINT8 SetSelector; + UINT8 BlockData[16]; } IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_7; typedef union { - IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_0 Parm0; - IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_1 Parm1; - IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_2 Parm2; - IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_3 Parm3; - IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_4 Parm4; - IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5 Parm5; - IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_6 Parm6; - IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_7 Parm7; + IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_0 Parm0; + IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_1 Parm1; + IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_2 Parm2; + IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_3 Parm3; + IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_4 Parm4; + IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_5 Parm5; + IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_6 Parm6; + IPMI_BOOT_OPTIONS_RESPONSE_PARAMETER_7 Parm7; } IPMI_BOOT_OPTIONS_PARAMETERS; typedef union { struct { - UINT8 ParameterVersion:4; - UINT8 Reserved:4; + UINT8 ParameterVersion : 4; + UINT8 Reserved : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_GET_BOOT_OPTIONS_PARAMETER_VERSION; typedef union { struct { - UINT8 ParameterSelector:7; - UINT8 ParameterValid:1; + UINT8 ParameterSelector : 7; + UINT8 ParameterValid : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_GET_BOOT_OPTIONS_PARAMETER_VALID; typedef struct { - UINT8 CompletionCode; - IPMI_GET_BOOT_OPTIONS_PARAMETER_VERSION ParameterVersion; - IPMI_GET_BOOT_OPTIONS_PARAMETER_VALID ParameterValid; - UINT8 ParameterData[0]; + UINT8 CompletionCode; + IPMI_GET_BOOT_OPTIONS_PARAMETER_VERSION ParameterVersion; + IPMI_GET_BOOT_OPTIONS_PARAMETER_VALID ParameterValid; + UINT8 ParameterData[0]; } IPMI_GET_BOOT_OPTIONS_RESPONSE; // // Definitions for Set front panel button enables command // -#define IPMI_CHASSIS_SET_FRONT_PANEL_BUTTON_ENABLES 0x0A +#define IPMI_CHASSIS_SET_FRONT_PANEL_BUTTON_ENABLES 0x0A // // Constants and Structure definitions for "Set front panel button enables" command to follow here // typedef union { struct { - UINT8 DisablePoweroffButton:1; - UINT8 DisableResetButton:1; - UINT8 DisableDiagnosticInterruptButton:1; - UINT8 DisableStandbyButton:1; - UINT8 Reserved:4; + UINT8 DisablePoweroffButton : 1; + UINT8 DisableResetButton : 1; + UINT8 DisableDiagnosticInterruptButton : 1; + UINT8 DisableStandbyButton : 1; + UINT8 Reserved : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_FRONT_PANEL_BUTTON_ENABLES; typedef struct { - IPMI_FRONT_PANEL_BUTTON_ENABLES FrontPanelButtonEnables; + IPMI_FRONT_PANEL_BUTTON_ENABLES FrontPanelButtonEnables; } IPMI_CHASSIS_SET_FRONT_PANEL_BUTTON_ENABLES_REQUEST; // // Definitions for Set Power Cycle Interval command // -#define IPMI_CHASSIS_SET_POWER_CYCLE_INTERVALS 0x0B +#define IPMI_CHASSIS_SET_POWER_CYCLE_INTERVALS 0x0B // // Constants and Structure definitions for "Set Power Cycle Interval" command to follow here @@ -453,7 +453,7 @@ typedef struct { // // Definitions for Get POH Counter command // -#define IPMI_CHASSIS_GET_POH_COUNTER 0x0F +#define IPMI_CHASSIS_GET_POH_COUNTER 0x0F // // Constants and Structure definitions for "Get POH Counter" command to follow here diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnFirmware.h b/MdePkg/Include/IndustryStandard/IpmiNetFnFirmware.h index c4cbe23..6de27b2 100644 --- a/MdePkg/Include/IndustryStandard/IpmiNetFnFirmware.h +++ b/MdePkg/Include/IndustryStandard/IpmiNetFnFirmware.h @@ -11,7 +11,7 @@ // // Net function definition for Firmware command // -#define IPMI_NETFN_FIRMWARE 0x08 +#define IPMI_NETFN_FIRMWARE 0x08 // // All Firmware commands and their structure definitions to follow here @@ -26,8 +26,8 @@ // Constants and Structure definitions for "Get Device ID" command to follow here // typedef struct { - UINT8 CurrentExecutionContext; - UINT8 PartitionPointer; + UINT8 CurrentExecutionContext; + UINT8 PartitionPointer; } IPMI_MSG_GET_BMC_EXEC_RSP; // diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnSensorEvent.h b/MdePkg/Include/IndustryStandard/IpmiNetFnSensorEvent.h index 7290b26..b929584 100644 --- a/MdePkg/Include/IndustryStandard/IpmiNetFnSensorEvent.h +++ b/MdePkg/Include/IndustryStandard/IpmiNetFnSensorEvent.h @@ -20,7 +20,7 @@ // // Net function definition for Sensor command // -#define IPMI_NETFN_SENSOR_EVENT 0x04 +#define IPMI_NETFN_SENSOR_EVENT 0x04 // // All Sensor commands and their structure definitions to follow here @@ -29,17 +29,17 @@ // // Definitions for Send Platform Event Message command // -#define IPMI_SENSOR_PLATFORM_EVENT_MESSAGE 0x02 +#define IPMI_SENSOR_PLATFORM_EVENT_MESSAGE 0x02 typedef struct { - UINT8 GeneratorId; - UINT8 EvMRevision; - UINT8 SensorType; - UINT8 SensorNumber; - UINT8 EventDirType; - UINT8 OEMEvData1; - UINT8 OEMEvData2; - UINT8 OEMEvData3; + UINT8 GeneratorId; + UINT8 EvMRevision; + UINT8 SensorType; + UINT8 SensorNumber; + UINT8 EventDirType; + UINT8 OEMEvData1; + UINT8 OEMEvData2; + UINT8 OEMEvData3; } IPMI_PLATFORM_EVENT_MESSAGE_DATA_REQUEST; #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnStorage.h b/MdePkg/Include/IndustryStandard/IpmiNetFnStorage.h index 655fd23..553a69a 100644 --- a/MdePkg/Include/IndustryStandard/IpmiNetFnStorage.h +++ b/MdePkg/Include/IndustryStandard/IpmiNetFnStorage.h @@ -40,43 +40,43 @@ // Constants and Structure definitions for "Get Fru Inventory Area Info" command to follow here // typedef struct { - UINT8 DeviceId; + UINT8 DeviceId; } IPMI_GET_FRU_INVENTORY_AREA_INFO_REQUEST; typedef struct { - UINT8 CompletionCode; - UINT16 InventoryAreaSize; - UINT8 AccessType; + UINT8 CompletionCode; + UINT16 InventoryAreaSize; + UINT8 AccessType; } IPMI_GET_FRU_INVENTORY_AREA_INFO_RESPONSE; // // Definitions for Read Fru Data command // -#define IPMI_STORAGE_READ_FRU_DATA 0x11 +#define IPMI_STORAGE_READ_FRU_DATA 0x11 // // Constants and Structure definitions for "Read Fru Data" command to follow here // typedef struct { - UINT8 FruDeviceId; - UINT16 FruOffset; + UINT8 FruDeviceId; + UINT16 FruOffset; } IPMI_FRU_COMMON_DATA; typedef struct { - IPMI_FRU_COMMON_DATA Data; - UINT8 Count; + IPMI_FRU_COMMON_DATA Data; + UINT8 Count; } IPMI_FRU_READ_COMMAND; typedef struct { - UINT8 DeviceId; - UINT16 InventoryOffset; - UINT8 CountToRead; + UINT8 DeviceId; + UINT16 InventoryOffset; + UINT8 CountToRead; } IPMI_READ_FRU_DATA_REQUEST; typedef struct { - UINT8 CompletionCode; - UINT8 CountReturned; - UINT8 Data[0]; + UINT8 CompletionCode; + UINT8 CountReturned; + UINT8 Data[0]; } IPMI_READ_FRU_DATA_RESPONSE; // @@ -88,19 +88,19 @@ typedef struct { // Constants and Structure definitions for "Write Fru Data" command to follow here // typedef struct { - IPMI_FRU_COMMON_DATA Data; - UINT8 FruData[16]; + IPMI_FRU_COMMON_DATA Data; + UINT8 FruData[16]; } IPMI_FRU_WRITE_COMMAND; typedef struct { - UINT8 DeviceId; - UINT16 InventoryOffset; - UINT8 Data[0]; + UINT8 DeviceId; + UINT16 InventoryOffset; + UINT8 Data[0]; } IPMI_WRITE_FRU_DATA_REQUEST; typedef struct { - UINT8 CompletionCode; - UINT8 CountWritten; + UINT8 CompletionCode; + UINT8 CountWritten; } IPMI_WRITE_FRU_DATA_RESPONSE; // @@ -110,32 +110,32 @@ typedef struct { // // Definitions for Get SDR Repository Info command // -#define IPMI_STORAGE_GET_SDR_REPOSITORY_INFO 0x20 +#define IPMI_STORAGE_GET_SDR_REPOSITORY_INFO 0x20 // // Constants and Structure definitions for "Get SDR Repository Info" command to follow here // typedef union { struct { - UINT8 SdrRepAllocInfoCmd : 1; - UINT8 SdrRepReserveCmd : 1; - UINT8 PartialAddSdrCmd : 1; - UINT8 DeleteSdrRepCmd : 1; - UINT8 Reserved : 1; - UINT8 SdrRepUpdateOp : 2; - UINT8 Overflow : 1; + UINT8 SdrRepAllocInfoCmd : 1; + UINT8 SdrRepReserveCmd : 1; + UINT8 PartialAddSdrCmd : 1; + UINT8 DeleteSdrRepCmd : 1; + UINT8 Reserved : 1; + UINT8 SdrRepUpdateOp : 2; + UINT8 Overflow : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_SDR_OPERATION_SUPPORT; typedef struct { - UINT8 CompletionCode; - UINT8 Version; - UINT16 RecordCount; - UINT16 FreeSpace; - UINT32 RecentAdditionTimeStamp; - UINT32 RecentEraseTimeStamp; - IPMI_SDR_OPERATION_SUPPORT OperationSupport; + UINT8 CompletionCode; + UINT8 Version; + UINT16 RecordCount; + UINT16 FreeSpace; + UINT32 RecentAdditionTimeStamp; + UINT32 RecentEraseTimeStamp; + IPMI_SDR_OPERATION_SUPPORT OperationSupport; } IPMI_GET_SDR_REPOSITORY_INFO_RESPONSE; // @@ -156,222 +156,222 @@ typedef struct { // Constants and Structure definitions for "Reserve SDR Repository" command to follow here // typedef struct { - UINT8 CompletionCode; - UINT8 ReservationId[2]; // Reservation ID. LS byte first. + UINT8 CompletionCode; + UINT8 ReservationId[2]; // Reservation ID. LS byte first. } IPMI_RESERVE_SDR_REPOSITORY_RESPONSE; // // Definitions for Get SDR command // -#define IPMI_STORAGE_GET_SDR 0x23 +#define IPMI_STORAGE_GET_SDR 0x23 // // Constants and Structure definitions for "Get SDR" command to follow here // typedef union { struct { - UINT8 EventScanningEnabled : 1; - UINT8 EventScanningDisabled : 1; - UINT8 InitSensorType : 1; - UINT8 InitHysteresis : 1; - UINT8 InitThresholds : 1; - UINT8 InitEvent : 1; - UINT8 InitScanning : 1; - UINT8 SettableSensor : 1; + UINT8 EventScanningEnabled : 1; + UINT8 EventScanningDisabled : 1; + UINT8 InitSensorType : 1; + UINT8 InitHysteresis : 1; + UINT8 InitThresholds : 1; + UINT8 InitEvent : 1; + UINT8 InitScanning : 1; + UINT8 SettableSensor : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_SDR_RECORD_SENSOR_INIT; typedef union { struct { - UINT8 EventMessageControl : 2; - UINT8 ThresholdAccessSupport : 2; - UINT8 HysteresisSupport : 2; - UINT8 ReArmSupport : 1; - UINT8 IgnoreSensor : 1; + UINT8 EventMessageControl : 2; + UINT8 ThresholdAccessSupport : 2; + UINT8 HysteresisSupport : 2; + UINT8 ReArmSupport : 1; + UINT8 IgnoreSensor : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_SDR_RECORD_SENSOR_CAP; typedef union { struct { - UINT8 Linearization : 7; - UINT8 Reserved : 1; + UINT8 Linearization : 7; + UINT8 Reserved : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_SDR_RECORD_LINEARIZATION; typedef union { struct { - UINT8 Toleremce : 6; - UINT8 MHi : 2; + UINT8 Toleremce : 6; + UINT8 MHi : 2; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_SDR_RECORD_M_TOLERANCE; typedef union { struct { - UINT8 AccuracyLow : 6; - UINT8 BHi : 2; + UINT8 AccuracyLow : 6; + UINT8 BHi : 2; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_SDR_RECORD_B_ACCURACY; typedef union { struct { - UINT8 Reserved : 2; - UINT8 AccuracyExp : 2; - UINT8 AccuracyHi : 4; + UINT8 Reserved : 2; + UINT8 AccuracyExp : 2; + UINT8 AccuracyHi : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_SDR_RECORD_ACCURACY_SENSOR_DIR; typedef union { struct { - UINT8 BExp : 4; - UINT8 RExp : 4; + UINT8 BExp : 4; + UINT8 RExp : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_SDR_RECORD_R_EXP_B_EXP; typedef union { struct { - UINT8 NominalReadingSpscified : 1; - UINT8 NominalMaxSpscified : 1; - UINT8 NominalMinSpscified : 1; - UINT8 Reserved : 5; + UINT8 NominalReadingSpscified : 1; + UINT8 NominalMaxSpscified : 1; + UINT8 NominalMinSpscified : 1; + UINT8 Reserved : 5; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_SDR_RECORD_ANALOG_FLAGS; typedef struct { - UINT16 RecordId; // 1 - UINT8 Version; // 3 - UINT8 RecordType; // 4 - UINT8 RecordLength; // 5 - UINT8 OwnerId; // 6 - UINT8 OwnerLun; // 7 - UINT8 SensorNumber; // 8 - UINT8 EntityId; // 9 - UINT8 EntityInstance; // 10 - IPMI_SDR_RECORD_SENSOR_INIT SensorInitialization; // 11 - IPMI_SDR_RECORD_SENSOR_CAP SensorCapabilities; // 12 - UINT8 SensorType; // 13 - UINT8 EventType; // 14 - UINT8 Reserved1[7]; // 15 - UINT8 UnitType; // 22 - UINT8 Reserved2; // 23 - IPMI_SDR_RECORD_LINEARIZATION Linearization; // 24 - UINT8 MLo; // 25 - IPMI_SDR_RECORD_M_TOLERANCE MHiTolerance; // 26 - UINT8 BLo; // 27 - IPMI_SDR_RECORD_B_ACCURACY BHiAccuracyLo; // 28 - IPMI_SDR_RECORD_ACCURACY_SENSOR_DIR AccuracySensorDirection; // 29 - IPMI_SDR_RECORD_R_EXP_B_EXP RExpBExp; // 30 - IPMI_SDR_RECORD_ANALOG_FLAGS AnalogFlags; // 31 - UINT8 NominalReading; // 32 - UINT8 Reserved3[4]; // 33 - UINT8 UpperNonRecoverThreshold; // 37 - UINT8 UpperCriticalThreshold; // 38 - UINT8 UpperNonCriticalThreshold; // 39 - UINT8 LowerNonRecoverThreshold; // 40 - UINT8 LowerCriticalThreshold; // 41 - UINT8 LowerNonCriticalThreshold; // 42 - UINT8 Reserved4[5]; // 43 - UINT8 IdStringLength; // 48 - UINT8 AsciiIdString[16]; // 49 - 64 + UINT16 RecordId; // 1 + UINT8 Version; // 3 + UINT8 RecordType; // 4 + UINT8 RecordLength; // 5 + UINT8 OwnerId; // 6 + UINT8 OwnerLun; // 7 + UINT8 SensorNumber; // 8 + UINT8 EntityId; // 9 + UINT8 EntityInstance; // 10 + IPMI_SDR_RECORD_SENSOR_INIT SensorInitialization; // 11 + IPMI_SDR_RECORD_SENSOR_CAP SensorCapabilities; // 12 + UINT8 SensorType; // 13 + UINT8 EventType; // 14 + UINT8 Reserved1[7]; // 15 + UINT8 UnitType; // 22 + UINT8 Reserved2; // 23 + IPMI_SDR_RECORD_LINEARIZATION Linearization; // 24 + UINT8 MLo; // 25 + IPMI_SDR_RECORD_M_TOLERANCE MHiTolerance; // 26 + UINT8 BLo; // 27 + IPMI_SDR_RECORD_B_ACCURACY BHiAccuracyLo; // 28 + IPMI_SDR_RECORD_ACCURACY_SENSOR_DIR AccuracySensorDirection; // 29 + IPMI_SDR_RECORD_R_EXP_B_EXP RExpBExp; // 30 + IPMI_SDR_RECORD_ANALOG_FLAGS AnalogFlags; // 31 + UINT8 NominalReading; // 32 + UINT8 Reserved3[4]; // 33 + UINT8 UpperNonRecoverThreshold; // 37 + UINT8 UpperCriticalThreshold; // 38 + UINT8 UpperNonCriticalThreshold; // 39 + UINT8 LowerNonRecoverThreshold; // 40 + UINT8 LowerCriticalThreshold; // 41 + UINT8 LowerNonCriticalThreshold; // 42 + UINT8 Reserved4[5]; // 43 + UINT8 IdStringLength; // 48 + UINT8 AsciiIdString[16]; // 49 - 64 } IPMI_SDR_RECORD_STRUCT_1; typedef struct { - UINT16 RecordId; // 1 - UINT8 Version; // 3 - UINT8 RecordType; // 4 - UINT8 RecordLength; // 5 - UINT8 OwnerId; // 6 - UINT8 OwnerLun; // 7 - UINT8 SensorNumber; // 8 - UINT8 EntityId; // 9 - UINT8 EntityInstance; // 10 - IPMI_SDR_RECORD_SENSOR_INIT SensorInitialization; // 11 - IPMI_SDR_RECORD_SENSOR_CAP SensorCapabilities; // 12 - UINT8 SensorType; // 13 - UINT8 EventType; // 14 - UINT8 Reserved1[7]; // 15 - UINT8 UnitType; // 22 - UINT8 Reserved2[9]; // 23 - UINT8 IdStringLength; // 32 - UINT8 AsciiIdString[16]; // 33 - 48 + UINT16 RecordId; // 1 + UINT8 Version; // 3 + UINT8 RecordType; // 4 + UINT8 RecordLength; // 5 + UINT8 OwnerId; // 6 + UINT8 OwnerLun; // 7 + UINT8 SensorNumber; // 8 + UINT8 EntityId; // 9 + UINT8 EntityInstance; // 10 + IPMI_SDR_RECORD_SENSOR_INIT SensorInitialization; // 11 + IPMI_SDR_RECORD_SENSOR_CAP SensorCapabilities; // 12 + UINT8 SensorType; // 13 + UINT8 EventType; // 14 + UINT8 Reserved1[7]; // 15 + UINT8 UnitType; // 22 + UINT8 Reserved2[9]; // 23 + UINT8 IdStringLength; // 32 + UINT8 AsciiIdString[16]; // 33 - 48 } IPMI_SDR_RECORD_STRUCT_2; typedef union { struct { - UINT8 Reserved1 : 1; - UINT8 ControllerSlaveAddress : 7; - UINT8 FruDeviceId; - UINT8 BusId : 3; - UINT8 Lun : 2; - UINT8 Reserved2 : 2; - UINT8 LogicalFruDevice : 1; - UINT8 Reserved3 : 4; - UINT8 ChannelNumber : 4; + UINT8 Reserved1 : 1; + UINT8 ControllerSlaveAddress : 7; + UINT8 FruDeviceId; + UINT8 BusId : 3; + UINT8 Lun : 2; + UINT8 Reserved2 : 2; + UINT8 LogicalFruDevice : 1; + UINT8 Reserved3 : 4; + UINT8 ChannelNumber : 4; } Bits; - UINT32 Uint32; + UINT32 Uint32; } IPMI_FRU_DATA_INFO; typedef union { struct { - UINT8 Length : 4; - UINT8 Reserved : 1; - UINT8 StringType : 3; + UINT8 Length : 4; + UINT8 Reserved : 1; + UINT8 StringType : 3; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_SDR_RECORD_DEV_ID_STR_TYPE_LENGTH; typedef struct { - UINT16 RecordId; // 1 - UINT8 Version; // 3 - UINT8 RecordType; // 4 - UINT8 RecordLength; // 5 - IPMI_FRU_DATA_INFO FruDeviceData; // 6 - UINT8 Reserved; // 10 - UINT8 DeviceType; // 11 - UINT8 DeviceTypeModifier; // 12 - UINT8 FruEntityId; // 13 - UINT8 FruEntityInstance; // 14 - UINT8 OemReserved; // 15 - IPMI_SDR_RECORD_DEV_ID_STR_TYPE_LENGTH StringTypeLength; // 16 - UINT8 String[16]; // 17 + UINT16 RecordId; // 1 + UINT8 Version; // 3 + UINT8 RecordType; // 4 + UINT8 RecordLength; // 5 + IPMI_FRU_DATA_INFO FruDeviceData; // 6 + UINT8 Reserved; // 10 + UINT8 DeviceType; // 11 + UINT8 DeviceTypeModifier; // 12 + UINT8 FruEntityId; // 13 + UINT8 FruEntityInstance; // 14 + UINT8 OemReserved; // 15 + IPMI_SDR_RECORD_DEV_ID_STR_TYPE_LENGTH StringTypeLength; // 16 + UINT8 String[16]; // 17 } IPMI_SDR_RECORD_STRUCT_11; typedef struct { - UINT16 RecordId; //1 - UINT8 Version; //3 - UINT8 RecordType; //4 - UINT8 RecordLength; //5 - UINT8 ManufacturerId[3]; //6 - UINT8 StringChars[20]; + UINT16 RecordId; // 1 + UINT8 Version; // 3 + UINT8 RecordType; // 4 + UINT8 RecordLength; // 5 + UINT8 ManufacturerId[3]; // 6 + UINT8 StringChars[20]; } IPMI_SDR_RECORD_STRUCT_C0; typedef struct { - UINT16 RecordId; //1 - UINT8 Version; //3 - UINT8 RecordType; //4 - UINT8 RecordLength; //5 + UINT16 RecordId; // 1 + UINT8 Version; // 3 + UINT8 RecordType; // 4 + UINT8 RecordLength; // 5 } IPMI_SDR_RECORD_STRUCT_HEADER; typedef union { - IPMI_SDR_RECORD_STRUCT_1 SensorType1; - IPMI_SDR_RECORD_STRUCT_2 SensorType2; - IPMI_SDR_RECORD_STRUCT_11 SensorType11; - IPMI_SDR_RECORD_STRUCT_C0 SensorTypeC0; - IPMI_SDR_RECORD_STRUCT_HEADER SensorHeader; + IPMI_SDR_RECORD_STRUCT_1 SensorType1; + IPMI_SDR_RECORD_STRUCT_2 SensorType2; + IPMI_SDR_RECORD_STRUCT_11 SensorType11; + IPMI_SDR_RECORD_STRUCT_C0 SensorTypeC0; + IPMI_SDR_RECORD_STRUCT_HEADER SensorHeader; } IPMI_SENSOR_RECORD_STRUCT; typedef struct { - UINT16 ReservationId; - UINT16 RecordId; - UINT8 RecordOffset; - UINT8 BytesToRead; + UINT16 ReservationId; + UINT16 RecordId; + UINT8 RecordOffset; + UINT8 BytesToRead; } IPMI_GET_SDR_REQUEST; typedef struct { @@ -383,7 +383,7 @@ typedef struct { // // Definitions for Add SDR command // -#define IPMI_STORAGE_ADD_SDR 0x24 +#define IPMI_STORAGE_ADD_SDR 0x24 // // Constants and Structure definitions for "Add SDR" command to follow here @@ -392,7 +392,7 @@ typedef struct { // // Definitions for Partial Add SDR command // -#define IPMI_STORAGE_PARTIAL_ADD_SDR 0x25 +#define IPMI_STORAGE_PARTIAL_ADD_SDR 0x25 // // Constants and Structure definitions for "Partial Add SDR" command to follow here @@ -410,7 +410,7 @@ typedef struct { // // Definitions for Clear SDR Repository command // -#define IPMI_STORAGE_CLEAR_SDR 0x27 +#define IPMI_STORAGE_CLEAR_SDR 0x27 // // Constants and Structure definitions for "Clear SDR Repository" command to follow here @@ -419,7 +419,7 @@ typedef struct { // // Definitions for Get SDR Repository Time command // -#define IPMI_STORAGE_GET_SDR_REPOSITORY_TIME 0x28 +#define IPMI_STORAGE_GET_SDR_REPOSITORY_TIME 0x28 // // Constants and Structure definitions for "Get SDR Repository Time" command to follow here @@ -428,7 +428,7 @@ typedef struct { // // Definitions for Set SDR Repository Time command // -#define IPMI_STORAGE_SET_SDR_REPOSITORY_TIME 0x29 +#define IPMI_STORAGE_SET_SDR_REPOSITORY_TIME 0x29 // // Constants and Structure definitions for "Set SDR Repository Time" command to follow here @@ -437,7 +437,7 @@ typedef struct { // // Definitions for Enter SDR Repository Update Mode command // -#define IPMI_STORAGE_ENTER_SDR_UPDATE_MODE 0x2A +#define IPMI_STORAGE_ENTER_SDR_UPDATE_MODE 0x2A // // Constants and Structure definitions for "Enter SDR Repository Update Mode" command to follow here @@ -473,26 +473,26 @@ typedef struct { // // Constants and Structure definitions for "Get SEL Info" command to follow here // -#define IPMI_GET_SEL_INFO_OPERATION_SUPPORT_GET_SEL_ALLOCATION_INFO_CMD BIT0 -#define IPMI_GET_SEL_INFO_OPERATION_SUPPORT_RESERVE_SEL_CMD BIT1 -#define IPMI_GET_SEL_INFO_OPERATION_SUPPORT_PARTIAL_ADD_SEL_ENTRY_CMD BIT2 -#define IPMI_GET_SEL_INFO_OPERATION_SUPPORT_DELETE_SEL_CMD BIT3 -#define IPMI_GET_SEL_INFO_OPERATION_SUPPORT_OVERFLOW_FLAG BIT7 +#define IPMI_GET_SEL_INFO_OPERATION_SUPPORT_GET_SEL_ALLOCATION_INFO_CMD BIT0 +#define IPMI_GET_SEL_INFO_OPERATION_SUPPORT_RESERVE_SEL_CMD BIT1 +#define IPMI_GET_SEL_INFO_OPERATION_SUPPORT_PARTIAL_ADD_SEL_ENTRY_CMD BIT2 +#define IPMI_GET_SEL_INFO_OPERATION_SUPPORT_DELETE_SEL_CMD BIT3 +#define IPMI_GET_SEL_INFO_OPERATION_SUPPORT_OVERFLOW_FLAG BIT7 typedef struct { - UINT8 CompletionCode; - UINT8 Version; // Version of SEL - UINT16 NoOfEntries; // No of Entries in the SEL - UINT16 FreeSpace; // Free space in Bytes - UINT32 RecentAddTimeStamp; // Most Recent Addition of Time Stamp - UINT32 RecentEraseTimeStamp; // Most Recent Erasure of Time Stamp - UINT8 OperationSupport; // Operation Support + UINT8 CompletionCode; + UINT8 Version; // Version of SEL + UINT16 NoOfEntries; // No of Entries in the SEL + UINT16 FreeSpace; // Free space in Bytes + UINT32 RecentAddTimeStamp; // Most Recent Addition of Time Stamp + UINT32 RecentEraseTimeStamp; // Most Recent Erasure of Time Stamp + UINT8 OperationSupport; // Operation Support } IPMI_GET_SEL_INFO_RESPONSE; // // Definitions for Get SEL Allocation Info command // -#define IPMI_STORAGE_GET_SEL_ALLOCATION_INFO 0x41 +#define IPMI_STORAGE_GET_SEL_ALLOCATION_INFO 0x41 // // Constants and Structure definitions for "Get SEL Allocation Info" command to follow here @@ -501,20 +501,20 @@ typedef struct { // // Definitions for Reserve SEL command // -#define IPMI_STORAGE_RESERVE_SEL 0x42 +#define IPMI_STORAGE_RESERVE_SEL 0x42 // // Constants and Structure definitions for "Reserve SEL" command to follow here // typedef struct { - UINT8 CompletionCode; - UINT8 ReservationId[2]; // Reservation ID. LS byte first. + UINT8 CompletionCode; + UINT8 ReservationId[2]; // Reservation ID. LS byte first. } IPMI_RESERVE_SEL_RESPONSE; // // Definitions for Get SEL Entry command // -#define IPMI_STORAGE_GET_SEL_ENTRY 0x43 +#define IPMI_STORAGE_GET_SEL_ENTRY 0x43 // // Constants and Structure definitions for "Get SEL Entry" command to follow here @@ -524,82 +524,82 @@ typedef struct { // Below is Definitions for SEL Record Formats (Chapter 32) // typedef struct { - UINT16 RecordId; - UINT8 RecordType; - UINT32 TimeStamp; - UINT16 GeneratorId; - UINT8 EvMRevision; - UINT8 SensorType; - UINT8 SensorNumber; - UINT8 EventDirType; - UINT8 OEMEvData1; - UINT8 OEMEvData2; - UINT8 OEMEvData3; + UINT16 RecordId; + UINT8 RecordType; + UINT32 TimeStamp; + UINT16 GeneratorId; + UINT8 EvMRevision; + UINT8 SensorType; + UINT8 SensorNumber; + UINT8 EventDirType; + UINT8 OEMEvData1; + UINT8 OEMEvData2; + UINT8 OEMEvData3; } IPMI_SEL_EVENT_RECORD_DATA; typedef struct { - UINT16 RecordId; - UINT8 RecordType; // C0h-DFh = OEM system event record - UINT32 TimeStamp; - UINT8 ManufacturerId[3]; - UINT8 OEMDefined[6]; + UINT16 RecordId; + UINT8 RecordType; // C0h-DFh = OEM system event record + UINT32 TimeStamp; + UINT8 ManufacturerId[3]; + UINT8 OEMDefined[6]; } IPMI_TIMESTAMPED_OEM_SEL_RECORD_DATA; typedef struct { - UINT16 RecordId; - UINT8 RecordType; // E0h-FFh = OEM system event record - UINT8 OEMDefined[13]; + UINT16 RecordId; + UINT8 RecordType; // E0h-FFh = OEM system event record + UINT8 OEMDefined[13]; } IPMI_NON_TIMESTAMPED_OEM_SEL_RECORD_DATA; typedef struct { - UINT8 ReserveId[2]; // Reservation ID, LS Byte First - UINT8 SelRecID[2]; // Sel Record ID, LS Byte First - UINT8 Offset; // Offset Into Record - UINT8 BytesToRead; // Bytes to be Read, 0xFF for entire record + UINT8 ReserveId[2]; // Reservation ID, LS Byte First + UINT8 SelRecID[2]; // Sel Record ID, LS Byte First + UINT8 Offset; // Offset Into Record + UINT8 BytesToRead; // Bytes to be Read, 0xFF for entire record } IPMI_GET_SEL_ENTRY_REQUEST; typedef struct { - UINT8 CompletionCode; - UINT16 NextSelRecordId; // Next SEL Record ID, LS Byte first - IPMI_SEL_EVENT_RECORD_DATA RecordData; + UINT8 CompletionCode; + UINT16 NextSelRecordId; // Next SEL Record ID, LS Byte first + IPMI_SEL_EVENT_RECORD_DATA RecordData; } IPMI_GET_SEL_ENTRY_RESPONSE; // // Definitions for Add SEL Entry command // -#define IPMI_STORAGE_ADD_SEL_ENTRY 0x44 +#define IPMI_STORAGE_ADD_SEL_ENTRY 0x44 // // Constants and Structure definitions for "Add SEL Entry" command to follow here // typedef struct { - IPMI_SEL_EVENT_RECORD_DATA RecordData; + IPMI_SEL_EVENT_RECORD_DATA RecordData; } IPMI_ADD_SEL_ENTRY_REQUEST; typedef struct { - UINT8 CompletionCode; - UINT16 RecordId; // Record ID for added record, LS Byte first + UINT8 CompletionCode; + UINT16 RecordId; // Record ID for added record, LS Byte first } IPMI_ADD_SEL_ENTRY_RESPONSE; // // Definitions for Partial Add SEL Entry command // -#define IPMI_STORAGE_PARTIAL_ADD_SEL_ENTRY 0x45 +#define IPMI_STORAGE_PARTIAL_ADD_SEL_ENTRY 0x45 // // Constants and Structure definitions for "Partial Add SEL Entry" command to follow here // typedef struct { - UINT16 ReservationId; - UINT16 RecordId; - UINT8 OffsetIntoRecord; - UINT8 InProgress; - UINT8 RecordData[0]; + UINT16 ReservationId; + UINT16 RecordId; + UINT8 OffsetIntoRecord; + UINT8 InProgress; + UINT8 RecordData[0]; } IPMI_PARTIAL_ADD_SEL_ENTRY_REQUEST; typedef struct { - UINT8 CompletionCode; - UINT16 RecordId; + UINT8 CompletionCode; + UINT16 RecordId; } IPMI_PARTIAL_ADD_SEL_ENTRY_RESPONSE; // @@ -611,46 +611,46 @@ typedef struct { // Constants and Structure definitions for "Delete SEL Entry" command to follow here // typedef struct { - UINT8 ReserveId[2]; // Reservation ID, LS byte first - UINT8 RecordToDelete[2]; // Record to Delete, LS Byte First + UINT8 ReserveId[2]; // Reservation ID, LS byte first + UINT8 RecordToDelete[2]; // Record to Delete, LS Byte First } IPMI_DELETE_SEL_ENTRY_REQUEST; -#define IPMI_DELETE_SEL_ENTRY_RESPONSE_TYPE_UNSUPPORTED 0x80 -#define IPMI_DELETE_SEL_ENTRY_RESPONSE_ERASE_IN_PROGRESS 0x81 +#define IPMI_DELETE_SEL_ENTRY_RESPONSE_TYPE_UNSUPPORTED 0x80 +#define IPMI_DELETE_SEL_ENTRY_RESPONSE_ERASE_IN_PROGRESS 0x81 typedef struct { - UINT8 CompletionCode; - UINT16 RecordId; // Record ID added. LS byte first + UINT8 CompletionCode; + UINT16 RecordId; // Record ID added. LS byte first } IPMI_DELETE_SEL_ENTRY_RESPONSE; // // Definitions for Clear SEL command // -#define IPMI_STORAGE_CLEAR_SEL 0x47 +#define IPMI_STORAGE_CLEAR_SEL 0x47 // // Constants and Structure definitions for "Clear SEL" command to follow here // -#define IPMI_CLEAR_SEL_REQUEST_C_CHAR_ASCII 0x43 -#define IPMI_CLEAR_SEL_REQUEST_L_CHAR_ASCII 0x4C -#define IPMI_CLEAR_SEL_REQUEST_R_CHAR_ASCII 0x52 -#define IPMI_CLEAR_SEL_REQUEST_INITIALIZE_ERASE 0xAA -#define IPMI_CLEAR_SEL_REQUEST_GET_ERASE_STATUS 0x00 +#define IPMI_CLEAR_SEL_REQUEST_C_CHAR_ASCII 0x43 +#define IPMI_CLEAR_SEL_REQUEST_L_CHAR_ASCII 0x4C +#define IPMI_CLEAR_SEL_REQUEST_R_CHAR_ASCII 0x52 +#define IPMI_CLEAR_SEL_REQUEST_INITIALIZE_ERASE 0xAA +#define IPMI_CLEAR_SEL_REQUEST_GET_ERASE_STATUS 0x00 typedef struct { - UINT8 Reserve[2]; // Reserve ID, LSB first - UINT8 AscC; // Ascii for 'C' (0x43) - UINT8 AscL; // Ascii for 'L' (0x4c) - UINT8 AscR; // Ascii for 'R' (0x52) - UINT8 Erase; // 0xAA, Initiate Erase, 0x00 Get Erase Status + UINT8 Reserve[2]; // Reserve ID, LSB first + UINT8 AscC; // Ascii for 'C' (0x43) + UINT8 AscL; // Ascii for 'L' (0x4c) + UINT8 AscR; // Ascii for 'R' (0x52) + UINT8 Erase; // 0xAA, Initiate Erase, 0x00 Get Erase Status } IPMI_CLEAR_SEL_REQUEST; -#define IPMI_CLEAR_SEL_RESPONSE_ERASURE_IN_PROGRESS 0x00 -#define IPMI_CLEAR_SEL_RESPONSE_ERASURE_COMPLETED 0x01 +#define IPMI_CLEAR_SEL_RESPONSE_ERASURE_IN_PROGRESS 0x00 +#define IPMI_CLEAR_SEL_RESPONSE_ERASURE_COMPLETED 0x01 typedef struct { - UINT8 CompletionCode; - UINT8 ErasureProgress; + UINT8 CompletionCode; + UINT8 ErasureProgress; } IPMI_CLEAR_SEL_RESPONSE; // @@ -662,8 +662,8 @@ typedef struct { // Constants and Structure definitions for "Get SEL Time" command to follow here // typedef struct { - UINT8 CompletionCode; - UINT32 Timestamp; // Present Timestamp clock reading. LS byte first. + UINT8 CompletionCode; + UINT32 Timestamp; // Present Timestamp clock reading. LS byte first. } IPMI_GET_SEL_TIME_RESPONSE; // @@ -675,7 +675,7 @@ typedef struct { // Constants and Structure definitions for "Set SEL Time" command to follow here // typedef struct { - UINT32 Timestamp; + UINT32 Timestamp; } IPMI_SET_SEL_TIME_REQUEST; // @@ -699,85 +699,85 @@ typedef struct { // // Definitions for Get SEL Time UTC Offset command // -#define IPMI_STORAGE_GET_SEL_TIME_UTC_OFFSET 0x5C +#define IPMI_STORAGE_GET_SEL_TIME_UTC_OFFSET 0x5C // // Constants and Structure definitions for "Get SEL Time UTC Offset" command to follow here // typedef struct { - UINT8 CompletionCode; + UINT8 CompletionCode; // // 16-bit, 2s-complement signed integer for the offset in minutes from UTC to SEL Time. // LS-byte first. (ranges from -1440 to 1440) // - INT16 UtcOffset; + INT16 UtcOffset; } IPMI_GET_SEL_TIME_UTC_OFFSET_RESPONSE; // // Definitions for Set SEL Time UTC Offset command // -#define IPMI_STORAGE_SET_SEL_TIME_UTC_OFFSET 0x5D +#define IPMI_STORAGE_SET_SEL_TIME_UTC_OFFSET 0x5D // // Constants and Structure definitions for "Set SEL Time UTC Offset" command to follow here // -#define IPMI_COMPLETE_SEL_RECORD 0xFF +#define IPMI_COMPLETE_SEL_RECORD 0xFF -#define IPMI_SEL_SYSTEM_RECORD 0x02 -#define IPMI_SEL_OEM_TIME_STAMP_RECORD_START 0xC0 -#define IPMI_SEL_OEM_TIME_STAMP_RECORD_END 0xDF -#define IPMI_SEL_OEM_NO_TIME_STAMP_RECORD_START 0xE0 -#define IPMI_SEL_OEM_NO_TIME_STAMP_RECORD_END 0xFF +#define IPMI_SEL_SYSTEM_RECORD 0x02 +#define IPMI_SEL_OEM_TIME_STAMP_RECORD_START 0xC0 +#define IPMI_SEL_OEM_TIME_STAMP_RECORD_END 0xDF +#define IPMI_SEL_OEM_NO_TIME_STAMP_RECORD_START 0xE0 +#define IPMI_SEL_OEM_NO_TIME_STAMP_RECORD_END 0xFF -#define IPMI_SEL_EVENT_DIR(EventDirType) (EventDirType >> 7) -#define IPMI_SEL_EVENT_DIR_ASSERTION_EVENT 0x00 -#define IPMI_SEL_EVENT_DIR_DEASSERTION_EVENT 0x01 +#define IPMI_SEL_EVENT_DIR(EventDirType) (EventDirType >> 7) +#define IPMI_SEL_EVENT_DIR_ASSERTION_EVENT 0x00 +#define IPMI_SEL_EVENT_DIR_DEASSERTION_EVENT 0x01 -#define IPMI_SEL_EVENT_TYPE(EventDirType) (EventDirType & 0x7F) +#define IPMI_SEL_EVENT_TYPE(EventDirType) (EventDirType & 0x7F) // // Event/Reading Type Code Ranges (Chapter 42) // -#define IPMI_SEL_EVENT_TYPE_UNSPECIFIED 0x00 -#define IPMI_SEL_EVENT_TYPE_THRESHOLD 0x01 -#define IPMI_SEL_EVENT_TYPE_GENERIC_START 0x02 -#define IPMI_SEL_EVENT_TYPE_GENERIC_END 0x0C -#define IPMI_SEL_EVENT_TYPE_SENSOR_SPECIFIC 0x6F -#define IPMI_SEL_EVENT_TYPE_OEM_START 0x70 -#define IPMI_SEL_EVENT_TYPE_OEM_END 0x7F +#define IPMI_SEL_EVENT_TYPE_UNSPECIFIED 0x00 +#define IPMI_SEL_EVENT_TYPE_THRESHOLD 0x01 +#define IPMI_SEL_EVENT_TYPE_GENERIC_START 0x02 +#define IPMI_SEL_EVENT_TYPE_GENERIC_END 0x0C +#define IPMI_SEL_EVENT_TYPE_SENSOR_SPECIFIC 0x6F +#define IPMI_SEL_EVENT_TYPE_OEM_START 0x70 +#define IPMI_SEL_EVENT_TYPE_OEM_END 0x7F -#define SOFTWARE_ID_FROM_GENERATOR_ID(GeneratorId) ((GeneratorId & 0xFF) >> 1) +#define SOFTWARE_ID_FROM_GENERATOR_ID(GeneratorId) ((GeneratorId & 0xFF) >> 1) // // System Software IDs definitions (Section 5.5) // -#define IPMI_SWID_BIOS_RANGE_START 0x00 -#define IPMI_SWID_BIOS_RANGE_END 0x0F -#define IPMI_SWID_SMI_HANDLER_RANGE_START 0x10 -#define IPMI_SWID_SMI_HANDLER_RANGE_END 0x1F -#define IPMI_SWID_SMS_RANGE_START 0x20 -#define IPMI_SWID_SMS_RANGE_END 0x2F -#define IPMI_SWID_OEM_RANGE_START 0x30 -#define IPMI_SWID_OEM_RANGE_END 0x3F -#define IPMI_SWID_REMOTE_CONSOLE_RANGE_START 0x40 -#define IPMI_SWID_REMOTE_CONSOLE_RANGE_END 0x46 -#define IPMI_SWID_TERMINAL_REMOTE_CONSOLE_ID 0x47 - -#define SLAVE_ADDRESS_FROM_GENERATOR_ID(GeneratorId) ((GeneratorId & 0xFF) >> 1) -#define LUN_FROM_GENERATOR_ID(GeneratorId) ((GeneratorId >> 8) & 0x03) -#define CHANNEL_NUMBER_FROM_GENERATOR_ID(GeneratorId) ((GeneratorId >> 12) & 0x0F) - -#define IPMI_EVM_REVISION 0x04 -#define IPMI_BIOS_ID 0x18 -#define IPMI_FORMAT_REV 0x00 -#define IPMI_FORMAT_REV1 0x01 -#define IPMI_SOFTWARE_ID 0x01 -#define IPMI_PLATFORM_VAL_ID 0x01 -#define IPMI_GENERATOR_ID(i,f) ((i << 1) | (f << 1) | IPMI_SOFTWARE_ID) - -#define IPMI_SENSOR_TYPE_EVENT_CODE_DISCRETE 0x6F - -#define IPMI_OEM_SPECIFIC_DATA 0x02 -#define IPMI_SENSOR_SPECIFIC_DATA 0x03 +#define IPMI_SWID_BIOS_RANGE_START 0x00 +#define IPMI_SWID_BIOS_RANGE_END 0x0F +#define IPMI_SWID_SMI_HANDLER_RANGE_START 0x10 +#define IPMI_SWID_SMI_HANDLER_RANGE_END 0x1F +#define IPMI_SWID_SMS_RANGE_START 0x20 +#define IPMI_SWID_SMS_RANGE_END 0x2F +#define IPMI_SWID_OEM_RANGE_START 0x30 +#define IPMI_SWID_OEM_RANGE_END 0x3F +#define IPMI_SWID_REMOTE_CONSOLE_RANGE_START 0x40 +#define IPMI_SWID_REMOTE_CONSOLE_RANGE_END 0x46 +#define IPMI_SWID_TERMINAL_REMOTE_CONSOLE_ID 0x47 + +#define SLAVE_ADDRESS_FROM_GENERATOR_ID(GeneratorId) ((GeneratorId & 0xFF) >> 1) +#define LUN_FROM_GENERATOR_ID(GeneratorId) ((GeneratorId >> 8) & 0x03) +#define CHANNEL_NUMBER_FROM_GENERATOR_ID(GeneratorId) ((GeneratorId >> 12) & 0x0F) + +#define IPMI_EVM_REVISION 0x04 +#define IPMI_BIOS_ID 0x18 +#define IPMI_FORMAT_REV 0x00 +#define IPMI_FORMAT_REV1 0x01 +#define IPMI_SOFTWARE_ID 0x01 +#define IPMI_PLATFORM_VAL_ID 0x01 +#define IPMI_GENERATOR_ID(i, f) ((i << 1) | (f << 1) | IPMI_SOFTWARE_ID) + +#define IPMI_SENSOR_TYPE_EVENT_CODE_DISCRETE 0x6F + +#define IPMI_OEM_SPECIFIC_DATA 0x02 +#define IPMI_SENSOR_SPECIFIC_DATA 0x03 #pragma pack() #endif diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h b/MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h index 3fcd0e7..19db84e 100644 --- a/MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h +++ b/MdePkg/Include/IndustryStandard/IpmiNetFnTransport.h @@ -30,7 +30,7 @@ // // Definitions for Set Lan Configuration Parameters command // -#define IPMI_TRANSPORT_SET_LAN_CONFIG_PARAMETERS 0x01 +#define IPMI_TRANSPORT_SET_LAN_CONFIG_PARAMETERS 0x01 // // Constants and Structure definitions for "Set Lan Configuration Parameters" command to follow here @@ -105,158 +105,158 @@ typedef enum { typedef union { struct { - UINT8 NoAuth : 1; - UINT8 MD2Auth : 1; - UINT8 MD5Auth : 1; - UINT8 Reserved1 : 1; - UINT8 StraightPswd : 1; - UINT8 OemType : 1; - UINT8 Reserved2 : 2; + UINT8 NoAuth : 1; + UINT8 MD2Auth : 1; + UINT8 MD5Auth : 1; + UINT8 Reserved1 : 1; + UINT8 StraightPswd : 1; + UINT8 OemType : 1; + UINT8 Reserved2 : 2; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_LAN_AUTH_TYPE; typedef struct { - UINT8 IpAddress[4]; + UINT8 IpAddress[4]; } IPMI_LAN_IP_ADDRESS; typedef union { struct { - UINT8 AddressSrc : 4; - UINT8 Reserved : 4; + UINT8 AddressSrc : 4; + UINT8 Reserved : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_LAN_IP_ADDRESS_SRC; typedef struct { - UINT8 MacAddress[6]; + UINT8 MacAddress[6]; } IPMI_LAN_MAC_ADDRESS; typedef struct { - UINT8 IpAddress[4]; + UINT8 IpAddress[4]; } IPMI_LAN_SUBNET_MASK; typedef union { struct { - UINT8 IpFlag : 3; - UINT8 Reserved : 5; + UINT8 IpFlag : 3; + UINT8 Reserved : 5; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_LAN_IPV4_HDR_PARAM_DATA_2; typedef union { struct { - UINT8 Precedence : 3; - UINT8 Reserved : 1; - UINT8 ServiceType : 4; + UINT8 Precedence : 3; + UINT8 Reserved : 1; + UINT8 ServiceType : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_LAN_IPV4_HDR_PARAM_DATA_3; typedef struct { - UINT8 TimeToLive; - IPMI_LAN_IPV4_HDR_PARAM_DATA_2 Data2; - IPMI_LAN_IPV4_HDR_PARAM_DATA_3 Data3; + UINT8 TimeToLive; + IPMI_LAN_IPV4_HDR_PARAM_DATA_2 Data2; + IPMI_LAN_IPV4_HDR_PARAM_DATA_3 Data3; } IPMI_LAN_IPV4_HDR_PARAM; typedef struct { - UINT8 RcmpPortMsb; - UINT8 RcmpPortLsb; + UINT8 RcmpPortMsb; + UINT8 RcmpPortLsb; } IPMI_LAN_RCMP_PORT; typedef union { struct { - UINT8 EnableBmcArpResponse : 1; - UINT8 EnableBmcGratuitousArp : 1; - UINT8 Reserved : 6; + UINT8 EnableBmcArpResponse : 1; + UINT8 EnableBmcGratuitousArp : 1; + UINT8 Reserved : 6; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_LAN_BMC_GENERATED_ARP_CONTROL; typedef struct { - UINT8 ArpInterval; + UINT8 ArpInterval; } IPMI_LAN_ARP_INTERVAL; typedef struct { - UINT8 Data[18]; + UINT8 Data[18]; } IPMI_LAN_COMMUNITY_STRING; typedef union { struct { - UINT8 DestinationSelector : 4; - UINT8 Reserved : 4; + UINT8 DestinationSelector : 4; + UINT8 Reserved : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_LAN_SET_SELECTOR; typedef union { struct { - UINT8 DestinationType : 3; - UINT8 Reserved : 4; - UINT8 AlertAcknowledged : 1; + UINT8 DestinationType : 3; + UINT8 Reserved : 4; + UINT8 AlertAcknowledged : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_LAN_DEST_TYPE_DESTINATION_TYPE; typedef struct { - IPMI_LAN_SET_SELECTOR SetSelector; - IPMI_LAN_DEST_TYPE_DESTINATION_TYPE DestinationType; + IPMI_LAN_SET_SELECTOR SetSelector; + IPMI_LAN_DEST_TYPE_DESTINATION_TYPE DestinationType; } IPMI_LAN_DEST_TYPE; typedef union { struct { - UINT8 AlertingIpAddressSelector : 4; - UINT8 AddressFormat : 4; + UINT8 AlertingIpAddressSelector : 4; + UINT8 AddressFormat : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_LAN_ADDRESS_FORMAT; typedef union { struct { - UINT8 UseDefaultGateway : 1; - UINT8 Reserved2 : 7; + UINT8 UseDefaultGateway : 1; + UINT8 Reserved2 : 7; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_LAN_GATEWAY_SELECTOR; typedef struct { - IPMI_LAN_SET_SELECTOR SetSelector; - IPMI_LAN_ADDRESS_FORMAT AddressFormat; - IPMI_LAN_GATEWAY_SELECTOR GatewaySelector; - IPMI_LAN_IP_ADDRESS AlertingIpAddress; - IPMI_LAN_MAC_ADDRESS AlertingMacAddress; + IPMI_LAN_SET_SELECTOR SetSelector; + IPMI_LAN_ADDRESS_FORMAT AddressFormat; + IPMI_LAN_GATEWAY_SELECTOR GatewaySelector; + IPMI_LAN_IP_ADDRESS AlertingIpAddress; + IPMI_LAN_MAC_ADDRESS AlertingMacAddress; } IPMI_LAN_DEST_ADDRESS; typedef union { - IPMI_LAN_AUTH_TYPE IpmiLanAuthType; - IPMI_LAN_IP_ADDRESS IpmiLanIpAddress; - IPMI_LAN_IP_ADDRESS_SRC IpmiLanIpAddressSrc; - IPMI_LAN_MAC_ADDRESS IpmiLanMacAddress; - IPMI_LAN_SUBNET_MASK IpmiLanSubnetMask; - IPMI_LAN_IPV4_HDR_PARAM IpmiLanIpv4HdrParam; - IPMI_LAN_RCMP_PORT IpmiLanPrimaryRcmpPort; - IPMI_LAN_BMC_GENERATED_ARP_CONTROL IpmiLanArpControl; - IPMI_LAN_ARP_INTERVAL IpmiLanArpInterval; - IPMI_LAN_COMMUNITY_STRING IpmiLanCommunityString; - IPMI_LAN_DEST_TYPE IpmiLanDestType; - IPMI_LAN_DEST_ADDRESS IpmiLanDestAddress; + IPMI_LAN_AUTH_TYPE IpmiLanAuthType; + IPMI_LAN_IP_ADDRESS IpmiLanIpAddress; + IPMI_LAN_IP_ADDRESS_SRC IpmiLanIpAddressSrc; + IPMI_LAN_MAC_ADDRESS IpmiLanMacAddress; + IPMI_LAN_SUBNET_MASK IpmiLanSubnetMask; + IPMI_LAN_IPV4_HDR_PARAM IpmiLanIpv4HdrParam; + IPMI_LAN_RCMP_PORT IpmiLanPrimaryRcmpPort; + IPMI_LAN_BMC_GENERATED_ARP_CONTROL IpmiLanArpControl; + IPMI_LAN_ARP_INTERVAL IpmiLanArpInterval; + IPMI_LAN_COMMUNITY_STRING IpmiLanCommunityString; + IPMI_LAN_DEST_TYPE IpmiLanDestType; + IPMI_LAN_DEST_ADDRESS IpmiLanDestAddress; } IPMI_LAN_OPTIONS; typedef union { struct { - UINT8 AddressSourceType : 4; - UINT8 Reserved : 3; - UINT8 EnableStatus : 1; + UINT8 AddressSourceType : 4; + UINT8 Reserved : 3; + UINT8 EnableStatus : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_LAN_IPV6_ADDRESS_SOURCE_TYPE; typedef struct { - UINT8 SetSelector; - IPMI_LAN_IPV6_ADDRESS_SOURCE_TYPE AddressSourceType; - UINT8 Ipv6Address[16]; - UINT8 AddressPrefixLen; - UINT8 AddressStatus; + UINT8 SetSelector; + IPMI_LAN_IPV6_ADDRESS_SOURCE_TYPE AddressSourceType; + UINT8 Ipv6Address[16]; + UINT8 AddressPrefixLen; + UINT8 AddressStatus; } IPMI_LAN_IPV6_STATIC_ADDRESS; // @@ -264,54 +264,54 @@ typedef struct { // typedef union { struct { - UINT8 SetInProgress:2; - UINT8 Reserved:6; + UINT8 SetInProgress : 2; + UINT8 Reserved : 6; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_LAN_SET_IN_PROGRESS; typedef union { struct { - UINT8 ChannelNo : 4; - UINT8 Reserved : 4; + UINT8 ChannelNo : 4; + UINT8 Reserved : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_SET_LAN_CONFIG_CHANNEL_NUM; typedef struct { - IPMI_SET_LAN_CONFIG_CHANNEL_NUM ChannelNumber; - UINT8 ParameterSelector; - UINT8 ParameterData[0]; + IPMI_SET_LAN_CONFIG_CHANNEL_NUM ChannelNumber; + UINT8 ParameterSelector; + UINT8 ParameterData[0]; } IPMI_SET_LAN_CONFIGURATION_PARAMETERS_COMMAND_REQUEST; // // Definitions for Get Lan Configuration Parameters command // -#define IPMI_TRANSPORT_GET_LAN_CONFIG_PARAMETERS 0x02 +#define IPMI_TRANSPORT_GET_LAN_CONFIG_PARAMETERS 0x02 // // Constants and Structure definitions for "Get Lan Configuration Parameters" command to follow here // typedef union { struct { - UINT8 ChannelNo : 4; - UINT8 Reserved : 3; - UINT8 GetParameter : 1; + UINT8 ChannelNo : 4; + UINT8 Reserved : 3; + UINT8 GetParameter : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_GET_LAN_CONFIG_CHANNEL_NUM; typedef struct { - IPMI_GET_LAN_CONFIG_CHANNEL_NUM ChannelNumber; - UINT8 ParameterSelector; - UINT8 SetSelector; - UINT8 BlockSelector; + IPMI_GET_LAN_CONFIG_CHANNEL_NUM ChannelNumber; + UINT8 ParameterSelector; + UINT8 SetSelector; + UINT8 BlockSelector; } IPMI_GET_LAN_CONFIGURATION_PARAMETERS_REQUEST; typedef struct { - UINT8 CompletionCode; - UINT8 ParameterRevision; - UINT8 ParameterData[0]; + UINT8 CompletionCode; + UINT8 ParameterRevision; + UINT8 ParameterData[0]; } IPMI_GET_LAN_CONFIGURATION_PARAMETERS_RESPONSE; // @@ -326,7 +326,7 @@ typedef struct { // // Definitions for Get IP-UDP-RMCP Statistics command // -#define IPMI_TRANSPORT_GET_PACKET_STATISTICS 0x04 +#define IPMI_TRANSPORT_GET_PACKET_STATISTICS 0x04 // // Constants and Structure definitions for "Get IP-UDP-RMCP Statistics" command to follow here @@ -350,144 +350,144 @@ typedef struct { // typedef union { struct { - UINT8 NoAuthentication : 1; - UINT8 MD2Authentication : 1; - UINT8 MD5Authentication : 1; - UINT8 Reserved1 : 1; - UINT8 StraightPassword : 1; - UINT8 OemProprietary : 1; - UINT8 Reservd2 : 2; + UINT8 NoAuthentication : 1; + UINT8 MD2Authentication : 1; + UINT8 MD5Authentication : 1; + UINT8 Reserved1 : 1; + UINT8 StraightPassword : 1; + UINT8 OemProprietary : 1; + UINT8 Reservd2 : 2; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_EMP_AUTH_TYPE; typedef union { struct { - UINT8 EnableBasicMode : 1; - UINT8 EnablePPPMode : 1; - UINT8 EnableTerminalMode : 1; - UINT8 Reserved1 : 2; - UINT8 SnoopOsPPPNegotiation : 1; - UINT8 Reserved2 : 1; - UINT8 DirectConnect : 1; + UINT8 EnableBasicMode : 1; + UINT8 EnablePPPMode : 1; + UINT8 EnableTerminalMode : 1; + UINT8 Reserved1 : 2; + UINT8 SnoopOsPPPNegotiation : 1; + UINT8 Reserved2 : 1; + UINT8 DirectConnect : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_EMP_CONNECTION_TYPE; typedef union { struct { - UINT8 InactivityTimeout : 4; - UINT8 Reserved : 4; + UINT8 InactivityTimeout : 4; + UINT8 Reserved : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_EMP_INACTIVITY_TIMEOUT; typedef union { struct { - UINT8 IpmiCallback : 1; - UINT8 CBCPCallback : 1; - UINT8 Reserved : 6; + UINT8 IpmiCallback : 1; + UINT8 CBCPCallback : 1; + UINT8 Reserved : 6; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_CHANNEL_CALLBACK_CONTROL_ENABLE; typedef union { struct { - UINT8 CbcpEnableNoCallback : 1; - UINT8 CbcpEnablePreSpecifiedNumber : 1; - UINT8 CbcpEnableUserSpecifiedNumber : 1; - UINT8 CbcpEnableCallbackFromList : 1; - UINT8 Reserved : 4; + UINT8 CbcpEnableNoCallback : 1; + UINT8 CbcpEnablePreSpecifiedNumber : 1; + UINT8 CbcpEnableUserSpecifiedNumber : 1; + UINT8 CbcpEnableCallbackFromList : 1; + UINT8 Reserved : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_CHANNEL_CALLBACK_CONTROL_CBCP; typedef struct { - IPMI_CHANNEL_CALLBACK_CONTROL_ENABLE CallbackEnable; - IPMI_CHANNEL_CALLBACK_CONTROL_CBCP CBCPNegotiation; - UINT8 CallbackDestination1; - UINT8 CallbackDestination2; - UINT8 CallbackDestination3; + IPMI_CHANNEL_CALLBACK_CONTROL_ENABLE CallbackEnable; + IPMI_CHANNEL_CALLBACK_CONTROL_CBCP CBCPNegotiation; + UINT8 CallbackDestination1; + UINT8 CallbackDestination2; + UINT8 CallbackDestination3; } IPMI_EMP_CHANNEL_CALLBACK_CONTROL; typedef union { struct { - UINT8 CloseSessionOnDCDLoss : 1; - UINT8 EnableSessionInactivityTimeout : 1; - UINT8 Reserved : 6; + UINT8 CloseSessionOnDCDLoss : 1; + UINT8 EnableSessionInactivityTimeout : 1; + UINT8 Reserved : 6; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_EMP_SESSION_TERMINATION; typedef union { struct { - UINT8 Reserved1 : 5; - UINT8 EnableDtrHangup : 1; - UINT8 FlowControl : 2; - UINT8 BitRate : 4; - UINT8 Reserved2 : 4; - UINT8 SaveSetting : 1; - UINT8 SetComPort : 1; - UINT8 Reserved3 : 6; + UINT8 Reserved1 : 5; + UINT8 EnableDtrHangup : 1; + UINT8 FlowControl : 2; + UINT8 BitRate : 4; + UINT8 Reserved2 : 4; + UINT8 SaveSetting : 1; + UINT8 SetComPort : 1; + UINT8 Reserved3 : 6; } Bits; - UINT8 Uint8; - UINT16 Uint16; + UINT8 Uint8; + UINT16 Uint16; } IPMI_EMP_MESSAGING_COM_SETTING; typedef union { struct { - UINT8 RingDurationInterval : 6; - UINT8 Reserved1 : 2; - UINT8 RingDeadTime : 4; - UINT8 Reserved2 : 4; + UINT8 RingDurationInterval : 6; + UINT8 Reserved1 : 2; + UINT8 RingDeadTime : 4; + UINT8 Reserved2 : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_EMP_MODEM_RING_TIME; typedef struct { - UINT8 Reserved; - UINT8 InitString[48]; + UINT8 Reserved; + UINT8 InitString[48]; } IPMI_EMP_MODEM_INIT_STRING; typedef struct { - UINT8 EscapeSequence[5]; + UINT8 EscapeSequence[5]; } IPMI_EMP_MODEM_ESC_SEQUENCE; typedef struct { - UINT8 HangupSequence[8]; + UINT8 HangupSequence[8]; } IPMI_EMP_MODEM_HANGUP_SEQUENCE; typedef struct { - UINT8 ModelDialCommend[8]; + UINT8 ModelDialCommend[8]; } IPMI_MODEM_DIALUP_COMMAND; typedef struct { - UINT8 PageBlackoutInterval; + UINT8 PageBlackoutInterval; } IPMI_PAGE_BLACKOUT_INTERVAL; typedef struct { - UINT8 CommunityString[18]; + UINT8 CommunityString[18]; } IPMI_EMP_COMMUNITY_STRING; typedef union { struct { - UINT8 Reserved : 4; - UINT8 DialStringSelector : 4; + UINT8 Reserved : 4; + UINT8 DialStringSelector : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_DIAL_PAGE_DESTINATION; typedef union { struct { - UINT8 TapAccountSelector : 4; - UINT8 Reserved : 4; + UINT8 TapAccountSelector : 4; + UINT8 Reserved : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_TAP_PAGE_DESTINATION; typedef struct { - UINT8 PPPAccountSetSelector; - UINT8 DialStringSelector; + UINT8 PPPAccountSetSelector; + UINT8 DialStringSelector; } IPMI_PPP_ALERT_DESTINATION; typedef union { @@ -498,137 +498,136 @@ typedef union { typedef union { struct { - UINT8 DestinationSelector : 4; - UINT8 Reserved : 4; + UINT8 DestinationSelector : 4; + UINT8 Reserved : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_EMP_DESTINATION_SELECTOR; typedef union { struct { - UINT8 DestinationType : 4; - UINT8 Reserved : 3; - UINT8 AlertAckRequired : 1; + UINT8 DestinationType : 4; + UINT8 Reserved : 3; + UINT8 AlertAckRequired : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_EMP_DESTINATION_TYPE; typedef union { struct { - UINT8 NumRetriesCall : 3; - UINT8 Reserved1 : 1; - UINT8 NumRetryAlert : 3; - UINT8 Reserved2 : 1; + UINT8 NumRetriesCall : 3; + UINT8 Reserved1 : 1; + UINT8 NumRetryAlert : 3; + UINT8 Reserved2 : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_EMP_RETRIES; typedef struct { - IPMI_EMP_DESTINATION_SELECTOR DestinationSelector; - IPMI_EMP_DESTINATION_TYPE DestinationType; - UINT8 AlertAckTimeoutSeconds; - IPMI_EMP_RETRIES Retries; - IPMI_DEST_TYPE_SPECIFIC DestinationTypeSpecific; + IPMI_EMP_DESTINATION_SELECTOR DestinationSelector; + IPMI_EMP_DESTINATION_TYPE DestinationType; + UINT8 AlertAckTimeoutSeconds; + IPMI_EMP_RETRIES Retries; + IPMI_DEST_TYPE_SPECIFIC DestinationTypeSpecific; } IPMI_EMP_DESTINATION_INFO; typedef union { struct { - UINT8 Parity : 3; - UINT8 CharacterSize : 1; - UINT8 StopBit : 1; - UINT8 DtrHangup : 1; - UINT8 FlowControl : 2; + UINT8 Parity : 3; + UINT8 CharacterSize : 1; + UINT8 StopBit : 1; + UINT8 DtrHangup : 1; + UINT8 FlowControl : 2; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_EMP_DESTINATION_COM_SETTING_DATA_2; typedef union { struct { - UINT8 BitRate : 4; - UINT8 Reserved : 4; + UINT8 BitRate : 4; + UINT8 Reserved : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_EMP_BIT_RATE; typedef struct { - IPMI_EMP_DESTINATION_SELECTOR DestinationSelector; - IPMI_EMP_DESTINATION_COM_SETTING_DATA_2 Data2; - IPMI_EMP_BIT_RATE BitRate; + IPMI_EMP_DESTINATION_SELECTOR DestinationSelector; + IPMI_EMP_DESTINATION_COM_SETTING_DATA_2 Data2; + IPMI_EMP_BIT_RATE BitRate; } IPMI_EMP_DESTINATION_COM_SETTING; typedef union { struct { - UINT8 DialStringSelector : 4; - UINT8 Reserved : 4; + UINT8 DialStringSelector : 4; + UINT8 Reserved : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_DIAL_STRING_SELECTOR; typedef struct { - IPMI_DIAL_STRING_SELECTOR DestinationSelector; - UINT8 Reserved; - UINT8 DialString[48]; + IPMI_DIAL_STRING_SELECTOR DestinationSelector; + UINT8 Reserved; + UINT8 DialString[48]; } IPMI_DESTINATION_DIAL_STRING; typedef union { - UINT32 IpAddressLong; - UINT8 IpAddress[4]; + UINT32 IpAddressLong; + UINT8 IpAddress[4]; } IPMI_PPP_IP_ADDRESS; typedef union { struct { - UINT8 IpAddressSelector : 4; - UINT8 Reserved : 4; + UINT8 IpAddressSelector : 4; + UINT8 Reserved : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_DESTINATION_IP_ADDRESS_SELECTOR; typedef struct { - IPMI_DESTINATION_IP_ADDRESS_SELECTOR DestinationSelector; - IPMI_PPP_IP_ADDRESS PppIpAddress; + IPMI_DESTINATION_IP_ADDRESS_SELECTOR DestinationSelector; + IPMI_PPP_IP_ADDRESS PppIpAddress; } IPMI_DESTINATION_IP_ADDRESS; typedef union { struct { - UINT8 TapServiceSelector : 4; - UINT8 TapDialStringSelector : 4; + UINT8 TapServiceSelector : 4; + UINT8 TapDialStringSelector : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_TAP_DIAL_STRING_SERVICE_SELECTOR; - typedef struct { - UINT8 TapSelector; - IPMI_TAP_DIAL_STRING_SERVICE_SELECTOR TapDialStringServiceSelector; + UINT8 TapSelector; + IPMI_TAP_DIAL_STRING_SERVICE_SELECTOR TapDialStringServiceSelector; } IPMI_DESTINATION_TAP_ACCOUNT; typedef struct { - UINT8 TapSelector; - UINT8 PagerIdString[16]; + UINT8 TapSelector; + UINT8 PagerIdString[16]; } IPMI_TAP_PAGER_ID_STRING; typedef union { - UINT8 OptionData; - IPMI_EMP_AUTH_TYPE EmpAuthType; - IPMI_EMP_CONNECTION_TYPE EmpConnectionType; - IPMI_EMP_INACTIVITY_TIMEOUT EmpInactivityTimeout; - IPMI_EMP_CHANNEL_CALLBACK_CONTROL EmpCallbackControl; - IPMI_EMP_SESSION_TERMINATION EmpSessionTermination; - IPMI_EMP_MESSAGING_COM_SETTING EmpMessagingComSetting; - IPMI_EMP_MODEM_RING_TIME EmpModemRingTime; - IPMI_EMP_MODEM_INIT_STRING EmpModemInitString; - IPMI_EMP_MODEM_ESC_SEQUENCE EmpModemEscSequence; - IPMI_EMP_MODEM_HANGUP_SEQUENCE EmpModemHangupSequence; - IPMI_MODEM_DIALUP_COMMAND EmpModemDialupCommand; - IPMI_PAGE_BLACKOUT_INTERVAL EmpPageBlackoutInterval; - IPMI_EMP_COMMUNITY_STRING EmpCommunityString; - IPMI_EMP_DESTINATION_INFO EmpDestinationInfo; - IPMI_EMP_DESTINATION_COM_SETTING EmpDestinationComSetting; - UINT8 CallRetryBusySignalInterval; - IPMI_DESTINATION_DIAL_STRING DestinationDialString; - IPMI_DESTINATION_IP_ADDRESS DestinationIpAddress; - IPMI_DESTINATION_TAP_ACCOUNT DestinationTapAccount; - IPMI_TAP_PAGER_ID_STRING TapPagerIdString; + UINT8 OptionData; + IPMI_EMP_AUTH_TYPE EmpAuthType; + IPMI_EMP_CONNECTION_TYPE EmpConnectionType; + IPMI_EMP_INACTIVITY_TIMEOUT EmpInactivityTimeout; + IPMI_EMP_CHANNEL_CALLBACK_CONTROL EmpCallbackControl; + IPMI_EMP_SESSION_TERMINATION EmpSessionTermination; + IPMI_EMP_MESSAGING_COM_SETTING EmpMessagingComSetting; + IPMI_EMP_MODEM_RING_TIME EmpModemRingTime; + IPMI_EMP_MODEM_INIT_STRING EmpModemInitString; + IPMI_EMP_MODEM_ESC_SEQUENCE EmpModemEscSequence; + IPMI_EMP_MODEM_HANGUP_SEQUENCE EmpModemHangupSequence; + IPMI_MODEM_DIALUP_COMMAND EmpModemDialupCommand; + IPMI_PAGE_BLACKOUT_INTERVAL EmpPageBlackoutInterval; + IPMI_EMP_COMMUNITY_STRING EmpCommunityString; + IPMI_EMP_DESTINATION_INFO EmpDestinationInfo; + IPMI_EMP_DESTINATION_COM_SETTING EmpDestinationComSetting; + UINT8 CallRetryBusySignalInterval; + IPMI_DESTINATION_DIAL_STRING DestinationDialString; + IPMI_DESTINATION_IP_ADDRESS DestinationIpAddress; + IPMI_DESTINATION_TAP_ACCOUNT DestinationTapAccount; + IPMI_TAP_PAGER_ID_STRING TapPagerIdString; } IPMI_EMP_OPTIONS; // @@ -670,47 +669,47 @@ typedef union { typedef union { struct { - UINT8 ChannelNo : 4; - UINT8 Reserved : 4; + UINT8 ChannelNo : 4; + UINT8 Reserved : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_MUX_CHANNEL_NUM; typedef union { struct { - UINT8 MuxSetting : 4; - UINT8 Reserved : 4; + UINT8 MuxSetting : 4; + UINT8 Reserved : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_MUX_SETTING_REQUEST; typedef struct { - IPMI_MUX_CHANNEL_NUM ChannelNumber; - IPMI_MUX_SETTING_REQUEST MuxSetting; + IPMI_MUX_CHANNEL_NUM ChannelNumber; + IPMI_MUX_SETTING_REQUEST MuxSetting; } IPMI_SET_SERIAL_MODEM_MUX_COMMAND_REQUEST; typedef union { struct { - UINT8 MuxSetToBmc : 1; - UINT8 CommandStatus : 1; - UINT8 MessagingSessionActive : 1; - UINT8 AlertInProgress : 1; - UINT8 Reserved : 2; - UINT8 MuxToBmcAllowed : 1; - UINT8 MuxToSystemBlocked : 1; + UINT8 MuxSetToBmc : 1; + UINT8 CommandStatus : 1; + UINT8 MessagingSessionActive : 1; + UINT8 AlertInProgress : 1; + UINT8 Reserved : 2; + UINT8 MuxToBmcAllowed : 1; + UINT8 MuxToSystemBlocked : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_MUX_SETTING_PRESENT_STATE; typedef struct { - UINT8 CompletionCode; - IPMI_MUX_SETTING_PRESENT_STATE MuxSetting; + UINT8 CompletionCode; + IPMI_MUX_SETTING_PRESENT_STATE MuxSetting; } IPMI_SET_SERIAL_MODEM_MUX_COMMAND_RESPONSE; // // Definitions for Get TAP Response Code command // -#define IPMI_TRANSPORT_GET_TAP_RESPONSE_CODE 0x13 +#define IPMI_TRANSPORT_GET_TAP_RESPONSE_CODE 0x13 // // Constants and Structure definitions for "Get TAP Response Code" command to follow here @@ -737,7 +736,7 @@ typedef struct { // // Definitions for Send PPP UDP Proxy Packet command // -#define IPMI_TRANSPORT_SEND_PPP_UDP_PROXY_PACKET 0x16 +#define IPMI_TRANSPORT_SEND_PPP_UDP_PROXY_PACKET 0x16 // // Constants and Structure definitions for "Send PPP UDP Proxy Packet" command to follow here @@ -773,7 +772,7 @@ typedef struct { // // Definitions for Set user Callback Options command // -#define IPMI_TRANSPORT_SET_USER_CALLBACK_OPTIONS 0x1A +#define IPMI_TRANSPORT_SET_USER_CALLBACK_OPTIONS 0x1A // // Constants and Structure definitions for "Set user Callback Options" command to follow here @@ -782,7 +781,7 @@ typedef struct { // // Definitions for Get user Callback Options command // -#define IPMI_TRANSPORT_GET_USER_CALLBACK_OPTIONS 0x1B +#define IPMI_TRANSPORT_GET_USER_CALLBACK_OPTIONS 0x1B // // Constants and Structure definitions for "Get user Callback Options" command to follow here @@ -802,17 +801,17 @@ typedef struct { // typedef union { struct { - UINT8 SessionState : 4; - UINT8 Reserved : 4; + UINT8 SessionState : 4; + UINT8 Reserved : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_SOL_SESSION_STATE; typedef struct { - IPMI_SOL_SESSION_STATE SessionState; - UINT8 PayloadInstance; - UINT8 FormatVersionMajor; // 1 - UINT8 FormatVersionMinor; // 0 + IPMI_SOL_SESSION_STATE SessionState; + UINT8 PayloadInstance; + UINT8 FormatVersionMajor; // 1 + UINT8 FormatVersionMinor; // 0 } IPMI_SOL_ACTIVATING_REQUEST; // @@ -827,28 +826,28 @@ typedef struct { // // SOL Configuration Parameters selector // -#define IPMI_SOL_CONFIGURATION_PARAMETER_SET_IN_PROGRESS 0 -#define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_ENABLE 1 -#define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_AUTHENTICATION 2 -#define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_CHARACTER_PARAM 3 -#define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_RETRY 4 -#define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_NV_BIT_RATE 5 -#define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_VOLATILE_BIT_RATE 6 -#define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_PAYLOAD_CHANNEL 7 -#define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_PAYLOAD_PORT 8 +#define IPMI_SOL_CONFIGURATION_PARAMETER_SET_IN_PROGRESS 0 +#define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_ENABLE 1 +#define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_AUTHENTICATION 2 +#define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_CHARACTER_PARAM 3 +#define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_RETRY 4 +#define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_NV_BIT_RATE 5 +#define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_VOLATILE_BIT_RATE 6 +#define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_PAYLOAD_CHANNEL 7 +#define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_PAYLOAD_PORT 8 typedef union { struct { - UINT8 ChannelNumber : 4; - UINT8 Reserved : 4; + UINT8 ChannelNumber : 4; + UINT8 Reserved : 4; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_SET_SOL_CONFIG_PARAM_CHANNEL_NUM; typedef struct { - IPMI_SET_SOL_CONFIG_PARAM_CHANNEL_NUM ChannelNumber; - UINT8 ParameterSelector; - UINT8 ParameterData[0]; + IPMI_SET_SOL_CONFIG_PARAM_CHANNEL_NUM ChannelNumber; + UINT8 ParameterSelector; + UINT8 ParameterData[0]; } IPMI_SET_SOL_CONFIGURATION_PARAMETERS_REQUEST; // @@ -861,24 +860,24 @@ typedef struct { // typedef union { struct { - UINT8 ChannelNumber : 4; - UINT8 Reserved : 3; - UINT8 GetParameter : 1; + UINT8 ChannelNumber : 4; + UINT8 Reserved : 3; + UINT8 GetParameter : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } IPMI_GET_SOL_CONFIG_PARAM_CHANNEL_NUM; typedef struct { - IPMI_GET_SOL_CONFIG_PARAM_CHANNEL_NUM ChannelNumber; - UINT8 ParameterSelector; - UINT8 SetSelector; - UINT8 BlockSelector; + IPMI_GET_SOL_CONFIG_PARAM_CHANNEL_NUM ChannelNumber; + UINT8 ParameterSelector; + UINT8 SetSelector; + UINT8 BlockSelector; } IPMI_GET_SOL_CONFIGURATION_PARAMETERS_REQUEST; typedef struct { - UINT8 CompletionCode; - UINT8 ParameterRevision; - UINT8 ParameterData[0]; + UINT8 CompletionCode; + UINT8 ParameterRevision; + UINT8 ParameterData[0]; } IPMI_GET_SOL_CONFIGURATION_PARAMETERS_RESPONSE; #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/LegacyBiosMpTable.h b/MdePkg/Include/IndustryStandard/LegacyBiosMpTable.h index a13150c..fa57f1c 100644 --- a/MdePkg/Include/IndustryStandard/LegacyBiosMpTable.h +++ b/MdePkg/Include/IndustryStandard/LegacyBiosMpTable.h @@ -12,7 +12,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #ifndef _LEGACY_BIOS_MPTABLE_H_ #define _LEGACY_BIOS_MPTABLE_H_ -#define EFI_LEGACY_MP_TABLE_REV_1_4 0x04 +#define EFI_LEGACY_MP_TABLE_REV_1_4 0x04 // // Define MP table structures. All are packed. @@ -21,41 +21,41 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define EFI_LEGACY_MP_TABLE_FLOATING_POINTER_SIGNATURE SIGNATURE_32 ('_', 'M', 'P', '_') typedef struct { - UINT32 Reserved1 : 6; - UINT32 MutipleClk : 1; - UINT32 Imcr : 1; - UINT32 Reserved2 : 24; + UINT32 Reserved1 : 6; + UINT32 MutipleClk : 1; + UINT32 Imcr : 1; + UINT32 Reserved2 : 24; } FEATUREBYTE2_5; typedef struct { - UINT32 Signature; - UINT32 PhysicalAddress; - UINT8 Length; - UINT8 SpecRev; - UINT8 Checksum; - UINT8 FeatureByte1; - FEATUREBYTE2_5 FeatureByte2_5; + UINT32 Signature; + UINT32 PhysicalAddress; + UINT8 Length; + UINT8 SpecRev; + UINT8 Checksum; + UINT8 FeatureByte1; + FEATUREBYTE2_5 FeatureByte2_5; } EFI_LEGACY_MP_TABLE_FLOATING_POINTER; #define EFI_LEGACY_MP_TABLE_HEADER_SIGNATURE SIGNATURE_32 ('P', 'C', 'M', 'P') typedef struct { - UINT32 Signature; - UINT16 BaseTableLength; - UINT8 SpecRev; - UINT8 Checksum; - CHAR8 OemId[8]; - CHAR8 OemProductId[12]; - UINT32 OemTablePointer; - UINT16 OemTableSize; - UINT16 EntryCount; - UINT32 LocalApicAddress; - UINT16 ExtendedTableLength; - UINT8 ExtendedChecksum; - UINT8 Reserved; + UINT32 Signature; + UINT16 BaseTableLength; + UINT8 SpecRev; + UINT8 Checksum; + CHAR8 OemId[8]; + CHAR8 OemProductId[12]; + UINT32 OemTablePointer; + UINT16 OemTableSize; + UINT16 EntryCount; + UINT32 LocalApicAddress; + UINT16 ExtendedTableLength; + UINT8 ExtendedChecksum; + UINT8 Reserved; } EFI_LEGACY_MP_TABLE_HEADER; typedef struct { - UINT8 EntryType; + UINT8 EntryType; } EFI_LEGACY_MP_TABLE_ENTRY_TYPE; // @@ -63,36 +63,36 @@ typedef struct { // #define EFI_LEGACY_MP_TABLE_ENTRY_TYPE_PROCESSOR 0x00 typedef struct { - UINT8 Enabled : 1; - UINT8 Bsp : 1; - UINT8 Reserved : 6; + UINT8 Enabled : 1; + UINT8 Bsp : 1; + UINT8 Reserved : 6; } EFI_LEGACY_MP_TABLE_ENTRY_PROCESSOR_FLAGS; typedef struct { - UINT32 Stepping : 4; - UINT32 Model : 4; - UINT32 Family : 4; - UINT32 Reserved : 20; + UINT32 Stepping : 4; + UINT32 Model : 4; + UINT32 Family : 4; + UINT32 Reserved : 20; } EFI_LEGACY_MP_TABLE_ENTRY_PROCESSOR_SIGNATURE; typedef struct { - UINT32 Fpu : 1; - UINT32 Reserved1 : 6; - UINT32 Mce : 1; - UINT32 Cx8 : 1; - UINT32 Apic : 1; - UINT32 Reserved2 : 22; + UINT32 Fpu : 1; + UINT32 Reserved1 : 6; + UINT32 Mce : 1; + UINT32 Cx8 : 1; + UINT32 Apic : 1; + UINT32 Reserved2 : 22; } EFI_LEGACY_MP_TABLE_ENTRY_PROCESSOR_FEATURES; typedef struct { - UINT8 EntryType; - UINT8 Id; - UINT8 Ver; - EFI_LEGACY_MP_TABLE_ENTRY_PROCESSOR_FLAGS Flags; - EFI_LEGACY_MP_TABLE_ENTRY_PROCESSOR_SIGNATURE Signature; - EFI_LEGACY_MP_TABLE_ENTRY_PROCESSOR_FEATURES Features; - UINT32 Reserved1; - UINT32 Reserved2; + UINT8 EntryType; + UINT8 Id; + UINT8 Ver; + EFI_LEGACY_MP_TABLE_ENTRY_PROCESSOR_FLAGS Flags; + EFI_LEGACY_MP_TABLE_ENTRY_PROCESSOR_SIGNATURE Signature; + EFI_LEGACY_MP_TABLE_ENTRY_PROCESSOR_FEATURES Features; + UINT32 Reserved1; + UINT32 Reserved2; } EFI_LEGACY_MP_TABLE_ENTRY_PROCESSOR; // @@ -100,82 +100,82 @@ typedef struct { // #define EFI_LEGACY_MP_TABLE_ENTRY_TYPE_BUS 0x01 typedef struct { - UINT8 EntryType; - UINT8 Id; - CHAR8 TypeString[6]; + UINT8 EntryType; + UINT8 Id; + CHAR8 TypeString[6]; } EFI_LEGACY_MP_TABLE_ENTRY_BUS; -#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_CBUS "CBUS " // Corollary CBus -#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_CBUSII "CBUSII" // Corollary CBUS II -#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_EISA "EISA " // Extended ISA -#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_FUTURE "FUTURE" // IEEE FutureBus -#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_INTERN "INTERN" // Internal bus -#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_ISA "ISA " // Industry Standard Architecture -#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_MBI "MBI " // Multibus I -#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_MBII "MBII " // Multibus II -#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_MCA "MCA " // Micro Channel Architecture -#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_MPI "MPI " // MPI -#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_MPSA "MPSA " // MPSA -#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_NUBUS "NUBUS " // Apple Macintosh NuBus -#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_PCI "PCI " // Peripheral Component Interconnect -#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_PCMCIA "PCMCIA" // PC Memory Card International Assoc. -#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_TC "TC " // DEC TurboChannel -#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_VL "VL " // VESA Local Bus -#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_VME "VME " // VMEbus -#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_XPRESS "XPRESS" // Express System Bus +#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_CBUS "CBUS " // Corollary CBus +#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_CBUSII "CBUSII" // Corollary CBUS II +#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_EISA "EISA " // Extended ISA +#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_FUTURE "FUTURE" // IEEE FutureBus +#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_INTERN "INTERN" // Internal bus +#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_ISA "ISA " // Industry Standard Architecture +#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_MBI "MBI " // Multibus I +#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_MBII "MBII " // Multibus II +#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_MCA "MCA " // Micro Channel Architecture +#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_MPI "MPI " // MPI +#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_MPSA "MPSA " // MPSA +#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_NUBUS "NUBUS " // Apple Macintosh NuBus +#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_PCI "PCI " // Peripheral Component Interconnect +#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_PCMCIA "PCMCIA" // PC Memory Card International Assoc. +#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_TC "TC " // DEC TurboChannel +#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_VL "VL " // VESA Local Bus +#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_VME "VME " // VMEbus +#define EFI_LEGACY_MP_TABLE_ENTRY_BUS_STRING_XPRESS "XPRESS" // Express System Bus // // Entry Type 2: I/O APIC. // -#define EFI_LEGACY_MP_TABLE_ENTRY_TYPE_IOAPIC 0x02 +#define EFI_LEGACY_MP_TABLE_ENTRY_TYPE_IOAPIC 0x02 typedef struct { - UINT8 Enabled : 1; - UINT8 Reserved : 7; + UINT8 Enabled : 1; + UINT8 Reserved : 7; } EFI_LEGACY_MP_TABLE_ENTRY_IOAPIC_FLAGS; typedef struct { - UINT8 EntryType; - UINT8 Id; - UINT8 Ver; - EFI_LEGACY_MP_TABLE_ENTRY_IOAPIC_FLAGS Flags; - UINT32 Address; + UINT8 EntryType; + UINT8 Id; + UINT8 Ver; + EFI_LEGACY_MP_TABLE_ENTRY_IOAPIC_FLAGS Flags; + UINT32 Address; } EFI_LEGACY_MP_TABLE_ENTRY_IOAPIC; // // Entry Type 3: I/O Interrupt Assignment. // -#define EFI_LEGACY_MP_TABLE_ENTRY_TYPE_IO_INT 0x03 +#define EFI_LEGACY_MP_TABLE_ENTRY_TYPE_IO_INT 0x03 typedef struct { - UINT16 Polarity : 2; - UINT16 Trigger : 2; - UINT16 Reserved : 12; + UINT16 Polarity : 2; + UINT16 Trigger : 2; + UINT16 Reserved : 12; } EFI_LEGACY_MP_TABLE_ENTRY_INT_FLAGS; typedef struct { - UINT8 IntNo : 2; - UINT8 Dev : 5; - UINT8 Reserved : 1; + UINT8 IntNo : 2; + UINT8 Dev : 5; + UINT8 Reserved : 1; } EFI_LEGACY_MP_TABLE_ENTRY_INT_FIELDS; typedef union { - EFI_LEGACY_MP_TABLE_ENTRY_INT_FIELDS fields; - UINT8 byte; + EFI_LEGACY_MP_TABLE_ENTRY_INT_FIELDS fields; + UINT8 byte; } EFI_LEGACY_MP_TABLE_ENTRY_INT_SOURCE_BUS_IRQ; typedef struct { - UINT8 EntryType; - UINT8 IntType; - EFI_LEGACY_MP_TABLE_ENTRY_INT_FLAGS Flags; - UINT8 SourceBusId; - EFI_LEGACY_MP_TABLE_ENTRY_INT_SOURCE_BUS_IRQ SourceBusIrq; - UINT8 DestApicId; - UINT8 DestApicIntIn; + UINT8 EntryType; + UINT8 IntType; + EFI_LEGACY_MP_TABLE_ENTRY_INT_FLAGS Flags; + UINT8 SourceBusId; + EFI_LEGACY_MP_TABLE_ENTRY_INT_SOURCE_BUS_IRQ SourceBusIrq; + UINT8 DestApicId; + UINT8 DestApicIntIn; } EFI_LEGACY_MP_TABLE_ENTRY_IO_INT; typedef enum { - EfiLegacyMpTableEntryIoIntTypeInt = 0, - EfiLegacyMpTableEntryIoIntTypeNmi = 1, - EfiLegacyMpTableEntryIoIntTypeSmi = 2, - EfiLegacyMpTableEntryIoIntTypeExtInt= 3, + EfiLegacyMpTableEntryIoIntTypeInt = 0, + EfiLegacyMpTableEntryIoIntTypeNmi = 1, + EfiLegacyMpTableEntryIoIntTypeSmi = 2, + EfiLegacyMpTableEntryIoIntTypeExtInt = 3, } EFI_LEGACY_MP_TABLE_ENTRY_IO_INT_TYPE; typedef enum { @@ -186,10 +186,10 @@ typedef enum { } EFI_LEGACY_MP_TABLE_ENTRY_IO_INT_FLAGS_POLARITY; typedef enum { - EfiLegacyMpTableEntryIoIntFlagsTriggerSpec = 0x0, - EfiLegacyMpTableEntryIoIntFlagsTriggerEdge = 0x1, - EfiLegacyMpTableEntryIoIntFlagsTriggerReserved = 0x2, - EfiLegacyMpTableEntryIoIntFlagsTriggerLevel = 0x3, + EfiLegacyMpTableEntryIoIntFlagsTriggerSpec = 0x0, + EfiLegacyMpTableEntryIoIntFlagsTriggerEdge = 0x1, + EfiLegacyMpTableEntryIoIntFlagsTriggerReserved = 0x2, + EfiLegacyMpTableEntryIoIntFlagsTriggerLevel = 0x3, } EFI_LEGACY_MP_TABLE_ENTRY_IO_INT_FLAGS_TRIGGER; // @@ -197,47 +197,47 @@ typedef enum { // #define EFI_LEGACY_MP_TABLE_ENTRY_TYPE_LOCAL_INT 0x04 typedef struct { - UINT8 EntryType; - UINT8 IntType; - EFI_LEGACY_MP_TABLE_ENTRY_INT_FLAGS Flags; - UINT8 SourceBusId; - EFI_LEGACY_MP_TABLE_ENTRY_INT_SOURCE_BUS_IRQ SourceBusIrq; - UINT8 DestApicId; - UINT8 DestApicIntIn; + UINT8 EntryType; + UINT8 IntType; + EFI_LEGACY_MP_TABLE_ENTRY_INT_FLAGS Flags; + UINT8 SourceBusId; + EFI_LEGACY_MP_TABLE_ENTRY_INT_SOURCE_BUS_IRQ SourceBusIrq; + UINT8 DestApicId; + UINT8 DestApicIntIn; } EFI_LEGACY_MP_TABLE_ENTRY_LOCAL_INT; typedef enum { - EfiLegacyMpTableEntryLocalIntTypeInt = 0, - EfiLegacyMpTableEntryLocalIntTypeNmi = 1, - EfiLegacyMpTableEntryLocalIntTypeSmi = 2, - EfiLegacyMpTableEntryLocalIntTypeExtInt = 3, + EfiLegacyMpTableEntryLocalIntTypeInt = 0, + EfiLegacyMpTableEntryLocalIntTypeNmi = 1, + EfiLegacyMpTableEntryLocalIntTypeSmi = 2, + EfiLegacyMpTableEntryLocalIntTypeExtInt = 3, } EFI_LEGACY_MP_TABLE_ENTRY_LOCAL_INT_TYPE; typedef enum { - EfiLegacyMpTableEntryLocalIntFlagsPolaritySpec = 0x0, - EfiLegacyMpTableEntryLocalIntFlagsPolarityActiveHigh= 0x1, - EfiLegacyMpTableEntryLocalIntFlagsPolarityReserved = 0x2, - EfiLegacyMpTableEntryLocalIntFlagsPolarityActiveLow = 0x3, + EfiLegacyMpTableEntryLocalIntFlagsPolaritySpec = 0x0, + EfiLegacyMpTableEntryLocalIntFlagsPolarityActiveHigh = 0x1, + EfiLegacyMpTableEntryLocalIntFlagsPolarityReserved = 0x2, + EfiLegacyMpTableEntryLocalIntFlagsPolarityActiveLow = 0x3, } EFI_LEGACY_MP_TABLE_ENTRY_LOCAL_INT_FLAGS_POLARITY; typedef enum { - EfiLegacyMpTableEntryLocalIntFlagsTriggerSpec = 0x0, - EfiLegacyMpTableEntryLocalIntFlagsTriggerEdge = 0x1, - EfiLegacyMpTableEntryLocalIntFlagsTriggerReserved = 0x2, - EfiLegacyMpTableEntryLocalIntFlagsTriggerLevel = 0x3, + EfiLegacyMpTableEntryLocalIntFlagsTriggerSpec = 0x0, + EfiLegacyMpTableEntryLocalIntFlagsTriggerEdge = 0x1, + EfiLegacyMpTableEntryLocalIntFlagsTriggerReserved = 0x2, + EfiLegacyMpTableEntryLocalIntFlagsTriggerLevel = 0x3, } EFI_LEGACY_MP_TABLE_ENTRY_LOCAL_INT_FLAGS_TRIGGER; // // Entry Type 128: System Address Space Mapping. // -#define EFI_LEGACY_MP_TABLE_ENTRY_EXT_TYPE_SYS_ADDR_SPACE_MAPPING 0x80 +#define EFI_LEGACY_MP_TABLE_ENTRY_EXT_TYPE_SYS_ADDR_SPACE_MAPPING 0x80 typedef struct { - UINT8 EntryType; - UINT8 Length; - UINT8 BusId; - UINT8 AddressType; - UINT64 AddressBase; - UINT64 AddressLength; + UINT8 EntryType; + UINT8 Length; + UINT8 BusId; + UINT8 AddressType; + UINT64 AddressBase; + UINT64 AddressLength; } EFI_LEGACY_MP_TABLE_ENTRY_EXT_SYS_ADDR_SPACE_MAPPING; typedef enum { @@ -251,36 +251,36 @@ typedef enum { // #define EFI_LEGACY_MP_TABLE_ENTRY_EXT_TYPE_BUS_HIERARCHY 0x81 typedef struct { - UINT8 SubtractiveDecode : 1; - UINT8 Reserved : 7; + UINT8 SubtractiveDecode : 1; + UINT8 Reserved : 7; } EFI_LEGACY_MP_TABLE_ENTRY_EXT_BUS_HIERARCHY_BUSINFO; typedef struct { - UINT8 EntryType; - UINT8 Length; - UINT8 BusId; - EFI_LEGACY_MP_TABLE_ENTRY_EXT_BUS_HIERARCHY_BUSINFO BusInfo; - UINT8 ParentBus; - UINT8 Reserved1; - UINT8 Reserved2; - UINT8 Reserved3; + UINT8 EntryType; + UINT8 Length; + UINT8 BusId; + EFI_LEGACY_MP_TABLE_ENTRY_EXT_BUS_HIERARCHY_BUSINFO BusInfo; + UINT8 ParentBus; + UINT8 Reserved1; + UINT8 Reserved2; + UINT8 Reserved3; } EFI_LEGACY_MP_TABLE_ENTRY_EXT_BUS_HIERARCHY; // // Entry Type 130: Compatibility Bus Address Space Modifier. // -#define EFI_LEGACY_MP_TABLE_ENTRY_EXT_TYPE_COMPAT_BUS_ADDR_SPACE_MODIFIER 0x82 +#define EFI_LEGACY_MP_TABLE_ENTRY_EXT_TYPE_COMPAT_BUS_ADDR_SPACE_MODIFIER 0x82 typedef struct { - UINT8 RangeMode : 1; - UINT8 Reserved : 7; + UINT8 RangeMode : 1; + UINT8 Reserved : 7; } EFI_LEGACY_MP_TABLE_ENTRY_EXT_COMPAT_BUS_ADDR_SPACE_MODIFIER_ADDR_MODE; typedef struct { - UINT8 EntryType; - UINT8 Length; - UINT8 BusId; - EFI_LEGACY_MP_TABLE_ENTRY_EXT_COMPAT_BUS_ADDR_SPACE_MODIFIER_ADDR_MODE AddrMode; - UINT32 PredefinedRangeList; + UINT8 EntryType; + UINT8 Length; + UINT8 BusId; + EFI_LEGACY_MP_TABLE_ENTRY_EXT_COMPAT_BUS_ADDR_SPACE_MODIFIER_ADDR_MODE AddrMode; + UINT32 PredefinedRangeList; } EFI_LEGACY_MP_TABLE_ENTRY_EXT_COMPAT_BUS_ADDR_SPACE_MODIFIER; #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/LowPowerIdleTable.h b/MdePkg/Include/IndustryStandard/LowPowerIdleTable.h index acfe8de..013b89d 100644 --- a/MdePkg/Include/IndustryStandard/LowPowerIdleTable.h +++ b/MdePkg/Include/IndustryStandard/LowPowerIdleTable.h @@ -12,6 +12,7 @@ - GAS - Generic Address Structure - LPI - Low Power Idle **/ + #ifndef _LOW_POWER_IDLE_TABLE_H_ #define _LOW_POWER_IDLE_TABLE_H_ @@ -22,53 +23,57 @@ /// /// LPI Structure Types /// -#define ACPI_LPI_STRUCTURE_TYPE_NATIVE_CSTATE 0x00 +#define ACPI_LPI_STRUCTURE_TYPE_NATIVE_CSTATE 0x00 /// /// Low Power Idle (LPI) State Flags /// typedef union { struct { - UINT32 Disabled : 1; ///< If set, LPI state is not used + UINT32 Disabled : 1; ///< If set, LPI state is not used + /** If set, Residency counter is not available for this LPI state and Residency Counter Frequency is invalid **/ - UINT32 CounterUnavailable : 1; - UINT32 Reserved : 30; ///< Reserved for future use. Must be zero + UINT32 CounterUnavailable : 1; + UINT32 Reserved : 30; ///< Reserved for future use. Must be zero } Bits; - UINT32 Data32; + UINT32 Data32; } ACPI_LPI_STATE_FLAGS; /// /// Low Power Idle (LPI) structure with Native C-state instruction entry trigger descriptor /// typedef struct { - UINT32 Type; ///< LPI State descriptor Type 0 - UINT32 Length; ///< Length of LPI state Descriptor Structure + UINT32 Type; ///< LPI State descriptor Type 0 + UINT32 Length; ///< Length of LPI state Descriptor Structure /// /// Unique LPI state identifier: zero based, monotonically increasing identifier /// - UINT16 UniqueId; - UINT8 Reserved[2]; ///< Must be Zero - ACPI_LPI_STATE_FLAGS Flags; ///< LPI state flags + UINT16 UniqueId; + UINT8 Reserved[2]; ///< Must be Zero + ACPI_LPI_STATE_FLAGS Flags; ///< LPI state flags + /** The LPI entry trigger, matching an existing _CST.Register object, represented as a Generic Address Structure. All processors must request this state or deeper to trigger. **/ - EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE EntryTrigger; - UINT32 Residency; ///< Minimum residency or break-even in uSec - UINT32 Latency; ///< Worst case exit latency in uSec + EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE EntryTrigger; + UINT32 Residency; ///< Minimum residency or break-even in uSec + UINT32 Latency; ///< Worst case exit latency in uSec + /** [optional] Residency counter, represented as a Generic Address Structure. If not present, Flags[1] bit should be set. **/ - EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE ResidencyCounter; + EFI_ACPI_6_1_GENERIC_ADDRESS_STRUCTURE ResidencyCounter; + /** [optional] Residency counter frequency in cycles per second. Value 0 indicates that counter runs at TSC frequency. Valid only if Residency Counter is present. **/ - UINT64 ResidencyCounterFrequency; + UINT64 ResidencyCounterFrequency; } ACPI_LPI_NATIVE_CSTATE_DESCRIPTOR; #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/Mbr.h b/MdePkg/Include/IndustryStandard/Mbr.h index a877795..814bd8e 100644 --- a/MdePkg/Include/IndustryStandard/Mbr.h +++ b/MdePkg/Include/IndustryStandard/Mbr.h @@ -9,44 +9,44 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #ifndef _MBR_H_ #define _MBR_H_ -#define MBR_SIGNATURE 0xaa55 +#define MBR_SIGNATURE 0xaa55 #define EXTENDED_DOS_PARTITION 0x05 #define EXTENDED_WINDOWS_PARTITION 0x0F -#define MAX_MBR_PARTITIONS 4 +#define MAX_MBR_PARTITIONS 4 -#define PMBR_GPT_PARTITION 0xEE -#define EFI_PARTITION 0xEF +#define PMBR_GPT_PARTITION 0xEE +#define EFI_PARTITION 0xEF -#define MBR_SIZE 512 +#define MBR_SIZE 512 #pragma pack(1) /// /// MBR Partition Entry /// typedef struct { - UINT8 BootIndicator; - UINT8 StartHead; - UINT8 StartSector; - UINT8 StartTrack; - UINT8 OSIndicator; - UINT8 EndHead; - UINT8 EndSector; - UINT8 EndTrack; - UINT8 StartingLBA[4]; - UINT8 SizeInLBA[4]; + UINT8 BootIndicator; + UINT8 StartHead; + UINT8 StartSector; + UINT8 StartTrack; + UINT8 OSIndicator; + UINT8 EndHead; + UINT8 EndSector; + UINT8 EndTrack; + UINT8 StartingLBA[4]; + UINT8 SizeInLBA[4]; } MBR_PARTITION_RECORD; /// /// MBR Partition Table /// typedef struct { - UINT8 BootStrapCode[440]; - UINT8 UniqueMbrSignature[4]; - UINT8 Unknown[2]; - MBR_PARTITION_RECORD Partition[MAX_MBR_PARTITIONS]; - UINT16 Signature; + UINT8 BootStrapCode[440]; + UINT8 UniqueMbrSignature[4]; + UINT8 Unknown[2]; + MBR_PARTITION_RECORD Partition[MAX_MBR_PARTITIONS]; + UINT16 Signature; } MASTER_BOOT_RECORD; #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/MemoryMappedConfigurationSpaceAccessTable.h b/MdePkg/Include/IndustryStandard/MemoryMappedConfigurationSpaceAccessTable.h index 8a4933d..0a75eeb 100644 --- a/MdePkg/Include/IndustryStandard/MemoryMappedConfigurationSpaceAccessTable.h +++ b/MdePkg/Include/IndustryStandard/MemoryMappedConfigurationSpaceAccessTable.h @@ -23,11 +23,11 @@ /// a number of base address allocation structures. /// typedef struct { - UINT64 BaseAddress; - UINT16 PciSegmentGroupNumber; - UINT8 StartBusNumber; - UINT8 EndBusNumber; - UINT32 Reserved; + UINT64 BaseAddress; + UINT16 PciSegmentGroupNumber; + UINT8 StartBusNumber; + UINT8 EndBusNumber; + UINT32 Reserved; } EFI_ACPI_MEMORY_MAPPED_ENHANCED_CONFIGURATION_SPACE_BASE_ADDRESS_ALLOCATION_STRUCTURE; /// @@ -35,8 +35,8 @@ typedef struct { /// must be defined in a platform specific manner. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT64 Reserved; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT64 Reserved; } EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_HEADER; /// diff --git a/MdePkg/Include/IndustryStandard/MemoryOverwriteRequestControlLock.h b/MdePkg/Include/IndustryStandard/MemoryOverwriteRequestControlLock.h index 2c53193..46d0509 100644 --- a/MdePkg/Include/IndustryStandard/MemoryOverwriteRequestControlLock.h +++ b/MdePkg/Include/IndustryStandard/MemoryOverwriteRequestControlLock.h @@ -16,7 +16,7 @@ 0xBB983CCF, 0x151D, 0x40E1, {0xA0, 0x7B, 0x4A, 0x17, 0xBE, 0x16, 0x82, 0x92} \ } -#define MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME L"MemoryOverwriteRequestControlLock" +#define MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME L"MemoryOverwriteRequestControlLock" // // VendorGuid: {BB983CCF-151D-40E1-A07B-4A17BE168292} @@ -32,6 +32,6 @@ // Getting the variable returns the internal state and never exposes the key. // -extern EFI_GUID gEfiMemoryOverwriteRequestControlLockGuid; +extern EFI_GUID gEfiMemoryOverwriteRequestControlLockGuid; #endif diff --git a/MdePkg/Include/IndustryStandard/Nvme.h b/MdePkg/Include/IndustryStandard/Nvme.h index f7a1a9f..7d4aee9 100644 --- a/MdePkg/Include/IndustryStandard/Nvme.h +++ b/MdePkg/Include/IndustryStandard/Nvme.h @@ -18,26 +18,25 @@ // // controller register offsets // -#define NVME_CAP_OFFSET 0x0000 // Controller Capabilities -#define NVME_VER_OFFSET 0x0008 // Version -#define NVME_INTMS_OFFSET 0x000c // Interrupt Mask Set -#define NVME_INTMC_OFFSET 0x0010 // Interrupt Mask Clear -#define NVME_CC_OFFSET 0x0014 // Controller Configuration -#define NVME_CSTS_OFFSET 0x001c // Controller Status -#define NVME_NSSR_OFFSET 0x0020 // NVM Subsystem Reset -#define NVME_AQA_OFFSET 0x0024 // Admin Queue Attributes -#define NVME_ASQ_OFFSET 0x0028 // Admin Submission Queue Base Address -#define NVME_ACQ_OFFSET 0x0030 // Admin Completion Queue Base Address -#define NVME_SQ0_OFFSET 0x1000 // Submission Queue 0 (admin) Tail Doorbell -#define NVME_CQ0_OFFSET 0x1004 // Completion Queue 0 (admin) Head Doorbell +#define NVME_CAP_OFFSET 0x0000 // Controller Capabilities +#define NVME_VER_OFFSET 0x0008 // Version +#define NVME_INTMS_OFFSET 0x000c // Interrupt Mask Set +#define NVME_INTMC_OFFSET 0x0010 // Interrupt Mask Clear +#define NVME_CC_OFFSET 0x0014 // Controller Configuration +#define NVME_CSTS_OFFSET 0x001c // Controller Status +#define NVME_NSSR_OFFSET 0x0020 // NVM Subsystem Reset +#define NVME_AQA_OFFSET 0x0024 // Admin Queue Attributes +#define NVME_ASQ_OFFSET 0x0028 // Admin Submission Queue Base Address +#define NVME_ACQ_OFFSET 0x0030 // Admin Completion Queue Base Address +#define NVME_SQ0_OFFSET 0x1000 // Submission Queue 0 (admin) Tail Doorbell +#define NVME_CQ0_OFFSET 0x1004 // Completion Queue 0 (admin) Head Doorbell // // These register offsets are defined as 0x1000 + (N * (4 << CAP.DSTRD)) // Get the doorbell stride bit shift value from the controller capabilities. // -#define NVME_SQTDBL_OFFSET(QID, DSTRD) 0x1000 + ((2 * (QID)) * (4 << (DSTRD))) // Submission Queue y (NVM) Tail Doorbell -#define NVME_CQHDBL_OFFSET(QID, DSTRD) 0x1000 + (((2 * (QID)) + 1) * (4 << (DSTRD))) // Completion Queue y (NVM) Head Doorbell - +#define NVME_SQTDBL_OFFSET(QID, DSTRD) 0x1000 + ((2 * (QID)) * (4 << (DSTRD))) // Submission Queue y (NVM) Tail Doorbell +#define NVME_CQHDBL_OFFSET(QID, DSTRD) 0x1000 + (((2 * (QID)) + 1) * (4 << (DSTRD))) // Completion Queue y (NVM) Head Doorbell #pragma pack(1) @@ -45,90 +44,90 @@ // 3.1.1 Offset 00h: CAP - Controller Capabilities // typedef struct { - UINT16 Mqes; // Maximum Queue Entries Supported - UINT8 Cqr:1; // Contiguous Queues Required - UINT8 Ams:2; // Arbitration Mechanism Supported - UINT8 Rsvd1:5; - UINT8 To; // Timeout - UINT16 Dstrd:4; - UINT16 Nssrs:1; // NVM Subsystem Reset Supported NSSRS - UINT16 Css:4; // Command Sets Supported - Bit 37 - UINT16 Rsvd3:7; - UINT8 Mpsmin:4; - UINT8 Mpsmax:4; - UINT8 Rsvd4; + UINT16 Mqes; // Maximum Queue Entries Supported + UINT8 Cqr : 1; // Contiguous Queues Required + UINT8 Ams : 2; // Arbitration Mechanism Supported + UINT8 Rsvd1 : 5; + UINT8 To; // Timeout + UINT16 Dstrd : 4; + UINT16 Nssrs : 1; // NVM Subsystem Reset Supported NSSRS + UINT16 Css : 4; // Command Sets Supported - Bit 37 + UINT16 Rsvd3 : 7; + UINT8 Mpsmin : 4; + UINT8 Mpsmax : 4; + UINT8 Rsvd4; } NVME_CAP; // // 3.1.2 Offset 08h: VS - Version // typedef struct { - UINT16 Mnr; // Minor version number - UINT16 Mjr; // Major version number + UINT16 Mnr; // Minor version number + UINT16 Mjr; // Major version number } NVME_VER; // // 3.1.5 Offset 14h: CC - Controller Configuration // typedef struct { - UINT16 En:1; // Enable - UINT16 Rsvd1:3; - UINT16 Css:3; // I/O Command Set Selected - UINT16 Mps:4; // Memory Page Size - UINT16 Ams:3; // Arbitration Mechanism Selected - UINT16 Shn:2; // Shutdown Notification - UINT8 Iosqes:4; // I/O Submission Queue Entry Size - UINT8 Iocqes:4; // I/O Completion Queue Entry Size - UINT8 Rsvd2; + UINT16 En : 1; // Enable + UINT16 Rsvd1 : 3; + UINT16 Css : 3; // I/O Command Set Selected + UINT16 Mps : 4; // Memory Page Size + UINT16 Ams : 3; // Arbitration Mechanism Selected + UINT16 Shn : 2; // Shutdown Notification + UINT8 Iosqes : 4; // I/O Submission Queue Entry Size + UINT8 Iocqes : 4; // I/O Completion Queue Entry Size + UINT8 Rsvd2; } NVME_CC; -#define NVME_CC_SHN_NORMAL_SHUTDOWN 1 -#define NVME_CC_SHN_ABRUPT_SHUTDOWN 2 +#define NVME_CC_SHN_NORMAL_SHUTDOWN 1 +#define NVME_CC_SHN_ABRUPT_SHUTDOWN 2 // // 3.1.6 Offset 1Ch: CSTS - Controller Status // typedef struct { - UINT32 Rdy:1; // Ready - UINT32 Cfs:1; // Controller Fatal Status - UINT32 Shst:2; // Shutdown Status - UINT32 Nssro:1; // NVM Subsystem Reset Occurred - UINT32 Rsvd1:27; + UINT32 Rdy : 1; // Ready + UINT32 Cfs : 1; // Controller Fatal Status + UINT32 Shst : 2; // Shutdown Status + UINT32 Nssro : 1; // NVM Subsystem Reset Occurred + UINT32 Rsvd1 : 27; } NVME_CSTS; -#define NVME_CSTS_SHST_SHUTDOWN_OCCURRING 1 -#define NVME_CSTS_SHST_SHUTDOWN_COMPLETED 2 +#define NVME_CSTS_SHST_SHUTDOWN_OCCURRING 1 +#define NVME_CSTS_SHST_SHUTDOWN_COMPLETED 2 // // 3.1.8 Offset 24h: AQA - Admin Queue Attributes // typedef struct { - UINT16 Asqs:12; // Submission Queue Size - UINT16 Rsvd1:4; - UINT16 Acqs:12; // Completion Queue Size - UINT16 Rsvd2:4; + UINT16 Asqs : 12; // Submission Queue Size + UINT16 Rsvd1 : 4; + UINT16 Acqs : 12; // Completion Queue Size + UINT16 Rsvd2 : 4; } NVME_AQA; // // 3.1.9 Offset 28h: ASQ - Admin Submission Queue Base Address // -#define NVME_ASQ UINT64 +#define NVME_ASQ UINT64 // // 3.1.10 Offset 30h: ACQ - Admin Completion Queue Base Address // -#define NVME_ACQ UINT64 +#define NVME_ACQ UINT64 // // 3.1.11 Offset (1000h + ((2y) * (4 << CAP.DSTRD))): SQyTDBL - Submission Queue y Tail Doorbell // typedef struct { - UINT16 Sqt; - UINT16 Rsvd1; + UINT16 Sqt; + UINT16 Rsvd1; } NVME_SQTDBL; // // 3.1.12 Offset (1000h + ((2y + 1) * (4 << CAP.DSTRD))): CQyHDBL - Completion Queue y Head Doorbell // typedef struct { - UINT16 Cqh; - UINT16 Rsvd1; + UINT16 Cqh; + UINT16 Rsvd1; } NVME_CQHDBL; // @@ -140,32 +139,32 @@ typedef struct { // // CDW 10, 11 // - UINT64 Slba; /* Starting Sector Address */ + UINT64 Slba; /* Starting Sector Address */ // // CDW 12 // - UINT16 Nlb; /* Number of Sectors */ - UINT16 Rsvd1:10; - UINT16 Prinfo:4; /* Protection Info Check */ - UINT16 Fua:1; /* Force Unit Access */ - UINT16 Lr:1; /* Limited Retry */ + UINT16 Nlb; /* Number of Sectors */ + UINT16 Rsvd1 : 10; + UINT16 Prinfo : 4; /* Protection Info Check */ + UINT16 Fua : 1; /* Force Unit Access */ + UINT16 Lr : 1; /* Limited Retry */ // // CDW 13 // - UINT32 Af:4; /* Access Frequency */ - UINT32 Al:2; /* Access Latency */ - UINT32 Sr:1; /* Sequential Request */ - UINT32 In:1; /* Incompressible */ - UINT32 Rsvd2:24; + UINT32 Af : 4; /* Access Frequency */ + UINT32 Al : 2; /* Access Latency */ + UINT32 Sr : 1; /* Sequential Request */ + UINT32 In : 1; /* Incompressible */ + UINT32 Rsvd2 : 24; // // CDW 14 // - UINT32 Eilbrt; /* Expected Initial Logical Block Reference Tag */ + UINT32 Eilbrt; /* Expected Initial Logical Block Reference Tag */ // // CDW 15 // - UINT16 Elbat; /* Expected Logical Block Application Tag */ - UINT16 Elbatm; /* Expected Logical Block Application Tag Mask */ + UINT16 Elbat; /* Expected Logical Block Application Tag */ + UINT16 Elbatm; /* Expected Logical Block Application Tag Mask */ } NVME_READ; // @@ -175,32 +174,32 @@ typedef struct { // // CDW 10, 11 // - UINT64 Slba; /* Starting Sector Address */ + UINT64 Slba; /* Starting Sector Address */ // // CDW 12 // - UINT16 Nlb; /* Number of Sectors */ - UINT16 Rsvd1:10; - UINT16 Prinfo:4; /* Protection Info Check */ - UINT16 Fua:1; /* Force Unit Access */ - UINT16 Lr:1; /* Limited Retry */ + UINT16 Nlb; /* Number of Sectors */ + UINT16 Rsvd1 : 10; + UINT16 Prinfo : 4; /* Protection Info Check */ + UINT16 Fua : 1; /* Force Unit Access */ + UINT16 Lr : 1; /* Limited Retry */ // // CDW 13 // - UINT32 Af:4; /* Access Frequency */ - UINT32 Al:2; /* Access Latency */ - UINT32 Sr:1; /* Sequential Request */ - UINT32 In:1; /* Incompressible */ - UINT32 Rsvd2:24; + UINT32 Af : 4; /* Access Frequency */ + UINT32 Al : 2; /* Access Latency */ + UINT32 Sr : 1; /* Sequential Request */ + UINT32 In : 1; /* Incompressible */ + UINT32 Rsvd2 : 24; // // CDW 14 // - UINT32 Ilbrt; /* Initial Logical Block Reference Tag */ + UINT32 Ilbrt; /* Initial Logical Block Reference Tag */ // // CDW 15 // - UINT16 Lbat; /* Logical Block Application Tag */ - UINT16 Lbatm; /* Logical Block Application Tag Mask */ + UINT16 Lbat; /* Logical Block Application Tag */ + UINT16 Lbatm; /* Logical Block Application Tag Mask */ } NVME_WRITE; // @@ -210,7 +209,7 @@ typedef struct { // // CDW 10 // - UINT32 Flush; /* Flush */ + UINT32 Flush; /* Flush */ } NVME_FLUSH; // @@ -220,12 +219,12 @@ typedef struct { // // CDW 10, 11 // - UINT64 Slba; /* Starting LBA */ + UINT64 Slba; /* Starting LBA */ // // CDW 12 // - UINT32 Nlb:16; /* Number of Logical Blocks */ - UINT32 Rsvd1:16; + UINT32 Nlb : 16; /* Number of Logical Blocks */ + UINT32 Rsvd1 : 16; } NVME_WRITE_UNCORRECTABLE; // @@ -235,28 +234,28 @@ typedef struct { // // CDW 10, 11 // - UINT64 Slba; /* Starting LBA */ + UINT64 Slba; /* Starting LBA */ // // CDW 12 // - UINT16 Nlb; /* Number of Logical Blocks */ - UINT16 Rsvd1:10; - UINT16 Prinfo:4; /* Protection Info Check */ - UINT16 Fua:1; /* Force Unit Access */ - UINT16 Lr:1; /* Limited Retry */ + UINT16 Nlb; /* Number of Logical Blocks */ + UINT16 Rsvd1 : 10; + UINT16 Prinfo : 4; /* Protection Info Check */ + UINT16 Fua : 1; /* Force Unit Access */ + UINT16 Lr : 1; /* Limited Retry */ // // CDW 13 // - UINT32 Rsvd2; + UINT32 Rsvd2; // // CDW 14 // - UINT32 Ilbrt; /* Initial Logical Block Reference Tag */ + UINT32 Ilbrt; /* Initial Logical Block Reference Tag */ // // CDW 15 // - UINT16 Lbat; /* Logical Block Application Tag */ - UINT16 Lbatm; /* Logical Block Application Tag Mask */ + UINT16 Lbat; /* Logical Block Application Tag */ + UINT16 Lbatm; /* Logical Block Application Tag Mask */ } NVME_WRITE_ZEROES; // @@ -266,28 +265,28 @@ typedef struct { // // CDW 10, 11 // - UINT64 Slba; /* Starting LBA */ + UINT64 Slba; /* Starting LBA */ // // CDW 12 // - UINT16 Nlb; /* Number of Logical Blocks */ - UINT16 Rsvd1:10; - UINT16 Prinfo:4; /* Protection Info Check */ - UINT16 Fua:1; /* Force Unit Access */ - UINT16 Lr:1; /* Limited Retry */ + UINT16 Nlb; /* Number of Logical Blocks */ + UINT16 Rsvd1 : 10; + UINT16 Prinfo : 4; /* Protection Info Check */ + UINT16 Fua : 1; /* Force Unit Access */ + UINT16 Lr : 1; /* Limited Retry */ // // CDW 13 // - UINT32 Rsvd2; + UINT32 Rsvd2; // // CDW 14 // - UINT32 Eilbrt; /* Expected Initial Logical Block Reference Tag */ + UINT32 Eilbrt; /* Expected Initial Logical Block Reference Tag */ // // CDW 15 // - UINT16 Elbat; /* Expected Logical Block Application Tag */ - UINT16 Elbatm; /* Expected Logical Block Application Tag Mask */ + UINT16 Elbat; /* Expected Logical Block Application Tag */ + UINT16 Elbatm; /* Expected Logical Block Application Tag Mask */ } NVME_COMPARE; typedef union { @@ -300,22 +299,22 @@ typedef union { } NVME_CMD; typedef struct { - UINT16 Mp; /* Maximum Power */ - UINT8 Rsvd1; /* Reserved as of Nvm Express 1.1 Spec */ - UINT8 Mps:1; /* Max Power Scale */ - UINT8 Nops:1; /* Non-Operational State */ - UINT8 Rsvd2:6; /* Reserved as of Nvm Express 1.1 Spec */ - UINT32 Enlat; /* Entry Latency */ - UINT32 Exlat; /* Exit Latency */ - UINT8 Rrt:5; /* Relative Read Throughput */ - UINT8 Rsvd3:3; /* Reserved as of Nvm Express 1.1 Spec */ - UINT8 Rrl:5; /* Relative Read Latency */ - UINT8 Rsvd4:3; /* Reserved as of Nvm Express 1.1 Spec */ - UINT8 Rwt:5; /* Relative Write Throughput */ - UINT8 Rsvd5:3; /* Reserved as of Nvm Express 1.1 Spec */ - UINT8 Rwl:5; /* Relative Write Latency */ - UINT8 Rsvd6:3; /* Reserved as of Nvm Express 1.1 Spec */ - UINT8 Rsvd7[16]; /* Reserved as of Nvm Express 1.1 Spec */ + UINT16 Mp; /* Maximum Power */ + UINT8 Rsvd1; /* Reserved as of Nvm Express 1.1 Spec */ + UINT8 Mps : 1; /* Max Power Scale */ + UINT8 Nops : 1; /* Non-Operational State */ + UINT8 Rsvd2 : 6; /* Reserved as of Nvm Express 1.1 Spec */ + UINT32 Enlat; /* Entry Latency */ + UINT32 Exlat; /* Exit Latency */ + UINT8 Rrt : 5; /* Relative Read Throughput */ + UINT8 Rsvd3 : 3; /* Reserved as of Nvm Express 1.1 Spec */ + UINT8 Rrl : 5; /* Relative Read Latency */ + UINT8 Rsvd4 : 3; /* Reserved as of Nvm Express 1.1 Spec */ + UINT8 Rwt : 5; /* Relative Write Throughput */ + UINT8 Rsvd5 : 3; /* Reserved as of Nvm Express 1.1 Spec */ + UINT8 Rwl : 5; /* Relative Write Latency */ + UINT8 Rsvd6 : 3; /* Reserved as of Nvm Express 1.1 Spec */ + UINT8 Rsvd7[16]; /* Reserved as of Nvm Express 1.1 Spec */ } NVME_PSDESCRIPTOR; // @@ -325,84 +324,84 @@ typedef struct { // // Controller Capabilities and Features 0-255 // - UINT16 Vid; /* PCI Vendor ID */ - UINT16 Ssvid; /* PCI sub-system vendor ID */ - UINT8 Sn[20]; /* Product serial number */ + UINT16 Vid; /* PCI Vendor ID */ + UINT16 Ssvid; /* PCI sub-system vendor ID */ + UINT8 Sn[20]; /* Product serial number */ - UINT8 Mn[40]; /* Product model number */ - UINT8 Fr[8]; /* Firmware Revision */ - UINT8 Rab; /* Recommended Arbitration Burst */ - UINT8 Ieee_oui[3]; /* Organization Unique Identifier */ - UINT8 Cmic; /* Multi-interface Capabilities */ - UINT8 Mdts; /* Maximum Data Transfer Size */ - UINT8 Cntlid[2]; /* Controller ID */ - UINT8 Rsvd1[176]; /* Reserved as of Nvm Express 1.1 Spec */ + UINT8 Mn[40]; /* Product model number */ + UINT8 Fr[8]; /* Firmware Revision */ + UINT8 Rab; /* Recommended Arbitration Burst */ + UINT8 Ieee_oui[3]; /* Organization Unique Identifier */ + UINT8 Cmic; /* Multi-interface Capabilities */ + UINT8 Mdts; /* Maximum Data Transfer Size */ + UINT8 Cntlid[2]; /* Controller ID */ + UINT8 Rsvd1[176]; /* Reserved as of Nvm Express 1.1 Spec */ // // Admin Command Set Attributes // - UINT16 Oacs; /* Optional Admin Command Support */ - #define NAMESPACE_MANAGEMENT_SUPPORTED BIT3 - #define FW_DOWNLOAD_ACTIVATE_SUPPORTED BIT2 - #define FORMAT_NVM_SUPPORTED BIT1 - #define SECURITY_SEND_RECEIVE_SUPPORTED BIT0 - UINT8 Acl; /* Abort Command Limit */ - UINT8 Aerl; /* Async Event Request Limit */ - UINT8 Frmw; /* Firmware updates */ - UINT8 Lpa; /* Log Page Attributes */ - UINT8 Elpe; /* Error Log Page Entries */ - UINT8 Npss; /* Number of Power States Support */ - UINT8 Avscc; /* Admin Vendor Specific Command Configuration */ - UINT8 Apsta; /* Autonomous Power State Transition Attributes */ + UINT16 Oacs; /* Optional Admin Command Support */ + #define NAMESPACE_MANAGEMENT_SUPPORTED BIT3 + #define FW_DOWNLOAD_ACTIVATE_SUPPORTED BIT2 + #define FORMAT_NVM_SUPPORTED BIT1 + #define SECURITY_SEND_RECEIVE_SUPPORTED BIT0 + UINT8 Acl; /* Abort Command Limit */ + UINT8 Aerl; /* Async Event Request Limit */ + UINT8 Frmw; /* Firmware updates */ + UINT8 Lpa; /* Log Page Attributes */ + UINT8 Elpe; /* Error Log Page Entries */ + UINT8 Npss; /* Number of Power States Support */ + UINT8 Avscc; /* Admin Vendor Specific Command Configuration */ + UINT8 Apsta; /* Autonomous Power State Transition Attributes */ // // Below fields before Rsvd2 are defined in NVM Express 1.3 Spec // - UINT16 Wctemp; /* Warning Composite Temperature Threshold */ - UINT16 Cctemp; /* Critical Composite Temperature Threshold */ - UINT16 Mtfa; /* Maximum Time for Firmware Activation */ - UINT32 Hmpre; /* Host Memory Buffer Preferred Size */ - UINT32 Hmmin; /* Host Memory Buffer Minimum Size */ - UINT8 Tnvmcap[16]; /* Total NVM Capacity */ - UINT8 Rsvd2[216]; /* Reserved as of NVM Express */ + UINT16 Wctemp; /* Warning Composite Temperature Threshold */ + UINT16 Cctemp; /* Critical Composite Temperature Threshold */ + UINT16 Mtfa; /* Maximum Time for Firmware Activation */ + UINT32 Hmpre; /* Host Memory Buffer Preferred Size */ + UINT32 Hmmin; /* Host Memory Buffer Minimum Size */ + UINT8 Tnvmcap[16]; /* Total NVM Capacity */ + UINT8 Rsvd2[216]; /* Reserved as of NVM Express */ // // NVM Command Set Attributes // - UINT8 Sqes; /* Submission Queue Entry Size */ - UINT8 Cqes; /* Completion Queue Entry Size */ - UINT16 Rsvd3; /* Reserved as of Nvm Express 1.1 Spec */ - UINT32 Nn; /* Number of Namespaces */ - UINT16 Oncs; /* Optional NVM Command Support */ - UINT16 Fuses; /* Fused Operation Support */ - UINT8 Fna; /* Format NVM Attributes */ - UINT8 Vwc; /* Volatile Write Cache */ - UINT16 Awun; /* Atomic Write Unit Normal */ - UINT16 Awupf; /* Atomic Write Unit Power Fail */ - UINT8 Nvscc; /* NVM Vendor Specific Command Configuration */ - UINT8 Rsvd4; /* Reserved as of Nvm Express 1.1 Spec */ - UINT16 Acwu; /* Atomic Compare & Write Unit */ - UINT16 Rsvd5; /* Reserved as of Nvm Express 1.1 Spec */ - UINT32 Sgls; /* SGL Support */ - UINT8 Rsvd6[164]; /* Reserved as of Nvm Express 1.1 Spec */ + UINT8 Sqes; /* Submission Queue Entry Size */ + UINT8 Cqes; /* Completion Queue Entry Size */ + UINT16 Rsvd3; /* Reserved as of Nvm Express 1.1 Spec */ + UINT32 Nn; /* Number of Namespaces */ + UINT16 Oncs; /* Optional NVM Command Support */ + UINT16 Fuses; /* Fused Operation Support */ + UINT8 Fna; /* Format NVM Attributes */ + UINT8 Vwc; /* Volatile Write Cache */ + UINT16 Awun; /* Atomic Write Unit Normal */ + UINT16 Awupf; /* Atomic Write Unit Power Fail */ + UINT8 Nvscc; /* NVM Vendor Specific Command Configuration */ + UINT8 Rsvd4; /* Reserved as of Nvm Express 1.1 Spec */ + UINT16 Acwu; /* Atomic Compare & Write Unit */ + UINT16 Rsvd5; /* Reserved as of Nvm Express 1.1 Spec */ + UINT32 Sgls; /* SGL Support */ + UINT8 Rsvd6[164]; /* Reserved as of Nvm Express 1.1 Spec */ // // I/O Command set Attributes // - UINT8 Rsvd7[1344]; /* Reserved as of Nvm Express 1.1 Spec */ + UINT8 Rsvd7[1344]; /* Reserved as of Nvm Express 1.1 Spec */ // // Power State Descriptors // - NVME_PSDESCRIPTOR PsDescriptor[32]; + NVME_PSDESCRIPTOR PsDescriptor[32]; - UINT8 VendorData[1024]; /* Vendor specific data */ + UINT8 VendorData[1024]; /* Vendor specific data */ } NVME_ADMIN_CONTROLLER_DATA; typedef struct { - UINT16 Ms; /* Metadata Size */ - UINT8 Lbads; /* LBA Data Size */ - UINT8 Rp:2; /* Relative Performance */ - #define LBAF_RP_BEST 00b - #define LBAF_RP_BETTER 01b - #define LBAF_RP_GOOD 10b - #define LBAF_RP_DEGRADED 11b - UINT8 Rsvd1:6; /* Reserved as of Nvm Express 1.1 Spec */ + UINT16 Ms; /* Metadata Size */ + UINT8 Lbads; /* LBA Data Size */ + UINT8 Rp : 2; /* Relative Performance */ + #define LBAF_RP_BEST 00b + #define LBAF_RP_BETTER 01b + #define LBAF_RP_GOOD 10b + #define LBAF_RP_DEGRADED 11b + UINT8 Rsvd1 : 6; /* Reserved as of Nvm Express 1.1 Spec */ } NVME_LBAFORMAT; // @@ -412,26 +411,26 @@ typedef struct { // // NVM Command Set Specific // - UINT64 Nsze; /* Namespace Size (total number of blocks in formatted namespace) */ - UINT64 Ncap; /* Namespace Capacity (max number of logical blocks) */ - UINT64 Nuse; /* Namespace Utilization */ - UINT8 Nsfeat; /* Namespace Features */ - UINT8 Nlbaf; /* Number of LBA Formats */ - UINT8 Flbas; /* Formatted LBA size */ - UINT8 Mc; /* Metadata Capabilities */ - UINT8 Dpc; /* End-to-end Data Protection capabilities */ - UINT8 Dps; /* End-to-end Data Protection Type Settings */ - UINT8 Nmic; /* Namespace Multi-path I/O and Namespace Sharing Capabilities */ - UINT8 Rescap; /* Reservation Capabilities */ - UINT8 Rsvd1[88]; /* Reserved as of Nvm Express 1.1 Spec */ - UINT64 Eui64; /* IEEE Extended Unique Identifier */ + UINT64 Nsze; /* Namespace Size (total number of blocks in formatted namespace) */ + UINT64 Ncap; /* Namespace Capacity (max number of logical blocks) */ + UINT64 Nuse; /* Namespace Utilization */ + UINT8 Nsfeat; /* Namespace Features */ + UINT8 Nlbaf; /* Number of LBA Formats */ + UINT8 Flbas; /* Formatted LBA size */ + UINT8 Mc; /* Metadata Capabilities */ + UINT8 Dpc; /* End-to-end Data Protection capabilities */ + UINT8 Dps; /* End-to-end Data Protection Type Settings */ + UINT8 Nmic; /* Namespace Multi-path I/O and Namespace Sharing Capabilities */ + UINT8 Rescap; /* Reservation Capabilities */ + UINT8 Rsvd1[88]; /* Reserved as of Nvm Express 1.1 Spec */ + UINT64 Eui64; /* IEEE Extended Unique Identifier */ // // LBA Format // - NVME_LBAFORMAT LbaFormat[16]; + NVME_LBAFORMAT LbaFormat[16]; - UINT8 Rsvd2[192]; /* Reserved as of Nvm Express 1.1 Spec */ - UINT8 VendorData[3712]; /* Vendor specific data */ + UINT8 Rsvd2[192]; /* Reserved as of Nvm Express 1.1 Spec */ + UINT8 VendorData[3712]; /* Vendor specific data */ } NVME_ADMIN_NAMESPACE_DATA; // @@ -441,8 +440,8 @@ typedef struct { // // CDW 10 // - UINT32 Cns:2; - UINT32 Rsvd1:30; + UINT32 Cns : 2; + UINT32 Rsvd1 : 30; } NVME_ADMIN_IDENTIFY; // @@ -452,16 +451,16 @@ typedef struct { // // CDW 10 // - UINT32 Qid:16; /* Queue Identifier */ - UINT32 Qsize:16; /* Queue Size */ + UINT32 Qid : 16; /* Queue Identifier */ + UINT32 Qsize : 16; /* Queue Size */ // // CDW 11 // - UINT32 Pc:1; /* Physically Contiguous */ - UINT32 Ien:1; /* Interrupts Enabled */ - UINT32 Rsvd1:14; /* reserved as of Nvm Express 1.1 Spec */ - UINT32 Iv:16; /* Interrupt Vector for MSI-X or MSI*/ + UINT32 Pc : 1; /* Physically Contiguous */ + UINT32 Ien : 1; /* Interrupts Enabled */ + UINT32 Rsvd1 : 14; /* reserved as of Nvm Express 1.1 Spec */ + UINT32 Iv : 16; /* Interrupt Vector for MSI-X or MSI*/ } NVME_ADMIN_CRIOCQ; // @@ -471,16 +470,16 @@ typedef struct { // // CDW 10 // - UINT32 Qid:16; /* Queue Identifier */ - UINT32 Qsize:16; /* Queue Size */ + UINT32 Qid : 16; /* Queue Identifier */ + UINT32 Qsize : 16; /* Queue Size */ // // CDW 11 // - UINT32 Pc:1; /* Physically Contiguous */ - UINT32 Qprio:2; /* Queue Priority */ - UINT32 Rsvd1:13; /* Reserved as of Nvm Express 1.1 Spec */ - UINT32 Cqid:16; /* Completion Queue ID */ + UINT32 Pc : 1; /* Physically Contiguous */ + UINT32 Qprio : 2; /* Queue Priority */ + UINT32 Rsvd1 : 13; /* Reserved as of Nvm Express 1.1 Spec */ + UINT32 Cqid : 16; /* Completion Queue ID */ } NVME_ADMIN_CRIOSQ; // @@ -490,8 +489,8 @@ typedef struct { // // CDW 10 // - UINT16 Qid; - UINT16 Rsvd1; + UINT16 Qid; + UINT16 Rsvd1; } NVME_ADMIN_DEIOCQ; // @@ -501,8 +500,8 @@ typedef struct { // // CDW 10 // - UINT16 Qid; - UINT16 Rsvd1; + UINT16 Qid; + UINT16 Rsvd1; } NVME_ADMIN_DEIOSQ; // @@ -512,8 +511,8 @@ typedef struct { // // CDW 10 // - UINT32 Sqid:16; /* Submission Queue identifier */ - UINT32 Cid:16; /* Command Identifier */ + UINT32 Sqid : 16; /* Submission Queue identifier */ + UINT32 Cid : 16; /* Command Identifier */ } NVME_ADMIN_ABORT; // @@ -523,9 +522,9 @@ typedef struct { // // CDW 10 // - UINT32 Fs:3; /* Submission Queue identifier */ - UINT32 Aa:2; /* Command Identifier */ - UINT32 Rsvd1:27; + UINT32 Fs : 3; /* Submission Queue identifier */ + UINT32 Aa : 2; /* Command Identifier */ + UINT32 Rsvd1 : 27; } NVME_ADMIN_FIRMWARE_ACTIVATE; // @@ -535,11 +534,11 @@ typedef struct { // // CDW 10 // - UINT32 Numd; /* Number of Dwords */ + UINT32 Numd; /* Number of Dwords */ // // CDW 11 // - UINT32 Ofst; /* Offset */ + UINT32 Ofst; /* Offset */ } NVME_ADMIN_FIRMWARE_IMAGE_DOWNLOAD; // @@ -549,9 +548,9 @@ typedef struct { // // CDW 10 // - UINT32 Fid:8; /* Feature Identifier */ - UINT32 Sel:3; /* Select */ - UINT32 Rsvd1:21; + UINT32 Fid : 8; /* Feature Identifier */ + UINT32 Sel : 3; /* Select */ + UINT32 Rsvd1 : 21; } NVME_ADMIN_GET_FEATURES; // @@ -561,13 +560,13 @@ typedef struct { // // CDW 10 // - UINT32 Lid:8; /* Log Page Identifier */ - #define LID_ERROR_INFO 0x1 - #define LID_SMART_INFO 0x2 - #define LID_FW_SLOT_INFO 0x3 - UINT32 Rsvd1:8; - UINT32 Numd:12; /* Number of Dwords */ - UINT32 Rsvd2:4; /* Reserved as of Nvm Express 1.1 Spec */ + UINT32 Lid : 8; /* Log Page Identifier */ + #define LID_ERROR_INFO 0x1 + #define LID_SMART_INFO 0x2 + #define LID_FW_SLOT_INFO 0x3 + UINT32 Rsvd1 : 8; + UINT32 Numd : 12; /* Number of Dwords */ + UINT32 Rsvd2 : 4; /* Reserved as of Nvm Express 1.1 Spec */ } NVME_ADMIN_GET_LOG_PAGE; // @@ -577,9 +576,9 @@ typedef struct { // // CDW 10 // - UINT32 Fid:8; /* Feature Identifier */ - UINT32 Rsvd1:23; - UINT32 Sv:1; /* Save */ + UINT32 Fid : 8; /* Feature Identifier */ + UINT32 Rsvd1 : 23; + UINT32 Sv : 1; /* Save */ } NVME_ADMIN_SET_FEATURES; // @@ -589,12 +588,12 @@ typedef struct { // // CDW 10 // - UINT32 Lbaf:4; /* LBA Format */ - UINT32 Ms:1; /* Metadata Settings */ - UINT32 Pi:3; /* Protection Information */ - UINT32 Pil:1; /* Protection Information Location */ - UINT32 Ses:3; /* Secure Erase Settings */ - UINT32 Rsvd1:20; + UINT32 Lbaf : 4; /* LBA Format */ + UINT32 Ms : 1; /* Metadata Settings */ + UINT32 Pi : 3; /* Protection Information */ + UINT32 Pil : 1; /* Protection Information Location */ + UINT32 Ses : 3; /* Secure Erase Settings */ + UINT32 Rsvd1 : 20; } NVME_ADMIN_FORMAT_NVM; // @@ -604,13 +603,13 @@ typedef struct { // // CDW 10 // - UINT32 Rsvd1:8; - UINT32 Spsp:16; /* SP Specific */ - UINT32 Secp:8; /* Security Protocol */ + UINT32 Rsvd1 : 8; + UINT32 Spsp : 16; /* SP Specific */ + UINT32 Secp : 8; /* Security Protocol */ // // CDW 11 // - UINT32 Al; /* Allocation Length */ + UINT32 Al; /* Allocation Length */ } NVME_ADMIN_SECURITY_RECEIVE; // @@ -620,13 +619,13 @@ typedef struct { // // CDW 10 // - UINT32 Rsvd1:8; - UINT32 Spsp:16; /* SP Specific */ - UINT32 Secp:8; /* Security Protocol */ + UINT32 Rsvd1 : 8; + UINT32 Spsp : 16; /* SP Specific */ + UINT32 Secp : 8; /* Security Protocol */ // // CDW 11 // - UINT32 Tl; /* Transfer Length */ + UINT32 Tl; /* Transfer Length */ } NVME_ADMIN_SECURITY_SEND; typedef union { @@ -647,18 +646,18 @@ typedef union { } NVME_ADMIN_CMD; typedef struct { - UINT32 Cdw10; - UINT32 Cdw11; - UINT32 Cdw12; - UINT32 Cdw13; - UINT32 Cdw14; - UINT32 Cdw15; + UINT32 Cdw10; + UINT32 Cdw11; + UINT32 Cdw12; + UINT32 Cdw13; + UINT32 Cdw14; + UINT32 Cdw15; } NVME_RAW; typedef union { - NVME_ADMIN_CMD Admin; // Union of Admin commands - NVME_CMD Nvm; // Union of Nvm commands - NVME_RAW Raw; + NVME_ADMIN_CMD Admin; // Union of Admin commands + NVME_CMD Nvm; // Union of Nvm commands + NVME_RAW Raw; } NVME_PAYLOAD; // @@ -668,34 +667,33 @@ typedef struct { // // CDW 0, Common to all commands // - UINT8 Opc; // Opcode - UINT8 Fuse:2; // Fused Operation - UINT8 Rsvd1:5; - UINT8 Psdt:1; // PRP or SGL for Data Transfer - UINT16 Cid; // Command Identifier + UINT8 Opc; // Opcode + UINT8 Fuse : 2; // Fused Operation + UINT8 Rsvd1 : 5; + UINT8 Psdt : 1; // PRP or SGL for Data Transfer + UINT16 Cid; // Command Identifier // // CDW 1 // - UINT32 Nsid; // Namespace Identifier + UINT32 Nsid; // Namespace Identifier // // CDW 2,3 // - UINT64 Rsvd2; + UINT64 Rsvd2; // // CDW 4,5 // - UINT64 Mptr; // Metadata Pointer + UINT64 Mptr; // Metadata Pointer // // CDW 6-9 // - UINT64 Prp[2]; // First and second PRP entries - - NVME_PAYLOAD Payload; + UINT64 Prp[2]; // First and second PRP entries + NVME_PAYLOAD Payload; } NVME_SQ; // @@ -705,71 +703,71 @@ typedef struct { // // CDW 0 // - UINT32 Dword0; + UINT32 Dword0; // // CDW 1 // - UINT32 Rsvd1; + UINT32 Rsvd1; // // CDW 2 // - UINT16 Sqhd; // Submission Queue Head Pointer - UINT16 Sqid; // Submission Queue Identifier + UINT16 Sqhd; // Submission Queue Head Pointer + UINT16 Sqid; // Submission Queue Identifier // // CDW 3 // - UINT16 Cid; // Command Identifier - UINT16 Pt:1; // Phase Tag - UINT16 Sc:8; // Status Code - UINT16 Sct:3; // Status Code Type - UINT16 Rsvd2:2; - UINT16 Mo:1; // More - UINT16 Dnr:1; // Do Not Retry + UINT16 Cid; // Command Identifier + UINT16 Pt : 1; // Phase Tag + UINT16 Sc : 8; // Status Code + UINT16 Sct : 3; // Status Code Type + UINT16 Rsvd2 : 2; + UINT16 Mo : 1; // More + UINT16 Dnr : 1; // Do Not Retry } NVME_CQ; // // Nvm Express Admin cmd opcodes // -#define NVME_ADMIN_DEIOSQ_CMD 0x00 -#define NVME_ADMIN_CRIOSQ_CMD 0x01 -#define NVME_ADMIN_GET_LOG_PAGE_CMD 0x02 -#define NVME_ADMIN_DEIOCQ_CMD 0x04 -#define NVME_ADMIN_CRIOCQ_CMD 0x05 -#define NVME_ADMIN_IDENTIFY_CMD 0x06 -#define NVME_ADMIN_ABORT_CMD 0x08 -#define NVME_ADMIN_SET_FEATURES_CMD 0x09 -#define NVME_ADMIN_GET_FEATURES_CMD 0x0A -#define NVME_ADMIN_ASYNC_EVENT_REQUEST_CMD 0x0C -#define NVME_ADMIN_NAMESACE_MANAGEMENT_CMD 0x0D -#define NVME_ADMIN_FW_COMMIT_CMD 0x10 -#define NVME_ADMIN_FW_IAMGE_DOWNLOAD_CMD 0x11 -#define NVME_ADMIN_NAMESACE_ATTACHMENT_CMD 0x15 -#define NVME_ADMIN_FORMAT_NVM_CMD 0x80 -#define NVME_ADMIN_SECURITY_SEND_CMD 0x81 -#define NVME_ADMIN_SECURITY_RECEIVE_CMD 0x82 - -#define NVME_IO_FLUSH_OPC 0 -#define NVME_IO_WRITE_OPC 1 -#define NVME_IO_READ_OPC 2 +#define NVME_ADMIN_DEIOSQ_CMD 0x00 +#define NVME_ADMIN_CRIOSQ_CMD 0x01 +#define NVME_ADMIN_GET_LOG_PAGE_CMD 0x02 +#define NVME_ADMIN_DEIOCQ_CMD 0x04 +#define NVME_ADMIN_CRIOCQ_CMD 0x05 +#define NVME_ADMIN_IDENTIFY_CMD 0x06 +#define NVME_ADMIN_ABORT_CMD 0x08 +#define NVME_ADMIN_SET_FEATURES_CMD 0x09 +#define NVME_ADMIN_GET_FEATURES_CMD 0x0A +#define NVME_ADMIN_ASYNC_EVENT_REQUEST_CMD 0x0C +#define NVME_ADMIN_NAMESACE_MANAGEMENT_CMD 0x0D +#define NVME_ADMIN_FW_COMMIT_CMD 0x10 +#define NVME_ADMIN_FW_IAMGE_DOWNLOAD_CMD 0x11 +#define NVME_ADMIN_NAMESACE_ATTACHMENT_CMD 0x15 +#define NVME_ADMIN_FORMAT_NVM_CMD 0x80 +#define NVME_ADMIN_SECURITY_SEND_CMD 0x81 +#define NVME_ADMIN_SECURITY_RECEIVE_CMD 0x82 + +#define NVME_IO_FLUSH_OPC 0 +#define NVME_IO_WRITE_OPC 1 +#define NVME_IO_READ_OPC 2 typedef enum { DeleteIOSubmissionQueueOpcode = NVME_ADMIN_DEIOSQ_CMD, CreateIOSubmissionQueueOpcode = NVME_ADMIN_CRIOSQ_CMD, - GetLogPageOpcode = NVME_ADMIN_GET_LOG_PAGE_CMD, + GetLogPageOpcode = NVME_ADMIN_GET_LOG_PAGE_CMD, DeleteIOCompletionQueueOpcode = NVME_ADMIN_DEIOCQ_CMD, CreateIOCompletionQueueOpcode = NVME_ADMIN_CRIOCQ_CMD, - IdentifyOpcode = NVME_ADMIN_IDENTIFY_CMD, - AbortOpcode = NVME_ADMIN_ABORT_CMD, - SetFeaturesOpcode = NVME_ADMIN_SET_FEATURES_CMD, - GetFeaturesOpcode = NVME_ADMIN_GET_FEATURES_CMD, - AsyncEventRequestOpcode = NVME_ADMIN_ASYNC_EVENT_REQUEST_CMD, - NamespaceManagementOpcode = NVME_ADMIN_NAMESACE_MANAGEMENT_CMD, - FirmwareCommitOpcode = NVME_ADMIN_FW_COMMIT_CMD, - FirmwareImageDownloadOpcode = NVME_ADMIN_FW_IAMGE_DOWNLOAD_CMD, - NamespaceAttachmentOpcode = NVME_ADMIN_NAMESACE_ATTACHMENT_CMD, - FormatNvmOpcode = NVME_ADMIN_FORMAT_NVM_CMD, - SecuritySendOpcode = NVME_ADMIN_SECURITY_SEND_CMD, - SecurityReceiveOpcode = NVME_ADMIN_SECURITY_RECEIVE_CMD + IdentifyOpcode = NVME_ADMIN_IDENTIFY_CMD, + AbortOpcode = NVME_ADMIN_ABORT_CMD, + SetFeaturesOpcode = NVME_ADMIN_SET_FEATURES_CMD, + GetFeaturesOpcode = NVME_ADMIN_GET_FEATURES_CMD, + AsyncEventRequestOpcode = NVME_ADMIN_ASYNC_EVENT_REQUEST_CMD, + NamespaceManagementOpcode = NVME_ADMIN_NAMESACE_MANAGEMENT_CMD, + FirmwareCommitOpcode = NVME_ADMIN_FW_COMMIT_CMD, + FirmwareImageDownloadOpcode = NVME_ADMIN_FW_IAMGE_DOWNLOAD_CMD, + NamespaceAttachmentOpcode = NVME_ADMIN_NAMESACE_ATTACHMENT_CMD, + FormatNvmOpcode = NVME_ADMIN_FORMAT_NVM_CMD, + SecuritySendOpcode = NVME_ADMIN_SECURITY_SEND_CMD, + SecurityReceiveOpcode = NVME_ADMIN_SECURITY_RECEIVE_CMD } NVME_ADMIN_COMMAND_OPCODE; // @@ -777,9 +775,9 @@ typedef enum { // (ref. spec. v1.1 figure 82). // typedef enum { -IdentifyNamespaceCns = 0x0, -IdentifyControllerCns = 0x1, -IdentifyActiveNsListCns = 0x2 + IdentifyNamespaceCns = 0x0, + IdentifyControllerCns = 0x1, + IdentifyActiveNsListCns = 0x2 } NVME_ADMIN_IDENTIFY_CNS; // @@ -787,9 +785,9 @@ IdentifyActiveNsListCns = 0x2 // (ref. spec. 1.1 figure 60). // typedef enum { - ActivateActionReplace = 0x0, + ActivateActionReplace = 0x0, ActivateActionReplaceActivate = 0x1, - ActivateActionActivate = 0x2 + ActivateActionActivate = 0x2 } NVME_FW_ACTIVATE_ACTION; // @@ -798,13 +796,13 @@ typedef enum { // typedef enum { FirmwareSlotCtrlChooses = 0x0, - FirmwareSlot1 = 0x1, - FirmwareSlot2 = 0x2, - FirmwareSlot3 = 0x3, - FirmwareSlot4 = 0x4, - FirmwareSlot5 = 0x5, - FirmwareSlot6 = 0x6, - FirmwareSlot7 = 0x7 + FirmwareSlot1 = 0x1, + FirmwareSlot2 = 0x2, + FirmwareSlot3 = 0x3, + FirmwareSlot4 = 0x4, + FirmwareSlot5 = 0x5, + FirmwareSlot6 = 0x6, + FirmwareSlot7 = 0x7 } NVME_FW_ACTIVATE_SLOT; // @@ -812,8 +810,8 @@ typedef enum { // (ref. spec. v1.1 Figure 73). // typedef enum { - ErrorInfoLogID = LID_ERROR_INFO, - SmartHealthInfoLogID = LID_SMART_INFO, + ErrorInfoLogID = LID_ERROR_INFO, + SmartHealthInfoLogID = LID_SMART_INFO, FirmwareSlotInfoLogID = LID_FW_SLOT_INFO } NVME_LOG_ID; @@ -825,13 +823,13 @@ typedef struct { // // Indicates the firmware slot from which the actively running firmware revision was loaded. // - UINT8 ActivelyRunningFwSlot:3; - UINT8 :1; + UINT8 ActivelyRunningFwSlot : 3; + UINT8 : 1; // // Indicates the firmware slot that is going to be activated at the next controller reset. If this field is 0h, then the controller does not indicate the firmware slot that is going to be activated at the next controller reset. // - UINT8 NextActiveFwSlot:3; - UINT8 :1; + UINT8 NextActiveFwSlot : 3; + UINT8 : 1; } NVME_ACTIVE_FW_INFO; // @@ -841,14 +839,14 @@ typedef struct { typedef struct { // // Specifies information about the active firmware revision. - //s - NVME_ACTIVE_FW_INFO ActiveFwInfo; - UINT8 Reserved1[7]; + // s + NVME_ACTIVE_FW_INFO ActiveFwInfo; + UINT8 Reserved1[7]; // // Contains the revision of the firmware downloaded to firmware slot 1/7. If no valid firmware revision is present or if this slot is unsupported, all zeros shall be returned. // - CHAR8 FwRevisionSlot[7][8]; - UINT8 Reserved2[448]; + CHAR8 FwRevisionSlot[7][8]; + UINT8 Reserved2[448]; } NVME_FW_SLOT_INFO_LOG; // @@ -859,82 +857,82 @@ typedef struct { // // This field indicates critical warnings for the state of the controller. // - UINT8 CriticalWarningAvailableSpare:1; - UINT8 CriticalWarningTemperature:1; - UINT8 CriticalWarningReliability:1; - UINT8 CriticalWarningMediaReadOnly:1; - UINT8 CriticalWarningVolatileBackup:1; - UINT8 CriticalWarningReserved:3; + UINT8 CriticalWarningAvailableSpare : 1; + UINT8 CriticalWarningTemperature : 1; + UINT8 CriticalWarningReliability : 1; + UINT8 CriticalWarningMediaReadOnly : 1; + UINT8 CriticalWarningVolatileBackup : 1; + UINT8 CriticalWarningReserved : 3; // // Contains a value corresponding to a temperature in degrees Kelvin that represents the current composite temperature of the controller and namespace(s) associated with that controller. The manner in which this value is computed is implementation specific and may not represent the actual temperature of any physical point in the NVM subsystem. // - UINT16 CompositeTemp; + UINT16 CompositeTemp; // // Contains a normalized percentage (0 to 100%) of the remaining spare capacity available. // - UINT8 AvailableSpare; + UINT8 AvailableSpare; // // When the Available Spare falls below the threshold indicated in this field, an asynchronous event completion may occur. The value is indicated as a normalized percentage (0 to 100%). // - UINT8 AvailableSpareThreshold; + UINT8 AvailableSpareThreshold; // // Contains a vendor specific estimate of the percentage of NVM subsystem life used based on the actual usage and the manufacturer's prediction of NVM life. A value of 100 indicates that the estimated endurance of the NVM in the NVM subsystem has been consumed, but may not indicate an NVM subsystem failure. The value is allowed to exceed 100. Percentages greater than 254 shall be represented as 255. This value shall be updated once per power-on hour (when the controller is not in a sleep state). // - UINT8 PercentageUsed; - UINT8 Reserved1[26]; + UINT8 PercentageUsed; + UINT8 Reserved1[26]; // // Contains the number of 512 byte data units the host has read from the controller; this value does not include metadata. // - UINT8 DataUnitsRead[16]; + UINT8 DataUnitsRead[16]; // // Contains the number of 512 byte data units the host has written to the controller; this value does not include metadata. // - UINT8 DataUnitsWritten[16]; + UINT8 DataUnitsWritten[16]; // // Contains the number of read commands completed by the controller. // - UINT8 HostReadCommands[16]; + UINT8 HostReadCommands[16]; // // Contains the number of write commands completed by the controller. // - UINT8 HostWriteCommands[16]; + UINT8 HostWriteCommands[16]; // // Contains the amount of time the controller is busy with I/O commands. This value is reported in minutes. // - UINT8 ControllerBusyTime[16]; + UINT8 ControllerBusyTime[16]; // // Contains the number of power cycles. // - UINT8 PowerCycles[16]; + UINT8 PowerCycles[16]; // // Contains the number of power-on hours. // - UINT8 PowerOnHours[16]; + UINT8 PowerOnHours[16]; // // Contains the number of unsafe shutdowns. // - UINT8 UnsafeShutdowns[16]; + UINT8 UnsafeShutdowns[16]; // // Contains the number of occurrences where the controller detected an unrecovered data integrity error. // - UINT8 MediaAndDataIntegrityErrors[16]; + UINT8 MediaAndDataIntegrityErrors[16]; // // Contains the number of Error Information log entries over the life of the controller. // - UINT8 NumberErrorInformationLogEntries[16]; + UINT8 NumberErrorInformationLogEntries[16]; // // Contains the amount of time in minutes that the controller is operational and the Composite Temperature is greater than or equal to the Warning Composite Temperature Threshold (WCTEMP) field and less than the Critical Composite Temperature Threshold (CCTEMP) field in the Identify Controller data structure in Figure 90. // - UINT32 WarningCompositeTemperatureTime; + UINT32 WarningCompositeTemperatureTime; // // Contains the amount of time in minutes that the controller is operational and the Composite Temperature is greater the Critical Composite Temperature Threshold (CCTEMP) field in the Identify Controller data structure in Figure 90. // - UINT32 CriticalCompositeTemperatureTime; + UINT32 CriticalCompositeTemperatureTime; // // Contains the current temperature in degrees Kelvin reported by the temperature sensor. An implementation that does not implement the temperature sensor reports a temperature of zero degrees Kelvin. // - UINT16 TemperatureSensor[8]; - UINT8 Reserved2[296]; + UINT16 TemperatureSensor[8]; + UINT8 Reserved2[296]; } NVME_SMART_HEALTH_INFO_LOG; #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/Pci22.h b/MdePkg/Include/IndustryStandard/Pci22.h index 81a854f..d083bc2 100644 --- a/MdePkg/Include/IndustryStandard/Pci22.h +++ b/MdePkg/Include/IndustryStandard/Pci22.h @@ -27,16 +27,16 @@ /// Section 6.1, PCI Local Bus Specification, 2.2 /// typedef struct { - UINT16 VendorId; - UINT16 DeviceId; - UINT16 Command; - UINT16 Status; - UINT8 RevisionID; - UINT8 ClassCode[3]; - UINT8 CacheLineSize; - UINT8 LatencyTimer; - UINT8 HeaderType; - UINT8 BIST; + UINT16 VendorId; + UINT16 DeviceId; + UINT16 Command; + UINT16 Status; + UINT8 RevisionID; + UINT8 ClassCode[3]; + UINT8 CacheLineSize; + UINT8 LatencyTimer; + UINT8 HeaderType; + UINT8 BIST; } PCI_DEVICE_INDEPENDENT_REGION; /// @@ -44,18 +44,18 @@ typedef struct { /// Section 6.1, PCI Local Bus Specification, 2.2 /// typedef struct { - UINT32 Bar[6]; - UINT32 CISPtr; - UINT16 SubsystemVendorID; - UINT16 SubsystemID; - UINT32 ExpansionRomBar; - UINT8 CapabilityPtr; - UINT8 Reserved1[3]; - UINT32 Reserved2; - UINT8 InterruptLine; - UINT8 InterruptPin; - UINT8 MinGnt; - UINT8 MaxLat; + UINT32 Bar[6]; + UINT32 CISPtr; + UINT16 SubsystemVendorID; + UINT16 SubsystemID; + UINT32 ExpansionRomBar; + UINT8 CapabilityPtr; + UINT8 Reserved1[3]; + UINT32 Reserved2; + UINT8 InterruptLine; + UINT8 InterruptPin; + UINT8 MinGnt; + UINT8 MaxLat; } PCI_DEVICE_HEADER_TYPE_REGION; /// @@ -63,8 +63,8 @@ typedef struct { /// Section 6.1, PCI Local Bus Specification, 2.2 /// typedef struct { - PCI_DEVICE_INDEPENDENT_REGION Hdr; - PCI_DEVICE_HEADER_TYPE_REGION Device; + PCI_DEVICE_INDEPENDENT_REGION Hdr; + PCI_DEVICE_HEADER_TYPE_REGION Device; } PCI_TYPE00; /// @@ -72,28 +72,28 @@ typedef struct { /// Section 3.2, PCI-PCI Bridge Architecture, Version 1.2 /// typedef struct { - UINT32 Bar[2]; - UINT8 PrimaryBus; - UINT8 SecondaryBus; - UINT8 SubordinateBus; - UINT8 SecondaryLatencyTimer; - UINT8 IoBase; - UINT8 IoLimit; - UINT16 SecondaryStatus; - UINT16 MemoryBase; - UINT16 MemoryLimit; - UINT16 PrefetchableMemoryBase; - UINT16 PrefetchableMemoryLimit; - UINT32 PrefetchableBaseUpper32; - UINT32 PrefetchableLimitUpper32; - UINT16 IoBaseUpper16; - UINT16 IoLimitUpper16; - UINT8 CapabilityPtr; - UINT8 Reserved[3]; - UINT32 ExpansionRomBAR; - UINT8 InterruptLine; - UINT8 InterruptPin; - UINT16 BridgeControl; + UINT32 Bar[2]; + UINT8 PrimaryBus; + UINT8 SecondaryBus; + UINT8 SubordinateBus; + UINT8 SecondaryLatencyTimer; + UINT8 IoBase; + UINT8 IoLimit; + UINT16 SecondaryStatus; + UINT16 MemoryBase; + UINT16 MemoryLimit; + UINT16 PrefetchableMemoryBase; + UINT16 PrefetchableMemoryLimit; + UINT32 PrefetchableBaseUpper32; + UINT32 PrefetchableLimitUpper32; + UINT16 IoBaseUpper16; + UINT16 IoLimitUpper16; + UINT8 CapabilityPtr; + UINT8 Reserved[3]; + UINT32 ExpansionRomBAR; + UINT8 InterruptLine; + UINT8 InterruptPin; + UINT16 BridgeControl; } PCI_BRIDGE_CONTROL_REGISTER; /// @@ -101,13 +101,13 @@ typedef struct { /// Section 3.2, PCI-PCI Bridge Architecture, Version 1.2 /// typedef struct { - PCI_DEVICE_INDEPENDENT_REGION Hdr; - PCI_BRIDGE_CONTROL_REGISTER Bridge; + PCI_DEVICE_INDEPENDENT_REGION Hdr; + PCI_BRIDGE_CONTROL_REGISTER Bridge; } PCI_TYPE01; typedef union { - PCI_TYPE00 Device; - PCI_TYPE01 Bridge; + PCI_TYPE00 Device; + PCI_TYPE01 Bridge; } PCI_TYPE_GENERIC; /// @@ -115,188 +115,188 @@ typedef union { /// Section 4.5.1, PC Card Standard. 8.0 /// typedef struct { - UINT32 CardBusSocketReg; ///< Cardbus Socket/ExCA Base - UINT8 Cap_Ptr; - UINT8 Reserved; - UINT16 SecondaryStatus; ///< Secondary Status - UINT8 PciBusNumber; ///< PCI Bus Number - UINT8 CardBusBusNumber; ///< CardBus Bus Number - UINT8 SubordinateBusNumber; ///< Subordinate Bus Number - UINT8 CardBusLatencyTimer; ///< CardBus Latency Timer - UINT32 MemoryBase0; ///< Memory Base Register 0 - UINT32 MemoryLimit0; ///< Memory Limit Register 0 - UINT32 MemoryBase1; - UINT32 MemoryLimit1; - UINT32 IoBase0; - UINT32 IoLimit0; ///< I/O Base Register 0 - UINT32 IoBase1; ///< I/O Limit Register 0 - UINT32 IoLimit1; - UINT8 InterruptLine; ///< Interrupt Line - UINT8 InterruptPin; ///< Interrupt Pin - UINT16 BridgeControl; ///< Bridge Control + UINT32 CardBusSocketReg; ///< Cardbus Socket/ExCA Base + UINT8 Cap_Ptr; + UINT8 Reserved; + UINT16 SecondaryStatus; ///< Secondary Status + UINT8 PciBusNumber; ///< PCI Bus Number + UINT8 CardBusBusNumber; ///< CardBus Bus Number + UINT8 SubordinateBusNumber; ///< Subordinate Bus Number + UINT8 CardBusLatencyTimer; ///< CardBus Latency Timer + UINT32 MemoryBase0; ///< Memory Base Register 0 + UINT32 MemoryLimit0; ///< Memory Limit Register 0 + UINT32 MemoryBase1; + UINT32 MemoryLimit1; + UINT32 IoBase0; + UINT32 IoLimit0; ///< I/O Base Register 0 + UINT32 IoBase1; ///< I/O Limit Register 0 + UINT32 IoLimit1; + UINT8 InterruptLine; ///< Interrupt Line + UINT8 InterruptPin; ///< Interrupt Pin + UINT16 BridgeControl; ///< Bridge Control } PCI_CARDBUS_CONTROL_REGISTER; // // Definitions of PCI class bytes and manipulation macros. // -#define PCI_CLASS_OLD 0x00 -#define PCI_CLASS_OLD_OTHER 0x00 -#define PCI_CLASS_OLD_VGA 0x01 - -#define PCI_CLASS_MASS_STORAGE 0x01 -#define PCI_CLASS_MASS_STORAGE_SCSI 0x00 -#define PCI_CLASS_MASS_STORAGE_IDE 0x01 -#define PCI_CLASS_MASS_STORAGE_FLOPPY 0x02 -#define PCI_CLASS_MASS_STORAGE_IPI 0x03 -#define PCI_CLASS_MASS_STORAGE_RAID 0x04 -#define PCI_CLASS_MASS_STORAGE_OTHER 0x80 - -#define PCI_CLASS_NETWORK 0x02 -#define PCI_CLASS_NETWORK_ETHERNET 0x00 -#define PCI_CLASS_NETWORK_TOKENRING 0x01 -#define PCI_CLASS_NETWORK_FDDI 0x02 -#define PCI_CLASS_NETWORK_ATM 0x03 -#define PCI_CLASS_NETWORK_ISDN 0x04 -#define PCI_CLASS_NETWORK_OTHER 0x80 - -#define PCI_CLASS_DISPLAY 0x03 -#define PCI_CLASS_DISPLAY_VGA 0x00 -#define PCI_IF_VGA_VGA 0x00 -#define PCI_IF_VGA_8514 0x01 -#define PCI_CLASS_DISPLAY_XGA 0x01 -#define PCI_CLASS_DISPLAY_3D 0x02 -#define PCI_CLASS_DISPLAY_OTHER 0x80 - -#define PCI_CLASS_MEDIA 0x04 -#define PCI_CLASS_MEDIA_VIDEO 0x00 -#define PCI_CLASS_MEDIA_AUDIO 0x01 -#define PCI_CLASS_MEDIA_TELEPHONE 0x02 -#define PCI_CLASS_MEDIA_OTHER 0x80 - -#define PCI_CLASS_MEMORY_CONTROLLER 0x05 -#define PCI_CLASS_MEMORY_RAM 0x00 -#define PCI_CLASS_MEMORY_FLASH 0x01 -#define PCI_CLASS_MEMORY_OTHER 0x80 - -#define PCI_CLASS_BRIDGE 0x06 -#define PCI_CLASS_BRIDGE_HOST 0x00 -#define PCI_CLASS_BRIDGE_ISA 0x01 -#define PCI_CLASS_BRIDGE_EISA 0x02 -#define PCI_CLASS_BRIDGE_MCA 0x03 -#define PCI_CLASS_BRIDGE_P2P 0x04 -#define PCI_IF_BRIDGE_P2P 0x00 -#define PCI_IF_BRIDGE_P2P_SUBTRACTIVE 0x01 -#define PCI_CLASS_BRIDGE_PCMCIA 0x05 -#define PCI_CLASS_BRIDGE_NUBUS 0x06 -#define PCI_CLASS_BRIDGE_CARDBUS 0x07 -#define PCI_CLASS_BRIDGE_RACEWAY 0x08 -#define PCI_CLASS_BRIDGE_OTHER 0x80 -#define PCI_CLASS_BRIDGE_ISA_PDECODE 0x80 - -#define PCI_CLASS_SCC 0x07 ///< Simple communications controllers -#define PCI_SUBCLASS_SERIAL 0x00 -#define PCI_IF_GENERIC_XT 0x00 -#define PCI_IF_16450 0x01 -#define PCI_IF_16550 0x02 -#define PCI_IF_16650 0x03 -#define PCI_IF_16750 0x04 -#define PCI_IF_16850 0x05 -#define PCI_IF_16950 0x06 -#define PCI_SUBCLASS_PARALLEL 0x01 -#define PCI_IF_PARALLEL_PORT 0x00 -#define PCI_IF_BI_DIR_PARALLEL_PORT 0x01 -#define PCI_IF_ECP_PARALLEL_PORT 0x02 -#define PCI_IF_1284_CONTROLLER 0x03 -#define PCI_IF_1284_DEVICE 0xFE -#define PCI_SUBCLASS_MULTIPORT_SERIAL 0x02 -#define PCI_SUBCLASS_MODEM 0x03 -#define PCI_IF_GENERIC_MODEM 0x00 -#define PCI_IF_16450_MODEM 0x01 -#define PCI_IF_16550_MODEM 0x02 -#define PCI_IF_16650_MODEM 0x03 -#define PCI_IF_16750_MODEM 0x04 -#define PCI_SUBCLASS_SCC_OTHER 0x80 - -#define PCI_CLASS_SYSTEM_PERIPHERAL 0x08 -#define PCI_SUBCLASS_PIC 0x00 -#define PCI_IF_8259_PIC 0x00 -#define PCI_IF_ISA_PIC 0x01 -#define PCI_IF_EISA_PIC 0x02 -#define PCI_IF_APIC_CONTROLLER 0x10 ///< I/O APIC interrupt controller , 32 byte none-prefetchable memory. -#define PCI_IF_APIC_CONTROLLER2 0x20 -#define PCI_SUBCLASS_DMA 0x01 -#define PCI_IF_8237_DMA 0x00 -#define PCI_IF_ISA_DMA 0x01 -#define PCI_IF_EISA_DMA 0x02 -#define PCI_SUBCLASS_TIMER 0x02 -#define PCI_IF_8254_TIMER 0x00 -#define PCI_IF_ISA_TIMER 0x01 -#define PCI_IF_EISA_TIMER 0x02 -#define PCI_SUBCLASS_RTC 0x03 -#define PCI_IF_GENERIC_RTC 0x00 -#define PCI_IF_ISA_RTC 0x01 -#define PCI_SUBCLASS_PNP_CONTROLLER 0x04 ///< HotPlug Controller -#define PCI_SUBCLASS_PERIPHERAL_OTHER 0x80 - -#define PCI_CLASS_INPUT_DEVICE 0x09 -#define PCI_SUBCLASS_KEYBOARD 0x00 -#define PCI_SUBCLASS_PEN 0x01 -#define PCI_SUBCLASS_MOUSE_CONTROLLER 0x02 -#define PCI_SUBCLASS_SCAN_CONTROLLER 0x03 -#define PCI_SUBCLASS_GAMEPORT 0x04 -#define PCI_IF_GAMEPORT 0x00 -#define PCI_IF_GAMEPORT1 0x10 -#define PCI_SUBCLASS_INPUT_OTHER 0x80 - -#define PCI_CLASS_DOCKING_STATION 0x0A +#define PCI_CLASS_OLD 0x00 +#define PCI_CLASS_OLD_OTHER 0x00 +#define PCI_CLASS_OLD_VGA 0x01 + +#define PCI_CLASS_MASS_STORAGE 0x01 +#define PCI_CLASS_MASS_STORAGE_SCSI 0x00 +#define PCI_CLASS_MASS_STORAGE_IDE 0x01 +#define PCI_CLASS_MASS_STORAGE_FLOPPY 0x02 +#define PCI_CLASS_MASS_STORAGE_IPI 0x03 +#define PCI_CLASS_MASS_STORAGE_RAID 0x04 +#define PCI_CLASS_MASS_STORAGE_OTHER 0x80 + +#define PCI_CLASS_NETWORK 0x02 +#define PCI_CLASS_NETWORK_ETHERNET 0x00 +#define PCI_CLASS_NETWORK_TOKENRING 0x01 +#define PCI_CLASS_NETWORK_FDDI 0x02 +#define PCI_CLASS_NETWORK_ATM 0x03 +#define PCI_CLASS_NETWORK_ISDN 0x04 +#define PCI_CLASS_NETWORK_OTHER 0x80 + +#define PCI_CLASS_DISPLAY 0x03 +#define PCI_CLASS_DISPLAY_VGA 0x00 +#define PCI_IF_VGA_VGA 0x00 +#define PCI_IF_VGA_8514 0x01 +#define PCI_CLASS_DISPLAY_XGA 0x01 +#define PCI_CLASS_DISPLAY_3D 0x02 +#define PCI_CLASS_DISPLAY_OTHER 0x80 + +#define PCI_CLASS_MEDIA 0x04 +#define PCI_CLASS_MEDIA_VIDEO 0x00 +#define PCI_CLASS_MEDIA_AUDIO 0x01 +#define PCI_CLASS_MEDIA_TELEPHONE 0x02 +#define PCI_CLASS_MEDIA_OTHER 0x80 + +#define PCI_CLASS_MEMORY_CONTROLLER 0x05 +#define PCI_CLASS_MEMORY_RAM 0x00 +#define PCI_CLASS_MEMORY_FLASH 0x01 +#define PCI_CLASS_MEMORY_OTHER 0x80 + +#define PCI_CLASS_BRIDGE 0x06 +#define PCI_CLASS_BRIDGE_HOST 0x00 +#define PCI_CLASS_BRIDGE_ISA 0x01 +#define PCI_CLASS_BRIDGE_EISA 0x02 +#define PCI_CLASS_BRIDGE_MCA 0x03 +#define PCI_CLASS_BRIDGE_P2P 0x04 +#define PCI_IF_BRIDGE_P2P 0x00 +#define PCI_IF_BRIDGE_P2P_SUBTRACTIVE 0x01 +#define PCI_CLASS_BRIDGE_PCMCIA 0x05 +#define PCI_CLASS_BRIDGE_NUBUS 0x06 +#define PCI_CLASS_BRIDGE_CARDBUS 0x07 +#define PCI_CLASS_BRIDGE_RACEWAY 0x08 +#define PCI_CLASS_BRIDGE_OTHER 0x80 +#define PCI_CLASS_BRIDGE_ISA_PDECODE 0x80 + +#define PCI_CLASS_SCC 0x07///< Simple communications controllers +#define PCI_SUBCLASS_SERIAL 0x00 +#define PCI_IF_GENERIC_XT 0x00 +#define PCI_IF_16450 0x01 +#define PCI_IF_16550 0x02 +#define PCI_IF_16650 0x03 +#define PCI_IF_16750 0x04 +#define PCI_IF_16850 0x05 +#define PCI_IF_16950 0x06 +#define PCI_SUBCLASS_PARALLEL 0x01 +#define PCI_IF_PARALLEL_PORT 0x00 +#define PCI_IF_BI_DIR_PARALLEL_PORT 0x01 +#define PCI_IF_ECP_PARALLEL_PORT 0x02 +#define PCI_IF_1284_CONTROLLER 0x03 +#define PCI_IF_1284_DEVICE 0xFE +#define PCI_SUBCLASS_MULTIPORT_SERIAL 0x02 +#define PCI_SUBCLASS_MODEM 0x03 +#define PCI_IF_GENERIC_MODEM 0x00 +#define PCI_IF_16450_MODEM 0x01 +#define PCI_IF_16550_MODEM 0x02 +#define PCI_IF_16650_MODEM 0x03 +#define PCI_IF_16750_MODEM 0x04 +#define PCI_SUBCLASS_SCC_OTHER 0x80 + +#define PCI_CLASS_SYSTEM_PERIPHERAL 0x08 +#define PCI_SUBCLASS_PIC 0x00 +#define PCI_IF_8259_PIC 0x00 +#define PCI_IF_ISA_PIC 0x01 +#define PCI_IF_EISA_PIC 0x02 +#define PCI_IF_APIC_CONTROLLER 0x10 ///< I/O APIC interrupt controller , 32 byte none-prefetchable memory. +#define PCI_IF_APIC_CONTROLLER2 0x20 +#define PCI_SUBCLASS_DMA 0x01 +#define PCI_IF_8237_DMA 0x00 +#define PCI_IF_ISA_DMA 0x01 +#define PCI_IF_EISA_DMA 0x02 +#define PCI_SUBCLASS_TIMER 0x02 +#define PCI_IF_8254_TIMER 0x00 +#define PCI_IF_ISA_TIMER 0x01 +#define PCI_IF_EISA_TIMER 0x02 +#define PCI_SUBCLASS_RTC 0x03 +#define PCI_IF_GENERIC_RTC 0x00 +#define PCI_IF_ISA_RTC 0x01 +#define PCI_SUBCLASS_PNP_CONTROLLER 0x04 ///< HotPlug Controller +#define PCI_SUBCLASS_PERIPHERAL_OTHER 0x80 + +#define PCI_CLASS_INPUT_DEVICE 0x09 +#define PCI_SUBCLASS_KEYBOARD 0x00 +#define PCI_SUBCLASS_PEN 0x01 +#define PCI_SUBCLASS_MOUSE_CONTROLLER 0x02 +#define PCI_SUBCLASS_SCAN_CONTROLLER 0x03 +#define PCI_SUBCLASS_GAMEPORT 0x04 +#define PCI_IF_GAMEPORT 0x00 +#define PCI_IF_GAMEPORT1 0x10 +#define PCI_SUBCLASS_INPUT_OTHER 0x80 + +#define PCI_CLASS_DOCKING_STATION 0x0A #define PCI_SUBCLASS_DOCKING_GENERIC 0x00 #define PCI_SUBCLASS_DOCKING_OTHER 0x80 -#define PCI_CLASS_PROCESSOR 0x0B -#define PCI_SUBCLASS_PROC_386 0x00 -#define PCI_SUBCLASS_PROC_486 0x01 -#define PCI_SUBCLASS_PROC_PENTIUM 0x02 -#define PCI_SUBCLASS_PROC_ALPHA 0x10 -#define PCI_SUBCLASS_PROC_POWERPC 0x20 -#define PCI_SUBCLASS_PROC_MIPS 0x30 -#define PCI_SUBCLASS_PROC_CO_PORC 0x40 ///< Co-Processor - -#define PCI_CLASS_SERIAL 0x0C -#define PCI_CLASS_SERIAL_FIREWIRE 0x00 -#define PCI_IF_1394 0x00 -#define PCI_IF_1394_OPEN_HCI 0x10 -#define PCI_CLASS_SERIAL_ACCESS_BUS 0x01 -#define PCI_CLASS_SERIAL_SSA 0x02 -#define PCI_CLASS_SERIAL_USB 0x03 -#define PCI_IF_UHCI 0x00 -#define PCI_IF_OHCI 0x10 -#define PCI_IF_USB_OTHER 0x80 -#define PCI_IF_USB_DEVICE 0xFE -#define PCI_CLASS_SERIAL_FIBRECHANNEL 0x04 -#define PCI_CLASS_SERIAL_SMB 0x05 - -#define PCI_CLASS_WIRELESS 0x0D -#define PCI_SUBCLASS_IRDA 0x00 -#define PCI_SUBCLASS_IR 0x01 -#define PCI_SUBCLASS_RF 0x10 -#define PCI_SUBCLASS_WIRELESS_OTHER 0x80 - -#define PCI_CLASS_INTELLIGENT_IO 0x0E - -#define PCI_CLASS_SATELLITE 0x0F -#define PCI_SUBCLASS_TV 0x01 -#define PCI_SUBCLASS_AUDIO 0x02 -#define PCI_SUBCLASS_VOICE 0x03 -#define PCI_SUBCLASS_DATA 0x04 - -#define PCI_SECURITY_CONTROLLER 0x10 ///< Encryption and decryption controller -#define PCI_SUBCLASS_NET_COMPUT 0x00 -#define PCI_SUBCLASS_ENTERTAINMENT 0x10 -#define PCI_SUBCLASS_SECURITY_OTHER 0x80 - -#define PCI_CLASS_DPIO 0x11 -#define PCI_SUBCLASS_DPIO 0x00 -#define PCI_SUBCLASS_DPIO_OTHER 0x80 +#define PCI_CLASS_PROCESSOR 0x0B +#define PCI_SUBCLASS_PROC_386 0x00 +#define PCI_SUBCLASS_PROC_486 0x01 +#define PCI_SUBCLASS_PROC_PENTIUM 0x02 +#define PCI_SUBCLASS_PROC_ALPHA 0x10 +#define PCI_SUBCLASS_PROC_POWERPC 0x20 +#define PCI_SUBCLASS_PROC_MIPS 0x30 +#define PCI_SUBCLASS_PROC_CO_PORC 0x40 ///< Co-Processor + +#define PCI_CLASS_SERIAL 0x0C +#define PCI_CLASS_SERIAL_FIREWIRE 0x00 +#define PCI_IF_1394 0x00 +#define PCI_IF_1394_OPEN_HCI 0x10 +#define PCI_CLASS_SERIAL_ACCESS_BUS 0x01 +#define PCI_CLASS_SERIAL_SSA 0x02 +#define PCI_CLASS_SERIAL_USB 0x03 +#define PCI_IF_UHCI 0x00 +#define PCI_IF_OHCI 0x10 +#define PCI_IF_USB_OTHER 0x80 +#define PCI_IF_USB_DEVICE 0xFE +#define PCI_CLASS_SERIAL_FIBRECHANNEL 0x04 +#define PCI_CLASS_SERIAL_SMB 0x05 + +#define PCI_CLASS_WIRELESS 0x0D +#define PCI_SUBCLASS_IRDA 0x00 +#define PCI_SUBCLASS_IR 0x01 +#define PCI_SUBCLASS_RF 0x10 +#define PCI_SUBCLASS_WIRELESS_OTHER 0x80 + +#define PCI_CLASS_INTELLIGENT_IO 0x0E + +#define PCI_CLASS_SATELLITE 0x0F +#define PCI_SUBCLASS_TV 0x01 +#define PCI_SUBCLASS_AUDIO 0x02 +#define PCI_SUBCLASS_VOICE 0x03 +#define PCI_SUBCLASS_DATA 0x04 + +#define PCI_SECURITY_CONTROLLER 0x10 ///< Encryption and decryption controller +#define PCI_SUBCLASS_NET_COMPUT 0x00 +#define PCI_SUBCLASS_ENTERTAINMENT 0x10 +#define PCI_SUBCLASS_SECURITY_OTHER 0x80 + +#define PCI_CLASS_DPIO 0x11 +#define PCI_SUBCLASS_DPIO 0x00 +#define PCI_SUBCLASS_DPIO_OTHER 0x80 /** Macro that checks whether the Base Class code of device matched. @@ -308,7 +308,8 @@ typedef struct { @retval FALSE Base Class code doesn't match the specified device. **/ -#define IS_CLASS1(_p, c) ((_p)->Hdr.ClassCode[2] == (c)) +#define IS_CLASS1(_p, c) ((_p)->Hdr.ClassCode[2] == (c)) + /** Macro that checks whether the Base Class code and Sub-Class code of device matched. @@ -320,7 +321,8 @@ typedef struct { @retval FALSE Base Class code and Sub-Class code don't match the specified device. **/ -#define IS_CLASS2(_p, c, s) (IS_CLASS1 (_p, c) && ((_p)->Hdr.ClassCode[1] == (s))) +#define IS_CLASS2(_p, c, s) (IS_CLASS1 (_p, c) && ((_p)->Hdr.ClassCode[1] == (s))) + /** Macro that checks whether the Base Class code, Sub-Class code and Interface code of device matched. @@ -333,7 +335,7 @@ typedef struct { @retval FALSE Base Class code, Sub-Class code and Interface code don't match the specified device. **/ -#define IS_CLASS3(_p, c, s, p) (IS_CLASS2 (_p, c, s) && ((_p)->Hdr.ClassCode[0] == (p))) +#define IS_CLASS3(_p, c, s, p) (IS_CLASS2 (_p, c, s) && ((_p)->Hdr.ClassCode[0] == (p))) /** Macro that checks whether device is a display controller. @@ -344,7 +346,8 @@ typedef struct { @retval FALSE Device is not a display controller. **/ -#define IS_PCI_DISPLAY(_p) IS_CLASS1 (_p, PCI_CLASS_DISPLAY) +#define IS_PCI_DISPLAY(_p) IS_CLASS1 (_p, PCI_CLASS_DISPLAY) + /** Macro that checks whether device is a VGA-compatible controller. @@ -354,7 +357,8 @@ typedef struct { @retval FALSE Device is not a VGA-compatible controller. **/ -#define IS_PCI_VGA(_p) IS_CLASS3 (_p, PCI_CLASS_DISPLAY, PCI_CLASS_DISPLAY_VGA, PCI_IF_VGA_VGA) +#define IS_PCI_VGA(_p) IS_CLASS3 (_p, PCI_CLASS_DISPLAY, PCI_CLASS_DISPLAY_VGA, PCI_IF_VGA_VGA) + /** Macro that checks whether device is an 8514-compatible controller. @@ -364,7 +368,8 @@ typedef struct { @retval FALSE Device is not an 8514-compatible controller. **/ -#define IS_PCI_8514(_p) IS_CLASS3 (_p, PCI_CLASS_DISPLAY, PCI_CLASS_DISPLAY_VGA, PCI_IF_VGA_8514) +#define IS_PCI_8514(_p) IS_CLASS3 (_p, PCI_CLASS_DISPLAY, PCI_CLASS_DISPLAY_VGA, PCI_IF_VGA_8514) + /** Macro that checks whether device is built before the Class Code field was defined. @@ -374,7 +379,8 @@ typedef struct { @retval FALSE Device is not an old device. **/ -#define IS_PCI_OLD(_p) IS_CLASS1 (_p, PCI_CLASS_OLD) +#define IS_PCI_OLD(_p) IS_CLASS1 (_p, PCI_CLASS_OLD) + /** Macro that checks whether device is a VGA-compatible device built before the Class Code field was defined. @@ -384,7 +390,8 @@ typedef struct { @retval FALSE Device is not an old VGA-compatible device. **/ -#define IS_PCI_OLD_VGA(_p) IS_CLASS2 (_p, PCI_CLASS_OLD, PCI_CLASS_OLD_VGA) +#define IS_PCI_OLD_VGA(_p) IS_CLASS2 (_p, PCI_CLASS_OLD, PCI_CLASS_OLD_VGA) + /** Macro that checks whether device is an IDE controller. @@ -394,7 +401,8 @@ typedef struct { @retval FALSE Device is not an IDE controller. **/ -#define IS_PCI_IDE(_p) IS_CLASS2 (_p, PCI_CLASS_MASS_STORAGE, PCI_CLASS_MASS_STORAGE_IDE) +#define IS_PCI_IDE(_p) IS_CLASS2 (_p, PCI_CLASS_MASS_STORAGE, PCI_CLASS_MASS_STORAGE_IDE) + /** Macro that checks whether device is a SCSI bus controller. @@ -404,7 +412,8 @@ typedef struct { @retval FALSE Device is not a SCSI bus controller. **/ -#define IS_PCI_SCSI(_p) IS_CLASS2 (_p, PCI_CLASS_MASS_STORAGE, PCI_CLASS_MASS_STORAGE_SCSI) +#define IS_PCI_SCSI(_p) IS_CLASS2 (_p, PCI_CLASS_MASS_STORAGE, PCI_CLASS_MASS_STORAGE_SCSI) + /** Macro that checks whether device is a RAID controller. @@ -414,7 +423,8 @@ typedef struct { @retval FALSE Device is not a RAID controller. **/ -#define IS_PCI_RAID(_p) IS_CLASS2 (_p, PCI_CLASS_MASS_STORAGE, PCI_CLASS_MASS_STORAGE_RAID) +#define IS_PCI_RAID(_p) IS_CLASS2 (_p, PCI_CLASS_MASS_STORAGE, PCI_CLASS_MASS_STORAGE_RAID) + /** Macro that checks whether device is an ISA bridge. @@ -424,7 +434,8 @@ typedef struct { @retval FALSE Device is not an ISA bridge. **/ -#define IS_PCI_LPC(_p) IS_CLASS2 (_p, PCI_CLASS_BRIDGE, PCI_CLASS_BRIDGE_ISA) +#define IS_PCI_LPC(_p) IS_CLASS2 (_p, PCI_CLASS_BRIDGE, PCI_CLASS_BRIDGE_ISA) + /** Macro that checks whether device is a PCI-to-PCI bridge. @@ -434,7 +445,8 @@ typedef struct { @retval FALSE Device is not a PCI-to-PCI bridge. **/ -#define IS_PCI_P2P(_p) IS_CLASS3 (_p, PCI_CLASS_BRIDGE, PCI_CLASS_BRIDGE_P2P, PCI_IF_BRIDGE_P2P) +#define IS_PCI_P2P(_p) IS_CLASS3 (_p, PCI_CLASS_BRIDGE, PCI_CLASS_BRIDGE_P2P, PCI_IF_BRIDGE_P2P) + /** Macro that checks whether device is a Subtractive Decode PCI-to-PCI bridge. @@ -444,7 +456,8 @@ typedef struct { @retval FALSE Device is not a Subtractive Decode PCI-to-PCI bridge. **/ -#define IS_PCI_P2P_SUB(_p) IS_CLASS3 (_p, PCI_CLASS_BRIDGE, PCI_CLASS_BRIDGE_P2P, PCI_IF_BRIDGE_P2P_SUBTRACTIVE) +#define IS_PCI_P2P_SUB(_p) IS_CLASS3 (_p, PCI_CLASS_BRIDGE, PCI_CLASS_BRIDGE_P2P, PCI_IF_BRIDGE_P2P_SUBTRACTIVE) + /** Macro that checks whether device is a 16550-compatible serial controller. @@ -454,7 +467,8 @@ typedef struct { @retval FALSE Device is not a 16550-compatible serial controller. **/ -#define IS_PCI_16550_SERIAL(_p) IS_CLASS3 (_p, PCI_CLASS_SCC, PCI_SUBCLASS_SERIAL, PCI_IF_16550) +#define IS_PCI_16550_SERIAL(_p) IS_CLASS3 (_p, PCI_CLASS_SCC, PCI_SUBCLASS_SERIAL, PCI_IF_16550) + /** Macro that checks whether device is a Universal Serial Bus controller. @@ -464,19 +478,20 @@ typedef struct { @retval FALSE Device is not a Universal Serial Bus controller. **/ -#define IS_PCI_USB(_p) IS_CLASS2 (_p, PCI_CLASS_SERIAL, PCI_CLASS_SERIAL_USB) +#define IS_PCI_USB(_p) IS_CLASS2 (_p, PCI_CLASS_SERIAL, PCI_CLASS_SERIAL_USB) // // the definition of Header Type // -#define HEADER_TYPE_DEVICE 0x00 -#define HEADER_TYPE_PCI_TO_PCI_BRIDGE 0x01 -#define HEADER_TYPE_CARDBUS_BRIDGE 0x02 -#define HEADER_TYPE_MULTI_FUNCTION 0x80 +#define HEADER_TYPE_DEVICE 0x00 +#define HEADER_TYPE_PCI_TO_PCI_BRIDGE 0x01 +#define HEADER_TYPE_CARDBUS_BRIDGE 0x02 +#define HEADER_TYPE_MULTI_FUNCTION 0x80 // // Mask of Header type // -#define HEADER_LAYOUT_CODE 0x7f +#define HEADER_LAYOUT_CODE 0x7f + /** Macro that checks whether device is a PCI-PCI bridge. @@ -486,7 +501,8 @@ typedef struct { @retval FALSE Device is not a PCI-PCI bridge. **/ -#define IS_PCI_BRIDGE(_p) (((_p)->Hdr.HeaderType & HEADER_LAYOUT_CODE) == (HEADER_TYPE_PCI_TO_PCI_BRIDGE)) +#define IS_PCI_BRIDGE(_p) (((_p)->Hdr.HeaderType & HEADER_LAYOUT_CODE) == (HEADER_TYPE_PCI_TO_PCI_BRIDGE)) + /** Macro that checks whether device is a CardBus bridge. @@ -496,7 +512,8 @@ typedef struct { @retval FALSE Device is not a CardBus bridge. **/ -#define IS_CARDBUS_BRIDGE(_p) (((_p)->Hdr.HeaderType & HEADER_LAYOUT_CODE) == (HEADER_TYPE_CARDBUS_BRIDGE)) +#define IS_CARDBUS_BRIDGE(_p) (((_p)->Hdr.HeaderType & HEADER_LAYOUT_CODE) == (HEADER_TYPE_CARDBUS_BRIDGE)) + /** Macro that checks whether device is a multiple functions device. @@ -506,38 +523,38 @@ typedef struct { @retval FALSE Device is not a multiple functions device. **/ -#define IS_PCI_MULTI_FUNC(_p) ((_p)->Hdr.HeaderType & HEADER_TYPE_MULTI_FUNCTION) +#define IS_PCI_MULTI_FUNC(_p) ((_p)->Hdr.HeaderType & HEADER_TYPE_MULTI_FUNCTION) /// /// Rom Base Address in Bridge, defined in PCI-to-PCI Bridge Architecture Specification, /// -#define PCI_BRIDGE_ROMBAR 0x38 - -#define PCI_MAX_BAR 0x0006 -#define PCI_MAX_CONFIG_OFFSET 0x0100 - -#define PCI_VENDOR_ID_OFFSET 0x00 -#define PCI_DEVICE_ID_OFFSET 0x02 -#define PCI_COMMAND_OFFSET 0x04 -#define PCI_PRIMARY_STATUS_OFFSET 0x06 -#define PCI_REVISION_ID_OFFSET 0x08 -#define PCI_CLASSCODE_OFFSET 0x09 -#define PCI_CACHELINE_SIZE_OFFSET 0x0C -#define PCI_LATENCY_TIMER_OFFSET 0x0D -#define PCI_HEADER_TYPE_OFFSET 0x0E -#define PCI_BIST_OFFSET 0x0F -#define PCI_BASE_ADDRESSREG_OFFSET 0x10 -#define PCI_CARDBUS_CIS_OFFSET 0x28 -#define PCI_SVID_OFFSET 0x2C ///< SubSystem Vendor id -#define PCI_SUBSYSTEM_VENDOR_ID_OFFSET 0x2C -#define PCI_SID_OFFSET 0x2E ///< SubSystem ID -#define PCI_SUBSYSTEM_ID_OFFSET 0x2E -#define PCI_EXPANSION_ROM_BASE 0x30 -#define PCI_CAPBILITY_POINTER_OFFSET 0x34 -#define PCI_INT_LINE_OFFSET 0x3C ///< Interrupt Line Register -#define PCI_INT_PIN_OFFSET 0x3D ///< Interrupt Pin Register -#define PCI_MAXGNT_OFFSET 0x3E ///< Max Grant Register -#define PCI_MAXLAT_OFFSET 0x3F ///< Max Latency Register +#define PCI_BRIDGE_ROMBAR 0x38 + +#define PCI_MAX_BAR 0x0006 +#define PCI_MAX_CONFIG_OFFSET 0x0100 + +#define PCI_VENDOR_ID_OFFSET 0x00 +#define PCI_DEVICE_ID_OFFSET 0x02 +#define PCI_COMMAND_OFFSET 0x04 +#define PCI_PRIMARY_STATUS_OFFSET 0x06 +#define PCI_REVISION_ID_OFFSET 0x08 +#define PCI_CLASSCODE_OFFSET 0x09 +#define PCI_CACHELINE_SIZE_OFFSET 0x0C +#define PCI_LATENCY_TIMER_OFFSET 0x0D +#define PCI_HEADER_TYPE_OFFSET 0x0E +#define PCI_BIST_OFFSET 0x0F +#define PCI_BASE_ADDRESSREG_OFFSET 0x10 +#define PCI_CARDBUS_CIS_OFFSET 0x28 +#define PCI_SVID_OFFSET 0x2C ///< SubSystem Vendor id +#define PCI_SUBSYSTEM_VENDOR_ID_OFFSET 0x2C +#define PCI_SID_OFFSET 0x2E ///< SubSystem ID +#define PCI_SUBSYSTEM_ID_OFFSET 0x2E +#define PCI_EXPANSION_ROM_BASE 0x30 +#define PCI_CAPBILITY_POINTER_OFFSET 0x34 +#define PCI_INT_LINE_OFFSET 0x3C ///< Interrupt Line Register +#define PCI_INT_PIN_OFFSET 0x3D ///< Interrupt Pin Register +#define PCI_MAXGNT_OFFSET 0x3E ///< Max Grant Register +#define PCI_MAXLAT_OFFSET 0x3F ///< Max Latency Register // // defined in PCI-to-PCI Bridge Architecture Specification @@ -552,35 +569,35 @@ typedef struct { /// /// Interrupt Line "Unknown" or "No connection" value defined for x86 based system /// -#define PCI_INT_LINE_UNKNOWN 0xFF +#define PCI_INT_LINE_UNKNOWN 0xFF /// /// PCI Access Data Format /// typedef union { struct { - UINT32 Reg : 8; - UINT32 Func : 3; - UINT32 Dev : 5; - UINT32 Bus : 8; - UINT32 Reserved : 7; - UINT32 Enable : 1; + UINT32 Reg : 8; + UINT32 Func : 3; + UINT32 Dev : 5; + UINT32 Bus : 8; + UINT32 Reserved : 7; + UINT32 Enable : 1; } Bits; - UINT32 Uint32; + UINT32 Uint32; } PCI_CONFIG_ACCESS_CF8; #pragma pack() -#define EFI_PCI_COMMAND_IO_SPACE BIT0 ///< 0x0001 -#define EFI_PCI_COMMAND_MEMORY_SPACE BIT1 ///< 0x0002 -#define EFI_PCI_COMMAND_BUS_MASTER BIT2 ///< 0x0004 -#define EFI_PCI_COMMAND_SPECIAL_CYCLE BIT3 ///< 0x0008 -#define EFI_PCI_COMMAND_MEMORY_WRITE_AND_INVALIDATE BIT4 ///< 0x0010 -#define EFI_PCI_COMMAND_VGA_PALETTE_SNOOP BIT5 ///< 0x0020 -#define EFI_PCI_COMMAND_PARITY_ERROR_RESPOND BIT6 ///< 0x0040 -#define EFI_PCI_COMMAND_STEPPING_CONTROL BIT7 ///< 0x0080 -#define EFI_PCI_COMMAND_SERR BIT8 ///< 0x0100 -#define EFI_PCI_COMMAND_FAST_BACK_TO_BACK BIT9 ///< 0x0200 +#define EFI_PCI_COMMAND_IO_SPACE BIT0 ///< 0x0001 +#define EFI_PCI_COMMAND_MEMORY_SPACE BIT1 ///< 0x0002 +#define EFI_PCI_COMMAND_BUS_MASTER BIT2 ///< 0x0004 +#define EFI_PCI_COMMAND_SPECIAL_CYCLE BIT3 ///< 0x0008 +#define EFI_PCI_COMMAND_MEMORY_WRITE_AND_INVALIDATE BIT4 ///< 0x0010 +#define EFI_PCI_COMMAND_VGA_PALETTE_SNOOP BIT5 ///< 0x0020 +#define EFI_PCI_COMMAND_PARITY_ERROR_RESPOND BIT6 ///< 0x0040 +#define EFI_PCI_COMMAND_STEPPING_CONTROL BIT7 ///< 0x0080 +#define EFI_PCI_COMMAND_SERR BIT8 ///< 0x0100 +#define EFI_PCI_COMMAND_FAST_BACK_TO_BACK BIT9 ///< 0x0200 // // defined in PCI-to-PCI Bridge Architecture Specification @@ -601,43 +618,43 @@ typedef union { // // Following are the PCI-CARDBUS bridge control bit, defined in PC Card Standard // -#define EFI_PCI_BRIDGE_CONTROL_IREQINT_ENABLE BIT7 ///< 0x0080 -#define EFI_PCI_BRIDGE_CONTROL_RANGE0_MEMORY_TYPE BIT8 ///< 0x0100 -#define EFI_PCI_BRIDGE_CONTROL_RANGE1_MEMORY_TYPE BIT9 ///< 0x0200 -#define EFI_PCI_BRIDGE_CONTROL_WRITE_POSTING_ENABLE BIT10 ///< 0x0400 +#define EFI_PCI_BRIDGE_CONTROL_IREQINT_ENABLE BIT7 ///< 0x0080 +#define EFI_PCI_BRIDGE_CONTROL_RANGE0_MEMORY_TYPE BIT8 ///< 0x0100 +#define EFI_PCI_BRIDGE_CONTROL_RANGE1_MEMORY_TYPE BIT9 ///< 0x0200 +#define EFI_PCI_BRIDGE_CONTROL_WRITE_POSTING_ENABLE BIT10 ///< 0x0400 // // Following are the PCI status control bit // -#define EFI_PCI_STATUS_CAPABILITY BIT4 ///< 0x0010 -#define EFI_PCI_STATUS_66MZ_CAPABLE BIT5 ///< 0x0020 -#define EFI_PCI_FAST_BACK_TO_BACK_CAPABLE BIT7 ///< 0x0080 -#define EFI_PCI_MASTER_DATA_PARITY_ERROR BIT8 ///< 0x0100 +#define EFI_PCI_STATUS_CAPABILITY BIT4 ///< 0x0010 +#define EFI_PCI_STATUS_66MZ_CAPABLE BIT5 ///< 0x0020 +#define EFI_PCI_FAST_BACK_TO_BACK_CAPABLE BIT7 ///< 0x0080 +#define EFI_PCI_MASTER_DATA_PARITY_ERROR BIT8 ///< 0x0100 /// /// defined in PC Card Standard /// -#define EFI_PCI_CARDBUS_BRIDGE_CAPABILITY_PTR 0x14 +#define EFI_PCI_CARDBUS_BRIDGE_CAPABILITY_PTR 0x14 #pragma pack(1) // // PCI Capability List IDs and records // -#define EFI_PCI_CAPABILITY_ID_PMI 0x01 -#define EFI_PCI_CAPABILITY_ID_AGP 0x02 -#define EFI_PCI_CAPABILITY_ID_VPD 0x03 -#define EFI_PCI_CAPABILITY_ID_SLOTID 0x04 -#define EFI_PCI_CAPABILITY_ID_MSI 0x05 -#define EFI_PCI_CAPABILITY_ID_HOTPLUG 0x06 -#define EFI_PCI_CAPABILITY_ID_SHPC 0x0C +#define EFI_PCI_CAPABILITY_ID_PMI 0x01 +#define EFI_PCI_CAPABILITY_ID_AGP 0x02 +#define EFI_PCI_CAPABILITY_ID_VPD 0x03 +#define EFI_PCI_CAPABILITY_ID_SLOTID 0x04 +#define EFI_PCI_CAPABILITY_ID_MSI 0x05 +#define EFI_PCI_CAPABILITY_ID_HOTPLUG 0x06 +#define EFI_PCI_CAPABILITY_ID_SHPC 0x0C /// /// Capabilities List Header /// Section 6.7, PCI Local Bus Specification, 2.2 /// typedef struct { - UINT8 CapabilityID; - UINT8 NextItemPtr; + UINT8 CapabilityID; + UINT8 NextItemPtr; } EFI_PCI_CAPABILITY_HDR; /// @@ -646,19 +663,19 @@ typedef struct { /// typedef union { struct { - UINT16 Version : 3; - UINT16 PmeClock : 1; - UINT16 Reserved : 1; - UINT16 DeviceSpecificInitialization : 1; - UINT16 AuxCurrent : 3; - UINT16 D1Support : 1; - UINT16 D2Support : 1; - UINT16 PmeSupport : 5; + UINT16 Version : 3; + UINT16 PmeClock : 1; + UINT16 Reserved : 1; + UINT16 DeviceSpecificInitialization : 1; + UINT16 AuxCurrent : 3; + UINT16 D1Support : 1; + UINT16 D2Support : 1; + UINT16 PmeSupport : 5; } Bits; - UINT16 Data; + UINT16 Data; } EFI_PCI_PMC; -#define EFI_PCI_PMC_D3_COLD_MASK (BIT15) +#define EFI_PCI_PMC_D3_COLD_MASK (BIT15) /// /// PMCSR - Power Management Control/Status @@ -666,22 +683,22 @@ typedef union { /// typedef union { struct { - UINT16 PowerState : 2; - UINT16 ReservedForPciExpress : 1; - UINT16 NoSoftReset : 1; - UINT16 Reserved : 4; - UINT16 PmeEnable : 1; - UINT16 DataSelect : 4; - UINT16 DataScale : 2; - UINT16 PmeStatus : 1; + UINT16 PowerState : 2; + UINT16 ReservedForPciExpress : 1; + UINT16 NoSoftReset : 1; + UINT16 Reserved : 4; + UINT16 PmeEnable : 1; + UINT16 DataSelect : 4; + UINT16 DataScale : 2; + UINT16 PmeStatus : 1; } Bits; - UINT16 Data; + UINT16 Data; } EFI_PCI_PMCSR; -#define PCI_POWER_STATE_D0 0 -#define PCI_POWER_STATE_D1 1 -#define PCI_POWER_STATE_D2 2 -#define PCI_POWER_STATE_D3_HOT 3 +#define PCI_POWER_STATE_D0 0 +#define PCI_POWER_STATE_D1 1 +#define PCI_POWER_STATE_D2 2 +#define PCI_POWER_STATE_D3_HOT 3 /// /// PMCSR_BSE - PMCSR PCI-to-PCI Bridge Support Extensions @@ -689,11 +706,11 @@ typedef union { /// typedef union { struct { - UINT8 Reserved : 6; - UINT8 B2B3 : 1; - UINT8 BusPowerClockControl : 1; + UINT8 Reserved : 6; + UINT8 B2B3 : 1; + UINT8 BusPowerClockControl : 1; } Bits; - UINT8 Uint8; + UINT8 Uint8; } EFI_PCI_PMCSR_BSE; /// @@ -701,11 +718,11 @@ typedef union { /// Section 3.2, PCI Power Management Interface Specification, Revision 1.2 /// typedef struct { - EFI_PCI_CAPABILITY_HDR Hdr; - EFI_PCI_PMC PMC; - EFI_PCI_PMCSR PMCSR; - EFI_PCI_PMCSR_BSE BridgeExtention; - UINT8 Data; + EFI_PCI_CAPABILITY_HDR Hdr; + EFI_PCI_PMC PMC; + EFI_PCI_PMCSR PMCSR; + EFI_PCI_PMCSR_BSE BridgeExtention; + UINT8 Data; } EFI_PCI_CAPABILITY_PMI; /// @@ -713,11 +730,11 @@ typedef struct { /// Section 6.1.4, Accelerated Graphics Port Interface Specification, Revision 1.0 /// typedef struct { - EFI_PCI_CAPABILITY_HDR Hdr; - UINT8 Rev; - UINT8 Reserved; - UINT32 Status; - UINT32 Command; + EFI_PCI_CAPABILITY_HDR Hdr; + UINT8 Rev; + UINT8 Reserved; + UINT32 Status; + UINT32 Command; } EFI_PCI_CAPABILITY_AGP; /// @@ -725,9 +742,9 @@ typedef struct { /// Appendix I, PCI Local Bus Specification, 2.2 /// typedef struct { - EFI_PCI_CAPABILITY_HDR Hdr; - UINT16 AddrReg; - UINT32 DataReg; + EFI_PCI_CAPABILITY_HDR Hdr; + UINT16 AddrReg; + UINT32 DataReg; } EFI_PCI_CAPABILITY_VPD; /// @@ -735,9 +752,9 @@ typedef struct { /// Section 3.2.6, PCI-to-PCI Bridge Architecture Specification, Revision 1.2 /// typedef struct { - EFI_PCI_CAPABILITY_HDR Hdr; - UINT8 ExpnsSlotReg; - UINT8 ChassisNo; + EFI_PCI_CAPABILITY_HDR Hdr; + UINT8 ExpnsSlotReg; + UINT8 ChassisNo; } EFI_PCI_CAPABILITY_SLOTID; /// @@ -745,10 +762,10 @@ typedef struct { /// Section 6.8.1, PCI Local Bus Specification, 2.2 /// typedef struct { - EFI_PCI_CAPABILITY_HDR Hdr; - UINT16 MsgCtrlReg; - UINT32 MsgAddrReg; - UINT16 MsgDataReg; + EFI_PCI_CAPABILITY_HDR Hdr; + UINT16 MsgCtrlReg; + UINT32 MsgAddrReg; + UINT16 MsgDataReg; } EFI_PCI_CAPABILITY_MSI32; /// @@ -756,11 +773,11 @@ typedef struct { /// Section 6.8.1, PCI Local Bus Specification, 2.2 /// typedef struct { - EFI_PCI_CAPABILITY_HDR Hdr; - UINT16 MsgCtrlReg; - UINT32 MsgAddrRegLsdw; - UINT32 MsgAddrRegMsdw; - UINT16 MsgDataReg; + EFI_PCI_CAPABILITY_HDR Hdr; + UINT16 MsgCtrlReg; + UINT32 MsgAddrRegLsdw; + UINT32 MsgAddrRegMsdw; + UINT16 MsgDataReg; } EFI_PCI_CAPABILITY_MSI64; /// @@ -768,38 +785,38 @@ typedef struct { /// CompactPCI Hot Swap Specification PICMG 2.1, R1.0 /// typedef struct { - EFI_PCI_CAPABILITY_HDR Hdr; + EFI_PCI_CAPABILITY_HDR Hdr; /// /// not finished - fields need to go here /// } EFI_PCI_CAPABILITY_HOTPLUG; -#define PCI_BAR_IDX0 0x00 -#define PCI_BAR_IDX1 0x01 -#define PCI_BAR_IDX2 0x02 -#define PCI_BAR_IDX3 0x03 -#define PCI_BAR_IDX4 0x04 -#define PCI_BAR_IDX5 0x05 +#define PCI_BAR_IDX0 0x00 +#define PCI_BAR_IDX1 0x01 +#define PCI_BAR_IDX2 0x02 +#define PCI_BAR_IDX3 0x03 +#define PCI_BAR_IDX4 0x04 +#define PCI_BAR_IDX5 0x05 /// /// EFI PCI Option ROM definitions /// -#define EFI_ROOT_BRIDGE_LIST 'eprb' -#define EFI_PCI_EXPANSION_ROM_HEADER_EFISIGNATURE 0x0EF1 ///< defined in UEFI Spec. +#define EFI_ROOT_BRIDGE_LIST 'eprb' +#define EFI_PCI_EXPANSION_ROM_HEADER_EFISIGNATURE 0x0EF1 ///< defined in UEFI Spec. -#define PCI_EXPANSION_ROM_HEADER_SIGNATURE 0xaa55 -#define PCI_DATA_STRUCTURE_SIGNATURE SIGNATURE_32 ('P', 'C', 'I', 'R') -#define PCI_CODE_TYPE_PCAT_IMAGE 0x00 -#define EFI_PCI_EXPANSION_ROM_HEADER_COMPRESSED 0x0001 ///< defined in UEFI spec. +#define PCI_EXPANSION_ROM_HEADER_SIGNATURE 0xaa55 +#define PCI_DATA_STRUCTURE_SIGNATURE SIGNATURE_32 ('P', 'C', 'I', 'R') +#define PCI_CODE_TYPE_PCAT_IMAGE 0x00 +#define EFI_PCI_EXPANSION_ROM_HEADER_COMPRESSED 0x0001 ///< defined in UEFI spec. /// /// Standard PCI Expansion ROM Header /// Section 13.4.2, Unified Extensible Firmware Interface Specification, Version 2.1 /// typedef struct { - UINT16 Signature; ///< 0xaa55 - UINT8 Reserved[0x16]; - UINT16 PcirOffset; + UINT16 Signature; ///< 0xaa55 + UINT8 Reserved[0x16]; + UINT16 PcirOffset; } PCI_EXPANSION_ROM_HEADER; /// @@ -807,11 +824,11 @@ typedef struct { /// Section 6.3.3.1, PCI Local Bus Specification, 2.2 /// typedef struct { - UINT16 Signature; ///< 0xaa55 - UINT8 Size512; - UINT8 InitEntryPoint[3]; - UINT8 Reserved[0x12]; - UINT16 PcirOffset; + UINT16 Signature; ///< 0xaa55 + UINT8 Size512; + UINT8 InitEntryPoint[3]; + UINT8 Reserved[0x12]; + UINT16 PcirOffset; } EFI_LEGACY_EXPANSION_ROM_HEADER; /// @@ -819,18 +836,18 @@ typedef struct { /// Section 6.3.1.2, PCI Local Bus Specification, 2.2 /// typedef struct { - UINT32 Signature; ///< "PCIR" - UINT16 VendorId; - UINT16 DeviceId; - UINT16 Reserved0; - UINT16 Length; - UINT8 Revision; - UINT8 ClassCode[3]; - UINT16 ImageLength; - UINT16 CodeRevision; - UINT8 CodeType; - UINT8 Indicator; - UINT16 Reserved1; + UINT32 Signature; ///< "PCIR" + UINT16 VendorId; + UINT16 DeviceId; + UINT16 Reserved0; + UINT16 Length; + UINT8 Revision; + UINT8 ClassCode[3]; + UINT16 ImageLength; + UINT16 CodeRevision; + UINT8 CodeType; + UINT8 Indicator; + UINT16 Reserved1; } PCI_DATA_STRUCTURE; /// @@ -838,22 +855,22 @@ typedef struct { /// Section 13.4.2, Unified Extensible Firmware Interface Specification, Version 2.1 /// typedef struct { - UINT16 Signature; ///< 0xaa55 - UINT16 InitializationSize; - UINT32 EfiSignature; ///< 0x0EF1 - UINT16 EfiSubsystem; - UINT16 EfiMachineType; - UINT16 CompressionType; - UINT8 Reserved[8]; - UINT16 EfiImageHeaderOffset; - UINT16 PcirOffset; + UINT16 Signature; ///< 0xaa55 + UINT16 InitializationSize; + UINT32 EfiSignature; ///< 0x0EF1 + UINT16 EfiSubsystem; + UINT16 EfiMachineType; + UINT16 CompressionType; + UINT8 Reserved[8]; + UINT16 EfiImageHeaderOffset; + UINT16 PcirOffset; } EFI_PCI_EXPANSION_ROM_HEADER; typedef union { - UINT8 *Raw; - PCI_EXPANSION_ROM_HEADER *Generic; - EFI_PCI_EXPANSION_ROM_HEADER *Efi; - EFI_LEGACY_EXPANSION_ROM_HEADER *PcAt; + UINT8 *Raw; + PCI_EXPANSION_ROM_HEADER *Generic; + EFI_PCI_EXPANSION_ROM_HEADER *Efi; + EFI_LEGACY_EXPANSION_ROM_HEADER *PcAt; } EFI_PCI_ROM_HEADER; #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/Pci23.h b/MdePkg/Include/IndustryStandard/Pci23.h index bee8de8..1c43d04 100644 --- a/MdePkg/Include/IndustryStandard/Pci23.h +++ b/MdePkg/Include/IndustryStandard/Pci23.h @@ -15,7 +15,7 @@ /// PCI_CLASS_MASS_STORAGE, Base Class 01h. /// ///@{ -#define PCI_CLASS_MASS_STORAGE_ATA 0x05 +#define PCI_CLASS_MASS_STORAGE_ATA 0x05 #define PCI_IF_MASS_STORAGE_SINGLE_DMA 0x20 #define PCI_IF_MASS_STORAGE_CHAINED_DMA 0x30 ///@} @@ -24,63 +24,63 @@ /// PCI_CLASS_NETWORK, Base Class 02h. /// ///@{ -#define PCI_CLASS_NETWORK_WORLDFIP 0x05 -#define PCI_CLASS_NETWORK_PICMG_MULTI_COMPUTING 0x06 +#define PCI_CLASS_NETWORK_WORLDFIP 0x05 +#define PCI_CLASS_NETWORK_PICMG_MULTI_COMPUTING 0x06 ///@} /// /// PCI_CLASS_BRIDGE, Base Class 06h. /// ///@{ -#define PCI_CLASS_BRIDGE_SEMI_TRANSPARENT_P2P 0x09 -#define PCI_IF_BRIDGE_SEMI_TRANSPARENT_P2P_PRIMARY 0x40 -#define PCI_IF_BRIDGE_SEMI_TRANSPARENT_P2P_SECONDARY 0x80 -#define PCI_CLASS_BRIDGE_INFINIBAND_TO_PCI 0x0A +#define PCI_CLASS_BRIDGE_SEMI_TRANSPARENT_P2P 0x09 +#define PCI_IF_BRIDGE_SEMI_TRANSPARENT_P2P_PRIMARY 0x40 +#define PCI_IF_BRIDGE_SEMI_TRANSPARENT_P2P_SECONDARY 0x80 +#define PCI_CLASS_BRIDGE_INFINIBAND_TO_PCI 0x0A ///@} /// /// PCI_CLASS_SCC, Base Class 07h. /// ///@{ -#define PCI_SUBCLASS_GPIB 0x04 -#define PCI_SUBCLASS_SMART_CARD 0x05 +#define PCI_SUBCLASS_GPIB 0x04 +#define PCI_SUBCLASS_SMART_CARD 0x05 ///@} /// /// PCI_CLASS_SERIAL, Base Class 0Ch. /// ///@{ -#define PCI_IF_EHCI 0x20 -#define PCI_CLASS_SERIAL_IB 0x06 -#define PCI_CLASS_SERIAL_IPMI 0x07 -#define PCI_IF_IPMI_SMIC 0x00 -#define PCI_IF_IPMI_KCS 0x01 ///< Keyboard Controller Style -#define PCI_IF_IPMI_BT 0x02 ///< Block Transfer -#define PCI_CLASS_SERIAL_SERCOS 0x08 -#define PCI_CLASS_SERIAL_CANBUS 0x09 +#define PCI_IF_EHCI 0x20 +#define PCI_CLASS_SERIAL_IB 0x06 +#define PCI_CLASS_SERIAL_IPMI 0x07 +#define PCI_IF_IPMI_SMIC 0x00 +#define PCI_IF_IPMI_KCS 0x01 ///< Keyboard Controller Style +#define PCI_IF_IPMI_BT 0x02 ///< Block Transfer +#define PCI_CLASS_SERIAL_SERCOS 0x08 +#define PCI_CLASS_SERIAL_CANBUS 0x09 ///@} /// /// PCI_CLASS_WIRELESS, Base Class 0Dh. /// ///@{ -#define PCI_SUBCLASS_BLUETOOTH 0x11 -#define PCI_SUBCLASS_BROADBAND 0x12 +#define PCI_SUBCLASS_BLUETOOTH 0x11 +#define PCI_SUBCLASS_BROADBAND 0x12 ///@} /// /// PCI_CLASS_DPIO, Base Class 11h. /// ///@{ -#define PCI_SUBCLASS_PERFORMANCE_COUNTERS 0x01 -#define PCI_SUBCLASS_COMMUNICATION_SYNCHRONIZATION 0x10 -#define PCI_SUBCLASS_MANAGEMENT_CARD 0x20 +#define PCI_SUBCLASS_PERFORMANCE_COUNTERS 0x01 +#define PCI_SUBCLASS_COMMUNICATION_SYNCHRONIZATION 0x10 +#define PCI_SUBCLASS_MANAGEMENT_CARD 0x20 ///@} /// /// defined in PCI Express Spec. /// -#define PCI_EXP_MAX_CONFIG_OFFSET 0x1000 +#define PCI_EXP_MAX_CONFIG_OFFSET 0x1000 /// /// PCI Capability List IDs and records. @@ -94,9 +94,9 @@ /// Section 7.2, PCI-X Addendum to the PCI Local Bus Specification, Revision 1.0b. /// typedef struct { - EFI_PCI_CAPABILITY_HDR Hdr; - UINT16 CommandReg; - UINT32 StatusReg; + EFI_PCI_CAPABILITY_HDR Hdr; + UINT16 CommandReg; + UINT32 StatusReg; } EFI_PCI_CAPABILITY_PCIX; /// @@ -104,11 +104,11 @@ typedef struct { /// Section 8.6.2, PCI-X Addendum to the PCI Local Bus Specification, Revision 1.0b. /// typedef struct { - EFI_PCI_CAPABILITY_HDR Hdr; - UINT16 SecStatusReg; - UINT32 StatusReg; - UINT32 SplitTransCtrlRegUp; - UINT32 SplitTransCtrlRegDn; + EFI_PCI_CAPABILITY_HDR Hdr; + UINT16 SecStatusReg; + UINT32 StatusReg; + UINT32 SplitTransCtrlRegUp; + UINT32 SplitTransCtrlRegDn; } EFI_PCI_CAPABILITY_PCIX_BRDG; /// @@ -116,12 +116,12 @@ typedef struct { /// Table H-1: Capability IDs, PCI Local Bus Specification, 2.3 /// typedef struct { - EFI_PCI_CAPABILITY_HDR Hdr; - UINT8 Length; + EFI_PCI_CAPABILITY_HDR Hdr; + UINT8 Length; } EFI_PCI_CAPABILITY_VENDOR_HDR; #pragma pack() -#define PCI_CODE_TYPE_EFI_IMAGE 0x03 +#define PCI_CODE_TYPE_EFI_IMAGE 0x03 #endif diff --git a/MdePkg/Include/IndustryStandard/Pci30.h b/MdePkg/Include/IndustryStandard/Pci30.h index 2aba2b2..108ab61 100644 --- a/MdePkg/Include/IndustryStandard/Pci30.h +++ b/MdePkg/Include/IndustryStandard/Pci30.h @@ -9,24 +9,23 @@ #ifndef __PCI30_H__ #define __PCI30_H__ - #include /// /// PCI_CLASS_MASS_STORAGE, Base Class 01h. /// ///@{ -#define PCI_CLASS_MASS_STORAGE_SATADPA 0x06 -#define PCI_IF_MASS_STORAGE_SATA 0x00 -#define PCI_IF_MASS_STORAGE_AHCI 0x01 +#define PCI_CLASS_MASS_STORAGE_SATADPA 0x06 +#define PCI_IF_MASS_STORAGE_SATA 0x00 +#define PCI_IF_MASS_STORAGE_AHCI 0x01 ///@} /// /// PCI_CLASS_WIRELESS, Base Class 0Dh. /// ///@{ -#define PCI_SUBCLASS_ETHERNET_80211A 0x20 -#define PCI_SUBCLASS_ETHERNET_80211B 0x21 +#define PCI_SUBCLASS_ETHERNET_80211A 0x20 +#define PCI_SUBCLASS_ETHERNET_80211B 0x21 ///@} /** @@ -38,7 +37,7 @@ @retval FALSE Device is not a SATA controller. **/ -#define IS_PCI_SATADPA(_p) IS_CLASS2 (_p, PCI_CLASS_MASS_STORAGE, PCI_CLASS_MASS_STORAGE_SATADPA) +#define IS_PCI_SATADPA(_p) IS_CLASS2 (_p, PCI_CLASS_MASS_STORAGE, PCI_CLASS_MASS_STORAGE_SATADPA) /// /// PCI Capability List IDs and records @@ -52,20 +51,20 @@ /// Section 5.1.2, PCI Firmware Specification, Revision 3.0 /// typedef struct { - UINT32 Signature; ///< "PCIR" - UINT16 VendorId; - UINT16 DeviceId; - UINT16 DeviceListOffset; - UINT16 Length; - UINT8 Revision; - UINT8 ClassCode[3]; - UINT16 ImageLength; - UINT16 CodeRevision; - UINT8 CodeType; - UINT8 Indicator; - UINT16 MaxRuntimeImageLength; - UINT16 ConfigUtilityCodeHeaderOffset; - UINT16 DMTFCLPEntryPointOffset; + UINT32 Signature; ///< "PCIR" + UINT16 VendorId; + UINT16 DeviceId; + UINT16 DeviceListOffset; + UINT16 Length; + UINT8 Revision; + UINT8 ClassCode[3]; + UINT16 ImageLength; + UINT16 CodeRevision; + UINT8 CodeType; + UINT8 Indicator; + UINT16 MaxRuntimeImageLength; + UINT16 ConfigUtilityCodeHeaderOffset; + UINT16 DMTFCLPEntryPointOffset; } PCI_3_0_DATA_STRUCTURE; #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/PciCodeId.h b/MdePkg/Include/IndustryStandard/PciCodeId.h index 492bc9e..45f32e6 100644 --- a/MdePkg/Include/IndustryStandard/PciCodeId.h +++ b/MdePkg/Include/IndustryStandard/PciCodeId.h @@ -10,70 +10,69 @@ #ifndef __PCI_CODE_ID_H__ #define __PCI_CODE_ID_H__ - /// /// PCI_CLASS_MASS_STORAGE, Base Class 01h. /// ///@{ -#define PCI_IF_MASS_STORAGE_SCSI_VENDOR_SPECIFIC 0x00 -#define PCI_IF_MASS_STORAGE_SCSI_DEVICE_PQI 0x11 -#define PCI_IF_MASS_STORAGE_SCSI_CONTROLLER_PQI 0x12 -#define PCI_IF_MASS_STORAGE_SCSI_DEVICE_CONTROLLER_PQI 0x13 -#define PCI_IF_MASS_STORAGE_SCSI_DEVICE_NVM_EXPRESS 0x21 -#define PCI_IF_MASS_STORAGE_SATA_SERIAL_BUS 0x02 -#define PCI_CLASS_MASS_STORAGE_SAS 0x07 -#define PCI_IF_MASS_STORAGE_SAS 0x00 -#define PCI_IF_MASS_STORAGE_SAS_SERIAL_BUS 0x01 -#define PCI_CLASS_MASS_STORAGE_SOLID_STATE 0x08 -#define PCI_IF_MASS_STORAGE_SOLID_STATE 0x00 -#define PCI_IF_MASS_STORAGE_SOLID_STATE_NVMHCI 0x01 -#define PCI_IF_MASS_STORAGE_SOLID_STATE_ENTERPRISE_NVMHCI 0x02 +#define PCI_IF_MASS_STORAGE_SCSI_VENDOR_SPECIFIC 0x00 +#define PCI_IF_MASS_STORAGE_SCSI_DEVICE_PQI 0x11 +#define PCI_IF_MASS_STORAGE_SCSI_CONTROLLER_PQI 0x12 +#define PCI_IF_MASS_STORAGE_SCSI_DEVICE_CONTROLLER_PQI 0x13 +#define PCI_IF_MASS_STORAGE_SCSI_DEVICE_NVM_EXPRESS 0x21 +#define PCI_IF_MASS_STORAGE_SATA_SERIAL_BUS 0x02 +#define PCI_CLASS_MASS_STORAGE_SAS 0x07 +#define PCI_IF_MASS_STORAGE_SAS 0x00 +#define PCI_IF_MASS_STORAGE_SAS_SERIAL_BUS 0x01 +#define PCI_CLASS_MASS_STORAGE_SOLID_STATE 0x08 +#define PCI_IF_MASS_STORAGE_SOLID_STATE 0x00 +#define PCI_IF_MASS_STORAGE_SOLID_STATE_NVMHCI 0x01 +#define PCI_IF_MASS_STORAGE_SOLID_STATE_ENTERPRISE_NVMHCI 0x02 ///@} /// /// PCI_CLASS_NETWORK, Base Class 02h. /// ///@{ -#define PCI_CLASS_NETWORK_INFINIBAND 0x07 +#define PCI_CLASS_NETWORK_INFINIBAND 0x07 ///@} /// /// PCI_CLASS_MEDIA, Base Class 04h. /// ///@{ -#define PCI_CLASS_MEDIA_MIXED_MODE 0x03 +#define PCI_CLASS_MEDIA_MIXED_MODE 0x03 ///@} /// /// PCI_CLASS_BRIDGE, Base Class 06h. /// ///@{ -#define PCI_CLASS_BRIDGE_ADVANCED_SWITCHING_TO_PCI 0x0B -#define PCI_IF_BRIDGE_ADVANCED_SWITCHING_TO_PCI_CUSTOM 0x00 -#define PCI_IF_BRIDGE_ADVANCED_SWITCHING_TO_PCI_ASI_SIG 0x01 +#define PCI_CLASS_BRIDGE_ADVANCED_SWITCHING_TO_PCI 0x0B +#define PCI_IF_BRIDGE_ADVANCED_SWITCHING_TO_PCI_CUSTOM 0x00 +#define PCI_IF_BRIDGE_ADVANCED_SWITCHING_TO_PCI_ASI_SIG 0x01 ///@} /// /// PCI_CLASS_SYSTEM_PERIPHERAL, Base Class 08h. /// ///@{ -#define PCI_IF_HPET 0x03 -#define PCI_SUBCLASS_SD_HOST_CONTROLLER 0x05 -#define PCI_SUBCLASS_IOMMU 0x06 +#define PCI_IF_HPET 0x03 +#define PCI_SUBCLASS_SD_HOST_CONTROLLER 0x05 +#define PCI_SUBCLASS_IOMMU 0x06 ///@} /// /// PCI_CLASS_PROCESSOR, Base Class 0Bh. /// ///@{ -#define PCI_SUBCLASS_PROC_OTHER 0x80 +#define PCI_SUBCLASS_PROC_OTHER 0x80 ///@} /// /// PCI_CLASS_SERIAL, Base Class 0Ch. /// ///@{ -#define PCI_IF_XHCI 0x30 +#define PCI_IF_XHCI 0x30 #define PCI_CLASS_SERIAL_OTHER 0x80 ///@} @@ -81,7 +80,7 @@ /// PCI_CLASS_SATELLITE, Base Class 0Fh. /// ///@{ -#define PCI_SUBCLASS_SATELLITE_OTHER 0x80 +#define PCI_SUBCLASS_SATELLITE_OTHER 0x80 ///@} /// diff --git a/MdePkg/Include/IndustryStandard/PciExpress21.h b/MdePkg/Include/IndustryStandard/PciExpress21.h index 4617dc1..341e3e5 100644 --- a/MdePkg/Include/IndustryStandard/PciExpress21.h +++ b/MdePkg/Include/IndustryStandard/PciExpress21.h @@ -26,7 +26,7 @@ @return The encode ECAM address. **/ -#define PCI_ECAM_ADDRESS(Bus,Device,Function,Offset) \ +#define PCI_ECAM_ADDRESS(Bus, Device, Function, Offset) \ (((Offset) & 0xfff) | (((Function) & 0x07) << 12) | (((Device) & 0x1f) << 15) | (((Bus) & 0xff) << 20)) #pragma pack(1) @@ -35,60 +35,60 @@ /// typedef union { struct { - UINT16 Version : 4; - UINT16 DevicePortType : 4; - UINT16 SlotImplemented : 1; - UINT16 InterruptMessageNumber : 5; - UINT16 Undefined : 1; - UINT16 Reserved : 1; + UINT16 Version : 4; + UINT16 DevicePortType : 4; + UINT16 SlotImplemented : 1; + UINT16 InterruptMessageNumber : 5; + UINT16 Undefined : 1; + UINT16 Reserved : 1; } Bits; - UINT16 Uint16; + UINT16 Uint16; } PCI_REG_PCIE_CAPABILITY; -#define PCIE_DEVICE_PORT_TYPE_PCIE_ENDPOINT 0 -#define PCIE_DEVICE_PORT_TYPE_LEGACY_PCIE_ENDPOINT 1 -#define PCIE_DEVICE_PORT_TYPE_ROOT_PORT 4 -#define PCIE_DEVICE_PORT_TYPE_UPSTREAM_PORT 5 -#define PCIE_DEVICE_PORT_TYPE_DOWNSTREAM_PORT 6 -#define PCIE_DEVICE_PORT_TYPE_PCIE_TO_PCI_BRIDGE 7 -#define PCIE_DEVICE_PORT_TYPE_PCI_TO_PCIE_BRIDGE 8 -#define PCIE_DEVICE_PORT_TYPE_ROOT_COMPLEX_INTEGRATED_ENDPOINT 9 -#define PCIE_DEVICE_PORT_TYPE_ROOT_COMPLEX_EVENT_COLLECTOR 10 +#define PCIE_DEVICE_PORT_TYPE_PCIE_ENDPOINT 0 +#define PCIE_DEVICE_PORT_TYPE_LEGACY_PCIE_ENDPOINT 1 +#define PCIE_DEVICE_PORT_TYPE_ROOT_PORT 4 +#define PCIE_DEVICE_PORT_TYPE_UPSTREAM_PORT 5 +#define PCIE_DEVICE_PORT_TYPE_DOWNSTREAM_PORT 6 +#define PCIE_DEVICE_PORT_TYPE_PCIE_TO_PCI_BRIDGE 7 +#define PCIE_DEVICE_PORT_TYPE_PCI_TO_PCIE_BRIDGE 8 +#define PCIE_DEVICE_PORT_TYPE_ROOT_COMPLEX_INTEGRATED_ENDPOINT 9 +#define PCIE_DEVICE_PORT_TYPE_ROOT_COMPLEX_EVENT_COLLECTOR 10 typedef union { struct { - UINT32 MaxPayloadSize : 3; - UINT32 PhantomFunctions : 2; - UINT32 ExtendedTagField : 1; - UINT32 EndpointL0sAcceptableLatency : 3; - UINT32 EndpointL1AcceptableLatency : 3; - UINT32 Undefined : 3; - UINT32 RoleBasedErrorReporting : 1; - UINT32 Reserved : 2; - UINT32 CapturedSlotPowerLimitValue : 8; - UINT32 CapturedSlotPowerLimitScale : 2; - UINT32 FunctionLevelReset : 1; - UINT32 Reserved2 : 3; + UINT32 MaxPayloadSize : 3; + UINT32 PhantomFunctions : 2; + UINT32 ExtendedTagField : 1; + UINT32 EndpointL0sAcceptableLatency : 3; + UINT32 EndpointL1AcceptableLatency : 3; + UINT32 Undefined : 3; + UINT32 RoleBasedErrorReporting : 1; + UINT32 Reserved : 2; + UINT32 CapturedSlotPowerLimitValue : 8; + UINT32 CapturedSlotPowerLimitScale : 2; + UINT32 FunctionLevelReset : 1; + UINT32 Reserved2 : 3; } Bits; - UINT32 Uint32; + UINT32 Uint32; } PCI_REG_PCIE_DEVICE_CAPABILITY; typedef union { struct { - UINT16 CorrectableError : 1; - UINT16 NonFatalError : 1; - UINT16 FatalError : 1; - UINT16 UnsupportedRequest : 1; - UINT16 RelaxedOrdering : 1; - UINT16 MaxPayloadSize : 3; - UINT16 ExtendedTagField : 1; - UINT16 PhantomFunctions : 1; - UINT16 AuxPower : 1; - UINT16 NoSnoop : 1; - UINT16 MaxReadRequestSize : 3; - UINT16 BridgeConfigurationRetryOrFunctionLevelReset : 1; + UINT16 CorrectableError : 1; + UINT16 NonFatalError : 1; + UINT16 FatalError : 1; + UINT16 UnsupportedRequest : 1; + UINT16 RelaxedOrdering : 1; + UINT16 MaxPayloadSize : 3; + UINT16 ExtendedTagField : 1; + UINT16 PhantomFunctions : 1; + UINT16 AuxPower : 1; + UINT16 NoSnoop : 1; + UINT16 MaxReadRequestSize : 3; + UINT16 BridgeConfigurationRetryOrFunctionLevelReset : 1; } Bits; - UINT16 Uint16; + UINT16 Uint16; } PCI_REG_PCIE_DEVICE_CONTROL; #define PCIE_MAX_PAYLOAD_SIZE_128B 0 @@ -100,404 +100,404 @@ typedef union { #define PCIE_MAX_PAYLOAD_SIZE_RVSD1 6 #define PCIE_MAX_PAYLOAD_SIZE_RVSD2 7 -#define PCIE_MAX_READ_REQ_SIZE_128B 0 -#define PCIE_MAX_READ_REQ_SIZE_256B 1 -#define PCIE_MAX_READ_REQ_SIZE_512B 2 -#define PCIE_MAX_READ_REQ_SIZE_1024B 3 -#define PCIE_MAX_READ_REQ_SIZE_2048B 4 -#define PCIE_MAX_READ_REQ_SIZE_4096B 5 -#define PCIE_MAX_READ_REQ_SIZE_RVSD1 6 -#define PCIE_MAX_READ_REQ_SIZE_RVSD2 7 +#define PCIE_MAX_READ_REQ_SIZE_128B 0 +#define PCIE_MAX_READ_REQ_SIZE_256B 1 +#define PCIE_MAX_READ_REQ_SIZE_512B 2 +#define PCIE_MAX_READ_REQ_SIZE_1024B 3 +#define PCIE_MAX_READ_REQ_SIZE_2048B 4 +#define PCIE_MAX_READ_REQ_SIZE_4096B 5 +#define PCIE_MAX_READ_REQ_SIZE_RVSD1 6 +#define PCIE_MAX_READ_REQ_SIZE_RVSD2 7 typedef union { struct { - UINT16 CorrectableError : 1; - UINT16 NonFatalError : 1; - UINT16 FatalError : 1; - UINT16 UnsupportedRequest : 1; - UINT16 AuxPower : 1; - UINT16 TransactionsPending : 1; - UINT16 Reserved : 10; + UINT16 CorrectableError : 1; + UINT16 NonFatalError : 1; + UINT16 FatalError : 1; + UINT16 UnsupportedRequest : 1; + UINT16 AuxPower : 1; + UINT16 TransactionsPending : 1; + UINT16 Reserved : 10; } Bits; - UINT16 Uint16; + UINT16 Uint16; } PCI_REG_PCIE_DEVICE_STATUS; typedef union { struct { - UINT32 MaxLinkSpeed : 4; - UINT32 MaxLinkWidth : 6; - UINT32 Aspm : 2; - UINT32 L0sExitLatency : 3; - UINT32 L1ExitLatency : 3; - UINT32 ClockPowerManagement : 1; - UINT32 SurpriseDownError : 1; - UINT32 DataLinkLayerLinkActive : 1; - UINT32 LinkBandwidthNotification : 1; - UINT32 AspmOptionalityCompliance : 1; - UINT32 Reserved : 1; - UINT32 PortNumber : 8; + UINT32 MaxLinkSpeed : 4; + UINT32 MaxLinkWidth : 6; + UINT32 Aspm : 2; + UINT32 L0sExitLatency : 3; + UINT32 L1ExitLatency : 3; + UINT32 ClockPowerManagement : 1; + UINT32 SurpriseDownError : 1; + UINT32 DataLinkLayerLinkActive : 1; + UINT32 LinkBandwidthNotification : 1; + UINT32 AspmOptionalityCompliance : 1; + UINT32 Reserved : 1; + UINT32 PortNumber : 8; } Bits; - UINT32 Uint32; + UINT32 Uint32; } PCI_REG_PCIE_LINK_CAPABILITY; -#define PCIE_LINK_ASPM_L0S BIT0 -#define PCIE_LINK_ASPM_L1 BIT1 +#define PCIE_LINK_ASPM_L0S BIT0 +#define PCIE_LINK_ASPM_L1 BIT1 typedef union { struct { - UINT16 AspmControl : 2; - UINT16 Reserved : 1; - UINT16 ReadCompletionBoundary : 1; - UINT16 LinkDisable : 1; - UINT16 RetrainLink : 1; - UINT16 CommonClockConfiguration : 1; - UINT16 ExtendedSynch : 1; - UINT16 ClockPowerManagement : 1; - UINT16 HardwareAutonomousWidthDisable : 1; - UINT16 LinkBandwidthManagementInterrupt : 1; - UINT16 LinkAutonomousBandwidthInterrupt : 1; + UINT16 AspmControl : 2; + UINT16 Reserved : 1; + UINT16 ReadCompletionBoundary : 1; + UINT16 LinkDisable : 1; + UINT16 RetrainLink : 1; + UINT16 CommonClockConfiguration : 1; + UINT16 ExtendedSynch : 1; + UINT16 ClockPowerManagement : 1; + UINT16 HardwareAutonomousWidthDisable : 1; + UINT16 LinkBandwidthManagementInterrupt : 1; + UINT16 LinkAutonomousBandwidthInterrupt : 1; } Bits; - UINT16 Uint16; + UINT16 Uint16; } PCI_REG_PCIE_LINK_CONTROL; typedef union { struct { - UINT16 CurrentLinkSpeed : 4; - UINT16 NegotiatedLinkWidth : 6; - UINT16 Undefined : 1; - UINT16 LinkTraining : 1; - UINT16 SlotClockConfiguration : 1; - UINT16 DataLinkLayerLinkActive : 1; - UINT16 LinkBandwidthManagement : 1; - UINT16 LinkAutonomousBandwidth : 1; + UINT16 CurrentLinkSpeed : 4; + UINT16 NegotiatedLinkWidth : 6; + UINT16 Undefined : 1; + UINT16 LinkTraining : 1; + UINT16 SlotClockConfiguration : 1; + UINT16 DataLinkLayerLinkActive : 1; + UINT16 LinkBandwidthManagement : 1; + UINT16 LinkAutonomousBandwidth : 1; } Bits; - UINT16 Uint16; + UINT16 Uint16; } PCI_REG_PCIE_LINK_STATUS; typedef union { struct { - UINT32 AttentionButton : 1; - UINT32 PowerController : 1; - UINT32 MrlSensor : 1; - UINT32 AttentionIndicator : 1; - UINT32 PowerIndicator : 1; - UINT32 HotPlugSurprise : 1; - UINT32 HotPlugCapable : 1; - UINT32 SlotPowerLimitValue : 8; - UINT32 SlotPowerLimitScale : 2; - UINT32 ElectromechanicalInterlock : 1; - UINT32 NoCommandCompleted : 1; - UINT32 PhysicalSlotNumber : 13; + UINT32 AttentionButton : 1; + UINT32 PowerController : 1; + UINT32 MrlSensor : 1; + UINT32 AttentionIndicator : 1; + UINT32 PowerIndicator : 1; + UINT32 HotPlugSurprise : 1; + UINT32 HotPlugCapable : 1; + UINT32 SlotPowerLimitValue : 8; + UINT32 SlotPowerLimitScale : 2; + UINT32 ElectromechanicalInterlock : 1; + UINT32 NoCommandCompleted : 1; + UINT32 PhysicalSlotNumber : 13; } Bits; - UINT32 Uint32; + UINT32 Uint32; } PCI_REG_PCIE_SLOT_CAPABILITY; typedef union { struct { - UINT16 AttentionButtonPressed : 1; - UINT16 PowerFaultDetected : 1; - UINT16 MrlSensorChanged : 1; - UINT16 PresenceDetectChanged : 1; - UINT16 CommandCompletedInterrupt : 1; - UINT16 HotPlugInterrupt : 1; - UINT16 AttentionIndicator : 2; - UINT16 PowerIndicator : 2; - UINT16 PowerController : 1; - UINT16 ElectromechanicalInterlock : 1; - UINT16 DataLinkLayerStateChanged : 1; - UINT16 Reserved : 3; + UINT16 AttentionButtonPressed : 1; + UINT16 PowerFaultDetected : 1; + UINT16 MrlSensorChanged : 1; + UINT16 PresenceDetectChanged : 1; + UINT16 CommandCompletedInterrupt : 1; + UINT16 HotPlugInterrupt : 1; + UINT16 AttentionIndicator : 2; + UINT16 PowerIndicator : 2; + UINT16 PowerController : 1; + UINT16 ElectromechanicalInterlock : 1; + UINT16 DataLinkLayerStateChanged : 1; + UINT16 Reserved : 3; } Bits; - UINT16 Uint16; + UINT16 Uint16; } PCI_REG_PCIE_SLOT_CONTROL; typedef union { struct { - UINT16 AttentionButtonPressed : 1; - UINT16 PowerFaultDetected : 1; - UINT16 MrlSensorChanged : 1; - UINT16 PresenceDetectChanged : 1; - UINT16 CommandCompleted : 1; - UINT16 MrlSensor : 1; - UINT16 PresenceDetect : 1; - UINT16 ElectromechanicalInterlock : 1; - UINT16 DataLinkLayerStateChanged : 1; - UINT16 Reserved : 7; + UINT16 AttentionButtonPressed : 1; + UINT16 PowerFaultDetected : 1; + UINT16 MrlSensorChanged : 1; + UINT16 PresenceDetectChanged : 1; + UINT16 CommandCompleted : 1; + UINT16 MrlSensor : 1; + UINT16 PresenceDetect : 1; + UINT16 ElectromechanicalInterlock : 1; + UINT16 DataLinkLayerStateChanged : 1; + UINT16 Reserved : 7; } Bits; - UINT16 Uint16; + UINT16 Uint16; } PCI_REG_PCIE_SLOT_STATUS; typedef union { struct { - UINT16 SystemErrorOnCorrectableError : 1; - UINT16 SystemErrorOnNonFatalError : 1; - UINT16 SystemErrorOnFatalError : 1; - UINT16 PmeInterrupt : 1; - UINT16 CrsSoftwareVisibility : 1; - UINT16 Reserved : 11; + UINT16 SystemErrorOnCorrectableError : 1; + UINT16 SystemErrorOnNonFatalError : 1; + UINT16 SystemErrorOnFatalError : 1; + UINT16 PmeInterrupt : 1; + UINT16 CrsSoftwareVisibility : 1; + UINT16 Reserved : 11; } Bits; - UINT16 Uint16; + UINT16 Uint16; } PCI_REG_PCIE_ROOT_CONTROL; typedef union { struct { - UINT16 CrsSoftwareVisibility : 1; - UINT16 Reserved : 15; + UINT16 CrsSoftwareVisibility : 1; + UINT16 Reserved : 15; } Bits; - UINT16 Uint16; + UINT16 Uint16; } PCI_REG_PCIE_ROOT_CAPABILITY; typedef union { struct { - UINT32 PmeRequesterId : 16; - UINT32 PmeStatus : 1; - UINT32 PmePending : 1; - UINT32 Reserved : 14; + UINT32 PmeRequesterId : 16; + UINT32 PmeStatus : 1; + UINT32 PmePending : 1; + UINT32 Reserved : 14; } Bits; - UINT32 Uint32; + UINT32 Uint32; } PCI_REG_PCIE_ROOT_STATUS; typedef union { struct { - UINT32 CompletionTimeoutRanges : 4; - UINT32 CompletionTimeoutDisable : 1; - UINT32 AriForwarding : 1; - UINT32 AtomicOpRouting : 1; - UINT32 AtomicOp32Completer : 1; - UINT32 AtomicOp64Completer : 1; - UINT32 Cas128Completer : 1; - UINT32 NoRoEnabledPrPrPassing : 1; - UINT32 LtrMechanism : 1; - UINT32 TphCompleter : 2; - UINT32 LnSystemCLS : 2; - UINT32 TenBitTagCompleterSupported : 1; - UINT32 TenBitTagRequesterSupported : 1; - UINT32 Obff : 2; - UINT32 ExtendedFmtField : 1; - UINT32 EndEndTlpPrefix : 1; - UINT32 MaxEndEndTlpPrefixes : 2; - UINT32 EmergencyPowerReductionSupported : 2; - UINT32 EmergencyPowerReductionInitializationRequired : 1; - UINT32 Reserved3 : 4; - UINT32 FrsSupported : 1; + UINT32 CompletionTimeoutRanges : 4; + UINT32 CompletionTimeoutDisable : 1; + UINT32 AriForwarding : 1; + UINT32 AtomicOpRouting : 1; + UINT32 AtomicOp32Completer : 1; + UINT32 AtomicOp64Completer : 1; + UINT32 Cas128Completer : 1; + UINT32 NoRoEnabledPrPrPassing : 1; + UINT32 LtrMechanism : 1; + UINT32 TphCompleter : 2; + UINT32 LnSystemCLS : 2; + UINT32 TenBitTagCompleterSupported : 1; + UINT32 TenBitTagRequesterSupported : 1; + UINT32 Obff : 2; + UINT32 ExtendedFmtField : 1; + UINT32 EndEndTlpPrefix : 1; + UINT32 MaxEndEndTlpPrefixes : 2; + UINT32 EmergencyPowerReductionSupported : 2; + UINT32 EmergencyPowerReductionInitializationRequired : 1; + UINT32 Reserved3 : 4; + UINT32 FrsSupported : 1; } Bits; - UINT32 Uint32; + UINT32 Uint32; } PCI_REG_PCIE_DEVICE_CAPABILITY2; -#define PCIE_COMPLETION_TIMEOUT_NOT_SUPPORTED 0 -#define PCIE_COMPLETION_TIMEOUT_RANGE_A_SUPPORTED 1 -#define PCIE_COMPLETION_TIMEOUT_RANGE_B_SUPPORTED 2 -#define PCIE_COMPLETION_TIMEOUT_RANGE_A_B_SUPPORTED 3 -#define PCIE_COMPLETION_TIMEOUT_RANGE_B_C_SUPPORTED 6 -#define PCIE_COMPLETION_TIMEOUT_RANGE_A_B_C_SUPPORTED 7 -#define PCIE_COMPLETION_TIMEOUT_RANGE_B_C_D_SUPPORTED 14 -#define PCIE_COMPLETION_TIMEOUT_RANGE_A_B_C_D_SUPPORTED 15 +#define PCIE_COMPLETION_TIMEOUT_NOT_SUPPORTED 0 +#define PCIE_COMPLETION_TIMEOUT_RANGE_A_SUPPORTED 1 +#define PCIE_COMPLETION_TIMEOUT_RANGE_B_SUPPORTED 2 +#define PCIE_COMPLETION_TIMEOUT_RANGE_A_B_SUPPORTED 3 +#define PCIE_COMPLETION_TIMEOUT_RANGE_B_C_SUPPORTED 6 +#define PCIE_COMPLETION_TIMEOUT_RANGE_A_B_C_SUPPORTED 7 +#define PCIE_COMPLETION_TIMEOUT_RANGE_B_C_D_SUPPORTED 14 +#define PCIE_COMPLETION_TIMEOUT_RANGE_A_B_C_D_SUPPORTED 15 -#define PCIE_DEVICE_CAPABILITY_OBFF_MESSAGE BIT0 -#define PCIE_DEVICE_CAPABILITY_OBFF_WAKE BIT1 +#define PCIE_DEVICE_CAPABILITY_OBFF_MESSAGE BIT0 +#define PCIE_DEVICE_CAPABILITY_OBFF_WAKE BIT1 typedef union { struct { - UINT16 CompletionTimeoutValue : 4; - UINT16 CompletionTimeoutDisable : 1; - UINT16 AriForwarding : 1; - UINT16 AtomicOpRequester : 1; - UINT16 AtomicOpEgressBlocking : 1; - UINT16 IdoRequest : 1; - UINT16 IdoCompletion : 1; - UINT16 LtrMechanism : 1; - UINT16 EmergencyPowerReductionRequest : 1; - UINT16 TenBitTagRequesterEnable : 1; - UINT16 Obff : 2; - UINT16 EndEndTlpPrefixBlocking : 1; + UINT16 CompletionTimeoutValue : 4; + UINT16 CompletionTimeoutDisable : 1; + UINT16 AriForwarding : 1; + UINT16 AtomicOpRequester : 1; + UINT16 AtomicOpEgressBlocking : 1; + UINT16 IdoRequest : 1; + UINT16 IdoCompletion : 1; + UINT16 LtrMechanism : 1; + UINT16 EmergencyPowerReductionRequest : 1; + UINT16 TenBitTagRequesterEnable : 1; + UINT16 Obff : 2; + UINT16 EndEndTlpPrefixBlocking : 1; } Bits; - UINT16 Uint16; + UINT16 Uint16; } PCI_REG_PCIE_DEVICE_CONTROL2; -#define PCIE_COMPLETION_TIMEOUT_50US_50MS 0 -#define PCIE_COMPLETION_TIMEOUT_50US_100US 1 -#define PCIE_COMPLETION_TIMEOUT_1MS_10MS 2 -#define PCIE_COMPLETION_TIMEOUT_16MS_55MS 5 -#define PCIE_COMPLETION_TIMEOUT_65MS_210MS 6 -#define PCIE_COMPLETION_TIMEOUT_260MS_900MS 9 -#define PCIE_COMPLETION_TIMEOUT_1S_3_5S 10 -#define PCIE_COMPLETION_TIMEOUT_4S_13S 13 -#define PCIE_COMPLETION_TIMEOUT_17S_64S 14 - -#define PCIE_DEVICE_CONTROL_OBFF_DISABLED 0 -#define PCIE_DEVICE_CONTROL_OBFF_MESSAGE_A 1 -#define PCIE_DEVICE_CONTROL_OBFF_MESSAGE_B 2 -#define PCIE_DEVICE_CONTROL_OBFF_WAKE 3 +#define PCIE_COMPLETION_TIMEOUT_50US_50MS 0 +#define PCIE_COMPLETION_TIMEOUT_50US_100US 1 +#define PCIE_COMPLETION_TIMEOUT_1MS_10MS 2 +#define PCIE_COMPLETION_TIMEOUT_16MS_55MS 5 +#define PCIE_COMPLETION_TIMEOUT_65MS_210MS 6 +#define PCIE_COMPLETION_TIMEOUT_260MS_900MS 9 +#define PCIE_COMPLETION_TIMEOUT_1S_3_5S 10 +#define PCIE_COMPLETION_TIMEOUT_4S_13S 13 +#define PCIE_COMPLETION_TIMEOUT_17S_64S 14 + +#define PCIE_DEVICE_CONTROL_OBFF_DISABLED 0 +#define PCIE_DEVICE_CONTROL_OBFF_MESSAGE_A 1 +#define PCIE_DEVICE_CONTROL_OBFF_MESSAGE_B 2 +#define PCIE_DEVICE_CONTROL_OBFF_WAKE 3 typedef union { struct { - UINT32 Reserved : 1; - UINT32 LinkSpeedsVector : 7; - UINT32 Crosslink : 1; - UINT32 Reserved2 : 23; + UINT32 Reserved : 1; + UINT32 LinkSpeedsVector : 7; + UINT32 Crosslink : 1; + UINT32 Reserved2 : 23; } Bits; - UINT32 Uint32; + UINT32 Uint32; } PCI_REG_PCIE_LINK_CAPABILITY2; typedef union { struct { - UINT16 TargetLinkSpeed : 4; - UINT16 EnterCompliance : 1; - UINT16 HardwareAutonomousSpeedDisable : 1; - UINT16 SelectableDeemphasis : 1; - UINT16 TransmitMargin : 3; - UINT16 EnterModifiedCompliance : 1; - UINT16 ComplianceSos : 1; - UINT16 CompliancePresetDeemphasis : 4; + UINT16 TargetLinkSpeed : 4; + UINT16 EnterCompliance : 1; + UINT16 HardwareAutonomousSpeedDisable : 1; + UINT16 SelectableDeemphasis : 1; + UINT16 TransmitMargin : 3; + UINT16 EnterModifiedCompliance : 1; + UINT16 ComplianceSos : 1; + UINT16 CompliancePresetDeemphasis : 4; } Bits; - UINT16 Uint16; + UINT16 Uint16; } PCI_REG_PCIE_LINK_CONTROL2; typedef union { struct { - UINT16 CurrentDeemphasisLevel : 1; - UINT16 EqualizationComplete : 1; - UINT16 EqualizationPhase1Successful : 1; - UINT16 EqualizationPhase2Successful : 1; - UINT16 EqualizationPhase3Successful : 1; - UINT16 LinkEqualizationRequest : 1; - UINT16 Reserved : 10; + UINT16 CurrentDeemphasisLevel : 1; + UINT16 EqualizationComplete : 1; + UINT16 EqualizationPhase1Successful : 1; + UINT16 EqualizationPhase2Successful : 1; + UINT16 EqualizationPhase3Successful : 1; + UINT16 LinkEqualizationRequest : 1; + UINT16 Reserved : 10; } Bits; - UINT16 Uint16; + UINT16 Uint16; } PCI_REG_PCIE_LINK_STATUS2; typedef struct { - EFI_PCI_CAPABILITY_HDR Hdr; - PCI_REG_PCIE_CAPABILITY Capability; - PCI_REG_PCIE_DEVICE_CAPABILITY DeviceCapability; - PCI_REG_PCIE_DEVICE_CONTROL DeviceControl; - PCI_REG_PCIE_DEVICE_STATUS DeviceStatus; - PCI_REG_PCIE_LINK_CAPABILITY LinkCapability; - PCI_REG_PCIE_LINK_CONTROL LinkControl; - PCI_REG_PCIE_LINK_STATUS LinkStatus; - PCI_REG_PCIE_SLOT_CAPABILITY SlotCapability; - PCI_REG_PCIE_SLOT_CONTROL SlotControl; - PCI_REG_PCIE_SLOT_STATUS SlotStatus; - PCI_REG_PCIE_ROOT_CONTROL RootControl; - PCI_REG_PCIE_ROOT_CAPABILITY RootCapability; - PCI_REG_PCIE_ROOT_STATUS RootStatus; - PCI_REG_PCIE_DEVICE_CAPABILITY2 DeviceCapability2; - PCI_REG_PCIE_DEVICE_CONTROL2 DeviceControl2; - UINT16 DeviceStatus2; - PCI_REG_PCIE_LINK_CAPABILITY2 LinkCapability2; - PCI_REG_PCIE_LINK_CONTROL2 LinkControl2; - PCI_REG_PCIE_LINK_STATUS2 LinkStatus2; - UINT32 SlotCapability2; - UINT16 SlotControl2; - UINT16 SlotStatus2; + EFI_PCI_CAPABILITY_HDR Hdr; + PCI_REG_PCIE_CAPABILITY Capability; + PCI_REG_PCIE_DEVICE_CAPABILITY DeviceCapability; + PCI_REG_PCIE_DEVICE_CONTROL DeviceControl; + PCI_REG_PCIE_DEVICE_STATUS DeviceStatus; + PCI_REG_PCIE_LINK_CAPABILITY LinkCapability; + PCI_REG_PCIE_LINK_CONTROL LinkControl; + PCI_REG_PCIE_LINK_STATUS LinkStatus; + PCI_REG_PCIE_SLOT_CAPABILITY SlotCapability; + PCI_REG_PCIE_SLOT_CONTROL SlotControl; + PCI_REG_PCIE_SLOT_STATUS SlotStatus; + PCI_REG_PCIE_ROOT_CONTROL RootControl; + PCI_REG_PCIE_ROOT_CAPABILITY RootCapability; + PCI_REG_PCIE_ROOT_STATUS RootStatus; + PCI_REG_PCIE_DEVICE_CAPABILITY2 DeviceCapability2; + PCI_REG_PCIE_DEVICE_CONTROL2 DeviceControl2; + UINT16 DeviceStatus2; + PCI_REG_PCIE_LINK_CAPABILITY2 LinkCapability2; + PCI_REG_PCIE_LINK_CONTROL2 LinkControl2; + PCI_REG_PCIE_LINK_STATUS2 LinkStatus2; + UINT32 SlotCapability2; + UINT16 SlotControl2; + UINT16 SlotStatus2; } PCI_CAPABILITY_PCIEXP; -#define EFI_PCIE_CAPABILITY_BASE_OFFSET 0x100 -#define EFI_PCIE_CAPABILITY_ID_SRIOV_CONTROL_ARI_HIERARCHY 0x10 -#define EFI_PCIE_CAPABILITY_DEVICE_CAPABILITIES_2_OFFSET 0x24 -#define EFI_PCIE_CAPABILITY_DEVICE_CAPABILITIES_2_ARI_FORWARDING 0x20 -#define EFI_PCIE_CAPABILITY_DEVICE_CONTROL_2_OFFSET 0x28 -#define EFI_PCIE_CAPABILITY_DEVICE_CONTROL_2_ARI_FORWARDING 0x20 +#define EFI_PCIE_CAPABILITY_BASE_OFFSET 0x100 +#define EFI_PCIE_CAPABILITY_ID_SRIOV_CONTROL_ARI_HIERARCHY 0x10 +#define EFI_PCIE_CAPABILITY_DEVICE_CAPABILITIES_2_OFFSET 0x24 +#define EFI_PCIE_CAPABILITY_DEVICE_CAPABILITIES_2_ARI_FORWARDING 0x20 +#define EFI_PCIE_CAPABILITY_DEVICE_CONTROL_2_OFFSET 0x28 +#define EFI_PCIE_CAPABILITY_DEVICE_CONTROL_2_ARI_FORWARDING 0x20 // // for SR-IOV // -#define EFI_PCIE_CAPABILITY_ID_ARI 0x0E -#define EFI_PCIE_CAPABILITY_ID_ATS 0x0F -#define EFI_PCIE_CAPABILITY_ID_SRIOV 0x10 -#define EFI_PCIE_CAPABILITY_ID_MRIOV 0x11 +#define EFI_PCIE_CAPABILITY_ID_ARI 0x0E +#define EFI_PCIE_CAPABILITY_ID_ATS 0x0F +#define EFI_PCIE_CAPABILITY_ID_SRIOV 0x10 +#define EFI_PCIE_CAPABILITY_ID_MRIOV 0x11 typedef struct { - UINT32 CapabilityHeader; - UINT32 Capability; - UINT16 Control; - UINT16 Status; - UINT16 InitialVFs; - UINT16 TotalVFs; - UINT16 NumVFs; - UINT8 FunctionDependencyLink; - UINT8 Reserved0; - UINT16 FirstVFOffset; - UINT16 VFStride; - UINT16 Reserved1; - UINT16 VFDeviceID; - UINT32 SupportedPageSize; - UINT32 SystemPageSize; - UINT32 VFBar[6]; - UINT32 VFMigrationStateArrayOffset; + UINT32 CapabilityHeader; + UINT32 Capability; + UINT16 Control; + UINT16 Status; + UINT16 InitialVFs; + UINT16 TotalVFs; + UINT16 NumVFs; + UINT8 FunctionDependencyLink; + UINT8 Reserved0; + UINT16 FirstVFOffset; + UINT16 VFStride; + UINT16 Reserved1; + UINT16 VFDeviceID; + UINT32 SupportedPageSize; + UINT32 SystemPageSize; + UINT32 VFBar[6]; + UINT32 VFMigrationStateArrayOffset; } SR_IOV_CAPABILITY_REGISTER; -#define EFI_PCIE_CAPABILITY_ID_SRIOV_CAPABILITIES 0x04 -#define EFI_PCIE_CAPABILITY_ID_SRIOV_CONTROL 0x08 -#define EFI_PCIE_CAPABILITY_ID_SRIOV_STATUS 0x0A -#define EFI_PCIE_CAPABILITY_ID_SRIOV_INITIALVFS 0x0C -#define EFI_PCIE_CAPABILITY_ID_SRIOV_TOTALVFS 0x0E -#define EFI_PCIE_CAPABILITY_ID_SRIOV_NUMVFS 0x10 -#define EFI_PCIE_CAPABILITY_ID_SRIOV_FUNCTION_DEPENDENCY_LINK 0x12 -#define EFI_PCIE_CAPABILITY_ID_SRIOV_FIRSTVF 0x14 -#define EFI_PCIE_CAPABILITY_ID_SRIOV_VFSTRIDE 0x16 -#define EFI_PCIE_CAPABILITY_ID_SRIOV_VFDEVICEID 0x1A -#define EFI_PCIE_CAPABILITY_ID_SRIOV_SUPPORTED_PAGE_SIZE 0x1C -#define EFI_PCIE_CAPABILITY_ID_SRIOV_SYSTEM_PAGE_SIZE 0x20 -#define EFI_PCIE_CAPABILITY_ID_SRIOV_BAR0 0x24 -#define EFI_PCIE_CAPABILITY_ID_SRIOV_BAR1 0x28 -#define EFI_PCIE_CAPABILITY_ID_SRIOV_BAR2 0x2C -#define EFI_PCIE_CAPABILITY_ID_SRIOV_BAR3 0x30 -#define EFI_PCIE_CAPABILITY_ID_SRIOV_BAR4 0x34 -#define EFI_PCIE_CAPABILITY_ID_SRIOV_BAR5 0x38 -#define EFI_PCIE_CAPABILITY_ID_SRIOV_VF_MIGRATION_STATE 0x3C +#define EFI_PCIE_CAPABILITY_ID_SRIOV_CAPABILITIES 0x04 +#define EFI_PCIE_CAPABILITY_ID_SRIOV_CONTROL 0x08 +#define EFI_PCIE_CAPABILITY_ID_SRIOV_STATUS 0x0A +#define EFI_PCIE_CAPABILITY_ID_SRIOV_INITIALVFS 0x0C +#define EFI_PCIE_CAPABILITY_ID_SRIOV_TOTALVFS 0x0E +#define EFI_PCIE_CAPABILITY_ID_SRIOV_NUMVFS 0x10 +#define EFI_PCIE_CAPABILITY_ID_SRIOV_FUNCTION_DEPENDENCY_LINK 0x12 +#define EFI_PCIE_CAPABILITY_ID_SRIOV_FIRSTVF 0x14 +#define EFI_PCIE_CAPABILITY_ID_SRIOV_VFSTRIDE 0x16 +#define EFI_PCIE_CAPABILITY_ID_SRIOV_VFDEVICEID 0x1A +#define EFI_PCIE_CAPABILITY_ID_SRIOV_SUPPORTED_PAGE_SIZE 0x1C +#define EFI_PCIE_CAPABILITY_ID_SRIOV_SYSTEM_PAGE_SIZE 0x20 +#define EFI_PCIE_CAPABILITY_ID_SRIOV_BAR0 0x24 +#define EFI_PCIE_CAPABILITY_ID_SRIOV_BAR1 0x28 +#define EFI_PCIE_CAPABILITY_ID_SRIOV_BAR2 0x2C +#define EFI_PCIE_CAPABILITY_ID_SRIOV_BAR3 0x30 +#define EFI_PCIE_CAPABILITY_ID_SRIOV_BAR4 0x34 +#define EFI_PCIE_CAPABILITY_ID_SRIOV_BAR5 0x38 +#define EFI_PCIE_CAPABILITY_ID_SRIOV_VF_MIGRATION_STATE 0x3C typedef struct { - UINT32 CapabilityId:16; - UINT32 CapabilityVersion:4; - UINT32 NextCapabilityOffset:12; + UINT32 CapabilityId : 16; + UINT32 CapabilityVersion : 4; + UINT32 NextCapabilityOffset : 12; } PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER; -#define PCI_EXP_EXT_HDR PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER +#define PCI_EXP_EXT_HDR PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER -#define PCI_EXPRESS_EXTENDED_CAPABILITY_ADVANCED_ERROR_REPORTING_ID 0x0001 -#define PCI_EXPRESS_EXTENDED_CAPABILITY_ADVANCED_ERROR_REPORTING_VER1 0x1 -#define PCI_EXPRESS_EXTENDED_CAPABILITY_ADVANCED_ERROR_REPORTING_VER2 0x2 +#define PCI_EXPRESS_EXTENDED_CAPABILITY_ADVANCED_ERROR_REPORTING_ID 0x0001 +#define PCI_EXPRESS_EXTENDED_CAPABILITY_ADVANCED_ERROR_REPORTING_VER1 0x1 +#define PCI_EXPRESS_EXTENDED_CAPABILITY_ADVANCED_ERROR_REPORTING_VER2 0x2 typedef union { struct { - UINT32 Undefined : 1; - UINT32 Reserved : 3; - UINT32 DataLinkProtocolError : 1; - UINT32 SurpriseDownError : 1; - UINT32 Reserved2 : 6; - UINT32 PoisonedTlp : 1; - UINT32 FlowControlProtocolError : 1; - UINT32 CompletionTimeout : 1; - UINT32 CompleterAbort : 1; - UINT32 UnexpectedCompletion : 1; - UINT32 ReceiverOverflow : 1; - UINT32 MalformedTlp : 1; - UINT32 EcrcError : 1; - UINT32 UnsupportedRequestError : 1; - UINT32 AcsVoilation : 1; - UINT32 UncorrectableInternalError : 1; - UINT32 McBlockedTlp : 1; - UINT32 AtomicOpEgressBlocked : 1; - UINT32 TlpPrefixBlockedError : 1; - UINT32 Reserved3 : 6; + UINT32 Undefined : 1; + UINT32 Reserved : 3; + UINT32 DataLinkProtocolError : 1; + UINT32 SurpriseDownError : 1; + UINT32 Reserved2 : 6; + UINT32 PoisonedTlp : 1; + UINT32 FlowControlProtocolError : 1; + UINT32 CompletionTimeout : 1; + UINT32 CompleterAbort : 1; + UINT32 UnexpectedCompletion : 1; + UINT32 ReceiverOverflow : 1; + UINT32 MalformedTlp : 1; + UINT32 EcrcError : 1; + UINT32 UnsupportedRequestError : 1; + UINT32 AcsVoilation : 1; + UINT32 UncorrectableInternalError : 1; + UINT32 McBlockedTlp : 1; + UINT32 AtomicOpEgressBlocked : 1; + UINT32 TlpPrefixBlockedError : 1; + UINT32 Reserved3 : 6; } Bits; - UINT32 Uint32; + UINT32 Uint32; } PCI_EXPRESS_REG_UNCORRECTABLE_ERROR; typedef struct { - PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; - PCI_EXPRESS_REG_UNCORRECTABLE_ERROR UncorrectableErrorStatus; - PCI_EXPRESS_REG_UNCORRECTABLE_ERROR UncorrectableErrorMask; - PCI_EXPRESS_REG_UNCORRECTABLE_ERROR UncorrectableErrorSeverity; - UINT32 CorrectableErrorStatus; - UINT32 CorrectableErrorMask; - UINT32 AdvancedErrorCapabilitiesAndControl; - UINT32 HeaderLog[4]; - UINT32 RootErrorCommand; - UINT32 RootErrorStatus; - UINT16 ErrorSourceIdentification; - UINT16 CorrectableErrorSourceIdentification; - UINT32 TlpPrefixLog[4]; + PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; + PCI_EXPRESS_REG_UNCORRECTABLE_ERROR UncorrectableErrorStatus; + PCI_EXPRESS_REG_UNCORRECTABLE_ERROR UncorrectableErrorMask; + PCI_EXPRESS_REG_UNCORRECTABLE_ERROR UncorrectableErrorSeverity; + UINT32 CorrectableErrorStatus; + UINT32 CorrectableErrorMask; + UINT32 AdvancedErrorCapabilitiesAndControl; + UINT32 HeaderLog[4]; + UINT32 RootErrorCommand; + UINT32 RootErrorStatus; + UINT16 ErrorSourceIdentification; + UINT16 CorrectableErrorSourceIdentification; + UINT32 TlpPrefixLog[4]; } PCI_EXPRESS_EXTENDED_CAPABILITIES_ADVANCED_ERROR_REPORTING; #define PCI_EXPRESS_EXTENDED_CAPABILITY_VIRTUAL_CHANNEL_ID 0x0002 @@ -505,86 +505,86 @@ typedef struct { #define PCI_EXPRESS_EXTENDED_CAPABILITY_VIRTUAL_CHANNEL_VER1 0x1 typedef struct { - UINT32 VcResourceCapability:24; - UINT32 PortArbTableOffset:8; - UINT32 VcResourceControl; - UINT16 Reserved1; - UINT16 VcResourceStatus; + UINT32 VcResourceCapability : 24; + UINT32 PortArbTableOffset : 8; + UINT32 VcResourceControl; + UINT16 Reserved1; + UINT16 VcResourceStatus; } PCI_EXPRESS_EXTENDED_CAPABILITIES_VIRTUAL_CHANNEL_VC; typedef struct { - PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; - UINT32 ExtendedVcCount:3; - UINT32 PortVcCapability1:29; - UINT32 PortVcCapability2:24; - UINT32 VcArbTableOffset:8; - UINT16 PortVcControl; - UINT16 PortVcStatus; - PCI_EXPRESS_EXTENDED_CAPABILITIES_VIRTUAL_CHANNEL_VC Capability[1]; + PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; + UINT32 ExtendedVcCount : 3; + UINT32 PortVcCapability1 : 29; + UINT32 PortVcCapability2 : 24; + UINT32 VcArbTableOffset : 8; + UINT16 PortVcControl; + UINT16 PortVcStatus; + PCI_EXPRESS_EXTENDED_CAPABILITIES_VIRTUAL_CHANNEL_VC Capability[1]; } PCI_EXPRESS_EXTENDED_CAPABILITIES_VIRTUAL_CHANNEL_CAPABILITY; #define PCI_EXPRESS_EXTENDED_CAPABILITY_SERIAL_NUMBER_ID 0x0003 #define PCI_EXPRESS_EXTENDED_CAPABILITY_SERIAL_NUMBER_VER1 0x1 typedef struct { - PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; - UINT64 SerialNumber; + PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; + UINT64 SerialNumber; } PCI_EXPRESS_EXTENDED_CAPABILITIES_SERIAL_NUMBER; -#define PCI_EXPRESS_EXTENDED_CAPABILITY_LINK_DECLARATION_ID 0x0005 -#define PCI_EXPRESS_EXTENDED_CAPABILITY_LINK_DECLARATION_VER1 0x1 +#define PCI_EXPRESS_EXTENDED_CAPABILITY_LINK_DECLARATION_ID 0x0005 +#define PCI_EXPRESS_EXTENDED_CAPABILITY_LINK_DECLARATION_VER1 0x1 typedef struct { - PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; - UINT32 ElementSelfDescription; - UINT32 Reserved; - UINT32 LinkEntry[1]; + PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; + UINT32 ElementSelfDescription; + UINT32 Reserved; + UINT32 LinkEntry[1]; } PCI_EXPRESS_EXTENDED_CAPABILITIES_LINK_DECLARATION; -#define PCI_EXPRESS_EXTENDED_CAPABILITY_LINK_DECLARATION_GET_LINK_COUNT(LINK_DECLARATION) (UINT8)(((LINK_DECLARATION->ElementSelfDescription)&0x0000ff00)>>8) +#define PCI_EXPRESS_EXTENDED_CAPABILITY_LINK_DECLARATION_GET_LINK_COUNT(LINK_DECLARATION) (UINT8)(((LINK_DECLARATION->ElementSelfDescription)&0x0000ff00)>>8) -#define PCI_EXPRESS_EXTENDED_CAPABILITY_LINK_CONTROL_ID 0x0006 -#define PCI_EXPRESS_EXTENDED_CAPABILITY_LINK_CONTROL_VER1 0x1 +#define PCI_EXPRESS_EXTENDED_CAPABILITY_LINK_CONTROL_ID 0x0006 +#define PCI_EXPRESS_EXTENDED_CAPABILITY_LINK_CONTROL_VER1 0x1 typedef struct { - PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; - UINT32 RootComplexLinkCapabilities; - UINT16 RootComplexLinkControl; - UINT16 RootComplexLinkStatus; + PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; + UINT32 RootComplexLinkCapabilities; + UINT16 RootComplexLinkControl; + UINT16 RootComplexLinkStatus; } PCI_EXPRESS_EXTENDED_CAPABILITIES_INTERNAL_LINK_CONTROL; -#define PCI_EXPRESS_EXTENDED_CAPABILITY_POWER_BUDGETING_ID 0x0004 -#define PCI_EXPRESS_EXTENDED_CAPABILITY_POWER_BUDGETING_VER1 0x1 +#define PCI_EXPRESS_EXTENDED_CAPABILITY_POWER_BUDGETING_ID 0x0004 +#define PCI_EXPRESS_EXTENDED_CAPABILITY_POWER_BUDGETING_VER1 0x1 typedef struct { - PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; - UINT32 DataSelect:8; - UINT32 Reserved:24; - UINT32 Data; - UINT32 PowerBudgetCapability:1; - UINT32 Reserved2:7; - UINT32 Reserved3:24; + PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; + UINT32 DataSelect : 8; + UINT32 Reserved : 24; + UINT32 Data; + UINT32 PowerBudgetCapability : 1; + UINT32 Reserved2 : 7; + UINT32 Reserved3 : 24; } PCI_EXPRESS_EXTENDED_CAPABILITIES_POWER_BUDGETING; -#define PCI_EXPRESS_EXTENDED_CAPABILITY_ACS_EXTENDED_ID 0x000D -#define PCI_EXPRESS_EXTENDED_CAPABILITY_ACS_EXTENDED_VER1 0x1 +#define PCI_EXPRESS_EXTENDED_CAPABILITY_ACS_EXTENDED_ID 0x000D +#define PCI_EXPRESS_EXTENDED_CAPABILITY_ACS_EXTENDED_VER1 0x1 typedef struct { - PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; - UINT16 AcsCapability; - UINT16 AcsControl; - UINT8 EgressControlVectorArray[1]; + PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; + UINT16 AcsCapability; + UINT16 AcsControl; + UINT8 EgressControlVectorArray[1]; } PCI_EXPRESS_EXTENDED_CAPABILITIES_ACS_EXTENDED; -#define PCI_EXPRESS_EXTENDED_CAPABILITY_ACS_EXTENDED_GET_EGRES_CONTROL(ACS_EXTENDED) (UINT8)(((ACS_EXTENDED->AcsCapability)&0x00000020)) -#define PCI_EXPRESS_EXTENDED_CAPABILITY_ACS_EXTENDED_GET_EGRES_VECTOR_SIZE(ACS_EXTENDED) (UINT8)(((ACS_EXTENDED->AcsCapability)&0x0000FF00)) +#define PCI_EXPRESS_EXTENDED_CAPABILITY_ACS_EXTENDED_GET_EGRES_CONTROL(ACS_EXTENDED) (UINT8)(((ACS_EXTENDED->AcsCapability)&0x00000020)) +#define PCI_EXPRESS_EXTENDED_CAPABILITY_ACS_EXTENDED_GET_EGRES_VECTOR_SIZE(ACS_EXTENDED) (UINT8)(((ACS_EXTENDED->AcsCapability)&0x0000FF00)) -#define PCI_EXPRESS_EXTENDED_CAPABILITY_EVENT_COLLECTOR_ENDPOINT_ASSOCIATION_ID 0x0007 -#define PCI_EXPRESS_EXTENDED_CAPABILITY_EVENT_COLLECTOR_ENDPOINT_ASSOCIATION_VER1 0x1 +#define PCI_EXPRESS_EXTENDED_CAPABILITY_EVENT_COLLECTOR_ENDPOINT_ASSOCIATION_ID 0x0007 +#define PCI_EXPRESS_EXTENDED_CAPABILITY_EVENT_COLLECTOR_ENDPOINT_ASSOCIATION_VER1 0x1 typedef struct { - PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; - UINT32 AssociationBitmap; + PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; + UINT32 AssociationBitmap; } PCI_EXPRESS_EXTENDED_CAPABILITIES_EVENT_COLLECTOR_ENDPOINT_ASSOCIATION; #define PCI_EXPRESS_EXTENDED_CAPABILITY_MULTI_FUNCTION_VIRTUAL_CHANNEL_ID 0x0008 @@ -592,41 +592,41 @@ typedef struct { typedef PCI_EXPRESS_EXTENDED_CAPABILITIES_VIRTUAL_CHANNEL_CAPABILITY PCI_EXPRESS_EXTENDED_CAPABILITIES_MULTI_FUNCTION_VIRTUAL_CHANNEL_CAPABILITY; -#define PCI_EXPRESS_EXTENDED_CAPABILITY_VENDOR_SPECIFIC_ID 0x000B -#define PCI_EXPRESS_EXTENDED_CAPABILITY_VENDOR_SPECIFIC_VER1 0x1 +#define PCI_EXPRESS_EXTENDED_CAPABILITY_VENDOR_SPECIFIC_ID 0x000B +#define PCI_EXPRESS_EXTENDED_CAPABILITY_VENDOR_SPECIFIC_VER1 0x1 typedef struct { - PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; - UINT32 VendorSpecificHeader; - UINT8 VendorSpecific[1]; + PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; + UINT32 VendorSpecificHeader; + UINT8 VendorSpecific[1]; } PCI_EXPRESS_EXTENDED_CAPABILITIES_VENDOR_SPECIFIC; -#define PCI_EXPRESS_EXTENDED_CAPABILITY_VENDOR_SPECIFIC_GET_SIZE(VENDOR) (UINT16)(((VENDOR->VendorSpecificHeader)&0xFFF00000)>>20) +#define PCI_EXPRESS_EXTENDED_CAPABILITY_VENDOR_SPECIFIC_GET_SIZE(VENDOR) (UINT16)(((VENDOR->VendorSpecificHeader)&0xFFF00000)>>20) -#define PCI_EXPRESS_EXTENDED_CAPABILITY_RCRB_HEADER_ID 0x000A -#define PCI_EXPRESS_EXTENDED_CAPABILITY_RCRB_HEADER_VER1 0x1 +#define PCI_EXPRESS_EXTENDED_CAPABILITY_RCRB_HEADER_ID 0x000A +#define PCI_EXPRESS_EXTENDED_CAPABILITY_RCRB_HEADER_VER1 0x1 typedef struct { - PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; - UINT16 VendorId; - UINT16 DeviceId; - UINT32 RcrbCapabilities; - UINT32 RcrbControl; - UINT32 Reserved; + PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; + UINT16 VendorId; + UINT16 DeviceId; + UINT32 RcrbCapabilities; + UINT32 RcrbControl; + UINT32 Reserved; } PCI_EXPRESS_EXTENDED_CAPABILITIES_RCRB_HEADER; -#define PCI_EXPRESS_EXTENDED_CAPABILITY_MULTICAST_ID 0x0012 -#define PCI_EXPRESS_EXTENDED_CAPABILITY_MULTICAST_VER1 0x1 +#define PCI_EXPRESS_EXTENDED_CAPABILITY_MULTICAST_ID 0x0012 +#define PCI_EXPRESS_EXTENDED_CAPABILITY_MULTICAST_VER1 0x1 typedef struct { - PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; - UINT16 MultiCastCapability; - UINT16 MulticastControl; - UINT64 McBaseAddress; - UINT64 McReceiveAddress; - UINT64 McBlockAll; - UINT64 McBlockUntranslated; - UINT64 McOverlayBar; + PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; + UINT16 MultiCastCapability; + UINT16 MulticastControl; + UINT64 McBaseAddress; + UINT64 McReceiveAddress; + UINT64 McBlockAll; + UINT64 McBlockUntranslated; + UINT64 McOverlayBar; } PCI_EXPRESS_EXTENDED_CAPABILITIES_MULTICAST; #define PCI_EXPRESS_EXTENDED_CAPABILITY_RESIZABLE_BAR_ID 0x0015 @@ -634,81 +634,79 @@ typedef struct { typedef union { struct { - UINT32 Reserved:4; - UINT32 BarSizeCapability:28; + UINT32 Reserved : 4; + UINT32 BarSizeCapability : 28; } Bits; - UINT32 Uint32; + UINT32 Uint32; } PCI_EXPRESS_EXTENDED_CAPABILITIES_RESIZABLE_BAR_CAPABILITY; - typedef union { struct { - UINT32 BarIndex:3; - UINT32 Reserved:2; - UINT32 ResizableBarNumber:3; - UINT32 BarSize:6; - UINT32 Reserved2:2; - UINT32 BarSizeCapability:16; + UINT32 BarIndex : 3; + UINT32 Reserved : 2; + UINT32 ResizableBarNumber : 3; + UINT32 BarSize : 6; + UINT32 Reserved2 : 2; + UINT32 BarSizeCapability : 16; } Bits; - UINT32 Uint32; + UINT32 Uint32; } PCI_EXPRESS_EXTENDED_CAPABILITIES_RESIZABLE_BAR_CONTROL; typedef struct { - PCI_EXPRESS_EXTENDED_CAPABILITIES_RESIZABLE_BAR_CAPABILITY ResizableBarCapability; - PCI_EXPRESS_EXTENDED_CAPABILITIES_RESIZABLE_BAR_CONTROL ResizableBarControl; + PCI_EXPRESS_EXTENDED_CAPABILITIES_RESIZABLE_BAR_CAPABILITY ResizableBarCapability; + PCI_EXPRESS_EXTENDED_CAPABILITIES_RESIZABLE_BAR_CONTROL ResizableBarControl; } PCI_EXPRESS_EXTENDED_CAPABILITIES_RESIZABLE_BAR_ENTRY; typedef struct { - PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; - PCI_EXPRESS_EXTENDED_CAPABILITIES_RESIZABLE_BAR_ENTRY Capability[1]; + PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; + PCI_EXPRESS_EXTENDED_CAPABILITIES_RESIZABLE_BAR_ENTRY Capability[1]; } PCI_EXPRESS_EXTENDED_CAPABILITIES_RESIZABLE_BAR; -#define GET_NUMBER_RESIZABLE_BARS(x) (x->Capability[0].ResizableBarControl.Bits.ResizableBarNumber) +#define GET_NUMBER_RESIZABLE_BARS(x) (x->Capability[0].ResizableBarControl.Bits.ResizableBarNumber) #define PCI_EXPRESS_EXTENDED_CAPABILITY_ARI_CAPABILITY_ID 0x000E #define PCI_EXPRESS_EXTENDED_CAPABILITY_ARI_CAPABILITY_VER1 0x1 typedef struct { - PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; - UINT16 AriCapability; - UINT16 AriControl; + PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; + UINT16 AriCapability; + UINT16 AriControl; } PCI_EXPRESS_EXTENDED_CAPABILITIES_ARI_CAPABILITY; #define PCI_EXPRESS_EXTENDED_CAPABILITY_DYNAMIC_POWER_ALLOCATION_ID 0x0016 #define PCI_EXPRESS_EXTENDED_CAPABILITY_DYNAMIC_POWER_ALLOCATION_VER1 0x1 typedef struct { - PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; - UINT32 DpaCapability; - UINT32 DpaLatencyIndicator; - UINT16 DpaStatus; - UINT16 DpaControl; - UINT8 DpaPowerAllocationArray[1]; + PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; + UINT32 DpaCapability; + UINT32 DpaLatencyIndicator; + UINT16 DpaStatus; + UINT16 DpaControl; + UINT8 DpaPowerAllocationArray[1]; } PCI_EXPRESS_EXTENDED_CAPABILITIES_DYNAMIC_POWER_ALLOCATION; -#define PCI_EXPRESS_EXTENDED_CAPABILITY_DYNAMIC_POWER_ALLOCATION_GET_SUBSTATE_MAX(POWER) (UINT16)(((POWER->DpaCapability)&0x0000000F)) - +#define PCI_EXPRESS_EXTENDED_CAPABILITY_DYNAMIC_POWER_ALLOCATION_GET_SUBSTATE_MAX(POWER) (UINT16)(((POWER->DpaCapability)&0x0000000F)) #define PCI_EXPRESS_EXTENDED_CAPABILITY_LATENCE_TOLERANCE_REPORTING_ID 0x0018 #define PCI_EXPRESS_EXTENDED_CAPABILITY_LATENCE_TOLERANCE_REPORTING_VER1 0x1 typedef struct { - PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; - UINT16 MaxSnoopLatency; - UINT16 MaxNoSnoopLatency; + PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; + UINT16 MaxSnoopLatency; + UINT16 MaxNoSnoopLatency; } PCI_EXPRESS_EXTENDED_CAPABILITIES_LATENCE_TOLERANCE_REPORTING; #define PCI_EXPRESS_EXTENDED_CAPABILITY_TPH_ID 0x0017 #define PCI_EXPRESS_EXTENDED_CAPABILITY_TPH_VER1 0x1 typedef struct { - PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; - UINT32 TphRequesterCapability; - UINT32 TphRequesterControl; - UINT16 TphStTable[1]; + PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; + UINT32 TphRequesterCapability; + UINT32 TphRequesterControl; + UINT16 TphStTable[1]; } PCI_EXPRESS_EXTENDED_CAPABILITIES_TPH; -#define GET_TPH_TABLE_SIZE(x) ((x->TphRequesterCapability & 0x7FF0000)>>16) * sizeof(UINT16) +#define GET_TPH_TABLE_SIZE(x) ((x->TphRequesterCapability & 0x7FF0000)>>16) * sizeof(UINT16) #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/PciExpress30.h b/MdePkg/Include/IndustryStandard/PciExpress30.h index 6cf39bc..8b06496 100644 --- a/MdePkg/Include/IndustryStandard/PciExpress30.h +++ b/MdePkg/Include/IndustryStandard/PciExpress30.h @@ -20,30 +20,30 @@ typedef union { struct { - UINT32 PerformEqualization : 1; - UINT32 LinkEqualizationRequestInterruptEnable : 1; - UINT32 Reserved : 30; + UINT32 PerformEqualization : 1; + UINT32 LinkEqualizationRequestInterruptEnable : 1; + UINT32 Reserved : 30; } Bits; - UINT32 Uint32; + UINT32 Uint32; } PCI_EXPRESS_REG_LINK_CONTROL3; typedef union { struct { - UINT16 DownstreamPortTransmitterPreset : 4; - UINT16 DownstreamPortReceiverPresetHint : 3; - UINT16 Reserved : 1; - UINT16 UpstreamPortTransmitterPreset : 4; - UINT16 UpstreamPortReceiverPresetHint : 3; - UINT16 Reserved2 : 1; + UINT16 DownstreamPortTransmitterPreset : 4; + UINT16 DownstreamPortReceiverPresetHint : 3; + UINT16 Reserved : 1; + UINT16 UpstreamPortTransmitterPreset : 4; + UINT16 UpstreamPortReceiverPresetHint : 3; + UINT16 Reserved2 : 1; } Bits; - UINT16 Uint16; + UINT16 Uint16; } PCI_EXPRESS_REG_LANE_EQUALIZATION_CONTROL; typedef struct { - PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; - PCI_EXPRESS_REG_LINK_CONTROL3 LinkControl3; - UINT32 LaneErrorStatus; - PCI_EXPRESS_REG_LANE_EQUALIZATION_CONTROL EqualizationControl[2]; + PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; + PCI_EXPRESS_REG_LINK_CONTROL3 LinkControl3; + UINT32 LaneErrorStatus; + PCI_EXPRESS_REG_LANE_EQUALIZATION_CONTROL EqualizationControl[2]; } PCI_EXPRESS_EXTENDED_CAPABILITIES_SECONDARY_PCIE; #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/PciExpress31.h b/MdePkg/Include/IndustryStandard/PciExpress31.h index 9d02685..19bfa45 100644 --- a/MdePkg/Include/IndustryStandard/PciExpress31.h +++ b/MdePkg/Include/IndustryStandard/PciExpress31.h @@ -20,51 +20,51 @@ SPDX-License-Identifier: BSD-2-Clause-Patent typedef union { struct { - UINT32 PciPmL12 : 1; - UINT32 PciPmL11 : 1; - UINT32 AspmL12 : 1; - UINT32 AspmL11 : 1; - UINT32 L1PmSubstates : 1; - UINT32 Reserved : 3; - UINT32 CommonModeRestoreTime : 8; - UINT32 TPowerOnScale : 2; - UINT32 Reserved2 : 1; - UINT32 TPowerOnValue : 5; - UINT32 Reserved3 : 8; + UINT32 PciPmL12 : 1; + UINT32 PciPmL11 : 1; + UINT32 AspmL12 : 1; + UINT32 AspmL11 : 1; + UINT32 L1PmSubstates : 1; + UINT32 Reserved : 3; + UINT32 CommonModeRestoreTime : 8; + UINT32 TPowerOnScale : 2; + UINT32 Reserved2 : 1; + UINT32 TPowerOnValue : 5; + UINT32 Reserved3 : 8; } Bits; - UINT32 Uint32; + UINT32 Uint32; } PCI_EXPRESS_REG_L1_PM_SUBSTATES_CAPABILITY; typedef union { struct { - UINT32 PciPmL12 : 1; - UINT32 PciPmL11 : 1; - UINT32 AspmL12 : 1; - UINT32 AspmL11 : 1; - UINT32 Reserved : 4; - UINT32 CommonModeRestoreTime : 8; - UINT32 LtrL12ThresholdValue : 10; - UINT32 Reserved2 : 3; - UINT32 LtrL12ThresholdScale : 3; + UINT32 PciPmL12 : 1; + UINT32 PciPmL11 : 1; + UINT32 AspmL12 : 1; + UINT32 AspmL11 : 1; + UINT32 Reserved : 4; + UINT32 CommonModeRestoreTime : 8; + UINT32 LtrL12ThresholdValue : 10; + UINT32 Reserved2 : 3; + UINT32 LtrL12ThresholdScale : 3; } Bits; - UINT32 Uint32; + UINT32 Uint32; } PCI_EXPRESS_REG_L1_PM_SUBSTATES_CONTROL1; typedef union { struct { - UINT32 TPowerOnScale : 2; - UINT32 Reserved : 1; - UINT32 TPowerOnValue : 5; - UINT32 Reserved2 : 24; + UINT32 TPowerOnScale : 2; + UINT32 Reserved : 1; + UINT32 TPowerOnValue : 5; + UINT32 Reserved2 : 24; } Bits; - UINT32 Uint32; + UINT32 Uint32; } PCI_EXPRESS_REG_L1_PM_SUBSTATES_CONTROL2; typedef struct { - PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; - PCI_EXPRESS_REG_L1_PM_SUBSTATES_CAPABILITY Capability; - PCI_EXPRESS_REG_L1_PM_SUBSTATES_CONTROL1 Control1; - PCI_EXPRESS_REG_L1_PM_SUBSTATES_CONTROL2 Control2; + PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; + PCI_EXPRESS_REG_L1_PM_SUBSTATES_CAPABILITY Capability; + PCI_EXPRESS_REG_L1_PM_SUBSTATES_CONTROL1 Control1; + PCI_EXPRESS_REG_L1_PM_SUBSTATES_CONTROL2 Control2; } PCI_EXPRESS_EXTENDED_CAPABILITIES_L1_PM_SUBSTATES; #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/PciExpress40.h b/MdePkg/Include/IndustryStandard/PciExpress40.h index 0564d72..2a6a0f2 100644 --- a/MdePkg/Include/IndustryStandard/PciExpress40.h +++ b/MdePkg/Include/IndustryStandard/PciExpress40.h @@ -24,58 +24,58 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define PCI_EXPRESS_EXTENDED_CAPABILITY_PHYSICAL_LAYER_16_0_VER1 0x1 // Register offsets from Physical Layer PCI-E Ext Cap Header -#define PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_CAPABILITIES_OFFSET 0x04 -#define PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_CONTROL_OFFSET 0x08 -#define PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_STATUS_OFFSET 0x0C -#define PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_LOCAL_DATA_PARITY_STATUS_OFFSET 0x10 -#define PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_FIRST_RETIMER_DATA_PARITY_STATUS_OFFSET 0x14 -#define PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_SECOND_RETIMER_DATA_PARITY_STATUS_OFFSET 0x18 -#define PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_LANE_EQUALIZATION_CONTROL_OFFSET 0x20 +#define PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_CAPABILITIES_OFFSET 0x04 +#define PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_CONTROL_OFFSET 0x08 +#define PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_STATUS_OFFSET 0x0C +#define PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_LOCAL_DATA_PARITY_STATUS_OFFSET 0x10 +#define PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_FIRST_RETIMER_DATA_PARITY_STATUS_OFFSET 0x14 +#define PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_SECOND_RETIMER_DATA_PARITY_STATUS_OFFSET 0x18 +#define PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_LANE_EQUALIZATION_CONTROL_OFFSET 0x20 typedef union { struct { - UINT32 Reserved : 32; // Reserved bit 0:31 + UINT32 Reserved : 32; // Reserved bit 0:31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_CAPABILITIES; typedef union { struct { - UINT32 Reserved : 32; // Reserved bit 0:31 + UINT32 Reserved : 32; // Reserved bit 0:31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_CONTROL; typedef union { struct { - UINT32 EqualizationComplete : 1; // bit 0 - UINT32 EqualizationPhase1Success : 1; // bit 1 - UINT32 EqualizationPhase2Success : 1; // bit 2 - UINT32 EqualizationPhase3Success : 1; // bit 3 - UINT32 LinkEqualizationRequest : 1; // bit 4 - UINT32 Reserved : 27; // Reserved bit 5:31 + UINT32 EqualizationComplete : 1; // bit 0 + UINT32 EqualizationPhase1Success : 1; // bit 1 + UINT32 EqualizationPhase2Success : 1; // bit 2 + UINT32 EqualizationPhase3Success : 1; // bit 3 + UINT32 LinkEqualizationRequest : 1; // bit 4 + UINT32 Reserved : 27; // Reserved bit 5:31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_STATUS; typedef union { struct { - UINT8 DownstreamPortTransmitterPreset : 4; //bit 0..3 - UINT8 UpstreamPortTransmitterPreset : 4; //bit 4..7 + UINT8 DownstreamPortTransmitterPreset : 4; // bit 0..3 + UINT8 UpstreamPortTransmitterPreset : 4; // bit 4..7 } Bits; - UINT8 Uint8; + UINT8 Uint8; } PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_LANE_EQUALIZATION_CONTROL; typedef struct { - PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; - PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_CAPABILITIES Capablities; - PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_CONTROL Control; - PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_STATUS Status; - UINT32 LocalDataParityMismatchStatus; - UINT32 FirstRetimerDataParityMismatchStatus; - UINT32 SecondRetimerDataParityMismatchStatus; - UINT32 Reserved; - PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_LANE_EQUALIZATION_CONTROL LaneEqualizationControl[1]; + PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; + PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_CAPABILITIES Capablities; + PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_CONTROL Control; + PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_STATUS Status; + UINT32 LocalDataParityMismatchStatus; + UINT32 FirstRetimerDataParityMismatchStatus; + UINT32 SecondRetimerDataParityMismatchStatus; + UINT32 Reserved; + PCI_EXPRESS_REG_PHYSICAL_LAYER_16_0_LANE_EQUALIZATION_CONTROL LaneEqualizationControl[1]; } PCI_EXPRESS_EXTENDED_CAPABILITIES_PHYSICAL_LAYER_16_0; ///@} @@ -84,26 +84,26 @@ typedef struct { ///@{ typedef union { struct { - UINT32 DvsecVendorId : 16; //bit 0..15 - UINT32 DvsecRevision : 4; //bit 16..19 - UINT32 DvsecLength : 12; //bit 20..31 - }Bits; - UINT32 Uint32; -}PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1; + UINT32 DvsecVendorId : 16; // bit 0..15 + UINT32 DvsecRevision : 4; // bit 16..19 + UINT32 DvsecLength : 12; // bit 20..31 + } Bits; + UINT32 Uint32; +} PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1; typedef union { struct { - UINT16 DvsecId : 16; //bit 0..15 - }Bits; - UINT16 Uint16; -}PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2; + UINT16 DvsecId : 16; // bit 0..15 + } Bits; + UINT16 Uint16; +} PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2; typedef struct { - PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; - PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1 DesignatedVendorSpecificHeader1; - PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2 DesignatedVendorSpecificHeader2; - UINT8 DesignatedVendorSpecific[1]; -}PCI_EXPRESS_EXTENDED_CAPABILITIES_DESIGNATED_VENDOR_SPECIFIC; + PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; + PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_1 DesignatedVendorSpecificHeader1; + PCI_EXPRESS_DESIGNATED_VENDOR_SPECIFIC_HEADER_2 DesignatedVendorSpecificHeader2; + UINT8 DesignatedVendorSpecific[1]; +} PCI_EXPRESS_EXTENDED_CAPABILITIES_DESIGNATED_VENDOR_SPECIFIC; ///@} #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/PciExpress50.h b/MdePkg/Include/IndustryStandard/PciExpress50.h index 26eae0b..2ed68dc 100644 --- a/MdePkg/Include/IndustryStandard/PciExpress50.h +++ b/MdePkg/Include/IndustryStandard/PciExpress50.h @@ -23,111 +23,111 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define PCI_EXPRESS_EXTENDED_CAPABILITY_PHYSICAL_LAYER_32_0_VER1 0x1 // Register offsets from Physical Layer PCI-E Ext Cap Header -#define PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_CAPABILITIES_OFFSET 0x04 -#define PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_CONTROL_OFFSET 0x08 -#define PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_STATUS_OFFSET 0x0C -#define PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_RCVD_MODIFIED_TS_DATA1_OFFSET 0x10 -#define PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_RCVD_MODIFIED_TS_DATA2_OFFSET 0x14 -#define PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_TRANS_MODIFIED_TS_DATA1_OFFSET 0x18 -#define PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_TRANS_MODIFIED_TS_DATA2_OFFSET 0x1C -#define PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_LANE_EQUALIZATION_CONTROL_OFFSET 0x20 +#define PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_CAPABILITIES_OFFSET 0x04 +#define PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_CONTROL_OFFSET 0x08 +#define PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_STATUS_OFFSET 0x0C +#define PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_RCVD_MODIFIED_TS_DATA1_OFFSET 0x10 +#define PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_RCVD_MODIFIED_TS_DATA2_OFFSET 0x14 +#define PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_TRANS_MODIFIED_TS_DATA1_OFFSET 0x18 +#define PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_TRANS_MODIFIED_TS_DATA2_OFFSET 0x1C +#define PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_LANE_EQUALIZATION_CONTROL_OFFSET 0x20 typedef union { struct { - UINT32 EqualizationByPassToHighestRateSupport : 1; // bit 0 - UINT32 NoEqualizationNeededSupport : 1; // bit 1 - UINT32 Reserved1 : 6; // Reserved bit 2:7 - UINT32 ModifiedTSUsageMode0Support : 1; // bit 8 - UINT32 ModifiedTSUsageMode1Support : 1; // bit 9 - UINT32 ModifiedTSUsageMode2Support : 1; // bit 10 - UINT32 ModifiedTSReservedUsageModes : 5; // bit 11:15 - UINT32 Reserved2 : 16; // Reserved bit 16:31 + UINT32 EqualizationByPassToHighestRateSupport : 1; // bit 0 + UINT32 NoEqualizationNeededSupport : 1; // bit 1 + UINT32 Reserved1 : 6; // Reserved bit 2:7 + UINT32 ModifiedTSUsageMode0Support : 1; // bit 8 + UINT32 ModifiedTSUsageMode1Support : 1; // bit 9 + UINT32 ModifiedTSUsageMode2Support : 1; // bit 10 + UINT32 ModifiedTSReservedUsageModes : 5; // bit 11:15 + UINT32 Reserved2 : 16; // Reserved bit 16:31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_CAPABILITIES; typedef union { struct { - UINT32 EqualizationByPassToHighestRateDisable : 1; // bit 0 - UINT32 NoEqualizationNeededDisable : 1; // bit 1 - UINT32 Reserved1 : 6; // Reserved bit 2:7 - UINT32 ModifiedTSUsageModeSelected : 3; // bit 8:10 - UINT32 Reserved2 : 21; // Reserved bit 11:31 + UINT32 EqualizationByPassToHighestRateDisable : 1; // bit 0 + UINT32 NoEqualizationNeededDisable : 1; // bit 1 + UINT32 Reserved1 : 6; // Reserved bit 2:7 + UINT32 ModifiedTSUsageModeSelected : 3; // bit 8:10 + UINT32 Reserved2 : 21; // Reserved bit 11:31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_CONTROL; typedef union { struct { - UINT32 EqualizationComplete : 1; // bit 0 - UINT32 EqualizationPhase1Success : 1; // bit 1 - UINT32 EqualizationPhase2Success : 1; // bit 2 - UINT32 EqualizationPhase3Success : 1; // bit 3 - UINT32 LinkEqualizationRequest : 1; // bit 4 - UINT32 ModifiedTSRcvd : 1; // bit 5 - UINT32 RcvdEnhancedLinkControl : 2; // bit 6:7 - UINT32 TransmitterPrecodingOn : 1; // bit 8 - UINT32 TransmitterPrecodeRequest : 1; // bit 9 - UINT32 NoEqualizationNeededRcvd : 1; // bit 10 - UINT32 Reserved : 21; // Reserved bit 11:31 + UINT32 EqualizationComplete : 1; // bit 0 + UINT32 EqualizationPhase1Success : 1; // bit 1 + UINT32 EqualizationPhase2Success : 1; // bit 2 + UINT32 EqualizationPhase3Success : 1; // bit 3 + UINT32 LinkEqualizationRequest : 1; // bit 4 + UINT32 ModifiedTSRcvd : 1; // bit 5 + UINT32 RcvdEnhancedLinkControl : 2; // bit 6:7 + UINT32 TransmitterPrecodingOn : 1; // bit 8 + UINT32 TransmitterPrecodeRequest : 1; // bit 9 + UINT32 NoEqualizationNeededRcvd : 1; // bit 10 + UINT32 Reserved : 21; // Reserved bit 11:31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_STATUS; typedef union { struct { - UINT32 RcvdModifiedTSUsageMode : 3; // bit 0:2 - UINT32 RcvdModifiedTSUsageInfo1 : 13; // bit 3:15 - UINT32 RcvdModifiedTSVendorId : 16; // bit 16:31 + UINT32 RcvdModifiedTSUsageMode : 3; // bit 0:2 + UINT32 RcvdModifiedTSUsageInfo1 : 13; // bit 3:15 + UINT32 RcvdModifiedTSVendorId : 16; // bit 16:31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_RCVD_MODIFIED_TS_DATA1; typedef union { struct { - UINT32 RcvdModifiedTSUsageInfo2 : 24; // bit 0:23 - UINT32 AltProtocolNegotiationStatus : 2; // bit 24:25 - UINT32 Reserved : 6; // Reserved bit 26:31 + UINT32 RcvdModifiedTSUsageInfo2 : 24; // bit 0:23 + UINT32 AltProtocolNegotiationStatus : 2; // bit 24:25 + UINT32 Reserved : 6; // Reserved bit 26:31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_RCVD_MODIFIED_TS_DATA2; typedef union { struct { - UINT32 TransModifiedTSUsageMode : 3; // bit 0:2 - UINT32 TransModifiedTSUsageInfo1 : 13; // bit 3:15 - UINT32 TransModifiedTSVendorId : 16; // bit 16:31 + UINT32 TransModifiedTSUsageMode : 3; // bit 0:2 + UINT32 TransModifiedTSUsageInfo1 : 13; // bit 3:15 + UINT32 TransModifiedTSVendorId : 16; // bit 16:31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_TRANS_MODIFIED_TS_DATA1; typedef union { struct { - UINT32 TransModifiedTSUsageInfo2 : 24; // bit 0:23 - UINT32 AltProtocolNegotiationStatus : 2; // bit 24:25 - UINT32 Reserved : 6; // Reserved bit 26:31 + UINT32 TransModifiedTSUsageInfo2 : 24; // bit 0:23 + UINT32 AltProtocolNegotiationStatus : 2; // bit 24:25 + UINT32 Reserved : 6; // Reserved bit 26:31 } Bits; - UINT32 Uint32; + UINT32 Uint32; } PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_TRANS_MODIFIED_TS_DATA2; typedef union { struct { - UINT8 DownstreamPortTransmitterPreset : 4; //bit 0..3 - UINT8 UpstreamPortTransmitterPreset : 4; //bit 4..7 + UINT8 DownstreamPortTransmitterPreset : 4; // bit 0..3 + UINT8 UpstreamPortTransmitterPreset : 4; // bit 4..7 } Bits; - UINT8 Uint8; + UINT8 Uint8; } PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_LANE_EQUALIZATION_CONTROL; typedef struct { - PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; - PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_CAPABILITIES Capablities; - PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_CONTROL Control; - PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_STATUS Status; - PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_RCVD_MODIFIED_TS_DATA1 RcvdModifiedTs1Data; - PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_RCVD_MODIFIED_TS_DATA2 RcvdModifiedTs2Data; - PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_TRANS_MODIFIED_TS_DATA1 TransModifiedTs1Data; - PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_TRANS_MODIFIED_TS_DATA2 TransModifiedTs2Data; - PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_LANE_EQUALIZATION_CONTROL LaneEqualizationControl[1]; + PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; + PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_CAPABILITIES Capablities; + PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_CONTROL Control; + PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_STATUS Status; + PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_RCVD_MODIFIED_TS_DATA1 RcvdModifiedTs1Data; + PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_RCVD_MODIFIED_TS_DATA2 RcvdModifiedTs2Data; + PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_TRANS_MODIFIED_TS_DATA1 TransModifiedTs1Data; + PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_TRANS_MODIFIED_TS_DATA2 TransModifiedTs2Data; + PCI_EXPRESS_REG_PHYSICAL_LAYER_32_0_LANE_EQUALIZATION_CONTROL LaneEqualizationControl[1]; } PCI_EXPRESS_EXTENDED_CAPABILITIES_PHYSICAL_LAYER_32_0; ///@} diff --git a/MdePkg/Include/IndustryStandard/PeImage.h b/MdePkg/Include/IndustryStandard/PeImage.h index 9b26700..3109dc2 100644 --- a/MdePkg/Include/IndustryStandard/PeImage.h +++ b/MdePkg/Include/IndustryStandard/PeImage.h @@ -21,11 +21,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // // PE32+ Subsystem type for EFI images // -#define EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION 10 -#define EFI_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11 -#define EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12 -#define EFI_IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER 13 ///< defined PI Specification, 1.0 - +#define EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION 10 +#define EFI_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11 +#define EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12 +#define EFI_IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER 13///< defined PI Specification, 1.0 // // PE32+ Machine type for EFI images @@ -53,44 +52,44 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// under DOS it can print an error message. /// typedef struct { - UINT16 e_magic; ///< Magic number. - UINT16 e_cblp; ///< Bytes on last page of file. - UINT16 e_cp; ///< Pages in file. - UINT16 e_crlc; ///< Relocations. - UINT16 e_cparhdr; ///< Size of header in paragraphs. - UINT16 e_minalloc; ///< Minimum extra paragraphs needed. - UINT16 e_maxalloc; ///< Maximum extra paragraphs needed. - UINT16 e_ss; ///< Initial (relative) SS value. - UINT16 e_sp; ///< Initial SP value. - UINT16 e_csum; ///< Checksum. - UINT16 e_ip; ///< Initial IP value. - UINT16 e_cs; ///< Initial (relative) CS value. - UINT16 e_lfarlc; ///< File address of relocation table. - UINT16 e_ovno; ///< Overlay number. - UINT16 e_res[4]; ///< Reserved words. - UINT16 e_oemid; ///< OEM identifier (for e_oeminfo). - UINT16 e_oeminfo; ///< OEM information; e_oemid specific. - UINT16 e_res2[10]; ///< Reserved words. - UINT32 e_lfanew; ///< File address of new exe header. + UINT16 e_magic; ///< Magic number. + UINT16 e_cblp; ///< Bytes on last page of file. + UINT16 e_cp; ///< Pages in file. + UINT16 e_crlc; ///< Relocations. + UINT16 e_cparhdr; ///< Size of header in paragraphs. + UINT16 e_minalloc; ///< Minimum extra paragraphs needed. + UINT16 e_maxalloc; ///< Maximum extra paragraphs needed. + UINT16 e_ss; ///< Initial (relative) SS value. + UINT16 e_sp; ///< Initial SP value. + UINT16 e_csum; ///< Checksum. + UINT16 e_ip; ///< Initial IP value. + UINT16 e_cs; ///< Initial (relative) CS value. + UINT16 e_lfarlc; ///< File address of relocation table. + UINT16 e_ovno; ///< Overlay number. + UINT16 e_res[4]; ///< Reserved words. + UINT16 e_oemid; ///< OEM identifier (for e_oeminfo). + UINT16 e_oeminfo; ///< OEM information; e_oemid specific. + UINT16 e_res2[10]; ///< Reserved words. + UINT32 e_lfanew; ///< File address of new exe header. } EFI_IMAGE_DOS_HEADER; /// /// COFF File Header (Object and Image). /// typedef struct { - UINT16 Machine; - UINT16 NumberOfSections; - UINT32 TimeDateStamp; - UINT32 PointerToSymbolTable; - UINT32 NumberOfSymbols; - UINT16 SizeOfOptionalHeader; - UINT16 Characteristics; + UINT16 Machine; + UINT16 NumberOfSections; + UINT32 TimeDateStamp; + UINT32 PointerToSymbolTable; + UINT32 NumberOfSymbols; + UINT16 SizeOfOptionalHeader; + UINT16 Characteristics; } EFI_IMAGE_FILE_HEADER; /// /// Size of EFI_IMAGE_FILE_HEADER. /// -#define EFI_IMAGE_SIZEOF_FILE_HEADER 20 +#define EFI_IMAGE_SIZEOF_FILE_HEADER 20 // // Characteristics @@ -110,26 +109,26 @@ typedef struct { /// Header Data Directories. /// typedef struct { - UINT32 VirtualAddress; - UINT32 Size; + UINT32 VirtualAddress; + UINT32 Size; } EFI_IMAGE_DATA_DIRECTORY; // // Directory Entries // -#define EFI_IMAGE_DIRECTORY_ENTRY_EXPORT 0 -#define EFI_IMAGE_DIRECTORY_ENTRY_IMPORT 1 -#define EFI_IMAGE_DIRECTORY_ENTRY_RESOURCE 2 -#define EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION 3 -#define EFI_IMAGE_DIRECTORY_ENTRY_SECURITY 4 -#define EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC 5 -#define EFI_IMAGE_DIRECTORY_ENTRY_DEBUG 6 -#define EFI_IMAGE_DIRECTORY_ENTRY_COPYRIGHT 7 -#define EFI_IMAGE_DIRECTORY_ENTRY_GLOBALPTR 8 -#define EFI_IMAGE_DIRECTORY_ENTRY_TLS 9 -#define EFI_IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG 10 +#define EFI_IMAGE_DIRECTORY_ENTRY_EXPORT 0 +#define EFI_IMAGE_DIRECTORY_ENTRY_IMPORT 1 +#define EFI_IMAGE_DIRECTORY_ENTRY_RESOURCE 2 +#define EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION 3 +#define EFI_IMAGE_DIRECTORY_ENTRY_SECURITY 4 +#define EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC 5 +#define EFI_IMAGE_DIRECTORY_ENTRY_DEBUG 6 +#define EFI_IMAGE_DIRECTORY_ENTRY_COPYRIGHT 7 +#define EFI_IMAGE_DIRECTORY_ENTRY_GLOBALPTR 8 +#define EFI_IMAGE_DIRECTORY_ENTRY_TLS 9 +#define EFI_IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG 10 -#define EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES 16 +#define EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES 16 /// /// @attention @@ -137,7 +136,7 @@ typedef struct { /// EFI_IMAGE_OPTIONAL_HEADER32 must be used. The data structures only vary /// after NT additional fields. /// -#define EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x10b +#define EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x10b /// /// Optional Header Standard Fields for PE32. @@ -146,40 +145,40 @@ typedef struct { /// /// Standard fields. /// - UINT16 Magic; - UINT8 MajorLinkerVersion; - UINT8 MinorLinkerVersion; - UINT32 SizeOfCode; - UINT32 SizeOfInitializedData; - UINT32 SizeOfUninitializedData; - UINT32 AddressOfEntryPoint; - UINT32 BaseOfCode; - UINT32 BaseOfData; ///< PE32 contains this additional field, which is absent in PE32+. + UINT16 Magic; + UINT8 MajorLinkerVersion; + UINT8 MinorLinkerVersion; + UINT32 SizeOfCode; + UINT32 SizeOfInitializedData; + UINT32 SizeOfUninitializedData; + UINT32 AddressOfEntryPoint; + UINT32 BaseOfCode; + UINT32 BaseOfData; ///< PE32 contains this additional field, which is absent in PE32+. /// /// Optional Header Windows-Specific Fields. /// - UINT32 ImageBase; - UINT32 SectionAlignment; - UINT32 FileAlignment; - UINT16 MajorOperatingSystemVersion; - UINT16 MinorOperatingSystemVersion; - UINT16 MajorImageVersion; - UINT16 MinorImageVersion; - UINT16 MajorSubsystemVersion; - UINT16 MinorSubsystemVersion; - UINT32 Win32VersionValue; - UINT32 SizeOfImage; - UINT32 SizeOfHeaders; - UINT32 CheckSum; - UINT16 Subsystem; - UINT16 DllCharacteristics; - UINT32 SizeOfStackReserve; - UINT32 SizeOfStackCommit; - UINT32 SizeOfHeapReserve; - UINT32 SizeOfHeapCommit; - UINT32 LoaderFlags; - UINT32 NumberOfRvaAndSizes; - EFI_IMAGE_DATA_DIRECTORY DataDirectory[EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES]; + UINT32 ImageBase; + UINT32 SectionAlignment; + UINT32 FileAlignment; + UINT16 MajorOperatingSystemVersion; + UINT16 MinorOperatingSystemVersion; + UINT16 MajorImageVersion; + UINT16 MinorImageVersion; + UINT16 MajorSubsystemVersion; + UINT16 MinorSubsystemVersion; + UINT32 Win32VersionValue; + UINT32 SizeOfImage; + UINT32 SizeOfHeaders; + UINT32 CheckSum; + UINT16 Subsystem; + UINT16 DllCharacteristics; + UINT32 SizeOfStackReserve; + UINT32 SizeOfStackCommit; + UINT32 SizeOfHeapReserve; + UINT32 SizeOfHeapCommit; + UINT32 LoaderFlags; + UINT32 NumberOfRvaAndSizes; + EFI_IMAGE_DATA_DIRECTORY DataDirectory[EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES]; } EFI_IMAGE_OPTIONAL_HEADER32; /// @@ -188,7 +187,7 @@ typedef struct { /// EFI_IMAGE_OPTIONAL_HEADER64 must be used. The data structures only vary /// after NT additional fields. /// -#define EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b +#define EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b /// /// Optional Header Standard Fields for PE32+. @@ -197,166 +196,165 @@ typedef struct { /// /// Standard fields. /// - UINT16 Magic; - UINT8 MajorLinkerVersion; - UINT8 MinorLinkerVersion; - UINT32 SizeOfCode; - UINT32 SizeOfInitializedData; - UINT32 SizeOfUninitializedData; - UINT32 AddressOfEntryPoint; - UINT32 BaseOfCode; + UINT16 Magic; + UINT8 MajorLinkerVersion; + UINT8 MinorLinkerVersion; + UINT32 SizeOfCode; + UINT32 SizeOfInitializedData; + UINT32 SizeOfUninitializedData; + UINT32 AddressOfEntryPoint; + UINT32 BaseOfCode; /// /// Optional Header Windows-Specific Fields. /// - UINT64 ImageBase; - UINT32 SectionAlignment; - UINT32 FileAlignment; - UINT16 MajorOperatingSystemVersion; - UINT16 MinorOperatingSystemVersion; - UINT16 MajorImageVersion; - UINT16 MinorImageVersion; - UINT16 MajorSubsystemVersion; - UINT16 MinorSubsystemVersion; - UINT32 Win32VersionValue; - UINT32 SizeOfImage; - UINT32 SizeOfHeaders; - UINT32 CheckSum; - UINT16 Subsystem; - UINT16 DllCharacteristics; - UINT64 SizeOfStackReserve; - UINT64 SizeOfStackCommit; - UINT64 SizeOfHeapReserve; - UINT64 SizeOfHeapCommit; - UINT32 LoaderFlags; - UINT32 NumberOfRvaAndSizes; - EFI_IMAGE_DATA_DIRECTORY DataDirectory[EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES]; + UINT64 ImageBase; + UINT32 SectionAlignment; + UINT32 FileAlignment; + UINT16 MajorOperatingSystemVersion; + UINT16 MinorOperatingSystemVersion; + UINT16 MajorImageVersion; + UINT16 MinorImageVersion; + UINT16 MajorSubsystemVersion; + UINT16 MinorSubsystemVersion; + UINT32 Win32VersionValue; + UINT32 SizeOfImage; + UINT32 SizeOfHeaders; + UINT32 CheckSum; + UINT16 Subsystem; + UINT16 DllCharacteristics; + UINT64 SizeOfStackReserve; + UINT64 SizeOfStackCommit; + UINT64 SizeOfHeapReserve; + UINT64 SizeOfHeapCommit; + UINT32 LoaderFlags; + UINT32 NumberOfRvaAndSizes; + EFI_IMAGE_DATA_DIRECTORY DataDirectory[EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES]; } EFI_IMAGE_OPTIONAL_HEADER64; - /// /// @attention /// EFI_IMAGE_NT_HEADERS32 is for use ONLY by tools. /// typedef struct { - UINT32 Signature; - EFI_IMAGE_FILE_HEADER FileHeader; - EFI_IMAGE_OPTIONAL_HEADER32 OptionalHeader; + UINT32 Signature; + EFI_IMAGE_FILE_HEADER FileHeader; + EFI_IMAGE_OPTIONAL_HEADER32 OptionalHeader; } EFI_IMAGE_NT_HEADERS32; -#define EFI_IMAGE_SIZEOF_NT_OPTIONAL32_HEADER sizeof (EFI_IMAGE_NT_HEADERS32) +#define EFI_IMAGE_SIZEOF_NT_OPTIONAL32_HEADER sizeof (EFI_IMAGE_NT_HEADERS32) /// /// @attention /// EFI_IMAGE_HEADERS64 is for use ONLY by tools. /// typedef struct { - UINT32 Signature; - EFI_IMAGE_FILE_HEADER FileHeader; - EFI_IMAGE_OPTIONAL_HEADER64 OptionalHeader; + UINT32 Signature; + EFI_IMAGE_FILE_HEADER FileHeader; + EFI_IMAGE_OPTIONAL_HEADER64 OptionalHeader; } EFI_IMAGE_NT_HEADERS64; -#define EFI_IMAGE_SIZEOF_NT_OPTIONAL64_HEADER sizeof (EFI_IMAGE_NT_HEADERS64) +#define EFI_IMAGE_SIZEOF_NT_OPTIONAL64_HEADER sizeof (EFI_IMAGE_NT_HEADERS64) // // Other Windows Subsystem Values // -#define EFI_IMAGE_SUBSYSTEM_UNKNOWN 0 -#define EFI_IMAGE_SUBSYSTEM_NATIVE 1 -#define EFI_IMAGE_SUBSYSTEM_WINDOWS_GUI 2 -#define EFI_IMAGE_SUBSYSTEM_WINDOWS_CUI 3 -#define EFI_IMAGE_SUBSYSTEM_OS2_CUI 5 -#define EFI_IMAGE_SUBSYSTEM_POSIX_CUI 7 +#define EFI_IMAGE_SUBSYSTEM_UNKNOWN 0 +#define EFI_IMAGE_SUBSYSTEM_NATIVE 1 +#define EFI_IMAGE_SUBSYSTEM_WINDOWS_GUI 2 +#define EFI_IMAGE_SUBSYSTEM_WINDOWS_CUI 3 +#define EFI_IMAGE_SUBSYSTEM_OS2_CUI 5 +#define EFI_IMAGE_SUBSYSTEM_POSIX_CUI 7 /// /// Length of ShortName. /// -#define EFI_IMAGE_SIZEOF_SHORT_NAME 8 +#define EFI_IMAGE_SIZEOF_SHORT_NAME 8 /// /// Section Table. This table immediately follows the optional header. /// typedef struct { - UINT8 Name[EFI_IMAGE_SIZEOF_SHORT_NAME]; + UINT8 Name[EFI_IMAGE_SIZEOF_SHORT_NAME]; union { - UINT32 PhysicalAddress; - UINT32 VirtualSize; + UINT32 PhysicalAddress; + UINT32 VirtualSize; } Misc; - UINT32 VirtualAddress; - UINT32 SizeOfRawData; - UINT32 PointerToRawData; - UINT32 PointerToRelocations; - UINT32 PointerToLinenumbers; - UINT16 NumberOfRelocations; - UINT16 NumberOfLinenumbers; - UINT32 Characteristics; + UINT32 VirtualAddress; + UINT32 SizeOfRawData; + UINT32 PointerToRawData; + UINT32 PointerToRelocations; + UINT32 PointerToLinenumbers; + UINT16 NumberOfRelocations; + UINT16 NumberOfLinenumbers; + UINT32 Characteristics; } EFI_IMAGE_SECTION_HEADER; /// /// Size of EFI_IMAGE_SECTION_HEADER. /// -#define EFI_IMAGE_SIZEOF_SECTION_HEADER 40 +#define EFI_IMAGE_SIZEOF_SECTION_HEADER 40 // // Section Flags Values // -#define EFI_IMAGE_SCN_TYPE_NO_PAD BIT3 ///< 0x00000008 ///< Reserved. -#define EFI_IMAGE_SCN_CNT_CODE BIT5 ///< 0x00000020 -#define EFI_IMAGE_SCN_CNT_INITIALIZED_DATA BIT6 ///< 0x00000040 -#define EFI_IMAGE_SCN_CNT_UNINITIALIZED_DATA BIT7 ///< 0x00000080 - -#define EFI_IMAGE_SCN_LNK_OTHER BIT8 ///< 0x00000100 ///< Reserved. -#define EFI_IMAGE_SCN_LNK_INFO BIT9 ///< 0x00000200 ///< Section contains comments or some other type of information. -#define EFI_IMAGE_SCN_LNK_REMOVE BIT11 ///< 0x00000800 ///< Section contents will not become part of image. -#define EFI_IMAGE_SCN_LNK_COMDAT BIT12 ///< 0x00001000 - -#define EFI_IMAGE_SCN_ALIGN_1BYTES BIT20 ///< 0x00100000 -#define EFI_IMAGE_SCN_ALIGN_2BYTES BIT21 ///< 0x00200000 -#define EFI_IMAGE_SCN_ALIGN_4BYTES (BIT20|BIT21) ///< 0x00300000 -#define EFI_IMAGE_SCN_ALIGN_8BYTES BIT22 ///< 0x00400000 -#define EFI_IMAGE_SCN_ALIGN_16BYTES (BIT20|BIT22) ///< 0x00500000 -#define EFI_IMAGE_SCN_ALIGN_32BYTES (BIT21|BIT22) ///< 0x00600000 -#define EFI_IMAGE_SCN_ALIGN_64BYTES (BIT20|BIT21|BIT22) ///< 0x00700000 - -#define EFI_IMAGE_SCN_MEM_DISCARDABLE BIT25 ///< 0x02000000 -#define EFI_IMAGE_SCN_MEM_NOT_CACHED BIT26 ///< 0x04000000 -#define EFI_IMAGE_SCN_MEM_NOT_PAGED BIT27 ///< 0x08000000 -#define EFI_IMAGE_SCN_MEM_SHARED BIT28 ///< 0x10000000 -#define EFI_IMAGE_SCN_MEM_EXECUTE BIT29 ///< 0x20000000 -#define EFI_IMAGE_SCN_MEM_READ BIT30 ///< 0x40000000 -#define EFI_IMAGE_SCN_MEM_WRITE BIT31 ///< 0x80000000 +#define EFI_IMAGE_SCN_TYPE_NO_PAD BIT3 ///< 0x00000008 ///< Reserved. +#define EFI_IMAGE_SCN_CNT_CODE BIT5 ///< 0x00000020 +#define EFI_IMAGE_SCN_CNT_INITIALIZED_DATA BIT6 ///< 0x00000040 +#define EFI_IMAGE_SCN_CNT_UNINITIALIZED_DATA BIT7 ///< 0x00000080 + +#define EFI_IMAGE_SCN_LNK_OTHER BIT8 ///< 0x00000100 ///< Reserved. +#define EFI_IMAGE_SCN_LNK_INFO BIT9 ///< 0x00000200 ///< Section contains comments or some other type of information. +#define EFI_IMAGE_SCN_LNK_REMOVE BIT11 ///< 0x00000800 ///< Section contents will not become part of image. +#define EFI_IMAGE_SCN_LNK_COMDAT BIT12 ///< 0x00001000 + +#define EFI_IMAGE_SCN_ALIGN_1BYTES BIT20 ///< 0x00100000 +#define EFI_IMAGE_SCN_ALIGN_2BYTES BIT21 ///< 0x00200000 +#define EFI_IMAGE_SCN_ALIGN_4BYTES (BIT20|BIT21) ///< 0x00300000 +#define EFI_IMAGE_SCN_ALIGN_8BYTES BIT22 ///< 0x00400000 +#define EFI_IMAGE_SCN_ALIGN_16BYTES (BIT20|BIT22) ///< 0x00500000 +#define EFI_IMAGE_SCN_ALIGN_32BYTES (BIT21|BIT22) ///< 0x00600000 +#define EFI_IMAGE_SCN_ALIGN_64BYTES (BIT20|BIT21|BIT22) ///< 0x00700000 + +#define EFI_IMAGE_SCN_MEM_DISCARDABLE BIT25 ///< 0x02000000 +#define EFI_IMAGE_SCN_MEM_NOT_CACHED BIT26 ///< 0x04000000 +#define EFI_IMAGE_SCN_MEM_NOT_PAGED BIT27 ///< 0x08000000 +#define EFI_IMAGE_SCN_MEM_SHARED BIT28 ///< 0x10000000 +#define EFI_IMAGE_SCN_MEM_EXECUTE BIT29 ///< 0x20000000 +#define EFI_IMAGE_SCN_MEM_READ BIT30 ///< 0x40000000 +#define EFI_IMAGE_SCN_MEM_WRITE BIT31 ///< 0x80000000 /// /// Size of a Symbol Table Record. /// -#define EFI_IMAGE_SIZEOF_SYMBOL 18 +#define EFI_IMAGE_SIZEOF_SYMBOL 18 // // Symbols have a section number of the section in which they are // defined. Otherwise, section numbers have the following meanings: // -#define EFI_IMAGE_SYM_UNDEFINED (UINT16) 0 ///< Symbol is undefined or is common. -#define EFI_IMAGE_SYM_ABSOLUTE (UINT16) -1 ///< Symbol is an absolute value. -#define EFI_IMAGE_SYM_DEBUG (UINT16) -2 ///< Symbol is a special debug item. +#define EFI_IMAGE_SYM_UNDEFINED (UINT16) 0 ///< Symbol is undefined or is common. +#define EFI_IMAGE_SYM_ABSOLUTE (UINT16) -1 ///< Symbol is an absolute value. +#define EFI_IMAGE_SYM_DEBUG (UINT16) -2 ///< Symbol is a special debug item. // // Symbol Type (fundamental) values. // -#define EFI_IMAGE_SYM_TYPE_NULL 0 ///< no type. -#define EFI_IMAGE_SYM_TYPE_VOID 1 ///< no valid type. -#define EFI_IMAGE_SYM_TYPE_CHAR 2 ///< type character. -#define EFI_IMAGE_SYM_TYPE_SHORT 3 ///< type short integer. -#define EFI_IMAGE_SYM_TYPE_INT 4 -#define EFI_IMAGE_SYM_TYPE_LONG 5 -#define EFI_IMAGE_SYM_TYPE_FLOAT 6 -#define EFI_IMAGE_SYM_TYPE_DOUBLE 7 -#define EFI_IMAGE_SYM_TYPE_STRUCT 8 -#define EFI_IMAGE_SYM_TYPE_UNION 9 -#define EFI_IMAGE_SYM_TYPE_ENUM 10 ///< enumeration. -#define EFI_IMAGE_SYM_TYPE_MOE 11 ///< member of enumeration. -#define EFI_IMAGE_SYM_TYPE_BYTE 12 -#define EFI_IMAGE_SYM_TYPE_WORD 13 -#define EFI_IMAGE_SYM_TYPE_UINT 14 -#define EFI_IMAGE_SYM_TYPE_DWORD 15 +#define EFI_IMAGE_SYM_TYPE_NULL 0 ///< no type. +#define EFI_IMAGE_SYM_TYPE_VOID 1 ///< no valid type. +#define EFI_IMAGE_SYM_TYPE_CHAR 2 ///< type character. +#define EFI_IMAGE_SYM_TYPE_SHORT 3 ///< type short integer. +#define EFI_IMAGE_SYM_TYPE_INT 4 +#define EFI_IMAGE_SYM_TYPE_LONG 5 +#define EFI_IMAGE_SYM_TYPE_FLOAT 6 +#define EFI_IMAGE_SYM_TYPE_DOUBLE 7 +#define EFI_IMAGE_SYM_TYPE_STRUCT 8 +#define EFI_IMAGE_SYM_TYPE_UNION 9 +#define EFI_IMAGE_SYM_TYPE_ENUM 10 ///< enumeration. +#define EFI_IMAGE_SYM_TYPE_MOE 11 ///< member of enumeration. +#define EFI_IMAGE_SYM_TYPE_BYTE 12 +#define EFI_IMAGE_SYM_TYPE_WORD 13 +#define EFI_IMAGE_SYM_TYPE_UINT 14 +#define EFI_IMAGE_SYM_TYPE_DWORD 15 // // Symbol Type (derived) values. @@ -409,11 +407,11 @@ typedef struct { // // Communal selection types. // -#define EFI_IMAGE_COMDAT_SELECT_NODUPLICATES 1 -#define EFI_IMAGE_COMDAT_SELECT_ANY 2 -#define EFI_IMAGE_COMDAT_SELECT_SAME_SIZE 3 -#define EFI_IMAGE_COMDAT_SELECT_EXACT_MATCH 4 -#define EFI_IMAGE_COMDAT_SELECT_ASSOCIATIVE 5 +#define EFI_IMAGE_COMDAT_SELECT_NODUPLICATES 1 +#define EFI_IMAGE_COMDAT_SELECT_ANY 2 +#define EFI_IMAGE_COMDAT_SELECT_SAME_SIZE 3 +#define EFI_IMAGE_COMDAT_SELECT_EXACT_MATCH 4 +#define EFI_IMAGE_COMDAT_SELECT_ASSOCIATIVE 5 // // the following values only be referred in PeCoff, not defined in PECOFF. @@ -426,28 +424,28 @@ typedef struct { /// Relocation format. /// typedef struct { - UINT32 VirtualAddress; - UINT32 SymbolTableIndex; - UINT16 Type; + UINT32 VirtualAddress; + UINT32 SymbolTableIndex; + UINT16 Type; } EFI_IMAGE_RELOCATION; /// /// Size of EFI_IMAGE_RELOCATION /// -#define EFI_IMAGE_SIZEOF_RELOCATION 10 +#define EFI_IMAGE_SIZEOF_RELOCATION 10 // // I386 relocation types. // -#define EFI_IMAGE_REL_I386_ABSOLUTE 0x0000 ///< Reference is absolute, no relocation is necessary. -#define EFI_IMAGE_REL_I386_DIR16 0x0001 ///< Direct 16-bit reference to the symbols virtual address. -#define EFI_IMAGE_REL_I386_REL16 0x0002 ///< PC-relative 16-bit reference to the symbols virtual address. -#define EFI_IMAGE_REL_I386_DIR32 0x0006 ///< Direct 32-bit reference to the symbols virtual address. -#define EFI_IMAGE_REL_I386_DIR32NB 0x0007 ///< Direct 32-bit reference to the symbols virtual address, base not included. -#define EFI_IMAGE_REL_I386_SEG12 0x0009 ///< Direct 16-bit reference to the segment-selector bits of a 32-bit virtual address. -#define EFI_IMAGE_REL_I386_SECTION 0x000A -#define EFI_IMAGE_REL_I386_SECREL 0x000B -#define EFI_IMAGE_REL_I386_REL32 0x0014 ///< PC-relative 32-bit reference to the symbols virtual address. +#define EFI_IMAGE_REL_I386_ABSOLUTE 0x0000 ///< Reference is absolute, no relocation is necessary. +#define EFI_IMAGE_REL_I386_DIR16 0x0001 ///< Direct 16-bit reference to the symbols virtual address. +#define EFI_IMAGE_REL_I386_REL16 0x0002 ///< PC-relative 16-bit reference to the symbols virtual address. +#define EFI_IMAGE_REL_I386_DIR32 0x0006 ///< Direct 32-bit reference to the symbols virtual address. +#define EFI_IMAGE_REL_I386_DIR32NB 0x0007 ///< Direct 32-bit reference to the symbols virtual address, base not included. +#define EFI_IMAGE_REL_I386_SEG12 0x0009 ///< Direct 16-bit reference to the segment-selector bits of a 32-bit virtual address. +#define EFI_IMAGE_REL_I386_SECTION 0x000A +#define EFI_IMAGE_REL_I386_SECREL 0x000B +#define EFI_IMAGE_REL_I386_REL32 0x0014 ///< PC-relative 32-bit reference to the symbols virtual address. // // x64 processor relocation types. @@ -474,8 +472,8 @@ typedef struct { /// Based relocation format. /// typedef struct { - UINT32 VirtualAddress; - UINT32 SizeOfBlock; + UINT32 VirtualAddress; + UINT32 SizeOfBlock; } EFI_IMAGE_BASE_RELOCATION; /// @@ -501,25 +499,25 @@ typedef struct { /// /// Relocation types of RISC-V processor. /// -#define EFI_IMAGE_REL_BASED_RISCV_HI20 5 -#define EFI_IMAGE_REL_BASED_RISCV_LOW12I 7 -#define EFI_IMAGE_REL_BASED_RISCV_LOW12S 8 +#define EFI_IMAGE_REL_BASED_RISCV_HI20 5 +#define EFI_IMAGE_REL_BASED_RISCV_LOW12I 7 +#define EFI_IMAGE_REL_BASED_RISCV_LOW12S 8 /// /// Line number format. /// typedef struct { union { - UINT32 SymbolTableIndex; ///< Symbol table index of function name if Linenumber is 0. - UINT32 VirtualAddress; ///< Virtual address of line number. + UINT32 SymbolTableIndex; ///< Symbol table index of function name if Linenumber is 0. + UINT32 VirtualAddress; ///< Virtual address of line number. } Type; - UINT16 Linenumber; ///< Line number. + UINT16 Linenumber; ///< Line number. } EFI_IMAGE_LINENUMBER; /// /// Size of EFI_IMAGE_LINENUMBER. /// -#define EFI_IMAGE_SIZEOF_LINENUMBER 6 +#define EFI_IMAGE_SIZEOF_LINENUMBER 6 // // Archive format. @@ -535,20 +533,19 @@ typedef struct { /// Archive Member Headers /// typedef struct { - UINT8 Name[16]; ///< File member name - `/' terminated. - UINT8 Date[12]; ///< File member date - decimal. - UINT8 UserID[6]; ///< File member user id - decimal. - UINT8 GroupID[6]; ///< File member group id - decimal. - UINT8 Mode[8]; ///< File member mode - octal. - UINT8 Size[10]; ///< File member size - decimal. - UINT8 EndHeader[2]; ///< String to end header. (0x60 0x0A). + UINT8 Name[16]; ///< File member name - `/' terminated. + UINT8 Date[12]; ///< File member date - decimal. + UINT8 UserID[6]; ///< File member user id - decimal. + UINT8 GroupID[6]; ///< File member group id - decimal. + UINT8 Mode[8]; ///< File member mode - octal. + UINT8 Size[10]; ///< File member size - decimal. + UINT8 EndHeader[2]; ///< String to end header. (0x60 0x0A). } EFI_IMAGE_ARCHIVE_MEMBER_HEADER; /// /// Size of EFI_IMAGE_ARCHIVE_MEMBER_HEADER. /// -#define EFI_IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR 60 - +#define EFI_IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR 60 // // DLL Support @@ -558,25 +555,25 @@ typedef struct { /// Export Directory Table. /// typedef struct { - UINT32 Characteristics; - UINT32 TimeDateStamp; - UINT16 MajorVersion; - UINT16 MinorVersion; - UINT32 Name; - UINT32 Base; - UINT32 NumberOfFunctions; - UINT32 NumberOfNames; - UINT32 AddressOfFunctions; - UINT32 AddressOfNames; - UINT32 AddressOfNameOrdinals; + UINT32 Characteristics; + UINT32 TimeDateStamp; + UINT16 MajorVersion; + UINT16 MinorVersion; + UINT32 Name; + UINT32 Base; + UINT32 NumberOfFunctions; + UINT32 NumberOfNames; + UINT32 AddressOfFunctions; + UINT32 AddressOfNames; + UINT32 AddressOfNameOrdinals; } EFI_IMAGE_EXPORT_DIRECTORY; /// /// Hint/Name Table. /// typedef struct { - UINT16 Hint; - UINT8 Name[1]; + UINT16 Hint; + UINT8 Name[1]; } EFI_IMAGE_IMPORT_BY_NAME; /// @@ -584,13 +581,13 @@ typedef struct { /// typedef struct { union { - UINT32 Function; - UINT32 Ordinal; - EFI_IMAGE_IMPORT_BY_NAME *AddressOfData; + UINT32 Function; + UINT32 Ordinal; + EFI_IMAGE_IMPORT_BY_NAME *AddressOfData; } u1; } EFI_IMAGE_THUNK_DATA; -#define EFI_IMAGE_ORDINAL_FLAG BIT31 ///< Flag for PE32. +#define EFI_IMAGE_ORDINAL_FLAG BIT31 ///< Flag for PE32. #define EFI_IMAGE_SNAP_BY_ORDINAL(Ordinal) ((Ordinal & EFI_IMAGE_ORDINAL_FLAG) != 0) #define EFI_IMAGE_ORDINAL(Ordinal) (Ordinal & 0xffff) @@ -598,39 +595,38 @@ typedef struct { /// Import Directory Table /// typedef struct { - UINT32 Characteristics; - UINT32 TimeDateStamp; - UINT32 ForwarderChain; - UINT32 Name; - EFI_IMAGE_THUNK_DATA *FirstThunk; + UINT32 Characteristics; + UINT32 TimeDateStamp; + UINT32 ForwarderChain; + UINT32 Name; + EFI_IMAGE_THUNK_DATA *FirstThunk; } EFI_IMAGE_IMPORT_DESCRIPTOR; - /// /// Debug Directory Format. /// typedef struct { - UINT32 Characteristics; - UINT32 TimeDateStamp; - UINT16 MajorVersion; - UINT16 MinorVersion; - UINT32 Type; - UINT32 SizeOfData; - UINT32 RVA; ///< The address of the debug data when loaded, relative to the image base. - UINT32 FileOffset; ///< The file pointer to the debug data. + UINT32 Characteristics; + UINT32 TimeDateStamp; + UINT16 MajorVersion; + UINT16 MinorVersion; + UINT32 Type; + UINT32 SizeOfData; + UINT32 RVA; ///< The address of the debug data when loaded, relative to the image base. + UINT32 FileOffset; ///< The file pointer to the debug data. } EFI_IMAGE_DEBUG_DIRECTORY_ENTRY; -#define EFI_IMAGE_DEBUG_TYPE_CODEVIEW 2 ///< The Visual C++ debug information. +#define EFI_IMAGE_DEBUG_TYPE_CODEVIEW 2 ///< The Visual C++ debug information. /// /// Debug Data Structure defined in Microsoft C++. /// #define CODEVIEW_SIGNATURE_NB10 SIGNATURE_32('N', 'B', '1', '0') typedef struct { - UINT32 Signature; ///< "NB10" - UINT32 Unknown; - UINT32 Unknown2; - UINT32 Unknown3; + UINT32 Signature; ///< "NB10" + UINT32 Unknown; + UINT32 Unknown2; + UINT32 Unknown3; // // Filename of .PDB goes here // @@ -641,18 +637,17 @@ typedef struct { /// #define CODEVIEW_SIGNATURE_RSDS SIGNATURE_32('R', 'S', 'D', 'S') typedef struct { - UINT32 Signature; ///< "RSDS". - UINT32 Unknown; - UINT32 Unknown2; - UINT32 Unknown3; - UINT32 Unknown4; - UINT32 Unknown5; + UINT32 Signature; ///< "RSDS". + UINT32 Unknown; + UINT32 Unknown2; + UINT32 Unknown3; + UINT32 Unknown4; + UINT32 Unknown5; // // Filename of .PDB goes here // } EFI_IMAGE_DEBUG_CODEVIEW_RSDS_ENTRY; - /// /// Debug Data Structure defined by Apple Mach-O to Coff utility. /// @@ -669,12 +664,12 @@ typedef struct { /// Resource format. /// typedef struct { - UINT32 Characteristics; - UINT32 TimeDateStamp; - UINT16 MajorVersion; - UINT16 MinorVersion; - UINT16 NumberOfNamedEntries; - UINT16 NumberOfIdEntries; + UINT32 Characteristics; + UINT32 TimeDateStamp; + UINT16 MajorVersion; + UINT16 MinorVersion; + UINT16 NumberOfNamedEntries; + UINT16 NumberOfIdEntries; // // Array of EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY entries goes here. // @@ -686,16 +681,16 @@ typedef struct { typedef struct { union { struct { - UINT32 NameOffset:31; - UINT32 NameIsString:1; + UINT32 NameOffset : 31; + UINT32 NameIsString : 1; } s; - UINT32 Id; + UINT32 Id; } u1; union { - UINT32 OffsetToData; + UINT32 OffsetToData; struct { - UINT32 OffsetToDirectory:31; - UINT32 DataIsDirectory:1; + UINT32 OffsetToDirectory : 31; + UINT32 DataIsDirectory : 1; } s; } u2; } EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY; @@ -704,36 +699,35 @@ typedef struct { /// Resource directory entry for string. /// typedef struct { - UINT16 Length; - CHAR16 String[1]; + UINT16 Length; + CHAR16 String[1]; } EFI_IMAGE_RESOURCE_DIRECTORY_STRING; /// /// Resource directory entry for data array. /// typedef struct { - UINT32 OffsetToData; - UINT32 Size; - UINT32 CodePage; - UINT32 Reserved; + UINT32 OffsetToData; + UINT32 Size; + UINT32 CodePage; + UINT32 Reserved; } EFI_IMAGE_RESOURCE_DATA_ENTRY; /// /// Header format for TE images, defined in the PI Specification, 1.0. /// typedef struct { - UINT16 Signature; ///< The signature for TE format = "VZ". - UINT16 Machine; ///< From the original file header. - UINT8 NumberOfSections; ///< From the original file header. - UINT8 Subsystem; ///< From original optional header. - UINT16 StrippedSize; ///< Number of bytes we removed from the header. - UINT32 AddressOfEntryPoint; ///< Offset to entry point -- from original optional header. - UINT32 BaseOfCode; ///< From original image -- required for ITP debug. - UINT64 ImageBase; ///< From original file header. - EFI_IMAGE_DATA_DIRECTORY DataDirectory[2]; ///< Only base relocation and debug directory. + UINT16 Signature; ///< The signature for TE format = "VZ". + UINT16 Machine; ///< From the original file header. + UINT8 NumberOfSections; ///< From the original file header. + UINT8 Subsystem; ///< From original optional header. + UINT16 StrippedSize; ///< Number of bytes we removed from the header. + UINT32 AddressOfEntryPoint; ///< Offset to entry point -- from original optional header. + UINT32 BaseOfCode; ///< From original image -- required for ITP debug. + UINT64 ImageBase; ///< From original file header. + EFI_IMAGE_DATA_DIRECTORY DataDirectory[2]; ///< Only base relocation and debug directory. } EFI_TE_IMAGE_HEADER; - #define EFI_TE_IMAGE_HEADER_SIGNATURE SIGNATURE_16('V', 'Z') // @@ -742,21 +736,20 @@ typedef struct { #define EFI_TE_IMAGE_DIRECTORY_ENTRY_BASERELOC 0 #define EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG 1 - /// /// Union of PE32, PE32+, and TE headers. /// typedef union { - EFI_IMAGE_NT_HEADERS32 Pe32; - EFI_IMAGE_NT_HEADERS64 Pe32Plus; - EFI_TE_IMAGE_HEADER Te; + EFI_IMAGE_NT_HEADERS32 Pe32; + EFI_IMAGE_NT_HEADERS64 Pe32Plus; + EFI_TE_IMAGE_HEADER Te; } EFI_IMAGE_OPTIONAL_HEADER_UNION; typedef union { - EFI_IMAGE_NT_HEADERS32 *Pe32; - EFI_IMAGE_NT_HEADERS64 *Pe32Plus; - EFI_TE_IMAGE_HEADER *Te; - EFI_IMAGE_OPTIONAL_HEADER_UNION *Union; + EFI_IMAGE_NT_HEADERS32 *Pe32; + EFI_IMAGE_NT_HEADERS64 *Pe32Plus; + EFI_TE_IMAGE_HEADER *Te; + EFI_IMAGE_OPTIONAL_HEADER_UNION *Union; } EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION; #endif diff --git a/MdePkg/Include/IndustryStandard/Scsi.h b/MdePkg/Include/IndustryStandard/Scsi.h index 64b9918..be8adca 100644 --- a/MdePkg/Include/IndustryStandard/Scsi.h +++ b/MdePkg/Include/IndustryStandard/Scsi.h @@ -15,58 +15,58 @@ // // Commands for all device types // -#define EFI_SCSI_OP_CHANGE_DEFINITION 0x40 -#define EFI_SCSI_OP_COMPARE 0x39 -#define EFI_SCSI_OP_COPY 0x18 -#define EFI_SCSI_OP_COPY_VERIFY 0x3a -#define EFI_SCSI_OP_INQUIRY 0x12 -#define EFI_SCSI_OP_LOG_SELECT 0x4c -#define EFI_SCSI_OP_LOG_SENSE 0x4d -#define EFI_SCSI_OP_MODE_SEL6 0x15 -#define EFI_SCSI_OP_MODE_SEL10 0x55 -#define EFI_SCSI_OP_MODE_SEN6 0x1a -#define EFI_SCSI_OP_MODE_SEN10 0x5a -#define EFI_SCSI_OP_READ_BUFFER 0x3c -#define EFI_SCSI_OP_RECEIVE_DIAG 0x1c -#define EFI_SCSI_OP_REQUEST_SENSE 0x03 -#define EFI_SCSI_OP_SEND_DIAG 0x1d -#define EFI_SCSI_OP_TEST_UNIT_READY 0x00 -#define EFI_SCSI_OP_WRITE_BUFF 0x3b +#define EFI_SCSI_OP_CHANGE_DEFINITION 0x40 +#define EFI_SCSI_OP_COMPARE 0x39 +#define EFI_SCSI_OP_COPY 0x18 +#define EFI_SCSI_OP_COPY_VERIFY 0x3a +#define EFI_SCSI_OP_INQUIRY 0x12 +#define EFI_SCSI_OP_LOG_SELECT 0x4c +#define EFI_SCSI_OP_LOG_SENSE 0x4d +#define EFI_SCSI_OP_MODE_SEL6 0x15 +#define EFI_SCSI_OP_MODE_SEL10 0x55 +#define EFI_SCSI_OP_MODE_SEN6 0x1a +#define EFI_SCSI_OP_MODE_SEN10 0x5a +#define EFI_SCSI_OP_READ_BUFFER 0x3c +#define EFI_SCSI_OP_RECEIVE_DIAG 0x1c +#define EFI_SCSI_OP_REQUEST_SENSE 0x03 +#define EFI_SCSI_OP_SEND_DIAG 0x1d +#define EFI_SCSI_OP_TEST_UNIT_READY 0x00 +#define EFI_SCSI_OP_WRITE_BUFF 0x3b // // Additional commands for Direct Access Devices // -#define EFI_SCSI_OP_FORMAT 0x04 -#define EFI_SCSI_OP_LOCK_UN_CACHE 0x36 -#define EFI_SCSI_OP_PREFETCH 0x34 -#define EFI_SCSI_OP_MEDIA_REMOVAL 0x1e -#define EFI_SCSI_OP_READ6 0x08 -#define EFI_SCSI_OP_READ10 0x28 -#define EFI_SCSI_OP_READ16 0x88 -#define EFI_SCSI_OP_READ_CAPACITY 0x25 -#define EFI_SCSI_OP_READ_CAPACITY16 0x9e -#define EFI_SCSI_OP_READ_DEFECT 0x37 -#define EFI_SCSI_OP_READ_LONG 0x3e -#define EFI_SCSI_OP_REASSIGN_BLK 0x07 -#define EFI_SCSI_OP_RELEASE 0x17 -#define EFI_SCSI_OP_REZERO 0x01 -#define EFI_SCSI_OP_SEARCH_DATA_E 0x31 -#define EFI_SCSI_OP_SEARCH_DATA_H 0x30 -#define EFI_SCSI_OP_SEARCH_DATA_L 0x32 -#define EFI_SCSI_OP_SEEK6 0x0b -#define EFI_SCSI_OP_SEEK10 0x2b -#define EFI_SCSI_OP_SEND_DIAG 0x1d -#define EFI_SCSI_OP_SET_LIMIT 0x33 -#define EFI_SCSI_OP_START_STOP_UNIT 0x1b -#define EFI_SCSI_OP_SYNC_CACHE 0x35 -#define EFI_SCSI_OP_VERIFY 0x2f -#define EFI_SCSI_OP_WRITE6 0x0a -#define EFI_SCSI_OP_WRITE10 0x2a -#define EFI_SCSI_OP_WRITE16 0x8a -#define EFI_SCSI_OP_WRITE_VERIFY 0x2e -#define EFI_SCSI_OP_WRITE_LONG 0x3f -#define EFI_SCSI_OP_WRITE_SAME 0x41 -#define EFI_SCSI_OP_UNMAP 0x42 +#define EFI_SCSI_OP_FORMAT 0x04 +#define EFI_SCSI_OP_LOCK_UN_CACHE 0x36 +#define EFI_SCSI_OP_PREFETCH 0x34 +#define EFI_SCSI_OP_MEDIA_REMOVAL 0x1e +#define EFI_SCSI_OP_READ6 0x08 +#define EFI_SCSI_OP_READ10 0x28 +#define EFI_SCSI_OP_READ16 0x88 +#define EFI_SCSI_OP_READ_CAPACITY 0x25 +#define EFI_SCSI_OP_READ_CAPACITY16 0x9e +#define EFI_SCSI_OP_READ_DEFECT 0x37 +#define EFI_SCSI_OP_READ_LONG 0x3e +#define EFI_SCSI_OP_REASSIGN_BLK 0x07 +#define EFI_SCSI_OP_RELEASE 0x17 +#define EFI_SCSI_OP_REZERO 0x01 +#define EFI_SCSI_OP_SEARCH_DATA_E 0x31 +#define EFI_SCSI_OP_SEARCH_DATA_H 0x30 +#define EFI_SCSI_OP_SEARCH_DATA_L 0x32 +#define EFI_SCSI_OP_SEEK6 0x0b +#define EFI_SCSI_OP_SEEK10 0x2b +#define EFI_SCSI_OP_SEND_DIAG 0x1d +#define EFI_SCSI_OP_SET_LIMIT 0x33 +#define EFI_SCSI_OP_START_STOP_UNIT 0x1b +#define EFI_SCSI_OP_SYNC_CACHE 0x35 +#define EFI_SCSI_OP_VERIFY 0x2f +#define EFI_SCSI_OP_WRITE6 0x0a +#define EFI_SCSI_OP_WRITE10 0x2a +#define EFI_SCSI_OP_WRITE16 0x8a +#define EFI_SCSI_OP_WRITE_VERIFY 0x2e +#define EFI_SCSI_OP_WRITE_LONG 0x3f +#define EFI_SCSI_OP_WRITE_SAME 0x41 +#define EFI_SCSI_OP_UNMAP 0x42 // // Additional commands for Sequential Access Devices @@ -95,8 +95,8 @@ // // Additional commands for Processor Devices // -#define EFI_SCSI_OP_RECEIVE 0x08 -#define EFI_SCSI_OP_SEND 0x0a +#define EFI_SCSI_OP_RECEIVE 0x08 +#define EFI_SCSI_OP_SEND 0x0a // // Additional commands for Write-Once Devices @@ -133,11 +133,11 @@ // // Additional commands for Scanner Devices // -#define EFI_SCSI_OP_GET_DATABUFF_STAT 0x34 -#define EFI_SCSI_OP_GET_WINDOW 0x25 -#define EFI_SCSI_OP_OBJECT_POS 0x31 -#define EFI_SCSI_OP_SCAN 0x1b -#define EFI_SCSI_OP_SET_WINDOW 0x24 +#define EFI_SCSI_OP_GET_DATABUFF_STAT 0x34 +#define EFI_SCSI_OP_GET_WINDOW 0x25 +#define EFI_SCSI_OP_OBJECT_POS 0x31 +#define EFI_SCSI_OP_SCAN 0x1b +#define EFI_SCSI_OP_SET_WINDOW 0x24 // // Additional commands for Optical Memory Devices @@ -147,11 +147,11 @@ // // Additional commands for Medium Changer Devices // -#define EFI_SCSI_OP_EXCHANGE_MEDIUM 0xa6 -#define EFI_SCSI_OP_INIT_ELEMENT_STAT 0x07 -#define EFI_SCSI_OP_POS_TO_ELEMENT 0x2b -#define EFI_SCSI_OP_REQUEST_VE_ADDR 0xb5 -#define EFI_SCSI_OP_SEND_VOL_TAG 0xb6 +#define EFI_SCSI_OP_EXCHANGE_MEDIUM 0xa6 +#define EFI_SCSI_OP_INIT_ELEMENT_STAT 0x07 +#define EFI_SCSI_OP_POS_TO_ELEMENT 0x2b +#define EFI_SCSI_OP_REQUEST_VE_ADDR 0xb5 +#define EFI_SCSI_OP_SEND_VOL_TAG 0xb6 // // Additional commands for Communication Devices @@ -166,14 +166,14 @@ // // Additional commands for Secure Transactions // -#define EFI_SCSI_OP_SECURITY_PROTOCOL_IN 0xa2 -#define EFI_SCSI_OP_SECURITY_PROTOCOL_OUT 0xb5 +#define EFI_SCSI_OP_SECURITY_PROTOCOL_IN 0xa2 +#define EFI_SCSI_OP_SECURITY_PROTOCOL_OUT 0xb5 // // SCSI Data Transfer Direction // -#define EFI_SCSI_DATA_IN 0 -#define EFI_SCSI_DATA_OUT 1 +#define EFI_SCSI_DATA_IN 0 +#define EFI_SCSI_DATA_OUT 1 // // SCSI Block Command Cache Control Parameters @@ -184,229 +184,228 @@ // // Peripheral Device Type Definitions // -#define EFI_SCSI_TYPE_DISK 0x00 ///< Direct-access device (e.g. magnetic disk) -#define EFI_SCSI_TYPE_TAPE 0x01 ///< Sequential-access device (e.g. magnetic tape) -#define EFI_SCSI_TYPE_PRINTER 0x02 ///< Printer device -#define EFI_SCSI_TYPE_PROCESSOR 0x03 ///< Processor device -#define EFI_SCSI_TYPE_WORM 0x04 ///< Write-once device (e.g. some optical disks) -#define EFI_SCSI_TYPE_CDROM 0x05 ///< CD/DVD device -#define EFI_SCSI_TYPE_SCANNER 0x06 ///< Scanner device (obsolete) -#define EFI_SCSI_TYPE_OPTICAL 0x07 ///< Optical memory device (e.g. some optical disks) -#define EFI_SCSI_TYPE_MEDIUMCHANGER 0x08 ///< Medium changer device (e.g. jukeboxes) -#define EFI_SCSI_TYPE_COMMUNICATION 0x09 ///< Communications device (obsolete) -#define EFI_SCSI_TYPE_ASCIT8_1 0x0A ///< Defined by ASC IT8 (Graphic arts pre-press devices) -#define EFI_SCSI_TYPE_ASCIT8_2 0x0B ///< Defined by ASC IT8 (Graphic arts pre-press devices) -#define EFI_SCSI_TYPE_RAID 0x0C ///< Storage array controller device (e.g., RAID) -#define EFI_SCSI_TYPE_SES 0x0D ///< Enclosure services device -#define EFI_SCSI_TYPE_RBC 0x0E ///< Simplified direct-access device (e.g., magnetic disk) -#define EFI_SCSI_TYPE_OCRW 0x0F ///< Optical card reader/writer device -#define EFI_SCSI_TYPE_BRIDGE 0x10 ///< Bridge Controller Commands -#define EFI_SCSI_TYPE_OSD 0x11 ///< Object-based Storage Device -#define EFI_SCSI_TYPE_AUTOMATION 0x12 ///< Automation/Drive Interface -#define EFI_SCSI_TYPE_SECURITYMANAGER 0x13 ///< Security manager device -#define EFI_SCSI_TYPE_RESERVED_LOW 0x14 ///< Reserved (low) -#define EFI_SCSI_TYPE_RESERVED_HIGH 0x1D ///< Reserved (high) -#define EFI_SCSI_TYPE_WLUN 0x1E ///< Well known logical unit -#define EFI_SCSI_TYPE_UNKNOWN 0x1F ///< Unknown or no device type +#define EFI_SCSI_TYPE_DISK 0x00 ///< Direct-access device (e.g. magnetic disk) +#define EFI_SCSI_TYPE_TAPE 0x01 ///< Sequential-access device (e.g. magnetic tape) +#define EFI_SCSI_TYPE_PRINTER 0x02 ///< Printer device +#define EFI_SCSI_TYPE_PROCESSOR 0x03 ///< Processor device +#define EFI_SCSI_TYPE_WORM 0x04 ///< Write-once device (e.g. some optical disks) +#define EFI_SCSI_TYPE_CDROM 0x05 ///< CD/DVD device +#define EFI_SCSI_TYPE_SCANNER 0x06 ///< Scanner device (obsolete) +#define EFI_SCSI_TYPE_OPTICAL 0x07 ///< Optical memory device (e.g. some optical disks) +#define EFI_SCSI_TYPE_MEDIUMCHANGER 0x08 ///< Medium changer device (e.g. jukeboxes) +#define EFI_SCSI_TYPE_COMMUNICATION 0x09 ///< Communications device (obsolete) +#define EFI_SCSI_TYPE_ASCIT8_1 0x0A ///< Defined by ASC IT8 (Graphic arts pre-press devices) +#define EFI_SCSI_TYPE_ASCIT8_2 0x0B ///< Defined by ASC IT8 (Graphic arts pre-press devices) +#define EFI_SCSI_TYPE_RAID 0x0C ///< Storage array controller device (e.g., RAID) +#define EFI_SCSI_TYPE_SES 0x0D ///< Enclosure services device +#define EFI_SCSI_TYPE_RBC 0x0E ///< Simplified direct-access device (e.g., magnetic disk) +#define EFI_SCSI_TYPE_OCRW 0x0F ///< Optical card reader/writer device +#define EFI_SCSI_TYPE_BRIDGE 0x10 ///< Bridge Controller Commands +#define EFI_SCSI_TYPE_OSD 0x11 ///< Object-based Storage Device +#define EFI_SCSI_TYPE_AUTOMATION 0x12 ///< Automation/Drive Interface +#define EFI_SCSI_TYPE_SECURITYMANAGER 0x13 ///< Security manager device +#define EFI_SCSI_TYPE_RESERVED_LOW 0x14 ///< Reserved (low) +#define EFI_SCSI_TYPE_RESERVED_HIGH 0x1D ///< Reserved (high) +#define EFI_SCSI_TYPE_WLUN 0x1E ///< Well known logical unit +#define EFI_SCSI_TYPE_UNKNOWN 0x1F ///< Unknown or no device type // // Page Codes for INQUIRY command // -#define EFI_SCSI_PAGE_CODE_SUPPORTED_VPD 0x00 -#define EFI_SCSI_PAGE_CODE_BLOCK_LIMITS_VPD 0xB0 +#define EFI_SCSI_PAGE_CODE_SUPPORTED_VPD 0x00 +#define EFI_SCSI_PAGE_CODE_BLOCK_LIMITS_VPD 0xB0 #pragma pack(1) /// /// Standard INQUIRY data format /// typedef struct { - UINT8 Peripheral_Type : 5; - UINT8 Peripheral_Qualifier : 3; - UINT8 DeviceType_Modifier : 7; - UINT8 Rmb : 1; - UINT8 Version; - UINT8 Response_Data_Format; - UINT8 Addnl_Length; - UINT8 Reserved_5_95[95 - 5 + 1]; + UINT8 Peripheral_Type : 5; + UINT8 Peripheral_Qualifier : 3; + UINT8 DeviceType_Modifier : 7; + UINT8 Rmb : 1; + UINT8 Version; + UINT8 Response_Data_Format; + UINT8 Addnl_Length; + UINT8 Reserved_5_95[95 - 5 + 1]; } EFI_SCSI_INQUIRY_DATA; /// /// Supported VPD Pages VPD page /// typedef struct { - UINT8 Peripheral_Type : 5; - UINT8 Peripheral_Qualifier : 3; - UINT8 PageCode; - UINT8 PageLength2; - UINT8 PageLength1; - UINT8 SupportedVpdPageList[0x100]; + UINT8 Peripheral_Type : 5; + UINT8 Peripheral_Qualifier : 3; + UINT8 PageCode; + UINT8 PageLength2; + UINT8 PageLength1; + UINT8 SupportedVpdPageList[0x100]; } EFI_SCSI_SUPPORTED_VPD_PAGES_VPD_PAGE; /// /// Block Limits VPD page /// typedef struct { - UINT8 Peripheral_Type : 5; - UINT8 Peripheral_Qualifier : 3; - UINT8 PageCode; - UINT8 PageLength2; - UINT8 PageLength1; - UINT8 WriteSameNonZero : 1; - UINT8 Reserved_4 : 7; - UINT8 MaximumCompareAndWriteLength; - UINT8 OptimalTransferLengthGranularity2; - UINT8 OptimalTransferLengthGranularity1; - UINT8 MaximumTransferLength4; - UINT8 MaximumTransferLength3; - UINT8 MaximumTransferLength2; - UINT8 MaximumTransferLength1; - UINT8 OptimalTransferLength4; - UINT8 OptimalTransferLength3; - UINT8 OptimalTransferLength2; - UINT8 OptimalTransferLength1; - UINT8 MaximumPrefetchXdreadXdwriteTransferLength4; - UINT8 MaximumPrefetchXdreadXdwriteTransferLength3; - UINT8 MaximumPrefetchXdreadXdwriteTransferLength2; - UINT8 MaximumPrefetchXdreadXdwriteTransferLength1; - UINT8 MaximumUnmapLbaCount4; - UINT8 MaximumUnmapLbaCount3; - UINT8 MaximumUnmapLbaCount2; - UINT8 MaximumUnmapLbaCount1; - UINT8 MaximumUnmapBlockDescriptorCount4; - UINT8 MaximumUnmapBlockDescriptorCount3; - UINT8 MaximumUnmapBlockDescriptorCount2; - UINT8 MaximumUnmapBlockDescriptorCount1; - UINT8 OptimalUnmapGranularity4; - UINT8 OptimalUnmapGranularity3; - UINT8 OptimalUnmapGranularity2; - UINT8 OptimalUnmapGranularity1; - UINT8 UnmapGranularityAlignment4 : 7; - UINT8 UnmapGranularityAlignmentValid : 1; - UINT8 UnmapGranularityAlignment3; - UINT8 UnmapGranularityAlignment2; - UINT8 UnmapGranularityAlignment1; - UINT8 MaximumWriteSameLength4; - UINT8 MaximumWriteSameLength3; - UINT8 MaximumWriteSameLength2; - UINT8 MaximumWriteSameLength1; - UINT8 MaximumAtomicTransferLength4; - UINT8 MaximumAtomicTransferLength3; - UINT8 MaximumAtomicTransferLength2; - UINT8 MaximumAtomicTransferLength1; - UINT8 AtomicAlignment4; - UINT8 AtomicAlignment3; - UINT8 AtomicAlignment2; - UINT8 AtomicAlignment1; - UINT8 AtomicTransferLengthGranularity4; - UINT8 AtomicTransferLengthGranularity3; - UINT8 AtomicTransferLengthGranularity2; - UINT8 AtomicTransferLengthGranularity1; - UINT8 MaximumAtomicTransferLengthWithAtomicBoundary4; - UINT8 MaximumAtomicTransferLengthWithAtomicBoundary3; - UINT8 MaximumAtomicTransferLengthWithAtomicBoundary2; - UINT8 MaximumAtomicTransferLengthWithAtomicBoundary1; - UINT8 MaximumAtomicBoundarySize4; - UINT8 MaximumAtomicBoundarySize3; - UINT8 MaximumAtomicBoundarySize2; - UINT8 MaximumAtomicBoundarySize1; + UINT8 Peripheral_Type : 5; + UINT8 Peripheral_Qualifier : 3; + UINT8 PageCode; + UINT8 PageLength2; + UINT8 PageLength1; + UINT8 WriteSameNonZero : 1; + UINT8 Reserved_4 : 7; + UINT8 MaximumCompareAndWriteLength; + UINT8 OptimalTransferLengthGranularity2; + UINT8 OptimalTransferLengthGranularity1; + UINT8 MaximumTransferLength4; + UINT8 MaximumTransferLength3; + UINT8 MaximumTransferLength2; + UINT8 MaximumTransferLength1; + UINT8 OptimalTransferLength4; + UINT8 OptimalTransferLength3; + UINT8 OptimalTransferLength2; + UINT8 OptimalTransferLength1; + UINT8 MaximumPrefetchXdreadXdwriteTransferLength4; + UINT8 MaximumPrefetchXdreadXdwriteTransferLength3; + UINT8 MaximumPrefetchXdreadXdwriteTransferLength2; + UINT8 MaximumPrefetchXdreadXdwriteTransferLength1; + UINT8 MaximumUnmapLbaCount4; + UINT8 MaximumUnmapLbaCount3; + UINT8 MaximumUnmapLbaCount2; + UINT8 MaximumUnmapLbaCount1; + UINT8 MaximumUnmapBlockDescriptorCount4; + UINT8 MaximumUnmapBlockDescriptorCount3; + UINT8 MaximumUnmapBlockDescriptorCount2; + UINT8 MaximumUnmapBlockDescriptorCount1; + UINT8 OptimalUnmapGranularity4; + UINT8 OptimalUnmapGranularity3; + UINT8 OptimalUnmapGranularity2; + UINT8 OptimalUnmapGranularity1; + UINT8 UnmapGranularityAlignment4 : 7; + UINT8 UnmapGranularityAlignmentValid : 1; + UINT8 UnmapGranularityAlignment3; + UINT8 UnmapGranularityAlignment2; + UINT8 UnmapGranularityAlignment1; + UINT8 MaximumWriteSameLength4; + UINT8 MaximumWriteSameLength3; + UINT8 MaximumWriteSameLength2; + UINT8 MaximumWriteSameLength1; + UINT8 MaximumAtomicTransferLength4; + UINT8 MaximumAtomicTransferLength3; + UINT8 MaximumAtomicTransferLength2; + UINT8 MaximumAtomicTransferLength1; + UINT8 AtomicAlignment4; + UINT8 AtomicAlignment3; + UINT8 AtomicAlignment2; + UINT8 AtomicAlignment1; + UINT8 AtomicTransferLengthGranularity4; + UINT8 AtomicTransferLengthGranularity3; + UINT8 AtomicTransferLengthGranularity2; + UINT8 AtomicTransferLengthGranularity1; + UINT8 MaximumAtomicTransferLengthWithAtomicBoundary4; + UINT8 MaximumAtomicTransferLengthWithAtomicBoundary3; + UINT8 MaximumAtomicTransferLengthWithAtomicBoundary2; + UINT8 MaximumAtomicTransferLengthWithAtomicBoundary1; + UINT8 MaximumAtomicBoundarySize4; + UINT8 MaximumAtomicBoundarySize3; + UINT8 MaximumAtomicBoundarySize2; + UINT8 MaximumAtomicBoundarySize1; } EFI_SCSI_BLOCK_LIMITS_VPD_PAGE; /// /// Error codes 70h and 71h sense data format /// typedef struct { - UINT8 Error_Code : 7; - UINT8 Valid : 1; - UINT8 Segment_Number; - UINT8 Sense_Key : 4; - UINT8 Reserved_21 : 1; - UINT8 Ili : 1; - UINT8 Reserved_22 : 2; - UINT8 Information_3_6[4]; - UINT8 Addnl_Sense_Length; ///< Additional sense length (n-7) - UINT8 Vendor_Specific_8_11[4]; - UINT8 Addnl_Sense_Code; ///< Additional sense code - UINT8 Addnl_Sense_Code_Qualifier; ///< Additional sense code qualifier - UINT8 Field_Replaceable_Unit_Code; ///< Field replaceable unit code - UINT8 Reserved_15_17[3]; + UINT8 Error_Code : 7; + UINT8 Valid : 1; + UINT8 Segment_Number; + UINT8 Sense_Key : 4; + UINT8 Reserved_21 : 1; + UINT8 Ili : 1; + UINT8 Reserved_22 : 2; + UINT8 Information_3_6[4]; + UINT8 Addnl_Sense_Length; ///< Additional sense length (n-7) + UINT8 Vendor_Specific_8_11[4]; + UINT8 Addnl_Sense_Code; ///< Additional sense code + UINT8 Addnl_Sense_Code_Qualifier; ///< Additional sense code qualifier + UINT8 Field_Replaceable_Unit_Code; ///< Field replaceable unit code + UINT8 Reserved_15_17[3]; } EFI_SCSI_SENSE_DATA; /// /// SCSI Disk READ CAPACITY Data /// typedef struct { - UINT8 LastLba3; - UINT8 LastLba2; - UINT8 LastLba1; - UINT8 LastLba0; - UINT8 BlockSize3; - UINT8 BlockSize2; - UINT8 BlockSize1; - UINT8 BlockSize0; + UINT8 LastLba3; + UINT8 LastLba2; + UINT8 LastLba1; + UINT8 LastLba0; + UINT8 BlockSize3; + UINT8 BlockSize2; + UINT8 BlockSize1; + UINT8 BlockSize0; } EFI_SCSI_DISK_CAPACITY_DATA; typedef struct { - UINT8 LastLba7; - UINT8 LastLba6; - UINT8 LastLba5; - UINT8 LastLba4; - UINT8 LastLba3; - UINT8 LastLba2; - UINT8 LastLba1; - UINT8 LastLba0; - UINT8 BlockSize3; - UINT8 BlockSize2; - UINT8 BlockSize1; - UINT8 BlockSize0; - UINT8 Protection; - UINT8 LogicPerPhysical; - UINT8 LowestAlignLogic2; - UINT8 LowestAlignLogic1; - UINT8 Reserved[16]; + UINT8 LastLba7; + UINT8 LastLba6; + UINT8 LastLba5; + UINT8 LastLba4; + UINT8 LastLba3; + UINT8 LastLba2; + UINT8 LastLba1; + UINT8 LastLba0; + UINT8 BlockSize3; + UINT8 BlockSize2; + UINT8 BlockSize1; + UINT8 BlockSize0; + UINT8 Protection; + UINT8 LogicPerPhysical; + UINT8 LowestAlignLogic2; + UINT8 LowestAlignLogic1; + UINT8 Reserved[16]; } EFI_SCSI_DISK_CAPACITY_DATA16; typedef struct { - UINT16 DataLen; - UINT16 BlkDespDataLen; - UINT8 Reserved[4]; + UINT16 DataLen; + UINT16 BlkDespDataLen; + UINT8 Reserved[4]; } EFI_SCSI_DISK_UNMAP_PARAM_LIST_HEADER; typedef struct { - UINT64 Lba; - UINT32 BlockNum; - UINT8 Reserved[4]; + UINT64 Lba; + UINT32 BlockNum; + UINT8 Reserved[4]; } EFI_SCSI_DISK_UNMAP_BLOCK_DESP; - #pragma pack() // // Sense Key // -#define EFI_SCSI_SK_NO_SENSE (0x0) -#define EFI_SCSI_SK_RECOVERY_ERROR (0x1) -#define EFI_SCSI_SK_NOT_READY (0x2) -#define EFI_SCSI_SK_MEDIUM_ERROR (0x3) -#define EFI_SCSI_SK_HARDWARE_ERROR (0x4) -#define EFI_SCSI_SK_ILLEGAL_REQUEST (0x5) -#define EFI_SCSI_SK_UNIT_ATTENTION (0x6) -#define EFI_SCSI_SK_DATA_PROTECT (0x7) -#define EFI_SCSI_SK_BLANK_CHECK (0x8) -#define EFI_SCSI_SK_VENDOR_SPECIFIC (0x9) -#define EFI_SCSI_SK_RESERVED_A (0xA) -#define EFI_SCSI_SK_ABORT (0xB) -#define EFI_SCSI_SK_RESERVED_C (0xC) -#define EFI_SCSI_SK_OVERFLOW (0xD) -#define EFI_SCSI_SK_MISCOMPARE (0xE) -#define EFI_SCSI_SK_RESERVED_F (0xF) +#define EFI_SCSI_SK_NO_SENSE (0x0) +#define EFI_SCSI_SK_RECOVERY_ERROR (0x1) +#define EFI_SCSI_SK_NOT_READY (0x2) +#define EFI_SCSI_SK_MEDIUM_ERROR (0x3) +#define EFI_SCSI_SK_HARDWARE_ERROR (0x4) +#define EFI_SCSI_SK_ILLEGAL_REQUEST (0x5) +#define EFI_SCSI_SK_UNIT_ATTENTION (0x6) +#define EFI_SCSI_SK_DATA_PROTECT (0x7) +#define EFI_SCSI_SK_BLANK_CHECK (0x8) +#define EFI_SCSI_SK_VENDOR_SPECIFIC (0x9) +#define EFI_SCSI_SK_RESERVED_A (0xA) +#define EFI_SCSI_SK_ABORT (0xB) +#define EFI_SCSI_SK_RESERVED_C (0xC) +#define EFI_SCSI_SK_OVERFLOW (0xD) +#define EFI_SCSI_SK_MISCOMPARE (0xE) +#define EFI_SCSI_SK_RESERVED_F (0xF) // // Additional Sense Codes and Sense Code Qualifiers. // Only some frequently used additional sense codes and qualifiers are // defined here. Please refer to SCSI standard for full value definition. // -#define EFI_SCSI_ASC_NOT_READY (0x04) -#define EFI_SCSI_ASCQ_IN_PROGRESS (0x01) +#define EFI_SCSI_ASC_NOT_READY (0x04) +#define EFI_SCSI_ASCQ_IN_PROGRESS (0x01) #define EFI_SCSI_ASC_MEDIA_ERR1 (0x10) #define EFI_SCSI_ASC_MEDIA_ERR2 (0x11) diff --git a/MdePkg/Include/IndustryStandard/Sd.h b/MdePkg/Include/IndustryStandard/Sd.h index bcecf0a..33c66d7 100644 --- a/MdePkg/Include/IndustryStandard/Sd.h +++ b/MdePkg/Include/IndustryStandard/Sd.h @@ -15,44 +15,44 @@ // // SD command index // -#define SD_GO_IDLE_STATE 0 -#define SD_ALL_SEND_CID 2 -#define SD_SET_RELATIVE_ADDR 3 -#define SD_SET_DSR 4 -#define SDIO_SEND_OP_COND 5 -#define SD_SWITCH_FUNC 6 -#define SD_SELECT_DESELECT_CARD 7 -#define SD_SEND_IF_COND 8 -#define SD_SEND_CSD 9 -#define SD_SEND_CID 10 -#define SD_VOLTAGE_SWITCH 11 -#define SD_STOP_TRANSMISSION 12 -#define SD_SEND_STATUS 13 -#define SD_GO_INACTIVE_STATE 15 -#define SD_SET_BLOCKLEN 16 -#define SD_READ_SINGLE_BLOCK 17 -#define SD_READ_MULTIPLE_BLOCK 18 -#define SD_SEND_TUNING_BLOCK 19 -#define SD_SPEED_CLASS_CONTROL 20 -#define SD_SET_BLOCK_COUNT 23 -#define SD_WRITE_SINGLE_BLOCK 24 -#define SD_WRITE_MULTIPLE_BLOCK 25 -#define SD_PROGRAM_CSD 27 -#define SD_SET_WRITE_PROT 28 -#define SD_CLR_WRITE_PROT 29 -#define SD_SEND_WRITE_PROT 30 -#define SD_ERASE_WR_BLK_START 32 -#define SD_ERASE_WR_BLK_END 33 -#define SD_ERASE 38 -#define SD_LOCK_UNLOCK 42 -#define SD_READ_EXTR_SINGLE 48 -#define SD_WRITE_EXTR_SINGLE 49 -#define SDIO_RW_DIRECT 52 -#define SDIO_RW_EXTENDED 53 -#define SD_APP_CMD 55 -#define SD_GEN_CMD 56 -#define SD_READ_EXTR_MULTI 58 -#define SD_WRITE_EXTR_MULTI 59 +#define SD_GO_IDLE_STATE 0 +#define SD_ALL_SEND_CID 2 +#define SD_SET_RELATIVE_ADDR 3 +#define SD_SET_DSR 4 +#define SDIO_SEND_OP_COND 5 +#define SD_SWITCH_FUNC 6 +#define SD_SELECT_DESELECT_CARD 7 +#define SD_SEND_IF_COND 8 +#define SD_SEND_CSD 9 +#define SD_SEND_CID 10 +#define SD_VOLTAGE_SWITCH 11 +#define SD_STOP_TRANSMISSION 12 +#define SD_SEND_STATUS 13 +#define SD_GO_INACTIVE_STATE 15 +#define SD_SET_BLOCKLEN 16 +#define SD_READ_SINGLE_BLOCK 17 +#define SD_READ_MULTIPLE_BLOCK 18 +#define SD_SEND_TUNING_BLOCK 19 +#define SD_SPEED_CLASS_CONTROL 20 +#define SD_SET_BLOCK_COUNT 23 +#define SD_WRITE_SINGLE_BLOCK 24 +#define SD_WRITE_MULTIPLE_BLOCK 25 +#define SD_PROGRAM_CSD 27 +#define SD_SET_WRITE_PROT 28 +#define SD_CLR_WRITE_PROT 29 +#define SD_SEND_WRITE_PROT 30 +#define SD_ERASE_WR_BLK_START 32 +#define SD_ERASE_WR_BLK_END 33 +#define SD_ERASE 38 +#define SD_LOCK_UNLOCK 42 +#define SD_READ_EXTR_SINGLE 48 +#define SD_WRITE_EXTR_SINGLE 49 +#define SDIO_RW_DIRECT 52 +#define SDIO_RW_EXTENDED 53 +#define SD_APP_CMD 55 +#define SD_GEN_CMD 56 +#define SD_READ_EXTR_MULTI 58 +#define SD_WRITE_EXTR_MULTI 59 #define SD_SET_BUS_WIDTH 6 // ACMD6 #define SD_STATUS 13 // ACMD13 @@ -64,110 +64,110 @@ #pragma pack(1) typedef struct { - UINT8 NotUsed:1; // Not used [0:0] - UINT8 Crc:7; // CRC [7:1] - UINT16 ManufacturingDate:12; // Manufacturing date [19:8] - UINT16 Reserved:4; // Reserved [23:20] - UINT8 ProductSerialNumber[4]; // Product serial number [55:24] - UINT8 ProductRevision; // Product revision [63:56] - UINT8 ProductName[5]; // Product name [103:64] - UINT8 OemId[2]; // OEM/Application ID [119:104] - UINT8 ManufacturerId; // Manufacturer ID [127:120] + UINT8 NotUsed : 1; // Not used [0:0] + UINT8 Crc : 7; // CRC [7:1] + UINT16 ManufacturingDate : 12; // Manufacturing date [19:8] + UINT16 Reserved : 4; // Reserved [23:20] + UINT8 ProductSerialNumber[4]; // Product serial number [55:24] + UINT8 ProductRevision; // Product revision [63:56] + UINT8 ProductName[5]; // Product name [103:64] + UINT8 OemId[2]; // OEM/Application ID [119:104] + UINT8 ManufacturerId; // Manufacturer ID [127:120] } SD_CID; typedef struct { - UINT32 NotUsed:1; // Not used [0:0] - UINT32 Crc:7; // CRC [7:1] - UINT32 Reserved:2; // Reserved [9:8] - UINT32 FileFormat:2; // File format [11:10] - UINT32 TmpWriteProtect:1; // Temporary write protection [12:12] - UINT32 PermWriteProtect:1; // Permanent write protection [13:13] - UINT32 Copy:1; // Copy flag (OTP) [14:14] - UINT32 FileFormatGrp:1; // File format group [15:15] - UINT32 Reserved1:5; // Reserved [20:16] - UINT32 WriteBlPartial:1; // Partial blocks for write allowed [21:21] - UINT32 WriteBlLen:4; // Max. write data block length [25:22] - UINT32 R2WFactor:3; // Write speed factor [28:26] - UINT32 Reserved2:2; // Manufacturer default ECC [30:29] - UINT32 WpGrpEnable:1; // Write protect group enable [31:31] - - UINT32 WpGrpSize:7; // Write protect group size [38:32] - UINT32 SectorSize:7; // Erase sector size [45:39] - UINT32 EraseBlkEn:1; // Erase single block enable [46:46] - UINT32 CSizeMul:3; // device size multiplier [49:47] - UINT32 VddWCurrMax:3; // max. write current @VDD max [52:50] - UINT32 VddWCurrMin:3; // max. write current @VDD min [55:53] - UINT32 VddRCurrMax:3; // max. read current @VDD max [58:56] - UINT32 VddRCurrMin:3; // max. read current @VDD min [61:59] - UINT32 CSizeLow:2; // Device size low 2 bits [63:62] - - UINT32 CSizeHigh:10; // Device size high 10 bits [73:64] - UINT32 Reserved4:2; // Reserved [75:74] - UINT32 DsrImp:1; // DSR implemented [76:76] - UINT32 ReadBlkMisalign:1; // Read block misalignment [77:77] - UINT32 WriteBlkMisalign:1; // Write block misalignment [78:78] - UINT32 ReadBlPartial:1; // Partial blocks for read allowed [79:79] - UINT32 ReadBlLen:4; // Max. read data block length [83:80] - UINT32 Ccc:12; // Card command classes [95:84] - - UINT32 TranSpeed:8; // Max. data transfer rate [103:96] - UINT32 Nsac:8; // Data read access-time in CLK cycles (NSAC*100) [111:104] - UINT32 Taac:8; // Data read access-time [119:112] - UINT32 Reserved5:6; // Reserved [125:120] - UINT32 CsdStructure:2; // CSD structure [127:126] + UINT32 NotUsed : 1; // Not used [0:0] + UINT32 Crc : 7; // CRC [7:1] + UINT32 Reserved : 2; // Reserved [9:8] + UINT32 FileFormat : 2; // File format [11:10] + UINT32 TmpWriteProtect : 1; // Temporary write protection [12:12] + UINT32 PermWriteProtect : 1; // Permanent write protection [13:13] + UINT32 Copy : 1; // Copy flag (OTP) [14:14] + UINT32 FileFormatGrp : 1; // File format group [15:15] + UINT32 Reserved1 : 5; // Reserved [20:16] + UINT32 WriteBlPartial : 1; // Partial blocks for write allowed [21:21] + UINT32 WriteBlLen : 4; // Max. write data block length [25:22] + UINT32 R2WFactor : 3; // Write speed factor [28:26] + UINT32 Reserved2 : 2; // Manufacturer default ECC [30:29] + UINT32 WpGrpEnable : 1; // Write protect group enable [31:31] + + UINT32 WpGrpSize : 7; // Write protect group size [38:32] + UINT32 SectorSize : 7; // Erase sector size [45:39] + UINT32 EraseBlkEn : 1; // Erase single block enable [46:46] + UINT32 CSizeMul : 3; // device size multiplier [49:47] + UINT32 VddWCurrMax : 3; // max. write current @VDD max [52:50] + UINT32 VddWCurrMin : 3; // max. write current @VDD min [55:53] + UINT32 VddRCurrMax : 3; // max. read current @VDD max [58:56] + UINT32 VddRCurrMin : 3; // max. read current @VDD min [61:59] + UINT32 CSizeLow : 2; // Device size low 2 bits [63:62] + + UINT32 CSizeHigh : 10; // Device size high 10 bits [73:64] + UINT32 Reserved4 : 2; // Reserved [75:74] + UINT32 DsrImp : 1; // DSR implemented [76:76] + UINT32 ReadBlkMisalign : 1; // Read block misalignment [77:77] + UINT32 WriteBlkMisalign : 1; // Write block misalignment [78:78] + UINT32 ReadBlPartial : 1; // Partial blocks for read allowed [79:79] + UINT32 ReadBlLen : 4; // Max. read data block length [83:80] + UINT32 Ccc : 12; // Card command classes [95:84] + + UINT32 TranSpeed : 8; // Max. data transfer rate [103:96] + UINT32 Nsac : 8; // Data read access-time in CLK cycles (NSAC*100) [111:104] + UINT32 Taac : 8; // Data read access-time [119:112] + UINT32 Reserved5 : 6; // Reserved [125:120] + UINT32 CsdStructure : 2; // CSD structure [127:126] } SD_CSD; typedef struct { - UINT32 NotUsed:1; // Not used [0:0] - UINT32 Crc:7; // CRC [7:1] - UINT32 Reserved:2; // Reserved [9:8] - UINT32 FileFormat:2; // File format [11:10] - UINT32 TmpWriteProtect:1; // Temporary write protection [12:12] - UINT32 PermWriteProtect:1; // Permanent write protection [13:13] - UINT32 Copy:1; // Copy flag (OTP) [14:14] - UINT32 FileFormatGrp:1; // File format group [15:15] - UINT32 Reserved1:5; // Reserved [20:16] - UINT32 WriteBlPartial:1; // Partial blocks for write allowed [21:21] - UINT32 WriteBlLen:4; // Max. write data block length [25:22] - UINT32 R2WFactor:3; // Write speed factor [28:26] - UINT32 Reserved2:2; // Manufacturer default ECC [30:29] - UINT32 WpGrpEnable:1; // Write protect group enable [31:31] - - UINT32 WpGrpSize:7; // Write protect group size [38:32] - UINT32 SectorSize:7; // Erase sector size [45:39] - UINT32 EraseBlkEn:1; // Erase single block enable [46:46] - UINT32 Reserved3:1; // Reserved [47:47] - UINT32 CSizeLow:16; // Device size low 16 bits [63:48] - - UINT32 CSizeHigh:6; // Device size high 6 bits [69:64] - UINT32 Reserved4:6; // Reserved [75:70] - UINT32 DsrImp:1; // DSR implemented [76:76] - UINT32 ReadBlkMisalign:1; // Read block misalignment [77:77] - UINT32 WriteBlkMisalign:1; // Write block misalignment [78:78] - UINT32 ReadBlPartial:1; // Partial blocks for read allowed [79:79] - UINT32 ReadBlLen:4; // Max. read data block length [83:80] - UINT32 Ccc:12; // Card command classes [95:84] - - UINT32 TranSpeed:8; // Max. data transfer rate [103:96] - UINT32 Nsac:8; // Data read access-time in CLK cycles (NSAC*100) [111:104] - UINT32 Taac:8; // Data read access-time [119:112] - UINT32 Reserved5:6; // Reserved [125:120] - UINT32 CsdStructure:2; // CSD structure [127:126] + UINT32 NotUsed : 1; // Not used [0:0] + UINT32 Crc : 7; // CRC [7:1] + UINT32 Reserved : 2; // Reserved [9:8] + UINT32 FileFormat : 2; // File format [11:10] + UINT32 TmpWriteProtect : 1; // Temporary write protection [12:12] + UINT32 PermWriteProtect : 1; // Permanent write protection [13:13] + UINT32 Copy : 1; // Copy flag (OTP) [14:14] + UINT32 FileFormatGrp : 1; // File format group [15:15] + UINT32 Reserved1 : 5; // Reserved [20:16] + UINT32 WriteBlPartial : 1; // Partial blocks for write allowed [21:21] + UINT32 WriteBlLen : 4; // Max. write data block length [25:22] + UINT32 R2WFactor : 3; // Write speed factor [28:26] + UINT32 Reserved2 : 2; // Manufacturer default ECC [30:29] + UINT32 WpGrpEnable : 1; // Write protect group enable [31:31] + + UINT32 WpGrpSize : 7; // Write protect group size [38:32] + UINT32 SectorSize : 7; // Erase sector size [45:39] + UINT32 EraseBlkEn : 1; // Erase single block enable [46:46] + UINT32 Reserved3 : 1; // Reserved [47:47] + UINT32 CSizeLow : 16; // Device size low 16 bits [63:48] + + UINT32 CSizeHigh : 6; // Device size high 6 bits [69:64] + UINT32 Reserved4 : 6; // Reserved [75:70] + UINT32 DsrImp : 1; // DSR implemented [76:76] + UINT32 ReadBlkMisalign : 1; // Read block misalignment [77:77] + UINT32 WriteBlkMisalign : 1; // Write block misalignment [78:78] + UINT32 ReadBlPartial : 1; // Partial blocks for read allowed [79:79] + UINT32 ReadBlLen : 4; // Max. read data block length [83:80] + UINT32 Ccc : 12; // Card command classes [95:84] + + UINT32 TranSpeed : 8; // Max. data transfer rate [103:96] + UINT32 Nsac : 8; // Data read access-time in CLK cycles (NSAC*100) [111:104] + UINT32 Taac : 8; // Data read access-time [119:112] + UINT32 Reserved5 : 6; // Reserved [125:120] + UINT32 CsdStructure : 2; // CSD structure [127:126] } SD_CSD2; typedef struct { - UINT32 Reserved; // Reserved [31:0] - - UINT32 CmdSupport:4; // Command Support bits [35:32] - UINT32 Reserved1:6; // Reserved [41:36] - UINT32 SdSpec4:1; // Spec. Version 4.00 or higher [42:42] - UINT32 ExSecurity:4; // Extended Security Support [46:43] - UINT32 SdSpec3:1; // Spec. Version 3.00 or higher [47:47] - UINT32 SdBusWidths:4; // DAT Bus widths supported [51:48] - UINT32 SdSecurity:3; // CPRM security support [54:52] - UINT32 DataStatAfterErase:1; // Data status after erases [55] - UINT32 SdSpec:4; // SD Memory Card Spec. Version [59:56] - UINT32 ScrStructure:4; // SCR Structure [63:60] + UINT32 Reserved; // Reserved [31:0] + + UINT32 CmdSupport : 4; // Command Support bits [35:32] + UINT32 Reserved1 : 6; // Reserved [41:36] + UINT32 SdSpec4 : 1; // Spec. Version 4.00 or higher [42:42] + UINT32 ExSecurity : 4; // Extended Security Support [46:43] + UINT32 SdSpec3 : 1; // Spec. Version 3.00 or higher [47:47] + UINT32 SdBusWidths : 4; // DAT Bus widths supported [51:48] + UINT32 SdSecurity : 3; // CPRM security support [54:52] + UINT32 DataStatAfterErase : 1; // Data status after erases [55] + UINT32 SdSpec : 4; // SD Memory Card Spec. Version [59:56] + UINT32 ScrStructure : 4; // SCR Structure [63:60] } SD_SCR; #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/SdramSpd.h b/MdePkg/Include/IndustryStandard/SdramSpd.h index 82aca24..2eb4d9e 100644 --- a/MdePkg/Include/IndustryStandard/SdramSpd.h +++ b/MdePkg/Include/IndustryStandard/SdramSpd.h @@ -15,50 +15,50 @@ // // SDRAM SPD field definitions // -#define SPD_MEMORY_TYPE 2 -#define SPD_SDRAM_ROW_ADDR 3 -#define SPD_SDRAM_COL_ADDR 4 -#define SPD_SDRAM_MODULE_ROWS 5 -#define SPD_SDRAM_MODULE_DATA_WIDTH_LSB 6 -#define SPD_SDRAM_MODULE_DATA_WIDTH_MSB 7 -#define SPD_SDRAM_ECC_SUPPORT 11 -#define SPD_SDRAM_REFRESH 12 -#define SPD_SDRAM_WIDTH 13 -#define SPD_SDRAM_ERROR_WIDTH 14 -#define SPD_SDRAM_BURST_LENGTH 16 -#define SPD_SDRAM_NO_OF_BANKS 17 -#define SPD_SDRAM_CAS_LATENCY 18 -#define SPD_SDRAM_MODULE_ATTR 21 +#define SPD_MEMORY_TYPE 2 +#define SPD_SDRAM_ROW_ADDR 3 +#define SPD_SDRAM_COL_ADDR 4 +#define SPD_SDRAM_MODULE_ROWS 5 +#define SPD_SDRAM_MODULE_DATA_WIDTH_LSB 6 +#define SPD_SDRAM_MODULE_DATA_WIDTH_MSB 7 +#define SPD_SDRAM_ECC_SUPPORT 11 +#define SPD_SDRAM_REFRESH 12 +#define SPD_SDRAM_WIDTH 13 +#define SPD_SDRAM_ERROR_WIDTH 14 +#define SPD_SDRAM_BURST_LENGTH 16 +#define SPD_SDRAM_NO_OF_BANKS 17 +#define SPD_SDRAM_CAS_LATENCY 18 +#define SPD_SDRAM_MODULE_ATTR 21 -#define SPD_SDRAM_TCLK1_PULSE 9 ///< cycle time for highest cas latency -#define SPD_SDRAM_TAC1_PULSE 10 ///< access time for highest cas latency -#define SPD_SDRAM_TCLK2_PULSE 23 ///< cycle time for 2nd highest cas latency -#define SPD_SDRAM_TAC2_PULSE 24 ///< access time for 2nd highest cas latency -#define SPD_SDRAM_TCLK3_PULSE 25 ///< cycle time for 3rd highest cas latency -#define SPD_SDRAM_TAC3_PULSE 26 ///< access time for 3rd highest cas latency -#define SPD_SDRAM_MIN_PRECHARGE 27 -#define SPD_SDRAM_ACTIVE_MIN 28 -#define SPD_SDRAM_RAS_CAS 29 -#define SPD_SDRAM_RAS_PULSE 30 -#define SPD_SDRAM_DENSITY 31 +#define SPD_SDRAM_TCLK1_PULSE 9 ///< cycle time for highest cas latency +#define SPD_SDRAM_TAC1_PULSE 10 ///< access time for highest cas latency +#define SPD_SDRAM_TCLK2_PULSE 23 ///< cycle time for 2nd highest cas latency +#define SPD_SDRAM_TAC2_PULSE 24 ///< access time for 2nd highest cas latency +#define SPD_SDRAM_TCLK3_PULSE 25 ///< cycle time for 3rd highest cas latency +#define SPD_SDRAM_TAC3_PULSE 26 ///< access time for 3rd highest cas latency +#define SPD_SDRAM_MIN_PRECHARGE 27 +#define SPD_SDRAM_ACTIVE_MIN 28 +#define SPD_SDRAM_RAS_CAS 29 +#define SPD_SDRAM_RAS_PULSE 30 +#define SPD_SDRAM_DENSITY 31 // // Memory Type Definitions // -#define SPD_VAL_SDR_TYPE 4 ///< SDR SDRAM memory -#define SPD_VAL_DDR_TYPE 7 ///< DDR SDRAM memory -#define SPD_VAL_DDR2_TYPE 8 ///< DDR2 SDRAM memory -#define SPD_VAL_DDR3_TYPE 11 ///< DDR3 SDRAM memory -#define SPD_VAL_DDR4_TYPE 12 ///< DDR4 SDRAM memory -#define SPD_VAL_LPDDR3_TYPE 15 ///< LPDDR3 SDRAM memory -#define SPD_VAL_LPDDR4_TYPE 16 ///< LPDDR4 SDRAM memory +#define SPD_VAL_SDR_TYPE 4 ///< SDR SDRAM memory +#define SPD_VAL_DDR_TYPE 7 ///< DDR SDRAM memory +#define SPD_VAL_DDR2_TYPE 8 ///< DDR2 SDRAM memory +#define SPD_VAL_DDR3_TYPE 11 ///< DDR3 SDRAM memory +#define SPD_VAL_DDR4_TYPE 12 ///< DDR4 SDRAM memory +#define SPD_VAL_LPDDR3_TYPE 15 ///< LPDDR3 SDRAM memory +#define SPD_VAL_LPDDR4_TYPE 16 ///< LPDDR4 SDRAM memory // // ECC Type Definitions // -#define SPD_ECC_TYPE_NONE 0x00 ///< No error checking -#define SPD_ECC_TYPE_PARITY 0x01 ///< No error checking -#define SPD_ECC_TYPE_ECC 0x02 ///< Error checking only +#define SPD_ECC_TYPE_NONE 0x00 ///< No error checking +#define SPD_ECC_TYPE_PARITY 0x01 ///< No error checking +#define SPD_ECC_TYPE_ECC 0x02 ///< Error checking only // // Module Attributes (Bit positions) // diff --git a/MdePkg/Include/IndustryStandard/SdramSpdDdr3.h b/MdePkg/Include/IndustryStandard/SdramSpdDdr3.h index 2226e63..e65f705 100644 --- a/MdePkg/Include/IndustryStandard/SdramSpdDdr3.h +++ b/MdePkg/Include/IndustryStandard/SdramSpdDdr3.h @@ -16,747 +16,747 @@ typedef union { struct { - UINT8 BytesUsed : 4; ///< Bits 3:0 - UINT8 BytesTotal : 3; ///< Bits 6:4 - UINT8 CrcCoverage : 1; ///< Bits 7:7 + UINT8 BytesUsed : 4; ///< Bits 3:0 + UINT8 BytesTotal : 3; ///< Bits 6:4 + UINT8 CrcCoverage : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_DEVICE_DESCRIPTION_STRUCT; typedef union { struct { - UINT8 Minor : 4; ///< Bits 3:0 - UINT8 Major : 4; ///< Bits 7:4 + UINT8 Minor : 4; ///< Bits 3:0 + UINT8 Major : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_REVISION_STRUCT; typedef union { struct { - UINT8 Type : 8; ///< Bits 7:0 + UINT8 Type : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_DRAM_DEVICE_TYPE_STRUCT; typedef union { struct { - UINT8 ModuleType : 4; ///< Bits 3:0 - UINT8 Reserved : 4; ///< Bits 7:4 + UINT8 ModuleType : 4; ///< Bits 3:0 + UINT8 Reserved : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_MODULE_TYPE_STRUCT; typedef union { struct { - UINT8 Density : 4; ///< Bits 3:0 - UINT8 BankAddress : 3; ///< Bits 6:4 - UINT8 Reserved : 1; ///< Bits 7:7 + UINT8 Density : 4; ///< Bits 3:0 + UINT8 BankAddress : 3; ///< Bits 6:4 + UINT8 Reserved : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_SDRAM_DENSITY_BANKS_STRUCT; typedef union { struct { - UINT8 ColumnAddress : 3; ///< Bits 2:0 - UINT8 RowAddress : 3; ///< Bits 5:3 - UINT8 Reserved : 2; ///< Bits 7:6 + UINT8 ColumnAddress : 3; ///< Bits 2:0 + UINT8 RowAddress : 3; ///< Bits 5:3 + UINT8 Reserved : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_SDRAM_ADDRESSING_STRUCT; typedef union { struct { - UINT8 OperationAt1_50 : 1; ///< Bits 0:0 - UINT8 OperationAt1_35 : 1; ///< Bits 1:1 - UINT8 OperationAt1_25 : 1; ///< Bits 2:2 - UINT8 Reserved : 5; ///< Bits 7:3 + UINT8 OperationAt1_50 : 1; ///< Bits 0:0 + UINT8 OperationAt1_35 : 1; ///< Bits 1:1 + UINT8 OperationAt1_25 : 1; ///< Bits 2:2 + UINT8 Reserved : 5; ///< Bits 7:3 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_MODULE_NOMINAL_VOLTAGE_STRUCT; typedef union { struct { - UINT8 SdramDeviceWidth : 3; ///< Bits 2:0 - UINT8 RankCount : 3; ///< Bits 5:3 - UINT8 Reserved : 2; ///< Bits 7:6 + UINT8 SdramDeviceWidth : 3; ///< Bits 2:0 + UINT8 RankCount : 3; ///< Bits 5:3 + UINT8 Reserved : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_MODULE_ORGANIZATION_STRUCT; typedef union { struct { - UINT8 PrimaryBusWidth : 3; ///< Bits 2:0 - UINT8 BusWidthExtension : 2; ///< Bits 4:3 - UINT8 Reserved : 3; ///< Bits 7:5 + UINT8 PrimaryBusWidth : 3; ///< Bits 2:0 + UINT8 BusWidthExtension : 2; ///< Bits 4:3 + UINT8 Reserved : 3; ///< Bits 7:5 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_MODULE_MEMORY_BUS_WIDTH_STRUCT; typedef union { struct { - UINT8 Divisor : 4; ///< Bits 3:0 - UINT8 Dividend : 4; ///< Bits 7:4 + UINT8 Divisor : 4; ///< Bits 3:0 + UINT8 Dividend : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_FINE_TIMEBASE_STRUCT; typedef union { struct { - UINT8 Dividend : 8; ///< Bits 7:0 + UINT8 Dividend : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_MEDIUM_TIMEBASE_DIVIDEND_STRUCT; typedef union { struct { - UINT8 Divisor : 8; ///< Bits 7:0 + UINT8 Divisor : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_MEDIUM_TIMEBASE_DIVISOR_STRUCT; typedef struct { - SPD3_MEDIUM_TIMEBASE_DIVIDEND_STRUCT Dividend; ///< Medium Timebase (MTB) Dividend - SPD3_MEDIUM_TIMEBASE_DIVISOR_STRUCT Divisor; ///< Medium Timebase (MTB) Divisor + SPD3_MEDIUM_TIMEBASE_DIVIDEND_STRUCT Dividend; ///< Medium Timebase (MTB) Dividend + SPD3_MEDIUM_TIMEBASE_DIVISOR_STRUCT Divisor; ///< Medium Timebase (MTB) Divisor } SPD3_MEDIUM_TIMEBASE; typedef union { struct { - UINT8 tCKmin : 8; ///< Bits 7:0 + UINT8 tCKmin : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_TCK_MIN_MTB_STRUCT; typedef union { struct { - UINT16 Cl4 : 1; ///< Bits 0:0 - UINT16 Cl5 : 1; ///< Bits 1:1 - UINT16 Cl6 : 1; ///< Bits 2:2 - UINT16 Cl7 : 1; ///< Bits 3:3 - UINT16 Cl8 : 1; ///< Bits 4:4 - UINT16 Cl9 : 1; ///< Bits 5:5 - UINT16 Cl10 : 1; ///< Bits 6:6 - UINT16 Cl11 : 1; ///< Bits 7:7 - UINT16 Cl12 : 1; ///< Bits 8:8 - UINT16 Cl13 : 1; ///< Bits 9:9 - UINT16 Cl14 : 1; ///< Bits 10:10 - UINT16 Cl15 : 1; ///< Bits 11:11 - UINT16 Cl16 : 1; ///< Bits 12:12 - UINT16 Cl17 : 1; ///< Bits 13:13 - UINT16 Cl18 : 1; ///< Bits 14:14 - UINT16 Reserved : 1; ///< Bits 15:15 - } Bits; - UINT16 Data; - UINT8 Data8[2]; + UINT16 Cl4 : 1; ///< Bits 0:0 + UINT16 Cl5 : 1; ///< Bits 1:1 + UINT16 Cl6 : 1; ///< Bits 2:2 + UINT16 Cl7 : 1; ///< Bits 3:3 + UINT16 Cl8 : 1; ///< Bits 4:4 + UINT16 Cl9 : 1; ///< Bits 5:5 + UINT16 Cl10 : 1; ///< Bits 6:6 + UINT16 Cl11 : 1; ///< Bits 7:7 + UINT16 Cl12 : 1; ///< Bits 8:8 + UINT16 Cl13 : 1; ///< Bits 9:9 + UINT16 Cl14 : 1; ///< Bits 10:10 + UINT16 Cl15 : 1; ///< Bits 11:11 + UINT16 Cl16 : 1; ///< Bits 12:12 + UINT16 Cl17 : 1; ///< Bits 13:13 + UINT16 Cl18 : 1; ///< Bits 14:14 + UINT16 Reserved : 1; ///< Bits 15:15 + } Bits; + UINT16 Data; + UINT8 Data8[2]; } SPD3_CAS_LATENCIES_SUPPORTED_STRUCT; typedef union { struct { - UINT8 tAAmin : 8; ///< Bits 7:0 + UINT8 tAAmin : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_TAA_MIN_MTB_STRUCT; typedef union { struct { - UINT8 tWRmin : 8; ///< Bits 7:0 + UINT8 tWRmin : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_TWR_MIN_MTB_STRUCT; typedef union { struct { - UINT8 tRCDmin : 8; ///< Bits 7:0 + UINT8 tRCDmin : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_TRCD_MIN_MTB_STRUCT; typedef union { struct { - UINT8 tRRDmin : 8; ///< Bits 7:0 + UINT8 tRRDmin : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_TRRD_MIN_MTB_STRUCT; typedef union { struct { - UINT8 tRPmin : 8; ///< Bits 7:0 + UINT8 tRPmin : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_TRP_MIN_MTB_STRUCT; typedef union { struct { - UINT8 tRASminUpper : 4; ///< Bits 3:0 - UINT8 tRCminUpper : 4; ///< Bits 7:4 + UINT8 tRASminUpper : 4; ///< Bits 3:0 + UINT8 tRCminUpper : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_TRAS_TRC_MIN_MTB_STRUCT; typedef union { struct { - UINT8 tRASmin : 8; ///< Bits 7:0 + UINT8 tRASmin : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_TRAS_MIN_MTB_STRUCT; typedef union { struct { - UINT8 tRCmin : 8; ///< Bits 7:0 + UINT8 tRCmin : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_TRC_MIN_MTB_STRUCT; typedef union { struct { - UINT16 tRFCmin : 16; ///< Bits 15:0 + UINT16 tRFCmin : 16; ///< Bits 15:0 } Bits; - UINT16 Data; - UINT8 Data8[2]; + UINT16 Data; + UINT8 Data8[2]; } SPD3_TRFC_MIN_MTB_STRUCT; typedef union { struct { - UINT8 tWTRmin : 8; ///< Bits 7:0 + UINT8 tWTRmin : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_TWTR_MIN_MTB_STRUCT; typedef union { struct { - UINT8 tRTPmin : 8; ///< Bits 7:0 + UINT8 tRTPmin : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_TRTP_MIN_MTB_STRUCT; typedef union { struct { - UINT8 tFAWminUpper : 4; ///< Bits 3:0 - UINT8 Reserved : 4; ///< Bits 7:4 + UINT8 tFAWminUpper : 4; ///< Bits 3:0 + UINT8 Reserved : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_TFAW_MIN_MTB_UPPER_STRUCT; typedef union { struct { - UINT8 tFAWmin : 8; ///< Bits 7:0 + UINT8 tFAWmin : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_TFAW_MIN_MTB_STRUCT; typedef union { struct { - UINT8 Rzq6 : 1; ///< Bits 0:0 - UINT8 Rzq7 : 1; ///< Bits 1:1 - UINT8 Reserved : 5; ///< Bits 6:2 - UINT8 DllOff : 1; ///< Bits 7:7 + UINT8 Rzq6 : 1; ///< Bits 0:0 + UINT8 Rzq7 : 1; ///< Bits 1:1 + UINT8 Reserved : 5; ///< Bits 6:2 + UINT8 DllOff : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_SDRAM_OPTIONAL_FEATURES_STRUCT; typedef union { struct { - UINT8 ExtendedTemperatureRange : 1; ///< Bits 0:0 - UINT8 ExtendedTemperatureRefreshRate : 1; ///< Bits 1:1 - UINT8 AutoSelfRefresh : 1; ///< Bits 2:2 - UINT8 OnDieThermalSensor : 1; ///< Bits 3:3 - UINT8 Reserved : 3; ///< Bits 6:4 - UINT8 PartialArraySelfRefresh : 1; ///< Bits 7:7 + UINT8 ExtendedTemperatureRange : 1; ///< Bits 0:0 + UINT8 ExtendedTemperatureRefreshRate : 1; ///< Bits 1:1 + UINT8 AutoSelfRefresh : 1; ///< Bits 2:2 + UINT8 OnDieThermalSensor : 1; ///< Bits 3:3 + UINT8 Reserved : 3; ///< Bits 6:4 + UINT8 PartialArraySelfRefresh : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_SDRAM_THERMAL_REFRESH_STRUCT; typedef union { struct { - UINT8 ThermalSensorAccuracy : 7; ///< Bits 6:0 - UINT8 ThermalSensorPresence : 1; ///< Bits 7:7 + UINT8 ThermalSensorAccuracy : 7; ///< Bits 6:0 + UINT8 ThermalSensorPresence : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_MODULE_THERMAL_SENSOR_STRUCT; typedef union { struct { - UINT8 SignalLoading : 2; ///< Bits 1:0 - UINT8 Reserved : 2; ///< Bits 3:2 - UINT8 DieCount : 3; ///< Bits 6:4 - UINT8 SdramDeviceType : 1; ///< Bits 7:7 + UINT8 SignalLoading : 2; ///< Bits 1:0 + UINT8 Reserved : 2; ///< Bits 3:2 + UINT8 DieCount : 3; ///< Bits 6:4 + UINT8 SdramDeviceType : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_SDRAM_DEVICE_TYPE_STRUCT; typedef union { struct { - INT8 tCKminFine : 8; ///< Bits 7:0 + INT8 tCKminFine : 8; ///< Bits 7:0 } Bits; - INT8 Data; + INT8 Data; } SPD3_TCK_MIN_FTB_STRUCT; typedef union { struct { - INT8 tAAminFine : 8; ///< Bits 7:0 + INT8 tAAminFine : 8; ///< Bits 7:0 } Bits; - INT8 Data; + INT8 Data; } SPD3_TAA_MIN_FTB_STRUCT; typedef union { struct { - INT8 tRCDminFine : 8; ///< Bits 7:0 + INT8 tRCDminFine : 8; ///< Bits 7:0 } Bits; - INT8 Data; + INT8 Data; } SPD3_TRCD_MIN_FTB_STRUCT; typedef union { struct { - INT8 tRPminFine : 8; ///< Bits 7:0 + INT8 tRPminFine : 8; ///< Bits 7:0 } Bits; - INT8 Data; + INT8 Data; } SPD3_TRP_MIN_FTB_STRUCT; typedef union { struct { - INT8 tRCminFine : 8; ///< Bits 7:0 + INT8 tRCminFine : 8; ///< Bits 7:0 } Bits; - INT8 Data; + INT8 Data; } SPD3_TRC_MIN_FTB_STRUCT; typedef union { struct { - UINT8 MaximumActivateCount : 4; ///< Bits 3:0 - UINT8 MaximumActivateWindow : 2; ///< Bits 5:4 - UINT8 VendorSpecific : 2; ///< Bits 7:6 + UINT8 MaximumActivateCount : 4; ///< Bits 3:0 + UINT8 MaximumActivateWindow : 2; ///< Bits 5:4 + UINT8 VendorSpecific : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_MAXIMUM_ACTIVE_COUNT_STRUCT; typedef union { struct { - UINT8 Height : 5; ///< Bits 4:0 - UINT8 RawCardExtension : 3; ///< Bits 7:5 + UINT8 Height : 5; ///< Bits 4:0 + UINT8 RawCardExtension : 3; ///< Bits 7:5 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_UNBUF_MODULE_NOMINAL_HEIGHT; typedef union { struct { - UINT8 FrontThickness : 4; ///< Bits 3:0 - UINT8 BackThickness : 4; ///< Bits 7:4 + UINT8 FrontThickness : 4; ///< Bits 3:0 + UINT8 BackThickness : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_UNBUF_MODULE_NOMINAL_THICKNESS; typedef union { struct { - UINT8 Card : 5; ///< Bits 4:0 - UINT8 Revision : 2; ///< Bits 6:5 - UINT8 Extension : 1; ///< Bits 7:7 + UINT8 Card : 5; ///< Bits 4:0 + UINT8 Revision : 2; ///< Bits 6:5 + UINT8 Extension : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_UNBUF_REFERENCE_RAW_CARD; typedef union { struct { - UINT8 MappingRank1 : 1; ///< Bits 0:0 - UINT8 Reserved : 7; ///< Bits 7:1 + UINT8 MappingRank1 : 1; ///< Bits 0:0 + UINT8 Reserved : 7; ///< Bits 7:1 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_UNBUF_ADDRESS_MAPPING; typedef union { struct { - UINT8 Height : 5; ///< Bits 4:0 - UINT8 Reserved : 3; ///< Bits 7:5 + UINT8 Height : 5; ///< Bits 4:0 + UINT8 Reserved : 3; ///< Bits 7:5 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_RDIMM_MODULE_NOMINAL_HEIGHT; typedef union { struct { - UINT8 FrontThickness : 4; ///< Bits 3:0 - UINT8 BackThickness : 4; ///< Bits 7:4 + UINT8 FrontThickness : 4; ///< Bits 3:0 + UINT8 BackThickness : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_RDIMM_MODULE_NOMINAL_THICKNESS; typedef union { struct { - UINT8 Card : 5; ///< Bits 4:0 - UINT8 Revision : 2; ///< Bits 6:5 - UINT8 Extension : 1; ///< Bits 7:7 + UINT8 Card : 5; ///< Bits 4:0 + UINT8 Revision : 2; ///< Bits 6:5 + UINT8 Extension : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_RDIMM_REFERENCE_RAW_CARD; typedef union { struct { - UINT8 RegisterCount : 2; ///< Bits 1:0 - UINT8 DramRowCount : 2; ///< Bits 3:2 - UINT8 RegisterType : 4; ///< Bits 7:4 + UINT8 RegisterCount : 2; ///< Bits 1:0 + UINT8 DramRowCount : 2; ///< Bits 3:2 + UINT8 RegisterType : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_RDIMM_MODULE_ATTRIBUTES; typedef union { struct { - UINT8 HeatSpreaderThermalCharacteristics : 7; ///< Bits 6:0 - UINT8 HeatSpreaderSolution : 1; ///< Bits 7:7 + UINT8 HeatSpreaderThermalCharacteristics : 7; ///< Bits 6:0 + UINT8 HeatSpreaderSolution : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_RDIMM_THERMAL_HEAT_SPREADER_SOLUTION; typedef union { struct { - UINT16 ContinuationCount : 7; ///< Bits 6:0 - UINT16 ContinuationParity : 1; ///< Bits 7:7 - UINT16 LastNonZeroByte : 8; ///< Bits 15:8 + UINT16 ContinuationCount : 7; ///< Bits 6:0 + UINT16 ContinuationParity : 1; ///< Bits 7:7 + UINT16 LastNonZeroByte : 8; ///< Bits 15:8 } Bits; - UINT16 Data; - UINT8 Data8[2]; + UINT16 Data; + UINT8 Data8[2]; } SPD3_MANUFACTURER_ID_CODE; typedef union { struct { - UINT8 RegisterRevisionNumber; ///< Bits 7:0 + UINT8 RegisterRevisionNumber; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_RDIMM_REGISTER_REVISION_NUMBER; typedef union { struct { - UINT8 Bit0 : 1; ///< Bits 0:0 - UINT8 Bit1 : 1; ///< Bits 1:1 - UINT8 Bit2 : 1; ///< Bits 2:2 - UINT8 Reserved : 5; ///< Bits 7:3 + UINT8 Bit0 : 1; ///< Bits 0:0 + UINT8 Bit1 : 1; ///< Bits 1:1 + UINT8 Bit2 : 1; ///< Bits 2:2 + UINT8 Reserved : 5; ///< Bits 7:3 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_RDIMM_REGISTER_TYPE; typedef union { struct { - UINT8 Reserved : 4; ///< Bits 0:3 - UINT8 CommandAddressAOutputs : 2; ///< Bits 5:4 - UINT8 CommandAddressBOutputs : 2; ///< Bits 7:6 + UINT8 Reserved : 4; ///< Bits 0:3 + UINT8 CommandAddressAOutputs : 2; ///< Bits 5:4 + UINT8 CommandAddressBOutputs : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_RDIMM_REGISTER_CONTROL_COMMAND_ADDRESS; typedef union { struct { - UINT8 ControlSignalsAOutputs : 2; ///< Bits 0:1 - UINT8 ControlSignalsBOutputs : 2; ///< Bits 3:2 - UINT8 Y1Y3ClockOutputs : 2; ///< Bits 5:4 - UINT8 Y0Y2ClockOutputs : 2; ///< Bits 7:6 + UINT8 ControlSignalsAOutputs : 2; ///< Bits 0:1 + UINT8 ControlSignalsBOutputs : 2; ///< Bits 3:2 + UINT8 Y1Y3ClockOutputs : 2; ///< Bits 5:4 + UINT8 Y0Y2ClockOutputs : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_RDIMM_REGISTER_CONTROL_CONTROL_CLOCK; typedef union { struct { - UINT8 Reserved0 : 4; ///< Bits 0:3 - UINT8 Reserved1 : 4; ///< Bits 7:4 + UINT8 Reserved0 : 4; ///< Bits 0:3 + UINT8 Reserved1 : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_RDIMM_REGISTER_CONTROL_RESERVED; typedef union { struct { - UINT8 Height : 5; ///< Bits 4:0 - UINT8 Reserved : 3; ///< Bits 7:5 + UINT8 Height : 5; ///< Bits 4:0 + UINT8 Reserved : 3; ///< Bits 7:5 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_LRDIMM_MODULE_NOMINAL_HEIGHT; typedef union { struct { - UINT8 FrontThickness : 4; ///< Bits 3:0 - UINT8 BackThickness : 4; ///< Bits 7:4 + UINT8 FrontThickness : 4; ///< Bits 3:0 + UINT8 BackThickness : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_LRDIMM_MODULE_NOMINAL_THICKNESS; typedef union { struct { - UINT8 Card : 5; ///< Bits 4:0 - UINT8 Revision : 2; ///< Bits 6:5 - UINT8 Extension : 1; ///< Bits 7:7 + UINT8 Card : 5; ///< Bits 4:0 + UINT8 Revision : 2; ///< Bits 6:5 + UINT8 Extension : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_LRDIMM_REFERENCE_RAW_CARD; typedef union { struct { - UINT8 RegisterCount : 2; ///< Bits 1:0 - UINT8 DramRowCount : 2; ///< Bits 3:2 - UINT8 RegisterType : 4; ///< Bits 7:4 + UINT8 RegisterCount : 2; ///< Bits 1:0 + UINT8 DramRowCount : 2; ///< Bits 3:2 + UINT8 RegisterType : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_LRDIMM_MODULE_ATTRIBUTES; typedef union { struct { - UINT8 AddressCommandPrelaunch : 1; ///< Bits 0:0 - UINT8 Rank1Rank5Swap : 1; ///< Bits 1:1 - UINT8 Reserved0 : 1; ///< Bits 2:2 - UINT8 Reserved1 : 1; ///< Bits 3:3 - UINT8 AddressCommandOutputs : 2; ///< Bits 5:4 - UINT8 QxCS_nOutputs : 2; ///< Bits 7:6 + UINT8 AddressCommandPrelaunch : 1; ///< Bits 0:0 + UINT8 Rank1Rank5Swap : 1; ///< Bits 1:1 + UINT8 Reserved0 : 1; ///< Bits 2:2 + UINT8 Reserved1 : 1; ///< Bits 3:3 + UINT8 AddressCommandOutputs : 2; ///< Bits 5:4 + UINT8 QxCS_nOutputs : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_LRDIMM_TIMING_CONTROL_DRIVE_STRENGTH; typedef union { struct { - UINT8 QxOdtOutputs : 2; ///< Bits 1:0 - UINT8 QxCkeOutputs : 2; ///< Bits 3:2 - UINT8 Y1Y3ClockOutputs : 2; ///< Bits 5:4 - UINT8 Y0Y2ClockOutputs : 2; ///< Bits 7:6 + UINT8 QxOdtOutputs : 2; ///< Bits 1:0 + UINT8 QxCkeOutputs : 2; ///< Bits 3:2 + UINT8 Y1Y3ClockOutputs : 2; ///< Bits 5:4 + UINT8 Y0Y2ClockOutputs : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_LRDIMM_TIMING_DRIVE_STRENGTH; typedef union { struct { - UINT8 YExtendedDelay : 2; ///< Bits 1:0 - UINT8 QxCS_n : 2; ///< Bits 3:2 - UINT8 QxOdt : 2; ///< Bits 5:4 - UINT8 QxCke : 2; ///< Bits 7:6 + UINT8 YExtendedDelay : 2; ///< Bits 1:0 + UINT8 QxCS_n : 2; ///< Bits 3:2 + UINT8 QxOdt : 2; ///< Bits 5:4 + UINT8 QxCke : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_LRDIMM_EXTENDED_DELAY; typedef union { struct { - UINT8 DelayY : 3; ///< Bits 2:0 - UINT8 Reserved : 1; ///< Bits 3:3 - UINT8 QxCS_n : 4; ///< Bits 7:4 + UINT8 DelayY : 3; ///< Bits 2:0 + UINT8 Reserved : 1; ///< Bits 3:3 + UINT8 QxCS_n : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_LRDIMM_ADDITIVE_DELAY_FOR_QXCS_N_QXCA; typedef union { struct { - UINT8 QxCS_n : 4; ///< Bits 3:0 - UINT8 QxOdt : 4; ///< Bits 7:4 + UINT8 QxCS_n : 4; ///< Bits 3:0 + UINT8 QxOdt : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_LRDIMM_ADDITIVE_DELAY_FOR_QXODT_QXCKE; typedef union { struct { - UINT8 RC8MdqOdtStrength : 3; ///< Bits 2:0 - UINT8 RC8Reserved : 1; ///< Bits 3:3 - UINT8 RC9MdqOdtStrength : 3; ///< Bits 6:4 - UINT8 RC9Reserved : 1; ///< Bits 7:7 + UINT8 RC8MdqOdtStrength : 3; ///< Bits 2:0 + UINT8 RC8Reserved : 1; ///< Bits 3:3 + UINT8 RC9MdqOdtStrength : 3; ///< Bits 6:4 + UINT8 RC9Reserved : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_LRDIMM_MDQ_TERMINATION_DRIVE_STRENGTH; typedef union { struct { - UINT8 RC10DA3ValueR0 : 1; ///< Bits 0:0 - UINT8 RC10DA4ValueR0 : 1; ///< Bits 1:1 - UINT8 RC10DA3ValueR1 : 1; ///< Bits 2:2 - UINT8 RC10DA4ValueR1 : 1; ///< Bits 3:3 - UINT8 RC11DA3ValueR0 : 1; ///< Bits 4:4 - UINT8 RC11DA4ValueR0 : 1; ///< Bits 5:5 - UINT8 RC11DA3ValueR1 : 1; ///< Bits 6:6 - UINT8 RC11DA4ValueR1 : 1; ///< Bits 7:7 + UINT8 RC10DA3ValueR0 : 1; ///< Bits 0:0 + UINT8 RC10DA4ValueR0 : 1; ///< Bits 1:1 + UINT8 RC10DA3ValueR1 : 1; ///< Bits 2:2 + UINT8 RC10DA4ValueR1 : 1; ///< Bits 3:3 + UINT8 RC11DA3ValueR0 : 1; ///< Bits 4:4 + UINT8 RC11DA4ValueR0 : 1; ///< Bits 5:5 + UINT8 RC11DA3ValueR1 : 1; ///< Bits 6:6 + UINT8 RC11DA4ValueR1 : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_LRDIMM_RANK_READ_WRITE_QXODT_CONTROL; typedef union { struct { - UINT8 Driver_Impedance : 2; ///< Bits 1:0 - UINT8 Rtt_Nom : 3; ///< Bits 4:2 - UINT8 Reserved : 1; ///< Bits 5:5 - UINT8 Rtt_WR : 2; ///< Bits 7:6 + UINT8 Driver_Impedance : 2; ///< Bits 1:0 + UINT8 Rtt_Nom : 3; ///< Bits 4:2 + UINT8 Reserved : 1; ///< Bits 5:5 + UINT8 Rtt_WR : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_LRDIMM_MR_1_2; typedef union { struct { - UINT8 MinimumDelayTime : 7; ///< Bits 0:6 - UINT8 Reserved : 1; ///< Bits 7:7 + UINT8 MinimumDelayTime : 7; ///< Bits 0:6 + UINT8 Reserved : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD3_LRDIMM_MODULE_DELAY_TIME; typedef struct { - UINT8 Year; ///< Year represented in BCD (00h = 2000) - UINT8 Week; ///< Year represented in BCD (47h = week 47) + UINT8 Year; ///< Year represented in BCD (00h = 2000) + UINT8 Week; ///< Year represented in BCD (47h = week 47) } SPD3_MANUFACTURING_DATE; typedef union { - UINT32 Data; - UINT16 SerialNumber16[2]; - UINT8 SerialNumber8[4]; + UINT32 Data; + UINT16 SerialNumber16[2]; + UINT8 SerialNumber8[4]; } SPD3_MANUFACTURER_SERIAL_NUMBER; typedef struct { - UINT8 Location; ///< Module Manufacturing Location + UINT8 Location; ///< Module Manufacturing Location } SPD3_MANUFACTURING_LOCATION; typedef struct { - SPD3_MANUFACTURER_ID_CODE IdCode; ///< Module Manufacturer ID Code - SPD3_MANUFACTURING_LOCATION Location; ///< Module Manufacturing Location - SPD3_MANUFACTURING_DATE Date; ///< Module Manufacturing Year, in BCD (range: 2000-2255) - SPD3_MANUFACTURER_SERIAL_NUMBER SerialNumber; ///< Module Serial Number + SPD3_MANUFACTURER_ID_CODE IdCode; ///< Module Manufacturer ID Code + SPD3_MANUFACTURING_LOCATION Location; ///< Module Manufacturing Location + SPD3_MANUFACTURING_DATE Date; ///< Module Manufacturing Year, in BCD (range: 2000-2255) + SPD3_MANUFACTURER_SERIAL_NUMBER SerialNumber; ///< Module Serial Number } SPD3_UNIQUE_MODULE_ID; typedef union { - UINT16 Crc[1]; - UINT8 Data8[2]; + UINT16 Crc[1]; + UINT8 Data8[2]; } SPD3_CYCLIC_REDUNDANCY_CODE; typedef struct { - SPD3_DEVICE_DESCRIPTION_STRUCT Description; ///< 0 Number of Serial PD Bytes Written / SPD Device Size / CRC Coverage 1, 2 - SPD3_REVISION_STRUCT Revision; ///< 1 SPD Revision - SPD3_DRAM_DEVICE_TYPE_STRUCT DramDeviceType; ///< 2 DRAM Device Type - SPD3_MODULE_TYPE_STRUCT ModuleType; ///< 3 Module Type - SPD3_SDRAM_DENSITY_BANKS_STRUCT SdramDensityAndBanks; ///< 4 SDRAM Density and Banks - SPD3_SDRAM_ADDRESSING_STRUCT SdramAddressing; ///< 5 SDRAM Addressing - SPD3_MODULE_NOMINAL_VOLTAGE_STRUCT ModuleNominalVoltage; ///< 6 Module Nominal Voltage, VDD - SPD3_MODULE_ORGANIZATION_STRUCT ModuleOrganization; ///< 7 Module Organization - SPD3_MODULE_MEMORY_BUS_WIDTH_STRUCT ModuleMemoryBusWidth; ///< 8 Module Memory Bus Width - SPD3_FINE_TIMEBASE_STRUCT FineTimebase; ///< 9 Fine Timebase (FTB) Dividend / Divisor - SPD3_MEDIUM_TIMEBASE MediumTimebase; ///< 10-11 Medium Timebase (MTB) Dividend - SPD3_TCK_MIN_MTB_STRUCT tCKmin; ///< 12 SDRAM Minimum Cycle Time (tCKmin) - UINT8 Reserved0; ///< 13 Reserved - SPD3_CAS_LATENCIES_SUPPORTED_STRUCT CasLatencies; ///< 14-15 CAS Latencies Supported - SPD3_TAA_MIN_MTB_STRUCT tAAmin; ///< 16 Minimum CAS Latency Time (tAAmin) - SPD3_TWR_MIN_MTB_STRUCT tWRmin; ///< 17 Minimum Write Recovery Time (tWRmin) - SPD3_TRCD_MIN_MTB_STRUCT tRCDmin; ///< 18 Minimum RAS# to CAS# Delay Time (tRCDmin) - SPD3_TRRD_MIN_MTB_STRUCT tRRDmin; ///< 19 Minimum Row Active to Row Active Delay Time (tRRDmin) - SPD3_TRP_MIN_MTB_STRUCT tRPmin; ///< 20 Minimum Row Precharge Delay Time (tRPmin) - SPD3_TRAS_TRC_MIN_MTB_STRUCT tRASMintRCMinUpper; ///< 21 Upper Nibbles for tRAS and tRC - SPD3_TRAS_MIN_MTB_STRUCT tRASmin; ///< 22 Minimum Active to Precharge Delay Time (tRASmin), Least Significant Byte - SPD3_TRC_MIN_MTB_STRUCT tRCmin; ///< 23 Minimum Active to Active/Refresh Delay Time (tRCmin), Least Significant Byte - SPD3_TRFC_MIN_MTB_STRUCT tRFCmin; ///< 24-25 Minimum Refresh Recovery Delay Time (tRFCmin) - SPD3_TWTR_MIN_MTB_STRUCT tWTRmin; ///< 26 Minimum Internal Write to Read Command Delay Time (tWTRmin) - SPD3_TRTP_MIN_MTB_STRUCT tRTPmin; ///< 27 Minimum Internal Read to Precharge Command Delay Time (tRTPmin) - SPD3_TFAW_MIN_MTB_UPPER_STRUCT tFAWMinUpper; ///< 28 Upper Nibble for tFAW - SPD3_TFAW_MIN_MTB_STRUCT tFAWmin; ///< 29 Minimum Four Activate Window Delay Time (tFAWmin) - SPD3_SDRAM_OPTIONAL_FEATURES_STRUCT SdramOptionalFeatures; ///< 30 SDRAM Optional Features - SPD3_SDRAM_THERMAL_REFRESH_STRUCT ThermalAndRefreshOptions; ///< 31 SDRAM Thermal And Refresh Options - SPD3_MODULE_THERMAL_SENSOR_STRUCT ModuleThermalSensor; ///< 32 Module Thermal Sensor - SPD3_SDRAM_DEVICE_TYPE_STRUCT SdramDeviceType; ///< 33 SDRAM Device Type - SPD3_TCK_MIN_FTB_STRUCT tCKminFine; ///< 34 Fine Offset for SDRAM Minimum Cycle Time (tCKmin) - SPD3_TAA_MIN_FTB_STRUCT tAAminFine; ///< 35 Fine Offset for Minimum CAS Latency Time (tAAmin) - SPD3_TRCD_MIN_FTB_STRUCT tRCDminFine; ///< 36 Fine Offset for Minimum RAS# to CAS# Delay Time (tRCDmin) - SPD3_TRP_MIN_FTB_STRUCT tRPminFine; ///< 37 Minimum Row Precharge Delay Time (tRPmin) - SPD3_TRC_MIN_FTB_STRUCT tRCminFine; ///< 38 Fine Offset for Minimum Active to Active/Refresh Delay Time (tRCmin) - UINT8 Reserved1[40 - 39 + 1]; ///< 39 - 40 Reserved - SPD3_MAXIMUM_ACTIVE_COUNT_STRUCT MacValue; ///< 41 SDRAM Maximum Active Count (MAC) Value - UINT8 Reserved2[59 - 42 + 1]; ///< 42 - 59 Reserved + SPD3_DEVICE_DESCRIPTION_STRUCT Description; ///< 0 Number of Serial PD Bytes Written / SPD Device Size / CRC Coverage 1, 2 + SPD3_REVISION_STRUCT Revision; ///< 1 SPD Revision + SPD3_DRAM_DEVICE_TYPE_STRUCT DramDeviceType; ///< 2 DRAM Device Type + SPD3_MODULE_TYPE_STRUCT ModuleType; ///< 3 Module Type + SPD3_SDRAM_DENSITY_BANKS_STRUCT SdramDensityAndBanks; ///< 4 SDRAM Density and Banks + SPD3_SDRAM_ADDRESSING_STRUCT SdramAddressing; ///< 5 SDRAM Addressing + SPD3_MODULE_NOMINAL_VOLTAGE_STRUCT ModuleNominalVoltage; ///< 6 Module Nominal Voltage, VDD + SPD3_MODULE_ORGANIZATION_STRUCT ModuleOrganization; ///< 7 Module Organization + SPD3_MODULE_MEMORY_BUS_WIDTH_STRUCT ModuleMemoryBusWidth; ///< 8 Module Memory Bus Width + SPD3_FINE_TIMEBASE_STRUCT FineTimebase; ///< 9 Fine Timebase (FTB) Dividend / Divisor + SPD3_MEDIUM_TIMEBASE MediumTimebase; ///< 10-11 Medium Timebase (MTB) Dividend + SPD3_TCK_MIN_MTB_STRUCT tCKmin; ///< 12 SDRAM Minimum Cycle Time (tCKmin) + UINT8 Reserved0; ///< 13 Reserved + SPD3_CAS_LATENCIES_SUPPORTED_STRUCT CasLatencies; ///< 14-15 CAS Latencies Supported + SPD3_TAA_MIN_MTB_STRUCT tAAmin; ///< 16 Minimum CAS Latency Time (tAAmin) + SPD3_TWR_MIN_MTB_STRUCT tWRmin; ///< 17 Minimum Write Recovery Time (tWRmin) + SPD3_TRCD_MIN_MTB_STRUCT tRCDmin; ///< 18 Minimum RAS# to CAS# Delay Time (tRCDmin) + SPD3_TRRD_MIN_MTB_STRUCT tRRDmin; ///< 19 Minimum Row Active to Row Active Delay Time (tRRDmin) + SPD3_TRP_MIN_MTB_STRUCT tRPmin; ///< 20 Minimum Row Precharge Delay Time (tRPmin) + SPD3_TRAS_TRC_MIN_MTB_STRUCT tRASMintRCMinUpper; ///< 21 Upper Nibbles for tRAS and tRC + SPD3_TRAS_MIN_MTB_STRUCT tRASmin; ///< 22 Minimum Active to Precharge Delay Time (tRASmin), Least Significant Byte + SPD3_TRC_MIN_MTB_STRUCT tRCmin; ///< 23 Minimum Active to Active/Refresh Delay Time (tRCmin), Least Significant Byte + SPD3_TRFC_MIN_MTB_STRUCT tRFCmin; ///< 24-25 Minimum Refresh Recovery Delay Time (tRFCmin) + SPD3_TWTR_MIN_MTB_STRUCT tWTRmin; ///< 26 Minimum Internal Write to Read Command Delay Time (tWTRmin) + SPD3_TRTP_MIN_MTB_STRUCT tRTPmin; ///< 27 Minimum Internal Read to Precharge Command Delay Time (tRTPmin) + SPD3_TFAW_MIN_MTB_UPPER_STRUCT tFAWMinUpper; ///< 28 Upper Nibble for tFAW + SPD3_TFAW_MIN_MTB_STRUCT tFAWmin; ///< 29 Minimum Four Activate Window Delay Time (tFAWmin) + SPD3_SDRAM_OPTIONAL_FEATURES_STRUCT SdramOptionalFeatures; ///< 30 SDRAM Optional Features + SPD3_SDRAM_THERMAL_REFRESH_STRUCT ThermalAndRefreshOptions; ///< 31 SDRAM Thermal And Refresh Options + SPD3_MODULE_THERMAL_SENSOR_STRUCT ModuleThermalSensor; ///< 32 Module Thermal Sensor + SPD3_SDRAM_DEVICE_TYPE_STRUCT SdramDeviceType; ///< 33 SDRAM Device Type + SPD3_TCK_MIN_FTB_STRUCT tCKminFine; ///< 34 Fine Offset for SDRAM Minimum Cycle Time (tCKmin) + SPD3_TAA_MIN_FTB_STRUCT tAAminFine; ///< 35 Fine Offset for Minimum CAS Latency Time (tAAmin) + SPD3_TRCD_MIN_FTB_STRUCT tRCDminFine; ///< 36 Fine Offset for Minimum RAS# to CAS# Delay Time (tRCDmin) + SPD3_TRP_MIN_FTB_STRUCT tRPminFine; ///< 37 Minimum Row Precharge Delay Time (tRPmin) + SPD3_TRC_MIN_FTB_STRUCT tRCminFine; ///< 38 Fine Offset for Minimum Active to Active/Refresh Delay Time (tRCmin) + UINT8 Reserved1[40 - 39 + 1]; ///< 39 - 40 Reserved + SPD3_MAXIMUM_ACTIVE_COUNT_STRUCT MacValue; ///< 41 SDRAM Maximum Active Count (MAC) Value + UINT8 Reserved2[59 - 42 + 1]; ///< 42 - 59 Reserved } SPD3_BASE_SECTION; typedef struct { - SPD3_UNBUF_MODULE_NOMINAL_HEIGHT ModuleNominalHeight; ///< 60 Module Nominal Height - SPD3_UNBUF_MODULE_NOMINAL_THICKNESS ModuleMaximumThickness; ///< 61 Module Maximum Thickness - SPD3_UNBUF_REFERENCE_RAW_CARD ReferenceRawCardUsed; ///< 62 Reference Raw Card Used - SPD3_UNBUF_ADDRESS_MAPPING AddressMappingEdgeConn; ///< 63 Address Mapping from Edge Connector to DRAM - UINT8 Reserved[116 - 64 + 1]; ///< 64-116 Reserved + SPD3_UNBUF_MODULE_NOMINAL_HEIGHT ModuleNominalHeight; ///< 60 Module Nominal Height + SPD3_UNBUF_MODULE_NOMINAL_THICKNESS ModuleMaximumThickness; ///< 61 Module Maximum Thickness + SPD3_UNBUF_REFERENCE_RAW_CARD ReferenceRawCardUsed; ///< 62 Reference Raw Card Used + SPD3_UNBUF_ADDRESS_MAPPING AddressMappingEdgeConn; ///< 63 Address Mapping from Edge Connector to DRAM + UINT8 Reserved[116 - 64 + 1]; ///< 64-116 Reserved } SPD3_MODULE_UNBUFFERED; typedef struct { - SPD3_RDIMM_MODULE_NOMINAL_HEIGHT ModuleNominalHeight; ///< 60 Module Nominal Height - SPD3_RDIMM_MODULE_NOMINAL_THICKNESS ModuleMaximumThickness; ///< 61 Module Maximum Thickness - SPD3_RDIMM_REFERENCE_RAW_CARD ReferenceRawCardUsed; ///< 62 Reference Raw Card Used - SPD3_RDIMM_MODULE_ATTRIBUTES DimmModuleAttributes; ///< 63 DIMM Module Attributes - SPD3_RDIMM_THERMAL_HEAT_SPREADER_SOLUTION ThermalHeatSpreaderSolution; ///< 64 RDIMM Thermal Heat Spreader Solution - SPD3_MANUFACTURER_ID_CODE RegisterManufacturerIdCode; ///< 65-66 Register Manufacturer ID Code - SPD3_RDIMM_REGISTER_REVISION_NUMBER RegisterRevisionNumber; ///< 67 Register Revision Number - SPD3_RDIMM_REGISTER_TYPE RegisterType; ///< 68 Register Type - SPD3_RDIMM_REGISTER_CONTROL_RESERVED Rc1Rc0; ///< 69 RC1 (MS Nibble) / RC0 (LS Nibble) - Reserved - SPD3_RDIMM_REGISTER_CONTROL_COMMAND_ADDRESS Rc3Rc2; ///< 70 RC3 (MS Nibble) / RC2 (LS Nibble) - Drive Strength, Command/Address - SPD3_RDIMM_REGISTER_CONTROL_CONTROL_CLOCK Rc5Rc4; ///< 71 RC5 (MS Nibble) / RC4 (LS Nibble) - Drive Strength, Control and Clock - SPD3_RDIMM_REGISTER_CONTROL_RESERVED Rc7Rc6; ///< 72 RC7 (MS Nibble) / RC6 (LS Nibble) - Reserved for Register Vendor - SPD3_RDIMM_REGISTER_CONTROL_RESERVED Rc9Rc8; ///< 73 RC9 (MS Nibble) / RC8 (LS Nibble) - Reserved - SPD3_RDIMM_REGISTER_CONTROL_RESERVED Rc11Rc10; ///< 74 RC11 (MS Nibble) / RC10 (LS Nibble) - Reserved - SPD3_RDIMM_REGISTER_CONTROL_RESERVED Rc13Rc12; ///< 75 RC12 (MS Nibble) / RC12 (LS Nibble) - Reserved - SPD3_RDIMM_REGISTER_CONTROL_RESERVED Rc15Rc14; ///< 76 RC15 (MS Nibble) / RC14 (LS Nibble) - Reserved - UINT8 Reserved[116 - 77 + 1]; ///< 77-116 Reserved + SPD3_RDIMM_MODULE_NOMINAL_HEIGHT ModuleNominalHeight; ///< 60 Module Nominal Height + SPD3_RDIMM_MODULE_NOMINAL_THICKNESS ModuleMaximumThickness; ///< 61 Module Maximum Thickness + SPD3_RDIMM_REFERENCE_RAW_CARD ReferenceRawCardUsed; ///< 62 Reference Raw Card Used + SPD3_RDIMM_MODULE_ATTRIBUTES DimmModuleAttributes; ///< 63 DIMM Module Attributes + SPD3_RDIMM_THERMAL_HEAT_SPREADER_SOLUTION ThermalHeatSpreaderSolution; ///< 64 RDIMM Thermal Heat Spreader Solution + SPD3_MANUFACTURER_ID_CODE RegisterManufacturerIdCode; ///< 65-66 Register Manufacturer ID Code + SPD3_RDIMM_REGISTER_REVISION_NUMBER RegisterRevisionNumber; ///< 67 Register Revision Number + SPD3_RDIMM_REGISTER_TYPE RegisterType; ///< 68 Register Type + SPD3_RDIMM_REGISTER_CONTROL_RESERVED Rc1Rc0; ///< 69 RC1 (MS Nibble) / RC0 (LS Nibble) - Reserved + SPD3_RDIMM_REGISTER_CONTROL_COMMAND_ADDRESS Rc3Rc2; ///< 70 RC3 (MS Nibble) / RC2 (LS Nibble) - Drive Strength, Command/Address + SPD3_RDIMM_REGISTER_CONTROL_CONTROL_CLOCK Rc5Rc4; ///< 71 RC5 (MS Nibble) / RC4 (LS Nibble) - Drive Strength, Control and Clock + SPD3_RDIMM_REGISTER_CONTROL_RESERVED Rc7Rc6; ///< 72 RC7 (MS Nibble) / RC6 (LS Nibble) - Reserved for Register Vendor + SPD3_RDIMM_REGISTER_CONTROL_RESERVED Rc9Rc8; ///< 73 RC9 (MS Nibble) / RC8 (LS Nibble) - Reserved + SPD3_RDIMM_REGISTER_CONTROL_RESERVED Rc11Rc10; ///< 74 RC11 (MS Nibble) / RC10 (LS Nibble) - Reserved + SPD3_RDIMM_REGISTER_CONTROL_RESERVED Rc13Rc12; ///< 75 RC12 (MS Nibble) / RC12 (LS Nibble) - Reserved + SPD3_RDIMM_REGISTER_CONTROL_RESERVED Rc15Rc14; ///< 76 RC15 (MS Nibble) / RC14 (LS Nibble) - Reserved + UINT8 Reserved[116 - 77 + 1]; ///< 77-116 Reserved } SPD3_MODULE_REGISTERED; typedef struct { - SPD3_UNBUF_MODULE_NOMINAL_HEIGHT ModuleNominalHeight; ///< 60 Module Nominal Height - SPD3_UNBUF_MODULE_NOMINAL_THICKNESS ModuleMaximumThickness; ///< 61 Module Maximum Thickness - SPD3_UNBUF_REFERENCE_RAW_CARD ReferenceRawCardUsed; ///< 62 Reference Raw Card Used - UINT8 Reserved[116 - 63 + 1]; ///< 63-116 Reserved + SPD3_UNBUF_MODULE_NOMINAL_HEIGHT ModuleNominalHeight; ///< 60 Module Nominal Height + SPD3_UNBUF_MODULE_NOMINAL_THICKNESS ModuleMaximumThickness; ///< 61 Module Maximum Thickness + SPD3_UNBUF_REFERENCE_RAW_CARD ReferenceRawCardUsed; ///< 62 Reference Raw Card Used + UINT8 Reserved[116 - 63 + 1]; ///< 63-116 Reserved } SPD3_MODULE_CLOCKED; typedef struct { - SPD3_LRDIMM_MODULE_NOMINAL_HEIGHT ModuleNominalHeight; ///< 60 Module Nominal Height - SPD3_LRDIMM_MODULE_NOMINAL_THICKNESS ModuleMaximumThickness; ///< 61 Module Maximum Thickness - SPD3_LRDIMM_REFERENCE_RAW_CARD ReferenceRawCardUsed; ///< 62 Reference Raw Card Used - SPD3_LRDIMM_MODULE_ATTRIBUTES DimmModuleAttributes; ///< 63 Module Attributes - UINT8 MemoryBufferRevisionNumber; ///< 64 Memory Buffer Revision Number - SPD3_MANUFACTURER_ID_CODE ManufacturerIdCode; ///< 65-66 Memory Buffer Manufacturer ID Code - SPD3_LRDIMM_TIMING_CONTROL_DRIVE_STRENGTH TimingControlDriveStrengthCaCs; ///< 67 F0RC3 / F0RC2 - Timing Control & Drive Strength, CA & CS - SPD3_LRDIMM_TIMING_DRIVE_STRENGTH DriveStrength; ///< 68 F0RC5 / F0RC4 - Drive Strength, ODT & CKE and Y - SPD3_LRDIMM_EXTENDED_DELAY ExtendedDelay; ///< 69 F1RC11 / F1RC8 - Extended Delay for Y, CS and ODT & CKE - SPD3_LRDIMM_ADDITIVE_DELAY_FOR_QXCS_N_QXCA AdditiveDelayForCsCa; ///< 70 F1RC13 / F1RC12 - Additive Delay for CS and CA - SPD3_LRDIMM_ADDITIVE_DELAY_FOR_QXODT_QXCKE AdditiveDelayForOdtCke; ///< 71 F1RC15 / F1RC14 - Additive Delay for ODT & CKE - SPD3_LRDIMM_MDQ_TERMINATION_DRIVE_STRENGTH MdqTerminationDriveStrengthFor800_1066; ///< 72 F1RC15 / F1RC14 - Additive Delay for ODT & CKE - SPD3_LRDIMM_RANK_READ_WRITE_QXODT_CONTROL Rank_0_1QxOdtControlFor800_1066; ///< 73 F[3,4]RC11 / F[3,4]RC10 - Rank 0 & 1 RD & WR QxODT Control for 800 & 1066 - SPD3_LRDIMM_RANK_READ_WRITE_QXODT_CONTROL Rank_2_3QxOdtControlFor800_1066; ///< 74 F[5,6]RC11 / F[5,6]RC10 - Rank 2 & 3 RD & WR QxODT Control for 800 & 1066 - SPD3_LRDIMM_RANK_READ_WRITE_QXODT_CONTROL Rank_4_5QxOdtControlFor800_1066; ///< 75 F[7,8]RC11 / F[7,8]RC10 - Rank 4 & 5 RD & WR QxODT Control for 800 & 1066 - SPD3_LRDIMM_RANK_READ_WRITE_QXODT_CONTROL Rank_6_7QxOdtControlFor800_1066; ///< 76 F[9,10]RC11 / F[9,10]RC10 - Rank 6 & 7 RD & WR QxODT Control for 800 & 1066 - SPD3_LRDIMM_MR_1_2 MR_1_2RegistersFor800_1066; ///< 77 MR1,2 Registers for 800 & 1066 + SPD3_LRDIMM_MODULE_NOMINAL_HEIGHT ModuleNominalHeight; ///< 60 Module Nominal Height + SPD3_LRDIMM_MODULE_NOMINAL_THICKNESS ModuleMaximumThickness; ///< 61 Module Maximum Thickness + SPD3_LRDIMM_REFERENCE_RAW_CARD ReferenceRawCardUsed; ///< 62 Reference Raw Card Used + SPD3_LRDIMM_MODULE_ATTRIBUTES DimmModuleAttributes; ///< 63 Module Attributes + UINT8 MemoryBufferRevisionNumber; ///< 64 Memory Buffer Revision Number + SPD3_MANUFACTURER_ID_CODE ManufacturerIdCode; ///< 65-66 Memory Buffer Manufacturer ID Code + SPD3_LRDIMM_TIMING_CONTROL_DRIVE_STRENGTH TimingControlDriveStrengthCaCs; ///< 67 F0RC3 / F0RC2 - Timing Control & Drive Strength, CA & CS + SPD3_LRDIMM_TIMING_DRIVE_STRENGTH DriveStrength; ///< 68 F0RC5 / F0RC4 - Drive Strength, ODT & CKE and Y + SPD3_LRDIMM_EXTENDED_DELAY ExtendedDelay; ///< 69 F1RC11 / F1RC8 - Extended Delay for Y, CS and ODT & CKE + SPD3_LRDIMM_ADDITIVE_DELAY_FOR_QXCS_N_QXCA AdditiveDelayForCsCa; ///< 70 F1RC13 / F1RC12 - Additive Delay for CS and CA + SPD3_LRDIMM_ADDITIVE_DELAY_FOR_QXODT_QXCKE AdditiveDelayForOdtCke; ///< 71 F1RC15 / F1RC14 - Additive Delay for ODT & CKE + SPD3_LRDIMM_MDQ_TERMINATION_DRIVE_STRENGTH MdqTerminationDriveStrengthFor800_1066; ///< 72 F1RC15 / F1RC14 - Additive Delay for ODT & CKE + SPD3_LRDIMM_RANK_READ_WRITE_QXODT_CONTROL Rank_0_1QxOdtControlFor800_1066; ///< 73 F[3,4]RC11 / F[3,4]RC10 - Rank 0 & 1 RD & WR QxODT Control for 800 & 1066 + SPD3_LRDIMM_RANK_READ_WRITE_QXODT_CONTROL Rank_2_3QxOdtControlFor800_1066; ///< 74 F[5,6]RC11 / F[5,6]RC10 - Rank 2 & 3 RD & WR QxODT Control for 800 & 1066 + SPD3_LRDIMM_RANK_READ_WRITE_QXODT_CONTROL Rank_4_5QxOdtControlFor800_1066; ///< 75 F[7,8]RC11 / F[7,8]RC10 - Rank 4 & 5 RD & WR QxODT Control for 800 & 1066 + SPD3_LRDIMM_RANK_READ_WRITE_QXODT_CONTROL Rank_6_7QxOdtControlFor800_1066; ///< 76 F[9,10]RC11 / F[9,10]RC10 - Rank 6 & 7 RD & WR QxODT Control for 800 & 1066 + SPD3_LRDIMM_MR_1_2 MR_1_2RegistersFor800_1066; ///< 77 MR1,2 Registers for 800 & 1066 SPD3_LRDIMM_MDQ_TERMINATION_DRIVE_STRENGTH MdqTerminationDriveStrengthFor1333_1600; ///< 78 F1RC15 / F1RC14 - Additive Delay for ODT & CKE - SPD3_LRDIMM_RANK_READ_WRITE_QXODT_CONTROL Rank_0_1QxOdtControlFor1333_1600; ///< 79 F[3,4]RC11 / F[3,4]RC10 - Rank 0 & 1 RD & WR QxODT Control for 800 & 1066 - SPD3_LRDIMM_RANK_READ_WRITE_QXODT_CONTROL Rank_2_3QxOdtControlFor1333_1600; ///< 80 F[5,6]RC11 / F[5,6]RC10 - Rank 2 & 3 RD & WR QxODT Control for 800 & 1066 - SPD3_LRDIMM_RANK_READ_WRITE_QXODT_CONTROL Rank_4_5QxOdtControlFor1333_1600; ///< 81 F[7,8]RC11 / F[7,8]RC10 - Rank 4 & 5 RD & WR QxODT Control for 800 & 1066 - SPD3_LRDIMM_RANK_READ_WRITE_QXODT_CONTROL Rank_6_7QxOdtControlFor1333_1600; ///< 82 F[9,10]RC11 / F[9,10]RC10 - Rank 6 & 7 RD & WR QxODT Control for 800 & 1066 - SPD3_LRDIMM_MR_1_2 MR_1_2RegistersFor1333_1600; ///< 83 MR1,2 Registers for 800 & 1066 + SPD3_LRDIMM_RANK_READ_WRITE_QXODT_CONTROL Rank_0_1QxOdtControlFor1333_1600; ///< 79 F[3,4]RC11 / F[3,4]RC10 - Rank 0 & 1 RD & WR QxODT Control for 800 & 1066 + SPD3_LRDIMM_RANK_READ_WRITE_QXODT_CONTROL Rank_2_3QxOdtControlFor1333_1600; ///< 80 F[5,6]RC11 / F[5,6]RC10 - Rank 2 & 3 RD & WR QxODT Control for 800 & 1066 + SPD3_LRDIMM_RANK_READ_WRITE_QXODT_CONTROL Rank_4_5QxOdtControlFor1333_1600; ///< 81 F[7,8]RC11 / F[7,8]RC10 - Rank 4 & 5 RD & WR QxODT Control for 800 & 1066 + SPD3_LRDIMM_RANK_READ_WRITE_QXODT_CONTROL Rank_6_7QxOdtControlFor1333_1600; ///< 82 F[9,10]RC11 / F[9,10]RC10 - Rank 6 & 7 RD & WR QxODT Control for 800 & 1066 + SPD3_LRDIMM_MR_1_2 MR_1_2RegistersFor1333_1600; ///< 83 MR1,2 Registers for 800 & 1066 SPD3_LRDIMM_MDQ_TERMINATION_DRIVE_STRENGTH MdqTerminationDriveStrengthFor1866_2133; ///< 84 F1RC15 / F1RC14 - Additive Delay for ODT & CKE - SPD3_LRDIMM_RANK_READ_WRITE_QXODT_CONTROL Rank_0_1QxOdtControlFor1866_2133; ///< 85 F[3,4]RC11 / F[3,4]RC10 - Rank 0 & 1 RD & WR QxODT Control for 800 & 1066 - SPD3_LRDIMM_RANK_READ_WRITE_QXODT_CONTROL Rank_2_3QxOdtControlFor1866_2133; ///< 86 F[5,6]RC11 / F[5,6]RC10 - Rank 2 & 3 RD & WR QxODT Control for 800 & 1066 - SPD3_LRDIMM_RANK_READ_WRITE_QXODT_CONTROL Rank_4_5QxOdtControlFor1866_2133; ///< 87 F[7,8]RC11 / F[7,8]RC10 - Rank 4 & 5 RD & WR QxODT Control for 800 & 1066 - SPD3_LRDIMM_RANK_READ_WRITE_QXODT_CONTROL Rank_6_7QxOdtControlFor1866_2133; ///< 88 F[9,10]RC11 / F[9,10]RC10 - Rank 6 & 7 RD & WR QxODT Control for 800 & 1066 - SPD3_LRDIMM_MR_1_2 MR_1_2RegistersFor1866_2133; ///< 89 MR1,2 Registers for 800 & 1066 - SPD3_LRDIMM_MODULE_DELAY_TIME MinimumModuleDelayTimeFor1_5V; ///< 90 Minimum Module Delay Time for 1.5 V - SPD3_LRDIMM_MODULE_DELAY_TIME MaximumModuleDelayTimeFor1_5V; ///< 91 Maximum Module Delay Time for 1.5 V - SPD3_LRDIMM_MODULE_DELAY_TIME MinimumModuleDelayTimeFor1_35V; ///< 92 Minimum Module Delay Time for 1.35 V - SPD3_LRDIMM_MODULE_DELAY_TIME MaximumModuleDelayTimeFor1_35V; ///< 93 Maximum Module Delay Time for 1.35 V - SPD3_LRDIMM_MODULE_DELAY_TIME MinimumModuleDelayTimeFor1_25V; ///< 94 Minimum Module Delay Time for 1.25 V - SPD3_LRDIMM_MODULE_DELAY_TIME MaximumModuleDelayTimeFor1_25V; ///< 95 Maximum Module Delay Time for 1.25 V - UINT8 Reserved[101 - 96 + 1]; ///< 96-101 Reserved - UINT8 PersonalityByte[116 - 102 + 1]; ///< 102-116 Memory Buffer Personality Bytes + SPD3_LRDIMM_RANK_READ_WRITE_QXODT_CONTROL Rank_0_1QxOdtControlFor1866_2133; ///< 85 F[3,4]RC11 / F[3,4]RC10 - Rank 0 & 1 RD & WR QxODT Control for 800 & 1066 + SPD3_LRDIMM_RANK_READ_WRITE_QXODT_CONTROL Rank_2_3QxOdtControlFor1866_2133; ///< 86 F[5,6]RC11 / F[5,6]RC10 - Rank 2 & 3 RD & WR QxODT Control for 800 & 1066 + SPD3_LRDIMM_RANK_READ_WRITE_QXODT_CONTROL Rank_4_5QxOdtControlFor1866_2133; ///< 87 F[7,8]RC11 / F[7,8]RC10 - Rank 4 & 5 RD & WR QxODT Control for 800 & 1066 + SPD3_LRDIMM_RANK_READ_WRITE_QXODT_CONTROL Rank_6_7QxOdtControlFor1866_2133; ///< 88 F[9,10]RC11 / F[9,10]RC10 - Rank 6 & 7 RD & WR QxODT Control for 800 & 1066 + SPD3_LRDIMM_MR_1_2 MR_1_2RegistersFor1866_2133; ///< 89 MR1,2 Registers for 800 & 1066 + SPD3_LRDIMM_MODULE_DELAY_TIME MinimumModuleDelayTimeFor1_5V; ///< 90 Minimum Module Delay Time for 1.5 V + SPD3_LRDIMM_MODULE_DELAY_TIME MaximumModuleDelayTimeFor1_5V; ///< 91 Maximum Module Delay Time for 1.5 V + SPD3_LRDIMM_MODULE_DELAY_TIME MinimumModuleDelayTimeFor1_35V; ///< 92 Minimum Module Delay Time for 1.35 V + SPD3_LRDIMM_MODULE_DELAY_TIME MaximumModuleDelayTimeFor1_35V; ///< 93 Maximum Module Delay Time for 1.35 V + SPD3_LRDIMM_MODULE_DELAY_TIME MinimumModuleDelayTimeFor1_25V; ///< 94 Minimum Module Delay Time for 1.25 V + SPD3_LRDIMM_MODULE_DELAY_TIME MaximumModuleDelayTimeFor1_25V; ///< 95 Maximum Module Delay Time for 1.25 V + UINT8 Reserved[101 - 96 + 1]; ///< 96-101 Reserved + UINT8 PersonalityByte[116 - 102 + 1]; ///< 102-116 Memory Buffer Personality Bytes } SPD3_MODULE_LOADREDUCED; typedef union { - SPD3_MODULE_UNBUFFERED Unbuffered; ///< 128-255 Unbuffered Memory Module Types - SPD3_MODULE_REGISTERED Registered; ///< 128-255 Registered Memory Module Types - SPD3_MODULE_CLOCKED Clocked; ///< 128-255 Registered Memory Module Types - SPD3_MODULE_LOADREDUCED LoadReduced; ///< 128-255 Load Reduced Memory Module Types + SPD3_MODULE_UNBUFFERED Unbuffered; ///< 128-255 Unbuffered Memory Module Types + SPD3_MODULE_REGISTERED Registered; ///< 128-255 Registered Memory Module Types + SPD3_MODULE_CLOCKED Clocked; ///< 128-255 Registered Memory Module Types + SPD3_MODULE_LOADREDUCED LoadReduced; ///< 128-255 Load Reduced Memory Module Types } SPD3_MODULE_SPECIFIC; typedef struct { - UINT8 ModulePartNumber[145 - 128 + 1]; ///< 128-145 Module Part Number + UINT8 ModulePartNumber[145 - 128 + 1]; ///< 128-145 Module Part Number } SPD3_MODULE_PART_NUMBER; typedef struct { - UINT8 ModuleRevisionCode[147 - 146 + 1]; ///< 146-147 Module Revision Code + UINT8 ModuleRevisionCode[147 - 146 + 1]; ///< 146-147 Module Revision Code } SPD3_MODULE_REVISION_CODE; typedef struct { - UINT8 ManufacturerSpecificData[175 - 150 + 1];///< 150-175 Manufacturer's Specific Data + UINT8 ManufacturerSpecificData[175 - 150 + 1]; ///< 150-175 Manufacturer's Specific Data } SPD3_MANUFACTURER_SPECIFIC; /// /// DDR3 Serial Presence Detect structure /// typedef struct { - SPD3_BASE_SECTION General; ///< 0-59 General Section - SPD3_MODULE_SPECIFIC Module; ///< 60-116 Module-Specific Section - SPD3_UNIQUE_MODULE_ID ModuleId; ///< 117-125 Unique Module ID - SPD3_CYCLIC_REDUNDANCY_CODE Crc; ///< 126-127 Cyclical Redundancy Code (CRC) - SPD3_MODULE_PART_NUMBER ModulePartNumber; ///< 128-145 Module Part Number - SPD3_MODULE_REVISION_CODE ModuleRevisionCode; ///< 146-147 Module Revision Code - SPD3_MANUFACTURER_ID_CODE DramIdCode; ///< 148-149 Dram Manufacturer ID Code - SPD3_MANUFACTURER_SPECIFIC ManufacturerSpecificData; ///< 150-175 Manufacturer's Specific Data - UINT8 Reserved[255 - 176 + 1]; ///< 176-255 Open for Customer Use + SPD3_BASE_SECTION General; ///< 0-59 General Section + SPD3_MODULE_SPECIFIC Module; ///< 60-116 Module-Specific Section + SPD3_UNIQUE_MODULE_ID ModuleId; ///< 117-125 Unique Module ID + SPD3_CYCLIC_REDUNDANCY_CODE Crc; ///< 126-127 Cyclical Redundancy Code (CRC) + SPD3_MODULE_PART_NUMBER ModulePartNumber; ///< 128-145 Module Part Number + SPD3_MODULE_REVISION_CODE ModuleRevisionCode; ///< 146-147 Module Revision Code + SPD3_MANUFACTURER_ID_CODE DramIdCode; ///< 148-149 Dram Manufacturer ID Code + SPD3_MANUFACTURER_SPECIFIC ManufacturerSpecificData; ///< 150-175 Manufacturer's Specific Data + UINT8 Reserved[255 - 176 + 1]; ///< 176-255 Open for Customer Use } SPD_DDR3; #pragma pack (pop) diff --git a/MdePkg/Include/IndustryStandard/SdramSpdDdr4.h b/MdePkg/Include/IndustryStandard/SdramSpdDdr4.h index 717fbbd..9d100e9 100644 --- a/MdePkg/Include/IndustryStandard/SdramSpdDdr4.h +++ b/MdePkg/Include/IndustryStandard/SdramSpdDdr4.h @@ -16,698 +16,698 @@ typedef union { struct { - UINT8 BytesUsed : 4; ///< Bits 3:0 - UINT8 BytesTotal : 3; ///< Bits 6:4 - UINT8 CrcCoverage : 1; ///< Bits 7:7 + UINT8 BytesUsed : 4; ///< Bits 3:0 + UINT8 BytesTotal : 3; ///< Bits 6:4 + UINT8 CrcCoverage : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_DEVICE_DESCRIPTION_STRUCT; typedef union { struct { - UINT8 Minor : 4; ///< Bits 3:0 - UINT8 Major : 4; ///< Bits 7:4 + UINT8 Minor : 4; ///< Bits 3:0 + UINT8 Major : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_REVISION_STRUCT; typedef union { struct { - UINT8 Type : 8; ///< Bits 7:0 + UINT8 Type : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_DRAM_DEVICE_TYPE_STRUCT; typedef union { struct { - UINT8 ModuleType : 4; ///< Bits 3:0 - UINT8 HybridMedia : 3; ///< Bits 6:4 - UINT8 Hybrid : 1; ///< Bits 7:7 + UINT8 ModuleType : 4; ///< Bits 3:0 + UINT8 HybridMedia : 3; ///< Bits 6:4 + UINT8 Hybrid : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_MODULE_TYPE_STRUCT; typedef union { struct { - UINT8 Density : 4; ///< Bits 3:0 - UINT8 BankAddress : 2; ///< Bits 5:4 - UINT8 BankGroup : 2; ///< Bits 7:6 + UINT8 Density : 4; ///< Bits 3:0 + UINT8 BankAddress : 2; ///< Bits 5:4 + UINT8 BankGroup : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_SDRAM_DENSITY_BANKS_STRUCT; typedef union { struct { - UINT8 ColumnAddress : 3; ///< Bits 2:0 - UINT8 RowAddress : 3; ///< Bits 5:3 - UINT8 Reserved : 2; ///< Bits 7:6 + UINT8 ColumnAddress : 3; ///< Bits 2:0 + UINT8 RowAddress : 3; ///< Bits 5:3 + UINT8 Reserved : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_SDRAM_ADDRESSING_STRUCT; typedef union { struct { - UINT8 SignalLoading : 2; ///< Bits 1:0 - UINT8 Reserved : 2; ///< Bits 3:2 - UINT8 DieCount : 3; ///< Bits 6:4 - UINT8 SdramPackageType : 1; ///< Bits 7:7 + UINT8 SignalLoading : 2; ///< Bits 1:0 + UINT8 Reserved : 2; ///< Bits 3:2 + UINT8 DieCount : 3; ///< Bits 6:4 + UINT8 SdramPackageType : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_PRIMARY_SDRAM_PACKAGE_TYPE_STRUCT; typedef union { struct { - UINT8 MaximumActivateCount : 4; ///< Bits 3:0 - UINT8 MaximumActivateWindow : 2; ///< Bits 5:4 - UINT8 Reserved : 2; ///< Bits 7:6 + UINT8 MaximumActivateCount : 4; ///< Bits 3:0 + UINT8 MaximumActivateWindow : 2; ///< Bits 5:4 + UINT8 Reserved : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_SDRAM_OPTIONAL_FEATURES_STRUCT; typedef union { struct { - UINT8 Reserved : 8; ///< Bits 7:0 + UINT8 Reserved : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_SDRAM_THERMAL_REFRESH_STRUCT; typedef union { struct { - UINT8 Reserved : 5; ///< Bits 4:0 - UINT8 SoftPPR : 1; ///< Bits 5:5 - UINT8 PostPackageRepair : 2; ///< Bits 7:6 + UINT8 Reserved : 5; ///< Bits 4:0 + UINT8 SoftPPR : 1; ///< Bits 5:5 + UINT8 PostPackageRepair : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_OTHER_SDRAM_OPTIONAL_FEATURES_STRUCT; typedef union { struct { - UINT8 SignalLoading : 2; ///< Bits 1:0 - UINT8 DRAMDensityRatio : 2; ///< Bits 3:2 - UINT8 DieCount : 3; ///< Bits 6:4 - UINT8 SdramPackageType : 1; ///< Bits 7:7 + UINT8 SignalLoading : 2; ///< Bits 1:0 + UINT8 DRAMDensityRatio : 2; ///< Bits 3:2 + UINT8 DieCount : 3; ///< Bits 6:4 + UINT8 SdramPackageType : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_SECONDARY_SDRAM_PACKAGE_TYPE_STRUCT; typedef union { struct { - UINT8 OperationAt1_20 : 1; ///< Bits 0:0 - UINT8 EndurantAt1_20 : 1; ///< Bits 1:1 - UINT8 Reserved : 6; ///< Bits 7:2 + UINT8 OperationAt1_20 : 1; ///< Bits 0:0 + UINT8 EndurantAt1_20 : 1; ///< Bits 1:1 + UINT8 Reserved : 6; ///< Bits 7:2 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_MODULE_NOMINAL_VOLTAGE_STRUCT; typedef union { struct { - UINT8 SdramDeviceWidth : 3; ///< Bits 2:0 - UINT8 RankCount : 3; ///< Bits 5:3 - UINT8 RankMix : 1; ///< Bits 6:6 - UINT8 Reserved : 1; ///< Bits 7:7 + UINT8 SdramDeviceWidth : 3; ///< Bits 2:0 + UINT8 RankCount : 3; ///< Bits 5:3 + UINT8 RankMix : 1; ///< Bits 6:6 + UINT8 Reserved : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_MODULE_ORGANIZATION_STRUCT; typedef union { struct { - UINT8 PrimaryBusWidth : 3; ///< Bits 2:0 - UINT8 BusWidthExtension : 2; ///< Bits 4:3 - UINT8 Reserved : 3; ///< Bits 7:5 + UINT8 PrimaryBusWidth : 3; ///< Bits 2:0 + UINT8 BusWidthExtension : 2; ///< Bits 4:3 + UINT8 Reserved : 3; ///< Bits 7:5 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_MODULE_MEMORY_BUS_WIDTH_STRUCT; typedef union { struct { - UINT8 Reserved : 7; ///< Bits 6:0 - UINT8 ThermalSensorPresence : 1; ///< Bits 7:7 + UINT8 Reserved : 7; ///< Bits 6:0 + UINT8 ThermalSensorPresence : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_MODULE_THERMAL_SENSOR_STRUCT; typedef union { struct { - UINT8 ExtendedBaseModuleType : 4; ///< Bits 3:0 - UINT8 Reserved : 4; ///< Bits 7:4 + UINT8 ExtendedBaseModuleType : 4; ///< Bits 3:0 + UINT8 Reserved : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_EXTENDED_MODULE_TYPE_STRUCT; typedef union { struct { - UINT8 Fine : 2; ///< Bits 1:0 - UINT8 Medium : 2; ///< Bits 3:2 - UINT8 Reserved : 4; ///< Bits 7:4 + UINT8 Fine : 2; ///< Bits 1:0 + UINT8 Medium : 2; ///< Bits 3:2 + UINT8 Reserved : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_TIMEBASE_STRUCT; typedef union { struct { - UINT8 tCKmin : 8; ///< Bits 7:0 + UINT8 tCKmin : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_TCK_MIN_MTB_STRUCT; typedef union { struct { - UINT8 tCKmax : 8; ///< Bits 7:0 + UINT8 tCKmax : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_TCK_MAX_MTB_STRUCT; typedef union { struct { - UINT32 Cl7 : 1; ///< Bits 0:0 - UINT32 Cl8 : 1; ///< Bits 1:1 - UINT32 Cl9 : 1; ///< Bits 2:2 - UINT32 Cl10 : 1; ///< Bits 3:3 - UINT32 Cl11 : 1; ///< Bits 4:4 - UINT32 Cl12 : 1; ///< Bits 5:5 - UINT32 Cl13 : 1; ///< Bits 6:6 - UINT32 Cl14 : 1; ///< Bits 7:7 - UINT32 Cl15 : 1; ///< Bits 8:8 - UINT32 Cl16 : 1; ///< Bits 9:9 - UINT32 Cl17 : 1; ///< Bits 10:10 - UINT32 Cl18 : 1; ///< Bits 11:11 - UINT32 Cl19 : 1; ///< Bits 12:12 - UINT32 Cl20 : 1; ///< Bits 13:13 - UINT32 Cl21 : 1; ///< Bits 14:14 - UINT32 Cl22 : 1; ///< Bits 15:15 - UINT32 Cl23 : 1; ///< Bits 16:16 - UINT32 Cl24 : 1; ///< Bits 17:17 - UINT32 Cl25 : 1; ///< Bits 18:18 - UINT32 Cl26 : 1; ///< Bits 19:19 - UINT32 Cl27 : 1; ///< Bits 20:20 - UINT32 Cl28 : 1; ///< Bits 21:21 - UINT32 Cl29 : 1; ///< Bits 22:22 - UINT32 Cl30 : 1; ///< Bits 23:23 - UINT32 Cl31 : 1; ///< Bits 24:24 - UINT32 Cl32 : 1; ///< Bits 25:25 - UINT32 Cl33 : 1; ///< Bits 26:26 - UINT32 Cl34 : 1; ///< Bits 27:27 - UINT32 Cl35 : 1; ///< Bits 28:28 - UINT32 Cl36 : 1; ///< Bits 29:29 - UINT32 Reserved : 1; ///< Bits 30:30 - UINT32 ClRange : 1; ///< Bits 31:31 - } Bits; - struct { - UINT32 Cl23 : 1; ///< Bits 0:0 - UINT32 Cl24 : 1; ///< Bits 1:1 - UINT32 Cl25 : 1; ///< Bits 2:2 - UINT32 Cl26 : 1; ///< Bits 3:3 - UINT32 Cl27 : 1; ///< Bits 4:4 - UINT32 Cl28 : 1; ///< Bits 5:5 - UINT32 Cl29 : 1; ///< Bits 6:6 - UINT32 Cl30 : 1; ///< Bits 7:7 - UINT32 Cl31 : 1; ///< Bits 8:8 - UINT32 Cl32 : 1; ///< Bits 9:9 - UINT32 Cl33 : 1; ///< Bits 10:10 - UINT32 Cl34 : 1; ///< Bits 11:11 - UINT32 Cl35 : 1; ///< Bits 12:12 - UINT32 Cl36 : 1; ///< Bits 13:13 - UINT32 Cl37 : 1; ///< Bits 14:14 - UINT32 Cl38 : 1; ///< Bits 15:15 - UINT32 Cl39 : 1; ///< Bits 16:16 - UINT32 Cl40 : 1; ///< Bits 17:17 - UINT32 Cl41 : 1; ///< Bits 18:18 - UINT32 Cl42 : 1; ///< Bits 19:19 - UINT32 Cl43 : 1; ///< Bits 20:20 - UINT32 Cl44 : 1; ///< Bits 21:21 - UINT32 Cl45 : 1; ///< Bits 22:22 - UINT32 Cl46 : 1; ///< Bits 23:23 - UINT32 Cl47 : 1; ///< Bits 24:24 - UINT32 Cl48 : 1; ///< Bits 25:25 - UINT32 Cl49 : 1; ///< Bits 26:26 - UINT32 Cl50 : 1; ///< Bits 27:27 - UINT32 Cl51 : 1; ///< Bits 28:28 - UINT32 Cl52 : 1; ///< Bits 29:29 - UINT32 Reserved : 1; ///< Bits 30:30 - UINT32 ClRange : 1; ///< Bits 31:31 + UINT32 Cl7 : 1; ///< Bits 0:0 + UINT32 Cl8 : 1; ///< Bits 1:1 + UINT32 Cl9 : 1; ///< Bits 2:2 + UINT32 Cl10 : 1; ///< Bits 3:3 + UINT32 Cl11 : 1; ///< Bits 4:4 + UINT32 Cl12 : 1; ///< Bits 5:5 + UINT32 Cl13 : 1; ///< Bits 6:6 + UINT32 Cl14 : 1; ///< Bits 7:7 + UINT32 Cl15 : 1; ///< Bits 8:8 + UINT32 Cl16 : 1; ///< Bits 9:9 + UINT32 Cl17 : 1; ///< Bits 10:10 + UINT32 Cl18 : 1; ///< Bits 11:11 + UINT32 Cl19 : 1; ///< Bits 12:12 + UINT32 Cl20 : 1; ///< Bits 13:13 + UINT32 Cl21 : 1; ///< Bits 14:14 + UINT32 Cl22 : 1; ///< Bits 15:15 + UINT32 Cl23 : 1; ///< Bits 16:16 + UINT32 Cl24 : 1; ///< Bits 17:17 + UINT32 Cl25 : 1; ///< Bits 18:18 + UINT32 Cl26 : 1; ///< Bits 19:19 + UINT32 Cl27 : 1; ///< Bits 20:20 + UINT32 Cl28 : 1; ///< Bits 21:21 + UINT32 Cl29 : 1; ///< Bits 22:22 + UINT32 Cl30 : 1; ///< Bits 23:23 + UINT32 Cl31 : 1; ///< Bits 24:24 + UINT32 Cl32 : 1; ///< Bits 25:25 + UINT32 Cl33 : 1; ///< Bits 26:26 + UINT32 Cl34 : 1; ///< Bits 27:27 + UINT32 Cl35 : 1; ///< Bits 28:28 + UINT32 Cl36 : 1; ///< Bits 29:29 + UINT32 Reserved : 1; ///< Bits 30:30 + UINT32 ClRange : 1; ///< Bits 31:31 + } Bits; + struct { + UINT32 Cl23 : 1; ///< Bits 0:0 + UINT32 Cl24 : 1; ///< Bits 1:1 + UINT32 Cl25 : 1; ///< Bits 2:2 + UINT32 Cl26 : 1; ///< Bits 3:3 + UINT32 Cl27 : 1; ///< Bits 4:4 + UINT32 Cl28 : 1; ///< Bits 5:5 + UINT32 Cl29 : 1; ///< Bits 6:6 + UINT32 Cl30 : 1; ///< Bits 7:7 + UINT32 Cl31 : 1; ///< Bits 8:8 + UINT32 Cl32 : 1; ///< Bits 9:9 + UINT32 Cl33 : 1; ///< Bits 10:10 + UINT32 Cl34 : 1; ///< Bits 11:11 + UINT32 Cl35 : 1; ///< Bits 12:12 + UINT32 Cl36 : 1; ///< Bits 13:13 + UINT32 Cl37 : 1; ///< Bits 14:14 + UINT32 Cl38 : 1; ///< Bits 15:15 + UINT32 Cl39 : 1; ///< Bits 16:16 + UINT32 Cl40 : 1; ///< Bits 17:17 + UINT32 Cl41 : 1; ///< Bits 18:18 + UINT32 Cl42 : 1; ///< Bits 19:19 + UINT32 Cl43 : 1; ///< Bits 20:20 + UINT32 Cl44 : 1; ///< Bits 21:21 + UINT32 Cl45 : 1; ///< Bits 22:22 + UINT32 Cl46 : 1; ///< Bits 23:23 + UINT32 Cl47 : 1; ///< Bits 24:24 + UINT32 Cl48 : 1; ///< Bits 25:25 + UINT32 Cl49 : 1; ///< Bits 26:26 + UINT32 Cl50 : 1; ///< Bits 27:27 + UINT32 Cl51 : 1; ///< Bits 28:28 + UINT32 Cl52 : 1; ///< Bits 29:29 + UINT32 Reserved : 1; ///< Bits 30:30 + UINT32 ClRange : 1; ///< Bits 31:31 } HighRangeBits; - UINT32 Data; - UINT16 Data16[2]; - UINT8 Data8[4]; + UINT32 Data; + UINT16 Data16[2]; + UINT8 Data8[4]; } SPD4_CAS_LATENCIES_SUPPORTED_STRUCT; typedef union { struct { - UINT8 tAAmin : 8; ///< Bits 7:0 + UINT8 tAAmin : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_TAA_MIN_MTB_STRUCT; typedef union { struct { - UINT8 tRCDmin : 8; ///< Bits 7:0 + UINT8 tRCDmin : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_TRCD_MIN_MTB_STRUCT; typedef union { struct { - UINT8 tRPmin : 8; ///< Bits 7:0 + UINT8 tRPmin : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_TRP_MIN_MTB_STRUCT; typedef union { struct { - UINT8 tRASminUpper : 4; ///< Bits 3:0 - UINT8 tRCminUpper : 4; ///< Bits 7:4 + UINT8 tRASminUpper : 4; ///< Bits 3:0 + UINT8 tRCminUpper : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_TRAS_TRC_MIN_MTB_STRUCT; typedef union { struct { - UINT8 tRASmin : 8; ///< Bits 7:0 + UINT8 tRASmin : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_TRAS_MIN_MTB_STRUCT; typedef union { struct { - UINT8 tRCmin : 8; ///< Bits 7:0 + UINT8 tRCmin : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_TRC_MIN_MTB_STRUCT; typedef union { struct { - UINT16 tRFCmin : 16; ///< Bits 15:0 + UINT16 tRFCmin : 16; ///< Bits 15:0 } Bits; - UINT16 Data; - UINT8 Data8[2]; + UINT16 Data; + UINT8 Data8[2]; } SPD4_TRFC_MIN_MTB_STRUCT; typedef union { struct { - UINT8 tFAWminUpper : 4; ///< Bits 3:0 - UINT8 Reserved : 4; ///< Bits 7:4 + UINT8 tFAWminUpper : 4; ///< Bits 3:0 + UINT8 Reserved : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_TFAW_MIN_MTB_UPPER_STRUCT; typedef union { struct { - UINT8 tFAWmin : 8; ///< Bits 7:0 + UINT8 tFAWmin : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_TFAW_MIN_MTB_STRUCT; typedef union { struct { - UINT8 tRRDmin : 8; ///< Bits 7:0 + UINT8 tRRDmin : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_TRRD_MIN_MTB_STRUCT; typedef union { struct { - UINT8 tCCDmin : 8; ///< Bits 7:0 + UINT8 tCCDmin : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_TCCD_MIN_MTB_STRUCT; typedef union { struct { - UINT8 tWRminMostSignificantNibble : 4; ///< Bits 3:0 - UINT8 Reserved : 4; ///< Bits 7:4 + UINT8 tWRminMostSignificantNibble : 4; ///< Bits 3:0 + UINT8 Reserved : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_TWR_UPPER_NIBBLE_STRUCT; typedef union { struct { - UINT8 tWRmin : 8; ///< Bits 7:0 + UINT8 tWRmin : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_TWR_MIN_MTB_STRUCT; typedef union { struct { - UINT8 tWTR_SminMostSignificantNibble : 4; ///< Bits 3:0 - UINT8 tWTR_LminMostSignificantNibble : 4; ///< Bits 7:4 + UINT8 tWTR_SminMostSignificantNibble : 4; ///< Bits 3:0 + UINT8 tWTR_LminMostSignificantNibble : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_TWTR_UPPER_NIBBLE_STRUCT; typedef union { struct { - UINT8 tWTRmin : 8; ///< Bits 7:0 + UINT8 tWTRmin : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_TWTR_MIN_MTB_STRUCT; typedef union { struct { - UINT8 BitOrderatSDRAM : 5; ///< Bits 4:0 - UINT8 WiredtoUpperLowerNibble : 1; ///< Bits 5:5 - UINT8 PackageRankMap : 2; ///< Bits 7:6 + UINT8 BitOrderatSDRAM : 5; ///< Bits 4:0 + UINT8 WiredtoUpperLowerNibble : 1; ///< Bits 5:5 + UINT8 PackageRankMap : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_CONNECTOR_BIT_MAPPING_BYTE_STRUCT; typedef union { struct { - INT8 tCCDminFine : 8; ///< Bits 7:0 + INT8 tCCDminFine : 8; ///< Bits 7:0 } Bits; - INT8 Data; + INT8 Data; } SPD4_TCCD_MIN_FTB_STRUCT; typedef union { struct { - INT8 tRRDminFine : 8; ///< Bits 7:0 + INT8 tRRDminFine : 8; ///< Bits 7:0 } Bits; - INT8 Data; + INT8 Data; } SPD4_TRRD_MIN_FTB_STRUCT; typedef union { struct { - INT8 tRCminFine : 8; ///< Bits 7:0 + INT8 tRCminFine : 8; ///< Bits 7:0 } Bits; - INT8 Data; + INT8 Data; } SPD4_TRC_MIN_FTB_STRUCT; typedef union { struct { - INT8 tRPminFine : 8; ///< Bits 7:0 + INT8 tRPminFine : 8; ///< Bits 7:0 } Bits; - INT8 Data; + INT8 Data; } SPD4_TRP_MIN_FTB_STRUCT; typedef union { struct { - INT8 tRCDminFine : 8; ///< Bits 7:0 + INT8 tRCDminFine : 8; ///< Bits 7:0 } Bits; - INT8 Data; + INT8 Data; } SPD4_TRCD_MIN_FTB_STRUCT; typedef union { struct { - INT8 tAAminFine : 8; ///< Bits 7:0 + INT8 tAAminFine : 8; ///< Bits 7:0 } Bits; - INT8 Data; + INT8 Data; } SPD4_TAA_MIN_FTB_STRUCT; typedef union { struct { - INT8 tCKmaxFine : 8; ///< Bits 7:0 + INT8 tCKmaxFine : 8; ///< Bits 7:0 } Bits; - INT8 Data; + INT8 Data; } SPD4_TCK_MAX_FTB_STRUCT; typedef union { struct { - INT8 tCKminFine : 8; ///< Bits 7:0 + INT8 tCKminFine : 8; ///< Bits 7:0 } Bits; - INT8 Data; + INT8 Data; } SPD4_TCK_MIN_FTB_STRUCT; typedef union { struct { - UINT8 Height : 5; ///< Bits 4:0 - UINT8 RawCardExtension : 3; ///< Bits 7:5 + UINT8 Height : 5; ///< Bits 4:0 + UINT8 RawCardExtension : 3; ///< Bits 7:5 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_UNBUF_MODULE_NOMINAL_HEIGHT; typedef union { struct { - UINT8 FrontThickness : 4; ///< Bits 3:0 - UINT8 BackThickness : 4; ///< Bits 7:4 + UINT8 FrontThickness : 4; ///< Bits 3:0 + UINT8 BackThickness : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_UNBUF_MODULE_NOMINAL_THICKNESS; typedef union { struct { - UINT8 Card : 5; ///< Bits 4:0 - UINT8 Revision : 2; ///< Bits 6:5 - UINT8 Extension : 1; ///< Bits 7:7 + UINT8 Card : 5; ///< Bits 4:0 + UINT8 Revision : 2; ///< Bits 6:5 + UINT8 Extension : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_UNBUF_REFERENCE_RAW_CARD; typedef union { struct { - UINT8 MappingRank1 : 1; ///< Bits 0:0 - UINT8 Reserved : 7; ///< Bits 7:1 + UINT8 MappingRank1 : 1; ///< Bits 0:0 + UINT8 Reserved : 7; ///< Bits 7:1 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_UNBUF_ADDRESS_MAPPING; typedef union { struct { - UINT8 Height : 5; ///< Bits 4:0 - UINT8 Reserved : 3; ///< Bits 7:5 + UINT8 Height : 5; ///< Bits 4:0 + UINT8 Reserved : 3; ///< Bits 7:5 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_RDIMM_MODULE_NOMINAL_HEIGHT; typedef union { struct { - UINT8 FrontThickness : 4; ///< Bits 3:0 - UINT8 BackThickness : 4; ///< Bits 7:4 + UINT8 FrontThickness : 4; ///< Bits 3:0 + UINT8 BackThickness : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_RDIMM_MODULE_NOMINAL_THICKNESS; typedef union { struct { - UINT8 Card : 5; ///< Bits 4:0 - UINT8 Revision : 2; ///< Bits 6:5 - UINT8 Extension : 1; ///< Bits 7:7 + UINT8 Card : 5; ///< Bits 4:0 + UINT8 Revision : 2; ///< Bits 6:5 + UINT8 Extension : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_RDIMM_REFERENCE_RAW_CARD; typedef union { struct { - UINT8 RegisterCount : 2; ///< Bits 1:0 - UINT8 DramRowCount : 2; ///< Bits 3:2 - UINT8 RegisterType : 4; ///< Bits 7:4 + UINT8 RegisterCount : 2; ///< Bits 1:0 + UINT8 DramRowCount : 2; ///< Bits 3:2 + UINT8 RegisterType : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_RDIMM_MODULE_ATTRIBUTES; typedef union { struct { - UINT8 HeatSpreaderThermalCharacteristics : 7; ///< Bits 6:0 - UINT8 HeatSpreaderSolution : 1; ///< Bits 7:7 + UINT8 HeatSpreaderThermalCharacteristics : 7; ///< Bits 6:0 + UINT8 HeatSpreaderSolution : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_RDIMM_THERMAL_HEAT_SPREADER_SOLUTION; typedef union { struct { - UINT16 ContinuationCount : 7; ///< Bits 6:0 - UINT16 ContinuationParity : 1; ///< Bits 7:7 - UINT16 LastNonZeroByte : 8; ///< Bits 15:8 + UINT16 ContinuationCount : 7; ///< Bits 6:0 + UINT16 ContinuationParity : 1; ///< Bits 7:7 + UINT16 LastNonZeroByte : 8; ///< Bits 15:8 } Bits; - UINT16 Data; - UINT8 Data8[2]; + UINT16 Data; + UINT8 Data8[2]; } SPD4_MANUFACTURER_ID_CODE; typedef union { struct { - UINT8 RegisterRevisionNumber; ///< Bits 7:0 + UINT8 RegisterRevisionNumber; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_RDIMM_REGISTER_REVISION_NUMBER; typedef union { struct { - UINT8 Rank1Mapping : 1; ///< Bits 0:0 - UINT8 Reserved : 7; ///< Bits 7:1 + UINT8 Rank1Mapping : 1; ///< Bits 0:0 + UINT8 Reserved : 7; ///< Bits 7:1 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_RDIMM_ADDRESS_MAPPING_FROM_REGISTER_TO_DRAM; typedef union { struct { - UINT8 Cke : 2; ///< Bits 1:0 - UINT8 Odt : 2; ///< Bits 3:2 - UINT8 CommandAddress : 2; ///< Bits 5:4 - UINT8 ChipSelect : 2; ///< Bits 7:6 + UINT8 Cke : 2; ///< Bits 1:0 + UINT8 Odt : 2; ///< Bits 3:2 + UINT8 CommandAddress : 2; ///< Bits 5:4 + UINT8 ChipSelect : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_RDIMM_REGISTER_OUTPUT_DRIVE_STRENGTH_FOR_CONTROL_COMMAND_ADDRESS; typedef union { struct { - UINT8 Y0Y2 : 2; ///< Bits 1:0 - UINT8 Y1Y3 : 2; ///< Bits 3:2 - UINT8 Reserved0 : 2; ///< Bits 5:4 - UINT8 RcdOutputSlewRateControl : 1; ///< Bits 6:6 - UINT8 Reserved1 : 1; ///< Bits 7:7 + UINT8 Y0Y2 : 2; ///< Bits 1:0 + UINT8 Y1Y3 : 2; ///< Bits 3:2 + UINT8 Reserved0 : 2; ///< Bits 5:4 + UINT8 RcdOutputSlewRateControl : 1; ///< Bits 6:6 + UINT8 Reserved1 : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_RDIMM_REGISTER_OUTPUT_DRIVE_STRENGTH_FOR_CLOCK; typedef union { struct { - UINT8 Height : 5; ///< Bits 4:0 - UINT8 Reserved : 3; ///< Bits 7:5 + UINT8 Height : 5; ///< Bits 4:0 + UINT8 Reserved : 3; ///< Bits 7:5 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_LRDIMM_MODULE_NOMINAL_HEIGHT; typedef union { struct { - UINT8 FrontThickness : 4; ///< Bits 3:0 - UINT8 BackThickness : 4; ///< Bits 7:4 + UINT8 FrontThickness : 4; ///< Bits 3:0 + UINT8 BackThickness : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_LRDIMM_MODULE_NOMINAL_THICKNESS; typedef union { struct { - UINT8 Card : 5; ///< Bits 4:0 - UINT8 Revision : 2; ///< Bits 6:5 - UINT8 Extension : 1; ///< Bits 7:7 + UINT8 Card : 5; ///< Bits 4:0 + UINT8 Revision : 2; ///< Bits 6:5 + UINT8 Extension : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_LRDIMM_REFERENCE_RAW_CARD; typedef union { struct { - UINT8 RegisterCount : 2; ///< Bits 1:0 - UINT8 DramRowCount : 2; ///< Bits 3:2 - UINT8 RegisterType : 4; ///< Bits 7:4 + UINT8 RegisterCount : 2; ///< Bits 1:0 + UINT8 DramRowCount : 2; ///< Bits 3:2 + UINT8 RegisterType : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_LRDIMM_MODULE_ATTRIBUTES; typedef union { struct { - UINT8 HeatSpreaderThermalCharacteristics : 7; ///< Bits 6:0 - UINT8 HeatSpreaderSolution : 1; ///< Bits 7:7 + UINT8 HeatSpreaderThermalCharacteristics : 7; ///< Bits 6:0 + UINT8 HeatSpreaderSolution : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_LRDIMM_THERMAL_HEAT_SPREADER_SOLUTION; typedef union { struct { - UINT8 RegisterRevisionNumber; ///< Bits 7:0 + UINT8 RegisterRevisionNumber; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_LRDIMM_REGISTER_REVISION_NUMBER; typedef union { struct { - UINT8 Rank1Mapping : 1; ///< Bits 0:0 - UINT8 Reserved : 7; ///< Bits 7:1 + UINT8 Rank1Mapping : 1; ///< Bits 0:0 + UINT8 Reserved : 7; ///< Bits 7:1 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_LRDIMM_ADDRESS_MAPPING_FROM_REGISTER_TO_DRAM; typedef union { struct { - UINT8 Cke : 2; ///< Bits 1:0 - UINT8 Odt : 2; ///< Bits 3:2 - UINT8 CommandAddress : 2; ///< Bits 5:4 - UINT8 ChipSelect : 2; ///< Bits 7:6 + UINT8 Cke : 2; ///< Bits 1:0 + UINT8 Odt : 2; ///< Bits 3:2 + UINT8 CommandAddress : 2; ///< Bits 5:4 + UINT8 ChipSelect : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_LRDIMM_REGISTER_OUTPUT_DRIVE_STRENGTH_FOR_CONTROL_COMMAND_ADDRESS; typedef union { struct { - UINT8 Y0Y2 : 2; ///< Bits 1:0 - UINT8 Y1Y3 : 2; ///< Bits 3:2 - UINT8 Reserved0 : 2; ///< Bits 5:4 - UINT8 RcdOutputSlewRateControl : 1; ///< Bits 6:6 - UINT8 Reserved1 : 1; ///< Bits 7:7 + UINT8 Y0Y2 : 2; ///< Bits 1:0 + UINT8 Y1Y3 : 2; ///< Bits 3:2 + UINT8 Reserved0 : 2; ///< Bits 5:4 + UINT8 RcdOutputSlewRateControl : 1; ///< Bits 6:6 + UINT8 Reserved1 : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_LRDIMM_REGISTER_OUTPUT_DRIVE_STRENGTH_FOR_CLOCK; typedef struct { - UINT8 DataBufferRevisionNumber; + UINT8 DataBufferRevisionNumber; } SPD4_LRDIMM_DATA_BUFFER_REVISION_NUMBER; typedef union { struct { - UINT8 DramVrefDQForPackageRank0 : 6; ///< Bits 5:0 - UINT8 Reserved : 2; ///< Bits 7:6 + UINT8 DramVrefDQForPackageRank0 : 6; ///< Bits 5:0 + UINT8 Reserved : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_LRDIMM_DRAM_VREFDQ_FOR_PACKAGE_RANK; typedef struct { - UINT8 DataBufferVrefDQforDramInterface; + UINT8 DataBufferVrefDQforDramInterface; } SPD4_LRDIMM_DATA_BUFFER_VREFDQ_FOR_DRAM_INTERFACE; typedef union { struct { - UINT8 DramInterfaceMdqDriveStrength : 4; ///< Bits 3:0 - UINT8 DramInterfaceMdqReadTerminationStrength : 4; ///< Bits 7:4 + UINT8 DramInterfaceMdqDriveStrength : 4; ///< Bits 3:0 + UINT8 DramInterfaceMdqReadTerminationStrength : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_LRDIMM_DATA_BUFFER_MDQ_DRIVE_STRENGTH_RTT_FOR_DATA_RATE; typedef union { struct { - UINT8 DataRateLe1866 : 2; ///< Bits 1:0 - UINT8 DataRateLe2400 : 2; ///< Bits 3:2 - UINT8 DataRateLe3200 : 2; ///< Bits 5:4 - UINT8 Reserved : 2; ///< Bits 7:6 + UINT8 DataRateLe1866 : 2; ///< Bits 1:0 + UINT8 DataRateLe2400 : 2; ///< Bits 3:2 + UINT8 DataRateLe3200 : 2; ///< Bits 5:4 + UINT8 Reserved : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_LRDIMM_DRAM_DRIVE_STRENGTH; typedef union { struct { - UINT8 Rtt_Nom : 3; ///< Bits 2:0 - UINT8 Rtt_WR : 3; ///< Bits 5:3 - UINT8 Reserved : 2; ///< Bits 7:6 + UINT8 Rtt_Nom : 3; ///< Bits 2:0 + UINT8 Rtt_WR : 3; ///< Bits 5:3 + UINT8 Reserved : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_LRDIMM_DRAM_ODT_RTT_WR_RTT_NOM_FOR_DATA_RATE; typedef union { struct { - UINT8 PackageRanks0_1 : 3; ///< Bits 2:0 - UINT8 PackageRanks2_3 : 3; ///< Bits 5:3 - UINT8 Reserved : 2; ///< Bits 7:6 + UINT8 PackageRanks0_1 : 3; ///< Bits 2:0 + UINT8 PackageRanks2_3 : 3; ///< Bits 5:3 + UINT8 Reserved : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_LRDIMM_DRAM_ODT_RTT_PARK_FOR_DATA_RATE; typedef union { struct { - UINT8 Rank0 : 1; ///< Bits 0:0 - UINT8 Rank1 : 1; ///< Bits 1:1 - UINT8 Rank2 : 1; ///< Bits 2:2 - UINT8 Rank3 : 1; ///< Bits 3:3 - UINT8 DataBuffer : 1; ///< Bits 4:4 - UINT8 Reserved : 3; ///< Bits 7:5 + UINT8 Rank0 : 1; ///< Bits 0:0 + UINT8 Rank1 : 1; ///< Bits 1:1 + UINT8 Rank2 : 1; ///< Bits 2:2 + UINT8 Rank3 : 1; ///< Bits 3:3 + UINT8 DataBuffer : 1; ///< Bits 4:4 + UINT8 Reserved : 3; ///< Bits 7:5 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_LRDIMM_DATA_BUFFER_VREFDQ_FOR_DRAM_INTERFACE_RANGE; typedef union { struct { - UINT8 DataBufferGainAdjustment : 1; ///< Bits 0:0 - UINT8 DataBufferDfe : 1; ///< Bits 1:1 - UINT8 Reserved : 6; ///< Bits 7:2 + UINT8 DataBufferGainAdjustment : 1; ///< Bits 0:0 + UINT8 DataBufferDfe : 1; ///< Bits 1:1 + UINT8 Reserved : 6; ///< Bits 7:2 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_LRDIMM_DATA_BUFFER_DQ_DECISION_FEEDBACK_EQUALIZATION; typedef UINT16 SPD4_NVDIMM_MODULE_PRODUCT_IDENTIFIER; typedef union { struct { - UINT16 ContinuationCount : 7; ///< Bits 6:0 - UINT16 ContinuationParity : 1; ///< Bits 7:7 - UINT16 LastNonZeroByte : 8; ///< Bits 15:8 + UINT16 ContinuationCount : 7; ///< Bits 6:0 + UINT16 ContinuationParity : 1; ///< Bits 7:7 + UINT16 LastNonZeroByte : 8; ///< Bits 15:8 } Bits; - UINT16 Data; - UINT8 Data8[2]; + UINT16 Data; + UINT8 Data8[2]; } SPD4_NVDIMM_SUBSYSTEM_CONTROLLER_MANUFACTURER_ID_CODE; typedef UINT16 SPD4_NVDIMM_SUBSYSTEM_CONTROLLER_IDENTIFIER; @@ -716,236 +716,236 @@ typedef UINT8 SPD4_NVDIMM_SUBSYSTEM_CONTROLLER_REVISION_CODE; typedef union { struct { - UINT8 Card : 5; ///< Bits 4:0 - UINT8 Revision : 2; ///< Bits 6:5 - UINT8 Extension : 1; ///< Bits 7:7 + UINT8 Card : 5; ///< Bits 4:0 + UINT8 Revision : 2; ///< Bits 6:5 + UINT8 Extension : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_NVDIMM_REFERENCE_RAW_CARD; typedef union { struct { - UINT8 Reserved : 4; ///< Bits 3:0 - UINT8 Extension : 4; ///< Bits 7:4 + UINT8 Reserved : 4; ///< Bits 3:0 + UINT8 Extension : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD4_NVDIMM_MODULE_CHARACTERISTICS; typedef struct { - UINT8 Reserved; - UINT8 MediaType; + UINT8 Reserved; + UINT8 MediaType; } SPD4_NVDIMM_HYBRID_MODULE_MEDIA_TYPES; typedef UINT8 SPD4_NVDIMM_MAXIMUM_NONVOLATILE_MEMORY_INITIALIZATION_TIME; typedef union { struct { - UINT16 FunctionInterface : 5; ///< Bits 4:0 - UINT16 FunctionClass : 5; ///< Bits 9:5 - UINT16 BlockOffset : 4; ///< Bits 13:10 - UINT16 Reserved : 1; ///< Bits 14:14 - UINT16 Implemented : 1; ///< Bits 15:15 + UINT16 FunctionInterface : 5; ///< Bits 4:0 + UINT16 FunctionClass : 5; ///< Bits 9:5 + UINT16 BlockOffset : 4; ///< Bits 13:10 + UINT16 Reserved : 1; ///< Bits 14:14 + UINT16 Implemented : 1; ///< Bits 15:15 } Bits; - UINT16 Data; - UINT8 Data8[2]; + UINT16 Data; + UINT8 Data8[2]; } SPD4_NVDIMM_FUNCTION_INTERFACE_DESCRIPTOR; typedef struct { - UINT8 Year; ///< Year represented in BCD (00h = 2000) - UINT8 Week; ///< Year represented in BCD (47h = week 47) + UINT8 Year; ///< Year represented in BCD (00h = 2000) + UINT8 Week; ///< Year represented in BCD (47h = week 47) } SPD4_MANUFACTURING_DATE; typedef union { - UINT32 Data; - UINT16 SerialNumber16[2]; - UINT8 SerialNumber8[4]; + UINT32 Data; + UINT16 SerialNumber16[2]; + UINT8 SerialNumber8[4]; } SPD4_MANUFACTURER_SERIAL_NUMBER; typedef struct { - UINT8 Location; ///< Module Manufacturing Location + UINT8 Location; ///< Module Manufacturing Location } SPD4_MANUFACTURING_LOCATION; typedef struct { - SPD4_MANUFACTURER_ID_CODE IdCode; ///< Module Manufacturer ID Code - SPD4_MANUFACTURING_LOCATION Location; ///< Module Manufacturing Location - SPD4_MANUFACTURING_DATE Date; ///< Module Manufacturing Year, in BCD (range: 2000-2255) - SPD4_MANUFACTURER_SERIAL_NUMBER SerialNumber; ///< Module Serial Number + SPD4_MANUFACTURER_ID_CODE IdCode; ///< Module Manufacturer ID Code + SPD4_MANUFACTURING_LOCATION Location; ///< Module Manufacturing Location + SPD4_MANUFACTURING_DATE Date; ///< Module Manufacturing Year, in BCD (range: 2000-2255) + SPD4_MANUFACTURER_SERIAL_NUMBER SerialNumber; ///< Module Serial Number } SPD4_UNIQUE_MODULE_ID; typedef union { - UINT16 Crc[1]; - UINT8 Data8[2]; + UINT16 Crc[1]; + UINT8 Data8[2]; } SPD4_CYCLIC_REDUNDANCY_CODE; typedef struct { - SPD4_DEVICE_DESCRIPTION_STRUCT Description; ///< 0 Number of Serial PD Bytes Written / SPD Device Size / CRC Coverage 1, 2 - SPD4_REVISION_STRUCT Revision; ///< 1 SPD Revision - SPD4_DRAM_DEVICE_TYPE_STRUCT DramDeviceType; ///< 2 DRAM Device Type - SPD4_MODULE_TYPE_STRUCT ModuleType; ///< 3 Module Type - SPD4_SDRAM_DENSITY_BANKS_STRUCT SdramDensityAndBanks; ///< 4 SDRAM Density and Banks - SPD4_SDRAM_ADDRESSING_STRUCT SdramAddressing; ///< 5 SDRAM Addressing - SPD4_PRIMARY_SDRAM_PACKAGE_TYPE_STRUCT PrimarySdramPackageType; ///< 6 Primary SDRAM Package Type - SPD4_SDRAM_OPTIONAL_FEATURES_STRUCT SdramOptionalFeatures; ///< 7 SDRAM Optional Features - SPD4_SDRAM_THERMAL_REFRESH_STRUCT ThermalAndRefreshOptions; ///< 8 SDRAM Thermal and Refresh Options - SPD4_OTHER_SDRAM_OPTIONAL_FEATURES_STRUCT OtherOptionalFeatures; ///< 9 Other SDRAM Optional Features - SPD4_SECONDARY_SDRAM_PACKAGE_TYPE_STRUCT SecondarySdramPackageType;///< 10 Secondary SDRAM Package Type - SPD4_MODULE_NOMINAL_VOLTAGE_STRUCT ModuleNominalVoltage; ///< 11 Module Nominal Voltage, VDD - SPD4_MODULE_ORGANIZATION_STRUCT ModuleOrganization; ///< 12 Module Organization - SPD4_MODULE_MEMORY_BUS_WIDTH_STRUCT ModuleMemoryBusWidth; ///< 13 Module Memory Bus Width - SPD4_MODULE_THERMAL_SENSOR_STRUCT ModuleThermalSensor; ///< 14 Module Thermal Sensor - SPD4_EXTENDED_MODULE_TYPE_STRUCT ExtendedModuleType; ///< 15 Extended Module Type - UINT8 Reserved0; ///< 16 Reserved - SPD4_TIMEBASE_STRUCT Timebase; ///< 17 Timebases - SPD4_TCK_MIN_MTB_STRUCT tCKmin; ///< 18 SDRAM Minimum Cycle Time (tCKmin) - SPD4_TCK_MAX_MTB_STRUCT tCKmax; ///< 19 SDRAM Maximum Cycle Time (tCKmax) - SPD4_CAS_LATENCIES_SUPPORTED_STRUCT CasLatencies; ///< 20-23 CAS Latencies Supported - SPD4_TAA_MIN_MTB_STRUCT tAAmin; ///< 24 Minimum CAS Latency Time (tAAmin) - SPD4_TRCD_MIN_MTB_STRUCT tRCDmin; ///< 25 Minimum RAS# to CAS# Delay Time (tRCDmin) - SPD4_TRP_MIN_MTB_STRUCT tRPmin; ///< 26 Minimum Row Precharge Delay Time (tRPmin) - SPD4_TRAS_TRC_MIN_MTB_STRUCT tRASMintRCMinUpper; ///< 27 Upper Nibbles for tRAS and tRC - SPD4_TRAS_MIN_MTB_STRUCT tRASmin; ///< 28 Minimum Active to Precharge Delay Time (tRASmin), Least Significant Byte - SPD4_TRC_MIN_MTB_STRUCT tRCmin; ///< 29 Minimum Active to Active/Refresh Delay Time (tRCmin), Least Significant Byte - SPD4_TRFC_MIN_MTB_STRUCT tRFC1min; ///< 30-31 Minimum Refresh Recovery Delay Time (tRFC1min) - SPD4_TRFC_MIN_MTB_STRUCT tRFC2min; ///< 32-33 Minimum Refresh Recovery Delay Time (tRFC2min) - SPD4_TRFC_MIN_MTB_STRUCT tRFC4min; ///< 34-35 Minimum Refresh Recovery Delay Time (tRFC4min) - SPD4_TFAW_MIN_MTB_UPPER_STRUCT tFAWMinUpper; ///< 36 Upper Nibble for tFAW - SPD4_TFAW_MIN_MTB_STRUCT tFAWmin; ///< 37 Minimum Four Activate Window Delay Time (tFAWmin) - SPD4_TRRD_MIN_MTB_STRUCT tRRD_Smin; ///< 38 Minimum Activate to Activate Delay Time (tRRD_Smin), different bank group - SPD4_TRRD_MIN_MTB_STRUCT tRRD_Lmin; ///< 39 Minimum Activate to Activate Delay Time (tRRD_Lmin), same bank group - SPD4_TCCD_MIN_MTB_STRUCT tCCD_Lmin; ///< 40 Minimum CAS to CAS Delay Time (tCCD_Lmin), Same Bank Group - SPD4_TWR_UPPER_NIBBLE_STRUCT tWRUpperNibble; ///< 41 Upper Nibble for tWRmin - SPD4_TWR_MIN_MTB_STRUCT tWRmin; ///< 42 Minimum Write Recovery Time (tWRmin) - SPD4_TWTR_UPPER_NIBBLE_STRUCT tWTRUpperNibble; ///< 43 Upper Nibbles for tWTRmin - SPD4_TWTR_MIN_MTB_STRUCT tWTR_Smin; ///< 44 Minimum Write to Read Time (tWTR_Smin), Different Bank Group - SPD4_TWTR_MIN_MTB_STRUCT tWTR_Lmin; ///< 45 Minimum Write to Read Time (tWTR_Lmin), Same Bank Group - UINT8 Reserved1[59 - 46 + 1]; ///< 46-59 Reserved - SPD4_CONNECTOR_BIT_MAPPING_BYTE_STRUCT BitMapping[77 - 60 + 1]; ///< 60-77 Connector to SDRAM Bit Mapping - UINT8 Reserved2[116 - 78 + 1]; ///< 78-116 Reserved - SPD4_TCCD_MIN_FTB_STRUCT tCCD_LminFine; ///< 117 Fine Offset for Minimum CAS to CAS Delay Time (tCCD_Lmin), same bank group - SPD4_TRRD_MIN_FTB_STRUCT tRRD_LminFine; ///< 118 Fine Offset for Minimum Activate to Activate Delay Time (tRRD_Lmin), different bank group - SPD4_TRRD_MIN_FTB_STRUCT tRRD_SminFine; ///< 119 Fine Offset for Minimum Activate to Activate Delay Time (tRRD_Smin), same bank group - SPD4_TRC_MIN_FTB_STRUCT tRCminFine; ///< 120 Fine Offset for Minimum Active to Active/Refresh Delay Time (tRCmin) - SPD4_TRP_MIN_FTB_STRUCT tRPminFine; ///< 121 Fine Offset for Minimum Row Precharge Delay Time (tRPabmin) - SPD4_TRCD_MIN_FTB_STRUCT tRCDminFine; ///< 122 Fine Offset for Minimum RAS# to CAS# Delay Time (tRCDmin) - SPD4_TAA_MIN_FTB_STRUCT tAAminFine; ///< 123 Fine Offset for Minimum CAS Latency Time (tAAmin) - SPD4_TCK_MAX_FTB_STRUCT tCKmaxFine; ///< 124 Fine Offset for SDRAM Minimum Cycle Time (tCKmax) - SPD4_TCK_MIN_FTB_STRUCT tCKminFine; ///< 125 Fine Offset for SDRAM Maximum Cycle Time (tCKmin) - SPD4_CYCLIC_REDUNDANCY_CODE Crc; ///< 126-127 Cyclical Redundancy Code (CRC) + SPD4_DEVICE_DESCRIPTION_STRUCT Description; ///< 0 Number of Serial PD Bytes Written / SPD Device Size / CRC Coverage 1, 2 + SPD4_REVISION_STRUCT Revision; ///< 1 SPD Revision + SPD4_DRAM_DEVICE_TYPE_STRUCT DramDeviceType; ///< 2 DRAM Device Type + SPD4_MODULE_TYPE_STRUCT ModuleType; ///< 3 Module Type + SPD4_SDRAM_DENSITY_BANKS_STRUCT SdramDensityAndBanks; ///< 4 SDRAM Density and Banks + SPD4_SDRAM_ADDRESSING_STRUCT SdramAddressing; ///< 5 SDRAM Addressing + SPD4_PRIMARY_SDRAM_PACKAGE_TYPE_STRUCT PrimarySdramPackageType; ///< 6 Primary SDRAM Package Type + SPD4_SDRAM_OPTIONAL_FEATURES_STRUCT SdramOptionalFeatures; ///< 7 SDRAM Optional Features + SPD4_SDRAM_THERMAL_REFRESH_STRUCT ThermalAndRefreshOptions; ///< 8 SDRAM Thermal and Refresh Options + SPD4_OTHER_SDRAM_OPTIONAL_FEATURES_STRUCT OtherOptionalFeatures; ///< 9 Other SDRAM Optional Features + SPD4_SECONDARY_SDRAM_PACKAGE_TYPE_STRUCT SecondarySdramPackageType; ///< 10 Secondary SDRAM Package Type + SPD4_MODULE_NOMINAL_VOLTAGE_STRUCT ModuleNominalVoltage; ///< 11 Module Nominal Voltage, VDD + SPD4_MODULE_ORGANIZATION_STRUCT ModuleOrganization; ///< 12 Module Organization + SPD4_MODULE_MEMORY_BUS_WIDTH_STRUCT ModuleMemoryBusWidth; ///< 13 Module Memory Bus Width + SPD4_MODULE_THERMAL_SENSOR_STRUCT ModuleThermalSensor; ///< 14 Module Thermal Sensor + SPD4_EXTENDED_MODULE_TYPE_STRUCT ExtendedModuleType; ///< 15 Extended Module Type + UINT8 Reserved0; ///< 16 Reserved + SPD4_TIMEBASE_STRUCT Timebase; ///< 17 Timebases + SPD4_TCK_MIN_MTB_STRUCT tCKmin; ///< 18 SDRAM Minimum Cycle Time (tCKmin) + SPD4_TCK_MAX_MTB_STRUCT tCKmax; ///< 19 SDRAM Maximum Cycle Time (tCKmax) + SPD4_CAS_LATENCIES_SUPPORTED_STRUCT CasLatencies; ///< 20-23 CAS Latencies Supported + SPD4_TAA_MIN_MTB_STRUCT tAAmin; ///< 24 Minimum CAS Latency Time (tAAmin) + SPD4_TRCD_MIN_MTB_STRUCT tRCDmin; ///< 25 Minimum RAS# to CAS# Delay Time (tRCDmin) + SPD4_TRP_MIN_MTB_STRUCT tRPmin; ///< 26 Minimum Row Precharge Delay Time (tRPmin) + SPD4_TRAS_TRC_MIN_MTB_STRUCT tRASMintRCMinUpper; ///< 27 Upper Nibbles for tRAS and tRC + SPD4_TRAS_MIN_MTB_STRUCT tRASmin; ///< 28 Minimum Active to Precharge Delay Time (tRASmin), Least Significant Byte + SPD4_TRC_MIN_MTB_STRUCT tRCmin; ///< 29 Minimum Active to Active/Refresh Delay Time (tRCmin), Least Significant Byte + SPD4_TRFC_MIN_MTB_STRUCT tRFC1min; ///< 30-31 Minimum Refresh Recovery Delay Time (tRFC1min) + SPD4_TRFC_MIN_MTB_STRUCT tRFC2min; ///< 32-33 Minimum Refresh Recovery Delay Time (tRFC2min) + SPD4_TRFC_MIN_MTB_STRUCT tRFC4min; ///< 34-35 Minimum Refresh Recovery Delay Time (tRFC4min) + SPD4_TFAW_MIN_MTB_UPPER_STRUCT tFAWMinUpper; ///< 36 Upper Nibble for tFAW + SPD4_TFAW_MIN_MTB_STRUCT tFAWmin; ///< 37 Minimum Four Activate Window Delay Time (tFAWmin) + SPD4_TRRD_MIN_MTB_STRUCT tRRD_Smin; ///< 38 Minimum Activate to Activate Delay Time (tRRD_Smin), different bank group + SPD4_TRRD_MIN_MTB_STRUCT tRRD_Lmin; ///< 39 Minimum Activate to Activate Delay Time (tRRD_Lmin), same bank group + SPD4_TCCD_MIN_MTB_STRUCT tCCD_Lmin; ///< 40 Minimum CAS to CAS Delay Time (tCCD_Lmin), Same Bank Group + SPD4_TWR_UPPER_NIBBLE_STRUCT tWRUpperNibble; ///< 41 Upper Nibble for tWRmin + SPD4_TWR_MIN_MTB_STRUCT tWRmin; ///< 42 Minimum Write Recovery Time (tWRmin) + SPD4_TWTR_UPPER_NIBBLE_STRUCT tWTRUpperNibble; ///< 43 Upper Nibbles for tWTRmin + SPD4_TWTR_MIN_MTB_STRUCT tWTR_Smin; ///< 44 Minimum Write to Read Time (tWTR_Smin), Different Bank Group + SPD4_TWTR_MIN_MTB_STRUCT tWTR_Lmin; ///< 45 Minimum Write to Read Time (tWTR_Lmin), Same Bank Group + UINT8 Reserved1[59 - 46 + 1]; ///< 46-59 Reserved + SPD4_CONNECTOR_BIT_MAPPING_BYTE_STRUCT BitMapping[77 - 60 + 1]; ///< 60-77 Connector to SDRAM Bit Mapping + UINT8 Reserved2[116 - 78 + 1]; ///< 78-116 Reserved + SPD4_TCCD_MIN_FTB_STRUCT tCCD_LminFine; ///< 117 Fine Offset for Minimum CAS to CAS Delay Time (tCCD_Lmin), same bank group + SPD4_TRRD_MIN_FTB_STRUCT tRRD_LminFine; ///< 118 Fine Offset for Minimum Activate to Activate Delay Time (tRRD_Lmin), different bank group + SPD4_TRRD_MIN_FTB_STRUCT tRRD_SminFine; ///< 119 Fine Offset for Minimum Activate to Activate Delay Time (tRRD_Smin), same bank group + SPD4_TRC_MIN_FTB_STRUCT tRCminFine; ///< 120 Fine Offset for Minimum Active to Active/Refresh Delay Time (tRCmin) + SPD4_TRP_MIN_FTB_STRUCT tRPminFine; ///< 121 Fine Offset for Minimum Row Precharge Delay Time (tRPabmin) + SPD4_TRCD_MIN_FTB_STRUCT tRCDminFine; ///< 122 Fine Offset for Minimum RAS# to CAS# Delay Time (tRCDmin) + SPD4_TAA_MIN_FTB_STRUCT tAAminFine; ///< 123 Fine Offset for Minimum CAS Latency Time (tAAmin) + SPD4_TCK_MAX_FTB_STRUCT tCKmaxFine; ///< 124 Fine Offset for SDRAM Minimum Cycle Time (tCKmax) + SPD4_TCK_MIN_FTB_STRUCT tCKminFine; ///< 125 Fine Offset for SDRAM Maximum Cycle Time (tCKmin) + SPD4_CYCLIC_REDUNDANCY_CODE Crc; ///< 126-127 Cyclical Redundancy Code (CRC) } SPD4_BASE_SECTION; typedef struct { - SPD4_UNBUF_MODULE_NOMINAL_HEIGHT ModuleNominalHeight; ///< 128 Module Nominal Height - SPD4_UNBUF_MODULE_NOMINAL_THICKNESS ModuleMaximumThickness; ///< 129 Module Maximum Thickness - SPD4_UNBUF_REFERENCE_RAW_CARD ReferenceRawCardUsed; ///< 130 Reference Raw Card Used - SPD4_UNBUF_ADDRESS_MAPPING AddressMappingEdgeConn; ///< 131 Address Mapping from Edge Connector to DRAM - UINT8 Reserved[253 - 132 + 1]; ///< 132-253 Reserved - SPD4_CYCLIC_REDUNDANCY_CODE Crc; ///< 254-255 Cyclical Redundancy Code (CRC) + SPD4_UNBUF_MODULE_NOMINAL_HEIGHT ModuleNominalHeight; ///< 128 Module Nominal Height + SPD4_UNBUF_MODULE_NOMINAL_THICKNESS ModuleMaximumThickness; ///< 129 Module Maximum Thickness + SPD4_UNBUF_REFERENCE_RAW_CARD ReferenceRawCardUsed; ///< 130 Reference Raw Card Used + SPD4_UNBUF_ADDRESS_MAPPING AddressMappingEdgeConn; ///< 131 Address Mapping from Edge Connector to DRAM + UINT8 Reserved[253 - 132 + 1]; ///< 132-253 Reserved + SPD4_CYCLIC_REDUNDANCY_CODE Crc; ///< 254-255 Cyclical Redundancy Code (CRC) } SPD4_MODULE_UNBUFFERED; typedef struct { - SPD4_RDIMM_MODULE_NOMINAL_HEIGHT ModuleNominalHeight; ///< 128 Module Nominal Height - SPD4_RDIMM_MODULE_NOMINAL_THICKNESS ModuleMaximumThickness; ///< 129 Module Maximum Thickness - SPD4_RDIMM_REFERENCE_RAW_CARD ReferenceRawCardUsed; ///< 130 Reference Raw Card Used - SPD4_RDIMM_MODULE_ATTRIBUTES DimmModuleAttributes; ///< 131 DIMM Module Attributes - SPD4_RDIMM_THERMAL_HEAT_SPREADER_SOLUTION DimmThermalHeatSpreaderSolution; ///< 132 RDIMM Thermal Heat Spreader Solution - SPD4_MANUFACTURER_ID_CODE RegisterManufacturerIdCode; ///< 133-134 Register Manufacturer ID Code - SPD4_RDIMM_REGISTER_REVISION_NUMBER RegisterRevisionNumber; ///< 135 Register Revision Number - SPD4_RDIMM_ADDRESS_MAPPING_FROM_REGISTER_TO_DRAM AddressMappingFromRegisterToDRAM; ///< 136 Address Mapping from Register to DRAM - SPD4_RDIMM_REGISTER_OUTPUT_DRIVE_STRENGTH_FOR_CONTROL_COMMAND_ADDRESS RegisterOutputDriveStrengthForControlCommandAddress; ///< 137 Register Output Drive Strength for Control and Command Address - SPD4_RDIMM_REGISTER_OUTPUT_DRIVE_STRENGTH_FOR_CLOCK RegisterOutputDriveStrengthForClock; ///< 138 Register Output Drive Strength for Clock - UINT8 Reserved[253 - 139 + 1]; ///< 253-139 Reserved - SPD4_CYCLIC_REDUNDANCY_CODE Crc; ///< 254-255 Cyclical Redundancy Code (CRC) + SPD4_RDIMM_MODULE_NOMINAL_HEIGHT ModuleNominalHeight; ///< 128 Module Nominal Height + SPD4_RDIMM_MODULE_NOMINAL_THICKNESS ModuleMaximumThickness; ///< 129 Module Maximum Thickness + SPD4_RDIMM_REFERENCE_RAW_CARD ReferenceRawCardUsed; ///< 130 Reference Raw Card Used + SPD4_RDIMM_MODULE_ATTRIBUTES DimmModuleAttributes; ///< 131 DIMM Module Attributes + SPD4_RDIMM_THERMAL_HEAT_SPREADER_SOLUTION DimmThermalHeatSpreaderSolution; ///< 132 RDIMM Thermal Heat Spreader Solution + SPD4_MANUFACTURER_ID_CODE RegisterManufacturerIdCode; ///< 133-134 Register Manufacturer ID Code + SPD4_RDIMM_REGISTER_REVISION_NUMBER RegisterRevisionNumber; ///< 135 Register Revision Number + SPD4_RDIMM_ADDRESS_MAPPING_FROM_REGISTER_TO_DRAM AddressMappingFromRegisterToDRAM; ///< 136 Address Mapping from Register to DRAM + SPD4_RDIMM_REGISTER_OUTPUT_DRIVE_STRENGTH_FOR_CONTROL_COMMAND_ADDRESS RegisterOutputDriveStrengthForControlCommandAddress; ///< 137 Register Output Drive Strength for Control and Command Address + SPD4_RDIMM_REGISTER_OUTPUT_DRIVE_STRENGTH_FOR_CLOCK RegisterOutputDriveStrengthForClock; ///< 138 Register Output Drive Strength for Clock + UINT8 Reserved[253 - 139 + 1]; ///< 253-139 Reserved + SPD4_CYCLIC_REDUNDANCY_CODE Crc; ///< 254-255 Cyclical Redundancy Code (CRC) } SPD4_MODULE_REGISTERED; typedef struct { - SPD4_LRDIMM_MODULE_NOMINAL_HEIGHT ModuleNominalHeight; ///< 128 Module Nominal Height - SPD4_LRDIMM_MODULE_NOMINAL_THICKNESS ModuleMaximumThickness; ///< 129 Module Maximum Thickness - SPD4_LRDIMM_REFERENCE_RAW_CARD ReferenceRawCardUsed; ///< 130 Reference Raw Card Used - SPD4_LRDIMM_MODULE_ATTRIBUTES DimmModuleAttributes; ///< 131 DIMM Module Attributes - SPD4_LRDIMM_THERMAL_HEAT_SPREADER_SOLUTION ThermalHeatSpreaderSolution; ///< 132 RDIMM Thermal Heat Spreader Solution - SPD4_MANUFACTURER_ID_CODE RegisterManufacturerIdCode; ///< 133-134 Register Manufacturer ID Code - SPD4_LRDIMM_REGISTER_REVISION_NUMBER RegisterRevisionNumber; ///< 135 Register Revision Number - SPD4_LRDIMM_ADDRESS_MAPPING_FROM_REGISTER_TO_DRAM AddressMappingFromRegisterToDram; ///< 136 Address Mapping from Register to DRAM - SPD4_LRDIMM_REGISTER_OUTPUT_DRIVE_STRENGTH_FOR_CONTROL_COMMAND_ADDRESS RegisterOutputDriveStrengthForControlCommandAddress; ///< 137 Register Output Drive Strength for Control and Command Address - SPD4_LRDIMM_REGISTER_OUTPUT_DRIVE_STRENGTH_FOR_CLOCK RegisterOutputDriveStrengthForClock; ///< 138 Register Output Drive Strength for Clock - SPD4_LRDIMM_DATA_BUFFER_REVISION_NUMBER DataBufferRevisionNumber; ///< 139 Data Buffer Revision Number - SPD4_LRDIMM_DRAM_VREFDQ_FOR_PACKAGE_RANK DramVrefDQForPackageRank0; ///< 140 DRAM VrefDQ for Package Rank 0 - SPD4_LRDIMM_DRAM_VREFDQ_FOR_PACKAGE_RANK DramVrefDQForPackageRank1; ///< 141 DRAM VrefDQ for Package Rank 1 - SPD4_LRDIMM_DRAM_VREFDQ_FOR_PACKAGE_RANK DramVrefDQForPackageRank2; ///< 142 DRAM VrefDQ for Package Rank 2 - SPD4_LRDIMM_DRAM_VREFDQ_FOR_PACKAGE_RANK DramVrefDQForPackageRank3; ///< 143 DRAM VrefDQ for Package Rank 3 - SPD4_LRDIMM_DATA_BUFFER_VREFDQ_FOR_DRAM_INTERFACE DataBufferVrefDQForDramInterface; ///< 144 Data Buffer VrefDQ for DRAM Interface - SPD4_LRDIMM_DATA_BUFFER_MDQ_DRIVE_STRENGTH_RTT_FOR_DATA_RATE DataBufferMdqDriveStrengthRttForDataRateLe1866; ///< 145 Data Buffer MDQ Drive Strength and RTT for data rate <= 1866 - SPD4_LRDIMM_DATA_BUFFER_MDQ_DRIVE_STRENGTH_RTT_FOR_DATA_RATE DataBufferMdqDriveStrengthRttForDataRateLe2400; ///< 146 Data Buffer MDQ Drive Strength and RTT for data rate <=2400 - SPD4_LRDIMM_DATA_BUFFER_MDQ_DRIVE_STRENGTH_RTT_FOR_DATA_RATE DataBufferMdqDriveStrengthRttForDataRateLe3200; ///< 147 Data Buffer MDQ Drive Strength and RTT for data rate <=3200 - SPD4_LRDIMM_DRAM_DRIVE_STRENGTH DramDriveStrength; ///< 148 DRAM Drive Strength - SPD4_LRDIMM_DRAM_ODT_RTT_WR_RTT_NOM_FOR_DATA_RATE DramOdtRttWrRttNomForDataRateLe1866; ///< 149 DRAM ODT (RTT_WR and RTT_NOM) for data rate <= 1866 - SPD4_LRDIMM_DRAM_ODT_RTT_WR_RTT_NOM_FOR_DATA_RATE DramOdtRttWrRttNomForDataRateLe2400; ///< 150 DRAM ODT (RTT_WR and RTT_NOM) for data rate <= 2400 - SPD4_LRDIMM_DRAM_ODT_RTT_WR_RTT_NOM_FOR_DATA_RATE DramOdtRttWrRttNomForDataRateLe3200; ///< 151 DRAM ODT (RTT_WR and RTT_NOM) for data rate <= 3200 - SPD4_LRDIMM_DRAM_ODT_RTT_PARK_FOR_DATA_RATE DramOdtRttParkForDataRateLe1866; ///< 152 DRAM ODT (RTT_PARK) for data rate <= 1866 - SPD4_LRDIMM_DRAM_ODT_RTT_PARK_FOR_DATA_RATE DramOdtRttParkForDataRateLe2400; ///< 153 DRAM ODT (RTT_PARK) for data rate <= 2400 - SPD4_LRDIMM_DRAM_ODT_RTT_PARK_FOR_DATA_RATE DramOdtRttParkForDataRateLe3200; ///< 154 DRAM ODT (RTT_PARK) for data rate <= 3200 - SPD4_LRDIMM_DATA_BUFFER_VREFDQ_FOR_DRAM_INTERFACE_RANGE DataBufferVrefDQForDramInterfaceRange; ///< 155 Data Buffer VrefDQ for DRAM Interface Range - SPD4_LRDIMM_DATA_BUFFER_DQ_DECISION_FEEDBACK_EQUALIZATION DataBufferDqDecisionFeedbackEqualization; ///< 156 Data Buffer DQ Decision Feedback Equalization - UINT8 Reserved[253 - 157 + 1]; ///< 253-132 Reserved - SPD4_CYCLIC_REDUNDANCY_CODE Crc; ///< 254-255 Cyclical Redundancy Code (CRC) + SPD4_LRDIMM_MODULE_NOMINAL_HEIGHT ModuleNominalHeight; ///< 128 Module Nominal Height + SPD4_LRDIMM_MODULE_NOMINAL_THICKNESS ModuleMaximumThickness; ///< 129 Module Maximum Thickness + SPD4_LRDIMM_REFERENCE_RAW_CARD ReferenceRawCardUsed; ///< 130 Reference Raw Card Used + SPD4_LRDIMM_MODULE_ATTRIBUTES DimmModuleAttributes; ///< 131 DIMM Module Attributes + SPD4_LRDIMM_THERMAL_HEAT_SPREADER_SOLUTION ThermalHeatSpreaderSolution; ///< 132 RDIMM Thermal Heat Spreader Solution + SPD4_MANUFACTURER_ID_CODE RegisterManufacturerIdCode; ///< 133-134 Register Manufacturer ID Code + SPD4_LRDIMM_REGISTER_REVISION_NUMBER RegisterRevisionNumber; ///< 135 Register Revision Number + SPD4_LRDIMM_ADDRESS_MAPPING_FROM_REGISTER_TO_DRAM AddressMappingFromRegisterToDram; ///< 136 Address Mapping from Register to DRAM + SPD4_LRDIMM_REGISTER_OUTPUT_DRIVE_STRENGTH_FOR_CONTROL_COMMAND_ADDRESS RegisterOutputDriveStrengthForControlCommandAddress; ///< 137 Register Output Drive Strength for Control and Command Address + SPD4_LRDIMM_REGISTER_OUTPUT_DRIVE_STRENGTH_FOR_CLOCK RegisterOutputDriveStrengthForClock; ///< 138 Register Output Drive Strength for Clock + SPD4_LRDIMM_DATA_BUFFER_REVISION_NUMBER DataBufferRevisionNumber; ///< 139 Data Buffer Revision Number + SPD4_LRDIMM_DRAM_VREFDQ_FOR_PACKAGE_RANK DramVrefDQForPackageRank0; ///< 140 DRAM VrefDQ for Package Rank 0 + SPD4_LRDIMM_DRAM_VREFDQ_FOR_PACKAGE_RANK DramVrefDQForPackageRank1; ///< 141 DRAM VrefDQ for Package Rank 1 + SPD4_LRDIMM_DRAM_VREFDQ_FOR_PACKAGE_RANK DramVrefDQForPackageRank2; ///< 142 DRAM VrefDQ for Package Rank 2 + SPD4_LRDIMM_DRAM_VREFDQ_FOR_PACKAGE_RANK DramVrefDQForPackageRank3; ///< 143 DRAM VrefDQ for Package Rank 3 + SPD4_LRDIMM_DATA_BUFFER_VREFDQ_FOR_DRAM_INTERFACE DataBufferVrefDQForDramInterface; ///< 144 Data Buffer VrefDQ for DRAM Interface + SPD4_LRDIMM_DATA_BUFFER_MDQ_DRIVE_STRENGTH_RTT_FOR_DATA_RATE DataBufferMdqDriveStrengthRttForDataRateLe1866; ///< 145 Data Buffer MDQ Drive Strength and RTT for data rate <= 1866 + SPD4_LRDIMM_DATA_BUFFER_MDQ_DRIVE_STRENGTH_RTT_FOR_DATA_RATE DataBufferMdqDriveStrengthRttForDataRateLe2400; ///< 146 Data Buffer MDQ Drive Strength and RTT for data rate <=2400 + SPD4_LRDIMM_DATA_BUFFER_MDQ_DRIVE_STRENGTH_RTT_FOR_DATA_RATE DataBufferMdqDriveStrengthRttForDataRateLe3200; ///< 147 Data Buffer MDQ Drive Strength and RTT for data rate <=3200 + SPD4_LRDIMM_DRAM_DRIVE_STRENGTH DramDriveStrength; ///< 148 DRAM Drive Strength + SPD4_LRDIMM_DRAM_ODT_RTT_WR_RTT_NOM_FOR_DATA_RATE DramOdtRttWrRttNomForDataRateLe1866; ///< 149 DRAM ODT (RTT_WR and RTT_NOM) for data rate <= 1866 + SPD4_LRDIMM_DRAM_ODT_RTT_WR_RTT_NOM_FOR_DATA_RATE DramOdtRttWrRttNomForDataRateLe2400; ///< 150 DRAM ODT (RTT_WR and RTT_NOM) for data rate <= 2400 + SPD4_LRDIMM_DRAM_ODT_RTT_WR_RTT_NOM_FOR_DATA_RATE DramOdtRttWrRttNomForDataRateLe3200; ///< 151 DRAM ODT (RTT_WR and RTT_NOM) for data rate <= 3200 + SPD4_LRDIMM_DRAM_ODT_RTT_PARK_FOR_DATA_RATE DramOdtRttParkForDataRateLe1866; ///< 152 DRAM ODT (RTT_PARK) for data rate <= 1866 + SPD4_LRDIMM_DRAM_ODT_RTT_PARK_FOR_DATA_RATE DramOdtRttParkForDataRateLe2400; ///< 153 DRAM ODT (RTT_PARK) for data rate <= 2400 + SPD4_LRDIMM_DRAM_ODT_RTT_PARK_FOR_DATA_RATE DramOdtRttParkForDataRateLe3200; ///< 154 DRAM ODT (RTT_PARK) for data rate <= 3200 + SPD4_LRDIMM_DATA_BUFFER_VREFDQ_FOR_DRAM_INTERFACE_RANGE DataBufferVrefDQForDramInterfaceRange; ///< 155 Data Buffer VrefDQ for DRAM Interface Range + SPD4_LRDIMM_DATA_BUFFER_DQ_DECISION_FEEDBACK_EQUALIZATION DataBufferDqDecisionFeedbackEqualization; ///< 156 Data Buffer DQ Decision Feedback Equalization + UINT8 Reserved[253 - 157 + 1]; ///< 253-132 Reserved + SPD4_CYCLIC_REDUNDANCY_CODE Crc; ///< 254-255 Cyclical Redundancy Code (CRC) } SPD4_MODULE_LOADREDUCED; typedef struct { - UINT8 Reserved0[191 - 128 + 1]; ///< 128-191 Reserved - SPD4_NVDIMM_MODULE_PRODUCT_IDENTIFIER ModuleProductIdentifier; ///< 192-193 Module Product Identifier - SPD4_NVDIMM_SUBSYSTEM_CONTROLLER_MANUFACTURER_ID_CODE SubsystemControllerManufacturerIdCode; ///< 194-195 Subsystem Controller Manufacturer's ID Code - SPD4_NVDIMM_SUBSYSTEM_CONTROLLER_IDENTIFIER SubsystemControllerIdentifier; ///< 196-197 Subsystem Controller Identifier - SPD4_NVDIMM_SUBSYSTEM_CONTROLLER_REVISION_CODE SubsystemControllerRevisionCode; ///< 198 Subsystem Controller Revision Code - SPD4_NVDIMM_REFERENCE_RAW_CARD ReferenceRawCardUsed; ///< 199 Reference Raw Card Used - SPD4_NVDIMM_MODULE_CHARACTERISTICS ModuleCharacteristics; ///< 200 Module Characteristics - SPD4_NVDIMM_HYBRID_MODULE_MEDIA_TYPES HybridModuleMediaTypes; ///< 201-202 Hybrid Module Media Types - SPD4_NVDIMM_MAXIMUM_NONVOLATILE_MEMORY_INITIALIZATION_TIME MaximumNonVolatileMemoryInitializationTime; ///< 203 Maximum Non-Volatile Memory Initialization Time - SPD4_NVDIMM_FUNCTION_INTERFACE_DESCRIPTOR FunctionInterfaceDescriptors[8]; ///< 204-219 Function Interface Descriptors - UINT8 Reserved[253 - 220 + 1]; ///< 220-253 Reserved - SPD4_CYCLIC_REDUNDANCY_CODE Crc; ///< 254-255 Cyclical Redundancy Code (CRC) + UINT8 Reserved0[191 - 128 + 1]; ///< 128-191 Reserved + SPD4_NVDIMM_MODULE_PRODUCT_IDENTIFIER ModuleProductIdentifier; ///< 192-193 Module Product Identifier + SPD4_NVDIMM_SUBSYSTEM_CONTROLLER_MANUFACTURER_ID_CODE SubsystemControllerManufacturerIdCode; ///< 194-195 Subsystem Controller Manufacturer's ID Code + SPD4_NVDIMM_SUBSYSTEM_CONTROLLER_IDENTIFIER SubsystemControllerIdentifier; ///< 196-197 Subsystem Controller Identifier + SPD4_NVDIMM_SUBSYSTEM_CONTROLLER_REVISION_CODE SubsystemControllerRevisionCode; ///< 198 Subsystem Controller Revision Code + SPD4_NVDIMM_REFERENCE_RAW_CARD ReferenceRawCardUsed; ///< 199 Reference Raw Card Used + SPD4_NVDIMM_MODULE_CHARACTERISTICS ModuleCharacteristics; ///< 200 Module Characteristics + SPD4_NVDIMM_HYBRID_MODULE_MEDIA_TYPES HybridModuleMediaTypes; ///< 201-202 Hybrid Module Media Types + SPD4_NVDIMM_MAXIMUM_NONVOLATILE_MEMORY_INITIALIZATION_TIME MaximumNonVolatileMemoryInitializationTime; ///< 203 Maximum Non-Volatile Memory Initialization Time + SPD4_NVDIMM_FUNCTION_INTERFACE_DESCRIPTOR FunctionInterfaceDescriptors[8]; ///< 204-219 Function Interface Descriptors + UINT8 Reserved[253 - 220 + 1]; ///< 220-253 Reserved + SPD4_CYCLIC_REDUNDANCY_CODE Crc; ///< 254-255 Cyclical Redundancy Code (CRC) } SPD4_MODULE_NVDIMM; typedef union { - SPD4_MODULE_UNBUFFERED Unbuffered; ///< 128-255 Unbuffered Memory Module Types - SPD4_MODULE_REGISTERED Registered; ///< 128-255 Registered Memory Module Types - SPD4_MODULE_LOADREDUCED LoadReduced; ///< 128-255 Load Reduced Memory Module Types - SPD4_MODULE_NVDIMM NonVolatile; ///< 128-255 Non-Volatile (NVDIMM-N) Hybrid Memory Parameters + SPD4_MODULE_UNBUFFERED Unbuffered; ///< 128-255 Unbuffered Memory Module Types + SPD4_MODULE_REGISTERED Registered; ///< 128-255 Registered Memory Module Types + SPD4_MODULE_LOADREDUCED LoadReduced; ///< 128-255 Load Reduced Memory Module Types + SPD4_MODULE_NVDIMM NonVolatile; ///< 128-255 Non-Volatile (NVDIMM-N) Hybrid Memory Parameters } SPD4_MODULE_SPECIFIC; typedef struct { - UINT8 ModulePartNumber[348 - 329 + 1]; ///< 329-348 Module Part Number + UINT8 ModulePartNumber[348 - 329 + 1]; ///< 329-348 Module Part Number } SPD4_MODULE_PART_NUMBER; typedef struct { - UINT8 ManufacturerSpecificData[381 - 353 + 1]; ///< 353-381 Manufacturer's Specific Data + UINT8 ManufacturerSpecificData[381 - 353 + 1]; ///< 353-381 Manufacturer's Specific Data } SPD4_MANUFACTURER_SPECIFIC; -typedef UINT8 SPD4_MODULE_REVISION_CODE;///< 349 Module Revision Code -typedef UINT8 SPD4_DRAM_STEPPING; ///< 352 Dram Stepping +typedef UINT8 SPD4_MODULE_REVISION_CODE; ///< 349 Module Revision Code +typedef UINT8 SPD4_DRAM_STEPPING; ///< 352 Dram Stepping typedef struct { - SPD4_UNIQUE_MODULE_ID ModuleId; ///< 320-328 Unique Module ID - SPD4_MODULE_PART_NUMBER ModulePartNumber; ///< 329-348 Module Part Number - SPD4_MODULE_REVISION_CODE ModuleRevisionCode; ///< 349 Module Revision Code - SPD4_MANUFACTURER_ID_CODE DramIdCode; ///< 350-351 Dram Manufacturer ID Code - SPD4_DRAM_STEPPING DramStepping; ///< 352 Dram Stepping - SPD4_MANUFACTURER_SPECIFIC ManufacturerSpecificData; ///< 353-381 Manufacturer's Specific Data - UINT8 Reserved[2]; ///< 382-383 Reserved + SPD4_UNIQUE_MODULE_ID ModuleId; ///< 320-328 Unique Module ID + SPD4_MODULE_PART_NUMBER ModulePartNumber; ///< 329-348 Module Part Number + SPD4_MODULE_REVISION_CODE ModuleRevisionCode; ///< 349 Module Revision Code + SPD4_MANUFACTURER_ID_CODE DramIdCode; ///< 350-351 Dram Manufacturer ID Code + SPD4_DRAM_STEPPING DramStepping; ///< 352 Dram Stepping + SPD4_MANUFACTURER_SPECIFIC ManufacturerSpecificData; ///< 353-381 Manufacturer's Specific Data + UINT8 Reserved[2]; ///< 382-383 Reserved } SPD4_MANUFACTURING_DATA; typedef struct { - UINT8 Reserved[511 - 384 + 1]; ///< 384-511 Unbuffered Memory Module Types + UINT8 Reserved[511 - 384 + 1]; ///< 384-511 Unbuffered Memory Module Types } SPD4_END_USER_SECTION; /// /// DDR4 Serial Presence Detect structure /// typedef struct { - SPD4_BASE_SECTION Base; ///< 0-127 Base Configuration and DRAM Parameters - SPD4_MODULE_SPECIFIC Module; ///< 128-255 Module-Specific Section - UINT8 Reserved[319 - 256 + 1]; ///< 256-319 Reserved - SPD4_MANUFACTURING_DATA ManufactureInfo; ///< 320-383 Manufacturing Information - SPD4_END_USER_SECTION EndUser; ///< 384-511 End User Programmable + SPD4_BASE_SECTION Base; ///< 0-127 Base Configuration and DRAM Parameters + SPD4_MODULE_SPECIFIC Module; ///< 128-255 Module-Specific Section + UINT8 Reserved[319 - 256 + 1]; ///< 256-319 Reserved + SPD4_MANUFACTURING_DATA ManufactureInfo; ///< 320-383 Manufacturing Information + SPD4_END_USER_SECTION EndUser; ///< 384-511 End User Programmable } SPD_DDR4; #pragma pack (pop) diff --git a/MdePkg/Include/IndustryStandard/SdramSpdLpDdr.h b/MdePkg/Include/IndustryStandard/SdramSpdLpDdr.h index 5dec5a8..2804924 100644 --- a/MdePkg/Include/IndustryStandard/SdramSpdLpDdr.h +++ b/MdePkg/Include/IndustryStandard/SdramSpdLpDdr.h @@ -16,452 +16,452 @@ typedef union { struct { - UINT8 BytesUsed : 4; ///< Bits 3:0 - UINT8 BytesTotal : 3; ///< Bits 6:4 - UINT8 CrcCoverage : 1; ///< Bits 7:7 + UINT8 BytesUsed : 4; ///< Bits 3:0 + UINT8 BytesTotal : 3; ///< Bits 6:4 + UINT8 CrcCoverage : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_DEVICE_DESCRIPTION_STRUCT; typedef union { struct { - UINT8 Minor : 4; ///< Bits 3:0 - UINT8 Major : 4; ///< Bits 7:4 + UINT8 Minor : 4; ///< Bits 3:0 + UINT8 Major : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_REVISION_STRUCT; typedef union { struct { - UINT8 Type : 8; ///< Bits 7:0 + UINT8 Type : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_DRAM_DEVICE_TYPE_STRUCT; typedef union { struct { - UINT8 ModuleType : 4; ///< Bits 3:0 - UINT8 HybridMedia : 3; ///< Bits 6:4 - UINT8 Hybrid : 1; ///< Bits 7:7 + UINT8 ModuleType : 4; ///< Bits 3:0 + UINT8 HybridMedia : 3; ///< Bits 6:4 + UINT8 Hybrid : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_MODULE_TYPE_STRUCT; typedef union { struct { - UINT8 Density : 4; ///< Bits 3:0 - UINT8 BankAddress : 2; ///< Bits 5:4 - UINT8 BankGroup : 2; ///< Bits 7:6 + UINT8 Density : 4; ///< Bits 3:0 + UINT8 BankAddress : 2; ///< Bits 5:4 + UINT8 BankGroup : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_SDRAM_DENSITY_BANKS_STRUCT; typedef union { struct { - UINT8 ColumnAddress : 3; ///< Bits 2:0 - UINT8 RowAddress : 3; ///< Bits 5:3 - UINT8 Reserved : 2; ///< Bits 7:6 + UINT8 ColumnAddress : 3; ///< Bits 2:0 + UINT8 RowAddress : 3; ///< Bits 5:3 + UINT8 Reserved : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_SDRAM_ADDRESSING_STRUCT; typedef union { struct { - UINT8 SignalLoading : 2; ///< Bits 1:0 - UINT8 ChannelsPerDie : 2; ///< Bits 3:2 - UINT8 DieCount : 3; ///< Bits 6:4 - UINT8 SdramPackageType : 1; ///< Bits 7:7 + UINT8 SignalLoading : 2; ///< Bits 1:0 + UINT8 ChannelsPerDie : 2; ///< Bits 3:2 + UINT8 DieCount : 3; ///< Bits 6:4 + UINT8 SdramPackageType : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_SDRAM_PACKAGE_TYPE_STRUCT; typedef union { struct { - UINT8 MaximumActivateCount : 4; ///< Bits 3:0 - UINT8 MaximumActivateWindow : 2; ///< Bits 5:4 - UINT8 Reserved : 2; ///< Bits 7:6 + UINT8 MaximumActivateCount : 4; ///< Bits 3:0 + UINT8 MaximumActivateWindow : 2; ///< Bits 5:4 + UINT8 Reserved : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_SDRAM_OPTIONAL_FEATURES_STRUCT; typedef union { struct { - UINT8 Reserved : 8; ///< Bits 7:0 + UINT8 Reserved : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_SDRAM_THERMAL_REFRESH_STRUCT; typedef union { struct { - UINT8 Reserved : 5; ///< Bits 4:0 - UINT8 SoftPPR : 1; ///< Bits 5:5 - UINT8 PostPackageRepair : 2; ///< Bits 7:6 + UINT8 Reserved : 5; ///< Bits 4:0 + UINT8 SoftPPR : 1; ///< Bits 5:5 + UINT8 PostPackageRepair : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_OTHER_SDRAM_OPTIONAL_FEATURES_STRUCT; typedef union { struct { - UINT8 OperationAt1_20 : 1; ///< Bits 0:0 - UINT8 EndurantAt1_20 : 1; ///< Bits 1:1 - UINT8 OperationAt1_10 : 1; ///< Bits 2:2 - UINT8 EndurantAt1_10 : 1; ///< Bits 3:3 - UINT8 OperationAtTBD2V : 1; ///< Bits 4:4 - UINT8 EndurantAtTBD2V : 1; ///< Bits 5:5 - UINT8 Reserved : 2; ///< Bits 7:6 + UINT8 OperationAt1_20 : 1; ///< Bits 0:0 + UINT8 EndurantAt1_20 : 1; ///< Bits 1:1 + UINT8 OperationAt1_10 : 1; ///< Bits 2:2 + UINT8 EndurantAt1_10 : 1; ///< Bits 3:3 + UINT8 OperationAtTBD2V : 1; ///< Bits 4:4 + UINT8 EndurantAtTBD2V : 1; ///< Bits 5:5 + UINT8 Reserved : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_MODULE_NOMINAL_VOLTAGE_STRUCT; typedef union { struct { - UINT8 SdramDeviceWidth : 3; ///< Bits 2:0 - UINT8 RankCount : 3; ///< Bits 5:3 - UINT8 Reserved : 2; ///< Bits 7:6 + UINT8 SdramDeviceWidth : 3; ///< Bits 2:0 + UINT8 RankCount : 3; ///< Bits 5:3 + UINT8 Reserved : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_MODULE_ORGANIZATION_STRUCT; typedef union { struct { - UINT8 PrimaryBusWidth : 3; ///< Bits 2:0 - UINT8 BusWidthExtension : 2; ///< Bits 4:3 - UINT8 NumberofChannels : 3; ///< Bits 7:5 + UINT8 PrimaryBusWidth : 3; ///< Bits 2:0 + UINT8 BusWidthExtension : 2; ///< Bits 4:3 + UINT8 NumberofChannels : 3; ///< Bits 7:5 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_MODULE_MEMORY_BUS_WIDTH_STRUCT; typedef union { struct { - UINT8 Reserved : 7; ///< Bits 6:0 - UINT8 ThermalSensorPresence : 1; ///< Bits 7:7 + UINT8 Reserved : 7; ///< Bits 6:0 + UINT8 ThermalSensorPresence : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_MODULE_THERMAL_SENSOR_STRUCT; typedef union { struct { - UINT8 ExtendedBaseModuleType : 4; ///< Bits 3:0 - UINT8 Reserved : 4; ///< Bits 7:4 + UINT8 ExtendedBaseModuleType : 4; ///< Bits 3:0 + UINT8 Reserved : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_EXTENDED_MODULE_TYPE_STRUCT; typedef union { struct { - UINT8 ChipSelectLoading : 3; ///< Bits 2:0 - UINT8 CommandAddressControlClockLoading : 3; ///< Bits 5:3 - UINT8 DataStrobeMaskLoading : 2; ///< Bits 7:6 + UINT8 ChipSelectLoading : 3; ///< Bits 2:0 + UINT8 CommandAddressControlClockLoading : 3; ///< Bits 5:3 + UINT8 DataStrobeMaskLoading : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_SIGNAL_LOADING_STRUCT; typedef union { struct { - UINT8 Fine : 2; ///< Bits 1:0 - UINT8 Medium : 2; ///< Bits 3:2 - UINT8 Reserved : 4; ///< Bits 7:4 + UINT8 Fine : 2; ///< Bits 1:0 + UINT8 Medium : 2; ///< Bits 3:2 + UINT8 Reserved : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_TIMEBASE_STRUCT; typedef union { struct { - UINT8 tCKmin : 8; ///< Bits 7:0 + UINT8 tCKmin : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_TCK_MIN_MTB_STRUCT; typedef union { struct { - UINT8 tCKmax : 8; ///< Bits 7:0 + UINT8 tCKmax : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_TCK_MAX_MTB_STRUCT; typedef union { struct { - UINT32 Cl3 : 1; ///< Bits 0:0 - UINT32 Cl6 : 1; ///< Bits 1:1 - UINT32 Cl8 : 1; ///< Bits 2:2 - UINT32 Cl9 : 1; ///< Bits 3:3 - UINT32 Cl10 : 1; ///< Bits 4:4 - UINT32 Cl11 : 1; ///< Bits 5:5 - UINT32 Cl12 : 1; ///< Bits 6:6 - UINT32 Cl14 : 1; ///< Bits 7:7 - UINT32 Cl16 : 1; ///< Bits 8:8 - UINT32 Reserved0 : 1; ///< Bits 9:9 - UINT32 Cl20 : 1; ///< Bits 10:10 - UINT32 Cl22 : 1; ///< Bits 11:11 - UINT32 Cl24 : 1; ///< Bits 12:12 - UINT32 Reserved1 : 1; ///< Bits 13:13 - UINT32 Cl28 : 1; ///< Bits 14:14 - UINT32 Reserved2 : 1; ///< Bits 15:15 - UINT32 Cl32 : 1; ///< Bits 16:16 - UINT32 Reserved3 : 1; ///< Bits 17:17 - UINT32 Cl36 : 1; ///< Bits 18:18 - UINT32 Reserved4 : 1; ///< Bits 19:19 - UINT32 Cl40 : 1; ///< Bits 20:20 - UINT32 Reserved5 : 11; ///< Bits 31:21 - } Bits; - UINT32 Data; - UINT16 Data16[2]; - UINT8 Data8[4]; + UINT32 Cl3 : 1; ///< Bits 0:0 + UINT32 Cl6 : 1; ///< Bits 1:1 + UINT32 Cl8 : 1; ///< Bits 2:2 + UINT32 Cl9 : 1; ///< Bits 3:3 + UINT32 Cl10 : 1; ///< Bits 4:4 + UINT32 Cl11 : 1; ///< Bits 5:5 + UINT32 Cl12 : 1; ///< Bits 6:6 + UINT32 Cl14 : 1; ///< Bits 7:7 + UINT32 Cl16 : 1; ///< Bits 8:8 + UINT32 Reserved0 : 1; ///< Bits 9:9 + UINT32 Cl20 : 1; ///< Bits 10:10 + UINT32 Cl22 : 1; ///< Bits 11:11 + UINT32 Cl24 : 1; ///< Bits 12:12 + UINT32 Reserved1 : 1; ///< Bits 13:13 + UINT32 Cl28 : 1; ///< Bits 14:14 + UINT32 Reserved2 : 1; ///< Bits 15:15 + UINT32 Cl32 : 1; ///< Bits 16:16 + UINT32 Reserved3 : 1; ///< Bits 17:17 + UINT32 Cl36 : 1; ///< Bits 18:18 + UINT32 Reserved4 : 1; ///< Bits 19:19 + UINT32 Cl40 : 1; ///< Bits 20:20 + UINT32 Reserved5 : 11; ///< Bits 31:21 + } Bits; + UINT32 Data; + UINT16 Data16[2]; + UINT8 Data8[4]; } SPD_LPDDR_CAS_LATENCIES_SUPPORTED_STRUCT; typedef union { struct { - UINT8 tAAmin : 8; ///< Bits 7:0 + UINT8 tAAmin : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_TAA_MIN_MTB_STRUCT; typedef union { struct { - UINT8 ReadLatencyMode : 2; ///< Bits 1:0 - UINT8 WriteLatencySet : 2; ///< Bits 3:2 - UINT8 Reserved : 4; ///< Bits 7:4 + UINT8 ReadLatencyMode : 2; ///< Bits 1:0 + UINT8 WriteLatencySet : 2; ///< Bits 3:2 + UINT8 Reserved : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_RW_LATENCY_OPTION_STRUCT; typedef union { struct { - UINT8 tRCDmin : 8; ///< Bits 7:0 + UINT8 tRCDmin : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_TRCD_MIN_MTB_STRUCT; typedef union { struct { - UINT8 tRPab : 8; ///< Bits 7:0 + UINT8 tRPab : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_TRP_AB_MTB_STRUCT; typedef union { struct { - UINT8 tRPpb : 8; ///< Bits 7:0 + UINT8 tRPpb : 8; ///< Bits 7:0 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_TRP_PB_MTB_STRUCT; typedef union { struct { - UINT16 tRFCab : 16; ///< Bits 15:0 + UINT16 tRFCab : 16; ///< Bits 15:0 } Bits; - UINT16 Data; - UINT8 Data8[2]; + UINT16 Data; + UINT8 Data8[2]; } SPD_LPDDR_TRFC_AB_MTB_STRUCT; typedef union { -struct { - UINT16 tRFCpb : 16; ///< Bits 15:0 + struct { + UINT16 tRFCpb : 16; ///< Bits 15:0 } Bits; - UINT16 Data; - UINT8 Data8[2]; + UINT16 Data; + UINT8 Data8[2]; } SPD_LPDDR_TRFC_PB_MTB_STRUCT; typedef union { struct { - UINT8 BitOrderatSDRAM : 5; ///< Bits 4:0 - UINT8 WiredtoUpperLowerNibble : 1; ///< Bits 5:5 - UINT8 PackageRankMap : 2; ///< Bits 7:6 + UINT8 BitOrderatSDRAM : 5; ///< Bits 4:0 + UINT8 WiredtoUpperLowerNibble : 1; ///< Bits 5:5 + UINT8 PackageRankMap : 2; ///< Bits 7:6 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_CONNECTOR_BIT_MAPPING_BYTE_STRUCT; typedef union { struct { - INT8 tRPpbFine : 8; ///< Bits 7:0 + INT8 tRPpbFine : 8; ///< Bits 7:0 } Bits; - INT8 Data; + INT8 Data; } SPD_LPDDR_TRP_PB_FTB_STRUCT; typedef union { struct { - INT8 tRPabFine : 8; ///< Bits 7:0 + INT8 tRPabFine : 8; ///< Bits 7:0 } Bits; - INT8 Data; + INT8 Data; } SPD_LPDDR_TRP_AB_FTB_STRUCT; typedef union { struct { - INT8 tRCDminFine : 8; ///< Bits 7:0 + INT8 tRCDminFine : 8; ///< Bits 7:0 } Bits; - INT8 Data; + INT8 Data; } SPD_LPDDR_TRCD_MIN_FTB_STRUCT; typedef union { struct { - INT8 tAAminFine : 8; ///< Bits 7:0 + INT8 tAAminFine : 8; ///< Bits 7:0 } Bits; - INT8 Data; + INT8 Data; } SPD_LPDDR_TAA_MIN_FTB_STRUCT; typedef union { struct { - INT8 tCKmaxFine : 8; ///< Bits 7:0 + INT8 tCKmaxFine : 8; ///< Bits 7:0 } Bits; - INT8 Data; + INT8 Data; } SPD_LPDDR_TCK_MAX_FTB_STRUCT; typedef union { struct { - INT8 tCKminFine : 8; ///< Bits 7:0 + INT8 tCKminFine : 8; ///< Bits 7:0 } Bits; - INT8 Data; + INT8 Data; } SPD_LPDDR_TCK_MIN_FTB_STRUCT; typedef union { struct { - UINT16 ContinuationCount : 7; ///< Bits 6:0 - UINT16 ContinuationParity : 1; ///< Bits 7:7 - UINT16 LastNonZeroByte : 8; ///< Bits 15:8 + UINT16 ContinuationCount : 7; ///< Bits 6:0 + UINT16 ContinuationParity : 1; ///< Bits 7:7 + UINT16 LastNonZeroByte : 8; ///< Bits 15:8 } Bits; - UINT16 Data; - UINT8 Data8[2]; + UINT16 Data; + UINT8 Data8[2]; } SPD_LPDDR_MANUFACTURER_ID_CODE; typedef struct { - UINT8 Location; ///< Module Manufacturing Location + UINT8 Location; ///< Module Manufacturing Location } SPD_LPDDR_MANUFACTURING_LOCATION; typedef struct { - UINT8 Year; ///< Year represented in BCD (00h = 2000) - UINT8 Week; ///< Year represented in BCD (47h = week 47) + UINT8 Year; ///< Year represented in BCD (00h = 2000) + UINT8 Week; ///< Year represented in BCD (47h = week 47) } SPD_LPDDR_MANUFACTURING_DATE; typedef union { - UINT32 Data; - UINT16 SerialNumber16[2]; - UINT8 SerialNumber8[4]; + UINT32 Data; + UINT16 SerialNumber16[2]; + UINT8 SerialNumber8[4]; } SPD_LPDDR_MANUFACTURER_SERIAL_NUMBER; typedef struct { - SPD_LPDDR_MANUFACTURER_ID_CODE IdCode; ///< Module Manufacturer ID Code - SPD_LPDDR_MANUFACTURING_LOCATION Location; ///< Module Manufacturing Location - SPD_LPDDR_MANUFACTURING_DATE Date; ///< Module Manufacturing Year, in BCD (range: 2000-2255) - SPD_LPDDR_MANUFACTURER_SERIAL_NUMBER SerialNumber; ///< Module Serial Number + SPD_LPDDR_MANUFACTURER_ID_CODE IdCode; ///< Module Manufacturer ID Code + SPD_LPDDR_MANUFACTURING_LOCATION Location; ///< Module Manufacturing Location + SPD_LPDDR_MANUFACTURING_DATE Date; ///< Module Manufacturing Year, in BCD (range: 2000-2255) + SPD_LPDDR_MANUFACTURER_SERIAL_NUMBER SerialNumber; ///< Module Serial Number } SPD_LPDDR_UNIQUE_MODULE_ID; typedef union { struct { - UINT8 FrontThickness : 4; ///< Bits 3:0 - UINT8 BackThickness : 4; ///< Bits 7:4 + UINT8 FrontThickness : 4; ///< Bits 3:0 + UINT8 BackThickness : 4; ///< Bits 7:4 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_MODULE_MAXIMUM_THICKNESS; typedef union { struct { - UINT8 Height : 5; ///< Bits 4:0 - UINT8 RawCardExtension : 3; ///< Bits 7:5 + UINT8 Height : 5; ///< Bits 4:0 + UINT8 RawCardExtension : 3; ///< Bits 7:5 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_MODULE_NOMINAL_HEIGHT; typedef union { struct { - UINT8 Card : 5; ///< Bits 4:0 - UINT8 Revision : 2; ///< Bits 6:5 - UINT8 Extension : 1; ///< Bits 7:7 + UINT8 Card : 5; ///< Bits 4:0 + UINT8 Revision : 2; ///< Bits 6:5 + UINT8 Extension : 1; ///< Bits 7:7 } Bits; - UINT8 Data; + UINT8 Data; } SPD_LPDDR_REFERENCE_RAW_CARD; typedef union { - UINT16 Crc[1]; - UINT8 Data8[2]; + UINT16 Crc[1]; + UINT8 Data8[2]; } SPD_LPDDR_CYCLIC_REDUNDANCY_CODE; typedef struct { - SPD_LPDDR_DEVICE_DESCRIPTION_STRUCT Description; ///< 0 Number of Serial PD Bytes Written / SPD Device Size / CRC Coverage 1, 2 - SPD_LPDDR_REVISION_STRUCT Revision; ///< 1 SPD Revision - SPD_LPDDR_DRAM_DEVICE_TYPE_STRUCT DramDeviceType; ///< 2 DRAM Device Type - SPD_LPDDR_MODULE_TYPE_STRUCT ModuleType; ///< 3 Module Type - SPD_LPDDR_SDRAM_DENSITY_BANKS_STRUCT SdramDensityAndBanks; ///< 4 SDRAM Density and Banks - SPD_LPDDR_SDRAM_ADDRESSING_STRUCT SdramAddressing; ///< 5 SDRAM Addressing - SPD_LPDDR_SDRAM_PACKAGE_TYPE_STRUCT SdramPackageType; ///< 6 SDRAM Package Type - SPD_LPDDR_SDRAM_OPTIONAL_FEATURES_STRUCT SdramOptionalFeatures; ///< 7 SDRAM Optional Features - SPD_LPDDR_SDRAM_THERMAL_REFRESH_STRUCT ThermalAndRefreshOptions; ///< 8 SDRAM Thermal and Refresh Options - SPD_LPDDR_OTHER_SDRAM_OPTIONAL_FEATURES_STRUCT OtherOptionalFeatures; ///< 9 Other SDRAM Optional Features - UINT8 Reserved0; ///< 10 Reserved - SPD_LPDDR_MODULE_NOMINAL_VOLTAGE_STRUCT ModuleNominalVoltage; ///< 11 Module Nominal Voltage, VDD - SPD_LPDDR_MODULE_ORGANIZATION_STRUCT ModuleOrganization; ///< 12 Module Organization - SPD_LPDDR_MODULE_MEMORY_BUS_WIDTH_STRUCT ModuleMemoryBusWidth; ///< 13 Module Memory Bus Width - SPD_LPDDR_MODULE_THERMAL_SENSOR_STRUCT ModuleThermalSensor; ///< 14 Module Thermal Sensor - SPD_LPDDR_EXTENDED_MODULE_TYPE_STRUCT ExtendedModuleType; ///< 15 Extended Module Type - SPD_LPDDR_SIGNAL_LOADING_STRUCT SignalLoading; ///< 16 Signal Loading - SPD_LPDDR_TIMEBASE_STRUCT Timebase; ///< 17 Timebases - SPD_LPDDR_TCK_MIN_MTB_STRUCT tCKmin; ///< 18 SDRAM Minimum Cycle Time (tCKmin) - SPD_LPDDR_TCK_MAX_MTB_STRUCT tCKmax; ///< 19 SDRAM Maximum Cycle Time (tCKmax) - SPD_LPDDR_CAS_LATENCIES_SUPPORTED_STRUCT CasLatencies; ///< 20-23 CAS Latencies Supported - SPD_LPDDR_TAA_MIN_MTB_STRUCT tAAmin; ///< 24 Minimum CAS Latency Time (tAAmin) - SPD_LPDDR_RW_LATENCY_OPTION_STRUCT LatencySetOptions; ///< 25 Read and Write Latency Set Options - SPD_LPDDR_TRCD_MIN_MTB_STRUCT tRCDmin; ///< 26 Minimum RAS# to CAS# Delay Time (tRCDmin) - SPD_LPDDR_TRP_AB_MTB_STRUCT tRPab; ///< 27 Minimum Row Precharge Delay Time (tRPab), all banks - SPD_LPDDR_TRP_PB_MTB_STRUCT tRPpb; ///< 28 Minimum Row Precharge Delay Time (tRPpb), per bank - SPD_LPDDR_TRFC_AB_MTB_STRUCT tRFCab; ///< 29-30 Minimum Refresh Recovery Delay Time (tRFCab), all banks - SPD_LPDDR_TRFC_PB_MTB_STRUCT tRFCpb; ///< 31-32 Minimum Refresh Recovery Delay Time (tRFCpb), per bank - UINT8 Reserved1[59 - 33 + 1]; ///< 33-59 Reserved - SPD_LPDDR_CONNECTOR_BIT_MAPPING_BYTE_STRUCT BitMapping[77 - 60 + 1]; ///< 60-77 Connector to SDRAM Bit Mapping - UINT8 Reserved2[119 - 78 + 1]; ///< 78-119 Reserved - SPD_LPDDR_TRP_PB_FTB_STRUCT tRPpbFine; ///< 120 Fine Offset for Minimum Row Precharge Delay Time (tRPpbFine), per bank - SPD_LPDDR_TRP_AB_FTB_STRUCT tRPabFine; ///< 121 Fine Offset for Minimum Row Precharge Delay Time (tRPabFine), all ranks - SPD_LPDDR_TRCD_MIN_FTB_STRUCT tRCDminFine; ///< 122 Fine Offset for Minimum RAS# to CAS# Delay Time (tRCDmin) - SPD_LPDDR_TAA_MIN_FTB_STRUCT tAAminFine; ///< 123 Fine Offset for Minimum CAS Latency Time (tAAmin) - SPD_LPDDR_TCK_MAX_FTB_STRUCT tCKmaxFine; ///< 124 Fine Offset for SDRAM Maximum Cycle Time (tCKmax) - SPD_LPDDR_TCK_MIN_FTB_STRUCT tCKminFine; ///< 125 Fine Offset for SDRAM Minimum Cycle Time (tCKmin) - SPD_LPDDR_CYCLIC_REDUNDANCY_CODE Crc; ///< 126-127 Cyclical Redundancy Code (CRC) + SPD_LPDDR_DEVICE_DESCRIPTION_STRUCT Description; ///< 0 Number of Serial PD Bytes Written / SPD Device Size / CRC Coverage 1, 2 + SPD_LPDDR_REVISION_STRUCT Revision; ///< 1 SPD Revision + SPD_LPDDR_DRAM_DEVICE_TYPE_STRUCT DramDeviceType; ///< 2 DRAM Device Type + SPD_LPDDR_MODULE_TYPE_STRUCT ModuleType; ///< 3 Module Type + SPD_LPDDR_SDRAM_DENSITY_BANKS_STRUCT SdramDensityAndBanks; ///< 4 SDRAM Density and Banks + SPD_LPDDR_SDRAM_ADDRESSING_STRUCT SdramAddressing; ///< 5 SDRAM Addressing + SPD_LPDDR_SDRAM_PACKAGE_TYPE_STRUCT SdramPackageType; ///< 6 SDRAM Package Type + SPD_LPDDR_SDRAM_OPTIONAL_FEATURES_STRUCT SdramOptionalFeatures; ///< 7 SDRAM Optional Features + SPD_LPDDR_SDRAM_THERMAL_REFRESH_STRUCT ThermalAndRefreshOptions; ///< 8 SDRAM Thermal and Refresh Options + SPD_LPDDR_OTHER_SDRAM_OPTIONAL_FEATURES_STRUCT OtherOptionalFeatures; ///< 9 Other SDRAM Optional Features + UINT8 Reserved0; ///< 10 Reserved + SPD_LPDDR_MODULE_NOMINAL_VOLTAGE_STRUCT ModuleNominalVoltage; ///< 11 Module Nominal Voltage, VDD + SPD_LPDDR_MODULE_ORGANIZATION_STRUCT ModuleOrganization; ///< 12 Module Organization + SPD_LPDDR_MODULE_MEMORY_BUS_WIDTH_STRUCT ModuleMemoryBusWidth; ///< 13 Module Memory Bus Width + SPD_LPDDR_MODULE_THERMAL_SENSOR_STRUCT ModuleThermalSensor; ///< 14 Module Thermal Sensor + SPD_LPDDR_EXTENDED_MODULE_TYPE_STRUCT ExtendedModuleType; ///< 15 Extended Module Type + SPD_LPDDR_SIGNAL_LOADING_STRUCT SignalLoading; ///< 16 Signal Loading + SPD_LPDDR_TIMEBASE_STRUCT Timebase; ///< 17 Timebases + SPD_LPDDR_TCK_MIN_MTB_STRUCT tCKmin; ///< 18 SDRAM Minimum Cycle Time (tCKmin) + SPD_LPDDR_TCK_MAX_MTB_STRUCT tCKmax; ///< 19 SDRAM Maximum Cycle Time (tCKmax) + SPD_LPDDR_CAS_LATENCIES_SUPPORTED_STRUCT CasLatencies; ///< 20-23 CAS Latencies Supported + SPD_LPDDR_TAA_MIN_MTB_STRUCT tAAmin; ///< 24 Minimum CAS Latency Time (tAAmin) + SPD_LPDDR_RW_LATENCY_OPTION_STRUCT LatencySetOptions; ///< 25 Read and Write Latency Set Options + SPD_LPDDR_TRCD_MIN_MTB_STRUCT tRCDmin; ///< 26 Minimum RAS# to CAS# Delay Time (tRCDmin) + SPD_LPDDR_TRP_AB_MTB_STRUCT tRPab; ///< 27 Minimum Row Precharge Delay Time (tRPab), all banks + SPD_LPDDR_TRP_PB_MTB_STRUCT tRPpb; ///< 28 Minimum Row Precharge Delay Time (tRPpb), per bank + SPD_LPDDR_TRFC_AB_MTB_STRUCT tRFCab; ///< 29-30 Minimum Refresh Recovery Delay Time (tRFCab), all banks + SPD_LPDDR_TRFC_PB_MTB_STRUCT tRFCpb; ///< 31-32 Minimum Refresh Recovery Delay Time (tRFCpb), per bank + UINT8 Reserved1[59 - 33 + 1]; ///< 33-59 Reserved + SPD_LPDDR_CONNECTOR_BIT_MAPPING_BYTE_STRUCT BitMapping[77 - 60 + 1]; ///< 60-77 Connector to SDRAM Bit Mapping + UINT8 Reserved2[119 - 78 + 1]; ///< 78-119 Reserved + SPD_LPDDR_TRP_PB_FTB_STRUCT tRPpbFine; ///< 120 Fine Offset for Minimum Row Precharge Delay Time (tRPpbFine), per bank + SPD_LPDDR_TRP_AB_FTB_STRUCT tRPabFine; ///< 121 Fine Offset for Minimum Row Precharge Delay Time (tRPabFine), all ranks + SPD_LPDDR_TRCD_MIN_FTB_STRUCT tRCDminFine; ///< 122 Fine Offset for Minimum RAS# to CAS# Delay Time (tRCDmin) + SPD_LPDDR_TAA_MIN_FTB_STRUCT tAAminFine; ///< 123 Fine Offset for Minimum CAS Latency Time (tAAmin) + SPD_LPDDR_TCK_MAX_FTB_STRUCT tCKmaxFine; ///< 124 Fine Offset for SDRAM Maximum Cycle Time (tCKmax) + SPD_LPDDR_TCK_MIN_FTB_STRUCT tCKminFine; ///< 125 Fine Offset for SDRAM Minimum Cycle Time (tCKmin) + SPD_LPDDR_CYCLIC_REDUNDANCY_CODE Crc; ///< 126-127 Cyclical Redundancy Code (CRC) } SPD_LPDDR_BASE_SECTION; typedef struct { - SPD_LPDDR_MODULE_NOMINAL_HEIGHT ModuleNominalHeight; ///< 128 Module Nominal Height - SPD_LPDDR_MODULE_MAXIMUM_THICKNESS ModuleMaximumThickness; ///< 129 Module Maximum Thickness - SPD_LPDDR_REFERENCE_RAW_CARD ReferenceRawCardUsed; ///< 130 Reference Raw Card Used - UINT8 Reserved[253 - 131 + 1]; ///< 131-253 Reserved - SPD_LPDDR_CYCLIC_REDUNDANCY_CODE Crc; ///< 254-255 Cyclical Redundancy Code (CRC) + SPD_LPDDR_MODULE_NOMINAL_HEIGHT ModuleNominalHeight; ///< 128 Module Nominal Height + SPD_LPDDR_MODULE_MAXIMUM_THICKNESS ModuleMaximumThickness; ///< 129 Module Maximum Thickness + SPD_LPDDR_REFERENCE_RAW_CARD ReferenceRawCardUsed; ///< 130 Reference Raw Card Used + UINT8 Reserved[253 - 131 + 1]; ///< 131-253 Reserved + SPD_LPDDR_CYCLIC_REDUNDANCY_CODE Crc; ///< 254-255 Cyclical Redundancy Code (CRC) } SPD_LPDDR_MODULE_LPDIMM; typedef struct { - SPD_LPDDR_MODULE_LPDIMM LpDimm; ///< 128-255 Unbuffered Memory Module Types + SPD_LPDDR_MODULE_LPDIMM LpDimm; ///< 128-255 Unbuffered Memory Module Types } SPD_LPDDR_MODULE_SPECIFIC; typedef struct { - UINT8 ModulePartNumber[348 - 329 + 1]; ///< 329-348 Module Part Number + UINT8 ModulePartNumber[348 - 329 + 1]; ///< 329-348 Module Part Number } SPD_LPDDR_MODULE_PART_NUMBER; typedef struct { - UINT8 ManufacturerSpecificData[381 - 353 + 1]; ///< 353-381 Manufacturer's Specific Data + UINT8 ManufacturerSpecificData[381 - 353 + 1]; ///< 353-381 Manufacturer's Specific Data } SPD_LPDDR_MANUFACTURER_SPECIFIC; -typedef UINT8 SPD_LPDDR_MODULE_REVISION_CODE;///< 349 Module Revision Code -typedef UINT8 SPD_LPDDR_DRAM_STEPPING; ///< 352 Dram Stepping +typedef UINT8 SPD_LPDDR_MODULE_REVISION_CODE; ///< 349 Module Revision Code +typedef UINT8 SPD_LPDDR_DRAM_STEPPING; ///< 352 Dram Stepping typedef struct { - SPD_LPDDR_UNIQUE_MODULE_ID ModuleId; ///< 320-328 Unique Module ID - SPD_LPDDR_MODULE_PART_NUMBER ModulePartNumber; ///< 329-348 Module Part Number - SPD_LPDDR_MODULE_REVISION_CODE ModuleRevisionCode; ///< 349 Module Revision Code - SPD_LPDDR_MANUFACTURER_ID_CODE DramIdCode; ///< 350-351 Dram Manufacturer ID Code - SPD_LPDDR_DRAM_STEPPING DramStepping; ///< 352 Dram Stepping - SPD_LPDDR_MANUFACTURER_SPECIFIC ManufacturerSpecificData; ///< 353-381 Manufacturer's Specific Data - UINT8 Reserved[383 - 382 + 1]; ///< 382-383 Reserved + SPD_LPDDR_UNIQUE_MODULE_ID ModuleId; ///< 320-328 Unique Module ID + SPD_LPDDR_MODULE_PART_NUMBER ModulePartNumber; ///< 329-348 Module Part Number + SPD_LPDDR_MODULE_REVISION_CODE ModuleRevisionCode; ///< 349 Module Revision Code + SPD_LPDDR_MANUFACTURER_ID_CODE DramIdCode; ///< 350-351 Dram Manufacturer ID Code + SPD_LPDDR_DRAM_STEPPING DramStepping; ///< 352 Dram Stepping + SPD_LPDDR_MANUFACTURER_SPECIFIC ManufacturerSpecificData; ///< 353-381 Manufacturer's Specific Data + UINT8 Reserved[383 - 382 + 1]; ///< 382-383 Reserved } SPD_LPDDR_MANUFACTURING_DATA; typedef struct { - UINT8 Reserved[511 - 384 + 1]; ///< 384-511 End User Programmable + UINT8 Reserved[511 - 384 + 1]; ///< 384-511 End User Programmable } SPD_LPDDR_END_USER_SECTION; /// /// LPDDR Serial Presence Detect structure /// typedef struct { - SPD_LPDDR_BASE_SECTION Base; ///< 0-127 Base Configuration and DRAM Parameters - SPD_LPDDR_MODULE_SPECIFIC Module; ///< 128-255 Module-Specific Section - UINT8 Reserved[319 - 256 + 1]; ///< 256-319 Hybrid Memory Parameters - SPD_LPDDR_MANUFACTURING_DATA ManufactureInfo; ///< 320-383 Manufacturing Information - SPD_LPDDR_END_USER_SECTION EndUser; ///< 384-511 End User Programmable + SPD_LPDDR_BASE_SECTION Base; ///< 0-127 Base Configuration and DRAM Parameters + SPD_LPDDR_MODULE_SPECIFIC Module; ///< 128-255 Module-Specific Section + UINT8 Reserved[319 - 256 + 1]; ///< 256-319 Hybrid Memory Parameters + SPD_LPDDR_MANUFACTURING_DATA ManufactureInfo; ///< 320-383 Manufacturing Information + SPD_LPDDR_END_USER_SECTION EndUser; ///< 384-511 End User Programmable } SPD_LPDDR; #pragma pack (pop) diff --git a/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h b/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h index 8fd1582..eb5ae28 100644 --- a/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h +++ b/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h @@ -11,7 +11,6 @@ #ifndef _SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_H_ #define _SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_H_ - #include // @@ -22,33 +21,33 @@ /// /// SPCR Revision (defined in spec) /// -#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_REVISION 0x02 +#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_REVISION 0x02 /// /// Serial Port Console Redirection Table Format /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT8 InterfaceType; - UINT8 Reserved1[3]; - EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE BaseAddress; - UINT8 InterruptType; - UINT8 Irq; - UINT32 GlobalSystemInterrupt; - UINT8 BaudRate; - UINT8 Parity; - UINT8 StopBits; - UINT8 FlowControl; - UINT8 TerminalType; - UINT8 Reserved2; - UINT16 PciDeviceId; - UINT16 PciVendorId; - UINT8 PciBusNumber; - UINT8 PciDeviceNumber; - UINT8 PciFunctionNumber; - UINT32 PciFlags; - UINT8 PciSegment; - UINT32 Reserved3; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT8 InterfaceType; + UINT8 Reserved1[3]; + EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE BaseAddress; + UINT8 InterruptType; + UINT8 Irq; + UINT32 GlobalSystemInterrupt; + UINT8 BaudRate; + UINT8 Parity; + UINT8 StopBits; + UINT8 FlowControl; + UINT8 TerminalType; + UINT8 Reserved2; + UINT16 PciDeviceId; + UINT16 PciVendorId; + UINT8 PciBusNumber; + UINT8 PciDeviceNumber; + UINT8 PciFunctionNumber; + UINT32 PciFlags; + UINT8 PciSegment; + UINT32 Reserved3; } EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE; #pragma pack() @@ -64,12 +63,11 @@ typedef struct { /// /// Full 16550 interface /// -#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_16550 0 +#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_16550 0 /// /// Full 16450 interface /// -#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_16450 1 - +#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_16450 1 // // The Serial Port Subtypes for ARM are documented in Table 3 of the DBG2 Specification @@ -78,12 +76,12 @@ typedef struct { /// /// ARM PL011 UART /// -#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_ARM_PL011_UART 0x03 +#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_ARM_PL011_UART 0x03 /// /// NVIDIA 16550 UART /// -#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_NVIDIA_16550_UART 0x05 +#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_NVIDIA_16550_UART 0x05 /// /// ARM SBSA Generic UART (2.x) supporting 32-bit only accesses [deprecated] @@ -93,22 +91,22 @@ typedef struct { /// /// ARM SBSA Generic UART /// -#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_ARM_SBSA_GENERIC_UART 0x0e +#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_ARM_SBSA_GENERIC_UART 0x0e /// /// ARM DCC /// -#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_DCC 0x0f +#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_DCC 0x0f /// /// BCM2835 UART /// -#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_BCM2835_UART 0x10 +#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_BCM2835_UART 0x10 /// /// 16550-compatible with parameters defined in Generic Address Structure /// -#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_16550_WITH_GAS 0x12 +#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_16550_WITH_GAS 0x12 // // Interrupt Type @@ -117,37 +115,37 @@ typedef struct { /// /// PC-AT-compatible dual-8259 IRQ interrupt /// -#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_8259 0x1 +#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_8259 0x1 /// /// I/O APIC interrupt (Global System Interrupt) /// -#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_APIC 0x2 +#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_APIC 0x2 /// /// I/O SAPIC interrupt (Global System Interrupt) /// -#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_SAPIC 0x4 +#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_SAPIC 0x4 /// /// ARMH GIC interrupt (Global System Interrupt) /// -#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_GIC 0x8 +#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_GIC 0x8 // // Baud Rate // -#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_9600 3 -#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_19200 4 -#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_57600 6 -#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_115200 7 +#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_9600 3 +#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_19200 4 +#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_57600 6 +#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_115200 7 // // Parity // -#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_PARITY_NO_PARITY 0 +#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_PARITY_NO_PARITY 0 // // Stop Bits // -#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_STOP_BITS_1 1 +#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_STOP_BITS_1 1 // // Flow Control @@ -156,11 +154,11 @@ typedef struct { /// /// DCD required for transmit /// -#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_FLOW_CONTROL_DCD 0x1 +#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_FLOW_CONTROL_DCD 0x1 /// /// RTS/CTS hardware flow control /// -#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_FLOW_CONTROL_RTS_CTS 0x2 +#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_FLOW_CONTROL_RTS_CTS 0x2 /// /// XON/XOFF software control /// @@ -169,9 +167,9 @@ typedef struct { // // Terminal Type // -#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_VT100 0 -#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_VT100_PLUS 1 -#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_VT_UTF8 2 -#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_ANSI 3 +#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_VT100 0 +#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_VT100_PLUS 1 +#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_VT_UTF8 2 +#define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_ANSI 3 #endif diff --git a/MdePkg/Include/IndustryStandard/ServiceProcessorManagementInterfaceTable.h b/MdePkg/Include/IndustryStandard/ServiceProcessorManagementInterfaceTable.h index 9c04d52..15f47f1 100644 --- a/MdePkg/Include/IndustryStandard/ServiceProcessorManagementInterfaceTable.h +++ b/MdePkg/Include/IndustryStandard/ServiceProcessorManagementInterfaceTable.h @@ -10,6 +10,7 @@ v2.0 Revision 1.1, Dated October 2013. https://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/ipmi-intelligent-platform-mgt-interface-spec-2nd-gen-v2-0-spec-update.pdf **/ + #ifndef _SERVICE_PROCESSOR_MANAGEMENT_INTERFACE_TABLE_H_ #define _SERVICE_PROCESSOR_MANAGEMENT_INTERFACE_TABLE_H_ @@ -26,62 +27,61 @@ typedef union { /// For PCI IPMI device /// struct { - UINT8 SegmentGroup; - UINT8 Bus; - UINT8 Device; - UINT8 Function; + UINT8 SegmentGroup; + UINT8 Bus; + UINT8 Device; + UINT8 Function; } Pci; /// /// For non-PCI IPMI device, the ACPI _UID value of the device /// - UINT32 Uid; + UINT32 Uid; } EFI_ACPI_SERVICE_PROCESSOR_MANAGEMENT_INTERFACE_TABLE_DEVICE_ID; - /// /// Definition for Service Processor Management Interface Description Table /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_DESCRIPTION_HEADER Header; /// /// Indicates the type of IPMI interface. /// - UINT8 InterfaceType; + UINT8 InterfaceType; /// /// This field must always be 01h to be compatible with any software that /// implements previous versions of this spec. /// - UINT8 Reserved1; + UINT8 Reserved1; /// /// Identifies the IPMI specification revision, in BCD format. /// - UINT16 SpecificationRevision; + UINT16 SpecificationRevision; /// /// Interrupt type(s) used by the interface. /// - UINT8 InterruptType; + UINT8 InterruptType; /// /// The bit assignment of the SCI interrupt within the GPEx_STS register of a /// GPE described if the FADT that the interface triggers. /// - UINT8 Gpe; + UINT8 Gpe; /// /// Reserved, must be 00h. /// - UINT8 Reserved2; + UINT8 Reserved2; /// /// PCI Device Flag. /// - UINT8 PciDeviceFlag; + UINT8 PciDeviceFlag; /// /// The I/O APIC or I/O SAPIC Global System Interrupt used by the interface. /// - UINT32 GlobalSystemInterrupt; + UINT32 GlobalSystemInterrupt; /// /// The base address of the interface register set described using the /// Generic Address Structure (GAS, See [ACPI 2.0] for the definition). /// - EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE BaseAddress; + EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE BaseAddress; /// /// Device identification information. /// @@ -90,7 +90,7 @@ typedef struct { /// This field must always be null (0x00) to be compatible with any software /// that implements previous versions of this spec. /// - UINT8 Reserved3; + UINT8 Reserved3; } EFI_ACPI_SERVICE_PROCESSOR_MANAGEMENT_INTERFACE_TABLE; #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/SmBios.h b/MdePkg/Include/IndustryStandard/SmBios.h index 2c2b32b..828ea6d 100644 --- a/MdePkg/Include/IndustryStandard/SmBios.h +++ b/MdePkg/Include/IndustryStandard/SmBios.h @@ -16,7 +16,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// For v2.1 and later, handle values in the range 0FF00h to 0FFFFh are reserved for /// use by this specification. /// -#define SMBIOS_HANDLE_RESERVED_BEGIN 0xFF00 +#define SMBIOS_HANDLE_RESERVED_BEGIN 0xFF00 /// /// Reference SMBIOS 2.7, chapter 6.1.2. @@ -24,7 +24,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// EFI_SMBIOS_PROTOCOL.Add() function to mean "assign an unused handle number automatically." /// This number is not used for any other purpose by the SMBIOS specification. /// -#define SMBIOS_HANDLE_PI_RESERVED 0xFFFE +#define SMBIOS_HANDLE_PI_RESERVED 0xFFFE /// /// Reference SMBIOS 2.6, chapter 3.1.3. @@ -32,90 +32,90 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// Reference SMBIOS 2.7, chapter 6.1.3. /// It will have no limit on the length of each individual text string. /// -#define SMBIOS_STRING_MAX_LENGTH 64 +#define SMBIOS_STRING_MAX_LENGTH 64 // // The length of the entire structure table (including all strings) must be reported // in the Structure Table Length field of the SMBIOS Structure Table Entry Point, // which is a WORD field limited to 65,535 bytes. // -#define SMBIOS_TABLE_MAX_LENGTH 0xFFFF +#define SMBIOS_TABLE_MAX_LENGTH 0xFFFF // // For SMBIOS 3.0, Structure table maximum size in Entry Point structure is DWORD field limited to 0xFFFFFFFF bytes. // -#define SMBIOS_3_0_TABLE_MAX_LENGTH 0xFFFFFFFF +#define SMBIOS_3_0_TABLE_MAX_LENGTH 0xFFFFFFFF // // SMBIOS type macros which is according to SMBIOS 3.3.0 specification. // -#define SMBIOS_TYPE_BIOS_INFORMATION 0 -#define SMBIOS_TYPE_SYSTEM_INFORMATION 1 -#define SMBIOS_TYPE_BASEBOARD_INFORMATION 2 -#define SMBIOS_TYPE_SYSTEM_ENCLOSURE 3 -#define SMBIOS_TYPE_PROCESSOR_INFORMATION 4 -#define SMBIOS_TYPE_MEMORY_CONTROLLER_INFORMATION 5 -#define SMBIOS_TYPE_MEMORY_MODULE_INFORMATON 6 -#define SMBIOS_TYPE_CACHE_INFORMATION 7 -#define SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION 8 -#define SMBIOS_TYPE_SYSTEM_SLOTS 9 -#define SMBIOS_TYPE_ONBOARD_DEVICE_INFORMATION 10 -#define SMBIOS_TYPE_OEM_STRINGS 11 -#define SMBIOS_TYPE_SYSTEM_CONFIGURATION_OPTIONS 12 -#define SMBIOS_TYPE_BIOS_LANGUAGE_INFORMATION 13 -#define SMBIOS_TYPE_GROUP_ASSOCIATIONS 14 -#define SMBIOS_TYPE_SYSTEM_EVENT_LOG 15 -#define SMBIOS_TYPE_PHYSICAL_MEMORY_ARRAY 16 -#define SMBIOS_TYPE_MEMORY_DEVICE 17 -#define SMBIOS_TYPE_32BIT_MEMORY_ERROR_INFORMATION 18 -#define SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS 19 -#define SMBIOS_TYPE_MEMORY_DEVICE_MAPPED_ADDRESS 20 -#define SMBIOS_TYPE_BUILT_IN_POINTING_DEVICE 21 -#define SMBIOS_TYPE_PORTABLE_BATTERY 22 -#define SMBIOS_TYPE_SYSTEM_RESET 23 -#define SMBIOS_TYPE_HARDWARE_SECURITY 24 -#define SMBIOS_TYPE_SYSTEM_POWER_CONTROLS 25 -#define SMBIOS_TYPE_VOLTAGE_PROBE 26 -#define SMBIOS_TYPE_COOLING_DEVICE 27 -#define SMBIOS_TYPE_TEMPERATURE_PROBE 28 -#define SMBIOS_TYPE_ELECTRICAL_CURRENT_PROBE 29 -#define SMBIOS_TYPE_OUT_OF_BAND_REMOTE_ACCESS 30 -#define SMBIOS_TYPE_BOOT_INTEGRITY_SERVICE 31 -#define SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION 32 -#define SMBIOS_TYPE_64BIT_MEMORY_ERROR_INFORMATION 33 -#define SMBIOS_TYPE_MANAGEMENT_DEVICE 34 -#define SMBIOS_TYPE_MANAGEMENT_DEVICE_COMPONENT 35 -#define SMBIOS_TYPE_MANAGEMENT_DEVICE_THRESHOLD_DATA 36 -#define SMBIOS_TYPE_MEMORY_CHANNEL 37 -#define SMBIOS_TYPE_IPMI_DEVICE_INFORMATION 38 -#define SMBIOS_TYPE_SYSTEM_POWER_SUPPLY 39 -#define SMBIOS_TYPE_ADDITIONAL_INFORMATION 40 -#define SMBIOS_TYPE_ONBOARD_DEVICES_EXTENDED_INFORMATION 41 -#define SMBIOS_TYPE_MANAGEMENT_CONTROLLER_HOST_INTERFACE 42 -#define SMBIOS_TYPE_TPM_DEVICE 43 -#define SMBIOS_TYPE_PROCESSOR_ADDITIONAL_INFORMATION 44 +#define SMBIOS_TYPE_BIOS_INFORMATION 0 +#define SMBIOS_TYPE_SYSTEM_INFORMATION 1 +#define SMBIOS_TYPE_BASEBOARD_INFORMATION 2 +#define SMBIOS_TYPE_SYSTEM_ENCLOSURE 3 +#define SMBIOS_TYPE_PROCESSOR_INFORMATION 4 +#define SMBIOS_TYPE_MEMORY_CONTROLLER_INFORMATION 5 +#define SMBIOS_TYPE_MEMORY_MODULE_INFORMATON 6 +#define SMBIOS_TYPE_CACHE_INFORMATION 7 +#define SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION 8 +#define SMBIOS_TYPE_SYSTEM_SLOTS 9 +#define SMBIOS_TYPE_ONBOARD_DEVICE_INFORMATION 10 +#define SMBIOS_TYPE_OEM_STRINGS 11 +#define SMBIOS_TYPE_SYSTEM_CONFIGURATION_OPTIONS 12 +#define SMBIOS_TYPE_BIOS_LANGUAGE_INFORMATION 13 +#define SMBIOS_TYPE_GROUP_ASSOCIATIONS 14 +#define SMBIOS_TYPE_SYSTEM_EVENT_LOG 15 +#define SMBIOS_TYPE_PHYSICAL_MEMORY_ARRAY 16 +#define SMBIOS_TYPE_MEMORY_DEVICE 17 +#define SMBIOS_TYPE_32BIT_MEMORY_ERROR_INFORMATION 18 +#define SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS 19 +#define SMBIOS_TYPE_MEMORY_DEVICE_MAPPED_ADDRESS 20 +#define SMBIOS_TYPE_BUILT_IN_POINTING_DEVICE 21 +#define SMBIOS_TYPE_PORTABLE_BATTERY 22 +#define SMBIOS_TYPE_SYSTEM_RESET 23 +#define SMBIOS_TYPE_HARDWARE_SECURITY 24 +#define SMBIOS_TYPE_SYSTEM_POWER_CONTROLS 25 +#define SMBIOS_TYPE_VOLTAGE_PROBE 26 +#define SMBIOS_TYPE_COOLING_DEVICE 27 +#define SMBIOS_TYPE_TEMPERATURE_PROBE 28 +#define SMBIOS_TYPE_ELECTRICAL_CURRENT_PROBE 29 +#define SMBIOS_TYPE_OUT_OF_BAND_REMOTE_ACCESS 30 +#define SMBIOS_TYPE_BOOT_INTEGRITY_SERVICE 31 +#define SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION 32 +#define SMBIOS_TYPE_64BIT_MEMORY_ERROR_INFORMATION 33 +#define SMBIOS_TYPE_MANAGEMENT_DEVICE 34 +#define SMBIOS_TYPE_MANAGEMENT_DEVICE_COMPONENT 35 +#define SMBIOS_TYPE_MANAGEMENT_DEVICE_THRESHOLD_DATA 36 +#define SMBIOS_TYPE_MEMORY_CHANNEL 37 +#define SMBIOS_TYPE_IPMI_DEVICE_INFORMATION 38 +#define SMBIOS_TYPE_SYSTEM_POWER_SUPPLY 39 +#define SMBIOS_TYPE_ADDITIONAL_INFORMATION 40 +#define SMBIOS_TYPE_ONBOARD_DEVICES_EXTENDED_INFORMATION 41 +#define SMBIOS_TYPE_MANAGEMENT_CONTROLLER_HOST_INTERFACE 42 +#define SMBIOS_TYPE_TPM_DEVICE 43 +#define SMBIOS_TYPE_PROCESSOR_ADDITIONAL_INFORMATION 44 /// /// Inactive type is added from SMBIOS 2.2. Reference SMBIOS 2.6, chapter 3.3.43. /// Upper-level software that interprets the SMBIOS structure-table should bypass an /// Inactive structure just like a structure type that the software does not recognize. /// -#define SMBIOS_TYPE_INACTIVE 0x007E +#define SMBIOS_TYPE_INACTIVE 0x007E /// /// End-of-table type is added from SMBIOS 2.2. Reference SMBIOS 2.6, chapter 3.3.44. /// The end-of-table indicator is used in the last physical structure in a table /// -#define SMBIOS_TYPE_END_OF_TABLE 0x007F +#define SMBIOS_TYPE_END_OF_TABLE 0x007F -#define SMBIOS_OEM_BEGIN 128 -#define SMBIOS_OEM_END 255 +#define SMBIOS_OEM_BEGIN 128 +#define SMBIOS_OEM_END 255 /// /// Types 0 through 127 (7Fh) are reserved for and defined by this /// specification. Types 128 through 256 (80h to FFh) are available for system- and OEM-specific information. /// -typedef UINT8 SMBIOS_TYPE; +typedef UINT8 SMBIOS_TYPE; /// /// Specifies the structure's handle, a unique 16-bit number in the range 0 to 0FFFEh (for version @@ -134,42 +134,42 @@ typedef UINT16 SMBIOS_HANDLE; /// #pragma pack(1) typedef struct { - UINT8 AnchorString[4]; - UINT8 EntryPointStructureChecksum; - UINT8 EntryPointLength; - UINT8 MajorVersion; - UINT8 MinorVersion; - UINT16 MaxStructureSize; - UINT8 EntryPointRevision; - UINT8 FormattedArea[5]; - UINT8 IntermediateAnchorString[5]; - UINT8 IntermediateChecksum; - UINT16 TableLength; - UINT32 TableAddress; - UINT16 NumberOfSmbiosStructures; - UINT8 SmbiosBcdRevision; + UINT8 AnchorString[4]; + UINT8 EntryPointStructureChecksum; + UINT8 EntryPointLength; + UINT8 MajorVersion; + UINT8 MinorVersion; + UINT16 MaxStructureSize; + UINT8 EntryPointRevision; + UINT8 FormattedArea[5]; + UINT8 IntermediateAnchorString[5]; + UINT8 IntermediateChecksum; + UINT16 TableLength; + UINT32 TableAddress; + UINT16 NumberOfSmbiosStructures; + UINT8 SmbiosBcdRevision; } SMBIOS_TABLE_ENTRY_POINT; typedef struct { - UINT8 AnchorString[5]; - UINT8 EntryPointStructureChecksum; - UINT8 EntryPointLength; - UINT8 MajorVersion; - UINT8 MinorVersion; - UINT8 DocRev; - UINT8 EntryPointRevision; - UINT8 Reserved; - UINT32 TableMaximumSize; - UINT64 TableAddress; + UINT8 AnchorString[5]; + UINT8 EntryPointStructureChecksum; + UINT8 EntryPointLength; + UINT8 MajorVersion; + UINT8 MinorVersion; + UINT8 DocRev; + UINT8 EntryPointRevision; + UINT8 Reserved; + UINT32 TableMaximumSize; + UINT64 TableAddress; } SMBIOS_TABLE_3_0_ENTRY_POINT; /// /// The Smbios structure header. /// typedef struct { - SMBIOS_TYPE Type; - UINT8 Length; - SMBIOS_HANDLE Handle; + SMBIOS_TYPE Type; + UINT8 Length; + SMBIOS_HANDLE Handle; } SMBIOS_STRUCTURE; /// @@ -190,39 +190,39 @@ typedef UINT8 SMBIOS_TABLE_STRING; /// Defines which functions the BIOS supports. PCI, PCMCIA, Flash, etc. /// typedef struct { - UINT32 Reserved :2; ///< Bits 0-1. - UINT32 Unknown :1; - UINT32 BiosCharacteristicsNotSupported :1; - UINT32 IsaIsSupported :1; - UINT32 McaIsSupported :1; - UINT32 EisaIsSupported :1; - UINT32 PciIsSupported :1; - UINT32 PcmciaIsSupported :1; - UINT32 PlugAndPlayIsSupported :1; - UINT32 ApmIsSupported :1; - UINT32 BiosIsUpgradable :1; - UINT32 BiosShadowingAllowed :1; - UINT32 VlVesaIsSupported :1; - UINT32 EscdSupportIsAvailable :1; - UINT32 BootFromCdIsSupported :1; - UINT32 SelectableBootIsSupported :1; - UINT32 RomBiosIsSocketed :1; - UINT32 BootFromPcmciaIsSupported :1; - UINT32 EDDSpecificationIsSupported :1; - UINT32 JapaneseNecFloppyIsSupported :1; - UINT32 JapaneseToshibaFloppyIsSupported :1; - UINT32 Floppy525_360IsSupported :1; - UINT32 Floppy525_12IsSupported :1; - UINT32 Floppy35_720IsSupported :1; - UINT32 Floppy35_288IsSupported :1; - UINT32 PrintScreenIsSupported :1; - UINT32 Keyboard8042IsSupported :1; - UINT32 SerialIsSupported :1; - UINT32 PrinterIsSupported :1; - UINT32 CgaMonoIsSupported :1; - UINT32 NecPc98 :1; - UINT32 ReservedForVendor :32; ///< Bits 32-63. Bits 32-47 reserved for BIOS vendor - ///< and bits 48-63 reserved for System Vendor. + UINT32 Reserved : 2; ///< Bits 0-1. + UINT32 Unknown : 1; + UINT32 BiosCharacteristicsNotSupported : 1; + UINT32 IsaIsSupported : 1; + UINT32 McaIsSupported : 1; + UINT32 EisaIsSupported : 1; + UINT32 PciIsSupported : 1; + UINT32 PcmciaIsSupported : 1; + UINT32 PlugAndPlayIsSupported : 1; + UINT32 ApmIsSupported : 1; + UINT32 BiosIsUpgradable : 1; + UINT32 BiosShadowingAllowed : 1; + UINT32 VlVesaIsSupported : 1; + UINT32 EscdSupportIsAvailable : 1; + UINT32 BootFromCdIsSupported : 1; + UINT32 SelectableBootIsSupported : 1; + UINT32 RomBiosIsSocketed : 1; + UINT32 BootFromPcmciaIsSupported : 1; + UINT32 EDDSpecificationIsSupported : 1; + UINT32 JapaneseNecFloppyIsSupported : 1; + UINT32 JapaneseToshibaFloppyIsSupported : 1; + UINT32 Floppy525_360IsSupported : 1; + UINT32 Floppy525_12IsSupported : 1; + UINT32 Floppy35_720IsSupported : 1; + UINT32 Floppy35_288IsSupported : 1; + UINT32 PrintScreenIsSupported : 1; + UINT32 Keyboard8042IsSupported : 1; + UINT32 SerialIsSupported : 1; + UINT32 PrinterIsSupported : 1; + UINT32 CgaMonoIsSupported : 1; + UINT32 NecPc98 : 1; + UINT32 ReservedForVendor : 32; ///< Bits 32-63. Bits 32-47 reserved for BIOS vendor + ///< and bits 48-63 reserved for System Vendor. } MISC_BIOS_CHARACTERISTICS; /// @@ -231,14 +231,14 @@ typedef struct { /// within the BIOS Information structure. /// typedef struct { - UINT8 AcpiIsSupported :1; - UINT8 UsbLegacyIsSupported :1; - UINT8 AgpIsSupported :1; - UINT8 I2OBootIsSupported :1; - UINT8 Ls120BootIsSupported :1; - UINT8 AtapiZipDriveBootIsSupported :1; - UINT8 Boot1394IsSupported :1; - UINT8 SmartBatteryIsSupported :1; + UINT8 AcpiIsSupported : 1; + UINT8 UsbLegacyIsSupported : 1; + UINT8 AgpIsSupported : 1; + UINT8 I2OBootIsSupported : 1; + UINT8 Ls120BootIsSupported : 1; + UINT8 AtapiZipDriveBootIsSupported : 1; + UINT8 Boot1394IsSupported : 1; + UINT8 SmartBatteryIsSupported : 1; } MBCE_BIOS_RESERVED; /// @@ -247,65 +247,65 @@ typedef struct { /// within the BIOS Information structure. /// typedef struct { - UINT8 BiosBootSpecIsSupported :1; - UINT8 FunctionKeyNetworkBootIsSupported :1; - UINT8 TargetContentDistributionEnabled :1; - UINT8 UefiSpecificationSupported :1; - UINT8 VirtualMachineSupported :1; - UINT8 ExtensionByte2Reserved :3; + UINT8 BiosBootSpecIsSupported : 1; + UINT8 FunctionKeyNetworkBootIsSupported : 1; + UINT8 TargetContentDistributionEnabled : 1; + UINT8 UefiSpecificationSupported : 1; + UINT8 VirtualMachineSupported : 1; + UINT8 ExtensionByte2Reserved : 3; } MBCE_SYSTEM_RESERVED; /// /// BIOS Characteristics Extension Bytes. /// typedef struct { - MBCE_BIOS_RESERVED BiosReserved; - MBCE_SYSTEM_RESERVED SystemReserved; + MBCE_BIOS_RESERVED BiosReserved; + MBCE_SYSTEM_RESERVED SystemReserved; } MISC_BIOS_CHARACTERISTICS_EXTENSION; /// /// Extended BIOS ROM size. /// typedef struct { - UINT16 Size :14; - UINT16 Unit :2; + UINT16 Size : 14; + UINT16 Unit : 2; } EXTENDED_BIOS_ROM_SIZE; /// /// BIOS Information (Type 0). /// typedef struct { - SMBIOS_STRUCTURE Hdr; - SMBIOS_TABLE_STRING Vendor; - SMBIOS_TABLE_STRING BiosVersion; - UINT16 BiosSegment; - SMBIOS_TABLE_STRING BiosReleaseDate; - UINT8 BiosSize; - MISC_BIOS_CHARACTERISTICS BiosCharacteristics; - UINT8 BIOSCharacteristicsExtensionBytes[2]; - UINT8 SystemBiosMajorRelease; - UINT8 SystemBiosMinorRelease; - UINT8 EmbeddedControllerFirmwareMajorRelease; - UINT8 EmbeddedControllerFirmwareMinorRelease; + SMBIOS_STRUCTURE Hdr; + SMBIOS_TABLE_STRING Vendor; + SMBIOS_TABLE_STRING BiosVersion; + UINT16 BiosSegment; + SMBIOS_TABLE_STRING BiosReleaseDate; + UINT8 BiosSize; + MISC_BIOS_CHARACTERISTICS BiosCharacteristics; + UINT8 BIOSCharacteristicsExtensionBytes[2]; + UINT8 SystemBiosMajorRelease; + UINT8 SystemBiosMinorRelease; + UINT8 EmbeddedControllerFirmwareMajorRelease; + UINT8 EmbeddedControllerFirmwareMinorRelease; // // Add for smbios 3.1.0 // - EXTENDED_BIOS_ROM_SIZE ExtendedBiosSize; + EXTENDED_BIOS_ROM_SIZE ExtendedBiosSize; } SMBIOS_TABLE_TYPE0; /// /// System Wake-up Type. /// typedef enum { - SystemWakeupTypeReserved = 0x00, - SystemWakeupTypeOther = 0x01, - SystemWakeupTypeUnknown = 0x02, - SystemWakeupTypeApmTimer = 0x03, - SystemWakeupTypeModemRing = 0x04, - SystemWakeupTypeLanRemote = 0x05, - SystemWakeupTypePowerSwitch = 0x06, - SystemWakeupTypePciPme = 0x07, - SystemWakeupTypeAcPowerRestored = 0x08 + SystemWakeupTypeReserved = 0x00, + SystemWakeupTypeOther = 0x01, + SystemWakeupTypeUnknown = 0x02, + SystemWakeupTypeApmTimer = 0x03, + SystemWakeupTypeModemRing = 0x04, + SystemWakeupTypeLanRemote = 0x05, + SystemWakeupTypePowerSwitch = 0x06, + SystemWakeupTypePciPme = 0x07, + SystemWakeupTypeAcPowerRestored = 0x08 } MISC_SYSTEM_WAKEUP_TYPE; /// @@ -317,46 +317,46 @@ typedef enum { /// one and only one System Information (Type 1) structure. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - SMBIOS_TABLE_STRING Manufacturer; - SMBIOS_TABLE_STRING ProductName; - SMBIOS_TABLE_STRING Version; - SMBIOS_TABLE_STRING SerialNumber; - GUID Uuid; - UINT8 WakeUpType; ///< The enumeration value from MISC_SYSTEM_WAKEUP_TYPE. - SMBIOS_TABLE_STRING SKUNumber; - SMBIOS_TABLE_STRING Family; + SMBIOS_STRUCTURE Hdr; + SMBIOS_TABLE_STRING Manufacturer; + SMBIOS_TABLE_STRING ProductName; + SMBIOS_TABLE_STRING Version; + SMBIOS_TABLE_STRING SerialNumber; + GUID Uuid; + UINT8 WakeUpType; ///< The enumeration value from MISC_SYSTEM_WAKEUP_TYPE. + SMBIOS_TABLE_STRING SKUNumber; + SMBIOS_TABLE_STRING Family; } SMBIOS_TABLE_TYPE1; /// /// Base Board - Feature Flags. /// typedef struct { - UINT8 Motherboard :1; - UINT8 RequiresDaughterCard :1; - UINT8 Removable :1; - UINT8 Replaceable :1; - UINT8 HotSwappable :1; - UINT8 Reserved :3; + UINT8 Motherboard : 1; + UINT8 RequiresDaughterCard : 1; + UINT8 Removable : 1; + UINT8 Replaceable : 1; + UINT8 HotSwappable : 1; + UINT8 Reserved : 3; } BASE_BOARD_FEATURE_FLAGS; /// /// Base Board - Board Type. /// typedef enum { - BaseBoardTypeUnknown = 0x1, - BaseBoardTypeOther = 0x2, - BaseBoardTypeServerBlade = 0x3, - BaseBoardTypeConnectivitySwitch = 0x4, - BaseBoardTypeSystemManagementModule = 0x5, - BaseBoardTypeProcessorModule = 0x6, - BaseBoardTypeIOModule = 0x7, - BaseBoardTypeMemoryModule = 0x8, - BaseBoardTypeDaughterBoard = 0x9, - BaseBoardTypeMotherBoard = 0xA, - BaseBoardTypeProcessorMemoryModule = 0xB, - BaseBoardTypeProcessorIOModule = 0xC, - BaseBoardTypeInterconnectBoard = 0xD + BaseBoardTypeUnknown = 0x1, + BaseBoardTypeOther = 0x2, + BaseBoardTypeServerBlade = 0x3, + BaseBoardTypeConnectivitySwitch = 0x4, + BaseBoardTypeSystemManagementModule = 0x5, + BaseBoardTypeProcessorModule = 0x6, + BaseBoardTypeIOModule = 0x7, + BaseBoardTypeMemoryModule = 0x8, + BaseBoardTypeDaughterBoard = 0x9, + BaseBoardTypeMotherBoard = 0xA, + BaseBoardTypeProcessorMemoryModule = 0xB, + BaseBoardTypeProcessorIOModule = 0xC, + BaseBoardTypeInterconnectBoard = 0xD } BASE_BOARD_TYPE; /// @@ -366,72 +366,72 @@ typedef enum { /// for example a motherboard, planar, or server blade or other standard system module. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - SMBIOS_TABLE_STRING Manufacturer; - SMBIOS_TABLE_STRING ProductName; - SMBIOS_TABLE_STRING Version; - SMBIOS_TABLE_STRING SerialNumber; - SMBIOS_TABLE_STRING AssetTag; - BASE_BOARD_FEATURE_FLAGS FeatureFlag; - SMBIOS_TABLE_STRING LocationInChassis; - UINT16 ChassisHandle; - UINT8 BoardType; ///< The enumeration value from BASE_BOARD_TYPE. - UINT8 NumberOfContainedObjectHandles; - UINT16 ContainedObjectHandles[1]; + SMBIOS_STRUCTURE Hdr; + SMBIOS_TABLE_STRING Manufacturer; + SMBIOS_TABLE_STRING ProductName; + SMBIOS_TABLE_STRING Version; + SMBIOS_TABLE_STRING SerialNumber; + SMBIOS_TABLE_STRING AssetTag; + BASE_BOARD_FEATURE_FLAGS FeatureFlag; + SMBIOS_TABLE_STRING LocationInChassis; + UINT16 ChassisHandle; + UINT8 BoardType; ///< The enumeration value from BASE_BOARD_TYPE. + UINT8 NumberOfContainedObjectHandles; + UINT16 ContainedObjectHandles[1]; } SMBIOS_TABLE_TYPE2; /// /// System Enclosure or Chassis Types /// typedef enum { - MiscChassisTypeOther = 0x01, - MiscChassisTypeUnknown = 0x02, - MiscChassisTypeDeskTop = 0x03, - MiscChassisTypeLowProfileDesktop = 0x04, - MiscChassisTypePizzaBox = 0x05, - MiscChassisTypeMiniTower = 0x06, - MiscChassisTypeTower = 0x07, - MiscChassisTypePortable = 0x08, - MiscChassisTypeLapTop = 0x09, - MiscChassisTypeNotebook = 0x0A, - MiscChassisTypeHandHeld = 0x0B, - MiscChassisTypeDockingStation = 0x0C, - MiscChassisTypeAllInOne = 0x0D, - MiscChassisTypeSubNotebook = 0x0E, - MiscChassisTypeSpaceSaving = 0x0F, - MiscChassisTypeLunchBox = 0x10, - MiscChassisTypeMainServerChassis = 0x11, - MiscChassisTypeExpansionChassis = 0x12, - MiscChassisTypeSubChassis = 0x13, - MiscChassisTypeBusExpansionChassis = 0x14, - MiscChassisTypePeripheralChassis = 0x15, - MiscChassisTypeRaidChassis = 0x16, - MiscChassisTypeRackMountChassis = 0x17, - MiscChassisTypeSealedCasePc = 0x18, - MiscChassisMultiSystemChassis = 0x19, - MiscChassisCompactPCI = 0x1A, - MiscChassisAdvancedTCA = 0x1B, - MiscChassisBlade = 0x1C, - MiscChassisBladeEnclosure = 0x1D, - MiscChassisTablet = 0x1E, - MiscChassisConvertible = 0x1F, - MiscChassisDetachable = 0x20, - MiscChassisIoTGateway = 0x21, - MiscChassisEmbeddedPc = 0x22, - MiscChassisMiniPc = 0x23, - MiscChassisStickPc = 0x24 + MiscChassisTypeOther = 0x01, + MiscChassisTypeUnknown = 0x02, + MiscChassisTypeDeskTop = 0x03, + MiscChassisTypeLowProfileDesktop = 0x04, + MiscChassisTypePizzaBox = 0x05, + MiscChassisTypeMiniTower = 0x06, + MiscChassisTypeTower = 0x07, + MiscChassisTypePortable = 0x08, + MiscChassisTypeLapTop = 0x09, + MiscChassisTypeNotebook = 0x0A, + MiscChassisTypeHandHeld = 0x0B, + MiscChassisTypeDockingStation = 0x0C, + MiscChassisTypeAllInOne = 0x0D, + MiscChassisTypeSubNotebook = 0x0E, + MiscChassisTypeSpaceSaving = 0x0F, + MiscChassisTypeLunchBox = 0x10, + MiscChassisTypeMainServerChassis = 0x11, + MiscChassisTypeExpansionChassis = 0x12, + MiscChassisTypeSubChassis = 0x13, + MiscChassisTypeBusExpansionChassis = 0x14, + MiscChassisTypePeripheralChassis = 0x15, + MiscChassisTypeRaidChassis = 0x16, + MiscChassisTypeRackMountChassis = 0x17, + MiscChassisTypeSealedCasePc = 0x18, + MiscChassisMultiSystemChassis = 0x19, + MiscChassisCompactPCI = 0x1A, + MiscChassisAdvancedTCA = 0x1B, + MiscChassisBlade = 0x1C, + MiscChassisBladeEnclosure = 0x1D, + MiscChassisTablet = 0x1E, + MiscChassisConvertible = 0x1F, + MiscChassisDetachable = 0x20, + MiscChassisIoTGateway = 0x21, + MiscChassisEmbeddedPc = 0x22, + MiscChassisMiniPc = 0x23, + MiscChassisStickPc = 0x24 } MISC_CHASSIS_TYPE; /// /// System Enclosure or Chassis States . /// typedef enum { - ChassisStateOther = 0x01, - ChassisStateUnknown = 0x02, - ChassisStateSafe = 0x03, - ChassisStateWarning = 0x04, - ChassisStateCritical = 0x05, - ChassisStateNonRecoverable = 0x06 + ChassisStateOther = 0x01, + ChassisStateUnknown = 0x02, + ChassisStateSafe = 0x03, + ChassisStateWarning = 0x04, + ChassisStateCritical = 0x05, + ChassisStateNonRecoverable = 0x06 } MISC_CHASSIS_STATE; /// @@ -449,12 +449,11 @@ typedef enum { /// Contained Element record /// typedef struct { - UINT8 ContainedElementType; - UINT8 ContainedElementMinimum; - UINT8 ContainedElementMaximum; + UINT8 ContainedElementType; + UINT8 ContainedElementMinimum; + UINT8 ContainedElementMaximum; } CONTAINED_ELEMENT; - /// /// System Enclosure or Chassis (Type 3). /// @@ -465,25 +464,25 @@ typedef struct { /// support the population of the CIM_Chassis class. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - SMBIOS_TABLE_STRING Manufacturer; - UINT8 Type; - SMBIOS_TABLE_STRING Version; - SMBIOS_TABLE_STRING SerialNumber; - SMBIOS_TABLE_STRING AssetTag; - UINT8 BootupState; ///< The enumeration value from MISC_CHASSIS_STATE. - UINT8 PowerSupplyState; ///< The enumeration value from MISC_CHASSIS_STATE. - UINT8 ThermalState; ///< The enumeration value from MISC_CHASSIS_STATE. - UINT8 SecurityStatus; ///< The enumeration value from MISC_CHASSIS_SECURITY_STATE. - UINT8 OemDefined[4]; - UINT8 Height; - UINT8 NumberofPowerCords; - UINT8 ContainedElementCount; - UINT8 ContainedElementRecordLength; + SMBIOS_STRUCTURE Hdr; + SMBIOS_TABLE_STRING Manufacturer; + UINT8 Type; + SMBIOS_TABLE_STRING Version; + SMBIOS_TABLE_STRING SerialNumber; + SMBIOS_TABLE_STRING AssetTag; + UINT8 BootupState; ///< The enumeration value from MISC_CHASSIS_STATE. + UINT8 PowerSupplyState; ///< The enumeration value from MISC_CHASSIS_STATE. + UINT8 ThermalState; ///< The enumeration value from MISC_CHASSIS_STATE. + UINT8 SecurityStatus; ///< The enumeration value from MISC_CHASSIS_SECURITY_STATE. + UINT8 OemDefined[4]; + UINT8 Height; + UINT8 NumberofPowerCords; + UINT8 ContainedElementCount; + UINT8 ContainedElementRecordLength; // // Can have 0 to (ContainedElementCount * ContainedElementRecordLength) contained elements // - CONTAINED_ELEMENT ContainedElements[1]; + CONTAINED_ELEMENT ContainedElements[1]; // // Add for smbios 2.7 // @@ -510,289 +509,289 @@ typedef enum { /// Processor Information - Processor Family. /// typedef enum { - ProcessorFamilyOther = 0x01, - ProcessorFamilyUnknown = 0x02, - ProcessorFamily8086 = 0x03, - ProcessorFamily80286 = 0x04, - ProcessorFamilyIntel386 = 0x05, - ProcessorFamilyIntel486 = 0x06, - ProcessorFamily8087 = 0x07, - ProcessorFamily80287 = 0x08, - ProcessorFamily80387 = 0x09, - ProcessorFamily80487 = 0x0A, - ProcessorFamilyPentium = 0x0B, - ProcessorFamilyPentiumPro = 0x0C, - ProcessorFamilyPentiumII = 0x0D, - ProcessorFamilyPentiumMMX = 0x0E, - ProcessorFamilyCeleron = 0x0F, - ProcessorFamilyPentiumIIXeon = 0x10, - ProcessorFamilyPentiumIII = 0x11, - ProcessorFamilyM1 = 0x12, - ProcessorFamilyM2 = 0x13, - ProcessorFamilyIntelCeleronM = 0x14, - ProcessorFamilyIntelPentium4Ht = 0x15, - ProcessorFamilyAmdDuron = 0x18, - ProcessorFamilyK5 = 0x19, - ProcessorFamilyK6 = 0x1A, - ProcessorFamilyK6_2 = 0x1B, - ProcessorFamilyK6_3 = 0x1C, - ProcessorFamilyAmdAthlon = 0x1D, - ProcessorFamilyAmd29000 = 0x1E, - ProcessorFamilyK6_2Plus = 0x1F, - ProcessorFamilyPowerPC = 0x20, - ProcessorFamilyPowerPC601 = 0x21, - ProcessorFamilyPowerPC603 = 0x22, - ProcessorFamilyPowerPC603Plus = 0x23, - ProcessorFamilyPowerPC604 = 0x24, - ProcessorFamilyPowerPC620 = 0x25, - ProcessorFamilyPowerPCx704 = 0x26, - ProcessorFamilyPowerPC750 = 0x27, - ProcessorFamilyIntelCoreDuo = 0x28, - ProcessorFamilyIntelCoreDuoMobile = 0x29, - ProcessorFamilyIntelCoreSoloMobile = 0x2A, - ProcessorFamilyIntelAtom = 0x2B, - ProcessorFamilyIntelCoreM = 0x2C, - ProcessorFamilyIntelCorem3 = 0x2D, - ProcessorFamilyIntelCorem5 = 0x2E, - ProcessorFamilyIntelCorem7 = 0x2F, - ProcessorFamilyAlpha = 0x30, - ProcessorFamilyAlpha21064 = 0x31, - ProcessorFamilyAlpha21066 = 0x32, - ProcessorFamilyAlpha21164 = 0x33, - ProcessorFamilyAlpha21164PC = 0x34, - ProcessorFamilyAlpha21164a = 0x35, - ProcessorFamilyAlpha21264 = 0x36, - ProcessorFamilyAlpha21364 = 0x37, - ProcessorFamilyAmdTurionIIUltraDualCoreMobileM = 0x38, - ProcessorFamilyAmdTurionIIDualCoreMobileM = 0x39, - ProcessorFamilyAmdAthlonIIDualCoreM = 0x3A, - ProcessorFamilyAmdOpteron6100Series = 0x3B, - ProcessorFamilyAmdOpteron4100Series = 0x3C, - ProcessorFamilyAmdOpteron6200Series = 0x3D, - ProcessorFamilyAmdOpteron4200Series = 0x3E, - ProcessorFamilyAmdFxSeries = 0x3F, - ProcessorFamilyMips = 0x40, - ProcessorFamilyMIPSR4000 = 0x41, - ProcessorFamilyMIPSR4200 = 0x42, - ProcessorFamilyMIPSR4400 = 0x43, - ProcessorFamilyMIPSR4600 = 0x44, - ProcessorFamilyMIPSR10000 = 0x45, - ProcessorFamilyAmdCSeries = 0x46, - ProcessorFamilyAmdESeries = 0x47, - ProcessorFamilyAmdASeries = 0x48, ///< SMBIOS spec 2.8.0 updated the name - ProcessorFamilyAmdGSeries = 0x49, - ProcessorFamilyAmdZSeries = 0x4A, - ProcessorFamilyAmdRSeries = 0x4B, - ProcessorFamilyAmdOpteron4300 = 0x4C, - ProcessorFamilyAmdOpteron6300 = 0x4D, - ProcessorFamilyAmdOpteron3300 = 0x4E, - ProcessorFamilyAmdFireProSeries = 0x4F, - ProcessorFamilySparc = 0x50, - ProcessorFamilySuperSparc = 0x51, - ProcessorFamilymicroSparcII = 0x52, - ProcessorFamilymicroSparcIIep = 0x53, - ProcessorFamilyUltraSparc = 0x54, - ProcessorFamilyUltraSparcII = 0x55, - ProcessorFamilyUltraSparcIii = 0x56, - ProcessorFamilyUltraSparcIII = 0x57, - ProcessorFamilyUltraSparcIIIi = 0x58, - ProcessorFamily68040 = 0x60, - ProcessorFamily68xxx = 0x61, - ProcessorFamily68000 = 0x62, - ProcessorFamily68010 = 0x63, - ProcessorFamily68020 = 0x64, - ProcessorFamily68030 = 0x65, - ProcessorFamilyAmdAthlonX4QuadCore = 0x66, - ProcessorFamilyAmdOpteronX1000Series = 0x67, - ProcessorFamilyAmdOpteronX2000Series = 0x68, - ProcessorFamilyAmdOpteronASeries = 0x69, - ProcessorFamilyAmdOpteronX3000Series = 0x6A, - ProcessorFamilyAmdZen = 0x6B, - ProcessorFamilyHobbit = 0x70, - ProcessorFamilyCrusoeTM5000 = 0x78, - ProcessorFamilyCrusoeTM3000 = 0x79, - ProcessorFamilyEfficeonTM8000 = 0x7A, - ProcessorFamilyWeitek = 0x80, - ProcessorFamilyItanium = 0x82, - ProcessorFamilyAmdAthlon64 = 0x83, - ProcessorFamilyAmdOpteron = 0x84, - ProcessorFamilyAmdSempron = 0x85, - ProcessorFamilyAmdTurion64Mobile = 0x86, - ProcessorFamilyDualCoreAmdOpteron = 0x87, - ProcessorFamilyAmdAthlon64X2DualCore = 0x88, - ProcessorFamilyAmdTurion64X2Mobile = 0x89, - ProcessorFamilyQuadCoreAmdOpteron = 0x8A, - ProcessorFamilyThirdGenerationAmdOpteron = 0x8B, - ProcessorFamilyAmdPhenomFxQuadCore = 0x8C, - ProcessorFamilyAmdPhenomX4QuadCore = 0x8D, - ProcessorFamilyAmdPhenomX2DualCore = 0x8E, - ProcessorFamilyAmdAthlonX2DualCore = 0x8F, - ProcessorFamilyPARISC = 0x90, - ProcessorFamilyPaRisc8500 = 0x91, - ProcessorFamilyPaRisc8000 = 0x92, - ProcessorFamilyPaRisc7300LC = 0x93, - ProcessorFamilyPaRisc7200 = 0x94, - ProcessorFamilyPaRisc7100LC = 0x95, - ProcessorFamilyPaRisc7100 = 0x96, - ProcessorFamilyV30 = 0xA0, - ProcessorFamilyQuadCoreIntelXeon3200Series = 0xA1, - ProcessorFamilyDualCoreIntelXeon3000Series = 0xA2, - ProcessorFamilyQuadCoreIntelXeon5300Series = 0xA3, - ProcessorFamilyDualCoreIntelXeon5100Series = 0xA4, - ProcessorFamilyDualCoreIntelXeon5000Series = 0xA5, - ProcessorFamilyDualCoreIntelXeonLV = 0xA6, - ProcessorFamilyDualCoreIntelXeonULV = 0xA7, - ProcessorFamilyDualCoreIntelXeon7100Series = 0xA8, - ProcessorFamilyQuadCoreIntelXeon5400Series = 0xA9, - ProcessorFamilyQuadCoreIntelXeon = 0xAA, - ProcessorFamilyDualCoreIntelXeon5200Series = 0xAB, - ProcessorFamilyDualCoreIntelXeon7200Series = 0xAC, - ProcessorFamilyQuadCoreIntelXeon7300Series = 0xAD, - ProcessorFamilyQuadCoreIntelXeon7400Series = 0xAE, - ProcessorFamilyMultiCoreIntelXeon7400Series = 0xAF, - ProcessorFamilyPentiumIIIXeon = 0xB0, - ProcessorFamilyPentiumIIISpeedStep = 0xB1, - ProcessorFamilyPentium4 = 0xB2, - ProcessorFamilyIntelXeon = 0xB3, - ProcessorFamilyAS400 = 0xB4, - ProcessorFamilyIntelXeonMP = 0xB5, - ProcessorFamilyAMDAthlonXP = 0xB6, - ProcessorFamilyAMDAthlonMP = 0xB7, - ProcessorFamilyIntelItanium2 = 0xB8, - ProcessorFamilyIntelPentiumM = 0xB9, - ProcessorFamilyIntelCeleronD = 0xBA, - ProcessorFamilyIntelPentiumD = 0xBB, - ProcessorFamilyIntelPentiumEx = 0xBC, - ProcessorFamilyIntelCoreSolo = 0xBD, ///< SMBIOS spec 2.6 updated this value - ProcessorFamilyReserved = 0xBE, - ProcessorFamilyIntelCore2 = 0xBF, - ProcessorFamilyIntelCore2Solo = 0xC0, - ProcessorFamilyIntelCore2Extreme = 0xC1, - ProcessorFamilyIntelCore2Quad = 0xC2, - ProcessorFamilyIntelCore2ExtremeMobile = 0xC3, - ProcessorFamilyIntelCore2DuoMobile = 0xC4, - ProcessorFamilyIntelCore2SoloMobile = 0xC5, - ProcessorFamilyIntelCoreI7 = 0xC6, - ProcessorFamilyDualCoreIntelCeleron = 0xC7, - ProcessorFamilyIBM390 = 0xC8, - ProcessorFamilyG4 = 0xC9, - ProcessorFamilyG5 = 0xCA, - ProcessorFamilyG6 = 0xCB, - ProcessorFamilyzArchitecture = 0xCC, - ProcessorFamilyIntelCoreI5 = 0xCD, - ProcessorFamilyIntelCoreI3 = 0xCE, - ProcessorFamilyIntelCoreI9 = 0xCF, - ProcessorFamilyViaC7M = 0xD2, - ProcessorFamilyViaC7D = 0xD3, - ProcessorFamilyViaC7 = 0xD4, - ProcessorFamilyViaEden = 0xD5, - ProcessorFamilyMultiCoreIntelXeon = 0xD6, - ProcessorFamilyDualCoreIntelXeon3Series = 0xD7, - ProcessorFamilyQuadCoreIntelXeon3Series = 0xD8, - ProcessorFamilyViaNano = 0xD9, - ProcessorFamilyDualCoreIntelXeon5Series = 0xDA, - ProcessorFamilyQuadCoreIntelXeon5Series = 0xDB, - ProcessorFamilyDualCoreIntelXeon7Series = 0xDD, - ProcessorFamilyQuadCoreIntelXeon7Series = 0xDE, - ProcessorFamilyMultiCoreIntelXeon7Series = 0xDF, - ProcessorFamilyMultiCoreIntelXeon3400Series = 0xE0, - ProcessorFamilyAmdOpteron3000Series = 0xE4, - ProcessorFamilyAmdSempronII = 0xE5, - ProcessorFamilyEmbeddedAmdOpteronQuadCore = 0xE6, - ProcessorFamilyAmdPhenomTripleCore = 0xE7, - ProcessorFamilyAmdTurionUltraDualCoreMobile = 0xE8, - ProcessorFamilyAmdTurionDualCoreMobile = 0xE9, - ProcessorFamilyAmdAthlonDualCore = 0xEA, - ProcessorFamilyAmdSempronSI = 0xEB, - ProcessorFamilyAmdPhenomII = 0xEC, - ProcessorFamilyAmdAthlonII = 0xED, - ProcessorFamilySixCoreAmdOpteron = 0xEE, - ProcessorFamilyAmdSempronM = 0xEF, - ProcessorFamilyi860 = 0xFA, - ProcessorFamilyi960 = 0xFB, - ProcessorFamilyIndicatorFamily2 = 0xFE, - ProcessorFamilyReserved1 = 0xFF + ProcessorFamilyOther = 0x01, + ProcessorFamilyUnknown = 0x02, + ProcessorFamily8086 = 0x03, + ProcessorFamily80286 = 0x04, + ProcessorFamilyIntel386 = 0x05, + ProcessorFamilyIntel486 = 0x06, + ProcessorFamily8087 = 0x07, + ProcessorFamily80287 = 0x08, + ProcessorFamily80387 = 0x09, + ProcessorFamily80487 = 0x0A, + ProcessorFamilyPentium = 0x0B, + ProcessorFamilyPentiumPro = 0x0C, + ProcessorFamilyPentiumII = 0x0D, + ProcessorFamilyPentiumMMX = 0x0E, + ProcessorFamilyCeleron = 0x0F, + ProcessorFamilyPentiumIIXeon = 0x10, + ProcessorFamilyPentiumIII = 0x11, + ProcessorFamilyM1 = 0x12, + ProcessorFamilyM2 = 0x13, + ProcessorFamilyIntelCeleronM = 0x14, + ProcessorFamilyIntelPentium4Ht = 0x15, + ProcessorFamilyAmdDuron = 0x18, + ProcessorFamilyK5 = 0x19, + ProcessorFamilyK6 = 0x1A, + ProcessorFamilyK6_2 = 0x1B, + ProcessorFamilyK6_3 = 0x1C, + ProcessorFamilyAmdAthlon = 0x1D, + ProcessorFamilyAmd29000 = 0x1E, + ProcessorFamilyK6_2Plus = 0x1F, + ProcessorFamilyPowerPC = 0x20, + ProcessorFamilyPowerPC601 = 0x21, + ProcessorFamilyPowerPC603 = 0x22, + ProcessorFamilyPowerPC603Plus = 0x23, + ProcessorFamilyPowerPC604 = 0x24, + ProcessorFamilyPowerPC620 = 0x25, + ProcessorFamilyPowerPCx704 = 0x26, + ProcessorFamilyPowerPC750 = 0x27, + ProcessorFamilyIntelCoreDuo = 0x28, + ProcessorFamilyIntelCoreDuoMobile = 0x29, + ProcessorFamilyIntelCoreSoloMobile = 0x2A, + ProcessorFamilyIntelAtom = 0x2B, + ProcessorFamilyIntelCoreM = 0x2C, + ProcessorFamilyIntelCorem3 = 0x2D, + ProcessorFamilyIntelCorem5 = 0x2E, + ProcessorFamilyIntelCorem7 = 0x2F, + ProcessorFamilyAlpha = 0x30, + ProcessorFamilyAlpha21064 = 0x31, + ProcessorFamilyAlpha21066 = 0x32, + ProcessorFamilyAlpha21164 = 0x33, + ProcessorFamilyAlpha21164PC = 0x34, + ProcessorFamilyAlpha21164a = 0x35, + ProcessorFamilyAlpha21264 = 0x36, + ProcessorFamilyAlpha21364 = 0x37, + ProcessorFamilyAmdTurionIIUltraDualCoreMobileM = 0x38, + ProcessorFamilyAmdTurionIIDualCoreMobileM = 0x39, + ProcessorFamilyAmdAthlonIIDualCoreM = 0x3A, + ProcessorFamilyAmdOpteron6100Series = 0x3B, + ProcessorFamilyAmdOpteron4100Series = 0x3C, + ProcessorFamilyAmdOpteron6200Series = 0x3D, + ProcessorFamilyAmdOpteron4200Series = 0x3E, + ProcessorFamilyAmdFxSeries = 0x3F, + ProcessorFamilyMips = 0x40, + ProcessorFamilyMIPSR4000 = 0x41, + ProcessorFamilyMIPSR4200 = 0x42, + ProcessorFamilyMIPSR4400 = 0x43, + ProcessorFamilyMIPSR4600 = 0x44, + ProcessorFamilyMIPSR10000 = 0x45, + ProcessorFamilyAmdCSeries = 0x46, + ProcessorFamilyAmdESeries = 0x47, + ProcessorFamilyAmdASeries = 0x48, ///< SMBIOS spec 2.8.0 updated the name + ProcessorFamilyAmdGSeries = 0x49, + ProcessorFamilyAmdZSeries = 0x4A, + ProcessorFamilyAmdRSeries = 0x4B, + ProcessorFamilyAmdOpteron4300 = 0x4C, + ProcessorFamilyAmdOpteron6300 = 0x4D, + ProcessorFamilyAmdOpteron3300 = 0x4E, + ProcessorFamilyAmdFireProSeries = 0x4F, + ProcessorFamilySparc = 0x50, + ProcessorFamilySuperSparc = 0x51, + ProcessorFamilymicroSparcII = 0x52, + ProcessorFamilymicroSparcIIep = 0x53, + ProcessorFamilyUltraSparc = 0x54, + ProcessorFamilyUltraSparcII = 0x55, + ProcessorFamilyUltraSparcIii = 0x56, + ProcessorFamilyUltraSparcIII = 0x57, + ProcessorFamilyUltraSparcIIIi = 0x58, + ProcessorFamily68040 = 0x60, + ProcessorFamily68xxx = 0x61, + ProcessorFamily68000 = 0x62, + ProcessorFamily68010 = 0x63, + ProcessorFamily68020 = 0x64, + ProcessorFamily68030 = 0x65, + ProcessorFamilyAmdAthlonX4QuadCore = 0x66, + ProcessorFamilyAmdOpteronX1000Series = 0x67, + ProcessorFamilyAmdOpteronX2000Series = 0x68, + ProcessorFamilyAmdOpteronASeries = 0x69, + ProcessorFamilyAmdOpteronX3000Series = 0x6A, + ProcessorFamilyAmdZen = 0x6B, + ProcessorFamilyHobbit = 0x70, + ProcessorFamilyCrusoeTM5000 = 0x78, + ProcessorFamilyCrusoeTM3000 = 0x79, + ProcessorFamilyEfficeonTM8000 = 0x7A, + ProcessorFamilyWeitek = 0x80, + ProcessorFamilyItanium = 0x82, + ProcessorFamilyAmdAthlon64 = 0x83, + ProcessorFamilyAmdOpteron = 0x84, + ProcessorFamilyAmdSempron = 0x85, + ProcessorFamilyAmdTurion64Mobile = 0x86, + ProcessorFamilyDualCoreAmdOpteron = 0x87, + ProcessorFamilyAmdAthlon64X2DualCore = 0x88, + ProcessorFamilyAmdTurion64X2Mobile = 0x89, + ProcessorFamilyQuadCoreAmdOpteron = 0x8A, + ProcessorFamilyThirdGenerationAmdOpteron = 0x8B, + ProcessorFamilyAmdPhenomFxQuadCore = 0x8C, + ProcessorFamilyAmdPhenomX4QuadCore = 0x8D, + ProcessorFamilyAmdPhenomX2DualCore = 0x8E, + ProcessorFamilyAmdAthlonX2DualCore = 0x8F, + ProcessorFamilyPARISC = 0x90, + ProcessorFamilyPaRisc8500 = 0x91, + ProcessorFamilyPaRisc8000 = 0x92, + ProcessorFamilyPaRisc7300LC = 0x93, + ProcessorFamilyPaRisc7200 = 0x94, + ProcessorFamilyPaRisc7100LC = 0x95, + ProcessorFamilyPaRisc7100 = 0x96, + ProcessorFamilyV30 = 0xA0, + ProcessorFamilyQuadCoreIntelXeon3200Series = 0xA1, + ProcessorFamilyDualCoreIntelXeon3000Series = 0xA2, + ProcessorFamilyQuadCoreIntelXeon5300Series = 0xA3, + ProcessorFamilyDualCoreIntelXeon5100Series = 0xA4, + ProcessorFamilyDualCoreIntelXeon5000Series = 0xA5, + ProcessorFamilyDualCoreIntelXeonLV = 0xA6, + ProcessorFamilyDualCoreIntelXeonULV = 0xA7, + ProcessorFamilyDualCoreIntelXeon7100Series = 0xA8, + ProcessorFamilyQuadCoreIntelXeon5400Series = 0xA9, + ProcessorFamilyQuadCoreIntelXeon = 0xAA, + ProcessorFamilyDualCoreIntelXeon5200Series = 0xAB, + ProcessorFamilyDualCoreIntelXeon7200Series = 0xAC, + ProcessorFamilyQuadCoreIntelXeon7300Series = 0xAD, + ProcessorFamilyQuadCoreIntelXeon7400Series = 0xAE, + ProcessorFamilyMultiCoreIntelXeon7400Series = 0xAF, + ProcessorFamilyPentiumIIIXeon = 0xB0, + ProcessorFamilyPentiumIIISpeedStep = 0xB1, + ProcessorFamilyPentium4 = 0xB2, + ProcessorFamilyIntelXeon = 0xB3, + ProcessorFamilyAS400 = 0xB4, + ProcessorFamilyIntelXeonMP = 0xB5, + ProcessorFamilyAMDAthlonXP = 0xB6, + ProcessorFamilyAMDAthlonMP = 0xB7, + ProcessorFamilyIntelItanium2 = 0xB8, + ProcessorFamilyIntelPentiumM = 0xB9, + ProcessorFamilyIntelCeleronD = 0xBA, + ProcessorFamilyIntelPentiumD = 0xBB, + ProcessorFamilyIntelPentiumEx = 0xBC, + ProcessorFamilyIntelCoreSolo = 0xBD, ///< SMBIOS spec 2.6 updated this value + ProcessorFamilyReserved = 0xBE, + ProcessorFamilyIntelCore2 = 0xBF, + ProcessorFamilyIntelCore2Solo = 0xC0, + ProcessorFamilyIntelCore2Extreme = 0xC1, + ProcessorFamilyIntelCore2Quad = 0xC2, + ProcessorFamilyIntelCore2ExtremeMobile = 0xC3, + ProcessorFamilyIntelCore2DuoMobile = 0xC4, + ProcessorFamilyIntelCore2SoloMobile = 0xC5, + ProcessorFamilyIntelCoreI7 = 0xC6, + ProcessorFamilyDualCoreIntelCeleron = 0xC7, + ProcessorFamilyIBM390 = 0xC8, + ProcessorFamilyG4 = 0xC9, + ProcessorFamilyG5 = 0xCA, + ProcessorFamilyG6 = 0xCB, + ProcessorFamilyzArchitecture = 0xCC, + ProcessorFamilyIntelCoreI5 = 0xCD, + ProcessorFamilyIntelCoreI3 = 0xCE, + ProcessorFamilyIntelCoreI9 = 0xCF, + ProcessorFamilyViaC7M = 0xD2, + ProcessorFamilyViaC7D = 0xD3, + ProcessorFamilyViaC7 = 0xD4, + ProcessorFamilyViaEden = 0xD5, + ProcessorFamilyMultiCoreIntelXeon = 0xD6, + ProcessorFamilyDualCoreIntelXeon3Series = 0xD7, + ProcessorFamilyQuadCoreIntelXeon3Series = 0xD8, + ProcessorFamilyViaNano = 0xD9, + ProcessorFamilyDualCoreIntelXeon5Series = 0xDA, + ProcessorFamilyQuadCoreIntelXeon5Series = 0xDB, + ProcessorFamilyDualCoreIntelXeon7Series = 0xDD, + ProcessorFamilyQuadCoreIntelXeon7Series = 0xDE, + ProcessorFamilyMultiCoreIntelXeon7Series = 0xDF, + ProcessorFamilyMultiCoreIntelXeon3400Series = 0xE0, + ProcessorFamilyAmdOpteron3000Series = 0xE4, + ProcessorFamilyAmdSempronII = 0xE5, + ProcessorFamilyEmbeddedAmdOpteronQuadCore = 0xE6, + ProcessorFamilyAmdPhenomTripleCore = 0xE7, + ProcessorFamilyAmdTurionUltraDualCoreMobile = 0xE8, + ProcessorFamilyAmdTurionDualCoreMobile = 0xE9, + ProcessorFamilyAmdAthlonDualCore = 0xEA, + ProcessorFamilyAmdSempronSI = 0xEB, + ProcessorFamilyAmdPhenomII = 0xEC, + ProcessorFamilyAmdAthlonII = 0xED, + ProcessorFamilySixCoreAmdOpteron = 0xEE, + ProcessorFamilyAmdSempronM = 0xEF, + ProcessorFamilyi860 = 0xFA, + ProcessorFamilyi960 = 0xFB, + ProcessorFamilyIndicatorFamily2 = 0xFE, + ProcessorFamilyReserved1 = 0xFF } PROCESSOR_FAMILY_DATA; /// /// Processor Information2 - Processor Family2. /// typedef enum { - ProcessorFamilyARMv7 = 0x0100, - ProcessorFamilyARMv8 = 0x0101, - ProcessorFamilySH3 = 0x0104, - ProcessorFamilySH4 = 0x0105, - ProcessorFamilyARM = 0x0118, - ProcessorFamilyStrongARM = 0x0119, - ProcessorFamily6x86 = 0x012C, - ProcessorFamilyMediaGX = 0x012D, - ProcessorFamilyMII = 0x012E, - ProcessorFamilyWinChip = 0x0140, - ProcessorFamilyDSP = 0x015E, - ProcessorFamilyVideoProcessor = 0x01F4, - ProcessorFamilyRiscvRV32 = 0x0200, - ProcessorFamilyRiscVRV64 = 0x0201, - ProcessorFamilyRiscVRV128 = 0x0202 + ProcessorFamilyARMv7 = 0x0100, + ProcessorFamilyARMv8 = 0x0101, + ProcessorFamilySH3 = 0x0104, + ProcessorFamilySH4 = 0x0105, + ProcessorFamilyARM = 0x0118, + ProcessorFamilyStrongARM = 0x0119, + ProcessorFamily6x86 = 0x012C, + ProcessorFamilyMediaGX = 0x012D, + ProcessorFamilyMII = 0x012E, + ProcessorFamilyWinChip = 0x0140, + ProcessorFamilyDSP = 0x015E, + ProcessorFamilyVideoProcessor = 0x01F4, + ProcessorFamilyRiscvRV32 = 0x0200, + ProcessorFamilyRiscVRV64 = 0x0201, + ProcessorFamilyRiscVRV128 = 0x0202 } PROCESSOR_FAMILY2_DATA; /// /// Processor Information - Voltage. /// typedef struct { - UINT8 ProcessorVoltageCapability5V :1; - UINT8 ProcessorVoltageCapability3_3V :1; - UINT8 ProcessorVoltageCapability2_9V :1; - UINT8 ProcessorVoltageCapabilityReserved :1; ///< Bit 3, must be zero. - UINT8 ProcessorVoltageReserved :3; ///< Bits 4-6, must be zero. - UINT8 ProcessorVoltageIndicateLegacy :1; + UINT8 ProcessorVoltageCapability5V : 1; + UINT8 ProcessorVoltageCapability3_3V : 1; + UINT8 ProcessorVoltageCapability2_9V : 1; + UINT8 ProcessorVoltageCapabilityReserved : 1; ///< Bit 3, must be zero. + UINT8 ProcessorVoltageReserved : 3; ///< Bits 4-6, must be zero. + UINT8 ProcessorVoltageIndicateLegacy : 1; } PROCESSOR_VOLTAGE; /// /// Processor Information - Processor Upgrade. /// typedef enum { - ProcessorUpgradeOther = 0x01, - ProcessorUpgradeUnknown = 0x02, - ProcessorUpgradeDaughterBoard = 0x03, - ProcessorUpgradeZIFSocket = 0x04, - ProcessorUpgradePiggyBack = 0x05, ///< Replaceable. - ProcessorUpgradeNone = 0x06, - ProcessorUpgradeLIFSocket = 0x07, - ProcessorUpgradeSlot1 = 0x08, - ProcessorUpgradeSlot2 = 0x09, - ProcessorUpgrade370PinSocket = 0x0A, - ProcessorUpgradeSlotA = 0x0B, - ProcessorUpgradeSlotM = 0x0C, - ProcessorUpgradeSocket423 = 0x0D, - ProcessorUpgradeSocketA = 0x0E, ///< Socket 462. - ProcessorUpgradeSocket478 = 0x0F, - ProcessorUpgradeSocket754 = 0x10, - ProcessorUpgradeSocket940 = 0x11, - ProcessorUpgradeSocket939 = 0x12, - ProcessorUpgradeSocketmPGA604 = 0x13, - ProcessorUpgradeSocketLGA771 = 0x14, - ProcessorUpgradeSocketLGA775 = 0x15, - ProcessorUpgradeSocketS1 = 0x16, - ProcessorUpgradeAM2 = 0x17, - ProcessorUpgradeF1207 = 0x18, - ProcessorSocketLGA1366 = 0x19, - ProcessorUpgradeSocketG34 = 0x1A, - ProcessorUpgradeSocketAM3 = 0x1B, - ProcessorUpgradeSocketC32 = 0x1C, - ProcessorUpgradeSocketLGA1156 = 0x1D, - ProcessorUpgradeSocketLGA1567 = 0x1E, - ProcessorUpgradeSocketPGA988A = 0x1F, - ProcessorUpgradeSocketBGA1288 = 0x20, - ProcessorUpgradeSocketrPGA988B = 0x21, - ProcessorUpgradeSocketBGA1023 = 0x22, - ProcessorUpgradeSocketBGA1224 = 0x23, - ProcessorUpgradeSocketLGA1155 = 0x24, ///< SMBIOS spec 2.8.0 updated the name - ProcessorUpgradeSocketLGA1356 = 0x25, - ProcessorUpgradeSocketLGA2011 = 0x26, - ProcessorUpgradeSocketFS1 = 0x27, - ProcessorUpgradeSocketFS2 = 0x28, - ProcessorUpgradeSocketFM1 = 0x29, - ProcessorUpgradeSocketFM2 = 0x2A, + ProcessorUpgradeOther = 0x01, + ProcessorUpgradeUnknown = 0x02, + ProcessorUpgradeDaughterBoard = 0x03, + ProcessorUpgradeZIFSocket = 0x04, + ProcessorUpgradePiggyBack = 0x05, ///< Replaceable. + ProcessorUpgradeNone = 0x06, + ProcessorUpgradeLIFSocket = 0x07, + ProcessorUpgradeSlot1 = 0x08, + ProcessorUpgradeSlot2 = 0x09, + ProcessorUpgrade370PinSocket = 0x0A, + ProcessorUpgradeSlotA = 0x0B, + ProcessorUpgradeSlotM = 0x0C, + ProcessorUpgradeSocket423 = 0x0D, + ProcessorUpgradeSocketA = 0x0E, ///< Socket 462. + ProcessorUpgradeSocket478 = 0x0F, + ProcessorUpgradeSocket754 = 0x10, + ProcessorUpgradeSocket940 = 0x11, + ProcessorUpgradeSocket939 = 0x12, + ProcessorUpgradeSocketmPGA604 = 0x13, + ProcessorUpgradeSocketLGA771 = 0x14, + ProcessorUpgradeSocketLGA775 = 0x15, + ProcessorUpgradeSocketS1 = 0x16, + ProcessorUpgradeAM2 = 0x17, + ProcessorUpgradeF1207 = 0x18, + ProcessorSocketLGA1366 = 0x19, + ProcessorUpgradeSocketG34 = 0x1A, + ProcessorUpgradeSocketAM3 = 0x1B, + ProcessorUpgradeSocketC32 = 0x1C, + ProcessorUpgradeSocketLGA1156 = 0x1D, + ProcessorUpgradeSocketLGA1567 = 0x1E, + ProcessorUpgradeSocketPGA988A = 0x1F, + ProcessorUpgradeSocketBGA1288 = 0x20, + ProcessorUpgradeSocketrPGA988B = 0x21, + ProcessorUpgradeSocketBGA1023 = 0x22, + ProcessorUpgradeSocketBGA1224 = 0x23, + ProcessorUpgradeSocketLGA1155 = 0x24, ///< SMBIOS spec 2.8.0 updated the name + ProcessorUpgradeSocketLGA1356 = 0x25, + ProcessorUpgradeSocketLGA2011 = 0x26, + ProcessorUpgradeSocketFS1 = 0x27, + ProcessorUpgradeSocketFS2 = 0x28, + ProcessorUpgradeSocketFM1 = 0x29, + ProcessorUpgradeSocketFM2 = 0x2A, ProcessorUpgradeSocketLGA2011_3 = 0x2B, ProcessorUpgradeSocketLGA1356_3 = 0x2C, ProcessorUpgradeSocketLGA1150 = 0x2D, @@ -820,62 +819,62 @@ typedef enum { /// Processor ID Field Description /// typedef struct { - UINT32 ProcessorSteppingId:4; - UINT32 ProcessorModel: 4; - UINT32 ProcessorFamily: 4; - UINT32 ProcessorType: 2; - UINT32 ProcessorReserved1: 2; - UINT32 ProcessorXModel: 4; - UINT32 ProcessorXFamily: 8; - UINT32 ProcessorReserved2: 4; + UINT32 ProcessorSteppingId : 4; + UINT32 ProcessorModel : 4; + UINT32 ProcessorFamily : 4; + UINT32 ProcessorType : 2; + UINT32 ProcessorReserved1 : 2; + UINT32 ProcessorXModel : 4; + UINT32 ProcessorXFamily : 8; + UINT32 ProcessorReserved2 : 4; } PROCESSOR_SIGNATURE; typedef struct { - UINT32 ProcessorFpu :1; - UINT32 ProcessorVme :1; - UINT32 ProcessorDe :1; - UINT32 ProcessorPse :1; - UINT32 ProcessorTsc :1; - UINT32 ProcessorMsr :1; - UINT32 ProcessorPae :1; - UINT32 ProcessorMce :1; - UINT32 ProcessorCx8 :1; - UINT32 ProcessorApic :1; - UINT32 ProcessorReserved1 :1; - UINT32 ProcessorSep :1; - UINT32 ProcessorMtrr :1; - UINT32 ProcessorPge :1; - UINT32 ProcessorMca :1; - UINT32 ProcessorCmov :1; - UINT32 ProcessorPat :1; - UINT32 ProcessorPse36 :1; - UINT32 ProcessorPsn :1; - UINT32 ProcessorClfsh :1; - UINT32 ProcessorReserved2 :1; - UINT32 ProcessorDs :1; - UINT32 ProcessorAcpi :1; - UINT32 ProcessorMmx :1; - UINT32 ProcessorFxsr :1; - UINT32 ProcessorSse :1; - UINT32 ProcessorSse2 :1; - UINT32 ProcessorSs :1; - UINT32 ProcessorReserved3 :1; - UINT32 ProcessorTm :1; - UINT32 ProcessorReserved4 :2; + UINT32 ProcessorFpu : 1; + UINT32 ProcessorVme : 1; + UINT32 ProcessorDe : 1; + UINT32 ProcessorPse : 1; + UINT32 ProcessorTsc : 1; + UINT32 ProcessorMsr : 1; + UINT32 ProcessorPae : 1; + UINT32 ProcessorMce : 1; + UINT32 ProcessorCx8 : 1; + UINT32 ProcessorApic : 1; + UINT32 ProcessorReserved1 : 1; + UINT32 ProcessorSep : 1; + UINT32 ProcessorMtrr : 1; + UINT32 ProcessorPge : 1; + UINT32 ProcessorMca : 1; + UINT32 ProcessorCmov : 1; + UINT32 ProcessorPat : 1; + UINT32 ProcessorPse36 : 1; + UINT32 ProcessorPsn : 1; + UINT32 ProcessorClfsh : 1; + UINT32 ProcessorReserved2 : 1; + UINT32 ProcessorDs : 1; + UINT32 ProcessorAcpi : 1; + UINT32 ProcessorMmx : 1; + UINT32 ProcessorFxsr : 1; + UINT32 ProcessorSse : 1; + UINT32 ProcessorSse2 : 1; + UINT32 ProcessorSs : 1; + UINT32 ProcessorReserved3 : 1; + UINT32 ProcessorTm : 1; + UINT32 ProcessorReserved4 : 2; } PROCESSOR_FEATURE_FLAGS; typedef struct { - UINT16 ProcessorReserved1 :1; - UINT16 ProcessorUnknown :1; - UINT16 Processor64BitCapable :1; - UINT16 ProcessorMultiCore :1; - UINT16 ProcessorHardwareThread :1; - UINT16 ProcessorExecuteProtection :1; - UINT16 ProcessorEnhancedVirtualization :1; - UINT16 ProcessorPowerPerformanceCtrl :1; - UINT16 Processor128BitCapable :1; - UINT16 ProcessorArm64SocId :1; - UINT16 ProcessorReserved2 :6; + UINT16 ProcessorReserved1 : 1; + UINT16 ProcessorUnknown : 1; + UINT16 Processor64BitCapable : 1; + UINT16 ProcessorMultiCore : 1; + UINT16 ProcessorHardwareThread : 1; + UINT16 ProcessorExecuteProtection : 1; + UINT16 ProcessorEnhancedVirtualization : 1; + UINT16 ProcessorPowerPerformanceCtrl : 1; + UINT16 Processor128BitCapable : 1; + UINT16 ProcessorArm64SocId : 1; + UINT16 ProcessorReserved2 : 6; } PROCESSOR_CHARACTERISTIC_FLAGS; /// @@ -883,17 +882,17 @@ typedef struct { /// typedef union { struct { - UINT8 CpuStatus :3; ///< Indicates the status of the processor. - UINT8 Reserved1 :3; ///< Reserved for future use. Must be set to zero. - UINT8 SocketPopulated :1; ///< Indicates if the processor socket is populated or not. - UINT8 Reserved2 :1; ///< Reserved for future use. Must be set to zero. + UINT8 CpuStatus : 3; ///< Indicates the status of the processor. + UINT8 Reserved1 : 3; ///< Reserved for future use. Must be set to zero. + UINT8 SocketPopulated : 1; ///< Indicates if the processor socket is populated or not. + UINT8 Reserved2 : 1; ///< Reserved for future use. Must be set to zero. } Bits; - UINT8 Data; + UINT8 Data; } PROCESSOR_STATUS_DATA; typedef struct { - PROCESSOR_SIGNATURE Signature; - PROCESSOR_FEATURE_FLAGS FeatureFlags; + PROCESSOR_SIGNATURE Signature; + PROCESSOR_FEATURE_FLAGS FeatureFlags; } PROCESSOR_ID_DATA; /// @@ -906,42 +905,42 @@ typedef struct { /// to describe the main CPU, and a second structure to describe the 80487 co-processor. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - SMBIOS_TABLE_STRING Socket; - UINT8 ProcessorType; ///< The enumeration value from PROCESSOR_TYPE_DATA. - UINT8 ProcessorFamily; ///< The enumeration value from PROCESSOR_FAMILY_DATA. - SMBIOS_TABLE_STRING ProcessorManufacturer; - PROCESSOR_ID_DATA ProcessorId; - SMBIOS_TABLE_STRING ProcessorVersion; - PROCESSOR_VOLTAGE Voltage; - UINT16 ExternalClock; - UINT16 MaxSpeed; - UINT16 CurrentSpeed; - UINT8 Status; - UINT8 ProcessorUpgrade; ///< The enumeration value from PROCESSOR_UPGRADE. - UINT16 L1CacheHandle; - UINT16 L2CacheHandle; - UINT16 L3CacheHandle; - SMBIOS_TABLE_STRING SerialNumber; - SMBIOS_TABLE_STRING AssetTag; - SMBIOS_TABLE_STRING PartNumber; + SMBIOS_STRUCTURE Hdr; + SMBIOS_TABLE_STRING Socket; + UINT8 ProcessorType; ///< The enumeration value from PROCESSOR_TYPE_DATA. + UINT8 ProcessorFamily; ///< The enumeration value from PROCESSOR_FAMILY_DATA. + SMBIOS_TABLE_STRING ProcessorManufacturer; + PROCESSOR_ID_DATA ProcessorId; + SMBIOS_TABLE_STRING ProcessorVersion; + PROCESSOR_VOLTAGE Voltage; + UINT16 ExternalClock; + UINT16 MaxSpeed; + UINT16 CurrentSpeed; + UINT8 Status; + UINT8 ProcessorUpgrade; ///< The enumeration value from PROCESSOR_UPGRADE. + UINT16 L1CacheHandle; + UINT16 L2CacheHandle; + UINT16 L3CacheHandle; + SMBIOS_TABLE_STRING SerialNumber; + SMBIOS_TABLE_STRING AssetTag; + SMBIOS_TABLE_STRING PartNumber; // // Add for smbios 2.5 // - UINT8 CoreCount; - UINT8 EnabledCoreCount; - UINT8 ThreadCount; - UINT16 ProcessorCharacteristics; + UINT8 CoreCount; + UINT8 EnabledCoreCount; + UINT8 ThreadCount; + UINT16 ProcessorCharacteristics; // // Add for smbios 2.6 // - UINT16 ProcessorFamily2; + UINT16 ProcessorFamily2; // // Add for smbios 3.0 // - UINT16 CoreCount2; - UINT16 EnabledCoreCount2; - UINT16 ThreadCount2; + UINT16 CoreCount2; + UINT16 EnabledCoreCount2; + UINT16 ThreadCount2; } SMBIOS_TABLE_TYPE4; /// @@ -962,13 +961,13 @@ typedef enum { /// Memory Controller Error Correcting Capability. /// typedef struct { - UINT8 Other :1; - UINT8 Unknown :1; - UINT8 None :1; - UINT8 SingleBitErrorCorrect :1; - UINT8 DoubleBitErrorCorrect :1; - UINT8 ErrorScrubbing :1; - UINT8 Reserved :2; + UINT8 Other : 1; + UINT8 Unknown : 1; + UINT8 None : 1; + UINT8 SingleBitErrorCorrect : 1; + UINT8 DoubleBitErrorCorrect : 1; + UINT8 ErrorScrubbing : 1; + UINT8 Reserved : 2; } MEMORY_ERROR_CORRECT_CAPABILITY; /// @@ -988,12 +987,12 @@ typedef enum { /// Memory Controller Information - Memory Speeds. /// typedef struct { - UINT16 Other :1; - UINT16 Unknown :1; - UINT16 SeventyNs:1; - UINT16 SixtyNs :1; - UINT16 FiftyNs :1; - UINT16 Reserved :11; + UINT16 Other : 1; + UINT16 Unknown : 1; + UINT16 SeventyNs : 1; + UINT16 SixtyNs : 1; + UINT16 FiftyNs : 1; + UINT16 Reserved : 11; } MEMORY_SPEED_TYPE; /// @@ -1009,43 +1008,43 @@ typedef struct { /// to properly display the system's memory attributes. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - UINT8 ErrDetectMethod; ///< The enumeration value from MEMORY_ERROR_DETECT_METHOD. - MEMORY_ERROR_CORRECT_CAPABILITY ErrCorrectCapability; - UINT8 SupportInterleave; ///< The enumeration value from MEMORY_SUPPORT_INTERLEAVE_TYPE. - UINT8 CurrentInterleave; ///< The enumeration value from MEMORY_SUPPORT_INTERLEAVE_TYPE . - UINT8 MaxMemoryModuleSize; - MEMORY_SPEED_TYPE SupportSpeed; - UINT16 SupportMemoryType; - UINT8 MemoryModuleVoltage; - UINT8 AssociatedMemorySlotNum; - UINT16 MemoryModuleConfigHandles[1]; + SMBIOS_STRUCTURE Hdr; + UINT8 ErrDetectMethod; ///< The enumeration value from MEMORY_ERROR_DETECT_METHOD. + MEMORY_ERROR_CORRECT_CAPABILITY ErrCorrectCapability; + UINT8 SupportInterleave; ///< The enumeration value from MEMORY_SUPPORT_INTERLEAVE_TYPE. + UINT8 CurrentInterleave; ///< The enumeration value from MEMORY_SUPPORT_INTERLEAVE_TYPE . + UINT8 MaxMemoryModuleSize; + MEMORY_SPEED_TYPE SupportSpeed; + UINT16 SupportMemoryType; + UINT8 MemoryModuleVoltage; + UINT8 AssociatedMemorySlotNum; + UINT16 MemoryModuleConfigHandles[1]; } SMBIOS_TABLE_TYPE5; /// /// Memory Module Information - Memory Types /// typedef struct { - UINT16 Other :1; - UINT16 Unknown :1; - UINT16 Standard :1; - UINT16 FastPageMode:1; - UINT16 Edo :1; - UINT16 Parity :1; - UINT16 Ecc :1; - UINT16 Simm :1; - UINT16 Dimm :1; - UINT16 BurstEdo :1; - UINT16 Sdram :1; - UINT16 Reserved :5; + UINT16 Other : 1; + UINT16 Unknown : 1; + UINT16 Standard : 1; + UINT16 FastPageMode : 1; + UINT16 Edo : 1; + UINT16 Parity : 1; + UINT16 Ecc : 1; + UINT16 Simm : 1; + UINT16 Dimm : 1; + UINT16 BurstEdo : 1; + UINT16 Sdram : 1; + UINT16 Reserved : 5; } MEMORY_CURRENT_TYPE; /// /// Memory Module Information - Memory Size. /// typedef struct { - UINT8 InstalledOrEnabledSize :7; ///< Size (n), where 2**n is the size in MB. - UINT8 SingleOrDoubleBank :1; + UINT8 InstalledOrEnabledSize : 7; ///< Size (n), where 2**n is the size in MB. + UINT8 SingleOrDoubleBank : 1; } MEMORY_INSTALLED_ENABLED_SIZE; /// @@ -1060,28 +1059,28 @@ typedef struct { /// and Memory Device (Type 17) structures should be used instead. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - SMBIOS_TABLE_STRING SocketDesignation; - UINT8 BankConnections; - UINT8 CurrentSpeed; - MEMORY_CURRENT_TYPE CurrentMemoryType; - MEMORY_INSTALLED_ENABLED_SIZE InstalledSize; - MEMORY_INSTALLED_ENABLED_SIZE EnabledSize; - UINT8 ErrorStatus; + SMBIOS_STRUCTURE Hdr; + SMBIOS_TABLE_STRING SocketDesignation; + UINT8 BankConnections; + UINT8 CurrentSpeed; + MEMORY_CURRENT_TYPE CurrentMemoryType; + MEMORY_INSTALLED_ENABLED_SIZE InstalledSize; + MEMORY_INSTALLED_ENABLED_SIZE EnabledSize; + UINT8 ErrorStatus; } SMBIOS_TABLE_TYPE6; /// /// Cache Information - SRAM Type. /// typedef struct { - UINT16 Other :1; - UINT16 Unknown :1; - UINT16 NonBurst :1; - UINT16 Burst :1; - UINT16 PipelineBurst :1; - UINT16 Synchronous :1; - UINT16 Asynchronous :1; - UINT16 Reserved :9; + UINT16 Other : 1; + UINT16 Unknown : 1; + UINT16 NonBurst : 1; + UINT16 Burst : 1; + UINT16 PipelineBurst : 1; + UINT16 Synchronous : 1; + UINT16 Asynchronous : 1; + UINT16 Reserved : 9; } CACHE_SRAM_TYPE_DATA; /// @@ -1136,115 +1135,115 @@ typedef enum { /// in one or two ways, depending on the SMBIOS version. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - SMBIOS_TABLE_STRING SocketDesignation; - UINT16 CacheConfiguration; - UINT16 MaximumCacheSize; - UINT16 InstalledSize; - CACHE_SRAM_TYPE_DATA SupportedSRAMType; - CACHE_SRAM_TYPE_DATA CurrentSRAMType; - UINT8 CacheSpeed; - UINT8 ErrorCorrectionType; ///< The enumeration value from CACHE_ERROR_TYPE_DATA. - UINT8 SystemCacheType; ///< The enumeration value from CACHE_TYPE_DATA. - UINT8 Associativity; ///< The enumeration value from CACHE_ASSOCIATIVITY_DATA. + SMBIOS_STRUCTURE Hdr; + SMBIOS_TABLE_STRING SocketDesignation; + UINT16 CacheConfiguration; + UINT16 MaximumCacheSize; + UINT16 InstalledSize; + CACHE_SRAM_TYPE_DATA SupportedSRAMType; + CACHE_SRAM_TYPE_DATA CurrentSRAMType; + UINT8 CacheSpeed; + UINT8 ErrorCorrectionType; ///< The enumeration value from CACHE_ERROR_TYPE_DATA. + UINT8 SystemCacheType; ///< The enumeration value from CACHE_TYPE_DATA. + UINT8 Associativity; ///< The enumeration value from CACHE_ASSOCIATIVITY_DATA. // // Add for smbios 3.1.0 // - UINT32 MaximumCacheSize2; - UINT32 InstalledSize2; + UINT32 MaximumCacheSize2; + UINT32 InstalledSize2; } SMBIOS_TABLE_TYPE7; /// /// Port Connector Information - Connector Types. /// typedef enum { - PortConnectorTypeNone = 0x00, - PortConnectorTypeCentronics = 0x01, - PortConnectorTypeMiniCentronics = 0x02, - PortConnectorTypeProprietary = 0x03, - PortConnectorTypeDB25Male = 0x04, - PortConnectorTypeDB25Female = 0x05, - PortConnectorTypeDB15Male = 0x06, - PortConnectorTypeDB15Female = 0x07, - PortConnectorTypeDB9Male = 0x08, - PortConnectorTypeDB9Female = 0x09, - PortConnectorTypeRJ11 = 0x0A, - PortConnectorTypeRJ45 = 0x0B, - PortConnectorType50PinMiniScsi = 0x0C, - PortConnectorTypeMiniDin = 0x0D, - PortConnectorTypeMicroDin = 0x0E, - PortConnectorTypePS2 = 0x0F, - PortConnectorTypeInfrared = 0x10, - PortConnectorTypeHpHil = 0x11, - PortConnectorTypeUsb = 0x12, - PortConnectorTypeSsaScsi = 0x13, - PortConnectorTypeCircularDin8Male = 0x14, - PortConnectorTypeCircularDin8Female = 0x15, - PortConnectorTypeOnboardIde = 0x16, - PortConnectorTypeOnboardFloppy = 0x17, - PortConnectorType9PinDualInline = 0x18, - PortConnectorType25PinDualInline = 0x19, - PortConnectorType50PinDualInline = 0x1A, - PortConnectorType68PinDualInline = 0x1B, - PortConnectorTypeOnboardSoundInput = 0x1C, - PortConnectorTypeMiniCentronicsType14 = 0x1D, - PortConnectorTypeMiniCentronicsType26 = 0x1E, - PortConnectorTypeHeadPhoneMiniJack = 0x1F, - PortConnectorTypeBNC = 0x20, - PortConnectorType1394 = 0x21, - PortConnectorTypeSasSata = 0x22, - PortConnectorTypeUsbTypeC = 0x23, - PortConnectorTypePC98 = 0xA0, - PortConnectorTypePC98Hireso = 0xA1, - PortConnectorTypePCH98 = 0xA2, - PortConnectorTypePC98Note = 0xA3, - PortConnectorTypePC98Full = 0xA4, - PortConnectorTypeOther = 0xFF + PortConnectorTypeNone = 0x00, + PortConnectorTypeCentronics = 0x01, + PortConnectorTypeMiniCentronics = 0x02, + PortConnectorTypeProprietary = 0x03, + PortConnectorTypeDB25Male = 0x04, + PortConnectorTypeDB25Female = 0x05, + PortConnectorTypeDB15Male = 0x06, + PortConnectorTypeDB15Female = 0x07, + PortConnectorTypeDB9Male = 0x08, + PortConnectorTypeDB9Female = 0x09, + PortConnectorTypeRJ11 = 0x0A, + PortConnectorTypeRJ45 = 0x0B, + PortConnectorType50PinMiniScsi = 0x0C, + PortConnectorTypeMiniDin = 0x0D, + PortConnectorTypeMicroDin = 0x0E, + PortConnectorTypePS2 = 0x0F, + PortConnectorTypeInfrared = 0x10, + PortConnectorTypeHpHil = 0x11, + PortConnectorTypeUsb = 0x12, + PortConnectorTypeSsaScsi = 0x13, + PortConnectorTypeCircularDin8Male = 0x14, + PortConnectorTypeCircularDin8Female = 0x15, + PortConnectorTypeOnboardIde = 0x16, + PortConnectorTypeOnboardFloppy = 0x17, + PortConnectorType9PinDualInline = 0x18, + PortConnectorType25PinDualInline = 0x19, + PortConnectorType50PinDualInline = 0x1A, + PortConnectorType68PinDualInline = 0x1B, + PortConnectorTypeOnboardSoundInput = 0x1C, + PortConnectorTypeMiniCentronicsType14 = 0x1D, + PortConnectorTypeMiniCentronicsType26 = 0x1E, + PortConnectorTypeHeadPhoneMiniJack = 0x1F, + PortConnectorTypeBNC = 0x20, + PortConnectorType1394 = 0x21, + PortConnectorTypeSasSata = 0x22, + PortConnectorTypeUsbTypeC = 0x23, + PortConnectorTypePC98 = 0xA0, + PortConnectorTypePC98Hireso = 0xA1, + PortConnectorTypePCH98 = 0xA2, + PortConnectorTypePC98Note = 0xA3, + PortConnectorTypePC98Full = 0xA4, + PortConnectorTypeOther = 0xFF } MISC_PORT_CONNECTOR_TYPE; /// /// Port Connector Information - Port Types /// typedef enum { - PortTypeNone = 0x00, - PortTypeParallelXtAtCompatible = 0x01, - PortTypeParallelPortPs2 = 0x02, - PortTypeParallelPortEcp = 0x03, - PortTypeParallelPortEpp = 0x04, - PortTypeParallelPortEcpEpp = 0x05, - PortTypeSerialXtAtCompatible = 0x06, - PortTypeSerial16450Compatible = 0x07, - PortTypeSerial16550Compatible = 0x08, - PortTypeSerial16550ACompatible = 0x09, - PortTypeScsi = 0x0A, - PortTypeMidi = 0x0B, - PortTypeJoyStick = 0x0C, - PortTypeKeyboard = 0x0D, - PortTypeMouse = 0x0E, - PortTypeSsaScsi = 0x0F, - PortTypeUsb = 0x10, - PortTypeFireWire = 0x11, - PortTypePcmciaTypeI = 0x12, - PortTypePcmciaTypeII = 0x13, - PortTypePcmciaTypeIII = 0x14, - PortTypeCardBus = 0x15, - PortTypeAccessBusPort = 0x16, - PortTypeScsiII = 0x17, - PortTypeScsiWide = 0x18, - PortTypePC98 = 0x19, - PortTypePC98Hireso = 0x1A, - PortTypePCH98 = 0x1B, - PortTypeVideoPort = 0x1C, - PortTypeAudioPort = 0x1D, - PortTypeModemPort = 0x1E, - PortTypeNetworkPort = 0x1F, - PortTypeSata = 0x20, - PortTypeSas = 0x21, - PortTypeMfdp = 0x22, ///< Multi-Function Display Port - PortTypeThunderbolt = 0x23, - PortType8251Compatible = 0xA0, - PortType8251FifoCompatible = 0xA1, - PortTypeOther = 0xFF + PortTypeNone = 0x00, + PortTypeParallelXtAtCompatible = 0x01, + PortTypeParallelPortPs2 = 0x02, + PortTypeParallelPortEcp = 0x03, + PortTypeParallelPortEpp = 0x04, + PortTypeParallelPortEcpEpp = 0x05, + PortTypeSerialXtAtCompatible = 0x06, + PortTypeSerial16450Compatible = 0x07, + PortTypeSerial16550Compatible = 0x08, + PortTypeSerial16550ACompatible = 0x09, + PortTypeScsi = 0x0A, + PortTypeMidi = 0x0B, + PortTypeJoyStick = 0x0C, + PortTypeKeyboard = 0x0D, + PortTypeMouse = 0x0E, + PortTypeSsaScsi = 0x0F, + PortTypeUsb = 0x10, + PortTypeFireWire = 0x11, + PortTypePcmciaTypeI = 0x12, + PortTypePcmciaTypeII = 0x13, + PortTypePcmciaTypeIII = 0x14, + PortTypeCardBus = 0x15, + PortTypeAccessBusPort = 0x16, + PortTypeScsiII = 0x17, + PortTypeScsiWide = 0x18, + PortTypePC98 = 0x19, + PortTypePC98Hireso = 0x1A, + PortTypePCH98 = 0x1B, + PortTypeVideoPort = 0x1C, + PortTypeAudioPort = 0x1D, + PortTypeModemPort = 0x1E, + PortTypeNetworkPort = 0x1F, + PortTypeSata = 0x20, + PortTypeSas = 0x21, + PortTypeMfdp = 0x22, ///< Multi-Function Display Port + PortTypeThunderbolt = 0x23, + PortType8251Compatible = 0xA0, + PortType8251FifoCompatible = 0xA1, + PortTypeOther = 0xFF } MISC_PORT_TYPE; /// @@ -1255,114 +1254,114 @@ typedef enum { /// are provided. One structure is present for each port provided by the system. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - SMBIOS_TABLE_STRING InternalReferenceDesignator; - UINT8 InternalConnectorType; ///< The enumeration value from MISC_PORT_CONNECTOR_TYPE. - SMBIOS_TABLE_STRING ExternalReferenceDesignator; - UINT8 ExternalConnectorType; ///< The enumeration value from MISC_PORT_CONNECTOR_TYPE. - UINT8 PortType; ///< The enumeration value from MISC_PORT_TYPE. + SMBIOS_STRUCTURE Hdr; + SMBIOS_TABLE_STRING InternalReferenceDesignator; + UINT8 InternalConnectorType; ///< The enumeration value from MISC_PORT_CONNECTOR_TYPE. + SMBIOS_TABLE_STRING ExternalReferenceDesignator; + UINT8 ExternalConnectorType; ///< The enumeration value from MISC_PORT_CONNECTOR_TYPE. + UINT8 PortType; ///< The enumeration value from MISC_PORT_TYPE. } SMBIOS_TABLE_TYPE8; /// /// System Slots - Slot Type /// typedef enum { - SlotTypeOther = 0x01, - SlotTypeUnknown = 0x02, - SlotTypeIsa = 0x03, - SlotTypeMca = 0x04, - SlotTypeEisa = 0x05, - SlotTypePci = 0x06, - SlotTypePcmcia = 0x07, - SlotTypeVlVesa = 0x08, - SlotTypeProprietary = 0x09, - SlotTypeProcessorCardSlot = 0x0A, - SlotTypeProprietaryMemoryCardSlot = 0x0B, - SlotTypeIORiserCardSlot = 0x0C, - SlotTypeNuBus = 0x0D, - SlotTypePci66MhzCapable = 0x0E, - SlotTypeAgp = 0x0F, - SlotTypeApg2X = 0x10, - SlotTypeAgp4X = 0x11, - SlotTypePciX = 0x12, - SlotTypeAgp8X = 0x13, - SlotTypeM2Socket1_DP = 0x14, - SlotTypeM2Socket1_SD = 0x15, - SlotTypeM2Socket2 = 0x16, - SlotTypeM2Socket3 = 0x17, - SlotTypeMxmTypeI = 0x18, - SlotTypeMxmTypeII = 0x19, - SlotTypeMxmTypeIIIStandard = 0x1A, - SlotTypeMxmTypeIIIHe = 0x1B, - SlotTypeMxmTypeIV = 0x1C, - SlotTypeMxm30TypeA = 0x1D, - SlotTypeMxm30TypeB = 0x1E, - SlotTypePciExpressGen2Sff_8639 = 0x1F, - SlotTypePciExpressGen3Sff_8639 = 0x20, - SlotTypePciExpressMini52pinWithBSKO = 0x21, ///< PCI Express Mini 52-pin (CEM spec. 2.0) with bottom-side keep-outs. + SlotTypeOther = 0x01, + SlotTypeUnknown = 0x02, + SlotTypeIsa = 0x03, + SlotTypeMca = 0x04, + SlotTypeEisa = 0x05, + SlotTypePci = 0x06, + SlotTypePcmcia = 0x07, + SlotTypeVlVesa = 0x08, + SlotTypeProprietary = 0x09, + SlotTypeProcessorCardSlot = 0x0A, + SlotTypeProprietaryMemoryCardSlot = 0x0B, + SlotTypeIORiserCardSlot = 0x0C, + SlotTypeNuBus = 0x0D, + SlotTypePci66MhzCapable = 0x0E, + SlotTypeAgp = 0x0F, + SlotTypeApg2X = 0x10, + SlotTypeAgp4X = 0x11, + SlotTypePciX = 0x12, + SlotTypeAgp8X = 0x13, + SlotTypeM2Socket1_DP = 0x14, + SlotTypeM2Socket1_SD = 0x15, + SlotTypeM2Socket2 = 0x16, + SlotTypeM2Socket3 = 0x17, + SlotTypeMxmTypeI = 0x18, + SlotTypeMxmTypeII = 0x19, + SlotTypeMxmTypeIIIStandard = 0x1A, + SlotTypeMxmTypeIIIHe = 0x1B, + SlotTypeMxmTypeIV = 0x1C, + SlotTypeMxm30TypeA = 0x1D, + SlotTypeMxm30TypeB = 0x1E, + SlotTypePciExpressGen2Sff_8639 = 0x1F, + SlotTypePciExpressGen3Sff_8639 = 0x20, + SlotTypePciExpressMini52pinWithBSKO = 0x21, ///< PCI Express Mini 52-pin (CEM spec. 2.0) with bottom-side keep-outs. SlotTypePciExpressMini52pinWithoutBSKO = 0x22, ///< PCI Express Mini 52-pin (CEM spec. 2.0) without bottom-side keep-outs. - SlotTypePciExpressMini76pin = 0x23, ///< PCI Express Mini 76-pin (CEM spec. 2.0) Corresponds to Display-Mini card. - SlotTypeCXLFlexbus10 = 0x30, - SlotTypePC98C20 = 0xA0, - SlotTypePC98C24 = 0xA1, - SlotTypePC98E = 0xA2, - SlotTypePC98LocalBus = 0xA3, - SlotTypePC98Card = 0xA4, - SlotTypePciExpress = 0xA5, - SlotTypePciExpressX1 = 0xA6, - SlotTypePciExpressX2 = 0xA7, - SlotTypePciExpressX4 = 0xA8, - SlotTypePciExpressX8 = 0xA9, - SlotTypePciExpressX16 = 0xAA, - SlotTypePciExpressGen2 = 0xAB, - SlotTypePciExpressGen2X1 = 0xAC, - SlotTypePciExpressGen2X2 = 0xAD, - SlotTypePciExpressGen2X4 = 0xAE, - SlotTypePciExpressGen2X8 = 0xAF, - SlotTypePciExpressGen2X16 = 0xB0, - SlotTypePciExpressGen3 = 0xB1, - SlotTypePciExpressGen3X1 = 0xB2, - SlotTypePciExpressGen3X2 = 0xB3, - SlotTypePciExpressGen3X4 = 0xB4, - SlotTypePciExpressGen3X8 = 0xB5, - SlotTypePciExpressGen3X16 = 0xB6, - SlotTypePciExpressGen4 = 0xB8, - SlotTypePciExpressGen4X1 = 0xB9, - SlotTypePciExpressGen4X2 = 0xBA, - SlotTypePciExpressGen4X4 = 0xBB, - SlotTypePciExpressGen4X8 = 0xBC, - SlotTypePciExpressGen4X16 = 0xBD + SlotTypePciExpressMini76pin = 0x23, ///< PCI Express Mini 76-pin (CEM spec. 2.0) Corresponds to Display-Mini card. + SlotTypeCXLFlexbus10 = 0x30, + SlotTypePC98C20 = 0xA0, + SlotTypePC98C24 = 0xA1, + SlotTypePC98E = 0xA2, + SlotTypePC98LocalBus = 0xA3, + SlotTypePC98Card = 0xA4, + SlotTypePciExpress = 0xA5, + SlotTypePciExpressX1 = 0xA6, + SlotTypePciExpressX2 = 0xA7, + SlotTypePciExpressX4 = 0xA8, + SlotTypePciExpressX8 = 0xA9, + SlotTypePciExpressX16 = 0xAA, + SlotTypePciExpressGen2 = 0xAB, + SlotTypePciExpressGen2X1 = 0xAC, + SlotTypePciExpressGen2X2 = 0xAD, + SlotTypePciExpressGen2X4 = 0xAE, + SlotTypePciExpressGen2X8 = 0xAF, + SlotTypePciExpressGen2X16 = 0xB0, + SlotTypePciExpressGen3 = 0xB1, + SlotTypePciExpressGen3X1 = 0xB2, + SlotTypePciExpressGen3X2 = 0xB3, + SlotTypePciExpressGen3X4 = 0xB4, + SlotTypePciExpressGen3X8 = 0xB5, + SlotTypePciExpressGen3X16 = 0xB6, + SlotTypePciExpressGen4 = 0xB8, + SlotTypePciExpressGen4X1 = 0xB9, + SlotTypePciExpressGen4X2 = 0xBA, + SlotTypePciExpressGen4X4 = 0xBB, + SlotTypePciExpressGen4X8 = 0xBC, + SlotTypePciExpressGen4X16 = 0xBD } MISC_SLOT_TYPE; /// /// System Slots - Slot Data Bus Width. /// typedef enum { - SlotDataBusWidthOther = 0x01, - SlotDataBusWidthUnknown = 0x02, - SlotDataBusWidth8Bit = 0x03, - SlotDataBusWidth16Bit = 0x04, - SlotDataBusWidth32Bit = 0x05, - SlotDataBusWidth64Bit = 0x06, - SlotDataBusWidth128Bit = 0x07, - SlotDataBusWidth1X = 0x08, ///< Or X1 - SlotDataBusWidth2X = 0x09, ///< Or X2 - SlotDataBusWidth4X = 0x0A, ///< Or X4 - SlotDataBusWidth8X = 0x0B, ///< Or X8 - SlotDataBusWidth12X = 0x0C, ///< Or X12 - SlotDataBusWidth16X = 0x0D, ///< Or X16 - SlotDataBusWidth32X = 0x0E ///< Or X32 + SlotDataBusWidthOther = 0x01, + SlotDataBusWidthUnknown = 0x02, + SlotDataBusWidth8Bit = 0x03, + SlotDataBusWidth16Bit = 0x04, + SlotDataBusWidth32Bit = 0x05, + SlotDataBusWidth64Bit = 0x06, + SlotDataBusWidth128Bit = 0x07, + SlotDataBusWidth1X = 0x08, ///< Or X1 + SlotDataBusWidth2X = 0x09, ///< Or X2 + SlotDataBusWidth4X = 0x0A, ///< Or X4 + SlotDataBusWidth8X = 0x0B, ///< Or X8 + SlotDataBusWidth12X = 0x0C, ///< Or X12 + SlotDataBusWidth16X = 0x0D, ///< Or X16 + SlotDataBusWidth32X = 0x0E ///< Or X32 } MISC_SLOT_DATA_BUS_WIDTH; /// /// System Slots - Current Usage. /// typedef enum { - SlotUsageOther = 0x01, - SlotUsageUnknown = 0x02, - SlotUsageAvailable = 0x03, - SlotUsageInUse = 0x04, - SlotUsageUnavailable = 0x05 + SlotUsageOther = 0x01, + SlotUsageUnknown = 0x02, + SlotUsageAvailable = 0x03, + SlotUsageInUse = 0x04, + SlotUsageUnavailable = 0x05 } MISC_SLOT_USAGE; /// @@ -1379,37 +1378,37 @@ typedef enum { /// System Slots - Slot Characteristics 1. /// typedef struct { - UINT8 CharacteristicsUnknown :1; - UINT8 Provides50Volts :1; - UINT8 Provides33Volts :1; - UINT8 SharedSlot :1; - UINT8 PcCard16Supported :1; - UINT8 CardBusSupported :1; - UINT8 ZoomVideoSupported :1; - UINT8 ModemRingResumeSupported:1; + UINT8 CharacteristicsUnknown : 1; + UINT8 Provides50Volts : 1; + UINT8 Provides33Volts : 1; + UINT8 SharedSlot : 1; + UINT8 PcCard16Supported : 1; + UINT8 CardBusSupported : 1; + UINT8 ZoomVideoSupported : 1; + UINT8 ModemRingResumeSupported : 1; } MISC_SLOT_CHARACTERISTICS1; /// /// System Slots - Slot Characteristics 2. /// typedef struct { - UINT8 PmeSignalSupported :1; - UINT8 HotPlugDevicesSupported :1; - UINT8 SmbusSignalSupported :1; - UINT8 BifurcationSupported :1; - UINT8 AsyncSurpriseRemoval :1; - UINT8 FlexbusSlotCxl10Capable :1; - UINT8 FlexbusSlotCxl20Capable :1; - UINT8 Reserved :1; ///< Set to 0. + UINT8 PmeSignalSupported : 1; + UINT8 HotPlugDevicesSupported : 1; + UINT8 SmbusSignalSupported : 1; + UINT8 BifurcationSupported : 1; + UINT8 AsyncSurpriseRemoval : 1; + UINT8 FlexbusSlotCxl10Capable : 1; + UINT8 FlexbusSlotCxl20Capable : 1; + UINT8 Reserved : 1; ///< Set to 0. } MISC_SLOT_CHARACTERISTICS2; /// /// System Slots - Peer Segment/Bus/Device/Function/Width Groups /// typedef struct { - UINT16 SegmentGroupNum; - UINT8 BusNum; - UINT8 DevFuncNum; - UINT8 DataBusWidth; + UINT16 SegmentGroupNum; + UINT8 BusNum; + UINT8 DevFuncNum; + UINT8 DataBusWidth; } MISC_SLOT_PEER_GROUP; /// @@ -1420,33 +1419,33 @@ typedef struct { /// /// typedef struct { - SMBIOS_STRUCTURE Hdr; - SMBIOS_TABLE_STRING SlotDesignation; - UINT8 SlotType; ///< The enumeration value from MISC_SLOT_TYPE. - UINT8 SlotDataBusWidth; ///< The enumeration value from MISC_SLOT_DATA_BUS_WIDTH. - UINT8 CurrentUsage; ///< The enumeration value from MISC_SLOT_USAGE. - UINT8 SlotLength; ///< The enumeration value from MISC_SLOT_LENGTH. - UINT16 SlotID; - MISC_SLOT_CHARACTERISTICS1 SlotCharacteristics1; - MISC_SLOT_CHARACTERISTICS2 SlotCharacteristics2; + SMBIOS_STRUCTURE Hdr; + SMBIOS_TABLE_STRING SlotDesignation; + UINT8 SlotType; ///< The enumeration value from MISC_SLOT_TYPE. + UINT8 SlotDataBusWidth; ///< The enumeration value from MISC_SLOT_DATA_BUS_WIDTH. + UINT8 CurrentUsage; ///< The enumeration value from MISC_SLOT_USAGE. + UINT8 SlotLength; ///< The enumeration value from MISC_SLOT_LENGTH. + UINT16 SlotID; + MISC_SLOT_CHARACTERISTICS1 SlotCharacteristics1; + MISC_SLOT_CHARACTERISTICS2 SlotCharacteristics2; // // Add for smbios 2.6 // - UINT16 SegmentGroupNum; - UINT8 BusNum; - UINT8 DevFuncNum; + UINT16 SegmentGroupNum; + UINT8 BusNum; + UINT8 DevFuncNum; // // Add for smbios 3.2 // - UINT8 DataBusWidth; - UINT8 PeerGroupingCount; - MISC_SLOT_PEER_GROUP PeerGroups[1]; + UINT8 DataBusWidth; + UINT8 PeerGroupingCount; + MISC_SLOT_PEER_GROUP PeerGroups[1]; // // Add for smbios 3.4 // - UINT8 SlotInformation; - UINT8 SlotPhysicalWidth; - UINT16 SlotPitch; + UINT8 SlotInformation; + UINT8 SlotPhysicalWidth; + UINT16 SlotPitch; } SMBIOS_TABLE_TYPE9; /// @@ -1469,9 +1468,9 @@ typedef enum { /// Device Item Entry /// typedef struct { - UINT8 DeviceType; ///< Bit [6:0] - enumeration type of device from MISC_ONBOARD_DEVICE_TYPE. + UINT8 DeviceType; ///< Bit [6:0] - enumeration type of device from MISC_ONBOARD_DEVICE_TYPE. ///< Bit 7 - 1 : device enabled, 0 : device disabled. - SMBIOS_TABLE_STRING DescriptionString; + SMBIOS_TABLE_STRING DescriptionString; } DEVICE_STRUCT; /// @@ -1485,8 +1484,8 @@ typedef struct { /// has some level of control over the enabling of the associated device for use by the system. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - DEVICE_STRUCT Device[1]; + SMBIOS_STRUCTURE Hdr; + DEVICE_STRUCT Device[1]; } SMBIOS_TABLE_TYPE10; /// @@ -1495,8 +1494,8 @@ typedef struct { /// Part Numbers for Reference Documents for the system, contact information for the manufacturer, etc. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - UINT8 StringCount; + SMBIOS_STRUCTURE Hdr; + UINT8 StringCount; } SMBIOS_TABLE_TYPE11; /// @@ -1505,30 +1504,29 @@ typedef struct { /// This structure contains information required to configure the base board's Jumpers and Switches. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - UINT8 StringCount; + SMBIOS_STRUCTURE Hdr; + UINT8 StringCount; } SMBIOS_TABLE_TYPE12; - /// /// BIOS Language Information (Type 13). /// /// The information in this structure defines the installable language attributes of the BIOS. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - UINT8 InstallableLanguages; - UINT8 Flags; - UINT8 Reserved[15]; - SMBIOS_TABLE_STRING CurrentLanguages; + SMBIOS_STRUCTURE Hdr; + UINT8 InstallableLanguages; + UINT8 Flags; + UINT8 Reserved[15]; + SMBIOS_TABLE_STRING CurrentLanguages; } SMBIOS_TABLE_TYPE13; /// /// Group Item Entry /// typedef struct { - UINT8 ItemType; - UINT16 ItemHandle; + UINT8 ItemType; + UINT16 ItemHandle; } GROUP_STRUCT; /// @@ -1539,64 +1537,64 @@ typedef struct { /// within the system. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - SMBIOS_TABLE_STRING GroupName; - GROUP_STRUCT Group[1]; + SMBIOS_STRUCTURE Hdr; + SMBIOS_TABLE_STRING GroupName; + GROUP_STRUCT Group[1]; } SMBIOS_TABLE_TYPE14; /// /// System Event Log - Event Log Types. /// typedef enum { - EventLogTypeReserved = 0x00, - EventLogTypeSingleBitECC = 0x01, - EventLogTypeMultiBitECC = 0x02, - EventLogTypeParityMemErr = 0x03, - EventLogTypeBusTimeOut = 0x04, - EventLogTypeIOChannelCheck = 0x05, - EventLogTypeSoftwareNMI = 0x06, - EventLogTypePOSTMemResize = 0x07, - EventLogTypePOSTErr = 0x08, - EventLogTypePCIParityErr = 0x09, - EventLogTypePCISystemErr = 0x0A, - EventLogTypeCPUFailure = 0x0B, - EventLogTypeEISATimeOut = 0x0C, - EventLogTypeMemLogDisabled = 0x0D, - EventLogTypeLoggingDisabled = 0x0E, - EventLogTypeSysLimitExce = 0x10, - EventLogTypeAsyncHWTimer = 0x11, - EventLogTypeSysConfigInfo = 0x12, - EventLogTypeHDInfo = 0x13, - EventLogTypeSysReconfig = 0x14, - EventLogTypeUncorrectCPUErr = 0x15, - EventLogTypeAreaResetAndClr = 0x16, - EventLogTypeSystemBoot = 0x17, - EventLogTypeUnused = 0x18, ///< 0x18 - 0x7F - EventLogTypeAvailForSys = 0x80, ///< 0x80 - 0xFE - EventLogTypeEndOfLog = 0xFF + EventLogTypeReserved = 0x00, + EventLogTypeSingleBitECC = 0x01, + EventLogTypeMultiBitECC = 0x02, + EventLogTypeParityMemErr = 0x03, + EventLogTypeBusTimeOut = 0x04, + EventLogTypeIOChannelCheck = 0x05, + EventLogTypeSoftwareNMI = 0x06, + EventLogTypePOSTMemResize = 0x07, + EventLogTypePOSTErr = 0x08, + EventLogTypePCIParityErr = 0x09, + EventLogTypePCISystemErr = 0x0A, + EventLogTypeCPUFailure = 0x0B, + EventLogTypeEISATimeOut = 0x0C, + EventLogTypeMemLogDisabled = 0x0D, + EventLogTypeLoggingDisabled = 0x0E, + EventLogTypeSysLimitExce = 0x10, + EventLogTypeAsyncHWTimer = 0x11, + EventLogTypeSysConfigInfo = 0x12, + EventLogTypeHDInfo = 0x13, + EventLogTypeSysReconfig = 0x14, + EventLogTypeUncorrectCPUErr = 0x15, + EventLogTypeAreaResetAndClr = 0x16, + EventLogTypeSystemBoot = 0x17, + EventLogTypeUnused = 0x18, ///< 0x18 - 0x7F + EventLogTypeAvailForSys = 0x80, ///< 0x80 - 0xFE + EventLogTypeEndOfLog = 0xFF } EVENT_LOG_TYPE_DATA; /// /// System Event Log - Variable Data Format Types. /// typedef enum { - EventLogVariableNone = 0x00, - EventLogVariableHandle = 0x01, - EventLogVariableMutilEvent = 0x02, - EventLogVariableMutilEventHandle = 0x03, - EventLogVariablePOSTResultBitmap = 0x04, - EventLogVariableSysManagementType = 0x05, - EventLogVariableMutliEventSysManagmentType = 0x06, - EventLogVariableUnused = 0x07, - EventLogVariableOEMAssigned = 0x80 + EventLogVariableNone = 0x00, + EventLogVariableHandle = 0x01, + EventLogVariableMutilEvent = 0x02, + EventLogVariableMutilEventHandle = 0x03, + EventLogVariablePOSTResultBitmap = 0x04, + EventLogVariableSysManagementType = 0x05, + EventLogVariableMutliEventSysManagmentType = 0x06, + EventLogVariableUnused = 0x07, + EventLogVariableOEMAssigned = 0x80 } EVENT_LOG_VARIABLE_DATA; /// /// Event Log Type Descriptors /// typedef struct { - UINT8 LogType; ///< The enumeration value from EVENT_LOG_TYPE_DATA. - UINT8 DataFormatType; + UINT8 LogType; ///< The enumeration value from EVENT_LOG_TYPE_DATA. + UINT8 DataFormatType; } EVENT_LOG_TYPE; /// @@ -1608,18 +1606,18 @@ typedef struct { /// record, followed by one or more variable-length log records. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - UINT16 LogAreaLength; - UINT16 LogHeaderStartOffset; - UINT16 LogDataStartOffset; - UINT8 AccessMethod; - UINT8 LogStatus; - UINT32 LogChangeToken; - UINT32 AccessMethodAddress; - UINT8 LogHeaderFormat; - UINT8 NumberOfSupportedLogTypeDescriptors; - UINT8 LengthOfLogTypeDescriptor; - EVENT_LOG_TYPE EventLogTypeDescriptors[1]; + SMBIOS_STRUCTURE Hdr; + UINT16 LogAreaLength; + UINT16 LogHeaderStartOffset; + UINT16 LogDataStartOffset; + UINT8 AccessMethod; + UINT8 LogStatus; + UINT32 LogChangeToken; + UINT32 AccessMethodAddress; + UINT8 LogHeaderFormat; + UINT8 NumberOfSupportedLogTypeDescriptors; + UINT8 LengthOfLogTypeDescriptor; + EVENT_LOG_TYPE EventLogTypeDescriptors[1]; } SMBIOS_TABLE_TYPE15; /// @@ -1647,26 +1645,26 @@ typedef enum { /// Physical Memory Array - Use. /// typedef enum { - MemoryArrayUseOther = 0x01, - MemoryArrayUseUnknown = 0x02, - MemoryArrayUseSystemMemory = 0x03, - MemoryArrayUseVideoMemory = 0x04, - MemoryArrayUseFlashMemory = 0x05, - MemoryArrayUseNonVolatileRam = 0x06, - MemoryArrayUseCacheMemory = 0x07 + MemoryArrayUseOther = 0x01, + MemoryArrayUseUnknown = 0x02, + MemoryArrayUseSystemMemory = 0x03, + MemoryArrayUseVideoMemory = 0x04, + MemoryArrayUseFlashMemory = 0x05, + MemoryArrayUseNonVolatileRam = 0x06, + MemoryArrayUseCacheMemory = 0x07 } MEMORY_ARRAY_USE; /// /// Physical Memory Array - Error Correction Types. /// typedef enum { - MemoryErrorCorrectionOther = 0x01, - MemoryErrorCorrectionUnknown = 0x02, - MemoryErrorCorrectionNone = 0x03, - MemoryErrorCorrectionParity = 0x04, - MemoryErrorCorrectionSingleBitEcc = 0x05, - MemoryErrorCorrectionMultiBitEcc = 0x06, - MemoryErrorCorrectionCrc = 0x07 + MemoryErrorCorrectionOther = 0x01, + MemoryErrorCorrectionUnknown = 0x02, + MemoryErrorCorrectionNone = 0x03, + MemoryErrorCorrectionParity = 0x04, + MemoryErrorCorrectionSingleBitEcc = 0x05, + MemoryErrorCorrectionMultiBitEcc = 0x06, + MemoryErrorCorrectionCrc = 0x07 } MEMORY_ERROR_CORRECTION; /// @@ -1676,117 +1674,116 @@ typedef enum { /// together to form a memory address space. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - UINT8 Location; ///< The enumeration value from MEMORY_ARRAY_LOCATION. - UINT8 Use; ///< The enumeration value from MEMORY_ARRAY_USE. - UINT8 MemoryErrorCorrection; ///< The enumeration value from MEMORY_ERROR_CORRECTION. - UINT32 MaximumCapacity; - UINT16 MemoryErrorInformationHandle; - UINT16 NumberOfMemoryDevices; + SMBIOS_STRUCTURE Hdr; + UINT8 Location; ///< The enumeration value from MEMORY_ARRAY_LOCATION. + UINT8 Use; ///< The enumeration value from MEMORY_ARRAY_USE. + UINT8 MemoryErrorCorrection; ///< The enumeration value from MEMORY_ERROR_CORRECTION. + UINT32 MaximumCapacity; + UINT16 MemoryErrorInformationHandle; + UINT16 NumberOfMemoryDevices; // // Add for smbios 2.7 // - UINT64 ExtendedMaximumCapacity; + UINT64 ExtendedMaximumCapacity; } SMBIOS_TABLE_TYPE16; /// /// Memory Device - Form Factor. /// typedef enum { - MemoryFormFactorOther = 0x01, - MemoryFormFactorUnknown = 0x02, - MemoryFormFactorSimm = 0x03, - MemoryFormFactorSip = 0x04, - MemoryFormFactorChip = 0x05, - MemoryFormFactorDip = 0x06, - MemoryFormFactorZip = 0x07, - MemoryFormFactorProprietaryCard = 0x08, - MemoryFormFactorDimm = 0x09, - MemoryFormFactorTsop = 0x0A, - MemoryFormFactorRowOfChips = 0x0B, - MemoryFormFactorRimm = 0x0C, - MemoryFormFactorSodimm = 0x0D, - MemoryFormFactorSrimm = 0x0E, - MemoryFormFactorFbDimm = 0x0F, - MemoryFormFactorDie = 0x10 + MemoryFormFactorOther = 0x01, + MemoryFormFactorUnknown = 0x02, + MemoryFormFactorSimm = 0x03, + MemoryFormFactorSip = 0x04, + MemoryFormFactorChip = 0x05, + MemoryFormFactorDip = 0x06, + MemoryFormFactorZip = 0x07, + MemoryFormFactorProprietaryCard = 0x08, + MemoryFormFactorDimm = 0x09, + MemoryFormFactorTsop = 0x0A, + MemoryFormFactorRowOfChips = 0x0B, + MemoryFormFactorRimm = 0x0C, + MemoryFormFactorSodimm = 0x0D, + MemoryFormFactorSrimm = 0x0E, + MemoryFormFactorFbDimm = 0x0F, + MemoryFormFactorDie = 0x10 } MEMORY_FORM_FACTOR; /// /// Memory Device - Type /// typedef enum { - MemoryTypeOther = 0x01, - MemoryTypeUnknown = 0x02, - MemoryTypeDram = 0x03, - MemoryTypeEdram = 0x04, - MemoryTypeVram = 0x05, - MemoryTypeSram = 0x06, - MemoryTypeRam = 0x07, - MemoryTypeRom = 0x08, - MemoryTypeFlash = 0x09, - MemoryTypeEeprom = 0x0A, - MemoryTypeFeprom = 0x0B, - MemoryTypeEprom = 0x0C, - MemoryTypeCdram = 0x0D, - MemoryType3Dram = 0x0E, - MemoryTypeSdram = 0x0F, - MemoryTypeSgram = 0x10, - MemoryTypeRdram = 0x11, - MemoryTypeDdr = 0x12, - MemoryTypeDdr2 = 0x13, - MemoryTypeDdr2FbDimm = 0x14, - MemoryTypeDdr3 = 0x18, - MemoryTypeFbd2 = 0x19, - MemoryTypeDdr4 = 0x1A, - MemoryTypeLpddr = 0x1B, - MemoryTypeLpddr2 = 0x1C, - MemoryTypeLpddr3 = 0x1D, - MemoryTypeLpddr4 = 0x1E, - MemoryTypeLogicalNonVolatileDevice = 0x1F, - MemoryTypeHBM = 0x20, - MemoryTypeHBM2 = 0x21, - MemoryTypeDdr5 = 0x22, - MemoryTypeLpddr5 = 0x23 + MemoryTypeOther = 0x01, + MemoryTypeUnknown = 0x02, + MemoryTypeDram = 0x03, + MemoryTypeEdram = 0x04, + MemoryTypeVram = 0x05, + MemoryTypeSram = 0x06, + MemoryTypeRam = 0x07, + MemoryTypeRom = 0x08, + MemoryTypeFlash = 0x09, + MemoryTypeEeprom = 0x0A, + MemoryTypeFeprom = 0x0B, + MemoryTypeEprom = 0x0C, + MemoryTypeCdram = 0x0D, + MemoryType3Dram = 0x0E, + MemoryTypeSdram = 0x0F, + MemoryTypeSgram = 0x10, + MemoryTypeRdram = 0x11, + MemoryTypeDdr = 0x12, + MemoryTypeDdr2 = 0x13, + MemoryTypeDdr2FbDimm = 0x14, + MemoryTypeDdr3 = 0x18, + MemoryTypeFbd2 = 0x19, + MemoryTypeDdr4 = 0x1A, + MemoryTypeLpddr = 0x1B, + MemoryTypeLpddr2 = 0x1C, + MemoryTypeLpddr3 = 0x1D, + MemoryTypeLpddr4 = 0x1E, + MemoryTypeLogicalNonVolatileDevice = 0x1F, + MemoryTypeHBM = 0x20, + MemoryTypeHBM2 = 0x21, + MemoryTypeDdr5 = 0x22, + MemoryTypeLpddr5 = 0x23 } MEMORY_DEVICE_TYPE; /// /// Memory Device - Type Detail /// typedef struct { - UINT16 Reserved :1; - UINT16 Other :1; - UINT16 Unknown :1; - UINT16 FastPaged :1; - UINT16 StaticColumn :1; - UINT16 PseudoStatic :1; - UINT16 Rambus :1; - UINT16 Synchronous :1; - UINT16 Cmos :1; - UINT16 Edo :1; - UINT16 WindowDram :1; - UINT16 CacheDram :1; - UINT16 Nonvolatile :1; - UINT16 Registered :1; - UINT16 Unbuffered :1; - UINT16 LrDimm :1; + UINT16 Reserved : 1; + UINT16 Other : 1; + UINT16 Unknown : 1; + UINT16 FastPaged : 1; + UINT16 StaticColumn : 1; + UINT16 PseudoStatic : 1; + UINT16 Rambus : 1; + UINT16 Synchronous : 1; + UINT16 Cmos : 1; + UINT16 Edo : 1; + UINT16 WindowDram : 1; + UINT16 CacheDram : 1; + UINT16 Nonvolatile : 1; + UINT16 Registered : 1; + UINT16 Unbuffered : 1; + UINT16 LrDimm : 1; } MEMORY_DEVICE_TYPE_DETAIL; /// /// Memory Device - Memory Technology /// typedef enum { - MemoryTechnologyOther = 0x01, - MemoryTechnologyUnknown = 0x02, - MemoryTechnologyDram = 0x03, - MemoryTechnologyNvdimmN = 0x04, - MemoryTechnologyNvdimmF = 0x05, - MemoryTechnologyNvdimmP = 0x06, + MemoryTechnologyOther = 0x01, + MemoryTechnologyUnknown = 0x02, + MemoryTechnologyDram = 0x03, + MemoryTechnologyNvdimmN = 0x04, + MemoryTechnologyNvdimmF = 0x05, + MemoryTechnologyNvdimmP = 0x06, // // This definition is updated to represent Intel // Optane DC Persistent Memory in SMBIOS spec 3.4.0 // - MemoryTechnologyIntelOptanePersistentMemory = 0x07 - + MemoryTechnologyIntelOptanePersistentMemory = 0x07 } MEMORY_DEVICE_TECHNOLOGY; /// @@ -1797,18 +1794,18 @@ typedef union { /// Individual bit fields /// struct { - UINT16 Reserved :1; ///< Set to 0. - UINT16 Other :1; - UINT16 Unknown :1; - UINT16 VolatileMemory :1; - UINT16 ByteAccessiblePersistentMemory :1; - UINT16 BlockAccessiblePersistentMemory :1; - UINT16 Reserved2 :10; ///< Set to 0. + UINT16 Reserved : 1; ///< Set to 0. + UINT16 Other : 1; + UINT16 Unknown : 1; + UINT16 VolatileMemory : 1; + UINT16 ByteAccessiblePersistentMemory : 1; + UINT16 BlockAccessiblePersistentMemory : 1; + UINT16 Reserved2 : 10; ///< Set to 0. } Bits; /// /// All bit fields as a 16-bit value /// - UINT16 Uint16; + UINT16 Uint16; } MEMORY_DEVICE_OPERATING_MODE_CAPABILITY; /// @@ -1821,103 +1818,103 @@ typedef union { /// socket is currently populated. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - UINT16 MemoryArrayHandle; - UINT16 MemoryErrorInformationHandle; - UINT16 TotalWidth; - UINT16 DataWidth; - UINT16 Size; - UINT8 FormFactor; ///< The enumeration value from MEMORY_FORM_FACTOR. - UINT8 DeviceSet; - SMBIOS_TABLE_STRING DeviceLocator; - SMBIOS_TABLE_STRING BankLocator; - UINT8 MemoryType; ///< The enumeration value from MEMORY_DEVICE_TYPE. - MEMORY_DEVICE_TYPE_DETAIL TypeDetail; - UINT16 Speed; - SMBIOS_TABLE_STRING Manufacturer; - SMBIOS_TABLE_STRING SerialNumber; - SMBIOS_TABLE_STRING AssetTag; - SMBIOS_TABLE_STRING PartNumber; + SMBIOS_STRUCTURE Hdr; + UINT16 MemoryArrayHandle; + UINT16 MemoryErrorInformationHandle; + UINT16 TotalWidth; + UINT16 DataWidth; + UINT16 Size; + UINT8 FormFactor; ///< The enumeration value from MEMORY_FORM_FACTOR. + UINT8 DeviceSet; + SMBIOS_TABLE_STRING DeviceLocator; + SMBIOS_TABLE_STRING BankLocator; + UINT8 MemoryType; ///< The enumeration value from MEMORY_DEVICE_TYPE. + MEMORY_DEVICE_TYPE_DETAIL TypeDetail; + UINT16 Speed; + SMBIOS_TABLE_STRING Manufacturer; + SMBIOS_TABLE_STRING SerialNumber; + SMBIOS_TABLE_STRING AssetTag; + SMBIOS_TABLE_STRING PartNumber; // // Add for smbios 2.6 // - UINT8 Attributes; + UINT8 Attributes; // // Add for smbios 2.7 // - UINT32 ExtendedSize; + UINT32 ExtendedSize; // // Keep using name "ConfiguredMemoryClockSpeed" for compatibility // although this field is renamed from "Configured Memory Clock Speed" // to "Configured Memory Speed" in smbios 3.2.0. // - UINT16 ConfiguredMemoryClockSpeed; + UINT16 ConfiguredMemoryClockSpeed; // // Add for smbios 2.8.0 // - UINT16 MinimumVoltage; - UINT16 MaximumVoltage; - UINT16 ConfiguredVoltage; + UINT16 MinimumVoltage; + UINT16 MaximumVoltage; + UINT16 ConfiguredVoltage; // // Add for smbios 3.2.0 // - UINT8 MemoryTechnology; ///< The enumeration value from MEMORY_DEVICE_TECHNOLOGY - MEMORY_DEVICE_OPERATING_MODE_CAPABILITY MemoryOperatingModeCapability; - SMBIOS_TABLE_STRING FirmwareVersion; - UINT16 ModuleManufacturerID; - UINT16 ModuleProductID; - UINT16 MemorySubsystemControllerManufacturerID; - UINT16 MemorySubsystemControllerProductID; - UINT64 NonVolatileSize; - UINT64 VolatileSize; - UINT64 CacheSize; - UINT64 LogicalSize; + UINT8 MemoryTechnology; ///< The enumeration value from MEMORY_DEVICE_TECHNOLOGY + MEMORY_DEVICE_OPERATING_MODE_CAPABILITY MemoryOperatingModeCapability; + SMBIOS_TABLE_STRING FirmwareVersion; + UINT16 ModuleManufacturerID; + UINT16 ModuleProductID; + UINT16 MemorySubsystemControllerManufacturerID; + UINT16 MemorySubsystemControllerProductID; + UINT64 NonVolatileSize; + UINT64 VolatileSize; + UINT64 CacheSize; + UINT64 LogicalSize; // // Add for smbios 3.3.0 // - UINT32 ExtendedSpeed; - UINT32 ExtendedConfiguredMemorySpeed; + UINT32 ExtendedSpeed; + UINT32 ExtendedConfiguredMemorySpeed; } SMBIOS_TABLE_TYPE17; /// /// 32-bit Memory Error Information - Error Type. /// typedef enum { - MemoryErrorOther = 0x01, - MemoryErrorUnknown = 0x02, - MemoryErrorOk = 0x03, - MemoryErrorBadRead = 0x04, - MemoryErrorParity = 0x05, - MemoryErrorSigleBit = 0x06, - MemoryErrorDoubleBit = 0x07, - MemoryErrorMultiBit = 0x08, - MemoryErrorNibble = 0x09, - MemoryErrorChecksum = 0x0A, - MemoryErrorCrc = 0x0B, - MemoryErrorCorrectSingleBit = 0x0C, - MemoryErrorCorrected = 0x0D, - MemoryErrorUnCorrectable = 0x0E + MemoryErrorOther = 0x01, + MemoryErrorUnknown = 0x02, + MemoryErrorOk = 0x03, + MemoryErrorBadRead = 0x04, + MemoryErrorParity = 0x05, + MemoryErrorSigleBit = 0x06, + MemoryErrorDoubleBit = 0x07, + MemoryErrorMultiBit = 0x08, + MemoryErrorNibble = 0x09, + MemoryErrorChecksum = 0x0A, + MemoryErrorCrc = 0x0B, + MemoryErrorCorrectSingleBit = 0x0C, + MemoryErrorCorrected = 0x0D, + MemoryErrorUnCorrectable = 0x0E } MEMORY_ERROR_TYPE; /// /// 32-bit Memory Error Information - Error Granularity. /// typedef enum { - MemoryGranularityOther = 0x01, - MemoryGranularityOtherUnknown = 0x02, - MemoryGranularityDeviceLevel = 0x03, - MemoryGranularityMemPartitionLevel = 0x04 + MemoryGranularityOther = 0x01, + MemoryGranularityOtherUnknown = 0x02, + MemoryGranularityDeviceLevel = 0x03, + MemoryGranularityMemPartitionLevel = 0x04 } MEMORY_ERROR_GRANULARITY; /// /// 32-bit Memory Error Information - Error Operation. /// typedef enum { - MemoryErrorOperationOther = 0x01, - MemoryErrorOperationUnknown = 0x02, - MemoryErrorOperationRead = 0x03, - MemoryErrorOperationWrite = 0x04, - MemoryErrorOperationPartialWrite = 0x05 + MemoryErrorOperationOther = 0x01, + MemoryErrorOperationUnknown = 0x02, + MemoryErrorOperationRead = 0x03, + MemoryErrorOperationWrite = 0x04, + MemoryErrorOperationPartialWrite = 0x05 } MEMORY_ERROR_OPERATION; /// @@ -1927,14 +1924,14 @@ typedef enum { /// within a Physical Memory Array. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - UINT8 ErrorType; ///< The enumeration value from MEMORY_ERROR_TYPE. - UINT8 ErrorGranularity; ///< The enumeration value from MEMORY_ERROR_GRANULARITY. - UINT8 ErrorOperation; ///< The enumeration value from MEMORY_ERROR_OPERATION. - UINT32 VendorSyndrome; - UINT32 MemoryArrayErrorAddress; - UINT32 DeviceErrorAddress; - UINT32 ErrorResolution; + SMBIOS_STRUCTURE Hdr; + UINT8 ErrorType; ///< The enumeration value from MEMORY_ERROR_TYPE. + UINT8 ErrorGranularity; ///< The enumeration value from MEMORY_ERROR_GRANULARITY. + UINT8 ErrorOperation; ///< The enumeration value from MEMORY_ERROR_OPERATION. + UINT32 VendorSyndrome; + UINT32 MemoryArrayErrorAddress; + UINT32 DeviceErrorAddress; + UINT32 ErrorResolution; } SMBIOS_TABLE_TYPE18; /// @@ -1944,16 +1941,16 @@ typedef struct { /// One structure is present for each contiguous address range described. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - UINT32 StartingAddress; - UINT32 EndingAddress; - UINT16 MemoryArrayHandle; - UINT8 PartitionWidth; + SMBIOS_STRUCTURE Hdr; + UINT32 StartingAddress; + UINT32 EndingAddress; + UINT16 MemoryArrayHandle; + UINT8 PartitionWidth; // // Add for smbios 2.7 // - UINT64 ExtendedStartingAddress; - UINT64 ExtendedEndingAddress; + UINT64 ExtendedStartingAddress; + UINT64 ExtendedEndingAddress; } SMBIOS_TABLE_TYPE19; /// @@ -1963,51 +1960,51 @@ typedef struct { /// One structure is present for each contiguous address range described. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - UINT32 StartingAddress; - UINT32 EndingAddress; - UINT16 MemoryDeviceHandle; - UINT16 MemoryArrayMappedAddressHandle; - UINT8 PartitionRowPosition; - UINT8 InterleavePosition; - UINT8 InterleavedDataDepth; + SMBIOS_STRUCTURE Hdr; + UINT32 StartingAddress; + UINT32 EndingAddress; + UINT16 MemoryDeviceHandle; + UINT16 MemoryArrayMappedAddressHandle; + UINT8 PartitionRowPosition; + UINT8 InterleavePosition; + UINT8 InterleavedDataDepth; // // Add for smbios 2.7 // - UINT64 ExtendedStartingAddress; - UINT64 ExtendedEndingAddress; + UINT64 ExtendedStartingAddress; + UINT64 ExtendedEndingAddress; } SMBIOS_TABLE_TYPE20; /// /// Built-in Pointing Device - Type /// typedef enum { - PointingDeviceTypeOther = 0x01, - PointingDeviceTypeUnknown = 0x02, - PointingDeviceTypeMouse = 0x03, - PointingDeviceTypeTrackBall = 0x04, - PointingDeviceTypeTrackPoint = 0x05, - PointingDeviceTypeGlidePoint = 0x06, - PointingDeviceTouchPad = 0x07, - PointingDeviceTouchScreen = 0x08, - PointingDeviceOpticalSensor = 0x09 + PointingDeviceTypeOther = 0x01, + PointingDeviceTypeUnknown = 0x02, + PointingDeviceTypeMouse = 0x03, + PointingDeviceTypeTrackBall = 0x04, + PointingDeviceTypeTrackPoint = 0x05, + PointingDeviceTypeGlidePoint = 0x06, + PointingDeviceTouchPad = 0x07, + PointingDeviceTouchScreen = 0x08, + PointingDeviceOpticalSensor = 0x09 } BUILTIN_POINTING_DEVICE_TYPE; /// /// Built-in Pointing Device - Interface. /// typedef enum { - PointingDeviceInterfaceOther = 0x01, - PointingDeviceInterfaceUnknown = 0x02, - PointingDeviceInterfaceSerial = 0x03, - PointingDeviceInterfacePs2 = 0x04, - PointingDeviceInterfaceInfrared = 0x05, - PointingDeviceInterfaceHpHil = 0x06, - PointingDeviceInterfaceBusMouse = 0x07, - PointingDeviceInterfaceADB = 0x08, - PointingDeviceInterfaceBusMouseDB9 = 0xA0, - PointingDeviceInterfaceBusMouseMicroDin = 0xA1, - PointingDeviceInterfaceUsb = 0xA2 + PointingDeviceInterfaceOther = 0x01, + PointingDeviceInterfaceUnknown = 0x02, + PointingDeviceInterfaceSerial = 0x03, + PointingDeviceInterfacePs2 = 0x04, + PointingDeviceInterfaceInfrared = 0x05, + PointingDeviceInterfaceHpHil = 0x06, + PointingDeviceInterfaceBusMouse = 0x07, + PointingDeviceInterfaceADB = 0x08, + PointingDeviceInterfaceBusMouseDB9 = 0xA0, + PointingDeviceInterfaceBusMouseMicroDin = 0xA1, + PointingDeviceInterfaceUsb = 0xA2 } BUILTIN_POINTING_DEVICE_INTERFACE; /// @@ -2018,24 +2015,24 @@ typedef enum { /// pointing device is active for the system's use! /// typedef struct { - SMBIOS_STRUCTURE Hdr; - UINT8 Type; ///< The enumeration value from BUILTIN_POINTING_DEVICE_TYPE. - UINT8 Interface; ///< The enumeration value from BUILTIN_POINTING_DEVICE_INTERFACE. - UINT8 NumberOfButtons; + SMBIOS_STRUCTURE Hdr; + UINT8 Type; ///< The enumeration value from BUILTIN_POINTING_DEVICE_TYPE. + UINT8 Interface; ///< The enumeration value from BUILTIN_POINTING_DEVICE_INTERFACE. + UINT8 NumberOfButtons; } SMBIOS_TABLE_TYPE21; /// /// Portable Battery - Device Chemistry /// typedef enum { - PortableBatteryDeviceChemistryOther = 0x01, - PortableBatteryDeviceChemistryUnknown = 0x02, - PortableBatteryDeviceChemistryLeadAcid = 0x03, - PortableBatteryDeviceChemistryNickelCadmium = 0x04, - PortableBatteryDeviceChemistryNickelMetalHydride = 0x05, - PortableBatteryDeviceChemistryLithiumIon = 0x06, - PortableBatteryDeviceChemistryZincAir = 0x07, - PortableBatteryDeviceChemistryLithiumPolymer = 0x08 + PortableBatteryDeviceChemistryOther = 0x01, + PortableBatteryDeviceChemistryUnknown = 0x02, + PortableBatteryDeviceChemistryLeadAcid = 0x03, + PortableBatteryDeviceChemistryNickelCadmium = 0x04, + PortableBatteryDeviceChemistryNickelMetalHydride = 0x05, + PortableBatteryDeviceChemistryLithiumIon = 0x06, + PortableBatteryDeviceChemistryZincAir = 0x07, + PortableBatteryDeviceChemistryLithiumPolymer = 0x08 } PORTABLE_BATTERY_DEVICE_CHEMISTRY; /// @@ -2046,22 +2043,22 @@ typedef enum { /// a single battery pack's attributes. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - SMBIOS_TABLE_STRING Location; - SMBIOS_TABLE_STRING Manufacturer; - SMBIOS_TABLE_STRING ManufactureDate; - SMBIOS_TABLE_STRING SerialNumber; - SMBIOS_TABLE_STRING DeviceName; - UINT8 DeviceChemistry; ///< The enumeration value from PORTABLE_BATTERY_DEVICE_CHEMISTRY. - UINT16 DeviceCapacity; - UINT16 DesignVoltage; - SMBIOS_TABLE_STRING SBDSVersionNumber; - UINT8 MaximumErrorInBatteryData; - UINT16 SBDSSerialNumber; - UINT16 SBDSManufactureDate; - SMBIOS_TABLE_STRING SBDSDeviceChemistry; - UINT8 DesignCapacityMultiplier; - UINT32 OEMSpecific; + SMBIOS_STRUCTURE Hdr; + SMBIOS_TABLE_STRING Location; + SMBIOS_TABLE_STRING Manufacturer; + SMBIOS_TABLE_STRING ManufactureDate; + SMBIOS_TABLE_STRING SerialNumber; + SMBIOS_TABLE_STRING DeviceName; + UINT8 DeviceChemistry; ///< The enumeration value from PORTABLE_BATTERY_DEVICE_CHEMISTRY. + UINT16 DeviceCapacity; + UINT16 DesignVoltage; + SMBIOS_TABLE_STRING SBDSVersionNumber; + UINT8 MaximumErrorInBatteryData; + UINT16 SBDSSerialNumber; + UINT16 SBDSManufactureDate; + SMBIOS_TABLE_STRING SBDSDeviceChemistry; + UINT8 DesignCapacityMultiplier; + UINT32 OEMSpecific; } SMBIOS_TABLE_TYPE22; /// @@ -2074,12 +2071,12 @@ typedef struct { /// the system will re-boot according to the Boot Option at Limit. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - UINT8 Capabilities; - UINT16 ResetCount; - UINT16 ResetLimit; - UINT16 TimerInterval; - UINT16 Timeout; + SMBIOS_STRUCTURE Hdr; + UINT8 Capabilities; + UINT16 ResetCount; + UINT16 ResetLimit; + UINT16 TimerInterval; + UINT16 Timeout; } SMBIOS_TABLE_TYPE23; /// @@ -2088,8 +2085,8 @@ typedef struct { /// This structure describes the system-wide hardware security settings. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - UINT8 HardwareSecuritySettings; + SMBIOS_STRUCTURE Hdr; + UINT8 HardwareSecuritySettings; } SMBIOS_TABLE_TYPE24; /// @@ -2101,20 +2098,20 @@ typedef struct { /// this structure implies that a timed power-on facility is available for the system. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - UINT8 NextScheduledPowerOnMonth; - UINT8 NextScheduledPowerOnDayOfMonth; - UINT8 NextScheduledPowerOnHour; - UINT8 NextScheduledPowerOnMinute; - UINT8 NextScheduledPowerOnSecond; + SMBIOS_STRUCTURE Hdr; + UINT8 NextScheduledPowerOnMonth; + UINT8 NextScheduledPowerOnDayOfMonth; + UINT8 NextScheduledPowerOnHour; + UINT8 NextScheduledPowerOnMinute; + UINT8 NextScheduledPowerOnSecond; } SMBIOS_TABLE_TYPE25; /// /// Voltage Probe - Location and Status. /// typedef struct { - UINT8 VoltageProbeSite :5; - UINT8 VoltageProbeStatus :3; + UINT8 VoltageProbeSite : 5; + UINT8 VoltageProbeStatus : 3; } MISC_VOLTAGE_PROBE_LOCATION; /// @@ -2124,24 +2121,24 @@ typedef struct { /// Each structure describes a single voltage probe. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - SMBIOS_TABLE_STRING Description; - MISC_VOLTAGE_PROBE_LOCATION LocationAndStatus; - UINT16 MaximumValue; - UINT16 MinimumValue; - UINT16 Resolution; - UINT16 Tolerance; - UINT16 Accuracy; - UINT32 OEMDefined; - UINT16 NominalValue; + SMBIOS_STRUCTURE Hdr; + SMBIOS_TABLE_STRING Description; + MISC_VOLTAGE_PROBE_LOCATION LocationAndStatus; + UINT16 MaximumValue; + UINT16 MinimumValue; + UINT16 Resolution; + UINT16 Tolerance; + UINT16 Accuracy; + UINT32 OEMDefined; + UINT16 NominalValue; } SMBIOS_TABLE_TYPE26; /// /// Cooling Device - Device Type and Status. /// typedef struct { - UINT8 CoolingDevice :5; - UINT8 CoolingDeviceStatus :3; + UINT8 CoolingDevice : 5; + UINT8 CoolingDeviceStatus : 3; } MISC_COOLING_DEVICE_TYPE; /// @@ -2151,24 +2148,24 @@ typedef struct { /// Each structure describes a single cooling device. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - UINT16 TemperatureProbeHandle; - MISC_COOLING_DEVICE_TYPE DeviceTypeAndStatus; - UINT8 CoolingUnitGroup; - UINT32 OEMDefined; - UINT16 NominalSpeed; + SMBIOS_STRUCTURE Hdr; + UINT16 TemperatureProbeHandle; + MISC_COOLING_DEVICE_TYPE DeviceTypeAndStatus; + UINT8 CoolingUnitGroup; + UINT32 OEMDefined; + UINT16 NominalSpeed; // // Add for smbios 2.7 // - SMBIOS_TABLE_STRING Description; + SMBIOS_TABLE_STRING Description; } SMBIOS_TABLE_TYPE27; /// /// Temperature Probe - Location and Status. /// typedef struct { - UINT8 TemperatureProbeSite :5; - UINT8 TemperatureProbeStatus :3; + UINT8 TemperatureProbeSite : 5; + UINT8 TemperatureProbeStatus : 3; } MISC_TEMPERATURE_PROBE_LOCATION; /// @@ -2178,24 +2175,24 @@ typedef struct { /// Each structure describes a single temperature probe. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - SMBIOS_TABLE_STRING Description; - MISC_TEMPERATURE_PROBE_LOCATION LocationAndStatus; - UINT16 MaximumValue; - UINT16 MinimumValue; - UINT16 Resolution; - UINT16 Tolerance; - UINT16 Accuracy; - UINT32 OEMDefined; - UINT16 NominalValue; + SMBIOS_STRUCTURE Hdr; + SMBIOS_TABLE_STRING Description; + MISC_TEMPERATURE_PROBE_LOCATION LocationAndStatus; + UINT16 MaximumValue; + UINT16 MinimumValue; + UINT16 Resolution; + UINT16 Tolerance; + UINT16 Accuracy; + UINT32 OEMDefined; + UINT16 NominalValue; } SMBIOS_TABLE_TYPE28; /// /// Electrical Current Probe - Location and Status. /// typedef struct { - UINT8 ElectricalCurrentProbeSite :5; - UINT8 ElectricalCurrentProbeStatus :3; + UINT8 ElectricalCurrentProbeSite : 5; + UINT8 ElectricalCurrentProbeStatus : 3; } MISC_ELECTRICAL_CURRENT_PROBE_LOCATION; /// @@ -2205,16 +2202,16 @@ typedef struct { /// Each structure describes a single electrical current probe. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - SMBIOS_TABLE_STRING Description; - MISC_ELECTRICAL_CURRENT_PROBE_LOCATION LocationAndStatus; - UINT16 MaximumValue; - UINT16 MinimumValue; - UINT16 Resolution; - UINT16 Tolerance; - UINT16 Accuracy; - UINT32 OEMDefined; - UINT16 NominalValue; + SMBIOS_STRUCTURE Hdr; + SMBIOS_TABLE_STRING Description; + MISC_ELECTRICAL_CURRENT_PROBE_LOCATION LocationAndStatus; + UINT16 MaximumValue; + UINT16 MinimumValue; + UINT16 Resolution; + UINT16 Tolerance; + UINT16 Accuracy; + UINT32 OEMDefined; + UINT16 NominalValue; } SMBIOS_TABLE_TYPE29; /// @@ -2225,9 +2222,9 @@ typedef struct { /// is not available due to power-down status, hardware failures, or boot failures. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - SMBIOS_TABLE_STRING ManufacturerName; - UINT8 Connections; + SMBIOS_STRUCTURE Hdr; + SMBIOS_TABLE_STRING ManufacturerName; + UINT8 Connections; } SMBIOS_TABLE_TYPE30; /// @@ -2236,32 +2233,32 @@ typedef struct { /// Structure type 31 (decimal) is reserved for use by the Boot Integrity Services (BIS). /// typedef struct { - SMBIOS_STRUCTURE Hdr; - UINT8 Checksum; - UINT8 Reserved1; - UINT16 Reserved2; - UINT32 BisEntry16; - UINT32 BisEntry32; - UINT64 Reserved3; - UINT32 Reserved4; + SMBIOS_STRUCTURE Hdr; + UINT8 Checksum; + UINT8 Reserved1; + UINT16 Reserved2; + UINT32 BisEntry16; + UINT32 BisEntry32; + UINT64 Reserved3; + UINT32 Reserved4; } SMBIOS_TABLE_TYPE31; /// /// System Boot Information - System Boot Status. /// typedef enum { - BootInformationStatusNoError = 0x00, - BootInformationStatusNoBootableMedia = 0x01, - BootInformationStatusNormalOSFailedLoading = 0x02, - BootInformationStatusFirmwareDetectedFailure = 0x03, - BootInformationStatusOSDetectedFailure = 0x04, - BootInformationStatusUserRequestedBoot = 0x05, - BootInformationStatusSystemSecurityViolation = 0x06, - BootInformationStatusPreviousRequestedImage = 0x07, - BootInformationStatusWatchdogTimerExpired = 0x08, - BootInformationStatusStartReserved = 0x09, - BootInformationStatusStartOemSpecific = 0x80, - BootInformationStatusStartProductSpecific = 0xC0 + BootInformationStatusNoError = 0x00, + BootInformationStatusNoBootableMedia = 0x01, + BootInformationStatusNormalOSFailedLoading = 0x02, + BootInformationStatusFirmwareDetectedFailure = 0x03, + BootInformationStatusOSDetectedFailure = 0x04, + BootInformationStatusUserRequestedBoot = 0x05, + BootInformationStatusSystemSecurityViolation = 0x06, + BootInformationStatusPreviousRequestedImage = 0x07, + BootInformationStatusWatchdogTimerExpired = 0x08, + BootInformationStatusStartReserved = 0x09, + BootInformationStatusStartOemSpecific = 0x80, + BootInformationStatusStartProductSpecific = 0xC0 } MISC_BOOT_INFORMATION_STATUS_DATA_TYPE; /// @@ -2276,9 +2273,9 @@ typedef enum { /// reason code indicated either a firmware- or operating system-detected hardware failure. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - UINT8 Reserved[6]; - UINT8 BootStatus; ///< The enumeration value from MISC_BOOT_INFORMATION_STATUS_DATA_TYPE. + SMBIOS_STRUCTURE Hdr; + UINT8 Reserved[6]; + UINT8 BootStatus; ///< The enumeration value from MISC_BOOT_INFORMATION_STATUS_DATA_TYPE. } SMBIOS_TABLE_TYPE32; /// @@ -2288,33 +2285,33 @@ typedef struct { /// when the error address is above 4G (0xFFFFFFFF). /// typedef struct { - SMBIOS_STRUCTURE Hdr; - UINT8 ErrorType; ///< The enumeration value from MEMORY_ERROR_TYPE. - UINT8 ErrorGranularity; ///< The enumeration value from MEMORY_ERROR_GRANULARITY. - UINT8 ErrorOperation; ///< The enumeration value from MEMORY_ERROR_OPERATION. - UINT32 VendorSyndrome; - UINT64 MemoryArrayErrorAddress; - UINT64 DeviceErrorAddress; - UINT32 ErrorResolution; + SMBIOS_STRUCTURE Hdr; + UINT8 ErrorType; ///< The enumeration value from MEMORY_ERROR_TYPE. + UINT8 ErrorGranularity; ///< The enumeration value from MEMORY_ERROR_GRANULARITY. + UINT8 ErrorOperation; ///< The enumeration value from MEMORY_ERROR_OPERATION. + UINT32 VendorSyndrome; + UINT64 MemoryArrayErrorAddress; + UINT64 DeviceErrorAddress; + UINT32 ErrorResolution; } SMBIOS_TABLE_TYPE33; /// /// Management Device - Type. /// typedef enum { - ManagementDeviceTypeOther = 0x01, - ManagementDeviceTypeUnknown = 0x02, - ManagementDeviceTypeLm75 = 0x03, - ManagementDeviceTypeLm78 = 0x04, - ManagementDeviceTypeLm79 = 0x05, - ManagementDeviceTypeLm80 = 0x06, - ManagementDeviceTypeLm81 = 0x07, - ManagementDeviceTypeAdm9240 = 0x08, - ManagementDeviceTypeDs1780 = 0x09, - ManagementDeviceTypeMaxim1617 = 0x0A, - ManagementDeviceTypeGl518Sm = 0x0B, - ManagementDeviceTypeW83781D = 0x0C, - ManagementDeviceTypeHt82H791 = 0x0D + ManagementDeviceTypeOther = 0x01, + ManagementDeviceTypeUnknown = 0x02, + ManagementDeviceTypeLm75 = 0x03, + ManagementDeviceTypeLm78 = 0x04, + ManagementDeviceTypeLm79 = 0x05, + ManagementDeviceTypeLm80 = 0x06, + ManagementDeviceTypeLm81 = 0x07, + ManagementDeviceTypeAdm9240 = 0x08, + ManagementDeviceTypeDs1780 = 0x09, + ManagementDeviceTypeMaxim1617 = 0x0A, + ManagementDeviceTypeGl518Sm = 0x0B, + ManagementDeviceTypeW83781D = 0x0C, + ManagementDeviceTypeHt82H791 = 0x0D } MISC_MANAGEMENT_DEVICE_TYPE; /// @@ -2336,11 +2333,11 @@ typedef enum { /// probes as defined by one or more Management Device Component structures. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - SMBIOS_TABLE_STRING Description; - UINT8 Type; ///< The enumeration value from MISC_MANAGEMENT_DEVICE_TYPE. - UINT32 Address; - UINT8 AddressType; ///< The enumeration value from MISC_MANAGEMENT_DEVICE_ADDRESS_TYPE. + SMBIOS_STRUCTURE Hdr; + SMBIOS_TABLE_STRING Description; + UINT8 Type; ///< The enumeration value from MISC_MANAGEMENT_DEVICE_TYPE. + UINT32 Address; + UINT8 AddressType; ///< The enumeration value from MISC_MANAGEMENT_DEVICE_ADDRESS_TYPE. } SMBIOS_TABLE_TYPE34; /// @@ -2350,11 +2347,11 @@ typedef struct { /// that define the controlling hardware device and (optionally) the component's thresholds. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - SMBIOS_TABLE_STRING Description; - UINT16 ManagementDeviceHandle; - UINT16 ComponentHandle; - UINT16 ThresholdHandle; + SMBIOS_STRUCTURE Hdr; + SMBIOS_TABLE_STRING Description; + UINT16 ManagementDeviceHandle; + UINT16 ComponentHandle; + UINT16 ThresholdHandle; } SMBIOS_TABLE_TYPE35; /// @@ -2364,31 +2361,31 @@ typedef struct { /// a component (probe or cooling-unit) contained within a Management Device. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - UINT16 LowerThresholdNonCritical; - UINT16 UpperThresholdNonCritical; - UINT16 LowerThresholdCritical; - UINT16 UpperThresholdCritical; - UINT16 LowerThresholdNonRecoverable; - UINT16 UpperThresholdNonRecoverable; + SMBIOS_STRUCTURE Hdr; + UINT16 LowerThresholdNonCritical; + UINT16 UpperThresholdNonCritical; + UINT16 LowerThresholdCritical; + UINT16 UpperThresholdCritical; + UINT16 LowerThresholdNonRecoverable; + UINT16 UpperThresholdNonRecoverable; } SMBIOS_TABLE_TYPE36; /// /// Memory Channel Entry. /// typedef struct { - UINT8 DeviceLoad; - UINT16 DeviceHandle; + UINT8 DeviceLoad; + UINT16 DeviceHandle; } MEMORY_DEVICE; /// /// Memory Channel - Channel Type. /// typedef enum { - MemoryChannelTypeOther = 0x01, - MemoryChannelTypeUnknown = 0x02, - MemoryChannelTypeRambus = 0x03, - MemoryChannelTypeSyncLink = 0x04 + MemoryChannelTypeOther = 0x01, + MemoryChannelTypeUnknown = 0x02, + MemoryChannelTypeRambus = 0x03, + MemoryChannelTypeSyncLink = 0x04 } MEMORY_CHANNEL_TYPE; /// @@ -2399,22 +2396,22 @@ typedef enum { /// The sum of all device loads cannot exceed the channel's defined maximum. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - UINT8 ChannelType; - UINT8 MaximumChannelLoad; - UINT8 MemoryDeviceCount; - MEMORY_DEVICE MemoryDevice[1]; + SMBIOS_STRUCTURE Hdr; + UINT8 ChannelType; + UINT8 MaximumChannelLoad; + UINT8 MemoryDeviceCount; + MEMORY_DEVICE MemoryDevice[1]; } SMBIOS_TABLE_TYPE37; /// /// IPMI Device Information - BMC Interface Type /// typedef enum { - IPMIDeviceInfoInterfaceTypeUnknown = 0x00, - IPMIDeviceInfoInterfaceTypeKCS = 0x01, ///< The Keyboard Controller Style. - IPMIDeviceInfoInterfaceTypeSMIC = 0x02, ///< The Server Management Interface Chip. - IPMIDeviceInfoInterfaceTypeBT = 0x03, ///< The Block Transfer - IPMIDeviceInfoInterfaceTypeSSIF = 0x04 ///< SMBus System Interface + IPMIDeviceInfoInterfaceTypeUnknown = 0x00, + IPMIDeviceInfoInterfaceTypeKCS = 0x01, ///< The Keyboard Controller Style. + IPMIDeviceInfoInterfaceTypeSMIC = 0x02, ///< The Server Management Interface Chip. + IPMIDeviceInfoInterfaceTypeBT = 0x03, ///< The Block Transfer + IPMIDeviceInfoInterfaceTypeSSIF = 0x04 ///< SMBus System Interface } BMC_INTERFACE_TYPE; /// @@ -2429,27 +2426,27 @@ typedef enum { /// Providing Type 38 is recommended for backward compatibility. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - UINT8 InterfaceType; ///< The enumeration value from BMC_INTERFACE_TYPE. - UINT8 IPMISpecificationRevision; - UINT8 I2CSlaveAddress; - UINT8 NVStorageDeviceAddress; - UINT64 BaseAddress; - UINT8 BaseAddressModifier_InterruptInfo; - UINT8 InterruptNumber; + SMBIOS_STRUCTURE Hdr; + UINT8 InterfaceType; ///< The enumeration value from BMC_INTERFACE_TYPE. + UINT8 IPMISpecificationRevision; + UINT8 I2CSlaveAddress; + UINT8 NVStorageDeviceAddress; + UINT64 BaseAddress; + UINT8 BaseAddressModifier_InterruptInfo; + UINT8 InterruptNumber; } SMBIOS_TABLE_TYPE38; /// /// System Power Supply - Power Supply Characteristics. /// typedef struct { - UINT16 PowerSupplyHotReplaceable:1; - UINT16 PowerSupplyPresent :1; - UINT16 PowerSupplyUnplugged :1; - UINT16 InputVoltageRangeSwitch :4; - UINT16 PowerSupplyStatus :3; - UINT16 PowerSupplyType :4; - UINT16 Reserved :2; + UINT16 PowerSupplyHotReplaceable : 1; + UINT16 PowerSupplyPresent : 1; + UINT16 PowerSupplyUnplugged : 1; + UINT16 InputVoltageRangeSwitch : 4; + UINT16 PowerSupplyStatus : 3; + UINT16 PowerSupplyType : 4; + UINT16 Reserved : 2; } SYS_POWER_SUPPLY_CHARACTERISTICS; /// @@ -2459,31 +2456,31 @@ typedef struct { /// of this record is present for each possible power supply in a system. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - UINT8 PowerUnitGroup; - SMBIOS_TABLE_STRING Location; - SMBIOS_TABLE_STRING DeviceName; - SMBIOS_TABLE_STRING Manufacturer; - SMBIOS_TABLE_STRING SerialNumber; - SMBIOS_TABLE_STRING AssetTagNumber; - SMBIOS_TABLE_STRING ModelPartNumber; - SMBIOS_TABLE_STRING RevisionLevel; - UINT16 MaxPowerCapacity; - SYS_POWER_SUPPLY_CHARACTERISTICS PowerSupplyCharacteristics; - UINT16 InputVoltageProbeHandle; - UINT16 CoolingDeviceHandle; - UINT16 InputCurrentProbeHandle; + SMBIOS_STRUCTURE Hdr; + UINT8 PowerUnitGroup; + SMBIOS_TABLE_STRING Location; + SMBIOS_TABLE_STRING DeviceName; + SMBIOS_TABLE_STRING Manufacturer; + SMBIOS_TABLE_STRING SerialNumber; + SMBIOS_TABLE_STRING AssetTagNumber; + SMBIOS_TABLE_STRING ModelPartNumber; + SMBIOS_TABLE_STRING RevisionLevel; + UINT16 MaxPowerCapacity; + SYS_POWER_SUPPLY_CHARACTERISTICS PowerSupplyCharacteristics; + UINT16 InputVoltageProbeHandle; + UINT16 CoolingDeviceHandle; + UINT16 InputCurrentProbeHandle; } SMBIOS_TABLE_TYPE39; /// /// Additional Information Entry Format. /// typedef struct { - UINT8 EntryLength; - UINT16 ReferencedHandle; - UINT8 ReferencedOffset; - SMBIOS_TABLE_STRING EntryString; - UINT8 Value[1]; + UINT8 EntryLength; + UINT16 ReferencedHandle; + UINT8 ReferencedOffset; + SMBIOS_TABLE_STRING EntryString; + UINT8 Value[1]; } ADDITIONAL_INFORMATION_ENTRY; /// @@ -2493,15 +2490,15 @@ typedef struct { /// enumerated values and interim field updates in another structure. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - UINT8 NumberOfAdditionalInformationEntries; - ADDITIONAL_INFORMATION_ENTRY AdditionalInfoEntries[1]; + SMBIOS_STRUCTURE Hdr; + UINT8 NumberOfAdditionalInformationEntries; + ADDITIONAL_INFORMATION_ENTRY AdditionalInfoEntries[1]; } SMBIOS_TABLE_TYPE40; /// /// Onboard Devices Extended Information - Onboard Device Types. /// -typedef enum{ +typedef enum { OnBoardDeviceExtendedTypeOther = 0x01, OnBoardDeviceExtendedTypeUnknown = 0x02, OnBoardDeviceExtendedTypeVideo = 0x03, @@ -2523,41 +2520,41 @@ typedef enum{ /// control over the enabling of the associated device for use by the system. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - SMBIOS_TABLE_STRING ReferenceDesignation; - UINT8 DeviceType; ///< The enumeration value from ONBOARD_DEVICE_EXTENDED_INFO_TYPE - UINT8 DeviceTypeInstance; - UINT16 SegmentGroupNum; - UINT8 BusNum; - UINT8 DevFuncNum; + SMBIOS_STRUCTURE Hdr; + SMBIOS_TABLE_STRING ReferenceDesignation; + UINT8 DeviceType; ///< The enumeration value from ONBOARD_DEVICE_EXTENDED_INFO_TYPE + UINT8 DeviceTypeInstance; + UINT16 SegmentGroupNum; + UINT8 BusNum; + UINT8 DevFuncNum; } SMBIOS_TABLE_TYPE41; /// /// Management Controller Host Interface - Protocol Record Data Format. /// typedef struct { - UINT8 ProtocolType; - UINT8 ProtocolTypeDataLen; - UINT8 ProtocolTypeData[1]; + UINT8 ProtocolType; + UINT8 ProtocolTypeDataLen; + UINT8 ProtocolTypeData[1]; } MC_HOST_INTERFACE_PROTOCOL_RECORD; /// /// Management Controller Host Interface - Interface Types. /// 00h - 3Fh: MCTP Host Interfaces /// -typedef enum{ - MCHostInterfaceTypeNetworkHostInterface = 0x40, - MCHostInterfaceTypeOemDefined = 0xF0 +typedef enum { + MCHostInterfaceTypeNetworkHostInterface = 0x40, + MCHostInterfaceTypeOemDefined = 0xF0 } MC_HOST_INTERFACE_TYPE; /// /// Management Controller Host Interface - Protocol Types. /// -typedef enum{ - MCHostInterfaceProtocolTypeIPMI = 0x02, - MCHostInterfaceProtocolTypeMCTP = 0x03, - MCHostInterfaceProtocolTypeRedfishOverIP = 0x04, - MCHostInterfaceProtocolTypeOemDefined = 0xF0 +typedef enum { + MCHostInterfaceProtocolTypeIPMI = 0x02, + MCHostInterfaceProtocolTypeMCTP = 0x03, + MCHostInterfaceProtocolTypeRedfishOverIP = 0x04, + MCHostInterfaceProtocolTypeOemDefined = 0xF0 } MC_HOST_INTERFACE_PROTOCOL_TYPE; /// @@ -2578,17 +2575,16 @@ typedef enum{ /// that do not yet recognize the Type 42 structure. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - UINT8 InterfaceType; ///< The enumeration value from MC_HOST_INTERFACE_TYPE - UINT8 InterfaceTypeSpecificDataLength; - UINT8 InterfaceTypeSpecificData[4]; ///< This field has a minimum of four bytes + SMBIOS_STRUCTURE Hdr; + UINT8 InterfaceType; ///< The enumeration value from MC_HOST_INTERFACE_TYPE + UINT8 InterfaceTypeSpecificDataLength; + UINT8 InterfaceTypeSpecificData[4]; ///< This field has a minimum of four bytes } SMBIOS_TABLE_TYPE42; - /// /// Processor Specific Block - Processor Architecture Type /// -typedef enum{ +typedef enum { ProcessorSpecificBlockArchTypeReserved = 0x00, ProcessorSpecificBlockArchTypeIa32 = 0x01, ProcessorSpecificBlockArchTypeX64 = 0x02, @@ -2604,8 +2600,8 @@ typedef enum{ /// Processor Specific Block is the standard container of processor-specific data. /// typedef struct { - UINT8 Length; - UINT8 ProcessorArchType; + UINT8 Length; + UINT8 ProcessorArchType; /// /// Below followed by Processor-specific data /// @@ -2627,96 +2623,96 @@ typedef struct { /// architecture workgroups or vendors in separate documents. /// typedef struct { - SMBIOS_STRUCTURE Hdr; - SMBIOS_HANDLE RefHandle; ///< This field refer to associated SMBIOS type 4 + SMBIOS_STRUCTURE Hdr; + SMBIOS_HANDLE RefHandle; ///< This field refer to associated SMBIOS type 4 /// /// Below followed by Processor-specific block /// - PROCESSOR_SPECIFIC_BLOCK ProcessorSpecificBlock; + PROCESSOR_SPECIFIC_BLOCK ProcessorSpecificBlock; } SMBIOS_TABLE_TYPE44; /// /// TPM Device (Type 43). /// typedef struct { - SMBIOS_STRUCTURE Hdr; - UINT8 VendorID[4]; - UINT8 MajorSpecVersion; - UINT8 MinorSpecVersion; - UINT32 FirmwareVersion1; - UINT32 FirmwareVersion2; - SMBIOS_TABLE_STRING Description; - UINT64 Characteristics; - UINT32 OemDefined; + SMBIOS_STRUCTURE Hdr; + UINT8 VendorID[4]; + UINT8 MajorSpecVersion; + UINT8 MinorSpecVersion; + UINT32 FirmwareVersion1; + UINT32 FirmwareVersion2; + SMBIOS_TABLE_STRING Description; + UINT64 Characteristics; + UINT32 OemDefined; } SMBIOS_TABLE_TYPE43; /// /// Inactive (Type 126) /// typedef struct { - SMBIOS_STRUCTURE Hdr; + SMBIOS_STRUCTURE Hdr; } SMBIOS_TABLE_TYPE126; /// /// End-of-Table (Type 127) /// typedef struct { - SMBIOS_STRUCTURE Hdr; + SMBIOS_STRUCTURE Hdr; } SMBIOS_TABLE_TYPE127; /// /// Union of all the possible SMBIOS record types. /// typedef union { - SMBIOS_STRUCTURE *Hdr; - SMBIOS_TABLE_TYPE0 *Type0; - SMBIOS_TABLE_TYPE1 *Type1; - SMBIOS_TABLE_TYPE2 *Type2; - SMBIOS_TABLE_TYPE3 *Type3; - SMBIOS_TABLE_TYPE4 *Type4; - SMBIOS_TABLE_TYPE5 *Type5; - SMBIOS_TABLE_TYPE6 *Type6; - SMBIOS_TABLE_TYPE7 *Type7; - SMBIOS_TABLE_TYPE8 *Type8; - SMBIOS_TABLE_TYPE9 *Type9; - SMBIOS_TABLE_TYPE10 *Type10; - SMBIOS_TABLE_TYPE11 *Type11; - SMBIOS_TABLE_TYPE12 *Type12; - SMBIOS_TABLE_TYPE13 *Type13; - SMBIOS_TABLE_TYPE14 *Type14; - SMBIOS_TABLE_TYPE15 *Type15; - SMBIOS_TABLE_TYPE16 *Type16; - SMBIOS_TABLE_TYPE17 *Type17; - SMBIOS_TABLE_TYPE18 *Type18; - SMBIOS_TABLE_TYPE19 *Type19; - SMBIOS_TABLE_TYPE20 *Type20; - SMBIOS_TABLE_TYPE21 *Type21; - SMBIOS_TABLE_TYPE22 *Type22; - SMBIOS_TABLE_TYPE23 *Type23; - SMBIOS_TABLE_TYPE24 *Type24; - SMBIOS_TABLE_TYPE25 *Type25; - SMBIOS_TABLE_TYPE26 *Type26; - SMBIOS_TABLE_TYPE27 *Type27; - SMBIOS_TABLE_TYPE28 *Type28; - SMBIOS_TABLE_TYPE29 *Type29; - SMBIOS_TABLE_TYPE30 *Type30; - SMBIOS_TABLE_TYPE31 *Type31; - SMBIOS_TABLE_TYPE32 *Type32; - SMBIOS_TABLE_TYPE33 *Type33; - SMBIOS_TABLE_TYPE34 *Type34; - SMBIOS_TABLE_TYPE35 *Type35; - SMBIOS_TABLE_TYPE36 *Type36; - SMBIOS_TABLE_TYPE37 *Type37; - SMBIOS_TABLE_TYPE38 *Type38; - SMBIOS_TABLE_TYPE39 *Type39; - SMBIOS_TABLE_TYPE40 *Type40; - SMBIOS_TABLE_TYPE41 *Type41; - SMBIOS_TABLE_TYPE42 *Type42; - SMBIOS_TABLE_TYPE43 *Type43; - SMBIOS_TABLE_TYPE44 *Type44; - SMBIOS_TABLE_TYPE126 *Type126; - SMBIOS_TABLE_TYPE127 *Type127; - UINT8 *Raw; + SMBIOS_STRUCTURE *Hdr; + SMBIOS_TABLE_TYPE0 *Type0; + SMBIOS_TABLE_TYPE1 *Type1; + SMBIOS_TABLE_TYPE2 *Type2; + SMBIOS_TABLE_TYPE3 *Type3; + SMBIOS_TABLE_TYPE4 *Type4; + SMBIOS_TABLE_TYPE5 *Type5; + SMBIOS_TABLE_TYPE6 *Type6; + SMBIOS_TABLE_TYPE7 *Type7; + SMBIOS_TABLE_TYPE8 *Type8; + SMBIOS_TABLE_TYPE9 *Type9; + SMBIOS_TABLE_TYPE10 *Type10; + SMBIOS_TABLE_TYPE11 *Type11; + SMBIOS_TABLE_TYPE12 *Type12; + SMBIOS_TABLE_TYPE13 *Type13; + SMBIOS_TABLE_TYPE14 *Type14; + SMBIOS_TABLE_TYPE15 *Type15; + SMBIOS_TABLE_TYPE16 *Type16; + SMBIOS_TABLE_TYPE17 *Type17; + SMBIOS_TABLE_TYPE18 *Type18; + SMBIOS_TABLE_TYPE19 *Type19; + SMBIOS_TABLE_TYPE20 *Type20; + SMBIOS_TABLE_TYPE21 *Type21; + SMBIOS_TABLE_TYPE22 *Type22; + SMBIOS_TABLE_TYPE23 *Type23; + SMBIOS_TABLE_TYPE24 *Type24; + SMBIOS_TABLE_TYPE25 *Type25; + SMBIOS_TABLE_TYPE26 *Type26; + SMBIOS_TABLE_TYPE27 *Type27; + SMBIOS_TABLE_TYPE28 *Type28; + SMBIOS_TABLE_TYPE29 *Type29; + SMBIOS_TABLE_TYPE30 *Type30; + SMBIOS_TABLE_TYPE31 *Type31; + SMBIOS_TABLE_TYPE32 *Type32; + SMBIOS_TABLE_TYPE33 *Type33; + SMBIOS_TABLE_TYPE34 *Type34; + SMBIOS_TABLE_TYPE35 *Type35; + SMBIOS_TABLE_TYPE36 *Type36; + SMBIOS_TABLE_TYPE37 *Type37; + SMBIOS_TABLE_TYPE38 *Type38; + SMBIOS_TABLE_TYPE39 *Type39; + SMBIOS_TABLE_TYPE40 *Type40; + SMBIOS_TABLE_TYPE41 *Type41; + SMBIOS_TABLE_TYPE42 *Type42; + SMBIOS_TABLE_TYPE43 *Type43; + SMBIOS_TABLE_TYPE44 *Type44; + SMBIOS_TABLE_TYPE126 *Type126; + SMBIOS_TABLE_TYPE127 *Type127; + UINT8 *Raw; } SMBIOS_STRUCTURE_POINTER; #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/SmBus.h b/MdePkg/Include/IndustryStandard/SmBus.h index 024a7ba..7bdec2b 100644 --- a/MdePkg/Include/IndustryStandard/SmBus.h +++ b/MdePkg/Include/IndustryStandard/SmBus.h @@ -10,19 +10,18 @@ #ifndef _SMBUS_H_ #define _SMBUS_H_ - /// /// UDID of SMBUS device. /// typedef struct { - UINT32 VendorSpecificId; - UINT16 SubsystemDeviceId; - UINT16 SubsystemVendorId; - UINT16 Interface; - UINT16 DeviceId; - UINT16 VendorId; - UINT8 VendorRevision; - UINT8 DeviceCapabilities; + UINT32 VendorSpecificId; + UINT16 SubsystemDeviceId; + UINT16 SubsystemVendorId; + UINT16 Interface; + UINT16 DeviceId; + UINT16 VendorId; + UINT8 VendorRevision; + UINT8 DeviceCapabilities; } EFI_SMBUS_UDID; /// @@ -32,7 +31,7 @@ typedef struct { /// /// The SMBUS hardware address to which the SMBUS device is preassigned or allocated. /// - UINTN SmbusDeviceAddress : 7; + UINTN SmbusDeviceAddress : 7; } EFI_SMBUS_DEVICE_ADDRESS; typedef struct { @@ -40,12 +39,12 @@ typedef struct { /// The SMBUS hardware address to which the SMBUS device is preassigned or /// allocated. Type EFI_SMBUS_DEVICE_ADDRESS is defined in EFI_PEI_SMBUS2_PPI.Execute(). /// - EFI_SMBUS_DEVICE_ADDRESS SmbusDeviceAddress; + EFI_SMBUS_DEVICE_ADDRESS SmbusDeviceAddress; /// /// The SMBUS Unique Device Identifier (UDID) as defined in EFI_SMBUS_UDID. /// Type EFI_SMBUS_UDID is defined in EFI_PEI_SMBUS2_PPI.ArpDevice(). /// - EFI_SMBUS_UDID SmbusDeviceUdid; + EFI_SMBUS_UDID SmbusDeviceUdid; } EFI_SMBUS_DEVICE_MAP; /// @@ -69,7 +68,6 @@ typedef enum _EFI_SMBUS_OPERATION { /// /// EFI_SMBUS_DEVICE_COMMAND /// -typedef UINTN EFI_SMBUS_DEVICE_COMMAND; +typedef UINTN EFI_SMBUS_DEVICE_COMMAND; #endif - diff --git a/MdePkg/Include/IndustryStandard/Spdm.h b/MdePkg/Include/IndustryStandard/Spdm.h index 38ec774..4ec7a5e 100644 --- a/MdePkg/Include/IndustryStandard/Spdm.h +++ b/MdePkg/Include/IndustryStandard/Spdm.h @@ -7,7 +7,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ - #ifndef __SPDM_H__ #define __SPDM_H__ @@ -16,15 +15,15 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// SPDM response code /// -#define SPDM_DIGESTS 0x01 -#define SPDM_CERTIFICATE 0x02 -#define SPDM_CHALLENGE_AUTH 0x03 -#define SPDM_VERSION 0x04 -#define SPDM_MEASUREMENTS 0x60 -#define SPDM_CAPABILITIES 0x61 -#define SPDM_SET_CERT_RESPONSE 0x62 -#define SPDM_ALGORITHMS 0x63 -#define SPDM_ERROR 0x7F +#define SPDM_DIGESTS 0x01 +#define SPDM_CERTIFICATE 0x02 +#define SPDM_CHALLENGE_AUTH 0x03 +#define SPDM_VERSION 0x04 +#define SPDM_MEASUREMENTS 0x60 +#define SPDM_CAPABILITIES 0x61 +#define SPDM_SET_CERT_RESPONSE 0x62 +#define SPDM_ALGORITHMS 0x63 +#define SPDM_ERROR 0x7F /// /// SPDM request code /// @@ -41,10 +40,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// SPDM message header /// typedef struct { - UINT8 SPDMVersion; - UINT8 RequestResponseCode; - UINT8 Param1; - UINT8 Param2; + UINT8 SPDMVersion; + UINT8 RequestResponseCode; + UINT8 Param1; + UINT8 Param2; } SPDM_MESSAGE_HEADER; #define SPDM_MESSAGE_VERSION 0x10 @@ -53,211 +52,211 @@ typedef struct { /// SPDM GET_VERSION request /// typedef struct { - SPDM_MESSAGE_HEADER Header; + SPDM_MESSAGE_HEADER Header; } SPDM_GET_VERSION_REQUEST; /// /// SPDM GET_VERSION response /// typedef struct { - SPDM_MESSAGE_HEADER Header; - UINT8 Reserved; - UINT8 VersionNumberEntryCount; -//SPDM_VERSION_NUMBER VersionNumberEntry[VersionNumberEntryCount]; + SPDM_MESSAGE_HEADER Header; + UINT8 Reserved; + UINT8 VersionNumberEntryCount; + // SPDM_VERSION_NUMBER VersionNumberEntry[VersionNumberEntryCount]; } SPDM_VERSION_RESPONSE; /// /// SPDM VERSION structure /// typedef struct { - UINT16 Alpha:4; - UINT16 UpdateVersionNumber:4; - UINT16 MinorVersion:4; - UINT16 MajorVersion:4; + UINT16 Alpha : 4; + UINT16 UpdateVersionNumber : 4; + UINT16 MinorVersion : 4; + UINT16 MajorVersion : 4; } SPDM_VERSION_NUMBER; /// /// SPDM GET_CAPABILITIES request /// typedef struct { - SPDM_MESSAGE_HEADER Header; + SPDM_MESSAGE_HEADER Header; } SPDM_GET_CAPABILITIES_REQUEST; /// /// SPDM GET_CAPABILITIES response /// typedef struct { - SPDM_MESSAGE_HEADER Header; - UINT8 Reserved; - UINT8 CTExponent; - UINT16 Reserved2; - UINT32 Flags; + SPDM_MESSAGE_HEADER Header; + UINT8 Reserved; + UINT8 CTExponent; + UINT16 Reserved2; + UINT32 Flags; } SPDM_CAPABILITIES_RESPONSE; /// /// SPDM GET_CAPABILITIES response Flags /// -#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_CACHE_CAP BIT0 -#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_CERT_CAP BIT1 -#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_CHAL_CAP BIT2 -#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_MEAS_CAP (BIT3 | BIT4) -#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_MEAS_CAP_NO_SIG BIT3 -#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_MEAS_CAP_SIG BIT4 -#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_MEAS_FRESH_CAP BIT5 +#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_CACHE_CAP BIT0 +#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_CERT_CAP BIT1 +#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_CHAL_CAP BIT2 +#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_MEAS_CAP (BIT3 | BIT4) +#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_MEAS_CAP_NO_SIG BIT3 +#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_MEAS_CAP_SIG BIT4 +#define SPDM_GET_CAPABILITIES_RESPONSE_FLAGS_MEAS_FRESH_CAP BIT5 /// /// SPDM NEGOTIATE_ALGORITHMS request /// typedef struct { - SPDM_MESSAGE_HEADER Header; - UINT16 Length; - UINT8 MeasurementSpecification; - UINT8 Reserved; - UINT32 BaseAsymAlgo; - UINT32 BaseHashAlgo; - UINT8 Reserved2[12]; - UINT8 ExtAsymCount; - UINT8 ExtHashCount; - UINT16 Reserved3; -//UINT32 ExtAsym[ExtAsymCount]; -//UINT32 ExtHash[ExtHashCount]; + SPDM_MESSAGE_HEADER Header; + UINT16 Length; + UINT8 MeasurementSpecification; + UINT8 Reserved; + UINT32 BaseAsymAlgo; + UINT32 BaseHashAlgo; + UINT8 Reserved2[12]; + UINT8 ExtAsymCount; + UINT8 ExtHashCount; + UINT16 Reserved3; + // UINT32 ExtAsym[ExtAsymCount]; + // UINT32 ExtHash[ExtHashCount]; } SPDM_NEGOTIATE_ALGORITHMS_REQUEST; /// /// SPDM NEGOTIATE_ALGORITHMS request BaseAsymAlgo /// -#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_RSASSA_2048 BIT0 -#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_RSAPSS_2048 BIT1 -#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_RSASSA_3072 BIT2 -#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_RSAPSS_3072 BIT3 -#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_ECDSA_ECC_NIST_P256 BIT4 -#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_RSASSA_4096 BIT5 -#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_RSAPSS_4096 BIT6 -#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_ECDSA_ECC_NIST_P384 BIT7 -#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_ECDSA_ECC_NIST_P521 BIT8 +#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_RSASSA_2048 BIT0 +#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_RSAPSS_2048 BIT1 +#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_RSASSA_3072 BIT2 +#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_RSAPSS_3072 BIT3 +#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_ECDSA_ECC_NIST_P256 BIT4 +#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_RSASSA_4096 BIT5 +#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_RSAPSS_4096 BIT6 +#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_ECDSA_ECC_NIST_P384 BIT7 +#define SPDM_ALGORITHMS_BASE_ASYM_ALGO_TPM_ALG_ECDSA_ECC_NIST_P521 BIT8 /// /// SPDM NEGOTIATE_ALGORITHMS request BaseHashAlgo /// -#define SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_SHA_256 BIT0 -#define SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_SHA_384 BIT1 -#define SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_SHA_512 BIT2 -#define SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_SHA3_256 BIT3 -#define SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_SHA3_384 BIT4 -#define SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_SHA3_512 BIT5 +#define SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_SHA_256 BIT0 +#define SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_SHA_384 BIT1 +#define SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_SHA_512 BIT2 +#define SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_SHA3_256 BIT3 +#define SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_SHA3_384 BIT4 +#define SPDM_ALGORITHMS_BASE_HASH_ALGO_TPM_ALG_SHA3_512 BIT5 /// /// SPDM NEGOTIATE_ALGORITHMS response /// typedef struct { - SPDM_MESSAGE_HEADER Header; - UINT16 Length; - UINT8 MeasurementSpecificationSel; - UINT8 Reserved; - UINT32 MeasurementHashAlgo; - UINT32 BaseAsymSel; - UINT32 BaseHashSel; - UINT8 Reserved2[12]; - UINT8 ExtAsymSelCount; - UINT8 ExtHashSelCount; - UINT16 Reserved3; -//UINT32 ExtAsymSel[ExtAsymSelCount]; -//UINT32 ExtHashSel[ExtHashSelCount]; + SPDM_MESSAGE_HEADER Header; + UINT16 Length; + UINT8 MeasurementSpecificationSel; + UINT8 Reserved; + UINT32 MeasurementHashAlgo; + UINT32 BaseAsymSel; + UINT32 BaseHashSel; + UINT8 Reserved2[12]; + UINT8 ExtAsymSelCount; + UINT8 ExtHashSelCount; + UINT16 Reserved3; + // UINT32 ExtAsymSel[ExtAsymSelCount]; + // UINT32 ExtHashSel[ExtHashSelCount]; } SPDM_ALGORITHMS_RESPONSE; /// /// SPDM NEGOTIATE_ALGORITHMS response MeasurementHashAlgo /// -#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_RAW_BIT_STREAM_ONLY BIT0 -#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_TPM_ALG_SHA_256 BIT1 -#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_TPM_ALG_SHA_384 BIT2 -#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_TPM_ALG_SHA_512 BIT3 -#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_TPM_ALG_SHA3_256 BIT4 -#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_TPM_ALG_SHA3_384 BIT5 -#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_TPM_ALG_SHA3_512 BIT6 +#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_RAW_BIT_STREAM_ONLY BIT0 +#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_TPM_ALG_SHA_256 BIT1 +#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_TPM_ALG_SHA_384 BIT2 +#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_TPM_ALG_SHA_512 BIT3 +#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_TPM_ALG_SHA3_256 BIT4 +#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_TPM_ALG_SHA3_384 BIT5 +#define SPDM_ALGORITHMS_MEASUREMENT_HASH_ALGO_TPM_ALG_SHA3_512 BIT6 /// /// SPDM GET_DIGESTS request /// typedef struct { - SPDM_MESSAGE_HEADER Header; + SPDM_MESSAGE_HEADER Header; } SPDM_GET_DIGESTS_REQUEST; /// /// SPDM GET_DIGESTS response /// typedef struct { - SPDM_MESSAGE_HEADER Header; -//UINT8 Digest[DigestSize]; + SPDM_MESSAGE_HEADER Header; + // UINT8 Digest[DigestSize]; } SPDM_DIGESTS_RESPONSE; /// /// SPDM GET_DIGESTS request /// typedef struct { - SPDM_MESSAGE_HEADER Header; - UINT16 Offset; - UINT16 Length; + SPDM_MESSAGE_HEADER Header; + UINT16 Offset; + UINT16 Length; } SPDM_GET_CERTIFICATE_REQUEST; /// /// SPDM GET_DIGESTS response /// typedef struct { - SPDM_MESSAGE_HEADER Header; - UINT16 PortionLength; - UINT16 RemainderLength; -//UINT8 CertChain[CertChainSize]; + SPDM_MESSAGE_HEADER Header; + UINT16 PortionLength; + UINT16 RemainderLength; + // UINT8 CertChain[CertChainSize]; } SPDM_CERTIFICATE_RESPONSE; /// /// SPDM CHALLENGE request /// typedef struct { - SPDM_MESSAGE_HEADER Header; - UINT8 Nonce[32]; + SPDM_MESSAGE_HEADER Header; + UINT8 Nonce[32]; } SPDM_CHALLENGE_REQUEST; /// /// SPDM CHALLENGE response /// typedef struct { - SPDM_MESSAGE_HEADER Header; -//UINT8 CertChainHash[DigestSize]; -//UINT8 Nonce[32]; -//UINT8 MeasurementSummaryHash[DigestSize]; -//UINT16 OpaqueLength; -//UINT8 OpaqueData[OpaqueLength]; -//UINT8 Signature[KeySize]; + SPDM_MESSAGE_HEADER Header; + // UINT8 CertChainHash[DigestSize]; + // UINT8 Nonce[32]; + // UINT8 MeasurementSummaryHash[DigestSize]; + // UINT16 OpaqueLength; + // UINT8 OpaqueData[OpaqueLength]; + // UINT8 Signature[KeySize]; } SPDM_CHALLENGE_AUTH_RESPONSE; /// /// SPDM GET_MEASUREMENTS request /// typedef struct { - SPDM_MESSAGE_HEADER Header; - UINT8 Nonce[32]; + SPDM_MESSAGE_HEADER Header; + UINT8 Nonce[32]; } SPDM_GET_MEASUREMENTS_REQUEST; /// /// SPDM MEASUREMENTS block common header /// typedef struct { - UINT8 Index; - UINT8 MeasurementSpecification; - UINT16 MeasurementSize; -//UINT8 Measurement[MeasurementSize]; + UINT8 Index; + UINT8 MeasurementSpecification; + UINT16 MeasurementSize; + // UINT8 Measurement[MeasurementSize]; } SPDM_MEASUREMENT_BLOCK_COMMON_HEADER; -#define SPDM_MEASUREMENT_BLOCK_HEADER_SPECIFICATION_DMTF BIT0 +#define SPDM_MEASUREMENT_BLOCK_HEADER_SPECIFICATION_DMTF BIT0 /// /// SPDM MEASUREMENTS block DMTF header /// typedef struct { - UINT8 DMTFSpecMeasurementValueType; - UINT16 DMTFSpecMeasurementValueSize; -//UINT8 DMTFSpecMeasurementValue[DMTFSpecMeasurementValueSize]; + UINT8 DMTFSpecMeasurementValueType; + UINT16 DMTFSpecMeasurementValueSize; + // UINT8 DMTFSpecMeasurementValue[DMTFSpecMeasurementValueSize]; } SPDM_MEASUREMENT_BLOCK_DMTF_HEADER; /// @@ -273,24 +272,24 @@ typedef struct { /// SPDM GET_MEASUREMENTS response /// typedef struct { - SPDM_MESSAGE_HEADER Header; - UINT8 NumberOfBlocks; - UINT8 MeasurementRecordLength[3]; -//UINT8 MeasurementRecord[MeasurementRecordLength]; -//UINT8 Nonce[32]; -//UINT16 OpaqueLength; -//UINT8 OpaqueData[OpaqueLength]; -//UINT8 Signature[KeySize]; + SPDM_MESSAGE_HEADER Header; + UINT8 NumberOfBlocks; + UINT8 MeasurementRecordLength[3]; + // UINT8 MeasurementRecord[MeasurementRecordLength]; + // UINT8 Nonce[32]; + // UINT16 OpaqueLength; + // UINT8 OpaqueData[OpaqueLength]; + // UINT8 Signature[KeySize]; } SPDM_MEASUREMENTS_RESPONSE; /// /// SPDM ERROR response /// typedef struct { - SPDM_MESSAGE_HEADER Header; + SPDM_MESSAGE_HEADER Header; // Param1 == Error Code // Param2 == Error Data -//UINT8 ExtendedErrorData[]; + // UINT8 ExtendedErrorData[]; } SPDM_ERROR_RESPONSE; /// @@ -309,7 +308,7 @@ typedef struct { /// SPDM RESPONSE_IF_READY request /// typedef struct { - SPDM_MESSAGE_HEADER Header; + SPDM_MESSAGE_HEADER Header; // Param1 == RequestCode // Param2 == Token } SPDM_RESPONSE_IF_READY_REQUEST; @@ -317,4 +316,3 @@ typedef struct { #pragma pack() #endif - diff --git a/MdePkg/Include/IndustryStandard/TcgPhysicalPresence.h b/MdePkg/Include/IndustryStandard/TcgPhysicalPresence.h index c2b6a43..a518e50 100644 --- a/MdePkg/Include/IndustryStandard/TcgPhysicalPresence.h +++ b/MdePkg/Include/IndustryStandard/TcgPhysicalPresence.h @@ -12,100 +12,100 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // // TCG PP definition for physical presence ACPI function // -#define TCG_ACPI_FUNCTION_GET_PHYSICAL_PRESENCE_INTERFACE_VERSION 1 -#define TCG_ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS 2 -#define TCG_ACPI_FUNCTION_GET_PENDING_REQUEST_BY_OS 3 -#define TCG_ACPI_FUNCTION_GET_PLATFORM_ACTION_TO_TRANSITION_TO_BIOS 4 -#define TCG_ACPI_FUNCTION_RETURN_REQUEST_RESPONSE_TO_OS 5 -#define TCG_ACPI_FUNCTION_SUBMIT_PREFERRED_USER_LANGUAGE 6 -#define TCG_ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS_2 7 -#define TCG_ACPI_FUNCTION_GET_USER_CONFIRMATION_STATUS_FOR_REQUEST 8 +#define TCG_ACPI_FUNCTION_GET_PHYSICAL_PRESENCE_INTERFACE_VERSION 1 +#define TCG_ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS 2 +#define TCG_ACPI_FUNCTION_GET_PENDING_REQUEST_BY_OS 3 +#define TCG_ACPI_FUNCTION_GET_PLATFORM_ACTION_TO_TRANSITION_TO_BIOS 4 +#define TCG_ACPI_FUNCTION_RETURN_REQUEST_RESPONSE_TO_OS 5 +#define TCG_ACPI_FUNCTION_SUBMIT_PREFERRED_USER_LANGUAGE 6 +#define TCG_ACPI_FUNCTION_SUBMIT_REQUEST_TO_BIOS_2 7 +#define TCG_ACPI_FUNCTION_GET_USER_CONFIRMATION_STATUS_FOR_REQUEST 8 // // TCG PP definition for TPM Operation Response to OS Environment // -#define TCG_PP_OPERATION_RESPONSE_SUCCESS 0x0 -#define TCG_PP_OPERATION_RESPONSE_USER_ABORT 0xFFFFFFF0 -#define TCG_PP_OPERATION_RESPONSE_BIOS_FAILURE 0xFFFFFFF1 +#define TCG_PP_OPERATION_RESPONSE_SUCCESS 0x0 +#define TCG_PP_OPERATION_RESPONSE_USER_ABORT 0xFFFFFFF0 +#define TCG_PP_OPERATION_RESPONSE_BIOS_FAILURE 0xFFFFFFF1 // // TCG PP definition of return code for Return TPM Operation Response to OS Environment // -#define TCG_PP_RETURN_TPM_OPERATION_RESPONSE_SUCCESS 0 -#define TCG_PP_RETURN_TPM_OPERATION_RESPONSE_FAILURE 1 +#define TCG_PP_RETURN_TPM_OPERATION_RESPONSE_SUCCESS 0 +#define TCG_PP_RETURN_TPM_OPERATION_RESPONSE_FAILURE 1 // // TCG PP definition of return code for Submit TPM Request to Pre-OS Environment // and Submit TPM Request to Pre-OS Environment 2 // -#define TCG_PP_SUBMIT_REQUEST_TO_PREOS_SUCCESS 0 -#define TCG_PP_SUBMIT_REQUEST_TO_PREOS_NOT_IMPLEMENTED 1 -#define TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE 2 -#define TCG_PP_SUBMIT_REQUEST_TO_PREOS_BLOCKED_BY_BIOS_SETTINGS 3 +#define TCG_PP_SUBMIT_REQUEST_TO_PREOS_SUCCESS 0 +#define TCG_PP_SUBMIT_REQUEST_TO_PREOS_NOT_IMPLEMENTED 1 +#define TCG_PP_SUBMIT_REQUEST_TO_PREOS_GENERAL_FAILURE 2 +#define TCG_PP_SUBMIT_REQUEST_TO_PREOS_BLOCKED_BY_BIOS_SETTINGS 3 // // TCG PP definition of return code for Get User Confirmation Status for Operation // -#define TCG_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED 0 -#define TCG_PP_GET_USER_CONFIRMATION_BIOS_ONLY 1 -#define TCG_PP_GET_USER_CONFIRMATION_BLOCKED_BY_BIOS_CONFIGURATION 2 -#define TCG_PP_GET_USER_CONFIRMATION_ALLOWED_AND_PPUSER_REQUIRED 3 -#define TCG_PP_GET_USER_CONFIRMATION_ALLOWED_AND_PPUSER_NOT_REQUIRED 4 +#define TCG_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED 0 +#define TCG_PP_GET_USER_CONFIRMATION_BIOS_ONLY 1 +#define TCG_PP_GET_USER_CONFIRMATION_BLOCKED_BY_BIOS_CONFIGURATION 2 +#define TCG_PP_GET_USER_CONFIRMATION_ALLOWED_AND_PPUSER_REQUIRED 3 +#define TCG_PP_GET_USER_CONFIRMATION_ALLOWED_AND_PPUSER_NOT_REQUIRED 4 // // TCG PP definition of physical presence operation actions for TPM12 // -#define TCG_PHYSICAL_PRESENCE_NO_ACTION 0 -#define TCG_PHYSICAL_PRESENCE_ENABLE 1 -#define TCG_PHYSICAL_PRESENCE_DISABLE 2 -#define TCG_PHYSICAL_PRESENCE_ACTIVATE 3 -#define TCG_PHYSICAL_PRESENCE_DEACTIVATE 4 -#define TCG_PHYSICAL_PRESENCE_CLEAR 5 -#define TCG_PHYSICAL_PRESENCE_ENABLE_ACTIVATE 6 -#define TCG_PHYSICAL_PRESENCE_DEACTIVATE_DISABLE 7 -#define TCG_PHYSICAL_PRESENCE_SET_OWNER_INSTALL_TRUE 8 -#define TCG_PHYSICAL_PRESENCE_SET_OWNER_INSTALL_FALSE 9 -#define TCG_PHYSICAL_PRESENCE_ENABLE_ACTIVATE_OWNER_TRUE 10 -#define TCG_PHYSICAL_PRESENCE_DEACTIVATE_DISABLE_OWNER_FALSE 11 -#define TCG_PHYSICAL_PRESENCE_DEFERRED_PP_UNOWNERED_FIELD_UPGRADE 12 -#define TCG_PHYSICAL_PRESENCE_SET_OPERATOR_AUTH 13 -#define TCG_PHYSICAL_PRESENCE_CLEAR_ENABLE_ACTIVATE 14 -#define TCG_PHYSICAL_PRESENCE_SET_NO_PPI_PROVISION_FALSE 15 -#define TCG_PHYSICAL_PRESENCE_SET_NO_PPI_PROVISION_TRUE 16 -#define TCG_PHYSICAL_PRESENCE_SET_NO_PPI_CLEAR_FALSE 17 -#define TCG_PHYSICAL_PRESENCE_SET_NO_PPI_CLEAR_TRUE 18 -#define TCG_PHYSICAL_PRESENCE_SET_NO_PPI_MAINTENANCE_FALSE 19 -#define TCG_PHYSICAL_PRESENCE_SET_NO_PPI_MAINTENANCE_TRUE 20 -#define TCG_PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR 21 -#define TCG_PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR_ENABLE_ACTIVATE 22 +#define TCG_PHYSICAL_PRESENCE_NO_ACTION 0 +#define TCG_PHYSICAL_PRESENCE_ENABLE 1 +#define TCG_PHYSICAL_PRESENCE_DISABLE 2 +#define TCG_PHYSICAL_PRESENCE_ACTIVATE 3 +#define TCG_PHYSICAL_PRESENCE_DEACTIVATE 4 +#define TCG_PHYSICAL_PRESENCE_CLEAR 5 +#define TCG_PHYSICAL_PRESENCE_ENABLE_ACTIVATE 6 +#define TCG_PHYSICAL_PRESENCE_DEACTIVATE_DISABLE 7 +#define TCG_PHYSICAL_PRESENCE_SET_OWNER_INSTALL_TRUE 8 +#define TCG_PHYSICAL_PRESENCE_SET_OWNER_INSTALL_FALSE 9 +#define TCG_PHYSICAL_PRESENCE_ENABLE_ACTIVATE_OWNER_TRUE 10 +#define TCG_PHYSICAL_PRESENCE_DEACTIVATE_DISABLE_OWNER_FALSE 11 +#define TCG_PHYSICAL_PRESENCE_DEFERRED_PP_UNOWNERED_FIELD_UPGRADE 12 +#define TCG_PHYSICAL_PRESENCE_SET_OPERATOR_AUTH 13 +#define TCG_PHYSICAL_PRESENCE_CLEAR_ENABLE_ACTIVATE 14 +#define TCG_PHYSICAL_PRESENCE_SET_NO_PPI_PROVISION_FALSE 15 +#define TCG_PHYSICAL_PRESENCE_SET_NO_PPI_PROVISION_TRUE 16 +#define TCG_PHYSICAL_PRESENCE_SET_NO_PPI_CLEAR_FALSE 17 +#define TCG_PHYSICAL_PRESENCE_SET_NO_PPI_CLEAR_TRUE 18 +#define TCG_PHYSICAL_PRESENCE_SET_NO_PPI_MAINTENANCE_FALSE 19 +#define TCG_PHYSICAL_PRESENCE_SET_NO_PPI_MAINTENANCE_TRUE 20 +#define TCG_PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR 21 +#define TCG_PHYSICAL_PRESENCE_ENABLE_ACTIVATE_CLEAR_ENABLE_ACTIVATE 22 -#define TCG_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION 128 +#define TCG_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION 128 // // TCG PP definition of physical presence operation actions for TPM2 // -#define TCG2_PHYSICAL_PRESENCE_NO_ACTION 0 -#define TCG2_PHYSICAL_PRESENCE_ENABLE 1 -#define TCG2_PHYSICAL_PRESENCE_DISABLE 2 -#define TCG2_PHYSICAL_PRESENCE_CLEAR 5 -#define TCG2_PHYSICAL_PRESENCE_ENABLE_CLEAR 14 -#define TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_CLEAR_TRUE 17 -#define TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_CLEAR_FALSE 18 -#define TCG2_PHYSICAL_PRESENCE_ENABLE_CLEAR_2 21 -#define TCG2_PHYSICAL_PRESENCE_ENABLE_CLEAR_3 22 -#define TCG2_PHYSICAL_PRESENCE_SET_PCR_BANKS 23 -#define TCG2_PHYSICAL_PRESENCE_CHANGE_EPS 24 -#define TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_CHANGE_PCRS_FALSE 25 -#define TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_CHANGE_PCRS_TRUE 26 -#define TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_TURN_ON_FALSE 27 -#define TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_TURN_ON_TRUE 28 -#define TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_TURN_OFF_FALSE 29 -#define TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_TURN_OFF_TRUE 30 -#define TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_CHANGE_EPS_FALSE 31 -#define TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_CHANGE_EPS_TRUE 32 -#define TCG2_PHYSICAL_PRESENCE_LOG_ALL_DIGESTS 33 -#define TCG2_PHYSICAL_PRESENCE_DISABLE_ENDORSEMENT_ENABLE_STORAGE_HIERARCHY 34 -#define TCG2_PHYSICAL_PRESENCE_NO_ACTION_MAX 34 +#define TCG2_PHYSICAL_PRESENCE_NO_ACTION 0 +#define TCG2_PHYSICAL_PRESENCE_ENABLE 1 +#define TCG2_PHYSICAL_PRESENCE_DISABLE 2 +#define TCG2_PHYSICAL_PRESENCE_CLEAR 5 +#define TCG2_PHYSICAL_PRESENCE_ENABLE_CLEAR 14 +#define TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_CLEAR_TRUE 17 +#define TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_CLEAR_FALSE 18 +#define TCG2_PHYSICAL_PRESENCE_ENABLE_CLEAR_2 21 +#define TCG2_PHYSICAL_PRESENCE_ENABLE_CLEAR_3 22 +#define TCG2_PHYSICAL_PRESENCE_SET_PCR_BANKS 23 +#define TCG2_PHYSICAL_PRESENCE_CHANGE_EPS 24 +#define TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_CHANGE_PCRS_FALSE 25 +#define TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_CHANGE_PCRS_TRUE 26 +#define TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_TURN_ON_FALSE 27 +#define TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_TURN_ON_TRUE 28 +#define TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_TURN_OFF_FALSE 29 +#define TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_TURN_OFF_TRUE 30 +#define TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_CHANGE_EPS_FALSE 31 +#define TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_CHANGE_EPS_TRUE 32 +#define TCG2_PHYSICAL_PRESENCE_LOG_ALL_DIGESTS 33 +#define TCG2_PHYSICAL_PRESENCE_DISABLE_ENDORSEMENT_ENABLE_STORAGE_HIERARCHY 34 +#define TCG2_PHYSICAL_PRESENCE_NO_ACTION_MAX 34 // // TCG PP definition of physical presence operation actions for storage management @@ -118,6 +118,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_DISABLE_BLOCK_SID_FUNC_TRUE 100 #define TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_DISABLE_BLOCK_SID_FUNC_FALSE 101 -#define TCG2_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION 128 +#define TCG2_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION 128 #endif diff --git a/MdePkg/Include/IndustryStandard/TcgStorageCore.h b/MdePkg/Include/IndustryStandard/TcgStorageCore.h index 0918881..1fae7b6 100644 --- a/MdePkg/Include/IndustryStandard/TcgStorageCore.h +++ b/MdePkg/Include/IndustryStandard/TcgStorageCore.h @@ -21,7 +21,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// UID in host native byte order typedef UINT64 TCG_UID; -#define TCG_TO_UID(b0, b1, b2, b3, b4, b5, b6, b7) (TCG_UID)( \ +#define TCG_TO_UID(b0, b1, b2, b3, b4, b5, b6, b7) (TCG_UID)(\ (UINT64)(b0) | \ ((UINT64)(b1) << 8) | \ ((UINT64)(b2) << 16) | \ @@ -32,107 +32,103 @@ typedef UINT64 TCG_UID; ((UINT64)(b7) << 56)) typedef struct { - UINT32 ReservedBE; - UINT16 ComIDBE; - UINT16 ComIDExtensionBE; - UINT32 OutstandingDataBE; - UINT32 MinTransferBE; - UINT32 LengthBE; - UINT8 Payload[0]; + UINT32 ReservedBE; + UINT16 ComIDBE; + UINT16 ComIDExtensionBE; + UINT32 OutstandingDataBE; + UINT32 MinTransferBE; + UINT32 LengthBE; + UINT8 Payload[0]; } TCG_COM_PACKET; typedef struct { - UINT32 TperSessionNumberBE; - UINT32 HostSessionNumberBE; - UINT32 SequenceNumberBE; - UINT16 ReservedBE; - UINT16 AckTypeBE; - UINT32 AcknowledgementBE; - UINT32 LengthBE; - UINT8 Payload[0]; + UINT32 TperSessionNumberBE; + UINT32 HostSessionNumberBE; + UINT32 SequenceNumberBE; + UINT16 ReservedBE; + UINT16 AckTypeBE; + UINT32 AcknowledgementBE; + UINT32 LengthBE; + UINT8 Payload[0]; } TCG_PACKET; -#define TCG_SUBPACKET_ALIGNMENT 4 // 4-byte alignment per spec +#define TCG_SUBPACKET_ALIGNMENT 4// 4-byte alignment per spec typedef struct { - UINT8 ReservedBE[6]; - UINT16 KindBE; - UINT32 LengthBE; - UINT8 Payload[0]; + UINT8 ReservedBE[6]; + UINT16 KindBE; + UINT32 LengthBE; + UINT8 Payload[0]; } TCG_SUB_PACKET; -#define SUBPACKET_KIND_DATA 0x0000 -#define SUBPACKET_KIND_CREDIT_CONTROL 0x8001 +#define SUBPACKET_KIND_DATA 0x0000 +#define SUBPACKET_KIND_CREDIT_CONTROL 0x8001 -#define TCG_ATOM_TYPE_INTEGER 0x0 -#define TCG_ATOM_TYPE_BYTE 0x1 +#define TCG_ATOM_TYPE_INTEGER 0x0 +#define TCG_ATOM_TYPE_BYTE 0x1 typedef struct { - UINT8 Data : 6; - UINT8 Sign : 1; - UINT8 IsZero : 1; + UINT8 Data : 6; + UINT8 Sign : 1; + UINT8 IsZero : 1; } TCG_TINY_ATOM_BITS; typedef union { - UINT8 Raw; - TCG_TINY_ATOM_BITS TinyAtomBits; + UINT8 Raw; + TCG_TINY_ATOM_BITS TinyAtomBits; } TCG_SIMPLE_TOKEN_TINY_ATOM; - typedef struct { - UINT8 Length : 4; - UINT8 SignOrCont : 1; - UINT8 ByteOrInt : 1; - UINT8 IsZero : 1; - UINT8 IsOne : 1; + UINT8 Length : 4; + UINT8 SignOrCont : 1; + UINT8 ByteOrInt : 1; + UINT8 IsZero : 1; + UINT8 IsOne : 1; } TCG_SHORT_ATOM_BITS; typedef union { - UINT8 RawHeader; - TCG_SHORT_ATOM_BITS ShortAtomBits; + UINT8 RawHeader; + TCG_SHORT_ATOM_BITS ShortAtomBits; } TCG_SIMPLE_TOKEN_SHORT_ATOM; - -#define TCG_MEDIUM_ATOM_LENGTH_HIGH_SHIFT 0x8 -#define TCG_MEDIUM_ATOM_LENGTH_HIGH_MASK 0x7 +#define TCG_MEDIUM_ATOM_LENGTH_HIGH_SHIFT 0x8 +#define TCG_MEDIUM_ATOM_LENGTH_HIGH_MASK 0x7 typedef struct { - UINT8 LengthHigh : 3; - UINT8 SignOrCont : 1; - UINT8 ByteOrInt : 1; - UINT8 IsZero : 1; - UINT8 IsOne1 : 1; - UINT8 IsOne2 : 1; - UINT8 LengthLow; + UINT8 LengthHigh : 3; + UINT8 SignOrCont : 1; + UINT8 ByteOrInt : 1; + UINT8 IsZero : 1; + UINT8 IsOne1 : 1; + UINT8 IsOne2 : 1; + UINT8 LengthLow; } TCG_MEDIUM_ATOM_BITS; typedef union { - UINT16 RawHeader; - TCG_MEDIUM_ATOM_BITS MediumAtomBits; + UINT16 RawHeader; + TCG_MEDIUM_ATOM_BITS MediumAtomBits; } TCG_SIMPLE_TOKEN_MEDIUM_ATOM; - -#define TCG_LONG_ATOM_LENGTH_HIGH_SHIFT 16 -#define TCG_LONG_ATOM_LENGTH_MID_SHIFT 8 +#define TCG_LONG_ATOM_LENGTH_HIGH_SHIFT 16 +#define TCG_LONG_ATOM_LENGTH_MID_SHIFT 8 typedef struct { - UINT8 SignOrCont : 1; - UINT8 ByteOrInt : 1; - UINT8 Reserved : 2; - UINT8 IsZero : 1; - UINT8 IsOne1 : 1; - UINT8 IsOne2 : 1; - UINT8 IsOne3 : 1; - UINT8 LengthHigh; - UINT8 LengthMid; - UINT8 LengthLow; + UINT8 SignOrCont : 1; + UINT8 ByteOrInt : 1; + UINT8 Reserved : 2; + UINT8 IsZero : 1; + UINT8 IsOne1 : 1; + UINT8 IsOne2 : 1; + UINT8 IsOne3 : 1; + UINT8 LengthHigh; + UINT8 LengthMid; + UINT8 LengthLow; } TCG_LONG_ATOM_BITS; typedef union { - UINT32 RawHeader; - TCG_LONG_ATOM_BITS LongAtomBits; + UINT32 RawHeader; + TCG_LONG_ATOM_BITS LongAtomBits; } TCG_SIMPLE_TOKEN_LONG_ATOM; - // TCG Core Spec v2 - Table 04 - Token Types typedef enum { TcgTokenTypeReserved, @@ -158,9 +154,9 @@ typedef enum { #define TCG_TOKEN_MEDIUMATOM_MAX_BYTE_SIZE 0x7FF #define TCG_TOKEN_LONGATOM_MAX_BYTE_SIZE 0xFFFFFF -#define TCG_TOKEN_TINYATOM_UNSIGNED_MAX_VALUE 0x3F -#define TCG_TOKEN_TINYATOM_SIGNED_MAX_VALUE 0x1F -#define TCG_TOKEN_TINYATOM_SIGNED_MIN_VALUE -32 +#define TCG_TOKEN_TINYATOM_UNSIGNED_MAX_VALUE 0x3F +#define TCG_TOKEN_TINYATOM_SIGNED_MAX_VALUE 0x1F +#define TCG_TOKEN_TINYATOM_SIGNED_MIN_VALUE -32 // TOKEN TYPES #define TCG_TOKEN_TINYATOM 0x00 @@ -185,36 +181,35 @@ typedef enum { #define TCG_TOKEN_STARTTRANSACTION 0xFB #define TCG_TOKEN_ENDTRANSACTION 0xFC // 0xFD - 0xFE TCG Reserved -#define TCG_TOKEN_EMPTY 0xFF +#define TCG_TOKEN_EMPTY 0xFF // CELLBLOCK reserved Names -#define TCG_CELL_BLOCK_TABLE_NAME (UINT8)0x00 -#define TCG_CELL_BLOCK_START_ROW_NAME (UINT8)0x01 -#define TCG_CELL_BLOCK_END_ROW_NAME (UINT8)0x02 -#define TCG_CELL_BLOCK_START_COLUMN_NAME (UINT8)0x03 -#define TCG_CELL_BLOCK_END_COLUMN_NAME (UINT8)0x04 +#define TCG_CELL_BLOCK_TABLE_NAME (UINT8)0x00 +#define TCG_CELL_BLOCK_START_ROW_NAME (UINT8)0x01 +#define TCG_CELL_BLOCK_END_ROW_NAME (UINT8)0x02 +#define TCG_CELL_BLOCK_START_COLUMN_NAME (UINT8)0x03 +#define TCG_CELL_BLOCK_END_COLUMN_NAME (UINT8)0x04 // METHOD STATUS CODES -#define TCG_METHOD_STATUS_CODE_SUCCESS 0x00 -#define TCG_METHOD_STATUS_CODE_NOT_AUTHORIZED 0x01 -#define TCG_METHOD_STATUS_CODE_OBSOLETE 0x02 -#define TCG_METHOD_STATUS_CODE_SP_BUSY 0x03 -#define TCG_METHOD_STATUS_CODE_SP_FAILED 0x04 -#define TCG_METHOD_STATUS_CODE_SP_DISABLED 0x05 -#define TCG_METHOD_STATUS_CODE_SP_FROZEN 0x06 -#define TCG_METHOD_STATUS_CODE_NO_SESSIONS_AVAILABLE 0x07 -#define TCG_METHOD_STATUS_CODE_UNIQUENESS_CONFLICT 0x08 -#define TCG_METHOD_STATUS_CODE_INSUFFICIENT_SPACE 0x09 -#define TCG_METHOD_STATUS_CODE_INSUFFICIENT_ROWS 0x0A -#define TCG_METHOD_STATUS_CODE_INVALID_PARAMETER 0x0C -#define TCG_METHOD_STATUS_CODE_OBSOLETE2 0x0D -#define TCG_METHOD_STATUS_CODE_OBSOLETE3 0x0E -#define TCG_METHOD_STATUS_CODE_TPER_MALFUNCTION 0x0F -#define TCG_METHOD_STATUS_CODE_TRANSACTION_FAILURE 0x10 -#define TCG_METHOD_STATUS_CODE_RESPONSE_OVERFLOW 0x11 -#define TCG_METHOD_STATUS_CODE_AUTHORITY_LOCKED_OUT 0x12 -#define TCG_METHOD_STATUS_CODE_FAIL 0x3F - +#define TCG_METHOD_STATUS_CODE_SUCCESS 0x00 +#define TCG_METHOD_STATUS_CODE_NOT_AUTHORIZED 0x01 +#define TCG_METHOD_STATUS_CODE_OBSOLETE 0x02 +#define TCG_METHOD_STATUS_CODE_SP_BUSY 0x03 +#define TCG_METHOD_STATUS_CODE_SP_FAILED 0x04 +#define TCG_METHOD_STATUS_CODE_SP_DISABLED 0x05 +#define TCG_METHOD_STATUS_CODE_SP_FROZEN 0x06 +#define TCG_METHOD_STATUS_CODE_NO_SESSIONS_AVAILABLE 0x07 +#define TCG_METHOD_STATUS_CODE_UNIQUENESS_CONFLICT 0x08 +#define TCG_METHOD_STATUS_CODE_INSUFFICIENT_SPACE 0x09 +#define TCG_METHOD_STATUS_CODE_INSUFFICIENT_ROWS 0x0A +#define TCG_METHOD_STATUS_CODE_INVALID_PARAMETER 0x0C +#define TCG_METHOD_STATUS_CODE_OBSOLETE2 0x0D +#define TCG_METHOD_STATUS_CODE_OBSOLETE3 0x0E +#define TCG_METHOD_STATUS_CODE_TPER_MALFUNCTION 0x0F +#define TCG_METHOD_STATUS_CODE_TRANSACTION_FAILURE 0x10 +#define TCG_METHOD_STATUS_CODE_RESPONSE_OVERFLOW 0x11 +#define TCG_METHOD_STATUS_CODE_AUTHORITY_LOCKED_OUT 0x12 +#define TCG_METHOD_STATUS_CODE_FAIL 0x3F // Feature Codes #define TCG_FEATURE_INVALID (UINT16)0x0000 @@ -232,164 +227,161 @@ typedef enum { #define TCG_FEATURE_DATA_REMOVAL (UINT16)0x0404 // ACE Expression values -#define TCG_ACE_EXPRESSION_AND 0x0 -#define TCG_ACE_EXPRESSION_OR 0x1 +#define TCG_ACE_EXPRESSION_AND 0x0 +#define TCG_ACE_EXPRESSION_OR 0x1 /**************************************************************************** TRUSTED RECEIVE - supported security protocols list (SP_Specific = 0000h) ATA 8 Rev6a Table 68 7.57.6.2 ****************************************************************************/ // Security Protocol IDs -#define TCG_SECURITY_PROTOCOL_INFO 0x00 -#define TCG_OPAL_SECURITY_PROTOCOL_1 0x01 -#define TCG_OPAL_SECURITY_PROTOCOL_2 0x02 -#define TCG_SECURITY_PROTOCOL_TCG3 0x03 -#define TCG_SECURITY_PROTOCOL_TCG4 0x04 -#define TCG_SECURITY_PROTOCOL_TCG5 0x05 -#define TCG_SECURITY_PROTOCOL_TCG6 0x06 -#define TCG_SECURITY_PROTOCOL_CBCS 0x07 -#define TCG_SECURITY_PROTOCOL_TAPE_DATA 0x20 -#define TCG_SECURITY_PROTOCOL_DATA_ENCRYPT_CONFIG 0x21 -#define TCG_SECURITY_PROTOCOL_SA_CREATION_CAPS 0x40 -#define TCG_SECURITY_PROTOCOL_IKEV2_SCSI 0x41 -#define TCG_SECURITY_PROTOCOL_JEDEC_UFS 0xEC -#define TCG_SECURITY_PROTOCOL_SDCARD_SECURITY 0xED -#define TCG_SECURITY_PROTOCOL_IEEE_1667 0xEE -#define TCG_SECURITY_PROTOCOL_ATA_DEVICE_SERVER_PASS 0xEF +#define TCG_SECURITY_PROTOCOL_INFO 0x00 +#define TCG_OPAL_SECURITY_PROTOCOL_1 0x01 +#define TCG_OPAL_SECURITY_PROTOCOL_2 0x02 +#define TCG_SECURITY_PROTOCOL_TCG3 0x03 +#define TCG_SECURITY_PROTOCOL_TCG4 0x04 +#define TCG_SECURITY_PROTOCOL_TCG5 0x05 +#define TCG_SECURITY_PROTOCOL_TCG6 0x06 +#define TCG_SECURITY_PROTOCOL_CBCS 0x07 +#define TCG_SECURITY_PROTOCOL_TAPE_DATA 0x20 +#define TCG_SECURITY_PROTOCOL_DATA_ENCRYPT_CONFIG 0x21 +#define TCG_SECURITY_PROTOCOL_SA_CREATION_CAPS 0x40 +#define TCG_SECURITY_PROTOCOL_IKEV2_SCSI 0x41 +#define TCG_SECURITY_PROTOCOL_JEDEC_UFS 0xEC +#define TCG_SECURITY_PROTOCOL_SDCARD_SECURITY 0xED +#define TCG_SECURITY_PROTOCOL_IEEE_1667 0xEE +#define TCG_SECURITY_PROTOCOL_ATA_DEVICE_SERVER_PASS 0xEF // Security Protocol Specific IDs -#define TCG_SP_SPECIFIC_PROTOCOL_LIST 0x0000 -#define TCG_SP_SPECIFIC_PROTOCOL_LEVEL0_DISCOVERY 0x0001 +#define TCG_SP_SPECIFIC_PROTOCOL_LIST 0x0000 +#define TCG_SP_SPECIFIC_PROTOCOL_LEVEL0_DISCOVERY 0x0001 -#define TCG_RESERVED_COMID 0x0000 +#define TCG_RESERVED_COMID 0x0000 // Defined in TCG Storage Feature Set:Block SID Authentication spec, // ComId used for BlockSid command is hardcode 0x0005. -#define TCG_BLOCKSID_COMID 0x0005 +#define TCG_BLOCKSID_COMID 0x0005 #pragma pack(1) typedef struct { - UINT8 Reserved[6]; - UINT16 ListLength_BE; // 6 - 7 - UINT8 List[504]; // 8... + UINT8 Reserved[6]; + UINT16 ListLength_BE; // 6 - 7 + UINT8 List[504]; // 8... } TCG_SUPPORTED_SECURITY_PROTOCOLS; - // Level 0 Discovery typedef struct { - UINT32 LengthBE; // number of valid bytes in discovery response, not including length field - UINT16 VerMajorBE; - UINT16 VerMinorBE; - UINT8 Reserved[8]; - UINT8 VendorUnique[32]; + UINT32 LengthBE; // number of valid bytes in discovery response, not including length field + UINT16 VerMajorBE; + UINT16 VerMinorBE; + UINT8 Reserved[8]; + UINT8 VendorUnique[32]; } TCG_LEVEL0_DISCOVERY_HEADER; typedef struct _TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER { - UINT16 FeatureCode_BE; - UINT8 Reserved : 4; - UINT8 Version : 4; - UINT8 Length; // length of feature dependent data in bytes + UINT16 FeatureCode_BE; + UINT8 Reserved : 4; + UINT8 Version : 4; + UINT8 Length; // length of feature dependent data in bytes } TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER; - typedef struct { - TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; - UINT8 LockingSupported : 1; - UINT8 LockingEnabled : 1; // means the locking security provider (SP) is enabled - UINT8 Locked : 1; // means at least 1 locking range is enabled - UINT8 MediaEncryption : 1; - UINT8 MbrEnabled : 1; - UINT8 MbrDone : 1; - UINT8 Reserved : 2; - UINT8 Reserved515[11]; + TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; + UINT8 LockingSupported : 1; + UINT8 LockingEnabled : 1; // means the locking security provider (SP) is enabled + UINT8 Locked : 1; // means at least 1 locking range is enabled + UINT8 MediaEncryption : 1; + UINT8 MbrEnabled : 1; + UINT8 MbrDone : 1; + UINT8 Reserved : 2; + UINT8 Reserved515[11]; } TCG_LOCKING_FEATURE_DESCRIPTOR; typedef struct { - TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; - UINT8 SIDValueState : 1; - UINT8 SIDBlockedState : 1; - UINT8 Reserved4 : 6; - UINT8 HardwareReset : 1; - UINT8 Reserved5 : 7; - UINT8 Reserved615[10]; + TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; + UINT8 SIDValueState : 1; + UINT8 SIDBlockedState : 1; + UINT8 Reserved4 : 6; + UINT8 HardwareReset : 1; + UINT8 Reserved5 : 7; + UINT8 Reserved615[10]; } TCG_BLOCK_SID_FEATURE_DESCRIPTOR; - typedef struct { - TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; - UINT8 SyncSupported : 1; - UINT8 AsyncSupported : 1; - UINT8 AckNakSupported : 1; - UINT8 BufferMgmtSupported : 1; - UINT8 StreamingSupported : 1; - UINT8 Reserved4b5 : 1; - UINT8 ComIdMgmtSupported : 1; - UINT8 Reserved4b7 : 1; - UINT8 Reserved515[11]; + TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; + UINT8 SyncSupported : 1; + UINT8 AsyncSupported : 1; + UINT8 AckNakSupported : 1; + UINT8 BufferMgmtSupported : 1; + UINT8 StreamingSupported : 1; + UINT8 Reserved4b5 : 1; + UINT8 ComIdMgmtSupported : 1; + UINT8 Reserved4b7 : 1; + UINT8 Reserved515[11]; } TCG_TPER_FEATURE_DESCRIPTOR; #pragma pack() // Special Purpose UIDs -#define TCG_UID_NULL TCG_TO_UID(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00) -#define TCG_UID_THIS_SP TCG_TO_UID(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01) -#define TCG_UID_SMUID TCG_TO_UID(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF) +#define TCG_UID_NULL TCG_TO_UID(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00) +#define TCG_UID_THIS_SP TCG_TO_UID(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01) +#define TCG_UID_SMUID TCG_TO_UID(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF) // Session Manager Method UIDS -#define TCG_UID_SM_PROPERTIES TCG_TO_UID(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x01) -#define TCG_UID_SM_START_SESSION TCG_TO_UID(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x02) -#define TCG_UID_SM_SYNC_SESSION TCG_TO_UID(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03) -#define TCG_UID_SM_START_TRUSTED_SESSION TCG_TO_UID(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x04) -#define TCG_UID_SM_SYNC_TRUSTED_SESSION TCG_TO_UID(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x05) -#define TCG_UID_SM_CLOSE_SESSION TCG_TO_UID(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x06) +#define TCG_UID_SM_PROPERTIES TCG_TO_UID(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x01) +#define TCG_UID_SM_START_SESSION TCG_TO_UID(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x02) +#define TCG_UID_SM_SYNC_SESSION TCG_TO_UID(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x03) +#define TCG_UID_SM_START_TRUSTED_SESSION TCG_TO_UID(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x04) +#define TCG_UID_SM_SYNC_TRUSTED_SESSION TCG_TO_UID(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x05) +#define TCG_UID_SM_CLOSE_SESSION TCG_TO_UID(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x06) // MethodID UIDs -#define TCG_UID_METHOD_DELETE_SP TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01) -#define TCG_UID_METHOD_CREATE_TABLE TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02) -#define TCG_UID_METHOD_DELETE TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03) -#define TCG_UID_METHOD_CREATE_ROW TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04) -#define TCG_UID_METHOD_DELETE_ROW TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05) -#define TCG_UID_METHOD_NEXT TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08) -#define TCG_UID_METHOD_GET_FREE_SPACE TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x09) -#define TCG_UID_METHOD_GET_FREE_ROWS TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0A) -#define TCG_UID_METHOD_DELETE_METHOD TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0B) -#define TCG_UID_METHOD_GET_ACL TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0D) -#define TCG_UID_METHOD_ADD_ACE TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0E) -#define TCG_UID_METHOD_REMOVE_ACE TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0F) -#define TCG_UID_METHOD_GEN_KEY TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x10) -#define TCG_UID_METHOD_GET_PACKAGE TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12) -#define TCG_UID_METHOD_SET_PACKAGE TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x13) -#define TCG_UID_METHOD_GET TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x16) -#define TCG_UID_METHOD_SET TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x17) -#define TCG_UID_METHOD_AUTHENTICATE TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1C) -#define TCG_UID_METHOD_ISSUE_SP TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x02, 0x01) -#define TCG_UID_METHOD_GET_CLOCK TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x04, 0x01) -#define TCG_UID_METHOD_RESET_CLOCK TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x04, 0x02) -#define TCG_UID_METHOD_SET_CLOCK_HIGH TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x04, 0x03) -#define TCG_UID_METHOD_SET_LAG_HIGH TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x04, 0x04) -#define TCG_UID_METHOD_SET_CLOCK_LOW TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x04, 0x05) -#define TCG_UID_METHOD_SET_LAG_LOW TCG_TO_UID(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x06) -#define TCG_UID_METHOD_INCREMENT_COUNTER TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x04, 0x07) -#define TCG_UID_METHOD_RANDOM TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x01) -#define TCG_UID_METHOD_SALT TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x02) -#define TCG_UID_METHOD_DECRYPT_INIT TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x03) -#define TCG_UID_METHOD_DECRYPT TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x04) -#define TCG_UID_METHOD_DECRYPT_FINALIZE TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x05) -#define TCG_UID_METHOD_ENCRYPT_INIT TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x06) -#define TCG_UID_METHOD_ENCRYPT TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x07) -#define TCG_UID_METHOD_ENCRYPT_FINALIZE TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x08) -#define TCG_UID_METHOD_HMAC_INIT TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x09) -#define TCG_UID_METHOD_HMAC TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x0A) -#define TCG_UID_METHOD_HMAC_FINALIZE TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x0B) -#define TCG_UID_METHOD_HASH_INIT TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x0C) -#define TCG_UID_METHOD_HASH TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x0D) -#define TCG_UID_METHOD_HASH_FINALIZE TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x0E) -#define TCG_UID_METHOD_SIGN TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x0F) -#define TCG_UID_METHOD_VERIFY TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x10) -#define TCG_UID_METHOD_XOR TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x11) -#define TCG_UID_METHOD_ADD_LOG TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0A, 0x01) -#define TCG_UID_METHOD_CREATE_LOG TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0A, 0x02) -#define TCG_UID_METHOD_CLEAR_LOG TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0A, 0x03) -#define TCG_UID_METHOD_FLUSH_LOG TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0A, 0x04) +#define TCG_UID_METHOD_DELETE_SP TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01) +#define TCG_UID_METHOD_CREATE_TABLE TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02) +#define TCG_UID_METHOD_DELETE TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03) +#define TCG_UID_METHOD_CREATE_ROW TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04) +#define TCG_UID_METHOD_DELETE_ROW TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x05) +#define TCG_UID_METHOD_NEXT TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08) +#define TCG_UID_METHOD_GET_FREE_SPACE TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x09) +#define TCG_UID_METHOD_GET_FREE_ROWS TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0A) +#define TCG_UID_METHOD_DELETE_METHOD TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0B) +#define TCG_UID_METHOD_GET_ACL TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0D) +#define TCG_UID_METHOD_ADD_ACE TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0E) +#define TCG_UID_METHOD_REMOVE_ACE TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0F) +#define TCG_UID_METHOD_GEN_KEY TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x10) +#define TCG_UID_METHOD_GET_PACKAGE TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12) +#define TCG_UID_METHOD_SET_PACKAGE TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x13) +#define TCG_UID_METHOD_GET TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x16) +#define TCG_UID_METHOD_SET TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x17) +#define TCG_UID_METHOD_AUTHENTICATE TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1C) +#define TCG_UID_METHOD_ISSUE_SP TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x02, 0x01) +#define TCG_UID_METHOD_GET_CLOCK TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x04, 0x01) +#define TCG_UID_METHOD_RESET_CLOCK TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x04, 0x02) +#define TCG_UID_METHOD_SET_CLOCK_HIGH TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x04, 0x03) +#define TCG_UID_METHOD_SET_LAG_HIGH TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x04, 0x04) +#define TCG_UID_METHOD_SET_CLOCK_LOW TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x04, 0x05) +#define TCG_UID_METHOD_SET_LAG_LOW TCG_TO_UID(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x06) +#define TCG_UID_METHOD_INCREMENT_COUNTER TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x04, 0x07) +#define TCG_UID_METHOD_RANDOM TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x01) +#define TCG_UID_METHOD_SALT TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x02) +#define TCG_UID_METHOD_DECRYPT_INIT TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x03) +#define TCG_UID_METHOD_DECRYPT TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x04) +#define TCG_UID_METHOD_DECRYPT_FINALIZE TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x05) +#define TCG_UID_METHOD_ENCRYPT_INIT TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x06) +#define TCG_UID_METHOD_ENCRYPT TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x07) +#define TCG_UID_METHOD_ENCRYPT_FINALIZE TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x08) +#define TCG_UID_METHOD_HMAC_INIT TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x09) +#define TCG_UID_METHOD_HMAC TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x0A) +#define TCG_UID_METHOD_HMAC_FINALIZE TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x0B) +#define TCG_UID_METHOD_HASH_INIT TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x0C) +#define TCG_UID_METHOD_HASH TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x0D) +#define TCG_UID_METHOD_HASH_FINALIZE TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x0E) +#define TCG_UID_METHOD_SIGN TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x0F) +#define TCG_UID_METHOD_VERIFY TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x10) +#define TCG_UID_METHOD_XOR TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x11) +#define TCG_UID_METHOD_ADD_LOG TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0A, 0x01) +#define TCG_UID_METHOD_CREATE_LOG TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0A, 0x02) +#define TCG_UID_METHOD_CLEAR_LOG TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0A, 0x03) +#define TCG_UID_METHOD_FLUSH_LOG TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x0A, 0x04) #endif // TCG_H_ diff --git a/MdePkg/Include/IndustryStandard/TcgStorageOpal.h b/MdePkg/Include/IndustryStandard/TcgStorageOpal.h index f6617f0..017c40d 100644 --- a/MdePkg/Include/IndustryStandard/TcgStorageOpal.h +++ b/MdePkg/Include/IndustryStandard/TcgStorageOpal.h @@ -25,22 +25,22 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include -#define OPAL_UID_ADMIN_SP TCG_TO_UID(0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x00, 0x01) -#define OPAL_UID_ADMIN_SP_C_PIN_MSID TCG_TO_UID(0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x84, 0x02) -#define OPAL_UID_ADMIN_SP_C_PIN_SID TCG_TO_UID(0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x01) -#define OPAL_UID_LOCKING_SP TCG_TO_UID(0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x00, 0x02) +#define OPAL_UID_ADMIN_SP TCG_TO_UID(0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x00, 0x01) +#define OPAL_UID_ADMIN_SP_C_PIN_MSID TCG_TO_UID(0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x84, 0x02) +#define OPAL_UID_ADMIN_SP_C_PIN_SID TCG_TO_UID(0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x01) +#define OPAL_UID_LOCKING_SP TCG_TO_UID(0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x00, 0x02) // ADMIN_SP // Authorities -#define OPAL_ADMIN_SP_ANYBODY_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01) -#define OPAL_ADMIN_SP_ADMINS_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x02) -#define OPAL_ADMIN_SP_MAKERS_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x03) -#define OPAL_ADMIN_SP_SID_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x06) -#define OPAL_ADMIN_SP_ADMIN1_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x02, 0x01) -#define OPAL_ADMIN_SP_PSID_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x01, 0xFF, 0x01) +#define OPAL_ADMIN_SP_ANYBODY_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01) +#define OPAL_ADMIN_SP_ADMINS_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x02) +#define OPAL_ADMIN_SP_MAKERS_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x03) +#define OPAL_ADMIN_SP_SID_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x06) +#define OPAL_ADMIN_SP_ADMIN1_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x02, 0x01) +#define OPAL_ADMIN_SP_PSID_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x01, 0xFF, 0x01) -#define OPAL_ADMIN_SP_ACTIVATE_METHOD TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x02, 0x03) -#define OPAL_ADMIN_SP_REVERT_METHOD TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x02, 0x02) +#define OPAL_ADMIN_SP_ACTIVATE_METHOD TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x02, 0x03) +#define OPAL_ADMIN_SP_REVERT_METHOD TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x02, 0x02) // ADMIN_SP // Data Removal mechanism @@ -48,61 +48,59 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // LOCKING SP // Authorities -#define OPAL_LOCKING_SP_ANYBODY_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01) -#define OPAL_LOCKING_SP_ADMINS_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x02) -#define OPAL_LOCKING_SP_ADMIN1_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x01, 0x00, 0x01) -#define OPAL_LOCKING_SP_USERS_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00) -#define OPAL_LOCKING_SP_USER1_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x03, 0x00, 0x01) +#define OPAL_LOCKING_SP_ANYBODY_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01) +#define OPAL_LOCKING_SP_ADMINS_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x02) +#define OPAL_LOCKING_SP_ADMIN1_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x01, 0x00, 0x01) +#define OPAL_LOCKING_SP_USERS_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x03, 0x00, 0x00) +#define OPAL_LOCKING_SP_USER1_AUTHORITY TCG_TO_UID(0x00, 0x00, 0x00, 0x09, 0x00, 0x03, 0x00, 0x01) -#define OPAL_LOCKING_SP_REVERTSP_METHOD TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11) +#define OPAL_LOCKING_SP_REVERTSP_METHOD TCG_TO_UID(0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11) // C_PIN Table Rows -#define OPAL_LOCKING_SP_C_PIN_ADMIN1 TCG_TO_UID( 0x00, 0x00, 0x00, 0x0B, 0x00, 0x01, 0x00, 0x01 ) -#define OPAL_LOCKING_SP_C_PIN_USER1 TCG_TO_UID( 0x00, 0x00, 0x00, 0x0B, 0x00, 0x03, 0x00, 0x01 ) +#define OPAL_LOCKING_SP_C_PIN_ADMIN1 TCG_TO_UID( 0x00, 0x00, 0x00, 0x0B, 0x00, 0x01, 0x00, 0x01 ) +#define OPAL_LOCKING_SP_C_PIN_USER1 TCG_TO_UID( 0x00, 0x00, 0x00, 0x0B, 0x00, 0x03, 0x00, 0x01 ) // Locking Table -#define OPAL_LOCKING_SP_LOCKING_GLOBALRANGE TCG_TO_UID( 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x00, 0x01 ) -#define OPAL_LOCKING_SP_LOCKING_RANGE1 TCG_TO_UID( 0x00, 0x00, 0x08, 0x02, 0x00, 0x03, 0x00, 0x01 ) - +#define OPAL_LOCKING_SP_LOCKING_GLOBALRANGE TCG_TO_UID( 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x00, 0x01 ) +#define OPAL_LOCKING_SP_LOCKING_RANGE1 TCG_TO_UID( 0x00, 0x00, 0x08, 0x02, 0x00, 0x03, 0x00, 0x01 ) // LOCKING SP ACE Table Preconfiguration -#define OPAL_LOCKING_SP_ACE_LOCKING_GLOBALRANGE_GET_ALL TCG_TO_UID( 0x00, 0x00, 0x00, 0x08, 0x00, 0x03, 0xD0, 0x00 ) -#define OPAL_LOCKING_SP_ACE_LOCKING_GLOBALRANGE_SET_RDLOCKED TCG_TO_UID( 0x00, 0x00, 0x00, 0x08, 0x00, 0x03, 0xE0, 0x00 ) -#define OPAL_LOCKING_SP_ACE_LOCKING_GLOBALRANGE_SET_WRLOCKED TCG_TO_UID( 0x00, 0x00, 0x00, 0x08, 0x00, 0x03, 0xE8, 0x00 ) - -#define OPAL_LOCKING_SP_ACE_K_AES_256_GLOBALRANGE_GENKEY TCG_TO_UID( 0x00, 0x00, 0x00, 0x08, 0x00, 0x03, 0xB8, 0x00 ) -#define OPAL_LOCKING_SP_ACE_K_AES_128_GLOBALRANGE_GENKEY TCG_TO_UID( 0x00, 0x00, 0x00, 0x08, 0x00, 0x03, 0xB0, 0x00 ) +#define OPAL_LOCKING_SP_ACE_LOCKING_GLOBALRANGE_GET_ALL TCG_TO_UID( 0x00, 0x00, 0x00, 0x08, 0x00, 0x03, 0xD0, 0x00 ) +#define OPAL_LOCKING_SP_ACE_LOCKING_GLOBALRANGE_SET_RDLOCKED TCG_TO_UID( 0x00, 0x00, 0x00, 0x08, 0x00, 0x03, 0xE0, 0x00 ) +#define OPAL_LOCKING_SP_ACE_LOCKING_GLOBALRANGE_SET_WRLOCKED TCG_TO_UID( 0x00, 0x00, 0x00, 0x08, 0x00, 0x03, 0xE8, 0x00 ) +#define OPAL_LOCKING_SP_ACE_K_AES_256_GLOBALRANGE_GENKEY TCG_TO_UID( 0x00, 0x00, 0x00, 0x08, 0x00, 0x03, 0xB8, 0x00 ) +#define OPAL_LOCKING_SP_ACE_K_AES_128_GLOBALRANGE_GENKEY TCG_TO_UID( 0x00, 0x00, 0x00, 0x08, 0x00, 0x03, 0xB0, 0x00 ) // LOCKING SP LockingInfo Table Preconfiguration -#define OPAL_LOCKING_SP_LOCKING_INFO TCG_TO_UID( 0x00, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x01 ) +#define OPAL_LOCKING_SP_LOCKING_INFO TCG_TO_UID( 0x00, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x01 ) -#define OPAL_LOCKING_SP_LOCKINGINFO_ALIGNMENTREQUIRED_COL 0x7 -#define OPAL_LOCKING_SP_LOCKINGINFO_LOGICALBLOCKSIZE_COL 0x8 -#define OPAL_LOCKING_SP_LOCKINGINFO_ALIGNMENTGRANULARITY_COL 0x9 -#define OPAL_LOCKING_SP_LOCKINGINFO_LOWESTALIGNEDLBA_COL 0xA +#define OPAL_LOCKING_SP_LOCKINGINFO_ALIGNMENTREQUIRED_COL 0x7 +#define OPAL_LOCKING_SP_LOCKINGINFO_LOGICALBLOCKSIZE_COL 0x8 +#define OPAL_LOCKING_SP_LOCKINGINFO_ALIGNMENTGRANULARITY_COL 0x9 +#define OPAL_LOCKING_SP_LOCKINGINFO_LOWESTALIGNEDLBA_COL 0xA // K_AES_256 Table Preconfiguration -#define OPAL_LOCKING_SP_K_AES_256_GLOBALRANGE_KEY TCG_TO_UID( 0x00, 0x00, 0x08, 0x06, 0x00, 0x00, 0x00, 0x01 ) +#define OPAL_LOCKING_SP_K_AES_256_GLOBALRANGE_KEY TCG_TO_UID( 0x00, 0x00, 0x08, 0x06, 0x00, 0x00, 0x00, 0x01 ) // K_AES_128 Table Preconfiguration -#define OPAL_LOCKING_SP_K_AES_128_GLOBALRANGE_KEY TCG_TO_UID( 0x00, 0x00, 0x08, 0x05, 0x00, 0x00, 0x00, 0x01 ) +#define OPAL_LOCKING_SP_K_AES_128_GLOBALRANGE_KEY TCG_TO_UID( 0x00, 0x00, 0x08, 0x05, 0x00, 0x00, 0x00, 0x01 ) // Minimum Properties that an Opal Compliant SD Shall support -#define OPAL_MIN_MAX_COM_PACKET_SIZE 2048 -#define OPAL_MIN_MAX_REPONSE_COM_PACKET_SIZE 2048 -#define OPAL_MIN_MAX_PACKET_SIZE 2028 -#define OPAL_MIN_MAX_IND_TOKEN_SIZE 1992 -#define OPAL_MIN_MAX_PACKETS 1 -#define OPAL_MIN_MAX_SUBPACKETS 1 -#define OPAL_MIN_MAX_METHODS 1 -#define OPAL_MIN_MAX_SESSIONS 1 -#define OPAL_MIN_MAX_AUTHENTICATIONS 2 -#define OPAL_MIN_MAX_TRANSACTION_LIMIT 1 - -#define OPAL_ADMIN_SP_PIN_COL 3 -#define OPAL_LOCKING_SP_C_PIN_TRYLIMIT_COL 5 -#define OPAL_RANDOM_METHOD_MAX_COUNT_SIZE 32 +#define OPAL_MIN_MAX_COM_PACKET_SIZE 2048 +#define OPAL_MIN_MAX_REPONSE_COM_PACKET_SIZE 2048 +#define OPAL_MIN_MAX_PACKET_SIZE 2028 +#define OPAL_MIN_MAX_IND_TOKEN_SIZE 1992 +#define OPAL_MIN_MAX_PACKETS 1 +#define OPAL_MIN_MAX_SUBPACKETS 1 +#define OPAL_MIN_MAX_METHODS 1 +#define OPAL_MIN_MAX_SESSIONS 1 +#define OPAL_MIN_MAX_AUTHENTICATIONS 2 +#define OPAL_MIN_MAX_TRANSACTION_LIMIT 1 + +#define OPAL_ADMIN_SP_PIN_COL 3 +#define OPAL_LOCKING_SP_C_PIN_TRYLIMIT_COL 5 +#define OPAL_RANDOM_METHOD_MAX_COUNT_SIZE 32 // Data Removal Mechanism column. #define OPAL_ADMIN_SP_ACTIVE_DATA_REMOVAL_MECHANISM_COL 1 @@ -124,118 +122,118 @@ typedef enum { #pragma pack(1) typedef struct _OPAL_GEOMETRY_REPORTING_FEATURE { - TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; - UINT8 Reserved[8]; - UINT32 LogicalBlockSizeBE; - UINT64 AlignmentGranularityBE; - UINT64 LowestAlignedLBABE; + TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; + UINT8 Reserved[8]; + UINT32 LogicalBlockSizeBE; + UINT64 AlignmentGranularityBE; + UINT64 LowestAlignedLBABE; } OPAL_GEOMETRY_REPORTING_FEATURE; typedef struct _OPAL_SINGLE_USER_MODE_FEATURE { - TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; - UINT32 NumLockingObjectsSupportedBE; - UINT8 Any : 1; - UINT8 All : 1; - UINT8 Policy : 1; - UINT8 Reserved : 5; - UINT8 Reserved2[7]; + TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; + UINT32 NumLockingObjectsSupportedBE; + UINT8 Any : 1; + UINT8 All : 1; + UINT8 Policy : 1; + UINT8 Reserved : 5; + UINT8 Reserved2[7]; } OPAL_SINGLE_USER_MODE_FEATURE; typedef struct _OPAL_DATASTORE_TABLE_FEATURE { - TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; - UINT16 Reserved; - UINT16 MaxNumTablesBE; - UINT32 MaxTotalSizeBE; - UINT32 SizeAlignmentBE; + TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; + UINT16 Reserved; + UINT16 MaxNumTablesBE; + UINT32 MaxTotalSizeBE; + UINT32 SizeAlignmentBE; } OPAL_DATASTORE_TABLE_FEATURE; typedef struct _OPAL_SSCV1_FEATURE_DESCRIPTOR { - TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; - UINT16 BaseComdIdBE; - UINT16 NumComIdsBE; - UINT8 RangeCrossing : 1; - UINT8 Reserved : 7; - UINT8 Future[11]; + TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; + UINT16 BaseComdIdBE; + UINT16 NumComIdsBE; + UINT8 RangeCrossing : 1; + UINT8 Reserved : 7; + UINT8 Future[11]; } OPAL_SSCV1_FEATURE_DESCRIPTOR; typedef struct _OPAL_SSCV2_FEATURE_DESCRIPTOR { - TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; - UINT16 BaseComdIdBE; - UINT16 NumComIdsBE; - UINT8 Reserved; - UINT16 NumLockingSpAdminAuthoritiesSupportedBE; - UINT16 NumLockingSpUserAuthoritiesSupportedBE; - UINT8 InitialCPINSIDPIN; - UINT8 CPINSIDPINRevertBehavior; - UINT8 Future[5]; + TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; + UINT16 BaseComdIdBE; + UINT16 NumComIdsBE; + UINT8 Reserved; + UINT16 NumLockingSpAdminAuthoritiesSupportedBE; + UINT16 NumLockingSpUserAuthoritiesSupportedBE; + UINT8 InitialCPINSIDPIN; + UINT8 CPINSIDPINRevertBehavior; + UINT8 Future[5]; } OPAL_SSCV2_FEATURE_DESCRIPTOR; typedef struct _OPAL_SSCLITE_FEATURE_DESCRIPTOR { - TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; - UINT16 BaseComdIdBE; - UINT16 NumComIdsBE; - UINT8 Reserved[5]; - UINT8 InitialCPINSIDPIN; - UINT8 CPINSIDPINRevertBehavior; - UINT8 Future[5]; + TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; + UINT16 BaseComdIdBE; + UINT16 NumComIdsBE; + UINT8 Reserved[5]; + UINT8 InitialCPINSIDPIN; + UINT8 CPINSIDPINRevertBehavior; + UINT8 Future[5]; } OPAL_SSCLITE_FEATURE_DESCRIPTOR; typedef struct _PYRITE_SSC_FEATURE_DESCRIPTOR { - TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; - UINT16 BaseComdIdBE; - UINT16 NumComIdsBE; - UINT8 Reserved[5]; - UINT8 InitialCPINSIDPIN; - UINT8 CPINSIDPINRevertBehavior; - UINT8 Future[5]; + TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; + UINT16 BaseComdIdBE; + UINT16 NumComIdsBE; + UINT8 Reserved[5]; + UINT8 InitialCPINSIDPIN; + UINT8 CPINSIDPINRevertBehavior; + UINT8 Future[5]; } PYRITE_SSC_FEATURE_DESCRIPTOR; typedef struct _PYRITE_SSCV2_FEATURE_DESCRIPTOR { - TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; - UINT16 BaseComdIdBE; - UINT16 NumComIdsBE; - UINT8 Reserved[5]; - UINT8 InitialCPINSIDPIN; - UINT8 CPINSIDPINRevertBehavior; - UINT8 Future[5]; + TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; + UINT16 BaseComdIdBE; + UINT16 NumComIdsBE; + UINT8 Reserved[5]; + UINT8 InitialCPINSIDPIN; + UINT8 CPINSIDPINRevertBehavior; + UINT8 Future[5]; } PYRITE_SSCV2_FEATURE_DESCRIPTOR; typedef struct _DATA_REMOVAL_FEATURE_DESCRIPTOR { - TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; - UINT8 Reserved; - UINT8 OperationProcessing : 1; - UINT8 Reserved2 : 7; - UINT8 RemovalMechanism; - UINT8 FormatBit0 : 1; // Data Removal Time Format for Bit 0 - UINT8 FormatBit1 : 1; // Data Removal Time Format for Bit 1 - UINT8 FormatBit2 : 1; // Data Removal Time Format for Bit 2 - UINT8 FormatBit3 : 1; // Data Removal Time Format for Bit 3 - UINT8 FormatBit4 : 1; // Data Removal Time Format for Bit 4 - UINT8 FormatBit5 : 1; // Data Removal Time Format for Bit 5 - UINT8 Reserved3 : 2; - UINT16 TimeBit0; // Data Removal Time for Supported Data Removal Mechanism Bit 0 - UINT16 TimeBit1; // Data Removal Time for Supported Data Removal Mechanism Bit 1 - UINT16 TimeBit2; // Data Removal Time for Supported Data Removal Mechanism Bit 2 - UINT16 TimeBit3; // Data Removal Time for Supported Data Removal Mechanism Bit 3 - UINT16 TimeBit4; // Data Removal Time for Supported Data Removal Mechanism Bit 4 - UINT16 TimeBit5; // Data Removal Time for Supported Data Removal Mechanism Bit 5 - UINT8 Future[16]; + TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER Header; + UINT8 Reserved; + UINT8 OperationProcessing : 1; + UINT8 Reserved2 : 7; + UINT8 RemovalMechanism; + UINT8 FormatBit0 : 1; // Data Removal Time Format for Bit 0 + UINT8 FormatBit1 : 1; // Data Removal Time Format for Bit 1 + UINT8 FormatBit2 : 1; // Data Removal Time Format for Bit 2 + UINT8 FormatBit3 : 1; // Data Removal Time Format for Bit 3 + UINT8 FormatBit4 : 1; // Data Removal Time Format for Bit 4 + UINT8 FormatBit5 : 1; // Data Removal Time Format for Bit 5 + UINT8 Reserved3 : 2; + UINT16 TimeBit0; // Data Removal Time for Supported Data Removal Mechanism Bit 0 + UINT16 TimeBit1; // Data Removal Time for Supported Data Removal Mechanism Bit 1 + UINT16 TimeBit2; // Data Removal Time for Supported Data Removal Mechanism Bit 2 + UINT16 TimeBit3; // Data Removal Time for Supported Data Removal Mechanism Bit 3 + UINT16 TimeBit4; // Data Removal Time for Supported Data Removal Mechanism Bit 4 + UINT16 TimeBit5; // Data Removal Time for Supported Data Removal Mechanism Bit 5 + UINT8 Future[16]; } DATA_REMOVAL_FEATURE_DESCRIPTOR; typedef union { - TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER CommonHeader; - TCG_TPER_FEATURE_DESCRIPTOR Tper; - TCG_LOCKING_FEATURE_DESCRIPTOR Locking; - OPAL_GEOMETRY_REPORTING_FEATURE Geometry; - OPAL_SINGLE_USER_MODE_FEATURE SingleUser; - OPAL_DATASTORE_TABLE_FEATURE DataStore; - OPAL_SSCV1_FEATURE_DESCRIPTOR OpalSscV1; - OPAL_SSCV2_FEATURE_DESCRIPTOR OpalSscV2; - OPAL_SSCLITE_FEATURE_DESCRIPTOR OpalSscLite; - PYRITE_SSC_FEATURE_DESCRIPTOR PyriteSsc; - PYRITE_SSCV2_FEATURE_DESCRIPTOR PyriteSscV2; - TCG_BLOCK_SID_FEATURE_DESCRIPTOR BlockSid; - DATA_REMOVAL_FEATURE_DESCRIPTOR DataRemoval; + TCG_LEVEL0_FEATURE_DESCRIPTOR_HEADER CommonHeader; + TCG_TPER_FEATURE_DESCRIPTOR Tper; + TCG_LOCKING_FEATURE_DESCRIPTOR Locking; + OPAL_GEOMETRY_REPORTING_FEATURE Geometry; + OPAL_SINGLE_USER_MODE_FEATURE SingleUser; + OPAL_DATASTORE_TABLE_FEATURE DataStore; + OPAL_SSCV1_FEATURE_DESCRIPTOR OpalSscV1; + OPAL_SSCV2_FEATURE_DESCRIPTOR OpalSscV2; + OPAL_SSCLITE_FEATURE_DESCRIPTOR OpalSscLite; + PYRITE_SSC_FEATURE_DESCRIPTOR PyriteSsc; + PYRITE_SSCV2_FEATURE_DESCRIPTOR PyriteSscV2; + TCG_BLOCK_SID_FEATURE_DESCRIPTOR BlockSid; + DATA_REMOVAL_FEATURE_DESCRIPTOR DataRemoval; } OPAL_LEVEL0_FEATURE_DESCRIPTOR; #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/TcpaAcpi.h b/MdePkg/Include/IndustryStandard/TcpaAcpi.h index 2d35428..8de4f76 100644 --- a/MdePkg/Include/IndustryStandard/TcpaAcpi.h +++ b/MdePkg/Include/IndustryStandard/TcpaAcpi.h @@ -14,38 +14,38 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #pragma pack (1) typedef struct _EFI_TCG_CLIENT_ACPI_TABLE { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT16 PlatformClass; - UINT32 Laml; - UINT64 Lasa; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT16 PlatformClass; + UINT32 Laml; + UINT64 Lasa; } EFI_TCG_CLIENT_ACPI_TABLE; typedef struct _EFI_TCG_SERVER_ACPI_TABLE { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT16 PlatformClass; - UINT16 Reserved0; - UINT64 Laml; - UINT64 Lasa; - UINT16 SpecRev; - UINT8 DeviceFlags; - UINT8 InterruptFlags; - UINT8 Gpe; - UINT8 Reserved1[3]; - UINT32 GlobalSysInt; - EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE BaseAddress; - UINT32 Reserved2; - EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE ConfigAddress; - UINT8 PciSegNum; - UINT8 PciBusNum; - UINT8 PciDevNum; - UINT8 PciFuncNum; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT16 PlatformClass; + UINT16 Reserved0; + UINT64 Laml; + UINT64 Lasa; + UINT16 SpecRev; + UINT8 DeviceFlags; + UINT8 InterruptFlags; + UINT8 Gpe; + UINT8 Reserved1[3]; + UINT32 GlobalSysInt; + EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE BaseAddress; + UINT32 Reserved2; + EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE ConfigAddress; + UINT8 PciSegNum; + UINT8 PciBusNum; + UINT8 PciDevNum; + UINT8 PciFuncNum; } EFI_TCG_SERVER_ACPI_TABLE; // // TCG Platform Type based on TCG ACPI Specification Version 1.00 // -#define TCG_PLATFORM_TYPE_CLIENT 0 -#define TCG_PLATFORM_TYPE_SERVER 1 +#define TCG_PLATFORM_TYPE_CLIENT 0 +#define TCG_PLATFORM_TYPE_SERVER 1 #pragma pack () diff --git a/MdePkg/Include/IndustryStandard/Tls1.h b/MdePkg/Include/IndustryStandard/Tls1.h index 12dd616..cf67428 100644 --- a/MdePkg/Include/IndustryStandard/Tls1.h +++ b/MdePkg/Include/IndustryStandard/Tls1.h @@ -15,42 +15,42 @@ /// /// TLS Cipher Suite, refers to A.5 of rfc-2246, rfc-4346 and rfc-5246. /// -#define TLS_RSA_WITH_NULL_MD5 {0x00, 0x01} -#define TLS_RSA_WITH_NULL_SHA {0x00, 0x02} -#define TLS_RSA_WITH_RC4_128_MD5 {0x00, 0x04} -#define TLS_RSA_WITH_RC4_128_SHA {0x00, 0x05} -#define TLS_RSA_WITH_IDEA_CBC_SHA {0x00, 0x07} -#define TLS_RSA_WITH_DES_CBC_SHA {0x00, 0x09} -#define TLS_RSA_WITH_3DES_EDE_CBC_SHA {0x00, 0x0A} -#define TLS_DH_DSS_WITH_DES_CBC_SHA {0x00, 0x0C} -#define TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA {0x00, 0x0D} -#define TLS_DH_RSA_WITH_DES_CBC_SHA {0x00, 0x0F} -#define TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA {0x00, 0x10} -#define TLS_DHE_DSS_WITH_DES_CBC_SHA {0x00, 0x12} -#define TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA {0x00, 0x13} -#define TLS_DHE_RSA_WITH_DES_CBC_SHA {0x00, 0x15} -#define TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA {0x00, 0x16} -#define TLS_RSA_WITH_AES_128_CBC_SHA {0x00, 0x2F} -#define TLS_DH_DSS_WITH_AES_128_CBC_SHA {0x00, 0x30} -#define TLS_DH_RSA_WITH_AES_128_CBC_SHA {0x00, 0x31} -#define TLS_DHE_DSS_WITH_AES_128_CBC_SHA {0x00, 0x32} -#define TLS_DHE_RSA_WITH_AES_128_CBC_SHA {0x00, 0x33} -#define TLS_RSA_WITH_AES_256_CBC_SHA {0x00, 0x35} -#define TLS_DH_DSS_WITH_AES_256_CBC_SHA {0x00, 0x36} -#define TLS_DH_RSA_WITH_AES_256_CBC_SHA {0x00, 0x37} -#define TLS_DHE_DSS_WITH_AES_256_CBC_SHA {0x00, 0x38} -#define TLS_DHE_RSA_WITH_AES_256_CBC_SHA {0x00, 0x39} -#define TLS_RSA_WITH_NULL_SHA256 {0x00, 0x3B} -#define TLS_RSA_WITH_AES_128_CBC_SHA256 {0x00, 0x3C} -#define TLS_RSA_WITH_AES_256_CBC_SHA256 {0x00, 0x3D} -#define TLS_DH_DSS_WITH_AES_128_CBC_SHA256 {0x00, 0x3E} -#define TLS_DH_RSA_WITH_AES_128_CBC_SHA256 {0x00, 0x3F} -#define TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 {0x00, 0x40} -#define TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 {0x00, 0x67} -#define TLS_DH_DSS_WITH_AES_256_CBC_SHA256 {0x00, 0x68} -#define TLS_DH_RSA_WITH_AES_256_CBC_SHA256 {0x00, 0x69} -#define TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 {0x00, 0x6A} -#define TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 {0x00, 0x6B} +#define TLS_RSA_WITH_NULL_MD5 {0x00, 0x01} +#define TLS_RSA_WITH_NULL_SHA {0x00, 0x02} +#define TLS_RSA_WITH_RC4_128_MD5 {0x00, 0x04} +#define TLS_RSA_WITH_RC4_128_SHA {0x00, 0x05} +#define TLS_RSA_WITH_IDEA_CBC_SHA {0x00, 0x07} +#define TLS_RSA_WITH_DES_CBC_SHA {0x00, 0x09} +#define TLS_RSA_WITH_3DES_EDE_CBC_SHA {0x00, 0x0A} +#define TLS_DH_DSS_WITH_DES_CBC_SHA {0x00, 0x0C} +#define TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA {0x00, 0x0D} +#define TLS_DH_RSA_WITH_DES_CBC_SHA {0x00, 0x0F} +#define TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA {0x00, 0x10} +#define TLS_DHE_DSS_WITH_DES_CBC_SHA {0x00, 0x12} +#define TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA {0x00, 0x13} +#define TLS_DHE_RSA_WITH_DES_CBC_SHA {0x00, 0x15} +#define TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA {0x00, 0x16} +#define TLS_RSA_WITH_AES_128_CBC_SHA {0x00, 0x2F} +#define TLS_DH_DSS_WITH_AES_128_CBC_SHA {0x00, 0x30} +#define TLS_DH_RSA_WITH_AES_128_CBC_SHA {0x00, 0x31} +#define TLS_DHE_DSS_WITH_AES_128_CBC_SHA {0x00, 0x32} +#define TLS_DHE_RSA_WITH_AES_128_CBC_SHA {0x00, 0x33} +#define TLS_RSA_WITH_AES_256_CBC_SHA {0x00, 0x35} +#define TLS_DH_DSS_WITH_AES_256_CBC_SHA {0x00, 0x36} +#define TLS_DH_RSA_WITH_AES_256_CBC_SHA {0x00, 0x37} +#define TLS_DHE_DSS_WITH_AES_256_CBC_SHA {0x00, 0x38} +#define TLS_DHE_RSA_WITH_AES_256_CBC_SHA {0x00, 0x39} +#define TLS_RSA_WITH_NULL_SHA256 {0x00, 0x3B} +#define TLS_RSA_WITH_AES_128_CBC_SHA256 {0x00, 0x3C} +#define TLS_RSA_WITH_AES_256_CBC_SHA256 {0x00, 0x3D} +#define TLS_DH_DSS_WITH_AES_128_CBC_SHA256 {0x00, 0x3E} +#define TLS_DH_RSA_WITH_AES_128_CBC_SHA256 {0x00, 0x3F} +#define TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 {0x00, 0x40} +#define TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 {0x00, 0x67} +#define TLS_DH_DSS_WITH_AES_256_CBC_SHA256 {0x00, 0x68} +#define TLS_DH_RSA_WITH_AES_256_CBC_SHA256 {0x00, 0x69} +#define TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 {0x00, 0x6A} +#define TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 {0x00, 0x6B} /// /// TLS Version, refers to A.1 of rfc-2246, rfc-4346 and rfc-5246. @@ -76,26 +76,25 @@ typedef enum { /// TLS Record Header, refers to A.1 of rfc-2246, rfc-4346 and rfc-5246. /// typedef struct { - UINT8 ContentType; - EFI_TLS_VERSION Version; - UINT16 Length; + UINT8 ContentType; + EFI_TLS_VERSION Version; + UINT16 Length; } TLS_RECORD_HEADER; -#define TLS_RECORD_HEADER_LENGTH 5 +#define TLS_RECORD_HEADER_LENGTH 5 // // The length (in bytes) of the TLSPlaintext records payload MUST NOT exceed 2^14. // Refers to section 6.2 of RFC5246. // -#define TLS_PLAINTEXT_RECORD_MAX_PAYLOAD_LENGTH 16384 +#define TLS_PLAINTEXT_RECORD_MAX_PAYLOAD_LENGTH 16384 // // The length (in bytes) of the TLSCiphertext records payload MUST NOT exceed 2^14 + 2048. // Refers to section 6.2 of RFC5246. // -#define TLS_CIPHERTEXT_RECORD_MAX_PAYLOAD_LENGTH 18432 +#define TLS_CIPHERTEXT_RECORD_MAX_PAYLOAD_LENGTH 18432 #pragma pack() #endif - diff --git a/MdePkg/Include/IndustryStandard/Tpm12.h b/MdePkg/Include/IndustryStandard/Tpm12.h index e85a567..155dcc9 100644 --- a/MdePkg/Include/IndustryStandard/Tpm12.h +++ b/MdePkg/Include/IndustryStandard/Tpm12.h @@ -6,14 +6,13 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ - #ifndef _TPM12_H_ #define _TPM12_H_ /// /// The start of TPM return codes /// -#define TPM_BASE 0 +#define TPM_BASE 0 // // All structures MUST be packed on a byte boundary. @@ -27,246 +26,246 @@ /// /// Indicates the conditions where it is required that authorization be presented /// -typedef UINT8 TPM_AUTH_DATA_USAGE; +typedef UINT8 TPM_AUTH_DATA_USAGE; /// /// The information as to what the payload is in an encrypted structure /// -typedef UINT8 TPM_PAYLOAD_TYPE; +typedef UINT8 TPM_PAYLOAD_TYPE; /// /// The version info breakdown /// -typedef UINT8 TPM_VERSION_BYTE; +typedef UINT8 TPM_VERSION_BYTE; /// /// The state of the dictionary attack mitigation logic /// -typedef UINT8 TPM_DA_STATE; +typedef UINT8 TPM_DA_STATE; /// /// The request or response authorization type /// -typedef UINT16 TPM_TAG; +typedef UINT16 TPM_TAG; /// /// The protocol in use /// -typedef UINT16 TPM_PROTOCOL_ID; +typedef UINT16 TPM_PROTOCOL_ID; /// /// Indicates the start state /// -typedef UINT16 TPM_STARTUP_TYPE; +typedef UINT16 TPM_STARTUP_TYPE; /// /// The definition of the encryption scheme /// -typedef UINT16 TPM_ENC_SCHEME; +typedef UINT16 TPM_ENC_SCHEME; /// /// The definition of the signature scheme /// -typedef UINT16 TPM_SIG_SCHEME; +typedef UINT16 TPM_SIG_SCHEME; /// /// The definition of the migration scheme /// -typedef UINT16 TPM_MIGRATE_SCHEME; +typedef UINT16 TPM_MIGRATE_SCHEME; /// /// Sets the state of the physical presence mechanism /// -typedef UINT16 TPM_PHYSICAL_PRESENCE; +typedef UINT16 TPM_PHYSICAL_PRESENCE; /// /// Indicates the types of entity that are supported by the TPM /// -typedef UINT16 TPM_ENTITY_TYPE; +typedef UINT16 TPM_ENTITY_TYPE; /// /// Indicates the permitted usage of the key /// -typedef UINT16 TPM_KEY_USAGE; +typedef UINT16 TPM_KEY_USAGE; /// /// The type of asymmetric encrypted structure in use by the endorsement key /// -typedef UINT16 TPM_EK_TYPE; +typedef UINT16 TPM_EK_TYPE; /// /// The tag for the structure /// -typedef UINT16 TPM_STRUCTURE_TAG; +typedef UINT16 TPM_STRUCTURE_TAG; /// /// The platform specific spec to which the information relates to /// -typedef UINT16 TPM_PLATFORM_SPECIFIC; +typedef UINT16 TPM_PLATFORM_SPECIFIC; /// /// The command ordinal /// -typedef UINT32 TPM_COMMAND_CODE; +typedef UINT32 TPM_COMMAND_CODE; /// /// Identifies a TPM capability area /// -typedef UINT32 TPM_CAPABILITY_AREA; +typedef UINT32 TPM_CAPABILITY_AREA; /// /// Indicates information regarding a key /// -typedef UINT32 TPM_KEY_FLAGS; +typedef UINT32 TPM_KEY_FLAGS; /// /// Indicates the type of algorithm /// -typedef UINT32 TPM_ALGORITHM_ID; +typedef UINT32 TPM_ALGORITHM_ID; /// /// The locality modifier /// -typedef UINT32 TPM_MODIFIER_INDICATOR; +typedef UINT32 TPM_MODIFIER_INDICATOR; /// /// The actual number of a counter /// -typedef UINT32 TPM_ACTUAL_COUNT; +typedef UINT32 TPM_ACTUAL_COUNT; /// /// Attributes that define what options are in use for a transport session /// -typedef UINT32 TPM_TRANSPORT_ATTRIBUTES; +typedef UINT32 TPM_TRANSPORT_ATTRIBUTES; /// /// Handle to an authorization session /// -typedef UINT32 TPM_AUTHHANDLE; +typedef UINT32 TPM_AUTHHANDLE; /// /// Index to a DIR register /// -typedef UINT32 TPM_DIRINDEX; +typedef UINT32 TPM_DIRINDEX; /// /// The area where a key is held assigned by the TPM /// -typedef UINT32 TPM_KEY_HANDLE; +typedef UINT32 TPM_KEY_HANDLE; /// /// Index to a PCR register /// -typedef UINT32 TPM_PCRINDEX; +typedef UINT32 TPM_PCRINDEX; /// /// The return code from a function /// -typedef UINT32 TPM_RESULT; +typedef UINT32 TPM_RESULT; /// /// The types of resources that a TPM may have using internal resources /// -typedef UINT32 TPM_RESOURCE_TYPE; +typedef UINT32 TPM_RESOURCE_TYPE; /// /// Allows for controlling of the key when loaded and how to handle TPM_Startup issues /// -typedef UINT32 TPM_KEY_CONTROL; +typedef UINT32 TPM_KEY_CONTROL; /// /// The index into the NV storage area /// -typedef UINT32 TPM_NV_INDEX; +typedef UINT32 TPM_NV_INDEX; /// /// The family ID. Family IDs are automatically assigned a sequence number by the TPM. /// A trusted process can set the FamilyID value in an individual row to NULL, which /// invalidates that row. The family ID resets to NULL on each change of TPM Owner. /// -typedef UINT32 TPM_FAMILY_ID; +typedef UINT32 TPM_FAMILY_ID; /// /// IA value used as a label for the most recent verification of this family. Set to zero when not in use. /// -typedef UINT32 TPM_FAMILY_VERIFICATION; +typedef UINT32 TPM_FAMILY_VERIFICATION; /// /// How the TPM handles var /// -typedef UINT32 TPM_STARTUP_EFFECTS; +typedef UINT32 TPM_STARTUP_EFFECTS; /// /// The mode of a symmetric encryption /// -typedef UINT32 TPM_SYM_MODE; +typedef UINT32 TPM_SYM_MODE; /// /// The family flags /// -typedef UINT32 TPM_FAMILY_FLAGS; +typedef UINT32 TPM_FAMILY_FLAGS; /// /// The index value for the delegate NV table /// -typedef UINT32 TPM_DELEGATE_INDEX; +typedef UINT32 TPM_DELEGATE_INDEX; /// /// The restrictions placed on delegation of CMK commands /// -typedef UINT32 TPM_CMK_DELEGATE; +typedef UINT32 TPM_CMK_DELEGATE; /// /// The ID value of a monotonic counter /// -typedef UINT32 TPM_COUNT_ID; +typedef UINT32 TPM_COUNT_ID; /// /// A command to execute /// -typedef UINT32 TPM_REDIT_COMMAND; +typedef UINT32 TPM_REDIT_COMMAND; /// /// A transport session handle /// -typedef UINT32 TPM_TRANSHANDLE; +typedef UINT32 TPM_TRANSHANDLE; /// /// A generic handle could be key, transport etc /// -typedef UINT32 TPM_HANDLE; +typedef UINT32 TPM_HANDLE; /// /// What operation is happening /// -typedef UINT32 TPM_FAMILY_OPERATION; +typedef UINT32 TPM_FAMILY_OPERATION; // // Part 2, section 2.2.4: Vendor specific // The following defines allow for the quick specification of a // vendor specific item. // -#define TPM_Vendor_Specific32 ((UINT32) 0x00000400) -#define TPM_Vendor_Specific8 ((UINT8) 0x80) +#define TPM_Vendor_Specific32 ((UINT32) 0x00000400) +#define TPM_Vendor_Specific8 ((UINT8) 0x80) // // Part 2, section 3.1: TPM_STRUCTURE_TAG // -#define TPM_TAG_CONTEXTBLOB ((TPM_STRUCTURE_TAG) 0x0001) -#define TPM_TAG_CONTEXT_SENSITIVE ((TPM_STRUCTURE_TAG) 0x0002) -#define TPM_TAG_CONTEXTPOINTER ((TPM_STRUCTURE_TAG) 0x0003) -#define TPM_TAG_CONTEXTLIST ((TPM_STRUCTURE_TAG) 0x0004) -#define TPM_TAG_SIGNINFO ((TPM_STRUCTURE_TAG) 0x0005) -#define TPM_TAG_PCR_INFO_LONG ((TPM_STRUCTURE_TAG) 0x0006) -#define TPM_TAG_PERSISTENT_FLAGS ((TPM_STRUCTURE_TAG) 0x0007) -#define TPM_TAG_VOLATILE_FLAGS ((TPM_STRUCTURE_TAG) 0x0008) -#define TPM_TAG_PERSISTENT_DATA ((TPM_STRUCTURE_TAG) 0x0009) -#define TPM_TAG_VOLATILE_DATA ((TPM_STRUCTURE_TAG) 0x000A) -#define TPM_TAG_SV_DATA ((TPM_STRUCTURE_TAG) 0x000B) -#define TPM_TAG_EK_BLOB ((TPM_STRUCTURE_TAG) 0x000C) -#define TPM_TAG_EK_BLOB_AUTH ((TPM_STRUCTURE_TAG) 0x000D) -#define TPM_TAG_COUNTER_VALUE ((TPM_STRUCTURE_TAG) 0x000E) -#define TPM_TAG_TRANSPORT_INTERNAL ((TPM_STRUCTURE_TAG) 0x000F) -#define TPM_TAG_TRANSPORT_LOG_IN ((TPM_STRUCTURE_TAG) 0x0010) -#define TPM_TAG_TRANSPORT_LOG_OUT ((TPM_STRUCTURE_TAG) 0x0011) -#define TPM_TAG_AUDIT_EVENT_IN ((TPM_STRUCTURE_TAG) 0x0012) -#define TPM_TAG_AUDIT_EVENT_OUT ((TPM_STRUCTURE_TAG) 0x0013) -#define TPM_TAG_CURRENT_TICKS ((TPM_STRUCTURE_TAG) 0x0014) -#define TPM_TAG_KEY ((TPM_STRUCTURE_TAG) 0x0015) -#define TPM_TAG_STORED_DATA12 ((TPM_STRUCTURE_TAG) 0x0016) -#define TPM_TAG_NV_ATTRIBUTES ((TPM_STRUCTURE_TAG) 0x0017) -#define TPM_TAG_NV_DATA_PUBLIC ((TPM_STRUCTURE_TAG) 0x0018) -#define TPM_TAG_NV_DATA_SENSITIVE ((TPM_STRUCTURE_TAG) 0x0019) -#define TPM_TAG_DELEGATIONS ((TPM_STRUCTURE_TAG) 0x001A) -#define TPM_TAG_DELEGATE_PUBLIC ((TPM_STRUCTURE_TAG) 0x001B) -#define TPM_TAG_DELEGATE_TABLE_ROW ((TPM_STRUCTURE_TAG) 0x001C) -#define TPM_TAG_TRANSPORT_AUTH ((TPM_STRUCTURE_TAG) 0x001D) -#define TPM_TAG_TRANSPORT_PUBLIC ((TPM_STRUCTURE_TAG) 0x001E) -#define TPM_TAG_PERMANENT_FLAGS ((TPM_STRUCTURE_TAG) 0x001F) -#define TPM_TAG_STCLEAR_FLAGS ((TPM_STRUCTURE_TAG) 0x0020) -#define TPM_TAG_STANY_FLAGS ((TPM_STRUCTURE_TAG) 0x0021) -#define TPM_TAG_PERMANENT_DATA ((TPM_STRUCTURE_TAG) 0x0022) -#define TPM_TAG_STCLEAR_DATA ((TPM_STRUCTURE_TAG) 0x0023) -#define TPM_TAG_STANY_DATA ((TPM_STRUCTURE_TAG) 0x0024) -#define TPM_TAG_FAMILY_TABLE_ENTRY ((TPM_STRUCTURE_TAG) 0x0025) -#define TPM_TAG_DELEGATE_SENSITIVE ((TPM_STRUCTURE_TAG) 0x0026) -#define TPM_TAG_DELG_KEY_BLOB ((TPM_STRUCTURE_TAG) 0x0027) -#define TPM_TAG_KEY12 ((TPM_STRUCTURE_TAG) 0x0028) -#define TPM_TAG_CERTIFY_INFO2 ((TPM_STRUCTURE_TAG) 0x0029) -#define TPM_TAG_DELEGATE_OWNER_BLOB ((TPM_STRUCTURE_TAG) 0x002A) -#define TPM_TAG_EK_BLOB_ACTIVATE ((TPM_STRUCTURE_TAG) 0x002B) -#define TPM_TAG_DAA_BLOB ((TPM_STRUCTURE_TAG) 0x002C) -#define TPM_TAG_DAA_CONTEXT ((TPM_STRUCTURE_TAG) 0x002D) -#define TPM_TAG_DAA_ENFORCE ((TPM_STRUCTURE_TAG) 0x002E) -#define TPM_TAG_DAA_ISSUER ((TPM_STRUCTURE_TAG) 0x002F) -#define TPM_TAG_CAP_VERSION_INFO ((TPM_STRUCTURE_TAG) 0x0030) -#define TPM_TAG_DAA_SENSITIVE ((TPM_STRUCTURE_TAG) 0x0031) -#define TPM_TAG_DAA_TPM ((TPM_STRUCTURE_TAG) 0x0032) -#define TPM_TAG_CMK_MIGAUTH ((TPM_STRUCTURE_TAG) 0x0033) -#define TPM_TAG_CMK_SIGTICKET ((TPM_STRUCTURE_TAG) 0x0034) -#define TPM_TAG_CMK_MA_APPROVAL ((TPM_STRUCTURE_TAG) 0x0035) -#define TPM_TAG_QUOTE_INFO2 ((TPM_STRUCTURE_TAG) 0x0036) -#define TPM_TAG_DA_INFO ((TPM_STRUCTURE_TAG) 0x0037) -#define TPM_TAG_DA_LIMITED ((TPM_STRUCTURE_TAG) 0x0038) -#define TPM_TAG_DA_ACTION_TYPE ((TPM_STRUCTURE_TAG) 0x0039) +#define TPM_TAG_CONTEXTBLOB ((TPM_STRUCTURE_TAG) 0x0001) +#define TPM_TAG_CONTEXT_SENSITIVE ((TPM_STRUCTURE_TAG) 0x0002) +#define TPM_TAG_CONTEXTPOINTER ((TPM_STRUCTURE_TAG) 0x0003) +#define TPM_TAG_CONTEXTLIST ((TPM_STRUCTURE_TAG) 0x0004) +#define TPM_TAG_SIGNINFO ((TPM_STRUCTURE_TAG) 0x0005) +#define TPM_TAG_PCR_INFO_LONG ((TPM_STRUCTURE_TAG) 0x0006) +#define TPM_TAG_PERSISTENT_FLAGS ((TPM_STRUCTURE_TAG) 0x0007) +#define TPM_TAG_VOLATILE_FLAGS ((TPM_STRUCTURE_TAG) 0x0008) +#define TPM_TAG_PERSISTENT_DATA ((TPM_STRUCTURE_TAG) 0x0009) +#define TPM_TAG_VOLATILE_DATA ((TPM_STRUCTURE_TAG) 0x000A) +#define TPM_TAG_SV_DATA ((TPM_STRUCTURE_TAG) 0x000B) +#define TPM_TAG_EK_BLOB ((TPM_STRUCTURE_TAG) 0x000C) +#define TPM_TAG_EK_BLOB_AUTH ((TPM_STRUCTURE_TAG) 0x000D) +#define TPM_TAG_COUNTER_VALUE ((TPM_STRUCTURE_TAG) 0x000E) +#define TPM_TAG_TRANSPORT_INTERNAL ((TPM_STRUCTURE_TAG) 0x000F) +#define TPM_TAG_TRANSPORT_LOG_IN ((TPM_STRUCTURE_TAG) 0x0010) +#define TPM_TAG_TRANSPORT_LOG_OUT ((TPM_STRUCTURE_TAG) 0x0011) +#define TPM_TAG_AUDIT_EVENT_IN ((TPM_STRUCTURE_TAG) 0x0012) +#define TPM_TAG_AUDIT_EVENT_OUT ((TPM_STRUCTURE_TAG) 0x0013) +#define TPM_TAG_CURRENT_TICKS ((TPM_STRUCTURE_TAG) 0x0014) +#define TPM_TAG_KEY ((TPM_STRUCTURE_TAG) 0x0015) +#define TPM_TAG_STORED_DATA12 ((TPM_STRUCTURE_TAG) 0x0016) +#define TPM_TAG_NV_ATTRIBUTES ((TPM_STRUCTURE_TAG) 0x0017) +#define TPM_TAG_NV_DATA_PUBLIC ((TPM_STRUCTURE_TAG) 0x0018) +#define TPM_TAG_NV_DATA_SENSITIVE ((TPM_STRUCTURE_TAG) 0x0019) +#define TPM_TAG_DELEGATIONS ((TPM_STRUCTURE_TAG) 0x001A) +#define TPM_TAG_DELEGATE_PUBLIC ((TPM_STRUCTURE_TAG) 0x001B) +#define TPM_TAG_DELEGATE_TABLE_ROW ((TPM_STRUCTURE_TAG) 0x001C) +#define TPM_TAG_TRANSPORT_AUTH ((TPM_STRUCTURE_TAG) 0x001D) +#define TPM_TAG_TRANSPORT_PUBLIC ((TPM_STRUCTURE_TAG) 0x001E) +#define TPM_TAG_PERMANENT_FLAGS ((TPM_STRUCTURE_TAG) 0x001F) +#define TPM_TAG_STCLEAR_FLAGS ((TPM_STRUCTURE_TAG) 0x0020) +#define TPM_TAG_STANY_FLAGS ((TPM_STRUCTURE_TAG) 0x0021) +#define TPM_TAG_PERMANENT_DATA ((TPM_STRUCTURE_TAG) 0x0022) +#define TPM_TAG_STCLEAR_DATA ((TPM_STRUCTURE_TAG) 0x0023) +#define TPM_TAG_STANY_DATA ((TPM_STRUCTURE_TAG) 0x0024) +#define TPM_TAG_FAMILY_TABLE_ENTRY ((TPM_STRUCTURE_TAG) 0x0025) +#define TPM_TAG_DELEGATE_SENSITIVE ((TPM_STRUCTURE_TAG) 0x0026) +#define TPM_TAG_DELG_KEY_BLOB ((TPM_STRUCTURE_TAG) 0x0027) +#define TPM_TAG_KEY12 ((TPM_STRUCTURE_TAG) 0x0028) +#define TPM_TAG_CERTIFY_INFO2 ((TPM_STRUCTURE_TAG) 0x0029) +#define TPM_TAG_DELEGATE_OWNER_BLOB ((TPM_STRUCTURE_TAG) 0x002A) +#define TPM_TAG_EK_BLOB_ACTIVATE ((TPM_STRUCTURE_TAG) 0x002B) +#define TPM_TAG_DAA_BLOB ((TPM_STRUCTURE_TAG) 0x002C) +#define TPM_TAG_DAA_CONTEXT ((TPM_STRUCTURE_TAG) 0x002D) +#define TPM_TAG_DAA_ENFORCE ((TPM_STRUCTURE_TAG) 0x002E) +#define TPM_TAG_DAA_ISSUER ((TPM_STRUCTURE_TAG) 0x002F) +#define TPM_TAG_CAP_VERSION_INFO ((TPM_STRUCTURE_TAG) 0x0030) +#define TPM_TAG_DAA_SENSITIVE ((TPM_STRUCTURE_TAG) 0x0031) +#define TPM_TAG_DAA_TPM ((TPM_STRUCTURE_TAG) 0x0032) +#define TPM_TAG_CMK_MIGAUTH ((TPM_STRUCTURE_TAG) 0x0033) +#define TPM_TAG_CMK_SIGTICKET ((TPM_STRUCTURE_TAG) 0x0034) +#define TPM_TAG_CMK_MA_APPROVAL ((TPM_STRUCTURE_TAG) 0x0035) +#define TPM_TAG_QUOTE_INFO2 ((TPM_STRUCTURE_TAG) 0x0036) +#define TPM_TAG_DA_INFO ((TPM_STRUCTURE_TAG) 0x0037) +#define TPM_TAG_DA_LIMITED ((TPM_STRUCTURE_TAG) 0x0038) +#define TPM_TAG_DA_ACTION_TYPE ((TPM_STRUCTURE_TAG) 0x0039) // // Part 2, section 4: TPM Types @@ -275,69 +274,69 @@ typedef UINT32 TPM_FAMILY_OPERATION; // // Part 2, section 4.1: TPM_RESOURCE_TYPE // -#define TPM_RT_KEY ((TPM_RESOURCE_TYPE) 0x00000001) ///< The handle is a key handle and is the result of a LoadKey type operation -#define TPM_RT_AUTH ((TPM_RESOURCE_TYPE) 0x00000002) ///< The handle is an authorization handle. Auth handles come from TPM_OIAP, TPM_OSAP and TPM_DSAP -#define TPM_RT_HASH ((TPM_RESOURCE_TYPE) 0x00000003) ///< Reserved for hashes -#define TPM_RT_TRANS ((TPM_RESOURCE_TYPE) 0x00000004) ///< The handle is for a transport session. Transport handles come from TPM_EstablishTransport -#define TPM_RT_CONTEXT ((TPM_RESOURCE_TYPE) 0x00000005) ///< Resource wrapped and held outside the TPM using the context save/restore commands -#define TPM_RT_COUNTER ((TPM_RESOURCE_TYPE) 0x00000006) ///< Reserved for counters -#define TPM_RT_DELEGATE ((TPM_RESOURCE_TYPE) 0x00000007) ///< The handle is for a delegate row. These are the internal rows held in NV storage by the TPM -#define TPM_RT_DAA_TPM ((TPM_RESOURCE_TYPE) 0x00000008) ///< The value is a DAA TPM specific blob -#define TPM_RT_DAA_V0 ((TPM_RESOURCE_TYPE) 0x00000009) ///< The value is a DAA V0 parameter -#define TPM_RT_DAA_V1 ((TPM_RESOURCE_TYPE) 0x0000000A) ///< The value is a DAA V1 parameter +#define TPM_RT_KEY ((TPM_RESOURCE_TYPE) 0x00000001) ///< The handle is a key handle and is the result of a LoadKey type operation +#define TPM_RT_AUTH ((TPM_RESOURCE_TYPE) 0x00000002) ///< The handle is an authorization handle. Auth handles come from TPM_OIAP, TPM_OSAP and TPM_DSAP +#define TPM_RT_HASH ((TPM_RESOURCE_TYPE) 0x00000003) ///< Reserved for hashes +#define TPM_RT_TRANS ((TPM_RESOURCE_TYPE) 0x00000004) ///< The handle is for a transport session. Transport handles come from TPM_EstablishTransport +#define TPM_RT_CONTEXT ((TPM_RESOURCE_TYPE) 0x00000005) ///< Resource wrapped and held outside the TPM using the context save/restore commands +#define TPM_RT_COUNTER ((TPM_RESOURCE_TYPE) 0x00000006) ///< Reserved for counters +#define TPM_RT_DELEGATE ((TPM_RESOURCE_TYPE) 0x00000007) ///< The handle is for a delegate row. These are the internal rows held in NV storage by the TPM +#define TPM_RT_DAA_TPM ((TPM_RESOURCE_TYPE) 0x00000008) ///< The value is a DAA TPM specific blob +#define TPM_RT_DAA_V0 ((TPM_RESOURCE_TYPE) 0x00000009) ///< The value is a DAA V0 parameter +#define TPM_RT_DAA_V1 ((TPM_RESOURCE_TYPE) 0x0000000A) ///< The value is a DAA V1 parameter // // Part 2, section 4.2: TPM_PAYLOAD_TYPE // -#define TPM_PT_ASYM ((TPM_PAYLOAD_TYPE) 0x01) ///< The entity is an asymmetric key -#define TPM_PT_BIND ((TPM_PAYLOAD_TYPE) 0x02) ///< The entity is bound data -#define TPM_PT_MIGRATE ((TPM_PAYLOAD_TYPE) 0x03) ///< The entity is a migration blob -#define TPM_PT_MAINT ((TPM_PAYLOAD_TYPE) 0x04) ///< The entity is a maintenance blob -#define TPM_PT_SEAL ((TPM_PAYLOAD_TYPE) 0x05) ///< The entity is sealed data -#define TPM_PT_MIGRATE_RESTRICTED ((TPM_PAYLOAD_TYPE) 0x06) ///< The entity is a restricted-migration asymmetric key -#define TPM_PT_MIGRATE_EXTERNAL ((TPM_PAYLOAD_TYPE) 0x07) ///< The entity is a external migratable key -#define TPM_PT_CMK_MIGRATE ((TPM_PAYLOAD_TYPE) 0x08) ///< The entity is a CMK migratable blob -#define TPM_PT_VENDOR_SPECIFIC ((TPM_PAYLOAD_TYPE) 0x80) ///< 0x80 - 0xFF Vendor specific payloads +#define TPM_PT_ASYM ((TPM_PAYLOAD_TYPE) 0x01) ///< The entity is an asymmetric key +#define TPM_PT_BIND ((TPM_PAYLOAD_TYPE) 0x02) ///< The entity is bound data +#define TPM_PT_MIGRATE ((TPM_PAYLOAD_TYPE) 0x03) ///< The entity is a migration blob +#define TPM_PT_MAINT ((TPM_PAYLOAD_TYPE) 0x04) ///< The entity is a maintenance blob +#define TPM_PT_SEAL ((TPM_PAYLOAD_TYPE) 0x05) ///< The entity is sealed data +#define TPM_PT_MIGRATE_RESTRICTED ((TPM_PAYLOAD_TYPE) 0x06) ///< The entity is a restricted-migration asymmetric key +#define TPM_PT_MIGRATE_EXTERNAL ((TPM_PAYLOAD_TYPE) 0x07) ///< The entity is a external migratable key +#define TPM_PT_CMK_MIGRATE ((TPM_PAYLOAD_TYPE) 0x08) ///< The entity is a CMK migratable blob +#define TPM_PT_VENDOR_SPECIFIC ((TPM_PAYLOAD_TYPE) 0x80) ///< 0x80 - 0xFF Vendor specific payloads // // Part 2, section 4.3: TPM_ENTITY_TYPE // -#define TPM_ET_KEYHANDLE ((UINT16) 0x0001) ///< The entity is a keyHandle or key -#define TPM_ET_OWNER ((UINT16) 0x0002) ///< The entity is the TPM Owner -#define TPM_ET_DATA ((UINT16) 0x0003) ///< The entity is some data -#define TPM_ET_SRK ((UINT16) 0x0004) ///< The entity is the SRK -#define TPM_ET_KEY ((UINT16) 0x0005) ///< The entity is a key or keyHandle -#define TPM_ET_REVOKE ((UINT16) 0x0006) ///< The entity is the RevokeTrust value -#define TPM_ET_DEL_OWNER_BLOB ((UINT16) 0x0007) ///< The entity is a delegate owner blob -#define TPM_ET_DEL_ROW ((UINT16) 0x0008) ///< The entity is a delegate row -#define TPM_ET_DEL_KEY_BLOB ((UINT16) 0x0009) ///< The entity is a delegate key blob -#define TPM_ET_COUNTER ((UINT16) 0x000A) ///< The entity is a counter -#define TPM_ET_NV ((UINT16) 0x000B) ///< The entity is a NV index -#define TPM_ET_OPERATOR ((UINT16) 0x000C) ///< The entity is the operator -#define TPM_ET_RESERVED_HANDLE ((UINT16) 0x0040) ///< Reserved. This value avoids collisions with the handle MSB setting. +#define TPM_ET_KEYHANDLE ((UINT16) 0x0001) ///< The entity is a keyHandle or key +#define TPM_ET_OWNER ((UINT16) 0x0002) ///< The entity is the TPM Owner +#define TPM_ET_DATA ((UINT16) 0x0003) ///< The entity is some data +#define TPM_ET_SRK ((UINT16) 0x0004) ///< The entity is the SRK +#define TPM_ET_KEY ((UINT16) 0x0005) ///< The entity is a key or keyHandle +#define TPM_ET_REVOKE ((UINT16) 0x0006) ///< The entity is the RevokeTrust value +#define TPM_ET_DEL_OWNER_BLOB ((UINT16) 0x0007) ///< The entity is a delegate owner blob +#define TPM_ET_DEL_ROW ((UINT16) 0x0008) ///< The entity is a delegate row +#define TPM_ET_DEL_KEY_BLOB ((UINT16) 0x0009) ///< The entity is a delegate key blob +#define TPM_ET_COUNTER ((UINT16) 0x000A) ///< The entity is a counter +#define TPM_ET_NV ((UINT16) 0x000B) ///< The entity is a NV index +#define TPM_ET_OPERATOR ((UINT16) 0x000C) ///< The entity is the operator +#define TPM_ET_RESERVED_HANDLE ((UINT16) 0x0040) ///< Reserved. This value avoids collisions with the handle MSB setting. // // TPM_ENTITY_TYPE MSB Values: The MSB is used to indicate the ADIP encryption sheme when applicable // -#define TPM_ET_XOR ((UINT16) 0x0000) ///< ADIP encryption scheme: XOR -#define TPM_ET_AES128 ((UINT16) 0x0006) ///< ADIP encryption scheme: AES 128 bits +#define TPM_ET_XOR ((UINT16) 0x0000) ///< ADIP encryption scheme: XOR +#define TPM_ET_AES128 ((UINT16) 0x0006) ///< ADIP encryption scheme: AES 128 bits // // Part 2, section 4.4.1: Reserved Key Handles // -#define TPM_KH_SRK ((TPM_KEY_HANDLE) 0x40000000) ///< The handle points to the SRK -#define TPM_KH_OWNER ((TPM_KEY_HANDLE) 0x40000001) ///< The handle points to the TPM Owner -#define TPM_KH_REVOKE ((TPM_KEY_HANDLE) 0x40000002) ///< The handle points to the RevokeTrust value -#define TPM_KH_TRANSPORT ((TPM_KEY_HANDLE) 0x40000003) ///< The handle points to the EstablishTransport static authorization -#define TPM_KH_OPERATOR ((TPM_KEY_HANDLE) 0x40000004) ///< The handle points to the Operator auth -#define TPM_KH_ADMIN ((TPM_KEY_HANDLE) 0x40000005) ///< The handle points to the delegation administration auth -#define TPM_KH_EK ((TPM_KEY_HANDLE) 0x40000006) ///< The handle points to the PUBEK, only usable with TPM_OwnerReadInternalPub +#define TPM_KH_SRK ((TPM_KEY_HANDLE) 0x40000000) ///< The handle points to the SRK +#define TPM_KH_OWNER ((TPM_KEY_HANDLE) 0x40000001) ///< The handle points to the TPM Owner +#define TPM_KH_REVOKE ((TPM_KEY_HANDLE) 0x40000002) ///< The handle points to the RevokeTrust value +#define TPM_KH_TRANSPORT ((TPM_KEY_HANDLE) 0x40000003) ///< The handle points to the EstablishTransport static authorization +#define TPM_KH_OPERATOR ((TPM_KEY_HANDLE) 0x40000004) ///< The handle points to the Operator auth +#define TPM_KH_ADMIN ((TPM_KEY_HANDLE) 0x40000005) ///< The handle points to the delegation administration auth +#define TPM_KH_EK ((TPM_KEY_HANDLE) 0x40000006) ///< The handle points to the PUBEK, only usable with TPM_OwnerReadInternalPub // // Part 2, section 4.5: TPM_STARTUP_TYPE // -#define TPM_ST_CLEAR ((TPM_STARTUP_TYPE) 0x0001) ///< The TPM is starting up from a clean state -#define TPM_ST_STATE ((TPM_STARTUP_TYPE) 0x0002) ///< The TPM is starting up from a saved state -#define TPM_ST_DEACTIVATED ((TPM_STARTUP_TYPE) 0x0003) ///< The TPM is to startup and set the deactivated flag to TRUE +#define TPM_ST_CLEAR ((TPM_STARTUP_TYPE) 0x0001) ///< The TPM is starting up from a clean state +#define TPM_ST_STATE ((TPM_STARTUP_TYPE) 0x0002) ///< The TPM is starting up from a saved state +#define TPM_ST_DEACTIVATED ((TPM_STARTUP_TYPE) 0x0003) ///< The TPM is to startup and set the deactivated flag to TRUE // // Part 2, section 4.6: TPM_STATUP_EFFECTS @@ -347,65 +346,65 @@ typedef UINT32 TPM_FAMILY_OPERATION; // // Part 2, section 4.7: TPM_PROTOCOL_ID // -#define TPM_PID_OIAP ((TPM_PROTOCOL_ID) 0x0001) ///< The OIAP protocol. -#define TPM_PID_OSAP ((TPM_PROTOCOL_ID) 0x0002) ///< The OSAP protocol. -#define TPM_PID_ADIP ((TPM_PROTOCOL_ID) 0x0003) ///< The ADIP protocol. -#define TPM_PID_ADCP ((TPM_PROTOCOL_ID) 0x0004) ///< The ADCP protocol. -#define TPM_PID_OWNER ((TPM_PROTOCOL_ID) 0x0005) ///< The protocol for taking ownership of a TPM. -#define TPM_PID_DSAP ((TPM_PROTOCOL_ID) 0x0006) ///< The DSAP protocol -#define TPM_PID_TRANSPORT ((TPM_PROTOCOL_ID) 0x0007) ///< The transport protocol +#define TPM_PID_OIAP ((TPM_PROTOCOL_ID) 0x0001) ///< The OIAP protocol. +#define TPM_PID_OSAP ((TPM_PROTOCOL_ID) 0x0002) ///< The OSAP protocol. +#define TPM_PID_ADIP ((TPM_PROTOCOL_ID) 0x0003) ///< The ADIP protocol. +#define TPM_PID_ADCP ((TPM_PROTOCOL_ID) 0x0004) ///< The ADCP protocol. +#define TPM_PID_OWNER ((TPM_PROTOCOL_ID) 0x0005) ///< The protocol for taking ownership of a TPM. +#define TPM_PID_DSAP ((TPM_PROTOCOL_ID) 0x0006) ///< The DSAP protocol +#define TPM_PID_TRANSPORT ((TPM_PROTOCOL_ID) 0x0007) ///< The transport protocol // // Part 2, section 4.8: TPM_ALGORITHM_ID // The TPM MUST support the algorithms TPM_ALG_RSA, TPM_ALG_SHA, TPM_ALG_HMAC, // TPM_ALG_MGF1 // -#define TPM_ALG_RSA ((TPM_ALGORITHM_ID) 0x00000001) ///< The RSA algorithm. -#define TPM_ALG_DES ((TPM_ALGORITHM_ID) 0x00000002) ///< The DES algorithm -#define TPM_ALG_3DES ((TPM_ALGORITHM_ID) 0x00000003) ///< The 3DES algorithm in EDE mode -#define TPM_ALG_SHA ((TPM_ALGORITHM_ID) 0x00000004) ///< The SHA1 algorithm -#define TPM_ALG_HMAC ((TPM_ALGORITHM_ID) 0x00000005) ///< The RFC 2104 HMAC algorithm -#define TPM_ALG_AES128 ((TPM_ALGORITHM_ID) 0x00000006) ///< The AES algorithm, key size 128 -#define TPM_ALG_MGF1 ((TPM_ALGORITHM_ID) 0x00000007) ///< The XOR algorithm using MGF1 to create a string the size of the encrypted block -#define TPM_ALG_AES192 ((TPM_ALGORITHM_ID) 0x00000008) ///< AES, key size 192 -#define TPM_ALG_AES256 ((TPM_ALGORITHM_ID) 0x00000009) ///< AES, key size 256 -#define TPM_ALG_XOR ((TPM_ALGORITHM_ID) 0x0000000A) ///< XOR using the rolling nonces +#define TPM_ALG_RSA ((TPM_ALGORITHM_ID) 0x00000001) ///< The RSA algorithm. +#define TPM_ALG_DES ((TPM_ALGORITHM_ID) 0x00000002) ///< The DES algorithm +#define TPM_ALG_3DES ((TPM_ALGORITHM_ID) 0x00000003) ///< The 3DES algorithm in EDE mode +#define TPM_ALG_SHA ((TPM_ALGORITHM_ID) 0x00000004) ///< The SHA1 algorithm +#define TPM_ALG_HMAC ((TPM_ALGORITHM_ID) 0x00000005) ///< The RFC 2104 HMAC algorithm +#define TPM_ALG_AES128 ((TPM_ALGORITHM_ID) 0x00000006) ///< The AES algorithm, key size 128 +#define TPM_ALG_MGF1 ((TPM_ALGORITHM_ID) 0x00000007) ///< The XOR algorithm using MGF1 to create a string the size of the encrypted block +#define TPM_ALG_AES192 ((TPM_ALGORITHM_ID) 0x00000008) ///< AES, key size 192 +#define TPM_ALG_AES256 ((TPM_ALGORITHM_ID) 0x00000009) ///< AES, key size 256 +#define TPM_ALG_XOR ((TPM_ALGORITHM_ID) 0x0000000A) ///< XOR using the rolling nonces // // Part 2, section 4.9: TPM_PHYSICAL_PRESENCE // -#define TPM_PHYSICAL_PRESENCE_HW_DISABLE ((TPM_PHYSICAL_PRESENCE) 0x0200) ///< Sets the physicalPresenceHWEnable to FALSE -#define TPM_PHYSICAL_PRESENCE_CMD_DISABLE ((TPM_PHYSICAL_PRESENCE) 0x0100) ///< Sets the physicalPresenceCMDEnable to FALSE -#define TPM_PHYSICAL_PRESENCE_LIFETIME_LOCK ((TPM_PHYSICAL_PRESENCE) 0x0080) ///< Sets the physicalPresenceLifetimeLock to TRUE -#define TPM_PHYSICAL_PRESENCE_HW_ENABLE ((TPM_PHYSICAL_PRESENCE) 0x0040) ///< Sets the physicalPresenceHWEnable to TRUE -#define TPM_PHYSICAL_PRESENCE_CMD_ENABLE ((TPM_PHYSICAL_PRESENCE) 0x0020) ///< Sets the physicalPresenceCMDEnable to TRUE -#define TPM_PHYSICAL_PRESENCE_NOTPRESENT ((TPM_PHYSICAL_PRESENCE) 0x0010) ///< Sets PhysicalPresence = FALSE -#define TPM_PHYSICAL_PRESENCE_PRESENT ((TPM_PHYSICAL_PRESENCE) 0x0008) ///< Sets PhysicalPresence = TRUE -#define TPM_PHYSICAL_PRESENCE_LOCK ((TPM_PHYSICAL_PRESENCE) 0x0004) ///< Sets PhysicalPresenceLock = TRUE +#define TPM_PHYSICAL_PRESENCE_HW_DISABLE ((TPM_PHYSICAL_PRESENCE) 0x0200) ///< Sets the physicalPresenceHWEnable to FALSE +#define TPM_PHYSICAL_PRESENCE_CMD_DISABLE ((TPM_PHYSICAL_PRESENCE) 0x0100) ///< Sets the physicalPresenceCMDEnable to FALSE +#define TPM_PHYSICAL_PRESENCE_LIFETIME_LOCK ((TPM_PHYSICAL_PRESENCE) 0x0080) ///< Sets the physicalPresenceLifetimeLock to TRUE +#define TPM_PHYSICAL_PRESENCE_HW_ENABLE ((TPM_PHYSICAL_PRESENCE) 0x0040) ///< Sets the physicalPresenceHWEnable to TRUE +#define TPM_PHYSICAL_PRESENCE_CMD_ENABLE ((TPM_PHYSICAL_PRESENCE) 0x0020) ///< Sets the physicalPresenceCMDEnable to TRUE +#define TPM_PHYSICAL_PRESENCE_NOTPRESENT ((TPM_PHYSICAL_PRESENCE) 0x0010) ///< Sets PhysicalPresence = FALSE +#define TPM_PHYSICAL_PRESENCE_PRESENT ((TPM_PHYSICAL_PRESENCE) 0x0008) ///< Sets PhysicalPresence = TRUE +#define TPM_PHYSICAL_PRESENCE_LOCK ((TPM_PHYSICAL_PRESENCE) 0x0004) ///< Sets PhysicalPresenceLock = TRUE // // Part 2, section 4.10: TPM_MIGRATE_SCHEME // -#define TPM_MS_MIGRATE ((TPM_MIGRATE_SCHEME) 0x0001) ///< A public key that can be used with all TPM migration commands other than 'ReWrap' mode. -#define TPM_MS_REWRAP ((TPM_MIGRATE_SCHEME) 0x0002) ///< A public key that can be used for the ReWrap mode of TPM_CreateMigrationBlob. -#define TPM_MS_MAINT ((TPM_MIGRATE_SCHEME) 0x0003) ///< A public key that can be used for the Maintenance commands -#define TPM_MS_RESTRICT_MIGRATE ((TPM_MIGRATE_SCHEME) 0x0004) ///< The key is to be migrated to a Migration Authority. -#define TPM_MS_RESTRICT_APPROVE_DOUBLE ((TPM_MIGRATE_SCHEME) 0x0005) ///< The key is to be migrated to an entity approved by a Migration Authority using double wrapping +#define TPM_MS_MIGRATE ((TPM_MIGRATE_SCHEME) 0x0001) ///< A public key that can be used with all TPM migration commands other than 'ReWrap' mode. +#define TPM_MS_REWRAP ((TPM_MIGRATE_SCHEME) 0x0002) ///< A public key that can be used for the ReWrap mode of TPM_CreateMigrationBlob. +#define TPM_MS_MAINT ((TPM_MIGRATE_SCHEME) 0x0003) ///< A public key that can be used for the Maintenance commands +#define TPM_MS_RESTRICT_MIGRATE ((TPM_MIGRATE_SCHEME) 0x0004) ///< The key is to be migrated to a Migration Authority. +#define TPM_MS_RESTRICT_APPROVE_DOUBLE ((TPM_MIGRATE_SCHEME) 0x0005) ///< The key is to be migrated to an entity approved by a Migration Authority using double wrapping // // Part 2, section 4.11: TPM_EK_TYPE // -#define TPM_EK_TYPE_ACTIVATE ((TPM_EK_TYPE) 0x0001) ///< The blob MUST be TPM_EK_BLOB_ACTIVATE -#define TPM_EK_TYPE_AUTH ((TPM_EK_TYPE) 0x0002) ///< The blob MUST be TPM_EK_BLOB_AUTH +#define TPM_EK_TYPE_ACTIVATE ((TPM_EK_TYPE) 0x0001) ///< The blob MUST be TPM_EK_BLOB_ACTIVATE +#define TPM_EK_TYPE_AUTH ((TPM_EK_TYPE) 0x0002) ///< The blob MUST be TPM_EK_BLOB_AUTH // // Part 2, section 4.12: TPM_PLATFORM_SPECIFIC // -#define TPM_PS_PC_11 ((TPM_PLATFORM_SPECIFIC) 0x0001) ///< PC Specific version 1.1 -#define TPM_PS_PC_12 ((TPM_PLATFORM_SPECIFIC) 0x0002) ///< PC Specific version 1.2 -#define TPM_PS_PDA_12 ((TPM_PLATFORM_SPECIFIC) 0x0003) ///< PDA Specific version 1.2 -#define TPM_PS_Server_12 ((TPM_PLATFORM_SPECIFIC) 0x0004) ///< Server Specific version 1.2 -#define TPM_PS_Mobile_12 ((TPM_PLATFORM_SPECIFIC) 0x0005) ///< Mobil Specific version 1.2 +#define TPM_PS_PC_11 ((TPM_PLATFORM_SPECIFIC) 0x0001) ///< PC Specific version 1.1 +#define TPM_PS_PC_12 ((TPM_PLATFORM_SPECIFIC) 0x0002) ///< PC Specific version 1.2 +#define TPM_PS_PDA_12 ((TPM_PLATFORM_SPECIFIC) 0x0003) ///< PDA Specific version 1.2 +#define TPM_PS_Server_12 ((TPM_PLATFORM_SPECIFIC) 0x0004) ///< Server Specific version 1.2 +#define TPM_PS_Mobile_12 ((TPM_PLATFORM_SPECIFIC) 0x0005) ///< Mobil Specific version 1.2 // // Part 2, section 5: Basic Structures @@ -415,72 +414,71 @@ typedef UINT32 TPM_FAMILY_OPERATION; /// Part 2, section 5.1: TPM_STRUCT_VER /// typedef struct tdTPM_STRUCT_VER { - UINT8 major; - UINT8 minor; - UINT8 revMajor; - UINT8 revMinor; + UINT8 major; + UINT8 minor; + UINT8 revMajor; + UINT8 revMinor; } TPM_STRUCT_VER; /// /// Part 2, section 5.3: TPM_VERSION /// typedef struct tdTPM_VERSION { - TPM_VERSION_BYTE major; - TPM_VERSION_BYTE minor; - UINT8 revMajor; - UINT8 revMinor; + TPM_VERSION_BYTE major; + TPM_VERSION_BYTE minor; + UINT8 revMajor; + UINT8 revMinor; } TPM_VERSION; - -#define TPM_SHA1_160_HASH_LEN 0x14 -#define TPM_SHA1BASED_NONCE_LEN TPM_SHA1_160_HASH_LEN +#define TPM_SHA1_160_HASH_LEN 0x14 +#define TPM_SHA1BASED_NONCE_LEN TPM_SHA1_160_HASH_LEN /// /// Part 2, section 5.4: TPM_DIGEST /// -typedef struct tdTPM_DIGEST{ - UINT8 digest[TPM_SHA1_160_HASH_LEN]; +typedef struct tdTPM_DIGEST { + UINT8 digest[TPM_SHA1_160_HASH_LEN]; } TPM_DIGEST; /// /// This SHALL be the digest of the chosen identityLabel and privacyCA for a new TPM identity /// -typedef TPM_DIGEST TPM_CHOSENID_HASH; +typedef TPM_DIGEST TPM_CHOSENID_HASH; /// /// This SHALL be the hash of a list of PCR indexes and PCR values that a key or data is bound to /// -typedef TPM_DIGEST TPM_COMPOSITE_HASH; +typedef TPM_DIGEST TPM_COMPOSITE_HASH; /// /// This SHALL be the value of a DIR register /// -typedef TPM_DIGEST TPM_DIRVALUE; +typedef TPM_DIGEST TPM_DIRVALUE; -typedef TPM_DIGEST TPM_HMAC; +typedef TPM_DIGEST TPM_HMAC; /// /// The value inside of the PCR /// -typedef TPM_DIGEST TPM_PCRVALUE; +typedef TPM_DIGEST TPM_PCRVALUE; /// /// This SHALL be the value of the current internal audit state /// -typedef TPM_DIGEST TPM_AUDITDIGEST; +typedef TPM_DIGEST TPM_AUDITDIGEST; /// /// Part 2, section 5.5: TPM_NONCE /// -typedef struct tdTPM_NONCE{ - UINT8 nonce[20]; +typedef struct tdTPM_NONCE { + UINT8 nonce[20]; } TPM_NONCE; /// /// This SHALL be a random value generated by a TPM immediately after the EK is installed /// in that TPM, whenever an EK is installed in that TPM /// -typedef TPM_NONCE TPM_DAA_TPM_SEED; +typedef TPM_NONCE TPM_DAA_TPM_SEED; /// /// This SHALL be a random value /// -typedef TPM_NONCE TPM_DAA_CONTEXT_SEED; +typedef TPM_NONCE TPM_DAA_CONTEXT_SEED; // // Part 2, section 5.6: TPM_AUTHDATA @@ -489,25 +487,25 @@ typedef TPM_NONCE TPM_DAA_CONTEXT_SEED; /// The AuthData data is the information that is saved or passed to provide proof of ownership /// 296 of an entity /// -typedef UINT8 tdTPM_AUTHDATA[20]; +typedef UINT8 tdTPM_AUTHDATA[20]; -typedef tdTPM_AUTHDATA TPM_AUTHDATA; +typedef tdTPM_AUTHDATA TPM_AUTHDATA; /// /// A secret plaintext value used in the authorization process /// -typedef TPM_AUTHDATA TPM_SECRET; +typedef TPM_AUTHDATA TPM_SECRET; /// /// A ciphertext (encrypted) version of AuthData data. The encryption mechanism depends on the context /// -typedef TPM_AUTHDATA TPM_ENCAUTH; +typedef TPM_AUTHDATA TPM_ENCAUTH; /// /// Part 2, section 5.7: TPM_KEY_HANDLE_LIST /// Size of handle is loaded * sizeof(TPM_KEY_HANDLE) /// typedef struct tdTPM_KEY_HANDLE_LIST { - UINT16 loaded; - TPM_KEY_HANDLE handle[1]; + UINT16 loaded; + TPM_KEY_HANDLE handle[1]; } TPM_KEY_HANDLE_LIST; // @@ -518,27 +516,27 @@ typedef struct tdTPM_KEY_HANDLE_LIST { /// used for signing operations, only. This means that it MUST be a leaf of the /// Protected Storage key hierarchy. /// -#define TPM_KEY_SIGNING ((UINT16) 0x0010) +#define TPM_KEY_SIGNING ((UINT16) 0x0010) /// /// TPM_KEY_STORAGE SHALL indicate a storage key. The key SHALL be used to wrap /// and unwrap other keys in the Protected Storage hierarchy /// -#define TPM_KEY_STORAGE ((UINT16) 0x0011) +#define TPM_KEY_STORAGE ((UINT16) 0x0011) /// /// TPM_KEY_IDENTITY SHALL indicate an identity key. The key SHALL be used for /// operations that require a TPM identity, only. /// -#define TPM_KEY_IDENTITY ((UINT16) 0x0012) +#define TPM_KEY_IDENTITY ((UINT16) 0x0012) /// /// TPM_KEY_AUTHCHANGE SHALL indicate an ephemeral key that is in use during /// the ChangeAuthAsym process, only. /// -#define TPM_KEY_AUTHCHANGE ((UINT16) 0x0013) +#define TPM_KEY_AUTHCHANGE ((UINT16) 0x0013) /// /// TPM_KEY_BIND SHALL indicate a key that can be used for TPM_Bind and /// TPM_Unbind operations only. /// -#define TPM_KEY_BIND ((UINT16) 0x0014) +#define TPM_KEY_BIND ((UINT16) 0x0014) /// /// TPM_KEY_LEGACY SHALL indicate a key that can perform signing and binding /// operations. The key MAY be used for both signing and binding operations. @@ -547,11 +545,11 @@ typedef struct tdTPM_KEY_HANDLE_LIST { /// key type is not recommended TPM_KEY_MIGRATE 0x0016 This SHALL indicate a /// key in use for TPM_MigrateKey /// -#define TPM_KEY_LEGACY ((UINT16) 0x0015) +#define TPM_KEY_LEGACY ((UINT16) 0x0015) /// /// TPM_KEY_MIGRAGE SHALL indicate a key in use for TPM_MigrateKey /// -#define TPM_KEY_MIGRATE ((UINT16) 0x0016) +#define TPM_KEY_MIGRATE ((UINT16) 0x0016) // // Part 2, section 5.8.1: Mandatory Key Usage Schemes @@ -572,27 +570,27 @@ typedef struct tdTPM_KEY_HANDLE_LIST { // // Part 2, section 5.9: TPM_AUTH_DATA_USAGE values // -#define TPM_AUTH_NEVER ((TPM_AUTH_DATA_USAGE) 0x00) -#define TPM_AUTH_ALWAYS ((TPM_AUTH_DATA_USAGE) 0x01) -#define TPM_AUTH_PRIV_USE_ONLY ((TPM_AUTH_DATA_USAGE) 0x03) +#define TPM_AUTH_NEVER ((TPM_AUTH_DATA_USAGE) 0x00) +#define TPM_AUTH_ALWAYS ((TPM_AUTH_DATA_USAGE) 0x01) +#define TPM_AUTH_PRIV_USE_ONLY ((TPM_AUTH_DATA_USAGE) 0x03) /// /// Part 2, section 5.10: TPM_KEY_FLAGS /// typedef enum tdTPM_KEY_FLAGS { - redirection = 0x00000001, - migratable = 0x00000002, - isVolatile = 0x00000004, - pcrIgnoredOnRead = 0x00000008, - migrateAuthority = 0x00000010 + redirection = 0x00000001, + migratable = 0x00000002, + isVolatile = 0x00000004, + pcrIgnoredOnRead = 0x00000008, + migrateAuthority = 0x00000010 } TPM_KEY_FLAGS_BITS; /// /// Part 2, section 5.11: TPM_CHANGEAUTH_VALIDATE /// typedef struct tdTPM_CHANGEAUTH_VALIDATE { - TPM_SECRET newAuthSecret; - TPM_NONCE n1; + TPM_SECRET newAuthSecret; + TPM_NONCE n1; } TPM_CHANGEAUTH_VALIDATE; /// @@ -603,45 +601,45 @@ typedef struct tdTPM_CHANGEAUTH_VALIDATE { /// [size_is(parmSize)] BYTE* parms; /// typedef struct tdTPM_KEY_PARMS { - TPM_ALGORITHM_ID algorithmID; - TPM_ENC_SCHEME encScheme; - TPM_SIG_SCHEME sigScheme; - UINT32 parmSize; - UINT8 *parms; + TPM_ALGORITHM_ID algorithmID; + TPM_ENC_SCHEME encScheme; + TPM_SIG_SCHEME sigScheme; + UINT32 parmSize; + UINT8 *parms; } TPM_KEY_PARMS; /// /// Part 2, section 10.4: TPM_STORE_PUBKEY /// typedef struct tdTPM_STORE_PUBKEY { - UINT32 keyLength; - UINT8 key[1]; + UINT32 keyLength; + UINT8 key[1]; } TPM_STORE_PUBKEY; /// /// Part 2, section 10.5: TPM_PUBKEY /// -typedef struct tdTPM_PUBKEY{ - TPM_KEY_PARMS algorithmParms; - TPM_STORE_PUBKEY pubKey; +typedef struct tdTPM_PUBKEY { + TPM_KEY_PARMS algorithmParms; + TPM_STORE_PUBKEY pubKey; } TPM_PUBKEY; /// /// Part 2, section 5.12: TPM_MIGRATIONKEYAUTH /// -typedef struct tdTPM_MIGRATIONKEYAUTH{ - TPM_PUBKEY migrationKey; - TPM_MIGRATE_SCHEME migrationScheme; - TPM_DIGEST digest; +typedef struct tdTPM_MIGRATIONKEYAUTH { + TPM_PUBKEY migrationKey; + TPM_MIGRATE_SCHEME migrationScheme; + TPM_DIGEST digest; } TPM_MIGRATIONKEYAUTH; /// /// Part 2, section 5.13: TPM_COUNTER_VALUE /// -typedef struct tdTPM_COUNTER_VALUE{ - TPM_STRUCTURE_TAG tag; - UINT8 label[4]; - TPM_ACTUAL_COUNT counter; +typedef struct tdTPM_COUNTER_VALUE { + TPM_STRUCTURE_TAG tag; + UINT8 label[4]; + TPM_ACTUAL_COUNT counter; } TPM_COUNTER_VALUE; /// @@ -649,11 +647,11 @@ typedef struct tdTPM_COUNTER_VALUE{ /// Size of data indicated by dataLen /// typedef struct tdTPM_SIGN_INFO { - TPM_STRUCTURE_TAG tag; - UINT8 fixed[4]; - TPM_NONCE replay; - UINT32 dataLen; - UINT8 *data; + TPM_STRUCTURE_TAG tag; + UINT8 fixed[4]; + TPM_NONCE replay; + UINT32 dataLen; + UINT8 *data; } TPM_SIGN_INFO; /// @@ -661,163 +659,163 @@ typedef struct tdTPM_SIGN_INFO { /// Number of migAuthDigest indicated by MSAlist /// typedef struct tdTPM_MSA_COMPOSITE { - UINT32 MSAlist; - TPM_DIGEST migAuthDigest[1]; + UINT32 MSAlist; + TPM_DIGEST migAuthDigest[1]; } TPM_MSA_COMPOSITE; /// /// Part 2, section 5.16: TPM_CMK_AUTH /// -typedef struct tdTPM_CMK_AUTH{ - TPM_DIGEST migrationAuthorityDigest; - TPM_DIGEST destinationKeyDigest; - TPM_DIGEST sourceKeyDigest; +typedef struct tdTPM_CMK_AUTH { + TPM_DIGEST migrationAuthorityDigest; + TPM_DIGEST destinationKeyDigest; + TPM_DIGEST sourceKeyDigest; } TPM_CMK_AUTH; // // Part 2, section 5.17: TPM_CMK_DELEGATE // -#define TPM_CMK_DELEGATE_SIGNING ((TPM_CMK_DELEGATE) BIT31) -#define TPM_CMK_DELEGATE_STORAGE ((TPM_CMK_DELEGATE) BIT30) -#define TPM_CMK_DELEGATE_BIND ((TPM_CMK_DELEGATE) BIT29) -#define TPM_CMK_DELEGATE_LEGACY ((TPM_CMK_DELEGATE) BIT28) -#define TPM_CMK_DELEGATE_MIGRATE ((TPM_CMK_DELEGATE) BIT27) +#define TPM_CMK_DELEGATE_SIGNING ((TPM_CMK_DELEGATE) BIT31) +#define TPM_CMK_DELEGATE_STORAGE ((TPM_CMK_DELEGATE) BIT30) +#define TPM_CMK_DELEGATE_BIND ((TPM_CMK_DELEGATE) BIT29) +#define TPM_CMK_DELEGATE_LEGACY ((TPM_CMK_DELEGATE) BIT28) +#define TPM_CMK_DELEGATE_MIGRATE ((TPM_CMK_DELEGATE) BIT27) /// /// Part 2, section 5.18: TPM_SELECT_SIZE /// typedef struct tdTPM_SELECT_SIZE { - UINT8 major; - UINT8 minor; - UINT16 reqSize; + UINT8 major; + UINT8 minor; + UINT16 reqSize; } TPM_SELECT_SIZE; /// /// Part 2, section 5,19: TPM_CMK_MIGAUTH /// -typedef struct tdTPM_CMK_MIGAUTH{ - TPM_STRUCTURE_TAG tag; - TPM_DIGEST msaDigest; - TPM_DIGEST pubKeyDigest; +typedef struct tdTPM_CMK_MIGAUTH { + TPM_STRUCTURE_TAG tag; + TPM_DIGEST msaDigest; + TPM_DIGEST pubKeyDigest; } TPM_CMK_MIGAUTH; /// /// Part 2, section 5.20: TPM_CMK_SIGTICKET /// -typedef struct tdTPM_CMK_SIGTICKET{ - TPM_STRUCTURE_TAG tag; - TPM_DIGEST verKeyDigest; - TPM_DIGEST signedData; +typedef struct tdTPM_CMK_SIGTICKET { + TPM_STRUCTURE_TAG tag; + TPM_DIGEST verKeyDigest; + TPM_DIGEST signedData; } TPM_CMK_SIGTICKET; /// /// Part 2, section 5.21: TPM_CMK_MA_APPROVAL /// -typedef struct tdTPM_CMK_MA_APPROVAL{ - TPM_STRUCTURE_TAG tag; - TPM_DIGEST migrationAuthorityDigest; +typedef struct tdTPM_CMK_MA_APPROVAL { + TPM_STRUCTURE_TAG tag; + TPM_DIGEST migrationAuthorityDigest; } TPM_CMK_MA_APPROVAL; // // Part 2, section 6: Command Tags // -#define TPM_TAG_RQU_COMMAND ((TPM_STRUCTURE_TAG) 0x00C1) -#define TPM_TAG_RQU_AUTH1_COMMAND ((TPM_STRUCTURE_TAG) 0x00C2) -#define TPM_TAG_RQU_AUTH2_COMMAND ((TPM_STRUCTURE_TAG) 0x00C3) -#define TPM_TAG_RSP_COMMAND ((TPM_STRUCTURE_TAG) 0x00C4) -#define TPM_TAG_RSP_AUTH1_COMMAND ((TPM_STRUCTURE_TAG) 0x00C5) -#define TPM_TAG_RSP_AUTH2_COMMAND ((TPM_STRUCTURE_TAG) 0x00C6) +#define TPM_TAG_RQU_COMMAND ((TPM_STRUCTURE_TAG) 0x00C1) +#define TPM_TAG_RQU_AUTH1_COMMAND ((TPM_STRUCTURE_TAG) 0x00C2) +#define TPM_TAG_RQU_AUTH2_COMMAND ((TPM_STRUCTURE_TAG) 0x00C3) +#define TPM_TAG_RSP_COMMAND ((TPM_STRUCTURE_TAG) 0x00C4) +#define TPM_TAG_RSP_AUTH1_COMMAND ((TPM_STRUCTURE_TAG) 0x00C5) +#define TPM_TAG_RSP_AUTH2_COMMAND ((TPM_STRUCTURE_TAG) 0x00C6) /// /// Part 2, section 7.1: TPM_PERMANENT_FLAGS /// -typedef struct tdTPM_PERMANENT_FLAGS{ - TPM_STRUCTURE_TAG tag; - BOOLEAN disable; - BOOLEAN ownership; - BOOLEAN deactivated; - BOOLEAN readPubek; - BOOLEAN disableOwnerClear; - BOOLEAN allowMaintenance; - BOOLEAN physicalPresenceLifetimeLock; - BOOLEAN physicalPresenceHWEnable; - BOOLEAN physicalPresenceCMDEnable; - BOOLEAN CEKPUsed; - BOOLEAN TPMpost; - BOOLEAN TPMpostLock; - BOOLEAN FIPS; +typedef struct tdTPM_PERMANENT_FLAGS { + TPM_STRUCTURE_TAG tag; + BOOLEAN disable; + BOOLEAN ownership; + BOOLEAN deactivated; + BOOLEAN readPubek; + BOOLEAN disableOwnerClear; + BOOLEAN allowMaintenance; + BOOLEAN physicalPresenceLifetimeLock; + BOOLEAN physicalPresenceHWEnable; + BOOLEAN physicalPresenceCMDEnable; + BOOLEAN CEKPUsed; + BOOLEAN TPMpost; + BOOLEAN TPMpostLock; + BOOLEAN FIPS; BOOLEAN operator; BOOLEAN enableRevokeEK; - BOOLEAN nvLocked; - BOOLEAN readSRKPub; - BOOLEAN tpmEstablished; - BOOLEAN maintenanceDone; - BOOLEAN disableFullDALogicInfo; + BOOLEAN nvLocked; + BOOLEAN readSRKPub; + BOOLEAN tpmEstablished; + BOOLEAN maintenanceDone; + BOOLEAN disableFullDALogicInfo; } TPM_PERMANENT_FLAGS; // // Part 2, section 7.1.1: Flag Restrictions (of TPM_PERMANENT_FLAGS) // -#define TPM_PF_DISABLE ((TPM_CAPABILITY_AREA) 1) -#define TPM_PF_OWNERSHIP ((TPM_CAPABILITY_AREA) 2) -#define TPM_PF_DEACTIVATED ((TPM_CAPABILITY_AREA) 3) -#define TPM_PF_READPUBEK ((TPM_CAPABILITY_AREA) 4) -#define TPM_PF_DISABLEOWNERCLEAR ((TPM_CAPABILITY_AREA) 5) -#define TPM_PF_ALLOWMAINTENANCE ((TPM_CAPABILITY_AREA) 6) -#define TPM_PF_PHYSICALPRESENCELIFETIMELOCK ((TPM_CAPABILITY_AREA) 7) -#define TPM_PF_PHYSICALPRESENCEHWENABLE ((TPM_CAPABILITY_AREA) 8) -#define TPM_PF_PHYSICALPRESENCECMDENABLE ((TPM_CAPABILITY_AREA) 9) -#define TPM_PF_CEKPUSED ((TPM_CAPABILITY_AREA) 10) -#define TPM_PF_TPMPOST ((TPM_CAPABILITY_AREA) 11) -#define TPM_PF_TPMPOSTLOCK ((TPM_CAPABILITY_AREA) 12) -#define TPM_PF_FIPS ((TPM_CAPABILITY_AREA) 13) -#define TPM_PF_OPERATOR ((TPM_CAPABILITY_AREA) 14) -#define TPM_PF_ENABLEREVOKEEK ((TPM_CAPABILITY_AREA) 15) -#define TPM_PF_NV_LOCKED ((TPM_CAPABILITY_AREA) 16) -#define TPM_PF_READSRKPUB ((TPM_CAPABILITY_AREA) 17) -#define TPM_PF_TPMESTABLISHED ((TPM_CAPABILITY_AREA) 18) -#define TPM_PF_MAINTENANCEDONE ((TPM_CAPABILITY_AREA) 19) -#define TPM_PF_DISABLEFULLDALOGICINFO ((TPM_CAPABILITY_AREA) 20) +#define TPM_PF_DISABLE ((TPM_CAPABILITY_AREA) 1) +#define TPM_PF_OWNERSHIP ((TPM_CAPABILITY_AREA) 2) +#define TPM_PF_DEACTIVATED ((TPM_CAPABILITY_AREA) 3) +#define TPM_PF_READPUBEK ((TPM_CAPABILITY_AREA) 4) +#define TPM_PF_DISABLEOWNERCLEAR ((TPM_CAPABILITY_AREA) 5) +#define TPM_PF_ALLOWMAINTENANCE ((TPM_CAPABILITY_AREA) 6) +#define TPM_PF_PHYSICALPRESENCELIFETIMELOCK ((TPM_CAPABILITY_AREA) 7) +#define TPM_PF_PHYSICALPRESENCEHWENABLE ((TPM_CAPABILITY_AREA) 8) +#define TPM_PF_PHYSICALPRESENCECMDENABLE ((TPM_CAPABILITY_AREA) 9) +#define TPM_PF_CEKPUSED ((TPM_CAPABILITY_AREA) 10) +#define TPM_PF_TPMPOST ((TPM_CAPABILITY_AREA) 11) +#define TPM_PF_TPMPOSTLOCK ((TPM_CAPABILITY_AREA) 12) +#define TPM_PF_FIPS ((TPM_CAPABILITY_AREA) 13) +#define TPM_PF_OPERATOR ((TPM_CAPABILITY_AREA) 14) +#define TPM_PF_ENABLEREVOKEEK ((TPM_CAPABILITY_AREA) 15) +#define TPM_PF_NV_LOCKED ((TPM_CAPABILITY_AREA) 16) +#define TPM_PF_READSRKPUB ((TPM_CAPABILITY_AREA) 17) +#define TPM_PF_TPMESTABLISHED ((TPM_CAPABILITY_AREA) 18) +#define TPM_PF_MAINTENANCEDONE ((TPM_CAPABILITY_AREA) 19) +#define TPM_PF_DISABLEFULLDALOGICINFO ((TPM_CAPABILITY_AREA) 20) /// /// Part 2, section 7.2: TPM_STCLEAR_FLAGS /// -typedef struct tdTPM_STCLEAR_FLAGS{ - TPM_STRUCTURE_TAG tag; - BOOLEAN deactivated; - BOOLEAN disableForceClear; - BOOLEAN physicalPresence; - BOOLEAN physicalPresenceLock; - BOOLEAN bGlobalLock; +typedef struct tdTPM_STCLEAR_FLAGS { + TPM_STRUCTURE_TAG tag; + BOOLEAN deactivated; + BOOLEAN disableForceClear; + BOOLEAN physicalPresence; + BOOLEAN physicalPresenceLock; + BOOLEAN bGlobalLock; } TPM_STCLEAR_FLAGS; // // Part 2, section 7.2.1: Flag Restrictions (of TPM_STCLEAR_FLAGS) // -#define TPM_SF_DEACTIVATED ((TPM_CAPABILITY_AREA) 1) -#define TPM_SF_DISABLEFORCECLEAR ((TPM_CAPABILITY_AREA) 2) -#define TPM_SF_PHYSICALPRESENCE ((TPM_CAPABILITY_AREA) 3) -#define TPM_SF_PHYSICALPRESENCELOCK ((TPM_CAPABILITY_AREA) 4) -#define TPM_SF_BGLOBALLOCK ((TPM_CAPABILITY_AREA) 5) +#define TPM_SF_DEACTIVATED ((TPM_CAPABILITY_AREA) 1) +#define TPM_SF_DISABLEFORCECLEAR ((TPM_CAPABILITY_AREA) 2) +#define TPM_SF_PHYSICALPRESENCE ((TPM_CAPABILITY_AREA) 3) +#define TPM_SF_PHYSICALPRESENCELOCK ((TPM_CAPABILITY_AREA) 4) +#define TPM_SF_BGLOBALLOCK ((TPM_CAPABILITY_AREA) 5) /// /// Part 2, section 7.3: TPM_STANY_FLAGS /// -typedef struct tdTPM_STANY_FLAGS{ - TPM_STRUCTURE_TAG tag; - BOOLEAN postInitialise; - TPM_MODIFIER_INDICATOR localityModifier; - BOOLEAN transportExclusive; - BOOLEAN TOSPresent; +typedef struct tdTPM_STANY_FLAGS { + TPM_STRUCTURE_TAG tag; + BOOLEAN postInitialise; + TPM_MODIFIER_INDICATOR localityModifier; + BOOLEAN transportExclusive; + BOOLEAN TOSPresent; } TPM_STANY_FLAGS; // // Part 2, section 7.3.1: Flag Restrictions (of TPM_STANY_FLAGS) // -#define TPM_AF_POSTINITIALISE ((TPM_CAPABILITY_AREA) 1) -#define TPM_AF_LOCALITYMODIFIER ((TPM_CAPABILITY_AREA) 2) -#define TPM_AF_TRANSPORTEXCLUSIVE ((TPM_CAPABILITY_AREA) 3) -#define TPM_AF_TOSPRESENT ((TPM_CAPABILITY_AREA) 4) +#define TPM_AF_POSTINITIALISE ((TPM_CAPABILITY_AREA) 1) +#define TPM_AF_LOCALITYMODIFIER ((TPM_CAPABILITY_AREA) 2) +#define TPM_AF_TRANSPORTEXCLUSIVE ((TPM_CAPABILITY_AREA) 3) +#define TPM_AF_TOSPRESENT ((TPM_CAPABILITY_AREA) 4) // // All those structures defined in section 7.4, 7.5, 7.6 are not normative and @@ -825,10 +823,10 @@ typedef struct tdTPM_STANY_FLAGS{ // // Part 2, section 7.4: TPM_PERMANENT_DATA // -#define TPM_MIN_COUNTERS 4 ///< the minimum number of counters is 4 -#define TPM_DELEGATE_KEY TPM_KEY -#define TPM_NUM_PCR 16 -#define TPM_MAX_NV_WRITE_NOOWNER 64 +#define TPM_MIN_COUNTERS 4 ///< the minimum number of counters is 4 +#define TPM_DELEGATE_KEY TPM_KEY +#define TPM_NUM_PCR 16 +#define TPM_MAX_NV_WRITE_NOOWNER 64 // // Part 2, section 7.4.1: PERMANENT_DATA Subcap for SetCapability @@ -863,35 +861,35 @@ typedef struct tdTPM_STANY_FLAGS{ /// Part 2, section 7.5: TPM_STCLEAR_DATA /// available inside TPM only /// - typedef struct tdTPM_STCLEAR_DATA{ - TPM_STRUCTURE_TAG tag; - TPM_NONCE contextNonceKey; - TPM_COUNT_ID countID; - UINT32 ownerReference; - BOOLEAN disableResetLock; - TPM_PCRVALUE PCR[TPM_NUM_PCR]; - UINT32 deferredPhysicalPresence; - }TPM_STCLEAR_DATA; +typedef struct tdTPM_STCLEAR_DATA { + TPM_STRUCTURE_TAG tag; + TPM_NONCE contextNonceKey; + TPM_COUNT_ID countID; + UINT32 ownerReference; + BOOLEAN disableResetLock; + TPM_PCRVALUE PCR[TPM_NUM_PCR]; + UINT32 deferredPhysicalPresence; +} TPM_STCLEAR_DATA; // // Part 2, section 7.5.1: STCLEAR_DATA Subcap for SetCapability // -#define TPM_SD_CONTEXTNONCEKEY ((TPM_CAPABILITY_AREA)0x00000001) -#define TPM_SD_COUNTID ((TPM_CAPABILITY_AREA)0x00000002) -#define TPM_SD_OWNERREFERENCE ((TPM_CAPABILITY_AREA)0x00000003) -#define TPM_SD_DISABLERESETLOCK ((TPM_CAPABILITY_AREA)0x00000004) -#define TPM_SD_PCR ((TPM_CAPABILITY_AREA)0x00000005) -#define TPM_SD_DEFERREDPHYSICALPRESENCE ((TPM_CAPABILITY_AREA)0x00000006) +#define TPM_SD_CONTEXTNONCEKEY ((TPM_CAPABILITY_AREA)0x00000001) +#define TPM_SD_COUNTID ((TPM_CAPABILITY_AREA)0x00000002) +#define TPM_SD_OWNERREFERENCE ((TPM_CAPABILITY_AREA)0x00000003) +#define TPM_SD_DISABLERESETLOCK ((TPM_CAPABILITY_AREA)0x00000004) +#define TPM_SD_PCR ((TPM_CAPABILITY_AREA)0x00000005) +#define TPM_SD_DEFERREDPHYSICALPRESENCE ((TPM_CAPABILITY_AREA)0x00000006) // // Part 2, section 7.6.1: STANY_DATA Subcap for SetCapability // -#define TPM_AD_CONTEXTNONCESESSION ((TPM_CAPABILITY_AREA) 1) -#define TPM_AD_AUDITDIGEST ((TPM_CAPABILITY_AREA) 2) -#define TPM_AD_CURRENTTICKS ((TPM_CAPABILITY_AREA) 3) -#define TPM_AD_CONTEXTCOUNT ((TPM_CAPABILITY_AREA) 4) -#define TPM_AD_CONTEXTLIST ((TPM_CAPABILITY_AREA) 5) -#define TPM_AD_SESSIONS ((TPM_CAPABILITY_AREA) 6) +#define TPM_AD_CONTEXTNONCESESSION ((TPM_CAPABILITY_AREA) 1) +#define TPM_AD_AUDITDIGEST ((TPM_CAPABILITY_AREA) 2) +#define TPM_AD_CURRENTTICKS ((TPM_CAPABILITY_AREA) 3) +#define TPM_AD_CONTEXTCOUNT ((TPM_CAPABILITY_AREA) 4) +#define TPM_AD_CONTEXTLIST ((TPM_CAPABILITY_AREA) 5) +#define TPM_AD_SESSIONS ((TPM_CAPABILITY_AREA) 6) // // Part 2, section 8: PCR Structures @@ -902,8 +900,8 @@ typedef struct tdTPM_STANY_FLAGS{ /// Size of pcrSelect[] indicated by sizeOfSelect /// typedef struct tdTPM_PCR_SELECTION { - UINT16 sizeOfSelect; - UINT8 pcrSelect[1]; + UINT16 sizeOfSelect; + UINT8 pcrSelect[1]; } TPM_PCR_SELECTION; /// @@ -911,60 +909,60 @@ typedef struct tdTPM_PCR_SELECTION { /// Size of pcrValue[] indicated by valueSize /// typedef struct tdTPM_PCR_COMPOSITE { - TPM_PCR_SELECTION select; - UINT32 valueSize; - TPM_PCRVALUE pcrValue[1]; + TPM_PCR_SELECTION select; + UINT32 valueSize; + TPM_PCRVALUE pcrValue[1]; } TPM_PCR_COMPOSITE; /// /// Part 2, section 8.3: TPM_PCR_INFO /// typedef struct tdTPM_PCR_INFO { - TPM_PCR_SELECTION pcrSelection; - TPM_COMPOSITE_HASH digestAtRelease; - TPM_COMPOSITE_HASH digestAtCreation; + TPM_PCR_SELECTION pcrSelection; + TPM_COMPOSITE_HASH digestAtRelease; + TPM_COMPOSITE_HASH digestAtCreation; } TPM_PCR_INFO; /// /// Part 2, section 8.6: TPM_LOCALITY_SELECTION /// -typedef UINT8 TPM_LOCALITY_SELECTION; +typedef UINT8 TPM_LOCALITY_SELECTION; -#define TPM_LOC_FOUR ((UINT8) 0x10) -#define TPM_LOC_THREE ((UINT8) 0x08) -#define TPM_LOC_TWO ((UINT8) 0x04) -#define TPM_LOC_ONE ((UINT8) 0x02) -#define TPM_LOC_ZERO ((UINT8) 0x01) +#define TPM_LOC_FOUR ((UINT8) 0x10) +#define TPM_LOC_THREE ((UINT8) 0x08) +#define TPM_LOC_TWO ((UINT8) 0x04) +#define TPM_LOC_ONE ((UINT8) 0x02) +#define TPM_LOC_ZERO ((UINT8) 0x01) /// /// Part 2, section 8.4: TPM_PCR_INFO_LONG /// typedef struct tdTPM_PCR_INFO_LONG { - TPM_STRUCTURE_TAG tag; - TPM_LOCALITY_SELECTION localityAtCreation; - TPM_LOCALITY_SELECTION localityAtRelease; - TPM_PCR_SELECTION creationPCRSelection; - TPM_PCR_SELECTION releasePCRSelection; - TPM_COMPOSITE_HASH digestAtCreation; - TPM_COMPOSITE_HASH digestAtRelease; + TPM_STRUCTURE_TAG tag; + TPM_LOCALITY_SELECTION localityAtCreation; + TPM_LOCALITY_SELECTION localityAtRelease; + TPM_PCR_SELECTION creationPCRSelection; + TPM_PCR_SELECTION releasePCRSelection; + TPM_COMPOSITE_HASH digestAtCreation; + TPM_COMPOSITE_HASH digestAtRelease; } TPM_PCR_INFO_LONG; /// /// Part 2, section 8.5: TPM_PCR_INFO_SHORT /// -typedef struct tdTPM_PCR_INFO_SHORT{ - TPM_PCR_SELECTION pcrSelection; - TPM_LOCALITY_SELECTION localityAtRelease; - TPM_COMPOSITE_HASH digestAtRelease; +typedef struct tdTPM_PCR_INFO_SHORT { + TPM_PCR_SELECTION pcrSelection; + TPM_LOCALITY_SELECTION localityAtRelease; + TPM_COMPOSITE_HASH digestAtRelease; } TPM_PCR_INFO_SHORT; /// /// Part 2, section 8.8: TPM_PCR_ATTRIBUTES /// -typedef struct tdTPM_PCR_ATTRIBUTES{ - BOOLEAN pcrReset; - TPM_LOCALITY_SELECTION pcrExtendLocal; - TPM_LOCALITY_SELECTION pcrResetLocal; +typedef struct tdTPM_PCR_ATTRIBUTES { + BOOLEAN pcrReset; + TPM_LOCALITY_SELECTION pcrExtendLocal; + TPM_LOCALITY_SELECTION pcrResetLocal; } TPM_PCR_ATTRIBUTES; // @@ -977,11 +975,11 @@ typedef struct tdTPM_PCR_ATTRIBUTES{ /// [size_is(encDataSize)] BYTE* encData; /// typedef struct tdTPM_STORED_DATA { - TPM_STRUCT_VER ver; - UINT32 sealInfoSize; - UINT8 *sealInfo; - UINT32 encDataSize; - UINT8 *encData; + TPM_STRUCT_VER ver; + UINT32 sealInfoSize; + UINT8 *sealInfo; + UINT32 encDataSize; + UINT8 *encData; } TPM_STORED_DATA; /// @@ -990,12 +988,12 @@ typedef struct tdTPM_STORED_DATA { /// [size_is(encDataSize)] BYTE* encData; /// typedef struct tdTPM_STORED_DATA12 { - TPM_STRUCTURE_TAG tag; - TPM_ENTITY_TYPE et; - UINT32 sealInfoSize; - UINT8 *sealInfo; - UINT32 encDataSize; - UINT8 *encData; + TPM_STRUCTURE_TAG tag; + TPM_ENTITY_TYPE et; + UINT32 sealInfoSize; + UINT8 *sealInfo; + UINT32 encDataSize; + UINT8 *encData; } TPM_STORED_DATA12; /// @@ -1003,12 +1001,12 @@ typedef struct tdTPM_STORED_DATA12 { /// [size_is(dataSize)] BYTE* data; /// typedef struct tdTPM_SEALED_DATA { - TPM_PAYLOAD_TYPE payload; - TPM_SECRET authData; - TPM_NONCE tpmProof; - TPM_DIGEST storedDigest; - UINT32 dataSize; - UINT8 *data; + TPM_PAYLOAD_TYPE payload; + TPM_SECRET authData; + TPM_NONCE tpmProof; + TPM_DIGEST storedDigest; + UINT32 dataSize; + UINT8 *data; } TPM_SEALED_DATA; /// @@ -1016,19 +1014,19 @@ typedef struct tdTPM_SEALED_DATA { /// [size_is(size)] BYTE* data; /// typedef struct tdTPM_SYMMETRIC_KEY { - TPM_ALGORITHM_ID algId; - TPM_ENC_SCHEME encScheme; - UINT16 dataSize; - UINT8 *data; + TPM_ALGORITHM_ID algId; + TPM_ENC_SCHEME encScheme; + UINT16 dataSize; + UINT8 *data; } TPM_SYMMETRIC_KEY; /// /// Part 2, section 9.5: TPM_BOUND_DATA /// typedef struct tdTPM_BOUND_DATA { - TPM_STRUCT_VER ver; - TPM_PAYLOAD_TYPE payload; - UINT8 payloadData[1]; + TPM_STRUCT_VER ver; + TPM_PAYLOAD_TYPE payload; + UINT8 payloadData[1]; } TPM_BOUND_DATA; // @@ -1043,35 +1041,35 @@ typedef struct tdTPM_BOUND_DATA { /// Part 2, section 10.2: TPM_KEY /// [size_is(encDataSize)] BYTE* encData; /// -typedef struct tdTPM_KEY{ - TPM_STRUCT_VER ver; - TPM_KEY_USAGE keyUsage; - TPM_KEY_FLAGS keyFlags; - TPM_AUTH_DATA_USAGE authDataUsage; - TPM_KEY_PARMS algorithmParms; - UINT32 PCRInfoSize; - UINT8 *PCRInfo; - TPM_STORE_PUBKEY pubKey; - UINT32 encDataSize; - UINT8 *encData; +typedef struct tdTPM_KEY { + TPM_STRUCT_VER ver; + TPM_KEY_USAGE keyUsage; + TPM_KEY_FLAGS keyFlags; + TPM_AUTH_DATA_USAGE authDataUsage; + TPM_KEY_PARMS algorithmParms; + UINT32 PCRInfoSize; + UINT8 *PCRInfo; + TPM_STORE_PUBKEY pubKey; + UINT32 encDataSize; + UINT8 *encData; } TPM_KEY; /// /// Part 2, section 10.3: TPM_KEY12 /// [size_is(encDataSize)] BYTE* encData; /// -typedef struct tdTPM_KEY12{ - TPM_STRUCTURE_TAG tag; - UINT16 fill; - TPM_KEY_USAGE keyUsage; - TPM_KEY_FLAGS keyFlags; - TPM_AUTH_DATA_USAGE authDataUsage; - TPM_KEY_PARMS algorithmParms; - UINT32 PCRInfoSize; - UINT8 *PCRInfo; - TPM_STORE_PUBKEY pubKey; - UINT32 encDataSize; - UINT8 *encData; +typedef struct tdTPM_KEY12 { + TPM_STRUCTURE_TAG tag; + UINT16 fill; + TPM_KEY_USAGE keyUsage; + TPM_KEY_FLAGS keyFlags; + TPM_AUTH_DATA_USAGE authDataUsage; + TPM_KEY_PARMS algorithmParms; + UINT32 PCRInfoSize; + UINT8 *PCRInfo; + TPM_STORE_PUBKEY pubKey; + UINT32 encDataSize; + UINT8 *encData; } TPM_KEY12; /// @@ -1079,37 +1077,39 @@ typedef struct tdTPM_KEY12{ /// [size_is(keyLength)] BYTE* key; /// typedef struct tdTPM_STORE_PRIVKEY { - UINT32 keyLength; - UINT8 *key; + UINT32 keyLength; + UINT8 *key; } TPM_STORE_PRIVKEY; /// /// Part 2, section 10.6: TPM_STORE_ASYMKEY /// -typedef struct tdTPM_STORE_ASYMKEY { // pos len total - TPM_PAYLOAD_TYPE payload; // 0 1 1 - TPM_SECRET usageAuth; // 1 20 21 - TPM_SECRET migrationAuth; // 21 20 41 - TPM_DIGEST pubDataDigest; // 41 20 61 - TPM_STORE_PRIVKEY privKey; // 61 132-151 193-214 +typedef struct tdTPM_STORE_ASYMKEY { + // pos len total + TPM_PAYLOAD_TYPE payload; // 0 1 1 + TPM_SECRET usageAuth; // 1 20 21 + TPM_SECRET migrationAuth; // 21 20 41 + TPM_DIGEST pubDataDigest; // 41 20 61 + TPM_STORE_PRIVKEY privKey; // 61 132-151 193-214 } TPM_STORE_ASYMKEY; /// /// Part 2, section 10.8: TPM_MIGRATE_ASYMKEY /// [size_is(partPrivKeyLen)] BYTE* partPrivKey; /// -typedef struct tdTPM_MIGRATE_ASYMKEY { // pos len total - TPM_PAYLOAD_TYPE payload; // 0 1 1 - TPM_SECRET usageAuth; // 1 20 21 - TPM_DIGEST pubDataDigest; // 21 20 41 - UINT32 partPrivKeyLen; // 41 4 45 - UINT8 *partPrivKey; // 45 112-127 157-172 +typedef struct tdTPM_MIGRATE_ASYMKEY { + // pos len total + TPM_PAYLOAD_TYPE payload; // 0 1 1 + TPM_SECRET usageAuth; // 1 20 21 + TPM_DIGEST pubDataDigest; // 21 20 41 + UINT32 partPrivKeyLen; // 41 4 45 + UINT8 *partPrivKey; // 45 112-127 157-172 } TPM_MIGRATE_ASYMKEY; /// /// Part 2, section 10.9: TPM_KEY_CONTROL /// -#define TPM_KEY_CONTROL_OWNER_EVICT ((UINT32) 0x00000001) +#define TPM_KEY_CONTROL_OWNER_EVICT ((UINT32) 0x00000001) // // Part 2, section 11: Signed Structures @@ -1119,56 +1119,56 @@ typedef struct tdTPM_MIGRATE_ASYMKEY { // pos len total /// Part 2, section 11.1: TPM_CERTIFY_INFO Structure /// typedef struct tdTPM_CERTIFY_INFO { - TPM_STRUCT_VER version; - TPM_KEY_USAGE keyUsage; - TPM_KEY_FLAGS keyFlags; - TPM_AUTH_DATA_USAGE authDataUsage; - TPM_KEY_PARMS algorithmParms; - TPM_DIGEST pubkeyDigest; - TPM_NONCE data; - BOOLEAN parentPCRStatus; - UINT32 PCRInfoSize; - UINT8 *PCRInfo; + TPM_STRUCT_VER version; + TPM_KEY_USAGE keyUsage; + TPM_KEY_FLAGS keyFlags; + TPM_AUTH_DATA_USAGE authDataUsage; + TPM_KEY_PARMS algorithmParms; + TPM_DIGEST pubkeyDigest; + TPM_NONCE data; + BOOLEAN parentPCRStatus; + UINT32 PCRInfoSize; + UINT8 *PCRInfo; } TPM_CERTIFY_INFO; /// /// Part 2, section 11.2: TPM_CERTIFY_INFO2 Structure /// typedef struct tdTPM_CERTIFY_INFO2 { - TPM_STRUCTURE_TAG tag; - UINT8 fill; - TPM_PAYLOAD_TYPE payloadType; - TPM_KEY_USAGE keyUsage; - TPM_KEY_FLAGS keyFlags; - TPM_AUTH_DATA_USAGE authDataUsage; - TPM_KEY_PARMS algorithmParms; - TPM_DIGEST pubkeyDigest; - TPM_NONCE data; - BOOLEAN parentPCRStatus; - UINT32 PCRInfoSize; - UINT8 *PCRInfo; - UINT32 migrationAuthoritySize; - UINT8 *migrationAuthority; + TPM_STRUCTURE_TAG tag; + UINT8 fill; + TPM_PAYLOAD_TYPE payloadType; + TPM_KEY_USAGE keyUsage; + TPM_KEY_FLAGS keyFlags; + TPM_AUTH_DATA_USAGE authDataUsage; + TPM_KEY_PARMS algorithmParms; + TPM_DIGEST pubkeyDigest; + TPM_NONCE data; + BOOLEAN parentPCRStatus; + UINT32 PCRInfoSize; + UINT8 *PCRInfo; + UINT32 migrationAuthoritySize; + UINT8 *migrationAuthority; } TPM_CERTIFY_INFO2; /// /// Part 2, section 11.3 TPM_QUOTE_INFO Structure /// typedef struct tdTPM_QUOTE_INFO { - TPM_STRUCT_VER version; - UINT8 fixed[4]; - TPM_COMPOSITE_HASH digestValue; - TPM_NONCE externalData; + TPM_STRUCT_VER version; + UINT8 fixed[4]; + TPM_COMPOSITE_HASH digestValue; + TPM_NONCE externalData; } TPM_QUOTE_INFO; /// /// Part 2, section 11.4 TPM_QUOTE_INFO2 Structure /// typedef struct tdTPM_QUOTE_INFO2 { - TPM_STRUCTURE_TAG tag; - UINT8 fixed[4]; - TPM_NONCE externalData; - TPM_PCR_INFO_SHORT infoShort; + TPM_STRUCTURE_TAG tag; + UINT8 fixed[4]; + TPM_NONCE externalData; + TPM_PCR_INFO_SHORT infoShort; } TPM_QUOTE_INFO2; // @@ -1179,86 +1179,85 @@ typedef struct tdTPM_QUOTE_INFO2 { /// Part 2, section 12.1 TPM_EK_BLOB /// typedef struct tdTPM_EK_BLOB { - TPM_STRUCTURE_TAG tag; - TPM_EK_TYPE ekType; - UINT32 blobSize; - UINT8 *blob; + TPM_STRUCTURE_TAG tag; + TPM_EK_TYPE ekType; + UINT32 blobSize; + UINT8 *blob; } TPM_EK_BLOB; /// /// Part 2, section 12.2 TPM_EK_BLOB_ACTIVATE /// typedef struct tdTPM_EK_BLOB_ACTIVATE { - TPM_STRUCTURE_TAG tag; - TPM_SYMMETRIC_KEY sessionKey; - TPM_DIGEST idDigest; - TPM_PCR_INFO_SHORT pcrInfo; + TPM_STRUCTURE_TAG tag; + TPM_SYMMETRIC_KEY sessionKey; + TPM_DIGEST idDigest; + TPM_PCR_INFO_SHORT pcrInfo; } TPM_EK_BLOB_ACTIVATE; /// /// Part 2, section 12.3 TPM_EK_BLOB_AUTH /// typedef struct tdTPM_EK_BLOB_AUTH { - TPM_STRUCTURE_TAG tag; - TPM_SECRET authValue; + TPM_STRUCTURE_TAG tag; + TPM_SECRET authValue; } TPM_EK_BLOB_AUTH; - /// /// Part 2, section 12.5 TPM_IDENTITY_CONTENTS /// typedef struct tdTPM_IDENTITY_CONTENTS { - TPM_STRUCT_VER ver; - UINT32 ordinal; - TPM_CHOSENID_HASH labelPrivCADigest; - TPM_PUBKEY identityPubKey; + TPM_STRUCT_VER ver; + UINT32 ordinal; + TPM_CHOSENID_HASH labelPrivCADigest; + TPM_PUBKEY identityPubKey; } TPM_IDENTITY_CONTENTS; /// /// Part 2, section 12.6 TPM_IDENTITY_REQ /// typedef struct tdTPM_IDENTITY_REQ { - UINT32 asymSize; - UINT32 symSize; - TPM_KEY_PARMS asymAlgorithm; - TPM_KEY_PARMS symAlgorithm; - UINT8 *asymBlob; - UINT8 *symBlob; + UINT32 asymSize; + UINT32 symSize; + TPM_KEY_PARMS asymAlgorithm; + TPM_KEY_PARMS symAlgorithm; + UINT8 *asymBlob; + UINT8 *symBlob; } TPM_IDENTITY_REQ; /// /// Part 2, section 12.7 TPM_IDENTITY_PROOF /// typedef struct tdTPM_IDENTITY_PROOF { - TPM_STRUCT_VER ver; - UINT32 labelSize; - UINT32 identityBindingSize; - UINT32 endorsementSize; - UINT32 platformSize; - UINT32 conformanceSize; - TPM_PUBKEY identityKey; - UINT8 *labelArea; - UINT8 *identityBinding; - UINT8 *endorsementCredential; - UINT8 *platformCredential; - UINT8 *conformanceCredential; + TPM_STRUCT_VER ver; + UINT32 labelSize; + UINT32 identityBindingSize; + UINT32 endorsementSize; + UINT32 platformSize; + UINT32 conformanceSize; + TPM_PUBKEY identityKey; + UINT8 *labelArea; + UINT8 *identityBinding; + UINT8 *endorsementCredential; + UINT8 *platformCredential; + UINT8 *conformanceCredential; } TPM_IDENTITY_PROOF; /// /// Part 2, section 12.8 TPM_ASYM_CA_CONTENTS /// typedef struct tdTPM_ASYM_CA_CONTENTS { - TPM_SYMMETRIC_KEY sessionKey; - TPM_DIGEST idDigest; + TPM_SYMMETRIC_KEY sessionKey; + TPM_DIGEST idDigest; } TPM_ASYM_CA_CONTENTS; /// /// Part 2, section 12.9 TPM_SYM_CA_ATTESTATION /// typedef struct tdTPM_SYM_CA_ATTESTATION { - UINT32 credSize; - TPM_KEY_PARMS algorithm; - UINT8 *credential; + UINT32 credSize; + TPM_KEY_PARMS algorithm; + UINT8 *credential; } TPM_SYM_CA_ATTESTATION; /// @@ -1266,10 +1265,10 @@ typedef struct tdTPM_SYM_CA_ATTESTATION { /// Placed here out of order because definitions are used in section 13. /// typedef struct tdTPM_CURRENT_TICKS { - TPM_STRUCTURE_TAG tag; - UINT64 currentTicks; - UINT16 tickRate; - TPM_NONCE tickNonce; + TPM_STRUCTURE_TAG tag; + UINT64 currentTicks; + UINT16 tickRate; + TPM_NONCE tickNonce; } TPM_CURRENT_TICKS; /// @@ -1280,56 +1279,56 @@ typedef struct tdTPM_CURRENT_TICKS { /// Part 2, section 13.1: TPM _TRANSPORT_PUBLIC /// typedef struct tdTPM_TRANSPORT_PUBLIC { - TPM_STRUCTURE_TAG tag; - TPM_TRANSPORT_ATTRIBUTES transAttributes; - TPM_ALGORITHM_ID algId; - TPM_ENC_SCHEME encScheme; + TPM_STRUCTURE_TAG tag; + TPM_TRANSPORT_ATTRIBUTES transAttributes; + TPM_ALGORITHM_ID algId; + TPM_ENC_SCHEME encScheme; } TPM_TRANSPORT_PUBLIC; // // Part 2, section 13.1.1 TPM_TRANSPORT_ATTRIBUTES Definitions // -#define TPM_TRANSPORT_ENCRYPT ((UINT32)BIT0) -#define TPM_TRANSPORT_LOG ((UINT32)BIT1) -#define TPM_TRANSPORT_EXCLUSIVE ((UINT32)BIT2) +#define TPM_TRANSPORT_ENCRYPT ((UINT32)BIT0) +#define TPM_TRANSPORT_LOG ((UINT32)BIT1) +#define TPM_TRANSPORT_EXCLUSIVE ((UINT32)BIT2) /// /// Part 2, section 13.2 TPM_TRANSPORT_INTERNAL /// typedef struct tdTPM_TRANSPORT_INTERNAL { - TPM_STRUCTURE_TAG tag; - TPM_AUTHDATA authData; - TPM_TRANSPORT_PUBLIC transPublic; - TPM_TRANSHANDLE transHandle; - TPM_NONCE transNonceEven; - TPM_DIGEST transDigest; + TPM_STRUCTURE_TAG tag; + TPM_AUTHDATA authData; + TPM_TRANSPORT_PUBLIC transPublic; + TPM_TRANSHANDLE transHandle; + TPM_NONCE transNonceEven; + TPM_DIGEST transDigest; } TPM_TRANSPORT_INTERNAL; /// /// Part 2, section 13.3 TPM_TRANSPORT_LOG_IN structure /// typedef struct tdTPM_TRANSPORT_LOG_IN { - TPM_STRUCTURE_TAG tag; - TPM_DIGEST parameters; - TPM_DIGEST pubKeyHash; + TPM_STRUCTURE_TAG tag; + TPM_DIGEST parameters; + TPM_DIGEST pubKeyHash; } TPM_TRANSPORT_LOG_IN; /// /// Part 2, section 13.4 TPM_TRANSPORT_LOG_OUT structure /// typedef struct tdTPM_TRANSPORT_LOG_OUT { - TPM_STRUCTURE_TAG tag; - TPM_CURRENT_TICKS currentTicks; - TPM_DIGEST parameters; - TPM_MODIFIER_INDICATOR locality; + TPM_STRUCTURE_TAG tag; + TPM_CURRENT_TICKS currentTicks; + TPM_DIGEST parameters; + TPM_MODIFIER_INDICATOR locality; } TPM_TRANSPORT_LOG_OUT; /// /// Part 2, section 13.5 TPM_TRANSPORT_AUTH structure /// typedef struct tdTPM_TRANSPORT_AUTH { - TPM_STRUCTURE_TAG tag; - TPM_AUTHDATA authData; + TPM_STRUCTURE_TAG tag; + TPM_AUTHDATA authData; } TPM_TRANSPORT_AUTH; // @@ -1340,28 +1339,28 @@ typedef struct tdTPM_TRANSPORT_AUTH { /// Part 2, section 14.1 TPM_AUDIT_EVENT_IN structure /// typedef struct tdTPM_AUDIT_EVENT_IN { - TPM_STRUCTURE_TAG tag; - TPM_DIGEST inputParms; - TPM_COUNTER_VALUE auditCount; + TPM_STRUCTURE_TAG tag; + TPM_DIGEST inputParms; + TPM_COUNTER_VALUE auditCount; } TPM_AUDIT_EVENT_IN; /// /// Part 2, section 14.2 TPM_AUDIT_EVENT_OUT structure /// typedef struct tdTPM_AUDIT_EVENT_OUT { - TPM_STRUCTURE_TAG tag; - TPM_COMMAND_CODE ordinal; - TPM_DIGEST outputParms; - TPM_COUNTER_VALUE auditCount; - TPM_RESULT returnCode; + TPM_STRUCTURE_TAG tag; + TPM_COMMAND_CODE ordinal; + TPM_DIGEST outputParms; + TPM_COUNTER_VALUE auditCount; + TPM_RESULT returnCode; } TPM_AUDIT_EVENT_OUT; // // Part 2, section 16: Return Codes // -#define TPM_VENDOR_ERROR TPM_Vendor_Specific32 -#define TPM_NON_FATAL 0x00000800 +#define TPM_VENDOR_ERROR TPM_Vendor_Specific32 +#define TPM_NON_FATAL 0x00000800 #define TPM_SUCCESS ((TPM_RESULT) TPM_BASE) #define TPM_AUTHFAIL ((TPM_RESULT) (TPM_BASE + 1)) @@ -1463,10 +1462,10 @@ typedef struct tdTPM_AUDIT_EVENT_OUT { #define TPM_BAD_SIGNATURE ((TPM_RESULT) (TPM_BASE + 98)) #define TPM_NOCONTEXTSPACE ((TPM_RESULT) (TPM_BASE + 99)) -#define TPM_RETRY ((TPM_RESULT) (TPM_BASE + TPM_NON_FATAL)) -#define TPM_NEEDS_SELFTEST ((TPM_RESULT) (TPM_BASE + TPM_NON_FATAL + 1)) -#define TPM_DOING_SELFTEST ((TPM_RESULT) (TPM_BASE + TPM_NON_FATAL + 2)) -#define TPM_DEFEND_LOCK_RUNNING ((TPM_RESULT) (TPM_BASE + TPM_NON_FATAL + 3)) +#define TPM_RETRY ((TPM_RESULT) (TPM_BASE + TPM_NON_FATAL)) +#define TPM_NEEDS_SELFTEST ((TPM_RESULT) (TPM_BASE + TPM_NON_FATAL + 1)) +#define TPM_DOING_SELFTEST ((TPM_RESULT) (TPM_BASE + TPM_NON_FATAL + 2)) +#define TPM_DEFEND_LOCK_RUNNING ((TPM_RESULT) (TPM_BASE + TPM_NON_FATAL + 3)) // // Part 2, section 17: Ordinals @@ -1496,131 +1495,131 @@ typedef struct tdTPM_AUDIT_EVENT_OUT { // * All reserved area bits are set to 0. // -#define TPM_ORD_ActivateIdentity ((TPM_COMMAND_CODE) 0x0000007A) -#define TPM_ORD_AuthorizeMigrationKey ((TPM_COMMAND_CODE) 0x0000002B) -#define TPM_ORD_CertifyKey ((TPM_COMMAND_CODE) 0x00000032) -#define TPM_ORD_CertifyKey2 ((TPM_COMMAND_CODE) 0x00000033) -#define TPM_ORD_CertifySelfTest ((TPM_COMMAND_CODE) 0x00000052) -#define TPM_ORD_ChangeAuth ((TPM_COMMAND_CODE) 0x0000000C) -#define TPM_ORD_ChangeAuthAsymFinish ((TPM_COMMAND_CODE) 0x0000000F) -#define TPM_ORD_ChangeAuthAsymStart ((TPM_COMMAND_CODE) 0x0000000E) -#define TPM_ORD_ChangeAuthOwner ((TPM_COMMAND_CODE) 0x00000010) -#define TPM_ORD_CMK_ApproveMA ((TPM_COMMAND_CODE) 0x0000001D) -#define TPM_ORD_CMK_ConvertMigration ((TPM_COMMAND_CODE) 0x00000024) -#define TPM_ORD_CMK_CreateBlob ((TPM_COMMAND_CODE) 0x0000001B) -#define TPM_ORD_CMK_CreateKey ((TPM_COMMAND_CODE) 0x00000013) -#define TPM_ORD_CMK_CreateTicket ((TPM_COMMAND_CODE) 0x00000012) -#define TPM_ORD_CMK_SetRestrictions ((TPM_COMMAND_CODE) 0x0000001C) -#define TPM_ORD_ContinueSelfTest ((TPM_COMMAND_CODE) 0x00000053) -#define TPM_ORD_ConvertMigrationBlob ((TPM_COMMAND_CODE) 0x0000002A) -#define TPM_ORD_CreateCounter ((TPM_COMMAND_CODE) 0x000000DC) -#define TPM_ORD_CreateEndorsementKeyPair ((TPM_COMMAND_CODE) 0x00000078) -#define TPM_ORD_CreateMaintenanceArchive ((TPM_COMMAND_CODE) 0x0000002C) -#define TPM_ORD_CreateMigrationBlob ((TPM_COMMAND_CODE) 0x00000028) -#define TPM_ORD_CreateRevocableEK ((TPM_COMMAND_CODE) 0x0000007F) -#define TPM_ORD_CreateWrapKey ((TPM_COMMAND_CODE) 0x0000001F) -#define TPM_ORD_DAA_JOIN ((TPM_COMMAND_CODE) 0x00000029) -#define TPM_ORD_DAA_SIGN ((TPM_COMMAND_CODE) 0x00000031) -#define TPM_ORD_Delegate_CreateKeyDelegation ((TPM_COMMAND_CODE) 0x000000D4) -#define TPM_ORD_Delegate_CreateOwnerDelegation ((TPM_COMMAND_CODE) 0x000000D5) -#define TPM_ORD_Delegate_LoadOwnerDelegation ((TPM_COMMAND_CODE) 0x000000D8) -#define TPM_ORD_Delegate_Manage ((TPM_COMMAND_CODE) 0x000000D2) -#define TPM_ORD_Delegate_ReadTable ((TPM_COMMAND_CODE) 0x000000DB) -#define TPM_ORD_Delegate_UpdateVerification ((TPM_COMMAND_CODE) 0x000000D1) -#define TPM_ORD_Delegate_VerifyDelegation ((TPM_COMMAND_CODE) 0x000000D6) -#define TPM_ORD_DirRead ((TPM_COMMAND_CODE) 0x0000001A) -#define TPM_ORD_DirWriteAuth ((TPM_COMMAND_CODE) 0x00000019) -#define TPM_ORD_DisableForceClear ((TPM_COMMAND_CODE) 0x0000005E) -#define TPM_ORD_DisableOwnerClear ((TPM_COMMAND_CODE) 0x0000005C) -#define TPM_ORD_DisablePubekRead ((TPM_COMMAND_CODE) 0x0000007E) -#define TPM_ORD_DSAP ((TPM_COMMAND_CODE) 0x00000011) -#define TPM_ORD_EstablishTransport ((TPM_COMMAND_CODE) 0x000000E6) -#define TPM_ORD_EvictKey ((TPM_COMMAND_CODE) 0x00000022) -#define TPM_ORD_ExecuteTransport ((TPM_COMMAND_CODE) 0x000000E7) -#define TPM_ORD_Extend ((TPM_COMMAND_CODE) 0x00000014) -#define TPM_ORD_FieldUpgrade ((TPM_COMMAND_CODE) 0x000000AA) -#define TPM_ORD_FlushSpecific ((TPM_COMMAND_CODE) 0x000000BA) -#define TPM_ORD_ForceClear ((TPM_COMMAND_CODE) 0x0000005D) -#define TPM_ORD_GetAuditDigest ((TPM_COMMAND_CODE) 0x00000085) -#define TPM_ORD_GetAuditDigestSigned ((TPM_COMMAND_CODE) 0x00000086) -#define TPM_ORD_GetAuditEvent ((TPM_COMMAND_CODE) 0x00000082) -#define TPM_ORD_GetAuditEventSigned ((TPM_COMMAND_CODE) 0x00000083) -#define TPM_ORD_GetCapability ((TPM_COMMAND_CODE) 0x00000065) -#define TPM_ORD_GetCapabilityOwner ((TPM_COMMAND_CODE) 0x00000066) -#define TPM_ORD_GetCapabilitySigned ((TPM_COMMAND_CODE) 0x00000064) -#define TPM_ORD_GetOrdinalAuditStatus ((TPM_COMMAND_CODE) 0x0000008C) -#define TPM_ORD_GetPubKey ((TPM_COMMAND_CODE) 0x00000021) -#define TPM_ORD_GetRandom ((TPM_COMMAND_CODE) 0x00000046) -#define TPM_ORD_GetTestResult ((TPM_COMMAND_CODE) 0x00000054) -#define TPM_ORD_GetTicks ((TPM_COMMAND_CODE) 0x000000F1) -#define TPM_ORD_IncrementCounter ((TPM_COMMAND_CODE) 0x000000DD) -#define TPM_ORD_Init ((TPM_COMMAND_CODE) 0x00000097) -#define TPM_ORD_KeyControlOwner ((TPM_COMMAND_CODE) 0x00000023) -#define TPM_ORD_KillMaintenanceFeature ((TPM_COMMAND_CODE) 0x0000002E) -#define TPM_ORD_LoadAuthContext ((TPM_COMMAND_CODE) 0x000000B7) -#define TPM_ORD_LoadContext ((TPM_COMMAND_CODE) 0x000000B9) -#define TPM_ORD_LoadKey ((TPM_COMMAND_CODE) 0x00000020) -#define TPM_ORD_LoadKey2 ((TPM_COMMAND_CODE) 0x00000041) -#define TPM_ORD_LoadKeyContext ((TPM_COMMAND_CODE) 0x000000B5) -#define TPM_ORD_LoadMaintenanceArchive ((TPM_COMMAND_CODE) 0x0000002D) -#define TPM_ORD_LoadManuMaintPub ((TPM_COMMAND_CODE) 0x0000002F) -#define TPM_ORD_MakeIdentity ((TPM_COMMAND_CODE) 0x00000079) -#define TPM_ORD_MigrateKey ((TPM_COMMAND_CODE) 0x00000025) -#define TPM_ORD_NV_DefineSpace ((TPM_COMMAND_CODE) 0x000000CC) -#define TPM_ORD_NV_ReadValue ((TPM_COMMAND_CODE) 0x000000CF) -#define TPM_ORD_NV_ReadValueAuth ((TPM_COMMAND_CODE) 0x000000D0) -#define TPM_ORD_NV_WriteValue ((TPM_COMMAND_CODE) 0x000000CD) -#define TPM_ORD_NV_WriteValueAuth ((TPM_COMMAND_CODE) 0x000000CE) -#define TPM_ORD_OIAP ((TPM_COMMAND_CODE) 0x0000000A) -#define TPM_ORD_OSAP ((TPM_COMMAND_CODE) 0x0000000B) -#define TPM_ORD_OwnerClear ((TPM_COMMAND_CODE) 0x0000005B) -#define TPM_ORD_OwnerReadInternalPub ((TPM_COMMAND_CODE) 0x00000081) -#define TPM_ORD_OwnerReadPubek ((TPM_COMMAND_CODE) 0x0000007D) -#define TPM_ORD_OwnerSetDisable ((TPM_COMMAND_CODE) 0x0000006E) -#define TPM_ORD_PCR_Reset ((TPM_COMMAND_CODE) 0x000000C8) -#define TPM_ORD_PcrRead ((TPM_COMMAND_CODE) 0x00000015) -#define TPM_ORD_PhysicalDisable ((TPM_COMMAND_CODE) 0x00000070) -#define TPM_ORD_PhysicalEnable ((TPM_COMMAND_CODE) 0x0000006F) -#define TPM_ORD_PhysicalSetDeactivated ((TPM_COMMAND_CODE) 0x00000072) -#define TPM_ORD_Quote ((TPM_COMMAND_CODE) 0x00000016) -#define TPM_ORD_Quote2 ((TPM_COMMAND_CODE) 0x0000003E) -#define TPM_ORD_ReadCounter ((TPM_COMMAND_CODE) 0x000000DE) -#define TPM_ORD_ReadManuMaintPub ((TPM_COMMAND_CODE) 0x00000030) -#define TPM_ORD_ReadPubek ((TPM_COMMAND_CODE) 0x0000007C) -#define TPM_ORD_ReleaseCounter ((TPM_COMMAND_CODE) 0x000000DF) -#define TPM_ORD_ReleaseCounterOwner ((TPM_COMMAND_CODE) 0x000000E0) -#define TPM_ORD_ReleaseTransportSigned ((TPM_COMMAND_CODE) 0x000000E8) -#define TPM_ORD_Reset ((TPM_COMMAND_CODE) 0x0000005A) -#define TPM_ORD_ResetLockValue ((TPM_COMMAND_CODE) 0x00000040) -#define TPM_ORD_RevokeTrust ((TPM_COMMAND_CODE) 0x00000080) -#define TPM_ORD_SaveAuthContext ((TPM_COMMAND_CODE) 0x000000B6) -#define TPM_ORD_SaveContext ((TPM_COMMAND_CODE) 0x000000B8) -#define TPM_ORD_SaveKeyContext ((TPM_COMMAND_CODE) 0x000000B4) -#define TPM_ORD_SaveState ((TPM_COMMAND_CODE) 0x00000098) -#define TPM_ORD_Seal ((TPM_COMMAND_CODE) 0x00000017) -#define TPM_ORD_Sealx ((TPM_COMMAND_CODE) 0x0000003D) -#define TPM_ORD_SelfTestFull ((TPM_COMMAND_CODE) 0x00000050) -#define TPM_ORD_SetCapability ((TPM_COMMAND_CODE) 0x0000003F) -#define TPM_ORD_SetOperatorAuth ((TPM_COMMAND_CODE) 0x00000074) -#define TPM_ORD_SetOrdinalAuditStatus ((TPM_COMMAND_CODE) 0x0000008D) -#define TPM_ORD_SetOwnerInstall ((TPM_COMMAND_CODE) 0x00000071) -#define TPM_ORD_SetOwnerPointer ((TPM_COMMAND_CODE) 0x00000075) -#define TPM_ORD_SetRedirection ((TPM_COMMAND_CODE) 0x0000009A) -#define TPM_ORD_SetTempDeactivated ((TPM_COMMAND_CODE) 0x00000073) -#define TPM_ORD_SHA1Complete ((TPM_COMMAND_CODE) 0x000000A2) -#define TPM_ORD_SHA1CompleteExtend ((TPM_COMMAND_CODE) 0x000000A3) -#define TPM_ORD_SHA1Start ((TPM_COMMAND_CODE) 0x000000A0) -#define TPM_ORD_SHA1Update ((TPM_COMMAND_CODE) 0x000000A1) -#define TPM_ORD_Sign ((TPM_COMMAND_CODE) 0x0000003C) -#define TPM_ORD_Startup ((TPM_COMMAND_CODE) 0x00000099) -#define TPM_ORD_StirRandom ((TPM_COMMAND_CODE) 0x00000047) -#define TPM_ORD_TakeOwnership ((TPM_COMMAND_CODE) 0x0000000D) -#define TPM_ORD_Terminate_Handle ((TPM_COMMAND_CODE) 0x00000096) -#define TPM_ORD_TickStampBlob ((TPM_COMMAND_CODE) 0x000000F2) -#define TPM_ORD_UnBind ((TPM_COMMAND_CODE) 0x0000001E) -#define TPM_ORD_Unseal ((TPM_COMMAND_CODE) 0x00000018) -#define TSC_ORD_PhysicalPresence ((TPM_COMMAND_CODE) 0x4000000A) -#define TSC_ORD_ResetEstablishmentBit ((TPM_COMMAND_CODE) 0x4000000B) +#define TPM_ORD_ActivateIdentity ((TPM_COMMAND_CODE) 0x0000007A) +#define TPM_ORD_AuthorizeMigrationKey ((TPM_COMMAND_CODE) 0x0000002B) +#define TPM_ORD_CertifyKey ((TPM_COMMAND_CODE) 0x00000032) +#define TPM_ORD_CertifyKey2 ((TPM_COMMAND_CODE) 0x00000033) +#define TPM_ORD_CertifySelfTest ((TPM_COMMAND_CODE) 0x00000052) +#define TPM_ORD_ChangeAuth ((TPM_COMMAND_CODE) 0x0000000C) +#define TPM_ORD_ChangeAuthAsymFinish ((TPM_COMMAND_CODE) 0x0000000F) +#define TPM_ORD_ChangeAuthAsymStart ((TPM_COMMAND_CODE) 0x0000000E) +#define TPM_ORD_ChangeAuthOwner ((TPM_COMMAND_CODE) 0x00000010) +#define TPM_ORD_CMK_ApproveMA ((TPM_COMMAND_CODE) 0x0000001D) +#define TPM_ORD_CMK_ConvertMigration ((TPM_COMMAND_CODE) 0x00000024) +#define TPM_ORD_CMK_CreateBlob ((TPM_COMMAND_CODE) 0x0000001B) +#define TPM_ORD_CMK_CreateKey ((TPM_COMMAND_CODE) 0x00000013) +#define TPM_ORD_CMK_CreateTicket ((TPM_COMMAND_CODE) 0x00000012) +#define TPM_ORD_CMK_SetRestrictions ((TPM_COMMAND_CODE) 0x0000001C) +#define TPM_ORD_ContinueSelfTest ((TPM_COMMAND_CODE) 0x00000053) +#define TPM_ORD_ConvertMigrationBlob ((TPM_COMMAND_CODE) 0x0000002A) +#define TPM_ORD_CreateCounter ((TPM_COMMAND_CODE) 0x000000DC) +#define TPM_ORD_CreateEndorsementKeyPair ((TPM_COMMAND_CODE) 0x00000078) +#define TPM_ORD_CreateMaintenanceArchive ((TPM_COMMAND_CODE) 0x0000002C) +#define TPM_ORD_CreateMigrationBlob ((TPM_COMMAND_CODE) 0x00000028) +#define TPM_ORD_CreateRevocableEK ((TPM_COMMAND_CODE) 0x0000007F) +#define TPM_ORD_CreateWrapKey ((TPM_COMMAND_CODE) 0x0000001F) +#define TPM_ORD_DAA_JOIN ((TPM_COMMAND_CODE) 0x00000029) +#define TPM_ORD_DAA_SIGN ((TPM_COMMAND_CODE) 0x00000031) +#define TPM_ORD_Delegate_CreateKeyDelegation ((TPM_COMMAND_CODE) 0x000000D4) +#define TPM_ORD_Delegate_CreateOwnerDelegation ((TPM_COMMAND_CODE) 0x000000D5) +#define TPM_ORD_Delegate_LoadOwnerDelegation ((TPM_COMMAND_CODE) 0x000000D8) +#define TPM_ORD_Delegate_Manage ((TPM_COMMAND_CODE) 0x000000D2) +#define TPM_ORD_Delegate_ReadTable ((TPM_COMMAND_CODE) 0x000000DB) +#define TPM_ORD_Delegate_UpdateVerification ((TPM_COMMAND_CODE) 0x000000D1) +#define TPM_ORD_Delegate_VerifyDelegation ((TPM_COMMAND_CODE) 0x000000D6) +#define TPM_ORD_DirRead ((TPM_COMMAND_CODE) 0x0000001A) +#define TPM_ORD_DirWriteAuth ((TPM_COMMAND_CODE) 0x00000019) +#define TPM_ORD_DisableForceClear ((TPM_COMMAND_CODE) 0x0000005E) +#define TPM_ORD_DisableOwnerClear ((TPM_COMMAND_CODE) 0x0000005C) +#define TPM_ORD_DisablePubekRead ((TPM_COMMAND_CODE) 0x0000007E) +#define TPM_ORD_DSAP ((TPM_COMMAND_CODE) 0x00000011) +#define TPM_ORD_EstablishTransport ((TPM_COMMAND_CODE) 0x000000E6) +#define TPM_ORD_EvictKey ((TPM_COMMAND_CODE) 0x00000022) +#define TPM_ORD_ExecuteTransport ((TPM_COMMAND_CODE) 0x000000E7) +#define TPM_ORD_Extend ((TPM_COMMAND_CODE) 0x00000014) +#define TPM_ORD_FieldUpgrade ((TPM_COMMAND_CODE) 0x000000AA) +#define TPM_ORD_FlushSpecific ((TPM_COMMAND_CODE) 0x000000BA) +#define TPM_ORD_ForceClear ((TPM_COMMAND_CODE) 0x0000005D) +#define TPM_ORD_GetAuditDigest ((TPM_COMMAND_CODE) 0x00000085) +#define TPM_ORD_GetAuditDigestSigned ((TPM_COMMAND_CODE) 0x00000086) +#define TPM_ORD_GetAuditEvent ((TPM_COMMAND_CODE) 0x00000082) +#define TPM_ORD_GetAuditEventSigned ((TPM_COMMAND_CODE) 0x00000083) +#define TPM_ORD_GetCapability ((TPM_COMMAND_CODE) 0x00000065) +#define TPM_ORD_GetCapabilityOwner ((TPM_COMMAND_CODE) 0x00000066) +#define TPM_ORD_GetCapabilitySigned ((TPM_COMMAND_CODE) 0x00000064) +#define TPM_ORD_GetOrdinalAuditStatus ((TPM_COMMAND_CODE) 0x0000008C) +#define TPM_ORD_GetPubKey ((TPM_COMMAND_CODE) 0x00000021) +#define TPM_ORD_GetRandom ((TPM_COMMAND_CODE) 0x00000046) +#define TPM_ORD_GetTestResult ((TPM_COMMAND_CODE) 0x00000054) +#define TPM_ORD_GetTicks ((TPM_COMMAND_CODE) 0x000000F1) +#define TPM_ORD_IncrementCounter ((TPM_COMMAND_CODE) 0x000000DD) +#define TPM_ORD_Init ((TPM_COMMAND_CODE) 0x00000097) +#define TPM_ORD_KeyControlOwner ((TPM_COMMAND_CODE) 0x00000023) +#define TPM_ORD_KillMaintenanceFeature ((TPM_COMMAND_CODE) 0x0000002E) +#define TPM_ORD_LoadAuthContext ((TPM_COMMAND_CODE) 0x000000B7) +#define TPM_ORD_LoadContext ((TPM_COMMAND_CODE) 0x000000B9) +#define TPM_ORD_LoadKey ((TPM_COMMAND_CODE) 0x00000020) +#define TPM_ORD_LoadKey2 ((TPM_COMMAND_CODE) 0x00000041) +#define TPM_ORD_LoadKeyContext ((TPM_COMMAND_CODE) 0x000000B5) +#define TPM_ORD_LoadMaintenanceArchive ((TPM_COMMAND_CODE) 0x0000002D) +#define TPM_ORD_LoadManuMaintPub ((TPM_COMMAND_CODE) 0x0000002F) +#define TPM_ORD_MakeIdentity ((TPM_COMMAND_CODE) 0x00000079) +#define TPM_ORD_MigrateKey ((TPM_COMMAND_CODE) 0x00000025) +#define TPM_ORD_NV_DefineSpace ((TPM_COMMAND_CODE) 0x000000CC) +#define TPM_ORD_NV_ReadValue ((TPM_COMMAND_CODE) 0x000000CF) +#define TPM_ORD_NV_ReadValueAuth ((TPM_COMMAND_CODE) 0x000000D0) +#define TPM_ORD_NV_WriteValue ((TPM_COMMAND_CODE) 0x000000CD) +#define TPM_ORD_NV_WriteValueAuth ((TPM_COMMAND_CODE) 0x000000CE) +#define TPM_ORD_OIAP ((TPM_COMMAND_CODE) 0x0000000A) +#define TPM_ORD_OSAP ((TPM_COMMAND_CODE) 0x0000000B) +#define TPM_ORD_OwnerClear ((TPM_COMMAND_CODE) 0x0000005B) +#define TPM_ORD_OwnerReadInternalPub ((TPM_COMMAND_CODE) 0x00000081) +#define TPM_ORD_OwnerReadPubek ((TPM_COMMAND_CODE) 0x0000007D) +#define TPM_ORD_OwnerSetDisable ((TPM_COMMAND_CODE) 0x0000006E) +#define TPM_ORD_PCR_Reset ((TPM_COMMAND_CODE) 0x000000C8) +#define TPM_ORD_PcrRead ((TPM_COMMAND_CODE) 0x00000015) +#define TPM_ORD_PhysicalDisable ((TPM_COMMAND_CODE) 0x00000070) +#define TPM_ORD_PhysicalEnable ((TPM_COMMAND_CODE) 0x0000006F) +#define TPM_ORD_PhysicalSetDeactivated ((TPM_COMMAND_CODE) 0x00000072) +#define TPM_ORD_Quote ((TPM_COMMAND_CODE) 0x00000016) +#define TPM_ORD_Quote2 ((TPM_COMMAND_CODE) 0x0000003E) +#define TPM_ORD_ReadCounter ((TPM_COMMAND_CODE) 0x000000DE) +#define TPM_ORD_ReadManuMaintPub ((TPM_COMMAND_CODE) 0x00000030) +#define TPM_ORD_ReadPubek ((TPM_COMMAND_CODE) 0x0000007C) +#define TPM_ORD_ReleaseCounter ((TPM_COMMAND_CODE) 0x000000DF) +#define TPM_ORD_ReleaseCounterOwner ((TPM_COMMAND_CODE) 0x000000E0) +#define TPM_ORD_ReleaseTransportSigned ((TPM_COMMAND_CODE) 0x000000E8) +#define TPM_ORD_Reset ((TPM_COMMAND_CODE) 0x0000005A) +#define TPM_ORD_ResetLockValue ((TPM_COMMAND_CODE) 0x00000040) +#define TPM_ORD_RevokeTrust ((TPM_COMMAND_CODE) 0x00000080) +#define TPM_ORD_SaveAuthContext ((TPM_COMMAND_CODE) 0x000000B6) +#define TPM_ORD_SaveContext ((TPM_COMMAND_CODE) 0x000000B8) +#define TPM_ORD_SaveKeyContext ((TPM_COMMAND_CODE) 0x000000B4) +#define TPM_ORD_SaveState ((TPM_COMMAND_CODE) 0x00000098) +#define TPM_ORD_Seal ((TPM_COMMAND_CODE) 0x00000017) +#define TPM_ORD_Sealx ((TPM_COMMAND_CODE) 0x0000003D) +#define TPM_ORD_SelfTestFull ((TPM_COMMAND_CODE) 0x00000050) +#define TPM_ORD_SetCapability ((TPM_COMMAND_CODE) 0x0000003F) +#define TPM_ORD_SetOperatorAuth ((TPM_COMMAND_CODE) 0x00000074) +#define TPM_ORD_SetOrdinalAuditStatus ((TPM_COMMAND_CODE) 0x0000008D) +#define TPM_ORD_SetOwnerInstall ((TPM_COMMAND_CODE) 0x00000071) +#define TPM_ORD_SetOwnerPointer ((TPM_COMMAND_CODE) 0x00000075) +#define TPM_ORD_SetRedirection ((TPM_COMMAND_CODE) 0x0000009A) +#define TPM_ORD_SetTempDeactivated ((TPM_COMMAND_CODE) 0x00000073) +#define TPM_ORD_SHA1Complete ((TPM_COMMAND_CODE) 0x000000A2) +#define TPM_ORD_SHA1CompleteExtend ((TPM_COMMAND_CODE) 0x000000A3) +#define TPM_ORD_SHA1Start ((TPM_COMMAND_CODE) 0x000000A0) +#define TPM_ORD_SHA1Update ((TPM_COMMAND_CODE) 0x000000A1) +#define TPM_ORD_Sign ((TPM_COMMAND_CODE) 0x0000003C) +#define TPM_ORD_Startup ((TPM_COMMAND_CODE) 0x00000099) +#define TPM_ORD_StirRandom ((TPM_COMMAND_CODE) 0x00000047) +#define TPM_ORD_TakeOwnership ((TPM_COMMAND_CODE) 0x0000000D) +#define TPM_ORD_Terminate_Handle ((TPM_COMMAND_CODE) 0x00000096) +#define TPM_ORD_TickStampBlob ((TPM_COMMAND_CODE) 0x000000F2) +#define TPM_ORD_UnBind ((TPM_COMMAND_CODE) 0x0000001E) +#define TPM_ORD_Unseal ((TPM_COMMAND_CODE) 0x00000018) +#define TSC_ORD_PhysicalPresence ((TPM_COMMAND_CODE) 0x4000000A) +#define TSC_ORD_ResetEstablishmentBit ((TPM_COMMAND_CODE) 0x4000000B) // // Part 2, section 18: Context structures @@ -1630,26 +1629,26 @@ typedef struct tdTPM_AUDIT_EVENT_OUT { /// Part 2, section 18.1: TPM_CONTEXT_BLOB /// typedef struct tdTPM_CONTEXT_BLOB { - TPM_STRUCTURE_TAG tag; - TPM_RESOURCE_TYPE resourceType; - TPM_HANDLE handle; - UINT8 label[16]; - UINT32 contextCount; - TPM_DIGEST integrityDigest; - UINT32 additionalSize; - UINT8 *additionalData; - UINT32 sensitiveSize; - UINT8 *sensitiveData; + TPM_STRUCTURE_TAG tag; + TPM_RESOURCE_TYPE resourceType; + TPM_HANDLE handle; + UINT8 label[16]; + UINT32 contextCount; + TPM_DIGEST integrityDigest; + UINT32 additionalSize; + UINT8 *additionalData; + UINT32 sensitiveSize; + UINT8 *sensitiveData; } TPM_CONTEXT_BLOB; /// /// Part 2, section 18.2 TPM_CONTEXT_SENSITIVE /// typedef struct tdTPM_CONTEXT_SENSITIVE { - TPM_STRUCTURE_TAG tag; - TPM_NONCE contextNonce; - UINT32 internalSize; - UINT8 *internalData; + TPM_STRUCTURE_TAG tag; + TPM_NONCE contextNonce; + UINT32 internalSize; + UINT8 *internalData; } TPM_CONTEXT_SENSITIVE; // @@ -1659,382 +1658,382 @@ typedef struct tdTPM_CONTEXT_SENSITIVE { // // Part 2, section 19.1.1: Required TPM_NV_INDEX values // -#define TPM_NV_INDEX_LOCK ((UINT32)0xffffffff) -#define TPM_NV_INDEX0 ((UINT32)0x00000000) -#define TPM_NV_INDEX_DIR ((UINT32)0x10000001) -#define TPM_NV_INDEX_EKCert ((UINT32)0x0000f000) -#define TPM_NV_INDEX_TPM_CC ((UINT32)0x0000f001) -#define TPM_NV_INDEX_PlatformCert ((UINT32)0x0000f002) -#define TPM_NV_INDEX_Platform_CC ((UINT32)0x0000f003) +#define TPM_NV_INDEX_LOCK ((UINT32)0xffffffff) +#define TPM_NV_INDEX0 ((UINT32)0x00000000) +#define TPM_NV_INDEX_DIR ((UINT32)0x10000001) +#define TPM_NV_INDEX_EKCert ((UINT32)0x0000f000) +#define TPM_NV_INDEX_TPM_CC ((UINT32)0x0000f001) +#define TPM_NV_INDEX_PlatformCert ((UINT32)0x0000f002) +#define TPM_NV_INDEX_Platform_CC ((UINT32)0x0000f003) // // Part 2, section 19.1.2: Reserved Index values // -#define TPM_NV_INDEX_TSS_BASE ((UINT32)0x00011100) -#define TPM_NV_INDEX_PC_BASE ((UINT32)0x00011200) -#define TPM_NV_INDEX_SERVER_BASE ((UINT32)0x00011300) -#define TPM_NV_INDEX_MOBILE_BASE ((UINT32)0x00011400) -#define TPM_NV_INDEX_PERIPHERAL_BASE ((UINT32)0x00011500) -#define TPM_NV_INDEX_GROUP_RESV_BASE ((UINT32)0x00010000) +#define TPM_NV_INDEX_TSS_BASE ((UINT32)0x00011100) +#define TPM_NV_INDEX_PC_BASE ((UINT32)0x00011200) +#define TPM_NV_INDEX_SERVER_BASE ((UINT32)0x00011300) +#define TPM_NV_INDEX_MOBILE_BASE ((UINT32)0x00011400) +#define TPM_NV_INDEX_PERIPHERAL_BASE ((UINT32)0x00011500) +#define TPM_NV_INDEX_GROUP_RESV_BASE ((UINT32)0x00010000) /// /// Part 2, section 19.2: TPM_NV_ATTRIBUTES /// typedef struct tdTPM_NV_ATTRIBUTES { - TPM_STRUCTURE_TAG tag; - UINT32 attributes; + TPM_STRUCTURE_TAG tag; + UINT32 attributes; } TPM_NV_ATTRIBUTES; -#define TPM_NV_PER_READ_STCLEAR (BIT31) -#define TPM_NV_PER_AUTHREAD (BIT18) -#define TPM_NV_PER_OWNERREAD (BIT17) -#define TPM_NV_PER_PPREAD (BIT16) -#define TPM_NV_PER_GLOBALLOCK (BIT15) -#define TPM_NV_PER_WRITE_STCLEAR (BIT14) -#define TPM_NV_PER_WRITEDEFINE (BIT13) -#define TPM_NV_PER_WRITEALL (BIT12) -#define TPM_NV_PER_AUTHWRITE (BIT2) -#define TPM_NV_PER_OWNERWRITE (BIT1) -#define TPM_NV_PER_PPWRITE (BIT0) +#define TPM_NV_PER_READ_STCLEAR (BIT31) +#define TPM_NV_PER_AUTHREAD (BIT18) +#define TPM_NV_PER_OWNERREAD (BIT17) +#define TPM_NV_PER_PPREAD (BIT16) +#define TPM_NV_PER_GLOBALLOCK (BIT15) +#define TPM_NV_PER_WRITE_STCLEAR (BIT14) +#define TPM_NV_PER_WRITEDEFINE (BIT13) +#define TPM_NV_PER_WRITEALL (BIT12) +#define TPM_NV_PER_AUTHWRITE (BIT2) +#define TPM_NV_PER_OWNERWRITE (BIT1) +#define TPM_NV_PER_PPWRITE (BIT0) /// /// Part 2, section 19.3: TPM_NV_DATA_PUBLIC /// typedef struct tdTPM_NV_DATA_PUBLIC { - TPM_STRUCTURE_TAG tag; - TPM_NV_INDEX nvIndex; - TPM_PCR_INFO_SHORT pcrInfoRead; - TPM_PCR_INFO_SHORT pcrInfoWrite; - TPM_NV_ATTRIBUTES permission; - BOOLEAN bReadSTClear; - BOOLEAN bWriteSTClear; - BOOLEAN bWriteDefine; - UINT32 dataSize; + TPM_STRUCTURE_TAG tag; + TPM_NV_INDEX nvIndex; + TPM_PCR_INFO_SHORT pcrInfoRead; + TPM_PCR_INFO_SHORT pcrInfoWrite; + TPM_NV_ATTRIBUTES permission; + BOOLEAN bReadSTClear; + BOOLEAN bWriteSTClear; + BOOLEAN bWriteDefine; + UINT32 dataSize; } TPM_NV_DATA_PUBLIC; // // Part 2, section 20: Delegate Structures // -#define TPM_DEL_OWNER_BITS ((UINT32)0x00000001) -#define TPM_DEL_KEY_BITS ((UINT32)0x00000002) +#define TPM_DEL_OWNER_BITS ((UINT32)0x00000001) +#define TPM_DEL_KEY_BITS ((UINT32)0x00000002) /// /// Part 2, section 20.2: Delegate Definitions /// typedef struct tdTPM_DELEGATIONS { - TPM_STRUCTURE_TAG tag; - UINT32 delegateType; - UINT32 per1; - UINT32 per2; + TPM_STRUCTURE_TAG tag; + UINT32 delegateType; + UINT32 per1; + UINT32 per2; } TPM_DELEGATIONS; // // Part 2, section 20.2.1: Owner Permission Settings // -#define TPM_DELEGATE_SetOrdinalAuditStatus (BIT30) -#define TPM_DELEGATE_DirWriteAuth (BIT29) -#define TPM_DELEGATE_CMK_ApproveMA (BIT28) -#define TPM_DELEGATE_NV_WriteValue (BIT27) -#define TPM_DELEGATE_CMK_CreateTicket (BIT26) -#define TPM_DELEGATE_NV_ReadValue (BIT25) -#define TPM_DELEGATE_Delegate_LoadOwnerDelegation (BIT24) -#define TPM_DELEGATE_DAA_Join (BIT23) -#define TPM_DELEGATE_AuthorizeMigrationKey (BIT22) -#define TPM_DELEGATE_CreateMaintenanceArchive (BIT21) -#define TPM_DELEGATE_LoadMaintenanceArchive (BIT20) -#define TPM_DELEGATE_KillMaintenanceFeature (BIT19) -#define TPM_DELEGATE_OwnerReadInteralPub (BIT18) -#define TPM_DELEGATE_ResetLockValue (BIT17) -#define TPM_DELEGATE_OwnerClear (BIT16) -#define TPM_DELEGATE_DisableOwnerClear (BIT15) -#define TPM_DELEGATE_NV_DefineSpace (BIT14) -#define TPM_DELEGATE_OwnerSetDisable (BIT13) -#define TPM_DELEGATE_SetCapability (BIT12) -#define TPM_DELEGATE_MakeIdentity (BIT11) -#define TPM_DELEGATE_ActivateIdentity (BIT10) -#define TPM_DELEGATE_OwnerReadPubek (BIT9) -#define TPM_DELEGATE_DisablePubekRead (BIT8) -#define TPM_DELEGATE_SetRedirection (BIT7) -#define TPM_DELEGATE_FieldUpgrade (BIT6) -#define TPM_DELEGATE_Delegate_UpdateVerification (BIT5) -#define TPM_DELEGATE_CreateCounter (BIT4) -#define TPM_DELEGATE_ReleaseCounterOwner (BIT3) -#define TPM_DELEGATE_DelegateManage (BIT2) -#define TPM_DELEGATE_Delegate_CreateOwnerDelegation (BIT1) -#define TPM_DELEGATE_DAA_Sign (BIT0) +#define TPM_DELEGATE_SetOrdinalAuditStatus (BIT30) +#define TPM_DELEGATE_DirWriteAuth (BIT29) +#define TPM_DELEGATE_CMK_ApproveMA (BIT28) +#define TPM_DELEGATE_NV_WriteValue (BIT27) +#define TPM_DELEGATE_CMK_CreateTicket (BIT26) +#define TPM_DELEGATE_NV_ReadValue (BIT25) +#define TPM_DELEGATE_Delegate_LoadOwnerDelegation (BIT24) +#define TPM_DELEGATE_DAA_Join (BIT23) +#define TPM_DELEGATE_AuthorizeMigrationKey (BIT22) +#define TPM_DELEGATE_CreateMaintenanceArchive (BIT21) +#define TPM_DELEGATE_LoadMaintenanceArchive (BIT20) +#define TPM_DELEGATE_KillMaintenanceFeature (BIT19) +#define TPM_DELEGATE_OwnerReadInteralPub (BIT18) +#define TPM_DELEGATE_ResetLockValue (BIT17) +#define TPM_DELEGATE_OwnerClear (BIT16) +#define TPM_DELEGATE_DisableOwnerClear (BIT15) +#define TPM_DELEGATE_NV_DefineSpace (BIT14) +#define TPM_DELEGATE_OwnerSetDisable (BIT13) +#define TPM_DELEGATE_SetCapability (BIT12) +#define TPM_DELEGATE_MakeIdentity (BIT11) +#define TPM_DELEGATE_ActivateIdentity (BIT10) +#define TPM_DELEGATE_OwnerReadPubek (BIT9) +#define TPM_DELEGATE_DisablePubekRead (BIT8) +#define TPM_DELEGATE_SetRedirection (BIT7) +#define TPM_DELEGATE_FieldUpgrade (BIT6) +#define TPM_DELEGATE_Delegate_UpdateVerification (BIT5) +#define TPM_DELEGATE_CreateCounter (BIT4) +#define TPM_DELEGATE_ReleaseCounterOwner (BIT3) +#define TPM_DELEGATE_DelegateManage (BIT2) +#define TPM_DELEGATE_Delegate_CreateOwnerDelegation (BIT1) +#define TPM_DELEGATE_DAA_Sign (BIT0) // // Part 2, section 20.2.3: Key Permission settings // -#define TPM_KEY_DELEGATE_CMK_ConvertMigration (BIT28) -#define TPM_KEY_DELEGATE_TickStampBlob (BIT27) -#define TPM_KEY_DELEGATE_ChangeAuthAsymStart (BIT26) -#define TPM_KEY_DELEGATE_ChangeAuthAsymFinish (BIT25) -#define TPM_KEY_DELEGATE_CMK_CreateKey (BIT24) -#define TPM_KEY_DELEGATE_MigrateKey (BIT23) -#define TPM_KEY_DELEGATE_LoadKey2 (BIT22) -#define TPM_KEY_DELEGATE_EstablishTransport (BIT21) -#define TPM_KEY_DELEGATE_ReleaseTransportSigned (BIT20) -#define TPM_KEY_DELEGATE_Quote2 (BIT19) -#define TPM_KEY_DELEGATE_Sealx (BIT18) -#define TPM_KEY_DELEGATE_MakeIdentity (BIT17) -#define TPM_KEY_DELEGATE_ActivateIdentity (BIT16) -#define TPM_KEY_DELEGATE_GetAuditDigestSigned (BIT15) -#define TPM_KEY_DELEGATE_Sign (BIT14) -#define TPM_KEY_DELEGATE_CertifyKey2 (BIT13) -#define TPM_KEY_DELEGATE_CertifyKey (BIT12) -#define TPM_KEY_DELEGATE_CreateWrapKey (BIT11) -#define TPM_KEY_DELEGATE_CMK_CreateBlob (BIT10) -#define TPM_KEY_DELEGATE_CreateMigrationBlob (BIT9) -#define TPM_KEY_DELEGATE_ConvertMigrationBlob (BIT8) -#define TPM_KEY_DELEGATE_CreateKeyDelegation (BIT7) -#define TPM_KEY_DELEGATE_ChangeAuth (BIT6) -#define TPM_KEY_DELEGATE_GetPubKey (BIT5) -#define TPM_KEY_DELEGATE_UnBind (BIT4) -#define TPM_KEY_DELEGATE_Quote (BIT3) -#define TPM_KEY_DELEGATE_Unseal (BIT2) -#define TPM_KEY_DELEGATE_Seal (BIT1) -#define TPM_KEY_DELEGATE_LoadKey (BIT0) +#define TPM_KEY_DELEGATE_CMK_ConvertMigration (BIT28) +#define TPM_KEY_DELEGATE_TickStampBlob (BIT27) +#define TPM_KEY_DELEGATE_ChangeAuthAsymStart (BIT26) +#define TPM_KEY_DELEGATE_ChangeAuthAsymFinish (BIT25) +#define TPM_KEY_DELEGATE_CMK_CreateKey (BIT24) +#define TPM_KEY_DELEGATE_MigrateKey (BIT23) +#define TPM_KEY_DELEGATE_LoadKey2 (BIT22) +#define TPM_KEY_DELEGATE_EstablishTransport (BIT21) +#define TPM_KEY_DELEGATE_ReleaseTransportSigned (BIT20) +#define TPM_KEY_DELEGATE_Quote2 (BIT19) +#define TPM_KEY_DELEGATE_Sealx (BIT18) +#define TPM_KEY_DELEGATE_MakeIdentity (BIT17) +#define TPM_KEY_DELEGATE_ActivateIdentity (BIT16) +#define TPM_KEY_DELEGATE_GetAuditDigestSigned (BIT15) +#define TPM_KEY_DELEGATE_Sign (BIT14) +#define TPM_KEY_DELEGATE_CertifyKey2 (BIT13) +#define TPM_KEY_DELEGATE_CertifyKey (BIT12) +#define TPM_KEY_DELEGATE_CreateWrapKey (BIT11) +#define TPM_KEY_DELEGATE_CMK_CreateBlob (BIT10) +#define TPM_KEY_DELEGATE_CreateMigrationBlob (BIT9) +#define TPM_KEY_DELEGATE_ConvertMigrationBlob (BIT8) +#define TPM_KEY_DELEGATE_CreateKeyDelegation (BIT7) +#define TPM_KEY_DELEGATE_ChangeAuth (BIT6) +#define TPM_KEY_DELEGATE_GetPubKey (BIT5) +#define TPM_KEY_DELEGATE_UnBind (BIT4) +#define TPM_KEY_DELEGATE_Quote (BIT3) +#define TPM_KEY_DELEGATE_Unseal (BIT2) +#define TPM_KEY_DELEGATE_Seal (BIT1) +#define TPM_KEY_DELEGATE_LoadKey (BIT0) // // Part 2, section 20.3: TPM_FAMILY_FLAGS // -#define TPM_DELEGATE_ADMIN_LOCK (BIT1) -#define TPM_FAMFLAG_ENABLE (BIT0) +#define TPM_DELEGATE_ADMIN_LOCK (BIT1) +#define TPM_FAMFLAG_ENABLE (BIT0) /// /// Part 2, section 20.4: TPM_FAMILY_LABEL /// typedef struct tdTPM_FAMILY_LABEL { - UINT8 label; + UINT8 label; } TPM_FAMILY_LABEL; /// /// Part 2, section 20.5: TPM_FAMILY_TABLE_ENTRY /// typedef struct tdTPM_FAMILY_TABLE_ENTRY { - TPM_STRUCTURE_TAG tag; - TPM_FAMILY_LABEL label; - TPM_FAMILY_ID familyID; - TPM_FAMILY_VERIFICATION verificationCount; - TPM_FAMILY_FLAGS flags; + TPM_STRUCTURE_TAG tag; + TPM_FAMILY_LABEL label; + TPM_FAMILY_ID familyID; + TPM_FAMILY_VERIFICATION verificationCount; + TPM_FAMILY_FLAGS flags; } TPM_FAMILY_TABLE_ENTRY; // // Part 2, section 20.6: TPM_FAMILY_TABLE // -#define TPM_NUM_FAMILY_TABLE_ENTRY_MIN 8 +#define TPM_NUM_FAMILY_TABLE_ENTRY_MIN 8 -typedef struct tdTPM_FAMILY_TABLE{ - TPM_FAMILY_TABLE_ENTRY famTableRow[TPM_NUM_FAMILY_TABLE_ENTRY_MIN]; +typedef struct tdTPM_FAMILY_TABLE { + TPM_FAMILY_TABLE_ENTRY famTableRow[TPM_NUM_FAMILY_TABLE_ENTRY_MIN]; } TPM_FAMILY_TABLE; /// /// Part 2, section 20.7: TPM_DELEGATE_LABEL /// typedef struct tdTPM_DELEGATE_LABEL { - UINT8 label; + UINT8 label; } TPM_DELEGATE_LABEL; /// /// Part 2, section 20.8: TPM_DELEGATE_PUBLIC /// typedef struct tdTPM_DELEGATE_PUBLIC { - TPM_STRUCTURE_TAG tag; - TPM_DELEGATE_LABEL label; - TPM_PCR_INFO_SHORT pcrInfo; - TPM_DELEGATIONS permissions; - TPM_FAMILY_ID familyID; - TPM_FAMILY_VERIFICATION verificationCount; + TPM_STRUCTURE_TAG tag; + TPM_DELEGATE_LABEL label; + TPM_PCR_INFO_SHORT pcrInfo; + TPM_DELEGATIONS permissions; + TPM_FAMILY_ID familyID; + TPM_FAMILY_VERIFICATION verificationCount; } TPM_DELEGATE_PUBLIC; /// /// Part 2, section 20.9: TPM_DELEGATE_TABLE_ROW /// typedef struct tdTPM_DELEGATE_TABLE_ROW { - TPM_STRUCTURE_TAG tag; - TPM_DELEGATE_PUBLIC pub; - TPM_SECRET authValue; + TPM_STRUCTURE_TAG tag; + TPM_DELEGATE_PUBLIC pub; + TPM_SECRET authValue; } TPM_DELEGATE_TABLE_ROW; // // Part 2, section 20.10: TPM_DELEGATE_TABLE // -#define TPM_NUM_DELEGATE_TABLE_ENTRY_MIN 2 +#define TPM_NUM_DELEGATE_TABLE_ENTRY_MIN 2 -typedef struct tdTPM_DELEGATE_TABLE{ - TPM_DELEGATE_TABLE_ROW delRow[TPM_NUM_DELEGATE_TABLE_ENTRY_MIN]; +typedef struct tdTPM_DELEGATE_TABLE { + TPM_DELEGATE_TABLE_ROW delRow[TPM_NUM_DELEGATE_TABLE_ENTRY_MIN]; } TPM_DELEGATE_TABLE; /// /// Part 2, section 20.11: TPM_DELEGATE_SENSITIVE /// typedef struct tdTPM_DELEGATE_SENSITIVE { - TPM_STRUCTURE_TAG tag; - TPM_SECRET authValue; + TPM_STRUCTURE_TAG tag; + TPM_SECRET authValue; } TPM_DELEGATE_SENSITIVE; /// /// Part 2, section 20.12: TPM_DELEGATE_OWNER_BLOB /// typedef struct tdTPM_DELEGATE_OWNER_BLOB { - TPM_STRUCTURE_TAG tag; - TPM_DELEGATE_PUBLIC pub; - TPM_DIGEST integrityDigest; - UINT32 additionalSize; - UINT8 *additionalArea; - UINT32 sensitiveSize; - UINT8 *sensitiveArea; + TPM_STRUCTURE_TAG tag; + TPM_DELEGATE_PUBLIC pub; + TPM_DIGEST integrityDigest; + UINT32 additionalSize; + UINT8 *additionalArea; + UINT32 sensitiveSize; + UINT8 *sensitiveArea; } TPM_DELEGATE_OWNER_BLOB; /// /// Part 2, section 20.13: TTPM_DELEGATE_KEY_BLOB /// typedef struct tdTPM_DELEGATE_KEY_BLOB { - TPM_STRUCTURE_TAG tag; - TPM_DELEGATE_PUBLIC pub; - TPM_DIGEST integrityDigest; - TPM_DIGEST pubKeyDigest; - UINT32 additionalSize; - UINT8 *additionalArea; - UINT32 sensitiveSize; - UINT8 *sensitiveArea; + TPM_STRUCTURE_TAG tag; + TPM_DELEGATE_PUBLIC pub; + TPM_DIGEST integrityDigest; + TPM_DIGEST pubKeyDigest; + UINT32 additionalSize; + UINT8 *additionalArea; + UINT32 sensitiveSize; + UINT8 *sensitiveArea; } TPM_DELEGATE_KEY_BLOB; // // Part 2, section 20.14: TPM_FAMILY_OPERATION Values // -#define TPM_FAMILY_CREATE ((UINT32)0x00000001) -#define TPM_FAMILY_ENABLE ((UINT32)0x00000002) -#define TPM_FAMILY_ADMIN ((UINT32)0x00000003) -#define TPM_FAMILY_INVALIDATE ((UINT32)0x00000004) +#define TPM_FAMILY_CREATE ((UINT32)0x00000001) +#define TPM_FAMILY_ENABLE ((UINT32)0x00000002) +#define TPM_FAMILY_ADMIN ((UINT32)0x00000003) +#define TPM_FAMILY_INVALIDATE ((UINT32)0x00000004) // // Part 2, section 21.1: TPM_CAPABILITY_AREA for GetCapability // -#define TPM_CAP_ORD ((TPM_CAPABILITY_AREA) 0x00000001) -#define TPM_CAP_ALG ((TPM_CAPABILITY_AREA) 0x00000002) -#define TPM_CAP_PID ((TPM_CAPABILITY_AREA) 0x00000003) -#define TPM_CAP_FLAG ((TPM_CAPABILITY_AREA) 0x00000004) -#define TPM_CAP_PROPERTY ((TPM_CAPABILITY_AREA) 0x00000005) -#define TPM_CAP_VERSION ((TPM_CAPABILITY_AREA) 0x00000006) -#define TPM_CAP_KEY_HANDLE ((TPM_CAPABILITY_AREA) 0x00000007) -#define TPM_CAP_CHECK_LOADED ((TPM_CAPABILITY_AREA) 0x00000008) -#define TPM_CAP_SYM_MODE ((TPM_CAPABILITY_AREA) 0x00000009) -#define TPM_CAP_KEY_STATUS ((TPM_CAPABILITY_AREA) 0x0000000C) -#define TPM_CAP_NV_LIST ((TPM_CAPABILITY_AREA) 0x0000000D) -#define TPM_CAP_MFR ((TPM_CAPABILITY_AREA) 0x00000010) -#define TPM_CAP_NV_INDEX ((TPM_CAPABILITY_AREA) 0x00000011) -#define TPM_CAP_TRANS_ALG ((TPM_CAPABILITY_AREA) 0x00000012) -#define TPM_CAP_HANDLE ((TPM_CAPABILITY_AREA) 0x00000014) -#define TPM_CAP_TRANS_ES ((TPM_CAPABILITY_AREA) 0x00000015) -#define TPM_CAP_AUTH_ENCRYPT ((TPM_CAPABILITY_AREA) 0x00000017) -#define TPM_CAP_SELECT_SIZE ((TPM_CAPABILITY_AREA) 0x00000018) -#define TPM_CAP_VERSION_VAL ((TPM_CAPABILITY_AREA) 0x0000001A) - -#define TPM_CAP_FLAG_PERMANENT ((TPM_CAPABILITY_AREA) 0x00000108) -#define TPM_CAP_FLAG_VOLATILE ((TPM_CAPABILITY_AREA) 0x00000109) +#define TPM_CAP_ORD ((TPM_CAPABILITY_AREA) 0x00000001) +#define TPM_CAP_ALG ((TPM_CAPABILITY_AREA) 0x00000002) +#define TPM_CAP_PID ((TPM_CAPABILITY_AREA) 0x00000003) +#define TPM_CAP_FLAG ((TPM_CAPABILITY_AREA) 0x00000004) +#define TPM_CAP_PROPERTY ((TPM_CAPABILITY_AREA) 0x00000005) +#define TPM_CAP_VERSION ((TPM_CAPABILITY_AREA) 0x00000006) +#define TPM_CAP_KEY_HANDLE ((TPM_CAPABILITY_AREA) 0x00000007) +#define TPM_CAP_CHECK_LOADED ((TPM_CAPABILITY_AREA) 0x00000008) +#define TPM_CAP_SYM_MODE ((TPM_CAPABILITY_AREA) 0x00000009) +#define TPM_CAP_KEY_STATUS ((TPM_CAPABILITY_AREA) 0x0000000C) +#define TPM_CAP_NV_LIST ((TPM_CAPABILITY_AREA) 0x0000000D) +#define TPM_CAP_MFR ((TPM_CAPABILITY_AREA) 0x00000010) +#define TPM_CAP_NV_INDEX ((TPM_CAPABILITY_AREA) 0x00000011) +#define TPM_CAP_TRANS_ALG ((TPM_CAPABILITY_AREA) 0x00000012) +#define TPM_CAP_HANDLE ((TPM_CAPABILITY_AREA) 0x00000014) +#define TPM_CAP_TRANS_ES ((TPM_CAPABILITY_AREA) 0x00000015) +#define TPM_CAP_AUTH_ENCRYPT ((TPM_CAPABILITY_AREA) 0x00000017) +#define TPM_CAP_SELECT_SIZE ((TPM_CAPABILITY_AREA) 0x00000018) +#define TPM_CAP_VERSION_VAL ((TPM_CAPABILITY_AREA) 0x0000001A) + +#define TPM_CAP_FLAG_PERMANENT ((TPM_CAPABILITY_AREA) 0x00000108) +#define TPM_CAP_FLAG_VOLATILE ((TPM_CAPABILITY_AREA) 0x00000109) // // Part 2, section 21.2: CAP_PROPERTY Subcap values for GetCapability // -#define TPM_CAP_PROP_PCR ((TPM_CAPABILITY_AREA) 0x00000101) -#define TPM_CAP_PROP_DIR ((TPM_CAPABILITY_AREA) 0x00000102) -#define TPM_CAP_PROP_MANUFACTURER ((TPM_CAPABILITY_AREA) 0x00000103) -#define TPM_CAP_PROP_KEYS ((TPM_CAPABILITY_AREA) 0x00000104) -#define TPM_CAP_PROP_MIN_COUNTER ((TPM_CAPABILITY_AREA) 0x00000107) -#define TPM_CAP_PROP_AUTHSESS ((TPM_CAPABILITY_AREA) 0x0000010A) -#define TPM_CAP_PROP_TRANSESS ((TPM_CAPABILITY_AREA) 0x0000010B) -#define TPM_CAP_PROP_COUNTERS ((TPM_CAPABILITY_AREA) 0x0000010C) -#define TPM_CAP_PROP_MAX_AUTHSESS ((TPM_CAPABILITY_AREA) 0x0000010D) -#define TPM_CAP_PROP_MAX_TRANSESS ((TPM_CAPABILITY_AREA) 0x0000010E) -#define TPM_CAP_PROP_MAX_COUNTERS ((TPM_CAPABILITY_AREA) 0x0000010F) -#define TPM_CAP_PROP_MAX_KEYS ((TPM_CAPABILITY_AREA) 0x00000110) -#define TPM_CAP_PROP_OWNER ((TPM_CAPABILITY_AREA) 0x00000111) -#define TPM_CAP_PROP_CONTEXT ((TPM_CAPABILITY_AREA) 0x00000112) -#define TPM_CAP_PROP_MAX_CONTEXT ((TPM_CAPABILITY_AREA) 0x00000113) -#define TPM_CAP_PROP_FAMILYROWS ((TPM_CAPABILITY_AREA) 0x00000114) -#define TPM_CAP_PROP_TIS_TIMEOUT ((TPM_CAPABILITY_AREA) 0x00000115) -#define TPM_CAP_PROP_STARTUP_EFFECT ((TPM_CAPABILITY_AREA) 0x00000116) -#define TPM_CAP_PROP_DELEGATE_ROW ((TPM_CAPABILITY_AREA) 0x00000117) -#define TPM_CAP_PROP_DAA_MAX ((TPM_CAPABILITY_AREA) 0x00000119) -#define CAP_PROP_SESSION_DAA ((TPM_CAPABILITY_AREA) 0x0000011A) -#define TPM_CAP_PROP_CONTEXT_DIST ((TPM_CAPABILITY_AREA) 0x0000011B) -#define TPM_CAP_PROP_DAA_INTERRUPT ((TPM_CAPABILITY_AREA) 0x0000011C) -#define TPM_CAP_PROP_SESSIONS ((TPM_CAPABILITY_AREA) 0x0000011D) -#define TPM_CAP_PROP_MAX_SESSIONS ((TPM_CAPABILITY_AREA) 0x0000011E) -#define TPM_CAP_PROP_CMK_RESTRICTION ((TPM_CAPABILITY_AREA) 0x0000011F) -#define TPM_CAP_PROP_DURATION ((TPM_CAPABILITY_AREA) 0x00000120) -#define TPM_CAP_PROP_ACTIVE_COUNTER ((TPM_CAPABILITY_AREA) 0x00000122) -#define TPM_CAP_PROP_MAX_NV_AVAILABLE ((TPM_CAPABILITY_AREA) 0x00000123) -#define TPM_CAP_PROP_INPUT_BUFFER ((TPM_CAPABILITY_AREA) 0x00000124) +#define TPM_CAP_PROP_PCR ((TPM_CAPABILITY_AREA) 0x00000101) +#define TPM_CAP_PROP_DIR ((TPM_CAPABILITY_AREA) 0x00000102) +#define TPM_CAP_PROP_MANUFACTURER ((TPM_CAPABILITY_AREA) 0x00000103) +#define TPM_CAP_PROP_KEYS ((TPM_CAPABILITY_AREA) 0x00000104) +#define TPM_CAP_PROP_MIN_COUNTER ((TPM_CAPABILITY_AREA) 0x00000107) +#define TPM_CAP_PROP_AUTHSESS ((TPM_CAPABILITY_AREA) 0x0000010A) +#define TPM_CAP_PROP_TRANSESS ((TPM_CAPABILITY_AREA) 0x0000010B) +#define TPM_CAP_PROP_COUNTERS ((TPM_CAPABILITY_AREA) 0x0000010C) +#define TPM_CAP_PROP_MAX_AUTHSESS ((TPM_CAPABILITY_AREA) 0x0000010D) +#define TPM_CAP_PROP_MAX_TRANSESS ((TPM_CAPABILITY_AREA) 0x0000010E) +#define TPM_CAP_PROP_MAX_COUNTERS ((TPM_CAPABILITY_AREA) 0x0000010F) +#define TPM_CAP_PROP_MAX_KEYS ((TPM_CAPABILITY_AREA) 0x00000110) +#define TPM_CAP_PROP_OWNER ((TPM_CAPABILITY_AREA) 0x00000111) +#define TPM_CAP_PROP_CONTEXT ((TPM_CAPABILITY_AREA) 0x00000112) +#define TPM_CAP_PROP_MAX_CONTEXT ((TPM_CAPABILITY_AREA) 0x00000113) +#define TPM_CAP_PROP_FAMILYROWS ((TPM_CAPABILITY_AREA) 0x00000114) +#define TPM_CAP_PROP_TIS_TIMEOUT ((TPM_CAPABILITY_AREA) 0x00000115) +#define TPM_CAP_PROP_STARTUP_EFFECT ((TPM_CAPABILITY_AREA) 0x00000116) +#define TPM_CAP_PROP_DELEGATE_ROW ((TPM_CAPABILITY_AREA) 0x00000117) +#define TPM_CAP_PROP_DAA_MAX ((TPM_CAPABILITY_AREA) 0x00000119) +#define CAP_PROP_SESSION_DAA ((TPM_CAPABILITY_AREA) 0x0000011A) +#define TPM_CAP_PROP_CONTEXT_DIST ((TPM_CAPABILITY_AREA) 0x0000011B) +#define TPM_CAP_PROP_DAA_INTERRUPT ((TPM_CAPABILITY_AREA) 0x0000011C) +#define TPM_CAP_PROP_SESSIONS ((TPM_CAPABILITY_AREA) 0x0000011D) +#define TPM_CAP_PROP_MAX_SESSIONS ((TPM_CAPABILITY_AREA) 0x0000011E) +#define TPM_CAP_PROP_CMK_RESTRICTION ((TPM_CAPABILITY_AREA) 0x0000011F) +#define TPM_CAP_PROP_DURATION ((TPM_CAPABILITY_AREA) 0x00000120) +#define TPM_CAP_PROP_ACTIVE_COUNTER ((TPM_CAPABILITY_AREA) 0x00000122) +#define TPM_CAP_PROP_MAX_NV_AVAILABLE ((TPM_CAPABILITY_AREA) 0x00000123) +#define TPM_CAP_PROP_INPUT_BUFFER ((TPM_CAPABILITY_AREA) 0x00000124) // // Part 2, section 21.4: TPM_CAPABILITY_AREA for SetCapability // -#define TPM_SET_PERM_FLAGS ((TPM_CAPABILITY_AREA) 0x00000001) -#define TPM_SET_PERM_DATA ((TPM_CAPABILITY_AREA) 0x00000002) -#define TPM_SET_STCLEAR_FLAGS ((TPM_CAPABILITY_AREA) 0x00000003) -#define TPM_SET_STCLEAR_DATA ((TPM_CAPABILITY_AREA) 0x00000004) -#define TPM_SET_STANY_FLAGS ((TPM_CAPABILITY_AREA) 0x00000005) -#define TPM_SET_STANY_DATA ((TPM_CAPABILITY_AREA) 0x00000006) +#define TPM_SET_PERM_FLAGS ((TPM_CAPABILITY_AREA) 0x00000001) +#define TPM_SET_PERM_DATA ((TPM_CAPABILITY_AREA) 0x00000002) +#define TPM_SET_STCLEAR_FLAGS ((TPM_CAPABILITY_AREA) 0x00000003) +#define TPM_SET_STCLEAR_DATA ((TPM_CAPABILITY_AREA) 0x00000004) +#define TPM_SET_STANY_FLAGS ((TPM_CAPABILITY_AREA) 0x00000005) +#define TPM_SET_STANY_DATA ((TPM_CAPABILITY_AREA) 0x00000006) /// /// Part 2, section 21.6: TPM_CAP_VERSION_INFO /// [size_is(vendorSpecificSize)] BYTE* vendorSpecific; /// typedef struct tdTPM_CAP_VERSION_INFO { - TPM_STRUCTURE_TAG tag; - TPM_VERSION version; - UINT16 specLevel; - UINT8 errataRev; - UINT8 tpmVendorID[4]; - UINT16 vendorSpecificSize; - UINT8 *vendorSpecific; + TPM_STRUCTURE_TAG tag; + TPM_VERSION version; + UINT16 specLevel; + UINT8 errataRev; + UINT8 tpmVendorID[4]; + UINT16 vendorSpecificSize; + UINT8 *vendorSpecific; } TPM_CAP_VERSION_INFO; /// /// Part 2, section 21.10: TPM_DA_ACTION_TYPE /// typedef struct tdTPM_DA_ACTION_TYPE { - TPM_STRUCTURE_TAG tag; - UINT32 actions; + TPM_STRUCTURE_TAG tag; + UINT32 actions; } TPM_DA_ACTION_TYPE; -#define TPM_DA_ACTION_FAILURE_MODE (((UINT32)1)<<3) -#define TPM_DA_ACTION_DEACTIVATE (((UINT32)1)<<2) -#define TPM_DA_ACTION_DISABLE (((UINT32)1)<<1) -#define TPM_DA_ACTION_TIMEOUT (((UINT32)1)<<0) +#define TPM_DA_ACTION_FAILURE_MODE (((UINT32)1)<<3) +#define TPM_DA_ACTION_DEACTIVATE (((UINT32)1)<<2) +#define TPM_DA_ACTION_DISABLE (((UINT32)1)<<1) +#define TPM_DA_ACTION_TIMEOUT (((UINT32)1)<<0) /// /// Part 2, section 21.7: TPM_DA_INFO /// typedef struct tdTPM_DA_INFO { - TPM_STRUCTURE_TAG tag; - TPM_DA_STATE state; - UINT16 currentCount; - UINT16 thresholdCount; - TPM_DA_ACTION_TYPE actionAtThreshold; - UINT32 actionDependValue; - UINT32 vendorDataSize; - UINT8 *vendorData; + TPM_STRUCTURE_TAG tag; + TPM_DA_STATE state; + UINT16 currentCount; + UINT16 thresholdCount; + TPM_DA_ACTION_TYPE actionAtThreshold; + UINT32 actionDependValue; + UINT32 vendorDataSize; + UINT8 *vendorData; } TPM_DA_INFO; /// /// Part 2, section 21.8: TPM_DA_INFO_LIMITED /// typedef struct tdTPM_DA_INFO_LIMITED { - TPM_STRUCTURE_TAG tag; - TPM_DA_STATE state; - TPM_DA_ACTION_TYPE actionAtThreshold; - UINT32 vendorDataSize; - UINT8 *vendorData; + TPM_STRUCTURE_TAG tag; + TPM_DA_STATE state; + TPM_DA_ACTION_TYPE actionAtThreshold; + UINT32 vendorDataSize; + UINT8 *vendorData; } TPM_DA_INFO_LIMITED; // // Part 2, section 21.9: CAP_PROPERTY Subcap values for GetCapability // -#define TPM_DA_STATE_INACTIVE ((UINT8)0x00) -#define TPM_DA_STATE_ACTIVE ((UINT8)0x01) +#define TPM_DA_STATE_INACTIVE ((UINT8)0x00) +#define TPM_DA_STATE_ACTIVE ((UINT8)0x01) // // Part 2, section 22: DAA Structures @@ -2043,94 +2042,93 @@ typedef struct tdTPM_DA_INFO_LIMITED { // // Part 2, section 22.1: Size definitions // -#define TPM_DAA_SIZE_r0 (43) -#define TPM_DAA_SIZE_r1 (43) -#define TPM_DAA_SIZE_r2 (128) -#define TPM_DAA_SIZE_r3 (168) -#define TPM_DAA_SIZE_r4 (219) -#define TPM_DAA_SIZE_NT (20) -#define TPM_DAA_SIZE_v0 (128) -#define TPM_DAA_SIZE_v1 (192) -#define TPM_DAA_SIZE_NE (256) -#define TPM_DAA_SIZE_w (256) -#define TPM_DAA_SIZE_issuerModulus (256) +#define TPM_DAA_SIZE_r0 (43) +#define TPM_DAA_SIZE_r1 (43) +#define TPM_DAA_SIZE_r2 (128) +#define TPM_DAA_SIZE_r3 (168) +#define TPM_DAA_SIZE_r4 (219) +#define TPM_DAA_SIZE_NT (20) +#define TPM_DAA_SIZE_v0 (128) +#define TPM_DAA_SIZE_v1 (192) +#define TPM_DAA_SIZE_NE (256) +#define TPM_DAA_SIZE_w (256) +#define TPM_DAA_SIZE_issuerModulus (256) // // Part 2, section 22.2: Constant definitions // -#define TPM_DAA_power0 (104) -#define TPM_DAA_power1 (1024) +#define TPM_DAA_power0 (104) +#define TPM_DAA_power1 (1024) /// /// Part 2, section 22.3: TPM_DAA_ISSUER /// typedef struct tdTPM_DAA_ISSUER { - TPM_STRUCTURE_TAG tag; - TPM_DIGEST DAA_digest_R0; - TPM_DIGEST DAA_digest_R1; - TPM_DIGEST DAA_digest_S0; - TPM_DIGEST DAA_digest_S1; - TPM_DIGEST DAA_digest_n; - TPM_DIGEST DAA_digest_gamma; - UINT8 DAA_generic_q[26]; + TPM_STRUCTURE_TAG tag; + TPM_DIGEST DAA_digest_R0; + TPM_DIGEST DAA_digest_R1; + TPM_DIGEST DAA_digest_S0; + TPM_DIGEST DAA_digest_S1; + TPM_DIGEST DAA_digest_n; + TPM_DIGEST DAA_digest_gamma; + UINT8 DAA_generic_q[26]; } TPM_DAA_ISSUER; /// /// Part 2, section 22.4: TPM_DAA_TPM /// typedef struct tdTPM_DAA_TPM { - TPM_STRUCTURE_TAG tag; - TPM_DIGEST DAA_digestIssuer; - TPM_DIGEST DAA_digest_v0; - TPM_DIGEST DAA_digest_v1; - TPM_DIGEST DAA_rekey; - UINT32 DAA_count; + TPM_STRUCTURE_TAG tag; + TPM_DIGEST DAA_digestIssuer; + TPM_DIGEST DAA_digest_v0; + TPM_DIGEST DAA_digest_v1; + TPM_DIGEST DAA_rekey; + UINT32 DAA_count; } TPM_DAA_TPM; /// /// Part 2, section 22.5: TPM_DAA_CONTEXT /// typedef struct tdTPM_DAA_CONTEXT { - TPM_STRUCTURE_TAG tag; - TPM_DIGEST DAA_digestContext; - TPM_DIGEST DAA_digest; - TPM_DAA_CONTEXT_SEED DAA_contextSeed; - UINT8 DAA_scratch[256]; - UINT8 DAA_stage; + TPM_STRUCTURE_TAG tag; + TPM_DIGEST DAA_digestContext; + TPM_DIGEST DAA_digest; + TPM_DAA_CONTEXT_SEED DAA_contextSeed; + UINT8 DAA_scratch[256]; + UINT8 DAA_stage; } TPM_DAA_CONTEXT; /// /// Part 2, section 22.6: TPM_DAA_JOINDATA /// typedef struct tdTPM_DAA_JOINDATA { - UINT8 DAA_join_u0[128]; - UINT8 DAA_join_u1[138]; - TPM_DIGEST DAA_digest_n0; + UINT8 DAA_join_u0[128]; + UINT8 DAA_join_u1[138]; + TPM_DIGEST DAA_digest_n0; } TPM_DAA_JOINDATA; /// /// Part 2, section 22.8: TPM_DAA_BLOB /// typedef struct tdTPM_DAA_BLOB { - TPM_STRUCTURE_TAG tag; - TPM_RESOURCE_TYPE resourceType; - UINT8 label[16]; - TPM_DIGEST blobIntegrity; - UINT32 additionalSize; - UINT8 *additionalData; - UINT32 sensitiveSize; - UINT8 *sensitiveData; + TPM_STRUCTURE_TAG tag; + TPM_RESOURCE_TYPE resourceType; + UINT8 label[16]; + TPM_DIGEST blobIntegrity; + UINT32 additionalSize; + UINT8 *additionalData; + UINT32 sensitiveSize; + UINT8 *sensitiveData; } TPM_DAA_BLOB; /// /// Part 2, section 22.9: TPM_DAA_SENSITIVE /// typedef struct tdTPM_DAA_SENSITIVE { - TPM_STRUCTURE_TAG tag; - UINT32 internalSize; - UINT8 *internalData; + TPM_STRUCTURE_TAG tag; + UINT32 internalSize; + UINT8 *internalData; } TPM_DAA_SENSITIVE; - // // Part 2, section 23: Redirection // @@ -2142,24 +2140,24 @@ typedef struct tdTPM_DAA_SENSITIVE { /// refers to exactly one name but does not give its value. We join /// them here. /// -#define TPM_REDIR_GPIO (0x00000001) +#define TPM_REDIR_GPIO (0x00000001) /// /// TPM Command Headers defined in Part 3 /// typedef struct tdTPM_RQU_COMMAND_HDR { - TPM_STRUCTURE_TAG tag; - UINT32 paramSize; - TPM_COMMAND_CODE ordinal; + TPM_STRUCTURE_TAG tag; + UINT32 paramSize; + TPM_COMMAND_CODE ordinal; } TPM_RQU_COMMAND_HDR; /// /// TPM Response Headers defined in Part 3 /// typedef struct tdTPM_RSP_COMMAND_HDR { - TPM_STRUCTURE_TAG tag; - UINT32 paramSize; - TPM_RESULT returnCode; + TPM_STRUCTURE_TAG tag; + UINT32 paramSize; + TPM_RESULT returnCode; } TPM_RSP_COMMAND_HDR; #pragma pack () diff --git a/MdePkg/Include/IndustryStandard/Tpm20.h b/MdePkg/Include/IndustryStandard/Tpm20.h index 8a431bc..4440f37 100644 --- a/MdePkg/Include/IndustryStandard/Tpm20.h +++ b/MdePkg/Include/IndustryStandard/Tpm20.h @@ -10,7 +10,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ - #ifndef _TPM20_H_ #define _TPM20_H_ @@ -21,121 +20,121 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // Annex A Algorithm Constants // Table 205 - Defines for SHA1 Hash Values -#define SHA1_DIGEST_SIZE 20 -#define SHA1_BLOCK_SIZE 64 +#define SHA1_DIGEST_SIZE 20 +#define SHA1_BLOCK_SIZE 64 // Table 206 - Defines for SHA256 Hash Values -#define SHA256_DIGEST_SIZE 32 -#define SHA256_BLOCK_SIZE 64 +#define SHA256_DIGEST_SIZE 32 +#define SHA256_BLOCK_SIZE 64 // Table 207 - Defines for SHA384 Hash Values -#define SHA384_DIGEST_SIZE 48 -#define SHA384_BLOCK_SIZE 128 +#define SHA384_DIGEST_SIZE 48 +#define SHA384_BLOCK_SIZE 128 // Table 208 - Defines for SHA512 Hash Values -#define SHA512_DIGEST_SIZE 64 -#define SHA512_BLOCK_SIZE 128 +#define SHA512_DIGEST_SIZE 64 +#define SHA512_BLOCK_SIZE 128 // Table 209 - Defines for SM3_256 Hash Values -#define SM3_256_DIGEST_SIZE 32 -#define SM3_256_BLOCK_SIZE 64 +#define SM3_256_DIGEST_SIZE 32 +#define SM3_256_BLOCK_SIZE 64 // Table 210 - Defines for Architectural Limits Values -#define MAX_SESSION_NUMBER 3 +#define MAX_SESSION_NUMBER 3 // Annex B Implementation Definitions // Table 211 - Defines for Logic Values -#define YES 1 -#define NO 0 -#define SET 1 -#define CLEAR 0 +#define YES 1 +#define NO 0 +#define SET 1 +#define CLEAR 0 // Table 215 - Defines for RSA Algorithm Constants -#define MAX_RSA_KEY_BITS 2048 -#define MAX_RSA_KEY_BYTES ((MAX_RSA_KEY_BITS + 7) / 8) +#define MAX_RSA_KEY_BITS 2048 +#define MAX_RSA_KEY_BYTES ((MAX_RSA_KEY_BITS + 7) / 8) // Table 216 - Defines for ECC Algorithm Constants -#define MAX_ECC_KEY_BITS 256 -#define MAX_ECC_KEY_BYTES ((MAX_ECC_KEY_BITS + 7) / 8) +#define MAX_ECC_KEY_BITS 256 +#define MAX_ECC_KEY_BYTES ((MAX_ECC_KEY_BITS + 7) / 8) // Table 217 - Defines for AES Algorithm Constants -#define MAX_AES_KEY_BITS 128 -#define MAX_AES_BLOCK_SIZE_BYTES 16 -#define MAX_AES_KEY_BYTES ((MAX_AES_KEY_BITS + 7) / 8) +#define MAX_AES_KEY_BITS 128 +#define MAX_AES_BLOCK_SIZE_BYTES 16 +#define MAX_AES_KEY_BYTES ((MAX_AES_KEY_BITS + 7) / 8) // Table 218 - Defines for SM4 Algorithm Constants -#define MAX_SM4_KEY_BITS 128 -#define MAX_SM4_BLOCK_SIZE_BYTES 16 -#define MAX_SM4_KEY_BYTES ((MAX_SM4_KEY_BITS + 7) / 8) +#define MAX_SM4_KEY_BITS 128 +#define MAX_SM4_BLOCK_SIZE_BYTES 16 +#define MAX_SM4_KEY_BYTES ((MAX_SM4_KEY_BITS + 7) / 8) // Table 219 - Defines for Symmetric Algorithm Constants -#define MAX_SYM_KEY_BITS MAX_AES_KEY_BITS -#define MAX_SYM_KEY_BYTES MAX_AES_KEY_BYTES -#define MAX_SYM_BLOCK_SIZE MAX_AES_BLOCK_SIZE_BYTES +#define MAX_SYM_KEY_BITS MAX_AES_KEY_BITS +#define MAX_SYM_KEY_BYTES MAX_AES_KEY_BYTES +#define MAX_SYM_BLOCK_SIZE MAX_AES_BLOCK_SIZE_BYTES // Table 220 - Defines for Implementation Values -typedef UINT16 BSIZE; -#define BUFFER_ALIGNMENT 4 -#define IMPLEMENTATION_PCR 24 -#define PLATFORM_PCR 24 -#define DRTM_PCR 17 -#define NUM_LOCALITIES 5 -#define MAX_HANDLE_NUM 3 -#define MAX_ACTIVE_SESSIONS 64 -typedef UINT16 CONTEXT_SLOT; -typedef UINT64 CONTEXT_COUNTER; -#define MAX_LOADED_SESSIONS 3 -#define MAX_SESSION_NUM 3 -#define MAX_LOADED_OBJECTS 3 -#define MIN_EVICT_OBJECTS 2 -#define PCR_SELECT_MIN ((PLATFORM_PCR + 7) / 8) -#define PCR_SELECT_MAX ((IMPLEMENTATION_PCR + 7) / 8) -#define NUM_POLICY_PCR_GROUP 1 -#define NUM_AUTHVALUE_PCR_GROUP 1 -#define MAX_CONTEXT_SIZE 4000 -#define MAX_DIGEST_BUFFER 1024 -#define MAX_NV_INDEX_SIZE 1024 -#define MAX_CAP_BUFFER 1024 -#define NV_MEMORY_SIZE 16384 -#define NUM_STATIC_PCR 16 -#define MAX_ALG_LIST_SIZE 64 -#define TIMER_PRESCALE 100000 -#define PRIMARY_SEED_SIZE 32 -#define CONTEXT_ENCRYPT_ALG TPM_ALG_AES -#define CONTEXT_ENCRYPT_KEY_BITS MAX_SYM_KEY_BITS -#define CONTEXT_ENCRYPT_KEY_BYTES ((CONTEXT_ENCRYPT_KEY_BITS + 7) / 8) -#define CONTEXT_INTEGRITY_HASH_ALG TPM_ALG_SHA256 -#define CONTEXT_INTEGRITY_HASH_SIZE SHA256_DIGEST_SIZE -#define PROOF_SIZE CONTEXT_INTEGRITY_HASH_SIZE -#define NV_CLOCK_UPDATE_INTERVAL 12 -#define NUM_POLICY_PCR 1 -#define MAX_COMMAND_SIZE 4096 -#define MAX_RESPONSE_SIZE 4096 -#define ORDERLY_BITS 8 -#define MAX_ORDERLY_COUNT ((1 << ORDERLY_BITS) - 1) -#define ALG_ID_FIRST TPM_ALG_FIRST -#define ALG_ID_LAST TPM_ALG_LAST -#define MAX_SYM_DATA 128 -#define MAX_RNG_ENTROPY_SIZE 64 -#define RAM_INDEX_SPACE 512 -#define RSA_DEFAULT_PUBLIC_EXPONENT 0x00010001 -#define CRT_FORMAT_RSA YES -#define PRIVATE_VENDOR_SPECIFIC_BYTES ((MAX_RSA_KEY_BYTES / 2) * ( 3 + CRT_FORMAT_RSA * 2)) +typedef UINT16 BSIZE; +#define BUFFER_ALIGNMENT 4 +#define IMPLEMENTATION_PCR 24 +#define PLATFORM_PCR 24 +#define DRTM_PCR 17 +#define NUM_LOCALITIES 5 +#define MAX_HANDLE_NUM 3 +#define MAX_ACTIVE_SESSIONS 64 +typedef UINT16 CONTEXT_SLOT; +typedef UINT64 CONTEXT_COUNTER; +#define MAX_LOADED_SESSIONS 3 +#define MAX_SESSION_NUM 3 +#define MAX_LOADED_OBJECTS 3 +#define MIN_EVICT_OBJECTS 2 +#define PCR_SELECT_MIN ((PLATFORM_PCR + 7) / 8) +#define PCR_SELECT_MAX ((IMPLEMENTATION_PCR + 7) / 8) +#define NUM_POLICY_PCR_GROUP 1 +#define NUM_AUTHVALUE_PCR_GROUP 1 +#define MAX_CONTEXT_SIZE 4000 +#define MAX_DIGEST_BUFFER 1024 +#define MAX_NV_INDEX_SIZE 1024 +#define MAX_CAP_BUFFER 1024 +#define NV_MEMORY_SIZE 16384 +#define NUM_STATIC_PCR 16 +#define MAX_ALG_LIST_SIZE 64 +#define TIMER_PRESCALE 100000 +#define PRIMARY_SEED_SIZE 32 +#define CONTEXT_ENCRYPT_ALG TPM_ALG_AES +#define CONTEXT_ENCRYPT_KEY_BITS MAX_SYM_KEY_BITS +#define CONTEXT_ENCRYPT_KEY_BYTES ((CONTEXT_ENCRYPT_KEY_BITS + 7) / 8) +#define CONTEXT_INTEGRITY_HASH_ALG TPM_ALG_SHA256 +#define CONTEXT_INTEGRITY_HASH_SIZE SHA256_DIGEST_SIZE +#define PROOF_SIZE CONTEXT_INTEGRITY_HASH_SIZE +#define NV_CLOCK_UPDATE_INTERVAL 12 +#define NUM_POLICY_PCR 1 +#define MAX_COMMAND_SIZE 4096 +#define MAX_RESPONSE_SIZE 4096 +#define ORDERLY_BITS 8 +#define MAX_ORDERLY_COUNT ((1 << ORDERLY_BITS) - 1) +#define ALG_ID_FIRST TPM_ALG_FIRST +#define ALG_ID_LAST TPM_ALG_LAST +#define MAX_SYM_DATA 128 +#define MAX_RNG_ENTROPY_SIZE 64 +#define RAM_INDEX_SPACE 512 +#define RSA_DEFAULT_PUBLIC_EXPONENT 0x00010001 +#define CRT_FORMAT_RSA YES +#define PRIVATE_VENDOR_SPECIFIC_BYTES ((MAX_RSA_KEY_BYTES / 2) * ( 3 + CRT_FORMAT_RSA * 2)) // Capability related MAX_ value -#define MAX_CAP_DATA (MAX_CAP_BUFFER - sizeof(TPM_CAP) - sizeof(UINT32)) -#define MAX_CAP_ALGS (MAX_CAP_DATA / sizeof(TPMS_ALG_PROPERTY)) -#define MAX_CAP_HANDLES (MAX_CAP_DATA / sizeof(TPM_HANDLE)) -#define MAX_CAP_CC (MAX_CAP_DATA / sizeof(TPM_CC)) -#define MAX_TPM_PROPERTIES (MAX_CAP_DATA / sizeof(TPMS_TAGGED_PROPERTY)) -#define MAX_PCR_PROPERTIES (MAX_CAP_DATA / sizeof(TPMS_TAGGED_PCR_SELECT)) -#define MAX_ECC_CURVES (MAX_CAP_DATA / sizeof(TPM_ECC_CURVE)) +#define MAX_CAP_DATA (MAX_CAP_BUFFER - sizeof(TPM_CAP) - sizeof(UINT32)) +#define MAX_CAP_ALGS (MAX_CAP_DATA / sizeof(TPMS_ALG_PROPERTY)) +#define MAX_CAP_HANDLES (MAX_CAP_DATA / sizeof(TPM_HANDLE)) +#define MAX_CAP_CC (MAX_CAP_DATA / sizeof(TPM_CC)) +#define MAX_TPM_PROPERTIES (MAX_CAP_DATA / sizeof(TPMS_TAGGED_PROPERTY)) +#define MAX_PCR_PROPERTIES (MAX_CAP_DATA / sizeof(TPMS_TAGGED_PCR_SELECT)) +#define MAX_ECC_CURVES (MAX_CAP_DATA / sizeof(TPM_ECC_CURVE)) // // Always set 5 here, because we want to support all hash algo in BIOS. // -#define HASH_COUNT 5 +#define HASH_COUNT 5 // 5 Base Types @@ -146,8 +145,8 @@ typedef UINT8 BYTE; // // NOTE: Comment because it has same name as TPM1.2 (value is same, so not runtime issue) // -//typedef UINT32 TPM_ALGORITHM_ID; -//typedef UINT32 TPM_MODIFIER_INDICATOR; +// typedef UINT32 TPM_ALGORITHM_ID; +// typedef UINT32 TPM_MODIFIER_INDICATOR; typedef UINT32 TPM_AUTHORIZATION_SIZE; typedef UINT32 TPM_PARAMETER_SIZE; typedef UINT16 TPM_KEY_SIZE; @@ -157,481 +156,481 @@ typedef UINT16 TPM_KEY_BITS; // Table 6 - TPM_GENERATED Constants typedef UINT32 TPM_GENERATED; -#define TPM_GENERATED_VALUE (TPM_GENERATED)(0xff544347) +#define TPM_GENERATED_VALUE (TPM_GENERATED)(0xff544347) // Table 7 - TPM_ALG_ID Constants typedef UINT16 TPM_ALG_ID; // // NOTE: Comment some algo which has same name as TPM1.2 (value is same, so not runtime issue) // -#define TPM_ALG_ERROR (TPM_ALG_ID)(0x0000) -#define TPM_ALG_FIRST (TPM_ALG_ID)(0x0001) -//#define TPM_ALG_RSA (TPM_ALG_ID)(0x0001) -//#define TPM_ALG_SHA (TPM_ALG_ID)(0x0004) -#define TPM_ALG_SHA1 (TPM_ALG_ID)(0x0004) -//#define TPM_ALG_HMAC (TPM_ALG_ID)(0x0005) -#define TPM_ALG_AES (TPM_ALG_ID)(0x0006) -//#define TPM_ALG_MGF1 (TPM_ALG_ID)(0x0007) -#define TPM_ALG_KEYEDHASH (TPM_ALG_ID)(0x0008) -//#define TPM_ALG_XOR (TPM_ALG_ID)(0x000A) -#define TPM_ALG_SHA256 (TPM_ALG_ID)(0x000B) -#define TPM_ALG_SHA384 (TPM_ALG_ID)(0x000C) -#define TPM_ALG_SHA512 (TPM_ALG_ID)(0x000D) -#define TPM_ALG_NULL (TPM_ALG_ID)(0x0010) -#define TPM_ALG_SM3_256 (TPM_ALG_ID)(0x0012) -#define TPM_ALG_SM4 (TPM_ALG_ID)(0x0013) -#define TPM_ALG_RSASSA (TPM_ALG_ID)(0x0014) -#define TPM_ALG_RSAES (TPM_ALG_ID)(0x0015) -#define TPM_ALG_RSAPSS (TPM_ALG_ID)(0x0016) -#define TPM_ALG_OAEP (TPM_ALG_ID)(0x0017) -#define TPM_ALG_ECDSA (TPM_ALG_ID)(0x0018) -#define TPM_ALG_ECDH (TPM_ALG_ID)(0x0019) -#define TPM_ALG_ECDAA (TPM_ALG_ID)(0x001A) -#define TPM_ALG_SM2 (TPM_ALG_ID)(0x001B) -#define TPM_ALG_ECSCHNORR (TPM_ALG_ID)(0x001C) -#define TPM_ALG_ECMQV (TPM_ALG_ID)(0x001D) -#define TPM_ALG_KDF1_SP800_56a (TPM_ALG_ID)(0x0020) -#define TPM_ALG_KDF2 (TPM_ALG_ID)(0x0021) -#define TPM_ALG_KDF1_SP800_108 (TPM_ALG_ID)(0x0022) -#define TPM_ALG_ECC (TPM_ALG_ID)(0x0023) -#define TPM_ALG_SYMCIPHER (TPM_ALG_ID)(0x0025) -#define TPM_ALG_CTR (TPM_ALG_ID)(0x0040) -#define TPM_ALG_OFB (TPM_ALG_ID)(0x0041) -#define TPM_ALG_CBC (TPM_ALG_ID)(0x0042) -#define TPM_ALG_CFB (TPM_ALG_ID)(0x0043) -#define TPM_ALG_ECB (TPM_ALG_ID)(0x0044) -#define TPM_ALG_LAST (TPM_ALG_ID)(0x0044) +#define TPM_ALG_ERROR (TPM_ALG_ID)(0x0000) +#define TPM_ALG_FIRST (TPM_ALG_ID)(0x0001) +// #define TPM_ALG_RSA (TPM_ALG_ID)(0x0001) +// #define TPM_ALG_SHA (TPM_ALG_ID)(0x0004) +#define TPM_ALG_SHA1 (TPM_ALG_ID)(0x0004) +// #define TPM_ALG_HMAC (TPM_ALG_ID)(0x0005) +#define TPM_ALG_AES (TPM_ALG_ID)(0x0006) +// #define TPM_ALG_MGF1 (TPM_ALG_ID)(0x0007) +#define TPM_ALG_KEYEDHASH (TPM_ALG_ID)(0x0008) +// #define TPM_ALG_XOR (TPM_ALG_ID)(0x000A) +#define TPM_ALG_SHA256 (TPM_ALG_ID)(0x000B) +#define TPM_ALG_SHA384 (TPM_ALG_ID)(0x000C) +#define TPM_ALG_SHA512 (TPM_ALG_ID)(0x000D) +#define TPM_ALG_NULL (TPM_ALG_ID)(0x0010) +#define TPM_ALG_SM3_256 (TPM_ALG_ID)(0x0012) +#define TPM_ALG_SM4 (TPM_ALG_ID)(0x0013) +#define TPM_ALG_RSASSA (TPM_ALG_ID)(0x0014) +#define TPM_ALG_RSAES (TPM_ALG_ID)(0x0015) +#define TPM_ALG_RSAPSS (TPM_ALG_ID)(0x0016) +#define TPM_ALG_OAEP (TPM_ALG_ID)(0x0017) +#define TPM_ALG_ECDSA (TPM_ALG_ID)(0x0018) +#define TPM_ALG_ECDH (TPM_ALG_ID)(0x0019) +#define TPM_ALG_ECDAA (TPM_ALG_ID)(0x001A) +#define TPM_ALG_SM2 (TPM_ALG_ID)(0x001B) +#define TPM_ALG_ECSCHNORR (TPM_ALG_ID)(0x001C) +#define TPM_ALG_ECMQV (TPM_ALG_ID)(0x001D) +#define TPM_ALG_KDF1_SP800_56a (TPM_ALG_ID)(0x0020) +#define TPM_ALG_KDF2 (TPM_ALG_ID)(0x0021) +#define TPM_ALG_KDF1_SP800_108 (TPM_ALG_ID)(0x0022) +#define TPM_ALG_ECC (TPM_ALG_ID)(0x0023) +#define TPM_ALG_SYMCIPHER (TPM_ALG_ID)(0x0025) +#define TPM_ALG_CTR (TPM_ALG_ID)(0x0040) +#define TPM_ALG_OFB (TPM_ALG_ID)(0x0041) +#define TPM_ALG_CBC (TPM_ALG_ID)(0x0042) +#define TPM_ALG_CFB (TPM_ALG_ID)(0x0043) +#define TPM_ALG_ECB (TPM_ALG_ID)(0x0044) +#define TPM_ALG_LAST (TPM_ALG_ID)(0x0044) // Table 8 - TPM_ECC_CURVE Constants typedef UINT16 TPM_ECC_CURVE; -#define TPM_ECC_NONE (TPM_ECC_CURVE)(0x0000) -#define TPM_ECC_NIST_P192 (TPM_ECC_CURVE)(0x0001) -#define TPM_ECC_NIST_P224 (TPM_ECC_CURVE)(0x0002) -#define TPM_ECC_NIST_P256 (TPM_ECC_CURVE)(0x0003) -#define TPM_ECC_NIST_P384 (TPM_ECC_CURVE)(0x0004) -#define TPM_ECC_NIST_P521 (TPM_ECC_CURVE)(0x0005) -#define TPM_ECC_BN_P256 (TPM_ECC_CURVE)(0x0010) -#define TPM_ECC_BN_P638 (TPM_ECC_CURVE)(0x0011) -#define TPM_ECC_SM2_P256 (TPM_ECC_CURVE)(0x0020) +#define TPM_ECC_NONE (TPM_ECC_CURVE)(0x0000) +#define TPM_ECC_NIST_P192 (TPM_ECC_CURVE)(0x0001) +#define TPM_ECC_NIST_P224 (TPM_ECC_CURVE)(0x0002) +#define TPM_ECC_NIST_P256 (TPM_ECC_CURVE)(0x0003) +#define TPM_ECC_NIST_P384 (TPM_ECC_CURVE)(0x0004) +#define TPM_ECC_NIST_P521 (TPM_ECC_CURVE)(0x0005) +#define TPM_ECC_BN_P256 (TPM_ECC_CURVE)(0x0010) +#define TPM_ECC_BN_P638 (TPM_ECC_CURVE)(0x0011) +#define TPM_ECC_SM2_P256 (TPM_ECC_CURVE)(0x0020) // Table 11 - TPM_CC Constants (Numeric Order) typedef UINT32 TPM_CC; -#define TPM_CC_FIRST (TPM_CC)(0x0000011F) -#define TPM_CC_PP_FIRST (TPM_CC)(0x0000011F) -#define TPM_CC_NV_UndefineSpaceSpecial (TPM_CC)(0x0000011F) -#define TPM_CC_EvictControl (TPM_CC)(0x00000120) -#define TPM_CC_HierarchyControl (TPM_CC)(0x00000121) -#define TPM_CC_NV_UndefineSpace (TPM_CC)(0x00000122) -#define TPM_CC_ChangeEPS (TPM_CC)(0x00000124) -#define TPM_CC_ChangePPS (TPM_CC)(0x00000125) -#define TPM_CC_Clear (TPM_CC)(0x00000126) -#define TPM_CC_ClearControl (TPM_CC)(0x00000127) -#define TPM_CC_ClockSet (TPM_CC)(0x00000128) -#define TPM_CC_HierarchyChangeAuth (TPM_CC)(0x00000129) -#define TPM_CC_NV_DefineSpace (TPM_CC)(0x0000012A) -#define TPM_CC_PCR_Allocate (TPM_CC)(0x0000012B) -#define TPM_CC_PCR_SetAuthPolicy (TPM_CC)(0x0000012C) -#define TPM_CC_PP_Commands (TPM_CC)(0x0000012D) -#define TPM_CC_SetPrimaryPolicy (TPM_CC)(0x0000012E) -#define TPM_CC_FieldUpgradeStart (TPM_CC)(0x0000012F) -#define TPM_CC_ClockRateAdjust (TPM_CC)(0x00000130) -#define TPM_CC_CreatePrimary (TPM_CC)(0x00000131) -#define TPM_CC_NV_GlobalWriteLock (TPM_CC)(0x00000132) -#define TPM_CC_PP_LAST (TPM_CC)(0x00000132) -#define TPM_CC_GetCommandAuditDigest (TPM_CC)(0x00000133) -#define TPM_CC_NV_Increment (TPM_CC)(0x00000134) -#define TPM_CC_NV_SetBits (TPM_CC)(0x00000135) -#define TPM_CC_NV_Extend (TPM_CC)(0x00000136) -#define TPM_CC_NV_Write (TPM_CC)(0x00000137) -#define TPM_CC_NV_WriteLock (TPM_CC)(0x00000138) -#define TPM_CC_DictionaryAttackLockReset (TPM_CC)(0x00000139) -#define TPM_CC_DictionaryAttackParameters (TPM_CC)(0x0000013A) -#define TPM_CC_NV_ChangeAuth (TPM_CC)(0x0000013B) -#define TPM_CC_PCR_Event (TPM_CC)(0x0000013C) -#define TPM_CC_PCR_Reset (TPM_CC)(0x0000013D) -#define TPM_CC_SequenceComplete (TPM_CC)(0x0000013E) -#define TPM_CC_SetAlgorithmSet (TPM_CC)(0x0000013F) -#define TPM_CC_SetCommandCodeAuditStatus (TPM_CC)(0x00000140) -#define TPM_CC_FieldUpgradeData (TPM_CC)(0x00000141) -#define TPM_CC_IncrementalSelfTest (TPM_CC)(0x00000142) -#define TPM_CC_SelfTest (TPM_CC)(0x00000143) -#define TPM_CC_Startup (TPM_CC)(0x00000144) -#define TPM_CC_Shutdown (TPM_CC)(0x00000145) -#define TPM_CC_StirRandom (TPM_CC)(0x00000146) -#define TPM_CC_ActivateCredential (TPM_CC)(0x00000147) -#define TPM_CC_Certify (TPM_CC)(0x00000148) -#define TPM_CC_PolicyNV (TPM_CC)(0x00000149) -#define TPM_CC_CertifyCreation (TPM_CC)(0x0000014A) -#define TPM_CC_Duplicate (TPM_CC)(0x0000014B) -#define TPM_CC_GetTime (TPM_CC)(0x0000014C) -#define TPM_CC_GetSessionAuditDigest (TPM_CC)(0x0000014D) -#define TPM_CC_NV_Read (TPM_CC)(0x0000014E) -#define TPM_CC_NV_ReadLock (TPM_CC)(0x0000014F) -#define TPM_CC_ObjectChangeAuth (TPM_CC)(0x00000150) -#define TPM_CC_PolicySecret (TPM_CC)(0x00000151) -#define TPM_CC_Rewrap (TPM_CC)(0x00000152) -#define TPM_CC_Create (TPM_CC)(0x00000153) -#define TPM_CC_ECDH_ZGen (TPM_CC)(0x00000154) -#define TPM_CC_HMAC (TPM_CC)(0x00000155) -#define TPM_CC_Import (TPM_CC)(0x00000156) -#define TPM_CC_Load (TPM_CC)(0x00000157) -#define TPM_CC_Quote (TPM_CC)(0x00000158) -#define TPM_CC_RSA_Decrypt (TPM_CC)(0x00000159) -#define TPM_CC_HMAC_Start (TPM_CC)(0x0000015B) -#define TPM_CC_SequenceUpdate (TPM_CC)(0x0000015C) -#define TPM_CC_Sign (TPM_CC)(0x0000015D) -#define TPM_CC_Unseal (TPM_CC)(0x0000015E) -#define TPM_CC_PolicySigned (TPM_CC)(0x00000160) -#define TPM_CC_ContextLoad (TPM_CC)(0x00000161) -#define TPM_CC_ContextSave (TPM_CC)(0x00000162) -#define TPM_CC_ECDH_KeyGen (TPM_CC)(0x00000163) -#define TPM_CC_EncryptDecrypt (TPM_CC)(0x00000164) -#define TPM_CC_FlushContext (TPM_CC)(0x00000165) -#define TPM_CC_LoadExternal (TPM_CC)(0x00000167) -#define TPM_CC_MakeCredential (TPM_CC)(0x00000168) -#define TPM_CC_NV_ReadPublic (TPM_CC)(0x00000169) -#define TPM_CC_PolicyAuthorize (TPM_CC)(0x0000016A) -#define TPM_CC_PolicyAuthValue (TPM_CC)(0x0000016B) -#define TPM_CC_PolicyCommandCode (TPM_CC)(0x0000016C) -#define TPM_CC_PolicyCounterTimer (TPM_CC)(0x0000016D) -#define TPM_CC_PolicyCpHash (TPM_CC)(0x0000016E) -#define TPM_CC_PolicyLocality (TPM_CC)(0x0000016F) -#define TPM_CC_PolicyNameHash (TPM_CC)(0x00000170) -#define TPM_CC_PolicyOR (TPM_CC)(0x00000171) -#define TPM_CC_PolicyTicket (TPM_CC)(0x00000172) -#define TPM_CC_ReadPublic (TPM_CC)(0x00000173) -#define TPM_CC_RSA_Encrypt (TPM_CC)(0x00000174) -#define TPM_CC_StartAuthSession (TPM_CC)(0x00000176) -#define TPM_CC_VerifySignature (TPM_CC)(0x00000177) -#define TPM_CC_ECC_Parameters (TPM_CC)(0x00000178) -#define TPM_CC_FirmwareRead (TPM_CC)(0x00000179) -#define TPM_CC_GetCapability (TPM_CC)(0x0000017A) -#define TPM_CC_GetRandom (TPM_CC)(0x0000017B) -#define TPM_CC_GetTestResult (TPM_CC)(0x0000017C) -#define TPM_CC_Hash (TPM_CC)(0x0000017D) -#define TPM_CC_PCR_Read (TPM_CC)(0x0000017E) -#define TPM_CC_PolicyPCR (TPM_CC)(0x0000017F) -#define TPM_CC_PolicyRestart (TPM_CC)(0x00000180) -#define TPM_CC_ReadClock (TPM_CC)(0x00000181) -#define TPM_CC_PCR_Extend (TPM_CC)(0x00000182) -#define TPM_CC_PCR_SetAuthValue (TPM_CC)(0x00000183) -#define TPM_CC_NV_Certify (TPM_CC)(0x00000184) -#define TPM_CC_EventSequenceComplete (TPM_CC)(0x00000185) -#define TPM_CC_HashSequenceStart (TPM_CC)(0x00000186) -#define TPM_CC_PolicyPhysicalPresence (TPM_CC)(0x00000187) -#define TPM_CC_PolicyDuplicationSelect (TPM_CC)(0x00000188) -#define TPM_CC_PolicyGetDigest (TPM_CC)(0x00000189) -#define TPM_CC_TestParms (TPM_CC)(0x0000018A) -#define TPM_CC_Commit (TPM_CC)(0x0000018B) -#define TPM_CC_PolicyPassword (TPM_CC)(0x0000018C) -#define TPM_CC_ZGen_2Phase (TPM_CC)(0x0000018D) -#define TPM_CC_EC_Ephemeral (TPM_CC)(0x0000018E) -#define TPM_CC_LAST (TPM_CC)(0x0000018E) +#define TPM_CC_FIRST (TPM_CC)(0x0000011F) +#define TPM_CC_PP_FIRST (TPM_CC)(0x0000011F) +#define TPM_CC_NV_UndefineSpaceSpecial (TPM_CC)(0x0000011F) +#define TPM_CC_EvictControl (TPM_CC)(0x00000120) +#define TPM_CC_HierarchyControl (TPM_CC)(0x00000121) +#define TPM_CC_NV_UndefineSpace (TPM_CC)(0x00000122) +#define TPM_CC_ChangeEPS (TPM_CC)(0x00000124) +#define TPM_CC_ChangePPS (TPM_CC)(0x00000125) +#define TPM_CC_Clear (TPM_CC)(0x00000126) +#define TPM_CC_ClearControl (TPM_CC)(0x00000127) +#define TPM_CC_ClockSet (TPM_CC)(0x00000128) +#define TPM_CC_HierarchyChangeAuth (TPM_CC)(0x00000129) +#define TPM_CC_NV_DefineSpace (TPM_CC)(0x0000012A) +#define TPM_CC_PCR_Allocate (TPM_CC)(0x0000012B) +#define TPM_CC_PCR_SetAuthPolicy (TPM_CC)(0x0000012C) +#define TPM_CC_PP_Commands (TPM_CC)(0x0000012D) +#define TPM_CC_SetPrimaryPolicy (TPM_CC)(0x0000012E) +#define TPM_CC_FieldUpgradeStart (TPM_CC)(0x0000012F) +#define TPM_CC_ClockRateAdjust (TPM_CC)(0x00000130) +#define TPM_CC_CreatePrimary (TPM_CC)(0x00000131) +#define TPM_CC_NV_GlobalWriteLock (TPM_CC)(0x00000132) +#define TPM_CC_PP_LAST (TPM_CC)(0x00000132) +#define TPM_CC_GetCommandAuditDigest (TPM_CC)(0x00000133) +#define TPM_CC_NV_Increment (TPM_CC)(0x00000134) +#define TPM_CC_NV_SetBits (TPM_CC)(0x00000135) +#define TPM_CC_NV_Extend (TPM_CC)(0x00000136) +#define TPM_CC_NV_Write (TPM_CC)(0x00000137) +#define TPM_CC_NV_WriteLock (TPM_CC)(0x00000138) +#define TPM_CC_DictionaryAttackLockReset (TPM_CC)(0x00000139) +#define TPM_CC_DictionaryAttackParameters (TPM_CC)(0x0000013A) +#define TPM_CC_NV_ChangeAuth (TPM_CC)(0x0000013B) +#define TPM_CC_PCR_Event (TPM_CC)(0x0000013C) +#define TPM_CC_PCR_Reset (TPM_CC)(0x0000013D) +#define TPM_CC_SequenceComplete (TPM_CC)(0x0000013E) +#define TPM_CC_SetAlgorithmSet (TPM_CC)(0x0000013F) +#define TPM_CC_SetCommandCodeAuditStatus (TPM_CC)(0x00000140) +#define TPM_CC_FieldUpgradeData (TPM_CC)(0x00000141) +#define TPM_CC_IncrementalSelfTest (TPM_CC)(0x00000142) +#define TPM_CC_SelfTest (TPM_CC)(0x00000143) +#define TPM_CC_Startup (TPM_CC)(0x00000144) +#define TPM_CC_Shutdown (TPM_CC)(0x00000145) +#define TPM_CC_StirRandom (TPM_CC)(0x00000146) +#define TPM_CC_ActivateCredential (TPM_CC)(0x00000147) +#define TPM_CC_Certify (TPM_CC)(0x00000148) +#define TPM_CC_PolicyNV (TPM_CC)(0x00000149) +#define TPM_CC_CertifyCreation (TPM_CC)(0x0000014A) +#define TPM_CC_Duplicate (TPM_CC)(0x0000014B) +#define TPM_CC_GetTime (TPM_CC)(0x0000014C) +#define TPM_CC_GetSessionAuditDigest (TPM_CC)(0x0000014D) +#define TPM_CC_NV_Read (TPM_CC)(0x0000014E) +#define TPM_CC_NV_ReadLock (TPM_CC)(0x0000014F) +#define TPM_CC_ObjectChangeAuth (TPM_CC)(0x00000150) +#define TPM_CC_PolicySecret (TPM_CC)(0x00000151) +#define TPM_CC_Rewrap (TPM_CC)(0x00000152) +#define TPM_CC_Create (TPM_CC)(0x00000153) +#define TPM_CC_ECDH_ZGen (TPM_CC)(0x00000154) +#define TPM_CC_HMAC (TPM_CC)(0x00000155) +#define TPM_CC_Import (TPM_CC)(0x00000156) +#define TPM_CC_Load (TPM_CC)(0x00000157) +#define TPM_CC_Quote (TPM_CC)(0x00000158) +#define TPM_CC_RSA_Decrypt (TPM_CC)(0x00000159) +#define TPM_CC_HMAC_Start (TPM_CC)(0x0000015B) +#define TPM_CC_SequenceUpdate (TPM_CC)(0x0000015C) +#define TPM_CC_Sign (TPM_CC)(0x0000015D) +#define TPM_CC_Unseal (TPM_CC)(0x0000015E) +#define TPM_CC_PolicySigned (TPM_CC)(0x00000160) +#define TPM_CC_ContextLoad (TPM_CC)(0x00000161) +#define TPM_CC_ContextSave (TPM_CC)(0x00000162) +#define TPM_CC_ECDH_KeyGen (TPM_CC)(0x00000163) +#define TPM_CC_EncryptDecrypt (TPM_CC)(0x00000164) +#define TPM_CC_FlushContext (TPM_CC)(0x00000165) +#define TPM_CC_LoadExternal (TPM_CC)(0x00000167) +#define TPM_CC_MakeCredential (TPM_CC)(0x00000168) +#define TPM_CC_NV_ReadPublic (TPM_CC)(0x00000169) +#define TPM_CC_PolicyAuthorize (TPM_CC)(0x0000016A) +#define TPM_CC_PolicyAuthValue (TPM_CC)(0x0000016B) +#define TPM_CC_PolicyCommandCode (TPM_CC)(0x0000016C) +#define TPM_CC_PolicyCounterTimer (TPM_CC)(0x0000016D) +#define TPM_CC_PolicyCpHash (TPM_CC)(0x0000016E) +#define TPM_CC_PolicyLocality (TPM_CC)(0x0000016F) +#define TPM_CC_PolicyNameHash (TPM_CC)(0x00000170) +#define TPM_CC_PolicyOR (TPM_CC)(0x00000171) +#define TPM_CC_PolicyTicket (TPM_CC)(0x00000172) +#define TPM_CC_ReadPublic (TPM_CC)(0x00000173) +#define TPM_CC_RSA_Encrypt (TPM_CC)(0x00000174) +#define TPM_CC_StartAuthSession (TPM_CC)(0x00000176) +#define TPM_CC_VerifySignature (TPM_CC)(0x00000177) +#define TPM_CC_ECC_Parameters (TPM_CC)(0x00000178) +#define TPM_CC_FirmwareRead (TPM_CC)(0x00000179) +#define TPM_CC_GetCapability (TPM_CC)(0x0000017A) +#define TPM_CC_GetRandom (TPM_CC)(0x0000017B) +#define TPM_CC_GetTestResult (TPM_CC)(0x0000017C) +#define TPM_CC_Hash (TPM_CC)(0x0000017D) +#define TPM_CC_PCR_Read (TPM_CC)(0x0000017E) +#define TPM_CC_PolicyPCR (TPM_CC)(0x0000017F) +#define TPM_CC_PolicyRestart (TPM_CC)(0x00000180) +#define TPM_CC_ReadClock (TPM_CC)(0x00000181) +#define TPM_CC_PCR_Extend (TPM_CC)(0x00000182) +#define TPM_CC_PCR_SetAuthValue (TPM_CC)(0x00000183) +#define TPM_CC_NV_Certify (TPM_CC)(0x00000184) +#define TPM_CC_EventSequenceComplete (TPM_CC)(0x00000185) +#define TPM_CC_HashSequenceStart (TPM_CC)(0x00000186) +#define TPM_CC_PolicyPhysicalPresence (TPM_CC)(0x00000187) +#define TPM_CC_PolicyDuplicationSelect (TPM_CC)(0x00000188) +#define TPM_CC_PolicyGetDigest (TPM_CC)(0x00000189) +#define TPM_CC_TestParms (TPM_CC)(0x0000018A) +#define TPM_CC_Commit (TPM_CC)(0x0000018B) +#define TPM_CC_PolicyPassword (TPM_CC)(0x0000018C) +#define TPM_CC_ZGen_2Phase (TPM_CC)(0x0000018D) +#define TPM_CC_EC_Ephemeral (TPM_CC)(0x0000018E) +#define TPM_CC_LAST (TPM_CC)(0x0000018E) // Table 15 - TPM_RC Constants (Actions) typedef UINT32 TPM_RC; -#define TPM_RC_SUCCESS (TPM_RC)(0x000) -#define TPM_RC_BAD_TAG (TPM_RC)(0x030) -#define RC_VER1 (TPM_RC)(0x100) -#define TPM_RC_INITIALIZE (TPM_RC)(RC_VER1 + 0x000) -#define TPM_RC_FAILURE (TPM_RC)(RC_VER1 + 0x001) -#define TPM_RC_SEQUENCE (TPM_RC)(RC_VER1 + 0x003) -#define TPM_RC_PRIVATE (TPM_RC)(RC_VER1 + 0x00B) -#define TPM_RC_HMAC (TPM_RC)(RC_VER1 + 0x019) -#define TPM_RC_DISABLED (TPM_RC)(RC_VER1 + 0x020) -#define TPM_RC_EXCLUSIVE (TPM_RC)(RC_VER1 + 0x021) -#define TPM_RC_AUTH_TYPE (TPM_RC)(RC_VER1 + 0x024) -#define TPM_RC_AUTH_MISSING (TPM_RC)(RC_VER1 + 0x025) -#define TPM_RC_POLICY (TPM_RC)(RC_VER1 + 0x026) -#define TPM_RC_PCR (TPM_RC)(RC_VER1 + 0x027) -#define TPM_RC_PCR_CHANGED (TPM_RC)(RC_VER1 + 0x028) -#define TPM_RC_UPGRADE (TPM_RC)(RC_VER1 + 0x02D) -#define TPM_RC_TOO_MANY_CONTEXTS (TPM_RC)(RC_VER1 + 0x02E) -#define TPM_RC_AUTH_UNAVAILABLE (TPM_RC)(RC_VER1 + 0x02F) -#define TPM_RC_REBOOT (TPM_RC)(RC_VER1 + 0x030) -#define TPM_RC_UNBALANCED (TPM_RC)(RC_VER1 + 0x031) -#define TPM_RC_COMMAND_SIZE (TPM_RC)(RC_VER1 + 0x042) -#define TPM_RC_COMMAND_CODE (TPM_RC)(RC_VER1 + 0x043) -#define TPM_RC_AUTHSIZE (TPM_RC)(RC_VER1 + 0x044) -#define TPM_RC_AUTH_CONTEXT (TPM_RC)(RC_VER1 + 0x045) -#define TPM_RC_NV_RANGE (TPM_RC)(RC_VER1 + 0x046) -#define TPM_RC_NV_SIZE (TPM_RC)(RC_VER1 + 0x047) -#define TPM_RC_NV_LOCKED (TPM_RC)(RC_VER1 + 0x048) -#define TPM_RC_NV_AUTHORIZATION (TPM_RC)(RC_VER1 + 0x049) -#define TPM_RC_NV_UNINITIALIZED (TPM_RC)(RC_VER1 + 0x04A) -#define TPM_RC_NV_SPACE (TPM_RC)(RC_VER1 + 0x04B) -#define TPM_RC_NV_DEFINED (TPM_RC)(RC_VER1 + 0x04C) -#define TPM_RC_BAD_CONTEXT (TPM_RC)(RC_VER1 + 0x050) -#define TPM_RC_CPHASH (TPM_RC)(RC_VER1 + 0x051) -#define TPM_RC_PARENT (TPM_RC)(RC_VER1 + 0x052) -#define TPM_RC_NEEDS_TEST (TPM_RC)(RC_VER1 + 0x053) -#define TPM_RC_NO_RESULT (TPM_RC)(RC_VER1 + 0x054) -#define TPM_RC_SENSITIVE (TPM_RC)(RC_VER1 + 0x055) -#define RC_MAX_FM0 (TPM_RC)(RC_VER1 + 0x07F) -#define RC_FMT1 (TPM_RC)(0x080) -#define TPM_RC_ASYMMETRIC (TPM_RC)(RC_FMT1 + 0x001) -#define TPM_RC_ATTRIBUTES (TPM_RC)(RC_FMT1 + 0x002) -#define TPM_RC_HASH (TPM_RC)(RC_FMT1 + 0x003) -#define TPM_RC_VALUE (TPM_RC)(RC_FMT1 + 0x004) -#define TPM_RC_HIERARCHY (TPM_RC)(RC_FMT1 + 0x005) -#define TPM_RC_KEY_SIZE (TPM_RC)(RC_FMT1 + 0x007) -#define TPM_RC_MGF (TPM_RC)(RC_FMT1 + 0x008) -#define TPM_RC_MODE (TPM_RC)(RC_FMT1 + 0x009) -#define TPM_RC_TYPE (TPM_RC)(RC_FMT1 + 0x00A) -#define TPM_RC_HANDLE (TPM_RC)(RC_FMT1 + 0x00B) -#define TPM_RC_KDF (TPM_RC)(RC_FMT1 + 0x00C) -#define TPM_RC_RANGE (TPM_RC)(RC_FMT1 + 0x00D) -#define TPM_RC_AUTH_FAIL (TPM_RC)(RC_FMT1 + 0x00E) -#define TPM_RC_NONCE (TPM_RC)(RC_FMT1 + 0x00F) -#define TPM_RC_PP (TPM_RC)(RC_FMT1 + 0x010) -#define TPM_RC_SCHEME (TPM_RC)(RC_FMT1 + 0x012) -#define TPM_RC_SIZE (TPM_RC)(RC_FMT1 + 0x015) -#define TPM_RC_SYMMETRIC (TPM_RC)(RC_FMT1 + 0x016) -#define TPM_RC_TAG (TPM_RC)(RC_FMT1 + 0x017) -#define TPM_RC_SELECTOR (TPM_RC)(RC_FMT1 + 0x018) -#define TPM_RC_INSUFFICIENT (TPM_RC)(RC_FMT1 + 0x01A) -#define TPM_RC_SIGNATURE (TPM_RC)(RC_FMT1 + 0x01B) -#define TPM_RC_KEY (TPM_RC)(RC_FMT1 + 0x01C) -#define TPM_RC_POLICY_FAIL (TPM_RC)(RC_FMT1 + 0x01D) -#define TPM_RC_INTEGRITY (TPM_RC)(RC_FMT1 + 0x01F) -#define TPM_RC_TICKET (TPM_RC)(RC_FMT1 + 0x020) -#define TPM_RC_RESERVED_BITS (TPM_RC)(RC_FMT1 + 0x021) -#define TPM_RC_BAD_AUTH (TPM_RC)(RC_FMT1 + 0x022) -#define TPM_RC_EXPIRED (TPM_RC)(RC_FMT1 + 0x023) -#define TPM_RC_POLICY_CC (TPM_RC)(RC_FMT1 + 0x024 ) -#define TPM_RC_BINDING (TPM_RC)(RC_FMT1 + 0x025) -#define TPM_RC_CURVE (TPM_RC)(RC_FMT1 + 0x026) -#define TPM_RC_ECC_POINT (TPM_RC)(RC_FMT1 + 0x027) -#define RC_WARN (TPM_RC)(0x900) -#define TPM_RC_CONTEXT_GAP (TPM_RC)(RC_WARN + 0x001) -#define TPM_RC_OBJECT_MEMORY (TPM_RC)(RC_WARN + 0x002) -#define TPM_RC_SESSION_MEMORY (TPM_RC)(RC_WARN + 0x003) -#define TPM_RC_MEMORY (TPM_RC)(RC_WARN + 0x004) -#define TPM_RC_SESSION_HANDLES (TPM_RC)(RC_WARN + 0x005) -#define TPM_RC_OBJECT_HANDLES (TPM_RC)(RC_WARN + 0x006) -#define TPM_RC_LOCALITY (TPM_RC)(RC_WARN + 0x007) -#define TPM_RC_YIELDED (TPM_RC)(RC_WARN + 0x008) -#define TPM_RC_CANCELED (TPM_RC)(RC_WARN + 0x009) -#define TPM_RC_TESTING (TPM_RC)(RC_WARN + 0x00A) -#define TPM_RC_REFERENCE_H0 (TPM_RC)(RC_WARN + 0x010) -#define TPM_RC_REFERENCE_H1 (TPM_RC)(RC_WARN + 0x011) -#define TPM_RC_REFERENCE_H2 (TPM_RC)(RC_WARN + 0x012) -#define TPM_RC_REFERENCE_H3 (TPM_RC)(RC_WARN + 0x013) -#define TPM_RC_REFERENCE_H4 (TPM_RC)(RC_WARN + 0x014) -#define TPM_RC_REFERENCE_H5 (TPM_RC)(RC_WARN + 0x015) -#define TPM_RC_REFERENCE_H6 (TPM_RC)(RC_WARN + 0x016) -#define TPM_RC_REFERENCE_S0 (TPM_RC)(RC_WARN + 0x018) -#define TPM_RC_REFERENCE_S1 (TPM_RC)(RC_WARN + 0x019) -#define TPM_RC_REFERENCE_S2 (TPM_RC)(RC_WARN + 0x01A) -#define TPM_RC_REFERENCE_S3 (TPM_RC)(RC_WARN + 0x01B) -#define TPM_RC_REFERENCE_S4 (TPM_RC)(RC_WARN + 0x01C) -#define TPM_RC_REFERENCE_S5 (TPM_RC)(RC_WARN + 0x01D) -#define TPM_RC_REFERENCE_S6 (TPM_RC)(RC_WARN + 0x01E) -#define TPM_RC_NV_RATE (TPM_RC)(RC_WARN + 0x020) -#define TPM_RC_LOCKOUT (TPM_RC)(RC_WARN + 0x021) -#define TPM_RC_RETRY (TPM_RC)(RC_WARN + 0x022) -#define TPM_RC_NV_UNAVAILABLE (TPM_RC)(RC_WARN + 0x023) -#define TPM_RC_NOT_USED (TPM_RC)(RC_WARN + 0x7F) -#define TPM_RC_H (TPM_RC)(0x000) -#define TPM_RC_P (TPM_RC)(0x040) -#define TPM_RC_S (TPM_RC)(0x800) -#define TPM_RC_1 (TPM_RC)(0x100) -#define TPM_RC_2 (TPM_RC)(0x200) -#define TPM_RC_3 (TPM_RC)(0x300) -#define TPM_RC_4 (TPM_RC)(0x400) -#define TPM_RC_5 (TPM_RC)(0x500) -#define TPM_RC_6 (TPM_RC)(0x600) -#define TPM_RC_7 (TPM_RC)(0x700) -#define TPM_RC_8 (TPM_RC)(0x800) -#define TPM_RC_9 (TPM_RC)(0x900) -#define TPM_RC_A (TPM_RC)(0xA00) -#define TPM_RC_B (TPM_RC)(0xB00) -#define TPM_RC_C (TPM_RC)(0xC00) -#define TPM_RC_D (TPM_RC)(0xD00) -#define TPM_RC_E (TPM_RC)(0xE00) -#define TPM_RC_F (TPM_RC)(0xF00) -#define TPM_RC_N_MASK (TPM_RC)(0xF00) +#define TPM_RC_SUCCESS (TPM_RC)(0x000) +#define TPM_RC_BAD_TAG (TPM_RC)(0x030) +#define RC_VER1 (TPM_RC)(0x100) +#define TPM_RC_INITIALIZE (TPM_RC)(RC_VER1 + 0x000) +#define TPM_RC_FAILURE (TPM_RC)(RC_VER1 + 0x001) +#define TPM_RC_SEQUENCE (TPM_RC)(RC_VER1 + 0x003) +#define TPM_RC_PRIVATE (TPM_RC)(RC_VER1 + 0x00B) +#define TPM_RC_HMAC (TPM_RC)(RC_VER1 + 0x019) +#define TPM_RC_DISABLED (TPM_RC)(RC_VER1 + 0x020) +#define TPM_RC_EXCLUSIVE (TPM_RC)(RC_VER1 + 0x021) +#define TPM_RC_AUTH_TYPE (TPM_RC)(RC_VER1 + 0x024) +#define TPM_RC_AUTH_MISSING (TPM_RC)(RC_VER1 + 0x025) +#define TPM_RC_POLICY (TPM_RC)(RC_VER1 + 0x026) +#define TPM_RC_PCR (TPM_RC)(RC_VER1 + 0x027) +#define TPM_RC_PCR_CHANGED (TPM_RC)(RC_VER1 + 0x028) +#define TPM_RC_UPGRADE (TPM_RC)(RC_VER1 + 0x02D) +#define TPM_RC_TOO_MANY_CONTEXTS (TPM_RC)(RC_VER1 + 0x02E) +#define TPM_RC_AUTH_UNAVAILABLE (TPM_RC)(RC_VER1 + 0x02F) +#define TPM_RC_REBOOT (TPM_RC)(RC_VER1 + 0x030) +#define TPM_RC_UNBALANCED (TPM_RC)(RC_VER1 + 0x031) +#define TPM_RC_COMMAND_SIZE (TPM_RC)(RC_VER1 + 0x042) +#define TPM_RC_COMMAND_CODE (TPM_RC)(RC_VER1 + 0x043) +#define TPM_RC_AUTHSIZE (TPM_RC)(RC_VER1 + 0x044) +#define TPM_RC_AUTH_CONTEXT (TPM_RC)(RC_VER1 + 0x045) +#define TPM_RC_NV_RANGE (TPM_RC)(RC_VER1 + 0x046) +#define TPM_RC_NV_SIZE (TPM_RC)(RC_VER1 + 0x047) +#define TPM_RC_NV_LOCKED (TPM_RC)(RC_VER1 + 0x048) +#define TPM_RC_NV_AUTHORIZATION (TPM_RC)(RC_VER1 + 0x049) +#define TPM_RC_NV_UNINITIALIZED (TPM_RC)(RC_VER1 + 0x04A) +#define TPM_RC_NV_SPACE (TPM_RC)(RC_VER1 + 0x04B) +#define TPM_RC_NV_DEFINED (TPM_RC)(RC_VER1 + 0x04C) +#define TPM_RC_BAD_CONTEXT (TPM_RC)(RC_VER1 + 0x050) +#define TPM_RC_CPHASH (TPM_RC)(RC_VER1 + 0x051) +#define TPM_RC_PARENT (TPM_RC)(RC_VER1 + 0x052) +#define TPM_RC_NEEDS_TEST (TPM_RC)(RC_VER1 + 0x053) +#define TPM_RC_NO_RESULT (TPM_RC)(RC_VER1 + 0x054) +#define TPM_RC_SENSITIVE (TPM_RC)(RC_VER1 + 0x055) +#define RC_MAX_FM0 (TPM_RC)(RC_VER1 + 0x07F) +#define RC_FMT1 (TPM_RC)(0x080) +#define TPM_RC_ASYMMETRIC (TPM_RC)(RC_FMT1 + 0x001) +#define TPM_RC_ATTRIBUTES (TPM_RC)(RC_FMT1 + 0x002) +#define TPM_RC_HASH (TPM_RC)(RC_FMT1 + 0x003) +#define TPM_RC_VALUE (TPM_RC)(RC_FMT1 + 0x004) +#define TPM_RC_HIERARCHY (TPM_RC)(RC_FMT1 + 0x005) +#define TPM_RC_KEY_SIZE (TPM_RC)(RC_FMT1 + 0x007) +#define TPM_RC_MGF (TPM_RC)(RC_FMT1 + 0x008) +#define TPM_RC_MODE (TPM_RC)(RC_FMT1 + 0x009) +#define TPM_RC_TYPE (TPM_RC)(RC_FMT1 + 0x00A) +#define TPM_RC_HANDLE (TPM_RC)(RC_FMT1 + 0x00B) +#define TPM_RC_KDF (TPM_RC)(RC_FMT1 + 0x00C) +#define TPM_RC_RANGE (TPM_RC)(RC_FMT1 + 0x00D) +#define TPM_RC_AUTH_FAIL (TPM_RC)(RC_FMT1 + 0x00E) +#define TPM_RC_NONCE (TPM_RC)(RC_FMT1 + 0x00F) +#define TPM_RC_PP (TPM_RC)(RC_FMT1 + 0x010) +#define TPM_RC_SCHEME (TPM_RC)(RC_FMT1 + 0x012) +#define TPM_RC_SIZE (TPM_RC)(RC_FMT1 + 0x015) +#define TPM_RC_SYMMETRIC (TPM_RC)(RC_FMT1 + 0x016) +#define TPM_RC_TAG (TPM_RC)(RC_FMT1 + 0x017) +#define TPM_RC_SELECTOR (TPM_RC)(RC_FMT1 + 0x018) +#define TPM_RC_INSUFFICIENT (TPM_RC)(RC_FMT1 + 0x01A) +#define TPM_RC_SIGNATURE (TPM_RC)(RC_FMT1 + 0x01B) +#define TPM_RC_KEY (TPM_RC)(RC_FMT1 + 0x01C) +#define TPM_RC_POLICY_FAIL (TPM_RC)(RC_FMT1 + 0x01D) +#define TPM_RC_INTEGRITY (TPM_RC)(RC_FMT1 + 0x01F) +#define TPM_RC_TICKET (TPM_RC)(RC_FMT1 + 0x020) +#define TPM_RC_RESERVED_BITS (TPM_RC)(RC_FMT1 + 0x021) +#define TPM_RC_BAD_AUTH (TPM_RC)(RC_FMT1 + 0x022) +#define TPM_RC_EXPIRED (TPM_RC)(RC_FMT1 + 0x023) +#define TPM_RC_POLICY_CC (TPM_RC)(RC_FMT1 + 0x024 ) +#define TPM_RC_BINDING (TPM_RC)(RC_FMT1 + 0x025) +#define TPM_RC_CURVE (TPM_RC)(RC_FMT1 + 0x026) +#define TPM_RC_ECC_POINT (TPM_RC)(RC_FMT1 + 0x027) +#define RC_WARN (TPM_RC)(0x900) +#define TPM_RC_CONTEXT_GAP (TPM_RC)(RC_WARN + 0x001) +#define TPM_RC_OBJECT_MEMORY (TPM_RC)(RC_WARN + 0x002) +#define TPM_RC_SESSION_MEMORY (TPM_RC)(RC_WARN + 0x003) +#define TPM_RC_MEMORY (TPM_RC)(RC_WARN + 0x004) +#define TPM_RC_SESSION_HANDLES (TPM_RC)(RC_WARN + 0x005) +#define TPM_RC_OBJECT_HANDLES (TPM_RC)(RC_WARN + 0x006) +#define TPM_RC_LOCALITY (TPM_RC)(RC_WARN + 0x007) +#define TPM_RC_YIELDED (TPM_RC)(RC_WARN + 0x008) +#define TPM_RC_CANCELED (TPM_RC)(RC_WARN + 0x009) +#define TPM_RC_TESTING (TPM_RC)(RC_WARN + 0x00A) +#define TPM_RC_REFERENCE_H0 (TPM_RC)(RC_WARN + 0x010) +#define TPM_RC_REFERENCE_H1 (TPM_RC)(RC_WARN + 0x011) +#define TPM_RC_REFERENCE_H2 (TPM_RC)(RC_WARN + 0x012) +#define TPM_RC_REFERENCE_H3 (TPM_RC)(RC_WARN + 0x013) +#define TPM_RC_REFERENCE_H4 (TPM_RC)(RC_WARN + 0x014) +#define TPM_RC_REFERENCE_H5 (TPM_RC)(RC_WARN + 0x015) +#define TPM_RC_REFERENCE_H6 (TPM_RC)(RC_WARN + 0x016) +#define TPM_RC_REFERENCE_S0 (TPM_RC)(RC_WARN + 0x018) +#define TPM_RC_REFERENCE_S1 (TPM_RC)(RC_WARN + 0x019) +#define TPM_RC_REFERENCE_S2 (TPM_RC)(RC_WARN + 0x01A) +#define TPM_RC_REFERENCE_S3 (TPM_RC)(RC_WARN + 0x01B) +#define TPM_RC_REFERENCE_S4 (TPM_RC)(RC_WARN + 0x01C) +#define TPM_RC_REFERENCE_S5 (TPM_RC)(RC_WARN + 0x01D) +#define TPM_RC_REFERENCE_S6 (TPM_RC)(RC_WARN + 0x01E) +#define TPM_RC_NV_RATE (TPM_RC)(RC_WARN + 0x020) +#define TPM_RC_LOCKOUT (TPM_RC)(RC_WARN + 0x021) +#define TPM_RC_RETRY (TPM_RC)(RC_WARN + 0x022) +#define TPM_RC_NV_UNAVAILABLE (TPM_RC)(RC_WARN + 0x023) +#define TPM_RC_NOT_USED (TPM_RC)(RC_WARN + 0x7F) +#define TPM_RC_H (TPM_RC)(0x000) +#define TPM_RC_P (TPM_RC)(0x040) +#define TPM_RC_S (TPM_RC)(0x800) +#define TPM_RC_1 (TPM_RC)(0x100) +#define TPM_RC_2 (TPM_RC)(0x200) +#define TPM_RC_3 (TPM_RC)(0x300) +#define TPM_RC_4 (TPM_RC)(0x400) +#define TPM_RC_5 (TPM_RC)(0x500) +#define TPM_RC_6 (TPM_RC)(0x600) +#define TPM_RC_7 (TPM_RC)(0x700) +#define TPM_RC_8 (TPM_RC)(0x800) +#define TPM_RC_9 (TPM_RC)(0x900) +#define TPM_RC_A (TPM_RC)(0xA00) +#define TPM_RC_B (TPM_RC)(0xB00) +#define TPM_RC_C (TPM_RC)(0xC00) +#define TPM_RC_D (TPM_RC)(0xD00) +#define TPM_RC_E (TPM_RC)(0xE00) +#define TPM_RC_F (TPM_RC)(0xF00) +#define TPM_RC_N_MASK (TPM_RC)(0xF00) // Table 16 - TPM_CLOCK_ADJUST Constants typedef INT8 TPM_CLOCK_ADJUST; -#define TPM_CLOCK_COARSE_SLOWER (TPM_CLOCK_ADJUST)(-3) -#define TPM_CLOCK_MEDIUM_SLOWER (TPM_CLOCK_ADJUST)(-2) -#define TPM_CLOCK_FINE_SLOWER (TPM_CLOCK_ADJUST)(-1) -#define TPM_CLOCK_NO_CHANGE (TPM_CLOCK_ADJUST)(0) -#define TPM_CLOCK_FINE_FASTER (TPM_CLOCK_ADJUST)(1) -#define TPM_CLOCK_MEDIUM_FASTER (TPM_CLOCK_ADJUST)(2) -#define TPM_CLOCK_COARSE_FASTER (TPM_CLOCK_ADJUST)(3) +#define TPM_CLOCK_COARSE_SLOWER (TPM_CLOCK_ADJUST)(-3) +#define TPM_CLOCK_MEDIUM_SLOWER (TPM_CLOCK_ADJUST)(-2) +#define TPM_CLOCK_FINE_SLOWER (TPM_CLOCK_ADJUST)(-1) +#define TPM_CLOCK_NO_CHANGE (TPM_CLOCK_ADJUST)(0) +#define TPM_CLOCK_FINE_FASTER (TPM_CLOCK_ADJUST)(1) +#define TPM_CLOCK_MEDIUM_FASTER (TPM_CLOCK_ADJUST)(2) +#define TPM_CLOCK_COARSE_FASTER (TPM_CLOCK_ADJUST)(3) // Table 17 - TPM_EO Constants typedef UINT16 TPM_EO; -#define TPM_EO_EQ (TPM_EO)(0x0000) -#define TPM_EO_NEQ (TPM_EO)(0x0001) -#define TPM_EO_SIGNED_GT (TPM_EO)(0x0002) -#define TPM_EO_UNSIGNED_GT (TPM_EO)(0x0003) -#define TPM_EO_SIGNED_LT (TPM_EO)(0x0004) -#define TPM_EO_UNSIGNED_LT (TPM_EO)(0x0005) -#define TPM_EO_SIGNED_GE (TPM_EO)(0x0006) -#define TPM_EO_UNSIGNED_GE (TPM_EO)(0x0007) -#define TPM_EO_SIGNED_LE (TPM_EO)(0x0008) -#define TPM_EO_UNSIGNED_LE (TPM_EO)(0x0009) -#define TPM_EO_BITSET (TPM_EO)(0x000A) -#define TPM_EO_BITCLEAR (TPM_EO)(0x000B) +#define TPM_EO_EQ (TPM_EO)(0x0000) +#define TPM_EO_NEQ (TPM_EO)(0x0001) +#define TPM_EO_SIGNED_GT (TPM_EO)(0x0002) +#define TPM_EO_UNSIGNED_GT (TPM_EO)(0x0003) +#define TPM_EO_SIGNED_LT (TPM_EO)(0x0004) +#define TPM_EO_UNSIGNED_LT (TPM_EO)(0x0005) +#define TPM_EO_SIGNED_GE (TPM_EO)(0x0006) +#define TPM_EO_UNSIGNED_GE (TPM_EO)(0x0007) +#define TPM_EO_SIGNED_LE (TPM_EO)(0x0008) +#define TPM_EO_UNSIGNED_LE (TPM_EO)(0x0009) +#define TPM_EO_BITSET (TPM_EO)(0x000A) +#define TPM_EO_BITCLEAR (TPM_EO)(0x000B) // Table 18 - TPM_ST Constants typedef UINT16 TPM_ST; -#define TPM_ST_RSP_COMMAND (TPM_ST)(0x00C4) -#define TPM_ST_NULL (TPM_ST)(0X8000) -#define TPM_ST_NO_SESSIONS (TPM_ST)(0x8001) -#define TPM_ST_SESSIONS (TPM_ST)(0x8002) -#define TPM_ST_ATTEST_NV (TPM_ST)(0x8014) -#define TPM_ST_ATTEST_COMMAND_AUDIT (TPM_ST)(0x8015) -#define TPM_ST_ATTEST_SESSION_AUDIT (TPM_ST)(0x8016) -#define TPM_ST_ATTEST_CERTIFY (TPM_ST)(0x8017) -#define TPM_ST_ATTEST_QUOTE (TPM_ST)(0x8018) -#define TPM_ST_ATTEST_TIME (TPM_ST)(0x8019) -#define TPM_ST_ATTEST_CREATION (TPM_ST)(0x801A) -#define TPM_ST_CREATION (TPM_ST)(0x8021) -#define TPM_ST_VERIFIED (TPM_ST)(0x8022) -#define TPM_ST_AUTH_SECRET (TPM_ST)(0x8023) -#define TPM_ST_HASHCHECK (TPM_ST)(0x8024) -#define TPM_ST_AUTH_SIGNED (TPM_ST)(0x8025) -#define TPM_ST_FU_MANIFEST (TPM_ST)(0x8029) +#define TPM_ST_RSP_COMMAND (TPM_ST)(0x00C4) +#define TPM_ST_NULL (TPM_ST)(0X8000) +#define TPM_ST_NO_SESSIONS (TPM_ST)(0x8001) +#define TPM_ST_SESSIONS (TPM_ST)(0x8002) +#define TPM_ST_ATTEST_NV (TPM_ST)(0x8014) +#define TPM_ST_ATTEST_COMMAND_AUDIT (TPM_ST)(0x8015) +#define TPM_ST_ATTEST_SESSION_AUDIT (TPM_ST)(0x8016) +#define TPM_ST_ATTEST_CERTIFY (TPM_ST)(0x8017) +#define TPM_ST_ATTEST_QUOTE (TPM_ST)(0x8018) +#define TPM_ST_ATTEST_TIME (TPM_ST)(0x8019) +#define TPM_ST_ATTEST_CREATION (TPM_ST)(0x801A) +#define TPM_ST_CREATION (TPM_ST)(0x8021) +#define TPM_ST_VERIFIED (TPM_ST)(0x8022) +#define TPM_ST_AUTH_SECRET (TPM_ST)(0x8023) +#define TPM_ST_HASHCHECK (TPM_ST)(0x8024) +#define TPM_ST_AUTH_SIGNED (TPM_ST)(0x8025) +#define TPM_ST_FU_MANIFEST (TPM_ST)(0x8029) // Table 19 - TPM_SU Constants typedef UINT16 TPM_SU; -#define TPM_SU_CLEAR (TPM_SU)(0x0000) -#define TPM_SU_STATE (TPM_SU)(0x0001) +#define TPM_SU_CLEAR (TPM_SU)(0x0000) +#define TPM_SU_STATE (TPM_SU)(0x0001) // Table 20 - TPM_SE Constants typedef UINT8 TPM_SE; -#define TPM_SE_HMAC (TPM_SE)(0x00) -#define TPM_SE_POLICY (TPM_SE)(0x01) -#define TPM_SE_TRIAL (TPM_SE)(0x03) +#define TPM_SE_HMAC (TPM_SE)(0x00) +#define TPM_SE_POLICY (TPM_SE)(0x01) +#define TPM_SE_TRIAL (TPM_SE)(0x03) // Table 21 - TPM_CAP Constants typedef UINT32 TPM_CAP; -#define TPM_CAP_FIRST (TPM_CAP)(0x00000000) -#define TPM_CAP_ALGS (TPM_CAP)(0x00000000) -#define TPM_CAP_HANDLES (TPM_CAP)(0x00000001) -#define TPM_CAP_COMMANDS (TPM_CAP)(0x00000002) -#define TPM_CAP_PP_COMMANDS (TPM_CAP)(0x00000003) -#define TPM_CAP_AUDIT_COMMANDS (TPM_CAP)(0x00000004) -#define TPM_CAP_PCRS (TPM_CAP)(0x00000005) -#define TPM_CAP_TPM_PROPERTIES (TPM_CAP)(0x00000006) -#define TPM_CAP_PCR_PROPERTIES (TPM_CAP)(0x00000007) -#define TPM_CAP_ECC_CURVES (TPM_CAP)(0x00000008) -#define TPM_CAP_LAST (TPM_CAP)(0x00000008) -#define TPM_CAP_VENDOR_PROPERTY (TPM_CAP)(0x00000100) +#define TPM_CAP_FIRST (TPM_CAP)(0x00000000) +#define TPM_CAP_ALGS (TPM_CAP)(0x00000000) +#define TPM_CAP_HANDLES (TPM_CAP)(0x00000001) +#define TPM_CAP_COMMANDS (TPM_CAP)(0x00000002) +#define TPM_CAP_PP_COMMANDS (TPM_CAP)(0x00000003) +#define TPM_CAP_AUDIT_COMMANDS (TPM_CAP)(0x00000004) +#define TPM_CAP_PCRS (TPM_CAP)(0x00000005) +#define TPM_CAP_TPM_PROPERTIES (TPM_CAP)(0x00000006) +#define TPM_CAP_PCR_PROPERTIES (TPM_CAP)(0x00000007) +#define TPM_CAP_ECC_CURVES (TPM_CAP)(0x00000008) +#define TPM_CAP_LAST (TPM_CAP)(0x00000008) +#define TPM_CAP_VENDOR_PROPERTY (TPM_CAP)(0x00000100) // Table 22 - TPM_PT Constants typedef UINT32 TPM_PT; -#define TPM_PT_NONE (TPM_PT)(0x00000000) -#define PT_GROUP (TPM_PT)(0x00000100) -#define PT_FIXED (TPM_PT)(PT_GROUP * 1) -#define TPM_PT_FAMILY_INDICATOR (TPM_PT)(PT_FIXED + 0) -#define TPM_PT_LEVEL (TPM_PT)(PT_FIXED + 1) -#define TPM_PT_REVISION (TPM_PT)(PT_FIXED + 2) -#define TPM_PT_DAY_OF_YEAR (TPM_PT)(PT_FIXED + 3) -#define TPM_PT_YEAR (TPM_PT)(PT_FIXED + 4) -#define TPM_PT_MANUFACTURER (TPM_PT)(PT_FIXED + 5) -#define TPM_PT_VENDOR_STRING_1 (TPM_PT)(PT_FIXED + 6) -#define TPM_PT_VENDOR_STRING_2 (TPM_PT)(PT_FIXED + 7) -#define TPM_PT_VENDOR_STRING_3 (TPM_PT)(PT_FIXED + 8) -#define TPM_PT_VENDOR_STRING_4 (TPM_PT)(PT_FIXED + 9) -#define TPM_PT_VENDOR_TPM_TYPE (TPM_PT)(PT_FIXED + 10) -#define TPM_PT_FIRMWARE_VERSION_1 (TPM_PT)(PT_FIXED + 11) -#define TPM_PT_FIRMWARE_VERSION_2 (TPM_PT)(PT_FIXED + 12) -#define TPM_PT_INPUT_BUFFER (TPM_PT)(PT_FIXED + 13) -#define TPM_PT_HR_TRANSIENT_MIN (TPM_PT)(PT_FIXED + 14) -#define TPM_PT_HR_PERSISTENT_MIN (TPM_PT)(PT_FIXED + 15) -#define TPM_PT_HR_LOADED_MIN (TPM_PT)(PT_FIXED + 16) -#define TPM_PT_ACTIVE_SESSIONS_MAX (TPM_PT)(PT_FIXED + 17) -#define TPM_PT_PCR_COUNT (TPM_PT)(PT_FIXED + 18) -#define TPM_PT_PCR_SELECT_MIN (TPM_PT)(PT_FIXED + 19) -#define TPM_PT_CONTEXT_GAP_MAX (TPM_PT)(PT_FIXED + 20) -#define TPM_PT_NV_COUNTERS_MAX (TPM_PT)(PT_FIXED + 22) -#define TPM_PT_NV_INDEX_MAX (TPM_PT)(PT_FIXED + 23) -#define TPM_PT_MEMORY (TPM_PT)(PT_FIXED + 24) -#define TPM_PT_CLOCK_UPDATE (TPM_PT)(PT_FIXED + 25) -#define TPM_PT_CONTEXT_HASH (TPM_PT)(PT_FIXED + 26) -#define TPM_PT_CONTEXT_SYM (TPM_PT)(PT_FIXED + 27) -#define TPM_PT_CONTEXT_SYM_SIZE (TPM_PT)(PT_FIXED + 28) -#define TPM_PT_ORDERLY_COUNT (TPM_PT)(PT_FIXED + 29) -#define TPM_PT_MAX_COMMAND_SIZE (TPM_PT)(PT_FIXED + 30) -#define TPM_PT_MAX_RESPONSE_SIZE (TPM_PT)(PT_FIXED + 31) -#define TPM_PT_MAX_DIGEST (TPM_PT)(PT_FIXED + 32) -#define TPM_PT_MAX_OBJECT_CONTEXT (TPM_PT)(PT_FIXED + 33) -#define TPM_PT_MAX_SESSION_CONTEXT (TPM_PT)(PT_FIXED + 34) -#define TPM_PT_PS_FAMILY_INDICATOR (TPM_PT)(PT_FIXED + 35) -#define TPM_PT_PS_LEVEL (TPM_PT)(PT_FIXED + 36) -#define TPM_PT_PS_REVISION (TPM_PT)(PT_FIXED + 37) -#define TPM_PT_PS_DAY_OF_YEAR (TPM_PT)(PT_FIXED + 38) -#define TPM_PT_PS_YEAR (TPM_PT)(PT_FIXED + 39) -#define TPM_PT_SPLIT_MAX (TPM_PT)(PT_FIXED + 40) -#define TPM_PT_TOTAL_COMMANDS (TPM_PT)(PT_FIXED + 41) -#define TPM_PT_LIBRARY_COMMANDS (TPM_PT)(PT_FIXED + 42) -#define TPM_PT_VENDOR_COMMANDS (TPM_PT)(PT_FIXED + 43) -#define PT_VAR (TPM_PT)(PT_GROUP * 2) -#define TPM_PT_PERMANENT (TPM_PT)(PT_VAR + 0) -#define TPM_PT_STARTUP_CLEAR (TPM_PT)(PT_VAR + 1) -#define TPM_PT_HR_NV_INDEX (TPM_PT)(PT_VAR + 2) -#define TPM_PT_HR_LOADED (TPM_PT)(PT_VAR + 3) -#define TPM_PT_HR_LOADED_AVAIL (TPM_PT)(PT_VAR + 4) -#define TPM_PT_HR_ACTIVE (TPM_PT)(PT_VAR + 5) -#define TPM_PT_HR_ACTIVE_AVAIL (TPM_PT)(PT_VAR + 6) -#define TPM_PT_HR_TRANSIENT_AVAIL (TPM_PT)(PT_VAR + 7) -#define TPM_PT_HR_PERSISTENT (TPM_PT)(PT_VAR + 8) -#define TPM_PT_HR_PERSISTENT_AVAIL (TPM_PT)(PT_VAR + 9) -#define TPM_PT_NV_COUNTERS (TPM_PT)(PT_VAR + 10) -#define TPM_PT_NV_COUNTERS_AVAIL (TPM_PT)(PT_VAR + 11) -#define TPM_PT_ALGORITHM_SET (TPM_PT)(PT_VAR + 12) -#define TPM_PT_LOADED_CURVES (TPM_PT)(PT_VAR + 13) -#define TPM_PT_LOCKOUT_COUNTER (TPM_PT)(PT_VAR + 14) -#define TPM_PT_MAX_AUTH_FAIL (TPM_PT)(PT_VAR + 15) -#define TPM_PT_LOCKOUT_INTERVAL (TPM_PT)(PT_VAR + 16) -#define TPM_PT_LOCKOUT_RECOVERY (TPM_PT)(PT_VAR + 17) -#define TPM_PT_NV_WRITE_RECOVERY (TPM_PT)(PT_VAR + 18) -#define TPM_PT_AUDIT_COUNTER_0 (TPM_PT)(PT_VAR + 19) -#define TPM_PT_AUDIT_COUNTER_1 (TPM_PT)(PT_VAR + 20) +#define TPM_PT_NONE (TPM_PT)(0x00000000) +#define PT_GROUP (TPM_PT)(0x00000100) +#define PT_FIXED (TPM_PT)(PT_GROUP * 1) +#define TPM_PT_FAMILY_INDICATOR (TPM_PT)(PT_FIXED + 0) +#define TPM_PT_LEVEL (TPM_PT)(PT_FIXED + 1) +#define TPM_PT_REVISION (TPM_PT)(PT_FIXED + 2) +#define TPM_PT_DAY_OF_YEAR (TPM_PT)(PT_FIXED + 3) +#define TPM_PT_YEAR (TPM_PT)(PT_FIXED + 4) +#define TPM_PT_MANUFACTURER (TPM_PT)(PT_FIXED + 5) +#define TPM_PT_VENDOR_STRING_1 (TPM_PT)(PT_FIXED + 6) +#define TPM_PT_VENDOR_STRING_2 (TPM_PT)(PT_FIXED + 7) +#define TPM_PT_VENDOR_STRING_3 (TPM_PT)(PT_FIXED + 8) +#define TPM_PT_VENDOR_STRING_4 (TPM_PT)(PT_FIXED + 9) +#define TPM_PT_VENDOR_TPM_TYPE (TPM_PT)(PT_FIXED + 10) +#define TPM_PT_FIRMWARE_VERSION_1 (TPM_PT)(PT_FIXED + 11) +#define TPM_PT_FIRMWARE_VERSION_2 (TPM_PT)(PT_FIXED + 12) +#define TPM_PT_INPUT_BUFFER (TPM_PT)(PT_FIXED + 13) +#define TPM_PT_HR_TRANSIENT_MIN (TPM_PT)(PT_FIXED + 14) +#define TPM_PT_HR_PERSISTENT_MIN (TPM_PT)(PT_FIXED + 15) +#define TPM_PT_HR_LOADED_MIN (TPM_PT)(PT_FIXED + 16) +#define TPM_PT_ACTIVE_SESSIONS_MAX (TPM_PT)(PT_FIXED + 17) +#define TPM_PT_PCR_COUNT (TPM_PT)(PT_FIXED + 18) +#define TPM_PT_PCR_SELECT_MIN (TPM_PT)(PT_FIXED + 19) +#define TPM_PT_CONTEXT_GAP_MAX (TPM_PT)(PT_FIXED + 20) +#define TPM_PT_NV_COUNTERS_MAX (TPM_PT)(PT_FIXED + 22) +#define TPM_PT_NV_INDEX_MAX (TPM_PT)(PT_FIXED + 23) +#define TPM_PT_MEMORY (TPM_PT)(PT_FIXED + 24) +#define TPM_PT_CLOCK_UPDATE (TPM_PT)(PT_FIXED + 25) +#define TPM_PT_CONTEXT_HASH (TPM_PT)(PT_FIXED + 26) +#define TPM_PT_CONTEXT_SYM (TPM_PT)(PT_FIXED + 27) +#define TPM_PT_CONTEXT_SYM_SIZE (TPM_PT)(PT_FIXED + 28) +#define TPM_PT_ORDERLY_COUNT (TPM_PT)(PT_FIXED + 29) +#define TPM_PT_MAX_COMMAND_SIZE (TPM_PT)(PT_FIXED + 30) +#define TPM_PT_MAX_RESPONSE_SIZE (TPM_PT)(PT_FIXED + 31) +#define TPM_PT_MAX_DIGEST (TPM_PT)(PT_FIXED + 32) +#define TPM_PT_MAX_OBJECT_CONTEXT (TPM_PT)(PT_FIXED + 33) +#define TPM_PT_MAX_SESSION_CONTEXT (TPM_PT)(PT_FIXED + 34) +#define TPM_PT_PS_FAMILY_INDICATOR (TPM_PT)(PT_FIXED + 35) +#define TPM_PT_PS_LEVEL (TPM_PT)(PT_FIXED + 36) +#define TPM_PT_PS_REVISION (TPM_PT)(PT_FIXED + 37) +#define TPM_PT_PS_DAY_OF_YEAR (TPM_PT)(PT_FIXED + 38) +#define TPM_PT_PS_YEAR (TPM_PT)(PT_FIXED + 39) +#define TPM_PT_SPLIT_MAX (TPM_PT)(PT_FIXED + 40) +#define TPM_PT_TOTAL_COMMANDS (TPM_PT)(PT_FIXED + 41) +#define TPM_PT_LIBRARY_COMMANDS (TPM_PT)(PT_FIXED + 42) +#define TPM_PT_VENDOR_COMMANDS (TPM_PT)(PT_FIXED + 43) +#define PT_VAR (TPM_PT)(PT_GROUP * 2) +#define TPM_PT_PERMANENT (TPM_PT)(PT_VAR + 0) +#define TPM_PT_STARTUP_CLEAR (TPM_PT)(PT_VAR + 1) +#define TPM_PT_HR_NV_INDEX (TPM_PT)(PT_VAR + 2) +#define TPM_PT_HR_LOADED (TPM_PT)(PT_VAR + 3) +#define TPM_PT_HR_LOADED_AVAIL (TPM_PT)(PT_VAR + 4) +#define TPM_PT_HR_ACTIVE (TPM_PT)(PT_VAR + 5) +#define TPM_PT_HR_ACTIVE_AVAIL (TPM_PT)(PT_VAR + 6) +#define TPM_PT_HR_TRANSIENT_AVAIL (TPM_PT)(PT_VAR + 7) +#define TPM_PT_HR_PERSISTENT (TPM_PT)(PT_VAR + 8) +#define TPM_PT_HR_PERSISTENT_AVAIL (TPM_PT)(PT_VAR + 9) +#define TPM_PT_NV_COUNTERS (TPM_PT)(PT_VAR + 10) +#define TPM_PT_NV_COUNTERS_AVAIL (TPM_PT)(PT_VAR + 11) +#define TPM_PT_ALGORITHM_SET (TPM_PT)(PT_VAR + 12) +#define TPM_PT_LOADED_CURVES (TPM_PT)(PT_VAR + 13) +#define TPM_PT_LOCKOUT_COUNTER (TPM_PT)(PT_VAR + 14) +#define TPM_PT_MAX_AUTH_FAIL (TPM_PT)(PT_VAR + 15) +#define TPM_PT_LOCKOUT_INTERVAL (TPM_PT)(PT_VAR + 16) +#define TPM_PT_LOCKOUT_RECOVERY (TPM_PT)(PT_VAR + 17) +#define TPM_PT_NV_WRITE_RECOVERY (TPM_PT)(PT_VAR + 18) +#define TPM_PT_AUDIT_COUNTER_0 (TPM_PT)(PT_VAR + 19) +#define TPM_PT_AUDIT_COUNTER_1 (TPM_PT)(PT_VAR + 20) // Table 23 - TPM_PT_PCR Constants typedef UINT32 TPM_PT_PCR; -#define TPM_PT_PCR_FIRST (TPM_PT_PCR)(0x00000000) -#define TPM_PT_PCR_SAVE (TPM_PT_PCR)(0x00000000) -#define TPM_PT_PCR_EXTEND_L0 (TPM_PT_PCR)(0x00000001) -#define TPM_PT_PCR_RESET_L0 (TPM_PT_PCR)(0x00000002) -#define TPM_PT_PCR_EXTEND_L1 (TPM_PT_PCR)(0x00000003) -#define TPM_PT_PCR_RESET_L1 (TPM_PT_PCR)(0x00000004) -#define TPM_PT_PCR_EXTEND_L2 (TPM_PT_PCR)(0x00000005) -#define TPM_PT_PCR_RESET_L2 (TPM_PT_PCR)(0x00000006) -#define TPM_PT_PCR_EXTEND_L3 (TPM_PT_PCR)(0x00000007) -#define TPM_PT_PCR_RESET_L3 (TPM_PT_PCR)(0x00000008) -#define TPM_PT_PCR_EXTEND_L4 (TPM_PT_PCR)(0x00000009) -#define TPM_PT_PCR_RESET_L4 (TPM_PT_PCR)(0x0000000A) -#define TPM_PT_PCR_NO_INCREMENT (TPM_PT_PCR)(0x00000011) -#define TPM_PT_PCR_DRTM_RESET (TPM_PT_PCR)(0x00000012) -#define TPM_PT_PCR_POLICY (TPM_PT_PCR)(0x00000013) -#define TPM_PT_PCR_AUTH (TPM_PT_PCR)(0x00000014) -#define TPM_PT_PCR_LAST (TPM_PT_PCR)(0x00000014) +#define TPM_PT_PCR_FIRST (TPM_PT_PCR)(0x00000000) +#define TPM_PT_PCR_SAVE (TPM_PT_PCR)(0x00000000) +#define TPM_PT_PCR_EXTEND_L0 (TPM_PT_PCR)(0x00000001) +#define TPM_PT_PCR_RESET_L0 (TPM_PT_PCR)(0x00000002) +#define TPM_PT_PCR_EXTEND_L1 (TPM_PT_PCR)(0x00000003) +#define TPM_PT_PCR_RESET_L1 (TPM_PT_PCR)(0x00000004) +#define TPM_PT_PCR_EXTEND_L2 (TPM_PT_PCR)(0x00000005) +#define TPM_PT_PCR_RESET_L2 (TPM_PT_PCR)(0x00000006) +#define TPM_PT_PCR_EXTEND_L3 (TPM_PT_PCR)(0x00000007) +#define TPM_PT_PCR_RESET_L3 (TPM_PT_PCR)(0x00000008) +#define TPM_PT_PCR_EXTEND_L4 (TPM_PT_PCR)(0x00000009) +#define TPM_PT_PCR_RESET_L4 (TPM_PT_PCR)(0x0000000A) +#define TPM_PT_PCR_NO_INCREMENT (TPM_PT_PCR)(0x00000011) +#define TPM_PT_PCR_DRTM_RESET (TPM_PT_PCR)(0x00000012) +#define TPM_PT_PCR_POLICY (TPM_PT_PCR)(0x00000013) +#define TPM_PT_PCR_AUTH (TPM_PT_PCR)(0x00000014) +#define TPM_PT_PCR_LAST (TPM_PT_PCR)(0x00000014) // Table 24 - TPM_PS Constants typedef UINT32 TPM_PS; -#define TPM_PS_MAIN (TPM_PS)(0x00000000) -#define TPM_PS_PC (TPM_PS)(0x00000001) -#define TPM_PS_PDA (TPM_PS)(0x00000002) -#define TPM_PS_CELL_PHONE (TPM_PS)(0x00000003) -#define TPM_PS_SERVER (TPM_PS)(0x00000004) -#define TPM_PS_PERIPHERAL (TPM_PS)(0x00000005) -#define TPM_PS_TSS (TPM_PS)(0x00000006) -#define TPM_PS_STORAGE (TPM_PS)(0x00000007) -#define TPM_PS_AUTHENTICATION (TPM_PS)(0x00000008) -#define TPM_PS_EMBEDDED (TPM_PS)(0x00000009) -#define TPM_PS_HARDCOPY (TPM_PS)(0x0000000A) -#define TPM_PS_INFRASTRUCTURE (TPM_PS)(0x0000000B) -#define TPM_PS_VIRTUALIZATION (TPM_PS)(0x0000000C) -#define TPM_PS_TNC (TPM_PS)(0x0000000D) -#define TPM_PS_MULTI_TENANT (TPM_PS)(0x0000000E) -#define TPM_PS_TC (TPM_PS)(0x0000000F) +#define TPM_PS_MAIN (TPM_PS)(0x00000000) +#define TPM_PS_PC (TPM_PS)(0x00000001) +#define TPM_PS_PDA (TPM_PS)(0x00000002) +#define TPM_PS_CELL_PHONE (TPM_PS)(0x00000003) +#define TPM_PS_SERVER (TPM_PS)(0x00000004) +#define TPM_PS_PERIPHERAL (TPM_PS)(0x00000005) +#define TPM_PS_TSS (TPM_PS)(0x00000006) +#define TPM_PS_STORAGE (TPM_PS)(0x00000007) +#define TPM_PS_AUTHENTICATION (TPM_PS)(0x00000008) +#define TPM_PS_EMBEDDED (TPM_PS)(0x00000009) +#define TPM_PS_HARDCOPY (TPM_PS)(0x0000000A) +#define TPM_PS_INFRASTRUCTURE (TPM_PS)(0x0000000B) +#define TPM_PS_VIRTUALIZATION (TPM_PS)(0x0000000C) +#define TPM_PS_TNC (TPM_PS)(0x0000000D) +#define TPM_PS_MULTI_TENANT (TPM_PS)(0x0000000E) +#define TPM_PS_TC (TPM_PS)(0x0000000F) // 7 Handles @@ -639,117 +638,117 @@ typedef UINT32 TPM_PS; // // NOTE: Comment because it has same name as TPM1.2 (value is same, so not runtime issue) // -//typedef UINT32 TPM_HANDLE; +// typedef UINT32 TPM_HANDLE; // Table 26 - TPM_HT Constants typedef UINT8 TPM_HT; -#define TPM_HT_PCR (TPM_HT)(0x00) -#define TPM_HT_NV_INDEX (TPM_HT)(0x01) -#define TPM_HT_HMAC_SESSION (TPM_HT)(0x02) -#define TPM_HT_LOADED_SESSION (TPM_HT)(0x02) -#define TPM_HT_POLICY_SESSION (TPM_HT)(0x03) -#define TPM_HT_ACTIVE_SESSION (TPM_HT)(0x03) -#define TPM_HT_PERMANENT (TPM_HT)(0x40) -#define TPM_HT_TRANSIENT (TPM_HT)(0x80) -#define TPM_HT_PERSISTENT (TPM_HT)(0x81) +#define TPM_HT_PCR (TPM_HT)(0x00) +#define TPM_HT_NV_INDEX (TPM_HT)(0x01) +#define TPM_HT_HMAC_SESSION (TPM_HT)(0x02) +#define TPM_HT_LOADED_SESSION (TPM_HT)(0x02) +#define TPM_HT_POLICY_SESSION (TPM_HT)(0x03) +#define TPM_HT_ACTIVE_SESSION (TPM_HT)(0x03) +#define TPM_HT_PERMANENT (TPM_HT)(0x40) +#define TPM_HT_TRANSIENT (TPM_HT)(0x80) +#define TPM_HT_PERSISTENT (TPM_HT)(0x81) // Table 27 - TPM_RH Constants typedef UINT32 TPM_RH; -#define TPM_RH_FIRST (TPM_RH)(0x40000000) -#define TPM_RH_SRK (TPM_RH)(0x40000000) -#define TPM_RH_OWNER (TPM_RH)(0x40000001) -#define TPM_RH_REVOKE (TPM_RH)(0x40000002) -#define TPM_RH_TRANSPORT (TPM_RH)(0x40000003) -#define TPM_RH_OPERATOR (TPM_RH)(0x40000004) -#define TPM_RH_ADMIN (TPM_RH)(0x40000005) -#define TPM_RH_EK (TPM_RH)(0x40000006) -#define TPM_RH_NULL (TPM_RH)(0x40000007) -#define TPM_RH_UNASSIGNED (TPM_RH)(0x40000008) -#define TPM_RS_PW (TPM_RH)(0x40000009) -#define TPM_RH_LOCKOUT (TPM_RH)(0x4000000A) -#define TPM_RH_ENDORSEMENT (TPM_RH)(0x4000000B) -#define TPM_RH_PLATFORM (TPM_RH)(0x4000000C) -#define TPM_RH_PLATFORM_NV (TPM_RH)(0x4000000D) -#define TPM_RH_AUTH_00 (TPM_RH)(0x40000010) -#define TPM_RH_AUTH_FF (TPM_RH)(0x4000010F) -#define TPM_RH_LAST (TPM_RH)(0x4000010F) +#define TPM_RH_FIRST (TPM_RH)(0x40000000) +#define TPM_RH_SRK (TPM_RH)(0x40000000) +#define TPM_RH_OWNER (TPM_RH)(0x40000001) +#define TPM_RH_REVOKE (TPM_RH)(0x40000002) +#define TPM_RH_TRANSPORT (TPM_RH)(0x40000003) +#define TPM_RH_OPERATOR (TPM_RH)(0x40000004) +#define TPM_RH_ADMIN (TPM_RH)(0x40000005) +#define TPM_RH_EK (TPM_RH)(0x40000006) +#define TPM_RH_NULL (TPM_RH)(0x40000007) +#define TPM_RH_UNASSIGNED (TPM_RH)(0x40000008) +#define TPM_RS_PW (TPM_RH)(0x40000009) +#define TPM_RH_LOCKOUT (TPM_RH)(0x4000000A) +#define TPM_RH_ENDORSEMENT (TPM_RH)(0x4000000B) +#define TPM_RH_PLATFORM (TPM_RH)(0x4000000C) +#define TPM_RH_PLATFORM_NV (TPM_RH)(0x4000000D) +#define TPM_RH_AUTH_00 (TPM_RH)(0x40000010) +#define TPM_RH_AUTH_FF (TPM_RH)(0x4000010F) +#define TPM_RH_LAST (TPM_RH)(0x4000010F) // Table 28 - TPM_HC Constants typedef TPM_HANDLE TPM_HC; -#define HR_HANDLE_MASK (TPM_HC)(0x00FFFFFF) -#define HR_RANGE_MASK (TPM_HC)(0xFF000000) -#define HR_SHIFT (TPM_HC)(24) -#define HR_PCR (TPM_HC)((TPM_HC)TPM_HT_PCR << HR_SHIFT) -#define HR_HMAC_SESSION (TPM_HC)((TPM_HC)TPM_HT_HMAC_SESSION << HR_SHIFT) -#define HR_POLICY_SESSION (TPM_HC)((TPM_HC)TPM_HT_POLICY_SESSION << HR_SHIFT) -#define HR_TRANSIENT (TPM_HC)((TPM_HC)TPM_HT_TRANSIENT << HR_SHIFT) -#define HR_PERSISTENT (TPM_HC)((TPM_HC)TPM_HT_PERSISTENT << HR_SHIFT) -#define HR_NV_INDEX (TPM_HC)((TPM_HC)TPM_HT_NV_INDEX << HR_SHIFT) -#define HR_PERMANENT (TPM_HC)((TPM_HC)TPM_HT_PERMANENT << HR_SHIFT) -#define PCR_FIRST (TPM_HC)(HR_PCR + 0) -#define PCR_LAST (TPM_HC)(PCR_FIRST + IMPLEMENTATION_PCR - 1) -#define HMAC_SESSION_FIRST (TPM_HC)(HR_HMAC_SESSION + 0) -#define HMAC_SESSION_LAST (TPM_HC)(HMAC_SESSION_FIRST + MAX_ACTIVE_SESSIONS - 1) -#define LOADED_SESSION_FIRST (TPM_HC)(HMAC_SESSION_FIRST) -#define LOADED_SESSION_LAST (TPM_HC)(HMAC_SESSION_LAST) -#define POLICY_SESSION_FIRST (TPM_HC)(HR_POLICY_SESSION + 0) -#define POLICY_SESSION_LAST (TPM_HC)(POLICY_SESSION_FIRST + MAX_ACTIVE_SESSIONS - 1) -#define TRANSIENT_FIRST (TPM_HC)(HR_TRANSIENT + 0) -#define ACTIVE_SESSION_FIRST (TPM_HC)(POLICY_SESSION_FIRST) -#define ACTIVE_SESSION_LAST (TPM_HC)(POLICY_SESSION_LAST) -#define TRANSIENT_LAST (TPM_HC)(TRANSIENT_FIRST+MAX_LOADED_OBJECTS - 1) -#define PERSISTENT_FIRST (TPM_HC)(HR_PERSISTENT + 0) -#define PERSISTENT_LAST (TPM_HC)(PERSISTENT_FIRST + 0x00FFFFFF) -#define PLATFORM_PERSISTENT (TPM_HC)(PERSISTENT_FIRST + 0x00800000) -#define NV_INDEX_FIRST (TPM_HC)(HR_NV_INDEX + 0) -#define NV_INDEX_LAST (TPM_HC)(NV_INDEX_FIRST + 0x00FFFFFF) -#define PERMANENT_FIRST (TPM_HC)(TPM_RH_FIRST) -#define PERMANENT_LAST (TPM_HC)(TPM_RH_LAST) +#define HR_HANDLE_MASK (TPM_HC)(0x00FFFFFF) +#define HR_RANGE_MASK (TPM_HC)(0xFF000000) +#define HR_SHIFT (TPM_HC)(24) +#define HR_PCR (TPM_HC)((TPM_HC)TPM_HT_PCR << HR_SHIFT) +#define HR_HMAC_SESSION (TPM_HC)((TPM_HC)TPM_HT_HMAC_SESSION << HR_SHIFT) +#define HR_POLICY_SESSION (TPM_HC)((TPM_HC)TPM_HT_POLICY_SESSION << HR_SHIFT) +#define HR_TRANSIENT (TPM_HC)((TPM_HC)TPM_HT_TRANSIENT << HR_SHIFT) +#define HR_PERSISTENT (TPM_HC)((TPM_HC)TPM_HT_PERSISTENT << HR_SHIFT) +#define HR_NV_INDEX (TPM_HC)((TPM_HC)TPM_HT_NV_INDEX << HR_SHIFT) +#define HR_PERMANENT (TPM_HC)((TPM_HC)TPM_HT_PERMANENT << HR_SHIFT) +#define PCR_FIRST (TPM_HC)(HR_PCR + 0) +#define PCR_LAST (TPM_HC)(PCR_FIRST + IMPLEMENTATION_PCR - 1) +#define HMAC_SESSION_FIRST (TPM_HC)(HR_HMAC_SESSION + 0) +#define HMAC_SESSION_LAST (TPM_HC)(HMAC_SESSION_FIRST + MAX_ACTIVE_SESSIONS - 1) +#define LOADED_SESSION_FIRST (TPM_HC)(HMAC_SESSION_FIRST) +#define LOADED_SESSION_LAST (TPM_HC)(HMAC_SESSION_LAST) +#define POLICY_SESSION_FIRST (TPM_HC)(HR_POLICY_SESSION + 0) +#define POLICY_SESSION_LAST (TPM_HC)(POLICY_SESSION_FIRST + MAX_ACTIVE_SESSIONS - 1) +#define TRANSIENT_FIRST (TPM_HC)(HR_TRANSIENT + 0) +#define ACTIVE_SESSION_FIRST (TPM_HC)(POLICY_SESSION_FIRST) +#define ACTIVE_SESSION_LAST (TPM_HC)(POLICY_SESSION_LAST) +#define TRANSIENT_LAST (TPM_HC)(TRANSIENT_FIRST+MAX_LOADED_OBJECTS - 1) +#define PERSISTENT_FIRST (TPM_HC)(HR_PERSISTENT + 0) +#define PERSISTENT_LAST (TPM_HC)(PERSISTENT_FIRST + 0x00FFFFFF) +#define PLATFORM_PERSISTENT (TPM_HC)(PERSISTENT_FIRST + 0x00800000) +#define NV_INDEX_FIRST (TPM_HC)(HR_NV_INDEX + 0) +#define NV_INDEX_LAST (TPM_HC)(NV_INDEX_FIRST + 0x00FFFFFF) +#define PERMANENT_FIRST (TPM_HC)(TPM_RH_FIRST) +#define PERMANENT_LAST (TPM_HC)(TPM_RH_LAST) // 8 Attribute Structures // Table 29 - TPMA_ALGORITHM Bits typedef struct { - UINT32 asymmetric : 1; - UINT32 symmetric : 1; - UINT32 hash : 1; - UINT32 object : 1; - UINT32 reserved4_7 : 4; - UINT32 signing : 1; - UINT32 encrypting : 1; - UINT32 method : 1; - UINT32 reserved11_31 : 21; + UINT32 asymmetric : 1; + UINT32 symmetric : 1; + UINT32 hash : 1; + UINT32 object : 1; + UINT32 reserved4_7 : 4; + UINT32 signing : 1; + UINT32 encrypting : 1; + UINT32 method : 1; + UINT32 reserved11_31 : 21; } TPMA_ALGORITHM; // Table 30 - TPMA_OBJECT Bits typedef struct { - UINT32 reserved1 : 1; - UINT32 fixedTPM : 1; - UINT32 stClear : 1; - UINT32 reserved4 : 1; - UINT32 fixedParent : 1; - UINT32 sensitiveDataOrigin : 1; - UINT32 userWithAuth : 1; - UINT32 adminWithPolicy : 1; - UINT32 reserved8_9 : 2; - UINT32 noDA : 1; - UINT32 encryptedDuplication : 1; - UINT32 reserved12_15 : 4; - UINT32 restricted : 1; - UINT32 decrypt : 1; - UINT32 sign : 1; - UINT32 reserved19_31 : 13; + UINT32 reserved1 : 1; + UINT32 fixedTPM : 1; + UINT32 stClear : 1; + UINT32 reserved4 : 1; + UINT32 fixedParent : 1; + UINT32 sensitiveDataOrigin : 1; + UINT32 userWithAuth : 1; + UINT32 adminWithPolicy : 1; + UINT32 reserved8_9 : 2; + UINT32 noDA : 1; + UINT32 encryptedDuplication : 1; + UINT32 reserved12_15 : 4; + UINT32 restricted : 1; + UINT32 decrypt : 1; + UINT32 sign : 1; + UINT32 reserved19_31 : 13; } TPMA_OBJECT; // Table 31 - TPMA_SESSION Bits typedef struct { - UINT8 continueSession : 1; - UINT8 auditExclusive : 1; - UINT8 auditReset : 1; - UINT8 reserved3_4 : 2; - UINT8 decrypt : 1; - UINT8 encrypt : 1; - UINT8 audit : 1; + UINT8 continueSession : 1; + UINT8 auditExclusive : 1; + UINT8 auditReset : 1; + UINT8 reserved3_4 : 2; + UINT8 decrypt : 1; + UINT8 encrypt : 1; + UINT8 audit : 1; } TPMA_SESSION; // Table 32 - TPMA_LOCALITY Bits @@ -757,54 +756,54 @@ typedef struct { // NOTE: Use low case here to resolve conflict // typedef struct { - UINT8 locZero : 1; - UINT8 locOne : 1; - UINT8 locTwo : 1; - UINT8 locThree : 1; - UINT8 locFour : 1; - UINT8 Extended : 3; + UINT8 locZero : 1; + UINT8 locOne : 1; + UINT8 locTwo : 1; + UINT8 locThree : 1; + UINT8 locFour : 1; + UINT8 Extended : 3; } TPMA_LOCALITY; // Table 33 - TPMA_PERMANENT Bits typedef struct { - UINT32 ownerAuthSet : 1; - UINT32 endorsementAuthSet : 1; - UINT32 lockoutAuthSet : 1; - UINT32 reserved3_7 : 5; - UINT32 disableClear : 1; - UINT32 inLockout : 1; - UINT32 tpmGeneratedEPS : 1; - UINT32 reserved11_31 : 21; + UINT32 ownerAuthSet : 1; + UINT32 endorsementAuthSet : 1; + UINT32 lockoutAuthSet : 1; + UINT32 reserved3_7 : 5; + UINT32 disableClear : 1; + UINT32 inLockout : 1; + UINT32 tpmGeneratedEPS : 1; + UINT32 reserved11_31 : 21; } TPMA_PERMANENT; // Table 34 - TPMA_STARTUP_CLEAR Bits typedef struct { - UINT32 phEnable : 1; - UINT32 shEnable : 1; - UINT32 ehEnable : 1; - UINT32 reserved3_30 : 28; - UINT32 orderly : 1; + UINT32 phEnable : 1; + UINT32 shEnable : 1; + UINT32 ehEnable : 1; + UINT32 reserved3_30 : 28; + UINT32 orderly : 1; } TPMA_STARTUP_CLEAR; // Table 35 - TPMA_MEMORY Bits typedef struct { - UINT32 sharedRAM : 1; - UINT32 sharedNV : 1; - UINT32 objectCopiedToRam : 1; - UINT32 reserved3_31 : 29; + UINT32 sharedRAM : 1; + UINT32 sharedNV : 1; + UINT32 objectCopiedToRam : 1; + UINT32 reserved3_31 : 29; } TPMA_MEMORY; // Table 36 - TPMA_CC Bits typedef struct { - UINT32 commandIndex : 16; - UINT32 reserved16_21 : 6; - UINT32 nv : 1; - UINT32 extensive : 1; - UINT32 flushed : 1; - UINT32 cHandles : 3; - UINT32 rHandle : 1; - UINT32 V : 1; - UINT32 Res : 2; + UINT32 commandIndex : 16; + UINT32 reserved16_21 : 6; + UINT32 nv : 1; + UINT32 extensive : 1; + UINT32 flushed : 1; + UINT32 cHandles : 3; + UINT32 rHandle : 1; + UINT32 V : 1; + UINT32 Res : 2; } TPMA_CC; // 9 Interface Types @@ -897,35 +896,35 @@ typedef TPM_ST TPMI_ST_COMMAND_TAG; // Table 65 - TPMS_ALGORITHM_DESCRIPTION Structure typedef struct { - TPM_ALG_ID alg; - TPMA_ALGORITHM attributes; + TPM_ALG_ID alg; + TPMA_ALGORITHM attributes; } TPMS_ALGORITHM_DESCRIPTION; // Table 66 - TPMU_HA Union typedef union { - BYTE sha1[SHA1_DIGEST_SIZE]; - BYTE sha256[SHA256_DIGEST_SIZE]; - BYTE sm3_256[SM3_256_DIGEST_SIZE]; - BYTE sha384[SHA384_DIGEST_SIZE]; - BYTE sha512[SHA512_DIGEST_SIZE]; + BYTE sha1[SHA1_DIGEST_SIZE]; + BYTE sha256[SHA256_DIGEST_SIZE]; + BYTE sm3_256[SM3_256_DIGEST_SIZE]; + BYTE sha384[SHA384_DIGEST_SIZE]; + BYTE sha512[SHA512_DIGEST_SIZE]; } TPMU_HA; // Table 67 - TPMT_HA Structure typedef struct { - TPMI_ALG_HASH hashAlg; - TPMU_HA digest; + TPMI_ALG_HASH hashAlg; + TPMU_HA digest; } TPMT_HA; // Table 68 - TPM2B_DIGEST Structure typedef struct { - UINT16 size; - BYTE buffer[sizeof(TPMU_HA)]; + UINT16 size; + BYTE buffer[sizeof (TPMU_HA)]; } TPM2B_DIGEST; // Table 69 - TPM2B_DATA Structure typedef struct { - UINT16 size; - BYTE buffer[sizeof(TPMT_HA)]; + UINT16 size; + BYTE buffer[sizeof (TPMT_HA)]; } TPM2B_DATA; // Table 70 - TPM2B_NONCE Types @@ -939,254 +938,254 @@ typedef TPM2B_DIGEST TPM2B_OPERAND; // Table 73 - TPM2B_EVENT Structure typedef struct { - UINT16 size; - BYTE buffer[1024]; + UINT16 size; + BYTE buffer[1024]; } TPM2B_EVENT; // Table 74 - TPM2B_MAX_BUFFER Structure typedef struct { - UINT16 size; - BYTE buffer[MAX_DIGEST_BUFFER]; + UINT16 size; + BYTE buffer[MAX_DIGEST_BUFFER]; } TPM2B_MAX_BUFFER; // Table 75 - TPM2B_MAX_NV_BUFFER Structure typedef struct { - UINT16 size; - BYTE buffer[MAX_NV_INDEX_SIZE]; + UINT16 size; + BYTE buffer[MAX_NV_INDEX_SIZE]; } TPM2B_MAX_NV_BUFFER; // Table 76 - TPM2B_TIMEOUT Structure typedef struct { - UINT16 size; - BYTE buffer[sizeof(UINT64)]; + UINT16 size; + BYTE buffer[sizeof (UINT64)]; } TPM2B_TIMEOUT; // Table 77 -- TPM2B_IV Structure typedef struct { - UINT16 size; - BYTE buffer[MAX_SYM_BLOCK_SIZE]; + UINT16 size; + BYTE buffer[MAX_SYM_BLOCK_SIZE]; } TPM2B_IV; // Table 78 - TPMU_NAME Union typedef union { - TPMT_HA digest; - TPM_HANDLE handle; + TPMT_HA digest; + TPM_HANDLE handle; } TPMU_NAME; // Table 79 - TPM2B_NAME Structure typedef struct { - UINT16 size; - BYTE name[sizeof(TPMU_NAME)]; + UINT16 size; + BYTE name[sizeof (TPMU_NAME)]; } TPM2B_NAME; // Table 80 - TPMS_PCR_SELECT Structure typedef struct { - UINT8 sizeofSelect; - BYTE pcrSelect[PCR_SELECT_MAX]; + UINT8 sizeofSelect; + BYTE pcrSelect[PCR_SELECT_MAX]; } TPMS_PCR_SELECT; // Table 81 - TPMS_PCR_SELECTION Structure typedef struct { - TPMI_ALG_HASH hash; - UINT8 sizeofSelect; - BYTE pcrSelect[PCR_SELECT_MAX]; + TPMI_ALG_HASH hash; + UINT8 sizeofSelect; + BYTE pcrSelect[PCR_SELECT_MAX]; } TPMS_PCR_SELECTION; // Table 84 - TPMT_TK_CREATION Structure typedef struct { - TPM_ST tag; - TPMI_RH_HIERARCHY hierarchy; - TPM2B_DIGEST digest; + TPM_ST tag; + TPMI_RH_HIERARCHY hierarchy; + TPM2B_DIGEST digest; } TPMT_TK_CREATION; // Table 85 - TPMT_TK_VERIFIED Structure typedef struct { - TPM_ST tag; - TPMI_RH_HIERARCHY hierarchy; - TPM2B_DIGEST digest; + TPM_ST tag; + TPMI_RH_HIERARCHY hierarchy; + TPM2B_DIGEST digest; } TPMT_TK_VERIFIED; // Table 86 - TPMT_TK_AUTH Structure typedef struct { - TPM_ST tag; - TPMI_RH_HIERARCHY hierarchy; - TPM2B_DIGEST digest; + TPM_ST tag; + TPMI_RH_HIERARCHY hierarchy; + TPM2B_DIGEST digest; } TPMT_TK_AUTH; // Table 87 - TPMT_TK_HASHCHECK Structure typedef struct { - TPM_ST tag; - TPMI_RH_HIERARCHY hierarchy; - TPM2B_DIGEST digest; + TPM_ST tag; + TPMI_RH_HIERARCHY hierarchy; + TPM2B_DIGEST digest; } TPMT_TK_HASHCHECK; // Table 88 - TPMS_ALG_PROPERTY Structure typedef struct { - TPM_ALG_ID alg; - TPMA_ALGORITHM algProperties; + TPM_ALG_ID alg; + TPMA_ALGORITHM algProperties; } TPMS_ALG_PROPERTY; // Table 89 - TPMS_TAGGED_PROPERTY Structure typedef struct { - TPM_PT property; - UINT32 value; + TPM_PT property; + UINT32 value; } TPMS_TAGGED_PROPERTY; // Table 90 - TPMS_TAGGED_PCR_SELECT Structure typedef struct { - TPM_PT tag; - UINT8 sizeofSelect; - BYTE pcrSelect[PCR_SELECT_MAX]; + TPM_PT tag; + UINT8 sizeofSelect; + BYTE pcrSelect[PCR_SELECT_MAX]; } TPMS_TAGGED_PCR_SELECT; // Table 91 - TPML_CC Structure typedef struct { - UINT32 count; - TPM_CC commandCodes[MAX_CAP_CC]; + UINT32 count; + TPM_CC commandCodes[MAX_CAP_CC]; } TPML_CC; // Table 92 - TPML_CCA Structure typedef struct { - UINT32 count; - TPMA_CC commandAttributes[MAX_CAP_CC]; + UINT32 count; + TPMA_CC commandAttributes[MAX_CAP_CC]; } TPML_CCA; // Table 93 - TPML_ALG Structure typedef struct { - UINT32 count; - TPM_ALG_ID algorithms[MAX_ALG_LIST_SIZE]; + UINT32 count; + TPM_ALG_ID algorithms[MAX_ALG_LIST_SIZE]; } TPML_ALG; // Table 94 - TPML_HANDLE Structure typedef struct { - UINT32 count; - TPM_HANDLE handle[MAX_CAP_HANDLES]; + UINT32 count; + TPM_HANDLE handle[MAX_CAP_HANDLES]; } TPML_HANDLE; // Table 95 - TPML_DIGEST Structure typedef struct { - UINT32 count; - TPM2B_DIGEST digests[8]; + UINT32 count; + TPM2B_DIGEST digests[8]; } TPML_DIGEST; // Table 96 -- TPML_DIGEST_VALUES Structure typedef struct { - UINT32 count; - TPMT_HA digests[HASH_COUNT]; + UINT32 count; + TPMT_HA digests[HASH_COUNT]; } TPML_DIGEST_VALUES; // Table 97 - TPM2B_DIGEST_VALUES Structure typedef struct { - UINT16 size; - BYTE buffer[sizeof(TPML_DIGEST_VALUES)]; + UINT16 size; + BYTE buffer[sizeof (TPML_DIGEST_VALUES)]; } TPM2B_DIGEST_VALUES; // Table 98 - TPML_PCR_SELECTION Structure typedef struct { - UINT32 count; - TPMS_PCR_SELECTION pcrSelections[HASH_COUNT]; + UINT32 count; + TPMS_PCR_SELECTION pcrSelections[HASH_COUNT]; } TPML_PCR_SELECTION; // Table 99 - TPML_ALG_PROPERTY Structure typedef struct { - UINT32 count; - TPMS_ALG_PROPERTY algProperties[MAX_CAP_ALGS]; + UINT32 count; + TPMS_ALG_PROPERTY algProperties[MAX_CAP_ALGS]; } TPML_ALG_PROPERTY; // Table 100 - TPML_TAGGED_TPM_PROPERTY Structure typedef struct { - UINT32 count; - TPMS_TAGGED_PROPERTY tpmProperty[MAX_TPM_PROPERTIES]; + UINT32 count; + TPMS_TAGGED_PROPERTY tpmProperty[MAX_TPM_PROPERTIES]; } TPML_TAGGED_TPM_PROPERTY; // Table 101 - TPML_TAGGED_PCR_PROPERTY Structure typedef struct { - UINT32 count; - TPMS_TAGGED_PCR_SELECT pcrProperty[MAX_PCR_PROPERTIES]; + UINT32 count; + TPMS_TAGGED_PCR_SELECT pcrProperty[MAX_PCR_PROPERTIES]; } TPML_TAGGED_PCR_PROPERTY; // Table 102 - TPML_ECC_CURVE Structure typedef struct { - UINT32 count; - TPM_ECC_CURVE eccCurves[MAX_ECC_CURVES]; + UINT32 count; + TPM_ECC_CURVE eccCurves[MAX_ECC_CURVES]; } TPML_ECC_CURVE; // Table 103 - TPMU_CAPABILITIES Union typedef union { - TPML_ALG_PROPERTY algorithms; - TPML_HANDLE handles; - TPML_CCA command; - TPML_CC ppCommands; - TPML_CC auditCommands; - TPML_PCR_SELECTION assignedPCR; - TPML_TAGGED_TPM_PROPERTY tpmProperties; - TPML_TAGGED_PCR_PROPERTY pcrProperties; - TPML_ECC_CURVE eccCurves; + TPML_ALG_PROPERTY algorithms; + TPML_HANDLE handles; + TPML_CCA command; + TPML_CC ppCommands; + TPML_CC auditCommands; + TPML_PCR_SELECTION assignedPCR; + TPML_TAGGED_TPM_PROPERTY tpmProperties; + TPML_TAGGED_PCR_PROPERTY pcrProperties; + TPML_ECC_CURVE eccCurves; } TPMU_CAPABILITIES; // Table 104 - TPMS_CAPABILITY_DATA Structure typedef struct { - TPM_CAP capability; - TPMU_CAPABILITIES data; + TPM_CAP capability; + TPMU_CAPABILITIES data; } TPMS_CAPABILITY_DATA; // Table 105 - TPMS_CLOCK_INFO Structure typedef struct { - UINT64 clock; - UINT32 resetCount; - UINT32 restartCount; - TPMI_YES_NO safe; + UINT64 clock; + UINT32 resetCount; + UINT32 restartCount; + TPMI_YES_NO safe; } TPMS_CLOCK_INFO; // Table 106 - TPMS_TIME_INFO Structure typedef struct { - UINT64 time; - TPMS_CLOCK_INFO clockInfo; + UINT64 time; + TPMS_CLOCK_INFO clockInfo; } TPMS_TIME_INFO; // Table 107 - TPMS_TIME_ATTEST_INFO Structure typedef struct { - TPMS_TIME_INFO time; - UINT64 firmwareVersion; + TPMS_TIME_INFO time; + UINT64 firmwareVersion; } TPMS_TIME_ATTEST_INFO; // Table 108 - TPMS_CERTIFY_INFO Structure typedef struct { - TPM2B_NAME name; - TPM2B_NAME qualifiedName; + TPM2B_NAME name; + TPM2B_NAME qualifiedName; } TPMS_CERTIFY_INFO; // Table 109 - TPMS_QUOTE_INFO Structure typedef struct { - TPML_PCR_SELECTION pcrSelect; - TPM2B_DIGEST pcrDigest; + TPML_PCR_SELECTION pcrSelect; + TPM2B_DIGEST pcrDigest; } TPMS_QUOTE_INFO; // Table 110 - TPMS_COMMAND_AUDIT_INFO Structure typedef struct { - UINT64 auditCounter; - TPM_ALG_ID digestAlg; - TPM2B_DIGEST auditDigest; - TPM2B_DIGEST commandDigest; + UINT64 auditCounter; + TPM_ALG_ID digestAlg; + TPM2B_DIGEST auditDigest; + TPM2B_DIGEST commandDigest; } TPMS_COMMAND_AUDIT_INFO; // Table 111 - TPMS_SESSION_AUDIT_INFO Structure typedef struct { - TPMI_YES_NO exclusiveSession; - TPM2B_DIGEST sessionDigest; + TPMI_YES_NO exclusiveSession; + TPM2B_DIGEST sessionDigest; } TPMS_SESSION_AUDIT_INFO; // Table 112 - TPMS_CREATION_INFO Structure typedef struct { - TPM2B_NAME objectName; - TPM2B_DIGEST creationHash; + TPM2B_NAME objectName; + TPM2B_DIGEST creationHash; } TPMS_CREATION_INFO; // Table 113 - TPMS_NV_CERTIFY_INFO Structure typedef struct { - TPM2B_NAME indexName; - UINT16 offset; - TPM2B_MAX_NV_BUFFER nvContents; + TPM2B_NAME indexName; + UINT16 offset; + TPM2B_MAX_NV_BUFFER nvContents; } TPMS_NV_CERTIFY_INFO; // Table 114 - TPMI_ST_ATTEST Type @@ -1194,45 +1193,45 @@ typedef TPM_ST TPMI_ST_ATTEST; // Table 115 - TPMU_ATTEST Union typedef union { - TPMS_CERTIFY_INFO certify; - TPMS_CREATION_INFO creation; - TPMS_QUOTE_INFO quote; - TPMS_COMMAND_AUDIT_INFO commandAudit; - TPMS_SESSION_AUDIT_INFO sessionAudit; - TPMS_TIME_ATTEST_INFO time; - TPMS_NV_CERTIFY_INFO nv; + TPMS_CERTIFY_INFO certify; + TPMS_CREATION_INFO creation; + TPMS_QUOTE_INFO quote; + TPMS_COMMAND_AUDIT_INFO commandAudit; + TPMS_SESSION_AUDIT_INFO sessionAudit; + TPMS_TIME_ATTEST_INFO time; + TPMS_NV_CERTIFY_INFO nv; } TPMU_ATTEST; // Table 116 - TPMS_ATTEST Structure typedef struct { - TPM_GENERATED magic; - TPMI_ST_ATTEST type; - TPM2B_NAME qualifiedSigner; - TPM2B_DATA extraData; - TPMS_CLOCK_INFO clockInfo; - UINT64 firmwareVersion; - TPMU_ATTEST attested; + TPM_GENERATED magic; + TPMI_ST_ATTEST type; + TPM2B_NAME qualifiedSigner; + TPM2B_DATA extraData; + TPMS_CLOCK_INFO clockInfo; + UINT64 firmwareVersion; + TPMU_ATTEST attested; } TPMS_ATTEST; // Table 117 - TPM2B_ATTEST Structure typedef struct { - UINT16 size; - BYTE attestationData[sizeof(TPMS_ATTEST)]; + UINT16 size; + BYTE attestationData[sizeof (TPMS_ATTEST)]; } TPM2B_ATTEST; // Table 118 - TPMS_AUTH_COMMAND Structure typedef struct { - TPMI_SH_AUTH_SESSION sessionHandle; - TPM2B_NONCE nonce; - TPMA_SESSION sessionAttributes; - TPM2B_AUTH hmac; + TPMI_SH_AUTH_SESSION sessionHandle; + TPM2B_NONCE nonce; + TPMA_SESSION sessionAttributes; + TPM2B_AUTH hmac; } TPMS_AUTH_COMMAND; // Table 119 - TPMS_AUTH_RESPONSE Structure typedef struct { - TPM2B_NONCE nonce; - TPMA_SESSION sessionAttributes; - TPM2B_AUTH hmac; + TPM2B_NONCE nonce; + TPMA_SESSION sessionAttributes; + TPM2B_AUTH hmac; } TPMS_AUTH_RESPONSE; // 11 Algorithm Parameters and Structures @@ -1245,65 +1244,65 @@ typedef TPM_KEY_BITS TPMI_SM4_KEY_BITS; // Table 122 - TPMU_SYM_KEY_BITS Union typedef union { - TPMI_AES_KEY_BITS aes; - TPMI_SM4_KEY_BITS SM4; - TPM_KEY_BITS sym; + TPMI_AES_KEY_BITS aes; + TPMI_SM4_KEY_BITS SM4; + TPM_KEY_BITS sym; TPMI_ALG_HASH xor; } TPMU_SYM_KEY_BITS; // Table 123 - TPMU_SYM_MODE Union typedef union { - TPMI_ALG_SYM_MODE aes; - TPMI_ALG_SYM_MODE SM4; - TPMI_ALG_SYM_MODE sym; + TPMI_ALG_SYM_MODE aes; + TPMI_ALG_SYM_MODE SM4; + TPMI_ALG_SYM_MODE sym; } TPMU_SYM_MODE; // Table 125 - TPMT_SYM_DEF Structure typedef struct { - TPMI_ALG_SYM algorithm; - TPMU_SYM_KEY_BITS keyBits; - TPMU_SYM_MODE mode; + TPMI_ALG_SYM algorithm; + TPMU_SYM_KEY_BITS keyBits; + TPMU_SYM_MODE mode; } TPMT_SYM_DEF; // Table 126 - TPMT_SYM_DEF_OBJECT Structure typedef struct { - TPMI_ALG_SYM_OBJECT algorithm; - TPMU_SYM_KEY_BITS keyBits; - TPMU_SYM_MODE mode; + TPMI_ALG_SYM_OBJECT algorithm; + TPMU_SYM_KEY_BITS keyBits; + TPMU_SYM_MODE mode; } TPMT_SYM_DEF_OBJECT; // Table 127 - TPM2B_SYM_KEY Structure typedef struct { - UINT16 size; - BYTE buffer[MAX_SYM_KEY_BYTES]; + UINT16 size; + BYTE buffer[MAX_SYM_KEY_BYTES]; } TPM2B_SYM_KEY; // Table 128 - TPMS_SYMCIPHER_PARMS Structure typedef struct { - TPMT_SYM_DEF_OBJECT sym; + TPMT_SYM_DEF_OBJECT sym; } TPMS_SYMCIPHER_PARMS; // Table 129 - TPM2B_SENSITIVE_DATA Structure typedef struct { - UINT16 size; - BYTE buffer[MAX_SYM_DATA]; + UINT16 size; + BYTE buffer[MAX_SYM_DATA]; } TPM2B_SENSITIVE_DATA; // Table 130 - TPMS_SENSITIVE_CREATE Structure typedef struct { - TPM2B_AUTH userAuth; - TPM2B_SENSITIVE_DATA data; + TPM2B_AUTH userAuth; + TPM2B_SENSITIVE_DATA data; } TPMS_SENSITIVE_CREATE; // Table 131 - TPM2B_SENSITIVE_CREATE Structure typedef struct { - UINT16 size; - TPMS_SENSITIVE_CREATE sensitive; + UINT16 size; + TPMS_SENSITIVE_CREATE sensitive; } TPM2B_SENSITIVE_CREATE; // Table 132 - TPMS_SCHEME_SIGHASH Structure typedef struct { - TPMI_ALG_HASH hashAlg; + TPMI_ALG_HASH hashAlg; } TPMS_SCHEME_SIGHASH; // Table 133 - TPMI_ALG_KEYEDHASH_SCHEME Type @@ -1314,20 +1313,20 @@ typedef TPMS_SCHEME_SIGHASH TPMS_SCHEME_HMAC; // Table 135 - TPMS_SCHEME_XOR Structure typedef struct { - TPMI_ALG_HASH hashAlg; - TPMI_ALG_KDF kdf; + TPMI_ALG_HASH hashAlg; + TPMI_ALG_KDF kdf; } TPMS_SCHEME_XOR; // Table 136 - TPMU_SCHEME_KEYEDHASH Union typedef union { - TPMS_SCHEME_HMAC hmac; + TPMS_SCHEME_HMAC hmac; TPMS_SCHEME_XOR xor; } TPMU_SCHEME_KEYEDHASH; // Table 137 - TPMT_KEYEDHASH_SCHEME Structure typedef struct { - TPMI_ALG_KEYEDHASH_SCHEME scheme; - TPMU_SCHEME_KEYEDHASH details; + TPMI_ALG_KEYEDHASH_SCHEME scheme; + TPMU_SCHEME_KEYEDHASH details; } TPMT_KEYEDHASH_SCHEME; // Table 138 - RSA_SIG_SCHEMES Types @@ -1341,69 +1340,69 @@ typedef TPMS_SCHEME_SIGHASH TPMS_SCHEME_ECSCHNORR; // Table 140 - TPMS_SCHEME_ECDAA Structure typedef struct { - TPMI_ALG_HASH hashAlg; - UINT16 count; + TPMI_ALG_HASH hashAlg; + UINT16 count; } TPMS_SCHEME_ECDAA; // Table 141 - TPMU_SIG_SCHEME Union typedef union { - TPMS_SCHEME_RSASSA rsassa; - TPMS_SCHEME_RSAPSS rsapss; - TPMS_SCHEME_ECDSA ecdsa; - TPMS_SCHEME_ECDAA ecdaa; - TPMS_SCHEME_ECSCHNORR ecSchnorr; - TPMS_SCHEME_HMAC hmac; - TPMS_SCHEME_SIGHASH any; + TPMS_SCHEME_RSASSA rsassa; + TPMS_SCHEME_RSAPSS rsapss; + TPMS_SCHEME_ECDSA ecdsa; + TPMS_SCHEME_ECDAA ecdaa; + TPMS_SCHEME_ECSCHNORR ecSchnorr; + TPMS_SCHEME_HMAC hmac; + TPMS_SCHEME_SIGHASH any; } TPMU_SIG_SCHEME; // Table 142 - TPMT_SIG_SCHEME Structure typedef struct { - TPMI_ALG_SIG_SCHEME scheme; - TPMU_SIG_SCHEME details; + TPMI_ALG_SIG_SCHEME scheme; + TPMU_SIG_SCHEME details; } TPMT_SIG_SCHEME; // Table 143 - TPMS_SCHEME_OAEP Structure typedef struct { - TPMI_ALG_HASH hashAlg; + TPMI_ALG_HASH hashAlg; } TPMS_SCHEME_OAEP; // Table 144 - TPMS_SCHEME_ECDH Structure typedef struct { - TPMI_ALG_HASH hashAlg; + TPMI_ALG_HASH hashAlg; } TPMS_SCHEME_ECDH; // Table 145 - TPMS_SCHEME_MGF1 Structure typedef struct { - TPMI_ALG_HASH hashAlg; + TPMI_ALG_HASH hashAlg; } TPMS_SCHEME_MGF1; // Table 146 - TPMS_SCHEME_KDF1_SP800_56a Structure typedef struct { - TPMI_ALG_HASH hashAlg; + TPMI_ALG_HASH hashAlg; } TPMS_SCHEME_KDF1_SP800_56a; // Table 147 - TPMS_SCHEME_KDF2 Structure typedef struct { - TPMI_ALG_HASH hashAlg; + TPMI_ALG_HASH hashAlg; } TPMS_SCHEME_KDF2; // Table 148 - TPMS_SCHEME_KDF1_SP800_108 Structure typedef struct { - TPMI_ALG_HASH hashAlg; + TPMI_ALG_HASH hashAlg; } TPMS_SCHEME_KDF1_SP800_108; // Table 149 - TPMU_KDF_SCHEME Union typedef union { - TPMS_SCHEME_MGF1 mgf1; - TPMS_SCHEME_KDF1_SP800_56a kdf1_SP800_56a; - TPMS_SCHEME_KDF2 kdf2; - TPMS_SCHEME_KDF1_SP800_108 kdf1_sp800_108; + TPMS_SCHEME_MGF1 mgf1; + TPMS_SCHEME_KDF1_SP800_56a kdf1_SP800_56a; + TPMS_SCHEME_KDF2 kdf2; + TPMS_SCHEME_KDF1_SP800_108 kdf1_sp800_108; } TPMU_KDF_SCHEME; // Table 150 - TPMT_KDF_SCHEME Structure typedef struct { - TPMI_ALG_KDF scheme; - TPMU_KDF_SCHEME details; + TPMI_ALG_KDF scheme; + TPMU_KDF_SCHEME details; } TPMT_KDF_SCHEME; // Table 151 - TPMI_ALG_ASYM_SCHEME Type @@ -1411,19 +1410,19 @@ typedef TPM_ALG_ID TPMI_ALG_ASYM_SCHEME; // Table 152 - TPMU_ASYM_SCHEME Union typedef union { - TPMS_SCHEME_RSASSA rsassa; - TPMS_SCHEME_RSAPSS rsapss; - TPMS_SCHEME_OAEP oaep; - TPMS_SCHEME_ECDSA ecdsa; - TPMS_SCHEME_ECDAA ecdaa; - TPMS_SCHEME_ECSCHNORR ecSchnorr; - TPMS_SCHEME_SIGHASH anySig; + TPMS_SCHEME_RSASSA rsassa; + TPMS_SCHEME_RSAPSS rsapss; + TPMS_SCHEME_OAEP oaep; + TPMS_SCHEME_ECDSA ecdsa; + TPMS_SCHEME_ECDAA ecdaa; + TPMS_SCHEME_ECSCHNORR ecSchnorr; + TPMS_SCHEME_SIGHASH anySig; } TPMU_ASYM_SCHEME; // Table 153 - TPMT_ASYM_SCHEME Structure typedef struct { - TPMI_ALG_ASYM_SCHEME scheme; - TPMU_ASYM_SCHEME details; + TPMI_ALG_ASYM_SCHEME scheme; + TPMU_ASYM_SCHEME details; } TPMT_ASYM_SCHEME; // Table 154 - TPMI_ALG_RSA_SCHEME Type @@ -1431,8 +1430,8 @@ typedef TPM_ALG_ID TPMI_ALG_RSA_SCHEME; // Table 155 - TPMT_RSA_SCHEME Structure typedef struct { - TPMI_ALG_RSA_SCHEME scheme; - TPMU_ASYM_SCHEME details; + TPMI_ALG_RSA_SCHEME scheme; + TPMU_ASYM_SCHEME details; } TPMT_RSA_SCHEME; // Table 156 - TPMI_ALG_RSA_DECRYPT Type @@ -1440,14 +1439,14 @@ typedef TPM_ALG_ID TPMI_ALG_RSA_DECRYPT; // Table 157 - TPMT_RSA_DECRYPT Structure typedef struct { - TPMI_ALG_RSA_DECRYPT scheme; - TPMU_ASYM_SCHEME details; + TPMI_ALG_RSA_DECRYPT scheme; + TPMU_ASYM_SCHEME details; } TPMT_RSA_DECRYPT; // Table 158 - TPM2B_PUBLIC_KEY_RSA Structure typedef struct { - UINT16 size; - BYTE buffer[MAX_RSA_KEY_BYTES]; + UINT16 size; + BYTE buffer[MAX_RSA_KEY_BYTES]; } TPM2B_PUBLIC_KEY_RSA; // Table 159 - TPMI_RSA_KEY_BITS Type @@ -1455,26 +1454,26 @@ typedef TPM_KEY_BITS TPMI_RSA_KEY_BITS; // Table 160 - TPM2B_PRIVATE_KEY_RSA Structure typedef struct { - UINT16 size; - BYTE buffer[MAX_RSA_KEY_BYTES/2]; + UINT16 size; + BYTE buffer[MAX_RSA_KEY_BYTES/2]; } TPM2B_PRIVATE_KEY_RSA; // Table 161 - TPM2B_ECC_PARAMETER Structure typedef struct { - UINT16 size; - BYTE buffer[MAX_ECC_KEY_BYTES]; + UINT16 size; + BYTE buffer[MAX_ECC_KEY_BYTES]; } TPM2B_ECC_PARAMETER; // Table 162 - TPMS_ECC_POINT Structure typedef struct { - TPM2B_ECC_PARAMETER x; - TPM2B_ECC_PARAMETER y; + TPM2B_ECC_PARAMETER x; + TPM2B_ECC_PARAMETER y; } TPMS_ECC_POINT; // Table 163 -- TPM2B_ECC_POINT Structure typedef struct { - UINT16 size; - TPMS_ECC_POINT point; + UINT16 size; + TPMS_ECC_POINT point; } TPM2B_ECC_POINT; // Table 164 - TPMI_ALG_ECC_SCHEME Type @@ -1485,74 +1484,74 @@ typedef TPM_ECC_CURVE TPMI_ECC_CURVE; // Table 166 - TPMT_ECC_SCHEME Structure typedef struct { - TPMI_ALG_ECC_SCHEME scheme; - TPMU_SIG_SCHEME details; + TPMI_ALG_ECC_SCHEME scheme; + TPMU_SIG_SCHEME details; } TPMT_ECC_SCHEME; // Table 167 - TPMS_ALGORITHM_DETAIL_ECC Structure typedef struct { - TPM_ECC_CURVE curveID; - UINT16 keySize; - TPMT_KDF_SCHEME kdf; - TPMT_ECC_SCHEME sign; - TPM2B_ECC_PARAMETER p; - TPM2B_ECC_PARAMETER a; - TPM2B_ECC_PARAMETER b; - TPM2B_ECC_PARAMETER gX; - TPM2B_ECC_PARAMETER gY; - TPM2B_ECC_PARAMETER n; - TPM2B_ECC_PARAMETER h; + TPM_ECC_CURVE curveID; + UINT16 keySize; + TPMT_KDF_SCHEME kdf; + TPMT_ECC_SCHEME sign; + TPM2B_ECC_PARAMETER p; + TPM2B_ECC_PARAMETER a; + TPM2B_ECC_PARAMETER b; + TPM2B_ECC_PARAMETER gX; + TPM2B_ECC_PARAMETER gY; + TPM2B_ECC_PARAMETER n; + TPM2B_ECC_PARAMETER h; } TPMS_ALGORITHM_DETAIL_ECC; // Table 168 - TPMS_SIGNATURE_RSASSA Structure typedef struct { - TPMI_ALG_HASH hash; - TPM2B_PUBLIC_KEY_RSA sig; + TPMI_ALG_HASH hash; + TPM2B_PUBLIC_KEY_RSA sig; } TPMS_SIGNATURE_RSASSA; // Table 169 - TPMS_SIGNATURE_RSAPSS Structure typedef struct { - TPMI_ALG_HASH hash; - TPM2B_PUBLIC_KEY_RSA sig; + TPMI_ALG_HASH hash; + TPM2B_PUBLIC_KEY_RSA sig; } TPMS_SIGNATURE_RSAPSS; // Table 170 - TPMS_SIGNATURE_ECDSA Structure typedef struct { - TPMI_ALG_HASH hash; - TPM2B_ECC_PARAMETER signatureR; - TPM2B_ECC_PARAMETER signatureS; + TPMI_ALG_HASH hash; + TPM2B_ECC_PARAMETER signatureR; + TPM2B_ECC_PARAMETER signatureS; } TPMS_SIGNATURE_ECDSA; // Table 171 - TPMU_SIGNATURE Union typedef union { - TPMS_SIGNATURE_RSASSA rsassa; - TPMS_SIGNATURE_RSAPSS rsapss; - TPMS_SIGNATURE_ECDSA ecdsa; - TPMS_SIGNATURE_ECDSA sm2; - TPMS_SIGNATURE_ECDSA ecdaa; - TPMS_SIGNATURE_ECDSA ecschnorr; - TPMT_HA hmac; - TPMS_SCHEME_SIGHASH any; + TPMS_SIGNATURE_RSASSA rsassa; + TPMS_SIGNATURE_RSAPSS rsapss; + TPMS_SIGNATURE_ECDSA ecdsa; + TPMS_SIGNATURE_ECDSA sm2; + TPMS_SIGNATURE_ECDSA ecdaa; + TPMS_SIGNATURE_ECDSA ecschnorr; + TPMT_HA hmac; + TPMS_SCHEME_SIGHASH any; } TPMU_SIGNATURE; // Table 172 - TPMT_SIGNATURE Structure typedef struct { - TPMI_ALG_SIG_SCHEME sigAlg; - TPMU_SIGNATURE signature; + TPMI_ALG_SIG_SCHEME sigAlg; + TPMU_SIGNATURE signature; } TPMT_SIGNATURE; // Table 173 - TPMU_ENCRYPTED_SECRET Union typedef union { - BYTE ecc[sizeof(TPMS_ECC_POINT)]; - BYTE rsa[MAX_RSA_KEY_BYTES]; - BYTE symmetric[sizeof(TPM2B_DIGEST)]; - BYTE keyedHash[sizeof(TPM2B_DIGEST)]; + BYTE ecc[sizeof (TPMS_ECC_POINT)]; + BYTE rsa[MAX_RSA_KEY_BYTES]; + BYTE symmetric[sizeof (TPM2B_DIGEST)]; + BYTE keyedHash[sizeof (TPM2B_DIGEST)]; } TPMU_ENCRYPTED_SECRET; // Table 174 - TPM2B_ENCRYPTED_SECRET Structure typedef struct { - UINT16 size; - BYTE secret[sizeof(TPMU_ENCRYPTED_SECRET)]; + UINT16 size; + BYTE secret[sizeof (TPMU_ENCRYPTED_SECRET)]; } TPM2B_ENCRYPTED_SECRET; // 12 Key/Object Complex @@ -1562,122 +1561,122 @@ typedef TPM_ALG_ID TPMI_ALG_PUBLIC; // Table 176 - TPMU_PUBLIC_ID Union typedef union { - TPM2B_DIGEST keyedHash; - TPM2B_DIGEST sym; - TPM2B_PUBLIC_KEY_RSA rsa; - TPMS_ECC_POINT ecc; + TPM2B_DIGEST keyedHash; + TPM2B_DIGEST sym; + TPM2B_PUBLIC_KEY_RSA rsa; + TPMS_ECC_POINT ecc; } TPMU_PUBLIC_ID; // Table 177 - TPMS_KEYEDHASH_PARMS Structure typedef struct { - TPMT_KEYEDHASH_SCHEME scheme; + TPMT_KEYEDHASH_SCHEME scheme; } TPMS_KEYEDHASH_PARMS; // Table 178 - TPMS_ASYM_PARMS Structure typedef struct { - TPMT_SYM_DEF_OBJECT symmetric; - TPMT_ASYM_SCHEME scheme; + TPMT_SYM_DEF_OBJECT symmetric; + TPMT_ASYM_SCHEME scheme; } TPMS_ASYM_PARMS; // Table 179 - TPMS_RSA_PARMS Structure typedef struct { - TPMT_SYM_DEF_OBJECT symmetric; - TPMT_RSA_SCHEME scheme; - TPMI_RSA_KEY_BITS keyBits; - UINT32 exponent; + TPMT_SYM_DEF_OBJECT symmetric; + TPMT_RSA_SCHEME scheme; + TPMI_RSA_KEY_BITS keyBits; + UINT32 exponent; } TPMS_RSA_PARMS; // Table 180 - TPMS_ECC_PARMS Structure typedef struct { - TPMT_SYM_DEF_OBJECT symmetric; - TPMT_ECC_SCHEME scheme; - TPMI_ECC_CURVE curveID; - TPMT_KDF_SCHEME kdf; + TPMT_SYM_DEF_OBJECT symmetric; + TPMT_ECC_SCHEME scheme; + TPMI_ECC_CURVE curveID; + TPMT_KDF_SCHEME kdf; } TPMS_ECC_PARMS; // Table 181 - TPMU_PUBLIC_PARMS Union typedef union { - TPMS_KEYEDHASH_PARMS keyedHashDetail; - TPMT_SYM_DEF_OBJECT symDetail; - TPMS_RSA_PARMS rsaDetail; - TPMS_ECC_PARMS eccDetail; - TPMS_ASYM_PARMS asymDetail; + TPMS_KEYEDHASH_PARMS keyedHashDetail; + TPMT_SYM_DEF_OBJECT symDetail; + TPMS_RSA_PARMS rsaDetail; + TPMS_ECC_PARMS eccDetail; + TPMS_ASYM_PARMS asymDetail; } TPMU_PUBLIC_PARMS; // Table 182 - TPMT_PUBLIC_PARMS Structure typedef struct { - TPMI_ALG_PUBLIC type; - TPMU_PUBLIC_PARMS parameters; + TPMI_ALG_PUBLIC type; + TPMU_PUBLIC_PARMS parameters; } TPMT_PUBLIC_PARMS; // Table 183 - TPMT_PUBLIC Structure typedef struct { - TPMI_ALG_PUBLIC type; - TPMI_ALG_HASH nameAlg; - TPMA_OBJECT objectAttributes; - TPM2B_DIGEST authPolicy; - TPMU_PUBLIC_PARMS parameters; - TPMU_PUBLIC_ID unique; + TPMI_ALG_PUBLIC type; + TPMI_ALG_HASH nameAlg; + TPMA_OBJECT objectAttributes; + TPM2B_DIGEST authPolicy; + TPMU_PUBLIC_PARMS parameters; + TPMU_PUBLIC_ID unique; } TPMT_PUBLIC; // Table 184 - TPM2B_PUBLIC Structure typedef struct { - UINT16 size; - TPMT_PUBLIC publicArea; + UINT16 size; + TPMT_PUBLIC publicArea; } TPM2B_PUBLIC; // Table 185 - TPM2B_PRIVATE_VENDOR_SPECIFIC Structure typedef struct { - UINT16 size; - BYTE buffer[PRIVATE_VENDOR_SPECIFIC_BYTES]; + UINT16 size; + BYTE buffer[PRIVATE_VENDOR_SPECIFIC_BYTES]; } TPM2B_PRIVATE_VENDOR_SPECIFIC; // Table 186 - TPMU_SENSITIVE_COMPOSITE Union typedef union { - TPM2B_PRIVATE_KEY_RSA rsa; - TPM2B_ECC_PARAMETER ecc; - TPM2B_SENSITIVE_DATA bits; - TPM2B_SYM_KEY sym; - TPM2B_PRIVATE_VENDOR_SPECIFIC any; + TPM2B_PRIVATE_KEY_RSA rsa; + TPM2B_ECC_PARAMETER ecc; + TPM2B_SENSITIVE_DATA bits; + TPM2B_SYM_KEY sym; + TPM2B_PRIVATE_VENDOR_SPECIFIC any; } TPMU_SENSITIVE_COMPOSITE; // Table 187 - TPMT_SENSITIVE Structure typedef struct { - TPMI_ALG_PUBLIC sensitiveType; - TPM2B_AUTH authValue; - TPM2B_DIGEST seedValue; - TPMU_SENSITIVE_COMPOSITE sensitive; + TPMI_ALG_PUBLIC sensitiveType; + TPM2B_AUTH authValue; + TPM2B_DIGEST seedValue; + TPMU_SENSITIVE_COMPOSITE sensitive; } TPMT_SENSITIVE; // Table 188 - TPM2B_SENSITIVE Structure typedef struct { - UINT16 size; - TPMT_SENSITIVE sensitiveArea; + UINT16 size; + TPMT_SENSITIVE sensitiveArea; } TPM2B_SENSITIVE; // Table 189 - _PRIVATE Structure typedef struct { - TPM2B_DIGEST integrityOuter; - TPM2B_DIGEST integrityInner; - TPMT_SENSITIVE sensitive; + TPM2B_DIGEST integrityOuter; + TPM2B_DIGEST integrityInner; + TPMT_SENSITIVE sensitive; } _PRIVATE; // Table 190 - TPM2B_PRIVATE Structure typedef struct { - UINT16 size; - BYTE buffer[sizeof(_PRIVATE)]; + UINT16 size; + BYTE buffer[sizeof (_PRIVATE)]; } TPM2B_PRIVATE; // Table 191 - _ID_OBJECT Structure typedef struct { - TPM2B_DIGEST integrityHMAC; - TPM2B_DIGEST encIdentity; + TPM2B_DIGEST integrityHMAC; + TPM2B_DIGEST encIdentity; } _ID_OBJECT; // Table 192 - TPM2B_ID_OBJECT Structure typedef struct { - UINT16 size; - BYTE credential[sizeof(_ID_OBJECT)]; + UINT16 size; + BYTE credential[sizeof (_ID_OBJECT)]; } TPM2B_ID_OBJECT; // 13 NV Storage Structures @@ -1686,118 +1685,117 @@ typedef struct { // // NOTE: Comment here to resolve conflict // -//typedef struct { +// typedef struct { // UINT32 index : 22; // UINT32 space : 2; // UINT32 RH_NV : 8; -//} TPM_NV_INDEX; +// } TPM_NV_INDEX; // Table 195 - TPMA_NV Bits typedef struct { - UINT32 TPMA_NV_PPWRITE : 1; - UINT32 TPMA_NV_OWNERWRITE : 1; - UINT32 TPMA_NV_AUTHWRITE : 1; - UINT32 TPMA_NV_POLICYWRITE : 1; - UINT32 TPMA_NV_COUNTER : 1; - UINT32 TPMA_NV_BITS : 1; - UINT32 TPMA_NV_EXTEND : 1; - UINT32 reserved7_9 : 3; - UINT32 TPMA_NV_POLICY_DELETE : 1; - UINT32 TPMA_NV_WRITELOCKED : 1; - UINT32 TPMA_NV_WRITEALL : 1; - UINT32 TPMA_NV_WRITEDEFINE : 1; - UINT32 TPMA_NV_WRITE_STCLEAR : 1; - UINT32 TPMA_NV_GLOBALLOCK : 1; - UINT32 TPMA_NV_PPREAD : 1; - UINT32 TPMA_NV_OWNERREAD : 1; - UINT32 TPMA_NV_AUTHREAD : 1; - UINT32 TPMA_NV_POLICYREAD : 1; - UINT32 reserved20_24 : 5; - UINT32 TPMA_NV_NO_DA : 1; - UINT32 TPMA_NV_ORDERLY : 1; - UINT32 TPMA_NV_CLEAR_STCLEAR : 1; - UINT32 TPMA_NV_READLOCKED : 1; - UINT32 TPMA_NV_WRITTEN : 1; - UINT32 TPMA_NV_PLATFORMCREATE : 1; - UINT32 TPMA_NV_READ_STCLEAR : 1; + UINT32 TPMA_NV_PPWRITE : 1; + UINT32 TPMA_NV_OWNERWRITE : 1; + UINT32 TPMA_NV_AUTHWRITE : 1; + UINT32 TPMA_NV_POLICYWRITE : 1; + UINT32 TPMA_NV_COUNTER : 1; + UINT32 TPMA_NV_BITS : 1; + UINT32 TPMA_NV_EXTEND : 1; + UINT32 reserved7_9 : 3; + UINT32 TPMA_NV_POLICY_DELETE : 1; + UINT32 TPMA_NV_WRITELOCKED : 1; + UINT32 TPMA_NV_WRITEALL : 1; + UINT32 TPMA_NV_WRITEDEFINE : 1; + UINT32 TPMA_NV_WRITE_STCLEAR : 1; + UINT32 TPMA_NV_GLOBALLOCK : 1; + UINT32 TPMA_NV_PPREAD : 1; + UINT32 TPMA_NV_OWNERREAD : 1; + UINT32 TPMA_NV_AUTHREAD : 1; + UINT32 TPMA_NV_POLICYREAD : 1; + UINT32 reserved20_24 : 5; + UINT32 TPMA_NV_NO_DA : 1; + UINT32 TPMA_NV_ORDERLY : 1; + UINT32 TPMA_NV_CLEAR_STCLEAR : 1; + UINT32 TPMA_NV_READLOCKED : 1; + UINT32 TPMA_NV_WRITTEN : 1; + UINT32 TPMA_NV_PLATFORMCREATE : 1; + UINT32 TPMA_NV_READ_STCLEAR : 1; } TPMA_NV; // Table 196 - TPMS_NV_PUBLIC Structure typedef struct { - TPMI_RH_NV_INDEX nvIndex; - TPMI_ALG_HASH nameAlg; - TPMA_NV attributes; - TPM2B_DIGEST authPolicy; - UINT16 dataSize; + TPMI_RH_NV_INDEX nvIndex; + TPMI_ALG_HASH nameAlg; + TPMA_NV attributes; + TPM2B_DIGEST authPolicy; + UINT16 dataSize; } TPMS_NV_PUBLIC; // Table 197 - TPM2B_NV_PUBLIC Structure typedef struct { - UINT16 size; - TPMS_NV_PUBLIC nvPublic; + UINT16 size; + TPMS_NV_PUBLIC nvPublic; } TPM2B_NV_PUBLIC; // 14 Context Data // Table 198 - TPM2B_CONTEXT_SENSITIVE Structure typedef struct { - UINT16 size; - BYTE buffer[MAX_CONTEXT_SIZE]; + UINT16 size; + BYTE buffer[MAX_CONTEXT_SIZE]; } TPM2B_CONTEXT_SENSITIVE; // Table 199 - TPMS_CONTEXT_DATA Structure typedef struct { - TPM2B_DIGEST integrity; - TPM2B_CONTEXT_SENSITIVE encrypted; + TPM2B_DIGEST integrity; + TPM2B_CONTEXT_SENSITIVE encrypted; } TPMS_CONTEXT_DATA; // Table 200 - TPM2B_CONTEXT_DATA Structure typedef struct { - UINT16 size; - BYTE buffer[sizeof(TPMS_CONTEXT_DATA)]; + UINT16 size; + BYTE buffer[sizeof (TPMS_CONTEXT_DATA)]; } TPM2B_CONTEXT_DATA; // Table 201 - TPMS_CONTEXT Structure typedef struct { - UINT64 sequence; - TPMI_DH_CONTEXT savedHandle; - TPMI_RH_HIERARCHY hierarchy; - TPM2B_CONTEXT_DATA contextBlob; + UINT64 sequence; + TPMI_DH_CONTEXT savedHandle; + TPMI_RH_HIERARCHY hierarchy; + TPM2B_CONTEXT_DATA contextBlob; } TPMS_CONTEXT; // 15 Creation Data // Table 203 - TPMS_CREATION_DATA Structure typedef struct { - TPML_PCR_SELECTION pcrSelect; - TPM2B_DIGEST pcrDigest; - TPMA_LOCALITY locality; - TPM_ALG_ID parentNameAlg; - TPM2B_NAME parentName; - TPM2B_NAME parentQualifiedName; - TPM2B_DATA outsideInfo; + TPML_PCR_SELECTION pcrSelect; + TPM2B_DIGEST pcrDigest; + TPMA_LOCALITY locality; + TPM_ALG_ID parentNameAlg; + TPM2B_NAME parentName; + TPM2B_NAME parentQualifiedName; + TPM2B_DATA outsideInfo; } TPMS_CREATION_DATA; // Table 204 - TPM2B_CREATION_DATA Structure typedef struct { - UINT16 size; - TPMS_CREATION_DATA creationData; + UINT16 size; + TPMS_CREATION_DATA creationData; } TPM2B_CREATION_DATA; - // // Command Header // typedef struct { - TPM_ST tag; - UINT32 paramSize; - TPM_CC commandCode; + TPM_ST tag; + UINT32 paramSize; + TPM_CC commandCode; } TPM2_COMMAND_HEADER; typedef struct { - TPM_ST tag; - UINT32 paramSize; - TPM_RC responseCode; + TPM_ST tag; + UINT32 paramSize; + TPM_RC responseCode; } TPM2_RESPONSE_HEADER; #pragma pack () @@ -1805,10 +1803,10 @@ typedef struct { // // TCG Algorithm Registry // -#define HASH_ALG_SHA1 0x00000001 -#define HASH_ALG_SHA256 0x00000002 -#define HASH_ALG_SHA384 0x00000004 -#define HASH_ALG_SHA512 0x00000008 -#define HASH_ALG_SM3_256 0x00000010 +#define HASH_ALG_SHA1 0x00000001 +#define HASH_ALG_SHA256 0x00000002 +#define HASH_ALG_SHA384 0x00000004 +#define HASH_ALG_SHA512 0x00000008 +#define HASH_ALG_SM3_256 0x00000010 #endif diff --git a/MdePkg/Include/IndustryStandard/Tpm2Acpi.h b/MdePkg/Include/IndustryStandard/Tpm2Acpi.h index 946bc7d..e7d14f9 100644 --- a/MdePkg/Include/IndustryStandard/Tpm2Acpi.h +++ b/MdePkg/Include/IndustryStandard/Tpm2Acpi.h @@ -19,34 +19,34 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define EFI_TPM2_ACPI_TABLE_REVISION EFI_TPM2_ACPI_TABLE_REVISION_4 typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_DESCRIPTION_HEADER Header; // Flags field is replaced in version 4 and above // BIT0~15: PlatformClass This field is only valid for version 4 and above // BIT16~31: Reserved - UINT32 Flags; - UINT64 AddressOfControlArea; - UINT32 StartMethod; -//UINT8 PlatformSpecificParameters[]; // size up to 12 -//UINT32 Laml; // Optional -//UINT64 Lasa; // Optional + UINT32 Flags; + UINT64 AddressOfControlArea; + UINT32 StartMethod; + // UINT8 PlatformSpecificParameters[]; // size up to 12 + // UINT32 Laml; // Optional + // UINT64 Lasa; // Optional } EFI_TPM2_ACPI_TABLE; -#define EFI_TPM2_ACPI_TABLE_START_METHOD_ACPI 2 -#define EFI_TPM2_ACPI_TABLE_START_METHOD_TIS 6 -#define EFI_TPM2_ACPI_TABLE_START_METHOD_COMMAND_RESPONSE_BUFFER_INTERFACE 7 -#define EFI_TPM2_ACPI_TABLE_START_METHOD_COMMAND_RESPONSE_BUFFER_INTERFACE_WITH_ACPI 8 -#define EFI_TPM2_ACPI_TABLE_START_METHOD_COMMAND_RESPONSE_BUFFER_INTERFACE_WITH_SMC 11 +#define EFI_TPM2_ACPI_TABLE_START_METHOD_ACPI 2 +#define EFI_TPM2_ACPI_TABLE_START_METHOD_TIS 6 +#define EFI_TPM2_ACPI_TABLE_START_METHOD_COMMAND_RESPONSE_BUFFER_INTERFACE 7 +#define EFI_TPM2_ACPI_TABLE_START_METHOD_COMMAND_RESPONSE_BUFFER_INTERFACE_WITH_ACPI 8 +#define EFI_TPM2_ACPI_TABLE_START_METHOD_COMMAND_RESPONSE_BUFFER_INTERFACE_WITH_SMC 11 typedef struct { - UINT32 Reserved; - UINT32 Error; - UINT32 Cancel; - UINT32 Start; - UINT64 InterruptControl; - UINT32 CommandSize; - UINT64 Command; - UINT32 ResponseSize; - UINT64 Response; + UINT32 Reserved; + UINT32 Error; + UINT32 Cancel; + UINT32 Start; + UINT64 InterruptControl; + UINT32 CommandSize; + UINT64 Command; + UINT32 ResponseSize; + UINT64 Response; } EFI_TPM2_ACPI_CONTROL_AREA; // @@ -54,11 +54,11 @@ typedef struct { // Refer to Table 9: Start Method Specific Parameters for ARM SMC // typedef struct { - UINT32 Interrupt; - UINT8 Flags; - UINT8 OperationFlags; - UINT8 Reserved[2]; - UINT32 SmcFunctionId; + UINT32 Interrupt; + UINT8 Flags; + UINT8 OperationFlags; + UINT8 Reserved[2]; + UINT32 SmcFunctionId; } EFI_TPM2_ACPI_START_METHOD_SPECIFIC_PARAMETERS_ARM_SMC; #pragma pack () diff --git a/MdePkg/Include/IndustryStandard/TpmPtp.h b/MdePkg/Include/IndustryStandard/TpmPtp.h index 5ecfa86..43c5757 100644 --- a/MdePkg/Include/IndustryStandard/TpmPtp.h +++ b/MdePkg/Include/IndustryStandard/TpmPtp.h @@ -26,66 +26,66 @@ typedef struct { /// /// Used to gain ownership for this particular port. /// - UINT8 Access; // 0 - UINT8 Reserved1[7]; // 1 + UINT8 Access; // 0 + UINT8 Reserved1[7]; // 1 /// /// Controls interrupts. /// - UINT32 IntEnable; // 8 + UINT32 IntEnable; // 8 /// /// SIRQ vector to be used by the TPM. /// - UINT8 IntVector; // 0ch - UINT8 Reserved2[3]; // 0dh + UINT8 IntVector; // 0ch + UINT8 Reserved2[3]; // 0dh /// /// What caused interrupt. /// - UINT32 IntSts; // 10h + UINT32 IntSts; // 10h /// /// Shows which interrupts are supported by that particular TPM. /// - UINT32 InterfaceCapability;// 14h + UINT32 InterfaceCapability; // 14h /// /// Status Register. Provides status of the TPM. /// - UINT8 Status; // 18h + UINT8 Status; // 18h /// /// Number of consecutive writes that can be done to the TPM. /// - UINT16 BurstCount; // 19h + UINT16 BurstCount; // 19h /// /// Additional Status Register. /// - UINT8 StatusEx; // 1Bh - UINT8 Reserved3[8]; + UINT8 StatusEx; // 1Bh + UINT8 Reserved3[8]; /// /// Read or write FIFO, depending on transaction. /// - UINT32 DataFifo; // 24h - UINT8 Reserved4[8]; // 28h + UINT32 DataFifo; // 24h + UINT8 Reserved4[8]; // 28h /// /// Used to identify the Interface types supported by the TPM. /// - UINT32 InterfaceId; // 30h - UINT8 Reserved5[0x4c]; // 34h + UINT32 InterfaceId; // 30h + UINT8 Reserved5[0x4c]; // 34h /// /// Extended ReadFIFO or WriteFIFO, depending on the current bus cycle (read or write) /// - UINT32 XDataFifo; // 80h - UINT8 Reserved6[0xe7c]; // 84h + UINT32 XDataFifo; // 80h + UINT8 Reserved6[0xe7c]; // 84h /// /// Vendor ID /// - UINT16 Vid; // 0f00h + UINT16 Vid; // 0f00h /// /// Device ID /// - UINT16 Did; // 0f02h + UINT16 Did; // 0f02h /// /// Revision ID /// - UINT8 Rid; // 0f04h - UINT8 Reserved[0xfb]; // 0f05h + UINT8 Rid; // 0f04h + UINT8 Reserved[0xfb]; // 0f05h } PTP_FIFO_REGISTERS; // @@ -96,27 +96,27 @@ typedef struct { // // Define pointer types used to access TIS registers on PC // -typedef PTP_FIFO_REGISTERS *PTP_FIFO_REGISTERS_PTR; +typedef PTP_FIFO_REGISTERS *PTP_FIFO_REGISTERS_PTR; // // Define bits of FIFO Interface Identifier Register // typedef union { struct { - UINT32 InterfaceType:4; - UINT32 InterfaceVersion:4; - UINT32 CapLocality:1; - UINT32 Reserved1:2; - UINT32 CapDataXferSizeSupport:2; - UINT32 CapFIFO:1; - UINT32 CapCRB:1; - UINT32 CapIFRes:2; - UINT32 InterfaceSelector:2; - UINT32 IntfSelLock:1; - UINT32 Reserved2:4; - UINT32 Reserved3:8; + UINT32 InterfaceType : 4; + UINT32 InterfaceVersion : 4; + UINT32 CapLocality : 1; + UINT32 Reserved1 : 2; + UINT32 CapDataXferSizeSupport : 2; + UINT32 CapFIFO : 1; + UINT32 CapCRB : 1; + UINT32 CapIFRes : 2; + UINT32 InterfaceSelector : 2; + UINT32 IntfSelLock : 1; + UINT32 Reserved2 : 4; + UINT32 Reserved3 : 8; } Bits; - UINT32 Uint32; + UINT32 Uint32; } PTP_FIFO_INTERFACE_IDENTIFIER; // @@ -124,21 +124,21 @@ typedef union { // typedef union { struct { - UINT32 DataAvailIntSupport:1; - UINT32 StsValidIntSupport:1; - UINT32 LocalityChangeIntSupport:1; - UINT32 InterruptLevelHigh:1; - UINT32 InterruptLevelLow:1; - UINT32 InterruptEdgeRising:1; - UINT32 InterruptEdgeFalling:1; - UINT32 CommandReadyIntSupport:1; - UINT32 BurstCountStatic:1; - UINT32 DataTransferSizeSupport:2; - UINT32 Reserved:17; - UINT32 InterfaceVersion:3; - UINT32 Reserved2:1; + UINT32 DataAvailIntSupport : 1; + UINT32 StsValidIntSupport : 1; + UINT32 LocalityChangeIntSupport : 1; + UINT32 InterruptLevelHigh : 1; + UINT32 InterruptLevelLow : 1; + UINT32 InterruptEdgeRising : 1; + UINT32 InterruptEdgeFalling : 1; + UINT32 CommandReadyIntSupport : 1; + UINT32 BurstCountStatic : 1; + UINT32 DataTransferSizeSupport : 2; + UINT32 Reserved : 17; + UINT32 InterfaceVersion : 3; + UINT32 Reserved2 : 1; } Bits; - UINT32 Uint32; + UINT32 Uint32; } PTP_FIFO_INTERFACE_CAPABILITY; /// @@ -148,7 +148,6 @@ typedef union { #define INTERFACE_CAPABILITY_INTERFACE_VERSION_TIS_13 0x2 #define INTERFACE_CAPABILITY_INTERFACE_VERSION_PTP 0x3 - // // Define bits of ACCESS and STATUS registers // @@ -156,80 +155,79 @@ typedef union { /// /// This bit is a 1 to indicate that the other bits in this register are valid. /// -#define PTP_FIFO_VALID BIT7 +#define PTP_FIFO_VALID BIT7 /// /// Indicate that this locality is active. /// -#define PTP_FIFO_ACC_ACTIVE BIT5 +#define PTP_FIFO_ACC_ACTIVE BIT5 /// /// Set to 1 to indicate that this locality had the TPM taken away while /// this locality had the TIS_PC_ACC_ACTIVE bit set. /// -#define PTP_FIFO_ACC_SEIZED BIT4 +#define PTP_FIFO_ACC_SEIZED BIT4 /// /// Set to 1 to indicate that TPM MUST reset the /// TIS_PC_ACC_ACTIVE bit and remove ownership for localities less than the /// locality that is writing this bit. /// -#define PTP_FIFO_ACC_SEIZE BIT3 +#define PTP_FIFO_ACC_SEIZE BIT3 /// /// When this bit is 1, another locality is requesting usage of the TPM. /// -#define PTP_FIFO_ACC_PENDIND BIT2 +#define PTP_FIFO_ACC_PENDIND BIT2 /// /// Set to 1 to indicate that this locality is requesting to use TPM. /// -#define PTP_FIFO_ACC_RQUUSE BIT1 +#define PTP_FIFO_ACC_RQUUSE BIT1 /// /// A value of 1 indicates that a T/OS has not been established on the platform /// -#define PTP_FIFO_ACC_ESTABLISH BIT0 +#define PTP_FIFO_ACC_ESTABLISH BIT0 /// /// This field indicates that STS_DATA and STS_EXPECT are valid /// -#define PTP_FIFO_STS_VALID BIT7 +#define PTP_FIFO_STS_VALID BIT7 /// /// When this bit is 1, TPM is in the Ready state, /// indicating it is ready to receive a new command. /// -#define PTP_FIFO_STS_READY BIT6 +#define PTP_FIFO_STS_READY BIT6 /// /// Write a 1 to this bit to cause the TPM to execute that command. /// -#define PTP_FIFO_STS_GO BIT5 +#define PTP_FIFO_STS_GO BIT5 /// /// This bit indicates that the TPM has data available as a response. /// -#define PTP_FIFO_STS_DATA BIT4 +#define PTP_FIFO_STS_DATA BIT4 /// /// The TPM sets this bit to a value of 1 when it expects another byte of data for a command. /// -#define PTP_FIFO_STS_EXPECT BIT3 +#define PTP_FIFO_STS_EXPECT BIT3 /// /// Indicates that the TPM has completed all self-test actions following a TPM_ContinueSelfTest command. /// -#define PTP_FIFO_STS_SELFTEST_DONE BIT2 +#define PTP_FIFO_STS_SELFTEST_DONE BIT2 /// /// Writes a 1 to this bit to force the TPM to re-send the response. /// -#define PTP_FIFO_STS_RETRY BIT1 +#define PTP_FIFO_STS_RETRY BIT1 /// /// TPM Family Identifier. /// 00: TPM 1.2 Family /// 01: TPM 2.0 Family /// -#define PTP_FIFO_STS_EX_TPM_FAMILY (BIT2 | BIT3) -#define PTP_FIFO_STS_EX_TPM_FAMILY_OFFSET (2) -#define PTP_FIFO_STS_EX_TPM_FAMILY_TPM12 (0) -#define PTP_FIFO_STS_EX_TPM_FAMILY_TPM20 (BIT2) +#define PTP_FIFO_STS_EX_TPM_FAMILY (BIT2 | BIT3) +#define PTP_FIFO_STS_EX_TPM_FAMILY_OFFSET (2) +#define PTP_FIFO_STS_EX_TPM_FAMILY_TPM12 (0) +#define PTP_FIFO_STS_EX_TPM_FAMILY_TPM20 (BIT2) /// /// A write of 1 after tpmGo and before dataAvail aborts the currently executing command, resulting in a response of TPM_RC_CANCELLED. /// A write of 1 after dataAvail and before tpmGo is ignored by the TPM. /// -#define PTP_FIFO_STS_EX_CANCEL BIT0 - +#define PTP_FIFO_STS_EX_CANCEL BIT0 // // PTP CRB definition @@ -247,103 +245,103 @@ typedef struct { /// /// Used to determine current state of Locality of the TPM. /// - UINT32 LocalityState; // 0 - UINT8 Reserved1[4]; // 4 + UINT32 LocalityState; // 0 + UINT8 Reserved1[4]; // 4 /// /// Used to gain control of the TPM by this Locality. /// - UINT32 LocalityControl; // 8 + UINT32 LocalityControl; // 8 /// /// Used to determine whether Locality has been granted or Seized. /// - UINT32 LocalityStatus; // 0ch - UINT8 Reserved2[0x20]; // 10h + UINT32 LocalityStatus; // 0ch + UINT8 Reserved2[0x20]; // 10h /// /// Used to identify the Interface types supported by the TPM. /// - UINT32 InterfaceId; // 30h + UINT32 InterfaceId; // 30h /// /// Vendor ID /// - UINT16 Vid; // 34h + UINT16 Vid; // 34h /// /// Device ID /// - UINT16 Did; // 36h + UINT16 Did; // 36h /// /// Optional Register used in low memory environments prior to CRB_DATA_BUFFER availability. /// - UINT64 CrbControlExtension; // 38h + UINT64 CrbControlExtension; // 38h /// /// Register used to initiate transactions for the CRB interface. /// - UINT32 CrbControlRequest; // 40h + UINT32 CrbControlRequest; // 40h /// /// Register used by the TPM to provide status of the CRB interface. /// - UINT32 CrbControlStatus; // 44h + UINT32 CrbControlStatus; // 44h /// /// Register used by software to cancel command processing. /// - UINT32 CrbControlCancel; // 48h + UINT32 CrbControlCancel; // 48h /// /// Register used to indicate presence of command or response data in the CRB buffer. /// - UINT32 CrbControlStart; // 4Ch + UINT32 CrbControlStart; // 4Ch /// /// Register used to configure and respond to interrupts. /// - UINT32 CrbInterruptEnable; // 50h - UINT32 CrbInterruptStatus; // 54h + UINT32 CrbInterruptEnable; // 50h + UINT32 CrbInterruptStatus; // 54h /// /// Size of the Command buffer. /// - UINT32 CrbControlCommandSize; // 58h + UINT32 CrbControlCommandSize; // 58h /// /// Command buffer start address /// - UINT32 CrbControlCommandAddressLow; // 5Ch - UINT32 CrbControlCommandAddressHigh; // 60h + UINT32 CrbControlCommandAddressLow; // 5Ch + UINT32 CrbControlCommandAddressHigh; // 60h /// /// Size of the Response buffer /// - UINT32 CrbControlResponseSize; // 64h + UINT32 CrbControlResponseSize; // 64h /// /// Address of the start of the Response buffer /// - UINT64 CrbControlResponseAddrss; // 68h - UINT8 Reserved4[0x10]; // 70h + UINT64 CrbControlResponseAddrss; // 68h + UINT8 Reserved4[0x10]; // 70h /// /// Command/Response Data may be defined as large as 3968 (0xF80). /// - UINT8 CrbDataBuffer[0xF80]; // 80h + UINT8 CrbDataBuffer[0xF80]; // 80h } PTP_CRB_REGISTERS; // // Define pointer types used to access CRB registers on PTP // -typedef PTP_CRB_REGISTERS *PTP_CRB_REGISTERS_PTR; +typedef PTP_CRB_REGISTERS *PTP_CRB_REGISTERS_PTR; // // Define bits of CRB Interface Identifier Register // typedef union { struct { - UINT32 InterfaceType:4; - UINT32 InterfaceVersion:4; - UINT32 CapLocality:1; - UINT32 CapCRBIdleBypass:1; - UINT32 Reserved1:1; - UINT32 CapDataXferSizeSupport:2; - UINT32 CapFIFO:1; - UINT32 CapCRB:1; - UINT32 CapIFRes:2; - UINT32 InterfaceSelector:2; - UINT32 IntfSelLock:1; - UINT32 Reserved2:4; - UINT32 Rid:8; + UINT32 InterfaceType : 4; + UINT32 InterfaceVersion : 4; + UINT32 CapLocality : 1; + UINT32 CapCRBIdleBypass : 1; + UINT32 Reserved1 : 1; + UINT32 CapDataXferSizeSupport : 2; + UINT32 CapFIFO : 1; + UINT32 CapCRB : 1; + UINT32 CapIFRes : 2; + UINT32 InterfaceSelector : 2; + UINT32 IntfSelLock : 1; + UINT32 Reserved2 : 4; + UINT32 Rid : 8; } Bits; - UINT32 Uint32; + UINT32 Uint32; } PTP_CRB_INTERFACE_IDENTIFIER; /// @@ -372,7 +370,7 @@ typedef union { /// /// This bit indicates whether all other bits of this register contain valid values, if it is a 1. /// -#define PTP_CRB_LOCALITY_STATE_TPM_REG_VALID_STATUS BIT7 +#define PTP_CRB_LOCALITY_STATE_TPM_REG_VALID_STATUS BIT7 /// /// 000 - Locality 0 @@ -381,24 +379,24 @@ typedef union { /// 011 - Locality 3 /// 100 - Locality 4 /// -#define PTP_CRB_LOCALITY_STATE_ACTIVE_LOCALITY_MASK (BIT2 | BIT3 | BIT4) -#define PTP_CRB_LOCALITY_STATE_ACTIVE_LOCALITY_0 (0) -#define PTP_CRB_LOCALITY_STATE_ACTIVE_LOCALITY_1 (BIT2) -#define PTP_CRB_LOCALITY_STATE_ACTIVE_LOCALITY_2 (BIT3) -#define PTP_CRB_LOCALITY_STATE_ACTIVE_LOCALITY_3 (BIT2 | BIT3) -#define PTP_CRB_LOCALITY_STATE_ACTIVE_LOCALITY_4 (BIT4) +#define PTP_CRB_LOCALITY_STATE_ACTIVE_LOCALITY_MASK (BIT2 | BIT3 | BIT4) +#define PTP_CRB_LOCALITY_STATE_ACTIVE_LOCALITY_0 (0) +#define PTP_CRB_LOCALITY_STATE_ACTIVE_LOCALITY_1 (BIT2) +#define PTP_CRB_LOCALITY_STATE_ACTIVE_LOCALITY_2 (BIT3) +#define PTP_CRB_LOCALITY_STATE_ACTIVE_LOCALITY_3 (BIT2 | BIT3) +#define PTP_CRB_LOCALITY_STATE_ACTIVE_LOCALITY_4 (BIT4) /// /// A 0 indicates to the host that no locality is assigned. /// A 1 indicates a locality has been assigned. /// -#define PTP_CRB_LOCALITY_STATE_LOCALITY_ASSIGNED BIT1 +#define PTP_CRB_LOCALITY_STATE_LOCALITY_ASSIGNED BIT1 /// /// The TPM clears this bit to 0 upon receipt of _TPM_Hash_End /// The TPM sets this bit to a 1 when the TPM_LOC_CTRL_x.resetEstablishment field is set to 1. /// -#define PTP_CRB_LOCALITY_STATE_TPM_ESTABLISHED BIT0 +#define PTP_CRB_LOCALITY_STATE_TPM_ESTABLISHED BIT0 // // Define bits of Locality Control Register @@ -412,17 +410,17 @@ typedef union { /// /// Writes (1): The TPM gives control of the TPM to the locality setting this bit if it is the higher priority locality. /// -#define PTP_CRB_LOCALITY_CONTROL_SEIZE BIT2 +#define PTP_CRB_LOCALITY_CONTROL_SEIZE BIT2 /// /// Writes (1): The active Locality is done with the TPM. /// -#define PTP_CRB_LOCALITY_CONTROL_RELINQUISH BIT1 +#define PTP_CRB_LOCALITY_CONTROL_RELINQUISH BIT1 /// /// Writes (1): Interrupt the TPM and generate a locality arbitration algorithm. /// -#define PTP_CRB_LOCALITY_CONTROL_REQUEST_ACCESS BIT0 +#define PTP_CRB_LOCALITY_CONTROL_REQUEST_ACCESS BIT0 // // Define bits of Locality Status Register @@ -432,13 +430,13 @@ typedef union { /// 0: A higher locality has not initiated a Seize arbitration process. /// 1: A higher locality has Seized the TPM from this locality. /// -#define PTP_CRB_LOCALITY_STATUS_BEEN_SEIZED BIT1 +#define PTP_CRB_LOCALITY_STATUS_BEEN_SEIZED BIT1 /// /// 0: Locality has not been granted to the TPM. /// 1: Locality has been granted access to the TPM /// -#define PTP_CRB_LOCALITY_STATUS_GRANTED BIT0 +#define PTP_CRB_LOCALITY_STATUS_GRANTED BIT0 // // Define bits of CRB Control Area Request Register @@ -450,7 +448,7 @@ typedef union { /// 0: Cleared to 0 by TPM to acknowledge the request when TPM enters Idle state. /// TPM SHALL complete this transition within TIMEOUT_C. /// -#define PTP_CRB_CONTROL_AREA_REQUEST_GO_IDLE BIT1 +#define PTP_CRB_CONTROL_AREA_REQUEST_GO_IDLE BIT1 /// /// Used by Software to request the TPM transition to the Ready State. @@ -458,7 +456,7 @@ typedef union { /// 0: Cleared to 0 by TPM to acknowledge the request. /// TPM SHALL complete this transition within TIMEOUT_C. /// -#define PTP_CRB_CONTROL_AREA_REQUEST_COMMAND_READY BIT0 +#define PTP_CRB_CONTROL_AREA_REQUEST_COMMAND_READY BIT0 // // Define bits of CRB Control Area Status Register @@ -470,14 +468,14 @@ typedef union { /// 0: Cleared by TPM on receipt of TPM_CRB_CTRL_REQ_x.cmdReady when TPM transitions to the Ready State. /// SHALL be cleared by TIMEOUT_C. /// -#define PTP_CRB_CONTROL_AREA_STATUS_TPM_IDLE BIT1 +#define PTP_CRB_CONTROL_AREA_STATUS_TPM_IDLE BIT1 /// /// Used by the TPM to indicate current status. /// 1: Set by TPM to indicate a FATAL Error /// 0: Indicates TPM is operational /// -#define PTP_CRB_CONTROL_AREA_STATUS_TPM_STATUS BIT0 +#define PTP_CRB_CONTROL_AREA_STATUS_TPM_STATUS BIT0 // // Define bits of CRB Control Cancel Register @@ -488,7 +486,7 @@ typedef union { /// Writes (0000 0001h): Cancel a command /// Writes (0000 0000h): Clears field when command has been cancelled /// -#define PTP_CRB_CONTROL_CANCEL BIT0 +#define PTP_CRB_CONTROL_CANCEL BIT0 // // Define bits of CRB Control Start Register @@ -499,7 +497,7 @@ typedef union { /// Writes (0000 0001h): TPM transitions to Command Execution /// Writes (0000 0000h): TPM clears this field and transitions to Command Completion /// -#define PTP_CRB_CONTROL_START BIT0 +#define PTP_CRB_CONTROL_START BIT0 // // Restore original structure alignment @@ -509,9 +507,9 @@ typedef union { // // Default TimeOut value // -#define PTP_TIMEOUT_A (750 * 1000) // 750ms -#define PTP_TIMEOUT_B (2000 * 1000) // 2s -#define PTP_TIMEOUT_C (200 * 1000) // 200ms -#define PTP_TIMEOUT_D (30 * 1000) // 30ms +#define PTP_TIMEOUT_A (750 * 1000) // 750ms +#define PTP_TIMEOUT_B (2000 * 1000) // 2s +#define PTP_TIMEOUT_C (200 * 1000) // 200ms +#define PTP_TIMEOUT_D (30 * 1000) // 30ms #endif diff --git a/MdePkg/Include/IndustryStandard/TpmTis.h b/MdePkg/Include/IndustryStandard/TpmTis.h index b9253a3..5d5c1d2 100644 --- a/MdePkg/Include/IndustryStandard/TpmTis.h +++ b/MdePkg/Include/IndustryStandard/TpmTis.h @@ -22,72 +22,72 @@ typedef struct { /// /// Used to gain ownership for this particular port. /// - UINT8 Access; // 0 - UINT8 Reserved1[7]; // 1 + UINT8 Access; // 0 + UINT8 Reserved1[7]; // 1 /// /// Controls interrupts. /// - UINT32 IntEnable; // 8 + UINT32 IntEnable; // 8 /// /// SIRQ vector to be used by the TPM. /// - UINT8 IntVector; // 0ch - UINT8 Reserved2[3]; // 0dh + UINT8 IntVector; // 0ch + UINT8 Reserved2[3]; // 0dh /// /// What caused interrupt. /// - UINT32 IntSts; // 10h + UINT32 IntSts; // 10h /// /// Shows which interrupts are supported by that particular TPM. /// - UINT32 IntfCapability; // 14h + UINT32 IntfCapability; // 14h /// /// Status Register. Provides status of the TPM. /// - UINT8 Status; // 18h + UINT8 Status; // 18h /// /// Number of consecutive writes that can be done to the TPM. /// - UINT16 BurstCount; // 19h - UINT8 Reserved3[9]; + UINT16 BurstCount; // 19h + UINT8 Reserved3[9]; /// /// Read or write FIFO, depending on transaction. /// - UINT32 DataFifo; // 24h - UINT8 Reserved4[0xed8]; // 28h + UINT32 DataFifo; // 24h + UINT8 Reserved4[0xed8]; // 28h /// /// Vendor ID /// - UINT16 Vid; // 0f00h + UINT16 Vid; // 0f00h /// /// Device ID /// - UINT16 Did; // 0f02h + UINT16 Did; // 0f02h /// /// Revision ID /// - UINT8 Rid; // 0f04h - UINT8 Reserved[0x7b]; // 0f05h + UINT8 Rid; // 0f04h + UINT8 Reserved[0x7b]; // 0f05h /// /// Alias to I/O legacy space. /// - UINT32 LegacyAddress1; // 0f80h + UINT32 LegacyAddress1; // 0f80h /// /// Additional 8 bits for I/O legacy space extension. /// - UINT32 LegacyAddress1Ex; // 0f84h + UINT32 LegacyAddress1Ex; // 0f84h /// /// Alias to second I/O legacy space. /// - UINT32 LegacyAddress2; // 0f88h + UINT32 LegacyAddress2; // 0f88h /// /// Additional 8 bits for second I/O legacy space extension. /// - UINT32 LegacyAddress2Ex; // 0f8ch + UINT32 LegacyAddress2Ex; // 0f8ch /// /// Vendor-defined configuration registers. /// - UINT8 VendorDefined[0x70];// 0f90h + UINT8 VendorDefined[0x70]; // 0f90h } TIS_PC_REGISTERS; // @@ -98,7 +98,7 @@ typedef struct { // // Define pointer types used to access TIS registers on PC // -typedef TIS_PC_REGISTERS *TIS_PC_REGISTERS_PTR; +typedef TIS_PC_REGISTERS *TIS_PC_REGISTERS_PTR; // // Define bits of ACCESS and STATUS registers @@ -107,75 +107,75 @@ typedef TIS_PC_REGISTERS *TIS_PC_REGISTERS_PTR; /// /// This bit is a 1 to indicate that the other bits in this register are valid. /// -#define TIS_PC_VALID BIT7 +#define TIS_PC_VALID BIT7 /// /// Indicate that this locality is active. /// -#define TIS_PC_ACC_ACTIVE BIT5 +#define TIS_PC_ACC_ACTIVE BIT5 /// /// Set to 1 to indicate that this locality had the TPM taken away while /// this locality had the TIS_PC_ACC_ACTIVE bit set. /// -#define TIS_PC_ACC_SEIZED BIT4 +#define TIS_PC_ACC_SEIZED BIT4 /// /// Set to 1 to indicate that TPM MUST reset the /// TIS_PC_ACC_ACTIVE bit and remove ownership for localities less than the /// locality that is writing this bit. /// -#define TIS_PC_ACC_SEIZE BIT3 +#define TIS_PC_ACC_SEIZE BIT3 /// /// When this bit is 1, another locality is requesting usage of the TPM. /// -#define TIS_PC_ACC_PENDIND BIT2 +#define TIS_PC_ACC_PENDIND BIT2 /// /// Set to 1 to indicate that this locality is requesting to use TPM. /// -#define TIS_PC_ACC_RQUUSE BIT1 +#define TIS_PC_ACC_RQUUSE BIT1 /// /// A value of 1 indicates that a T/OS has not been established on the platform /// -#define TIS_PC_ACC_ESTABLISH BIT0 +#define TIS_PC_ACC_ESTABLISH BIT0 /// /// Write a 1 to this bit to notify TPM to cancel currently executing command /// -#define TIS_PC_STS_CANCEL BIT24 +#define TIS_PC_STS_CANCEL BIT24 /// /// This field indicates that STS_DATA and STS_EXPECT are valid /// -#define TIS_PC_STS_VALID BIT7 +#define TIS_PC_STS_VALID BIT7 /// /// When this bit is 1, TPM is in the Ready state, /// indicating it is ready to receive a new command. /// -#define TIS_PC_STS_READY BIT6 +#define TIS_PC_STS_READY BIT6 /// /// Write a 1 to this bit to cause the TPM to execute that command. /// -#define TIS_PC_STS_GO BIT5 +#define TIS_PC_STS_GO BIT5 /// /// This bit indicates that the TPM has data available as a response. /// -#define TIS_PC_STS_DATA BIT4 +#define TIS_PC_STS_DATA BIT4 /// /// The TPM sets this bit to a value of 1 when it expects another byte of data for a command. /// -#define TIS_PC_STS_EXPECT BIT3 +#define TIS_PC_STS_EXPECT BIT3 /// /// Indicates that the TPM has completed all self-test actions following a TPM_ContinueSelfTest command. /// -#define TIS_PC_STS_SELFTEST_DONE BIT2 +#define TIS_PC_STS_SELFTEST_DONE BIT2 /// /// Writes a 1 to this bit to force the TPM to re-send the response. /// -#define TIS_PC_STS_RETRY BIT1 +#define TIS_PC_STS_RETRY BIT1 // // Default TimeOut value // -#define TIS_TIMEOUT_A (750 * 1000) // 750ms -#define TIS_TIMEOUT_B (2000 * 1000) // 2s -#define TIS_TIMEOUT_C (750 * 1000) // 750ms -#define TIS_TIMEOUT_D (750 * 1000) // 750ms +#define TIS_TIMEOUT_A (750 * 1000) // 750ms +#define TIS_TIMEOUT_B (2000 * 1000) // 2s +#define TIS_TIMEOUT_C (750 * 1000) // 750ms +#define TIS_TIMEOUT_D (750 * 1000) // 750ms #endif diff --git a/MdePkg/Include/IndustryStandard/Udf.h b/MdePkg/Include/IndustryStandard/Udf.h index 820b7ba..946a1ab 100644 --- a/MdePkg/Include/IndustryStandard/Udf.h +++ b/MdePkg/Include/IndustryStandard/Udf.h @@ -19,121 +19,121 @@ #define UDF_VRS_START_OFFSET ((UINT64)(16ULL << UDF_LOGICAL_SECTOR_SHIFT)) typedef enum { - UdfPrimaryVolumeDescriptor = 1, - UdfAnchorVolumeDescriptorPointer = 2, - UdfVolumeDescriptorPointer = 3, + UdfPrimaryVolumeDescriptor = 1, + UdfAnchorVolumeDescriptorPointer = 2, + UdfVolumeDescriptorPointer = 3, UdfImplemenationUseVolumeDescriptor = 4, - UdfPartitionDescriptor = 5, - UdfLogicalVolumeDescriptor = 6, - UdfUnallocatedSpaceDescriptor = 7, - UdfTerminatingDescriptor = 8, + UdfPartitionDescriptor = 5, + UdfLogicalVolumeDescriptor = 6, + UdfUnallocatedSpaceDescriptor = 7, + UdfTerminatingDescriptor = 8, UdfLogicalVolumeIntegrityDescriptor = 9, - UdfFileSetDescriptor = 256, - UdfFileIdentifierDescriptor = 257, - UdfAllocationExtentDescriptor = 258, - UdfFileEntry = 261, - UdfExtendedFileEntry = 266, + UdfFileSetDescriptor = 256, + UdfFileIdentifierDescriptor = 257, + UdfAllocationExtentDescriptor = 258, + UdfFileEntry = 261, + UdfExtendedFileEntry = 266, } UDF_VOLUME_DESCRIPTOR_ID; #pragma pack(1) typedef struct { - UINT16 TagIdentifier; - UINT16 DescriptorVersion; - UINT8 TagChecksum; - UINT8 Reserved; - UINT16 TagSerialNumber; - UINT16 DescriptorCRC; - UINT16 DescriptorCRCLength; - UINT32 TagLocation; + UINT16 TagIdentifier; + UINT16 DescriptorVersion; + UINT8 TagChecksum; + UINT8 Reserved; + UINT16 TagSerialNumber; + UINT16 DescriptorCRC; + UINT16 DescriptorCRCLength; + UINT32 TagLocation; } UDF_DESCRIPTOR_TAG; typedef struct { - UINT32 ExtentLength; - UINT32 ExtentLocation; + UINT32 ExtentLength; + UINT32 ExtentLocation; } UDF_EXTENT_AD; typedef struct { - UINT8 CharacterSetType; - UINT8 CharacterSetInfo[63]; + UINT8 CharacterSetType; + UINT8 CharacterSetInfo[63]; } UDF_CHAR_SPEC; typedef struct { - UINT8 Flags; - UINT8 Identifier[23]; + UINT8 Flags; + UINT8 Identifier[23]; union { // // Domain Entity Identifier // struct { - UINT16 UdfRevision; - UINT8 DomainFlags; - UINT8 Reserved[5]; + UINT16 UdfRevision; + UINT8 DomainFlags; + UINT8 Reserved[5]; } Domain; // // UDF Entity Identifier // struct { - UINT16 UdfRevision; - UINT8 OSClass; - UINT8 OSIdentifier; - UINT8 Reserved[4]; + UINT16 UdfRevision; + UINT8 OSClass; + UINT8 OSIdentifier; + UINT8 Reserved[4]; } Entity; // // Implementation Entity Identifier // struct { - UINT8 OSClass; - UINT8 OSIdentifier; - UINT8 ImplementationUseArea[6]; + UINT8 OSClass; + UINT8 OSIdentifier; + UINT8 ImplementationUseArea[6]; } ImplementationEntity; // // Application Entity Identifier // struct { - UINT8 ApplicationUseArea[8]; + UINT8 ApplicationUseArea[8]; } ApplicationEntity; // // Raw Identifier Suffix // struct { - UINT8 Data[8]; + UINT8 Data[8]; } Raw; } Suffix; } UDF_ENTITY_ID; typedef struct { - UINT32 LogicalBlockNumber; - UINT16 PartitionReferenceNumber; + UINT32 LogicalBlockNumber; + UINT16 PartitionReferenceNumber; } UDF_LB_ADDR; typedef struct { - UINT32 ExtentLength; - UDF_LB_ADDR ExtentLocation; - UINT8 ImplementationUse[6]; + UINT32 ExtentLength; + UDF_LB_ADDR ExtentLocation; + UINT8 ImplementationUse[6]; } UDF_LONG_ALLOCATION_DESCRIPTOR; typedef struct { - UDF_DESCRIPTOR_TAG DescriptorTag; - UDF_EXTENT_AD MainVolumeDescriptorSequenceExtent; - UDF_EXTENT_AD ReserveVolumeDescriptorSequenceExtent; - UINT8 Reserved[480]; + UDF_DESCRIPTOR_TAG DescriptorTag; + UDF_EXTENT_AD MainVolumeDescriptorSequenceExtent; + UDF_EXTENT_AD ReserveVolumeDescriptorSequenceExtent; + UINT8 Reserved[480]; } UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER; typedef struct { - UDF_DESCRIPTOR_TAG DescriptorTag; - UINT32 VolumeDescriptorSequenceNumber; - UDF_CHAR_SPEC DescriptorCharacterSet; - UINT8 LogicalVolumeIdentifier[128]; - UINT32 LogicalBlockSize; - UDF_ENTITY_ID DomainIdentifier; - UDF_LONG_ALLOCATION_DESCRIPTOR LogicalVolumeContentsUse; - UINT32 MapTableLength; - UINT32 NumberOfPartitionMaps; - UDF_ENTITY_ID ImplementationIdentifier; - UINT8 ImplementationUse[128]; - UDF_EXTENT_AD IntegritySequenceExtent; - UINT8 PartitionMaps[6]; + UDF_DESCRIPTOR_TAG DescriptorTag; + UINT32 VolumeDescriptorSequenceNumber; + UDF_CHAR_SPEC DescriptorCharacterSet; + UINT8 LogicalVolumeIdentifier[128]; + UINT32 LogicalBlockSize; + UDF_ENTITY_ID DomainIdentifier; + UDF_LONG_ALLOCATION_DESCRIPTOR LogicalVolumeContentsUse; + UINT32 MapTableLength; + UINT32 NumberOfPartitionMaps; + UDF_ENTITY_ID ImplementationIdentifier; + UINT8 ImplementationUse[128]; + UDF_EXTENT_AD IntegritySequenceExtent; + UINT8 PartitionMaps[6]; } UDF_LOGICAL_VOLUME_DESCRIPTOR; #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/UefiTcgPlatform.h b/MdePkg/Include/IndustryStandard/UefiTcgPlatform.h index d5bc786..e07840c 100644 --- a/MdePkg/Include/IndustryStandard/UefiTcgPlatform.h +++ b/MdePkg/Include/IndustryStandard/UefiTcgPlatform.h @@ -37,22 +37,22 @@ // // EFI specific event types // -#define EV_EFI_EVENT_BASE ((TCG_EVENTTYPE) 0x80000000) -#define EV_EFI_VARIABLE_DRIVER_CONFIG (EV_EFI_EVENT_BASE + 1) -#define EV_EFI_VARIABLE_BOOT (EV_EFI_EVENT_BASE + 2) -#define EV_EFI_BOOT_SERVICES_APPLICATION (EV_EFI_EVENT_BASE + 3) -#define EV_EFI_BOOT_SERVICES_DRIVER (EV_EFI_EVENT_BASE + 4) -#define EV_EFI_RUNTIME_SERVICES_DRIVER (EV_EFI_EVENT_BASE + 5) -#define EV_EFI_GPT_EVENT (EV_EFI_EVENT_BASE + 6) -#define EV_EFI_ACTION (EV_EFI_EVENT_BASE + 7) -#define EV_EFI_PLATFORM_FIRMWARE_BLOB (EV_EFI_EVENT_BASE + 8) -#define EV_EFI_HANDOFF_TABLES (EV_EFI_EVENT_BASE + 9) -#define EV_EFI_PLATFORM_FIRMWARE_BLOB2 (EV_EFI_EVENT_BASE + 0xA) -#define EV_EFI_HANDOFF_TABLES2 (EV_EFI_EVENT_BASE + 0xB) -#define EV_EFI_HCRTM_EVENT (EV_EFI_EVENT_BASE + 0x10) -#define EV_EFI_VARIABLE_AUTHORITY (EV_EFI_EVENT_BASE + 0xE0) -#define EV_EFI_SPDM_FIRMWARE_BLOB (EV_EFI_EVENT_BASE + 0xE1) -#define EV_EFI_SPDM_FIRMWARE_CONFIG (EV_EFI_EVENT_BASE + 0xE2) +#define EV_EFI_EVENT_BASE ((TCG_EVENTTYPE) 0x80000000) +#define EV_EFI_VARIABLE_DRIVER_CONFIG (EV_EFI_EVENT_BASE + 1) +#define EV_EFI_VARIABLE_BOOT (EV_EFI_EVENT_BASE + 2) +#define EV_EFI_BOOT_SERVICES_APPLICATION (EV_EFI_EVENT_BASE + 3) +#define EV_EFI_BOOT_SERVICES_DRIVER (EV_EFI_EVENT_BASE + 4) +#define EV_EFI_RUNTIME_SERVICES_DRIVER (EV_EFI_EVENT_BASE + 5) +#define EV_EFI_GPT_EVENT (EV_EFI_EVENT_BASE + 6) +#define EV_EFI_ACTION (EV_EFI_EVENT_BASE + 7) +#define EV_EFI_PLATFORM_FIRMWARE_BLOB (EV_EFI_EVENT_BASE + 8) +#define EV_EFI_HANDOFF_TABLES (EV_EFI_EVENT_BASE + 9) +#define EV_EFI_PLATFORM_FIRMWARE_BLOB2 (EV_EFI_EVENT_BASE + 0xA) +#define EV_EFI_HANDOFF_TABLES2 (EV_EFI_EVENT_BASE + 0xB) +#define EV_EFI_HCRTM_EVENT (EV_EFI_EVENT_BASE + 0x10) +#define EV_EFI_VARIABLE_AUTHORITY (EV_EFI_EVENT_BASE + 0xE0) +#define EV_EFI_SPDM_FIRMWARE_BLOB (EV_EFI_EVENT_BASE + 0xE1) +#define EV_EFI_SPDM_FIRMWARE_CONFIG (EV_EFI_EVENT_BASE + 0xE2) #define EFI_CALLING_EFI_APPLICATION \ "Calling EFI Application from Boot Option" @@ -65,24 +65,23 @@ #define EFI_EXIT_BOOT_SERVICES_SUCCEEDED \ "Exit Boot Services Returned with Success" +#define EV_POSTCODE_INFO_POST_CODE "POST CODE" +#define POST_CODE_STR_LEN (sizeof(EV_POSTCODE_INFO_POST_CODE) - 1) -#define EV_POSTCODE_INFO_POST_CODE "POST CODE" -#define POST_CODE_STR_LEN (sizeof(EV_POSTCODE_INFO_POST_CODE) - 1) +#define EV_POSTCODE_INFO_SMM_CODE "SMM CODE" +#define SMM_CODE_STR_LEN (sizeof(EV_POSTCODE_INFO_SMM_CODE) - 1) -#define EV_POSTCODE_INFO_SMM_CODE "SMM CODE" -#define SMM_CODE_STR_LEN (sizeof(EV_POSTCODE_INFO_SMM_CODE) - 1) +#define EV_POSTCODE_INFO_ACPI_DATA "ACPI DATA" +#define ACPI_DATA_LEN (sizeof(EV_POSTCODE_INFO_ACPI_DATA) - 1) -#define EV_POSTCODE_INFO_ACPI_DATA "ACPI DATA" -#define ACPI_DATA_LEN (sizeof(EV_POSTCODE_INFO_ACPI_DATA) - 1) +#define EV_POSTCODE_INFO_BIS_CODE "BIS CODE" +#define BIS_CODE_LEN (sizeof(EV_POSTCODE_INFO_BIS_CODE) - 1) -#define EV_POSTCODE_INFO_BIS_CODE "BIS CODE" -#define BIS_CODE_LEN (sizeof(EV_POSTCODE_INFO_BIS_CODE) - 1) +#define EV_POSTCODE_INFO_UEFI_PI "UEFI PI" +#define UEFI_PI_LEN (sizeof(EV_POSTCODE_INFO_UEFI_PI) - 1) -#define EV_POSTCODE_INFO_UEFI_PI "UEFI PI" -#define UEFI_PI_LEN (sizeof(EV_POSTCODE_INFO_UEFI_PI) - 1) - -#define EV_POSTCODE_INFO_OPROM "Embedded Option ROM" -#define OPROM_LEN (sizeof(EV_POSTCODE_INFO_OPROM) - 1) +#define EV_POSTCODE_INFO_OPROM "Embedded Option ROM" +#define OPROM_LEN (sizeof(EV_POSTCODE_INFO_OPROM) - 1) #define EV_POSTCODE_INFO_EMBEDDED_UEFI_DRIVER "Embedded UEFI Driver" #define EMBEDDED_UEFI_DRIVER_LEN (sizeof(EV_POSTCODE_INFO_EMBEDDED_UEFI_DRIVER) - 1) @@ -95,30 +94,30 @@ // #pragma pack (1) -typedef UINT32 TCG_EVENTTYPE; -typedef TPM_PCRINDEX TCG_PCRINDEX; -typedef TPM_DIGEST TCG_DIGEST; +typedef UINT32 TCG_EVENTTYPE; +typedef TPM_PCRINDEX TCG_PCRINDEX; +typedef TPM_DIGEST TCG_DIGEST; /// /// Event Log Entry Structure Definition /// typedef struct tdTCG_PCR_EVENT { - TCG_PCRINDEX PCRIndex; ///< PCRIndex event extended to - TCG_EVENTTYPE EventType; ///< TCG EFI event type - TCG_DIGEST Digest; ///< Value extended into PCRIndex - UINT32 EventSize; ///< Size of the event data - UINT8 Event[1]; ///< The event data + TCG_PCRINDEX PCRIndex; ///< PCRIndex event extended to + TCG_EVENTTYPE EventType; ///< TCG EFI event type + TCG_DIGEST Digest; ///< Value extended into PCRIndex + UINT32 EventSize; ///< Size of the event data + UINT8 Event[1]; ///< The event data } TCG_PCR_EVENT; -#define TSS_EVENT_DATA_MAX_SIZE 256 +#define TSS_EVENT_DATA_MAX_SIZE 256 /// /// TCG_PCR_EVENT_HDR /// typedef struct tdTCG_PCR_EVENT_HDR { - TCG_PCRINDEX PCRIndex; - TCG_EVENTTYPE EventType; - TCG_DIGEST Digest; - UINT32 EventSize; + TCG_PCRINDEX PCRIndex; + TCG_EVENTTYPE EventType; + TCG_DIGEST Digest; + UINT32 EventSize; } TCG_PCR_EVENT_HDR; /// @@ -128,8 +127,8 @@ typedef struct tdTCG_PCR_EVENT_HDR { /// because PEI is 32-bit while DXE is 64-bit on x64 platforms /// typedef struct tdEFI_PLATFORM_FIRMWARE_BLOB { - EFI_PHYSICAL_ADDRESS BlobBase; - UINT64 BlobLength; + EFI_PHYSICAL_ADDRESS BlobBase; + UINT64 BlobLength; } EFI_PLATFORM_FIRMWARE_BLOB; /// @@ -139,8 +138,8 @@ typedef struct tdEFI_PLATFORM_FIRMWARE_BLOB { /// event to facilitate the measurement of firmware volume. /// typedef struct tdUEFI_PLATFORM_FIRMWARE_BLOB { - EFI_PHYSICAL_ADDRESS BlobBase; - UINT64 BlobLength; + EFI_PHYSICAL_ADDRESS BlobBase; + UINT64 BlobLength; } UEFI_PLATFORM_FIRMWARE_BLOB; /// @@ -150,10 +149,10 @@ typedef struct tdUEFI_PLATFORM_FIRMWARE_BLOB { /// event to facilitate the measurement of firmware volume. /// typedef struct tdUEFI_PLATFORM_FIRMWARE_BLOB2 { - UINT8 BlobDescriptionSize; -//UINT8 BlobDescription[BlobDescriptionSize]; -//EFI_PHYSICAL_ADDRESS BlobBase; -//UINT64 BlobLength; + UINT8 BlobDescriptionSize; + // UINT8 BlobDescription[BlobDescriptionSize]; + // EFI_PHYSICAL_ADDRESS BlobBase; + // UINT64 BlobLength; } UEFI_PLATFORM_FIRMWARE_BLOB2; /// @@ -163,11 +162,11 @@ typedef struct tdUEFI_PLATFORM_FIRMWARE_BLOB2 { /// EV_EFI_BOOT_SERVICES_DRIVER and EV_EFI_RUNTIME_SERVICES_DRIVER /// typedef struct tdEFI_IMAGE_LOAD_EVENT { - EFI_PHYSICAL_ADDRESS ImageLocationInMemory; - UINTN ImageLengthInMemory; - UINTN ImageLinkTimeAddress; - UINTN LengthOfDevicePath; - EFI_DEVICE_PATH_PROTOCOL DevicePath[1]; + EFI_PHYSICAL_ADDRESS ImageLocationInMemory; + UINTN ImageLengthInMemory; + UINTN ImageLinkTimeAddress; + UINTN LengthOfDevicePath; + EFI_DEVICE_PATH_PROTOCOL DevicePath[1]; } EFI_IMAGE_LOAD_EVENT; /// @@ -177,11 +176,11 @@ typedef struct tdEFI_IMAGE_LOAD_EVENT { /// EV_EFI_BOOT_SERVICES_DRIVER and EV_EFI_RUNTIME_SERVICES_DRIVER /// typedef struct tdUEFI_IMAGE_LOAD_EVENT { - EFI_PHYSICAL_ADDRESS ImageLocationInMemory; - UINT64 ImageLengthInMemory; - UINT64 ImageLinkTimeAddress; - UINT64 LengthOfDevicePath; - EFI_DEVICE_PATH_PROTOCOL DevicePath[1]; + EFI_PHYSICAL_ADDRESS ImageLocationInMemory; + UINT64 ImageLengthInMemory; + UINT64 ImageLinkTimeAddress; + UINT64 LengthOfDevicePath; + EFI_DEVICE_PATH_PROTOCOL DevicePath[1]; } UEFI_IMAGE_LOAD_EVENT; /// @@ -191,8 +190,8 @@ typedef struct tdUEFI_IMAGE_LOAD_EVENT { /// the measurement of given configuration tables. /// typedef struct tdEFI_HANDOFF_TABLE_POINTERS { - UINTN NumberOfTables; - EFI_CONFIGURATION_TABLE TableEntry[1]; + UINTN NumberOfTables; + EFI_CONFIGURATION_TABLE TableEntry[1]; } EFI_HANDOFF_TABLE_POINTERS; /// @@ -202,8 +201,8 @@ typedef struct tdEFI_HANDOFF_TABLE_POINTERS { /// the measurement of given configuration tables. /// typedef struct tdUEFI_HANDOFF_TABLE_POINTERS { - UINT64 NumberOfTables; - EFI_CONFIGURATION_TABLE TableEntry[1]; + UINT64 NumberOfTables; + EFI_CONFIGURATION_TABLE TableEntry[1]; } UEFI_HANDOFF_TABLE_POINTERS; /// @@ -213,10 +212,10 @@ typedef struct tdUEFI_HANDOFF_TABLE_POINTERS { /// the measurement of given configuration tables. /// typedef struct tdUEFI_HANDOFF_TABLE_POINTERS2 { - UINT8 TableDescriptionSize; -//UINT8 TableDescription[TableDescriptionSize]; -//UINT64 NumberOfTables; -//EFI_CONFIGURATION_TABLE TableEntry[1]; + UINT8 TableDescriptionSize; + // UINT8 TableDescription[TableDescriptionSize]; + // UINT64 NumberOfTables; + // EFI_CONFIGURATION_TABLE TableEntry[1]; } UEFI_HANDOFF_TABLE_POINTERS2; /// @@ -228,11 +227,11 @@ typedef struct tdUEFI_HANDOFF_TABLE_POINTERS2 { /// This is defined in TCG EFI Platform Spec for TPM1.1 or 1.2 V1.22 /// typedef struct tdEFI_VARIABLE_DATA { - EFI_GUID VariableName; - UINTN UnicodeNameLength; - UINTN VariableDataLength; - CHAR16 UnicodeName[1]; - INT8 VariableData[1]; ///< Driver or platform-specific data + EFI_GUID VariableName; + UINTN UnicodeNameLength; + UINTN VariableDataLength; + CHAR16 UnicodeName[1]; + INT8 VariableData[1]; ///< Driver or platform-specific data } EFI_VARIABLE_DATA; /// @@ -244,38 +243,38 @@ typedef struct tdEFI_VARIABLE_DATA { /// This is defined in TCG PC Client Firmware Profile Spec 00.21 /// typedef struct tdUEFI_VARIABLE_DATA { - EFI_GUID VariableName; - UINT64 UnicodeNameLength; - UINT64 VariableDataLength; - CHAR16 UnicodeName[1]; - INT8 VariableData[1]; ///< Driver or platform-specific data + EFI_GUID VariableName; + UINT64 UnicodeNameLength; + UINT64 VariableDataLength; + CHAR16 UnicodeName[1]; + INT8 VariableData[1]; ///< Driver or platform-specific data } UEFI_VARIABLE_DATA; // // For TrEE1.0 compatibility // typedef struct { - EFI_GUID VariableName; - UINT64 UnicodeNameLength; // The TCG Definition used UINTN - UINT64 VariableDataLength; // The TCG Definition used UINTN - CHAR16 UnicodeName[1]; - INT8 VariableData[1]; + EFI_GUID VariableName; + UINT64 UnicodeNameLength; // The TCG Definition used UINTN + UINT64 VariableDataLength; // The TCG Definition used UINTN + CHAR16 UnicodeName[1]; + INT8 VariableData[1]; } EFI_VARIABLE_DATA_TREE; typedef struct tdEFI_GPT_DATA { - EFI_PARTITION_TABLE_HEADER EfiPartitionHeader; - UINTN NumberOfPartitions; - EFI_PARTITION_ENTRY Partitions[1]; + EFI_PARTITION_TABLE_HEADER EfiPartitionHeader; + UINTN NumberOfPartitions; + EFI_PARTITION_ENTRY Partitions[1]; } EFI_GPT_DATA; typedef struct tdUEFI_GPT_DATA { - EFI_PARTITION_TABLE_HEADER EfiPartitionHeader; - UINT64 NumberOfPartitions; - EFI_PARTITION_ENTRY Partitions[1]; + EFI_PARTITION_TABLE_HEADER EfiPartitionHeader; + UINT64 NumberOfPartitions; + EFI_PARTITION_ENTRY Partitions[1]; } UEFI_GPT_DATA; -#define TCG_DEVICE_SECURITY_EVENT_DATA_SIGNATURE "SPDM Device Sec" -#define TCG_DEVICE_SECURITY_EVENT_DATA_VERSION 1 +#define TCG_DEVICE_SECURITY_EVENT_DATA_SIGNATURE "SPDM Device Sec" +#define TCG_DEVICE_SECURITY_EVENT_DATA_VERSION 1 #define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_TYPE_NULL 0 #define TCG_DEVICE_SECURITY_EVENT_DATA_DEVICE_TYPE_PCI 1 @@ -287,12 +286,12 @@ typedef struct tdUEFI_GPT_DATA { /// used in EV_EFI_SPDM_FIRMWARE_BLOB and EV_EFI_SPDM_FIRMWARE_CONFIG. /// typedef struct { - UINT8 Signature[16]; - UINT16 Version; - UINT16 Length; - UINT32 SpdmHashAlgo; - UINT32 DeviceType; -//SPDM_MEASUREMENT_BLOCK SpdmMeasurementBlock; + UINT8 Signature[16]; + UINT16 Version; + UINT16 Length; + UINT32 SpdmHashAlgo; + UINT32 DeviceType; + // SPDM_MEASUREMENT_BLOCK SpdmMeasurementBlock; } TCG_DEVICE_SECURITY_EVENT_DATA_HEADER; #define TCG_DEVICE_SECURITY_EVENT_DATA_PCI_CONTEXT_VERSION 0 @@ -303,14 +302,14 @@ typedef struct { /// used in EV_EFI_SPDM_FIRMWARE_BLOB and EV_EFI_SPDM_FIRMWARE_CONFIG. /// typedef struct { - UINT16 Version; - UINT16 Length; - UINT16 VendorId; - UINT16 DeviceId; - UINT8 RevisionID; - UINT8 ClassCode[3]; - UINT16 SubsystemVendorID; - UINT16 SubsystemID; + UINT16 Version; + UINT16 Length; + UINT16 VendorId; + UINT16 DeviceId; + UINT8 RevisionID; + UINT8 ClassCode[3]; + UINT16 SubsystemVendorID; + UINT16 SubsystemID; } TCG_DEVICE_SECURITY_EVENT_DATA_PCI_CONTEXT; #define TCG_DEVICE_SECURITY_EVENT_DATA_USB_CONTEXT_VERSION 0 @@ -321,33 +320,33 @@ typedef struct { /// used in EV_EFI_SPDM_FIRMWARE_BLOB and EV_EFI_SPDM_FIRMWARE_CONFIG. /// typedef struct { - UINT16 Version; - UINT16 Length; -//UINT8 DeviceDescriptor[DescLen]; -//UINT8 BodDescriptor[DescLen]; -//UINT8 ConfigurationDescriptor[DescLen][NumOfConfiguration]; + UINT16 Version; + UINT16 Length; + // UINT8 DeviceDescriptor[DescLen]; + // UINT8 BodDescriptor[DescLen]; + // UINT8 ConfigurationDescriptor[DescLen][NumOfConfiguration]; } TCG_DEVICE_SECURITY_EVENT_DATA_USB_CONTEXT; // // Crypto Agile Log Entry Format // typedef struct tdTCG_PCR_EVENT2 { - TCG_PCRINDEX PCRIndex; - TCG_EVENTTYPE EventType; - TPML_DIGEST_VALUES Digest; - UINT32 EventSize; - UINT8 Event[1]; + TCG_PCRINDEX PCRIndex; + TCG_EVENTTYPE EventType; + TPML_DIGEST_VALUES Digest; + UINT32 EventSize; + UINT8 Event[1]; } TCG_PCR_EVENT2; // // TCG PCR Event2 Header // Follow TCG EFI Protocol Spec 5.2 Crypto Agile Log Entry Format // -typedef struct tdTCG_PCR_EVENT2_HDR{ - TCG_PCRINDEX PCRIndex; - TCG_EVENTTYPE EventType; - TPML_DIGEST_VALUES Digests; - UINT32 EventSize; +typedef struct tdTCG_PCR_EVENT2_HDR { + TCG_PCRINDEX PCRIndex; + TCG_EVENTTYPE EventType; + TPML_DIGEST_VALUES Digests; + UINT32 EventSize; } TCG_PCR_EVENT2_HDR; // @@ -357,19 +356,19 @@ typedef struct { // // TCG defined hashing algorithm ID. // - UINT16 algorithmId; + UINT16 algorithmId; // // The size of the digest for the respective hashing algorithm. // - UINT16 digestSize; + UINT16 digestSize; } TCG_EfiSpecIdEventAlgorithmSize; -#define TCG_EfiSpecIDEventStruct_SIGNATURE_02 "Spec ID Event02" -#define TCG_EfiSpecIDEventStruct_SIGNATURE_03 "Spec ID Event03" +#define TCG_EfiSpecIDEventStruct_SIGNATURE_02 "Spec ID Event02" +#define TCG_EfiSpecIDEventStruct_SIGNATURE_03 "Spec ID Event03" -#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MAJOR_TPM12 1 -#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MINOR_TPM12 2 -#define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM12 2 +#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MAJOR_TPM12 1 +#define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MINOR_TPM12 2 +#define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM12 2 #define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MAJOR_TPM2 2 #define TCG_EfiSpecIDEventStruct_SPEC_VERSION_MINOR_TPM2 0 @@ -377,124 +376,120 @@ typedef struct { #define TCG_EfiSpecIDEventStruct_SPEC_ERRATA_TPM2_REV_105 105 typedef struct { - UINT8 signature[16]; + UINT8 signature[16]; // // The value for the Platform Class. // The enumeration is defined in the TCG ACPI Specification Client Common Header. // - UINT32 platformClass; + UINT32 platformClass; // // The TCG EFI Platform Specification minor version number this BIOS supports. // Any BIOS supporting version (1.22) MUST set this value to 02h. // Any BIOS supporting version (2.0) SHALL set this value to 0x00. // - UINT8 specVersionMinor; + UINT8 specVersionMinor; // // The TCG EFI Platform Specification major version number this BIOS supports. // Any BIOS supporting version (1.22) MUST set this value to 01h. // Any BIOS supporting version (2.0) SHALL set this value to 0x02. // - UINT8 specVersionMajor; + UINT8 specVersionMajor; // // The TCG EFI Platform Specification errata for this specification this BIOS supports. // Any BIOS supporting version and errata (1.22) MUST set this value to 02h. // Any BIOS supporting version and errata (2.0) SHALL set this value to 0x00. // - UINT8 specErrata; + UINT8 specErrata; // // Specifies the size of the UINTN fields used in various data structures used in this specification. // 0x01 indicates UINT32 and 0x02 indicates UINT64. // - UINT8 uintnSize; + UINT8 uintnSize; // // This field is added in "Spec ID Event03". // The number of hashing algorithms used in this event log (except the first event). // All events in this event log use all hashing algorithms defined here. // -//UINT32 numberOfAlgorithms; + // UINT32 numberOfAlgorithms; // // This field is added in "Spec ID Event03". // An array of size numberOfAlgorithms of value pairs. // -//TCG_EfiSpecIdEventAlgorithmSize digestSize[numberOfAlgorithms]; + // TCG_EfiSpecIdEventAlgorithmSize digestSize[numberOfAlgorithms]; // // Size in bytes of the VendorInfo field. // Maximum value SHALL be FFh bytes. // -//UINT8 vendorInfoSize; + // UINT8 vendorInfoSize; // // Provided for use by the BIOS implementer. // The value might be used, for example, to provide more detailed information about the specific BIOS such as BIOS revision numbers, etc. // The values within this field are not standardized and are implementer-specific. // Platform-specific or -unique information SHALL NOT be provided in this field. // -//UINT8 vendorInfo[vendorInfoSize]; + // UINT8 vendorInfo[vendorInfoSize]; } TCG_EfiSpecIDEventStruct; typedef struct tdTCG_PCClientTaggedEvent { - UINT32 taggedEventID; - UINT32 taggedEventDataSize; -//UINT8 taggedEventData[taggedEventDataSize]; + UINT32 taggedEventID; + UINT32 taggedEventDataSize; + // UINT8 taggedEventData[taggedEventDataSize]; } TCG_PCClientTaggedEvent; -#define TCG_Sp800_155_PlatformId_Event_SIGNATURE "SP800-155 Event" -#define TCG_Sp800_155_PlatformId_Event2_SIGNATURE "SP800-155 Event2" +#define TCG_Sp800_155_PlatformId_Event_SIGNATURE "SP800-155 Event" +#define TCG_Sp800_155_PlatformId_Event2_SIGNATURE "SP800-155 Event2" typedef struct tdTCG_Sp800_155_PlatformId_Event2 { - UINT8 Signature[16]; + UINT8 Signature[16]; // // Where Vendor ID is an integer defined // at http://www.iana.org/assignments/enterprisenumbers // - UINT32 VendorId; + UINT32 VendorId; // // 16-byte identifier of a given platform's static configuration of code // - EFI_GUID ReferenceManifestGuid; + EFI_GUID ReferenceManifestGuid; // // Below structure is newly added in TCG_Sp800_155_PlatformId_Event2. // -//UINT8 PlatformManufacturerStrSize; -//UINT8 PlatformManufacturerStr[PlatformManufacturerStrSize]; -//UINT8 PlatformModelSize; -//UINT8 PlatformModel[PlatformModelSize]; -//UINT8 PlatformVersionSize; -//UINT8 PlatformVersion[PlatformVersionSize]; -//UINT8 PlatformModelSize; -//UINT8 PlatformModel[PlatformModelSize]; -//UINT8 FirmwareManufacturerStrSize; -//UINT8 FirmwareManufacturerStr[FirmwareManufacturerStrSize]; -//UINT32 FirmwareManufacturerId; -//UINT8 FirmwareVersion; -//UINT8 FirmwareVersion[FirmwareVersionSize]]; + // UINT8 PlatformManufacturerStrSize; + // UINT8 PlatformManufacturerStr[PlatformManufacturerStrSize]; + // UINT8 PlatformModelSize; + // UINT8 PlatformModel[PlatformModelSize]; + // UINT8 PlatformVersionSize; + // UINT8 PlatformVersion[PlatformVersionSize]; + // UINT8 PlatformModelSize; + // UINT8 PlatformModel[PlatformModelSize]; + // UINT8 FirmwareManufacturerStrSize; + // UINT8 FirmwareManufacturerStr[FirmwareManufacturerStrSize]; + // UINT32 FirmwareManufacturerId; + // UINT8 FirmwareVersion; + // UINT8 FirmwareVersion[FirmwareVersionSize]]; } TCG_Sp800_155_PlatformId_Event2; -#define TCG_EfiStartupLocalityEvent_SIGNATURE "StartupLocality" - +#define TCG_EfiStartupLocalityEvent_SIGNATURE "StartupLocality" // // The Locality Indicator which sent the TPM2_Startup command // -#define LOCALITY_0_INDICATOR 0x00 -#define LOCALITY_3_INDICATOR 0x03 +#define LOCALITY_0_INDICATOR 0x00 +#define LOCALITY_3_INDICATOR 0x03 // // Startup Locality Event // -typedef struct tdTCG_EfiStartupLocalityEvent{ - UINT8 Signature[16]; +typedef struct tdTCG_EfiStartupLocalityEvent { + UINT8 Signature[16]; // // The Locality Indicator which sent the TPM2_Startup command // - UINT8 StartupLocality; + UINT8 StartupLocality; } TCG_EfiStartupLocalityEvent; - // // Restore original structure alignment // #pragma pack () #endif - - diff --git a/MdePkg/Include/IndustryStandard/Usb.h b/MdePkg/Include/IndustryStandard/Usb.h index 72d3ecf..7df6466 100644 --- a/MdePkg/Include/IndustryStandard/Usb.h +++ b/MdePkg/Include/IndustryStandard/Usb.h @@ -16,52 +16,52 @@ // // Usb mass storage class code // -#define USB_MASS_STORE_CLASS 0x08 +#define USB_MASS_STORE_CLASS 0x08 // // Usb mass storage subclass code, specify the command set used. // -#define USB_MASS_STORE_RBC 0x01 ///< Reduced Block Commands -#define USB_MASS_STORE_8020I 0x02 ///< SFF-8020i, typically a CD/DVD device -#define USB_MASS_STORE_QIC 0x03 ///< Typically a tape device -#define USB_MASS_STORE_UFI 0x04 ///< Typically a floppy disk driver device -#define USB_MASS_STORE_8070I 0x05 ///< SFF-8070i, typically a floppy disk driver device. -#define USB_MASS_STORE_SCSI 0x06 ///< SCSI transparent command set +#define USB_MASS_STORE_RBC 0x01 ///< Reduced Block Commands +#define USB_MASS_STORE_8020I 0x02 ///< SFF-8020i, typically a CD/DVD device +#define USB_MASS_STORE_QIC 0x03 ///< Typically a tape device +#define USB_MASS_STORE_UFI 0x04 ///< Typically a floppy disk driver device +#define USB_MASS_STORE_8070I 0x05 ///< SFF-8070i, typically a floppy disk driver device. +#define USB_MASS_STORE_SCSI 0x06 ///< SCSI transparent command set // // Usb mass storage protocol code, specify the transport protocol // -#define USB_MASS_STORE_CBI0 0x00 ///< CBI protocol with command completion interrupt -#define USB_MASS_STORE_CBI1 0x01 ///< CBI protocol without command completion interrupt -#define USB_MASS_STORE_BOT 0x50 ///< Bulk-Only Transport +#define USB_MASS_STORE_CBI0 0x00 ///< CBI protocol with command completion interrupt +#define USB_MASS_STORE_CBI1 0x01 ///< CBI protocol without command completion interrupt +#define USB_MASS_STORE_BOT 0x50 ///< Bulk-Only Transport // // Standard device request and request type // USB 2.0 spec, Section 9.4 // -#define USB_DEV_GET_STATUS 0x00 -#define USB_DEV_GET_STATUS_REQ_TYPE_D 0x80 // Receiver : Device -#define USB_DEV_GET_STATUS_REQ_TYPE_I 0x81 // Receiver : Interface -#define USB_DEV_GET_STATUS_REQ_TYPE_E 0x82 // Receiver : Endpoint +#define USB_DEV_GET_STATUS 0x00 +#define USB_DEV_GET_STATUS_REQ_TYPE_D 0x80 // Receiver : Device +#define USB_DEV_GET_STATUS_REQ_TYPE_I 0x81 // Receiver : Interface +#define USB_DEV_GET_STATUS_REQ_TYPE_E 0x82 // Receiver : Endpoint -#define USB_DEV_CLEAR_FEATURE 0x01 -#define USB_DEV_CLEAR_FEATURE_REQ_TYPE_D 0x00 // Receiver : Device -#define USB_DEV_CLEAR_FEATURE_REQ_TYPE_I 0x01 // Receiver : Interface -#define USB_DEV_CLEAR_FEATURE_REQ_TYPE_E 0x02 // Receiver : Endpoint +#define USB_DEV_CLEAR_FEATURE 0x01 +#define USB_DEV_CLEAR_FEATURE_REQ_TYPE_D 0x00 // Receiver : Device +#define USB_DEV_CLEAR_FEATURE_REQ_TYPE_I 0x01 // Receiver : Interface +#define USB_DEV_CLEAR_FEATURE_REQ_TYPE_E 0x02 // Receiver : Endpoint -#define USB_DEV_SET_FEATURE 0x03 -#define USB_DEV_SET_FEATURE_REQ_TYPE_D 0x00 // Receiver : Device -#define USB_DEV_SET_FEATURE_REQ_TYPE_I 0x01 // Receiver : Interface -#define USB_DEV_SET_FEATURE_REQ_TYPE_E 0x02 // Receiver : Endpoint +#define USB_DEV_SET_FEATURE 0x03 +#define USB_DEV_SET_FEATURE_REQ_TYPE_D 0x00 // Receiver : Device +#define USB_DEV_SET_FEATURE_REQ_TYPE_I 0x01 // Receiver : Interface +#define USB_DEV_SET_FEATURE_REQ_TYPE_E 0x02 // Receiver : Endpoint -#define USB_DEV_SET_ADDRESS 0x05 -#define USB_DEV_SET_ADDRESS_REQ_TYPE 0x00 +#define USB_DEV_SET_ADDRESS 0x05 +#define USB_DEV_SET_ADDRESS_REQ_TYPE 0x00 -#define USB_DEV_GET_DESCRIPTOR 0x06 -#define USB_DEV_GET_DESCRIPTOR_REQ_TYPE 0x80 +#define USB_DEV_GET_DESCRIPTOR 0x06 +#define USB_DEV_GET_DESCRIPTOR_REQ_TYPE 0x80 -#define USB_DEV_SET_DESCRIPTOR 0x07 -#define USB_DEV_SET_DESCRIPTOR_REQ_TYPE 0x00 +#define USB_DEV_SET_DESCRIPTOR 0x07 +#define USB_DEV_SET_DESCRIPTOR_REQ_TYPE 0x00 #define USB_DEV_GET_CONFIGURATION 0x08 #define USB_DEV_GET_CONFIGURATION_REQ_TYPE 0x80 @@ -69,15 +69,14 @@ #define USB_DEV_SET_CONFIGURATION 0x09 #define USB_DEV_SET_CONFIGURATION_REQ_TYPE 0x00 -#define USB_DEV_GET_INTERFACE 0x0A -#define USB_DEV_GET_INTERFACE_REQ_TYPE 0x81 +#define USB_DEV_GET_INTERFACE 0x0A +#define USB_DEV_GET_INTERFACE_REQ_TYPE 0x81 -#define USB_DEV_SET_INTERFACE 0x0B -#define USB_DEV_SET_INTERFACE_REQ_TYPE 0x01 - -#define USB_DEV_SYNCH_FRAME 0x0C -#define USB_DEV_SYNCH_FRAME_REQ_TYPE 0x82 +#define USB_DEV_SET_INTERFACE 0x0B +#define USB_DEV_SET_INTERFACE_REQ_TYPE 0x01 +#define USB_DEV_SYNCH_FRAME 0x0C +#define USB_DEV_SYNCH_FRAME_REQ_TYPE 0x82 // // USB standard descriptors and reqeust @@ -89,11 +88,11 @@ /// USB 2.0 spec, Section 9.3 /// typedef struct { - UINT8 RequestType; - UINT8 Request; - UINT16 Value; - UINT16 Index; - UINT16 Length; + UINT8 RequestType; + UINT8 Request; + UINT16 Value; + UINT16 Index; + UINT16 Length; } USB_DEVICE_REQUEST; /// @@ -101,20 +100,20 @@ typedef struct { /// USB 2.0 spec, Section 9.6.1 /// typedef struct { - UINT8 Length; - UINT8 DescriptorType; - UINT16 BcdUSB; - UINT8 DeviceClass; - UINT8 DeviceSubClass; - UINT8 DeviceProtocol; - UINT8 MaxPacketSize0; - UINT16 IdVendor; - UINT16 IdProduct; - UINT16 BcdDevice; - UINT8 StrManufacturer; - UINT8 StrProduct; - UINT8 StrSerialNumber; - UINT8 NumConfigurations; + UINT8 Length; + UINT8 DescriptorType; + UINT16 BcdUSB; + UINT8 DeviceClass; + UINT8 DeviceSubClass; + UINT8 DeviceProtocol; + UINT8 MaxPacketSize0; + UINT16 IdVendor; + UINT16 IdProduct; + UINT16 BcdDevice; + UINT8 StrManufacturer; + UINT8 StrProduct; + UINT8 StrSerialNumber; + UINT8 NumConfigurations; } USB_DEVICE_DESCRIPTOR; /// @@ -122,14 +121,14 @@ typedef struct { /// USB 2.0 spec, Section 9.6.3 /// typedef struct { - UINT8 Length; - UINT8 DescriptorType; - UINT16 TotalLength; - UINT8 NumInterfaces; - UINT8 ConfigurationValue; - UINT8 Configuration; - UINT8 Attributes; - UINT8 MaxPower; + UINT8 Length; + UINT8 DescriptorType; + UINT16 TotalLength; + UINT8 NumInterfaces; + UINT8 ConfigurationValue; + UINT8 Configuration; + UINT8 Attributes; + UINT8 MaxPower; } USB_CONFIG_DESCRIPTOR; /// @@ -137,15 +136,15 @@ typedef struct { /// USB 2.0 spec, Section 9.6.5 /// typedef struct { - UINT8 Length; - UINT8 DescriptorType; - UINT8 InterfaceNumber; - UINT8 AlternateSetting; - UINT8 NumEndpoints; - UINT8 InterfaceClass; - UINT8 InterfaceSubClass; - UINT8 InterfaceProtocol; - UINT8 Interface; + UINT8 Length; + UINT8 DescriptorType; + UINT8 InterfaceNumber; + UINT8 AlternateSetting; + UINT8 NumEndpoints; + UINT8 InterfaceClass; + UINT8 InterfaceSubClass; + UINT8 InterfaceProtocol; + UINT8 Interface; } USB_INTERFACE_DESCRIPTOR; /// @@ -153,12 +152,12 @@ typedef struct { /// USB 2.0 spec, Section 9.6.6 /// typedef struct { - UINT8 Length; - UINT8 DescriptorType; - UINT8 EndpointAddress; - UINT8 Attributes; - UINT16 MaxPacketSize; - UINT8 Interval; + UINT8 Length; + UINT8 DescriptorType; + UINT8 EndpointAddress; + UINT8 Attributes; + UINT16 MaxPacketSize; + UINT8 Interval; } USB_ENDPOINT_DESCRIPTOR; /// @@ -166,45 +165,44 @@ typedef struct { /// USB 2.0 spec, Section 9.6.7 /// typedef struct { - UINT8 Length; - UINT8 DescriptorType; - CHAR16 String[1]; + UINT8 Length; + UINT8 DescriptorType; + CHAR16 String[1]; } EFI_USB_STRING_DESCRIPTOR; #pragma pack() - typedef enum { // // USB request type // - USB_REQ_TYPE_STANDARD = (0x00 << 5), - USB_REQ_TYPE_CLASS = (0x01 << 5), - USB_REQ_TYPE_VENDOR = (0x02 << 5), + USB_REQ_TYPE_STANDARD = (0x00 << 5), + USB_REQ_TYPE_CLASS = (0x01 << 5), + USB_REQ_TYPE_VENDOR = (0x02 << 5), // // Standard control transfer request type, or the value // to fill in EFI_USB_DEVICE_REQUEST.Request // - USB_REQ_GET_STATUS = 0x00, - USB_REQ_CLEAR_FEATURE = 0x01, - USB_REQ_SET_FEATURE = 0x03, - USB_REQ_SET_ADDRESS = 0x05, - USB_REQ_GET_DESCRIPTOR = 0x06, - USB_REQ_SET_DESCRIPTOR = 0x07, - USB_REQ_GET_CONFIG = 0x08, - USB_REQ_SET_CONFIG = 0x09, - USB_REQ_GET_INTERFACE = 0x0A, - USB_REQ_SET_INTERFACE = 0x0B, - USB_REQ_SYNCH_FRAME = 0x0C, + USB_REQ_GET_STATUS = 0x00, + USB_REQ_CLEAR_FEATURE = 0x01, + USB_REQ_SET_FEATURE = 0x03, + USB_REQ_SET_ADDRESS = 0x05, + USB_REQ_GET_DESCRIPTOR = 0x06, + USB_REQ_SET_DESCRIPTOR = 0x07, + USB_REQ_GET_CONFIG = 0x08, + USB_REQ_SET_CONFIG = 0x09, + USB_REQ_GET_INTERFACE = 0x0A, + USB_REQ_SET_INTERFACE = 0x0B, + USB_REQ_SYNCH_FRAME = 0x0C, // // Usb control transfer target // - USB_TARGET_DEVICE = 0, - USB_TARGET_INTERFACE = 0x01, - USB_TARGET_ENDPOINT = 0x02, - USB_TARGET_OTHER = 0x03, + USB_TARGET_DEVICE = 0, + USB_TARGET_INTERFACE = 0x01, + USB_TARGET_ENDPOINT = 0x02, + USB_TARGET_OTHER = 0x03, // // USB Descriptor types @@ -225,21 +223,20 @@ typedef enum { // // USB endpoint types: 00: control, 01: isochronous, 10: bulk, 11: interrupt // - USB_ENDPOINT_CONTROL = 0x00, - USB_ENDPOINT_ISO = 0x01, - USB_ENDPOINT_BULK = 0x02, - USB_ENDPOINT_INTERRUPT = 0x03, + USB_ENDPOINT_CONTROL = 0x00, + USB_ENDPOINT_ISO = 0x01, + USB_ENDPOINT_BULK = 0x02, + USB_ENDPOINT_INTERRUPT = 0x03, - USB_ENDPOINT_TYPE_MASK = 0x03, - USB_ENDPOINT_DIR_IN = 0x80, + USB_ENDPOINT_TYPE_MASK = 0x03, + USB_ENDPOINT_DIR_IN = 0x80, // - //Use 200 ms to increase the error handling response time + // Use 200 ms to increase the error handling response time // EFI_USB_INTERRUPT_DELAY = 2000000 } USB_TYPES_DEFINITION; - // // HID constants definition, see Device Class Definition // for Human Interface Devices (HID) rev1.11 @@ -253,19 +250,19 @@ typedef enum { // // HID specific requests. // -#define USB_HID_CLASS_GET_REQ_TYPE 0xa1 -#define USB_HID_CLASS_SET_REQ_TYPE 0x21 +#define USB_HID_CLASS_GET_REQ_TYPE 0xa1 +#define USB_HID_CLASS_SET_REQ_TYPE 0x21 // // HID report item format // -#define HID_ITEM_FORMAT_SHORT 0 -#define HID_ITEM_FORMAT_LONG 1 +#define HID_ITEM_FORMAT_SHORT 0 +#define HID_ITEM_FORMAT_LONG 1 // // Special tag indicating long items // -#define HID_ITEM_TAG_LONG 15 +#define HID_ITEM_TAG_LONG 15 // // HID report descriptor item type (prefix bit 2,3) @@ -287,15 +284,15 @@ typedef enum { // // HID report descriptor main item contents // -#define HID_MAIN_ITEM_CONSTANT 0x001 -#define HID_MAIN_ITEM_VARIABLE 0x002 -#define HID_MAIN_ITEM_RELATIVE 0x004 -#define HID_MAIN_ITEM_WRAP 0x008 -#define HID_MAIN_ITEM_NONLINEAR 0x010 -#define HID_MAIN_ITEM_NO_PREFERRED 0x020 -#define HID_MAIN_ITEM_NULL_STATE 0x040 -#define HID_MAIN_ITEM_VOLATILE 0x080 -#define HID_MAIN_ITEM_BUFFERED_BYTE 0x100 +#define HID_MAIN_ITEM_CONSTANT 0x001 +#define HID_MAIN_ITEM_VARIABLE 0x002 +#define HID_MAIN_ITEM_RELATIVE 0x004 +#define HID_MAIN_ITEM_WRAP 0x008 +#define HID_MAIN_ITEM_NONLINEAR 0x010 +#define HID_MAIN_ITEM_NO_PREFERRED 0x020 +#define HID_MAIN_ITEM_NULL_STATE 0x040 +#define HID_MAIN_ITEM_VOLATILE 0x080 +#define HID_MAIN_ITEM_BUFFERED_BYTE 0x100 // // HID report descriptor collection item types @@ -323,16 +320,16 @@ typedef enum { // // HID report descriptor local item tags // -#define HID_LOCAL_ITEM_TAG_USAGE 0 -#define HID_LOCAL_ITEM_TAG_USAGE_MINIMUM 1 -#define HID_LOCAL_ITEM_TAG_USAGE_MAXIMUM 2 -#define HID_LOCAL_ITEM_TAG_DESIGNATOR_INDEX 3 -#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MINIMUM 4 -#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MAXIMUM 5 -#define HID_LOCAL_ITEM_TAG_STRING_INDEX 7 -#define HID_LOCAL_ITEM_TAG_STRING_MINIMUM 8 -#define HID_LOCAL_ITEM_TAG_STRING_MAXIMUM 9 -#define HID_LOCAL_ITEM_TAG_DELIMITER 10 +#define HID_LOCAL_ITEM_TAG_USAGE 0 +#define HID_LOCAL_ITEM_TAG_USAGE_MINIMUM 1 +#define HID_LOCAL_ITEM_TAG_USAGE_MAXIMUM 2 +#define HID_LOCAL_ITEM_TAG_DESIGNATOR_INDEX 3 +#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MINIMUM 4 +#define HID_LOCAL_ITEM_TAG_DESIGNATOR_MAXIMUM 5 +#define HID_LOCAL_ITEM_TAG_STRING_INDEX 7 +#define HID_LOCAL_ITEM_TAG_STRING_MINIMUM 8 +#define HID_LOCAL_ITEM_TAG_STRING_MAXIMUM 9 +#define HID_LOCAL_ITEM_TAG_DELIMITER 10 // // HID report types @@ -357,8 +354,8 @@ typedef enum { /// HID 1.1, section 6.2.1 /// typedef struct hid_class_descriptor { - UINT8 DescriptorType; - UINT16 DescriptorLength; + UINT8 DescriptorType; + UINT16 DescriptorLength; } EFI_USB_HID_CLASS_DESCRIPTOR; /// @@ -367,12 +364,12 @@ typedef struct hid_class_descriptor { /// HID 1.1, section 6.2.1 /// typedef struct hid_descriptor { - UINT8 Length; - UINT8 DescriptorType; - UINT16 BcdHID; - UINT8 CountryCode; - UINT8 NumDescriptors; - EFI_USB_HID_CLASS_DESCRIPTOR HidClassDesc[1]; + UINT8 Length; + UINT8 DescriptorType; + UINT16 BcdHID; + UINT8 CountryCode; + UINT8 NumDescriptors; + EFI_USB_HID_CLASS_DESCRIPTOR HidClassDesc[1]; } EFI_USB_HID_DESCRIPTOR; #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/WatchdogActionTable.h b/MdePkg/Include/IndustryStandard/WatchdogActionTable.h index 85c2bb4..d7b2b33 100644 --- a/MdePkg/Include/IndustryStandard/WatchdogActionTable.h +++ b/MdePkg/Include/IndustryStandard/WatchdogActionTable.h @@ -6,7 +6,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ - #ifndef _WATCHDOG_ACTION_TABLE_H_ #define _WATCHDOG_ACTION_TABLE_H_ @@ -20,31 +19,31 @@ /// Watchdog Action Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 WatchdogHeaderLength; - UINT16 PCISegment; - UINT8 PCIBusNumber; - UINT8 PCIDeviceNumber; - UINT8 PCIFunctionNumber; - UINT8 Reserved_45[3]; - UINT32 TimerPeriod; - UINT32 MaxCount; - UINT32 MinCount; - UINT8 WatchdogFlags; - UINT8 Reserved_61[3]; - UINT32 NumberWatchdogInstructionEntries; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 WatchdogHeaderLength; + UINT16 PCISegment; + UINT8 PCIBusNumber; + UINT8 PCIDeviceNumber; + UINT8 PCIFunctionNumber; + UINT8 Reserved_45[3]; + UINT32 TimerPeriod; + UINT32 MaxCount; + UINT32 MinCount; + UINT8 WatchdogFlags; + UINT8 Reserved_61[3]; + UINT32 NumberWatchdogInstructionEntries; } EFI_ACPI_WATCHDOG_ACTION_1_0_TABLE; /// /// Watchdog Instruction Entries /// typedef struct { - UINT8 WatchdogAction; - UINT8 InstructionFlags; - UINT8 Reserved_2[2]; - EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion; - UINT32 Value; - UINT32 Mask; + UINT8 WatchdogAction; + UINT8 InstructionFlags; + UINT8 Reserved_2[2]; + EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion; + UINT32 Value; + UINT32 Mask; } EFI_ACPI_WATCHDOG_ACTION_1_0_WATCHDOG_ACTION_INSTRUCTION_ENTRY; #pragma pack() @@ -52,39 +51,39 @@ typedef struct { /// /// WDAT Revision (defined in spec) /// -#define EFI_ACPI_WATCHDOG_ACTION_1_0_TABLE_REVISION 0x01 +#define EFI_ACPI_WATCHDOG_ACTION_1_0_TABLE_REVISION 0x01 // // WDAT 1.0 Flags // -#define EFI_ACPI_WDAT_1_0_WATCHDOG_ENABLED 0x1 -#define EFI_ACPI_WDAT_1_0_WATCHDOG_STOPPED_IN_SLEEP_STATE 0x80 +#define EFI_ACPI_WDAT_1_0_WATCHDOG_ENABLED 0x1 +#define EFI_ACPI_WDAT_1_0_WATCHDOG_STOPPED_IN_SLEEP_STATE 0x80 // // WDAT 1.0 Watchdog Actions // -#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_RESET 0x1 -#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_QUERY_CURRENT_COUNTDOWN_PERIOD 0x4 -#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_QUERY_COUNTDOWN_PERIOD 0x5 -#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_SET_COUNTDOWN_PERIOD 0x6 -#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_QUERY_RUNNING_STATE 0x8 -#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_SET_RUNNING_STATE 0x9 -#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_QUERY_STOPPED_STATE 0xA -#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_SET_STOPPED_STATE 0xB -#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_QUERY_REBOOT 0x10 -#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_SET_REBOOT 0x11 -#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_QUERY_SHUTDOWN 0x12 -#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_SET_SHUTDOWN 0x13 -#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_QUERY_WATCHDOG_STATUS 0x20 -#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_SET_WATCHDOG_STATUS 0x21 +#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_RESET 0x1 +#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_QUERY_CURRENT_COUNTDOWN_PERIOD 0x4 +#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_QUERY_COUNTDOWN_PERIOD 0x5 +#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_SET_COUNTDOWN_PERIOD 0x6 +#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_QUERY_RUNNING_STATE 0x8 +#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_SET_RUNNING_STATE 0x9 +#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_QUERY_STOPPED_STATE 0xA +#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_SET_STOPPED_STATE 0xB +#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_QUERY_REBOOT 0x10 +#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_SET_REBOOT 0x11 +#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_QUERY_SHUTDOWN 0x12 +#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_SET_SHUTDOWN 0x13 +#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_QUERY_WATCHDOG_STATUS 0x20 +#define EFI_ACPI_WDAT_1_0_WATCHDOG_ACTION_SET_WATCHDOG_STATUS 0x21 // // WDAT 1.0 Watchdog Action Entry Instruction Flags // -#define EFI_ACPI_WDAT_1_0_WATCHDOG_INSTRUCTION_READ_VALUE 0x0 -#define EFI_ACPI_WDAT_1_0_WATCHDOG_INSTRUCTION_READ_COUNTDOWN 0x1 -#define EFI_ACPI_WDAT_1_0_WATCHDOG_INSTRUCTION_WRITE_VALUE 0x2 -#define EFI_ACPI_WDAT_1_0_WATCHDOG_INSTRUCTION_WRITE_COUNTDOWN 0x3 -#define EFI_ACPI_WDAT_1_0_WATCHDOG_INSTRUCTION_PRESERVE_REGISTER 0x80 +#define EFI_ACPI_WDAT_1_0_WATCHDOG_INSTRUCTION_READ_VALUE 0x0 +#define EFI_ACPI_WDAT_1_0_WATCHDOG_INSTRUCTION_READ_COUNTDOWN 0x1 +#define EFI_ACPI_WDAT_1_0_WATCHDOG_INSTRUCTION_WRITE_VALUE 0x2 +#define EFI_ACPI_WDAT_1_0_WATCHDOG_INSTRUCTION_WRITE_COUNTDOWN 0x3 +#define EFI_ACPI_WDAT_1_0_WATCHDOG_INSTRUCTION_PRESERVE_REGISTER 0x80 #endif diff --git a/MdePkg/Include/IndustryStandard/WatchdogResourceTable.h b/MdePkg/Include/IndustryStandard/WatchdogResourceTable.h index f5ebd2c..88ebd6d 100644 --- a/MdePkg/Include/IndustryStandard/WatchdogResourceTable.h +++ b/MdePkg/Include/IndustryStandard/WatchdogResourceTable.h @@ -20,17 +20,17 @@ /// Watchdog Resource Table definition. /// typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE ControlRegisterAddress; - EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE CountRegisterAddress; - UINT16 PCIDeviceID; - UINT16 PCIVendorID; - UINT8 PCIBusNumber; - UINT8 PCIDeviceNumber; - UINT8 PCIFunctionNumber; - UINT8 PCISegment; - UINT16 MaxCount; - UINT8 Units; + EFI_ACPI_DESCRIPTION_HEADER Header; + EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE ControlRegisterAddress; + EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE CountRegisterAddress; + UINT16 PCIDeviceID; + UINT16 PCIVendorID; + UINT8 PCIBusNumber; + UINT8 PCIDeviceNumber; + UINT8 PCIFunctionNumber; + UINT8 PCISegment; + UINT16 MaxCount; + UINT8 Units; } EFI_ACPI_WATCHDOG_RESOURCE_1_0_TABLE; #pragma pack() @@ -43,8 +43,8 @@ typedef struct { // // WDRT 1.0 Count Unit // -#define EFI_ACPI_WDRT_1_0_COUNT_UNIT_1_SEC_PER_COUNT 1 -#define EFI_ACPI_WDRT_1_0_COUNT_UNIT_100_MILLISEC_PER_COUNT 2 -#define EFI_ACPI_WDRT_1_0_COUNT_UNIT_10_MILLISEC_PER_COUNT 3 +#define EFI_ACPI_WDRT_1_0_COUNT_UNIT_1_SEC_PER_COUNT 1 +#define EFI_ACPI_WDRT_1_0_COUNT_UNIT_100_MILLISEC_PER_COUNT 2 +#define EFI_ACPI_WDRT_1_0_COUNT_UNIT_10_MILLISEC_PER_COUNT 3 #endif diff --git a/MdePkg/Include/IndustryStandard/WindowsSmmSecurityMitigationTable.h b/MdePkg/Include/IndustryStandard/WindowsSmmSecurityMitigationTable.h index ccc6da1..786aea3 100644 --- a/MdePkg/Include/IndustryStandard/WindowsSmmSecurityMitigationTable.h +++ b/MdePkg/Include/IndustryStandard/WindowsSmmSecurityMitigationTable.h @@ -7,7 +7,6 @@ **/ - #ifndef _WINDOWS_SMM_SECURITY_MITIGATION_TABLE_H_ #define _WINDOWS_SMM_SECURITY_MITIGATION_TABLE_H_ @@ -20,13 +19,13 @@ #define EFI_WSMT_TABLE_REVISION 1 typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - UINT32 ProtectionFlags; + EFI_ACPI_DESCRIPTION_HEADER Header; + UINT32 ProtectionFlags; } EFI_ACPI_WSMT_TABLE; -#define EFI_WSMT_PROTECTION_FLAGS_FIXED_COMM_BUFFERS 0x1 -#define EFI_WSMT_PROTECTION_FLAGS_COMM_BUFFER_NESTED_PTR_PROTECTION 0x2 -#define EFI_WSMT_PROTECTION_FLAGS_SYSTEM_RESOURCE_PROTECTION 0x4 +#define EFI_WSMT_PROTECTION_FLAGS_FIXED_COMM_BUFFERS 0x1 +#define EFI_WSMT_PROTECTION_FLAGS_COMM_BUFFER_NESTED_PTR_PROTECTION 0x2 +#define EFI_WSMT_PROTECTION_FLAGS_SYSTEM_RESOURCE_PROTECTION 0x4 #pragma pack() diff --git a/MdePkg/Include/IndustryStandard/WindowsUxCapsule.h b/MdePkg/Include/IndustryStandard/WindowsUxCapsule.h index 07b676f..5122a33 100644 --- a/MdePkg/Include/IndustryStandard/WindowsUxCapsule.h +++ b/MdePkg/Include/IndustryStandard/WindowsUxCapsule.h @@ -7,26 +7,25 @@ **/ - #ifndef _WINDOWS_UX_CAPSULE_GUID_H_ #define _WINDOWS_UX_CAPSULE_GUID_H_ #pragma pack(1) typedef struct { - UINT8 Version; - UINT8 Checksum; - UINT8 ImageType; - UINT8 Reserved; - UINT32 Mode; - UINT32 OffsetX; - UINT32 OffsetY; - //UINT8 Image[]; + UINT8 Version; + UINT8 Checksum; + UINT8 ImageType; + UINT8 Reserved; + UINT32 Mode; + UINT32 OffsetX; + UINT32 OffsetY; + // UINT8 Image[]; } DISPLAY_DISPLAY_PAYLOAD; typedef struct { - EFI_CAPSULE_HEADER CapsuleHeader; - DISPLAY_DISPLAY_PAYLOAD ImagePayload; + EFI_CAPSULE_HEADER CapsuleHeader; + DISPLAY_DISPLAY_PAYLOAD ImagePayload; } EFI_DISPLAY_CAPSULE; #pragma pack() @@ -36,6 +35,6 @@ typedef struct { 0x3b8c8162, 0x188c, 0x46a4, { 0xae, 0xc9, 0xbe, 0x43, 0xf1, 0xd6, 0x56, 0x97} \ } -extern EFI_GUID gWindowsUxCapsuleGuid; +extern EFI_GUID gWindowsUxCapsuleGuid; #endif diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h index 8c07277..6aa0d97 100644 --- a/MdePkg/Include/Library/BaseLib.h +++ b/MdePkg/Include/Library/BaseLib.h @@ -22,16 +22,16 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// The IA-32 architecture context buffer used by SetJump() and LongJump(). /// typedef struct { - UINT32 Ebx; - UINT32 Esi; - UINT32 Edi; - UINT32 Ebp; - UINT32 Esp; - UINT32 Eip; - UINT32 Ssp; + UINT32 Ebx; + UINT32 Esi; + UINT32 Edi; + UINT32 Ebp; + UINT32 Esp; + UINT32 Eip; + UINT32 Ssp; } BASE_LIBRARY_JUMP_BUFFER; -#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 4 +#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 4 #endif // defined (MDE_CPU_IA32) @@ -40,22 +40,22 @@ typedef struct { /// The x64 architecture context buffer used by SetJump() and LongJump(). /// typedef struct { - UINT64 Rbx; - UINT64 Rsp; - UINT64 Rbp; - UINT64 Rdi; - UINT64 Rsi; - UINT64 R12; - UINT64 R13; - UINT64 R14; - UINT64 R15; - UINT64 Rip; - UINT64 MxCsr; - UINT8 XmmBuffer[160]; ///< XMM6-XMM15. - UINT64 Ssp; + UINT64 Rbx; + UINT64 Rsp; + UINT64 Rbp; + UINT64 Rdi; + UINT64 Rsi; + UINT64 R12; + UINT64 R13; + UINT64 R14; + UINT64 R15; + UINT64 Rip; + UINT64 MxCsr; + UINT8 XmmBuffer[160]; ///< XMM6-XMM15. + UINT64 Ssp; } BASE_LIBRARY_JUMP_BUFFER; -#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8 +#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8 #endif // defined (MDE_CPU_X64) @@ -64,14 +64,14 @@ typedef struct { /// The EBC context buffer used by SetJump() and LongJump(). /// typedef struct { - UINT64 R0; - UINT64 R1; - UINT64 R2; - UINT64 R3; - UINT64 IP; + UINT64 R0; + UINT64 R1; + UINT64 R2; + UINT64 R3; + UINT64 IP; } BASE_LIBRARY_JUMP_BUFFER; -#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8 +#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8 #endif // defined (MDE_CPU_EBC) @@ -91,9 +91,9 @@ typedef struct { UINT32 R14; } BASE_LIBRARY_JUMP_BUFFER; -#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 4 +#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 4 -#endif // defined (MDE_CPU_ARM) +#endif // defined (MDE_CPU_ARM) #if defined (MDE_CPU_AARCH64) typedef struct { @@ -123,32 +123,32 @@ typedef struct { UINT64 D15; } BASE_LIBRARY_JUMP_BUFFER; -#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8 +#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8 -#endif // defined (MDE_CPU_AARCH64) +#endif // defined (MDE_CPU_AARCH64) #if defined (MDE_CPU_RISCV64) /// /// The RISC-V architecture context buffer used by SetJump() and LongJump(). /// typedef struct { - UINT64 RA; - UINT64 S0; - UINT64 S1; - UINT64 S2; - UINT64 S3; - UINT64 S4; - UINT64 S5; - UINT64 S6; - UINT64 S7; - UINT64 S8; - UINT64 S9; - UINT64 S10; - UINT64 S11; - UINT64 SP; + UINT64 RA; + UINT64 S0; + UINT64 S1; + UINT64 S2; + UINT64 S3; + UINT64 S4; + UINT64 S5; + UINT64 S6; + UINT64 S7; + UINT64 S8; + UINT64 S9; + UINT64 S10; + UINT64 S11; + UINT64 SP; } BASE_LIBRARY_JUMP_BUFFER; -#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8 +#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8 #endif // defined (MDE_CPU_RISCV64) @@ -156,7 +156,6 @@ typedef struct { // String Services // - /** Returns the length of a Null-terminated Unicode string. @@ -176,8 +175,8 @@ typedef struct { UINTN EFIAPI StrnLenS ( - IN CONST CHAR16 *String, - IN UINTN MaxSize + IN CONST CHAR16 *String, + IN UINTN MaxSize ); /** @@ -204,8 +203,8 @@ StrnLenS ( UINTN EFIAPI StrnSizeS ( - IN CONST CHAR16 *String, - IN UINTN MaxSize + IN CONST CHAR16 *String, + IN UINTN MaxSize ); /** @@ -237,9 +236,9 @@ StrnSizeS ( RETURN_STATUS EFIAPI StrCpyS ( - OUT CHAR16 *Destination, - IN UINTN DestMax, - IN CONST CHAR16 *Source + OUT CHAR16 *Destination, + IN UINTN DestMax, + IN CONST CHAR16 *Source ); /** @@ -274,10 +273,10 @@ StrCpyS ( RETURN_STATUS EFIAPI StrnCpyS ( - OUT CHAR16 *Destination, - IN UINTN DestMax, - IN CONST CHAR16 *Source, - IN UINTN Length + OUT CHAR16 *Destination, + IN UINTN DestMax, + IN CONST CHAR16 *Source, + IN UINTN Length ); /** @@ -312,9 +311,9 @@ StrnCpyS ( RETURN_STATUS EFIAPI StrCatS ( - IN OUT CHAR16 *Destination, - IN UINTN DestMax, - IN CONST CHAR16 *Source + IN OUT CHAR16 *Destination, + IN UINTN DestMax, + IN CONST CHAR16 *Source ); /** @@ -352,10 +351,10 @@ StrCatS ( RETURN_STATUS EFIAPI StrnCatS ( - IN OUT CHAR16 *Destination, - IN UINTN DestMax, - IN CONST CHAR16 *Source, - IN UINTN Length + IN OUT CHAR16 *Destination, + IN UINTN DestMax, + IN CONST CHAR16 *Source, + IN UINTN Length ); /** @@ -404,9 +403,9 @@ StrnCatS ( RETURN_STATUS EFIAPI StrDecimalToUintnS ( - IN CONST CHAR16 *String, - OUT CHAR16 **EndPointer OPTIONAL, - OUT UINTN *Data + IN CONST CHAR16 *String, + OUT CHAR16 **EndPointer OPTIONAL, + OUT UINTN *Data ); /** @@ -455,9 +454,9 @@ StrDecimalToUintnS ( RETURN_STATUS EFIAPI StrDecimalToUint64S ( - IN CONST CHAR16 *String, - OUT CHAR16 **EndPointer OPTIONAL, - OUT UINT64 *Data + IN CONST CHAR16 *String, + OUT CHAR16 **EndPointer OPTIONAL, + OUT UINT64 *Data ); /** @@ -511,9 +510,9 @@ StrDecimalToUint64S ( RETURN_STATUS EFIAPI StrHexToUintnS ( - IN CONST CHAR16 *String, - OUT CHAR16 **EndPointer OPTIONAL, - OUT UINTN *Data + IN CONST CHAR16 *String, + OUT CHAR16 **EndPointer OPTIONAL, + OUT UINTN *Data ); /** @@ -567,9 +566,9 @@ StrHexToUintnS ( RETURN_STATUS EFIAPI StrHexToUint64S ( - IN CONST CHAR16 *String, - OUT CHAR16 **EndPointer OPTIONAL, - OUT UINT64 *Data + IN CONST CHAR16 *String, + OUT CHAR16 **EndPointer OPTIONAL, + OUT UINT64 *Data ); /** @@ -589,8 +588,8 @@ StrHexToUint64S ( UINTN EFIAPI AsciiStrnLenS ( - IN CONST CHAR8 *String, - IN UINTN MaxSize + IN CONST CHAR8 *String, + IN UINTN MaxSize ); /** @@ -615,8 +614,8 @@ AsciiStrnLenS ( UINTN EFIAPI AsciiStrnSizeS ( - IN CONST CHAR8 *String, - IN UINTN MaxSize + IN CONST CHAR8 *String, + IN UINTN MaxSize ); /** @@ -801,9 +800,9 @@ AsciiStrnCatS ( RETURN_STATUS EFIAPI AsciiStrDecimalToUintnS ( - IN CONST CHAR8 *String, - OUT CHAR8 **EndPointer OPTIONAL, - OUT UINTN *Data + IN CONST CHAR8 *String, + OUT CHAR8 **EndPointer OPTIONAL, + OUT UINTN *Data ); /** @@ -850,9 +849,9 @@ AsciiStrDecimalToUintnS ( RETURN_STATUS EFIAPI AsciiStrDecimalToUint64S ( - IN CONST CHAR8 *String, - OUT CHAR8 **EndPointer OPTIONAL, - OUT UINT64 *Data + IN CONST CHAR8 *String, + OUT CHAR8 **EndPointer OPTIONAL, + OUT UINT64 *Data ); /** @@ -903,9 +902,9 @@ AsciiStrDecimalToUint64S ( RETURN_STATUS EFIAPI AsciiStrHexToUintnS ( - IN CONST CHAR8 *String, - OUT CHAR8 **EndPointer OPTIONAL, - OUT UINTN *Data + IN CONST CHAR8 *String, + OUT CHAR8 **EndPointer OPTIONAL, + OUT UINTN *Data ); /** @@ -956,12 +955,11 @@ AsciiStrHexToUintnS ( RETURN_STATUS EFIAPI AsciiStrHexToUint64S ( - IN CONST CHAR8 *String, - OUT CHAR8 **EndPointer OPTIONAL, - OUT UINT64 *Data + IN CONST CHAR8 *String, + OUT CHAR8 **EndPointer OPTIONAL, + OUT UINT64 *Data ); - /** Returns the length of a Null-terminated Unicode string. @@ -982,10 +980,9 @@ AsciiStrHexToUint64S ( UINTN EFIAPI StrLen ( - IN CONST CHAR16 *String + IN CONST CHAR16 *String ); - /** Returns the size of a Null-terminated Unicode string in bytes, including the Null terminator. @@ -1007,10 +1004,9 @@ StrLen ( UINTN EFIAPI StrSize ( - IN CONST CHAR16 *String + IN CONST CHAR16 *String ); - /** Compares two Null-terminated Unicode strings, and returns the difference between the first mismatched Unicode characters. @@ -1042,11 +1038,10 @@ StrSize ( INTN EFIAPI StrCmp ( - IN CONST CHAR16 *FirstString, - IN CONST CHAR16 *SecondString + IN CONST CHAR16 *FirstString, + IN CONST CHAR16 *SecondString ); - /** Compares up to a specified length the contents of two Null-terminated Unicode strings, and returns the difference between the first mismatched Unicode characters. @@ -1082,12 +1077,11 @@ StrCmp ( INTN EFIAPI StrnCmp ( - IN CONST CHAR16 *FirstString, - IN CONST CHAR16 *SecondString, - IN UINTN Length + IN CONST CHAR16 *FirstString, + IN CONST CHAR16 *SecondString, + IN UINTN Length ); - /** Returns the first occurrence of a Null-terminated Unicode sub-string in a Null-terminated Unicode string. @@ -1116,8 +1110,8 @@ StrnCmp ( CHAR16 * EFIAPI StrStr ( - IN CONST CHAR16 *String, - IN CONST CHAR16 *SearchString + IN CONST CHAR16 *String, + IN CONST CHAR16 *SearchString ); /** @@ -1157,7 +1151,7 @@ StrStr ( UINTN EFIAPI StrDecimalToUintn ( - IN CONST CHAR16 *String + IN CONST CHAR16 *String ); /** @@ -1197,10 +1191,9 @@ StrDecimalToUintn ( UINT64 EFIAPI StrDecimalToUint64 ( - IN CONST CHAR16 *String + IN CONST CHAR16 *String ); - /** Convert a Null-terminated Unicode hexadecimal string to a value of type UINTN. @@ -1239,10 +1232,9 @@ StrDecimalToUint64 ( UINTN EFIAPI StrHexToUintn ( - IN CONST CHAR16 *String + IN CONST CHAR16 *String ); - /** Convert a Null-terminated Unicode hexadecimal string to a value of type UINT64. @@ -1281,7 +1273,7 @@ StrHexToUintn ( UINT64 EFIAPI StrHexToUint64 ( - IN CONST CHAR16 *String + IN CONST CHAR16 *String ); /** @@ -1337,10 +1329,10 @@ StrHexToUint64 ( RETURN_STATUS EFIAPI StrToIpv6Address ( - IN CONST CHAR16 *String, - OUT CHAR16 **EndPointer OPTIONAL, - OUT IPv6_ADDRESS *Address, - OUT UINT8 *PrefixLength OPTIONAL + IN CONST CHAR16 *String, + OUT CHAR16 **EndPointer OPTIONAL, + OUT IPv6_ADDRESS *Address, + OUT UINT8 *PrefixLength OPTIONAL ); /** @@ -1387,10 +1379,10 @@ StrToIpv6Address ( RETURN_STATUS EFIAPI StrToIpv4Address ( - IN CONST CHAR16 *String, - OUT CHAR16 **EndPointer OPTIONAL, - OUT IPv4_ADDRESS *Address, - OUT UINT8 *PrefixLength OPTIONAL + IN CONST CHAR16 *String, + OUT CHAR16 **EndPointer OPTIONAL, + OUT IPv4_ADDRESS *Address, + OUT UINT8 *PrefixLength OPTIONAL ); #define GUID_STRING_LENGTH 36 @@ -1440,8 +1432,8 @@ StrToIpv4Address ( RETURN_STATUS EFIAPI StrToGuid ( - IN CONST CHAR16 *String, - OUT GUID *Guid + IN CONST CHAR16 *String, + OUT GUID *Guid ); /** @@ -1480,13 +1472,12 @@ StrToGuid ( RETURN_STATUS EFIAPI StrHexToBytes ( - IN CONST CHAR16 *String, - IN UINTN Length, - OUT UINT8 *Buffer, - IN UINTN MaxBufferSize + IN CONST CHAR16 *String, + IN UINTN Length, + OUT UINT8 *Buffer, + IN UINTN MaxBufferSize ); - /** Convert a Null-terminated Unicode string to a Null-terminated ASCII string. @@ -1530,9 +1521,9 @@ StrHexToBytes ( RETURN_STATUS EFIAPI UnicodeStrToAsciiStrS ( - IN CONST CHAR16 *Source, - OUT CHAR8 *Destination, - IN UINTN DestMax + IN CONST CHAR16 *Source, + OUT CHAR8 *Destination, + IN UINTN DestMax ); /** @@ -1581,14 +1572,13 @@ UnicodeStrToAsciiStrS ( RETURN_STATUS EFIAPI UnicodeStrnToAsciiStrS ( - IN CONST CHAR16 *Source, - IN UINTN Length, - OUT CHAR8 *Destination, - IN UINTN DestMax, - OUT UINTN *DestinationLength + IN CONST CHAR16 *Source, + IN UINTN Length, + OUT CHAR8 *Destination, + IN UINTN DestMax, + OUT UINTN *DestinationLength ); - /** Returns the length of a Null-terminated ASCII string. @@ -1609,10 +1599,9 @@ UnicodeStrnToAsciiStrS ( UINTN EFIAPI AsciiStrLen ( - IN CONST CHAR8 *String + IN CONST CHAR8 *String ); - /** Returns the size of a Null-terminated ASCII string in bytes, including the Null terminator. @@ -1633,10 +1622,9 @@ AsciiStrLen ( UINTN EFIAPI AsciiStrSize ( - IN CONST CHAR8 *String + IN CONST CHAR8 *String ); - /** Compares two Null-terminated ASCII strings, and returns the difference between the first mismatched ASCII characters. @@ -1666,11 +1654,10 @@ AsciiStrSize ( INTN EFIAPI AsciiStrCmp ( - IN CONST CHAR8 *FirstString, - IN CONST CHAR8 *SecondString + IN CONST CHAR8 *FirstString, + IN CONST CHAR8 *SecondString ); - /** Performs a case insensitive comparison of two Null-terminated ASCII strings, and returns the difference between the first mismatched ASCII characters. @@ -1703,11 +1690,10 @@ AsciiStrCmp ( INTN EFIAPI AsciiStriCmp ( - IN CONST CHAR8 *FirstString, - IN CONST CHAR8 *SecondString + IN CONST CHAR8 *FirstString, + IN CONST CHAR8 *SecondString ); - /** Compares two Null-terminated ASCII strings with maximum lengths, and returns the difference between the first mismatched ASCII characters. @@ -1741,12 +1727,11 @@ AsciiStriCmp ( INTN EFIAPI AsciiStrnCmp ( - IN CONST CHAR8 *FirstString, - IN CONST CHAR8 *SecondString, - IN UINTN Length + IN CONST CHAR8 *FirstString, + IN CONST CHAR8 *SecondString, + IN UINTN Length ); - /** Returns the first occurrence of a Null-terminated ASCII sub-string in a Null-terminated ASCII string. @@ -1774,11 +1759,10 @@ AsciiStrnCmp ( CHAR8 * EFIAPI AsciiStrStr ( - IN CONST CHAR8 *String, - IN CONST CHAR8 *SearchString + IN CONST CHAR8 *String, + IN CONST CHAR8 *SearchString ); - /** Convert a Null-terminated ASCII decimal string to a value of type UINTN. @@ -1812,10 +1796,9 @@ AsciiStrStr ( UINTN EFIAPI AsciiStrDecimalToUintn ( - IN CONST CHAR8 *String + IN CONST CHAR8 *String ); - /** Convert a Null-terminated ASCII decimal string to a value of type UINT64. @@ -1849,10 +1832,9 @@ AsciiStrDecimalToUintn ( UINT64 EFIAPI AsciiStrDecimalToUint64 ( - IN CONST CHAR8 *String + IN CONST CHAR8 *String ); - /** Convert a Null-terminated ASCII hexadecimal string to a value of type UINTN. @@ -1890,10 +1872,9 @@ AsciiStrDecimalToUint64 ( UINTN EFIAPI AsciiStrHexToUintn ( - IN CONST CHAR8 *String + IN CONST CHAR8 *String ); - /** Convert a Null-terminated ASCII hexadecimal string to a value of type UINT64. @@ -1931,7 +1912,7 @@ AsciiStrHexToUintn ( UINT64 EFIAPI AsciiStrHexToUint64 ( - IN CONST CHAR8 *String + IN CONST CHAR8 *String ); /** @@ -1985,10 +1966,10 @@ AsciiStrHexToUint64 ( RETURN_STATUS EFIAPI AsciiStrToIpv6Address ( - IN CONST CHAR8 *String, - OUT CHAR8 **EndPointer OPTIONAL, - OUT IPv6_ADDRESS *Address, - OUT UINT8 *PrefixLength OPTIONAL + IN CONST CHAR8 *String, + OUT CHAR8 **EndPointer OPTIONAL, + OUT IPv6_ADDRESS *Address, + OUT UINT8 *PrefixLength OPTIONAL ); /** @@ -2033,10 +2014,10 @@ AsciiStrToIpv6Address ( RETURN_STATUS EFIAPI AsciiStrToIpv4Address ( - IN CONST CHAR8 *String, - OUT CHAR8 **EndPointer OPTIONAL, - OUT IPv4_ADDRESS *Address, - OUT UINT8 *PrefixLength OPTIONAL + IN CONST CHAR8 *String, + OUT CHAR8 **EndPointer OPTIONAL, + OUT IPv4_ADDRESS *Address, + OUT UINT8 *PrefixLength OPTIONAL ); /** @@ -2082,8 +2063,8 @@ AsciiStrToIpv4Address ( RETURN_STATUS EFIAPI AsciiStrToGuid ( - IN CONST CHAR8 *String, - OUT GUID *Guid + IN CONST CHAR8 *String, + OUT GUID *Guid ); /** @@ -2120,13 +2101,12 @@ AsciiStrToGuid ( RETURN_STATUS EFIAPI AsciiStrHexToBytes ( - IN CONST CHAR8 *String, - IN UINTN Length, - OUT UINT8 *Buffer, - IN UINTN MaxBufferSize + IN CONST CHAR8 *String, + IN UINTN Length, + OUT UINT8 *Buffer, + IN UINTN MaxBufferSize ); - /** Convert one Null-terminated ASCII string to a Null-terminated Unicode string. @@ -2166,9 +2146,9 @@ AsciiStrHexToBytes ( RETURN_STATUS EFIAPI AsciiStrToUnicodeStrS ( - IN CONST CHAR8 *Source, - OUT CHAR16 *Destination, - IN UINTN DestMax + IN CONST CHAR8 *Source, + OUT CHAR16 *Destination, + IN UINTN DestMax ); /** @@ -2216,11 +2196,11 @@ AsciiStrToUnicodeStrS ( RETURN_STATUS EFIAPI AsciiStrnToUnicodeStrS ( - IN CONST CHAR8 *Source, - IN UINTN Length, - OUT CHAR16 *Destination, - IN UINTN DestMax, - OUT UINTN *DestinationLength + IN CONST CHAR8 *Source, + IN UINTN Length, + OUT CHAR16 *Destination, + IN UINTN DestMax, + OUT UINTN *DestinationLength ); /** @@ -2241,7 +2221,7 @@ AsciiStrnToUnicodeStrS ( CHAR16 EFIAPI CharToUpper ( - IN CHAR16 Char + IN CHAR16 Char ); /** @@ -2260,7 +2240,7 @@ CharToUpper ( CHAR8 EFIAPI AsciiCharToUpper ( - IN CHAR8 Chr + IN CHAR8 Chr ); /** @@ -2286,7 +2266,7 @@ RETURN_STATUS EFIAPI Base64Encode ( IN CONST UINT8 *Source, - IN UINTN SourceLength, + IN UINTN SourceLength, OUT CHAR8 *Destination OPTIONAL, IN OUT UINTN *DestinationSize ); @@ -2376,10 +2356,10 @@ Base64Encode ( RETURN_STATUS EFIAPI Base64Decode ( - IN CONST CHAR8 *Source OPTIONAL, - IN UINTN SourceSize, - OUT UINT8 *Destination OPTIONAL, - IN OUT UINTN *DestinationSize + IN CONST CHAR8 *Source OPTIONAL, + IN UINTN SourceSize, + OUT UINT8 *Destination OPTIONAL, + IN OUT UINTN *DestinationSize ); /** @@ -2398,10 +2378,9 @@ Base64Decode ( UINT8 EFIAPI DecimalToBcd8 ( - IN UINT8 Value + IN UINT8 Value ); - /** Converts an 8-bit BCD value to an 8-bit value. @@ -2419,7 +2398,7 @@ DecimalToBcd8 ( UINT8 EFIAPI BcdToDecimal8 ( - IN UINT8 Value + IN UINT8 Value ); // @@ -2436,8 +2415,8 @@ BcdToDecimal8 ( **/ BOOLEAN EFIAPI -PathRemoveLastItem( - IN OUT CHAR16 *Path +PathRemoveLastItem ( + IN OUT CHAR16 *Path ); /** @@ -2453,10 +2432,10 @@ PathRemoveLastItem( @return Returns Path, otherwise returns NULL to indicate that an error has occurred. **/ -CHAR16* +CHAR16 * EFIAPI -PathCleanUpDirectories( - IN CHAR16 *Path +PathCleanUpDirectories ( + IN CHAR16 *Path ); // @@ -2528,11 +2507,10 @@ PathCleanUpDirectories( BOOLEAN EFIAPI IsNodeInList ( - IN CONST LIST_ENTRY *FirstEntry, - IN CONST LIST_ENTRY *SecondEntry + IN CONST LIST_ENTRY *FirstEntry, + IN CONST LIST_ENTRY *SecondEntry ); - /** Initializes the head node of a doubly linked list, and returns the pointer to the head node of the doubly linked list. @@ -2552,10 +2530,9 @@ IsNodeInList ( LIST_ENTRY * EFIAPI InitializeListHead ( - IN OUT LIST_ENTRY *ListHead + IN OUT LIST_ENTRY *ListHead ); - /** Adds a node to the beginning of a doubly linked list, and returns the pointer to the head node of the doubly linked list. @@ -2581,11 +2558,10 @@ InitializeListHead ( LIST_ENTRY * EFIAPI InsertHeadList ( - IN OUT LIST_ENTRY *ListHead, - IN OUT LIST_ENTRY *Entry + IN OUT LIST_ENTRY *ListHead, + IN OUT LIST_ENTRY *Entry ); - /** Adds a node to the end of a doubly linked list, and returns the pointer to the head node of the doubly linked list. @@ -2611,11 +2587,10 @@ InsertHeadList ( LIST_ENTRY * EFIAPI InsertTailList ( - IN OUT LIST_ENTRY *ListHead, - IN OUT LIST_ENTRY *Entry + IN OUT LIST_ENTRY *ListHead, + IN OUT LIST_ENTRY *Entry ); - /** Retrieves the first node of a doubly linked list. @@ -2639,10 +2614,9 @@ InsertTailList ( LIST_ENTRY * EFIAPI GetFirstNode ( - IN CONST LIST_ENTRY *List + IN CONST LIST_ENTRY *List ); - /** Retrieves the next node of a doubly linked list. @@ -2667,11 +2641,10 @@ GetFirstNode ( LIST_ENTRY * EFIAPI GetNextNode ( - IN CONST LIST_ENTRY *List, - IN CONST LIST_ENTRY *Node + IN CONST LIST_ENTRY *List, + IN CONST LIST_ENTRY *Node ); - /** Retrieves the previous node of a doubly linked list. @@ -2696,11 +2669,10 @@ GetNextNode ( LIST_ENTRY * EFIAPI GetPreviousNode ( - IN CONST LIST_ENTRY *List, - IN CONST LIST_ENTRY *Node + IN CONST LIST_ENTRY *List, + IN CONST LIST_ENTRY *Node ); - /** Checks to see if a doubly linked list is empty or not. @@ -2723,10 +2695,9 @@ GetPreviousNode ( BOOLEAN EFIAPI IsListEmpty ( - IN CONST LIST_ENTRY *ListHead + IN CONST LIST_ENTRY *ListHead ); - /** Determines if a node in a doubly linked list is the head node of a the same doubly linked list. This function is typically used to terminate a loop that @@ -2756,11 +2727,10 @@ IsListEmpty ( BOOLEAN EFIAPI IsNull ( - IN CONST LIST_ENTRY *List, - IN CONST LIST_ENTRY *Node + IN CONST LIST_ENTRY *List, + IN CONST LIST_ENTRY *Node ); - /** Determines if a node the last node in a doubly linked list. @@ -2787,11 +2757,10 @@ IsNull ( BOOLEAN EFIAPI IsNodeAtEnd ( - IN CONST LIST_ENTRY *List, - IN CONST LIST_ENTRY *Node + IN CONST LIST_ENTRY *List, + IN CONST LIST_ENTRY *Node ); - /** Swaps the location of two nodes in a doubly linked list, and returns the first node after the swap. @@ -2821,11 +2790,10 @@ IsNodeAtEnd ( LIST_ENTRY * EFIAPI SwapListEntries ( - IN OUT LIST_ENTRY *FirstEntry, - IN OUT LIST_ENTRY *SecondEntry + IN OUT LIST_ENTRY *FirstEntry, + IN OUT LIST_ENTRY *SecondEntry ); - /** Removes a node from a doubly linked list, and returns the node that follows the removed node. @@ -2850,12 +2818,13 @@ SwapListEntries ( LIST_ENTRY * EFIAPI RemoveEntryList ( - IN CONST LIST_ENTRY *Entry + IN CONST LIST_ENTRY *Entry ); // // Math Services // + /** Prototype for comparison function for any two element types. @@ -2899,11 +2868,11 @@ INTN VOID EFIAPI QuickSort ( - IN OUT VOID *BufferToSort, - IN CONST UINTN Count, - IN CONST UINTN ElementSize, - IN BASE_SORT_COMPARE CompareFunction, - OUT VOID *BufferOneElement + IN OUT VOID *BufferToSort, + IN CONST UINTN Count, + IN CONST UINTN ElementSize, + IN BASE_SORT_COMPARE CompareFunction, + OUT VOID *BufferOneElement ); /** @@ -2924,11 +2893,10 @@ QuickSort ( UINT64 EFIAPI LShiftU64 ( - IN UINT64 Operand, - IN UINTN Count + IN UINT64 Operand, + IN UINTN Count ); - /** Shifts a 64-bit integer right between 0 and 63 bits. This high bits are filled with zeros. The shifted value is returned. @@ -2947,11 +2915,10 @@ LShiftU64 ( UINT64 EFIAPI RShiftU64 ( - IN UINT64 Operand, - IN UINTN Count + IN UINT64 Operand, + IN UINTN Count ); - /** Shifts a 64-bit integer right between 0 and 63 bits. The high bits are filled with original integer's bit 63. The shifted value is returned. @@ -2970,11 +2937,10 @@ RShiftU64 ( UINT64 EFIAPI ARShiftU64 ( - IN UINT64 Operand, - IN UINTN Count + IN UINT64 Operand, + IN UINTN Count ); - /** Rotates a 32-bit integer left between 0 and 31 bits, filling the low bits with the high bits that were rotated. @@ -2994,11 +2960,10 @@ ARShiftU64 ( UINT32 EFIAPI LRotU32 ( - IN UINT32 Operand, - IN UINTN Count + IN UINT32 Operand, + IN UINTN Count ); - /** Rotates a 32-bit integer right between 0 and 31 bits, filling the high bits with the low bits that were rotated. @@ -3018,11 +2983,10 @@ LRotU32 ( UINT32 EFIAPI RRotU32 ( - IN UINT32 Operand, - IN UINTN Count + IN UINT32 Operand, + IN UINTN Count ); - /** Rotates a 64-bit integer left between 0 and 63 bits, filling the low bits with the high bits that were rotated. @@ -3042,11 +3006,10 @@ RRotU32 ( UINT64 EFIAPI LRotU64 ( - IN UINT64 Operand, - IN UINTN Count + IN UINT64 Operand, + IN UINTN Count ); - /** Rotates a 64-bit integer right between 0 and 63 bits, filling the high bits with the high low bits that were rotated. @@ -3066,11 +3029,10 @@ LRotU64 ( UINT64 EFIAPI RRotU64 ( - IN UINT64 Operand, - IN UINTN Count + IN UINT64 Operand, + IN UINTN Count ); - /** Returns the bit position of the lowest bit set in a 32-bit value. @@ -3087,10 +3049,9 @@ RRotU64 ( INTN EFIAPI LowBitSet32 ( - IN UINT32 Operand + IN UINT32 Operand ); - /** Returns the bit position of the lowest bit set in a 64-bit value. @@ -3108,10 +3069,9 @@ LowBitSet32 ( INTN EFIAPI LowBitSet64 ( - IN UINT64 Operand + IN UINT64 Operand ); - /** Returns the bit position of the highest bit set in a 32-bit value. Equivalent to log2(x). @@ -3129,10 +3089,9 @@ LowBitSet64 ( INTN EFIAPI HighBitSet32 ( - IN UINT32 Operand + IN UINT32 Operand ); - /** Returns the bit position of the highest bit set in a 64-bit value. Equivalent to log2(x). @@ -3150,10 +3109,9 @@ HighBitSet32 ( INTN EFIAPI HighBitSet64 ( - IN UINT64 Operand + IN UINT64 Operand ); - /** Returns the value of the highest bit set in a 32-bit value. Equivalent to 1 << log2(x). @@ -3170,10 +3128,9 @@ HighBitSet64 ( UINT32 EFIAPI GetPowerOfTwo32 ( - IN UINT32 Operand + IN UINT32 Operand ); - /** Returns the value of the highest bit set in a 64-bit value. Equivalent to 1 << log2(x). @@ -3190,10 +3147,9 @@ GetPowerOfTwo32 ( UINT64 EFIAPI GetPowerOfTwo64 ( - IN UINT64 Operand + IN UINT64 Operand ); - /** Switches the endianness of a 16-bit integer. @@ -3209,10 +3165,9 @@ GetPowerOfTwo64 ( UINT16 EFIAPI SwapBytes16 ( - IN UINT16 Value + IN UINT16 Value ); - /** Switches the endianness of a 32-bit integer. @@ -3228,10 +3183,9 @@ SwapBytes16 ( UINT32 EFIAPI SwapBytes32 ( - IN UINT32 Value + IN UINT32 Value ); - /** Switches the endianness of a 64-bit integer. @@ -3247,10 +3201,9 @@ SwapBytes32 ( UINT64 EFIAPI SwapBytes64 ( - IN UINT64 Value + IN UINT64 Value ); - /** Multiples a 64-bit unsigned integer by a 32-bit unsigned integer and generates a 64-bit unsigned result. @@ -3268,11 +3221,10 @@ SwapBytes64 ( UINT64 EFIAPI MultU64x32 ( - IN UINT64 Multiplicand, - IN UINT32 Multiplier + IN UINT64 Multiplicand, + IN UINT32 Multiplier ); - /** Multiples a 64-bit unsigned integer by a 64-bit unsigned integer and generates a 64-bit unsigned result. @@ -3290,11 +3242,10 @@ MultU64x32 ( UINT64 EFIAPI MultU64x64 ( - IN UINT64 Multiplicand, - IN UINT64 Multiplier + IN UINT64 Multiplicand, + IN UINT64 Multiplier ); - /** Multiples a 64-bit signed integer by a 64-bit signed integer and generates a 64-bit signed result. @@ -3312,11 +3263,10 @@ MultU64x64 ( INT64 EFIAPI MultS64x64 ( - IN INT64 Multiplicand, - IN INT64 Multiplier + IN INT64 Multiplicand, + IN INT64 Multiplier ); - /** Divides a 64-bit unsigned integer by a 32-bit unsigned integer and generates a 64-bit unsigned result. @@ -3336,11 +3286,10 @@ MultS64x64 ( UINT64 EFIAPI DivU64x32 ( - IN UINT64 Dividend, - IN UINT32 Divisor + IN UINT64 Dividend, + IN UINT32 Divisor ); - /** Divides a 64-bit unsigned integer by a 32-bit unsigned integer and generates a 32-bit unsigned remainder. @@ -3360,11 +3309,10 @@ DivU64x32 ( UINT32 EFIAPI ModU64x32 ( - IN UINT64 Dividend, - IN UINT32 Divisor + IN UINT64 Dividend, + IN UINT32 Divisor ); - /** Divides a 64-bit unsigned integer by a 32-bit unsigned integer and generates a 64-bit unsigned result and an optional 32-bit unsigned remainder. @@ -3387,12 +3335,11 @@ ModU64x32 ( UINT64 EFIAPI DivU64x32Remainder ( - IN UINT64 Dividend, - IN UINT32 Divisor, - OUT UINT32 *Remainder OPTIONAL + IN UINT64 Dividend, + IN UINT32 Divisor, + OUT UINT32 *Remainder OPTIONAL ); - /** Divides a 64-bit unsigned integer by a 64-bit unsigned integer and generates a 64-bit unsigned result and an optional 64-bit unsigned remainder. @@ -3415,12 +3362,11 @@ DivU64x32Remainder ( UINT64 EFIAPI DivU64x64Remainder ( - IN UINT64 Dividend, - IN UINT64 Divisor, - OUT UINT64 *Remainder OPTIONAL + IN UINT64 Dividend, + IN UINT64 Divisor, + OUT UINT64 *Remainder OPTIONAL ); - /** Divides a 64-bit signed integer by a 64-bit signed integer and generates a 64-bit signed result and a optional 64-bit signed remainder. @@ -3447,12 +3393,11 @@ DivU64x64Remainder ( INT64 EFIAPI DivS64x64Remainder ( - IN INT64 Dividend, - IN INT64 Divisor, - OUT INT64 *Remainder OPTIONAL + IN INT64 Dividend, + IN INT64 Divisor, + OUT INT64 *Remainder OPTIONAL ); - /** Reads a 16-bit value from memory that may be unaligned. @@ -3469,10 +3414,9 @@ DivS64x64Remainder ( UINT16 EFIAPI ReadUnaligned16 ( - IN CONST UINT16 *Buffer + IN CONST UINT16 *Buffer ); - /** Writes a 16-bit value to memory that may be unaligned. @@ -3491,11 +3435,10 @@ ReadUnaligned16 ( UINT16 EFIAPI WriteUnaligned16 ( - OUT UINT16 *Buffer, - IN UINT16 Value + OUT UINT16 *Buffer, + IN UINT16 Value ); - /** Reads a 24-bit value from memory that may be unaligned. @@ -3512,10 +3455,9 @@ WriteUnaligned16 ( UINT32 EFIAPI ReadUnaligned24 ( - IN CONST UINT32 *Buffer + IN CONST UINT32 *Buffer ); - /** Writes a 24-bit value to memory that may be unaligned. @@ -3534,11 +3476,10 @@ ReadUnaligned24 ( UINT32 EFIAPI WriteUnaligned24 ( - OUT UINT32 *Buffer, - IN UINT32 Value + OUT UINT32 *Buffer, + IN UINT32 Value ); - /** Reads a 32-bit value from memory that may be unaligned. @@ -3555,10 +3496,9 @@ WriteUnaligned24 ( UINT32 EFIAPI ReadUnaligned32 ( - IN CONST UINT32 *Buffer + IN CONST UINT32 *Buffer ); - /** Writes a 32-bit value to memory that may be unaligned. @@ -3577,11 +3517,10 @@ ReadUnaligned32 ( UINT32 EFIAPI WriteUnaligned32 ( - OUT UINT32 *Buffer, - IN UINT32 Value + OUT UINT32 *Buffer, + IN UINT32 Value ); - /** Reads a 64-bit value from memory that may be unaligned. @@ -3598,10 +3537,9 @@ WriteUnaligned32 ( UINT64 EFIAPI ReadUnaligned64 ( - IN CONST UINT64 *Buffer + IN CONST UINT64 *Buffer ); - /** Writes a 64-bit value to memory that may be unaligned. @@ -3620,11 +3558,10 @@ ReadUnaligned64 ( UINT64 EFIAPI WriteUnaligned64 ( - OUT UINT64 *Buffer, - IN UINT64 Value + OUT UINT64 *Buffer, + IN UINT64 Value ); - // // Bit Field Functions // @@ -3651,12 +3588,11 @@ WriteUnaligned64 ( UINT8 EFIAPI BitFieldRead8 ( - IN UINT8 Operand, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT8 Operand, + IN UINTN StartBit, + IN UINTN EndBit ); - /** Writes a bit field to an 8-bit value, and returns the result. @@ -3683,13 +3619,12 @@ BitFieldRead8 ( UINT8 EFIAPI BitFieldWrite8 ( - IN UINT8 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINT8 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ); - /** Reads a bit field from an 8-bit value, performs a bitwise OR, and returns the result. @@ -3717,13 +3652,12 @@ BitFieldWrite8 ( UINT8 EFIAPI BitFieldOr8 ( - IN UINT8 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINT8 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ); - /** Reads a bit field from an 8-bit value, performs a bitwise AND, and returns the result. @@ -3751,13 +3685,12 @@ BitFieldOr8 ( UINT8 EFIAPI BitFieldAnd8 ( - IN UINT8 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINT8 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ); - /** Reads a bit field from an 8-bit value, performs a bitwise AND followed by a bitwise OR, and returns the result. @@ -3788,14 +3721,13 @@ BitFieldAnd8 ( UINT8 EFIAPI BitFieldAndThenOr8 ( - IN UINT8 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINT8 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ); - /** Returns a bit field from a 16-bit value. @@ -3818,12 +3750,11 @@ BitFieldAndThenOr8 ( UINT16 EFIAPI BitFieldRead16 ( - IN UINT16 Operand, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT16 Operand, + IN UINTN StartBit, + IN UINTN EndBit ); - /** Writes a bit field to a 16-bit value, and returns the result. @@ -3850,13 +3781,12 @@ BitFieldRead16 ( UINT16 EFIAPI BitFieldWrite16 ( - IN UINT16 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINT16 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ); - /** Reads a bit field from a 16-bit value, performs a bitwise OR, and returns the result. @@ -3884,13 +3814,12 @@ BitFieldWrite16 ( UINT16 EFIAPI BitFieldOr16 ( - IN UINT16 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINT16 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ); - /** Reads a bit field from a 16-bit value, performs a bitwise AND, and returns the result. @@ -3918,13 +3847,12 @@ BitFieldOr16 ( UINT16 EFIAPI BitFieldAnd16 ( - IN UINT16 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINT16 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ); - /** Reads a bit field from a 16-bit value, performs a bitwise AND followed by a bitwise OR, and returns the result. @@ -3955,14 +3883,13 @@ BitFieldAnd16 ( UINT16 EFIAPI BitFieldAndThenOr16 ( - IN UINT16 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINT16 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ); - /** Returns a bit field from a 32-bit value. @@ -3985,12 +3912,11 @@ BitFieldAndThenOr16 ( UINT32 EFIAPI BitFieldRead32 ( - IN UINT32 Operand, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT32 Operand, + IN UINTN StartBit, + IN UINTN EndBit ); - /** Writes a bit field to a 32-bit value, and returns the result. @@ -4017,13 +3943,12 @@ BitFieldRead32 ( UINT32 EFIAPI BitFieldWrite32 ( - IN UINT32 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINT32 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ); - /** Reads a bit field from a 32-bit value, performs a bitwise OR, and returns the result. @@ -4051,13 +3976,12 @@ BitFieldWrite32 ( UINT32 EFIAPI BitFieldOr32 ( - IN UINT32 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINT32 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ); - /** Reads a bit field from a 32-bit value, performs a bitwise AND, and returns the result. @@ -4085,13 +4009,12 @@ BitFieldOr32 ( UINT32 EFIAPI BitFieldAnd32 ( - IN UINT32 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINT32 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ); - /** Reads a bit field from a 32-bit value, performs a bitwise AND followed by a bitwise OR, and returns the result. @@ -4122,14 +4045,13 @@ BitFieldAnd32 ( UINT32 EFIAPI BitFieldAndThenOr32 ( - IN UINT32 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINT32 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ); - /** Returns a bit field from a 64-bit value. @@ -4152,12 +4074,11 @@ BitFieldAndThenOr32 ( UINT64 EFIAPI BitFieldRead64 ( - IN UINT64 Operand, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT64 Operand, + IN UINTN StartBit, + IN UINTN EndBit ); - /** Writes a bit field to a 64-bit value, and returns the result. @@ -4184,13 +4105,12 @@ BitFieldRead64 ( UINT64 EFIAPI BitFieldWrite64 ( - IN UINT64 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 Value + IN UINT64 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 Value ); - /** Reads a bit field from a 64-bit value, performs a bitwise OR, and returns the result. @@ -4218,13 +4138,12 @@ BitFieldWrite64 ( UINT64 EFIAPI BitFieldOr64 ( - IN UINT64 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 OrData + IN UINT64 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 OrData ); - /** Reads a bit field from a 64-bit value, performs a bitwise AND, and returns the result. @@ -4252,13 +4171,12 @@ BitFieldOr64 ( UINT64 EFIAPI BitFieldAnd64 ( - IN UINT64 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData + IN UINT64 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData ); - /** Reads a bit field from a 64-bit value, performs a bitwise AND followed by a bitwise OR, and returns the result. @@ -4289,11 +4207,11 @@ BitFieldAnd64 ( UINT64 EFIAPI BitFieldAndThenOr64 ( - IN UINT64 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData, - IN UINT64 OrData + IN UINT64 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData, + IN UINT64 OrData ); /** @@ -4319,9 +4237,9 @@ BitFieldAndThenOr64 ( UINT8 EFIAPI BitFieldCountOnes32 ( - IN UINT32 Operand, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT32 Operand, + IN UINTN StartBit, + IN UINTN EndBit ); /** @@ -4347,9 +4265,9 @@ BitFieldCountOnes32 ( UINT8 EFIAPI BitFieldCountOnes64 ( - IN UINT64 Operand, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT64 Operand, + IN UINTN StartBit, + IN UINTN EndBit ); // @@ -4377,11 +4295,10 @@ BitFieldCountOnes64 ( UINT8 EFIAPI CalculateSum8 ( - IN CONST UINT8 *Buffer, - IN UINTN Length + IN CONST UINT8 *Buffer, + IN UINTN Length ); - /** Returns the two's complement checksum of all elements in a buffer of 8-bit values. @@ -4403,11 +4320,10 @@ CalculateSum8 ( UINT8 EFIAPI CalculateCheckSum8 ( - IN CONST UINT8 *Buffer, - IN UINTN Length + IN CONST UINT8 *Buffer, + IN UINTN Length ); - /** Returns the sum of all elements in a buffer of 16-bit values. During calculation, the carry bits are dropped. @@ -4430,11 +4346,10 @@ CalculateCheckSum8 ( UINT16 EFIAPI CalculateSum16 ( - IN CONST UINT16 *Buffer, - IN UINTN Length + IN CONST UINT16 *Buffer, + IN UINTN Length ); - /** Returns the two's complement checksum of all elements in a buffer of 16-bit values. @@ -4458,11 +4373,10 @@ CalculateSum16 ( UINT16 EFIAPI CalculateCheckSum16 ( - IN CONST UINT16 *Buffer, - IN UINTN Length + IN CONST UINT16 *Buffer, + IN UINTN Length ); - /** Returns the sum of all elements in a buffer of 32-bit values. During calculation, the carry bits are dropped. @@ -4485,11 +4399,10 @@ CalculateCheckSum16 ( UINT32 EFIAPI CalculateSum32 ( - IN CONST UINT32 *Buffer, - IN UINTN Length + IN CONST UINT32 *Buffer, + IN UINTN Length ); - /** Returns the two's complement checksum of all elements in a buffer of 32-bit values. @@ -4513,11 +4426,10 @@ CalculateSum32 ( UINT32 EFIAPI CalculateCheckSum32 ( - IN CONST UINT32 *Buffer, - IN UINTN Length + IN CONST UINT32 *Buffer, + IN UINTN Length ); - /** Returns the sum of all elements in a buffer of 64-bit values. During calculation, the carry bits are dropped. @@ -4540,11 +4452,10 @@ CalculateCheckSum32 ( UINT64 EFIAPI CalculateSum64 ( - IN CONST UINT64 *Buffer, - IN UINTN Length + IN CONST UINT64 *Buffer, + IN UINTN Length ); - /** Returns the two's complement checksum of all elements in a buffer of 64-bit values. @@ -4568,8 +4479,8 @@ CalculateSum64 ( UINT64 EFIAPI CalculateCheckSum64 ( - IN CONST UINT64 *Buffer, - IN UINTN Length + IN CONST UINT64 *Buffer, + IN UINTN Length ); /** @@ -4587,9 +4498,9 @@ CalculateCheckSum64 ( **/ UINT32 EFIAPI -CalculateCrc32( - IN VOID *Buffer, - IN UINTN Length +CalculateCrc32 ( + IN VOID *Buffer, + IN UINTN Length ); // @@ -4610,7 +4521,6 @@ VOID IN VOID *Context2 OPTIONAL ); - /** Used to serialize load and store operations. @@ -4624,7 +4534,6 @@ MemoryFence ( VOID ); - /** Saves the current CPU context that can be restored with a call to LongJump() and returns 0. @@ -4653,7 +4562,6 @@ SetJump ( OUT BASE_LIBRARY_JUMP_BUFFER *JumpBuffer ); - /** Restores the CPU context that was saved with SetJump(). @@ -4677,7 +4585,6 @@ LongJump ( IN UINTN Value ); - /** Enables CPU interrupts. @@ -4688,7 +4595,6 @@ EnableInterrupts ( VOID ); - /** Disables CPU interrupts. @@ -4699,7 +4605,6 @@ DisableInterrupts ( VOID ); - /** Disables CPU interrupts and returns the interrupt state prior to the disable operation. @@ -4714,7 +4619,6 @@ SaveAndDisableInterrupts ( VOID ); - /** Enables CPU interrupts for the smallest window required to capture any pending interrupts. @@ -4726,7 +4630,6 @@ EnableDisableInterrupts ( VOID ); - /** Retrieves the current CPU interrupt state. @@ -4743,7 +4646,6 @@ GetInterruptState ( VOID ); - /** Set the current CPU interrupt state. @@ -4761,10 +4663,9 @@ GetInterruptState ( BOOLEAN EFIAPI SetInterruptState ( - IN BOOLEAN InterruptState + IN BOOLEAN InterruptState ); - /** Requests CPU to pause for a short period of time. @@ -4778,7 +4679,6 @@ CpuPause ( VOID ); - /** Transfers control to a function starting with a new stack. @@ -4818,7 +4718,6 @@ SwitchStack ( ... ); - /** Generates a breakpoint on the CPU. @@ -4832,7 +4731,6 @@ CpuBreakpoint ( VOID ); - /** Executes an infinite loop. @@ -4848,7 +4746,6 @@ CpuDeadLoop ( VOID ); - /** Uses as a barrier to stop speculative execution. @@ -4874,14 +4771,14 @@ typedef enum { // // PVALIDATE Return Code. // -#define PVALIDATE_RET_SUCCESS 0 -#define PVALIDATE_RET_FAIL_INPUT 1 -#define PVALIDATE_RET_SIZE_MISMATCH 6 +#define PVALIDATE_RET_SUCCESS 0 +#define PVALIDATE_RET_FAIL_INPUT 1 +#define PVALIDATE_RET_SIZE_MISMATCH 6 // // The PVALIDATE instruction did not make any changes to the RMP entry. // -#define PVALIDATE_RET_NO_RMPUPDATE 255 +#define PVALIDATE_RET_NO_RMPUPDATE 255 /** Execute a PVALIDATE instruction to validate or to rescinds validation of a guest @@ -4906,9 +4803,9 @@ typedef enum { UINT32 EFIAPI AsmPvalidate ( - IN PVALIDATE_PAGE_SIZE PageSize, - IN BOOLEAN Validate, - IN PHYSICAL_ADDRESS Address + IN PVALIDATE_PAGE_SIZE PageSize, + IN BOOLEAN Validate, + IN PHYSICAL_ADDRESS Address ); // @@ -4941,12 +4838,12 @@ AsmPvalidate ( UINT32 EFIAPI AsmRmpAdjust ( - IN UINT64 Rax, - IN UINT64 Rcx, - IN UINT64 Rdx + IN UINT64 Rax, + IN UINT64 Rcx, + IN UINT64 Rdx ); -#endif +#endif #if defined (MDE_CPU_IA32) || defined (MDE_CPU_X64) /// @@ -4955,21 +4852,21 @@ AsmRmpAdjust ( /// typedef union { struct { - UINT32 CF:1; ///< Carry Flag. - UINT32 Reserved_0:1; ///< Reserved. - UINT32 PF:1; ///< Parity Flag. - UINT32 Reserved_1:1; ///< Reserved. - UINT32 AF:1; ///< Auxiliary Carry Flag. - UINT32 Reserved_2:1; ///< Reserved. - UINT32 ZF:1; ///< Zero Flag. - UINT32 SF:1; ///< Sign Flag. - UINT32 TF:1; ///< Trap Flag. - UINT32 IF:1; ///< Interrupt Enable Flag. - UINT32 DF:1; ///< Direction Flag. - UINT32 OF:1; ///< Overflow Flag. - UINT32 IOPL:2; ///< I/O Privilege Level. - UINT32 NT:1; ///< Nested Task. - UINT32 Reserved_3:1; ///< Reserved. + UINT32 CF : 1; ///< Carry Flag. + UINT32 Reserved_0 : 1; ///< Reserved. + UINT32 PF : 1; ///< Parity Flag. + UINT32 Reserved_1 : 1; ///< Reserved. + UINT32 AF : 1; ///< Auxiliary Carry Flag. + UINT32 Reserved_2 : 1; ///< Reserved. + UINT32 ZF : 1; ///< Zero Flag. + UINT32 SF : 1; ///< Sign Flag. + UINT32 TF : 1; ///< Trap Flag. + UINT32 IF : 1; ///< Interrupt Enable Flag. + UINT32 DF : 1; ///< Direction Flag. + UINT32 OF : 1; ///< Overflow Flag. + UINT32 IOPL : 2; ///< I/O Privilege Level. + UINT32 NT : 1; ///< Nested Task. + UINT32 Reserved_3 : 1; ///< Reserved. } Bits; UINT16 Uint16; } IA32_FLAGS16; @@ -4981,30 +4878,30 @@ typedef union { /// typedef union { struct { - UINT32 CF:1; ///< Carry Flag. - UINT32 Reserved_0:1; ///< Reserved. - UINT32 PF:1; ///< Parity Flag. - UINT32 Reserved_1:1; ///< Reserved. - UINT32 AF:1; ///< Auxiliary Carry Flag. - UINT32 Reserved_2:1; ///< Reserved. - UINT32 ZF:1; ///< Zero Flag. - UINT32 SF:1; ///< Sign Flag. - UINT32 TF:1; ///< Trap Flag. - UINT32 IF:1; ///< Interrupt Enable Flag. - UINT32 DF:1; ///< Direction Flag. - UINT32 OF:1; ///< Overflow Flag. - UINT32 IOPL:2; ///< I/O Privilege Level. - UINT32 NT:1; ///< Nested Task. - UINT32 Reserved_3:1; ///< Reserved. - UINT32 RF:1; ///< Resume Flag. - UINT32 VM:1; ///< Virtual 8086 Mode. - UINT32 AC:1; ///< Alignment Check. - UINT32 VIF:1; ///< Virtual Interrupt Flag. - UINT32 VIP:1; ///< Virtual Interrupt Pending. - UINT32 ID:1; ///< ID Flag. - UINT32 Reserved_4:10; ///< Reserved. + UINT32 CF : 1; ///< Carry Flag. + UINT32 Reserved_0 : 1; ///< Reserved. + UINT32 PF : 1; ///< Parity Flag. + UINT32 Reserved_1 : 1; ///< Reserved. + UINT32 AF : 1; ///< Auxiliary Carry Flag. + UINT32 Reserved_2 : 1; ///< Reserved. + UINT32 ZF : 1; ///< Zero Flag. + UINT32 SF : 1; ///< Sign Flag. + UINT32 TF : 1; ///< Trap Flag. + UINT32 IF : 1; ///< Interrupt Enable Flag. + UINT32 DF : 1; ///< Direction Flag. + UINT32 OF : 1; ///< Overflow Flag. + UINT32 IOPL : 2; ///< I/O Privilege Level. + UINT32 NT : 1; ///< Nested Task. + UINT32 Reserved_3 : 1; ///< Reserved. + UINT32 RF : 1; ///< Resume Flag. + UINT32 VM : 1; ///< Virtual 8086 Mode. + UINT32 AC : 1; ///< Alignment Check. + UINT32 VIF : 1; ///< Virtual Interrupt Flag. + UINT32 VIP : 1; ///< Virtual Interrupt Pending. + UINT32 ID : 1; ///< ID Flag. + UINT32 Reserved_4 : 10; ///< Reserved. } Bits; - UINTN UintN; + UINTN UintN; } IA32_EFLAGS32; /// @@ -5014,22 +4911,22 @@ typedef union { /// typedef union { struct { - UINT32 PE:1; ///< Protection Enable. - UINT32 MP:1; ///< Monitor Coprocessor. - UINT32 EM:1; ///< Emulation. - UINT32 TS:1; ///< Task Switched. - UINT32 ET:1; ///< Extension Type. - UINT32 NE:1; ///< Numeric Error. - UINT32 Reserved_0:10; ///< Reserved. - UINT32 WP:1; ///< Write Protect. - UINT32 Reserved_1:1; ///< Reserved. - UINT32 AM:1; ///< Alignment Mask. - UINT32 Reserved_2:10; ///< Reserved. - UINT32 NW:1; ///< Mot Write-through. - UINT32 CD:1; ///< Cache Disable. - UINT32 PG:1; ///< Paging. + UINT32 PE : 1; ///< Protection Enable. + UINT32 MP : 1; ///< Monitor Coprocessor. + UINT32 EM : 1; ///< Emulation. + UINT32 TS : 1; ///< Task Switched. + UINT32 ET : 1; ///< Extension Type. + UINT32 NE : 1; ///< Numeric Error. + UINT32 Reserved_0 : 10; ///< Reserved. + UINT32 WP : 1; ///< Write Protect. + UINT32 Reserved_1 : 1; ///< Reserved. + UINT32 AM : 1; ///< Alignment Mask. + UINT32 Reserved_2 : 10; ///< Reserved. + UINT32 NW : 1; ///< Mot Write-through. + UINT32 CD : 1; ///< Cache Disable. + UINT32 PG : 1; ///< Paging. } Bits; - UINTN UintN; + UINTN UintN; } IA32_CR0; /// @@ -5039,36 +4936,36 @@ typedef union { /// typedef union { struct { - UINT32 VME:1; ///< Virtual-8086 Mode Extensions. - UINT32 PVI:1; ///< Protected-Mode Virtual Interrupts. - UINT32 TSD:1; ///< Time Stamp Disable. - UINT32 DE:1; ///< Debugging Extensions. - UINT32 PSE:1; ///< Page Size Extensions. - UINT32 PAE:1; ///< Physical Address Extension. - UINT32 MCE:1; ///< Machine Check Enable. - UINT32 PGE:1; ///< Page Global Enable. - UINT32 PCE:1; ///< Performance Monitoring Counter - ///< Enable. - UINT32 OSFXSR:1; ///< Operating System Support for - ///< FXSAVE and FXRSTOR instructions - UINT32 OSXMMEXCPT:1; ///< Operating System Support for - ///< Unmasked SIMD Floating Point - ///< Exceptions. - UINT32 UMIP:1; ///< User-Mode Instruction Prevention. - UINT32 LA57:1; ///< Linear Address 57bit. - UINT32 VMXE:1; ///< VMX Enable. - UINT32 SMXE:1; ///< SMX Enable. - UINT32 Reserved_3:1; ///< Reserved. - UINT32 FSGSBASE:1; ///< FSGSBASE Enable. - UINT32 PCIDE:1; ///< PCID Enable. - UINT32 OSXSAVE:1; ///< XSAVE and Processor Extended States Enable. - UINT32 Reserved_4:1; ///< Reserved. - UINT32 SMEP:1; ///< SMEP Enable. - UINT32 SMAP:1; ///< SMAP Enable. - UINT32 PKE:1; ///< Protection-Key Enable. - UINT32 Reserved_5:9; ///< Reserved. + UINT32 VME : 1; ///< Virtual-8086 Mode Extensions. + UINT32 PVI : 1; ///< Protected-Mode Virtual Interrupts. + UINT32 TSD : 1; ///< Time Stamp Disable. + UINT32 DE : 1; ///< Debugging Extensions. + UINT32 PSE : 1; ///< Page Size Extensions. + UINT32 PAE : 1; ///< Physical Address Extension. + UINT32 MCE : 1; ///< Machine Check Enable. + UINT32 PGE : 1; ///< Page Global Enable. + UINT32 PCE : 1; ///< Performance Monitoring Counter + ///< Enable. + UINT32 OSFXSR : 1; ///< Operating System Support for + ///< FXSAVE and FXRSTOR instructions + UINT32 OSXMMEXCPT : 1; ///< Operating System Support for + ///< Unmasked SIMD Floating Point + ///< Exceptions. + UINT32 UMIP : 1; ///< User-Mode Instruction Prevention. + UINT32 LA57 : 1; ///< Linear Address 57bit. + UINT32 VMXE : 1; ///< VMX Enable. + UINT32 SMXE : 1; ///< SMX Enable. + UINT32 Reserved_3 : 1; ///< Reserved. + UINT32 FSGSBASE : 1; ///< FSGSBASE Enable. + UINT32 PCIDE : 1; ///< PCID Enable. + UINT32 OSXSAVE : 1; ///< XSAVE and Processor Extended States Enable. + UINT32 Reserved_4 : 1; ///< Reserved. + UINT32 SMEP : 1; ///< SMEP Enable. + UINT32 SMAP : 1; ///< SMAP Enable. + UINT32 PKE : 1; ///< Protection-Key Enable. + UINT32 Reserved_5 : 9; ///< Reserved. } Bits; - UINTN UintN; + UINTN UintN; } IA32_CR4; /// @@ -5076,32 +4973,32 @@ typedef union { /// typedef union { struct { - UINT32 LimitLow:16; - UINT32 BaseLow:16; - UINT32 BaseMid:8; - UINT32 Type:4; - UINT32 S:1; - UINT32 DPL:2; - UINT32 P:1; - UINT32 LimitHigh:4; - UINT32 AVL:1; - UINT32 L:1; - UINT32 DB:1; - UINT32 G:1; - UINT32 BaseHigh:8; + UINT32 LimitLow : 16; + UINT32 BaseLow : 16; + UINT32 BaseMid : 8; + UINT32 Type : 4; + UINT32 S : 1; + UINT32 DPL : 2; + UINT32 P : 1; + UINT32 LimitHigh : 4; + UINT32 AVL : 1; + UINT32 L : 1; + UINT32 DB : 1; + UINT32 G : 1; + UINT32 BaseHigh : 8; } Bits; - UINT64 Uint64; + UINT64 Uint64; } IA32_SEGMENT_DESCRIPTOR; /// /// Byte packed structure for an IDTR, GDTR, LDTR descriptor. /// -#pragma pack (1) + #pragma pack (1) typedef struct { - UINT16 Limit; - UINTN Base; + UINT16 Limit; + UINTN Base; } IA32_DESCRIPTOR; -#pragma pack () + #pragma pack () #define IA32_IDT_GATE_TYPE_TASK 0x85 #define IA32_IDT_GATE_TYPE_INTERRUPT_16 0x86 @@ -5109,25 +5006,25 @@ typedef struct { #define IA32_IDT_GATE_TYPE_INTERRUPT_32 0x8E #define IA32_IDT_GATE_TYPE_TRAP_32 0x8F -#define IA32_GDT_TYPE_TSS 0x9 -#define IA32_GDT_ALIGNMENT 8 +#define IA32_GDT_TYPE_TSS 0x9 +#define IA32_GDT_ALIGNMENT 8 -#if defined (MDE_CPU_IA32) + #if defined (MDE_CPU_IA32) /// /// Byte packed structure for an IA-32 Interrupt Gate Descriptor. /// typedef union { struct { - UINT32 OffsetLow:16; ///< Offset bits 15..0. - UINT32 Selector:16; ///< Selector. - UINT32 Reserved_0:8; ///< Reserved. - UINT32 GateType:8; ///< Gate Type. See #defines above. - UINT32 OffsetHigh:16; ///< Offset bits 31..16. + UINT32 OffsetLow : 16; ///< Offset bits 15..0. + UINT32 Selector : 16; ///< Selector. + UINT32 Reserved_0 : 8; ///< Reserved. + UINT32 GateType : 8; ///< Gate Type. See #defines above. + UINT32 OffsetHigh : 16; ///< Offset bits 31..16. } Bits; - UINT64 Uint64; + UINT64 Uint64; } IA32_IDT_GATE_DESCRIPTOR; -#pragma pack (1) + #pragma pack (1) // // IA32 Task-State Segment Definition // @@ -5174,46 +5071,46 @@ typedef struct { typedef union { struct { - UINT32 LimitLow:16; ///< Segment Limit 15..00 - UINT32 BaseLow:16; ///< Base Address 15..00 - UINT32 BaseMid:8; ///< Base Address 23..16 - UINT32 Type:4; ///< Type (1 0 B 1) - UINT32 Reserved_43:1; ///< 0 - UINT32 DPL:2; ///< Descriptor Privilege Level - UINT32 P:1; ///< Segment Present - UINT32 LimitHigh:4; ///< Segment Limit 19..16 - UINT32 AVL:1; ///< Available for use by system software - UINT32 Reserved_52:2; ///< 0 0 - UINT32 G:1; ///< Granularity - UINT32 BaseHigh:8; ///< Base Address 31..24 + UINT32 LimitLow : 16; ///< Segment Limit 15..00 + UINT32 BaseLow : 16; ///< Base Address 15..00 + UINT32 BaseMid : 8; ///< Base Address 23..16 + UINT32 Type : 4; ///< Type (1 0 B 1) + UINT32 Reserved_43 : 1; ///< 0 + UINT32 DPL : 2; ///< Descriptor Privilege Level + UINT32 P : 1; ///< Segment Present + UINT32 LimitHigh : 4; ///< Segment Limit 19..16 + UINT32 AVL : 1; ///< Available for use by system software + UINT32 Reserved_52 : 2; ///< 0 0 + UINT32 G : 1; ///< Granularity + UINT32 BaseHigh : 8; ///< Base Address 31..24 } Bits; - UINT64 Uint64; + UINT64 Uint64; } IA32_TSS_DESCRIPTOR; -#pragma pack () + #pragma pack () -#endif // defined (MDE_CPU_IA32) + #endif // defined (MDE_CPU_IA32) -#if defined (MDE_CPU_X64) + #if defined (MDE_CPU_X64) /// /// Byte packed structure for an x64 Interrupt Gate Descriptor. /// typedef union { struct { - UINT32 OffsetLow:16; ///< Offset bits 15..0. - UINT32 Selector:16; ///< Selector. - UINT32 Reserved_0:8; ///< Reserved. - UINT32 GateType:8; ///< Gate Type. See #defines above. - UINT32 OffsetHigh:16; ///< Offset bits 31..16. - UINT32 OffsetUpper:32; ///< Offset bits 63..32. - UINT32 Reserved_1:32; ///< Reserved. + UINT32 OffsetLow : 16; ///< Offset bits 15..0. + UINT32 Selector : 16; ///< Selector. + UINT32 Reserved_0 : 8; ///< Reserved. + UINT32 GateType : 8; ///< Gate Type. See #defines above. + UINT32 OffsetHigh : 16; ///< Offset bits 31..16. + UINT32 OffsetUpper : 32; ///< Offset bits 63..32. + UINT32 Reserved_1 : 32; ///< Reserved. } Bits; struct { - UINT64 Uint64; - UINT64 Uint64_1; + UINT64 Uint64; + UINT64 Uint64_1; } Uint128; } IA32_IDT_GATE_DESCRIPTOR; -#pragma pack (1) + #pragma pack (1) // // IA32 Task-State Segment Definition // @@ -5231,116 +5128,116 @@ typedef struct { typedef union { struct { - UINT32 LimitLow:16; ///< Segment Limit 15..00 - UINT32 BaseLow:16; ///< Base Address 15..00 - UINT32 BaseMidl:8; ///< Base Address 23..16 - UINT32 Type:4; ///< Type (1 0 B 1) - UINT32 Reserved_43:1; ///< 0 - UINT32 DPL:2; ///< Descriptor Privilege Level - UINT32 P:1; ///< Segment Present - UINT32 LimitHigh:4; ///< Segment Limit 19..16 - UINT32 AVL:1; ///< Available for use by system software - UINT32 Reserved_52:2; ///< 0 0 - UINT32 G:1; ///< Granularity - UINT32 BaseMidh:8; ///< Base Address 31..24 - UINT32 BaseHigh:32; ///< Base Address 63..32 - UINT32 Reserved_96:32; ///< Reserved + UINT32 LimitLow : 16; ///< Segment Limit 15..00 + UINT32 BaseLow : 16; ///< Base Address 15..00 + UINT32 BaseMidl : 8; ///< Base Address 23..16 + UINT32 Type : 4; ///< Type (1 0 B 1) + UINT32 Reserved_43 : 1; ///< 0 + UINT32 DPL : 2; ///< Descriptor Privilege Level + UINT32 P : 1; ///< Segment Present + UINT32 LimitHigh : 4; ///< Segment Limit 19..16 + UINT32 AVL : 1; ///< Available for use by system software + UINT32 Reserved_52 : 2; ///< 0 0 + UINT32 G : 1; ///< Granularity + UINT32 BaseMidh : 8; ///< Base Address 31..24 + UINT32 BaseHigh : 32; ///< Base Address 63..32 + UINT32 Reserved_96 : 32; ///< Reserved } Bits; struct { - UINT64 Uint64; - UINT64 Uint64_1; + UINT64 Uint64; + UINT64 Uint64_1; } Uint128; } IA32_TSS_DESCRIPTOR; -#pragma pack () + #pragma pack () -#endif // defined (MDE_CPU_X64) + #endif // defined (MDE_CPU_X64) /// /// Byte packed structure for an FP/SSE/SSE2 context. /// typedef struct { - UINT8 Buffer[512]; + UINT8 Buffer[512]; } IA32_FX_BUFFER; /// /// Structures for the 16-bit real mode thunks. /// typedef struct { - UINT32 Reserved1; - UINT32 Reserved2; - UINT32 Reserved3; - UINT32 Reserved4; - UINT8 BL; - UINT8 BH; - UINT16 Reserved5; - UINT8 DL; - UINT8 DH; - UINT16 Reserved6; - UINT8 CL; - UINT8 CH; - UINT16 Reserved7; - UINT8 AL; - UINT8 AH; - UINT16 Reserved8; + UINT32 Reserved1; + UINT32 Reserved2; + UINT32 Reserved3; + UINT32 Reserved4; + UINT8 BL; + UINT8 BH; + UINT16 Reserved5; + UINT8 DL; + UINT8 DH; + UINT16 Reserved6; + UINT8 CL; + UINT8 CH; + UINT16 Reserved7; + UINT8 AL; + UINT8 AH; + UINT16 Reserved8; } IA32_BYTE_REGS; typedef struct { - UINT16 DI; - UINT16 Reserved1; - UINT16 SI; - UINT16 Reserved2; - UINT16 BP; - UINT16 Reserved3; - UINT16 SP; - UINT16 Reserved4; - UINT16 BX; - UINT16 Reserved5; - UINT16 DX; - UINT16 Reserved6; - UINT16 CX; - UINT16 Reserved7; - UINT16 AX; - UINT16 Reserved8; + UINT16 DI; + UINT16 Reserved1; + UINT16 SI; + UINT16 Reserved2; + UINT16 BP; + UINT16 Reserved3; + UINT16 SP; + UINT16 Reserved4; + UINT16 BX; + UINT16 Reserved5; + UINT16 DX; + UINT16 Reserved6; + UINT16 CX; + UINT16 Reserved7; + UINT16 AX; + UINT16 Reserved8; } IA32_WORD_REGS; typedef struct { - UINT32 EDI; - UINT32 ESI; - UINT32 EBP; - UINT32 ESP; - UINT32 EBX; - UINT32 EDX; - UINT32 ECX; - UINT32 EAX; - UINT16 DS; - UINT16 ES; - UINT16 FS; - UINT16 GS; - IA32_EFLAGS32 EFLAGS; - UINT32 Eip; - UINT16 CS; - UINT16 SS; + UINT32 EDI; + UINT32 ESI; + UINT32 EBP; + UINT32 ESP; + UINT32 EBX; + UINT32 EDX; + UINT32 ECX; + UINT32 EAX; + UINT16 DS; + UINT16 ES; + UINT16 FS; + UINT16 GS; + IA32_EFLAGS32 EFLAGS; + UINT32 Eip; + UINT16 CS; + UINT16 SS; } IA32_DWORD_REGS; typedef union { - IA32_DWORD_REGS E; - IA32_WORD_REGS X; - IA32_BYTE_REGS H; + IA32_DWORD_REGS E; + IA32_WORD_REGS X; + IA32_BYTE_REGS H; } IA32_REGISTER_SET; /// /// Byte packed structure for an 16-bit real mode thunks. /// typedef struct { - IA32_REGISTER_SET *RealModeState; - VOID *RealModeBuffer; - UINT32 RealModeBufferSize; - UINT32 ThunkAttributes; + IA32_REGISTER_SET *RealModeState; + VOID *RealModeBuffer; + UINT32 RealModeBufferSize; + UINT32 ThunkAttributes; } THUNK_CONTEXT; -#define THUNK_ATTRIBUTE_BIG_REAL_MODE 0x00000001 -#define THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 0x00000002 -#define THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL 0x00000004 +#define THUNK_ATTRIBUTE_BIG_REAL_MODE 0x00000001 +#define THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 0x00000002 +#define THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL 0x00000004 /// /// Type definition for representing labels in NASM source code that allow for @@ -5354,7 +5251,9 @@ typedef struct { /// edk2 coding style for function (or pointer-to-function) typedefs. The VOID /// return type and the VOID argument list are merely artifacts. /// -typedef VOID (X86_ASSEMBLY_PATCH_LABEL) (VOID); +typedef VOID (X86_ASSEMBLY_PATCH_LABEL) ( + VOID + ); /** Retrieves CPUID information. @@ -5384,14 +5283,13 @@ typedef VOID (X86_ASSEMBLY_PATCH_LABEL) (VOID); UINT32 EFIAPI AsmCpuid ( - IN UINT32 Index, - OUT UINT32 *Eax OPTIONAL, - OUT UINT32 *Ebx OPTIONAL, - OUT UINT32 *Ecx OPTIONAL, - OUT UINT32 *Edx OPTIONAL + IN UINT32 Index, + OUT UINT32 *Eax OPTIONAL, + OUT UINT32 *Ebx OPTIONAL, + OUT UINT32 *Ecx OPTIONAL, + OUT UINT32 *Edx OPTIONAL ); - /** Retrieves CPUID information using an extended leaf identifier. @@ -5427,15 +5325,14 @@ AsmCpuid ( UINT32 EFIAPI AsmCpuidEx ( - IN UINT32 Index, - IN UINT32 SubIndex, - OUT UINT32 *Eax OPTIONAL, - OUT UINT32 *Ebx OPTIONAL, - OUT UINT32 *Ecx OPTIONAL, - OUT UINT32 *Edx OPTIONAL + IN UINT32 Index, + IN UINT32 SubIndex, + OUT UINT32 *Eax OPTIONAL, + OUT UINT32 *Ebx OPTIONAL, + OUT UINT32 *Ecx OPTIONAL, + OUT UINT32 *Edx OPTIONAL ); - /** Set CD bit and clear NW bit of CR0 followed by a WBINVD. @@ -5449,7 +5346,6 @@ AsmDisableCache ( VOID ); - /** Perform a WBINVD and clear both the CD and NW bits of CR0. @@ -5463,7 +5359,6 @@ AsmEnableCache ( VOID ); - /** Returns the lower 32-bits of a Machine Specific Register(MSR). @@ -5481,10 +5376,9 @@ AsmEnableCache ( UINT32 EFIAPI AsmReadMsr32 ( - IN UINT32 Index + IN UINT32 Index ); - /** Writes a 32-bit value to a Machine Specific Register(MSR), and returns the value. The upper 32-bits of the MSR are set to zero. @@ -5505,11 +5399,10 @@ AsmReadMsr32 ( UINT32 EFIAPI AsmWriteMsr32 ( - IN UINT32 Index, - IN UINT32 Value + IN UINT32 Index, + IN UINT32 Value ); - /** Reads a 64-bit MSR, performs a bitwise OR on the lower 32-bits, and writes the result back to the 64-bit MSR. @@ -5532,11 +5425,10 @@ AsmWriteMsr32 ( UINT32 EFIAPI AsmMsrOr32 ( - IN UINT32 Index, - IN UINT32 OrData + IN UINT32 Index, + IN UINT32 OrData ); - /** Reads a 64-bit MSR, performs a bitwise AND on the lower 32-bits, and writes the result back to the 64-bit MSR. @@ -5559,11 +5451,10 @@ AsmMsrOr32 ( UINT32 EFIAPI AsmMsrAnd32 ( - IN UINT32 Index, - IN UINT32 AndData + IN UINT32 Index, + IN UINT32 AndData ); - /** Reads a 64-bit MSR, performs a bitwise AND followed by a bitwise OR on the lower 32-bits, and writes the result back to the 64-bit MSR. @@ -5589,12 +5480,11 @@ AsmMsrAnd32 ( UINT32 EFIAPI AsmMsrAndThenOr32 ( - IN UINT32 Index, - IN UINT32 AndData, - IN UINT32 OrData + IN UINT32 Index, + IN UINT32 AndData, + IN UINT32 OrData ); - /** Reads a bit field of an MSR. @@ -5620,12 +5510,11 @@ AsmMsrAndThenOr32 ( UINT32 EFIAPI AsmMsrBitFieldRead32 ( - IN UINT32 Index, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT32 Index, + IN UINTN StartBit, + IN UINTN EndBit ); - /** Writes a bit field to an MSR. @@ -5654,13 +5543,12 @@ AsmMsrBitFieldRead32 ( UINT32 EFIAPI AsmMsrBitFieldWrite32 ( - IN UINT32 Index, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINT32 Index, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ); - /** Reads a bit field in a 64-bit MSR, performs a bitwise OR, and writes the result back to the bit field in the 64-bit MSR. @@ -5691,13 +5579,12 @@ AsmMsrBitFieldWrite32 ( UINT32 EFIAPI AsmMsrBitFieldOr32 ( - IN UINT32 Index, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINT32 Index, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ); - /** Reads a bit field in a 64-bit MSR, performs a bitwise AND, and writes the result back to the bit field in the 64-bit MSR. @@ -5728,13 +5615,12 @@ AsmMsrBitFieldOr32 ( UINT32 EFIAPI AsmMsrBitFieldAnd32 ( - IN UINT32 Index, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINT32 Index, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ); - /** Reads a bit field in a 64-bit MSR, performs a bitwise AND followed by a bitwise OR, and writes the result back to the bit field in the @@ -5769,14 +5655,13 @@ AsmMsrBitFieldAnd32 ( UINT32 EFIAPI AsmMsrBitFieldAndThenOr32 ( - IN UINT32 Index, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINT32 Index, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ); - /** Returns a 64-bit Machine Specific Register(MSR). @@ -5794,10 +5679,9 @@ AsmMsrBitFieldAndThenOr32 ( UINT64 EFIAPI AsmReadMsr64 ( - IN UINT32 Index + IN UINT32 Index ); - /** Writes a 64-bit value to a Machine Specific Register(MSR), and returns the value. @@ -5818,11 +5702,10 @@ AsmReadMsr64 ( UINT64 EFIAPI AsmWriteMsr64 ( - IN UINT32 Index, - IN UINT64 Value + IN UINT32 Index, + IN UINT64 Value ); - /** Reads a 64-bit MSR, performs a bitwise OR, and writes the result back to the 64-bit MSR. @@ -5844,11 +5727,10 @@ AsmWriteMsr64 ( UINT64 EFIAPI AsmMsrOr64 ( - IN UINT32 Index, - IN UINT64 OrData + IN UINT32 Index, + IN UINT64 OrData ); - /** Reads a 64-bit MSR, performs a bitwise AND, and writes the result back to the 64-bit MSR. @@ -5870,11 +5752,10 @@ AsmMsrOr64 ( UINT64 EFIAPI AsmMsrAnd64 ( - IN UINT32 Index, - IN UINT64 AndData + IN UINT32 Index, + IN UINT64 AndData ); - /** Reads a 64-bit MSR, performs a bitwise AND followed by a bitwise OR, and writes the result back to the 64-bit MSR. @@ -5899,12 +5780,11 @@ AsmMsrAnd64 ( UINT64 EFIAPI AsmMsrAndThenOr64 ( - IN UINT32 Index, - IN UINT64 AndData, - IN UINT64 OrData + IN UINT32 Index, + IN UINT64 AndData, + IN UINT64 OrData ); - /** Reads a bit field of an MSR. @@ -5930,12 +5810,11 @@ AsmMsrAndThenOr64 ( UINT64 EFIAPI AsmMsrBitFieldRead64 ( - IN UINT32 Index, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT32 Index, + IN UINTN StartBit, + IN UINTN EndBit ); - /** Writes a bit field to an MSR. @@ -5963,13 +5842,12 @@ AsmMsrBitFieldRead64 ( UINT64 EFIAPI AsmMsrBitFieldWrite64 ( - IN UINT32 Index, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 Value + IN UINT32 Index, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 Value ); - /** Reads a bit field in a 64-bit MSR, performs a bitwise OR, and writes the result back to the bit field in the 64-bit MSR. @@ -6000,13 +5878,12 @@ AsmMsrBitFieldWrite64 ( UINT64 EFIAPI AsmMsrBitFieldOr64 ( - IN UINT32 Index, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 OrData + IN UINT32 Index, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 OrData ); - /** Reads a bit field in a 64-bit MSR, performs a bitwise AND, and writes the result back to the bit field in the 64-bit MSR. @@ -6037,13 +5914,12 @@ AsmMsrBitFieldOr64 ( UINT64 EFIAPI AsmMsrBitFieldAnd64 ( - IN UINT32 Index, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData + IN UINT32 Index, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData ); - /** Reads a bit field in a 64-bit MSR, performs a bitwise AND followed by a bitwise OR, and writes the result back to the bit field in the @@ -6077,14 +5953,13 @@ AsmMsrBitFieldAnd64 ( UINT64 EFIAPI AsmMsrBitFieldAndThenOr64 ( - IN UINT32 Index, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData, - IN UINT64 OrData + IN UINT32 Index, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData, + IN UINT64 OrData ); - /** Reads the current value of the EFLAGS register. @@ -6101,7 +5976,6 @@ AsmReadEflags ( VOID ); - /** Reads the current value of the Control Register 0 (CR0). @@ -6118,7 +5992,6 @@ AsmReadCr0 ( VOID ); - /** Reads the current value of the Control Register 2 (CR2). @@ -6135,7 +6008,6 @@ AsmReadCr2 ( VOID ); - /** Reads the current value of the Control Register 3 (CR3). @@ -6152,7 +6024,6 @@ AsmReadCr3 ( VOID ); - /** Reads the current value of the Control Register 4 (CR4). @@ -6169,7 +6040,6 @@ AsmReadCr4 ( VOID ); - /** Writes a value to Control Register 0 (CR0). @@ -6187,7 +6057,6 @@ AsmWriteCr0 ( UINTN Cr0 ); - /** Writes a value to Control Register 2 (CR2). @@ -6205,7 +6074,6 @@ AsmWriteCr2 ( UINTN Cr2 ); - /** Writes a value to Control Register 3 (CR3). @@ -6223,7 +6091,6 @@ AsmWriteCr3 ( UINTN Cr3 ); - /** Writes a value to Control Register 4 (CR4). @@ -6241,7 +6108,6 @@ AsmWriteCr4 ( UINTN Cr4 ); - /** Reads the current value of Debug Register 0 (DR0). @@ -6258,7 +6124,6 @@ AsmReadDr0 ( VOID ); - /** Reads the current value of Debug Register 1 (DR1). @@ -6275,7 +6140,6 @@ AsmReadDr1 ( VOID ); - /** Reads the current value of Debug Register 2 (DR2). @@ -6292,7 +6156,6 @@ AsmReadDr2 ( VOID ); - /** Reads the current value of Debug Register 3 (DR3). @@ -6309,7 +6172,6 @@ AsmReadDr3 ( VOID ); - /** Reads the current value of Debug Register 4 (DR4). @@ -6326,7 +6188,6 @@ AsmReadDr4 ( VOID ); - /** Reads the current value of Debug Register 5 (DR5). @@ -6343,7 +6204,6 @@ AsmReadDr5 ( VOID ); - /** Reads the current value of Debug Register 6 (DR6). @@ -6360,7 +6220,6 @@ AsmReadDr6 ( VOID ); - /** Reads the current value of Debug Register 7 (DR7). @@ -6377,7 +6236,6 @@ AsmReadDr7 ( VOID ); - /** Writes a value to Debug Register 0 (DR0). @@ -6395,7 +6253,6 @@ AsmWriteDr0 ( UINTN Dr0 ); - /** Writes a value to Debug Register 1 (DR1). @@ -6413,7 +6270,6 @@ AsmWriteDr1 ( UINTN Dr1 ); - /** Writes a value to Debug Register 2 (DR2). @@ -6431,7 +6287,6 @@ AsmWriteDr2 ( UINTN Dr2 ); - /** Writes a value to Debug Register 3 (DR3). @@ -6449,7 +6304,6 @@ AsmWriteDr3 ( UINTN Dr3 ); - /** Writes a value to Debug Register 4 (DR4). @@ -6467,7 +6321,6 @@ AsmWriteDr4 ( UINTN Dr4 ); - /** Writes a value to Debug Register 5 (DR5). @@ -6485,7 +6338,6 @@ AsmWriteDr5 ( UINTN Dr5 ); - /** Writes a value to Debug Register 6 (DR6). @@ -6503,7 +6355,6 @@ AsmWriteDr6 ( UINTN Dr6 ); - /** Writes a value to Debug Register 7 (DR7). @@ -6521,7 +6372,6 @@ AsmWriteDr7 ( UINTN Dr7 ); - /** Reads the current value of Code Segment Register (CS). @@ -6537,7 +6387,6 @@ AsmReadCs ( VOID ); - /** Reads the current value of Data Segment Register (DS). @@ -6553,7 +6402,6 @@ AsmReadDs ( VOID ); - /** Reads the current value of Extra Segment Register (ES). @@ -6569,7 +6417,6 @@ AsmReadEs ( VOID ); - /** Reads the current value of FS Data Segment Register (FS). @@ -6585,7 +6432,6 @@ AsmReadFs ( VOID ); - /** Reads the current value of GS Data Segment Register (GS). @@ -6601,7 +6447,6 @@ AsmReadGs ( VOID ); - /** Reads the current value of Stack Segment Register (SS). @@ -6617,7 +6462,6 @@ AsmReadSs ( VOID ); - /** Reads the current value of Task Register (TR). @@ -6633,7 +6477,6 @@ AsmReadTr ( VOID ); - /** Reads the current Global Descriptor Table Register(GDTR) descriptor. @@ -6648,10 +6491,9 @@ AsmReadTr ( VOID EFIAPI AsmReadGdtr ( - OUT IA32_DESCRIPTOR *Gdtr + OUT IA32_DESCRIPTOR *Gdtr ); - /** Writes the current Global Descriptor Table Register (GDTR) descriptor. @@ -6666,10 +6508,9 @@ AsmReadGdtr ( VOID EFIAPI AsmWriteGdtr ( - IN CONST IA32_DESCRIPTOR *Gdtr + IN CONST IA32_DESCRIPTOR *Gdtr ); - /** Reads the current Interrupt Descriptor Table Register(IDTR) descriptor. @@ -6684,10 +6525,9 @@ AsmWriteGdtr ( VOID EFIAPI AsmReadIdtr ( - OUT IA32_DESCRIPTOR *Idtr + OUT IA32_DESCRIPTOR *Idtr ); - /** Writes the current Interrupt Descriptor Table Register(IDTR) descriptor. @@ -6702,10 +6542,9 @@ AsmReadIdtr ( VOID EFIAPI AsmWriteIdtr ( - IN CONST IA32_DESCRIPTOR *Idtr + IN CONST IA32_DESCRIPTOR *Idtr ); - /** Reads the current Local Descriptor Table Register(LDTR) selector. @@ -6721,7 +6560,6 @@ AsmReadLdtr ( VOID ); - /** Writes the current Local Descriptor Table Register (LDTR) selector. @@ -6734,10 +6572,9 @@ AsmReadLdtr ( VOID EFIAPI AsmWriteLdtr ( - IN UINT16 Ldtr + IN UINT16 Ldtr ); - /** Save the current floating point/SSE/SSE2 context to a buffer. @@ -6754,10 +6591,9 @@ AsmWriteLdtr ( VOID EFIAPI AsmFxSave ( - OUT IA32_FX_BUFFER *Buffer + OUT IA32_FX_BUFFER *Buffer ); - /** Restores the current floating point/SSE/SSE2 context from a buffer. @@ -6775,10 +6611,9 @@ AsmFxSave ( VOID EFIAPI AsmFxRestore ( - IN CONST IA32_FX_BUFFER *Buffer + IN CONST IA32_FX_BUFFER *Buffer ); - /** Reads the current value of 64-bit MMX Register #0 (MM0). @@ -6794,7 +6629,6 @@ AsmReadMm0 ( VOID ); - /** Reads the current value of 64-bit MMX Register #1 (MM1). @@ -6810,7 +6644,6 @@ AsmReadMm1 ( VOID ); - /** Reads the current value of 64-bit MMX Register #2 (MM2). @@ -6826,7 +6659,6 @@ AsmReadMm2 ( VOID ); - /** Reads the current value of 64-bit MMX Register #3 (MM3). @@ -6842,7 +6674,6 @@ AsmReadMm3 ( VOID ); - /** Reads the current value of 64-bit MMX Register #4 (MM4). @@ -6858,7 +6689,6 @@ AsmReadMm4 ( VOID ); - /** Reads the current value of 64-bit MMX Register #5 (MM5). @@ -6874,7 +6704,6 @@ AsmReadMm5 ( VOID ); - /** Reads the current value of 64-bit MMX Register #6 (MM6). @@ -6890,7 +6719,6 @@ AsmReadMm6 ( VOID ); - /** Reads the current value of 64-bit MMX Register #7 (MM7). @@ -6906,7 +6734,6 @@ AsmReadMm7 ( VOID ); - /** Writes the current value of 64-bit MMX Register #0 (MM0). @@ -6919,10 +6746,9 @@ AsmReadMm7 ( VOID EFIAPI AsmWriteMm0 ( - IN UINT64 Value + IN UINT64 Value ); - /** Writes the current value of 64-bit MMX Register #1 (MM1). @@ -6935,10 +6761,9 @@ AsmWriteMm0 ( VOID EFIAPI AsmWriteMm1 ( - IN UINT64 Value + IN UINT64 Value ); - /** Writes the current value of 64-bit MMX Register #2 (MM2). @@ -6951,10 +6776,9 @@ AsmWriteMm1 ( VOID EFIAPI AsmWriteMm2 ( - IN UINT64 Value + IN UINT64 Value ); - /** Writes the current value of 64-bit MMX Register #3 (MM3). @@ -6967,10 +6791,9 @@ AsmWriteMm2 ( VOID EFIAPI AsmWriteMm3 ( - IN UINT64 Value + IN UINT64 Value ); - /** Writes the current value of 64-bit MMX Register #4 (MM4). @@ -6983,10 +6806,9 @@ AsmWriteMm3 ( VOID EFIAPI AsmWriteMm4 ( - IN UINT64 Value + IN UINT64 Value ); - /** Writes the current value of 64-bit MMX Register #5 (MM5). @@ -6999,10 +6821,9 @@ AsmWriteMm4 ( VOID EFIAPI AsmWriteMm5 ( - IN UINT64 Value + IN UINT64 Value ); - /** Writes the current value of 64-bit MMX Register #6 (MM6). @@ -7015,10 +6836,9 @@ AsmWriteMm5 ( VOID EFIAPI AsmWriteMm6 ( - IN UINT64 Value + IN UINT64 Value ); - /** Writes the current value of 64-bit MMX Register #7 (MM7). @@ -7031,10 +6851,9 @@ AsmWriteMm6 ( VOID EFIAPI AsmWriteMm7 ( - IN UINT64 Value + IN UINT64 Value ); - /** Reads the current value of Time Stamp Counter (TSC). @@ -7050,7 +6869,6 @@ AsmReadTsc ( VOID ); - /** Reads the current value of a Performance Counter (PMC). @@ -7065,10 +6883,9 @@ AsmReadTsc ( UINT64 EFIAPI AsmReadPmc ( - IN UINT32 Index + IN UINT32 Index ); - /** Sets up a monitor buffer that is used by AsmMwait(). @@ -7088,12 +6905,11 @@ AsmReadPmc ( UINTN EFIAPI AsmMonitor ( - IN UINTN Eax, - IN UINTN Ecx, - IN UINTN Edx + IN UINTN Eax, + IN UINTN Ecx, + IN UINTN Edx ); - /** Executes an MWAIT instruction. @@ -7111,11 +6927,10 @@ AsmMonitor ( UINTN EFIAPI AsmMwait ( - IN UINTN Eax, - IN UINTN Ecx + IN UINTN Eax, + IN UINTN Ecx ); - /** Executes a WBINVD instruction. @@ -7129,7 +6944,6 @@ AsmWbinvd ( VOID ); - /** Executes a INVD instruction. @@ -7143,7 +6957,6 @@ AsmInvd ( VOID ); - /** Flushes a cache line from all the instruction and data caches within the coherency domain of the CPU. @@ -7162,10 +6975,9 @@ AsmInvd ( VOID * EFIAPI AsmFlushCacheLine ( - IN VOID *LinearAddress + IN VOID *LinearAddress ); - /** Enables the 32-bit paging mode on the CPU. @@ -7212,7 +7024,6 @@ AsmEnablePaging32 ( IN VOID *NewStack ); - /** Disables the 32-bit paging mode on the CPU. @@ -7256,7 +7067,6 @@ AsmDisablePaging32 ( IN VOID *NewStack ); - /** Enables the 64-bit paging mode on the CPU. @@ -7292,14 +7102,13 @@ AsmDisablePaging32 ( VOID EFIAPI AsmEnablePaging64 ( - IN UINT16 Cs, - IN UINT64 EntryPoint, - IN UINT64 Context1 OPTIONAL, - IN UINT64 Context2 OPTIONAL, - IN UINT64 NewStack + IN UINT16 Cs, + IN UINT64 EntryPoint, + IN UINT64 Context1 OPTIONAL, + IN UINT64 Context2 OPTIONAL, + IN UINT64 NewStack ); - /** Disables the 64-bit paging mode on the CPU. @@ -7333,14 +7142,13 @@ AsmEnablePaging64 ( VOID EFIAPI AsmDisablePaging64 ( - IN UINT16 Cs, - IN UINT32 EntryPoint, - IN UINT32 Context1 OPTIONAL, - IN UINT32 Context2 OPTIONAL, - IN UINT32 NewStack + IN UINT16 Cs, + IN UINT32 EntryPoint, + IN UINT32 Context1 OPTIONAL, + IN UINT32 Context2 OPTIONAL, + IN UINT32 NewStack ); - // // 16-bit thunking services // @@ -7369,11 +7177,10 @@ AsmDisablePaging64 ( VOID EFIAPI AsmGetThunk16Properties ( - OUT UINT32 *RealModeBufferSize, - OUT UINT32 *ExtraStackSize + OUT UINT32 *RealModeBufferSize, + OUT UINT32 *ExtraStackSize ); - /** Prepares all structures a code required to use AsmThunk16(). @@ -7391,10 +7198,9 @@ AsmGetThunk16Properties ( VOID EFIAPI AsmPrepareThunk16 ( - IN OUT THUNK_CONTEXT *ThunkContext + IN OUT THUNK_CONTEXT *ThunkContext ); - /** Transfers control to a 16-bit real mode entry point and returns the results. @@ -7451,10 +7257,9 @@ AsmPrepareThunk16 ( VOID EFIAPI AsmThunk16 ( - IN OUT THUNK_CONTEXT *ThunkContext + IN OUT THUNK_CONTEXT *ThunkContext ); - /** Prepares all structures and code for a 16-bit real mode thunk, transfers control to a 16-bit real mode entry point, and returns the results. @@ -7478,7 +7283,7 @@ AsmThunk16 ( VOID EFIAPI AsmPrepareAndThunk16 ( - IN OUT THUNK_CONTEXT *ThunkContext + IN OUT THUNK_CONTEXT *ThunkContext ); /** @@ -7495,7 +7300,7 @@ AsmPrepareAndThunk16 ( BOOLEAN EFIAPI AsmRdRand16 ( - OUT UINT16 *Rand + OUT UINT16 *Rand ); /** @@ -7512,7 +7317,7 @@ AsmRdRand16 ( BOOLEAN EFIAPI AsmRdRand32 ( - OUT UINT32 *Rand + OUT UINT32 *Rand ); /** @@ -7529,7 +7334,7 @@ AsmRdRand32 ( BOOLEAN EFIAPI AsmRdRand64 ( - OUT UINT64 *Rand + OUT UINT64 *Rand ); /** @@ -7540,7 +7345,7 @@ AsmRdRand64 ( VOID EFIAPI AsmWriteTr ( - IN UINT16 Selector + IN UINT16 Selector ); /** @@ -7609,7 +7414,6 @@ AsmVmgExit ( VOID ); - /** Patch the immediate operand of an IA32 or X64 instruction such that the byte, word, dword or qword operand is encoded at the end of the instruction's @@ -7647,9 +7451,9 @@ AsmVmgExit ( VOID EFIAPI PatchInstructionX86 ( - OUT X86_ASSEMBLY_PATCH_LABEL *InstructionEnd, - IN UINT64 PatchValue, - IN UINTN ValueSize + OUT X86_ASSEMBLY_PATCH_LABEL *InstructionEnd, + IN UINT64 PatchValue, + IN UINTN ValueSize ); #endif // defined (MDE_CPU_IA32) || defined (MDE_CPU_X64) diff --git a/MdePkg/Include/Library/CacheMaintenanceLib.h b/MdePkg/Include/Library/CacheMaintenanceLib.h index 3bd5e79..9afb0a7 100644 --- a/MdePkg/Include/Library/CacheMaintenanceLib.h +++ b/MdePkg/Include/Library/CacheMaintenanceLib.h @@ -51,8 +51,8 @@ InvalidateInstructionCache ( VOID * EFIAPI InvalidateInstructionCacheRange ( - IN VOID *Address, - IN UINTN Length + IN VOID *Address, + IN UINTN Length ); /** @@ -100,8 +100,8 @@ WriteBackInvalidateDataCache ( VOID * EFIAPI WriteBackInvalidateDataCacheRange ( - IN VOID *Address, - IN UINTN Length + IN VOID *Address, + IN UINTN Length ); /** @@ -148,8 +148,8 @@ WriteBackDataCache ( VOID * EFIAPI WriteBackDataCacheRange ( - IN VOID *Address, - IN UINTN Length + IN VOID *Address, + IN UINTN Length ); /** @@ -199,8 +199,8 @@ InvalidateDataCache ( VOID * EFIAPI InvalidateDataCacheRange ( - IN VOID *Address, - IN UINTN Length + IN VOID *Address, + IN UINTN Length ); #endif diff --git a/MdePkg/Include/Library/CpuLib.h b/MdePkg/Include/Library/CpuLib.h index 3187d73..25f6d94 100644 --- a/MdePkg/Include/Library/CpuLib.h +++ b/MdePkg/Include/Library/CpuLib.h @@ -41,5 +41,4 @@ CpuFlushTlb ( VOID ); - #endif diff --git a/MdePkg/Include/Library/DebugLib.h b/MdePkg/Include/Library/DebugLib.h index 056ceb6..8d3d086 100644 --- a/MdePkg/Include/Library/DebugLib.h +++ b/MdePkg/Include/Library/DebugLib.h @@ -48,7 +48,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define DEBUG_CACHE 0x00200000 // Memory range cachability changes #define DEBUG_VERBOSE 0x00400000 // Detailed debug messages that may // significantly impact boot performance -#define DEBUG_ERROR 0x80000000 // Error +#define DEBUG_ERROR 0x80000000 // Error // // Aliases of debug message mask bits @@ -129,7 +129,6 @@ DebugPrint ( ... ); - /** Prints a debug message to the debug output device if the specified error level is enabled. @@ -148,12 +147,11 @@ DebugPrint ( VOID EFIAPI DebugVPrint ( - IN UINTN ErrorLevel, - IN CONST CHAR8 *Format, - IN VA_LIST VaListMarker + IN UINTN ErrorLevel, + IN CONST CHAR8 *Format, + IN VA_LIST VaListMarker ); - /** Prints a debug message to the debug output device if the specified error level is enabled. @@ -174,12 +172,11 @@ DebugVPrint ( VOID EFIAPI DebugBPrint ( - IN UINTN ErrorLevel, - IN CONST CHAR8 *Format, - IN BASE_LIST BaseListMarker + IN UINTN ErrorLevel, + IN CONST CHAR8 *Format, + IN BASE_LIST BaseListMarker ); - /** Prints an assert message containing a filename, line number, and description. This may be followed by a breakpoint or a dead loop. @@ -209,7 +206,6 @@ DebugAssert ( IN CONST CHAR8 *Description ); - /** Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer. @@ -232,7 +228,6 @@ DebugClearMemory ( IN UINTN Length ); - /** Returns TRUE if ASSERT() macros are enabled. @@ -249,7 +244,6 @@ DebugAssertEnabled ( VOID ); - /** Returns TRUE if DEBUG() macros are enabled. @@ -266,7 +260,6 @@ DebugPrintEnabled ( VOID ); - /** Returns TRUE if DEBUG_CODE() macros are enabled. @@ -283,7 +276,6 @@ DebugCodeEnabled ( VOID ); - /** Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled. @@ -312,7 +304,7 @@ DebugClearMemoryEnabled ( BOOLEAN EFIAPI DebugPrintLevelEnabled ( - IN CONST UINTN ErrorLevel + IN CONST UINTN ErrorLevel ); /** @@ -325,6 +317,7 @@ DebugPrintLevelEnabled ( **/ #if defined (EDKII_UNIT_TEST_FRAMEWORK_ENABLED) + /** Unit test library replacement for DebugAssert() in DebugLib. @@ -344,17 +337,17 @@ UnitTestDebugAssert ( IN CONST CHAR8 *Description ); -#if defined(__clang__) && defined(__FILE_NAME__) + #if defined (__clang__) && defined (__FILE_NAME__) #define _ASSERT(Expression) UnitTestDebugAssert (__FILE_NAME__, DEBUG_LINE_NUMBER, DEBUG_EXPRESSION_STRING (Expression)) -#else + #else #define _ASSERT(Expression) UnitTestDebugAssert (__FILE__, DEBUG_LINE_NUMBER, DEBUG_EXPRESSION_STRING (Expression)) -#endif + #endif #else -#if defined(__clang__) && defined(__FILE_NAME__) + #if defined (__clang__) && defined (__FILE_NAME__) #define _ASSERT(Expression) DebugAssert (__FILE_NAME__, DEBUG_LINE_NUMBER, DEBUG_EXPRESSION_STRING (Expression)) -#else + #else #define _ASSERT(Expression) DebugAssert (__FILE__, DEBUG_LINE_NUMBER, DEBUG_EXPRESSION_STRING (Expression)) -#endif + #endif #endif /** @@ -370,16 +363,16 @@ UnitTestDebugAssert ( **/ -#if !defined(MDE_CPU_EBC) && (!defined (_MSC_VER) || _MSC_VER > 1400) - #define _DEBUG_PRINT(PrintLevel, ...) \ +#if !defined (MDE_CPU_EBC) && (!defined (_MSC_VER) || _MSC_VER > 1400) +#define _DEBUG_PRINT(PrintLevel, ...) \ do { \ if (DebugPrintLevelEnabled (PrintLevel)) { \ DebugPrint (PrintLevel, ##__VA_ARGS__); \ } \ } while (FALSE) - #define _DEBUG(Expression) _DEBUG_PRINT Expression +#define _DEBUG(Expression) _DEBUG_PRINT Expression #else -#define _DEBUG(Expression) DebugPrint Expression +#define _DEBUG(Expression) DebugPrint Expression #endif /** @@ -394,8 +387,8 @@ UnitTestDebugAssert ( @param Expression Boolean expression. **/ -#if !defined(MDEPKG_NDEBUG) - #define ASSERT(Expression) \ +#if !defined (MDEPKG_NDEBUG) +#define ASSERT(Expression) \ do { \ if (DebugAssertEnabled ()) { \ if (!(Expression)) { \ @@ -405,7 +398,7 @@ UnitTestDebugAssert ( } \ } while (FALSE) #else - #define ASSERT(Expression) +#define ASSERT(Expression) #endif /** @@ -420,15 +413,15 @@ UnitTestDebugAssert ( **/ -#if !defined(MDEPKG_NDEBUG) - #define DEBUG(Expression) \ +#if !defined (MDEPKG_NDEBUG) +#define DEBUG(Expression) \ do { \ if (DebugPrintEnabled ()) { \ _DEBUG (Expression); \ } \ } while (FALSE) #else - #define DEBUG(Expression) +#define DEBUG(Expression) #endif /** @@ -443,8 +436,8 @@ UnitTestDebugAssert ( @param StatusParameter EFI_STATUS value to evaluate. **/ -#if !defined(MDEPKG_NDEBUG) - #define ASSERT_EFI_ERROR(StatusParameter) \ +#if !defined (MDEPKG_NDEBUG) +#define ASSERT_EFI_ERROR(StatusParameter) \ do { \ if (DebugAssertEnabled ()) { \ if (EFI_ERROR (StatusParameter)) { \ @@ -454,7 +447,7 @@ UnitTestDebugAssert ( } \ } while (FALSE) #else - #define ASSERT_EFI_ERROR(StatusParameter) +#define ASSERT_EFI_ERROR(StatusParameter) #endif /** @@ -469,8 +462,8 @@ UnitTestDebugAssert ( @param StatusParameter RETURN_STATUS value to evaluate. **/ -#if !defined(MDEPKG_NDEBUG) - #define ASSERT_RETURN_ERROR(StatusParameter) \ +#if !defined (MDEPKG_NDEBUG) +#define ASSERT_RETURN_ERROR(StatusParameter) \ do { \ if (DebugAssertEnabled ()) { \ if (RETURN_ERROR (StatusParameter)) { \ @@ -481,7 +474,7 @@ UnitTestDebugAssert ( } \ } while (FALSE) #else - #define ASSERT_RETURN_ERROR(StatusParameter) +#define ASSERT_RETURN_ERROR(StatusParameter) #endif /** @@ -506,8 +499,8 @@ UnitTestDebugAssert ( @param Guid The pointer to a protocol GUID. **/ -#if !defined(MDEPKG_NDEBUG) - #define ASSERT_PROTOCOL_ALREADY_INSTALLED(Handle, Guid) \ +#if !defined (MDEPKG_NDEBUG) +#define ASSERT_PROTOCOL_ALREADY_INSTALLED(Handle, Guid) \ do { \ if (DebugAssertEnabled ()) { \ VOID *Instance; \ @@ -524,7 +517,7 @@ UnitTestDebugAssert ( } \ } while (FALSE) #else - #define ASSERT_PROTOCOL_ALREADY_INSTALLED(Handle, Guid) +#define ASSERT_PROTOCOL_ALREADY_INSTALLED(Handle, Guid) #endif /** @@ -538,7 +531,6 @@ UnitTestDebugAssert ( **/ #define DEBUG_CODE_BEGIN() do { if (DebugCodeEnabled ()) { UINT8 __DebugCodeLocal - /** The macro that marks the end of debug source code. @@ -548,8 +540,7 @@ UnitTestDebugAssert ( are not included in a module. **/ -#define DEBUG_CODE_END() __DebugCodeLocal = 0; __DebugCodeLocal++; } } while (FALSE) - +#define DEBUG_CODE_END() __DebugCodeLocal = 0; __DebugCodeLocal++; } } while (FALSE) /** The macro that declares a section of debug source code. @@ -564,7 +555,6 @@ UnitTestDebugAssert ( Expression \ DEBUG_CODE_END () - /** The macro that calls DebugClearMemory() to clear a buffer to a default value. @@ -582,7 +572,6 @@ UnitTestDebugAssert ( } \ } while (FALSE) - /** Macro that calls DebugAssert() if the containing record does not have a matching signature. If the signatures matches, then a pointer to the data @@ -625,13 +614,13 @@ UnitTestDebugAssert ( @param TestSignature The 32-bit signature value to match. **/ -#if !defined(MDEPKG_NDEBUG) - #define CR(Record, TYPE, Field, TestSignature) \ +#if !defined (MDEPKG_NDEBUG) +#define CR(Record, TYPE, Field, TestSignature) \ (DebugAssertEnabled () && (BASE_CR (Record, TYPE, Field)->Signature != TestSignature)) ? \ (TYPE *) (_ASSERT (CR has Bad Signature), Record) : \ BASE_CR (Record, TYPE, Field) #else - #define CR(Record, TYPE, Field, TestSignature) \ +#define CR(Record, TYPE, Field, TestSignature) \ BASE_CR (Record, TYPE, Field) #endif diff --git a/MdePkg/Include/Library/DebugPrintErrorLevelLib.h b/MdePkg/Include/Library/DebugPrintErrorLevelLib.h index 6992ec8..d09bc68 100644 --- a/MdePkg/Include/Library/DebugPrintErrorLevelLib.h +++ b/MdePkg/Include/Library/DebugPrintErrorLevelLib.h @@ -5,6 +5,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ + #ifndef _DEBUG_PRINT_ERROR_LEVEL_LIB_H_ #define _DEBUG_PRINT_ERROR_LEVEL_LIB_H_ @@ -34,4 +35,5 @@ EFIAPI SetDebugPrintErrorLevel ( UINT32 ErrorLevel ); + #endif diff --git a/MdePkg/Include/Library/DevicePathLib.h b/MdePkg/Include/Library/DevicePathLib.h index 9b652e6..7a077e4 100644 --- a/MdePkg/Include/Library/DevicePathLib.h +++ b/MdePkg/Include/Library/DevicePathLib.h @@ -12,7 +12,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #ifndef __DEVICE_PATH_LIB_H__ #define __DEVICE_PATH_LIB_H__ -#define END_DEVICE_PATH_LENGTH (sizeof (EFI_DEVICE_PATH_PROTOCOL)) +#define END_DEVICE_PATH_LENGTH (sizeof (EFI_DEVICE_PATH_PROTOCOL)) /** Determine whether a given device path is valid. @@ -33,8 +33,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent BOOLEAN EFIAPI IsDevicePathValid ( - IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, - IN UINTN MaxSize + IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, + IN UINTN MaxSize ); /** @@ -384,8 +384,8 @@ AppendDevicePathInstance ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI GetNextDevicePathInstance ( - IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath, - OUT UINTN *Size + IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath, + OUT UINTN *Size ); /** @@ -409,9 +409,9 @@ GetNextDevicePathInstance ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI CreateDeviceNode ( - IN UINT8 NodeType, - IN UINT8 NodeSubType, - IN UINT16 NodeLength + IN UINT8 NodeType, + IN UINT8 NodeSubType, + IN UINT16 NodeLength ); /** @@ -447,7 +447,7 @@ IsDevicePathMultiInstance ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI DevicePathFromHandle ( - IN EFI_HANDLE Handle + IN EFI_HANDLE Handle ); /** @@ -474,8 +474,8 @@ DevicePathFromHandle ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI FileDevicePath ( - IN EFI_HANDLE Device OPTIONAL, - IN CONST CHAR16 *FileName + IN EFI_HANDLE Device OPTIONAL, + IN CONST CHAR16 *FileName ); /** @@ -496,9 +496,9 @@ FileDevicePath ( CHAR16 * EFIAPI ConvertDevicePathToText ( - IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, - IN BOOLEAN DisplayOnly, - IN BOOLEAN AllowShortcuts + IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts ); /** @@ -538,7 +538,7 @@ ConvertDeviceNodeToText ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI ConvertTextToDeviceNode ( - IN CONST CHAR16 *TextDeviceNode + IN CONST CHAR16 *TextDeviceNode ); /** @@ -555,7 +555,7 @@ ConvertTextToDeviceNode ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI ConvertTextToDevicePath ( - IN CONST CHAR16 *TextDevicePath + IN CONST CHAR16 *TextDevicePath ); #endif diff --git a/MdePkg/Include/Library/DxeCoreEntryPoint.h b/MdePkg/Include/Library/DxeCoreEntryPoint.h index 2829afc..7b92e6d 100644 --- a/MdePkg/Include/Library/DxeCoreEntryPoint.h +++ b/MdePkg/Include/Library/DxeCoreEntryPoint.h @@ -14,7 +14,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// extern VOID *gHobList; - /** The entry point of PE/COFF Image for the DXE Core. @@ -33,7 +32,6 @@ _ModuleEntryPoint ( IN VOID *HobStart ); - /** Required by the EBC compiler and identical in functionality to _ModuleEntryPoint(). @@ -48,7 +46,6 @@ EfiMain ( IN VOID *HobStart ); - /** Autogenerated function that calls the library constructors for all of the module's dependent libraries. @@ -72,7 +69,6 @@ ProcessLibraryConstructorList ( IN EFI_SYSTEM_TABLE *SystemTable ); - /** Autogenerated function that calls a set of module entry points. diff --git a/MdePkg/Include/Library/DxeServicesLib.h b/MdePkg/Include/Library/DxeServicesLib.h index 689f47a..b5c5c4d 100644 --- a/MdePkg/Include/Library/DxeServicesLib.h +++ b/MdePkg/Include/Library/DxeServicesLib.h @@ -53,12 +53,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent EFI_STATUS EFIAPI GetSectionFromAnyFvByFileType ( - IN EFI_FV_FILETYPE FileType, - IN UINTN FileInstance, - IN EFI_SECTION_TYPE SectionType, - IN UINTN SectionInstance, - OUT VOID **Buffer, - OUT UINTN *Size + IN EFI_FV_FILETYPE FileType, + IN UINTN FileInstance, + IN EFI_SECTION_TYPE SectionType, + IN UINTN SectionInstance, + OUT VOID **Buffer, + OUT UINTN *Size ); /** @@ -107,11 +107,11 @@ GetSectionFromAnyFvByFileType ( EFI_STATUS EFIAPI GetSectionFromAnyFv ( - IN CONST EFI_GUID *NameGuid, - IN EFI_SECTION_TYPE SectionType, - IN UINTN SectionInstance, - OUT VOID **Buffer, - OUT UINTN *Size + IN CONST EFI_GUID *NameGuid, + IN EFI_SECTION_TYPE SectionType, + IN UINTN SectionInstance, + OUT VOID **Buffer, + OUT UINTN *Size ); /** @@ -162,14 +162,13 @@ GetSectionFromAnyFv ( EFI_STATUS EFIAPI GetSectionFromFv ( - IN CONST EFI_GUID *NameGuid, - IN EFI_SECTION_TYPE SectionType, - IN UINTN SectionInstance, - OUT VOID **Buffer, - OUT UINTN *Size + IN CONST EFI_GUID *NameGuid, + IN EFI_SECTION_TYPE SectionType, + IN UINTN SectionInstance, + OUT VOID **Buffer, + OUT UINTN *Size ); - /** Searches the FFS file the currently executing module was loaded from and returns the first matching FFS section. @@ -215,13 +214,12 @@ GetSectionFromFv ( EFI_STATUS EFIAPI GetSectionFromFfs ( - IN EFI_SECTION_TYPE SectionType, - IN UINTN SectionInstance, - OUT VOID **Buffer, - OUT UINTN *Size + IN EFI_SECTION_TYPE SectionType, + IN UINTN SectionInstance, + OUT VOID **Buffer, + OUT UINTN *Size ); - /** Get the image file buffer data and buffer size by its device path. @@ -251,10 +249,10 @@ GetSectionFromFfs ( VOID * EFIAPI GetFileBufferByFilePath ( - IN BOOLEAN BootPolicy, - IN CONST EFI_DEVICE_PATH_PROTOCOL *FilePath, - OUT UINTN *FileSize, - OUT UINT32 *AuthenticationStatus + IN BOOLEAN BootPolicy, + IN CONST EFI_DEVICE_PATH_PROTOCOL *FilePath, + OUT UINTN *FileSize, + OUT UINT32 *AuthenticationStatus ); /** diff --git a/MdePkg/Include/Library/DxeServicesTableLib.h b/MdePkg/Include/Library/DxeServicesTableLib.h index 5e90cc8..6d2bffb 100644 --- a/MdePkg/Include/Library/DxeServicesTableLib.h +++ b/MdePkg/Include/Library/DxeServicesTableLib.h @@ -25,4 +25,3 @@ SPDX-License-Identifier: BSD-2-Clause-Patent extern EFI_DXE_SERVICES *gDS; #endif - diff --git a/MdePkg/Include/Library/ExtractGuidedSectionLib.h b/MdePkg/Include/Library/ExtractGuidedSectionLib.h index 3a2c955..15058ae 100644 --- a/MdePkg/Include/Library/ExtractGuidedSectionLib.h +++ b/MdePkg/Include/Library/ExtractGuidedSectionLib.h @@ -14,6 +14,7 @@ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ + #ifndef __EXTRACT_GUIDED_SECTION_H__ #define __EXTRACT_GUIDED_SECTION_H__ diff --git a/MdePkg/Include/Library/FileHandleLib.h b/MdePkg/Include/Library/FileHandleLib.h index 6edbb6c..1a238ed 100644 --- a/MdePkg/Include/Library/FileHandleLib.h +++ b/MdePkg/Include/Library/FileHandleLib.h @@ -14,7 +14,7 @@ /// The tag for use in identifying UNICODE files. /// If the file is UNICODE, the first 16 bits of the file will equal this value. -extern CONST UINT16 gUnicodeFileTag; +extern CONST UINT16 gUnicodeFileTag; /** This function retrieves information about the file for the handle @@ -29,10 +29,10 @@ extern CONST UINT16 gUnicodeFileTag; @retval NULL Information could not be retrieved. @retval !NULL The information about the file. **/ -EFI_FILE_INFO* +EFI_FILE_INFO * EFIAPI FileHandleGetInfo ( - IN EFI_FILE_HANDLE FileHandle + IN EFI_FILE_HANDLE FileHandle ); /** @@ -57,8 +57,8 @@ FileHandleGetInfo ( EFI_STATUS EFIAPI FileHandleSetInfo ( - IN EFI_FILE_HANDLE FileHandle, - IN CONST EFI_FILE_INFO *FileInfo + IN EFI_FILE_HANDLE FileHandle, + IN CONST EFI_FILE_INFO *FileInfo ); /** @@ -92,10 +92,10 @@ FileHandleSetInfo ( **/ EFI_STATUS EFIAPI -FileHandleRead( - IN EFI_FILE_HANDLE FileHandle, - IN OUT UINTN *BufferSize, - OUT VOID *Buffer +FileHandleRead ( + IN EFI_FILE_HANDLE FileHandle, + IN OUT UINTN *BufferSize, + OUT VOID *Buffer ); /** @@ -124,10 +124,10 @@ FileHandleRead( **/ EFI_STATUS EFIAPI -FileHandleWrite( - IN EFI_FILE_HANDLE FileHandle, - IN OUT UINTN *BufferSize, - IN VOID *Buffer +FileHandleWrite ( + IN EFI_FILE_HANDLE FileHandle, + IN OUT UINTN *BufferSize, + IN VOID *Buffer ); /** @@ -144,7 +144,7 @@ FileHandleWrite( EFI_STATUS EFIAPI FileHandleClose ( - IN EFI_FILE_HANDLE FileHandle + IN EFI_FILE_HANDLE FileHandle ); /** @@ -164,7 +164,7 @@ FileHandleClose ( EFI_STATUS EFIAPI FileHandleDelete ( - IN EFI_FILE_HANDLE FileHandle + IN EFI_FILE_HANDLE FileHandle ); /** @@ -189,8 +189,8 @@ FileHandleDelete ( EFI_STATUS EFIAPI FileHandleSetPosition ( - IN EFI_FILE_HANDLE FileHandle, - IN UINT64 Position + IN EFI_FILE_HANDLE FileHandle, + IN UINT64 Position ); /** @@ -211,9 +211,10 @@ FileHandleSetPosition ( EFI_STATUS EFIAPI FileHandleGetPosition ( - IN EFI_FILE_HANDLE FileHandle, - OUT UINT64 *Position + IN EFI_FILE_HANDLE FileHandle, + OUT UINT64 *Position ); + /** Flushes data on a file. @@ -231,7 +232,7 @@ FileHandleGetPosition ( EFI_STATUS EFIAPI FileHandleFlush ( - IN EFI_FILE_HANDLE FileHandle + IN EFI_FILE_HANDLE FileHandle ); /** @@ -250,7 +251,7 @@ FileHandleFlush ( EFI_STATUS EFIAPI FileHandleIsDirectory ( - IN EFI_FILE_HANDLE DirHandle + IN EFI_FILE_HANDLE DirHandle ); /** Retrieve first entry from a directory. @@ -278,8 +279,8 @@ FileHandleIsDirectory ( EFI_STATUS EFIAPI FileHandleFindFirstFile ( - IN EFI_FILE_HANDLE DirHandle, - OUT EFI_FILE_INFO **Buffer + IN EFI_FILE_HANDLE DirHandle, + OUT EFI_FILE_INFO **Buffer ); /** Retrieve next entries from a directory. @@ -302,10 +303,10 @@ FileHandleFindFirstFile ( **/ EFI_STATUS EFIAPI -FileHandleFindNextFile( - IN EFI_FILE_HANDLE DirHandle, - OUT EFI_FILE_INFO *Buffer, - OUT BOOLEAN *NoFile +FileHandleFindNextFile ( + IN EFI_FILE_HANDLE DirHandle, + OUT EFI_FILE_INFO *Buffer, + OUT BOOLEAN *NoFile ); /** @@ -325,8 +326,8 @@ FileHandleFindNextFile( EFI_STATUS EFIAPI FileHandleGetSize ( - IN EFI_FILE_HANDLE FileHandle, - OUT UINT64 *Size + IN EFI_FILE_HANDLE FileHandle, + OUT UINT64 *Size ); /** @@ -345,8 +346,8 @@ FileHandleGetSize ( EFI_STATUS EFIAPI FileHandleSetSize ( - IN EFI_FILE_HANDLE FileHandle, - IN UINT64 Size + IN EFI_FILE_HANDLE FileHandle, + IN UINT64 Size ); /** @@ -367,8 +368,8 @@ FileHandleSetSize ( EFI_STATUS EFIAPI FileHandleGetFileName ( - IN CONST EFI_FILE_HANDLE Handle, - OUT CHAR16 **FullFileName + IN CONST EFI_FILE_HANDLE Handle, + OUT CHAR16 **FullFileName ); /** @@ -401,12 +402,12 @@ FileHandleGetFileName ( **/ EFI_STATUS EFIAPI -FileHandleReadLine( - IN EFI_FILE_HANDLE Handle, - IN OUT CHAR16 *Buffer, - IN OUT UINTN *Size, - IN BOOLEAN Truncate, - IN OUT BOOLEAN *Ascii +FileHandleReadLine ( + IN EFI_FILE_HANDLE Handle, + IN OUT CHAR16 *Buffer, + IN OUT UINTN *Size, + IN BOOLEAN Truncate, + IN OUT BOOLEAN *Ascii ); /** @@ -424,11 +425,11 @@ FileHandleReadLine( @sa FileHandleReadLine **/ -CHAR16* +CHAR16 * EFIAPI -FileHandleReturnLine( - IN EFI_FILE_HANDLE Handle, - IN OUT BOOLEAN *Ascii +FileHandleReturnLine ( + IN EFI_FILE_HANDLE Handle, + IN OUT BOOLEAN *Ascii ); /** @@ -454,9 +455,9 @@ FileHandleReturnLine( **/ EFI_STATUS EFIAPI -FileHandleWriteLine( - IN EFI_FILE_HANDLE Handle, - IN CHAR16 *Buffer +FileHandleWriteLine ( + IN EFI_FILE_HANDLE Handle, + IN CHAR16 *Buffer ); /** @@ -473,7 +474,7 @@ FileHandleWriteLine( **/ EFI_STATUS EFIAPI -FileHandlePrintLine( +FileHandlePrintLine ( IN EFI_FILE_HANDLE Handle, IN CONST CHAR16 *Format, ... @@ -493,9 +494,8 @@ FileHandlePrintLine( **/ BOOLEAN EFIAPI -FileHandleEof( - IN EFI_FILE_HANDLE Handle +FileHandleEof ( + IN EFI_FILE_HANDLE Handle ); #endif //_FILE_HANDLE_LIBRARY_HEADER_ - diff --git a/MdePkg/Include/Library/HobLib.h b/MdePkg/Include/Library/HobLib.h index 1d557f4..3cc0ea6 100644 --- a/MdePkg/Include/Library/HobLib.h +++ b/MdePkg/Include/Library/HobLib.h @@ -58,8 +58,8 @@ GetHobList ( VOID * EFIAPI GetNextHob ( - IN UINT16 Type, - IN CONST VOID *HobStart + IN UINT16 Type, + IN CONST VOID *HobStart ); /** @@ -78,7 +78,7 @@ GetNextHob ( VOID * EFIAPI GetFirstHob ( - IN UINT16 Type + IN UINT16 Type ); /** @@ -106,8 +106,8 @@ GetFirstHob ( VOID * EFIAPI GetNextGuidHob ( - IN CONST EFI_GUID *Guid, - IN CONST VOID *HobStart + IN CONST EFI_GUID *Guid, + IN CONST VOID *HobStart ); /** @@ -131,7 +131,7 @@ GetNextGuidHob ( VOID * EFIAPI GetFirstGuidHob ( - IN CONST EFI_GUID *Guid + IN CONST EFI_GUID *Guid ); /** @@ -172,10 +172,10 @@ GetBootModeHob ( VOID EFIAPI BuildModuleHob ( - IN CONST EFI_GUID *ModuleName, - IN EFI_PHYSICAL_ADDRESS MemoryAllocationModule, - IN UINT64 ModuleLength, - IN EFI_PHYSICAL_ADDRESS EntryPoint + IN CONST EFI_GUID *ModuleName, + IN EFI_PHYSICAL_ADDRESS MemoryAllocationModule, + IN UINT64 ModuleLength, + IN EFI_PHYSICAL_ADDRESS EntryPoint ); /** @@ -253,8 +253,8 @@ BuildResourceDescriptorHob ( VOID * EFIAPI BuildGuidHob ( - IN CONST EFI_GUID *Guid, - IN UINTN DataLength + IN CONST EFI_GUID *Guid, + IN UINTN DataLength ); /** @@ -285,9 +285,9 @@ BuildGuidHob ( VOID * EFIAPI BuildGuidDataHob ( - IN CONST EFI_GUID *Guid, - IN VOID *Data, - IN UINTN DataLength + IN CONST EFI_GUID *Guid, + IN VOID *Data, + IN UINTN DataLength ); /** @@ -307,8 +307,8 @@ BuildGuidDataHob ( VOID EFIAPI BuildFvHob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length ); /** @@ -330,10 +330,10 @@ BuildFvHob ( VOID EFIAPI BuildFv2Hob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length, - IN CONST EFI_GUID *FvName, - IN CONST EFI_GUID *FileName + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length, + IN CONST EFI_GUID *FvName, + IN CONST EFI_GUID *FileName ); /** @@ -360,12 +360,12 @@ BuildFv2Hob ( VOID EFIAPI BuildFv3Hob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length, - IN UINT32 AuthenticationStatus, - IN BOOLEAN ExtractedFv, - IN CONST EFI_GUID *FvName OPTIONAL, - IN CONST EFI_GUID *FileName OPTIONAL + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length, + IN UINT32 AuthenticationStatus, + IN BOOLEAN ExtractedFv, + IN CONST EFI_GUID *FvName OPTIONAL, + IN CONST EFI_GUID *FileName OPTIONAL ); /** @@ -385,8 +385,8 @@ BuildFv3Hob ( VOID EFIAPI BuildCvHob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length ); /** @@ -405,8 +405,8 @@ BuildCvHob ( VOID EFIAPI BuildCpuHob ( - IN UINT8 SizeOfMemorySpace, - IN UINT8 SizeOfIoSpace + IN UINT8 SizeOfMemorySpace, + IN UINT8 SizeOfIoSpace ); /** @@ -425,8 +425,8 @@ BuildCpuHob ( VOID EFIAPI BuildStackHob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length ); /** @@ -446,9 +446,9 @@ BuildStackHob ( VOID EFIAPI BuildBspStoreHob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length, - IN EFI_MEMORY_TYPE MemoryType + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length, + IN EFI_MEMORY_TYPE MemoryType ); /** @@ -468,9 +468,9 @@ BuildBspStoreHob ( VOID EFIAPI BuildMemoryAllocationHob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length, - IN EFI_MEMORY_TYPE MemoryType + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length, + IN EFI_MEMORY_TYPE MemoryType ); /** diff --git a/MdePkg/Include/Library/HstiLib.h b/MdePkg/Include/Library/HstiLib.h index 1fbcfa0..ac2f9c5 100644 --- a/MdePkg/Include/Library/HstiLib.h +++ b/MdePkg/Include/Library/HstiLib.h @@ -28,8 +28,8 @@ EFI_STATUS EFIAPI HstiLibSetTable ( - IN VOID *Hsti, - IN UINTN HstiSize + IN VOID *Hsti, + IN UINTN HstiSize ); /** @@ -51,10 +51,10 @@ HstiLibSetTable ( EFI_STATUS EFIAPI HstiLibGetTable ( - IN UINT32 Role, - IN CHAR16 *ImplementationID OPTIONAL, - OUT VOID **Hsti, - OUT UINTN *HstiSize + IN UINT32 Role, + IN CHAR16 *ImplementationID OPTIONAL, + OUT VOID **Hsti, + OUT UINTN *HstiSize ); /** @@ -75,10 +75,10 @@ HstiLibGetTable ( EFI_STATUS EFIAPI HstiLibSetFeaturesVerified ( - IN UINT32 Role, - IN CHAR16 *ImplementationID OPTIONAL, - IN UINT32 ByteIndex, - IN UINT8 BitMask + IN UINT32 Role, + IN CHAR16 *ImplementationID OPTIONAL, + IN UINT32 ByteIndex, + IN UINT8 BitMask ); /** @@ -99,10 +99,10 @@ HstiLibSetFeaturesVerified ( EFI_STATUS EFIAPI HstiLibClearFeaturesVerified ( - IN UINT32 Role, - IN CHAR16 *ImplementationID OPTIONAL, - IN UINT32 ByteIndex, - IN UINT8 BitMask + IN UINT32 Role, + IN CHAR16 *ImplementationID OPTIONAL, + IN UINT32 ByteIndex, + IN UINT8 BitMask ); /** @@ -122,9 +122,9 @@ HstiLibClearFeaturesVerified ( EFI_STATUS EFIAPI HstiLibAppendErrorString ( - IN UINT32 Role, - IN CHAR16 *ImplementationID OPTIONAL, - IN CHAR16 *ErrorString + IN UINT32 Role, + IN CHAR16 *ImplementationID OPTIONAL, + IN CHAR16 *ErrorString ); /** @@ -144,9 +144,9 @@ HstiLibAppendErrorString ( EFI_STATUS EFIAPI HstiLibSetErrorString ( - IN UINT32 Role, - IN CHAR16 *ImplementationID OPTIONAL, - IN CHAR16 *ErrorString + IN UINT32 Role, + IN CHAR16 *ImplementationID OPTIONAL, + IN CHAR16 *ErrorString ); #endif diff --git a/MdePkg/Include/Library/IoLib.h b/MdePkg/Include/Library/IoLib.h index afdb0d8..9f0c28f 100644 --- a/MdePkg/Include/Library/IoLib.h +++ b/MdePkg/Include/Library/IoLib.h @@ -26,7 +26,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ -#define IO_LIB_ADDRESS(Segment,Port) \ +#define IO_LIB_ADDRESS(Segment, Port) \ ( ((Port) & 0xffff) | (((Segment) & 0xffff) << 16) ) /** @@ -46,7 +46,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent UINT8 EFIAPI IoRead8 ( - IN UINTN Port + IN UINTN Port ); /** @@ -67,8 +67,8 @@ IoRead8 ( UINT8 EFIAPI IoWrite8 ( - IN UINTN Port, - IN UINT8 Value + IN UINTN Port, + IN UINT8 Value ); /** @@ -91,9 +91,9 @@ IoWrite8 ( VOID EFIAPI IoReadFifo8 ( - IN UINTN Port, - IN UINTN Count, - OUT VOID *Buffer + IN UINTN Port, + IN UINTN Count, + OUT VOID *Buffer ); /** @@ -116,9 +116,9 @@ IoReadFifo8 ( VOID EFIAPI IoWriteFifo8 ( - IN UINTN Port, - IN UINTN Count, - IN VOID *Buffer + IN UINTN Port, + IN UINTN Count, + IN VOID *Buffer ); /** @@ -142,8 +142,8 @@ IoWriteFifo8 ( UINT8 EFIAPI IoOr8 ( - IN UINTN Port, - IN UINT8 OrData + IN UINTN Port, + IN UINT8 OrData ); /** @@ -167,8 +167,8 @@ IoOr8 ( UINT8 EFIAPI IoAnd8 ( - IN UINTN Port, - IN UINT8 AndData + IN UINTN Port, + IN UINT8 AndData ); /** @@ -194,9 +194,9 @@ IoAnd8 ( UINT8 EFIAPI IoAndThenOr8 ( - IN UINTN Port, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Port, + IN UINT8 AndData, + IN UINT8 OrData ); /** @@ -222,9 +222,9 @@ IoAndThenOr8 ( UINT8 EFIAPI IoBitFieldRead8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit ); /** @@ -253,10 +253,10 @@ IoBitFieldRead8 ( UINT8 EFIAPI IoBitFieldWrite8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ); /** @@ -288,10 +288,10 @@ IoBitFieldWrite8 ( UINT8 EFIAPI IoBitFieldOr8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ); /** @@ -323,10 +323,10 @@ IoBitFieldOr8 ( UINT8 EFIAPI IoBitFieldAnd8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ); /** @@ -362,11 +362,11 @@ IoBitFieldAnd8 ( UINT8 EFIAPI IoBitFieldAndThenOr8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ); /** @@ -387,7 +387,7 @@ IoBitFieldAndThenOr8 ( UINT16 EFIAPI IoRead16 ( - IN UINTN Port + IN UINTN Port ); /** @@ -409,8 +409,8 @@ IoRead16 ( UINT16 EFIAPI IoWrite16 ( - IN UINTN Port, - IN UINT16 Value + IN UINTN Port, + IN UINT16 Value ); /** @@ -433,9 +433,9 @@ IoWrite16 ( VOID EFIAPI IoReadFifo16 ( - IN UINTN Port, - IN UINTN Count, - OUT VOID *Buffer + IN UINTN Port, + IN UINTN Count, + OUT VOID *Buffer ); /** @@ -458,9 +458,9 @@ IoReadFifo16 ( VOID EFIAPI IoWriteFifo16 ( - IN UINTN Port, - IN UINTN Count, - IN VOID *Buffer + IN UINTN Port, + IN UINTN Count, + IN VOID *Buffer ); /** @@ -485,8 +485,8 @@ IoWriteFifo16 ( UINT16 EFIAPI IoOr16 ( - IN UINTN Port, - IN UINT16 OrData + IN UINTN Port, + IN UINT16 OrData ); /** @@ -511,8 +511,8 @@ IoOr16 ( UINT16 EFIAPI IoAnd16 ( - IN UINTN Port, - IN UINT16 AndData + IN UINTN Port, + IN UINT16 AndData ); /** @@ -539,9 +539,9 @@ IoAnd16 ( UINT16 EFIAPI IoAndThenOr16 ( - IN UINTN Port, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Port, + IN UINT16 AndData, + IN UINT16 OrData ); /** @@ -568,9 +568,9 @@ IoAndThenOr16 ( UINT16 EFIAPI IoBitFieldRead16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit ); /** @@ -601,10 +601,10 @@ IoBitFieldRead16 ( UINT16 EFIAPI IoBitFieldWrite16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ); /** @@ -637,10 +637,10 @@ IoBitFieldWrite16 ( UINT16 EFIAPI IoBitFieldOr16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ); /** @@ -673,10 +673,10 @@ IoBitFieldOr16 ( UINT16 EFIAPI IoBitFieldAnd16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ); /** @@ -713,11 +713,11 @@ IoBitFieldAnd16 ( UINT16 EFIAPI IoBitFieldAndThenOr16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ); /** @@ -738,7 +738,7 @@ IoBitFieldAndThenOr16 ( UINT32 EFIAPI IoRead32 ( - IN UINTN Port + IN UINTN Port ); /** @@ -760,8 +760,8 @@ IoRead32 ( UINT32 EFIAPI IoWrite32 ( - IN UINTN Port, - IN UINT32 Value + IN UINTN Port, + IN UINT32 Value ); /** @@ -784,9 +784,9 @@ IoWrite32 ( VOID EFIAPI IoReadFifo32 ( - IN UINTN Port, - IN UINTN Count, - OUT VOID *Buffer + IN UINTN Port, + IN UINTN Count, + OUT VOID *Buffer ); /** @@ -809,9 +809,9 @@ IoReadFifo32 ( VOID EFIAPI IoWriteFifo32 ( - IN UINTN Port, - IN UINTN Count, - IN VOID *Buffer + IN UINTN Port, + IN UINTN Count, + IN VOID *Buffer ); /** @@ -836,8 +836,8 @@ IoWriteFifo32 ( UINT32 EFIAPI IoOr32 ( - IN UINTN Port, - IN UINT32 OrData + IN UINTN Port, + IN UINT32 OrData ); /** @@ -862,8 +862,8 @@ IoOr32 ( UINT32 EFIAPI IoAnd32 ( - IN UINTN Port, - IN UINT32 AndData + IN UINTN Port, + IN UINT32 AndData ); /** @@ -890,9 +890,9 @@ IoAnd32 ( UINT32 EFIAPI IoAndThenOr32 ( - IN UINTN Port, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Port, + IN UINT32 AndData, + IN UINT32 OrData ); /** @@ -919,9 +919,9 @@ IoAndThenOr32 ( UINT32 EFIAPI IoBitFieldRead32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit ); /** @@ -952,10 +952,10 @@ IoBitFieldRead32 ( UINT32 EFIAPI IoBitFieldWrite32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ); /** @@ -988,10 +988,10 @@ IoBitFieldWrite32 ( UINT32 EFIAPI IoBitFieldOr32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ); /** @@ -1024,10 +1024,10 @@ IoBitFieldOr32 ( UINT32 EFIAPI IoBitFieldAnd32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ); /** @@ -1064,11 +1064,11 @@ IoBitFieldAnd32 ( UINT32 EFIAPI IoBitFieldAndThenOr32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ); /** @@ -1089,7 +1089,7 @@ IoBitFieldAndThenOr32 ( UINT64 EFIAPI IoRead64 ( - IN UINTN Port + IN UINTN Port ); /** @@ -1111,8 +1111,8 @@ IoRead64 ( UINT64 EFIAPI IoWrite64 ( - IN UINTN Port, - IN UINT64 Value + IN UINTN Port, + IN UINT64 Value ); /** @@ -1137,8 +1137,8 @@ IoWrite64 ( UINT64 EFIAPI IoOr64 ( - IN UINTN Port, - IN UINT64 OrData + IN UINTN Port, + IN UINT64 OrData ); /** @@ -1163,8 +1163,8 @@ IoOr64 ( UINT64 EFIAPI IoAnd64 ( - IN UINTN Port, - IN UINT64 AndData + IN UINTN Port, + IN UINT64 AndData ); /** @@ -1191,9 +1191,9 @@ IoAnd64 ( UINT64 EFIAPI IoAndThenOr64 ( - IN UINTN Port, - IN UINT64 AndData, - IN UINT64 OrData + IN UINTN Port, + IN UINT64 AndData, + IN UINT64 OrData ); /** @@ -1220,9 +1220,9 @@ IoAndThenOr64 ( UINT64 EFIAPI IoBitFieldRead64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit ); /** @@ -1253,10 +1253,10 @@ IoBitFieldRead64 ( UINT64 EFIAPI IoBitFieldWrite64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 Value + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 Value ); /** @@ -1289,10 +1289,10 @@ IoBitFieldWrite64 ( UINT64 EFIAPI IoBitFieldOr64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 OrData ); /** @@ -1325,10 +1325,10 @@ IoBitFieldOr64 ( UINT64 EFIAPI IoBitFieldAnd64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData ); /** @@ -1365,11 +1365,11 @@ IoBitFieldAnd64 ( UINT64 EFIAPI IoBitFieldAndThenOr64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData, - IN UINT64 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData, + IN UINT64 OrData ); /** @@ -1389,7 +1389,7 @@ IoBitFieldAndThenOr64 ( UINT8 EFIAPI MmioRead8 ( - IN UINTN Address + IN UINTN Address ); /** @@ -1410,8 +1410,8 @@ MmioRead8 ( UINT8 EFIAPI MmioWrite8 ( - IN UINTN Address, - IN UINT8 Value + IN UINTN Address, + IN UINT8 Value ); /** @@ -1435,8 +1435,8 @@ MmioWrite8 ( UINT8 EFIAPI MmioOr8 ( - IN UINTN Address, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 OrData ); /** @@ -1460,8 +1460,8 @@ MmioOr8 ( UINT8 EFIAPI MmioAnd8 ( - IN UINTN Address, - IN UINT8 AndData + IN UINTN Address, + IN UINT8 AndData ); /** @@ -1488,9 +1488,9 @@ MmioAnd8 ( UINT8 EFIAPI MmioAndThenOr8 ( - IN UINTN Address, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 AndData, + IN UINT8 OrData ); /** @@ -1516,9 +1516,9 @@ MmioAndThenOr8 ( UINT8 EFIAPI MmioBitFieldRead8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ); /** @@ -1547,10 +1547,10 @@ MmioBitFieldRead8 ( UINT8 EFIAPI MmioBitFieldWrite8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ); /** @@ -1583,10 +1583,10 @@ MmioBitFieldWrite8 ( UINT8 EFIAPI MmioBitFieldOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ); /** @@ -1619,10 +1619,10 @@ MmioBitFieldOr8 ( UINT8 EFIAPI MmioBitFieldAnd8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ); /** @@ -1658,11 +1658,11 @@ MmioBitFieldAnd8 ( UINT8 EFIAPI MmioBitFieldAndThenOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ); /** @@ -1683,7 +1683,7 @@ MmioBitFieldAndThenOr8 ( UINT16 EFIAPI MmioRead16 ( - IN UINTN Address + IN UINTN Address ); /** @@ -1705,8 +1705,8 @@ MmioRead16 ( UINT16 EFIAPI MmioWrite16 ( - IN UINTN Address, - IN UINT16 Value + IN UINTN Address, + IN UINT16 Value ); /** @@ -1731,8 +1731,8 @@ MmioWrite16 ( UINT16 EFIAPI MmioOr16 ( - IN UINTN Address, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 OrData ); /** @@ -1757,8 +1757,8 @@ MmioOr16 ( UINT16 EFIAPI MmioAnd16 ( - IN UINTN Address, - IN UINT16 AndData + IN UINTN Address, + IN UINT16 AndData ); /** @@ -1785,9 +1785,9 @@ MmioAnd16 ( UINT16 EFIAPI MmioAndThenOr16 ( - IN UINTN Address, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 AndData, + IN UINT16 OrData ); /** @@ -1814,9 +1814,9 @@ MmioAndThenOr16 ( UINT16 EFIAPI MmioBitFieldRead16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ); /** @@ -1846,10 +1846,10 @@ MmioBitFieldRead16 ( UINT16 EFIAPI MmioBitFieldWrite16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ); /** @@ -1883,10 +1883,10 @@ MmioBitFieldWrite16 ( UINT16 EFIAPI MmioBitFieldOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ); /** @@ -1920,10 +1920,10 @@ MmioBitFieldOr16 ( UINT16 EFIAPI MmioBitFieldAnd16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ); /** @@ -1960,11 +1960,11 @@ MmioBitFieldAnd16 ( UINT16 EFIAPI MmioBitFieldAndThenOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ); /** @@ -1985,7 +1985,7 @@ MmioBitFieldAndThenOr16 ( UINT32 EFIAPI MmioRead32 ( - IN UINTN Address + IN UINTN Address ); /** @@ -2007,8 +2007,8 @@ MmioRead32 ( UINT32 EFIAPI MmioWrite32 ( - IN UINTN Address, - IN UINT32 Value + IN UINTN Address, + IN UINT32 Value ); /** @@ -2033,8 +2033,8 @@ MmioWrite32 ( UINT32 EFIAPI MmioOr32 ( - IN UINTN Address, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 OrData ); /** @@ -2059,8 +2059,8 @@ MmioOr32 ( UINT32 EFIAPI MmioAnd32 ( - IN UINTN Address, - IN UINT32 AndData + IN UINTN Address, + IN UINT32 AndData ); /** @@ -2087,9 +2087,9 @@ MmioAnd32 ( UINT32 EFIAPI MmioAndThenOr32 ( - IN UINTN Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 AndData, + IN UINT32 OrData ); /** @@ -2116,9 +2116,9 @@ MmioAndThenOr32 ( UINT32 EFIAPI MmioBitFieldRead32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ); /** @@ -2148,10 +2148,10 @@ MmioBitFieldRead32 ( UINT32 EFIAPI MmioBitFieldWrite32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ); /** @@ -2185,10 +2185,10 @@ MmioBitFieldWrite32 ( UINT32 EFIAPI MmioBitFieldOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ); /** @@ -2222,10 +2222,10 @@ MmioBitFieldOr32 ( UINT32 EFIAPI MmioBitFieldAnd32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ); /** @@ -2262,11 +2262,11 @@ MmioBitFieldAnd32 ( UINT32 EFIAPI MmioBitFieldAndThenOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ); /** @@ -2287,7 +2287,7 @@ MmioBitFieldAndThenOr32 ( UINT64 EFIAPI MmioRead64 ( - IN UINTN Address + IN UINTN Address ); /** @@ -2307,8 +2307,8 @@ MmioRead64 ( UINT64 EFIAPI MmioWrite64 ( - IN UINTN Address, - IN UINT64 Value + IN UINTN Address, + IN UINT64 Value ); /** @@ -2333,8 +2333,8 @@ MmioWrite64 ( UINT64 EFIAPI MmioOr64 ( - IN UINTN Address, - IN UINT64 OrData + IN UINTN Address, + IN UINT64 OrData ); /** @@ -2359,8 +2359,8 @@ MmioOr64 ( UINT64 EFIAPI MmioAnd64 ( - IN UINTN Address, - IN UINT64 AndData + IN UINTN Address, + IN UINT64 AndData ); /** @@ -2387,9 +2387,9 @@ MmioAnd64 ( UINT64 EFIAPI MmioAndThenOr64 ( - IN UINTN Address, - IN UINT64 AndData, - IN UINT64 OrData + IN UINTN Address, + IN UINT64 AndData, + IN UINT64 OrData ); /** @@ -2416,9 +2416,9 @@ MmioAndThenOr64 ( UINT64 EFIAPI MmioBitFieldRead64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ); /** @@ -2448,10 +2448,10 @@ MmioBitFieldRead64 ( UINT64 EFIAPI MmioBitFieldWrite64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 Value ); /** @@ -2485,10 +2485,10 @@ MmioBitFieldWrite64 ( UINT64 EFIAPI MmioBitFieldOr64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 OrData ); /** @@ -2522,10 +2522,10 @@ MmioBitFieldOr64 ( UINT64 EFIAPI MmioBitFieldAnd64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData ); /** @@ -2562,11 +2562,11 @@ MmioBitFieldAnd64 ( UINT64 EFIAPI MmioBitFieldAndThenOr64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData, - IN UINT64 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData, + IN UINT64 OrData ); /** @@ -2590,9 +2590,9 @@ MmioBitFieldAndThenOr64 ( UINT8 * EFIAPI MmioReadBuffer8 ( - IN UINTN StartAddress, - IN UINTN Length, - OUT UINT8 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT8 *Buffer ); /** @@ -2620,9 +2620,9 @@ MmioReadBuffer8 ( UINT16 * EFIAPI MmioReadBuffer16 ( - IN UINTN StartAddress, - IN UINTN Length, - OUT UINT16 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT16 *Buffer ); /** @@ -2650,9 +2650,9 @@ MmioReadBuffer16 ( UINT32 * EFIAPI MmioReadBuffer32 ( - IN UINTN StartAddress, - IN UINTN Length, - OUT UINT32 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT32 *Buffer ); /** @@ -2680,9 +2680,9 @@ MmioReadBuffer32 ( UINT64 * EFIAPI MmioReadBuffer64 ( - IN UINTN StartAddress, - IN UINTN Length, - OUT UINT64 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT64 *Buffer ); /** @@ -2706,9 +2706,9 @@ MmioReadBuffer64 ( UINT8 * EFIAPI MmioWriteBuffer8 ( - IN UINTN StartAddress, - IN UINTN Length, - IN CONST UINT8 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT8 *Buffer ); /** @@ -2737,9 +2737,9 @@ MmioWriteBuffer8 ( UINT16 * EFIAPI MmioWriteBuffer16 ( - IN UINTN StartAddress, - IN UINTN Length, - IN CONST UINT16 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT16 *Buffer ); /** @@ -2768,9 +2768,9 @@ MmioWriteBuffer16 ( UINT32 * EFIAPI MmioWriteBuffer32 ( - IN UINTN StartAddress, - IN UINTN Length, - IN CONST UINT32 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT32 *Buffer ); /** @@ -2799,11 +2799,9 @@ MmioWriteBuffer32 ( UINT64 * EFIAPI MmioWriteBuffer64 ( - IN UINTN StartAddress, - IN UINTN Length, - IN CONST UINT64 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT64 *Buffer ); - #endif - diff --git a/MdePkg/Include/Library/MemoryAllocationLib.h b/MdePkg/Include/Library/MemoryAllocationLib.h index 65a30cf..9dd8410 100644 --- a/MdePkg/Include/Library/MemoryAllocationLib.h +++ b/MdePkg/Include/Library/MemoryAllocationLib.h @@ -481,7 +481,7 @@ ReallocateReservedPool ( VOID EFIAPI FreePool ( - IN VOID *Buffer + IN VOID *Buffer ); #endif diff --git a/MdePkg/Include/Library/MmServicesTableLib.h b/MdePkg/Include/Library/MmServicesTableLib.h index aa115e6..973ef33 100644 --- a/MdePkg/Include/Library/MmServicesTableLib.h +++ b/MdePkg/Include/Library/MmServicesTableLib.h @@ -14,6 +14,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include -extern EFI_MM_SYSTEM_TABLE *gMmst; +extern EFI_MM_SYSTEM_TABLE *gMmst; #endif diff --git a/MdePkg/Include/Library/MmUnblockMemoryLib.h b/MdePkg/Include/Library/MmUnblockMemoryLib.h index 00fab53..57ea55e 100644 --- a/MdePkg/Include/Library/MmUnblockMemoryLib.h +++ b/MdePkg/Include/Library/MmUnblockMemoryLib.h @@ -37,8 +37,8 @@ RETURN_STATUS EFIAPI MmUnblockMemoryRequest ( - IN PHYSICAL_ADDRESS UnblockAddress, - IN UINT64 NumberOfPages -); + IN PHYSICAL_ADDRESS UnblockAddress, + IN UINT64 NumberOfPages + ); #endif // MM_UNBLOCK_MEMORY_LIB_H_ diff --git a/MdePkg/Include/Library/OrderedCollectionLib.h b/MdePkg/Include/Library/OrderedCollectionLib.h index 24e296f..28d753f 100644 --- a/MdePkg/Include/Library/OrderedCollectionLib.h +++ b/MdePkg/Include/Library/OrderedCollectionLib.h @@ -82,7 +82,6 @@ INTN IN CONST VOID *UserStruct ); - // // Some functions below are read-only, while others are read-write. If any // write operation is expected to run concurrently with any other operation on @@ -104,10 +103,9 @@ INTN VOID * EFIAPI OrderedCollectionUserStruct ( - IN CONST ORDERED_COLLECTION_ENTRY *Entry + IN CONST ORDERED_COLLECTION_ENTRY *Entry ); - /** Allocate and initialize the ORDERED_COLLECTION structure. @@ -128,11 +126,10 @@ OrderedCollectionUserStruct ( ORDERED_COLLECTION * EFIAPI OrderedCollectionInit ( - IN ORDERED_COLLECTION_USER_COMPARE UserStructCompare, - IN ORDERED_COLLECTION_KEY_COMPARE KeyCompare + IN ORDERED_COLLECTION_USER_COMPARE UserStructCompare, + IN ORDERED_COLLECTION_KEY_COMPARE KeyCompare ); - /** Check whether the collection is empty (has no entries). @@ -147,10 +144,9 @@ OrderedCollectionInit ( BOOLEAN EFIAPI OrderedCollectionIsEmpty ( - IN CONST ORDERED_COLLECTION *Collection + IN CONST ORDERED_COLLECTION *Collection ); - /** Uninitialize and release an empty ORDERED_COLLECTION structure. @@ -164,10 +160,9 @@ OrderedCollectionIsEmpty ( VOID EFIAPI OrderedCollectionUninit ( - IN ORDERED_COLLECTION *Collection + IN ORDERED_COLLECTION *Collection ); - /** Look up the collection entry that links the user structure that matches the specified standalone key. @@ -188,11 +183,10 @@ OrderedCollectionUninit ( ORDERED_COLLECTION_ENTRY * EFIAPI OrderedCollectionFind ( - IN CONST ORDERED_COLLECTION *Collection, - IN CONST VOID *StandaloneKey + IN CONST ORDERED_COLLECTION *Collection, + IN CONST VOID *StandaloneKey ); - /** Find the collection entry of the minimum user structure stored in the collection. @@ -211,10 +205,9 @@ OrderedCollectionFind ( ORDERED_COLLECTION_ENTRY * EFIAPI OrderedCollectionMin ( - IN CONST ORDERED_COLLECTION *Collection + IN CONST ORDERED_COLLECTION *Collection ); - /** Find the collection entry of the maximum user structure stored in the collection. @@ -234,10 +227,9 @@ OrderedCollectionMin ( ORDERED_COLLECTION_ENTRY * EFIAPI OrderedCollectionMax ( - IN CONST ORDERED_COLLECTION *Collection + IN CONST ORDERED_COLLECTION *Collection ); - /** Get the collection entry of the least user structure that is greater than the one linked by Entry. @@ -255,10 +247,9 @@ OrderedCollectionMax ( ORDERED_COLLECTION_ENTRY * EFIAPI OrderedCollectionNext ( - IN CONST ORDERED_COLLECTION_ENTRY *Entry + IN CONST ORDERED_COLLECTION_ENTRY *Entry ); - /** Get the collection entry of the greatest user structure that is less than the one linked by Entry. @@ -276,10 +267,9 @@ OrderedCollectionNext ( ORDERED_COLLECTION_ENTRY * EFIAPI OrderedCollectionPrev ( - IN CONST ORDERED_COLLECTION_ENTRY *Entry + IN CONST ORDERED_COLLECTION_ENTRY *Entry ); - /** Insert (link) a user structure into the collection, allocating a new collection entry. @@ -344,12 +334,11 @@ OrderedCollectionPrev ( RETURN_STATUS EFIAPI OrderedCollectionInsert ( - IN OUT ORDERED_COLLECTION *Collection, - OUT ORDERED_COLLECTION_ENTRY **Entry OPTIONAL, - IN VOID *UserStruct + IN OUT ORDERED_COLLECTION *Collection, + OUT ORDERED_COLLECTION_ENTRY **Entry OPTIONAL, + IN VOID *UserStruct ); - /** Delete an entry from the collection, unlinking the associated user structure. @@ -411,9 +400,9 @@ OrderedCollectionInsert ( VOID EFIAPI OrderedCollectionDelete ( - IN OUT ORDERED_COLLECTION *Collection, - IN ORDERED_COLLECTION_ENTRY *Entry, - OUT VOID **UserStruct OPTIONAL + IN OUT ORDERED_COLLECTION *Collection, + IN ORDERED_COLLECTION_ENTRY *Entry, + OUT VOID **UserStruct OPTIONAL ); #endif diff --git a/MdePkg/Include/Library/PcdLib.h b/MdePkg/Include/Library/PcdLib.h index 538896c..4b103f0 100644 --- a/MdePkg/Include/Library/PcdLib.h +++ b/MdePkg/Include/Library/PcdLib.h @@ -22,7 +22,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #ifndef __PCD_LIB_H__ #define __PCD_LIB_H__ - /** Retrieves a token number based on a token name. @@ -34,8 +33,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return The token number associated with the PCD. **/ -#define PcdToken(TokenName) _PCD_TOKEN_##TokenName - +#define PcdToken(TokenName) _PCD_TOKEN_##TokenName /** Retrieves a Boolean PCD feature flag based on a token name. @@ -49,8 +47,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return Boolean value for the PCD feature flag. **/ -#define FeaturePcdGet(TokenName) _PCD_GET_MODE_BOOL_##TokenName - +#define FeaturePcdGet(TokenName) _PCD_GET_MODE_BOOL_##TokenName /** Retrieves an 8-bit fixed PCD token value based on a token name. @@ -64,8 +61,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return 8-bit value for the token specified by TokenName. **/ -#define FixedPcdGet8(TokenName) _PCD_VALUE_##TokenName - +#define FixedPcdGet8(TokenName) _PCD_VALUE_##TokenName /** Retrieves a 16-bit fixed PCD token value based on a token name. @@ -79,8 +75,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return 16-bit value for the token specified by TokenName. **/ -#define FixedPcdGet16(TokenName) _PCD_VALUE_##TokenName - +#define FixedPcdGet16(TokenName) _PCD_VALUE_##TokenName /** Retrieves a 32-bit fixed PCD token value based on a token name. @@ -94,8 +89,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return 32-bit value for the token specified by TokenName. **/ -#define FixedPcdGet32(TokenName) _PCD_VALUE_##TokenName - +#define FixedPcdGet32(TokenName) _PCD_VALUE_##TokenName /** Retrieves a 64-bit fixed PCD token value based on a token name. @@ -109,8 +103,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return 64-bit value for the token specified by TokenName. **/ -#define FixedPcdGet64(TokenName) _PCD_VALUE_##TokenName - +#define FixedPcdGet64(TokenName) _PCD_VALUE_##TokenName /** Retrieves a Boolean fixed PCD token value based on a token name. @@ -124,8 +117,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return The Boolean value for the token. **/ -#define FixedPcdGetBool(TokenName) _PCD_VALUE_##TokenName - +#define FixedPcdGetBool(TokenName) _PCD_VALUE_##TokenName /** Retrieves a pointer to a fixed PCD token buffer based on a token name. @@ -139,8 +131,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return A pointer to the buffer. **/ -#define FixedPcdGetPtr(TokenName) ((VOID *)_PCD_VALUE_##TokenName) - +#define FixedPcdGetPtr(TokenName) ((VOID *)_PCD_VALUE_##TokenName) /** Retrieves an 8-bit binary patchable PCD token value based on a token name. @@ -154,7 +145,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return An 8-bit binary patchable PCD token value. **/ -#define PatchPcdGet8(TokenName) _gPcd_BinaryPatch_##TokenName +#define PatchPcdGet8(TokenName) _gPcd_BinaryPatch_##TokenName /** Retrieves a 16-bit binary patchable PCD token value based on a token name. @@ -168,8 +159,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return A 16-bit binary patchable PCD token value. **/ -#define PatchPcdGet16(TokenName) _gPcd_BinaryPatch_##TokenName - +#define PatchPcdGet16(TokenName) _gPcd_BinaryPatch_##TokenName /** Retrieves a 32-bit binary patchable PCD token value based on a token name. @@ -183,8 +173,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return A 32-bit binary patchable PCD token value. **/ -#define PatchPcdGet32(TokenName) _gPcd_BinaryPatch_##TokenName - +#define PatchPcdGet32(TokenName) _gPcd_BinaryPatch_##TokenName /** Retrieves a 64-bit binary patchable PCD token value based on a token name. @@ -198,8 +187,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return A 64-bit binary patchable PCD token value. **/ -#define PatchPcdGet64(TokenName) _gPcd_BinaryPatch_##TokenName - +#define PatchPcdGet64(TokenName) _gPcd_BinaryPatch_##TokenName /** Retrieves a Boolean binary patchable PCD token value based on a token name. @@ -213,8 +201,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return The Boolean value for the token. **/ -#define PatchPcdGetBool(TokenName) _gPcd_BinaryPatch_##TokenName - +#define PatchPcdGetBool(TokenName) _gPcd_BinaryPatch_##TokenName /** Retrieves a pointer to a binary patchable PCD token buffer based on a token name. @@ -228,8 +215,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return A pointer to the buffer for the token. **/ -#define PatchPcdGetPtr(TokenName) ((VOID *)_gPcd_BinaryPatch_##TokenName) - +#define PatchPcdGetPtr(TokenName) ((VOID *)_gPcd_BinaryPatch_##TokenName) /** Sets an 8-bit binary patchable PCD token value based on a token name. @@ -244,8 +230,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return Return the Value that was set. **/ -#define PatchPcdSet8(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value)) - +#define PatchPcdSet8(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value)) /** Sets a 16-bit binary patchable PCD token value based on a token name. @@ -260,8 +245,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return Return the Value that was set. **/ -#define PatchPcdSet16(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value)) - +#define PatchPcdSet16(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value)) /** Sets a 32-bit binary patchable PCD token value based on a token name. @@ -276,8 +260,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return Return the Value that was set. **/ -#define PatchPcdSet32(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value)) - +#define PatchPcdSet32(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value)) /** Sets a 64-bit binary patchable PCD token value based on a token name. @@ -292,8 +275,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return Return the Value that was set. **/ -#define PatchPcdSet64(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value)) - +#define PatchPcdSet64(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value)) /** Sets a Boolean binary patchable PCD token value based on a token name. @@ -308,8 +290,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return Return the Value that was set. **/ -#define PatchPcdSetBool(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value)) - +#define PatchPcdSetBool(TokenName, Value) (_gPcd_BinaryPatch_##TokenName = (Value)) /** Sets a pointer to a binary patchable PCD token buffer based on a token name. @@ -340,6 +321,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent (Size), \ (Buffer) \ ) + /** Retrieves an 8-bit PCD token value based on a token name. @@ -351,8 +333,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return 8-bit value for the token specified by TokenName. **/ -#define PcdGet8(TokenName) _PCD_GET_MODE_8_##TokenName - +#define PcdGet8(TokenName) _PCD_GET_MODE_8_##TokenName /** Retrieves a 16-bit PCD token value based on a token name. @@ -365,8 +346,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return 16-bit value for the token specified by TokenName. **/ -#define PcdGet16(TokenName) _PCD_GET_MODE_16_##TokenName - +#define PcdGet16(TokenName) _PCD_GET_MODE_16_##TokenName /** Retrieves a 32-bit PCD token value based on a token name. @@ -379,8 +359,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return 32-bit value for the token specified by TokenName. **/ -#define PcdGet32(TokenName) _PCD_GET_MODE_32_##TokenName - +#define PcdGet32(TokenName) _PCD_GET_MODE_32_##TokenName /** Retrieves a 64-bit PCD token value based on a token name. @@ -393,8 +372,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return 64-bit value for the token specified by TokenName. **/ -#define PcdGet64(TokenName) _PCD_GET_MODE_64_##TokenName - +#define PcdGet64(TokenName) _PCD_GET_MODE_64_##TokenName /** Retrieves a pointer to a PCD token buffer based on a token name. @@ -407,8 +385,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return A pointer to the buffer. **/ -#define PcdGetPtr(TokenName) _PCD_GET_MODE_PTR_##TokenName - +#define PcdGetPtr(TokenName) _PCD_GET_MODE_PTR_##TokenName /** Retrieves a Boolean PCD token value based on a token name. @@ -421,8 +398,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return A Boolean PCD token value. **/ -#define PcdGetBool(TokenName) _PCD_GET_MODE_BOOL_##TokenName - +#define PcdGetBool(TokenName) _PCD_GET_MODE_BOOL_##TokenName /** Retrieves the size of a fixed PCD token based on a token name. @@ -435,8 +411,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return Return the size **/ -#define FixedPcdGetSize(TokenName) _PCD_SIZE_##TokenName - +#define FixedPcdGetSize(TokenName) _PCD_SIZE_##TokenName /** Retrieves the size of a binary patchable PCD token based on a token name. @@ -449,8 +424,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return Return the size **/ -#define PatchPcdGetSize(TokenName) _gPcd_BinaryPatch_Size_##TokenName - +#define PatchPcdGetSize(TokenName) _gPcd_BinaryPatch_Size_##TokenName /** Retrieves the size of the PCD token based on a token name. @@ -463,8 +437,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return Return the size **/ -#define PcdGetSize(TokenName) _PCD_GET_MODE_SIZE_##TokenName - +#define PcdGetSize(TokenName) _PCD_GET_MODE_SIZE_##TokenName /** Retrieve the size of a given PCD token. @@ -479,7 +452,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return Return the size. **/ -#define PcdGetExSize(Guid, TokenName) LibPcdGetExSize ((Guid), PcdTokenEx(Guid,TokenName)) +#define PcdGetExSize(Guid, TokenName) LibPcdGetExSize ((Guid), PcdTokenEx(Guid,TokenName)) /** Sets a 8-bit PCD token value based on a token name. @@ -493,7 +466,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return The status of the set operation. **/ -#define PcdSet8S(TokenName, Value) _PCD_SET_MODE_8_S_##TokenName ((Value)) +#define PcdSet8S(TokenName, Value) _PCD_SET_MODE_8_S_##TokenName ((Value)) /** Sets a 16-bit PCD token value based on a token name. @@ -507,7 +480,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return The status of the set operation. **/ -#define PcdSet16S(TokenName, Value) _PCD_SET_MODE_16_S_##TokenName ((Value)) +#define PcdSet16S(TokenName, Value) _PCD_SET_MODE_16_S_##TokenName ((Value)) /** Sets a 32-bit PCD token value based on a token name. @@ -521,7 +494,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return The status of the set operation. **/ -#define PcdSet32S(TokenName, Value) _PCD_SET_MODE_32_S_##TokenName ((Value)) +#define PcdSet32S(TokenName, Value) _PCD_SET_MODE_32_S_##TokenName ((Value)) /** Sets a 64-bit PCD token value based on a token name. @@ -535,7 +508,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return The status of the set operation. **/ -#define PcdSet64S(TokenName, Value) _PCD_SET_MODE_64_S_##TokenName ((Value)) +#define PcdSet64S(TokenName, Value) _PCD_SET_MODE_64_S_##TokenName ((Value)) /** Sets a pointer to a PCD token buffer based on a token name. @@ -561,8 +534,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define PcdSetPtrS(TokenName, SizeOfBuffer, Buffer) \ _PCD_SET_MODE_PTR_S_##TokenName ((SizeOfBuffer), (Buffer)) - - /** Sets a boolean PCD token value based on a token name. @@ -575,7 +546,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return The status of the set operation. **/ -#define PcdSetBoolS(TokenName, Value) _PCD_SET_MODE_BOOL_S_##TokenName ((Value)) +#define PcdSetBoolS(TokenName, Value) _PCD_SET_MODE_BOOL_S_##TokenName ((Value)) /** Retrieves a token number based on a GUID and a token name. @@ -590,7 +561,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return Return the token number. **/ -#define PcdTokenEx(Guid,TokenName) _PCD_TOKEN_EX_##TokenName(Guid) +#define PcdTokenEx(Guid, TokenName) _PCD_TOKEN_EX_##TokenName(Guid) /** Retrieves an 8-bit PCD token value based on a GUID and a token name. @@ -608,7 +579,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return An 8-bit PCD token value. **/ -#define PcdGetEx8(Guid, TokenName) LibPcdGetEx8 ((Guid), PcdTokenEx(Guid,TokenName)) +#define PcdGetEx8(Guid, TokenName) LibPcdGetEx8 ((Guid), PcdTokenEx(Guid,TokenName)) /** Retrieves a 16-bit PCD token value based on a GUID and a token name. @@ -626,8 +597,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return A 16-bit PCD token value. **/ -#define PcdGetEx16(Guid, TokenName) LibPcdGetEx16 ((Guid), PcdTokenEx(Guid,TokenName)) - +#define PcdGetEx16(Guid, TokenName) LibPcdGetEx16 ((Guid), PcdTokenEx(Guid,TokenName)) /** Retrieves a 32-bit PCD token value based on a GUID and a token name. @@ -645,8 +615,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return A 32-bit PCD token value. **/ -#define PcdGetEx32(Guid, TokenName) LibPcdGetEx32 ((Guid), PcdTokenEx(Guid,TokenName)) - +#define PcdGetEx32(Guid, TokenName) LibPcdGetEx32 ((Guid), PcdTokenEx(Guid,TokenName)) /** Retrieves a 64-bit PCD token value based on a GUID and a token name. @@ -664,8 +633,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return A 64-bit PCD token value. **/ -#define PcdGetEx64(Guid, TokenName) LibPcdGetEx64 ((Guid), PcdTokenEx(Guid,TokenName)) - +#define PcdGetEx64(Guid, TokenName) LibPcdGetEx64 ((Guid), PcdTokenEx(Guid,TokenName)) /** Retrieves a pointer to a PCD token buffer based on a GUID and a token name. @@ -683,8 +651,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return A pointer to a PCD token buffer. **/ -#define PcdGetExPtr(Guid, TokenName) LibPcdGetExPtr ((Guid), PcdTokenEx(Guid,TokenName)) - +#define PcdGetExPtr(Guid, TokenName) LibPcdGetExPtr ((Guid), PcdTokenEx(Guid,TokenName)) /** Retrieves a Boolean PCD token value based on a GUID and a token name. @@ -702,9 +669,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return A Boolean PCD token value. **/ -#define PcdGetExBool(Guid, TokenName) LibPcdGetExBool ((Guid), PcdTokenEx(Guid,TokenName)) - - +#define PcdGetExBool(Guid, TokenName) LibPcdGetExBool ((Guid), PcdTokenEx(Guid,TokenName)) /** Sets an 8-bit PCD token value based on a GUID and a token name. @@ -723,7 +688,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return The status of the set operation. **/ -#define PcdSetEx8S(Guid, TokenName, Value) LibPcdSetEx8S ((Guid), PcdTokenEx(Guid,TokenName), (Value)) +#define PcdSetEx8S(Guid, TokenName, Value) LibPcdSetEx8S ((Guid), PcdTokenEx(Guid,TokenName), (Value)) /** Sets an 16-bit PCD token value based on a GUID and a token name. @@ -742,7 +707,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return The status of the set operation. **/ -#define PcdSetEx16S(Guid, TokenName, Value) LibPcdSetEx16S ((Guid), PcdTokenEx(Guid,TokenName), (Value)) +#define PcdSetEx16S(Guid, TokenName, Value) LibPcdSetEx16S ((Guid), PcdTokenEx(Guid,TokenName), (Value)) /** Sets an 32-bit PCD token value based on a GUID and a token name. @@ -761,7 +726,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return The status of the set operation. **/ -#define PcdSetEx32S(Guid, TokenName, Value) LibPcdSetEx32S ((Guid), PcdTokenEx(Guid,TokenName), (Value)) +#define PcdSetEx32S(Guid, TokenName, Value) LibPcdSetEx32S ((Guid), PcdTokenEx(Guid,TokenName), (Value)) /** Sets an 64-bit PCD token value based on a GUID and a token name. @@ -780,7 +745,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return The status of the set operation. **/ -#define PcdSetEx64S(Guid, TokenName, Value) LibPcdSetEx64S ((Guid), PcdTokenEx(Guid,TokenName), (Value)) +#define PcdSetEx64S(Guid, TokenName, Value) LibPcdSetEx64S ((Guid), PcdTokenEx(Guid,TokenName), (Value)) /** Sets a pointer to a PCD token buffer based on a GUID and a token name. @@ -810,7 +775,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define PcdSetExPtrS(Guid, TokenName, SizeOfBuffer, Buffer) \ LibPcdSetExPtrS ((Guid), PcdTokenEx(Guid,TokenName), (SizeOfBuffer), (Buffer)) - /** Sets an boolean PCD token value based on a GUID and a token name. @@ -845,10 +809,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent UINTN EFIAPI LibPcdSetSku ( - IN UINTN SkuId + IN UINTN SkuId ); - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -862,10 +825,9 @@ LibPcdSetSku ( UINT8 EFIAPI LibPcdGet8 ( - IN UINTN TokenNumber + IN UINTN TokenNumber ); - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -879,10 +841,9 @@ LibPcdGet8 ( UINT16 EFIAPI LibPcdGet16 ( - IN UINTN TokenNumber + IN UINTN TokenNumber ); - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -896,10 +857,9 @@ LibPcdGet16 ( UINT32 EFIAPI LibPcdGet32 ( - IN UINTN TokenNumber + IN UINTN TokenNumber ); - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -913,10 +873,9 @@ LibPcdGet32 ( UINT64 EFIAPI LibPcdGet64 ( - IN UINTN TokenNumber + IN UINTN TokenNumber ); - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -930,10 +889,9 @@ LibPcdGet64 ( VOID * EFIAPI LibPcdGetPtr ( - IN UINTN TokenNumber + IN UINTN TokenNumber ); - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -947,10 +905,9 @@ LibPcdGetPtr ( BOOLEAN EFIAPI LibPcdGetBool ( - IN UINTN TokenNumber + IN UINTN TokenNumber ); - /** This function provides a means by which to retrieve the size of a given PCD token. @@ -962,10 +919,9 @@ LibPcdGetBool ( UINTN EFIAPI LibPcdGetSize ( - IN UINTN TokenNumber + IN UINTN TokenNumber ); - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -983,11 +939,10 @@ LibPcdGetSize ( UINT8 EFIAPI LibPcdGetEx8 ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ); - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -1005,11 +960,10 @@ LibPcdGetEx8 ( UINT16 EFIAPI LibPcdGetEx16 ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ); - /** Returns the 32-bit value for the token specified by TokenNumber and Guid. If Guid is NULL, then ASSERT(). @@ -1024,11 +978,10 @@ LibPcdGetEx16 ( UINT32 EFIAPI LibPcdGetEx32 ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ); - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -1046,11 +999,10 @@ LibPcdGetEx32 ( UINT64 EFIAPI LibPcdGetEx64 ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ); - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -1068,11 +1020,10 @@ LibPcdGetEx64 ( VOID * EFIAPI LibPcdGetExPtr ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ); - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -1090,11 +1041,10 @@ LibPcdGetExPtr ( BOOLEAN EFIAPI LibPcdGetExBool ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ); - /** This function provides a means by which to retrieve the size of a given PCD token. @@ -1112,11 +1062,10 @@ LibPcdGetExBool ( UINTN EFIAPI LibPcdGetExSize ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ); - /** This function provides a means by which to set a value for a given PCD token. @@ -1132,8 +1081,8 @@ LibPcdGetExSize ( RETURN_STATUS EFIAPI LibPcdSet8S ( - IN UINTN TokenNumber, - IN UINT8 Value + IN UINTN TokenNumber, + IN UINT8 Value ); /** @@ -1151,8 +1100,8 @@ LibPcdSet8S ( RETURN_STATUS EFIAPI LibPcdSet16S ( - IN UINTN TokenNumber, - IN UINT16 Value + IN UINTN TokenNumber, + IN UINT16 Value ); /** @@ -1170,8 +1119,8 @@ LibPcdSet16S ( RETURN_STATUS EFIAPI LibPcdSet32S ( - IN UINTN TokenNumber, - IN UINT32 Value + IN UINTN TokenNumber, + IN UINT32 Value ); /** @@ -1189,8 +1138,8 @@ LibPcdSet32S ( RETURN_STATUS EFIAPI LibPcdSet64S ( - IN UINTN TokenNumber, - IN UINT64 Value + IN UINTN TokenNumber, + IN UINT64 Value ); /** @@ -1218,9 +1167,9 @@ LibPcdSet64S ( RETURN_STATUS EFIAPI LibPcdSetPtrS ( - IN UINTN TokenNumber, - IN OUT UINTN *SizeOfBuffer, - IN CONST VOID *Buffer + IN UINTN TokenNumber, + IN OUT UINTN *SizeOfBuffer, + IN CONST VOID *Buffer ); /** @@ -1238,8 +1187,8 @@ LibPcdSetPtrS ( RETURN_STATUS EFIAPI LibPcdSetBoolS ( - IN UINTN TokenNumber, - IN BOOLEAN Value + IN UINTN TokenNumber, + IN BOOLEAN Value ); /** @@ -1261,9 +1210,9 @@ LibPcdSetBoolS ( RETURN_STATUS EFIAPI LibPcdSetEx8S ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - IN UINT8 Value + IN CONST GUID *Guid, + IN UINTN TokenNumber, + IN UINT8 Value ); /** @@ -1285,9 +1234,9 @@ LibPcdSetEx8S ( RETURN_STATUS EFIAPI LibPcdSetEx16S ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - IN UINT16 Value + IN CONST GUID *Guid, + IN UINTN TokenNumber, + IN UINT16 Value ); /** @@ -1309,9 +1258,9 @@ LibPcdSetEx16S ( RETURN_STATUS EFIAPI LibPcdSetEx32S ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - IN UINT32 Value + IN CONST GUID *Guid, + IN UINTN TokenNumber, + IN UINT32 Value ); /** @@ -1333,9 +1282,9 @@ LibPcdSetEx32S ( RETURN_STATUS EFIAPI LibPcdSetEx64S ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - IN UINT64 Value + IN CONST GUID *Guid, + IN UINTN TokenNumber, + IN UINT64 Value ); /** @@ -1363,10 +1312,10 @@ LibPcdSetEx64S ( RETURN_STATUS EFIAPI LibPcdSetExPtrS ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - IN OUT UINTN *SizeOfBuffer, - IN VOID *Buffer + IN CONST GUID *Guid, + IN UINTN TokenNumber, + IN OUT UINTN *SizeOfBuffer, + IN VOID *Buffer ); /** @@ -1388,9 +1337,9 @@ LibPcdSetExPtrS ( RETURN_STATUS EFIAPI LibPcdSetExBoolS ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - IN BOOLEAN Value + IN CONST GUID *Guid, + IN UINTN TokenNumber, + IN BOOLEAN Value ); /** @@ -1418,7 +1367,6 @@ VOID IN UINTN TokenDataSize ); - /** Set up a notification function that is called when a specified token is set. @@ -1438,12 +1386,11 @@ VOID VOID EFIAPI LibPcdCallbackOnSet ( - IN CONST GUID *Guid OPTIONAL, - IN UINTN TokenNumber, - IN PCD_CALLBACK NotificationFunction + IN CONST GUID *Guid OPTIONAL, + IN UINTN TokenNumber, + IN PCD_CALLBACK NotificationFunction ); - /** Disable a notification function that was established with LibPcdCallbackonSet(). @@ -1460,12 +1407,11 @@ LibPcdCallbackOnSet ( VOID EFIAPI LibPcdCancelCallback ( - IN CONST GUID *Guid OPTIONAL, - IN UINTN TokenNumber, - IN PCD_CALLBACK NotificationFunction + IN CONST GUID *Guid OPTIONAL, + IN UINTN TokenNumber, + IN PCD_CALLBACK NotificationFunction ); - /** Retrieves the next token in a token space. @@ -1488,12 +1434,10 @@ LibPcdCancelCallback ( UINTN EFIAPI LibPcdGetNextToken ( - IN CONST GUID *Guid OPTIONAL, - IN UINTN TokenNumber + IN CONST GUID *Guid OPTIONAL, + IN UINTN TokenNumber ); - - /** Used to retrieve the list of available PCD token space GUIDs. @@ -1513,7 +1457,6 @@ LibPcdGetNextTokenSpace ( IN CONST GUID *TokenSpaceGuid ); - /** Sets a value of a patchable PCD entry that is type pointer. @@ -1540,10 +1483,10 @@ LibPcdGetNextTokenSpace ( VOID * EFIAPI LibPatchPcdSetPtr ( - OUT VOID *PatchVariable, - IN UINTN MaximumDatumSize, - IN OUT UINTN *SizeOfBuffer, - IN CONST VOID *Buffer + OUT VOID *PatchVariable, + IN UINTN MaximumDatumSize, + IN OUT UINTN *SizeOfBuffer, + IN CONST VOID *Buffer ); /** @@ -1572,10 +1515,10 @@ LibPatchPcdSetPtr ( RETURN_STATUS EFIAPI LibPatchPcdSetPtrS ( - OUT VOID *PatchVariable, - IN UINTN MaximumDatumSize, - IN OUT UINTN *SizeOfBuffer, - IN CONST VOID *Buffer + OUT VOID *PatchVariable, + IN UINTN MaximumDatumSize, + IN OUT UINTN *SizeOfBuffer, + IN CONST VOID *Buffer ); /** @@ -1606,11 +1549,11 @@ LibPatchPcdSetPtrS ( VOID * EFIAPI LibPatchPcdSetPtrAndSize ( - OUT VOID *PatchVariable, - OUT UINTN *SizeOfPatchVariable, - IN UINTN MaximumDatumSize, - IN OUT UINTN *SizeOfBuffer, - IN CONST VOID *Buffer + OUT VOID *PatchVariable, + OUT UINTN *SizeOfPatchVariable, + IN UINTN MaximumDatumSize, + IN OUT UINTN *SizeOfBuffer, + IN CONST VOID *Buffer ); /** @@ -1641,11 +1584,11 @@ LibPatchPcdSetPtrAndSize ( RETURN_STATUS EFIAPI LibPatchPcdSetPtrAndSizeS ( - OUT VOID *PatchVariable, - OUT UINTN *SizeOfPatchVariable, - IN UINTN MaximumDatumSize, - IN OUT UINTN *SizeOfBuffer, - IN CONST VOID *Buffer + OUT VOID *PatchVariable, + OUT UINTN *SizeOfPatchVariable, + IN UINTN MaximumDatumSize, + IN OUT UINTN *SizeOfBuffer, + IN CONST VOID *Buffer ); typedef enum { @@ -1662,22 +1605,21 @@ typedef struct { /// The returned information associated with the requested TokenNumber. If /// TokenNumber is 0, then PcdType is set to PCD_TYPE_8. /// - PCD_TYPE PcdType; + PCD_TYPE PcdType; /// /// The size of the data in bytes associated with the TokenNumber specified. If /// TokenNumber is 0, then PcdSize is set 0. /// - UINTN PcdSize; + UINTN PcdSize; /// /// The null-terminated ASCII string associated with a given token. If the /// TokenNumber specified was 0, then this field corresponds to the null-terminated /// ASCII string associated with the token's namespace Guid. If NULL, there is no /// name associated with this request. /// - CHAR8 *PcdName; + CHAR8 *PcdName; } PCD_INFO; - /** Retrieve additional information associated with a PCD token. @@ -1693,8 +1635,8 @@ typedef struct { VOID EFIAPI LibPcdGetInfo ( - IN UINTN TokenNumber, - OUT PCD_INFO *PcdInfo + IN UINTN TokenNumber, + OUT PCD_INFO *PcdInfo ); /** @@ -1713,9 +1655,9 @@ LibPcdGetInfo ( VOID EFIAPI LibPcdGetInfoEx ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - OUT PCD_INFO *PcdInfo + IN CONST GUID *Guid, + IN UINTN TokenNumber, + OUT PCD_INFO *PcdInfo ); /** diff --git a/MdePkg/Include/Library/PciCf8Lib.h b/MdePkg/Include/Library/PciCf8Lib.h index 7e22a52..05b5fdd 100644 --- a/MdePkg/Include/Library/PciCf8Lib.h +++ b/MdePkg/Include/Library/PciCf8Lib.h @@ -13,7 +13,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #ifndef __PCI_CF8_LIB_H__ #define __PCI_CF8_LIB_H__ - /** Macro that converts PCI Bus, PCI Device, PCI Function and PCI Register to an address that can be passed to the PCI Library functions. @@ -30,7 +29,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return The encode PCI address. **/ -#define PCI_CF8_LIB_ADDRESS(Bus,Device,Function,Offset) \ +#define PCI_CF8_LIB_ADDRESS(Bus, Device, Function, Offset) \ (((Offset) & 0xfff) | (((Function) & 0x07) << 12) | (((Device) & 0x1f) << 15) | (((Bus) & 0xff) << 20)) /** @@ -80,7 +79,7 @@ PciCf8RegisterForRuntimeAccess ( UINT8 EFIAPI PciCf8Read8 ( - IN UINTN Address + IN UINTN Address ); /** @@ -103,8 +102,8 @@ PciCf8Read8 ( UINT8 EFIAPI PciCf8Write8 ( - IN UINTN Address, - IN UINT8 Value + IN UINTN Address, + IN UINT8 Value ); /** @@ -131,8 +130,8 @@ PciCf8Write8 ( UINT8 EFIAPI PciCf8Or8 ( - IN UINTN Address, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 OrData ); /** @@ -159,8 +158,8 @@ PciCf8Or8 ( UINT8 EFIAPI PciCf8And8 ( - IN UINTN Address, - IN UINT8 AndData + IN UINTN Address, + IN UINT8 AndData ); /** @@ -189,9 +188,9 @@ PciCf8And8 ( UINT8 EFIAPI PciCf8AndThenOr8 ( - IN UINTN Address, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 AndData, + IN UINT8 OrData ); /** @@ -219,9 +218,9 @@ PciCf8AndThenOr8 ( UINT8 EFIAPI PciCf8BitFieldRead8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ); /** @@ -252,10 +251,10 @@ PciCf8BitFieldRead8 ( UINT8 EFIAPI PciCf8BitFieldWrite8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ); /** @@ -289,10 +288,10 @@ PciCf8BitFieldWrite8 ( UINT8 EFIAPI PciCf8BitFieldOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ); /** @@ -326,10 +325,10 @@ PciCf8BitFieldOr8 ( UINT8 EFIAPI PciCf8BitFieldAnd8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ); /** @@ -367,11 +366,11 @@ PciCf8BitFieldAnd8 ( UINT8 EFIAPI PciCf8BitFieldAndThenOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ); /** @@ -394,7 +393,7 @@ PciCf8BitFieldAndThenOr8 ( UINT16 EFIAPI PciCf8Read16 ( - IN UINTN Address + IN UINTN Address ); /** @@ -418,8 +417,8 @@ PciCf8Read16 ( UINT16 EFIAPI PciCf8Write16 ( - IN UINTN Address, - IN UINT16 Value + IN UINTN Address, + IN UINT16 Value ); /** @@ -447,8 +446,8 @@ PciCf8Write16 ( UINT16 EFIAPI PciCf8Or16 ( - IN UINTN Address, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 OrData ); /** @@ -476,8 +475,8 @@ PciCf8Or16 ( UINT16 EFIAPI PciCf8And16 ( - IN UINTN Address, - IN UINT16 AndData + IN UINTN Address, + IN UINT16 AndData ); /** @@ -507,9 +506,9 @@ PciCf8And16 ( UINT16 EFIAPI PciCf8AndThenOr16 ( - IN UINTN Address, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 AndData, + IN UINT16 OrData ); /** @@ -538,9 +537,9 @@ PciCf8AndThenOr16 ( UINT16 EFIAPI PciCf8BitFieldRead16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ); /** @@ -572,10 +571,10 @@ PciCf8BitFieldRead16 ( UINT16 EFIAPI PciCf8BitFieldWrite16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ); /** @@ -610,10 +609,10 @@ PciCf8BitFieldWrite16 ( UINT16 EFIAPI PciCf8BitFieldOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ); /** @@ -648,10 +647,10 @@ PciCf8BitFieldOr16 ( UINT16 EFIAPI PciCf8BitFieldAnd16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ); /** @@ -690,11 +689,11 @@ PciCf8BitFieldAnd16 ( UINT16 EFIAPI PciCf8BitFieldAndThenOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ); /** @@ -717,7 +716,7 @@ PciCf8BitFieldAndThenOr16 ( UINT32 EFIAPI PciCf8Read32 ( - IN UINTN Address + IN UINTN Address ); /** @@ -741,8 +740,8 @@ PciCf8Read32 ( UINT32 EFIAPI PciCf8Write32 ( - IN UINTN Address, - IN UINT32 Value + IN UINTN Address, + IN UINT32 Value ); /** @@ -770,8 +769,8 @@ PciCf8Write32 ( UINT32 EFIAPI PciCf8Or32 ( - IN UINTN Address, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 OrData ); /** @@ -799,8 +798,8 @@ PciCf8Or32 ( UINT32 EFIAPI PciCf8And32 ( - IN UINTN Address, - IN UINT32 AndData + IN UINTN Address, + IN UINT32 AndData ); /** @@ -830,9 +829,9 @@ PciCf8And32 ( UINT32 EFIAPI PciCf8AndThenOr32 ( - IN UINTN Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 AndData, + IN UINT32 OrData ); /** @@ -861,9 +860,9 @@ PciCf8AndThenOr32 ( UINT32 EFIAPI PciCf8BitFieldRead32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ); /** @@ -895,10 +894,10 @@ PciCf8BitFieldRead32 ( UINT32 EFIAPI PciCf8BitFieldWrite32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ); /** @@ -933,10 +932,10 @@ PciCf8BitFieldWrite32 ( UINT32 EFIAPI PciCf8BitFieldOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ); /** @@ -971,10 +970,10 @@ PciCf8BitFieldOr32 ( UINT32 EFIAPI PciCf8BitFieldAnd32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ); /** @@ -1013,11 +1012,11 @@ PciCf8BitFieldAnd32 ( UINT32 EFIAPI PciCf8BitFieldAndThenOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ); /** @@ -1047,9 +1046,9 @@ PciCf8BitFieldAndThenOr32 ( UINTN EFIAPI PciCf8ReadBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - OUT VOID *Buffer + IN UINTN StartAddress, + IN UINTN Size, + OUT VOID *Buffer ); /** @@ -1080,9 +1079,9 @@ PciCf8ReadBuffer ( UINTN EFIAPI PciCf8WriteBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - IN VOID *Buffer + IN UINTN StartAddress, + IN UINTN Size, + IN VOID *Buffer ); #endif diff --git a/MdePkg/Include/Library/PciExpressLib.h b/MdePkg/Include/Library/PciExpressLib.h index d78193a..06deb65 100644 --- a/MdePkg/Include/Library/PciExpressLib.h +++ b/MdePkg/Include/Library/PciExpressLib.h @@ -32,7 +32,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return The encode PCI address. **/ -#define PCI_EXPRESS_LIB_ADDRESS(Bus,Device,Function,Offset) PCI_ECAM_ADDRESS ((Bus), (Device), (Function), (Offset)) +#define PCI_EXPRESS_LIB_ADDRESS(Bus, Device, Function, Offset) PCI_ECAM_ADDRESS ((Bus), (Device), (Function), (Offset)) /** Registers a PCI device so PCI configuration registers may be accessed after @@ -80,7 +80,7 @@ PciExpressRegisterForRuntimeAccess ( UINT8 EFIAPI PciExpressRead8 ( - IN UINTN Address + IN UINTN Address ); /** @@ -102,8 +102,8 @@ PciExpressRead8 ( UINT8 EFIAPI PciExpressWrite8 ( - IN UINTN Address, - IN UINT8 Value + IN UINTN Address, + IN UINT8 Value ); /** @@ -129,8 +129,8 @@ PciExpressWrite8 ( UINT8 EFIAPI PciExpressOr8 ( - IN UINTN Address, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 OrData ); /** @@ -156,8 +156,8 @@ PciExpressOr8 ( UINT8 EFIAPI PciExpressAnd8 ( - IN UINTN Address, - IN UINT8 AndData + IN UINTN Address, + IN UINT8 AndData ); /** @@ -185,9 +185,9 @@ PciExpressAnd8 ( UINT8 EFIAPI PciExpressAndThenOr8 ( - IN UINTN Address, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 AndData, + IN UINT8 OrData ); /** @@ -214,9 +214,9 @@ PciExpressAndThenOr8 ( UINT8 EFIAPI PciExpressBitFieldRead8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ); /** @@ -246,10 +246,10 @@ PciExpressBitFieldRead8 ( UINT8 EFIAPI PciExpressBitFieldWrite8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ); /** @@ -282,10 +282,10 @@ PciExpressBitFieldWrite8 ( UINT8 EFIAPI PciExpressBitFieldOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ); /** @@ -318,10 +318,10 @@ PciExpressBitFieldOr8 ( UINT8 EFIAPI PciExpressBitFieldAnd8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ); /** @@ -358,11 +358,11 @@ PciExpressBitFieldAnd8 ( UINT8 EFIAPI PciExpressBitFieldAndThenOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ); /** @@ -384,7 +384,7 @@ PciExpressBitFieldAndThenOr8 ( UINT16 EFIAPI PciExpressRead16 ( - IN UINTN Address + IN UINTN Address ); /** @@ -407,8 +407,8 @@ PciExpressRead16 ( UINT16 EFIAPI PciExpressWrite16 ( - IN UINTN Address, - IN UINT16 Value + IN UINTN Address, + IN UINT16 Value ); /** @@ -435,8 +435,8 @@ PciExpressWrite16 ( UINT16 EFIAPI PciExpressOr16 ( - IN UINTN Address, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 OrData ); /** @@ -463,8 +463,8 @@ PciExpressOr16 ( UINT16 EFIAPI PciExpressAnd16 ( - IN UINTN Address, - IN UINT16 AndData + IN UINTN Address, + IN UINT16 AndData ); /** @@ -493,9 +493,9 @@ PciExpressAnd16 ( UINT16 EFIAPI PciExpressAndThenOr16 ( - IN UINTN Address, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 AndData, + IN UINT16 OrData ); /** @@ -523,9 +523,9 @@ PciExpressAndThenOr16 ( UINT16 EFIAPI PciExpressBitFieldRead16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ); /** @@ -556,10 +556,10 @@ PciExpressBitFieldRead16 ( UINT16 EFIAPI PciExpressBitFieldWrite16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ); /** @@ -593,10 +593,10 @@ PciExpressBitFieldWrite16 ( UINT16 EFIAPI PciExpressBitFieldOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ); /** @@ -630,10 +630,10 @@ PciExpressBitFieldOr16 ( UINT16 EFIAPI PciExpressBitFieldAnd16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ); /** @@ -671,11 +671,11 @@ PciExpressBitFieldAnd16 ( UINT16 EFIAPI PciExpressBitFieldAndThenOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ); /** @@ -697,7 +697,7 @@ PciExpressBitFieldAndThenOr16 ( UINT32 EFIAPI PciExpressRead32 ( - IN UINTN Address + IN UINTN Address ); /** @@ -720,8 +720,8 @@ PciExpressRead32 ( UINT32 EFIAPI PciExpressWrite32 ( - IN UINTN Address, - IN UINT32 Value + IN UINTN Address, + IN UINT32 Value ); /** @@ -748,8 +748,8 @@ PciExpressWrite32 ( UINT32 EFIAPI PciExpressOr32 ( - IN UINTN Address, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 OrData ); /** @@ -776,8 +776,8 @@ PciExpressOr32 ( UINT32 EFIAPI PciExpressAnd32 ( - IN UINTN Address, - IN UINT32 AndData + IN UINTN Address, + IN UINT32 AndData ); /** @@ -806,9 +806,9 @@ PciExpressAnd32 ( UINT32 EFIAPI PciExpressAndThenOr32 ( - IN UINTN Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 AndData, + IN UINT32 OrData ); /** @@ -836,9 +836,9 @@ PciExpressAndThenOr32 ( UINT32 EFIAPI PciExpressBitFieldRead32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ); /** @@ -869,10 +869,10 @@ PciExpressBitFieldRead32 ( UINT32 EFIAPI PciExpressBitFieldWrite32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ); /** @@ -906,10 +906,10 @@ PciExpressBitFieldWrite32 ( UINT32 EFIAPI PciExpressBitFieldOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ); /** @@ -943,10 +943,10 @@ PciExpressBitFieldOr32 ( UINT32 EFIAPI PciExpressBitFieldAnd32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ); /** @@ -984,11 +984,11 @@ PciExpressBitFieldAnd32 ( UINT32 EFIAPI PciExpressBitFieldAndThenOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ); /** @@ -1017,9 +1017,9 @@ PciExpressBitFieldAndThenOr32 ( UINTN EFIAPI PciExpressReadBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - OUT VOID *Buffer + IN UINTN StartAddress, + IN UINTN Size, + OUT VOID *Buffer ); /** @@ -1049,9 +1049,9 @@ PciExpressReadBuffer ( UINTN EFIAPI PciExpressWriteBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - IN VOID *Buffer + IN UINTN StartAddress, + IN UINTN Size, + IN VOID *Buffer ); #endif diff --git a/MdePkg/Include/Library/PciLib.h b/MdePkg/Include/Library/PciLib.h index 836494b..382a3df 100644 --- a/MdePkg/Include/Library/PciLib.h +++ b/MdePkg/Include/Library/PciLib.h @@ -31,7 +31,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return The encoded PCI address. **/ -#define PCI_LIB_ADDRESS(Bus,Device,Function,Register) \ +#define PCI_LIB_ADDRESS(Bus, Device, Function, Register) \ (((Register) & 0xfff) | (((Function) & 0x07) << 12) | (((Device) & 0x1f) << 15) | (((Bus) & 0xff) << 20)) /** @@ -79,7 +79,7 @@ PciRegisterForRuntimeAccess ( UINT8 EFIAPI PciRead8 ( - IN UINTN Address + IN UINTN Address ); /** @@ -101,8 +101,8 @@ PciRead8 ( UINT8 EFIAPI PciWrite8 ( - IN UINTN Address, - IN UINT8 Value + IN UINTN Address, + IN UINT8 Value ); /** @@ -128,8 +128,8 @@ PciWrite8 ( UINT8 EFIAPI PciOr8 ( - IN UINTN Address, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 OrData ); /** @@ -155,8 +155,8 @@ PciOr8 ( UINT8 EFIAPI PciAnd8 ( - IN UINTN Address, - IN UINT8 AndData + IN UINTN Address, + IN UINT8 AndData ); /** @@ -184,9 +184,9 @@ PciAnd8 ( UINT8 EFIAPI PciAndThenOr8 ( - IN UINTN Address, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 AndData, + IN UINT8 OrData ); /** @@ -213,9 +213,9 @@ PciAndThenOr8 ( UINT8 EFIAPI PciBitFieldRead8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ); /** @@ -245,10 +245,10 @@ PciBitFieldRead8 ( UINT8 EFIAPI PciBitFieldWrite8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ); /** @@ -281,10 +281,10 @@ PciBitFieldWrite8 ( UINT8 EFIAPI PciBitFieldOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ); /** @@ -317,10 +317,10 @@ PciBitFieldOr8 ( UINT8 EFIAPI PciBitFieldAnd8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ); /** @@ -357,11 +357,11 @@ PciBitFieldAnd8 ( UINT8 EFIAPI PciBitFieldAndThenOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ); /** @@ -383,7 +383,7 @@ PciBitFieldAndThenOr8 ( UINT16 EFIAPI PciRead16 ( - IN UINTN Address + IN UINTN Address ); /** @@ -406,8 +406,8 @@ PciRead16 ( UINT16 EFIAPI PciWrite16 ( - IN UINTN Address, - IN UINT16 Value + IN UINTN Address, + IN UINT16 Value ); /** @@ -434,8 +434,8 @@ PciWrite16 ( UINT16 EFIAPI PciOr16 ( - IN UINTN Address, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 OrData ); /** @@ -462,8 +462,8 @@ PciOr16 ( UINT16 EFIAPI PciAnd16 ( - IN UINTN Address, - IN UINT16 AndData + IN UINTN Address, + IN UINT16 AndData ); /** @@ -492,9 +492,9 @@ PciAnd16 ( UINT16 EFIAPI PciAndThenOr16 ( - IN UINTN Address, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 AndData, + IN UINT16 OrData ); /** @@ -522,9 +522,9 @@ PciAndThenOr16 ( UINT16 EFIAPI PciBitFieldRead16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ); /** @@ -555,10 +555,10 @@ PciBitFieldRead16 ( UINT16 EFIAPI PciBitFieldWrite16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ); /** @@ -592,10 +592,10 @@ PciBitFieldWrite16 ( UINT16 EFIAPI PciBitFieldOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ); /** @@ -629,10 +629,10 @@ PciBitFieldOr16 ( UINT16 EFIAPI PciBitFieldAnd16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ); /** @@ -670,11 +670,11 @@ PciBitFieldAnd16 ( UINT16 EFIAPI PciBitFieldAndThenOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ); /** @@ -696,7 +696,7 @@ PciBitFieldAndThenOr16 ( UINT32 EFIAPI PciRead32 ( - IN UINTN Address + IN UINTN Address ); /** @@ -719,8 +719,8 @@ PciRead32 ( UINT32 EFIAPI PciWrite32 ( - IN UINTN Address, - IN UINT32 Value + IN UINTN Address, + IN UINT32 Value ); /** @@ -747,8 +747,8 @@ PciWrite32 ( UINT32 EFIAPI PciOr32 ( - IN UINTN Address, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 OrData ); /** @@ -775,8 +775,8 @@ PciOr32 ( UINT32 EFIAPI PciAnd32 ( - IN UINTN Address, - IN UINT32 AndData + IN UINTN Address, + IN UINT32 AndData ); /** @@ -805,9 +805,9 @@ PciAnd32 ( UINT32 EFIAPI PciAndThenOr32 ( - IN UINTN Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 AndData, + IN UINT32 OrData ); /** @@ -835,9 +835,9 @@ PciAndThenOr32 ( UINT32 EFIAPI PciBitFieldRead32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ); /** @@ -868,10 +868,10 @@ PciBitFieldRead32 ( UINT32 EFIAPI PciBitFieldWrite32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ); /** @@ -905,10 +905,10 @@ PciBitFieldWrite32 ( UINT32 EFIAPI PciBitFieldOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ); /** @@ -942,10 +942,10 @@ PciBitFieldOr32 ( UINT32 EFIAPI PciBitFieldAnd32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ); /** @@ -983,11 +983,11 @@ PciBitFieldAnd32 ( UINT32 EFIAPI PciBitFieldAndThenOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ); /** @@ -1016,9 +1016,9 @@ PciBitFieldAndThenOr32 ( UINTN EFIAPI PciReadBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - OUT VOID *Buffer + IN UINTN StartAddress, + IN UINTN Size, + OUT VOID *Buffer ); /** @@ -1048,9 +1048,9 @@ PciReadBuffer ( UINTN EFIAPI PciWriteBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - IN VOID *Buffer + IN UINTN StartAddress, + IN UINTN Size, + IN VOID *Buffer ); #endif diff --git a/MdePkg/Include/Library/PciSegmentInfoLib.h b/MdePkg/Include/Library/PciSegmentInfoLib.h index 659ff85..6124e36 100644 --- a/MdePkg/Include/Library/PciSegmentInfoLib.h +++ b/MdePkg/Include/Library/PciSegmentInfoLib.h @@ -12,10 +12,10 @@ #define __PCI_SEGMENT_INFO_LIB__ typedef struct { - UINT16 SegmentNumber; ///< Segment number. - UINT64 BaseAddress; ///< ECAM Base address. - UINT8 StartBusNumber; ///< Start BUS number, for verifying the PCI Segment address. - UINT8 EndBusNumber; ///< End BUS number, for verifying the PCI Segment address. + UINT16 SegmentNumber; ///< Segment number. + UINT64 BaseAddress; ///< ECAM Base address. + UINT8 StartBusNumber; ///< Start BUS number, for verifying the PCI Segment address. + UINT8 EndBusNumber; ///< End BUS number, for verifying the PCI Segment address. } PCI_SEGMENT_INFO; /** diff --git a/MdePkg/Include/Library/PciSegmentLib.h b/MdePkg/Include/Library/PciSegmentLib.h index fcd98db..4795dc1 100644 --- a/MdePkg/Include/Library/PciSegmentLib.h +++ b/MdePkg/Include/Library/PciSegmentLib.h @@ -31,7 +31,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #ifndef __PCI_SEGMENT_LIB__ #define __PCI_SEGMENT_LIB__ - /** Macro that converts PCI Segment, PCI Bus, PCI Device, PCI Function, and PCI Register to an address that can be passed to the PCI Segment Library functions. @@ -49,7 +48,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @return The address that is compatible with the PCI Segment Library functions. **/ -#define PCI_SEGMENT_LIB_ADDRESS(Segment,Bus,Device,Function,Register) \ +#define PCI_SEGMENT_LIB_ADDRESS(Segment, Bus, Device, Function, Register) \ ((Segment != 0) ? \ ( ((Register) & 0xfff) | \ (((Function) & 0x07) << 12) | \ @@ -104,7 +103,7 @@ PciSegmentRegisterForRuntimeAccess ( UINT8 EFIAPI PciSegmentRead8 ( - IN UINT64 Address + IN UINT64 Address ); /** @@ -124,8 +123,8 @@ PciSegmentRead8 ( UINT8 EFIAPI PciSegmentWrite8 ( - IN UINT64 Address, - IN UINT8 Value + IN UINT64 Address, + IN UINT8 Value ); /** @@ -148,8 +147,8 @@ PciSegmentWrite8 ( UINT8 EFIAPI PciSegmentOr8 ( - IN UINT64 Address, - IN UINT8 OrData + IN UINT64 Address, + IN UINT8 OrData ); /** @@ -171,8 +170,8 @@ PciSegmentOr8 ( UINT8 EFIAPI PciSegmentAnd8 ( - IN UINT64 Address, - IN UINT8 AndData + IN UINT64 Address, + IN UINT8 AndData ); /** @@ -198,9 +197,9 @@ PciSegmentAnd8 ( UINT8 EFIAPI PciSegmentAndThenOr8 ( - IN UINT64 Address, - IN UINT8 AndData, - IN UINT8 OrData + IN UINT64 Address, + IN UINT8 AndData, + IN UINT8 OrData ); /** @@ -227,9 +226,9 @@ PciSegmentAndThenOr8 ( UINT8 EFIAPI PciSegmentBitFieldRead8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit ); /** @@ -259,10 +258,10 @@ PciSegmentBitFieldRead8 ( UINT8 EFIAPI PciSegmentBitFieldWrite8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ); /** @@ -295,10 +294,10 @@ PciSegmentBitFieldWrite8 ( UINT8 EFIAPI PciSegmentBitFieldOr8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ); /** @@ -331,10 +330,10 @@ PciSegmentBitFieldOr8 ( UINT8 EFIAPI PciSegmentBitFieldAnd8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ); /** @@ -370,11 +369,11 @@ PciSegmentBitFieldAnd8 ( UINT8 EFIAPI PciSegmentBitFieldAndThenOr8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ); /** @@ -394,7 +393,7 @@ PciSegmentBitFieldAndThenOr8 ( UINT16 EFIAPI PciSegmentRead16 ( - IN UINT64 Address + IN UINT64 Address ); /** @@ -415,8 +414,8 @@ PciSegmentRead16 ( UINT16 EFIAPI PciSegmentWrite16 ( - IN UINT64 Address, - IN UINT16 Value + IN UINT64 Address, + IN UINT16 Value ); /** @@ -442,8 +441,8 @@ PciSegmentWrite16 ( UINT16 EFIAPI PciSegmentOr16 ( - IN UINT64 Address, - IN UINT16 OrData + IN UINT64 Address, + IN UINT16 OrData ); /** @@ -467,8 +466,8 @@ PciSegmentOr16 ( UINT16 EFIAPI PciSegmentAnd16 ( - IN UINT64 Address, - IN UINT16 AndData + IN UINT64 Address, + IN UINT16 AndData ); /** @@ -495,9 +494,9 @@ PciSegmentAnd16 ( UINT16 EFIAPI PciSegmentAndThenOr16 ( - IN UINT64 Address, - IN UINT16 AndData, - IN UINT16 OrData + IN UINT64 Address, + IN UINT16 AndData, + IN UINT16 OrData ); /** @@ -525,9 +524,9 @@ PciSegmentAndThenOr16 ( UINT16 EFIAPI PciSegmentBitFieldRead16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit ); /** @@ -558,10 +557,10 @@ PciSegmentBitFieldRead16 ( UINT16 EFIAPI PciSegmentBitFieldWrite16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ); /** @@ -595,10 +594,10 @@ PciSegmentBitFieldWrite16 ( UINT16 EFIAPI PciSegmentBitFieldOr16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ); /** @@ -632,10 +631,10 @@ PciSegmentBitFieldOr16 ( UINT16 EFIAPI PciSegmentBitFieldAnd16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ); /** @@ -672,11 +671,11 @@ PciSegmentBitFieldAnd16 ( UINT16 EFIAPI PciSegmentBitFieldAndThenOr16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ); /** @@ -696,7 +695,7 @@ PciSegmentBitFieldAndThenOr16 ( UINT32 EFIAPI PciSegmentRead32 ( - IN UINT64 Address + IN UINT64 Address ); /** @@ -717,8 +716,8 @@ PciSegmentRead32 ( UINT32 EFIAPI PciSegmentWrite32 ( - IN UINT64 Address, - IN UINT32 Value + IN UINT64 Address, + IN UINT32 Value ); /** @@ -742,8 +741,8 @@ PciSegmentWrite32 ( UINT32 EFIAPI PciSegmentOr32 ( - IN UINT64 Address, - IN UINT32 OrData + IN UINT64 Address, + IN UINT32 OrData ); /** @@ -767,8 +766,8 @@ PciSegmentOr32 ( UINT32 EFIAPI PciSegmentAnd32 ( - IN UINT64 Address, - IN UINT32 AndData + IN UINT64 Address, + IN UINT32 AndData ); /** @@ -795,9 +794,9 @@ PciSegmentAnd32 ( UINT32 EFIAPI PciSegmentAndThenOr32 ( - IN UINT64 Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINT64 Address, + IN UINT32 AndData, + IN UINT32 OrData ); /** @@ -825,9 +824,9 @@ PciSegmentAndThenOr32 ( UINT32 EFIAPI PciSegmentBitFieldRead32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit ); /** @@ -858,10 +857,10 @@ PciSegmentBitFieldRead32 ( UINT32 EFIAPI PciSegmentBitFieldWrite32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ); /** @@ -894,10 +893,10 @@ PciSegmentBitFieldWrite32 ( UINT32 EFIAPI PciSegmentBitFieldOr32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ); /** @@ -930,10 +929,10 @@ PciSegmentBitFieldOr32 ( UINT32 EFIAPI PciSegmentBitFieldAnd32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ); /** @@ -970,11 +969,11 @@ PciSegmentBitFieldAnd32 ( UINT32 EFIAPI PciSegmentBitFieldAndThenOr32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ); /** @@ -1003,9 +1002,9 @@ PciSegmentBitFieldAndThenOr32 ( UINTN EFIAPI PciSegmentReadBuffer ( - IN UINT64 StartAddress, - IN UINTN Size, - OUT VOID *Buffer + IN UINT64 StartAddress, + IN UINTN Size, + OUT VOID *Buffer ); /** @@ -1035,9 +1034,9 @@ PciSegmentReadBuffer ( UINTN EFIAPI PciSegmentWriteBuffer ( - IN UINT64 StartAddress, - IN UINTN Size, - IN VOID *Buffer + IN UINT64 StartAddress, + IN UINTN Size, + IN VOID *Buffer ); #endif diff --git a/MdePkg/Include/Library/PeCoffGetEntryPointLib.h b/MdePkg/Include/Library/PeCoffGetEntryPointLib.h index 7bc0df8..466d749 100644 --- a/MdePkg/Include/Library/PeCoffGetEntryPointLib.h +++ b/MdePkg/Include/Library/PeCoffGetEntryPointLib.h @@ -76,7 +76,6 @@ PeCoffLoaderGetPdbPointer ( IN VOID *Pe32Data ); - /** Returns the size of the PE/COFF headers @@ -92,7 +91,7 @@ PeCoffLoaderGetPdbPointer ( UINT32 EFIAPI PeCoffGetSizeOfHeaders ( - IN VOID *Pe32Data + IN VOID *Pe32Data ); /** @@ -110,7 +109,7 @@ PeCoffGetSizeOfHeaders ( UINTN EFIAPI PeCoffSearchImageBase ( - IN UINTN Address + IN UINTN Address ); #endif diff --git a/MdePkg/Include/Library/PeCoffLib.h b/MdePkg/Include/Library/PeCoffLib.h index ba65628..b458794 100644 --- a/MdePkg/Include/Library/PeCoffLib.h +++ b/MdePkg/Include/Library/PeCoffLib.h @@ -76,121 +76,121 @@ typedef struct { /// /// Set by PeCoffLoaderGetImageInfo() to the ImageBase in the PE/COFF header. /// - PHYSICAL_ADDRESS ImageAddress; + PHYSICAL_ADDRESS ImageAddress; /// /// Set by PeCoffLoaderGetImageInfo() to the SizeOfImage in the PE/COFF header. /// Image size includes the size of Debug Entry if it is present. /// - UINT64 ImageSize; + UINT64 ImageSize; /// /// Is set to zero by PeCoffLoaderGetImageInfo(). If DestinationAddress is non-zero, /// PeCoffLoaderRelocateImage() will relocate the image using this base address. /// If the DestinationAddress is zero, the ImageAddress will be used as the base /// address of relocation. /// - PHYSICAL_ADDRESS DestinationAddress; + PHYSICAL_ADDRESS DestinationAddress; /// /// PeCoffLoaderLoadImage() sets EntryPoint to to the entry point of the PE/COFF image. /// - PHYSICAL_ADDRESS EntryPoint; + PHYSICAL_ADDRESS EntryPoint; /// /// Passed in by the caller to PeCoffLoaderGetImageInfo() and PeCoffLoaderLoadImage() /// to abstract accessing the image from the library. /// - PE_COFF_LOADER_READ_FILE ImageRead; + PE_COFF_LOADER_READ_FILE ImageRead; /// /// Used as the FileHandle passed into the ImageRead function when it's called. /// - VOID *Handle; + VOID *Handle; /// /// Caller allocated buffer of size FixupDataSize that can be optionally allocated /// prior to calling PeCoffLoaderRelocateImage(). /// This buffer is filled with the information used to fix up the image. /// The fixups have been applied to the image and this entry is just for information. /// - VOID *FixupData; + VOID *FixupData; /// /// Set by PeCoffLoaderGetImageInfo() to the Section Alignment in the PE/COFF header. /// If the image is a TE image, then this field is set to 0. /// - UINT32 SectionAlignment; + UINT32 SectionAlignment; /// /// Set by PeCoffLoaderGetImageInfo() to offset to the PE/COFF header. /// If the PE/COFF image does not start with a DOS header, this value is zero. /// Otherwise, it's the offset to the PE/COFF header. /// - UINT32 PeCoffHeaderOffset; + UINT32 PeCoffHeaderOffset; /// /// Set by PeCoffLoaderGetImageInfo() to the Relative Virtual Address of the debug directory, /// if it exists in the image /// - UINT32 DebugDirectoryEntryRva; + UINT32 DebugDirectoryEntryRva; /// /// Set by PeCoffLoaderLoadImage() to CodeView area of the PE/COFF Debug directory. /// - VOID *CodeView; + VOID *CodeView; /// /// Set by PeCoffLoaderLoadImage() to point to the PDB entry contained in the CodeView area. /// The PdbPointer points to the filename of the PDB file used for source-level debug of /// the image by a debugger. /// - CHAR8 *PdbPointer; + CHAR8 *PdbPointer; /// /// Is set by PeCoffLoaderGetImageInfo() to the Section Alignment in the PE/COFF header. /// - UINTN SizeOfHeaders; + UINTN SizeOfHeaders; /// /// Not used by this library class. Other library classes that layer on top of this library /// class fill in this value as part of their GetImageInfo call. /// This allows the caller of the library to know what type of memory needs to be allocated /// to load and relocate the image. /// - UINT32 ImageCodeMemoryType; + UINT32 ImageCodeMemoryType; /// /// Not used by this library class. Other library classes that layer on top of this library /// class fill in this value as part of their GetImageInfo call. /// This allows the caller of the library to know what type of memory needs to be allocated /// to load and relocate the image. /// - UINT32 ImageDataMemoryType; + UINT32 ImageDataMemoryType; /// /// Set by any of the library functions if they encounter an error. /// - UINT32 ImageError; + UINT32 ImageError; /// /// Set by PeCoffLoaderLoadImage() to indicate the size of FixupData that the caller must /// allocate before calling PeCoffLoaderRelocateImage(). /// - UINTN FixupDataSize; + UINTN FixupDataSize; /// /// Set by PeCoffLoaderGetImageInfo() to the machine type stored in the PE/COFF header. /// - UINT16 Machine; + UINT16 Machine; /// /// Set by PeCoffLoaderGetImageInfo() to the subsystem type stored in the PE/COFF header. /// - UINT16 ImageType; + UINT16 ImageType; /// /// Set by PeCoffLoaderGetImageInfo() to TRUE if the PE/COFF image does not contain /// relocation information. /// - BOOLEAN RelocationsStripped; + BOOLEAN RelocationsStripped; /// /// Set by PeCoffLoaderGetImageInfo() to TRUE if the image is a TE image. /// For a definition of the TE Image format, see the Platform Initialization Pre-EFI /// Initialization Core Interface Specification. /// - BOOLEAN IsTeImage; + BOOLEAN IsTeImage; /// /// Set by PeCoffLoaderLoadImage() to the HII resource offset /// if the image contains a custom PE/COFF resource with the type 'HII'. /// Otherwise, the entry remains to be 0. /// - PHYSICAL_ADDRESS HiiResourceData; + PHYSICAL_ADDRESS HiiResourceData; /// /// Private storage for implementation specific data. /// - UINT64 Context; + UINT64 Context; } PE_COFF_LOADER_IMAGE_CONTEXT; /** @@ -296,7 +296,6 @@ PeCoffLoaderLoadImage ( IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext ); - /** Reads contents of a PE/COFF image from a buffer in system memory. @@ -323,13 +322,12 @@ PeCoffLoaderLoadImage ( RETURN_STATUS EFIAPI PeCoffLoaderImageReadFromMemory ( - IN VOID *FileHandle, - IN UINTN FileOffset, - IN OUT UINTN *ReadSize, - OUT VOID *Buffer + IN VOID *FileHandle, + IN UINTN FileOffset, + IN OUT UINTN *ReadSize, + OUT VOID *Buffer ); - /** Reapply fixups on a fixed up PE32/PE32+ image to allow virtual calling at EFI runtime. @@ -356,10 +354,10 @@ PeCoffLoaderImageReadFromMemory ( VOID EFIAPI PeCoffLoaderRelocateImageForRuntime ( - IN PHYSICAL_ADDRESS ImageBase, - IN PHYSICAL_ADDRESS VirtImageBase, - IN UINTN ImageSize, - IN VOID *RelocationData + IN PHYSICAL_ADDRESS ImageBase, + IN PHYSICAL_ADDRESS VirtImageBase, + IN UINTN ImageSize, + IN VOID *RelocationData ); /** @@ -383,4 +381,5 @@ EFIAPI PeCoffLoaderUnloadImage ( IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext ); + #endif diff --git a/MdePkg/Include/Library/PeiCoreEntryPoint.h b/MdePkg/Include/Library/PeiCoreEntryPoint.h index 4077e06..0bb9bcf 100644 --- a/MdePkg/Include/Library/PeiCoreEntryPoint.h +++ b/MdePkg/Include/Library/PeiCoreEntryPoint.h @@ -41,7 +41,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ VOID EFIAPI -_ModuleEntryPoint( +_ModuleEntryPoint ( IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData, IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList ); @@ -92,11 +92,10 @@ EfiMain ( VOID EFIAPI ProcessLibraryConstructorList ( - IN EFI_PEI_FILE_HANDLE FileHandle, - IN CONST EFI_PEI_SERVICES **PeiServices + IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_SERVICES **PeiServices ); - /** Autogenerated function that calls a set of module entry points. diff --git a/MdePkg/Include/Library/PeiServicesLib.h b/MdePkg/Include/Library/PeiServicesLib.h index e2f3bb5..0ca032e 100644 --- a/MdePkg/Include/Library/PeiServicesLib.h +++ b/MdePkg/Include/Library/PeiServicesLib.h @@ -24,7 +24,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent EFI_STATUS EFIAPI PeiServicesInstallPpi ( - IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList + IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList ); /** @@ -45,8 +45,8 @@ PeiServicesInstallPpi ( EFI_STATUS EFIAPI PeiServicesReInstallPpi ( - IN CONST EFI_PEI_PPI_DESCRIPTOR *OldPpi, - IN CONST EFI_PEI_PPI_DESCRIPTOR *NewPpi + IN CONST EFI_PEI_PPI_DESCRIPTOR *OldPpi, + IN CONST EFI_PEI_PPI_DESCRIPTOR *NewPpi ); /** @@ -65,10 +65,10 @@ PeiServicesReInstallPpi ( EFI_STATUS EFIAPI PeiServicesLocatePpi ( - IN CONST EFI_GUID *Guid, - IN UINTN Instance, - IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor OPTIONAL, - IN OUT VOID **Ppi + IN CONST EFI_GUID *Guid, + IN UINTN Instance, + IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor OPTIONAL, + IN OUT VOID **Ppi ); /** @@ -103,7 +103,7 @@ PeiServicesNotifyPpi ( EFI_STATUS EFIAPI PeiServicesGetBootMode ( - OUT EFI_BOOT_MODE *BootMode + OUT EFI_BOOT_MODE *BootMode ); /** @@ -117,7 +117,7 @@ PeiServicesGetBootMode ( EFI_STATUS EFIAPI PeiServicesSetBootMode ( - IN EFI_BOOT_MODE BootMode + IN EFI_BOOT_MODE BootMode ); /** @@ -132,7 +132,7 @@ PeiServicesSetBootMode ( EFI_STATUS EFIAPI PeiServicesGetHobList ( - OUT VOID **HobList + OUT VOID **HobList ); /** @@ -149,9 +149,9 @@ PeiServicesGetHobList ( EFI_STATUS EFIAPI PeiServicesCreateHob ( - IN UINT16 Type, - IN UINT16 Length, - OUT VOID **Hob + IN UINT16 Type, + IN UINT16 Length, + OUT VOID **Hob ); /** @@ -169,8 +169,8 @@ PeiServicesCreateHob ( EFI_STATUS EFIAPI PeiServicesFfsFindNextVolume ( - IN UINTN Instance, - IN OUT EFI_PEI_FV_HANDLE *VolumeHandle + IN UINTN Instance, + IN OUT EFI_PEI_FV_HANDLE *VolumeHandle ); /** @@ -189,9 +189,9 @@ PeiServicesFfsFindNextVolume ( EFI_STATUS EFIAPI PeiServicesFfsFindNextFile ( - IN EFI_FV_FILETYPE SearchType, - IN EFI_PEI_FV_HANDLE VolumeHandle, - IN OUT EFI_PEI_FILE_HANDLE *FileHandle + IN EFI_FV_FILETYPE SearchType, + IN EFI_PEI_FV_HANDLE VolumeHandle, + IN OUT EFI_PEI_FILE_HANDLE *FileHandle ); /** @@ -209,9 +209,9 @@ PeiServicesFfsFindNextFile ( EFI_STATUS EFIAPI PeiServicesFfsFindSectionData ( - IN EFI_SECTION_TYPE SectionType, - IN EFI_PEI_FILE_HANDLE FileHandle, - OUT VOID **SectionData + IN EFI_SECTION_TYPE SectionType, + IN EFI_PEI_FILE_HANDLE FileHandle, + OUT VOID **SectionData ); /** @@ -231,11 +231,11 @@ PeiServicesFfsFindSectionData ( EFI_STATUS EFIAPI PeiServicesFfsFindSectionData3 ( - IN EFI_SECTION_TYPE SectionType, - IN UINTN SectionInstance, - IN EFI_PEI_FILE_HANDLE FileHandle, - OUT VOID **SectionData, - OUT UINT32 *AuthenticationStatus + IN EFI_SECTION_TYPE SectionType, + IN UINTN SectionInstance, + IN EFI_PEI_FILE_HANDLE FileHandle, + OUT VOID **SectionData, + OUT UINT32 *AuthenticationStatus ); /** @@ -253,8 +253,8 @@ PeiServicesFfsFindSectionData3 ( EFI_STATUS EFIAPI PeiServicesInstallPeiMemory ( - IN EFI_PHYSICAL_ADDRESS MemoryBegin, - IN UINT64 MemoryLength + IN EFI_PHYSICAL_ADDRESS MemoryBegin, + IN UINT64 MemoryLength ); /** @@ -274,9 +274,9 @@ PeiServicesInstallPeiMemory ( EFI_STATUS EFIAPI PeiServicesAllocatePages ( - IN EFI_MEMORY_TYPE MemoryType, - IN UINTN Pages, - OUT EFI_PHYSICAL_ADDRESS *Memory + IN EFI_MEMORY_TYPE MemoryType, + IN UINTN Pages, + OUT EFI_PHYSICAL_ADDRESS *Memory ); /** @@ -294,8 +294,8 @@ PeiServicesAllocatePages ( EFI_STATUS EFIAPI PeiServicesFreePages ( - IN EFI_PHYSICAL_ADDRESS Memory, - IN UINTN Pages + IN EFI_PHYSICAL_ADDRESS Memory, + IN UINTN Pages ); /** @@ -312,8 +312,8 @@ PeiServicesFreePages ( EFI_STATUS EFIAPI PeiServicesAllocatePool ( - IN UINTN Size, - OUT VOID **Buffer + IN UINTN Size, + OUT VOID **Buffer ); /** @@ -329,7 +329,6 @@ PeiServicesResetSystem ( VOID ); - /** This service is a wrapper for the PEI Service FfsFindByName(), except the pointer to the PEI Services Table has been removed. See the Platform Initialization Pre-EFI Initialization Core Interface @@ -354,12 +353,11 @@ PeiServicesResetSystem ( EFI_STATUS EFIAPI PeiServicesFfsFindFileByName ( - IN CONST EFI_GUID *FileName, - IN CONST EFI_PEI_FV_HANDLE VolumeHandle, - OUT EFI_PEI_FILE_HANDLE *FileHandle + IN CONST EFI_GUID *FileName, + IN CONST EFI_PEI_FV_HANDLE VolumeHandle, + OUT EFI_PEI_FILE_HANDLE *FileHandle ); - /** This service is a wrapper for the PEI Service FfsGetFileInfo(), except the pointer to the PEI Services Table has been removed. See the Platform Initialization Pre-EFI Initialization Core Interface @@ -381,8 +379,8 @@ PeiServicesFfsFindFileByName ( EFI_STATUS EFIAPI PeiServicesFfsGetFileInfo ( - IN CONST EFI_PEI_FILE_HANDLE FileHandle, - OUT EFI_FV_FILE_INFO *FileInfo + IN CONST EFI_PEI_FILE_HANDLE FileHandle, + OUT EFI_FV_FILE_INFO *FileInfo ); /** @@ -406,8 +404,8 @@ PeiServicesFfsGetFileInfo ( EFI_STATUS EFIAPI PeiServicesFfsGetFileInfo2 ( - IN CONST EFI_PEI_FILE_HANDLE FileHandle, - OUT EFI_FV_FILE_INFO2 *FileInfo + IN CONST EFI_PEI_FILE_HANDLE FileHandle, + OUT EFI_FV_FILE_INFO2 *FileInfo ); /** @@ -431,11 +429,10 @@ PeiServicesFfsGetFileInfo2 ( EFI_STATUS EFIAPI PeiServicesFfsGetVolumeInfo ( - IN EFI_PEI_FV_HANDLE VolumeHandle, - OUT EFI_FV_INFO *VolumeInfo + IN EFI_PEI_FV_HANDLE VolumeHandle, + OUT EFI_FV_INFO *VolumeInfo ); - /** This service is a wrapper for the PEI Service RegisterForShadow(), except the pointer to the PEI Services Table has been removed. See the Platform Initialization Pre-EFI Initialization Core Interface @@ -456,7 +453,7 @@ PeiServicesFfsGetVolumeInfo ( EFI_STATUS EFIAPI PeiServicesRegisterForShadow ( - IN EFI_PEI_FILE_HANDLE FileHandle + IN EFI_PEI_FILE_HANDLE FileHandle ); /** @@ -486,11 +483,11 @@ PeiServicesRegisterForShadow ( VOID EFIAPI PeiServicesInstallFvInfoPpi ( - IN CONST EFI_GUID *FvFormat OPTIONAL, - IN CONST VOID *FvInfo, - IN UINT32 FvInfoSize, - IN CONST EFI_GUID *ParentFvName OPTIONAL, - IN CONST EFI_GUID *ParentFileName OPTIONAL + IN CONST EFI_GUID *FvFormat OPTIONAL, + IN CONST VOID *FvInfo, + IN UINT32 FvInfoSize, + IN CONST EFI_GUID *ParentFvName OPTIONAL, + IN CONST EFI_GUID *ParentFileName OPTIONAL ); /** @@ -526,12 +523,12 @@ PeiServicesInstallFvInfoPpi ( VOID EFIAPI PeiServicesInstallFvInfo2Ppi ( - IN CONST EFI_GUID *FvFormat OPTIONAL, - IN CONST VOID *FvInfo, - IN UINT32 FvInfoSize, - IN CONST EFI_GUID *ParentFvName OPTIONAL, - IN CONST EFI_GUID *ParentFileName OPTIONAL, - IN UINT32 AuthenticationStatus + IN CONST EFI_GUID *FvFormat OPTIONAL, + IN CONST VOID *FvInfo, + IN UINT32 FvInfoSize, + IN CONST EFI_GUID *ParentFvName OPTIONAL, + IN CONST EFI_GUID *ParentFileName OPTIONAL, + IN UINT32 AuthenticationStatus ); /** @@ -550,10 +547,10 @@ PeiServicesInstallFvInfo2Ppi ( VOID EFIAPI PeiServicesResetSystem2 ( - IN EFI_RESET_TYPE ResetType, - IN EFI_STATUS ResetStatus, - IN UINTN DataSize, - IN VOID *ResetData OPTIONAL + IN EFI_RESET_TYPE ResetType, + IN EFI_STATUS ResetStatus, + IN UINTN DataSize, + IN VOID *ResetData OPTIONAL ); #endif diff --git a/MdePkg/Include/Library/PeiServicesTablePointerLib.h b/MdePkg/Include/Library/PeiServicesTablePointerLib.h index 1945460..61635ef 100644 --- a/MdePkg/Include/Library/PeiServicesTablePointerLib.h +++ b/MdePkg/Include/Library/PeiServicesTablePointerLib.h @@ -41,7 +41,7 @@ GetPeiServicesTablePointer ( VOID EFIAPI SetPeiServicesTablePointer ( - IN CONST EFI_PEI_SERVICES ** PeiServicesTablePointer + IN CONST EFI_PEI_SERVICES **PeiServicesTablePointer ); /** @@ -65,4 +65,3 @@ MigratePeiServicesTablePointer ( ); #endif - diff --git a/MdePkg/Include/Library/PeimEntryPoint.h b/MdePkg/Include/Library/PeimEntryPoint.h index 8873c31..f093859 100644 --- a/MdePkg/Include/Library/PeimEntryPoint.h +++ b/MdePkg/Include/Library/PeimEntryPoint.h @@ -12,8 +12,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// Declare the EFI/UEFI Specification Revision to which this driver is implemented /// -extern CONST UINT32 _gPeimRevision; - +extern CONST UINT32 _gPeimRevision; /** The entry point of PE/COFF Image for a PEIM. @@ -31,11 +30,10 @@ extern CONST UINT32 _gPeimRevision; EFI_STATUS EFIAPI _ModuleEntryPoint ( - IN EFI_PEI_FILE_HANDLE FileHandle, - IN CONST EFI_PEI_SERVICES **PeiServices + IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_SERVICES **PeiServices ); - /** Required by the EBC compiler and identical in functionality to _ModuleEntryPoint(). @@ -51,8 +49,8 @@ _ModuleEntryPoint ( EFI_STATUS EFIAPI EfiMain ( - IN EFI_PEI_FILE_HANDLE FileHandle, - IN CONST EFI_PEI_SERVICES **PeiServices + IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_SERVICES **PeiServices ); /** @@ -74,8 +72,8 @@ EfiMain ( VOID EFIAPI ProcessLibraryConstructorList ( - IN EFI_PEI_FILE_HANDLE FileHandle, - IN CONST EFI_PEI_SERVICES **PeiServices + IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_SERVICES **PeiServices ); /** @@ -96,8 +94,8 @@ ProcessLibraryConstructorList ( EFI_STATUS EFIAPI ProcessModuleEntryPointList ( - IN EFI_PEI_FILE_HANDLE FileHandle, - IN CONST EFI_PEI_SERVICES **PeiServices + IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_SERVICES **PeiServices ); #endif diff --git a/MdePkg/Include/Library/PerformanceLib.h b/MdePkg/Include/Library/PerformanceLib.h index 7f0bfb3..711e3fc 100644 --- a/MdePkg/Include/Library/PerformanceLib.h +++ b/MdePkg/Include/Library/PerformanceLib.h @@ -17,41 +17,41 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // // Public Progress Identifiers for Event Records. // -#define PERF_EVENT_ID 0x00 - -#define MODULE_START_ID 0x01 -#define MODULE_END_ID 0x02 -#define MODULE_LOADIMAGE_START_ID 0x03 -#define MODULE_LOADIMAGE_END_ID 0x04 -#define MODULE_DB_START_ID 0x05 -#define MODULE_DB_END_ID 0x06 -#define MODULE_DB_SUPPORT_START_ID 0x07 -#define MODULE_DB_SUPPORT_END_ID 0x08 -#define MODULE_DB_STOP_START_ID 0x09 -#define MODULE_DB_STOP_END_ID 0x0A - -#define PERF_EVENTSIGNAL_START_ID 0x10 -#define PERF_EVENTSIGNAL_END_ID 0x11 -#define PERF_CALLBACK_START_ID 0x20 -#define PERF_CALLBACK_END_ID 0x21 -#define PERF_FUNCTION_START_ID 0x30 -#define PERF_FUNCTION_END_ID 0x31 -#define PERF_INMODULE_START_ID 0x40 -#define PERF_INMODULE_END_ID 0x41 -#define PERF_CROSSMODULE_START_ID 0x50 -#define PERF_CROSSMODULE_END_ID 0x51 +#define PERF_EVENT_ID 0x00 + +#define MODULE_START_ID 0x01 +#define MODULE_END_ID 0x02 +#define MODULE_LOADIMAGE_START_ID 0x03 +#define MODULE_LOADIMAGE_END_ID 0x04 +#define MODULE_DB_START_ID 0x05 +#define MODULE_DB_END_ID 0x06 +#define MODULE_DB_SUPPORT_START_ID 0x07 +#define MODULE_DB_SUPPORT_END_ID 0x08 +#define MODULE_DB_STOP_START_ID 0x09 +#define MODULE_DB_STOP_END_ID 0x0A + +#define PERF_EVENTSIGNAL_START_ID 0x10 +#define PERF_EVENTSIGNAL_END_ID 0x11 +#define PERF_CALLBACK_START_ID 0x20 +#define PERF_CALLBACK_END_ID 0x21 +#define PERF_FUNCTION_START_ID 0x30 +#define PERF_FUNCTION_END_ID 0x31 +#define PERF_INMODULE_START_ID 0x40 +#define PERF_INMODULE_END_ID 0x41 +#define PERF_CROSSMODULE_START_ID 0x50 +#define PERF_CROSSMODULE_END_ID 0x51 // // Declare bits for PcdPerformanceLibraryPropertyMask and // also used as the Type parameter of LogPerformanceMeasurementEnabled(). // -#define PERF_CORE_START_IMAGE 0x0002 -#define PERF_CORE_LOAD_IMAGE 0x0004 -#define PERF_CORE_DB_SUPPORT 0x0008 -#define PERF_CORE_DB_START 0x0010 -#define PERF_CORE_DB_STOP 0x0020 +#define PERF_CORE_START_IMAGE 0x0002 +#define PERF_CORE_LOAD_IMAGE 0x0004 +#define PERF_CORE_DB_SUPPORT 0x0008 +#define PERF_CORE_DB_START 0x0010 +#define PERF_CORE_DB_STOP 0x0020 -#define PERF_GENERAL_TYPE 0x0040 +#define PERF_GENERAL_TYPE 0x0040 /** Creates a record for the beginning of a performance measurement. @@ -157,12 +157,12 @@ EndPerformanceMeasurement ( UINTN EFIAPI GetPerformanceMeasurement ( - IN UINTN LogEntryKey, - OUT CONST VOID **Handle, - OUT CONST CHAR8 **Token, - OUT CONST CHAR8 **Module, - OUT UINT64 *StartTimeStamp, - OUT UINT64 *EndTimeStamp + IN UINTN LogEntryKey, + OUT CONST VOID **Handle, + OUT CONST CHAR8 **Token, + OUT CONST CHAR8 **Module, + OUT UINT64 *StartTimeStamp, + OUT UINT64 *EndTimeStamp ); /** @@ -277,13 +277,13 @@ EndPerformanceMeasurementEx ( UINTN EFIAPI GetPerformanceMeasurementEx ( - IN UINTN LogEntryKey, - OUT CONST VOID **Handle, - OUT CONST CHAR8 **Token, - OUT CONST CHAR8 **Module, - OUT UINT64 *StartTimeStamp, - OUT UINT64 *EndTimeStamp, - OUT UINT32 *Identifier + IN UINTN LogEntryKey, + OUT CONST VOID **Handle, + OUT CONST CHAR8 **Token, + OUT CONST CHAR8 **Module, + OUT UINT64 *StartTimeStamp, + OUT UINT64 *EndTimeStamp, + OUT UINT32 *Identifier ); /** @@ -304,7 +304,6 @@ PerformanceMeasurementEnabled ( VOID ); - /** Check whether the specified performance measurement can be logged. @@ -320,7 +319,7 @@ PerformanceMeasurementEnabled ( BOOLEAN EFIAPI LogPerformanceMeasurementEnabled ( - IN CONST UINTN Type + IN CONST UINTN Type ); /** @@ -745,7 +744,7 @@ LogPerformanceMeasurement ( Otherwise, the source lines between PERF_CODE_BEGIN() and PERF_CODE_END() are not included in a module. **/ -#define PERF_CODE_END() __PerformanceCodeLocal = 0; __PerformanceCodeLocal++; } } while (FALSE) +#define PERF_CODE_END() __PerformanceCodeLocal = 0; __PerformanceCodeLocal++; } } while (FALSE) /** Macro that declares a section of performance measurement source code. @@ -762,5 +761,4 @@ LogPerformanceMeasurement ( Expression \ PERF_CODE_END () - #endif diff --git a/MdePkg/Include/Library/PostCodeLib.h b/MdePkg/Include/Library/PostCodeLib.h index 2c2922c..80628d7 100644 --- a/MdePkg/Include/Library/PostCodeLib.h +++ b/MdePkg/Include/Library/PostCodeLib.h @@ -36,7 +36,6 @@ PostCode ( IN UINT32 Value ); - /** Sends a 32-bit value to a POST and associated ASCII string. @@ -68,7 +67,6 @@ PostCodeWithDescription ( IN CONST CHAR8 *Description OPTIONAL ); - /** Returns TRUE if POST Codes are enabled. @@ -87,7 +85,6 @@ PostCodeEnabled ( VOID ); - /** Returns TRUE if POST code descriptions are enabled. @@ -106,7 +103,6 @@ PostCodeDescriptionEnabled ( VOID ); - /** Sends a 32-bit value to a POST card. @@ -134,7 +130,7 @@ PostCodeDescriptionEnabled ( @return Value The 32-bit value to write to the POST card. **/ -#define POST_CODE_WITH_DESCRIPTION(Value,Description) \ +#define POST_CODE_WITH_DESCRIPTION(Value, Description) \ PostCodeEnabled() ? \ (PostCodeDescriptionEnabled() ? \ PostCodeWithDescription(Value,Description) : \ diff --git a/MdePkg/Include/Library/PrintLib.h b/MdePkg/Include/Library/PrintLib.h index 0b38da6..8d523ca 100644 --- a/MdePkg/Include/Library/PrintLib.h +++ b/MdePkg/Include/Library/PrintLib.h @@ -192,10 +192,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// Flags bitmask values use in UnicodeValueToString() and /// AsciiValueToString() /// -#define LEFT_JUSTIFY 0x01 -#define COMMA_TYPE 0x08 -#define PREFIX_ZERO 0x20 -#define RADIX_HEX 0x80 +#define LEFT_JUSTIFY 0x01 +#define COMMA_TYPE 0x08 +#define PREFIX_ZERO 0x20 +#define RADIX_HEX 0x80 /** Produces a Null-terminated Unicode string in an output buffer based on @@ -586,10 +586,10 @@ UnicodeValueToStringS ( UINTN EFIAPI AsciiVSPrint ( - OUT CHAR8 *StartOfBuffer, - IN UINTN BufferSize, - IN CONST CHAR8 *FormatString, - IN VA_LIST Marker + OUT CHAR8 *StartOfBuffer, + IN UINTN BufferSize, + IN CONST CHAR8 *FormatString, + IN VA_LIST Marker ); /** @@ -630,10 +630,10 @@ AsciiVSPrint ( UINTN EFIAPI AsciiBSPrint ( - OUT CHAR8 *StartOfBuffer, - IN UINTN BufferSize, - IN CONST CHAR8 *FormatString, - IN BASE_LIST Marker + OUT CHAR8 *StartOfBuffer, + IN UINTN BufferSize, + IN CONST CHAR8 *FormatString, + IN BASE_LIST Marker ); /** @@ -826,7 +826,6 @@ AsciiSPrintUnicodeFormat ( ... ); - /** Converts a decimal value to a Null-terminated Ascii string. @@ -879,11 +878,11 @@ AsciiSPrintUnicodeFormat ( RETURN_STATUS EFIAPI AsciiValueToStringS ( - IN OUT CHAR8 *Buffer, - IN UINTN BufferSize, - IN UINTN Flags, - IN INT64 Value, - IN UINTN Width + IN OUT CHAR8 *Buffer, + IN UINTN BufferSize, + IN UINTN Flags, + IN INT64 Value, + IN UINTN Width ); /** @@ -906,7 +905,7 @@ AsciiValueToStringS ( UINTN EFIAPI SPrintLength ( - IN CONST CHAR16 *FormatString, + IN CONST CHAR16 *FormatString, IN VA_LIST Marker ); @@ -928,8 +927,8 @@ SPrintLength ( UINTN EFIAPI SPrintLengthAsciiFormat ( - IN CONST CHAR8 *FormatString, - IN VA_LIST Marker + IN CONST CHAR8 *FormatString, + IN VA_LIST Marker ); #endif diff --git a/MdePkg/Include/Library/RegisterFilterLib.h b/MdePkg/Include/Library/RegisterFilterLib.h index c4402da..75f359c 100644 --- a/MdePkg/Include/Library/RegisterFilterLib.h +++ b/MdePkg/Include/Library/RegisterFilterLib.h @@ -35,9 +35,9 @@ typedef enum { BOOLEAN EFIAPI FilterBeforeIoRead ( - IN FILTER_IO_WIDTH Width, - IN UINTN Address, - IN OUT VOID *Buffer + IN FILTER_IO_WIDTH Width, + IN UINTN Address, + IN OUT VOID *Buffer ); /** @@ -56,6 +56,7 @@ FilterAfterIoRead ( IN UINTN Address, IN VOID *Buffer ); + /** Filter IO Write operation before wirte IO port. It is used to filter IO operation. @@ -79,13 +80,13 @@ FilterBeforeIoWrite ( IN VOID *Buffer ); - /** - Trace IO Write operation after wirte IO port. - It is used to trace IO operation. +/** +Trace IO Write operation after wirte IO port. +It is used to trace IO operation. - @param[in] Width Signifies the width of the I/O operation. - @param[in] Address The base address of the I/O operation. - @param[in] Buffer The source buffer from which to BeforeWrite data. +@param[in] Width Signifies the width of the I/O operation. +@param[in] Address The base address of the I/O operation. +@param[in] Buffer The source buffer from which to BeforeWrite data. **/ VOID @@ -188,8 +189,8 @@ FilterAfterMmIoWrite ( BOOLEAN EFIAPI FilterBeforeMsrRead ( - IN UINT32 Index, - IN OUT UINT64 *Value + IN UINT32 Index, + IN OUT UINT64 *Value ); /** @@ -202,8 +203,8 @@ FilterBeforeMsrRead ( VOID EFIAPI FilterAfterMsrRead ( - IN UINT32 Index, - IN UINT64 *Value + IN UINT32 Index, + IN UINT64 *Value ); /** @@ -222,8 +223,8 @@ FilterAfterMsrRead ( BOOLEAN EFIAPI FilterBeforeMsrWrite ( - IN UINT32 Index, - IN UINT64 *Value + IN UINT32 Index, + IN UINT64 *Value ); /** @@ -236,8 +237,8 @@ FilterBeforeMsrWrite ( VOID EFIAPI FilterAfterMsrWrite ( - IN UINT32 Index, - IN UINT64 *Value + IN UINT32 Index, + IN UINT64 *Value ); #endif // REGISTER_FILTER_LIB_H_ diff --git a/MdePkg/Include/Library/ReportStatusCodeLib.h b/MdePkg/Include/Library/ReportStatusCodeLib.h index d8281e3..3763e69 100644 --- a/MdePkg/Include/Library/ReportStatusCodeLib.h +++ b/MdePkg/Include/Library/ReportStatusCodeLib.h @@ -16,9 +16,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // // Declare bits for PcdReportStatusCodePropertyMask // -#define REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED 0x00000001 -#define REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED 0x00000002 -#define REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED 0x00000004 +#define REPORT_STATUS_CODE_PROPERTY_PROGRESS_CODE_ENABLED 0x00000001 +#define REPORT_STATUS_CODE_PROPERTY_ERROR_CODE_ENABLED 0x00000002 +#define REPORT_STATUS_CODE_PROPERTY_DEBUG_CODE_ENABLED 0x00000004 /** Converts a status code to an 8-bit POST code value. @@ -49,7 +49,6 @@ CodeTypeToPostCode ( OUT UINT8 *PostCode ); - /** Extracts ASSERT() information from a status code structure. @@ -94,7 +93,6 @@ ReportStatusCodeExtractAssertInfo ( OUT UINT32 *LineNumber ); - /** Extracts DEBUG() information from a status code structure. @@ -133,7 +131,6 @@ ReportStatusCodeExtractDebugInfo ( OUT CHAR8 **Format ); - /** Reports a status code. @@ -162,7 +159,6 @@ ReportStatusCode ( IN EFI_STATUS_CODE_VALUE Value ); - /** Reports a status code with a Device Path Protocol as the extended data. @@ -200,7 +196,6 @@ ReportStatusCodeWithDevicePath ( IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath ); - /** Reports a status code with an extended data buffer. @@ -245,7 +240,6 @@ ReportStatusCodeWithExtendedData ( IN UINTN ExtendedDataSize ); - /** Reports a status code with full parameters. @@ -300,7 +294,6 @@ ReportStatusCodeEx ( IN UINTN ExtendedDataSize ); - /** Returns TRUE if status codes of type EFI_PROGRESS_CODE are enabled @@ -319,7 +312,6 @@ ReportProgressCodeEnabled ( VOID ); - /** Returns TRUE if status codes of type EFI_ERROR_CODE are enabled @@ -338,7 +330,6 @@ ReportErrorCodeEnabled ( VOID ); - /** Returns TRUE if status codes of type EFI_DEBUG_CODE are enabled @@ -357,7 +348,6 @@ ReportDebugCodeEnabled ( VOID ); - /** Reports a status code with minimal parameters if the status code type is enabled. @@ -373,7 +363,7 @@ ReportDebugCodeEnabled ( @retval EFI_UNSUPPORTED Report status code is not supported. **/ -#define REPORT_STATUS_CODE(Type,Value) \ +#define REPORT_STATUS_CODE(Type, Value) \ (ReportProgressCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) ? \ ReportStatusCode(Type,Value) : \ (ReportErrorCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) ? \ @@ -382,7 +372,6 @@ ReportDebugCodeEnabled ( ReportStatusCode(Type,Value) : \ EFI_UNSUPPORTED - /** Reports a status code with a Device Path Protocol as the extended data if the status code type is enabled. @@ -404,7 +393,7 @@ ReportDebugCodeEnabled ( is already in progress. **/ -#define REPORT_STATUS_CODE_WITH_DEVICE_PATH(Type,Value,DevicePathParameter) \ +#define REPORT_STATUS_CODE_WITH_DEVICE_PATH(Type, Value, DevicePathParameter) \ (ReportProgressCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) ? \ ReportStatusCodeWithDevicePath(Type,Value,DevicePathParameter) : \ (ReportErrorCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) ? \ @@ -413,7 +402,6 @@ ReportDebugCodeEnabled ( ReportStatusCodeWithDevicePath(Type,Value,DevicePathParameter) : \ EFI_UNSUPPORTED - /** Reports a status code with an extended data buffer if the status code type is enabled. @@ -437,7 +425,7 @@ ReportDebugCodeEnabled ( is already in progress. **/ -#define REPORT_STATUS_CODE_WITH_EXTENDED_DATA(Type,Value,ExtendedData,ExtendedDataSize) \ +#define REPORT_STATUS_CODE_WITH_EXTENDED_DATA(Type, Value, ExtendedData, ExtendedDataSize) \ (ReportProgressCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) ? \ ReportStatusCodeWithExtendedData(Type,Value,ExtendedData,ExtendedDataSize) : \ (ReportErrorCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) ? \ @@ -474,7 +462,7 @@ ReportDebugCodeEnabled ( is already in progress. **/ -#define REPORT_STATUS_CODE_EX(Type,Value,Instance,CallerId,ExtendedDataGuid,ExtendedData,ExtendedDataSize) \ +#define REPORT_STATUS_CODE_EX(Type, Value, Instance, CallerId, ExtendedDataGuid, ExtendedData, ExtendedDataSize) \ (ReportProgressCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) ? \ ReportStatusCodeEx(Type,Value,Instance,CallerId,ExtendedDataGuid,ExtendedData,ExtendedDataSize) : \ (ReportErrorCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) ? \ diff --git a/MdePkg/Include/Library/ResourcePublicationLib.h b/MdePkg/Include/Library/ResourcePublicationLib.h index aa51b6a..fe1d6e4 100644 --- a/MdePkg/Include/Library/ResourcePublicationLib.h +++ b/MdePkg/Include/Library/ResourcePublicationLib.h @@ -29,8 +29,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent RETURN_STATUS EFIAPI PublishSystemMemory ( - IN PHYSICAL_ADDRESS MemoryBegin, - IN UINT64 MemoryLength + IN PHYSICAL_ADDRESS MemoryBegin, + IN UINT64 MemoryLength ); #endif diff --git a/MdePkg/Include/Library/RngLib.h b/MdePkg/Include/Library/RngLib.h index 05e5130..429ed19 100644 --- a/MdePkg/Include/Library/RngLib.h +++ b/MdePkg/Include/Library/RngLib.h @@ -23,7 +23,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent BOOLEAN EFIAPI GetRandomNumber16 ( - OUT UINT16 *Rand + OUT UINT16 *Rand ); /** @@ -40,7 +40,7 @@ GetRandomNumber16 ( BOOLEAN EFIAPI GetRandomNumber32 ( - OUT UINT32 *Rand + OUT UINT32 *Rand ); /** @@ -57,7 +57,7 @@ GetRandomNumber32 ( BOOLEAN EFIAPI GetRandomNumber64 ( - OUT UINT64 *Rand + OUT UINT64 *Rand ); /** @@ -74,7 +74,7 @@ GetRandomNumber64 ( BOOLEAN EFIAPI GetRandomNumber128 ( - OUT UINT64 *Rand + OUT UINT64 *Rand ); -#endif // __RNG_LIB_H__ +#endif // __RNG_LIB_H__ diff --git a/MdePkg/Include/Library/S3BootScriptLib.h b/MdePkg/Include/Library/S3BootScriptLib.h index 229210d..65ae6ef 100644 --- a/MdePkg/Include/Library/S3BootScriptLib.h +++ b/MdePkg/Include/Library/S3BootScriptLib.h @@ -30,7 +30,7 @@ @return The encoded PCI address. **/ -#define S3_BOOT_SCRIPT_LIB_PCI_ADDRESS(Bus,Device,Function,Register) \ +#define S3_BOOT_SCRIPT_LIB_PCI_ADDRESS(Bus, Device, Function, Register) \ (UINT64) ( \ (((UINTN) Bus) << 24) | \ (((UINTN) Device) << 16) | \ @@ -303,7 +303,7 @@ S3BootScriptSaveDispatch2 ( RETURN_STATUS EFIAPI S3BootScriptSaveDispatch ( - IN VOID *EntryPoint + IN VOID *EntryPoint ); /** @@ -357,6 +357,7 @@ S3BootScriptSaveInformation ( IN UINT32 InformationLength, IN VOID *Information ); + /** Adds a record for I/O reads the I/O location and continues when the exit criteria is satisfied, or after a defined duration. @@ -379,11 +380,11 @@ S3BootScriptSaveInformation ( RETURN_STATUS EFIAPI S3BootScriptSaveIoPoll ( - IN S3_BOOT_SCRIPT_LIB_WIDTH Width, - IN UINT64 Address, + IN S3_BOOT_SCRIPT_LIB_WIDTH Width, + IN UINT64 Address, IN VOID *Data, IN VOID *DataMask, - IN UINT64 Delay + IN UINT64 Delay ); /** @@ -409,12 +410,13 @@ S3BootScriptSaveIoPoll ( RETURN_STATUS EFIAPI S3BootScriptSavePciPoll ( - IN S3_BOOT_SCRIPT_LIB_WIDTH Width, - IN UINT64 Address, - IN VOID *Data, - IN VOID *DataMask, - IN UINT64 Delay + IN S3_BOOT_SCRIPT_LIB_WIDTH Width, + IN UINT64 Address, + IN VOID *Data, + IN VOID *DataMask, + IN UINT64 Delay ); + /** Adds a record for PCI configuration space reads and continues when the exit criteria is satisfied, or after a defined duration. @@ -444,13 +446,14 @@ S3BootScriptSavePciPoll ( RETURN_STATUS EFIAPI S3BootScriptSavePci2Poll ( - IN S3_BOOT_SCRIPT_LIB_WIDTH Width, - IN UINT16 Segment, - IN UINT64 Address, - IN VOID *Data, - IN VOID *DataMask, - IN UINT64 Delay + IN S3_BOOT_SCRIPT_LIB_WIDTH Width, + IN UINT16 Segment, + IN UINT64 Address, + IN VOID *Data, + IN VOID *DataMask, + IN UINT64 Delay ); + /** Save ASCII string information specified by Buffer to boot script with opcode EFI_BOOT_SCRIPT_INFORMATION_OPCODE. @@ -493,7 +496,7 @@ S3BootScriptSaveInformationAsciiString ( @return the base address of the new copy of the boot script table. **/ -UINT8* +UINT8 * EFIAPI S3BootScriptCloseTable ( VOID @@ -511,6 +514,7 @@ EFIAPI S3BootScriptExecute ( VOID ); + /** Move the last boot script entry to the position @@ -535,9 +539,10 @@ S3BootScriptExecute ( RETURN_STATUS EFIAPI S3BootScriptMoveLastOpcode ( - IN BOOLEAN BeforeOrAfter, - IN OUT VOID **Position OPTIONAL + IN BOOLEAN BeforeOrAfter, + IN OUT VOID **Position OPTIONAL ); + /** Find a label within the boot script table and, if not present, optionally create it. @@ -565,11 +570,12 @@ S3BootScriptMoveLastOpcode ( RETURN_STATUS EFIAPI S3BootScriptLabel ( - IN BOOLEAN BeforeOrAfter, - IN BOOLEAN CreateIfNotFound, - IN OUT VOID **Position OPTIONAL, - IN CONST CHAR8 *Label + IN BOOLEAN BeforeOrAfter, + IN BOOLEAN CreateIfNotFound, + IN OUT VOID **Position OPTIONAL, + IN CONST CHAR8 *Label ); + /** Compare two positions in the boot script table and return their relative position. @param Position1 The positions in the boot script table to compare @@ -587,9 +593,9 @@ S3BootScriptLabel ( RETURN_STATUS EFIAPI S3BootScriptCompare ( - IN UINT8 *Position1, - IN UINT8 *Position2, - OUT UINTN *RelativePosition + IN UINT8 *Position1, + IN UINT8 *Position2, + OUT UINTN *RelativePosition ); #endif diff --git a/MdePkg/Include/Library/S3IoLib.h b/MdePkg/Include/Library/S3IoLib.h index 99ee3f2..1cb664e 100644 --- a/MdePkg/Include/Library/S3IoLib.h +++ b/MdePkg/Include/Library/S3IoLib.h @@ -1940,9 +1940,9 @@ S3MmioAnd32 ( UINT32 EFIAPI S3MmioAndThenOr32 ( - IN UINTN Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 AndData, + IN UINT32 OrData ); /** @@ -2214,8 +2214,8 @@ S3MmioOr64 ( UINT64 EFIAPI S3MmioAnd64 ( - IN UINTN Address, - IN UINT64 AndData + IN UINTN Address, + IN UINT64 AndData ); /** @@ -2377,10 +2377,10 @@ S3MmioBitFieldOr64 ( UINT64 EFIAPI S3MmioBitFieldAnd64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData ); /** @@ -2539,9 +2539,9 @@ S3MmioReadBuffer32 ( UINT64 * EFIAPI S3MmioReadBuffer64 ( - IN UINTN StartAddress, - IN UINTN Length, - OUT UINT64 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT64 *Buffer ); /** @@ -2566,9 +2566,9 @@ S3MmioReadBuffer64 ( UINT8 * EFIAPI S3MmioWriteBuffer8 ( - IN UINTN StartAddress, - IN UINTN Length, - IN CONST UINT8 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT8 *Buffer ); /** diff --git a/MdePkg/Include/Library/S3PciLib.h b/MdePkg/Include/Library/S3PciLib.h index 595cee2..1479859 100644 --- a/MdePkg/Include/Library/S3PciLib.h +++ b/MdePkg/Include/Library/S3PciLib.h @@ -25,7 +25,7 @@ @return The encoded PCI address. **/ -#define S3_PCI_LIB_ADDRESS(Bus,Device,Function,Register) \ +#define S3_PCI_LIB_ADDRESS(Bus, Device, Function, Register) \ (((Register) & 0xfff) | (((Function) & 0x07) << 12) | (((Device) & 0x1f) << 15) | (((Bus) & 0xff) << 20)) /** diff --git a/MdePkg/Include/Library/S3PciSegmentLib.h b/MdePkg/Include/Library/S3PciSegmentLib.h index 7bd8bc1..5067d4f 100644 --- a/MdePkg/Include/Library/S3PciSegmentLib.h +++ b/MdePkg/Include/Library/S3PciSegmentLib.h @@ -11,7 +11,6 @@ #ifndef __S3_PCI_SEGMENT_LIB__ #define __S3_PCI_SEGMENT_LIB__ - /** Macro that converts PCI Segment, PCI Bus, PCI Device, PCI Function, and PCI Register to an address that can be passed to the S3 PCI Segment Library functions. @@ -29,7 +28,7 @@ @return The address that is compatible with the PCI Segment Library functions. **/ -#define S3_PCI_SEGMENT_LIB_ADDRESS(Segment,Bus,Device,Function,Register) \ +#define S3_PCI_SEGMENT_LIB_ADDRESS(Segment, Bus, Device, Function, Register) \ ((Segment != 0) ? \ ( ((Register) & 0xfff) | \ (((Function) & 0x07) << 12) | \ @@ -61,7 +60,7 @@ UINT8 EFIAPI S3PciSegmentRead8 ( - IN UINT64 Address + IN UINT64 Address ); /** @@ -82,8 +81,8 @@ S3PciSegmentRead8 ( UINT8 EFIAPI S3PciSegmentWrite8 ( - IN UINT64 Address, - IN UINT8 Value + IN UINT64 Address, + IN UINT8 Value ); /** @@ -107,8 +106,8 @@ S3PciSegmentWrite8 ( UINT8 EFIAPI S3PciSegmentOr8 ( - IN UINT64 Address, - IN UINT8 OrData + IN UINT64 Address, + IN UINT8 OrData ); /** @@ -131,8 +130,8 @@ S3PciSegmentOr8 ( UINT8 EFIAPI S3PciSegmentAnd8 ( - IN UINT64 Address, - IN UINT8 AndData + IN UINT64 Address, + IN UINT8 AndData ); /** @@ -159,9 +158,9 @@ S3PciSegmentAnd8 ( UINT8 EFIAPI S3PciSegmentAndThenOr8 ( - IN UINT64 Address, - IN UINT8 AndData, - IN UINT8 OrData + IN UINT64 Address, + IN UINT8 AndData, + IN UINT8 OrData ); /** @@ -189,9 +188,9 @@ S3PciSegmentAndThenOr8 ( UINT8 EFIAPI S3PciSegmentBitFieldRead8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit ); /** @@ -222,10 +221,10 @@ S3PciSegmentBitFieldRead8 ( UINT8 EFIAPI S3PciSegmentBitFieldWrite8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ); /** @@ -259,10 +258,10 @@ S3PciSegmentBitFieldWrite8 ( UINT8 EFIAPI S3PciSegmentBitFieldOr8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ); /** @@ -296,10 +295,10 @@ S3PciSegmentBitFieldOr8 ( UINT8 EFIAPI S3PciSegmentBitFieldAnd8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ); /** @@ -336,11 +335,11 @@ S3PciSegmentBitFieldAnd8 ( UINT8 EFIAPI S3PciSegmentBitFieldAndThenOr8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ); /** @@ -361,7 +360,7 @@ S3PciSegmentBitFieldAndThenOr8 ( UINT16 EFIAPI S3PciSegmentRead16 ( - IN UINT64 Address + IN UINT64 Address ); /** @@ -383,8 +382,8 @@ S3PciSegmentRead16 ( UINT16 EFIAPI S3PciSegmentWrite16 ( - IN UINT64 Address, - IN UINT16 Value + IN UINT64 Address, + IN UINT16 Value ); /** @@ -410,8 +409,8 @@ S3PciSegmentWrite16 ( UINT16 EFIAPI S3PciSegmentOr16 ( - IN UINT64 Address, - IN UINT16 OrData + IN UINT64 Address, + IN UINT16 OrData ); /** @@ -436,8 +435,8 @@ S3PciSegmentOr16 ( UINT16 EFIAPI S3PciSegmentAnd16 ( - IN UINT64 Address, - IN UINT16 AndData + IN UINT64 Address, + IN UINT16 AndData ); /** @@ -465,9 +464,9 @@ S3PciSegmentAnd16 ( UINT16 EFIAPI S3PciSegmentAndThenOr16 ( - IN UINT64 Address, - IN UINT16 AndData, - IN UINT16 OrData + IN UINT64 Address, + IN UINT16 AndData, + IN UINT16 OrData ); /** @@ -496,9 +495,9 @@ S3PciSegmentAndThenOr16 ( UINT16 EFIAPI S3PciSegmentBitFieldRead16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit ); /** @@ -530,10 +529,10 @@ S3PciSegmentBitFieldRead16 ( UINT16 EFIAPI S3PciSegmentBitFieldWrite16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ); /** @@ -568,10 +567,10 @@ S3PciSegmentBitFieldWrite16 ( UINT16 EFIAPI S3PciSegmentBitFieldOr16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ); /** @@ -606,10 +605,10 @@ S3PciSegmentBitFieldOr16 ( UINT16 EFIAPI S3PciSegmentBitFieldAnd16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ); /** @@ -646,11 +645,11 @@ S3PciSegmentBitFieldAnd16 ( UINT16 EFIAPI S3PciSegmentBitFieldAndThenOr16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ); /** @@ -671,7 +670,7 @@ S3PciSegmentBitFieldAndThenOr16 ( UINT32 EFIAPI S3PciSegmentRead32 ( - IN UINT64 Address + IN UINT64 Address ); /** @@ -693,8 +692,8 @@ S3PciSegmentRead32 ( UINT32 EFIAPI S3PciSegmentWrite32 ( - IN UINT64 Address, - IN UINT32 Value + IN UINT64 Address, + IN UINT32 Value ); /** @@ -720,8 +719,8 @@ S3PciSegmentWrite32 ( UINT32 EFIAPI S3PciSegmentOr32 ( - IN UINT64 Address, - IN UINT32 OrData + IN UINT64 Address, + IN UINT32 OrData ); /** @@ -746,8 +745,8 @@ S3PciSegmentOr32 ( UINT32 EFIAPI S3PciSegmentAnd32 ( - IN UINT64 Address, - IN UINT32 AndData + IN UINT64 Address, + IN UINT32 AndData ); /** @@ -775,9 +774,9 @@ S3PciSegmentAnd32 ( UINT32 EFIAPI S3PciSegmentAndThenOr32 ( - IN UINT64 Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINT64 Address, + IN UINT32 AndData, + IN UINT32 OrData ); /** @@ -806,9 +805,9 @@ S3PciSegmentAndThenOr32 ( UINT32 EFIAPI S3PciSegmentBitFieldRead32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit ); /** @@ -840,10 +839,10 @@ S3PciSegmentBitFieldRead32 ( UINT32 EFIAPI S3PciSegmentBitFieldWrite32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ); /** @@ -878,10 +877,10 @@ S3PciSegmentBitFieldWrite32 ( UINT32 EFIAPI S3PciSegmentBitFieldOr32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ); /** @@ -916,10 +915,10 @@ S3PciSegmentBitFieldOr32 ( UINT32 EFIAPI S3PciSegmentBitFieldAnd32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ); /** @@ -956,11 +955,11 @@ S3PciSegmentBitFieldAnd32 ( UINT32 EFIAPI S3PciSegmentBitFieldAndThenOr32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ); /** @@ -990,9 +989,9 @@ S3PciSegmentBitFieldAndThenOr32 ( UINTN EFIAPI S3PciSegmentReadBuffer ( - IN UINT64 StartAddress, - IN UINTN Size, - OUT VOID *Buffer + IN UINT64 StartAddress, + IN UINTN Size, + OUT VOID *Buffer ); /** @@ -1023,9 +1022,9 @@ S3PciSegmentReadBuffer ( UINTN EFIAPI S3PciSegmentWriteBuffer ( - IN UINT64 StartAddress, - IN UINTN Size, - IN VOID *Buffer + IN UINT64 StartAddress, + IN UINTN Size, + IN VOID *Buffer ); #endif diff --git a/MdePkg/Include/Library/SafeIntLib.h b/MdePkg/Include/Library/SafeIntLib.h index 6b49e1d..d0ac9e8 100644 --- a/MdePkg/Include/Library/SafeIntLib.h +++ b/MdePkg/Include/Library/SafeIntLib.h @@ -8,6 +8,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ + #ifndef __INT_SAFE_LIB_H__ #define __INT_SAFE_LIB_H__ @@ -40,14 +41,14 @@ #define SafeIntnToChar16 SafeIntnToUint16 #define SafeUintnToChar16 SafeUintnToUint16 -#define SafeChar16ToInt8 SafeUint16ToInt8 -#define SafeChar16ToUint8 SafeUint16ToUint8 -#define SafeChar16ToChar8 SafeUint16ToChar8 -#define SafeChar16ToInt16 SafeUint16ToInt16 +#define SafeChar16ToInt8 SafeUint16ToInt8 +#define SafeChar16ToUint8 SafeUint16ToUint8 +#define SafeChar16ToChar8 SafeUint16ToChar8 +#define SafeChar16ToInt16 SafeUint16ToInt16 -#define SafeChar16Mult SafeUint16Mult -#define SafeChar16Sub SafeUint16Sub -#define SafeChar16Add SafeUint16Add +#define SafeChar16Mult SafeUint16Mult +#define SafeChar16Sub SafeUint16Sub +#define SafeChar16Add SafeUint16Add // // Conversion functions @@ -357,8 +358,8 @@ SafeInt16ToChar8 ( RETURN_STATUS EFIAPI SafeInt16ToUint8 ( - IN INT16 Operand, - OUT UINT8 *Result + IN INT16 Operand, + OUT UINT8 *Result ); /** @@ -546,8 +547,8 @@ SafeUint16ToChar8 ( RETURN_STATUS EFIAPI SafeUint16ToUint8 ( - IN UINT16 Operand, - OUT UINT8 *Result + IN UINT16 Operand, + OUT UINT8 *Result ); /** @@ -654,8 +655,8 @@ SafeInt32ToChar8 ( RETURN_STATUS EFIAPI SafeInt32ToUint8 ( - IN INT32 Operand, - OUT UINT8 *Result + IN INT32 Operand, + OUT UINT8 *Result ); /** @@ -712,7 +713,6 @@ SafeInt32ToUint16 ( OUT UINT16 *Result ); - /** INT32 -> UINT32 conversion @@ -871,8 +871,8 @@ SafeUint32ToChar8 ( RETURN_STATUS EFIAPI SafeUint32ToUint8 ( - IN UINT32 Operand, - OUT UINT8 *Result + IN UINT32 Operand, + OUT UINT8 *Result ); /** @@ -1060,8 +1060,8 @@ SafeIntnToChar8 ( RETURN_STATUS EFIAPI SafeIntnToUint8 ( - IN INTN Operand, - OUT UINT8 *Result + IN INTN Operand, + OUT UINT8 *Result ); /** @@ -1303,8 +1303,8 @@ SafeUintnToChar8 ( RETURN_STATUS EFIAPI SafeUintnToUint8 ( - IN UINTN Operand, - OUT UINT8 *Result + IN UINTN Operand, + OUT UINT8 *Result ); /** diff --git a/MdePkg/Include/Library/SerialPortLib.h b/MdePkg/Include/Library/SerialPortLib.h index 019ab38..a752f60 100644 --- a/MdePkg/Include/Library/SerialPortLib.h +++ b/MdePkg/Include/Library/SerialPortLib.h @@ -50,11 +50,10 @@ SerialPortInitialize ( UINTN EFIAPI SerialPortWrite ( - IN UINT8 *Buffer, - IN UINTN NumberOfBytes + IN UINT8 *Buffer, + IN UINTN NumberOfBytes ); - /** Read data from serial device and save the datas in buffer. @@ -74,8 +73,8 @@ SerialPortWrite ( UINTN EFIAPI SerialPortRead ( - OUT UINT8 *Buffer, - IN UINTN NumberOfBytes + OUT UINT8 *Buffer, + IN UINTN NumberOfBytes ); /** @@ -108,7 +107,7 @@ SerialPortPoll ( RETURN_STATUS EFIAPI SerialPortSetControl ( - IN UINT32 Control + IN UINT32 Control ); /** @@ -124,7 +123,7 @@ SerialPortSetControl ( RETURN_STATUS EFIAPI SerialPortGetControl ( - OUT UINT32 *Control + OUT UINT32 *Control ); /** @@ -163,12 +162,12 @@ SerialPortGetControl ( RETURN_STATUS EFIAPI SerialPortSetAttributes ( - IN OUT UINT64 *BaudRate, - IN OUT UINT32 *ReceiveFifoDepth, - IN OUT UINT32 *Timeout, - IN OUT EFI_PARITY_TYPE *Parity, - IN OUT UINT8 *DataBits, - IN OUT EFI_STOP_BITS_TYPE *StopBits + IN OUT UINT64 *BaudRate, + IN OUT UINT32 *ReceiveFifoDepth, + IN OUT UINT32 *Timeout, + IN OUT EFI_PARITY_TYPE *Parity, + IN OUT UINT8 *DataBits, + IN OUT EFI_STOP_BITS_TYPE *StopBits ); #endif diff --git a/MdePkg/Include/Library/SmbusLib.h b/MdePkg/Include/Library/SmbusLib.h index 35b1ff9..0ccd0d3 100644 --- a/MdePkg/Include/Library/SmbusLib.h +++ b/MdePkg/Include/Library/SmbusLib.h @@ -24,7 +24,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @param Pec TRUE if Packet Error Checking is enabled. Otherwise FALSE. **/ -#define SMBUS_LIB_ADDRESS(SlaveAddress,Command,Length,Pec) \ +#define SMBUS_LIB_ADDRESS(SlaveAddress, Command, Length, Pec) \ ( ((Pec) ? BIT22: 0) | \ (((SlaveAddress) & 0x7f) << 1) | \ (((Command) & 0xff) << 8) | \ @@ -36,35 +36,35 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @param SmBusAddress Address that encodes the SMBUS Slave Address, SMBUS Command, SMBUS Data Length, and PEC **/ -#define SMBUS_LIB_SLAVE_ADDRESS(SmBusAddress) (((SmBusAddress) >> 1) & 0x7f) +#define SMBUS_LIB_SLAVE_ADDRESS(SmBusAddress) (((SmBusAddress) >> 1) & 0x7f) /** Macro that returns the SMBUS Command value from an SmBusAddress Parameter value. @param SmBusAddress Address that encodes the SMBUS Slave Address, SMBUS Command, SMBUS Data Length, and PEC **/ -#define SMBUS_LIB_COMMAND(SmBusAddress) (((SmBusAddress) >> 8) & 0xff) +#define SMBUS_LIB_COMMAND(SmBusAddress) (((SmBusAddress) >> 8) & 0xff) /** Macro that returns the SMBUS Data Length value from an SmBusAddress Parameter value. @param SmBusAddress Address that encodes the SMBUS Slave Address, SMBUS Command, SMBUS Data Length, and PEC **/ -#define SMBUS_LIB_LENGTH(SmBusAddress) (((SmBusAddress) >> 16) & 0x3f) +#define SMBUS_LIB_LENGTH(SmBusAddress) (((SmBusAddress) >> 16) & 0x3f) /** Macro that returns the SMBUS PEC value from an SmBusAddress Parameter value. @param SmBusAddress Address that encodes the SMBUS Slave Address, SMBUS Command, SMBUS Data Length, and PEC **/ -#define SMBUS_LIB_PEC(SmBusAddress) ((BOOLEAN) (((SmBusAddress) & BIT22) != 0)) +#define SMBUS_LIB_PEC(SmBusAddress) ((BOOLEAN) (((SmBusAddress) & BIT22) != 0)) /** Macro that returns the set of reserved bits from an SmBusAddress Parameter value. @param SmBusAddress Address that encodes the SMBUS Slave Address, SMBUS Command, SMBUS Data Length, and PEC **/ -#define SMBUS_LIB_RESERVED(SmBusAddress) ((SmBusAddress) & ~(BIT23 - 2)) +#define SMBUS_LIB_RESERVED(SmBusAddress) ((SmBusAddress) & ~(BIT23 - 2)) /** Executes an SMBUS quick read command. @@ -93,8 +93,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent VOID EFIAPI SmBusQuickRead ( - IN UINTN SmBusAddress, - OUT RETURN_STATUS *Status OPTIONAL + IN UINTN SmBusAddress, + OUT RETURN_STATUS *Status OPTIONAL ); /** @@ -124,8 +124,8 @@ SmBusQuickRead ( VOID EFIAPI SmBusQuickWrite ( - IN UINTN SmBusAddress, - OUT RETURN_STATUS *Status OPTIONAL + IN UINTN SmBusAddress, + OUT RETURN_STATUS *Status OPTIONAL ); /** @@ -487,5 +487,4 @@ SmBusBlockProcessCall ( OUT RETURN_STATUS *Status OPTIONAL ); - #endif diff --git a/MdePkg/Include/Library/SmiHandlerProfileLib.h b/MdePkg/Include/Library/SmiHandlerProfileLib.h index f2ef4a3..80560fa 100644 --- a/MdePkg/Include/Library/SmiHandlerProfileLib.h +++ b/MdePkg/Include/Library/SmiHandlerProfileLib.h @@ -45,11 +45,11 @@ SPDX-License-Identifier: BSD-2-Clause-Patent EFI_STATUS EFIAPI SmiHandlerProfileRegisterHandler ( - IN EFI_GUID *HandlerGuid, - IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler, - IN PHYSICAL_ADDRESS CallerAddress, - IN VOID *Context OPTIONAL, - IN UINTN ContextSize OPTIONAL + IN EFI_GUID *HandlerGuid, + IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler, + IN PHYSICAL_ADDRESS CallerAddress, + IN VOID *Context OPTIONAL, + IN UINTN ContextSize OPTIONAL ); /** @@ -72,10 +72,10 @@ SmiHandlerProfileRegisterHandler ( EFI_STATUS EFIAPI SmiHandlerProfileUnregisterHandler ( - IN EFI_GUID *HandlerGuid, - IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler, - IN VOID *Context OPTIONAL, - IN UINTN ContextSize OPTIONAL + IN EFI_GUID *HandlerGuid, + IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler, + IN VOID *Context OPTIONAL, + IN UINTN ContextSize OPTIONAL ); #endif diff --git a/MdePkg/Include/Library/SmmIoLib.h b/MdePkg/Include/Library/SmmIoLib.h index c646143..35f7990 100644 --- a/MdePkg/Include/Library/SmmIoLib.h +++ b/MdePkg/Include/Library/SmmIoLib.h @@ -33,4 +33,3 @@ SmmIsMmioValid ( ); #endif - diff --git a/MdePkg/Include/Library/SmmLib.h b/MdePkg/Include/Library/SmmLib.h index bcb7045..b130b12 100644 --- a/MdePkg/Include/Library/SmmLib.h +++ b/MdePkg/Include/Library/SmmLib.h @@ -11,7 +11,6 @@ #ifndef __SMM_LIB_H__ #define __SMM_LIB_H__ - /** Triggers an SMI at boot time. @@ -24,7 +23,6 @@ TriggerBootServiceSoftwareSmi ( VOID ); - /** Triggers an SMI at run time. @@ -37,7 +35,6 @@ TriggerRuntimeSoftwareSmi ( VOID ); - /** Test if a boot time software SMI happened. @@ -54,7 +51,6 @@ IsBootServiceSoftwareSmi ( VOID ); - /** Test if a run time software SMI happened. @@ -80,4 +76,5 @@ EFIAPI ClearSmi ( VOID ); + #endif diff --git a/MdePkg/Include/Library/SmmPeriodicSmiLib.h b/MdePkg/Include/Library/SmmPeriodicSmiLib.h index ac0b2d9..83d9bdd 100644 --- a/MdePkg/Include/Library/SmmPeriodicSmiLib.h +++ b/MdePkg/Include/Library/SmmPeriodicSmiLib.h @@ -96,7 +96,7 @@ PeriodicSmiYield ( **/ typedef VOID -(EFIAPI *PERIODIC_SMI_LIBRARY_HANDLER) ( +(EFIAPI *PERIODIC_SMI_LIBRARY_HANDLER)( IN CONST VOID *Context OPTIONAL, IN UINT64 ElapsedTime ); diff --git a/MdePkg/Include/Library/SmmServicesTableLib.h b/MdePkg/Include/Library/SmmServicesTableLib.h index d074d3e..065fcb1 100644 --- a/MdePkg/Include/Library/SmmServicesTableLib.h +++ b/MdePkg/Include/Library/SmmServicesTableLib.h @@ -15,7 +15,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// Cache pointer to the SMM Services Table /// -extern EFI_SMM_SYSTEM_TABLE2 *gSmst; +extern EFI_SMM_SYSTEM_TABLE2 *gSmst; /** This function allows the caller to determine if the driver is executing in diff --git a/MdePkg/Include/Library/StandaloneMmDriverEntryPoint.h b/MdePkg/Include/Library/StandaloneMmDriverEntryPoint.h index 12f7886..a522c0a 100644 --- a/MdePkg/Include/Library/StandaloneMmDriverEntryPoint.h +++ b/MdePkg/Include/Library/StandaloneMmDriverEntryPoint.h @@ -16,12 +16,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// Declare the PI Specification Revision that this driver requires to execute /// correctly. /// -extern CONST UINT32 _gMmRevision; +extern CONST UINT32 _gMmRevision; /// /// Declare the number of unload handler in the image. /// -extern CONST UINT8 _gDriverUnloadImageCount; +extern CONST UINT8 _gDriverUnloadImageCount; /** The entry point of PE/COFF Image for a Standalone MM Driver. @@ -48,11 +48,10 @@ extern CONST UINT8 _gDriverUnloadImageCount; EFI_STATUS EFIAPI _ModuleEntryPoint ( - IN EFI_HANDLE ImageHandle, - IN EFI_MM_SYSTEM_TABLE *MmSystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_MM_SYSTEM_TABLE *MmSystemTable ); - /** Auto generated function that calls the library constructors for all of the module's dependent libraries. @@ -74,11 +73,10 @@ _ModuleEntryPoint ( VOID EFIAPI ProcessLibraryConstructorList ( - IN EFI_HANDLE ImageHandle, - IN EFI_MM_SYSTEM_TABLE *MmSystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_MM_SYSTEM_TABLE *MmSystemTable ); - /** Auto generated function that calls the library descructors for all of the module's dependent libraries. @@ -100,11 +98,10 @@ ProcessLibraryConstructorList ( VOID EFIAPI ProcessLibraryDestructorList ( - IN EFI_HANDLE ImageHandle, - IN EFI_MM_SYSTEM_TABLE *MmSystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_MM_SYSTEM_TABLE *MmSystemTable ); - /** Auto generated function that calls a set of module entry points. @@ -123,8 +120,8 @@ ProcessLibraryDestructorList ( EFI_STATUS EFIAPI ProcessModuleEntryPointList ( - IN EFI_HANDLE ImageHandle, - IN EFI_MM_SYSTEM_TABLE *MmSystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_MM_SYSTEM_TABLE *MmSystemTable ); /** diff --git a/MdePkg/Include/Library/SynchronizationLib.h b/MdePkg/Include/Library/SynchronizationLib.h index 90ec60b..03906a0 100644 --- a/MdePkg/Include/Library/SynchronizationLib.h +++ b/MdePkg/Include/Library/SynchronizationLib.h @@ -12,8 +12,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// Definitions for SPIN_LOCK /// -typedef volatile UINTN SPIN_LOCK; - +typedef volatile UINTN SPIN_LOCK; /** Retrieves the architecture-specific spin lock alignment requirements for @@ -37,7 +36,6 @@ GetSpinLockProperties ( VOID ); - /** Initializes a spin lock to the released state and returns the spin lock. @@ -57,10 +55,9 @@ GetSpinLockProperties ( SPIN_LOCK * EFIAPI InitializeSpinLock ( - OUT SPIN_LOCK *SpinLock + OUT SPIN_LOCK *SpinLock ); - /** Waits until a spin lock can be placed in the acquired state. @@ -84,10 +81,9 @@ InitializeSpinLock ( SPIN_LOCK * EFIAPI AcquireSpinLock ( - IN OUT SPIN_LOCK *SpinLock + IN OUT SPIN_LOCK *SpinLock ); - /** Attempts to place a spin lock in the acquired state. @@ -108,10 +104,9 @@ AcquireSpinLock ( BOOLEAN EFIAPI AcquireSpinLockOrFail ( - IN OUT SPIN_LOCK *SpinLock + IN OUT SPIN_LOCK *SpinLock ); - /** Releases a spin lock. @@ -129,10 +124,9 @@ AcquireSpinLockOrFail ( SPIN_LOCK * EFIAPI ReleaseSpinLock ( - IN OUT SPIN_LOCK *SpinLock + IN OUT SPIN_LOCK *SpinLock ); - /** Performs an atomic increment of a 32-bit unsigned integer. @@ -150,10 +144,9 @@ ReleaseSpinLock ( UINT32 EFIAPI InterlockedIncrement ( - IN volatile UINT32 *Value + IN volatile UINT32 *Value ); - /** Performs an atomic decrement of a 32-bit unsigned integer. @@ -171,10 +164,9 @@ InterlockedIncrement ( UINT32 EFIAPI InterlockedDecrement ( - IN volatile UINT32 *Value + IN volatile UINT32 *Value ); - /** Performs an atomic compare exchange operation on a 16-bit unsigned integer. @@ -196,9 +188,9 @@ InterlockedDecrement ( UINT16 EFIAPI InterlockedCompareExchange16 ( - IN OUT volatile UINT16 *Value, - IN UINT16 CompareValue, - IN UINT16 ExchangeValue + IN OUT volatile UINT16 *Value, + IN UINT16 CompareValue, + IN UINT16 ExchangeValue ); /** @@ -223,12 +215,11 @@ InterlockedCompareExchange16 ( UINT32 EFIAPI InterlockedCompareExchange32 ( - IN OUT volatile UINT32 *Value, - IN UINT32 CompareValue, - IN UINT32 ExchangeValue + IN OUT volatile UINT32 *Value, + IN UINT32 CompareValue, + IN UINT32 ExchangeValue ); - /** Performs an atomic compare exchange operation on a 64-bit unsigned integer. @@ -250,12 +241,11 @@ InterlockedCompareExchange32 ( UINT64 EFIAPI InterlockedCompareExchange64 ( - IN OUT volatile UINT64 *Value, - IN UINT64 CompareValue, - IN UINT64 ExchangeValue + IN OUT volatile UINT64 *Value, + IN UINT64 CompareValue, + IN UINT64 ExchangeValue ); - /** Performs an atomic compare exchange operation on a pointer value. @@ -277,11 +267,9 @@ InterlockedCompareExchange64 ( VOID * EFIAPI InterlockedCompareExchangePointer ( - IN OUT VOID * volatile *Value, - IN VOID *CompareValue, - IN VOID *ExchangeValue + IN OUT VOID *volatile *Value, + IN VOID *CompareValue, + IN VOID *ExchangeValue ); #endif - - diff --git a/MdePkg/Include/Library/TimerLib.h b/MdePkg/Include/Library/TimerLib.h index 344c92d..5cfd4ab 100644 --- a/MdePkg/Include/Library/TimerLib.h +++ b/MdePkg/Include/Library/TimerLib.h @@ -22,7 +22,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent UINTN EFIAPI MicroSecondDelay ( - IN UINTN MicroSeconds + IN UINTN MicroSeconds ); /** @@ -38,7 +38,7 @@ MicroSecondDelay ( UINTN EFIAPI NanoSecondDelay ( - IN UINTN NanoSeconds + IN UINTN NanoSeconds ); /** @@ -84,8 +84,8 @@ GetPerformanceCounter ( UINT64 EFIAPI GetPerformanceCounterProperties ( - OUT UINT64 *StartValue OPTIONAL, - OUT UINT64 *EndValue OPTIONAL + OUT UINT64 *StartValue OPTIONAL, + OUT UINT64 *EndValue OPTIONAL ); /** @@ -102,7 +102,7 @@ GetPerformanceCounterProperties ( UINT64 EFIAPI GetTimeInNanoSecond ( - IN UINT64 Ticks + IN UINT64 Ticks ); #endif diff --git a/MdePkg/Include/Library/UefiApplicationEntryPoint.h b/MdePkg/Include/Library/UefiApplicationEntryPoint.h index e6bebe8..ce35594 100644 --- a/MdePkg/Include/Library/UefiApplicationEntryPoint.h +++ b/MdePkg/Include/Library/UefiApplicationEntryPoint.h @@ -12,8 +12,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// Declare the EFI/UEFI Specification Revision to which this driver is implemented /// -extern CONST UINT32 _gUefiDriverRevision; - +extern CONST UINT32 _gUefiDriverRevision; /** Entry point to UEFI Application. @@ -39,7 +38,6 @@ _ModuleEntryPoint ( IN EFI_SYSTEM_TABLE *SystemTable ); - /** Required by the EBC compiler and identical in functionality to _ModuleEntryPoint(). @@ -58,7 +56,6 @@ EfiMain ( IN EFI_SYSTEM_TABLE *SystemTable ); - /** Invokes the library destructors for all dependent libraries and terminates the UEFI Application. @@ -75,7 +72,6 @@ Exit ( IN EFI_STATUS Status ); - /** Autogenerated function that calls the library constructors for all of the module's dependent libraries. @@ -100,7 +96,6 @@ ProcessLibraryConstructorList ( IN EFI_SYSTEM_TABLE *SystemTable ); - /** Autogenerated function that calls the library descructors for all of the module's dependent libraries. diff --git a/MdePkg/Include/Library/UefiBootServicesTableLib.h b/MdePkg/Include/Library/UefiBootServicesTableLib.h index 4fe5a9e..fd2b370 100644 --- a/MdePkg/Include/Library/UefiBootServicesTableLib.h +++ b/MdePkg/Include/Library/UefiBootServicesTableLib.h @@ -13,12 +13,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// Cache the Image Handle /// -extern EFI_HANDLE gImageHandle; +extern EFI_HANDLE gImageHandle; /// /// Cache pointer to the EFI System Table /// -extern EFI_SYSTEM_TABLE *gST; +extern EFI_SYSTEM_TABLE *gST; /// /// Cache pointer to the EFI Boot Services Table diff --git a/MdePkg/Include/Library/UefiDriverEntryPoint.h b/MdePkg/Include/Library/UefiDriverEntryPoint.h index a83b260..1dbcb46 100644 --- a/MdePkg/Include/Library/UefiDriverEntryPoint.h +++ b/MdePkg/Include/Library/UefiDriverEntryPoint.h @@ -11,20 +11,19 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define __MODULE_ENTRY_POINT_H__ /// -///Declare the PI Specification Revision that this driver requires to execute correctly. +/// Declare the PI Specification Revision that this driver requires to execute correctly. /// -extern CONST UINT32 _gDxeRevision; +extern CONST UINT32 _gDxeRevision; /// /// Declare the EFI/UEFI Specification Revision to which this driver is implemented /// -extern CONST UINT32 _gUefiDriverRevision; +extern CONST UINT32 _gUefiDriverRevision; /// /// Declare the number of unload handler in the image. /// -extern CONST UINT8 _gDriverUnloadImageCount; - +extern CONST UINT8 _gDriverUnloadImageCount; /** The entry point of PE/COFF Image for a DXE Driver, DXE Runtime Driver, DXE SMM Driver, or UEFI Driver. @@ -56,7 +55,6 @@ _ModuleEntryPoint ( IN EFI_SYSTEM_TABLE *SystemTable ); - /** Required by the EBC compiler and identical in functionality to _ModuleEntryPoint(). @@ -77,7 +75,6 @@ EfiMain ( IN EFI_SYSTEM_TABLE *SystemTable ); - /** Invokes the library destructors for all dependent libraries and terminates the DXE Driver, DXE Runtime Driver, DXE SMM Driver, or UEFI Driver. @@ -94,7 +91,6 @@ ExitDriver ( IN EFI_STATUS Status ); - /** Autogenerated function that calls the library constructors for all of the module's dependent libraries. @@ -119,7 +115,6 @@ ProcessLibraryConstructorList ( IN EFI_SYSTEM_TABLE *SystemTable ); - /** Autogenerated function that calls the library descructors for all of the module's dependent libraries. @@ -143,7 +138,6 @@ ProcessLibraryDestructorList ( IN EFI_SYSTEM_TABLE *SystemTable ); - /** Autogenerated function that calls a set of module entry points. @@ -165,7 +159,6 @@ ProcessModuleEntryPointList ( IN EFI_SYSTEM_TABLE *SystemTable ); - /** Autogenerated function that calls a set of module unload handlers. diff --git a/MdePkg/Include/Library/UefiLib.h b/MdePkg/Include/Library/UefiLib.h index e0f7eb9..be7da7f 100644 --- a/MdePkg/Include/Library/UefiLib.h +++ b/MdePkg/Include/Library/UefiLib.h @@ -39,8 +39,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// Unicode String Table /// typedef struct { - CHAR8 *Language; - CHAR16 *UnicodeString; + CHAR8 *Language; + CHAR16 *UnicodeString; } EFI_UNICODE_STRING_TABLE; /// @@ -56,9 +56,9 @@ typedef enum { /// EFI Lock /// typedef struct { - EFI_TPL Tpl; - EFI_TPL OwnerTpl; - EFI_LOCK_STATE Lock; + EFI_TPL Tpl; + EFI_TPL OwnerTpl; + EFI_LOCK_STATE Lock; } EFI_LOCK; /** @@ -71,7 +71,7 @@ typedef struct { by Microseconds. **/ -#define EFI_TIMER_PERIOD_MICROSECONDS(Microseconds) MultU64x32((UINT64)(Microseconds), 10) +#define EFI_TIMER_PERIOD_MICROSECONDS(Microseconds) MultU64x32((UINT64)(Microseconds), 10) /** Macro that returns the number of 100 ns units for a specified number of milliseconds. @@ -83,7 +83,7 @@ typedef struct { by Milliseconds. **/ -#define EFI_TIMER_PERIOD_MILLISECONDS(Milliseconds) MultU64x32((UINT64)(Milliseconds), 10000) +#define EFI_TIMER_PERIOD_MILLISECONDS(Milliseconds) MultU64x32((UINT64)(Milliseconds), 10000) /** Macro that returns the number of 100 ns units for a specified number of seconds. @@ -95,7 +95,7 @@ typedef struct { by Seconds. **/ -#define EFI_TIMER_PERIOD_SECONDS(Seconds) MultU64x32((UINT64)(Seconds), 10000000) +#define EFI_TIMER_PERIOD_SECONDS(Seconds) MultU64x32((UINT64)(Seconds), 10000000) /** Macro that returns the a pointer to the next EFI_MEMORY_DESCRIPTOR in an array @@ -165,7 +165,7 @@ EfiGetSystemConfigurationTable ( **/ EFI_EVENT EFIAPI -EfiCreateProtocolNotifyEvent( +EfiCreateProtocolNotifyEvent ( IN EFI_GUID *ProtocolGuid, IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction, @@ -237,7 +237,7 @@ EfiNamedEventSignal ( EFI_STATUS EFIAPI EfiEventGroupSignal ( - IN CONST EFI_GUID *EventGroup + IN CONST EFI_GUID *EventGroup ); /** @@ -252,8 +252,8 @@ EfiEventGroupSignal ( VOID EFIAPI EfiEventEmptyFunction ( - IN EFI_EVENT Event, - IN VOID *Context + IN EFI_EVENT Event, + IN VOID *Context ); /** @@ -294,7 +294,7 @@ EFI_LOCK * EFIAPI EfiInitializeLock ( IN OUT EFI_LOCK *Lock, - IN EFI_TPL Priority + IN EFI_TPL Priority ); /** @@ -313,7 +313,6 @@ EfiInitializeLock ( #define EFI_INITIALIZE_LOCK_VARIABLE(Priority) \ {Priority, TPL_APPLICATION, EfiLockReleased } - /** Macro that calls DebugAssert() if an EFI_LOCK structure is not in the locked state. @@ -328,8 +327,8 @@ EfiInitializeLock ( @param LockParameter A pointer to the lock to acquire. **/ -#if !defined(MDEPKG_NDEBUG) - #define ASSERT_LOCKED(LockParameter) \ +#if !defined (MDEPKG_NDEBUG) +#define ASSERT_LOCKED(LockParameter) \ do { \ if (DebugAssertEnabled ()) { \ ASSERT (LockParameter != NULL); \ @@ -339,10 +338,9 @@ EfiInitializeLock ( } \ } while (FALSE) #else - #define ASSERT_LOCKED(LockParameter) +#define ASSERT_LOCKED(LockParameter) #endif - /** Acquires ownership of a lock. @@ -429,9 +427,9 @@ EfiReleaseLock ( EFI_STATUS EFIAPI EfiTestManagedDevice ( - IN CONST EFI_HANDLE ControllerHandle, - IN CONST EFI_HANDLE DriverBindingHandle, - IN CONST EFI_GUID *ProtocolGuid + IN CONST EFI_HANDLE ControllerHandle, + IN CONST EFI_HANDLE DriverBindingHandle, + IN CONST EFI_GUID *ProtocolGuid ); /** @@ -456,9 +454,9 @@ EfiTestManagedDevice ( EFI_STATUS EFIAPI EfiTestChildHandle ( - IN CONST EFI_HANDLE ControllerHandle, - IN CONST EFI_HANDLE ChildHandle, - IN CONST EFI_GUID *ProtocolGuid + IN CONST EFI_HANDLE ControllerHandle, + IN CONST EFI_HANDLE ChildHandle, + IN CONST EFI_GUID *ProtocolGuid ); /** @@ -475,8 +473,8 @@ EfiTestChildHandle ( EFI_STATUS EFIAPI IsLanguageSupported ( - IN CONST CHAR8 *SupportedLanguages, - IN CONST CHAR8 *TargetLanguage + IN CONST CHAR8 *SupportedLanguages, + IN CONST CHAR8 *TargetLanguage ); /** @@ -680,7 +678,6 @@ FreeUnicodeStringTable ( IN EFI_UNICODE_STRING_TABLE *UnicodeStringTable ); - /** Returns the status whether get the variable success. The function retrieves variable through the UEFI Runtime Service GetVariable(). The @@ -732,9 +729,9 @@ GetVariable2 ( EFI_STATUS EFIAPI GetEfiGlobalVariable2 ( - IN CONST CHAR16 *Name, - OUT VOID **Value, - OUT UINTN *Size OPTIONAL + IN CONST CHAR16 *Name, + OUT VOID **Value, + OUT UINTN *Size OPTIONAL ); /** Return the attributes of the variable. @@ -762,12 +759,12 @@ GetEfiGlobalVariable2 ( **/ EFI_STATUS EFIAPI -GetVariable3( - IN CONST CHAR16 *Name, - IN CONST EFI_GUID *Guid, - OUT VOID **Value, - OUT UINTN *Size OPTIONAL, - OUT UINT32 *Attr OPTIONAL +GetVariable3 ( + IN CONST CHAR16 *Name, + IN CONST EFI_GUID *Guid, + OUT VOID **Value, + OUT UINTN *Size OPTIONAL, + OUT UINT32 *Attr OPTIONAL ); /** @@ -889,6 +886,7 @@ UnicodeStringDisplayLength ( // // Functions that abstract early Framework contamination of UEFI. // + /** Create, Signal, and Close the Ready to Boot event using EfiSignalEventReadyToBoot(). @@ -1174,7 +1172,6 @@ AsciiErrorPrint ( ... ); - /** Prints a formatted Unicode string to a graphics console device specified by ConsoleOutputHandle defined in the EFI_SYSTEM_TABLE at the given (X,Y) coordinates. @@ -1218,11 +1215,11 @@ AsciiErrorPrint ( UINTN EFIAPI PrintXY ( - IN UINTN PointX, - IN UINTN PointY, - IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *ForeGround OPTIONAL, - IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BackGround OPTIONAL, - IN CONST CHAR16 *Format, + IN UINTN PointX, + IN UINTN PointY, + IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *ForeGround OPTIONAL, + IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BackGround OPTIONAL, + IN CONST CHAR16 *Format, ... ); @@ -1268,15 +1265,14 @@ PrintXY ( UINTN EFIAPI AsciiPrintXY ( - IN UINTN PointX, - IN UINTN PointY, - IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *ForeGround OPTIONAL, - IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BackGround OPTIONAL, - IN CONST CHAR8 *Format, + IN UINTN PointX, + IN UINTN PointY, + IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *ForeGround OPTIONAL, + IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BackGround OPTIONAL, + IN CONST CHAR8 *Format, ... ); - /** Installs and completes the initialization of a Driver Binding Protocol instance. @@ -1308,7 +1304,6 @@ EfiLibInstallDriverBinding ( IN EFI_HANDLE DriverBindingHandle ); - /** Uninstalls a Driver Binding Protocol instance. @@ -1327,7 +1322,6 @@ EfiLibUninstallDriverBinding ( IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding ); - /** Installs and completes the initialization of a Driver Binding Protocol instance and optionally installs the Component Name, Driver Configuration and Driver Diagnostics Protocols. @@ -1366,7 +1360,6 @@ EfiLibInstallAllDriverProtocols ( IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL ); - /** Uninstalls a Driver Binding Protocol instance and optionally uninstalls the Component Name, Driver Configuration and Driver Diagnostics Protocols. @@ -1392,7 +1385,6 @@ EfiLibUninstallAllDriverProtocols ( IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL ); - /** Installs Driver Binding Protocol with optional Component Name and Component Name 2 Protocols. @@ -1419,15 +1411,14 @@ EfiLibUninstallAllDriverProtocols ( EFI_STATUS EFIAPI EfiLibInstallDriverBindingComponentName2 ( - IN CONST EFI_HANDLE ImageHandle, - IN CONST EFI_SYSTEM_TABLE *SystemTable, - IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, - IN EFI_HANDLE DriverBindingHandle, - IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, - IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL + IN CONST EFI_HANDLE ImageHandle, + IN CONST EFI_SYSTEM_TABLE *SystemTable, + IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, + IN EFI_HANDLE DriverBindingHandle, + IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, + IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL ); - /** Uninstalls Driver Binding Protocol with optional Component Name and Component Name 2 Protocols. @@ -1445,12 +1436,11 @@ EfiLibInstallDriverBindingComponentName2 ( EFI_STATUS EFIAPI EfiLibUninstallDriverBindingComponentName2 ( - IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, - IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, - IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL + IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, + IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, + IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL ); - /** Installs Driver Binding Protocol with optional Component Name, Component Name 2, Driver Configuration, Driver Configuration 2, Driver Diagnostics, and Driver Diagnostics 2 Protocols. @@ -1483,19 +1473,18 @@ EfiLibUninstallDriverBindingComponentName2 ( EFI_STATUS EFIAPI EfiLibInstallAllDriverProtocols2 ( - IN CONST EFI_HANDLE ImageHandle, - IN CONST EFI_SYSTEM_TABLE *SystemTable, - IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, - IN EFI_HANDLE DriverBindingHandle, - IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, - IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL, - IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration OPTIONAL, - IN CONST EFI_DRIVER_CONFIGURATION2_PROTOCOL *DriverConfiguration2 OPTIONAL, - IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL, - IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 OPTIONAL + IN CONST EFI_HANDLE ImageHandle, + IN CONST EFI_SYSTEM_TABLE *SystemTable, + IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, + IN EFI_HANDLE DriverBindingHandle, + IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, + IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL, + IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration OPTIONAL, + IN CONST EFI_DRIVER_CONFIGURATION2_PROTOCOL *DriverConfiguration2 OPTIONAL, + IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL, + IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 OPTIONAL ); - /** Uninstalls Driver Binding Protocol with optional Component Name, Component Name 2, Driver Configuration, Driver Configuration 2, Driver Diagnostics, and Driver Diagnostics 2 Protocols. @@ -1519,16 +1508,15 @@ EfiLibInstallAllDriverProtocols2 ( EFI_STATUS EFIAPI EfiLibUninstallAllDriverProtocols2 ( - IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, - IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, - IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL, - IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration OPTIONAL, - IN CONST EFI_DRIVER_CONFIGURATION2_PROTOCOL *DriverConfiguration2 OPTIONAL, - IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL, - IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 OPTIONAL + IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, + IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, + IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL, + IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration OPTIONAL, + IN CONST EFI_DRIVER_CONFIGURATION2_PROTOCOL *DriverConfiguration2 OPTIONAL, + IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL, + IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 OPTIONAL ); - /** Appends a formatted Unicode string to a Null-terminated Unicode string @@ -1550,10 +1538,10 @@ EfiLibUninstallAllDriverProtocols2 ( @return Null-terminated Unicode string is that is the formatted string appended to String. **/ -CHAR16* +CHAR16 * EFIAPI CatVSPrint ( - IN CHAR16 *String OPTIONAL, + IN CHAR16 *String OPTIONAL, IN CONST CHAR16 *FormatString, IN VA_LIST Marker ); @@ -1584,7 +1572,7 @@ CatVSPrint ( CHAR16 * EFIAPI CatSPrint ( - IN CHAR16 *String OPTIONAL, + IN CHAR16 *String OPTIONAL, IN CONST CHAR16 *FormatString, ... ); @@ -1731,8 +1719,8 @@ EfiOpenFileByDevicePath ( EFI_ACPI_COMMON_HEADER * EFIAPI EfiLocateNextAcpiTable ( - IN UINT32 Signature, - IN EFI_ACPI_COMMON_HEADER *PreviousTable OPTIONAL + IN UINT32 Signature, + IN EFI_ACPI_COMMON_HEADER *PreviousTable OPTIONAL ); /** @@ -1755,7 +1743,7 @@ EfiLocateNextAcpiTable ( EFI_ACPI_COMMON_HEADER * EFIAPI EfiLocateFirstAcpiTable ( - IN UINT32 Signature + IN UINT32 Signature ); #endif diff --git a/MdePkg/Include/Library/UefiRuntimeLib.h b/MdePkg/Include/Library/UefiRuntimeLib.h index 8f13ca2..2b95b63 100644 --- a/MdePkg/Include/Library/UefiRuntimeLib.h +++ b/MdePkg/Include/Library/UefiRuntimeLib.h @@ -69,8 +69,8 @@ EfiGoneVirtual ( EFI_STATUS EFIAPI EfiGetTime ( - OUT EFI_TIME *Time, - OUT EFI_TIME_CAPABILITIES *Capabilities OPTIONAL + OUT EFI_TIME *Time, + OUT EFI_TIME_CAPABILITIES *Capabilities OPTIONAL ); /** @@ -98,7 +98,7 @@ EfiGetTime ( EFI_STATUS EFIAPI EfiSetTime ( - IN EFI_TIME *Time + IN EFI_TIME *Time ); /** @@ -125,9 +125,9 @@ EfiSetTime ( EFI_STATUS EFIAPI EfiGetWakeupTime ( - OUT BOOLEAN *Enabled, - OUT BOOLEAN *Pending, - OUT EFI_TIME *Time + OUT BOOLEAN *Enabled, + OUT BOOLEAN *Pending, + OUT EFI_TIME *Time ); /** @@ -155,8 +155,8 @@ EfiGetWakeupTime ( EFI_STATUS EFIAPI EfiSetWakeupTime ( - IN BOOLEAN Enable, - IN EFI_TIME *Time OPTIONAL + IN BOOLEAN Enable, + IN EFI_TIME *Time OPTIONAL ); /** @@ -192,11 +192,11 @@ EfiSetWakeupTime ( EFI_STATUS EFIAPI EfiGetVariable ( - IN CHAR16 *VariableName, - IN EFI_GUID *VendorGuid, - OUT UINT32 *Attributes OPTIONAL, - IN OUT UINTN *DataSize, - OUT VOID *Data + IN CHAR16 *VariableName, + IN EFI_GUID *VendorGuid, + OUT UINT32 *Attributes OPTIONAL, + IN OUT UINTN *DataSize, + OUT VOID *Data ); /** @@ -232,9 +232,9 @@ EfiGetVariable ( EFI_STATUS EFIAPI EfiGetNextVariableName ( - IN OUT UINTN *VariableNameSize, - IN OUT CHAR16 *VariableName, - IN OUT EFI_GUID *VendorGuid + IN OUT UINTN *VariableNameSize, + IN OUT CHAR16 *VariableName, + IN OUT EFI_GUID *VendorGuid ); /** @@ -269,11 +269,11 @@ EfiGetNextVariableName ( EFI_STATUS EFIAPI EfiSetVariable ( - IN CHAR16 *VariableName, - IN EFI_GUID *VendorGuid, - IN UINT32 Attributes, - IN UINTN DataSize, - IN VOID *Data + IN CHAR16 *VariableName, + IN EFI_GUID *VendorGuid, + IN UINT32 Attributes, + IN UINTN DataSize, + IN VOID *Data ); /** @@ -295,7 +295,7 @@ EfiSetVariable ( EFI_STATUS EFIAPI EfiGetNextHighMonotonicCount ( - OUT UINT32 *HighCount + OUT UINT32 *HighCount ); /** @@ -329,10 +329,10 @@ EfiGetNextHighMonotonicCount ( VOID EFIAPI EfiResetSystem ( - IN EFI_RESET_TYPE ResetType, - IN EFI_STATUS ResetStatus, - IN UINTN DataSize, - IN VOID *ResetData OPTIONAL + IN EFI_RESET_TYPE ResetType, + IN EFI_STATUS ResetStatus, + IN UINTN DataSize, + IN VOID *ResetData OPTIONAL ); /** @@ -356,8 +356,8 @@ EfiResetSystem ( EFI_STATUS EFIAPI EfiConvertPointer ( - IN UINTN DebugDisposition, - IN OUT VOID **Address + IN UINTN DebugDisposition, + IN OUT VOID **Address ); /** @@ -385,8 +385,8 @@ EfiConvertPointer ( EFI_STATUS EFIAPI EfiConvertFunctionPointer ( - IN UINTN DebugDisposition, - IN OUT VOID **Address + IN UINTN DebugDisposition, + IN OUT VOID **Address ); /** @@ -418,13 +418,12 @@ EfiConvertFunctionPointer ( EFI_STATUS EFIAPI EfiSetVirtualAddressMap ( - IN UINTN MemoryMapSize, - IN UINTN DescriptorSize, - IN UINT32 DescriptorVersion, - IN CONST EFI_MEMORY_DESCRIPTOR *VirtualMap + IN UINTN MemoryMapSize, + IN UINTN DescriptorSize, + IN UINT32 DescriptorVersion, + IN CONST EFI_MEMORY_DESCRIPTOR *VirtualMap ); - /** Convert the standard Lib double linked list to a virtual mapping. @@ -442,8 +441,8 @@ EfiSetVirtualAddressMap ( EFI_STATUS EFIAPI EfiConvertList ( - IN UINTN DebugDisposition, - IN OUT LIST_ENTRY *ListHead + IN UINTN DebugDisposition, + IN OUT LIST_ENTRY *ListHead ); /** @@ -484,12 +483,11 @@ EfiConvertList ( EFI_STATUS EFIAPI EfiUpdateCapsule ( - IN EFI_CAPSULE_HEADER **CapsuleHeaderArray, - IN UINTN CapsuleCount, - IN EFI_PHYSICAL_ADDRESS ScatterGatherList OPTIONAL + IN EFI_CAPSULE_HEADER **CapsuleHeaderArray, + IN UINTN CapsuleCount, + IN EFI_PHYSICAL_ADDRESS ScatterGatherList OPTIONAL ); - /** This service is a wrapper for the UEFI Runtime Service QueryCapsuleCapabilities(). @@ -527,13 +525,12 @@ EfiUpdateCapsule ( EFI_STATUS EFIAPI EfiQueryCapsuleCapabilities ( - IN EFI_CAPSULE_HEADER **CapsuleHeaderArray, - IN UINTN CapsuleCount, - OUT UINT64 *MaximumCapsuleSize, - OUT EFI_RESET_TYPE *ResetType + IN EFI_CAPSULE_HEADER **CapsuleHeaderArray, + IN UINTN CapsuleCount, + OUT UINT64 *MaximumCapsuleSize, + OUT EFI_RESET_TYPE *ResetType ); - /** This service is a wrapper for the UEFI Runtime Service QueryVariableInfo(). @@ -578,4 +575,3 @@ EfiQueryVariableInfo ( ); #endif - diff --git a/MdePkg/Include/Library/UefiScsiLib.h b/MdePkg/Include/Library/UefiScsiLib.h index f900f30..da6ac2d 100644 --- a/MdePkg/Include/Library/UefiScsiLib.h +++ b/MdePkg/Include/Library/UefiScsiLib.h @@ -89,11 +89,10 @@ ScsiTestUnitReadyCommand ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus ); - /** Execute Inquiry SCSI command on a specific SCSI target. @@ -188,14 +187,13 @@ ScsiInquiryCommand ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN OUT VOID *InquiryDataBuffer OPTIONAL, IN OUT UINT32 *InquiryDataLength, IN BOOLEAN EnableVitalProductData ); - /** Execute Inquiry SCSI command on a specific SCSI target. @@ -292,15 +290,14 @@ ScsiInquiryCommandEx ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN OUT VOID *InquiryDataBuffer OPTIONAL, IN OUT UINT32 *InquiryDataLength, IN BOOLEAN EnableVitalProductData, IN UINT8 PageCode ); - /** Execute Mode Sense(10) SCSI command on a specific SCSI target. @@ -393,21 +390,19 @@ ScsiInquiryCommandEx ( EFI_STATUS EFIAPI ScsiModeSense10Command ( - IN EFI_SCSI_IO_PROTOCOL *ScsiIo, - IN UINT64 Timeout, - IN OUT VOID *SenseData OPTIONAL, - IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, - IN OUT VOID *DataBuffer OPTIONAL, - IN OUT UINT32 *DataLength, - IN UINT8 DBDField OPTIONAL, - IN UINT8 PageControl, - IN UINT8 PageCode + IN EFI_SCSI_IO_PROTOCOL *ScsiIo, + IN UINT64 Timeout, + IN OUT VOID *SenseData OPTIONAL, + IN OUT UINT8 *SenseDataLength, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, + IN OUT VOID *DataBuffer OPTIONAL, + IN OUT UINT32 *DataLength, + IN UINT8 DBDField OPTIONAL, + IN UINT8 PageControl, + IN UINT8 PageCode ); - - /** Execute Request Sense SCSI command on a specific SCSI target. @@ -447,11 +442,10 @@ ScsiRequestSenseCommand ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus ); - /** Execute Read Capacity SCSI command on a specific SCSI target. @@ -503,14 +497,13 @@ ScsiReadCapacityCommand ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN OUT VOID *DataBuffer OPTIONAL, IN OUT UINT32 *DataLength, IN BOOLEAN Pmi ); - /** Execute Read Capacity SCSI 16 command on a specific SCSI target. @@ -562,14 +555,13 @@ ScsiReadCapacity16Command ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN OUT VOID *DataBuffer OPTIONAL, IN OUT UINT32 *DataLength, IN BOOLEAN Pmi ); - /** Execute Read(10) SCSI command on a specific SCSI target. @@ -622,15 +614,14 @@ ScsiRead10Command ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN OUT VOID *DataBuffer OPTIONAL, IN OUT UINT32 *DataLength, IN UINT32 StartLba, IN UINT32 SectorSize ); - /** Execute Write(10) SCSI command on a specific SCSI target. @@ -683,8 +674,8 @@ ScsiWrite10Command ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN OUT VOID *DataBuffer OPTIONAL, IN OUT UINT32 *DataLength, IN UINT32 StartLba, @@ -743,15 +734,14 @@ ScsiRead16Command ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN OUT VOID *DataBuffer OPTIONAL, IN OUT UINT32 *DataLength, IN UINT64 StartLba, IN UINT32 SectorSize ); - /** Execute Write(16) SCSI command on a specific SCSI target. @@ -804,15 +794,14 @@ ScsiWrite16Command ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN OUT VOID *DataBuffer OPTIONAL, IN OUT UINT32 *DataLength, IN UINT64 StartLba, IN UINT32 SectorSize ); - /** Execute Security Protocol In SCSI command on a specific SCSI target. @@ -868,17 +857,16 @@ ScsiSecurityProtocolInCommand ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN UINT8 SecurityProtocol, IN UINT16 SecurityProtocolSpecific, IN BOOLEAN Inc512, IN UINTN DataLength, IN OUT VOID *DataBuffer OPTIONAL, - OUT UINTN *TransferLength + OUT UINTN *TransferLength ); - /** Execute Security Protocol Out SCSI command on a specific SCSI target. @@ -931,8 +919,8 @@ ScsiSecurityProtocolOutCommand ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN UINT8 SecurityProtocol, IN UINT16 SecurityProtocolSpecific, IN BOOLEAN Inc512, @@ -940,7 +928,6 @@ ScsiSecurityProtocolOutCommand ( IN OUT VOID *DataBuffer OPTIONAL ); - /** Execute blocking/non-blocking Read(10) SCSI command on a specific SCSI target. @@ -1021,8 +1008,8 @@ ScsiRead10CommandEx ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN OUT VOID *DataBuffer OPTIONAL, IN OUT UINT32 *DataLength, IN UINT32 StartLba, @@ -1030,7 +1017,6 @@ ScsiRead10CommandEx ( IN EFI_EVENT Event OPTIONAL ); - /** Execute blocking/non-blocking Write(10) SCSI command on a specific SCSI target. @@ -1111,8 +1097,8 @@ ScsiWrite10CommandEx ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN OUT VOID *DataBuffer OPTIONAL, IN OUT UINT32 *DataLength, IN UINT32 StartLba, @@ -1120,7 +1106,6 @@ ScsiWrite10CommandEx ( IN EFI_EVENT Event OPTIONAL ); - /** Execute blocking/non-blocking Read(16) SCSI command on a specific SCSI target. @@ -1201,8 +1186,8 @@ ScsiRead16CommandEx ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN OUT VOID *DataBuffer OPTIONAL, IN OUT UINT32 *DataLength, IN UINT64 StartLba, @@ -1210,7 +1195,6 @@ ScsiRead16CommandEx ( IN EFI_EVENT Event OPTIONAL ); - /** Execute blocking/non-blocking Write(16) SCSI command on a specific SCSI target. @@ -1291,8 +1275,8 @@ ScsiWrite16CommandEx ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN OUT VOID *DataBuffer OPTIONAL, IN OUT UINT32 *DataLength, IN UINT64 StartLba, diff --git a/MdePkg/Include/Library/UefiUsbLib.h b/MdePkg/Include/Library/UefiUsbLib.h index 1b4f8d9..a8ab47a 100644 --- a/MdePkg/Include/Library/UefiUsbLib.h +++ b/MdePkg/Include/Library/UefiUsbLib.h @@ -7,7 +7,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ - #ifndef __USB_DXE_LIB_H__ #define __USB_DXE_LIB_H__ @@ -35,12 +34,11 @@ SPDX-License-Identifier: BSD-2-Clause-Patent EFI_STATUS EFIAPI UsbGetHidDescriptor ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT8 Interface, - OUT EFI_USB_HID_DESCRIPTOR *HidDescriptor + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT8 Interface, + OUT EFI_USB_HID_DESCRIPTOR *HidDescriptor ); - /** Get the report descriptor of the specified USB HID interface. @@ -65,10 +63,10 @@ UsbGetHidDescriptor ( EFI_STATUS EFIAPI UsbGetReportDescriptor ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT8 Interface, - IN UINT16 DescriptorLength, - OUT UINT8 *DescriptorBuffer + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT8 Interface, + IN UINT16 DescriptorLength, + OUT UINT8 *DescriptorBuffer ); /** @@ -91,9 +89,9 @@ UsbGetReportDescriptor ( EFI_STATUS EFIAPI UsbGetProtocolRequest ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT8 Interface, - OUT UINT8 *Protocol + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT8 Interface, + OUT UINT8 *Protocol ); /** @@ -115,9 +113,9 @@ UsbGetProtocolRequest ( EFI_STATUS EFIAPI UsbSetProtocolRequest ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT8 Interface, - IN UINT8 Protocol + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT8 Interface, + IN UINT8 Protocol ); /** @@ -140,10 +138,10 @@ UsbSetProtocolRequest ( EFI_STATUS EFIAPI UsbSetIdleRequest ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT8 Interface, - IN UINT8 ReportId, - IN UINT8 Duration + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT8 Interface, + IN UINT8 ReportId, + IN UINT8 Duration ); /** @@ -167,10 +165,10 @@ UsbSetIdleRequest ( EFI_STATUS EFIAPI UsbGetIdleRequest ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT8 Interface, - IN UINT8 ReportId, - OUT UINT8 *Duration + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT8 Interface, + IN UINT8 ReportId, + OUT UINT8 *Duration ); /** @@ -197,12 +195,12 @@ UsbGetIdleRequest ( EFI_STATUS EFIAPI UsbSetReportRequest ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT8 Interface, - IN UINT8 ReportId, - IN UINT8 ReportType, - IN UINT16 ReportLen, - IN UINT8 *Report + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT8 Interface, + IN UINT8 ReportId, + IN UINT8 ReportType, + IN UINT16 ReportLen, + IN UINT8 *Report ); /** @@ -232,12 +230,12 @@ UsbSetReportRequest ( EFI_STATUS EFIAPI UsbGetReportRequest ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT8 Interface, - IN UINT8 ReportId, - IN UINT8 ReportType, - IN UINT16 ReportLen, - OUT UINT8 *Report + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT8 Interface, + IN UINT8 ReportId, + IN UINT8 ReportType, + IN UINT16 ReportLen, + OUT UINT8 *Report ); /** @@ -269,12 +267,12 @@ UsbGetReportRequest ( EFI_STATUS EFIAPI UsbGetDescriptor ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT16 Value, - IN UINT16 Index, - IN UINT16 DescriptorLength, - OUT VOID *Descriptor, - OUT UINT32 *Status + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT16 Value, + IN UINT16 Index, + IN UINT16 DescriptorLength, + OUT VOID *Descriptor, + OUT UINT32 *Status ); /** @@ -303,12 +301,12 @@ UsbGetDescriptor ( EFI_STATUS EFIAPI UsbSetDescriptor ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT16 Value, - IN UINT16 Index, - IN UINT16 DescriptorLength, - IN VOID *Descriptor, - OUT UINT32 *Status + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT16 Value, + IN UINT16 Index, + IN UINT16 DescriptorLength, + IN VOID *Descriptor, + OUT UINT32 *Status ); /** @@ -335,10 +333,10 @@ UsbSetDescriptor ( EFI_STATUS EFIAPI UsbGetInterface ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT16 Interface, - OUT UINT16 *AlternateSetting, - OUT UINT32 *Status + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT16 Interface, + OUT UINT16 *AlternateSetting, + OUT UINT32 *Status ); /** @@ -364,10 +362,10 @@ UsbGetInterface ( EFI_STATUS EFIAPI UsbSetInterface ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT16 Interface, - IN UINT16 AlternateSetting, - OUT UINT32 *Status + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT16 Interface, + IN UINT16 AlternateSetting, + OUT UINT32 *Status ); /** @@ -393,9 +391,9 @@ UsbSetInterface ( EFI_STATUS EFIAPI UsbGetConfiguration ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - OUT UINT16 *ConfigurationValue, - OUT UINT32 *Status + IN EFI_USB_IO_PROTOCOL *UsbIo, + OUT UINT16 *ConfigurationValue, + OUT UINT32 *Status ); /** @@ -420,9 +418,9 @@ UsbGetConfiguration ( EFI_STATUS EFIAPI UsbSetConfiguration ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT16 ConfigurationValue, - OUT UINT32 *Status + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT16 ConfigurationValue, + OUT UINT32 *Status ); /** @@ -451,11 +449,11 @@ UsbSetConfiguration ( EFI_STATUS EFIAPI UsbSetFeature ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN USB_TYPES_DEFINITION Recipient, - IN UINT16 Value, - IN UINT16 Target, - OUT UINT32 *Status + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN USB_TYPES_DEFINITION Recipient, + IN UINT16 Value, + IN UINT16 Target, + OUT UINT32 *Status ); /** @@ -484,11 +482,11 @@ UsbSetFeature ( EFI_STATUS EFIAPI UsbClearFeature ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN USB_TYPES_DEFINITION Recipient, - IN UINT16 Value, - IN UINT16 Target, - OUT UINT32 *Status + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN USB_TYPES_DEFINITION Recipient, + IN UINT16 Value, + IN UINT16 Target, + OUT UINT32 *Status ); /** @@ -518,11 +516,11 @@ UsbClearFeature ( EFI_STATUS EFIAPI UsbGetStatus ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN USB_TYPES_DEFINITION Recipient, - IN UINT16 Target, - OUT UINT16 *DeviceStatus, - OUT UINT32 *Status + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN USB_TYPES_DEFINITION Recipient, + IN UINT16 Target, + OUT UINT16 *DeviceStatus, + OUT UINT32 *Status ); /** @@ -549,9 +547,9 @@ UsbGetStatus ( EFI_STATUS EFIAPI UsbClearEndpointHalt ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT8 Endpoint, - OUT UINT32 *Status + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT8 Endpoint, + OUT UINT32 *Status ); #endif diff --git a/MdePkg/Include/Library/UnitTestLib.h b/MdePkg/Include/Library/UnitTestLib.h index 142e865..71c205b 100644 --- a/MdePkg/Include/Library/UnitTestLib.h +++ b/MdePkg/Include/Library/UnitTestLib.h @@ -13,7 +13,7 @@ /// /// Unit Test Status /// -typedef UINT32 UNIT_TEST_STATUS; +typedef UINT32 UNIT_TEST_STATUS; #define UNIT_TEST_PASSED (0) #define UNIT_TEST_ERROR_PREREQUISITE_NOT_MET (1) #define UNIT_TEST_ERROR_TEST_FAILED (2) @@ -34,24 +34,24 @@ typedef UINT32 UNIT_TEST_STATUS; /// Unit Test Framework Handle /// struct UNIT_TEST_FRAMEWORK_OBJECT; -typedef struct UNIT_TEST_FRAMEWORK_OBJECT *UNIT_TEST_FRAMEWORK_HANDLE; +typedef struct UNIT_TEST_FRAMEWORK_OBJECT *UNIT_TEST_FRAMEWORK_HANDLE; /// /// Unit Test Suite Handle /// struct UNIT_TEST_SUITE_OBJECT; -typedef struct UNIT_TEST_SUITE_OBJECT *UNIT_TEST_SUITE_HANDLE; +typedef struct UNIT_TEST_SUITE_OBJECT *UNIT_TEST_SUITE_HANDLE; /// /// Unit Test Handle /// struct UNIT_TEST_OBJECT; -typedef struct UNIT_TEST_OBJECT *UNIT_TEST_HANDLE; +typedef struct UNIT_TEST_OBJECT *UNIT_TEST_HANDLE; /// /// Unit Test Context /// -typedef VOID* UNIT_TEST_CONTEXT; +typedef VOID *UNIT_TEST_CONTEXT; /** The prototype for a single UnitTest case function. @@ -336,8 +336,8 @@ FreeUnitTestFramework ( EFI_STATUS EFIAPI SaveFrameworkState ( - IN UNIT_TEST_CONTEXT ContextToSave OPTIONAL, - IN UINTN ContextToSaveSize + IN UNIT_TEST_CONTEXT ContextToSave OPTIONAL, + IN UINTN ContextToSaveSize ); /** @@ -459,13 +459,13 @@ SaveFrameworkState ( #if defined (EDKII_UNIT_TEST_FRAMEWORK_ENABLED) #include - /// - /// Pointer to jump buffer used with SetJump()/LongJump() to test if a - /// function under test generates an expected ASSERT() condition. - /// - extern BASE_LIBRARY_JUMP_BUFFER *gUnitTestExpectAssertFailureJumpBuffer; +/// +/// Pointer to jump buffer used with SetJump()/LongJump() to test if a +/// function under test generates an expected ASSERT() condition. +/// +extern BASE_LIBRARY_JUMP_BUFFER *gUnitTestExpectAssertFailureJumpBuffer; - #define UT_EXPECT_ASSERT_FAILURE(FunctionCall, Status) \ +#define UT_EXPECT_ASSERT_FAILURE(FunctionCall, Status) \ do { \ UNIT_TEST_STATUS UnitTestJumpStatus; \ BASE_LIBRARY_JUMP_BUFFER UnitTestJumpBuffer; \ @@ -488,7 +488,7 @@ SaveFrameworkState ( } \ } while (FALSE) #else - #define UT_EXPECT_ASSERT_FAILURE(FunctionCall, Status) FunctionCall; +#define UT_EXPECT_ASSERT_FAILURE(FunctionCall, Status) FunctionCall; #endif /** diff --git a/MdePkg/Include/Pi/PiBootMode.h b/MdePkg/Include/Pi/PiBootMode.h index 454b9ed..8a4fab5 100644 --- a/MdePkg/Include/Pi/PiBootMode.h +++ b/MdePkg/Include/Pi/PiBootMode.h @@ -15,22 +15,22 @@ /// /// EFI boot mode /// -typedef UINT32 EFI_BOOT_MODE; +typedef UINT32 EFI_BOOT_MODE; // // 0x21 - 0xf..f are reserved. // -#define BOOT_WITH_FULL_CONFIGURATION 0x00 -#define BOOT_WITH_MINIMAL_CONFIGURATION 0x01 -#define BOOT_ASSUMING_NO_CONFIGURATION_CHANGES 0x02 -#define BOOT_WITH_FULL_CONFIGURATION_PLUS_DIAGNOSTICS 0x03 -#define BOOT_WITH_DEFAULT_SETTINGS 0x04 -#define BOOT_ON_S4_RESUME 0x05 -#define BOOT_ON_S5_RESUME 0x06 -#define BOOT_WITH_MFG_MODE_SETTINGS 0x07 -#define BOOT_ON_S2_RESUME 0x10 -#define BOOT_ON_S3_RESUME 0x11 -#define BOOT_ON_FLASH_UPDATE 0x12 -#define BOOT_IN_RECOVERY_MODE 0x20 +#define BOOT_WITH_FULL_CONFIGURATION 0x00 +#define BOOT_WITH_MINIMAL_CONFIGURATION 0x01 +#define BOOT_ASSUMING_NO_CONFIGURATION_CHANGES 0x02 +#define BOOT_WITH_FULL_CONFIGURATION_PLUS_DIAGNOSTICS 0x03 +#define BOOT_WITH_DEFAULT_SETTINGS 0x04 +#define BOOT_ON_S4_RESUME 0x05 +#define BOOT_ON_S5_RESUME 0x06 +#define BOOT_WITH_MFG_MODE_SETTINGS 0x07 +#define BOOT_ON_S2_RESUME 0x10 +#define BOOT_ON_S3_RESUME 0x11 +#define BOOT_ON_FLASH_UPDATE 0x12 +#define BOOT_IN_RECOVERY_MODE 0x20 #endif diff --git a/MdePkg/Include/Pi/PiDependency.h b/MdePkg/Include/Pi/PiDependency.h index 51cf4d9..021a0bd 100644 --- a/MdePkg/Include/Pi/PiDependency.h +++ b/MdePkg/Include/Pi/PiDependency.h @@ -8,6 +8,7 @@ PI Version 1.0 **/ + #ifndef __PI_DEPENDENCY_H__ #define __PI_DEPENDENCY_H__ @@ -15,27 +16,26 @@ /// If present, this must be the first and only opcode, /// EFI_DEP_BEFORE may be used by DXE and SMM drivers. /// -#define EFI_DEP_BEFORE 0x00 +#define EFI_DEP_BEFORE 0x00 /// /// If present, this must be the first and only opcode, /// EFI_DEP_AFTER may be used by DXE and SMM drivers. /// -#define EFI_DEP_AFTER 0x01 - -#define EFI_DEP_PUSH 0x02 -#define EFI_DEP_AND 0x03 -#define EFI_DEP_OR 0x04 -#define EFI_DEP_NOT 0x05 -#define EFI_DEP_TRUE 0x06 -#define EFI_DEP_FALSE 0x07 -#define EFI_DEP_END 0x08 +#define EFI_DEP_AFTER 0x01 +#define EFI_DEP_PUSH 0x02 +#define EFI_DEP_AND 0x03 +#define EFI_DEP_OR 0x04 +#define EFI_DEP_NOT 0x05 +#define EFI_DEP_TRUE 0x06 +#define EFI_DEP_FALSE 0x07 +#define EFI_DEP_END 0x08 /// /// If present, this must be the first opcode, /// EFI_DEP_SOR is only used by DXE driver. /// -#define EFI_DEP_SOR 0x09 +#define EFI_DEP_SOR 0x09 #endif diff --git a/MdePkg/Include/Pi/PiDxeCis.h b/MdePkg/Include/Pi/PiDxeCis.h index 1682211..d0f2ed0 100644 --- a/MdePkg/Include/Pi/PiDxeCis.h +++ b/MdePkg/Include/Pi/PiDxeCis.h @@ -122,29 +122,29 @@ typedef struct { /// EFI_PHYSICAL_ADDRESS is defined in the AllocatePages() function /// description in the UEFI 2.0 specification. /// - EFI_PHYSICAL_ADDRESS BaseAddress; + EFI_PHYSICAL_ADDRESS BaseAddress; /// /// The number of bytes in the memory region. /// - UINT64 Length; + UINT64 Length; /// /// The bit mask of attributes that the memory region is capable of supporting. The bit /// mask of available attributes is defined in the GetMemoryMap() function description /// in the UEFI 2.0 specification. /// - UINT64 Capabilities; + UINT64 Capabilities; /// /// The bit mask of attributes that the memory region is currently using. The bit mask of /// available attributes is defined in GetMemoryMap(). /// - UINT64 Attributes; + UINT64 Attributes; /// /// Type of the memory region. Type EFI_GCD_MEMORY_TYPE is defined in the /// AddMemorySpace() function description. /// - EFI_GCD_MEMORY_TYPE GcdMemoryType; + EFI_GCD_MEMORY_TYPE GcdMemoryType; /// /// The image handle of the agent that allocated the memory resource described by @@ -152,7 +152,7 @@ typedef struct { /// resource is not currently allocated. Type EFI_HANDLE is defined in /// InstallProtocolInterface() in the UEFI 2.0 specification. /// - EFI_HANDLE ImageHandle; + EFI_HANDLE ImageHandle; /// /// The device handle for which the memory resource has been allocated. If @@ -161,7 +161,7 @@ typedef struct { /// described by a device handle. Type EFI_HANDLE is defined in /// InstallProtocolInterface() in the UEFI 2.0 specification. /// - EFI_HANDLE DeviceHandle; + EFI_HANDLE DeviceHandle; } EFI_GCD_MEMORY_SPACE_DESCRIPTOR; /// @@ -173,18 +173,18 @@ typedef struct { /// EFI_PHYSICAL_ADDRESS is defined in the AllocatePages() function /// description in the UEFI 2.0 specification. /// - EFI_PHYSICAL_ADDRESS BaseAddress; + EFI_PHYSICAL_ADDRESS BaseAddress; /// /// Number of bytes in the I/O region. /// - UINT64 Length; + UINT64 Length; /// /// Type of the I/O region. Type EFI_GCD_IO_TYPE is defined in the /// AddIoSpace() function description. /// - EFI_GCD_IO_TYPE GcdIoType; + EFI_GCD_IO_TYPE GcdIoType; /// /// The image handle of the agent that allocated the I/O resource described by @@ -192,7 +192,7 @@ typedef struct { /// resource is not currently allocated. Type EFI_HANDLE is defined in /// InstallProtocolInterface() in the UEFI 2.0 specification. /// - EFI_HANDLE ImageHandle; + EFI_HANDLE ImageHandle; /// /// The device handle for which the I/O resource has been allocated. If ImageHandle @@ -201,10 +201,9 @@ typedef struct { /// Type EFI_HANDLE is defined in InstallProtocolInterface() in the UEFI /// 2.0 specification. /// - EFI_HANDLE DeviceHandle; + EFI_HANDLE DeviceHandle; } EFI_GCD_IO_SPACE_DESCRIPTOR; - /** Adds reserved memory, system memory, or memory-mapped I/O resources to the global coherency domain of the processor. @@ -407,7 +406,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SET_MEMORY_SPACE_CAPABILITIES) ( +(EFIAPI *EFI_SET_MEMORY_SPACE_CAPABILITIES)( IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN UINT64 Capabilities @@ -599,8 +598,6 @@ EFI_STATUS OUT EFI_GCD_IO_SPACE_DESCRIPTOR **IoSpaceMap ); - - /** Loads and executed DXE drivers from firmware volumes. @@ -698,39 +695,39 @@ typedef struct { /// The table header for the DXE Services Table. /// This header contains the DXE_SERVICES_SIGNATURE and DXE_SERVICES_REVISION values. /// - EFI_TABLE_HEADER Hdr; + EFI_TABLE_HEADER Hdr; // // Global Coherency Domain Services // - EFI_ADD_MEMORY_SPACE AddMemorySpace; - EFI_ALLOCATE_MEMORY_SPACE AllocateMemorySpace; - EFI_FREE_MEMORY_SPACE FreeMemorySpace; - EFI_REMOVE_MEMORY_SPACE RemoveMemorySpace; - EFI_GET_MEMORY_SPACE_DESCRIPTOR GetMemorySpaceDescriptor; - EFI_SET_MEMORY_SPACE_ATTRIBUTES SetMemorySpaceAttributes; - EFI_GET_MEMORY_SPACE_MAP GetMemorySpaceMap; - EFI_ADD_IO_SPACE AddIoSpace; - EFI_ALLOCATE_IO_SPACE AllocateIoSpace; - EFI_FREE_IO_SPACE FreeIoSpace; - EFI_REMOVE_IO_SPACE RemoveIoSpace; - EFI_GET_IO_SPACE_DESCRIPTOR GetIoSpaceDescriptor; - EFI_GET_IO_SPACE_MAP GetIoSpaceMap; + EFI_ADD_MEMORY_SPACE AddMemorySpace; + EFI_ALLOCATE_MEMORY_SPACE AllocateMemorySpace; + EFI_FREE_MEMORY_SPACE FreeMemorySpace; + EFI_REMOVE_MEMORY_SPACE RemoveMemorySpace; + EFI_GET_MEMORY_SPACE_DESCRIPTOR GetMemorySpaceDescriptor; + EFI_SET_MEMORY_SPACE_ATTRIBUTES SetMemorySpaceAttributes; + EFI_GET_MEMORY_SPACE_MAP GetMemorySpaceMap; + EFI_ADD_IO_SPACE AddIoSpace; + EFI_ALLOCATE_IO_SPACE AllocateIoSpace; + EFI_FREE_IO_SPACE FreeIoSpace; + EFI_REMOVE_IO_SPACE RemoveIoSpace; + EFI_GET_IO_SPACE_DESCRIPTOR GetIoSpaceDescriptor; + EFI_GET_IO_SPACE_MAP GetIoSpaceMap; // // Dispatcher Services // - EFI_DISPATCH Dispatch; - EFI_SCHEDULE Schedule; - EFI_TRUST Trust; + EFI_DISPATCH Dispatch; + EFI_SCHEDULE Schedule; + EFI_TRUST Trust; // // Service to process a single firmware volume found in a capsule // - EFI_PROCESS_FIRMWARE_VOLUME ProcessFirmwareVolume; + EFI_PROCESS_FIRMWARE_VOLUME ProcessFirmwareVolume; // // Extensions to Global Coherency Domain Services // - EFI_SET_MEMORY_SPACE_CAPABILITIES SetMemorySpaceCapabilities; + EFI_SET_MEMORY_SPACE_CAPABILITIES SetMemorySpaceCapabilities; } DXE_SERVICES; typedef DXE_SERVICES EFI_DXE_SERVICES; diff --git a/MdePkg/Include/Pi/PiFirmwareFile.h b/MdePkg/Include/Pi/PiFirmwareFile.h index ec7729e..f740f9c 100644 --- a/MdePkg/Include/Pi/PiFirmwareFile.h +++ b/MdePkg/Include/Pi/PiFirmwareFile.h @@ -9,7 +9,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ - #ifndef __PI_FIRMWARE_FILE_H__ #define __PI_FIRMWARE_FILE_H__ @@ -24,7 +23,7 @@ typedef union { /// header. The State and IntegrityCheck.Checksum.File fields are assumed /// to be zero and the checksum is calculated such that the entire header sums to zero. /// - UINT8 Header; + UINT8 Header; /// /// If the FFS_ATTRIB_CHECKSUM (see definition below) bit of the Attributes /// field is set to one, the IntegrityCheck.Checksum.File field is an 8-bit @@ -34,7 +33,7 @@ typedef union { /// 0xAA. The IntegrityCheck.Checksum.File field is valid any time the /// EFI_FILE_DATA_VALID bit is set in the State field. /// - UINT8 File; + UINT8 File; } Checksum; /// /// This is the full 16 bits of the IntegrityCheck field. @@ -48,47 +47,47 @@ typedef union { /// #define FFS_FIXED_CHECKSUM 0xAA -typedef UINT8 EFI_FV_FILETYPE; -typedef UINT8 EFI_FFS_FILE_ATTRIBUTES; -typedef UINT8 EFI_FFS_FILE_STATE; +typedef UINT8 EFI_FV_FILETYPE; +typedef UINT8 EFI_FFS_FILE_ATTRIBUTES; +typedef UINT8 EFI_FFS_FILE_STATE; /// /// File Types Definitions /// -#define EFI_FV_FILETYPE_ALL 0x00 -#define EFI_FV_FILETYPE_RAW 0x01 -#define EFI_FV_FILETYPE_FREEFORM 0x02 -#define EFI_FV_FILETYPE_SECURITY_CORE 0x03 -#define EFI_FV_FILETYPE_PEI_CORE 0x04 -#define EFI_FV_FILETYPE_DXE_CORE 0x05 -#define EFI_FV_FILETYPE_PEIM 0x06 -#define EFI_FV_FILETYPE_DRIVER 0x07 -#define EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER 0x08 -#define EFI_FV_FILETYPE_APPLICATION 0x09 -#define EFI_FV_FILETYPE_MM 0x0A -#define EFI_FV_FILETYPE_SMM EFI_FV_FILETYPE_MM -#define EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE 0x0B -#define EFI_FV_FILETYPE_COMBINED_MM_DXE 0x0C -#define EFI_FV_FILETYPE_COMBINED_SMM_DXE EFI_FV_FILETYPE_COMBINED_MM_DXE -#define EFI_FV_FILETYPE_MM_CORE 0x0D -#define EFI_FV_FILETYPE_SMM_CORE EFI_FV_FILETYPE_MM_CORE -#define EFI_FV_FILETYPE_MM_STANDALONE 0x0E -#define EFI_FV_FILETYPE_MM_CORE_STANDALONE 0x0F -#define EFI_FV_FILETYPE_OEM_MIN 0xc0 -#define EFI_FV_FILETYPE_OEM_MAX 0xdf -#define EFI_FV_FILETYPE_DEBUG_MIN 0xe0 -#define EFI_FV_FILETYPE_DEBUG_MAX 0xef -#define EFI_FV_FILETYPE_FFS_MIN 0xf0 -#define EFI_FV_FILETYPE_FFS_MAX 0xff -#define EFI_FV_FILETYPE_FFS_PAD 0xf0 +#define EFI_FV_FILETYPE_ALL 0x00 +#define EFI_FV_FILETYPE_RAW 0x01 +#define EFI_FV_FILETYPE_FREEFORM 0x02 +#define EFI_FV_FILETYPE_SECURITY_CORE 0x03 +#define EFI_FV_FILETYPE_PEI_CORE 0x04 +#define EFI_FV_FILETYPE_DXE_CORE 0x05 +#define EFI_FV_FILETYPE_PEIM 0x06 +#define EFI_FV_FILETYPE_DRIVER 0x07 +#define EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER 0x08 +#define EFI_FV_FILETYPE_APPLICATION 0x09 +#define EFI_FV_FILETYPE_MM 0x0A +#define EFI_FV_FILETYPE_SMM EFI_FV_FILETYPE_MM +#define EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE 0x0B +#define EFI_FV_FILETYPE_COMBINED_MM_DXE 0x0C +#define EFI_FV_FILETYPE_COMBINED_SMM_DXE EFI_FV_FILETYPE_COMBINED_MM_DXE +#define EFI_FV_FILETYPE_MM_CORE 0x0D +#define EFI_FV_FILETYPE_SMM_CORE EFI_FV_FILETYPE_MM_CORE +#define EFI_FV_FILETYPE_MM_STANDALONE 0x0E +#define EFI_FV_FILETYPE_MM_CORE_STANDALONE 0x0F +#define EFI_FV_FILETYPE_OEM_MIN 0xc0 +#define EFI_FV_FILETYPE_OEM_MAX 0xdf +#define EFI_FV_FILETYPE_DEBUG_MIN 0xe0 +#define EFI_FV_FILETYPE_DEBUG_MAX 0xef +#define EFI_FV_FILETYPE_FFS_MIN 0xf0 +#define EFI_FV_FILETYPE_FFS_MAX 0xff +#define EFI_FV_FILETYPE_FFS_PAD 0xf0 /// /// FFS File Attributes. /// -#define FFS_ATTRIB_LARGE_FILE 0x01 -#define FFS_ATTRIB_DATA_ALIGNMENT_2 0x02 -#define FFS_ATTRIB_FIXED 0x04 -#define FFS_ATTRIB_DATA_ALIGNMENT 0x38 -#define FFS_ATTRIB_CHECKSUM 0x40 +#define FFS_ATTRIB_LARGE_FILE 0x01 +#define FFS_ATTRIB_DATA_ALIGNMENT_2 0x02 +#define FFS_ATTRIB_FIXED 0x04 +#define FFS_ATTRIB_DATA_ALIGNMENT 0x38 +#define FFS_ATTRIB_CHECKSUM 0x40 /// /// FFS File State Bits. @@ -100,7 +99,6 @@ typedef UINT8 EFI_FFS_FILE_STATE; #define EFI_FILE_DELETED 0x10 #define EFI_FILE_HEADER_INVALID 0x20 - /// /// Each file begins with the header that describe the /// contents and state of the files. @@ -109,27 +107,27 @@ typedef struct { /// /// This GUID is the file name. It is used to uniquely identify the file. /// - EFI_GUID Name; + EFI_GUID Name; /// /// Used to verify the integrity of the file. /// - EFI_FFS_INTEGRITY_CHECK IntegrityCheck; + EFI_FFS_INTEGRITY_CHECK IntegrityCheck; /// /// Identifies the type of file. /// - EFI_FV_FILETYPE Type; + EFI_FV_FILETYPE Type; /// /// Declares various file attribute bits. /// - EFI_FFS_FILE_ATTRIBUTES Attributes; + EFI_FFS_FILE_ATTRIBUTES Attributes; /// /// The length of the file in bytes, including the FFS header. /// - UINT8 Size[3]; + UINT8 Size[3]; /// /// Used to track the state of the file throughout the life of the file from creation to deletion. /// - EFI_FFS_FILE_STATE State; + EFI_FFS_FILE_STATE State; } EFI_FFS_FILE_HEADER; typedef struct { @@ -138,22 +136,22 @@ typedef struct { /// one instance of a file with the file name GUID of Name in any given firmware /// volume, except if the file type is EFI_FV_FILETYPE_FFS_PAD. /// - EFI_GUID Name; + EFI_GUID Name; /// /// Used to verify the integrity of the file. /// - EFI_FFS_INTEGRITY_CHECK IntegrityCheck; + EFI_FFS_INTEGRITY_CHECK IntegrityCheck; /// /// Identifies the type of file. /// - EFI_FV_FILETYPE Type; + EFI_FV_FILETYPE Type; /// /// Declares various file attribute bits. /// - EFI_FFS_FILE_ATTRIBUTES Attributes; + EFI_FFS_FILE_ATTRIBUTES Attributes; /// /// The length of the file in bytes, including the FFS header. @@ -162,18 +160,18 @@ typedef struct { /// Size is not required to be a multiple of 8 bytes. Given a file F, the next file header is /// located at the next 8-byte aligned firmware volume offset following the last byte of the file F. /// - UINT8 Size[3]; + UINT8 Size[3]; /// /// Used to track the state of the file throughout the life of the file from creation to deletion. /// - EFI_FFS_FILE_STATE State; + EFI_FFS_FILE_STATE State; /// /// If FFS_ATTRIB_LARGE_FILE is set in Attributes, then ExtendedSize exists and Size must be set to zero. /// If FFS_ATTRIB_LARGE_FILE is not set then EFI_FFS_FILE_HEADER is used. /// - UINT64 ExtendedSize; + UINT64 ExtendedSize; } EFI_FFS_FILE_HEADER2; #define IS_FFS_FILE2(FfsFileHeaderPtr) \ @@ -184,7 +182,7 @@ typedef struct { /// FFS_FILE_SIZE() function-like macro below must not have side effects: /// FfsFileHeaderPtr is evaluated multiple times. /// -#define FFS_FILE_SIZE(FfsFileHeaderPtr) ((UINT32) ( \ +#define FFS_FILE_SIZE(FfsFileHeaderPtr) ((UINT32) (\ (((EFI_FFS_FILE_HEADER *) (UINTN) (FfsFileHeaderPtr))->Size[0] ) | \ (((EFI_FFS_FILE_HEADER *) (UINTN) (FfsFileHeaderPtr))->Size[1] << 8) | \ (((EFI_FFS_FILE_HEADER *) (UINTN) (FfsFileHeaderPtr))->Size[2] << 16))) @@ -198,33 +196,33 @@ typedef UINT8 EFI_SECTION_TYPE; /// Pseudo type. It is used as a wild card when retrieving sections. /// The section type EFI_SECTION_ALL matches all section types. /// -#define EFI_SECTION_ALL 0x00 +#define EFI_SECTION_ALL 0x00 /// /// Encapsulation section Type values. /// -#define EFI_SECTION_COMPRESSION 0x01 +#define EFI_SECTION_COMPRESSION 0x01 -#define EFI_SECTION_GUID_DEFINED 0x02 +#define EFI_SECTION_GUID_DEFINED 0x02 -#define EFI_SECTION_DISPOSABLE 0x03 +#define EFI_SECTION_DISPOSABLE 0x03 /// /// Leaf section Type values. /// -#define EFI_SECTION_PE32 0x10 -#define EFI_SECTION_PIC 0x11 -#define EFI_SECTION_TE 0x12 -#define EFI_SECTION_DXE_DEPEX 0x13 -#define EFI_SECTION_VERSION 0x14 -#define EFI_SECTION_USER_INTERFACE 0x15 -#define EFI_SECTION_COMPATIBILITY16 0x16 -#define EFI_SECTION_FIRMWARE_VOLUME_IMAGE 0x17 -#define EFI_SECTION_FREEFORM_SUBTYPE_GUID 0x18 -#define EFI_SECTION_RAW 0x19 -#define EFI_SECTION_PEI_DEPEX 0x1B -#define EFI_SECTION_MM_DEPEX 0x1C -#define EFI_SECTION_SMM_DEPEX EFI_SECTION_MM_DEPEX +#define EFI_SECTION_PE32 0x10 +#define EFI_SECTION_PIC 0x11 +#define EFI_SECTION_TE 0x12 +#define EFI_SECTION_DXE_DEPEX 0x13 +#define EFI_SECTION_VERSION 0x14 +#define EFI_SECTION_USER_INTERFACE 0x15 +#define EFI_SECTION_COMPATIBILITY16 0x16 +#define EFI_SECTION_FIRMWARE_VOLUME_IMAGE 0x17 +#define EFI_SECTION_FREEFORM_SUBTYPE_GUID 0x18 +#define EFI_SECTION_RAW 0x19 +#define EFI_SECTION_PEI_DEPEX 0x1B +#define EFI_SECTION_MM_DEPEX 0x1C +#define EFI_SECTION_SMM_DEPEX EFI_SECTION_MM_DEPEX /// /// Common section header. @@ -234,8 +232,8 @@ typedef struct { /// A 24-bit unsigned integer that contains the total size of the section in bytes, /// including the EFI_COMMON_SECTION_HEADER. /// - UINT8 Size[3]; - EFI_SECTION_TYPE Type; + UINT8 Size[3]; + EFI_SECTION_TYPE Type; /// /// Declares the section type. /// @@ -246,15 +244,15 @@ typedef struct { /// A 24-bit unsigned integer that contains the total size of the section in bytes, /// including the EFI_COMMON_SECTION_HEADER. /// - UINT8 Size[3]; + UINT8 Size[3]; - EFI_SECTION_TYPE Type; + EFI_SECTION_TYPE Type; /// /// If Size is 0xFFFFFF, then ExtendedSize contains the size of the section. If /// Size is not equal to 0xFFFFFF, then this field does not exist. /// - UINT32 ExtendedSize; + UINT32 ExtendedSize; } EFI_COMMON_SECTION_HEADER2; /// @@ -277,15 +275,15 @@ typedef struct { /// /// Usual common section header. CommonHeader.Type = EFI_SECTION_COMPRESSION. /// - EFI_COMMON_SECTION_HEADER CommonHeader; + EFI_COMMON_SECTION_HEADER CommonHeader; /// /// The UINT32 that indicates the size of the section data after decompression. /// - UINT32 UncompressedLength; + UINT32 UncompressedLength; /// /// Indicates which compression algorithm is used. /// - UINT8 CompressionType; + UINT8 CompressionType; } EFI_COMPRESSION_SECTION; typedef struct { @@ -312,20 +310,20 @@ typedef struct { /// order to conserve space. The contents of this section are implementation specific, but might contain /// debug data or detailed integration instructions. /// -typedef EFI_COMMON_SECTION_HEADER EFI_DISPOSABLE_SECTION; -typedef EFI_COMMON_SECTION_HEADER2 EFI_DISPOSABLE_SECTION2; +typedef EFI_COMMON_SECTION_HEADER EFI_DISPOSABLE_SECTION; +typedef EFI_COMMON_SECTION_HEADER2 EFI_DISPOSABLE_SECTION2; /// /// The leaf section which could be used to determine the dispatch order of DXEs. /// -typedef EFI_COMMON_SECTION_HEADER EFI_DXE_DEPEX_SECTION; -typedef EFI_COMMON_SECTION_HEADER2 EFI_DXE_DEPEX_SECTION2; +typedef EFI_COMMON_SECTION_HEADER EFI_DXE_DEPEX_SECTION; +typedef EFI_COMMON_SECTION_HEADER2 EFI_DXE_DEPEX_SECTION2; /// /// The leaf section which contains a PI FV. /// -typedef EFI_COMMON_SECTION_HEADER EFI_FIRMWARE_VOLUME_IMAGE_SECTION; -typedef EFI_COMMON_SECTION_HEADER2 EFI_FIRMWARE_VOLUME_IMAGE_SECTION2; +typedef EFI_COMMON_SECTION_HEADER EFI_FIRMWARE_VOLUME_IMAGE_SECTION; +typedef EFI_COMMON_SECTION_HEADER2 EFI_FIRMWARE_VOLUME_IMAGE_SECTION2; /// /// The leaf section which contains a single GUID. @@ -334,11 +332,11 @@ typedef struct { /// /// Common section header. CommonHeader.Type = EFI_SECTION_FREEFORM_SUBTYPE_GUID. /// - EFI_COMMON_SECTION_HEADER CommonHeader; + EFI_COMMON_SECTION_HEADER CommonHeader; /// /// This GUID is defined by the creator of the file. It is a vendor-defined file type. /// - EFI_GUID SubTypeGuid; + EFI_GUID SubTypeGuid; } EFI_FREEFORM_SUBTYPE_GUID_SECTION; typedef struct { @@ -364,19 +362,19 @@ typedef struct { /// /// The common section header. CommonHeader.Type = EFI_SECTION_GUID_DEFINED. /// - EFI_COMMON_SECTION_HEADER CommonHeader; + EFI_COMMON_SECTION_HEADER CommonHeader; /// /// The GUID that defines the format of the data that follows. It is a vendor-defined section type. /// - EFI_GUID SectionDefinitionGuid; + EFI_GUID SectionDefinitionGuid; /// /// Contains the offset in bytes from the beginning of the common header to the first byte of the data. /// - UINT16 DataOffset; + UINT16 DataOffset; /// /// The bit field that declares some specific characteristics of the section contents. /// - UINT16 Attributes; + UINT16 Attributes; } EFI_GUID_DEFINED_SECTION; typedef struct { @@ -401,14 +399,14 @@ typedef struct { /// /// The leaf section which contains PE32+ image. /// -typedef EFI_COMMON_SECTION_HEADER EFI_PE32_SECTION; -typedef EFI_COMMON_SECTION_HEADER2 EFI_PE32_SECTION2; +typedef EFI_COMMON_SECTION_HEADER EFI_PE32_SECTION; +typedef EFI_COMMON_SECTION_HEADER2 EFI_PE32_SECTION2; /// /// The leaf section used to determine the dispatch order of PEIMs. /// -typedef EFI_COMMON_SECTION_HEADER EFI_PEI_DEPEX_SECTION; -typedef EFI_COMMON_SECTION_HEADER2 EFI_PEI_DEPEX_SECTION2; +typedef EFI_COMMON_SECTION_HEADER EFI_PEI_DEPEX_SECTION; +typedef EFI_COMMON_SECTION_HEADER2 EFI_PEI_DEPEX_SECTION2; /// /// A leaf section type that contains a position-independent-code (PIC) image. @@ -419,20 +417,20 @@ typedef EFI_COMMON_SECTION_HEADER2 EFI_PEI_DEPEX_SECTION2; /// execute correctly without performing any relocation or other fix-ups. EFI_PIC_SECTION2 must /// be used if the section is 16MB or larger. /// -typedef EFI_COMMON_SECTION_HEADER EFI_PIC_SECTION; -typedef EFI_COMMON_SECTION_HEADER2 EFI_PIC_SECTION2; +typedef EFI_COMMON_SECTION_HEADER EFI_PIC_SECTION; +typedef EFI_COMMON_SECTION_HEADER2 EFI_PIC_SECTION2; /// /// The leaf section which constains the position-independent-code image. /// -typedef EFI_COMMON_SECTION_HEADER EFI_TE_SECTION; -typedef EFI_COMMON_SECTION_HEADER2 EFI_TE_SECTION2; +typedef EFI_COMMON_SECTION_HEADER EFI_TE_SECTION; +typedef EFI_COMMON_SECTION_HEADER2 EFI_TE_SECTION2; /// /// The leaf section which contains an array of zero or more bytes. /// -typedef EFI_COMMON_SECTION_HEADER EFI_RAW_SECTION; -typedef EFI_COMMON_SECTION_HEADER2 EFI_RAW_SECTION2; +typedef EFI_COMMON_SECTION_HEADER EFI_RAW_SECTION; +typedef EFI_COMMON_SECTION_HEADER2 EFI_RAW_SECTION2; /// /// The SMM dependency expression section is a leaf section that contains a dependency expression that @@ -442,7 +440,7 @@ typedef EFI_COMMON_SECTION_HEADER2 EFI_RAW_SECTION2; /// The dependency expression may refer to protocols installed in either the UEFI or the SMM protocol /// database. EFI_SMM_DEPEX_SECTION2 must be used if the section is 16MB or larger. /// -typedef EFI_COMMON_SECTION_HEADER EFI_SMM_DEPEX_SECTION; +typedef EFI_COMMON_SECTION_HEADER EFI_SMM_DEPEX_SECTION; typedef EFI_COMMON_SECTION_HEADER2 EFI_SMM_DEPEX_SECTION2; /// @@ -450,12 +448,12 @@ typedef EFI_COMMON_SECTION_HEADER2 EFI_SMM_DEPEX_SECTION2; /// is human readable file name. /// typedef struct { - EFI_COMMON_SECTION_HEADER CommonHeader; + EFI_COMMON_SECTION_HEADER CommonHeader; /// /// Array of unicode string. /// - CHAR16 FileNameString[1]; + CHAR16 FileNameString[1]; } EFI_USER_INTERFACE_SECTION; typedef struct { @@ -468,13 +466,13 @@ typedef struct { /// an optional unicode string that represents the file revision. /// typedef struct { - EFI_COMMON_SECTION_HEADER CommonHeader; - UINT16 BuildNumber; + EFI_COMMON_SECTION_HEADER CommonHeader; + UINT16 BuildNumber; /// /// Array of unicode string. /// - CHAR16 VersionString[1]; + CHAR16 VersionString[1]; } EFI_VERSION_SECTION; typedef struct { @@ -492,7 +490,7 @@ typedef struct { /// and IS_SECTION2() function-like macros below must not have side effects: /// SectionHeaderPtr is evaluated multiple times. /// -#define SECTION_SIZE(SectionHeaderPtr) ((UINT32) ( \ +#define SECTION_SIZE(SectionHeaderPtr) ((UINT32) (\ (((EFI_COMMON_SECTION_HEADER *) (UINTN) (SectionHeaderPtr))->Size[0] ) | \ (((EFI_COMMON_SECTION_HEADER *) (UINTN) (SectionHeaderPtr))->Size[1] << 8) | \ (((EFI_COMMON_SECTION_HEADER *) (UINTN) (SectionHeaderPtr))->Size[2] << 16))) @@ -506,4 +504,3 @@ typedef struct { #pragma pack() #endif - diff --git a/MdePkg/Include/Pi/PiFirmwareVolume.h b/MdePkg/Include/Pi/PiFirmwareVolume.h index 64b0bfc..5cfec5e 100644 --- a/MdePkg/Include/Pi/PiFirmwareVolume.h +++ b/MdePkg/Include/Pi/PiFirmwareVolume.h @@ -15,7 +15,7 @@ /// /// EFI_FV_FILE_ATTRIBUTES /// -typedef UINT32 EFI_FV_FILE_ATTRIBUTES; +typedef UINT32 EFI_FV_FILE_ATTRIBUTES; // // Value of EFI_FV_FILE_ATTRIBUTES. @@ -27,70 +27,70 @@ typedef UINT32 EFI_FV_FILE_ATTRIBUTES; /// /// type of EFI FVB attribute /// -typedef UINT32 EFI_FVB_ATTRIBUTES_2; +typedef UINT32 EFI_FVB_ATTRIBUTES_2; // // Attributes bit definitions // -#define EFI_FVB2_READ_DISABLED_CAP 0x00000001 -#define EFI_FVB2_READ_ENABLED_CAP 0x00000002 -#define EFI_FVB2_READ_STATUS 0x00000004 -#define EFI_FVB2_WRITE_DISABLED_CAP 0x00000008 -#define EFI_FVB2_WRITE_ENABLED_CAP 0x00000010 -#define EFI_FVB2_WRITE_STATUS 0x00000020 -#define EFI_FVB2_LOCK_CAP 0x00000040 -#define EFI_FVB2_LOCK_STATUS 0x00000080 -#define EFI_FVB2_STICKY_WRITE 0x00000200 -#define EFI_FVB2_MEMORY_MAPPED 0x00000400 -#define EFI_FVB2_ERASE_POLARITY 0x00000800 -#define EFI_FVB2_READ_LOCK_CAP 0x00001000 -#define EFI_FVB2_READ_LOCK_STATUS 0x00002000 -#define EFI_FVB2_WRITE_LOCK_CAP 0x00004000 -#define EFI_FVB2_WRITE_LOCK_STATUS 0x00008000 -#define EFI_FVB2_ALIGNMENT 0x001F0000 -#define EFI_FVB2_ALIGNMENT_1 0x00000000 -#define EFI_FVB2_ALIGNMENT_2 0x00010000 -#define EFI_FVB2_ALIGNMENT_4 0x00020000 -#define EFI_FVB2_ALIGNMENT_8 0x00030000 -#define EFI_FVB2_ALIGNMENT_16 0x00040000 -#define EFI_FVB2_ALIGNMENT_32 0x00050000 -#define EFI_FVB2_ALIGNMENT_64 0x00060000 -#define EFI_FVB2_ALIGNMENT_128 0x00070000 -#define EFI_FVB2_ALIGNMENT_256 0x00080000 -#define EFI_FVB2_ALIGNMENT_512 0x00090000 -#define EFI_FVB2_ALIGNMENT_1K 0x000A0000 -#define EFI_FVB2_ALIGNMENT_2K 0x000B0000 -#define EFI_FVB2_ALIGNMENT_4K 0x000C0000 -#define EFI_FVB2_ALIGNMENT_8K 0x000D0000 -#define EFI_FVB2_ALIGNMENT_16K 0x000E0000 -#define EFI_FVB2_ALIGNMENT_32K 0x000F0000 -#define EFI_FVB2_ALIGNMENT_64K 0x00100000 -#define EFI_FVB2_ALIGNMENT_128K 0x00110000 -#define EFI_FVB2_ALIGNMENT_256K 0x00120000 -#define EFI_FVB2_ALIGNMENT_512K 0x00130000 -#define EFI_FVB2_ALIGNMENT_1M 0x00140000 -#define EFI_FVB2_ALIGNMENT_2M 0x00150000 -#define EFI_FVB2_ALIGNMENT_4M 0x00160000 -#define EFI_FVB2_ALIGNMENT_8M 0x00170000 -#define EFI_FVB2_ALIGNMENT_16M 0x00180000 -#define EFI_FVB2_ALIGNMENT_32M 0x00190000 -#define EFI_FVB2_ALIGNMENT_64M 0x001A0000 -#define EFI_FVB2_ALIGNMENT_128M 0x001B0000 -#define EFI_FVB2_ALIGNMENT_256M 0x001C0000 -#define EFI_FVB2_ALIGNMENT_512M 0x001D0000 -#define EFI_FVB2_ALIGNMENT_1G 0x001E0000 -#define EFI_FVB2_ALIGNMENT_2G 0x001F0000 -#define EFI_FVB2_WEAK_ALIGNMENT 0x80000000 +#define EFI_FVB2_READ_DISABLED_CAP 0x00000001 +#define EFI_FVB2_READ_ENABLED_CAP 0x00000002 +#define EFI_FVB2_READ_STATUS 0x00000004 +#define EFI_FVB2_WRITE_DISABLED_CAP 0x00000008 +#define EFI_FVB2_WRITE_ENABLED_CAP 0x00000010 +#define EFI_FVB2_WRITE_STATUS 0x00000020 +#define EFI_FVB2_LOCK_CAP 0x00000040 +#define EFI_FVB2_LOCK_STATUS 0x00000080 +#define EFI_FVB2_STICKY_WRITE 0x00000200 +#define EFI_FVB2_MEMORY_MAPPED 0x00000400 +#define EFI_FVB2_ERASE_POLARITY 0x00000800 +#define EFI_FVB2_READ_LOCK_CAP 0x00001000 +#define EFI_FVB2_READ_LOCK_STATUS 0x00002000 +#define EFI_FVB2_WRITE_LOCK_CAP 0x00004000 +#define EFI_FVB2_WRITE_LOCK_STATUS 0x00008000 +#define EFI_FVB2_ALIGNMENT 0x001F0000 +#define EFI_FVB2_ALIGNMENT_1 0x00000000 +#define EFI_FVB2_ALIGNMENT_2 0x00010000 +#define EFI_FVB2_ALIGNMENT_4 0x00020000 +#define EFI_FVB2_ALIGNMENT_8 0x00030000 +#define EFI_FVB2_ALIGNMENT_16 0x00040000 +#define EFI_FVB2_ALIGNMENT_32 0x00050000 +#define EFI_FVB2_ALIGNMENT_64 0x00060000 +#define EFI_FVB2_ALIGNMENT_128 0x00070000 +#define EFI_FVB2_ALIGNMENT_256 0x00080000 +#define EFI_FVB2_ALIGNMENT_512 0x00090000 +#define EFI_FVB2_ALIGNMENT_1K 0x000A0000 +#define EFI_FVB2_ALIGNMENT_2K 0x000B0000 +#define EFI_FVB2_ALIGNMENT_4K 0x000C0000 +#define EFI_FVB2_ALIGNMENT_8K 0x000D0000 +#define EFI_FVB2_ALIGNMENT_16K 0x000E0000 +#define EFI_FVB2_ALIGNMENT_32K 0x000F0000 +#define EFI_FVB2_ALIGNMENT_64K 0x00100000 +#define EFI_FVB2_ALIGNMENT_128K 0x00110000 +#define EFI_FVB2_ALIGNMENT_256K 0x00120000 +#define EFI_FVB2_ALIGNMENT_512K 0x00130000 +#define EFI_FVB2_ALIGNMENT_1M 0x00140000 +#define EFI_FVB2_ALIGNMENT_2M 0x00150000 +#define EFI_FVB2_ALIGNMENT_4M 0x00160000 +#define EFI_FVB2_ALIGNMENT_8M 0x00170000 +#define EFI_FVB2_ALIGNMENT_16M 0x00180000 +#define EFI_FVB2_ALIGNMENT_32M 0x00190000 +#define EFI_FVB2_ALIGNMENT_64M 0x001A0000 +#define EFI_FVB2_ALIGNMENT_128M 0x001B0000 +#define EFI_FVB2_ALIGNMENT_256M 0x001C0000 +#define EFI_FVB2_ALIGNMENT_512M 0x001D0000 +#define EFI_FVB2_ALIGNMENT_1G 0x001E0000 +#define EFI_FVB2_ALIGNMENT_2G 0x001F0000 +#define EFI_FVB2_WEAK_ALIGNMENT 0x80000000 typedef struct { /// /// The number of sequential blocks which are of the same size. /// - UINT32 NumBlocks; + UINT32 NumBlocks; /// /// The size of the blocks. /// - UINT32 Length; + UINT32 Length; } EFI_FV_BLOCK_MAP_ENTRY; /// @@ -147,7 +147,7 @@ typedef struct { EFI_FV_BLOCK_MAP_ENTRY BlockMap[1]; } EFI_FIRMWARE_VOLUME_HEADER; -#define EFI_FVH_SIGNATURE SIGNATURE_32 ('_', 'F', 'V', 'H') +#define EFI_FVH_SIGNATURE SIGNATURE_32 ('_', 'F', 'V', 'H') /// /// Firmware Volume Header Revision definition @@ -161,11 +161,11 @@ typedef struct { /// /// Firmware volume name. /// - EFI_GUID FvName; + EFI_GUID FvName; /// /// Size of the rest of the extension header, including this structure. /// - UINT32 ExtHeaderSize; + UINT32 ExtHeaderSize; } EFI_FIRMWARE_VOLUME_EXT_HEADER; /// @@ -190,12 +190,12 @@ typedef struct { /// /// Standard extension entry, with the type EFI_FV_EXT_TYPE_OEM_TYPE. /// - EFI_FIRMWARE_VOLUME_EXT_ENTRY Hdr; + EFI_FIRMWARE_VOLUME_EXT_ENTRY Hdr; /// /// A bit mask, one bit for each file type between 0xC0 (bit 0) and 0xDF (bit 31). If a bit /// is '1', then the GUID entry exists in Types. If a bit is '0' then no GUID entry exists in Types. /// - UINT32 TypeMask; + UINT32 TypeMask; /// /// An array of GUIDs, each GUID representing an OEM file type. /// @@ -203,7 +203,7 @@ typedef struct { /// } EFI_FIRMWARE_VOLUME_EXT_ENTRY_OEM_TYPE; -#define EFI_FV_EXT_TYPE_GUID_TYPE 0x0002 +#define EFI_FV_EXT_TYPE_GUID_TYPE 0x0002 /// /// This extension header EFI_FIRMWARE_VOLUME_EXT_ENTRY_GUID_TYPE provides a vendor specific @@ -213,11 +213,11 @@ typedef struct { /// /// Standard extension entry, with the type EFI_FV_EXT_TYPE_OEM_TYPE. /// - EFI_FIRMWARE_VOLUME_EXT_ENTRY Hdr; + EFI_FIRMWARE_VOLUME_EXT_ENTRY Hdr; /// /// Vendor-specific GUID. /// - EFI_GUID FormatType; + EFI_GUID FormatType; /// /// An arry of bytes of length Length. /// @@ -225,7 +225,7 @@ typedef struct { /// } EFI_FIRMWARE_VOLUME_EXT_ENTRY_GUID_TYPE; -#define EFI_FV_EXT_TYPE_USED_SIZE_TYPE 0x03 +#define EFI_FV_EXT_TYPE_USED_SIZE_TYPE 0x03 /// /// The EFI_FIRMWARE_VOLUME_EXT_ENTRY_USED_SIZE_TYPE can be used to find @@ -235,13 +235,13 @@ typedef struct { /// /// Standard extension entry, with the type EFI_FV_EXT_TYPE_USED_SIZE_TYPE. /// - EFI_FIRMWARE_VOLUME_EXT_ENTRY Hdr; + EFI_FIRMWARE_VOLUME_EXT_ENTRY Hdr; /// /// The number of bytes of the FV that are in uses. The remaining /// EFI_FIRMWARE_VOLUME_HEADER FvLength minus UsedSize bytes in /// the FV must contain the value implied by EFI_FVB2_ERASE_POLARITY. /// - UINT32 UsedSize; + UINT32 UsedSize; } EFI_FIRMWARE_VOLUME_EXT_ENTRY_USED_SIZE_TYPE; #endif diff --git a/MdePkg/Include/Pi/PiHob.h b/MdePkg/Include/Pi/PiHob.h index 62c0774..e9f0ab4 100644 --- a/MdePkg/Include/Pi/PiHob.h +++ b/MdePkg/Include/Pi/PiHob.h @@ -48,11 +48,10 @@ typedef struct { UINT32 Reserved; } EFI_HOB_GENERIC_HEADER; - /// /// Value of version in EFI_HOB_HANDOFF_INFO_TABLE. /// -#define EFI_HOB_HANDOFF_TABLE_VERSION 0x0009 +#define EFI_HOB_HANDOFF_TABLE_VERSION 0x0009 /// /// Contains general state information used by the HOB producer phase. @@ -62,39 +61,39 @@ typedef struct { /// /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_HANDOFF. /// - EFI_HOB_GENERIC_HEADER Header; + EFI_HOB_GENERIC_HEADER Header; /// /// The version number pertaining to the PHIT HOB definition. /// This value is four bytes in length to provide an 8-byte aligned entry /// when it is combined with the 4-byte BootMode. /// - UINT32 Version; + UINT32 Version; /// /// The system boot mode as determined during the HOB producer phase. /// - EFI_BOOT_MODE BootMode; + EFI_BOOT_MODE BootMode; /// /// The highest address location of memory that is allocated for use by the HOB producer /// phase. This address must be 4-KB aligned to meet page restrictions of UEFI. /// - EFI_PHYSICAL_ADDRESS EfiMemoryTop; + EFI_PHYSICAL_ADDRESS EfiMemoryTop; /// /// The lowest address location of memory that is allocated for use by the HOB producer phase. /// - EFI_PHYSICAL_ADDRESS EfiMemoryBottom; + EFI_PHYSICAL_ADDRESS EfiMemoryBottom; /// /// The highest address location of free memory that is currently available /// for use by the HOB producer phase. /// - EFI_PHYSICAL_ADDRESS EfiFreeMemoryTop; + EFI_PHYSICAL_ADDRESS EfiFreeMemoryTop; /// /// The lowest address location of free memory that is available for use by the HOB producer phase. /// - EFI_PHYSICAL_ADDRESS EfiFreeMemoryBottom; + EFI_PHYSICAL_ADDRESS EfiFreeMemoryBottom; /// /// The end of the HOB list. /// - EFI_PHYSICAL_ADDRESS EfiEndOfHobList; + EFI_PHYSICAL_ADDRESS EfiEndOfHobList; } EFI_HOB_HANDOFF_INFO_TABLE; /// @@ -110,31 +109,31 @@ typedef struct { /// Type EFI_GUID is defined in InstallProtocolInterface() in the UEFI 2.0 /// specification. /// - EFI_GUID Name; + EFI_GUID Name; /// /// The base address of memory allocated by this HOB. Type /// EFI_PHYSICAL_ADDRESS is defined in AllocatePages() in the UEFI 2.0 /// specification. /// - EFI_PHYSICAL_ADDRESS MemoryBaseAddress; + EFI_PHYSICAL_ADDRESS MemoryBaseAddress; /// /// The length in bytes of memory allocated by this HOB. /// - UINT64 MemoryLength; + UINT64 MemoryLength; /// /// Defines the type of memory allocated by this HOB. The memory type definition /// follows the EFI_MEMORY_TYPE definition. Type EFI_MEMORY_TYPE is defined /// in AllocatePages() in the UEFI 2.0 specification. /// - EFI_MEMORY_TYPE MemoryType; + EFI_MEMORY_TYPE MemoryType; /// /// Padding for Itanium processor family /// - UINT8 Reserved[4]; + UINT8 Reserved[4]; } EFI_HOB_MEMORY_ALLOCATION_HEADER; /// @@ -146,19 +145,18 @@ typedef struct { /// /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_ALLOCATION. /// - EFI_HOB_GENERIC_HEADER Header; + EFI_HOB_GENERIC_HEADER Header; /// /// An instance of the EFI_HOB_MEMORY_ALLOCATION_HEADER that describes the /// various attributes of the logical memory allocation. /// - EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor; + EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor; // // Additional data pertaining to the "Name" Guid memory // may go here. // } EFI_HOB_MEMORY_ALLOCATION; - /// /// Describes the memory stack that is produced by the HOB producer /// phase and upon which all post-memory-installed executable @@ -168,12 +166,12 @@ typedef struct { /// /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_ALLOCATION. /// - EFI_HOB_GENERIC_HEADER Header; + EFI_HOB_GENERIC_HEADER Header; /// /// An instance of the EFI_HOB_MEMORY_ALLOCATION_HEADER that describes the /// various attributes of the logical memory allocation. /// - EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor; + EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor; } EFI_HOB_MEMORY_ALLOCATION_STACK; /// @@ -186,12 +184,12 @@ typedef struct { /// /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_ALLOCATION. /// - EFI_HOB_GENERIC_HEADER Header; + EFI_HOB_GENERIC_HEADER Header; /// /// An instance of the EFI_HOB_MEMORY_ALLOCATION_HEADER that describes the /// various attributes of the logical memory allocation. /// - EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor; + EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor; } EFI_HOB_MEMORY_ALLOCATION_BSP_STORE; /// @@ -201,22 +199,22 @@ typedef struct { /// /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_ALLOCATION. /// - EFI_HOB_GENERIC_HEADER Header; + EFI_HOB_GENERIC_HEADER Header; /// /// An instance of the EFI_HOB_MEMORY_ALLOCATION_HEADER that describes the /// various attributes of the logical memory allocation. /// - EFI_HOB_MEMORY_ALLOCATION_HEADER MemoryAllocationHeader; + EFI_HOB_MEMORY_ALLOCATION_HEADER MemoryAllocationHeader; /// /// The GUID specifying the values of the firmware file system name /// that contains the HOB consumer phase component. /// - EFI_GUID ModuleName; + EFI_GUID ModuleName; /// /// The address of the memory-mapped firmware volume /// that contains the HOB consumer phase firmware file. /// - EFI_PHYSICAL_ADDRESS EntryPoint; + EFI_PHYSICAL_ADDRESS EntryPoint; } EFI_HOB_MEMORY_ALLOCATION_MODULE; /// @@ -246,10 +244,10 @@ typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE; // // The following attributes are used to describe settings // -#define EFI_RESOURCE_ATTRIBUTE_PRESENT 0x00000001 -#define EFI_RESOURCE_ATTRIBUTE_INITIALIZED 0x00000002 -#define EFI_RESOURCE_ATTRIBUTE_TESTED 0x00000004 -#define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTED 0x00000080 +#define EFI_RESOURCE_ATTRIBUTE_PRESENT 0x00000001 +#define EFI_RESOURCE_ATTRIBUTE_INITIALIZED 0x00000002 +#define EFI_RESOURCE_ATTRIBUTE_TESTED 0x00000004 +#define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTED 0x00000080 // // This is typically used as memory cacheability attribute today. // NOTE: Since PI spec 1.4, please use EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED @@ -257,9 +255,9 @@ typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE; // means Memory cacheability attribute: The memory supports being programmed with // a writeprotected cacheable attribute. // -#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED 0x00000100 -#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED 0x00000200 -#define EFI_RESOURCE_ATTRIBUTE_PERSISTENT 0x00800000 +#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED 0x00000100 +#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED 0x00000200 +#define EFI_RESOURCE_ATTRIBUTE_PERSISTENT 0x00800000 // // The rest of the attributes are used to describe capabilities // @@ -283,12 +281,12 @@ typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE; // writes, and EFI_RESOURCE_ATTRIBUTE_WRITE_PROTEC TABLE means Memory cacheability attribute: // The memory supports being programmed with a writeprotected cacheable attribute. // -#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTABLE 0x00200000 -#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTABLE 0x00400000 -#define EFI_RESOURCE_ATTRIBUTE_PERSISTABLE 0x01000000 +#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTABLE 0x00200000 +#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTABLE 0x00400000 +#define EFI_RESOURCE_ATTRIBUTE_PERSISTABLE 0x01000000 -#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED 0x00040000 -#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE 0x00080000 +#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED 0x00040000 +#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE 0x00080000 // // Physical memory relative reliability attribute. This @@ -296,7 +294,7 @@ typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE; // memory in the system. If all memory has the same // reliability, then this bit is not used. // -#define EFI_RESOURCE_ATTRIBUTE_MORE_RELIABLE 0x02000000 +#define EFI_RESOURCE_ATTRIBUTE_MORE_RELIABLE 0x02000000 /// /// Describes the resource properties of all fixed, @@ -307,28 +305,28 @@ typedef struct { /// /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_RESOURCE_DESCRIPTOR. /// - EFI_HOB_GENERIC_HEADER Header; + EFI_HOB_GENERIC_HEADER Header; /// /// A GUID representing the owner of the resource. This GUID is used by HOB /// consumer phase components to correlate device ownership of a resource. /// - EFI_GUID Owner; + EFI_GUID Owner; /// /// The resource type enumeration as defined by EFI_RESOURCE_TYPE. /// - EFI_RESOURCE_TYPE ResourceType; + EFI_RESOURCE_TYPE ResourceType; /// /// Resource attributes as defined by EFI_RESOURCE_ATTRIBUTE_TYPE. /// - EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute; + EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute; /// /// The physical start address of the resource region. /// - EFI_PHYSICAL_ADDRESS PhysicalStart; + EFI_PHYSICAL_ADDRESS PhysicalStart; /// /// The number of bytes of the resource region. /// - UINT64 ResourceLength; + UINT64 ResourceLength; } EFI_HOB_RESOURCE_DESCRIPTOR; /// @@ -339,11 +337,11 @@ typedef struct { /// /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_GUID_EXTENSION. /// - EFI_HOB_GENERIC_HEADER Header; + EFI_HOB_GENERIC_HEADER Header; /// /// A GUID that defines the contents of this HOB. /// - EFI_GUID Name; + EFI_GUID Name; // // Guid specific data goes here // @@ -356,15 +354,15 @@ typedef struct { /// /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_FV. /// - EFI_HOB_GENERIC_HEADER Header; + EFI_HOB_GENERIC_HEADER Header; /// /// The physical memory-mapped base address of the firmware volume. /// - EFI_PHYSICAL_ADDRESS BaseAddress; + EFI_PHYSICAL_ADDRESS BaseAddress; /// /// The length in bytes of the firmware volume. /// - UINT64 Length; + UINT64 Length; } EFI_HOB_FIRMWARE_VOLUME; /// @@ -375,23 +373,23 @@ typedef struct { /// /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_FV2. /// - EFI_HOB_GENERIC_HEADER Header; + EFI_HOB_GENERIC_HEADER Header; /// /// The physical memory-mapped base address of the firmware volume. /// - EFI_PHYSICAL_ADDRESS BaseAddress; + EFI_PHYSICAL_ADDRESS BaseAddress; /// /// The length in bytes of the firmware volume. /// - UINT64 Length; + UINT64 Length; /// /// The name of the firmware volume. /// - EFI_GUID FvName; + EFI_GUID FvName; /// /// The name of the firmware file that contained this firmware volume. /// - EFI_GUID FileName; + EFI_GUID FileName; } EFI_HOB_FIRMWARE_VOLUME2; /// @@ -402,34 +400,34 @@ typedef struct { /// /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_FV3. /// - EFI_HOB_GENERIC_HEADER Header; + EFI_HOB_GENERIC_HEADER Header; /// /// The physical memory-mapped base address of the firmware volume. /// - EFI_PHYSICAL_ADDRESS BaseAddress; + EFI_PHYSICAL_ADDRESS BaseAddress; /// /// The length in bytes of the firmware volume. /// - UINT64 Length; + UINT64 Length; /// /// The authentication status. /// - UINT32 AuthenticationStatus; + UINT32 AuthenticationStatus; /// /// TRUE if the FV was extracted as a file within another firmware volume. /// FALSE otherwise. /// - BOOLEAN ExtractedFv; + BOOLEAN ExtractedFv; /// /// The name of the firmware volume. /// Valid only if IsExtractedFv is TRUE. /// - EFI_GUID FvName; + EFI_GUID FvName; /// /// The name of the firmware file that contained this firmware volume. /// Valid only if IsExtractedFv is TRUE. /// - EFI_GUID FileName; + EFI_GUID FileName; } EFI_HOB_FIRMWARE_VOLUME3; /// @@ -439,22 +437,21 @@ typedef struct { /// /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_CPU. /// - EFI_HOB_GENERIC_HEADER Header; + EFI_HOB_GENERIC_HEADER Header; /// /// Identifies the maximum physical memory addressability of the processor. /// - UINT8 SizeOfMemorySpace; + UINT8 SizeOfMemorySpace; /// /// Identifies the maximum physical I/O addressability of the processor. /// - UINT8 SizeOfIoSpace; + UINT8 SizeOfIoSpace; /// /// This field will always be set to zero. /// - UINT8 Reserved[6]; + UINT8 Reserved[6]; } EFI_HOB_CPU; - /// /// Describes pool memory allocations. /// @@ -462,7 +459,7 @@ typedef struct { /// /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_POOL. /// - EFI_HOB_GENERIC_HEADER Header; + EFI_HOB_GENERIC_HEADER Header; } EFI_HOB_MEMORY_POOL; /// @@ -476,37 +473,36 @@ typedef struct { /// /// The HOB generic header where Header.HobType = EFI_HOB_TYPE_UEFI_CAPSULE. /// - EFI_HOB_GENERIC_HEADER Header; + EFI_HOB_GENERIC_HEADER Header; /// /// The physical memory-mapped base address of an UEFI capsule. This value is set to /// point to the base of the contiguous memory of the UEFI capsule. /// The length of the contiguous memory in bytes. /// - EFI_PHYSICAL_ADDRESS BaseAddress; - UINT64 Length; + EFI_PHYSICAL_ADDRESS BaseAddress; + UINT64 Length; } EFI_HOB_UEFI_CAPSULE; /// /// Union of all the possible HOB Types. /// typedef union { - EFI_HOB_GENERIC_HEADER *Header; - EFI_HOB_HANDOFF_INFO_TABLE *HandoffInformationTable; - EFI_HOB_MEMORY_ALLOCATION *MemoryAllocation; - EFI_HOB_MEMORY_ALLOCATION_BSP_STORE *MemoryAllocationBspStore; - EFI_HOB_MEMORY_ALLOCATION_STACK *MemoryAllocationStack; - EFI_HOB_MEMORY_ALLOCATION_MODULE *MemoryAllocationModule; - EFI_HOB_RESOURCE_DESCRIPTOR *ResourceDescriptor; - EFI_HOB_GUID_TYPE *Guid; - EFI_HOB_FIRMWARE_VOLUME *FirmwareVolume; - EFI_HOB_FIRMWARE_VOLUME2 *FirmwareVolume2; - EFI_HOB_FIRMWARE_VOLUME3 *FirmwareVolume3; - EFI_HOB_CPU *Cpu; - EFI_HOB_MEMORY_POOL *Pool; - EFI_HOB_UEFI_CAPSULE *Capsule; - UINT8 *Raw; + EFI_HOB_GENERIC_HEADER *Header; + EFI_HOB_HANDOFF_INFO_TABLE *HandoffInformationTable; + EFI_HOB_MEMORY_ALLOCATION *MemoryAllocation; + EFI_HOB_MEMORY_ALLOCATION_BSP_STORE *MemoryAllocationBspStore; + EFI_HOB_MEMORY_ALLOCATION_STACK *MemoryAllocationStack; + EFI_HOB_MEMORY_ALLOCATION_MODULE *MemoryAllocationModule; + EFI_HOB_RESOURCE_DESCRIPTOR *ResourceDescriptor; + EFI_HOB_GUID_TYPE *Guid; + EFI_HOB_FIRMWARE_VOLUME *FirmwareVolume; + EFI_HOB_FIRMWARE_VOLUME2 *FirmwareVolume2; + EFI_HOB_FIRMWARE_VOLUME3 *FirmwareVolume3; + EFI_HOB_CPU *Cpu; + EFI_HOB_MEMORY_POOL *Pool; + EFI_HOB_UEFI_CAPSULE *Capsule; + UINT8 *Raw; } EFI_PEI_HOB_POINTERS; - #endif diff --git a/MdePkg/Include/Pi/PiI2c.h b/MdePkg/Include/Pi/PiI2c.h index 2662533..10b61cd 100644 --- a/MdePkg/Include/Pi/PiI2c.h +++ b/MdePkg/Include/Pi/PiI2c.h @@ -17,7 +17,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// I2C protocol stack to address the duplicated address space between 0 // and 127 in 10-bit mode. /// -#define I2C_ADDRESSING_10_BIT 0x80000000 +#define I2C_ADDRESSING_10_BIT 0x80000000 /// /// I2C controller capabilities @@ -31,24 +31,24 @@ typedef struct { /// /// Length of this data structure in bytes /// - UINT32 StructureSizeInBytes; + UINT32 StructureSizeInBytes; /// /// The maximum number of bytes the I2C host controller is able to /// receive from the I2C bus. /// - UINT32 MaximumReceiveBytes; + UINT32 MaximumReceiveBytes; /// /// The maximum number of bytes the I2C host controller is able to send /// on the I2C bus. /// - UINT32 MaximumTransmitBytes; + UINT32 MaximumTransmitBytes; /// /// The maximum number of bytes in the I2C bus transaction. /// - UINT32 MaximumTotalBytes; + UINT32 MaximumTotalBytes; } EFI_I2C_CONTROLLER_CAPABILITIES; /// @@ -67,12 +67,12 @@ typedef struct { /// combines both the manufacture name and the I2C part number into /// a single value specified as a GUID. /// - CONST EFI_GUID *DeviceGuid; + CONST EFI_GUID *DeviceGuid; /// /// Unique ID of the I2C part within the system /// - UINT32 DeviceIndex; + UINT32 DeviceIndex; /// /// Hardware revision - ACPI _HRV value. See the Advanced @@ -83,29 +83,29 @@ typedef struct { /// http://www.acpi.info/spec.htm /// http://msdn.microsoft.com/en-us/library/windows/hardware/jj131711(v=vs.85).aspx /// - UINT32 HardwareRevision; + UINT32 HardwareRevision; /// /// I2C bus configuration for the I2C device /// - UINT32 I2cBusConfiguration; + UINT32 I2cBusConfiguration; /// /// Number of slave addresses for the I2C device. /// - UINT32 SlaveAddressCount; + UINT32 SlaveAddressCount; /// /// Pointer to the array of slave addresses for the I2C device. /// - CONST UINT32 *SlaveAddressArray; + CONST UINT32 *SlaveAddressArray; } EFI_I2C_DEVICE; /// /// Define the I2C flags /// /// I2C read operation when set -#define I2C_FLAG_READ 0x00000001 +#define I2C_FLAG_READ 0x00000001 /// /// Define the flags for SMBus operation @@ -116,7 +116,7 @@ typedef struct { /// /// SMBus operation -#define I2C_FLAG_SMBUS_OPERATION 0x00010000 +#define I2C_FLAG_SMBUS_OPERATION 0x00010000 /// SMBus block operation /// The flag I2C_FLAG_SMBUS_BLOCK causes the I2C master protocol to update @@ -127,19 +127,19 @@ typedef struct { /// of LengthInBytes is to be read from the device. The first byte /// read contains the number of bytes remaining to be read, plus an /// optional PEC value. -#define I2C_FLAG_SMBUS_BLOCK 0x00020000 +#define I2C_FLAG_SMBUS_BLOCK 0x00020000 /// SMBus process call operation -#define I2C_FLAG_SMBUS_PROCESS_CALL 0x00040000 +#define I2C_FLAG_SMBUS_PROCESS_CALL 0x00040000 /// SMBus use packet error code (PEC) /// Note that the I2C master protocol may clear the I2C_FLAG_SMBUS_PEC bit /// to indicate that the PEC value was checked by the hardware and is /// not appended to the returned read data. /// -#define I2C_FLAG_SMBUS_PEC 0x00080000 +#define I2C_FLAG_SMBUS_PEC 0x00080000 -//---------------------------------------------------------------------- +// ---------------------------------------------------------------------- /// /// QuickRead: OperationCount=1, /// LengthInBytes=0, Flags=I2C_FLAG_READ @@ -238,7 +238,7 @@ typedef struct { /// | I2C_FLAG_SMBUS_PEC /// LengthInBytes=34, Flags=I2C_FLAG_READ /// -//---------------------------------------------------------------------- +// ---------------------------------------------------------------------- /// /// I2C device operation @@ -260,20 +260,20 @@ typedef struct { /// /// Flags to qualify the I2C operation. /// - UINT32 Flags; + UINT32 Flags; /// /// Number of bytes to send to or receive from the I2C device. A ping /// (address only byte/bytes) is indicated by setting the LengthInBytes /// to zero. /// - UINT32 LengthInBytes; + UINT32 LengthInBytes; /// /// Pointer to a buffer containing the data to send or to receive from /// the I2C device. The Buffer must be at least LengthInBytes in size. /// - UINT8 *Buffer; + UINT8 *Buffer; } EFI_I2C_OPERATION; /// @@ -290,12 +290,12 @@ typedef struct { /// /// Number of elements in the operation array /// - UINTN OperationCount; + UINTN OperationCount; /// /// Description of the I2C operation /// - EFI_I2C_OPERATION Operation [1]; + EFI_I2C_OPERATION Operation[1]; } EFI_I2C_REQUEST_PACKET; -#endif // __PI_I2C_H__ +#endif // __PI_I2C_H__ diff --git a/MdePkg/Include/Pi/PiMmCis.h b/MdePkg/Include/Pi/PiMmCis.h index fdf0591..0134095 100644 --- a/MdePkg/Include/Pi/PiMmCis.h +++ b/MdePkg/Include/Pi/PiMmCis.h @@ -13,18 +13,18 @@ #include #include -typedef struct _EFI_MM_SYSTEM_TABLE EFI_MM_SYSTEM_TABLE; +typedef struct _EFI_MM_SYSTEM_TABLE EFI_MM_SYSTEM_TABLE; /// /// The Management Mode System Table (MMST) signature /// -#define MM_MMST_SIGNATURE SIGNATURE_32 ('S', 'M', 'S', 'T') +#define MM_MMST_SIGNATURE SIGNATURE_32 ('S', 'M', 'S', 'T') /// /// The Management Mode System Table (MMST) revision is 1.6 /// #define MM_SPECIFICATION_MAJOR_REVISION 1 #define MM_SPECIFICATION_MINOR_REVISION 60 -#define EFI_MM_SYSTEM_TABLE_REVISION ((MM_SPECIFICATION_MAJOR_REVISION<<16) | (MM_SPECIFICATION_MINOR_REVISION)) +#define EFI_MM_SYSTEM_TABLE_REVISION ((MM_SPECIFICATION_MAJOR_REVISION<<16) | (MM_SPECIFICATION_MINOR_REVISION)) /** Adds, updates, or removes a configuration table entry from the Management Mode System Table. @@ -206,29 +206,29 @@ EFI_STATUS /// Processor information and functionality needed by MM Foundation. /// typedef struct _EFI_MM_ENTRY_CONTEXT { - EFI_MM_STARTUP_THIS_AP MmStartupThisAp; + EFI_MM_STARTUP_THIS_AP MmStartupThisAp; /// /// A number between zero and the NumberOfCpus field. This field designates which /// processor is executing the MM Foundation. /// - UINTN CurrentlyExecutingCpu; + UINTN CurrentlyExecutingCpu; /// /// The number of possible processors in the platform. This is a 1 based /// counter. This does not indicate the number of processors that entered MM. /// - UINTN NumberOfCpus; + UINTN NumberOfCpus; /// /// Points to an array, where each element describes the number of bytes in the /// corresponding save state specified by CpuSaveState. There are always /// NumberOfCpus entries in the array. /// - UINTN *CpuSaveStateSize; + UINTN *CpuSaveStateSize; /// /// Points to an array, where each element is a pointer to a CPU save state. The /// corresponding element in CpuSaveStateSize specifies the number of bytes in the /// save state area. There are always NumberOfCpus entries in the array. /// - VOID **CpuSaveState; + VOID **CpuSaveState; } EFI_MM_ENTRY_CONTEXT; /** @@ -253,36 +253,36 @@ struct _EFI_MM_SYSTEM_TABLE { /// /// The table header for the SMST. /// - EFI_TABLE_HEADER Hdr; + EFI_TABLE_HEADER Hdr; /// /// A pointer to a NULL-terminated Unicode string containing the vendor name. /// It is permissible for this pointer to be NULL. /// - CHAR16 *MmFirmwareVendor; + CHAR16 *MmFirmwareVendor; /// /// The particular revision of the firmware. /// - UINT32 MmFirmwareRevision; + UINT32 MmFirmwareRevision; - EFI_MM_INSTALL_CONFIGURATION_TABLE MmInstallConfigurationTable; + EFI_MM_INSTALL_CONFIGURATION_TABLE MmInstallConfigurationTable; /// /// I/O Service /// - EFI_MM_CPU_IO_PROTOCOL MmIo; + EFI_MM_CPU_IO_PROTOCOL MmIo; /// /// Runtime memory services /// - EFI_ALLOCATE_POOL MmAllocatePool; - EFI_FREE_POOL MmFreePool; - EFI_ALLOCATE_PAGES MmAllocatePages; - EFI_FREE_PAGES MmFreePages; + EFI_ALLOCATE_POOL MmAllocatePool; + EFI_FREE_POOL MmFreePool; + EFI_ALLOCATE_PAGES MmAllocatePages; + EFI_FREE_PAGES MmFreePages; /// /// MP service /// - EFI_MM_STARTUP_THIS_AP MmStartupThisAp; + EFI_MM_STARTUP_THIS_AP MmStartupThisAp; /// /// CPU information records @@ -292,23 +292,23 @@ struct _EFI_MM_SYSTEM_TABLE { /// A number between zero and and the NumberOfCpus field. This field designates /// which processor is executing the MM infrastructure. /// - UINTN CurrentlyExecutingCpu; + UINTN CurrentlyExecutingCpu; /// /// The number of possible processors in the platform. This is a 1 based counter. /// - UINTN NumberOfCpus; + UINTN NumberOfCpus; /// /// Points to an array, where each element describes the number of bytes in the /// corresponding save state specified by CpuSaveState. There are always /// NumberOfCpus entries in the array. /// - UINTN *CpuSaveStateSize; + UINTN *CpuSaveStateSize; /// /// Points to an array, where each element is a pointer to a CPU save state. The /// corresponding element in CpuSaveStateSize specifies the number of bytes in the /// save state area. There are always NumberOfCpus entries in the array. /// - VOID **CpuSaveState; + VOID **CpuSaveState; /// /// Extensibility table @@ -317,29 +317,29 @@ struct _EFI_MM_SYSTEM_TABLE { /// /// The number of UEFI Configuration Tables in the buffer MmConfigurationTable. /// - UINTN NumberOfTableEntries; + UINTN NumberOfTableEntries; /// /// A pointer to the UEFI Configuration Tables. The number of entries in the table is /// NumberOfTableEntries. /// - EFI_CONFIGURATION_TABLE *MmConfigurationTable; + EFI_CONFIGURATION_TABLE *MmConfigurationTable; /// /// Protocol services /// - EFI_INSTALL_PROTOCOL_INTERFACE MmInstallProtocolInterface; - EFI_UNINSTALL_PROTOCOL_INTERFACE MmUninstallProtocolInterface; - EFI_HANDLE_PROTOCOL MmHandleProtocol; - EFI_MM_REGISTER_PROTOCOL_NOTIFY MmRegisterProtocolNotify; - EFI_LOCATE_HANDLE MmLocateHandle; - EFI_LOCATE_PROTOCOL MmLocateProtocol; + EFI_INSTALL_PROTOCOL_INTERFACE MmInstallProtocolInterface; + EFI_UNINSTALL_PROTOCOL_INTERFACE MmUninstallProtocolInterface; + EFI_HANDLE_PROTOCOL MmHandleProtocol; + EFI_MM_REGISTER_PROTOCOL_NOTIFY MmRegisterProtocolNotify; + EFI_LOCATE_HANDLE MmLocateHandle; + EFI_LOCATE_PROTOCOL MmLocateProtocol; /// /// MMI Management functions /// - EFI_MM_INTERRUPT_MANAGE MmiManage; - EFI_MM_INTERRUPT_REGISTER MmiHandlerRegister; - EFI_MM_INTERRUPT_UNREGISTER MmiHandlerUnRegister; + EFI_MM_INTERRUPT_MANAGE MmiManage; + EFI_MM_INTERRUPT_REGISTER MmiHandlerRegister; + EFI_MM_INTERRUPT_UNREGISTER MmiHandlerUnRegister; }; #endif diff --git a/MdePkg/Include/Pi/PiMultiPhase.h b/MdePkg/Include/Pi/PiMultiPhase.h index 89280d9..a7e9582 100644 --- a/MdePkg/Include/Pi/PiMultiPhase.h +++ b/MdePkg/Include/Pi/PiMultiPhase.h @@ -44,26 +44,26 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// If this value is returned by an API, it means the capability is not yet /// installed/available/ready to use. /// -#define EFI_NOT_AVAILABLE_YET DXE_ERROR (2) +#define EFI_NOT_AVAILABLE_YET DXE_ERROR (2) /// /// Success and warning codes reserved for use by PI. /// Supported 32-bit range is 0x20000000-0x3fffffff. /// Supported 64-bit range is 0x2000000000000000-0x3fffffffffffffff. /// -#define PI_ENCODE_WARNING(a) ((MAX_BIT >> 2) | (a)) +#define PI_ENCODE_WARNING(a) ((MAX_BIT >> 2) | (a)) /// /// Error codes reserved for use by PI. /// Supported 32-bit range is 0xa0000000-0xbfffffff. /// Supported 64-bit range is 0xa000000000000000-0xbfffffffffffffff. /// -#define PI_ENCODE_ERROR(a) (MAX_BIT | (MAX_BIT >> 2) | (a)) +#define PI_ENCODE_ERROR(a) (MAX_BIT | (MAX_BIT >> 2) | (a)) /// /// Return status codes defined in SMM CIS. /// -#define EFI_INTERRUPT_PENDING PI_ENCODE_ERROR (0) +#define EFI_INTERRUPT_PENDING PI_ENCODE_ERROR (0) #define EFI_WARN_INTERRUPT_SOURCE_PENDING PI_ENCODE_WARNING (0) #define EFI_WARN_INTERRUPT_SOURCE_QUIESCED PI_ENCODE_WARNING (1) @@ -81,27 +81,27 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// 1010 Image was signed, the signature was tested, and the signature failed the authentication test. /// ///@{ -#define EFI_AUTH_STATUS_PLATFORM_OVERRIDE 0x01 -#define EFI_AUTH_STATUS_IMAGE_SIGNED 0x02 -#define EFI_AUTH_STATUS_NOT_TESTED 0x04 -#define EFI_AUTH_STATUS_TEST_FAILED 0x08 -#define EFI_AUTH_STATUS_ALL 0x0f +#define EFI_AUTH_STATUS_PLATFORM_OVERRIDE 0x01 +#define EFI_AUTH_STATUS_IMAGE_SIGNED 0x02 +#define EFI_AUTH_STATUS_NOT_TESTED 0x04 +#define EFI_AUTH_STATUS_TEST_FAILED 0x08 +#define EFI_AUTH_STATUS_ALL 0x0f ///@} /// /// MMRAM states and capabilities /// -#define EFI_MMRAM_OPEN 0x00000001 -#define EFI_MMRAM_CLOSED 0x00000002 -#define EFI_MMRAM_LOCKED 0x00000004 -#define EFI_CACHEABLE 0x00000008 -#define EFI_ALLOCATED 0x00000010 -#define EFI_NEEDS_TESTING 0x00000020 -#define EFI_NEEDS_ECC_INITIALIZATION 0x00000040 +#define EFI_MMRAM_OPEN 0x00000001 +#define EFI_MMRAM_CLOSED 0x00000002 +#define EFI_MMRAM_LOCKED 0x00000004 +#define EFI_CACHEABLE 0x00000008 +#define EFI_ALLOCATED 0x00000010 +#define EFI_NEEDS_TESTING 0x00000020 +#define EFI_NEEDS_ECC_INITIALIZATION 0x00000040 -#define EFI_SMRAM_OPEN EFI_MMRAM_OPEN -#define EFI_SMRAM_CLOSED EFI_MMRAM_CLOSED -#define EFI_SMRAM_LOCKED EFI_MMRAM_LOCKED +#define EFI_SMRAM_OPEN EFI_MMRAM_OPEN +#define EFI_SMRAM_CLOSED EFI_MMRAM_CLOSED +#define EFI_SMRAM_LOCKED EFI_MMRAM_LOCKED /// /// Structure describing a MMRAM region and its accessibility attributes. @@ -112,26 +112,26 @@ typedef struct { /// the same as seen by I/O-based agents, for example, but it may not be the address seen /// by the processors. /// - EFI_PHYSICAL_ADDRESS PhysicalStart; + EFI_PHYSICAL_ADDRESS PhysicalStart; /// /// Designates the address of the MMRAM, as seen by software executing on the /// processors. This address may or may not match PhysicalStart. /// - EFI_PHYSICAL_ADDRESS CpuStart; + EFI_PHYSICAL_ADDRESS CpuStart; /// /// Describes the number of bytes in the MMRAM region. /// - UINT64 PhysicalSize; + UINT64 PhysicalSize; /// /// Describes the accessibility attributes of the MMRAM. These attributes include the /// hardware state (e.g., Open/Closed/Locked), capability (e.g., cacheable), logical /// allocation (e.g., allocated), and pre-use initialization (e.g., needs testing/ECC /// initialization). /// - UINT64 RegionState; + UINT64 RegionState; } EFI_MMRAM_DESCRIPTOR; -typedef EFI_MMRAM_DESCRIPTOR EFI_SMRAM_DESCRIPTOR; +typedef EFI_MMRAM_DESCRIPTOR EFI_SMRAM_DESCRIPTOR; /// /// Structure describing a MMRAM region which cannot be used for the MMRAM heap. @@ -163,19 +163,19 @@ typedef struct { /// The returned information associated with the requested TokenNumber. If /// TokenNumber is 0, then PcdType is set to EFI_PCD_TYPE_8. /// - EFI_PCD_TYPE PcdType; + EFI_PCD_TYPE PcdType; /// /// The size of the data in bytes associated with the TokenNumber specified. If /// TokenNumber is 0, then PcdSize is set 0. /// - UINTN PcdSize; + UINTN PcdSize; /// /// The null-terminated ASCII string associated with a given token. If the /// TokenNumber specified was 0, then this field corresponds to the null-terminated /// ASCII string associated with the token's namespace Guid. If NULL, there is no /// name associated with this request. /// - CHAR8 *PcdName; + CHAR8 *PcdName; } EFI_PCD_INFO; /** @@ -206,6 +206,6 @@ typedef EFI_STATUS (EFIAPI *EFI_AP_PROCEDURE2)( IN VOID *ProcedureArgument -); + ); #endif diff --git a/MdePkg/Include/Pi/PiPeiCis.h b/MdePkg/Include/Pi/PiPeiCis.h index ebfe598..69eec2c 100644 --- a/MdePkg/Include/Pi/PiPeiCis.h +++ b/MdePkg/Include/Pi/PiPeiCis.h @@ -18,28 +18,26 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// The handles of EFI FV. /// -typedef VOID *EFI_PEI_FV_HANDLE; +typedef VOID *EFI_PEI_FV_HANDLE; /// /// The handles of EFI FFS. /// -typedef VOID *EFI_PEI_FILE_HANDLE; +typedef VOID *EFI_PEI_FILE_HANDLE; /// /// Declare the forward reference data structure for EFI_PEI_SERVICE. /// -typedef struct _EFI_PEI_SERVICES EFI_PEI_SERVICES; +typedef struct _EFI_PEI_SERVICES EFI_PEI_SERVICES; /// /// Declare the forward reference data structure for EFI_PEI_NOTIFY_DESCRIPTOR. /// typedef struct _EFI_PEI_NOTIFY_DESCRIPTOR EFI_PEI_NOTIFY_DESCRIPTOR; - #include #include - /** The PEI Dispatcher will invoke each PEIM one time. During this pass, the PEI Dispatcher will pass control to the PEIM at the AddressOfEntryPoint in the PE Header. @@ -94,15 +92,15 @@ typedef struct { /// This field is a set of flags describing the characteristics of this imported table entry. /// All flags are defined as EFI_PEI_PPI_DESCRIPTOR_***, which can also be combined into one. /// - UINTN Flags; + UINTN Flags; /// /// The address of the EFI_GUID that names the interface. /// - EFI_GUID *Guid; + EFI_GUID *Guid; /// /// A pointer to the PPI. It contains the information necessary to install a service. /// - VOID *Ppi; + VOID *Ppi; } EFI_PEI_PPI_DESCRIPTOR; /// @@ -113,15 +111,15 @@ struct _EFI_PEI_NOTIFY_DESCRIPTOR { /// /// Details if the type of notification are callback or dispatch. /// - UINTN Flags; + UINTN Flags; /// /// The address of the EFI_GUID that names the interface. /// - EFI_GUID *Guid; + EFI_GUID *Guid; /// /// Address of the notification callback function itself within the PEIM. /// - EFI_PEIM_NOTIFY_ENTRY_POINT Notify; + EFI_PEIM_NOTIFY_ENTRY_POINT Notify; }; /// @@ -132,11 +130,11 @@ typedef union { /// /// The typedef structure of the notification descriptor. /// - EFI_PEI_NOTIFY_DESCRIPTOR Notify; + EFI_PEI_NOTIFY_DESCRIPTOR Notify; /// /// The typedef structure of the PPI descriptor. /// - EFI_PEI_PPI_DESCRIPTOR Ppi; + EFI_PEI_PPI_DESCRIPTOR Ppi; } EFI_PEI_DESCRIPTOR; /** @@ -487,7 +485,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_PEI_FREE_PAGES) ( +(EFIAPI *EFI_PEI_FREE_PAGES)( IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_PHYSICAL_ADDRESS Memory, IN UINTN Pages @@ -619,7 +617,7 @@ EFI_STATUS **/ typedef VOID -(EFIAPI *EFI_PEI_RESET2_SYSTEM) ( +(EFIAPI *EFI_PEI_RESET2_SYSTEM)( IN EFI_RESET_TYPE ResetType, IN EFI_STATUS ResetStatus, IN UINTN DataSize, @@ -661,25 +659,25 @@ typedef struct { /// /// Name of the file. /// - EFI_GUID FileName; + EFI_GUID FileName; /// /// File type. /// - EFI_FV_FILETYPE FileType; + EFI_FV_FILETYPE FileType; /// /// Attributes of the file. /// - EFI_FV_FILE_ATTRIBUTES FileAttributes; + EFI_FV_FILE_ATTRIBUTES FileAttributes; /// /// Points to the file's data (not the header). /// Not valid if EFI_FV_FILE_ATTRIB_MEMORY_MAPPED /// is zero. /// - VOID *Buffer; + VOID *Buffer; /// /// Size of the file's data. /// - UINT32 BufferSize; + UINT32 BufferSize; } EFI_FV_FILE_INFO; /// @@ -689,29 +687,29 @@ typedef struct { /// /// Name of the file. /// - EFI_GUID FileName; + EFI_GUID FileName; /// /// File type. /// - EFI_FV_FILETYPE FileType; + EFI_FV_FILETYPE FileType; /// /// Attributes of the file. /// - EFI_FV_FILE_ATTRIBUTES FileAttributes; + EFI_FV_FILE_ATTRIBUTES FileAttributes; /// /// Points to the file's data (not the header). /// Not valid if EFI_FV_FILE_ATTRIB_MEMORY_MAPPED /// is zero. /// - VOID *Buffer; + VOID *Buffer; /// /// Size of the file's data. /// - UINT32 BufferSize; + UINT32 BufferSize; /// /// Authentication status for this file. /// - UINT32 AuthenticationStatus; + UINT32 AuthenticationStatus; } EFI_FV_FILE_INFO2; /** @@ -770,25 +768,25 @@ typedef struct { /// /// Attributes of the firmware volume. /// - EFI_FVB_ATTRIBUTES_2 FvAttributes; + EFI_FVB_ATTRIBUTES_2 FvAttributes; /// /// Format of the firmware volume. /// - EFI_GUID FvFormat; + EFI_GUID FvFormat; /// /// Name of the firmware volume. /// - EFI_GUID FvName; + EFI_GUID FvName; /// /// Points to the first byte of the firmware /// volume, if bit EFI_FVB_MEMORY_MAPPED is /// set in FvAttributes. /// - VOID *FvStart; + VOID *FvStart; /// /// Size of the firmware volume. /// - UINT64 FvSize; + UINT64 FvSize; } EFI_FV_INFO; /** @@ -845,7 +843,6 @@ EFI_STATUS IN EFI_PEI_FILE_HANDLE FileHandle ); - // // PEI Specification Revision information // @@ -866,7 +863,7 @@ EFI_STATUS /// #define ((PEI_SPECIFICATION_MAJOR_REVISION<<16) |(PEI_SPECIFICATION_MINOR_REVISION)) /// and it should be as follows: /// -#define PEI_SERVICES_REVISION ((PEI_SPECIFICATION_MAJOR_REVISION<<16) | (PEI_SPECIFICATION_MINOR_REVISION)) +#define PEI_SERVICES_REVISION ((PEI_SPECIFICATION_MAJOR_REVISION<<16) | (PEI_SPECIFICATION_MINOR_REVISION)) /// /// EFI_PEI_SERVICES is a collection of functions whose implementation is provided by the PEI @@ -881,75 +878,74 @@ struct _EFI_PEI_SERVICES { /// /// The table header for the PEI Services Table. /// - EFI_TABLE_HEADER Hdr; + EFI_TABLE_HEADER Hdr; // // PPI Functions // - EFI_PEI_INSTALL_PPI InstallPpi; - EFI_PEI_REINSTALL_PPI ReInstallPpi; - EFI_PEI_LOCATE_PPI LocatePpi; - EFI_PEI_NOTIFY_PPI NotifyPpi; + EFI_PEI_INSTALL_PPI InstallPpi; + EFI_PEI_REINSTALL_PPI ReInstallPpi; + EFI_PEI_LOCATE_PPI LocatePpi; + EFI_PEI_NOTIFY_PPI NotifyPpi; // // Boot Mode Functions // - EFI_PEI_GET_BOOT_MODE GetBootMode; - EFI_PEI_SET_BOOT_MODE SetBootMode; + EFI_PEI_GET_BOOT_MODE GetBootMode; + EFI_PEI_SET_BOOT_MODE SetBootMode; // // HOB Functions // - EFI_PEI_GET_HOB_LIST GetHobList; - EFI_PEI_CREATE_HOB CreateHob; + EFI_PEI_GET_HOB_LIST GetHobList; + EFI_PEI_CREATE_HOB CreateHob; // // Firmware Volume Functions // - EFI_PEI_FFS_FIND_NEXT_VOLUME2 FfsFindNextVolume; - EFI_PEI_FFS_FIND_NEXT_FILE2 FfsFindNextFile; - EFI_PEI_FFS_FIND_SECTION_DATA2 FfsFindSectionData; + EFI_PEI_FFS_FIND_NEXT_VOLUME2 FfsFindNextVolume; + EFI_PEI_FFS_FIND_NEXT_FILE2 FfsFindNextFile; + EFI_PEI_FFS_FIND_SECTION_DATA2 FfsFindSectionData; // // PEI Memory Functions // - EFI_PEI_INSTALL_PEI_MEMORY InstallPeiMemory; - EFI_PEI_ALLOCATE_PAGES AllocatePages; - EFI_PEI_ALLOCATE_POOL AllocatePool; - EFI_PEI_COPY_MEM CopyMem; - EFI_PEI_SET_MEM SetMem; + EFI_PEI_INSTALL_PEI_MEMORY InstallPeiMemory; + EFI_PEI_ALLOCATE_PAGES AllocatePages; + EFI_PEI_ALLOCATE_POOL AllocatePool; + EFI_PEI_COPY_MEM CopyMem; + EFI_PEI_SET_MEM SetMem; // // Status Code // - EFI_PEI_REPORT_STATUS_CODE ReportStatusCode; + EFI_PEI_REPORT_STATUS_CODE ReportStatusCode; // // Reset // - EFI_PEI_RESET_SYSTEM ResetSystem; + EFI_PEI_RESET_SYSTEM ResetSystem; // // (the following interfaces are installed by publishing PEIM) // I/O Abstractions // - EFI_PEI_CPU_IO_PPI *CpuIo; - EFI_PEI_PCI_CFG2_PPI *PciCfg; + EFI_PEI_CPU_IO_PPI *CpuIo; + EFI_PEI_PCI_CFG2_PPI *PciCfg; // // Future Installed Services // - EFI_PEI_FFS_FIND_BY_NAME FfsFindFileByName; - EFI_PEI_FFS_GET_FILE_INFO FfsGetFileInfo; - EFI_PEI_FFS_GET_VOLUME_INFO FfsGetVolumeInfo; - EFI_PEI_REGISTER_FOR_SHADOW RegisterForShadow; - EFI_PEI_FFS_FIND_SECTION_DATA3 FindSectionData3; - EFI_PEI_FFS_GET_FILE_INFO2 FfsGetFileInfo2; - EFI_PEI_RESET2_SYSTEM ResetSystem2; - EFI_PEI_FREE_PAGES FreePages; + EFI_PEI_FFS_FIND_BY_NAME FfsFindFileByName; + EFI_PEI_FFS_GET_FILE_INFO FfsGetFileInfo; + EFI_PEI_FFS_GET_VOLUME_INFO FfsGetVolumeInfo; + EFI_PEI_REGISTER_FOR_SHADOW RegisterForShadow; + EFI_PEI_FFS_FIND_SECTION_DATA3 FindSectionData3; + EFI_PEI_FFS_GET_FILE_INFO2 FfsGetFileInfo2; + EFI_PEI_RESET2_SYSTEM ResetSystem2; + EFI_PEI_FREE_PAGES FreePages; }; - /// /// EFI_SEC_PEI_HAND_OFF structure holds information about /// PEI core's operating environment, such as the size of location of @@ -959,29 +955,29 @@ typedef struct _EFI_SEC_PEI_HAND_OFF { /// /// Size of the data structure. /// - UINT16 DataSize; + UINT16 DataSize; /// /// Points to the first byte of the boot firmware volume, /// which the PEI Dispatcher should search for /// PEI modules. /// - VOID *BootFirmwareVolumeBase; + VOID *BootFirmwareVolumeBase; /// /// Size of the boot firmware volume, in bytes. /// - UINTN BootFirmwareVolumeSize; + UINTN BootFirmwareVolumeSize; /// /// Points to the first byte of the temporary RAM. /// - VOID *TemporaryRamBase; + VOID *TemporaryRamBase; /// /// Size of the temporary RAM, in bytes. /// - UINTN TemporaryRamSize; + UINTN TemporaryRamSize; /// /// Points to the first byte of the temporary RAM @@ -992,13 +988,13 @@ typedef struct _EFI_SEC_PEI_HAND_OFF { /// overlap with the area reported by StackBase and /// StackSize. /// - VOID *PeiTemporaryRamBase; + VOID *PeiTemporaryRamBase; /// /// The size of the available temporary RAM available for /// use by the PEI Foundation, in bytes. /// - UINTN PeiTemporaryRamSize; + UINTN PeiTemporaryRamSize; /// /// Points to the first byte of the stack. @@ -1006,15 +1002,14 @@ typedef struct _EFI_SEC_PEI_HAND_OFF { /// TemporaryRamBase and TemporaryRamSize /// or may be an entirely separate area. /// - VOID *StackBase; + VOID *StackBase; /// /// Size of the stack, in bytes. /// - UINTN StackSize; + UINTN StackSize; } EFI_SEC_PEI_HAND_OFF; - /** The entry point of PEI Foundation. @@ -1056,6 +1051,6 @@ VOID (EFIAPI *EFI_PEI_CORE_ENTRY_POINT)( IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData, IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList -); + ); #endif diff --git a/MdePkg/Include/Pi/PiS3BootScript.h b/MdePkg/Include/Pi/PiS3BootScript.h index e3b7b19..5803ec4 100644 --- a/MdePkg/Include/Pi/PiS3BootScript.h +++ b/MdePkg/Include/Pi/PiS3BootScript.h @@ -10,30 +10,30 @@ #ifndef _PI_S3_BOOT_SCRIPT_H_ #define _PI_S3_BOOT_SCRIPT_H_ -//******************************************* +// ******************************************* // EFI Boot Script Opcode definitions -//******************************************* -#define EFI_BOOT_SCRIPT_IO_WRITE_OPCODE 0x00 -#define EFI_BOOT_SCRIPT_IO_READ_WRITE_OPCODE 0x01 -#define EFI_BOOT_SCRIPT_MEM_WRITE_OPCODE 0x02 -#define EFI_BOOT_SCRIPT_MEM_READ_WRITE_OPCODE 0x03 -#define EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE_OPCODE 0x04 -#define EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE_OPCODE 0x05 -#define EFI_BOOT_SCRIPT_SMBUS_EXECUTE_OPCODE 0x06 -#define EFI_BOOT_SCRIPT_STALL_OPCODE 0x07 -#define EFI_BOOT_SCRIPT_DISPATCH_OPCODE 0x08 -#define EFI_BOOT_SCRIPT_DISPATCH_2_OPCODE 0x09 -#define EFI_BOOT_SCRIPT_INFORMATION_OPCODE 0x0A -#define EFI_BOOT_SCRIPT_PCI_CONFIG2_WRITE_OPCODE 0x0B -#define EFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE_OPCODE 0x0C -#define EFI_BOOT_SCRIPT_IO_POLL_OPCODE 0x0D -#define EFI_BOOT_SCRIPT_MEM_POLL_OPCODE 0x0E -#define EFI_BOOT_SCRIPT_PCI_CONFIG_POLL_OPCODE 0x0F -#define EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL_OPCODE 0x10 +// ******************************************* +#define EFI_BOOT_SCRIPT_IO_WRITE_OPCODE 0x00 +#define EFI_BOOT_SCRIPT_IO_READ_WRITE_OPCODE 0x01 +#define EFI_BOOT_SCRIPT_MEM_WRITE_OPCODE 0x02 +#define EFI_BOOT_SCRIPT_MEM_READ_WRITE_OPCODE 0x03 +#define EFI_BOOT_SCRIPT_PCI_CONFIG_WRITE_OPCODE 0x04 +#define EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE_OPCODE 0x05 +#define EFI_BOOT_SCRIPT_SMBUS_EXECUTE_OPCODE 0x06 +#define EFI_BOOT_SCRIPT_STALL_OPCODE 0x07 +#define EFI_BOOT_SCRIPT_DISPATCH_OPCODE 0x08 +#define EFI_BOOT_SCRIPT_DISPATCH_2_OPCODE 0x09 +#define EFI_BOOT_SCRIPT_INFORMATION_OPCODE 0x0A +#define EFI_BOOT_SCRIPT_PCI_CONFIG2_WRITE_OPCODE 0x0B +#define EFI_BOOT_SCRIPT_PCI_CONFIG2_READ_WRITE_OPCODE 0x0C +#define EFI_BOOT_SCRIPT_IO_POLL_OPCODE 0x0D +#define EFI_BOOT_SCRIPT_MEM_POLL_OPCODE 0x0E +#define EFI_BOOT_SCRIPT_PCI_CONFIG_POLL_OPCODE 0x0F +#define EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL_OPCODE 0x10 -//******************************************* +// ******************************************* // EFI_BOOT_SCRIPT_WIDTH -//******************************************* +// ******************************************* typedef enum { EfiBootScriptWidthUint8, EfiBootScriptWidthUint16, diff --git a/MdePkg/Include/Pi/PiSmmCis.h b/MdePkg/Include/Pi/PiSmmCis.h index 06ef4ae..bf5b580 100644 --- a/MdePkg/Include/Pi/PiSmmCis.h +++ b/MdePkg/Include/Pi/PiSmmCis.h @@ -13,7 +13,7 @@ #include #include -typedef struct _EFI_SMM_SYSTEM_TABLE2 EFI_SMM_SYSTEM_TABLE2; +typedef struct _EFI_SMM_SYSTEM_TABLE2 EFI_SMM_SYSTEM_TABLE2; // // Define new MM related definition introduced by PI 1.5. // @@ -49,41 +49,41 @@ EFI_STATUS IN UINTN TableSize ); -typedef EFI_MM_STARTUP_THIS_AP EFI_SMM_STARTUP_THIS_AP; -typedef EFI_MM_NOTIFY_FN EFI_SMM_NOTIFY_FN; -typedef EFI_MM_REGISTER_PROTOCOL_NOTIFY EFI_SMM_REGISTER_PROTOCOL_NOTIFY; -typedef EFI_MM_INTERRUPT_MANAGE EFI_SMM_INTERRUPT_MANAGE; -typedef EFI_MM_HANDLER_ENTRY_POINT EFI_SMM_HANDLER_ENTRY_POINT2; -typedef EFI_MM_INTERRUPT_REGISTER EFI_SMM_INTERRUPT_REGISTER; -typedef EFI_MM_INTERRUPT_UNREGISTER EFI_SMM_INTERRUPT_UNREGISTER; +typedef EFI_MM_STARTUP_THIS_AP EFI_SMM_STARTUP_THIS_AP; +typedef EFI_MM_NOTIFY_FN EFI_SMM_NOTIFY_FN; +typedef EFI_MM_REGISTER_PROTOCOL_NOTIFY EFI_SMM_REGISTER_PROTOCOL_NOTIFY; +typedef EFI_MM_INTERRUPT_MANAGE EFI_SMM_INTERRUPT_MANAGE; +typedef EFI_MM_HANDLER_ENTRY_POINT EFI_SMM_HANDLER_ENTRY_POINT2; +typedef EFI_MM_INTERRUPT_REGISTER EFI_SMM_INTERRUPT_REGISTER; +typedef EFI_MM_INTERRUPT_UNREGISTER EFI_SMM_INTERRUPT_UNREGISTER; /// /// Processor information and functionality needed by SMM Foundation. /// typedef struct _EFI_SMM_ENTRY_CONTEXT { - EFI_SMM_STARTUP_THIS_AP SmmStartupThisAp; + EFI_SMM_STARTUP_THIS_AP SmmStartupThisAp; /// /// A number between zero and the NumberOfCpus field. This field designates which /// processor is executing the SMM Foundation. /// - UINTN CurrentlyExecutingCpu; + UINTN CurrentlyExecutingCpu; /// /// The number of possible processors in the platform. This is a 1 based /// counter. This does not indicate the number of processors that entered SMM. /// - UINTN NumberOfCpus; + UINTN NumberOfCpus; /// /// Points to an array, where each element describes the number of bytes in the /// corresponding save state specified by CpuSaveState. There are always /// NumberOfCpus entries in the array. /// - UINTN *CpuSaveStateSize; + UINTN *CpuSaveStateSize; /// /// Points to an array, where each element is a pointer to a CPU save state. The /// corresponding element in CpuSaveStateSize specifies the number of bytes in the /// save state area. There are always NumberOfCpus entries in the array. /// - VOID **CpuSaveState; + VOID **CpuSaveState; } EFI_SMM_ENTRY_CONTEXT; /** @@ -108,36 +108,36 @@ struct _EFI_SMM_SYSTEM_TABLE2 { /// /// The table header for the SMST. /// - EFI_TABLE_HEADER Hdr; + EFI_TABLE_HEADER Hdr; /// /// A pointer to a NULL-terminated Unicode string containing the vendor name. /// It is permissible for this pointer to be NULL. /// - CHAR16 *SmmFirmwareVendor; + CHAR16 *SmmFirmwareVendor; /// /// The particular revision of the firmware. /// - UINT32 SmmFirmwareRevision; + UINT32 SmmFirmwareRevision; - EFI_SMM_INSTALL_CONFIGURATION_TABLE2 SmmInstallConfigurationTable; + EFI_SMM_INSTALL_CONFIGURATION_TABLE2 SmmInstallConfigurationTable; /// /// I/O Service /// - EFI_SMM_CPU_IO2_PROTOCOL SmmIo; + EFI_SMM_CPU_IO2_PROTOCOL SmmIo; /// /// Runtime memory services /// - EFI_ALLOCATE_POOL SmmAllocatePool; - EFI_FREE_POOL SmmFreePool; - EFI_ALLOCATE_PAGES SmmAllocatePages; - EFI_FREE_PAGES SmmFreePages; + EFI_ALLOCATE_POOL SmmAllocatePool; + EFI_FREE_POOL SmmFreePool; + EFI_ALLOCATE_PAGES SmmAllocatePages; + EFI_FREE_PAGES SmmFreePages; /// /// MP service /// - EFI_SMM_STARTUP_THIS_AP SmmStartupThisAp; + EFI_SMM_STARTUP_THIS_AP SmmStartupThisAp; /// /// CPU information records @@ -147,23 +147,23 @@ struct _EFI_SMM_SYSTEM_TABLE2 { /// A number between zero and and the NumberOfCpus field. This field designates /// which processor is executing the SMM infrastructure. /// - UINTN CurrentlyExecutingCpu; + UINTN CurrentlyExecutingCpu; /// /// The number of possible processors in the platform. This is a 1 based counter. /// - UINTN NumberOfCpus; + UINTN NumberOfCpus; /// /// Points to an array, where each element describes the number of bytes in the /// corresponding save state specified by CpuSaveState. There are always /// NumberOfCpus entries in the array. /// - UINTN *CpuSaveStateSize; + UINTN *CpuSaveStateSize; /// /// Points to an array, where each element is a pointer to a CPU save state. The /// corresponding element in CpuSaveStateSize specifies the number of bytes in the /// save state area. There are always NumberOfCpus entries in the array. /// - VOID **CpuSaveState; + VOID **CpuSaveState; /// /// Extensibility table @@ -172,29 +172,29 @@ struct _EFI_SMM_SYSTEM_TABLE2 { /// /// The number of UEFI Configuration Tables in the buffer SmmConfigurationTable. /// - UINTN NumberOfTableEntries; + UINTN NumberOfTableEntries; /// /// A pointer to the UEFI Configuration Tables. The number of entries in the table is /// NumberOfTableEntries. /// - EFI_CONFIGURATION_TABLE *SmmConfigurationTable; + EFI_CONFIGURATION_TABLE *SmmConfigurationTable; /// /// Protocol services /// - EFI_INSTALL_PROTOCOL_INTERFACE SmmInstallProtocolInterface; - EFI_UNINSTALL_PROTOCOL_INTERFACE SmmUninstallProtocolInterface; - EFI_HANDLE_PROTOCOL SmmHandleProtocol; - EFI_SMM_REGISTER_PROTOCOL_NOTIFY SmmRegisterProtocolNotify; - EFI_LOCATE_HANDLE SmmLocateHandle; - EFI_LOCATE_PROTOCOL SmmLocateProtocol; + EFI_INSTALL_PROTOCOL_INTERFACE SmmInstallProtocolInterface; + EFI_UNINSTALL_PROTOCOL_INTERFACE SmmUninstallProtocolInterface; + EFI_HANDLE_PROTOCOL SmmHandleProtocol; + EFI_SMM_REGISTER_PROTOCOL_NOTIFY SmmRegisterProtocolNotify; + EFI_LOCATE_HANDLE SmmLocateHandle; + EFI_LOCATE_PROTOCOL SmmLocateProtocol; /// /// SMI Management functions /// - EFI_SMM_INTERRUPT_MANAGE SmiManage; - EFI_SMM_INTERRUPT_REGISTER SmiHandlerRegister; - EFI_SMM_INTERRUPT_UNREGISTER SmiHandlerUnRegister; + EFI_SMM_INTERRUPT_MANAGE SmiManage; + EFI_SMM_INTERRUPT_REGISTER SmiHandlerRegister; + EFI_SMM_INTERRUPT_UNREGISTER SmiHandlerUnRegister; }; #endif diff --git a/MdePkg/Include/Pi/PiStatusCode.h b/MdePkg/Include/Pi/PiStatusCode.h index 9f6c2ab..ef2aea7 100644 --- a/MdePkg/Include/Pi/PiStatusCode.h +++ b/MdePkg/Include/Pi/PiStatusCode.h @@ -21,7 +21,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// Status Code Type Definition. /// -typedef UINT32 EFI_STATUS_CODE_TYPE; +typedef UINT32 EFI_STATUS_CODE_TYPE; /// /// A Status Code Type is made up of the code type and severity. @@ -29,9 +29,9 @@ typedef UINT32 EFI_STATUS_CODE_TYPE; /// reserved for use by this specification. /// ///@{ -#define EFI_STATUS_CODE_TYPE_MASK 0x000000FF -#define EFI_STATUS_CODE_SEVERITY_MASK 0xFF000000 -#define EFI_STATUS_CODE_RESERVED_MASK 0x00FFFF00 +#define EFI_STATUS_CODE_TYPE_MASK 0x000000FF +#define EFI_STATUS_CODE_SEVERITY_MASK 0xFF000000 +#define EFI_STATUS_CODE_RESERVED_MASK 0x00FFFF00 ///@} /// @@ -40,9 +40,9 @@ typedef UINT32 EFI_STATUS_CODE_TYPE; /// this specification. /// ///@{ -#define EFI_PROGRESS_CODE 0x00000001 -#define EFI_ERROR_CODE 0x00000002 -#define EFI_DEBUG_CODE 0x00000003 +#define EFI_PROGRESS_CODE 0x00000001 +#define EFI_ERROR_CODE 0x00000002 +#define EFI_DEBUG_CODE 0x00000003 ///@} /// @@ -55,10 +55,10 @@ typedef UINT32 EFI_STATUS_CODE_TYPE; /// the bad data could be consumed by other drivers. /// ///@{ -#define EFI_ERROR_MINOR 0x40000000 -#define EFI_ERROR_MAJOR 0x80000000 -#define EFI_ERROR_UNRECOVERED 0x90000000 -#define EFI_ERROR_UNCONTAINED 0xa0000000 +#define EFI_ERROR_MINOR 0x40000000 +#define EFI_ERROR_MAJOR 0x80000000 +#define EFI_ERROR_UNRECOVERED 0x90000000 +#define EFI_ERROR_UNCONTAINED 0xa0000000 ///@} /// @@ -85,15 +85,15 @@ typedef struct { /// /// The size of the structure. This is specified to enable future expansion. /// - UINT16 HeaderSize; + UINT16 HeaderSize; /// /// The size of the data in bytes. This does not include the size of the header structure. /// - UINT16 Size; + UINT16 Size; /// /// The GUID defining the type of the data. /// - EFI_GUID Type; + EFI_GUID Type; } EFI_STATUS_CODE_DATA; /// @@ -102,8 +102,8 @@ typedef struct { /// - 0x1000-0x7FFF Subclass Specific. /// - 0x8000-0xFFFF OEM specific. ///@{ -#define EFI_SUBCLASS_SPECIFIC 0x1000 -#define EFI_OEM_SPECIFIC 0x8000 +#define EFI_SUBCLASS_SPECIFIC 0x1000 +#define EFI_OEM_SPECIFIC 0x8000 ///@} /// @@ -133,13 +133,13 @@ typedef struct { /// Values of 128-255 are reserved for OEM use. /// ///@{ -#define EFI_COMPUTING_UNIT_UNSPECIFIED (EFI_COMPUTING_UNIT | 0x00000000) -#define EFI_COMPUTING_UNIT_HOST_PROCESSOR (EFI_COMPUTING_UNIT | 0x00010000) -#define EFI_COMPUTING_UNIT_FIRMWARE_PROCESSOR (EFI_COMPUTING_UNIT | 0x00020000) -#define EFI_COMPUTING_UNIT_IO_PROCESSOR (EFI_COMPUTING_UNIT | 0x00030000) -#define EFI_COMPUTING_UNIT_CACHE (EFI_COMPUTING_UNIT | 0x00040000) -#define EFI_COMPUTING_UNIT_MEMORY (EFI_COMPUTING_UNIT | 0x00050000) -#define EFI_COMPUTING_UNIT_CHIPSET (EFI_COMPUTING_UNIT | 0x00060000) +#define EFI_COMPUTING_UNIT_UNSPECIFIED (EFI_COMPUTING_UNIT | 0x00000000) +#define EFI_COMPUTING_UNIT_HOST_PROCESSOR (EFI_COMPUTING_UNIT | 0x00010000) +#define EFI_COMPUTING_UNIT_FIRMWARE_PROCESSOR (EFI_COMPUTING_UNIT | 0x00020000) +#define EFI_COMPUTING_UNIT_IO_PROCESSOR (EFI_COMPUTING_UNIT | 0x00030000) +#define EFI_COMPUTING_UNIT_CACHE (EFI_COMPUTING_UNIT | 0x00040000) +#define EFI_COMPUTING_UNIT_MEMORY (EFI_COMPUTING_UNIT | 0x00050000) +#define EFI_COMPUTING_UNIT_CHIPSET (EFI_COMPUTING_UNIT | 0x00060000) ///@} /// @@ -158,15 +158,15 @@ typedef struct { /// /// Computing Unit Host Processor Subclass Progress Code definitions. ///@{ -#define EFI_CU_HP_PC_POWER_ON_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000000) -#define EFI_CU_HP_PC_CACHE_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000001) -#define EFI_CU_HP_PC_RAM_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000002) -#define EFI_CU_HP_PC_MEMORY_CONTROLLER_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000003) -#define EFI_CU_HP_PC_IO_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000004) -#define EFI_CU_HP_PC_BSP_SELECT (EFI_SUBCLASS_SPECIFIC | 0x00000005) -#define EFI_CU_HP_PC_BSP_RESELECT (EFI_SUBCLASS_SPECIFIC | 0x00000006) -#define EFI_CU_HP_PC_AP_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000007) -#define EFI_CU_HP_PC_SMM_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000008) +#define EFI_CU_HP_PC_POWER_ON_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000000) +#define EFI_CU_HP_PC_CACHE_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000001) +#define EFI_CU_HP_PC_RAM_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000002) +#define EFI_CU_HP_PC_MEMORY_CONTROLLER_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000003) +#define EFI_CU_HP_PC_IO_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000004) +#define EFI_CU_HP_PC_BSP_SELECT (EFI_SUBCLASS_SPECIFIC | 0x00000005) +#define EFI_CU_HP_PC_BSP_RESELECT (EFI_SUBCLASS_SPECIFIC | 0x00000006) +#define EFI_CU_HP_PC_AP_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000007) +#define EFI_CU_HP_PC_SMM_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000008) ///@} // @@ -181,8 +181,8 @@ typedef struct { /// Computing Unit Cache Subclass Progress Code definitions. /// ///@{ -#define EFI_CU_CACHE_PC_PRESENCE_DETECT (EFI_SUBCLASS_SPECIFIC | 0x00000000) -#define EFI_CU_CACHE_PC_CONFIGURATION (EFI_SUBCLASS_SPECIFIC | 0x00000001) +#define EFI_CU_CACHE_PC_PRESENCE_DETECT (EFI_SUBCLASS_SPECIFIC | 0x00000000) +#define EFI_CU_CACHE_PC_CONFIGURATION (EFI_SUBCLASS_SPECIFIC | 0x00000001) ///@} /// @@ -205,52 +205,52 @@ typedef struct { /// /// South Bridge initialization prior to memory detection. /// -#define EFI_CHIPSET_PC_PEI_CAR_SB_INIT (EFI_SUBCLASS_SPECIFIC|0x00000000) +#define EFI_CHIPSET_PC_PEI_CAR_SB_INIT (EFI_SUBCLASS_SPECIFIC|0x00000000) /// /// North Bridge initialization prior to memory detection. /// -#define EFI_CHIPSET_PC_PEI_CAR_NB_INIT (EFI_SUBCLASS_SPECIFIC|0x00000001) +#define EFI_CHIPSET_PC_PEI_CAR_NB_INIT (EFI_SUBCLASS_SPECIFIC|0x00000001) /// /// South Bridge initialization after memory detection. /// -#define EFI_CHIPSET_PC_PEI_MEM_SB_INIT (EFI_SUBCLASS_SPECIFIC|0x00000002) +#define EFI_CHIPSET_PC_PEI_MEM_SB_INIT (EFI_SUBCLASS_SPECIFIC|0x00000002) /// /// North Bridge initialization after memory detection. /// -#define EFI_CHIPSET_PC_PEI_MEM_NB_INIT (EFI_SUBCLASS_SPECIFIC|0x00000003) +#define EFI_CHIPSET_PC_PEI_MEM_NB_INIT (EFI_SUBCLASS_SPECIFIC|0x00000003) /// /// PCI Host Bridge DXE initialization. /// -#define EFI_CHIPSET_PC_DXE_HB_INIT (EFI_SUBCLASS_SPECIFIC|0x00000004) +#define EFI_CHIPSET_PC_DXE_HB_INIT (EFI_SUBCLASS_SPECIFIC|0x00000004) /// /// North Bridge DXE initialization. /// -#define EFI_CHIPSET_PC_DXE_NB_INIT (EFI_SUBCLASS_SPECIFIC|0x00000005) +#define EFI_CHIPSET_PC_DXE_NB_INIT (EFI_SUBCLASS_SPECIFIC|0x00000005) /// /// North Bridge specific SMM initialization in DXE. /// -#define EFI_CHIPSET_PC_DXE_NB_SMM_INIT (EFI_SUBCLASS_SPECIFIC|0x00000006) +#define EFI_CHIPSET_PC_DXE_NB_SMM_INIT (EFI_SUBCLASS_SPECIFIC|0x00000006) /// /// Initialization of the South Bridge specific UEFI Runtime Services. /// -#define EFI_CHIPSET_PC_DXE_SB_RT_INIT (EFI_SUBCLASS_SPECIFIC|0x00000007) +#define EFI_CHIPSET_PC_DXE_SB_RT_INIT (EFI_SUBCLASS_SPECIFIC|0x00000007) /// /// South Bridge DXE initialization /// -#define EFI_CHIPSET_PC_DXE_SB_INIT (EFI_SUBCLASS_SPECIFIC|0x00000008) +#define EFI_CHIPSET_PC_DXE_SB_INIT (EFI_SUBCLASS_SPECIFIC|0x00000008) /// /// South Bridge specific SMM initialization in DXE. /// -#define EFI_CHIPSET_PC_DXE_SB_SMM_INIT (EFI_SUBCLASS_SPECIFIC|0x00000009) +#define EFI_CHIPSET_PC_DXE_SB_SMM_INIT (EFI_SUBCLASS_SPECIFIC|0x00000009) /// /// Initialization of the South Bridge devices. @@ -297,9 +297,9 @@ typedef struct { /// Computing Unit Firmware Processor Subclass Error Code definitions. /// ///@{ -#define EFI_CU_FP_EC_HARD_FAIL (EFI_SUBCLASS_SPECIFIC | 0x00000000) -#define EFI_CU_FP_EC_SOFT_FAIL (EFI_SUBCLASS_SPECIFIC | 0x00000001) -#define EFI_CU_FP_EC_COMM_ERROR (EFI_SUBCLASS_SPECIFIC | 0x00000002) +#define EFI_CU_FP_EC_HARD_FAIL (EFI_SUBCLASS_SPECIFIC | 0x00000000) +#define EFI_CU_FP_EC_SOFT_FAIL (EFI_SUBCLASS_SPECIFIC | 0x00000001) +#define EFI_CU_FP_EC_COMM_ERROR (EFI_SUBCLASS_SPECIFIC | 0x00000002) ///@} // @@ -310,27 +310,27 @@ typedef struct { /// Computing Unit Cache Subclass Error Code definitions. /// ///@{ -#define EFI_CU_CACHE_EC_INVALID_TYPE (EFI_SUBCLASS_SPECIFIC | 0x00000000) -#define EFI_CU_CACHE_EC_INVALID_SPEED (EFI_SUBCLASS_SPECIFIC | 0x00000001) -#define EFI_CU_CACHE_EC_INVALID_SIZE (EFI_SUBCLASS_SPECIFIC | 0x00000002) -#define EFI_CU_CACHE_EC_MISMATCH (EFI_SUBCLASS_SPECIFIC | 0x00000003) +#define EFI_CU_CACHE_EC_INVALID_TYPE (EFI_SUBCLASS_SPECIFIC | 0x00000000) +#define EFI_CU_CACHE_EC_INVALID_SPEED (EFI_SUBCLASS_SPECIFIC | 0x00000001) +#define EFI_CU_CACHE_EC_INVALID_SIZE (EFI_SUBCLASS_SPECIFIC | 0x00000002) +#define EFI_CU_CACHE_EC_MISMATCH (EFI_SUBCLASS_SPECIFIC | 0x00000003) ///@} /// /// Computing Unit Memory Subclass Error Code definitions. /// ///@{ -#define EFI_CU_MEMORY_EC_INVALID_TYPE (EFI_SUBCLASS_SPECIFIC | 0x00000000) -#define EFI_CU_MEMORY_EC_INVALID_SPEED (EFI_SUBCLASS_SPECIFIC | 0x00000001) -#define EFI_CU_MEMORY_EC_CORRECTABLE (EFI_SUBCLASS_SPECIFIC | 0x00000002) -#define EFI_CU_MEMORY_EC_UNCORRECTABLE (EFI_SUBCLASS_SPECIFIC | 0x00000003) -#define EFI_CU_MEMORY_EC_SPD_FAIL (EFI_SUBCLASS_SPECIFIC | 0x00000004) -#define EFI_CU_MEMORY_EC_INVALID_SIZE (EFI_SUBCLASS_SPECIFIC | 0x00000005) -#define EFI_CU_MEMORY_EC_MISMATCH (EFI_SUBCLASS_SPECIFIC | 0x00000006) -#define EFI_CU_MEMORY_EC_S3_RESUME_FAIL (EFI_SUBCLASS_SPECIFIC | 0x00000007) -#define EFI_CU_MEMORY_EC_UPDATE_FAIL (EFI_SUBCLASS_SPECIFIC | 0x00000008) -#define EFI_CU_MEMORY_EC_NONE_DETECTED (EFI_SUBCLASS_SPECIFIC | 0x00000009) -#define EFI_CU_MEMORY_EC_NONE_USEFUL (EFI_SUBCLASS_SPECIFIC | 0x0000000A) +#define EFI_CU_MEMORY_EC_INVALID_TYPE (EFI_SUBCLASS_SPECIFIC | 0x00000000) +#define EFI_CU_MEMORY_EC_INVALID_SPEED (EFI_SUBCLASS_SPECIFIC | 0x00000001) +#define EFI_CU_MEMORY_EC_CORRECTABLE (EFI_SUBCLASS_SPECIFIC | 0x00000002) +#define EFI_CU_MEMORY_EC_UNCORRECTABLE (EFI_SUBCLASS_SPECIFIC | 0x00000003) +#define EFI_CU_MEMORY_EC_SPD_FAIL (EFI_SUBCLASS_SPECIFIC | 0x00000004) +#define EFI_CU_MEMORY_EC_INVALID_SIZE (EFI_SUBCLASS_SPECIFIC | 0x00000005) +#define EFI_CU_MEMORY_EC_MISMATCH (EFI_SUBCLASS_SPECIFIC | 0x00000006) +#define EFI_CU_MEMORY_EC_S3_RESUME_FAIL (EFI_SUBCLASS_SPECIFIC | 0x00000007) +#define EFI_CU_MEMORY_EC_UPDATE_FAIL (EFI_SUBCLASS_SPECIFIC | 0x00000008) +#define EFI_CU_MEMORY_EC_NONE_DETECTED (EFI_SUBCLASS_SPECIFIC | 0x00000009) +#define EFI_CU_MEMORY_EC_NONE_USEFUL (EFI_SUBCLASS_SPECIFIC | 0x0000000A) ///@} /// @@ -411,7 +411,7 @@ typedef struct { /// Peripheral Class Serial Port Subclass Progress Code definitions. /// ///@{ -#define EFI_P_SERIAL_PORT_PC_CLEAR_BUFFER (EFI_SUBCLASS_SPECIFIC | 0x00000000) +#define EFI_P_SERIAL_PORT_PC_CLEAR_BUFFER (EFI_SUBCLASS_SPECIFIC | 0x00000000) ///@} // @@ -467,16 +467,16 @@ typedef struct { /// Peripheral Class Keyboard Subclass Error Code definitions. /// ///@{ -#define EFI_P_KEYBOARD_EC_LOCKED (EFI_SUBCLASS_SPECIFIC | 0x00000000) -#define EFI_P_KEYBOARD_EC_STUCK_KEY (EFI_SUBCLASS_SPECIFIC | 0x00000001) -#define EFI_P_KEYBOARD_EC_BUFFER_FULL (EFI_SUBCLASS_SPECIFIC | 0x00000002) +#define EFI_P_KEYBOARD_EC_LOCKED (EFI_SUBCLASS_SPECIFIC | 0x00000000) +#define EFI_P_KEYBOARD_EC_STUCK_KEY (EFI_SUBCLASS_SPECIFIC | 0x00000001) +#define EFI_P_KEYBOARD_EC_BUFFER_FULL (EFI_SUBCLASS_SPECIFIC | 0x00000002) ///@} /// /// Peripheral Class Mouse Subclass Error Code definitions. /// ///@{ -#define EFI_P_MOUSE_EC_LOCKED (EFI_SUBCLASS_SPECIFIC | 0x00000000) +#define EFI_P_MOUSE_EC_LOCKED (EFI_SUBCLASS_SPECIFIC | 0x00000000) ///@} // @@ -545,13 +545,13 @@ typedef struct { /// These are shared by all subclasses. /// ///@{ -#define EFI_IOB_PC_INIT 0x00000000 -#define EFI_IOB_PC_RESET 0x00000001 -#define EFI_IOB_PC_DISABLE 0x00000002 -#define EFI_IOB_PC_DETECT 0x00000003 -#define EFI_IOB_PC_ENABLE 0x00000004 -#define EFI_IOB_PC_RECONFIG 0x00000005 -#define EFI_IOB_PC_HOTPLUG 0x00000006 +#define EFI_IOB_PC_INIT 0x00000000 +#define EFI_IOB_PC_RESET 0x00000001 +#define EFI_IOB_PC_DISABLE 0x00000002 +#define EFI_IOB_PC_DETECT 0x00000003 +#define EFI_IOB_PC_ENABLE 0x00000004 +#define EFI_IOB_PC_RECONFIG 0x00000005 +#define EFI_IOB_PC_HOTPLUG 0x00000006 ///@} // @@ -639,8 +639,8 @@ typedef struct { /// IO Bus Class PCI Subclass Error Code definitions. /// ///@{ -#define EFI_IOB_PCI_EC_PERR (EFI_SUBCLASS_SPECIFIC | 0x00000000) -#define EFI_IOB_PCI_EC_SERR (EFI_SUBCLASS_SPECIFIC | 0x00000001) +#define EFI_IOB_PCI_EC_PERR (EFI_SUBCLASS_SPECIFIC | 0x00000000) +#define EFI_IOB_PCI_EC_SERR (EFI_SUBCLASS_SPECIFIC | 0x00000001) ///@} // @@ -742,8 +742,8 @@ typedef struct { /// Software Class SEC Subclass Progress Code definitions. /// ///@{ -#define EFI_SW_SEC_PC_ENTRY_POINT (EFI_SUBCLASS_SPECIFIC | 0x00000000) -#define EFI_SW_SEC_PC_HANDOFF_TO_NEXT (EFI_SUBCLASS_SPECIFIC | 0x00000001) +#define EFI_SW_SEC_PC_ENTRY_POINT (EFI_SUBCLASS_SPECIFIC | 0x00000000) +#define EFI_SW_SEC_PC_HANDOFF_TO_NEXT (EFI_SUBCLASS_SPECIFIC | 0x00000001) ///@} /// @@ -784,16 +784,16 @@ typedef struct { /// Software Class DXE BS Driver Subclass Progress Code definitions. /// ///@{ -#define EFI_SW_DXE_BS_PC_LEGACY_OPROM_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000000) -#define EFI_SW_DXE_BS_PC_READY_TO_BOOT_EVENT (EFI_SUBCLASS_SPECIFIC | 0x00000001) -#define EFI_SW_DXE_BS_PC_LEGACY_BOOT_EVENT (EFI_SUBCLASS_SPECIFIC | 0x00000002) -#define EFI_SW_DXE_BS_PC_EXIT_BOOT_SERVICES_EVENT (EFI_SUBCLASS_SPECIFIC | 0x00000003) -#define EFI_SW_DXE_BS_PC_VIRTUAL_ADDRESS_CHANGE_EVENT (EFI_SUBCLASS_SPECIFIC | 0x00000004) -#define EFI_SW_DXE_BS_PC_VARIABLE_SERVICES_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000005) -#define EFI_SW_DXE_BS_PC_VARIABLE_RECLAIM (EFI_SUBCLASS_SPECIFIC | 0x00000006) -#define EFI_SW_DXE_BS_PC_ATTEMPT_BOOT_ORDER_EVENT (EFI_SUBCLASS_SPECIFIC | 0x00000007) -#define EFI_SW_DXE_BS_PC_CONFIG_RESET (EFI_SUBCLASS_SPECIFIC | 0x00000008) -#define EFI_SW_DXE_BS_PC_CSM_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000009) +#define EFI_SW_DXE_BS_PC_LEGACY_OPROM_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000000) +#define EFI_SW_DXE_BS_PC_READY_TO_BOOT_EVENT (EFI_SUBCLASS_SPECIFIC | 0x00000001) +#define EFI_SW_DXE_BS_PC_LEGACY_BOOT_EVENT (EFI_SUBCLASS_SPECIFIC | 0x00000002) +#define EFI_SW_DXE_BS_PC_EXIT_BOOT_SERVICES_EVENT (EFI_SUBCLASS_SPECIFIC | 0x00000003) +#define EFI_SW_DXE_BS_PC_VIRTUAL_ADDRESS_CHANGE_EVENT (EFI_SUBCLASS_SPECIFIC | 0x00000004) +#define EFI_SW_DXE_BS_PC_VARIABLE_SERVICES_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000005) +#define EFI_SW_DXE_BS_PC_VARIABLE_RECLAIM (EFI_SUBCLASS_SPECIFIC | 0x00000006) +#define EFI_SW_DXE_BS_PC_ATTEMPT_BOOT_ORDER_EVENT (EFI_SUBCLASS_SPECIFIC | 0x00000007) +#define EFI_SW_DXE_BS_PC_CONFIG_RESET (EFI_SUBCLASS_SPECIFIC | 0x00000008) +#define EFI_SW_DXE_BS_PC_CSM_INIT (EFI_SUBCLASS_SPECIFIC | 0x00000009) ///@} // @@ -1008,26 +1008,25 @@ typedef struct { /// Software Class PEI Module Subclass Error Code definitions. /// ///@{ -#define EFI_SW_PEI_EC_NO_RECOVERY_CAPSULE (EFI_SUBCLASS_SPECIFIC | 0x00000000) -#define EFI_SW_PEI_EC_INVALID_CAPSULE_DESCRIPTOR (EFI_SUBCLASS_SPECIFIC | 0x00000001) -#define EFI_SW_PEI_EC_S3_RESUME_PPI_NOT_FOUND (EFI_SUBCLASS_SPECIFIC | 0x00000002) -#define EFI_SW_PEI_EC_S3_BOOT_SCRIPT_ERROR (EFI_SUBCLASS_SPECIFIC | 0x00000003) -#define EFI_SW_PEI_EC_S3_OS_WAKE_ERROR (EFI_SUBCLASS_SPECIFIC | 0x00000004) -#define EFI_SW_PEI_EC_S3_RESUME_FAILED (EFI_SUBCLASS_SPECIFIC | 0x00000005) -#define EFI_SW_PEI_EC_RECOVERY_PPI_NOT_FOUND (EFI_SUBCLASS_SPECIFIC | 0x00000006) -#define EFI_SW_PEI_EC_RECOVERY_FAILED (EFI_SUBCLASS_SPECIFIC | 0x00000007) -#define EFI_SW_PEI_EC_S3_RESUME_ERROR (EFI_SUBCLASS_SPECIFIC | 0x00000008) -#define EFI_SW_PEI_EC_INVALID_CAPSULE (EFI_SUBCLASS_SPECIFIC | 0x00000009) +#define EFI_SW_PEI_EC_NO_RECOVERY_CAPSULE (EFI_SUBCLASS_SPECIFIC | 0x00000000) +#define EFI_SW_PEI_EC_INVALID_CAPSULE_DESCRIPTOR (EFI_SUBCLASS_SPECIFIC | 0x00000001) +#define EFI_SW_PEI_EC_S3_RESUME_PPI_NOT_FOUND (EFI_SUBCLASS_SPECIFIC | 0x00000002) +#define EFI_SW_PEI_EC_S3_BOOT_SCRIPT_ERROR (EFI_SUBCLASS_SPECIFIC | 0x00000003) +#define EFI_SW_PEI_EC_S3_OS_WAKE_ERROR (EFI_SUBCLASS_SPECIFIC | 0x00000004) +#define EFI_SW_PEI_EC_S3_RESUME_FAILED (EFI_SUBCLASS_SPECIFIC | 0x00000005) +#define EFI_SW_PEI_EC_RECOVERY_PPI_NOT_FOUND (EFI_SUBCLASS_SPECIFIC | 0x00000006) +#define EFI_SW_PEI_EC_RECOVERY_FAILED (EFI_SUBCLASS_SPECIFIC | 0x00000007) +#define EFI_SW_PEI_EC_S3_RESUME_ERROR (EFI_SUBCLASS_SPECIFIC | 0x00000008) +#define EFI_SW_PEI_EC_INVALID_CAPSULE (EFI_SUBCLASS_SPECIFIC | 0x00000009) ///@} /// /// Software Class DXE Foundation Subclass Error Code definitions. /// ///@{ -#define EFI_SW_DXE_CORE_EC_NO_ARCH (EFI_SUBCLASS_SPECIFIC | 0x00000000) +#define EFI_SW_DXE_CORE_EC_NO_ARCH (EFI_SUBCLASS_SPECIFIC | 0x00000000) ///@} - /// /// Software Class DXE Boot Service Driver Subclass Error Code definitions. /// @@ -1147,20 +1146,20 @@ typedef struct { /// Software Class EFI DXE Service Subclass Error Code definitions. /// ///@{ -#define EFI_SW_DXE_BS_PC_BEGIN_CONNECTING_DRIVERS (EFI_SUBCLASS_SPECIFIC | 0x00000005) -#define EFI_SW_DXE_BS_PC_VERIFYING_PASSWORD (EFI_SUBCLASS_SPECIFIC | 0x00000006) +#define EFI_SW_DXE_BS_PC_BEGIN_CONNECTING_DRIVERS (EFI_SUBCLASS_SPECIFIC | 0x00000005) +#define EFI_SW_DXE_BS_PC_VERIFYING_PASSWORD (EFI_SUBCLASS_SPECIFIC | 0x00000006) ///@} /// /// Software Class DXE RT Driver Subclass Progress Code definitions. /// ///@{ -#define EFI_SW_DXE_RT_PC_S0 (EFI_SUBCLASS_SPECIFIC | 0x00000000) -#define EFI_SW_DXE_RT_PC_S1 (EFI_SUBCLASS_SPECIFIC | 0x00000001) -#define EFI_SW_DXE_RT_PC_S2 (EFI_SUBCLASS_SPECIFIC | 0x00000002) -#define EFI_SW_DXE_RT_PC_S3 (EFI_SUBCLASS_SPECIFIC | 0x00000003) -#define EFI_SW_DXE_RT_PC_S4 (EFI_SUBCLASS_SPECIFIC | 0x00000004) -#define EFI_SW_DXE_RT_PC_S5 (EFI_SUBCLASS_SPECIFIC | 0x00000005) +#define EFI_SW_DXE_RT_PC_S0 (EFI_SUBCLASS_SPECIFIC | 0x00000000) +#define EFI_SW_DXE_RT_PC_S1 (EFI_SUBCLASS_SPECIFIC | 0x00000001) +#define EFI_SW_DXE_RT_PC_S2 (EFI_SUBCLASS_SPECIFIC | 0x00000002) +#define EFI_SW_DXE_RT_PC_S3 (EFI_SUBCLASS_SPECIFIC | 0x00000003) +#define EFI_SW_DXE_RT_PC_S4 (EFI_SUBCLASS_SPECIFIC | 0x00000004) +#define EFI_SW_DXE_RT_PC_S5 (EFI_SUBCLASS_SPECIFIC | 0x00000005) ///@} /// @@ -1169,23 +1168,23 @@ typedef struct { /// definitions in the EFI specification. /// ///@{ -#define EFI_SW_EC_X64_DIVIDE_ERROR EXCEPT_X64_DIVIDE_ERROR -#define EFI_SW_EC_X64_DEBUG EXCEPT_X64_DEBUG -#define EFI_SW_EC_X64_NMI EXCEPT_X64_NMI -#define EFI_SW_EC_X64_BREAKPOINT EXCEPT_X64_BREAKPOINT -#define EFI_SW_EC_X64_OVERFLOW EXCEPT_X64_OVERFLOW -#define EFI_SW_EC_X64_BOUND EXCEPT_X64_BOUND -#define EFI_SW_EC_X64_INVALID_OPCODE EXCEPT_X64_INVALID_OPCODE -#define EFI_SW_EC_X64_DOUBLE_FAULT EXCEPT_X64_DOUBLE_FAULT -#define EFI_SW_EC_X64_INVALID_TSS EXCEPT_X64_INVALID_TSS -#define EFI_SW_EC_X64_SEG_NOT_PRESENT EXCEPT_X64_SEG_NOT_PRESENT -#define EFI_SW_EC_X64_STACK_FAULT EXCEPT_X64_STACK_FAULT -#define EFI_SW_EC_X64_GP_FAULT EXCEPT_X64_GP_FAULT -#define EFI_SW_EC_X64_PAGE_FAULT EXCEPT_X64_PAGE_FAULT -#define EFI_SW_EC_X64_FP_ERROR EXCEPT_X64_FP_ERROR -#define EFI_SW_EC_X64_ALIGNMENT_CHECK EXCEPT_X64_ALIGNMENT_CHECK -#define EFI_SW_EC_X64_MACHINE_CHECK EXCEPT_X64_MACHINE_CHECK -#define EFI_SW_EC_X64_SIMD EXCEPT_X64_SIMD +#define EFI_SW_EC_X64_DIVIDE_ERROR EXCEPT_X64_DIVIDE_ERROR +#define EFI_SW_EC_X64_DEBUG EXCEPT_X64_DEBUG +#define EFI_SW_EC_X64_NMI EXCEPT_X64_NMI +#define EFI_SW_EC_X64_BREAKPOINT EXCEPT_X64_BREAKPOINT +#define EFI_SW_EC_X64_OVERFLOW EXCEPT_X64_OVERFLOW +#define EFI_SW_EC_X64_BOUND EXCEPT_X64_BOUND +#define EFI_SW_EC_X64_INVALID_OPCODE EXCEPT_X64_INVALID_OPCODE +#define EFI_SW_EC_X64_DOUBLE_FAULT EXCEPT_X64_DOUBLE_FAULT +#define EFI_SW_EC_X64_INVALID_TSS EXCEPT_X64_INVALID_TSS +#define EFI_SW_EC_X64_SEG_NOT_PRESENT EXCEPT_X64_SEG_NOT_PRESENT +#define EFI_SW_EC_X64_STACK_FAULT EXCEPT_X64_STACK_FAULT +#define EFI_SW_EC_X64_GP_FAULT EXCEPT_X64_GP_FAULT +#define EFI_SW_EC_X64_PAGE_FAULT EXCEPT_X64_PAGE_FAULT +#define EFI_SW_EC_X64_FP_ERROR EXCEPT_X64_FP_ERROR +#define EFI_SW_EC_X64_ALIGNMENT_CHECK EXCEPT_X64_ALIGNMENT_CHECK +#define EFI_SW_EC_X64_MACHINE_CHECK EXCEPT_X64_MACHINE_CHECK +#define EFI_SW_EC_X64_SIMD EXCEPT_X64_SIMD ///@} /// @@ -1194,14 +1193,14 @@ typedef struct { /// definitions in the EFI specification. /// ///@{ -#define EFI_SW_EC_ARM_RESET EXCEPT_ARM_RESET -#define EFI_SW_EC_ARM_UNDEFINED_INSTRUCTION EXCEPT_ARM_UNDEFINED_INSTRUCTION -#define EFI_SW_EC_ARM_SOFTWARE_INTERRUPT EXCEPT_ARM_SOFTWARE_INTERRUPT -#define EFI_SW_EC_ARM_PREFETCH_ABORT EXCEPT_ARM_PREFETCH_ABORT -#define EFI_SW_EC_ARM_DATA_ABORT EXCEPT_ARM_DATA_ABORT -#define EFI_SW_EC_ARM_RESERVED EXCEPT_ARM_RESERVED -#define EFI_SW_EC_ARM_IRQ EXCEPT_ARM_IRQ -#define EFI_SW_EC_ARM_FIQ EXCEPT_ARM_FIQ +#define EFI_SW_EC_ARM_RESET EXCEPT_ARM_RESET +#define EFI_SW_EC_ARM_UNDEFINED_INSTRUCTION EXCEPT_ARM_UNDEFINED_INSTRUCTION +#define EFI_SW_EC_ARM_SOFTWARE_INTERRUPT EXCEPT_ARM_SOFTWARE_INTERRUPT +#define EFI_SW_EC_ARM_PREFETCH_ABORT EXCEPT_ARM_PREFETCH_ABORT +#define EFI_SW_EC_ARM_DATA_ABORT EXCEPT_ARM_DATA_ABORT +#define EFI_SW_EC_ARM_RESERVED EXCEPT_ARM_RESERVED +#define EFI_SW_EC_ARM_IRQ EXCEPT_ARM_IRQ +#define EFI_SW_EC_ARM_FIQ EXCEPT_ARM_FIQ ///@} #endif diff --git a/MdePkg/Include/PiDxe.h b/MdePkg/Include/PiDxe.h index 7654fe2..e2f6b2a 100644 --- a/MdePkg/Include/PiDxe.h +++ b/MdePkg/Include/PiDxe.h @@ -16,4 +16,3 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #endif - diff --git a/MdePkg/Include/PiMm.h b/MdePkg/Include/PiMm.h index 4ebabc1..8b76dbb 100644 --- a/MdePkg/Include/PiMm.h +++ b/MdePkg/Include/PiMm.h @@ -16,4 +16,3 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #endif - diff --git a/MdePkg/Include/PiPei.h b/MdePkg/Include/PiPei.h index bf22a0f..bc6c4eb 100644 --- a/MdePkg/Include/PiPei.h +++ b/MdePkg/Include/PiPei.h @@ -18,4 +18,3 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #endif - diff --git a/MdePkg/Include/PiSmm.h b/MdePkg/Include/PiSmm.h index dfd2de2..e380fc4 100644 --- a/MdePkg/Include/PiSmm.h +++ b/MdePkg/Include/PiSmm.h @@ -16,4 +16,3 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #endif - diff --git a/MdePkg/Include/Ppi/BlockIo.h b/MdePkg/Include/Ppi/BlockIo.h index 3a4955b..3aa5410 100644 --- a/MdePkg/Include/Ppi/BlockIo.h +++ b/MdePkg/Include/Ppi/BlockIo.h @@ -33,24 +33,24 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// The forward declaration for EFI_PEI_RECOVERY_BLOCK_IO_PPI. /// -typedef struct _EFI_PEI_RECOVERY_BLOCK_IO_PPI EFI_PEI_RECOVERY_BLOCK_IO_PPI; +typedef struct _EFI_PEI_RECOVERY_BLOCK_IO_PPI EFI_PEI_RECOVERY_BLOCK_IO_PPI; /// /// All blocks on the recovery device are addressed with a 64-bit Logical Block Address (LBA). /// -typedef UINT64 EFI_PEI_LBA; +typedef UINT64 EFI_PEI_LBA; /// /// EFI_PEI_BLOCK_DEVICE_TYPE /// typedef enum { - LegacyFloppy = 0, ///< The recovery device is a floppy. - IdeCDROM = 1, ///< The recovery device is an IDE CD-ROM - IdeLS120 = 2, ///< The recovery device is an IDE LS-120 - UsbMassStorage= 3, ///< The recovery device is a USB Mass Storage device - SD = 4, ///< The recovery device is a Secure Digital device - EMMC = 5, ///< The recovery device is a eMMC device - UfsDevice = 6, ///< The recovery device is a Universal Flash Storage device + LegacyFloppy = 0, ///< The recovery device is a floppy. + IdeCDROM = 1, ///< The recovery device is an IDE CD-ROM + IdeLS120 = 2, ///< The recovery device is an IDE LS-120 + UsbMassStorage = 3, ///< The recovery device is a USB Mass Storage device + SD = 4, ///< The recovery device is a Secure Digital device + EMMC = 5, ///< The recovery device is a eMMC device + UfsDevice = 6, ///< The recovery device is a Universal Flash Storage device MaxDeviceType } EFI_PEI_BLOCK_DEVICE_TYPE; @@ -68,20 +68,20 @@ typedef struct { /// /// The type of media device being referenced by DeviceIndex. /// - EFI_PEI_BLOCK_DEVICE_TYPE DeviceType; + EFI_PEI_BLOCK_DEVICE_TYPE DeviceType; /// /// A flag that indicates if media is present. This flag is always set for /// nonremovable media devices. /// - BOOLEAN MediaPresent; + BOOLEAN MediaPresent; /// /// The last logical block that the device supports. /// - UINTN LastBlock; + UINTN LastBlock; /// /// The size of a logical block in bytes. /// - UINTN BlockSize; + UINTN BlockSize; } EFI_PEI_BLOCK_IO_MEDIA; /** @@ -214,19 +214,19 @@ struct _EFI_PEI_RECOVERY_BLOCK_IO_PPI { /// /// Gets the number of block I/O devices that the specific block driver manages. /// - EFI_PEI_GET_NUMBER_BLOCK_DEVICES GetNumberOfBlockDevices; + EFI_PEI_GET_NUMBER_BLOCK_DEVICES GetNumberOfBlockDevices; /// /// Gets the specified media information. /// - EFI_PEI_GET_DEVICE_MEDIA_INFORMATION GetBlockDeviceMediaInfo; + EFI_PEI_GET_DEVICE_MEDIA_INFORMATION GetBlockDeviceMediaInfo; /// /// Reads the requested number of blocks from the specified block device. /// - EFI_PEI_READ_BLOCKS ReadBlocks; + EFI_PEI_READ_BLOCKS ReadBlocks; }; -extern EFI_GUID gEfiPeiVirtualBlockIoPpiGuid; +extern EFI_GUID gEfiPeiVirtualBlockIoPpiGuid; #endif diff --git a/MdePkg/Include/Ppi/BlockIo2.h b/MdePkg/Include/Ppi/BlockIo2.h index 0dba648..8b811ce 100644 --- a/MdePkg/Include/Ppi/BlockIo2.h +++ b/MdePkg/Include/Ppi/BlockIo2.h @@ -28,9 +28,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// The forward declaration for EFI_PEI_RECOVERY_BLOCK_IO_PPI. /// -typedef struct _EFI_PEI_RECOVERY_BLOCK_IO2_PPI EFI_PEI_RECOVERY_BLOCK_IO2_PPI; +typedef struct _EFI_PEI_RECOVERY_BLOCK_IO2_PPI EFI_PEI_RECOVERY_BLOCK_IO2_PPI; -#define EFI_PEI_RECOVERY_BLOCK_IO2_PPI_REVISION 0x00010000 +#define EFI_PEI_RECOVERY_BLOCK_IO2_PPI_REVISION 0x00010000 typedef struct { /// @@ -40,28 +40,28 @@ typedef struct { /// When more than one sub-type is associated with the interface, sub-type with /// the smallest number must be used. /// - UINT8 InterfaceType; + UINT8 InterfaceType; /// /// A flag that indicates if media is removable. /// - BOOLEAN RemovableMedia; + BOOLEAN RemovableMedia; /// /// A flag that indicates if media is present. This flag is always set for /// non-removable media devices. /// - BOOLEAN MediaPresent; + BOOLEAN MediaPresent; /// /// A flag that indicates if media is read-only. /// - BOOLEAN ReadOnly; + BOOLEAN ReadOnly; /// /// The size of a logical block in bytes. /// - UINT32 BlockSize; + UINT32 BlockSize; /// /// The last logical block that the device supports. /// - EFI_PEI_LBA LastBlock; + EFI_PEI_LBA LastBlock; } EFI_PEI_BLOCK_IO2_MEDIA; /** @@ -195,23 +195,23 @@ struct _EFI_PEI_RECOVERY_BLOCK_IO2_PPI { /// The revision to which the interface adheres. /// All future revisions must be backwards compatible. /// - UINT64 Revision; + UINT64 Revision; /// /// Gets the number of block I/O devices that the specific block driver manages. /// - EFI_PEI_GET_NUMBER_BLOCK_DEVICES2 GetNumberOfBlockDevices; + EFI_PEI_GET_NUMBER_BLOCK_DEVICES2 GetNumberOfBlockDevices; /// /// Gets the specified media information. /// - EFI_PEI_GET_DEVICE_MEDIA_INFORMATION2 GetBlockDeviceMediaInfo; + EFI_PEI_GET_DEVICE_MEDIA_INFORMATION2 GetBlockDeviceMediaInfo; /// /// Reads the requested number of blocks from the specified block device. /// - EFI_PEI_READ_BLOCKS2 ReadBlocks; + EFI_PEI_READ_BLOCKS2 ReadBlocks; }; -extern EFI_GUID gEfiPeiVirtualBlockIo2PpiGuid; +extern EFI_GUID gEfiPeiVirtualBlockIo2PpiGuid; #endif diff --git a/MdePkg/Include/Ppi/BootInRecoveryMode.h b/MdePkg/Include/Ppi/BootInRecoveryMode.h index ae40744..dd3317f 100644 --- a/MdePkg/Include/Ppi/BootInRecoveryMode.h +++ b/MdePkg/Include/Ppi/BootInRecoveryMode.h @@ -18,7 +18,6 @@ 0x17ee496a, 0xd8e4, 0x4b9a, {0x94, 0xd1, 0xce, 0x82, 0x72, 0x30, 0x8, 0x50 } \ } - -extern EFI_GUID gEfiPeiBootInRecoveryModePpiGuid; +extern EFI_GUID gEfiPeiBootInRecoveryModePpiGuid; #endif diff --git a/MdePkg/Include/Ppi/Capsule.h b/MdePkg/Include/Ppi/Capsule.h index 331d9b8..e864d6a 100644 --- a/MdePkg/Include/Ppi/Capsule.h +++ b/MdePkg/Include/Ppi/Capsule.h @@ -115,16 +115,16 @@ EFI_STATUS /// processing, and once memory is available, create a HOB for the capsule. /// struct _EFI_PEI_CAPSULE_PPI { - EFI_PEI_CAPSULE_COALESCE Coalesce; - EFI_PEI_CAPSULE_CHECK_CAPSULE_UPDATE CheckCapsuleUpdate; - EFI_PEI_CAPSULE_CREATE_STATE CreateState; + EFI_PEI_CAPSULE_COALESCE Coalesce; + EFI_PEI_CAPSULE_CHECK_CAPSULE_UPDATE CheckCapsuleUpdate; + EFI_PEI_CAPSULE_CREATE_STATE CreateState; }; /// /// Keep name backwards compatible before PI Version 1.4 /// -extern EFI_GUID gPeiCapsulePpiGuid; +extern EFI_GUID gPeiCapsulePpiGuid; -extern EFI_GUID gEfiPeiCapsulePpiGuid; +extern EFI_GUID gEfiPeiCapsulePpiGuid; #endif // #ifndef _PEI_CAPSULE_PPI_H_ diff --git a/MdePkg/Include/Ppi/CpuIo.h b/MdePkg/Include/Ppi/CpuIo.h index f2cdde0..193a78e 100644 --- a/MdePkg/Include/Ppi/CpuIo.h +++ b/MdePkg/Include/Ppi/CpuIo.h @@ -16,7 +16,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define EFI_PEI_CPU_IO_PPI_INSTALLED_GUID \ { 0xe6af1f7b, 0xfc3f, 0x46da, {0xa8, 0x28, 0xa3, 0xb4, 0x57, 0xa4, 0x42, 0x82 } } -typedef struct _EFI_PEI_CPU_IO_PPI EFI_PEI_CPU_IO_PPI; +typedef struct _EFI_PEI_CPU_IO_PPI EFI_PEI_CPU_IO_PPI; /// /// EFI_PEI_CPU_IO_PPI_WIDTH. @@ -70,11 +70,11 @@ typedef struct { /// /// This service provides the various modalities of memory and I/O read. /// - EFI_PEI_CPU_IO_PPI_IO_MEM Read; + EFI_PEI_CPU_IO_PPI_IO_MEM Read; /// /// This service provides the various modalities of memory and I/O write. /// - EFI_PEI_CPU_IO_PPI_IO_MEM Write; + EFI_PEI_CPU_IO_PPI_IO_MEM Write; } EFI_PEI_CPU_IO_PPI_ACCESS; /** @@ -390,33 +390,33 @@ struct _EFI_PEI_CPU_IO_PPI { /// /// Collection of memory-access services. /// - EFI_PEI_CPU_IO_PPI_ACCESS Mem; + EFI_PEI_CPU_IO_PPI_ACCESS Mem; /// /// Collection of I/O-access services. /// - EFI_PEI_CPU_IO_PPI_ACCESS Io; - - EFI_PEI_CPU_IO_PPI_IO_READ8 IoRead8; - EFI_PEI_CPU_IO_PPI_IO_READ16 IoRead16; - EFI_PEI_CPU_IO_PPI_IO_READ32 IoRead32; - EFI_PEI_CPU_IO_PPI_IO_READ64 IoRead64; - - EFI_PEI_CPU_IO_PPI_IO_WRITE8 IoWrite8; - EFI_PEI_CPU_IO_PPI_IO_WRITE16 IoWrite16; - EFI_PEI_CPU_IO_PPI_IO_WRITE32 IoWrite32; - EFI_PEI_CPU_IO_PPI_IO_WRITE64 IoWrite64; - - EFI_PEI_CPU_IO_PPI_MEM_READ8 MemRead8; - EFI_PEI_CPU_IO_PPI_MEM_READ16 MemRead16; - EFI_PEI_CPU_IO_PPI_MEM_READ32 MemRead32; - EFI_PEI_CPU_IO_PPI_MEM_READ64 MemRead64; - - EFI_PEI_CPU_IO_PPI_MEM_WRITE8 MemWrite8; - EFI_PEI_CPU_IO_PPI_MEM_WRITE16 MemWrite16; - EFI_PEI_CPU_IO_PPI_MEM_WRITE32 MemWrite32; - EFI_PEI_CPU_IO_PPI_MEM_WRITE64 MemWrite64; + EFI_PEI_CPU_IO_PPI_ACCESS Io; + + EFI_PEI_CPU_IO_PPI_IO_READ8 IoRead8; + EFI_PEI_CPU_IO_PPI_IO_READ16 IoRead16; + EFI_PEI_CPU_IO_PPI_IO_READ32 IoRead32; + EFI_PEI_CPU_IO_PPI_IO_READ64 IoRead64; + + EFI_PEI_CPU_IO_PPI_IO_WRITE8 IoWrite8; + EFI_PEI_CPU_IO_PPI_IO_WRITE16 IoWrite16; + EFI_PEI_CPU_IO_PPI_IO_WRITE32 IoWrite32; + EFI_PEI_CPU_IO_PPI_IO_WRITE64 IoWrite64; + + EFI_PEI_CPU_IO_PPI_MEM_READ8 MemRead8; + EFI_PEI_CPU_IO_PPI_MEM_READ16 MemRead16; + EFI_PEI_CPU_IO_PPI_MEM_READ32 MemRead32; + EFI_PEI_CPU_IO_PPI_MEM_READ64 MemRead64; + + EFI_PEI_CPU_IO_PPI_MEM_WRITE8 MemWrite8; + EFI_PEI_CPU_IO_PPI_MEM_WRITE16 MemWrite16; + EFI_PEI_CPU_IO_PPI_MEM_WRITE32 MemWrite32; + EFI_PEI_CPU_IO_PPI_MEM_WRITE64 MemWrite64; }; -extern EFI_GUID gEfiPeiCpuIoPpiInstalledGuid; +extern EFI_GUID gEfiPeiCpuIoPpiInstalledGuid; #endif diff --git a/MdePkg/Include/Ppi/Decompress.h b/MdePkg/Include/Ppi/Decompress.h index b9ca637..8e8adff 100644 --- a/MdePkg/Include/Ppi/Decompress.h +++ b/MdePkg/Include/Ppi/Decompress.h @@ -15,7 +15,7 @@ #define EFI_PEI_DECOMPRESS_PPI_GUID \ { 0x1a36e4e7, 0xfab6, 0x476a, { 0x8e, 0x75, 0x69, 0x5a, 0x5, 0x76, 0xfd, 0xd7 } } -typedef struct _EFI_PEI_DECOMPRESS_PPI EFI_PEI_DECOMPRESS_PPI; +typedef struct _EFI_PEI_DECOMPRESS_PPI EFI_PEI_DECOMPRESS_PPI; /** Decompress a single compression section in a firmware file. @@ -49,8 +49,7 @@ EFI_STATUS IN CONST EFI_COMPRESSION_SECTION *InputSection, OUT VOID **OutputBuffer, OUT UINTN *OutputSize -); - + ); /// /// This PPI's single member function decompresses a compression @@ -59,10 +58,9 @@ EFI_STATUS /// compression sections will be ignored. /// struct _EFI_PEI_DECOMPRESS_PPI { - EFI_PEI_DECOMPRESS_DECOMPRESS Decompress; + EFI_PEI_DECOMPRESS_DECOMPRESS Decompress; }; - -extern EFI_GUID gEfiPeiDecompressPpiGuid; +extern EFI_GUID gEfiPeiDecompressPpiGuid; #endif diff --git a/MdePkg/Include/Ppi/DelayedDispatch.h b/MdePkg/Include/Ppi/DelayedDispatch.h index 195c5a3..f9b4fed 100644 --- a/MdePkg/Include/Ppi/DelayedDispatch.h +++ b/MdePkg/Include/Ppi/DelayedDispatch.h @@ -18,7 +18,6 @@ 0x869c711d, 0x649c, 0x44fe, { 0x8b, 0x9e, 0x2c, 0xbb, 0x29, 0x11, 0xc3, 0xe6} } \ } - /** Delayed Dispatch function. This routine is called sometime after the required delay. Upon return, if NewDelay is 0, the function is unregistered. If NewDelay @@ -31,18 +30,16 @@ typedef VOID -(EFIAPI *EFI_DELAYED_DISPATCH_FUNCTION) ( +(EFIAPI *EFI_DELAYED_DISPATCH_FUNCTION)( IN OUT UINT64 *Context, - OUT UINT32 *NewDelay + OUT UINT32 *NewDelay ); - /// /// The forward declaration for EFI_DELAYED_DISPATCH_PPI /// -typedef struct _EFI_DELAYED_DISPATCH_PPI EFI_DELAYED_DISPATCH_PPI; - +typedef struct _EFI_DELAYED_DISPATCH_PPI EFI_DELAYED_DISPATCH_PPI; /** Register a callback to be called after a minimum delay has occurred. @@ -68,7 +65,6 @@ EFI_STATUS OUT UINT32 Delay ); - /// /// This PPI is a pointer to the Delayed Dispatch Service. /// This service will be published by the Pei Foundation. The PEI Foundation @@ -76,10 +72,9 @@ EFI_STATUS /// execution. /// struct _EFI_DELAYED_DISPATCH_PPI { - EFI_DELAYED_DISPATCH_REGISTER Register; + EFI_DELAYED_DISPATCH_REGISTER Register; }; - -extern EFI_GUID gEfiPeiDelayedDispatchPpiGuid; +extern EFI_GUID gEfiPeiDelayedDispatchPpiGuid; #endif diff --git a/MdePkg/Include/Ppi/DeviceRecoveryModule.h b/MdePkg/Include/Ppi/DeviceRecoveryModule.h index 64dabec..84dd9ca 100644 --- a/MdePkg/Include/Ppi/DeviceRecoveryModule.h +++ b/MdePkg/Include/Ppi/DeviceRecoveryModule.h @@ -128,11 +128,11 @@ EFI_STATUS /// regardless of the underlying device(s). /// struct _EFI_PEI_DEVICE_RECOVERY_MODULE_PPI { - EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE GetNumberRecoveryCapsules; ///< Returns the number of DXE capsules residing on the device. - EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO GetRecoveryCapsuleInfo; ///< Returns the size and type of the requested recovery capsule. - EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE LoadRecoveryCapsule; ///< Loads a DXE capsule from some media into memory. + EFI_PEI_DEVICE_GET_NUMBER_RECOVERY_CAPSULE GetNumberRecoveryCapsules; ///< Returns the number of DXE capsules residing on the device. + EFI_PEI_DEVICE_GET_RECOVERY_CAPSULE_INFO GetRecoveryCapsuleInfo; ///< Returns the size and type of the requested recovery capsule. + EFI_PEI_DEVICE_LOAD_RECOVERY_CAPSULE LoadRecoveryCapsule; ///< Loads a DXE capsule from some media into memory. }; -extern EFI_GUID gEfiPeiDeviceRecoveryModulePpiGuid; +extern EFI_GUID gEfiPeiDeviceRecoveryModulePpiGuid; -#endif /* _PEI_DEVICE_RECOVERY_MODULE_PPI_H_ */ +#endif /* _PEI_DEVICE_RECOVERY_MODULE_PPI_H_ */ diff --git a/MdePkg/Include/Ppi/DxeIpl.h b/MdePkg/Include/Ppi/DxeIpl.h index dde7d4a..94ef7fe 100644 --- a/MdePkg/Include/Ppi/DxeIpl.h +++ b/MdePkg/Include/Ppi/DxeIpl.h @@ -58,9 +58,9 @@ EFI_STATUS /// The DXE IPL PPI may use PEI services to locate and load the DXE Foundation. /// struct _EFI_DXE_IPL_PPI { - EFI_DXE_IPL_ENTRY Entry; + EFI_DXE_IPL_ENTRY Entry; }; -extern EFI_GUID gEfiDxeIplPpiGuid; +extern EFI_GUID gEfiDxeIplPpiGuid; #endif diff --git a/MdePkg/Include/Ppi/EndOfPeiPhase.h b/MdePkg/Include/Ppi/EndOfPeiPhase.h index b188eb4..6ae6de1 100644 --- a/MdePkg/Include/Ppi/EndOfPeiPhase.h +++ b/MdePkg/Include/Ppi/EndOfPeiPhase.h @@ -20,6 +20,6 @@ 0x605EA650, 0xC65C, 0x42e1, {0xBA, 0x80, 0x91, 0xA5, 0x2A, 0xB6, 0x18, 0xC6 } \ } -extern EFI_GUID gEfiEndOfPeiSignalPpiGuid; +extern EFI_GUID gEfiEndOfPeiSignalPpiGuid; #endif diff --git a/MdePkg/Include/Ppi/FirmwareVolume.h b/MdePkg/Include/Ppi/FirmwareVolume.h index 4aae5e5..e789970 100644 --- a/MdePkg/Include/Ppi/FirmwareVolume.h +++ b/MdePkg/Include/Ppi/FirmwareVolume.h @@ -17,8 +17,7 @@ /// The FV format can be EFI_FIRMWARE_FILE_SYSTEM2_GUID or the GUID for a user-defined /// format. The EFI_FIRMWARE_FILE_SYSTEM2_GUID is the PI Firmware Volume format. /// -typedef struct _EFI_PEI_FIRMWARE_VOLUME_PPI EFI_PEI_FIRMWARE_VOLUME_PPI; - +typedef struct _EFI_PEI_FIRMWARE_VOLUME_PPI EFI_PEI_FIRMWARE_VOLUME_PPI; /** Process a firmware volume and create a volume handle. @@ -51,7 +50,7 @@ EFI_STATUS IN VOID *Buffer, IN UINTN BufferSize, OUT EFI_PEI_FV_HANDLE *FvHandle -); + ); /** Finds the next file of the specified type. @@ -82,8 +81,7 @@ EFI_STATUS IN EFI_FV_FILETYPE SearchType, IN EFI_PEI_FV_HANDLE FvHandle, IN OUT EFI_PEI_FILE_HANDLE *FileHandle -); - + ); /** Find a file within a volume by its name. @@ -117,8 +115,7 @@ EFI_STATUS IN CONST EFI_GUID *FileName, IN EFI_PEI_FV_HANDLE *FvHandle, OUT EFI_PEI_FILE_HANDLE *FileHandle -); - + ); /** Returns information about a specific file. @@ -145,7 +142,7 @@ EFI_STATUS IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This, IN EFI_PEI_FILE_HANDLE FileHandle, OUT EFI_FV_FILE_INFO *FileInfo -); + ); /** Returns information about a specific file. @@ -172,7 +169,7 @@ EFI_STATUS IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This, IN EFI_PEI_FILE_HANDLE FileHandle, OUT EFI_FV_FILE_INFO2 *FileInfo -); + ); /** This function returns information about the firmware volume. @@ -194,7 +191,7 @@ EFI_STATUS IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This, IN EFI_PEI_FV_HANDLE FvHandle, OUT EFI_FV_INFO *VolumeInfo -); + ); /** Find the next matching section in the firmware file. @@ -222,7 +219,7 @@ EFI_STATUS IN EFI_SECTION_TYPE SearchType, IN EFI_PEI_FILE_HANDLE FileHandle, OUT VOID **SectionData -); + ); /** Find the next matching section in the firmware file. @@ -256,33 +253,33 @@ EFI_STATUS IN EFI_PEI_FILE_HANDLE FileHandle, OUT VOID **SectionData, OUT UINT32 *AuthenticationStatus -); + ); -#define EFI_PEI_FIRMWARE_VOLUME_PPI_SIGNATURE SIGNATURE_32 ('P', 'F', 'V', 'P') -#define EFI_PEI_FIRMWARE_VOLUME_PPI_REVISION 0x00010030 +#define EFI_PEI_FIRMWARE_VOLUME_PPI_SIGNATURE SIGNATURE_32 ('P', 'F', 'V', 'P') +#define EFI_PEI_FIRMWARE_VOLUME_PPI_REVISION 0x00010030 /// /// This PPI provides functions for accessing a memory-mapped firmware volume of a specific format. /// struct _EFI_PEI_FIRMWARE_VOLUME_PPI { - EFI_PEI_FV_PROCESS_FV ProcessVolume; - EFI_PEI_FV_FIND_FILE_TYPE FindFileByType; - EFI_PEI_FV_FIND_FILE_NAME FindFileByName; - EFI_PEI_FV_GET_FILE_INFO GetFileInfo; - EFI_PEI_FV_GET_INFO GetVolumeInfo; - EFI_PEI_FV_FIND_SECTION FindSectionByType; - EFI_PEI_FV_GET_FILE_INFO2 GetFileInfo2; - EFI_PEI_FV_FIND_SECTION2 FindSectionByType2; + EFI_PEI_FV_PROCESS_FV ProcessVolume; + EFI_PEI_FV_FIND_FILE_TYPE FindFileByType; + EFI_PEI_FV_FIND_FILE_NAME FindFileByName; + EFI_PEI_FV_GET_FILE_INFO GetFileInfo; + EFI_PEI_FV_GET_INFO GetVolumeInfo; + EFI_PEI_FV_FIND_SECTION FindSectionByType; + EFI_PEI_FV_GET_FILE_INFO2 GetFileInfo2; + EFI_PEI_FV_FIND_SECTION2 FindSectionByType2; /// /// Signature is used to keep backward-compatibility, set to {'P','F','V','P'}. /// - UINT32 Signature; + UINT32 Signature; /// /// Revision for further extension. /// - UINT32 Revision; + UINT32 Revision; }; -extern EFI_GUID gEfiPeiFirmwareVolumePpiGuid; +extern EFI_GUID gEfiPeiFirmwareVolumePpiGuid; #endif diff --git a/MdePkg/Include/Ppi/FirmwareVolumeInfo.h b/MdePkg/Include/Ppi/FirmwareVolumeInfo.h index 2ebf58d..3229891 100644 --- a/MdePkg/Include/Ppi/FirmwareVolumeInfo.h +++ b/MdePkg/Include/Ppi/FirmwareVolumeInfo.h @@ -12,12 +12,10 @@ #ifndef __EFI_PEI_FIRMWARE_VOLUME_INFO_H__ #define __EFI_PEI_FIRMWARE_VOLUME_INFO_H__ - - #define EFI_PEI_FIRMWARE_VOLUME_INFO_PPI_GUID \ { 0x49edb1c1, 0xbf21, 0x4761, { 0xbb, 0x12, 0xeb, 0x0, 0x31, 0xaa, 0xbb, 0x39 } } -typedef struct _EFI_PEI_FIRMWARE_VOLUME_INFO_PPI EFI_PEI_FIRMWARE_VOLUME_INFO_PPI; +typedef struct _EFI_PEI_FIRMWARE_VOLUME_INFO_PPI EFI_PEI_FIRMWARE_VOLUME_INFO_PPI; /// /// This PPI describes the location and format of a firmware volume. @@ -29,34 +27,33 @@ struct _EFI_PEI_FIRMWARE_VOLUME_INFO_PPI { /// /// Unique identifier of the format of the memory-mapped firmware volume. /// - EFI_GUID FvFormat; + EFI_GUID FvFormat; /// /// Points to a buffer which allows the EFI_PEI_FIRMWARE_VOLUME_PPI to process /// the volume. The format of this buffer is specific to the FvFormat. /// For memory-mapped firmware volumes, this typically points to the first byte /// of the firmware volume. /// - VOID *FvInfo; + VOID *FvInfo; /// /// Size of the data provided by FvInfo. For memory-mapped firmware volumes, /// this is typically the size of the firmware volume. /// - UINT32 FvInfoSize; + UINT32 FvInfoSize; /// /// If the firmware volume originally came from a firmware file, then these /// point to the parent firmware volume name and firmware volume file. /// If it did not originally come from a firmware file, these should be NULL. /// - EFI_GUID *ParentFvName; + EFI_GUID *ParentFvName; /// /// If the firmware volume originally came from a firmware file, then these /// point to the parent firmware volume name and firmware volume file. /// If it did not originally come from a firmware file, these should be NULL. /// - EFI_GUID *ParentFileName; + EFI_GUID *ParentFileName; }; -extern EFI_GUID gEfiPeiFirmwareVolumeInfoPpiGuid; +extern EFI_GUID gEfiPeiFirmwareVolumeInfoPpiGuid; #endif - diff --git a/MdePkg/Include/Ppi/FirmwareVolumeInfo2.h b/MdePkg/Include/Ppi/FirmwareVolumeInfo2.h index f6ad0a8..398c5d0 100644 --- a/MdePkg/Include/Ppi/FirmwareVolumeInfo2.h +++ b/MdePkg/Include/Ppi/FirmwareVolumeInfo2.h @@ -12,12 +12,10 @@ #ifndef __EFI_PEI_FIRMWARE_VOLUME_INFO2_H__ #define __EFI_PEI_FIRMWARE_VOLUME_INFO2_H__ - - #define EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI_GUID \ { 0xea7ca24b, 0xded5, 0x4dad, { 0xa3, 0x89, 0xbf, 0x82, 0x7e, 0x8f, 0x9b, 0x38 } } -typedef struct _EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI; +typedef struct _EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI; /// /// This PPI describes the location and format of a firmware volume. @@ -29,38 +27,37 @@ struct _EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI { /// /// Unique identifier of the format of the memory-mapped firmware volume. /// - EFI_GUID FvFormat; + EFI_GUID FvFormat; /// /// Points to a buffer which allows the EFI_PEI_FIRMWARE_VOLUME_PPI to process /// the volume. The format of this buffer is specific to the FvFormat. /// For memory-mapped firmware volumes, this typically points to the first byte /// of the firmware volume. /// - VOID *FvInfo; + VOID *FvInfo; /// /// Size of the data provided by FvInfo. For memory-mapped firmware volumes, /// this is typically the size of the firmware volume. /// - UINT32 FvInfoSize; + UINT32 FvInfoSize; /// /// If the firmware volume originally came from a firmware file, then these /// point to the parent firmware volume name and firmware volume file. /// If it did not originally come from a firmware file, these should be NULL. /// - EFI_GUID *ParentFvName; + EFI_GUID *ParentFvName; /// /// If the firmware volume originally came from a firmware file, then these /// point to the parent firmware volume name and firmware volume file. /// If it did not originally come from a firmware file, these should be NULL. /// - EFI_GUID *ParentFileName; + EFI_GUID *ParentFileName; /// /// Authentication Status. /// - UINT32 AuthenticationStatus; + UINT32 AuthenticationStatus; }; -extern EFI_GUID gEfiPeiFirmwareVolumeInfo2PpiGuid; +extern EFI_GUID gEfiPeiFirmwareVolumeInfo2PpiGuid; #endif - diff --git a/MdePkg/Include/Ppi/Graphics.h b/MdePkg/Include/Ppi/Graphics.h index b17d250..3854f6c 100644 --- a/MdePkg/Include/Ppi/Graphics.h +++ b/MdePkg/Include/Ppi/Graphics.h @@ -40,7 +40,7 @@ typedef struct _EFI_PEI_GRAPHICS_PPI EFI_PEI_GRAPHICS_PPI; **/ typedef EFI_STATUS -(EFIAPI *EFI_PEI_GRAPHICS_INIT) ( +(EFIAPI *EFI_PEI_GRAPHICS_INIT)( IN VOID *GraphicsPolicyPtr ); @@ -61,7 +61,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_PEI_GRAPHICS_GET_MODE) ( +(EFIAPI *EFI_PEI_GRAPHICS_GET_MODE)( IN OUT EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *Mode ); @@ -70,10 +70,10 @@ EFI_STATUS /// firmware modules. /// struct _EFI_PEI_GRAPHICS_PPI { - EFI_PEI_GRAPHICS_INIT GraphicsPpiInit; - EFI_PEI_GRAPHICS_GET_MODE GraphicsPpiGetMode; + EFI_PEI_GRAPHICS_INIT GraphicsPpiInit; + EFI_PEI_GRAPHICS_GET_MODE GraphicsPpiGetMode; }; -extern EFI_GUID gEfiPeiGraphicsPpiGuid; +extern EFI_GUID gEfiPeiGraphicsPpiGuid; #endif diff --git a/MdePkg/Include/Ppi/GuidedSectionExtraction.h b/MdePkg/Include/Ppi/GuidedSectionExtraction.h index ce12a71..207319e 100644 --- a/MdePkg/Include/Ppi/GuidedSectionExtraction.h +++ b/MdePkg/Include/Ppi/GuidedSectionExtraction.h @@ -28,9 +28,7 @@ // that it is intended to process. // - -typedef struct _EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI; - +typedef struct _EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI; /** Processes the input section and returns the data contained therein @@ -79,7 +77,7 @@ EFI_STATUS OUT VOID **OutputBuffer, OUT UINTN *OutputSize, OUT UINT32 *AuthenticationStatus -); + ); /// /// If a GUID-defined section is encountered when doing section extraction, @@ -89,10 +87,7 @@ EFI_STATUS /// therein. /// struct _EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI { - EFI_PEI_EXTRACT_GUIDED_SECTION ExtractSection; + EFI_PEI_EXTRACT_GUIDED_SECTION ExtractSection; }; - - #endif - diff --git a/MdePkg/Include/Ppi/I2cMaster.h b/MdePkg/Include/Ppi/I2cMaster.h index 8acd0c4..7fab48f 100644 --- a/MdePkg/Include/Ppi/I2cMaster.h +++ b/MdePkg/Include/Ppi/I2cMaster.h @@ -35,7 +35,7 @@ typedef struct _EFI_PEI_I2C_MASTER_PPI EFI_PEI_I2C_MASTER_PPI; **/ typedef EFI_STATUS -(EFIAPI *EFI_PEI_I2C_MASTER_PPI_SET_BUS_FREQUENCY) ( +(EFIAPI *EFI_PEI_I2C_MASTER_PPI_SET_BUS_FREQUENCY)( IN EFI_PEI_I2C_MASTER_PPI *This, IN UINTN *BusClockHertz ); @@ -51,7 +51,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_PEI_I2C_MASTER_PPI_RESET) ( +(EFIAPI *EFI_PEI_I2C_MASTER_PPI_RESET)( IN CONST EFI_PEI_I2C_MASTER_PPI *This ); @@ -79,7 +79,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_PEI_I2C_MASTER_PPI_START_REQUEST) ( +(EFIAPI *EFI_PEI_I2C_MASTER_PPI_START_REQUEST)( IN CONST EFI_PEI_I2C_MASTER_PPI *This, IN UINTN SlaveAddress, IN EFI_I2C_REQUEST_PACKET *RequestPacket @@ -90,13 +90,13 @@ EFI_STATUS /// using the current state of any switches or multiplexers in the I2C bus. /// struct _EFI_PEI_I2C_MASTER_PPI { - EFI_PEI_I2C_MASTER_PPI_SET_BUS_FREQUENCY SetBusFrequency; - EFI_PEI_I2C_MASTER_PPI_RESET Reset; - EFI_PEI_I2C_MASTER_PPI_START_REQUEST StartRequest; - CONST EFI_I2C_CONTROLLER_CAPABILITIES *I2cControllerCapabilities; - EFI_GUID Identifier; + EFI_PEI_I2C_MASTER_PPI_SET_BUS_FREQUENCY SetBusFrequency; + EFI_PEI_I2C_MASTER_PPI_RESET Reset; + EFI_PEI_I2C_MASTER_PPI_START_REQUEST StartRequest; + CONST EFI_I2C_CONTROLLER_CAPABILITIES *I2cControllerCapabilities; + EFI_GUID Identifier; }; -extern EFI_GUID gEfiPeiI2cMasterPpiGuid; +extern EFI_GUID gEfiPeiI2cMasterPpiGuid; #endif diff --git a/MdePkg/Include/Ppi/IsaHc.h b/MdePkg/Include/Ppi/IsaHc.h index d7dfd9b..774dfb9 100644 --- a/MdePkg/Include/Ppi/IsaHc.h +++ b/MdePkg/Include/Ppi/IsaHc.h @@ -17,8 +17,8 @@ 0x8d48bd70, 0xc8a3, 0x4c06, {0x90, 0x1b, 0x74, 0x79, 0x46, 0xaa, 0xc3, 0x58} \ } -typedef struct _EFI_ISA_HC_PPI EFI_ISA_HC_PPI; -typedef struct _EFI_ISA_HC_PPI *PEFI_ISA_HC_PPI; +typedef struct _EFI_ISA_HC_PPI EFI_ISA_HC_PPI; +typedef struct _EFI_ISA_HC_PPI *PEFI_ISA_HC_PPI; /** Open I/O aperture. @@ -45,7 +45,7 @@ typedef struct _EFI_ISA_HC_PPI *PEFI_ISA_HC_PPI; **/ typedef EFI_STATUS -(EFIAPI *EFI_PEI_ISA_HC_OPEN_IO) ( +(EFIAPI *EFI_PEI_ISA_HC_OPEN_IO)( IN CONST EFI_ISA_HC_PPI *This, IN UINT16 IoAddress, IN UINT16 IoLength, @@ -71,7 +71,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_PEI_ISA_HC_CLOSE_IO) ( +(EFIAPI *EFI_PEI_ISA_HC_CLOSE_IO)( IN CONST EFI_ISA_HC_PPI *This, IN UINT64 IoApertureHandle ); @@ -83,7 +83,7 @@ struct _EFI_ISA_HC_PPI { /// /// An unsigned integer that specifies the version of the PPI structure. /// - UINT32 Version; + UINT32 Version; /// /// The address of the ISA/LPC Bridge device. /// For PCI, this is the segment, bus, device and function of the a ISA/LPC @@ -97,17 +97,17 @@ struct _EFI_ISA_HC_PPI { /// Bits 24-31 - Bus Type /// If bits 24-31 are 0xff, then the definition is platform-specific. /// - UINT32 Address; + UINT32 Address; /// /// Opens an aperture on a positive-decode ISA Host Controller. /// - EFI_PEI_ISA_HC_OPEN_IO OpenIoAperture; + EFI_PEI_ISA_HC_OPEN_IO OpenIoAperture; /// /// Closes an aperture on a positive-decode ISA Host Controller. /// - EFI_PEI_ISA_HC_CLOSE_IO CloseIoAperture; + EFI_PEI_ISA_HC_CLOSE_IO CloseIoAperture; }; -extern EFI_GUID gEfiIsaHcPpiGuid; +extern EFI_GUID gEfiIsaHcPpiGuid; #endif diff --git a/MdePkg/Include/Ppi/LoadFile.h b/MdePkg/Include/Ppi/LoadFile.h index baaa6c6..838e3fd 100644 --- a/MdePkg/Include/Ppi/LoadFile.h +++ b/MdePkg/Include/Ppi/LoadFile.h @@ -15,7 +15,6 @@ #define EFI_PEI_LOAD_FILE_PPI_GUID \ { 0xb9e0abfe, 0x5979, 0x4914, { 0x97, 0x7f, 0x6d, 0xee, 0x78, 0xc2, 0x78, 0xa6 } } - typedef struct _EFI_PEI_LOAD_FILE_PPI EFI_PEI_LOAD_FILE_PPI; /** @@ -55,7 +54,7 @@ EFI_STATUS OUT UINT64 *ImageSize, OUT EFI_PHYSICAL_ADDRESS *EntryPoint, OUT UINT32 *AuthenticationState -); + ); /// /// This PPI is a pointer to the Load File service. @@ -63,9 +62,9 @@ EFI_STATUS /// will use this service to launch the known PEI module images. /// struct _EFI_PEI_LOAD_FILE_PPI { - EFI_PEI_LOAD_FILE LoadFile; + EFI_PEI_LOAD_FILE LoadFile; }; -extern EFI_GUID gEfiPeiLoadFilePpiGuid; +extern EFI_GUID gEfiPeiLoadFilePpiGuid; #endif diff --git a/MdePkg/Include/Ppi/LoadImage.h b/MdePkg/Include/Ppi/LoadImage.h index f16133c..50bc472 100644 --- a/MdePkg/Include/Ppi/LoadImage.h +++ b/MdePkg/Include/Ppi/LoadImage.h @@ -16,8 +16,7 @@ #define EFI_PEI_LOADED_IMAGE_PPI_GUID \ { 0xc1fcd448, 0x6300, 0x4458, { 0xb8, 0x64, 0x28, 0xdf, 0x1, 0x53, 0x64, 0xbc } } - -typedef struct _EFI_PEI_LOADED_IMAGE_PPI EFI_PEI_LOADED_IMAGE_PPI; +typedef struct _EFI_PEI_LOADED_IMAGE_PPI EFI_PEI_LOADED_IMAGE_PPI; /// /// This interface is installed by the PEI Dispatcher after the image has been @@ -28,19 +27,18 @@ struct _EFI_PEI_LOADED_IMAGE_PPI { /// /// Address of the image at the address where it will be executed. /// - EFI_PHYSICAL_ADDRESS ImageAddress; + EFI_PHYSICAL_ADDRESS ImageAddress; /// /// Size of the image as it will be executed. /// - UINT64 ImageSize; + UINT64 ImageSize; /// /// File handle from which the image was loaded. /// Can be NULL, indicating the image was not loaded from a handle. /// - EFI_PEI_FILE_HANDLE FileHandle; + EFI_PEI_FILE_HANDLE FileHandle; }; - -extern EFI_GUID gEfiPeiLoadedImagePpiGuid; +extern EFI_GUID gEfiPeiLoadedImagePpiGuid; #endif diff --git a/MdePkg/Include/Ppi/MasterBootMode.h b/MdePkg/Include/Ppi/MasterBootMode.h index 7dd70a9..d21a023 100644 --- a/MdePkg/Include/Ppi/MasterBootMode.h +++ b/MdePkg/Include/Ppi/MasterBootMode.h @@ -21,6 +21,6 @@ 0x7408d748, 0xfc8c, 0x4ee6, {0x92, 0x88, 0xc4, 0xbe, 0xc0, 0x92, 0xa4, 0x10 } \ } -extern EFI_GUID gEfiPeiMasterBootModePpiGuid; +extern EFI_GUID gEfiPeiMasterBootModePpiGuid; #endif diff --git a/MdePkg/Include/Ppi/MemoryDiscovered.h b/MdePkg/Include/Ppi/MemoryDiscovered.h index ed9a565..a6f88c9 100644 --- a/MdePkg/Include/Ppi/MemoryDiscovered.h +++ b/MdePkg/Include/Ppi/MemoryDiscovered.h @@ -21,6 +21,6 @@ 0xf894643d, 0xc449, 0x42d1, {0x8e, 0xa8, 0x85, 0xbd, 0xd8, 0xc6, 0x5b, 0xde } \ } -extern EFI_GUID gEfiPeiMemoryDiscoveredPpiGuid; +extern EFI_GUID gEfiPeiMemoryDiscoveredPpiGuid; #endif diff --git a/MdePkg/Include/Ppi/MmAccess.h b/MdePkg/Include/Ppi/MmAccess.h index 636e728..ca8bdeb 100644 --- a/MdePkg/Include/Ppi/MmAccess.h +++ b/MdePkg/Include/Ppi/MmAccess.h @@ -23,7 +23,7 @@ #define EFI_PEI_MM_ACCESS_PPI_GUID \ { 0x268f33a9, 0xcccd, 0x48be, { 0x88, 0x17, 0x86, 0x5, 0x3a, 0xc3, 0x2e, 0xd6 }} -typedef struct _EFI_PEI_MM_ACCESS_PPI EFI_PEI_MM_ACCESS_PPI; +typedef struct _EFI_PEI_MM_ACCESS_PPI EFI_PEI_MM_ACCESS_PPI; /** Opens the MMRAM area to be accessible by a PEIM. @@ -142,14 +142,14 @@ EFI_STATUS /// memory controller would publish this PPI. /// struct _EFI_PEI_MM_ACCESS_PPI { - EFI_PEI_MM_OPEN Open; - EFI_PEI_MM_CLOSE Close; - EFI_PEI_MM_LOCK Lock; - EFI_PEI_MM_CAPABILITIES GetCapabilities; - BOOLEAN LockState; - BOOLEAN OpenState; + EFI_PEI_MM_OPEN Open; + EFI_PEI_MM_CLOSE Close; + EFI_PEI_MM_LOCK Lock; + EFI_PEI_MM_CAPABILITIES GetCapabilities; + BOOLEAN LockState; + BOOLEAN OpenState; }; -extern EFI_GUID gEfiPeiMmAccessPpiGuid; +extern EFI_GUID gEfiPeiMmAccessPpiGuid; #endif diff --git a/MdePkg/Include/Ppi/MmCommunication.h b/MdePkg/Include/Ppi/MmCommunication.h index 7e06da2..5f33396 100644 --- a/MdePkg/Include/Ppi/MmCommunication.h +++ b/MdePkg/Include/Ppi/MmCommunication.h @@ -11,7 +11,6 @@ **/ - #ifndef MM_COMMUNICATION_PPI_H_ #define MM_COMMUNICATION_PPI_H_ @@ -20,7 +19,7 @@ 0xae933e1c, 0xcc47, 0x4e38, { 0x8f, 0xe, 0xe2, 0xf6, 0x1d, 0x26, 0x5, 0xdf } \ } -typedef struct _EFI_PEI_MM_COMMUNICATION_PPI EFI_PEI_MM_COMMUNICATION_PPI; +typedef struct _EFI_PEI_MM_COMMUNICATION_PPI EFI_PEI_MM_COMMUNICATION_PPI; /** Communicates with a registered handler. @@ -64,9 +63,9 @@ EFI_STATUS /// MMI handler. /// struct _EFI_PEI_MM_COMMUNICATION_PPI { - EFI_PEI_MM_COMMUNICATE Communicate; + EFI_PEI_MM_COMMUNICATE Communicate; }; -extern EFI_GUID gEfiPeiMmCommunicationPpiGuid; +extern EFI_GUID gEfiPeiMmCommunicationPpiGuid; #endif diff --git a/MdePkg/Include/Ppi/MmConfiguration.h b/MdePkg/Include/Ppi/MmConfiguration.h index 862a80e..77d7622 100644 --- a/MdePkg/Include/Ppi/MmConfiguration.h +++ b/MdePkg/Include/Ppi/MmConfiguration.h @@ -21,7 +21,7 @@ 0xc109319, 0xc149, 0x450e, { 0xa3, 0xe3, 0xb9, 0xba, 0xdd, 0x9d, 0xc3, 0xa4 } \ } -typedef struct _EFI_PEI_MM_CONFIGURATION_PPI EFI_PEI_MM_CONFIGURATION_PPI; +typedef struct _EFI_PEI_MM_CONFIGURATION_PPI EFI_PEI_MM_CONFIGURATION_PPI; /** This function registers the MM Foundation entry point with the processor code. This entry point will be @@ -35,7 +35,7 @@ typedef struct _EFI_PEI_MM_CONFIGURATION_PPI EFI_PEI_MM_CONFIGURATION_PPI; **/ typedef EFI_STATUS -(EFIAPI *EFI_PEI_MM_REGISTER_MM_ENTRY) ( +(EFIAPI *EFI_PEI_MM_REGISTER_MM_ENTRY)( IN CONST EFI_PEI_MM_CONFIGURATION_PPI *This, IN EFI_MM_ENTRY_POINT MmEntryPoint ); @@ -53,10 +53,10 @@ EFI_STATUS /// MM entry vector code. /// struct _EFI_PEI_MM_CONFIGURATION_PPI { - EFI_MM_RESERVED_MMRAM_REGION *MmramReservedRegions; - EFI_PEI_MM_REGISTER_MM_ENTRY RegisterMmEntry; + EFI_MM_RESERVED_MMRAM_REGION *MmramReservedRegions; + EFI_PEI_MM_REGISTER_MM_ENTRY RegisterMmEntry; }; -extern EFI_GUID gEfiPeiMmConfigurationPpi; +extern EFI_GUID gEfiPeiMmConfigurationPpi; #endif diff --git a/MdePkg/Include/Ppi/MmControl.h b/MdePkg/Include/Ppi/MmControl.h index 17586f4..b7b8eaa 100644 --- a/MdePkg/Include/Ppi/MmControl.h +++ b/MdePkg/Include/Ppi/MmControl.h @@ -14,14 +14,13 @@ **/ - #ifndef _MM_CONTROL_PPI_H_ #define _MM_CONTROL_PPI_H_ #define EFI_PEI_MM_CONTROL_PPI_GUID \ { 0x61c68702, 0x4d7e, 0x4f43, 0x8d, 0xef, 0xa7, 0x43, 0x5, 0xce, 0x74, 0xc5 } -typedef struct _EFI_PEI_MM_CONTROL_PPI EFI_PEI_MM_CONTROL_PPI; +typedef struct _EFI_PEI_MM_CONTROL_PPI EFI_PEI_MM_CONTROL_PPI; /** Invokes PPI activation from the PI PEI environment. @@ -45,9 +44,9 @@ typedef struct _EFI_PEI_MM_CONTROL_PPI EFI_PEI_MM_CONTROL_PPI; **/ typedef EFI_STATUS -(EFIAPI *EFI_PEI_MM_ACTIVATE) ( +(EFIAPI *EFI_PEI_MM_ACTIVATE)( IN EFI_PEI_SERVICES **PeiServices, - IN EFI_PEI_MM_CONTROL_PPI * This, + IN EFI_PEI_MM_CONTROL_PPI *This, IN OUT INT8 *ArgumentBuffer OPTIONAL, IN OUT UINTN *ArgumentBufferSize OPTIONAL, IN BOOLEAN Periodic OPTIONAL, @@ -69,9 +68,9 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_PEI_MM_DEACTIVATE) ( +(EFIAPI *EFI_PEI_MM_DEACTIVATE)( IN EFI_PEI_SERVICES **PeiServices, - IN EFI_PEI_MM_CONTROL_PPI * This, + IN EFI_PEI_MM_CONTROL_PPI *This, IN BOOLEAN Periodic OPTIONAL ); @@ -81,10 +80,10 @@ EFI_STATUS /// generate the MMI. Also, the hardware optionally supports the periodic generation of these signals. /// struct _EFI_PEI_MM_CONTROL_PPI { - EFI_PEI_MM_ACTIVATE Trigger; - EFI_PEI_MM_DEACTIVATE Clear; + EFI_PEI_MM_ACTIVATE Trigger; + EFI_PEI_MM_DEACTIVATE Clear; }; -extern EFI_GUID gEfiPeiMmControlPpiGuid; +extern EFI_GUID gEfiPeiMmControlPpiGuid; #endif diff --git a/MdePkg/Include/Ppi/MpServices.h b/MdePkg/Include/Ppi/MpServices.h index 5ea3373..393362b 100644 --- a/MdePkg/Include/Ppi/MpServices.h +++ b/MdePkg/Include/Ppi/MpServices.h @@ -21,7 +21,7 @@ 0xee16160a, 0xe8be, 0x47a6, { 0x82, 0xa, 0xc6, 0x90, 0xd, 0xb0, 0x25, 0xa } \ } -typedef struct _EFI_PEI_MP_SERVICES_PPI EFI_PEI_MP_SERVICES_PPI ; +typedef struct _EFI_PEI_MP_SERVICES_PPI EFI_PEI_MP_SERVICES_PPI; /** Get the number of CPU's. @@ -42,7 +42,7 @@ typedef struct _EFI_PEI_MP_SERVICES_PPI EFI_PEI_MP_SERVICES_PPI ; **/ typedef EFI_STATUS -(EFIAPI *EFI_PEI_MP_SERVICES_GET_NUMBER_OF_PROCESSORS) ( +(EFIAPI *EFI_PEI_MP_SERVICES_GET_NUMBER_OF_PROCESSORS)( IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_MP_SERVICES_PPI *This, OUT UINTN *NumberOfProcessors, @@ -67,7 +67,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_PEI_MP_SERVICES_GET_PROCESSOR_INFO) ( +(EFIAPI *EFI_PEI_MP_SERVICES_GET_PROCESSOR_INFO)( IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_MP_SERVICES_PPI *This, IN UINTN ProcessorNumber, @@ -110,7 +110,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_PEI_MP_SERVICES_STARTUP_ALL_APS) ( +(EFIAPI *EFI_PEI_MP_SERVICES_STARTUP_ALL_APS)( IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_MP_SERVICES_PPI *This, IN EFI_AP_PROCEDURE Procedure, @@ -155,7 +155,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_PEI_MP_SERVICES_STARTUP_THIS_AP) ( +(EFIAPI *EFI_PEI_MP_SERVICES_STARTUP_THIS_AP)( IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_MP_SERVICES_PPI *This, IN EFI_AP_PROCEDURE Procedure, @@ -190,7 +190,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_PEI_MP_SERVICES_SWITCH_BSP) ( +(EFIAPI *EFI_PEI_MP_SERVICES_SWITCH_BSP)( IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_MP_SERVICES_PPI *This, IN UINTN ProcessorNumber, @@ -227,7 +227,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_PEI_MP_SERVICES_ENABLEDISABLEAP) ( +(EFIAPI *EFI_PEI_MP_SERVICES_ENABLEDISABLEAP)( IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_MP_SERVICES_PPI *This, IN UINTN ProcessorNumber, @@ -252,7 +252,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_PEI_MP_SERVICES_WHOAMI) ( +(EFIAPI *EFI_PEI_MP_SERVICES_WHOAMI)( IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_MP_SERVICES_PPI *This, OUT UINTN *ProcessorNumber @@ -263,15 +263,15 @@ EFI_STATUS /// handling multiprocessor support. /// struct _EFI_PEI_MP_SERVICES_PPI { - EFI_PEI_MP_SERVICES_GET_NUMBER_OF_PROCESSORS GetNumberOfProcessors; - EFI_PEI_MP_SERVICES_GET_PROCESSOR_INFO GetProcessorInfo; - EFI_PEI_MP_SERVICES_STARTUP_ALL_APS StartupAllAPs; - EFI_PEI_MP_SERVICES_STARTUP_THIS_AP StartupThisAP; - EFI_PEI_MP_SERVICES_SWITCH_BSP SwitchBSP; - EFI_PEI_MP_SERVICES_ENABLEDISABLEAP EnableDisableAP; - EFI_PEI_MP_SERVICES_WHOAMI WhoAmI; + EFI_PEI_MP_SERVICES_GET_NUMBER_OF_PROCESSORS GetNumberOfProcessors; + EFI_PEI_MP_SERVICES_GET_PROCESSOR_INFO GetProcessorInfo; + EFI_PEI_MP_SERVICES_STARTUP_ALL_APS StartupAllAPs; + EFI_PEI_MP_SERVICES_STARTUP_THIS_AP StartupThisAP; + EFI_PEI_MP_SERVICES_SWITCH_BSP SwitchBSP; + EFI_PEI_MP_SERVICES_ENABLEDISABLEAP EnableDisableAP; + EFI_PEI_MP_SERVICES_WHOAMI WhoAmI; }; -extern EFI_GUID gEfiPeiMpServicesPpiGuid; +extern EFI_GUID gEfiPeiMpServicesPpiGuid; #endif diff --git a/MdePkg/Include/Ppi/Pcd.h b/MdePkg/Include/Ppi/Pcd.h index ada27f7..d36a7f1 100644 --- a/MdePkg/Include/Ppi/Pcd.h +++ b/MdePkg/Include/Ppi/Pcd.h @@ -17,8 +17,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define PCD_PPI_GUID \ { 0x6e81c58, 0x4ad7, 0x44bc, { 0x83, 0x90, 0xf1, 0x2, 0x65, 0xf7, 0x24, 0x80 } } -#define PCD_INVALID_TOKEN_NUMBER ((UINTN) 0) - +#define PCD_INVALID_TOKEN_NUMBER ((UINTN) 0) /** Sets the SKU value for subsequent calls to set or get PCD token values. @@ -49,8 +48,6 @@ VOID IN UINTN SkuId ); - - /** Retrieves an 8-bit value for a given PCD token. @@ -68,8 +65,6 @@ UINT8 IN UINTN TokenNumber ); - - /** Retrieves a 16-bit value for a given PCD token. @@ -87,8 +82,6 @@ UINT16 IN UINTN TokenNumber ); - - /** Retrieves a 32-bit value for a given PCD token. @@ -106,8 +99,6 @@ UINT32 IN UINTN TokenNumber ); - - /** Retrieves a 64-bit value for a given PCD token. @@ -125,8 +116,6 @@ UINT64 IN UINTN TokenNumber ); - - /** Retrieves a pointer to a value for a given PCD token. @@ -146,8 +135,6 @@ VOID * IN UINTN TokenNumber ); - - /** Retrieves a Boolean value for a given PCD token. @@ -167,8 +154,6 @@ BOOLEAN IN UINTN TokenNumber ); - - /** Retrieves the size of the value for a given PCD token. @@ -186,8 +171,6 @@ UINTN IN UINTN TokenNumber ); - - /** Retrieves an 8-bit value for a given PCD token and token space. @@ -209,8 +192,6 @@ UINT8 IN UINTN TokenNumber ); - - /** Retrieves a 16-bit value for a given PCD token and token space. @@ -232,8 +213,6 @@ UINT16 IN UINTN TokenNumber ); - - /** Retrieves a 32-bit value for a given PCD token and token space. @@ -255,8 +234,6 @@ UINT32 IN UINTN TokenNumber ); - - /** Retrieves a 64-bit value for a given PCD token and token space. @@ -278,8 +255,6 @@ UINT64 IN UINTN TokenNumber ); - - /** Retrieves a pointer to a value for a given PCD token and token space. @@ -301,8 +276,6 @@ VOID * IN UINTN TokenNumber ); - - /** Retrieves an Boolean value for a given PCD token and token space. @@ -324,8 +297,6 @@ BOOLEAN IN UINTN TokenNumber ); - - /** Retrieves the size of the value for a given PCD token and token space. @@ -345,8 +316,6 @@ UINTN IN UINTN TokenNumber ); - - /** Sets an 8-bit value for a given PCD token. @@ -371,8 +340,6 @@ EFI_STATUS IN UINT8 Value ); - - /** Sets a 16-bit value for a given PCD token. @@ -397,8 +364,6 @@ EFI_STATUS IN UINT16 Value ); - - /** Sets a 32-bit value for a given PCD token. @@ -423,8 +388,6 @@ EFI_STATUS IN UINT32 Value ); - - /** Sets a 64-bit value for a given PCD token. @@ -502,8 +465,6 @@ EFI_STATUS IN BOOLEAN Value ); - - /** Sets an 8-bit value for a given PCD token. @@ -530,8 +491,6 @@ EFI_STATUS IN UINT8 Value ); - - /** Sets a 16-bit value for a given PCD token. @@ -558,8 +517,6 @@ EFI_STATUS IN UINT16 Value ); - - /** Sets a 32-bit value for a given PCD token. @@ -586,8 +543,6 @@ EFI_STATUS IN UINT32 Value ); - - /** Sets a 64-bit value for a given PCD token. @@ -614,8 +569,6 @@ EFI_STATUS IN UINT64 Value ); - - /** Sets a value of a specified size for a given PCD token. @@ -673,8 +626,6 @@ EFI_STATUS IN BOOLEAN Value ); - - /** Callback on SET function prototype definition. @@ -702,8 +653,6 @@ VOID IN UINTN TokenDataSize ); - - /** Specifies a function to be called anytime the value of a designated token is changed. @@ -724,8 +673,6 @@ EFI_STATUS IN PCD_PPI_CALLBACK CallBackFunction ); - - /** Cancels a previously set callback function for a particular PCD token number. @@ -746,8 +693,6 @@ EFI_STATUS IN PCD_PPI_CALLBACK CallBackFunction ); - - /** Retrieves the next valid token number in a given namespace. @@ -780,8 +725,6 @@ EFI_STATUS IN OUT UINTN *TokenNumber ); - - /** Retrieves the next valid PCD token namespace for a given namespace. @@ -804,51 +747,48 @@ EFI_STATUS IN OUT CONST EFI_GUID **Guid ); - - /// /// This service abstracts the ability to set/get Platform Configuration Database (PCD). /// typedef struct { - PCD_PPI_SET_SKU SetSku; - - PCD_PPI_GET8 Get8; - PCD_PPI_GET16 Get16; - PCD_PPI_GET32 Get32; - PCD_PPI_GET64 Get64; - PCD_PPI_GET_POINTER GetPtr; - PCD_PPI_GET_BOOLEAN GetBool; - PCD_PPI_GET_SIZE GetSize; - - PCD_PPI_GET_EX_8 Get8Ex; - PCD_PPI_GET_EX_16 Get16Ex; - PCD_PPI_GET_EX_32 Get32Ex; - PCD_PPI_GET_EX_64 Get64Ex; - PCD_PPI_GET_EX_POINTER GetPtrEx; - PCD_PPI_GET_EX_BOOLEAN GetBoolEx; - PCD_PPI_GET_EX_SIZE GetSizeEx; - - PCD_PPI_SET8 Set8; - PCD_PPI_SET16 Set16; - PCD_PPI_SET32 Set32; - PCD_PPI_SET64 Set64; - PCD_PPI_SET_POINTER SetPtr; - PCD_PPI_SET_BOOLEAN SetBool; - - PCD_PPI_SET_EX_8 Set8Ex; - PCD_PPI_SET_EX_16 Set16Ex; - PCD_PPI_SET_EX_32 Set32Ex; - PCD_PPI_SET_EX_64 Set64Ex; - PCD_PPI_SET_EX_POINTER SetPtrEx; - PCD_PPI_SET_EX_BOOLEAN SetBoolEx; - - PCD_PPI_CALLBACK_ONSET CallbackOnSet; - PCD_PPI_CANCEL_CALLBACK CancelCallback; - PCD_PPI_GET_NEXT_TOKEN GetNextToken; - PCD_PPI_GET_NEXT_TOKENSPACE GetNextTokenSpace; + PCD_PPI_SET_SKU SetSku; + + PCD_PPI_GET8 Get8; + PCD_PPI_GET16 Get16; + PCD_PPI_GET32 Get32; + PCD_PPI_GET64 Get64; + PCD_PPI_GET_POINTER GetPtr; + PCD_PPI_GET_BOOLEAN GetBool; + PCD_PPI_GET_SIZE GetSize; + + PCD_PPI_GET_EX_8 Get8Ex; + PCD_PPI_GET_EX_16 Get16Ex; + PCD_PPI_GET_EX_32 Get32Ex; + PCD_PPI_GET_EX_64 Get64Ex; + PCD_PPI_GET_EX_POINTER GetPtrEx; + PCD_PPI_GET_EX_BOOLEAN GetBoolEx; + PCD_PPI_GET_EX_SIZE GetSizeEx; + + PCD_PPI_SET8 Set8; + PCD_PPI_SET16 Set16; + PCD_PPI_SET32 Set32; + PCD_PPI_SET64 Set64; + PCD_PPI_SET_POINTER SetPtr; + PCD_PPI_SET_BOOLEAN SetBool; + + PCD_PPI_SET_EX_8 Set8Ex; + PCD_PPI_SET_EX_16 Set16Ex; + PCD_PPI_SET_EX_32 Set32Ex; + PCD_PPI_SET_EX_64 Set64Ex; + PCD_PPI_SET_EX_POINTER SetPtrEx; + PCD_PPI_SET_EX_BOOLEAN SetBoolEx; + + PCD_PPI_CALLBACK_ONSET CallbackOnSet; + PCD_PPI_CANCEL_CALLBACK CancelCallback; + PCD_PPI_GET_NEXT_TOKEN GetNextToken; + PCD_PPI_GET_NEXT_TOKENSPACE GetNextTokenSpace; } PCD_PPI; - -extern EFI_GUID gPcdPpiGuid; +extern EFI_GUID gPcdPpiGuid; #endif diff --git a/MdePkg/Include/Ppi/PcdInfo.h b/MdePkg/Include/Ppi/PcdInfo.h index aa3135c..c9d3f74 100644 --- a/MdePkg/Include/Ppi/PcdInfo.h +++ b/MdePkg/Include/Ppi/PcdInfo.h @@ -16,7 +16,7 @@ #ifndef __PCD_INFO_PPI_H__ #define __PCD_INFO_PPI_H__ -extern EFI_GUID gGetPcdInfoPpiGuid; +extern EFI_GUID gGetPcdInfoPpiGuid; #define GET_PCD_INFO_PPI_GUID \ { 0x4d8b155b, 0xc059, 0x4c8f, { 0x89, 0x26, 0x6, 0xfd, 0x43, 0x31, 0xdb, 0x8a } } @@ -24,7 +24,7 @@ extern EFI_GUID gGetPcdInfoPpiGuid; /// /// The forward declaration for GET_PCD_INFO_PPI. /// -typedef struct _GET_PCD_INFO_PPI GET_PCD_INFO_PPI; +typedef struct _GET_PCD_INFO_PPI GET_PCD_INFO_PPI; /** Retrieve additional information associated with a PCD token in the default token space. @@ -40,10 +40,10 @@ typedef struct _GET_PCD_INFO_PPI GET_PCD_INFO_PPI; **/ typedef EFI_STATUS -(EFIAPI *GET_PCD_INFO_PPI_GET_INFO) ( +(EFIAPI *GET_PCD_INFO_PPI_GET_INFO)( IN UINTN TokenNumber, OUT EFI_PCD_INFO *PcdInfo -); + ); /** Retrieve additional information associated with a PCD token. @@ -60,11 +60,11 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *GET_PCD_INFO_PPI_GET_INFO_EX) ( +(EFIAPI *GET_PCD_INFO_PPI_GET_INFO_EX)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber, OUT EFI_PCD_INFO *PcdInfo -); + ); /** Retrieve the currently set SKU Id. @@ -75,9 +75,9 @@ EFI_STATUS **/ typedef UINTN -(EFIAPI *GET_PCD_INFO_PPI_GET_SKU) ( +(EFIAPI *GET_PCD_INFO_PPI_GET_SKU)( VOID -); + ); /// /// This is the PCD service to use when querying for some additional data that can be contained in the @@ -87,13 +87,12 @@ struct _GET_PCD_INFO_PPI { /// /// Retrieve additional information associated with a PCD. /// - GET_PCD_INFO_PPI_GET_INFO GetInfo; - GET_PCD_INFO_PPI_GET_INFO_EX GetInfoEx; + GET_PCD_INFO_PPI_GET_INFO GetInfo; + GET_PCD_INFO_PPI_GET_INFO_EX GetInfoEx; /// /// Retrieve the currently set SKU Id. /// - GET_PCD_INFO_PPI_GET_SKU GetSku; + GET_PCD_INFO_PPI_GET_SKU GetSku; }; #endif - diff --git a/MdePkg/Include/Ppi/PciCfg2.h b/MdePkg/Include/Ppi/PciCfg2.h index 8633222..451796f 100644 --- a/MdePkg/Include/Ppi/PciCfg2.h +++ b/MdePkg/Include/Ppi/PciCfg2.h @@ -20,9 +20,9 @@ #define EFI_PEI_PCI_CFG2_PPI_GUID \ { 0x57a449a, 0x1fdc, 0x4c06, { 0xbf, 0xc9, 0xf5, 0x3f, 0x6a, 0x99, 0xbb, 0x92 } } -typedef struct _EFI_PEI_PCI_CFG2_PPI EFI_PEI_PCI_CFG2_PPI; +typedef struct _EFI_PEI_PCI_CFG2_PPI EFI_PEI_PCI_CFG2_PPI; -#define EFI_PEI_PCI_CFG_ADDRESS(bus,dev,func,reg) \ +#define EFI_PEI_PCI_CFG_ADDRESS(bus, dev, func, reg) \ (UINT64) ( \ (((UINTN) bus) << 24) | \ (((UINTN) dev) << 16) | \ @@ -36,7 +36,7 @@ typedef enum { /// /// 8-bit access /// - EfiPeiPciCfgWidthUint8 = 0, + EfiPeiPciCfgWidthUint8 = 0, /// /// 16-bit access /// @@ -60,26 +60,26 @@ typedef struct { /// 8-bit register offset within the PCI configuration space for a given device's function /// space. /// - UINT8 Register; + UINT8 Register; /// /// Only the 3 least-significant bits are used to encode one of 8 possible functions within a /// given device. /// - UINT8 Function; + UINT8 Function; /// /// Only the 5 least-significant bits are used to encode one of 32 possible devices. /// - UINT8 Device; + UINT8 Device; /// /// 8-bit value to encode between 0 and 255 buses. /// - UINT8 Bus; + UINT8 Bus; /// /// Register number in PCI configuration space. If this field is zero, then Register is used /// for the register number. If this field is non-zero, then Register is ignored and this field /// is used for the register number. /// - UINT32 ExtendedRegister; + UINT32 ExtendedRegister; } EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS; /** @@ -114,8 +114,7 @@ EFI_STATUS IN EFI_PEI_PCI_CFG_PPI_WIDTH Width, IN UINT64 Address, IN OUT VOID *Buffer -); - + ); /** Performs a read-modify-write operation on the contents @@ -156,23 +155,22 @@ EFI_STATUS IN UINT64 Address, IN VOID *SetBits, IN VOID *ClearBits -); + ); /// /// The EFI_PEI_PCI_CFG_PPI interfaces are used to abstract accesses to PCI /// controllers behind a PCI root bridge controller. /// struct _EFI_PEI_PCI_CFG2_PPI { - EFI_PEI_PCI_CFG2_PPI_IO Read; - EFI_PEI_PCI_CFG2_PPI_IO Write; - EFI_PEI_PCI_CFG2_PPI_RW Modify; + EFI_PEI_PCI_CFG2_PPI_IO Read; + EFI_PEI_PCI_CFG2_PPI_IO Write; + EFI_PEI_PCI_CFG2_PPI_RW Modify; /// /// The PCI bus segment which the specified functions will access. /// - UINT16 Segment; + UINT16 Segment; }; - -extern EFI_GUID gEfiPciCfg2PpiGuid; +extern EFI_GUID gEfiPciCfg2PpiGuid; #endif diff --git a/MdePkg/Include/Ppi/PeiCoreFvLocation.h b/MdePkg/Include/Ppi/PeiCoreFvLocation.h index 481e8f4..e0a7e48 100644 --- a/MdePkg/Include/Ppi/PeiCoreFvLocation.h +++ b/MdePkg/Include/Ppi/PeiCoreFvLocation.h @@ -15,7 +15,6 @@ **/ - #ifndef _EFI_PEI_CORE_FV_LOCATION_H_ #define _EFI_PEI_CORE_FV_LOCATION_H_ @@ -37,6 +36,6 @@ typedef struct { VOID *PeiCoreFvLocation; } EFI_PEI_CORE_FV_LOCATION_PPI; -extern EFI_GUID gEfiPeiCoreFvLocationPpiGuid; +extern EFI_GUID gEfiPeiCoreFvLocationPpiGuid; #endif // _EFI_PEI_CORE_FV_LOCATION_H_ diff --git a/MdePkg/Include/Ppi/PiPcd.h b/MdePkg/Include/Ppi/PiPcd.h index 5caefc2..8d0f95e 100644 --- a/MdePkg/Include/Ppi/PiPcd.h +++ b/MdePkg/Include/Ppi/PiPcd.h @@ -21,12 +21,12 @@ #ifndef __PI_PCD_PPI_H__ #define __PI_PCD_PPI_H__ -extern EFI_GUID gEfiPeiPcdPpiGuid; +extern EFI_GUID gEfiPeiPcdPpiGuid; #define EFI_PEI_PCD_PPI_GUID \ { 0x1f34d25, 0x4de2, 0x23ad, { 0x3f, 0xf3, 0x36, 0x35, 0x3f, 0xf3, 0x23, 0xf1 } } -#define EFI_PCD_INVALID_TOKEN_NUMBER ((UINTN) 0) +#define EFI_PCD_INVALID_TOKEN_NUMBER ((UINTN) 0) /** SetSku() sets the SKU Id to be used for subsequent calls to set or get PCD values. SetSku() is @@ -47,7 +47,7 @@ typedef VOID (EFIAPI *EFI_PEI_PCD_PPI_SET_SKU)( IN UINTN SkuId -); + ); /** Retrieves the current byte-sized value for a PCD token number. If the TokenNumber is invalid, @@ -63,7 +63,7 @@ UINT8 (EFIAPI *EFI_PEI_PCD_PPI_GET_8)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber -); + ); /** Retrieves the current word-sized value for a PCD token number. If the TokenNumber is invalid, @@ -79,7 +79,7 @@ UINT16 (EFIAPI *EFI_PEI_PCD_PPI_GET_16)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber -); + ); /** Retrieves the current 32-bit value for a PCD token number. If the TokenNumber is invalid, the @@ -95,7 +95,7 @@ UINT32 (EFIAPI *EFI_PEI_PCD_PPI_GET_32)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber -); + ); /** Retrieves the current 64-bit value for a PCD token number. If the TokenNumber is invalid, the @@ -111,7 +111,7 @@ UINT64 (EFIAPI *EFI_PEI_PCD_PPI_GET_64)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber -); + ); /** Retrieves the current pointer to the value for a PCD token number. There should not be any @@ -126,7 +126,7 @@ VOID * (EFIAPI *EFI_PEI_PCD_PPI_GET_POINTER)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber -); + ); /** Retrieves the current Boolean-sized value for a PCD token number. If the TokenNumber is @@ -142,7 +142,7 @@ BOOLEAN (EFIAPI *EFI_PEI_PCD_PPI_GET_BOOLEAN)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber -); + ); /** Retrieves the current size of a particular PCD token. If the TokenNumber is invalid, the results are @@ -158,7 +158,7 @@ UINTN (EFIAPI *EFI_PEI_PCD_PPI_GET_SIZE)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber -); + ); /** Sets an 8-bit value for a given PCD token. @@ -182,7 +182,7 @@ EFI_STATUS IN CONST EFI_GUID *Guid, IN UINTN TokenNumber, IN UINT8 Value -); + ); /** Sets an 16-bit value for a given PCD token. @@ -206,7 +206,7 @@ EFI_STATUS IN CONST EFI_GUID *Guid, IN UINTN TokenNumber, IN UINT16 Value -); + ); /** Sets an 32-bit value for a given PCD token. @@ -230,7 +230,7 @@ EFI_STATUS IN CONST EFI_GUID *Guid, IN UINTN TokenNumber, IN UINT32 Value -); + ); /** Sets an 64-bit value for a given PCD token. @@ -254,7 +254,7 @@ EFI_STATUS IN CONST EFI_GUID *Guid, IN UINTN TokenNumber, IN UINT64 Value -); + ); /** Sets a value of the specified size for a given PCD token. @@ -282,7 +282,7 @@ EFI_STATUS IN UINTN TokenNumber, IN OUT UINTN *SizeOfValue, IN VOID *Buffer -); + ); /** Sets a Boolean value for a given PCD token. @@ -306,7 +306,7 @@ EFI_STATUS IN CONST EFI_GUID *Guid, IN UINTN TokenNumber, IN BOOLEAN Value -); + ); typedef VOID @@ -315,7 +315,7 @@ VOID IN UINTN CallBackToken, IN OUT VOID *TokenData, IN UINTN TokenDatSize -); + ); /** Specifies a function to be called anytime the value of a designated token is changed. @@ -336,7 +336,7 @@ EFI_STATUS IN CONST EFI_GUID *Guid OPTIONAL, IN UINTN CallBackToken, IN EFI_PEI_PCD_PPI_CALLBACK CallBackFunction -); + ); /** Cancels a previously set callback function for a particular PCD token number. @@ -358,7 +358,7 @@ EFI_STATUS IN CONST EFI_GUID *Guid OPTIONAL, IN UINTN CallBackToken, IN EFI_PEI_PCD_PPI_CALLBACK CallBackFunction -); + ); /** Retrieves the next valid PCD token for a given namespace. @@ -379,7 +379,7 @@ EFI_STATUS (EFIAPI *EFI_PEI_PCD_PPI_GET_NEXT_TOKEN)( IN CONST EFI_GUID *Guid OPTIONAL, IN UINTN *TokenNumber -); + ); /** Retrieves the next valid PCD token namespace for a given namespace. @@ -400,27 +400,27 @@ typedef EFI_STATUS (EFIAPI *EFI_PEI_PCD_PPI_GET_NEXT_TOKEN_SPACE)( IN OUT CONST EFI_GUID **Guid -); + ); typedef struct { - EFI_PEI_PCD_PPI_SET_SKU SetSku; - EFI_PEI_PCD_PPI_GET_8 Get8; - EFI_PEI_PCD_PPI_GET_16 Get16; - EFI_PEI_PCD_PPI_GET_32 Get32; - EFI_PEI_PCD_PPI_GET_64 Get64; - EFI_PEI_PCD_PPI_GET_POINTER GetPtr; - EFI_PEI_PCD_PPI_GET_BOOLEAN GetBool; - EFI_PEI_PCD_PPI_GET_SIZE GetSize; - EFI_PEI_PCD_PPI_SET_8 Set8; - EFI_PEI_PCD_PPI_SET_16 Set16; - EFI_PEI_PCD_PPI_SET_32 Set32; - EFI_PEI_PCD_PPI_SET_64 Set64; - EFI_PEI_PCD_PPI_SET_POINTER SetPtr; - EFI_PEI_PCD_PPI_SET_BOOLEAN SetBool; - EFI_PEI_PCD_PPI_CALLBACK_ON_SET CallbackOnSet; - EFI_PEI_PCD_PPI_CANCEL_CALLBACK CancelCallback; - EFI_PEI_PCD_PPI_GET_NEXT_TOKEN GetNextToken; - EFI_PEI_PCD_PPI_GET_NEXT_TOKEN_SPACE GetNextTokenSpace; + EFI_PEI_PCD_PPI_SET_SKU SetSku; + EFI_PEI_PCD_PPI_GET_8 Get8; + EFI_PEI_PCD_PPI_GET_16 Get16; + EFI_PEI_PCD_PPI_GET_32 Get32; + EFI_PEI_PCD_PPI_GET_64 Get64; + EFI_PEI_PCD_PPI_GET_POINTER GetPtr; + EFI_PEI_PCD_PPI_GET_BOOLEAN GetBool; + EFI_PEI_PCD_PPI_GET_SIZE GetSize; + EFI_PEI_PCD_PPI_SET_8 Set8; + EFI_PEI_PCD_PPI_SET_16 Set16; + EFI_PEI_PCD_PPI_SET_32 Set32; + EFI_PEI_PCD_PPI_SET_64 Set64; + EFI_PEI_PCD_PPI_SET_POINTER SetPtr; + EFI_PEI_PCD_PPI_SET_BOOLEAN SetBool; + EFI_PEI_PCD_PPI_CALLBACK_ON_SET CallbackOnSet; + EFI_PEI_PCD_PPI_CANCEL_CALLBACK CancelCallback; + EFI_PEI_PCD_PPI_GET_NEXT_TOKEN GetNextToken; + EFI_PEI_PCD_PPI_GET_NEXT_TOKEN_SPACE GetNextTokenSpace; } EFI_PEI_PCD_PPI; #endif diff --git a/MdePkg/Include/Ppi/PiPcdInfo.h b/MdePkg/Include/Ppi/PiPcdInfo.h index dde0577..45b9306 100644 --- a/MdePkg/Include/Ppi/PiPcdInfo.h +++ b/MdePkg/Include/Ppi/PiPcdInfo.h @@ -13,7 +13,7 @@ #ifndef __PI_PCD_INFO_PPI_H__ #define __PI_PCD_INFO_PPI_H__ -extern EFI_GUID gEfiGetPcdInfoPpiGuid; +extern EFI_GUID gEfiGetPcdInfoPpiGuid; #define EFI_GET_PCD_INFO_PPI_GUID \ { 0xa60c6b59, 0xe459, 0x425d, { 0x9c, 0x69, 0xb, 0xcc, 0x9c, 0xb2, 0x7d, 0x81 } } @@ -21,7 +21,7 @@ extern EFI_GUID gEfiGetPcdInfoPpiGuid; /// /// The forward declaration for EFI_GET_PCD_INFO_PPI. /// -typedef struct _EFI_GET_PCD_INFO_PPI EFI_GET_PCD_INFO_PPI; +typedef struct _EFI_GET_PCD_INFO_PPI EFI_GET_PCD_INFO_PPI; /** Retrieve additional information associated with a PCD token. @@ -38,11 +38,11 @@ typedef struct _EFI_GET_PCD_INFO_PPI EFI_GET_PCD_INFO_PPI; **/ typedef EFI_STATUS -(EFIAPI *EFI_GET_PCD_INFO_PPI_GET_INFO) ( +(EFIAPI *EFI_GET_PCD_INFO_PPI_GET_INFO)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber, OUT EFI_PCD_INFO *PcdInfo -); + ); /** Retrieve the currently set SKU Id. @@ -53,9 +53,9 @@ EFI_STATUS **/ typedef UINTN -(EFIAPI *EFI_GET_PCD_INFO_PPI_GET_SKU) ( +(EFIAPI *EFI_GET_PCD_INFO_PPI_GET_SKU)( VOID -); + ); /// /// This is the PCD service to use when querying for some additional data that can be contained in the @@ -65,12 +65,11 @@ struct _EFI_GET_PCD_INFO_PPI { /// /// Retrieve additional information associated with a PCD. /// - EFI_GET_PCD_INFO_PPI_GET_INFO GetInfo; + EFI_GET_PCD_INFO_PPI_GET_INFO GetInfo; /// /// Retrieve the currently set SKU Id. /// - EFI_GET_PCD_INFO_PPI_GET_SKU GetSku; + EFI_GET_PCD_INFO_PPI_GET_SKU GetSku; }; #endif - diff --git a/MdePkg/Include/Ppi/ReadOnlyVariable2.h b/MdePkg/Include/Ppi/ReadOnlyVariable2.h index 0d7bbc5..926c0bc 100644 --- a/MdePkg/Include/Ppi/ReadOnlyVariable2.h +++ b/MdePkg/Include/Ppi/ReadOnlyVariable2.h @@ -16,8 +16,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define EFI_PEI_READ_ONLY_VARIABLE2_PPI_GUID \ { 0x2ab86ef5, 0xecb5, 0x4134, { 0xb5, 0x56, 0x38, 0x54, 0xca, 0x1f, 0xe1, 0xb4 } } - -typedef struct _EFI_PEI_READ_ONLY_VARIABLE2_PPI EFI_PEI_READ_ONLY_VARIABLE2_PPI; +typedef struct _EFI_PEI_READ_ONLY_VARIABLE2_PPI EFI_PEI_READ_ONLY_VARIABLE2_PPI; /** This service retrieves a variable's value using its name and GUID. @@ -57,7 +56,6 @@ EFI_STATUS OUT VOID *Data OPTIONAL ); - /** Return the next variable name and GUID. @@ -102,10 +100,10 @@ EFI_STATUS /// variable services. /// struct _EFI_PEI_READ_ONLY_VARIABLE2_PPI { - EFI_PEI_GET_VARIABLE2 GetVariable; - EFI_PEI_GET_NEXT_VARIABLE_NAME2 NextVariableName; + EFI_PEI_GET_VARIABLE2 GetVariable; + EFI_PEI_GET_NEXT_VARIABLE_NAME2 NextVariableName; }; -extern EFI_GUID gEfiPeiReadOnlyVariable2PpiGuid; +extern EFI_GUID gEfiPeiReadOnlyVariable2PpiGuid; #endif diff --git a/MdePkg/Include/Ppi/RecoveryModule.h b/MdePkg/Include/Ppi/RecoveryModule.h index 6de9378..ffd2e24 100644 --- a/MdePkg/Include/Ppi/RecoveryModule.h +++ b/MdePkg/Include/Ppi/RecoveryModule.h @@ -73,9 +73,9 @@ EFI_STATUS /// Finds and loads the recovery files. /// struct _EFI_PEI_RECOVERY_MODULE_PPI { - EFI_PEI_LOAD_RECOVERY_CAPSULE LoadRecoveryCapsule; ///< Loads a DXE binary capsule into memory. + EFI_PEI_LOAD_RECOVERY_CAPSULE LoadRecoveryCapsule; ///< Loads a DXE binary capsule into memory. }; -extern EFI_GUID gEfiPeiRecoveryModulePpiGuid; +extern EFI_GUID gEfiPeiRecoveryModulePpiGuid; #endif diff --git a/MdePkg/Include/Ppi/ReportStatusCodeHandler.h b/MdePkg/Include/Ppi/ReportStatusCodeHandler.h index 5dfb705..e469fc9 100644 --- a/MdePkg/Include/Ppi/ReportStatusCodeHandler.h +++ b/MdePkg/Include/Ppi/ReportStatusCodeHandler.h @@ -23,7 +23,7 @@ EFI_STATUS IN UINT32 Instance, IN CONST EFI_GUID *CallerId, IN CONST EFI_STATUS_CODE_DATA *Data -); + ); /** Register the callback function for ReportStatusCode() notification. @@ -45,7 +45,7 @@ typedef EFI_STATUS (EFIAPI *EFI_PEI_RSC_HANDLER_REGISTER)( IN EFI_PEI_RSC_HANDLER_CALLBACK Callback -); + ); /** Remove a previously registered callback function from the notification list. @@ -64,13 +64,13 @@ typedef EFI_STATUS (EFIAPI *EFI_PEI_RSC_HANDLER_UNREGISTER)( IN EFI_PEI_RSC_HANDLER_CALLBACK Callback -); + ); typedef struct _EFI_PEI_RSC_HANDLER_PPI { - EFI_PEI_RSC_HANDLER_REGISTER Register; - EFI_PEI_RSC_HANDLER_UNREGISTER Unregister; + EFI_PEI_RSC_HANDLER_REGISTER Register; + EFI_PEI_RSC_HANDLER_UNREGISTER Unregister; } EFI_PEI_RSC_HANDLER_PPI; -extern EFI_GUID gEfiPeiRscHandlerPpiGuid; +extern EFI_GUID gEfiPeiRscHandlerPpiGuid; #endif // __REPORT_STATUS_CODE_HANDLER_PPI_H__ diff --git a/MdePkg/Include/Ppi/Reset.h b/MdePkg/Include/Ppi/Reset.h index 9e3c890..4d88d9b 100644 --- a/MdePkg/Include/Ppi/Reset.h +++ b/MdePkg/Include/Ppi/Reset.h @@ -30,9 +30,9 @@ /// This PPI provides provide a simple reset service. /// typedef struct { - EFI_PEI_RESET_SYSTEM ResetSystem; + EFI_PEI_RESET_SYSTEM ResetSystem; } EFI_PEI_RESET_PPI; -extern EFI_GUID gEfiPeiResetPpiGuid; +extern EFI_GUID gEfiPeiResetPpiGuid; #endif diff --git a/MdePkg/Include/Ppi/Reset2.h b/MdePkg/Include/Ppi/Reset2.h index e6d4ffa..4559bb9 100644 --- a/MdePkg/Include/Ppi/Reset2.h +++ b/MdePkg/Include/Ppi/Reset2.h @@ -24,9 +24,9 @@ /// This PPI provides provide a simple reset service. /// typedef struct _EFI_PEI_RESET2_PPI { - EFI_PEI_RESET2_SYSTEM ResetSystem; + EFI_PEI_RESET2_SYSTEM ResetSystem; } EFI_PEI_RESET2_PPI; -extern EFI_GUID gEfiPeiReset2PpiGuid; +extern EFI_GUID gEfiPeiReset2PpiGuid; #endif diff --git a/MdePkg/Include/Ppi/S3Resume2.h b/MdePkg/Include/Ppi/S3Resume2.h index daa8559..f994440 100644 --- a/MdePkg/Include/Ppi/S3Resume2.h +++ b/MdePkg/Include/Ppi/S3Resume2.h @@ -30,7 +30,7 @@ /// /// Forward declaration for EFI_PEI_S3_RESUME_PPI /// -typedef struct _EFI_PEI_S3_RESUME2_PPI EFI_PEI_S3_RESUME2_PPI; +typedef struct _EFI_PEI_S3_RESUME2_PPI EFI_PEI_S3_RESUME2_PPI; /** Restores the platform to its preboot configuration for an S3 resume and @@ -78,9 +78,9 @@ struct _EFI_PEI_S3_RESUME2_PPI { /// Restores the platform to its preboot configuration for an S3 resume and /// jumps to the OS waking vector. /// - EFI_PEI_S3_RESUME_PPI_RESTORE_CONFIG2 S3RestoreConfig2; + EFI_PEI_S3_RESUME_PPI_RESTORE_CONFIG2 S3RestoreConfig2; }; -extern EFI_GUID gEfiPeiS3Resume2PpiGuid; +extern EFI_GUID gEfiPeiS3Resume2PpiGuid; #endif diff --git a/MdePkg/Include/Ppi/SecHobData.h b/MdePkg/Include/Ppi/SecHobData.h index ece41cf..3413ea9 100644 --- a/MdePkg/Include/Ppi/SecHobData.h +++ b/MdePkg/Include/Ppi/SecHobData.h @@ -42,18 +42,18 @@ typedef struct _EFI_SEC_HOB_DATA_PPI EFI_SEC_HOB_DATA_PPI; **/ typedef EFI_STATUS -(EFIAPI *EFI_SEC_HOB_DATA_GET) ( +(EFIAPI *EFI_SEC_HOB_DATA_GET)( IN CONST EFI_SEC_HOB_DATA_PPI *This, OUT EFI_HOB_GENERIC_HEADER **HobList -); + ); /// /// This PPI provides a way for the SEC code to pass zero or more HOBs in a HOB list. /// struct _EFI_SEC_HOB_DATA_PPI { - EFI_SEC_HOB_DATA_GET GetHobs; + EFI_SEC_HOB_DATA_GET GetHobs; }; -extern EFI_GUID gEfiSecHobDataPpiGuid; +extern EFI_GUID gEfiSecHobDataPpiGuid; #endif diff --git a/MdePkg/Include/Ppi/SecPlatformInformation.h b/MdePkg/Include/Ppi/SecPlatformInformation.h index b7f8ac0..02b0711 100644 --- a/MdePkg/Include/Ppi/SecPlatformInformation.h +++ b/MdePkg/Include/Ppi/SecPlatformInformation.h @@ -26,7 +26,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent typedef struct _EFI_SEC_PLATFORM_INFORMATION_PPI EFI_SEC_PLATFORM_INFORMATION_PPI; - /// /// EFI_HEALTH_FLAGS /// Contains information generated by microcode, hardware, and/or the Itanium @@ -37,32 +36,32 @@ typedef union { /// /// A 2-bit field indicating self-test state after reset. /// - UINT32 Status : 2; + UINT32 Status : 2; /// /// A 1-bit field indicating whether testing has occurred. /// If this field is zero, the processor has not been tested, /// and no further fields in the self-test State parameter are valid. /// - UINT32 Tested : 1; + UINT32 Tested : 1; /// /// Reserved 13 bits. /// - UINT32 Reserved1 :13; + UINT32 Reserved1 : 13; /// /// A 1-bit field. If set to 1, this indicates that virtual /// memory features are not available. /// - UINT32 VirtualMemoryUnavailable : 1; + UINT32 VirtualMemoryUnavailable : 1; /// /// A 1-bit field. If set to 1, this indicates that IA-32 execution /// is not available. /// - UINT32 Ia32ExecutionUnavailable : 1; + UINT32 Ia32ExecutionUnavailable : 1; /// /// A 1-bit field. If set to 1, this indicates that the floating /// point unit is not available. /// - UINT32 FloatingPointUnavailable : 1; + UINT32 FloatingPointUnavailable : 1; /// /// A 1-bit field. If set to 1, this indicates miscellaneous /// functional failure other than vm, ia, or fp. @@ -71,17 +70,17 @@ typedef union { /// performance restricted or functionally restricted. /// The value returned is implementation dependent. /// - UINT32 MiscFeaturesUnavailable : 1; + UINT32 MiscFeaturesUnavailable : 1; /// /// Reserved 12 bits. /// - UINT32 Reserved2 :12; + UINT32 Reserved2 : 12; } Bits; - UINT32 Uint32; + UINT32 Uint32; } EFI_HEALTH_FLAGS; -#define NORMAL_BOOT_CALL 0x0 -#define RECOVERY_CHECK_CALL 0x3 +#define NORMAL_BOOT_CALL 0x0 +#define RECOVERY_CHECK_CALL 0x3 typedef EFI_HEALTH_FLAGS X64_HANDOFF_STATUS; typedef EFI_HEALTH_FLAGS IA32_HANDOFF_STATUS; @@ -93,49 +92,49 @@ typedef struct { /// SALE_ENTRY state : 3 = Recovery_Check /// and 0 = RESET or Normal_Boot phase. /// - UINT8 BootPhase; + UINT8 BootPhase; /// /// Firmware status on entry to SALE. /// - UINT8 FWStatus; - UINT16 Reserved1; - UINT32 Reserved2; + UINT8 FWStatus; + UINT16 Reserved1; + UINT32 Reserved2; /// /// Geographically significant unique processor ID assigned by PAL. /// - UINT16 ProcId; - UINT16 Reserved3; - UINT8 IdMask; - UINT8 EidMask; - UINT16 Reserved4; + UINT16 ProcId; + UINT16 Reserved3; + UINT8 IdMask; + UINT8 EidMask; + UINT16 Reserved4; /// /// Address to make PAL calls. /// - UINT64 PalCallAddress; + UINT64 PalCallAddress; /// /// If the entry state is RECOVERY_CHECK, this contains the PAL_RESET /// return address, and if entry state is RESET, this contains /// address for PAL_authentication call. /// - UINT64 PalSpecialAddress; + UINT64 PalSpecialAddress; /// /// GR35 from PALE_EXIT state. /// - UINT64 SelfTestStatus; + UINT64 SelfTestStatus; /// /// GR37 from PALE_EXIT state. /// - UINT64 SelfTestControl; - UINT64 MemoryBufferRequired; + UINT64 SelfTestControl; + UINT64 MemoryBufferRequired; } ITANIUM_HANDOFF_STATUS; /// /// EFI_SEC_PLATFORM_INFORMATION_RECORD. /// typedef union { - IA32_HANDOFF_STATUS IA32HealthFlags; - X64_HANDOFF_STATUS x64HealthFlags; - ITANIUM_HANDOFF_STATUS ItaniumHealthFlags; + IA32_HANDOFF_STATUS IA32HealthFlags; + X64_HANDOFF_STATUS x64HealthFlags; + ITANIUM_HANDOFF_STATUS ItaniumHealthFlags; } EFI_SEC_PLATFORM_INFORMATION_RECORD; /** @@ -164,8 +163,7 @@ EFI_STATUS IN CONST EFI_PEI_SERVICES **PeiServices, IN OUT UINT64 *StructureSize, OUT EFI_SEC_PLATFORM_INFORMATION_RECORD *PlatformInformationRecord -); - + ); /// /// This service abstracts platform-specific information. It is necessary @@ -173,10 +171,9 @@ EFI_STATUS /// discover where to begin dispatching PEIMs. /// struct _EFI_SEC_PLATFORM_INFORMATION_PPI { - EFI_SEC_PLATFORM_INFORMATION PlatformInformation; + EFI_SEC_PLATFORM_INFORMATION PlatformInformation; }; - -extern EFI_GUID gEfiSecPlatformInformationPpiGuid; +extern EFI_GUID gEfiSecPlatformInformationPpiGuid; #endif diff --git a/MdePkg/Include/Ppi/SecPlatformInformation2.h b/MdePkg/Include/Ppi/SecPlatformInformation2.h index 584919a..4326d40 100644 --- a/MdePkg/Include/Ppi/SecPlatformInformation2.h +++ b/MdePkg/Include/Ppi/SecPlatformInformation2.h @@ -28,8 +28,8 @@ typedef struct _EFI_SEC_PLATFORM_INFORMATION2_PPI EFI_SEC_PLATFORM_INFORMATION2_ /// EFI_SEC_PLATFORM_INFORMATION_CPU. /// typedef struct { - UINT32 CpuLocation; - EFI_SEC_PLATFORM_INFORMATION_RECORD InfoRecord; + UINT32 CpuLocation; + EFI_SEC_PLATFORM_INFORMATION_RECORD InfoRecord; } EFI_SEC_PLATFORM_INFORMATION_CPU; /// @@ -39,8 +39,8 @@ typedef struct { /// /// The CPU location would be the local APIC ID /// - UINT32 NumberOfCpus; - EFI_SEC_PLATFORM_INFORMATION_CPU CpuInstance[1]; + UINT32 NumberOfCpus; + EFI_SEC_PLATFORM_INFORMATION_CPU CpuInstance[1]; } EFI_SEC_PLATFORM_INFORMATION_RECORD2; /** @@ -63,7 +63,7 @@ EFI_STATUS IN CONST EFI_PEI_SERVICES **PeiServices, IN OUT UINT64 *StructureSize, OUT EFI_SEC_PLATFORM_INFORMATION_RECORD2 *PlatformInformationRecord2 -); + ); /// /// This service abstracts platform-specific information for many CPU's. @@ -71,9 +71,9 @@ EFI_STATUS /// implementations that synchronize some, if not all CPU's in the SEC phase. /// struct _EFI_SEC_PLATFORM_INFORMATION2_PPI { - EFI_SEC_PLATFORM_INFORMATION2 PlatformInformation2; + EFI_SEC_PLATFORM_INFORMATION2 PlatformInformation2; }; -extern EFI_GUID gEfiSecPlatformInformation2PpiGuid; +extern EFI_GUID gEfiSecPlatformInformation2PpiGuid; #endif diff --git a/MdePkg/Include/Ppi/Security2.h b/MdePkg/Include/Ppi/Security2.h index 5e464e8..7e6349b 100644 --- a/MdePkg/Include/Ppi/Security2.h +++ b/MdePkg/Include/Ppi/Security2.h @@ -19,8 +19,7 @@ #define EFI_PEI_SECURITY2_PPI_GUID \ { 0xdcd0be23, 0x9586, 0x40f4, { 0xb6, 0x43, 0x6, 0x52, 0x2c, 0xed, 0x4e, 0xde } } - -typedef struct _EFI_PEI_SECURITY2_PPI EFI_PEI_SECURITY2_PPI; +typedef struct _EFI_PEI_SECURITY2_PPI EFI_PEI_SECURITY2_PPI; /** Allows the platform builder to implement a security policy @@ -71,7 +70,7 @@ EFI_STATUS IN EFI_PEI_FV_HANDLE FvHandle, IN EFI_PEI_FILE_HANDLE FileHandle, IN OUT BOOLEAN *DeferExecution -); + ); /// /// This PPI is a means by which the platform builder can indicate @@ -86,10 +85,9 @@ EFI_STATUS /// trusted. /// struct _EFI_PEI_SECURITY2_PPI { - EFI_PEI_SECURITY_AUTHENTICATION_STATE AuthenticationState; + EFI_PEI_SECURITY_AUTHENTICATION_STATE AuthenticationState; }; - -extern EFI_GUID gEfiPeiSecurity2PpiGuid; +extern EFI_GUID gEfiPeiSecurity2PpiGuid; #endif diff --git a/MdePkg/Include/Ppi/Smbus2.h b/MdePkg/Include/Ppi/Smbus2.h index 34f515c..3e386b8 100644 --- a/MdePkg/Include/Ppi/Smbus2.h +++ b/MdePkg/Include/Ppi/Smbus2.h @@ -19,7 +19,6 @@ #define EFI_PEI_SMBUS2_PPI_GUID \ { 0x9ca93627, 0xb65b, 0x4324, { 0xa2, 0x2, 0xc0, 0xb4, 0x61, 0x76, 0x45, 0x43 } } - typedef struct _EFI_PEI_SMBUS2_PPI EFI_PEI_SMBUS2_PPI; /** @@ -74,7 +73,7 @@ EFI_STATUS IN BOOLEAN PecCheck, IN OUT UINTN *Length, IN OUT VOID *Buffer -); + ); /** The ArpDevice() function enumerates the entire bus or enumerates a specific @@ -107,7 +106,7 @@ EFI_STATUS IN BOOLEAN ArpAll, IN EFI_SMBUS_UDID *SmbusUdid OPTIONAL, IN OUT EFI_SMBUS_DEVICE_ADDRESS *SlaveAddress OPTIONAL -); + ); /** The GetArpMap() function returns the mapping of all the SMBus devices @@ -128,7 +127,7 @@ EFI_STATUS IN CONST EFI_PEI_SMBUS2_PPI *This, IN OUT UINTN *Length, IN OUT EFI_SMBUS_DEVICE_MAP **SmbusDeviceMap -); + ); /** CallBack function can be registered in EFI_PEI_SMBUS2_PPI_NOTIFY. @@ -150,7 +149,7 @@ EFI_STATUS IN CONST EFI_PEI_SMBUS2_PPI *SmbusPpi, IN EFI_SMBUS_DEVICE_ADDRESS SlaveAddress, IN UINTN Data -); + ); /** The Notify() function registers all the callback functions to allow the @@ -175,23 +174,23 @@ EFI_STATUS IN EFI_SMBUS_DEVICE_ADDRESS SlaveAddress, IN UINTN Data, IN EFI_PEI_SMBUS_NOTIFY2_FUNCTION NotifyFunction -); + ); /// /// Provides the basic I/O interfaces that a PEIM uses to access /// its SMBus controller and the slave devices attached to it. /// struct _EFI_PEI_SMBUS2_PPI { - EFI_PEI_SMBUS2_PPI_EXECUTE_OPERATION Execute; - EFI_PEI_SMBUS2_PPI_ARP_DEVICE ArpDevice; - EFI_PEI_SMBUS2_PPI_GET_ARP_MAP GetArpMap; - EFI_PEI_SMBUS2_PPI_NOTIFY Notify; + EFI_PEI_SMBUS2_PPI_EXECUTE_OPERATION Execute; + EFI_PEI_SMBUS2_PPI_ARP_DEVICE ArpDevice; + EFI_PEI_SMBUS2_PPI_GET_ARP_MAP GetArpMap; + EFI_PEI_SMBUS2_PPI_NOTIFY Notify; /// /// Identifier which uniquely identifies this SMBus controller in a system. /// - EFI_GUID Identifier; + EFI_GUID Identifier; }; -extern EFI_GUID gEfiPeiSmbus2PpiGuid; +extern EFI_GUID gEfiPeiSmbus2PpiGuid; #endif diff --git a/MdePkg/Include/Ppi/Stall.h b/MdePkg/Include/Ppi/Stall.h index edabaab..155154c 100644 --- a/MdePkg/Include/Ppi/Stall.h +++ b/MdePkg/Include/Ppi/Stall.h @@ -46,11 +46,11 @@ struct _EFI_PEI_STALL_PPI { /// /// The resolution in microseconds of the stall services. /// - UINTN Resolution; + UINTN Resolution; - EFI_PEI_STALL Stall; + EFI_PEI_STALL Stall; }; -extern EFI_GUID gEfiPeiStallPpiGuid; +extern EFI_GUID gEfiPeiStallPpiGuid; #endif diff --git a/MdePkg/Include/Ppi/StatusCode.h b/MdePkg/Include/Ppi/StatusCode.h index 04b534e..6a0222d 100644 --- a/MdePkg/Include/Ppi/StatusCode.h +++ b/MdePkg/Include/Ppi/StatusCode.h @@ -27,9 +27,9 @@ /// There can be only one instance of this service in the system. /// typedef struct { - EFI_PEI_REPORT_STATUS_CODE ReportStatusCode; + EFI_PEI_REPORT_STATUS_CODE ReportStatusCode; } EFI_PEI_PROGRESS_CODE_PPI; -extern EFI_GUID gEfiPeiStatusCodePpiGuid; +extern EFI_GUID gEfiPeiStatusCodePpiGuid; #endif diff --git a/MdePkg/Include/Ppi/SuperIo.h b/MdePkg/Include/Ppi/SuperIo.h index 8daed32..66c7f26 100644 --- a/MdePkg/Include/Ppi/SuperIo.h +++ b/MdePkg/Include/Ppi/SuperIo.h @@ -19,12 +19,12 @@ 0x23a464ad, 0xcb83, 0x48b8, {0x94, 0xab, 0x1a, 0x6f, 0xef, 0xcf, 0xe5, 0x22} \ } -typedef struct _EFI_SIO_PPI EFI_SIO_PPI; -typedef struct _EFI_SIO_PPI *PEFI_SIO_PPI; +typedef struct _EFI_SIO_PPI EFI_SIO_PPI; +typedef struct _EFI_SIO_PPI *PEFI_SIO_PPI; typedef UINT16 EFI_SIO_REGISTER; -#define EFI_SIO_REG(ldn,reg) (EFI_SIO_REGISTER) (((ldn) << 8) | reg) -#define EFI_SIO_LDN_GLOBAL 0xFF +#define EFI_SIO_REG(ldn, reg) (EFI_SIO_REGISTER) (((ldn) << 8) | reg) +#define EFI_SIO_LDN_GLOBAL 0xFF /** Read a Super I/O register. @@ -136,15 +136,15 @@ EFI_STATUS /// /// Specifies the end of the information list. /// -#define EFI_ACPI_PNP_HID_END EFI_PNP_ID (0x0000) +#define EFI_ACPI_PNP_HID_END EFI_PNP_ID (0x0000) -typedef UINT32 EFI_ACPI_HID; -typedef UINT32 EFI_ACPI_UID; +typedef UINT32 EFI_ACPI_HID; +typedef UINT32 EFI_ACPI_UID; #pragma pack(1) typedef struct _EFI_SIO_INFO { - EFI_ACPI_HID Hid; - EFI_ACPI_UID Uid; - UINT8 Ldn; + EFI_ACPI_HID Hid; + EFI_ACPI_UID Uid; + UINT8 Ldn; } EFI_SIO_INFO, *PEFI_SIO_INFO; #pragma pack() @@ -158,26 +158,26 @@ struct _EFI_SIO_PPI { /// /// This function reads a register's value from the Super I/O controller. /// - EFI_PEI_SIO_REGISTER_READ Read; + EFI_PEI_SIO_REGISTER_READ Read; /// /// This function writes a value to a register in the Super I/O controller. /// - EFI_PEI_SIO_REGISTER_WRITE Write; + EFI_PEI_SIO_REGISTER_WRITE Write; /// /// This function modifies zero or more registers in the Super I/O controller /// using a table. /// - EFI_PEI_SIO_REGISTER_MODIFY Modify; + EFI_PEI_SIO_REGISTER_MODIFY Modify; /// /// This GUID uniquely identifies the Super I/O controller. /// - EFI_GUID SioGuid; + EFI_GUID SioGuid; /// /// This pointer is to an array which maps EISA identifiers to logical devices numbers. /// - PEFI_SIO_INFO Info; + PEFI_SIO_INFO Info; }; -extern EFI_GUID gEfiSioPpiGuid; +extern EFI_GUID gEfiSioPpiGuid; #endif diff --git a/MdePkg/Include/Ppi/TemporaryRamDone.h b/MdePkg/Include/Ppi/TemporaryRamDone.h index 21c232a..d83cfeb 100644 --- a/MdePkg/Include/Ppi/TemporaryRamDone.h +++ b/MdePkg/Include/Ppi/TemporaryRamDone.h @@ -26,7 +26,7 @@ **/ typedef EFI_STATUS -(EFIAPI * EFI_PEI_TEMPORARY_RAM_DONE) ( +(EFIAPI *EFI_PEI_TEMPORARY_RAM_DONE)( VOID ); @@ -38,9 +38,9 @@ EFI_STATUS /// Permanent RAM to be enabled and accessed at the same time with no side effects. /// typedef struct _EFI_PEI_TEMPORARY_RAM_DONE_PPI { - EFI_PEI_TEMPORARY_RAM_DONE TemporaryRamDone; + EFI_PEI_TEMPORARY_RAM_DONE TemporaryRamDone; } EFI_PEI_TEMPORARY_RAM_DONE_PPI; -extern EFI_GUID gEfiTemporaryRamDonePpiGuid; +extern EFI_GUID gEfiTemporaryRamDonePpiGuid; #endif diff --git a/MdePkg/Include/Ppi/TemporaryRamSupport.h b/MdePkg/Include/Ppi/TemporaryRamSupport.h index 664788d..be3d42a 100644 --- a/MdePkg/Include/Ppi/TemporaryRamSupport.h +++ b/MdePkg/Include/Ppi/TemporaryRamSupport.h @@ -20,7 +20,6 @@ #define EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI_GUID \ { 0xdbe23aa9, 0xa345, 0x4b97, {0x85, 0xb6, 0xb2, 0x26, 0xf1, 0x61, 0x73, 0x89} } - /** This service of the EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI that migrates temporary RAM into permanent memory. @@ -39,12 +38,12 @@ **/ typedef EFI_STATUS -(EFIAPI * TEMPORARY_RAM_MIGRATION)( +(EFIAPI *TEMPORARY_RAM_MIGRATION)( IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_PHYSICAL_ADDRESS TemporaryMemoryBase, IN EFI_PHYSICAL_ADDRESS PermanentMemoryBase, IN UINTN CopySize -); + ); /// /// This service abstracts the ability to migrate contents of the platform early memory store. @@ -52,9 +51,9 @@ EFI_STATUS /// This PPI was optional. /// typedef struct { - TEMPORARY_RAM_MIGRATION TemporaryRamMigration; + TEMPORARY_RAM_MIGRATION TemporaryRamMigration; } EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI; -extern EFI_GUID gEfiTemporaryRamSupportPpiGuid; +extern EFI_GUID gEfiTemporaryRamSupportPpiGuid; #endif diff --git a/MdePkg/Include/Ppi/VectorHandoffInfo.h b/MdePkg/Include/Ppi/VectorHandoffInfo.h index 17f52ff..bf5b8c9 100644 --- a/MdePkg/Include/Ppi/VectorHandoffInfo.h +++ b/MdePkg/Include/Ppi/VectorHandoffInfo.h @@ -27,10 +27,10 @@ /// /// Vector Handoff Info Attributes ///@{ -#define EFI_VECTOR_HANDOFF_DO_NOT_HOOK 0x00000000 -#define EFI_VECTOR_HANDOFF_HOOK_BEFORE 0x00000001 -#define EFI_VECTOR_HANDOFF_HOOK_AFTER 0x00000002 -#define EFI_VECTOR_HANDOFF_LAST_ENTRY 0x80000000 +#define EFI_VECTOR_HANDOFF_DO_NOT_HOOK 0x00000000 +#define EFI_VECTOR_HANDOFF_HOOK_BEFORE 0x00000001 +#define EFI_VECTOR_HANDOFF_HOOK_AFTER 0x00000002 +#define EFI_VECTOR_HANDOFF_LAST_ENTRY 0x80000000 ///@} /// @@ -41,16 +41,16 @@ typedef struct { // // The interrupt or exception vector that is in use and must be preserved. // - UINT32 VectorNumber; + UINT32 VectorNumber; // // A bitmask that describes the attributes of the interrupt or exception vector. // - UINT32 Attribute; + UINT32 Attribute; // // The GUID identifies the party who created the entry. For the // EFI_VECTOR_HANDOFF_DO_NOT_HOOK case, this establishes the single owner. // - EFI_GUID Owner; + EFI_GUID Owner; } EFI_VECTOR_HANDOFF_INFO; /// @@ -61,9 +61,9 @@ typedef struct _EFI_PEI_VECTOR_HANDOFF_INFO_PPI { // // Pointer to an array of interrupt and /or exception vectors. // - EFI_VECTOR_HANDOFF_INFO *Info; + EFI_VECTOR_HANDOFF_INFO *Info; } EFI_PEI_VECTOR_HANDOFF_INFO_PPI; -extern EFI_GUID gEfiVectorHandoffInfoPpiGuid; +extern EFI_GUID gEfiVectorHandoffInfoPpiGuid; #endif diff --git a/MdePkg/Include/Protocol/AbsolutePointer.h b/MdePkg/Include/Protocol/AbsolutePointer.h index d59ac97..4928e8f 100644 --- a/MdePkg/Include/Protocol/AbsolutePointer.h +++ b/MdePkg/Include/Protocol/AbsolutePointer.h @@ -13,18 +13,14 @@ #ifndef __ABSOLUTE_POINTER_H__ #define __ABSOLUTE_POINTER_H__ - #define EFI_ABSOLUTE_POINTER_PROTOCOL_GUID \ { 0x8D59D32B, 0xC655, 0x4AE9, { 0x9B, 0x15, 0xF2, 0x59, 0x04, 0x99, 0x2A, 0x43 } } - typedef struct _EFI_ABSOLUTE_POINTER_PROTOCOL EFI_ABSOLUTE_POINTER_PROTOCOL; - -//******************************************************* +// ******************************************************* // EFI_ABSOLUTE_POINTER_MODE -//******************************************************* - +// ******************************************************* /** The following data values in the EFI_ABSOLUTE_POINTER_MODE @@ -32,31 +28,30 @@ typedef struct _EFI_ABSOLUTE_POINTER_PROTOCOL EFI_ABSOLUTE_POINTER_PROTOCOL; interface functions. **/ typedef struct { - UINT64 AbsoluteMinX; ///< The Absolute Minimum of the device on the x-axis - UINT64 AbsoluteMinY; ///< The Absolute Minimum of the device on the y axis. - UINT64 AbsoluteMinZ; ///< The Absolute Minimum of the device on the z-axis - UINT64 AbsoluteMaxX; ///< The Absolute Maximum of the device on the x-axis. If 0, and the - ///< AbsoluteMinX is 0, then the pointer device does not support a xaxis - UINT64 AbsoluteMaxY; ///< The Absolute Maximum of the device on the y -axis. If 0, and the - ///< AbsoluteMinX is 0, then the pointer device does not support a yaxis. - UINT64 AbsoluteMaxZ; ///< The Absolute Maximum of the device on the z-axis. If 0 , and the - ///< AbsoluteMinX is 0, then the pointer device does not support a zaxis - UINT32 Attributes; ///< The following bits are set as needed (or'd together) to indicate the - ///< capabilities of the device supported. The remaining bits are undefined - ///< and should be 0 + UINT64 AbsoluteMinX; ///< The Absolute Minimum of the device on the x-axis + UINT64 AbsoluteMinY; ///< The Absolute Minimum of the device on the y axis. + UINT64 AbsoluteMinZ; ///< The Absolute Minimum of the device on the z-axis + UINT64 AbsoluteMaxX; ///< The Absolute Maximum of the device on the x-axis. If 0, and the + ///< AbsoluteMinX is 0, then the pointer device does not support a xaxis + UINT64 AbsoluteMaxY; ///< The Absolute Maximum of the device on the y -axis. If 0, and the + ///< AbsoluteMinX is 0, then the pointer device does not support a yaxis. + UINT64 AbsoluteMaxZ; ///< The Absolute Maximum of the device on the z-axis. If 0 , and the + ///< AbsoluteMinX is 0, then the pointer device does not support a zaxis + UINT32 Attributes; ///< The following bits are set as needed (or'd together) to indicate the + ///< capabilities of the device supported. The remaining bits are undefined + ///< and should be 0 } EFI_ABSOLUTE_POINTER_MODE; /// /// If set, indicates this device supports an alternate button input. /// -#define EFI_ABSP_SupportsAltActive 0x00000001 +#define EFI_ABSP_SupportsAltActive 0x00000001 /// /// If set, indicates this device returns pressure data in parameter CurrentZ. /// #define EFI_ABSP_SupportsPressureAsZ 0x00000002 - /** This function resets the pointer device hardware. As part of initialization process, the firmware/device will make a quick @@ -87,7 +82,7 @@ EFI_STATUS (EFIAPI *EFI_ABSOLUTE_POINTER_RESET)( IN EFI_ABSOLUTE_POINTER_PROTOCOL *This, IN BOOLEAN ExtendedVerification -); + ); /// /// This bit is set if the touch sensor is active. @@ -97,8 +92,7 @@ EFI_STATUS /// /// This bit is set if the alt sensor, such as pen-side button, is active /// -#define EFI_ABS_AltActive 0x00000002 - +#define EFI_ABS_AltActive 0x00000002 /** Definition of EFI_ABSOLUTE_POINTER_STATE. @@ -110,7 +104,7 @@ typedef struct { /// both 0, then this pointer device does not support an x-axis, and this field /// must be ignored. /// - UINT64 CurrentX; + UINT64 CurrentX; /// /// The unsigned position of the activation on the y axis. If the AboluteMinY @@ -118,7 +112,7 @@ typedef struct { /// both 0, then this pointer device does not support an y-axis, and this field /// must be ignored. /// - UINT64 CurrentY; + UINT64 CurrentY; /// /// The unsigned position of the activation on the z axis, or the pressure @@ -126,13 +120,13 @@ typedef struct { /// EFI_ABSOLUTE_POINTER_MODE structure are both 0, then this pointer device /// does not support an z-axis, and this field must be ignored. /// - UINT64 CurrentZ; + UINT64 CurrentZ; /// /// Bits are set to 1 in this structure item to indicate that device buttons are /// active. /// - UINT32 ActiveButtons; + UINT32 ActiveButtons; } EFI_ABSOLUTE_POINTER_STATE; /** @@ -170,8 +164,7 @@ EFI_STATUS (EFIAPI *EFI_ABSOLUTE_POINTER_GET_STATE)( IN EFI_ABSOLUTE_POINTER_PROTOCOL *This, OUT EFI_ABSOLUTE_POINTER_STATE *State -); - + ); /// /// The EFI_ABSOLUTE_POINTER_PROTOCOL provides a set of services @@ -182,21 +175,18 @@ EFI_STATUS /// device. The service also provides certain data items describing the device. /// struct _EFI_ABSOLUTE_POINTER_PROTOCOL { - EFI_ABSOLUTE_POINTER_RESET Reset; - EFI_ABSOLUTE_POINTER_GET_STATE GetState; + EFI_ABSOLUTE_POINTER_RESET Reset; + EFI_ABSOLUTE_POINTER_GET_STATE GetState; /// /// Event to use with WaitForEvent() to wait for input from the pointer device. /// - EFI_EVENT WaitForInput; + EFI_EVENT WaitForInput; /// /// Pointer to EFI_ABSOLUTE_POINTER_MODE data. /// - EFI_ABSOLUTE_POINTER_MODE *Mode; + EFI_ABSOLUTE_POINTER_MODE *Mode; }; - -extern EFI_GUID gEfiAbsolutePointerProtocolGuid; - +extern EFI_GUID gEfiAbsolutePointerProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/AcpiSystemDescriptionTable.h b/MdePkg/Include/Protocol/AcpiSystemDescriptionTable.h index a8e0b24..9e13420 100644 --- a/MdePkg/Include/Protocol/AcpiSystemDescriptionTable.h +++ b/MdePkg/Include/Protocol/AcpiSystemDescriptionTable.h @@ -18,12 +18,12 @@ typedef UINT32 EFI_ACPI_TABLE_VERSION; typedef VOID *EFI_ACPI_HANDLE; -#define EFI_ACPI_TABLE_VERSION_NONE (1 << 0) -#define EFI_ACPI_TABLE_VERSION_1_0B (1 << 1) -#define EFI_ACPI_TABLE_VERSION_2_0 (1 << 2) -#define EFI_ACPI_TABLE_VERSION_3_0 (1 << 3) -#define EFI_ACPI_TABLE_VERSION_4_0 (1 << 4) -#define EFI_ACPI_TABLE_VERSION_5_0 (1 << 5) +#define EFI_ACPI_TABLE_VERSION_NONE (1 << 0) +#define EFI_ACPI_TABLE_VERSION_1_0B (1 << 1) +#define EFI_ACPI_TABLE_VERSION_2_0 (1 << 2) +#define EFI_ACPI_TABLE_VERSION_3_0 (1 << 3) +#define EFI_ACPI_TABLE_VERSION_4_0 (1 << 4) +#define EFI_ACPI_TABLE_VERSION_5_0 (1 << 5) typedef UINT32 EFI_ACPI_DATA_TYPE; #define EFI_ACPI_DATA_TYPE_NONE 0 @@ -52,7 +52,7 @@ EFI_STATUS IN EFI_ACPI_SDT_HEADER *Table, ///< A pointer to the ACPI table header. IN EFI_ACPI_TABLE_VERSION Version, ///< The ACPI table's version. IN UINTN TableKey ///< The table key for this ACPI table. -); + ); /** Returns a requested ACPI table. @@ -87,7 +87,7 @@ EFI_STATUS OUT EFI_ACPI_SDT_HEADER **Table, OUT EFI_ACPI_TABLE_VERSION *Version, OUT UINTN *TableKey -); + ); /** Register or unregister a callback when an ACPI table is installed. @@ -108,7 +108,7 @@ EFI_STATUS (EFIAPI *EFI_ACPI_REGISTER_NOTIFY)( IN BOOLEAN Register, IN EFI_ACPI_NOTIFICATION_FN Notification -); + ); /** Create a handle from an ACPI opcode @@ -126,7 +126,7 @@ EFI_STATUS (EFIAPI *EFI_ACPI_OPEN)( IN VOID *Buffer, OUT EFI_ACPI_HANDLE *Handle -); + ); /** Create a handle for the first ACPI opcode in an ACPI system description table. @@ -142,7 +142,7 @@ EFI_STATUS (EFIAPI *EFI_ACPI_OPEN_SDT)( IN UINTN TableKey, OUT EFI_ACPI_HANDLE *Handle -); + ); /** Close an ACPI handle. @@ -156,7 +156,7 @@ typedef EFI_STATUS (EFIAPI *EFI_ACPI_CLOSE)( IN EFI_ACPI_HANDLE Handle -); + ); /** Return the child ACPI objects. @@ -174,7 +174,7 @@ EFI_STATUS (EFIAPI *EFI_ACPI_GET_CHILD)( IN EFI_ACPI_HANDLE ParentHandle, IN OUT EFI_ACPI_HANDLE *Handle -); + ); /** Retrieve information about an ACPI object. @@ -197,7 +197,7 @@ EFI_STATUS OUT EFI_ACPI_DATA_TYPE *DataType, OUT CONST VOID **Data, OUT UINTN *DataSize -); + ); /** Change information about an ACPI object. @@ -221,7 +221,7 @@ EFI_STATUS IN UINTN Index, IN CONST VOID *Data, IN UINTN DataSize -); + ); /** Returns the handle of the ACPI object representing the specified ACPI path @@ -240,24 +240,24 @@ EFI_STATUS IN EFI_ACPI_HANDLE HandleIn, IN VOID *AcpiPath, OUT EFI_ACPI_HANDLE *HandleOut -); + ); typedef struct _EFI_ACPI_SDT_PROTOCOL { /// /// A bit map containing all the ACPI versions supported by this protocol. /// - EFI_ACPI_TABLE_VERSION AcpiVersion; - EFI_ACPI_GET_ACPI_TABLE2 GetAcpiTable; - EFI_ACPI_REGISTER_NOTIFY RegisterNotify; - EFI_ACPI_OPEN Open; - EFI_ACPI_OPEN_SDT OpenSdt; - EFI_ACPI_CLOSE Close; - EFI_ACPI_GET_CHILD GetChild; - EFI_ACPI_GET_OPTION GetOption; - EFI_ACPI_SET_OPTION SetOption; - EFI_ACPI_FIND_PATH FindPath; + EFI_ACPI_TABLE_VERSION AcpiVersion; + EFI_ACPI_GET_ACPI_TABLE2 GetAcpiTable; + EFI_ACPI_REGISTER_NOTIFY RegisterNotify; + EFI_ACPI_OPEN Open; + EFI_ACPI_OPEN_SDT OpenSdt; + EFI_ACPI_CLOSE Close; + EFI_ACPI_GET_CHILD GetChild; + EFI_ACPI_GET_OPTION GetOption; + EFI_ACPI_SET_OPTION SetOption; + EFI_ACPI_FIND_PATH FindPath; } EFI_ACPI_SDT_PROTOCOL; -extern EFI_GUID gEfiAcpiSdtProtocolGuid; +extern EFI_GUID gEfiAcpiSdtProtocolGuid; #endif // __ACPI_SYSTEM_DESCRIPTION_TABLE_H___ diff --git a/MdePkg/Include/Protocol/AcpiTable.h b/MdePkg/Include/Protocol/AcpiTable.h index 98680c0..3c4f0d2 100644 --- a/MdePkg/Include/Protocol/AcpiTable.h +++ b/MdePkg/Include/Protocol/AcpiTable.h @@ -16,7 +16,6 @@ #define EFI_ACPI_TABLE_PROTOCOL_GUID \ { 0xffe06bdd, 0x6107, 0x46a6, { 0x7b, 0xb2, 0x5a, 0x9c, 0x7e, 0xc5, 0x27, 0x5c }} - typedef struct _EFI_ACPI_TABLE_PROTOCOL EFI_ACPI_TABLE_PROTOCOL; /** @@ -75,8 +74,7 @@ EFI_STATUS IN VOID *AcpiTableBuffer, IN UINTN AcpiTableBufferSize, OUT UINTN *TableKey -); - + ); /** @@ -107,18 +105,17 @@ EFI_STATUS (EFIAPI *EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE)( IN EFI_ACPI_TABLE_PROTOCOL *This, IN UINTN TableKey -); + ); /// /// The EFI_ACPI_TABLE_PROTOCOL provides the ability for a component /// to install and uninstall ACPI tables from a platform. /// struct _EFI_ACPI_TABLE_PROTOCOL { - EFI_ACPI_TABLE_INSTALL_ACPI_TABLE InstallAcpiTable; - EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE UninstallAcpiTable; + EFI_ACPI_TABLE_INSTALL_ACPI_TABLE InstallAcpiTable; + EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE UninstallAcpiTable; }; -extern EFI_GUID gEfiAcpiTableProtocolGuid; +extern EFI_GUID gEfiAcpiTableProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/AdapterInformation.h b/MdePkg/Include/Protocol/AdapterInformation.h index 3fd0b9a..ed19e57 100644 --- a/MdePkg/Include/Protocol/AdapterInformation.h +++ b/MdePkg/Include/Protocol/AdapterInformation.h @@ -14,7 +14,6 @@ #ifndef __EFI_ADAPTER_INFORMATION_PROTOCOL_H__ #define __EFI_ADAPTER_INFORMATION_PROTOCOL_H__ - #define EFI_ADAPTER_INFORMATION_PROTOCOL_GUID \ { \ 0xE5DD1403, 0xD622, 0xC24E, {0x84, 0x88, 0xC7, 0x1B, 0x17, 0xF5, 0xE8, 0x02 } \ @@ -45,7 +44,6 @@ 0x8484472f, 0x71ec, 0x411a, { 0xb3, 0x9c, 0x62, 0xcd, 0x94, 0xd9, 0x91, 0x6e } \ } - typedef struct _EFI_ADAPTER_INFORMATION_PROTOCOL EFI_ADAPTER_INFORMATION_PROTOCOL; /// @@ -58,7 +56,7 @@ typedef struct { /// There was media attached to the network adapter, but it was removed and reattached. EFI_NO_MEDIA: There is /// not any media attached to the network. /// - EFI_STATUS MediaState; + EFI_STATUS MediaState; } EFI_ADAPTER_INFO_MEDIA_STATE; /// @@ -71,7 +69,7 @@ typedef struct { /// 2: Ethernet Wireless Network Adapter /// 3~255: Reserved /// - UINT8 MediaType; + UINT8 MediaType; } EFI_ADAPTER_INFO_MEDIA_TYPE; /// @@ -81,39 +79,39 @@ typedef struct { /// /// TRUE if the adapter supports booting from iSCSI IPv4 targets. /// - BOOLEAN iScsiIpv4BootCapablity; + BOOLEAN iScsiIpv4BootCapablity; /// /// TRUE if the adapter supports booting from iSCSI IPv6 targets. /// - BOOLEAN iScsiIpv6BootCapablity; + BOOLEAN iScsiIpv6BootCapablity; /// /// TRUE if the adapter supports booting from FCoE targets. /// - BOOLEAN FCoeBootCapablity; + BOOLEAN FCoeBootCapablity; /// /// TRUE if the adapter supports an offload engine (such as TCP /// Offload Engine (TOE)) for its iSCSI or FCoE boot operations. /// - BOOLEAN OffloadCapability; + BOOLEAN OffloadCapability; /// /// TRUE if the adapter supports multipath I/O (MPIO) for its iSCSI /// boot operations. /// - BOOLEAN iScsiMpioCapability; + BOOLEAN iScsiMpioCapability; /// /// TRUE if the adapter is currently configured to boot from iSCSI /// IPv4 targets. /// - BOOLEAN iScsiIpv4Boot; + BOOLEAN iScsiIpv4Boot; /// /// TRUE if the adapter is currently configured to boot from iSCSI /// IPv6 targets. /// - BOOLEAN iScsiIpv6Boot; + BOOLEAN iScsiIpv6Boot; /// /// TRUE if the adapter is currently configured to boot from FCoE targets. /// - BOOLEAN FCoeBoot; + BOOLEAN FCoeBoot; } EFI_ADAPTER_INFO_NETWORK_BOOT; /// @@ -124,7 +122,7 @@ typedef struct { /// Returns the SAN MAC address for the adapter.For adapters that support today's 802.3 ethernet /// networking and Fibre-Channel Over Ethernet (FCOE), this conveys the FCOE SAN MAC address from the adapter. /// - EFI_MAC_ADDRESS SanMacAddress; + EFI_MAC_ADDRESS SanMacAddress; } EFI_ADAPTER_INFO_SAN_MAC_ADDRESS; /// @@ -134,7 +132,7 @@ typedef struct { /// /// Returns capability of UNDI to support IPv6 traffic. /// - BOOLEAN Ipv6Support; + BOOLEAN Ipv6Support; } EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT; /** @@ -236,19 +234,19 @@ EFI_STATUS /// - Gets a list of supported information types for this instance of the protocol. /// struct _EFI_ADAPTER_INFORMATION_PROTOCOL { - EFI_ADAPTER_INFO_GET_INFO GetInformation; - EFI_ADAPTER_INFO_SET_INFO SetInformation; - EFI_ADAPTER_INFO_GET_SUPPORTED_TYPES GetSupportedTypes; + EFI_ADAPTER_INFO_GET_INFO GetInformation; + EFI_ADAPTER_INFO_SET_INFO SetInformation; + EFI_ADAPTER_INFO_GET_SUPPORTED_TYPES GetSupportedTypes; }; -extern EFI_GUID gEfiAdapterInformationProtocolGuid; +extern EFI_GUID gEfiAdapterInformationProtocolGuid; -extern EFI_GUID gEfiAdapterInfoMediaStateGuid; +extern EFI_GUID gEfiAdapterInfoMediaStateGuid; -extern EFI_GUID gEfiAdapterInfoNetworkBootGuid; +extern EFI_GUID gEfiAdapterInfoNetworkBootGuid; -extern EFI_GUID gEfiAdapterInfoSanMacAddressGuid; +extern EFI_GUID gEfiAdapterInfoSanMacAddressGuid; -extern EFI_GUID gEfiAdapterInfoUndiIpv6SupportGuid; +extern EFI_GUID gEfiAdapterInfoUndiIpv6SupportGuid; #endif diff --git a/MdePkg/Include/Protocol/Arp.h b/MdePkg/Include/Protocol/Arp.h index ff2cfac..168a2d1 100644 --- a/MdePkg/Include/Protocol/Arp.h +++ b/MdePkg/Include/Protocol/Arp.h @@ -34,51 +34,51 @@ typedef struct { /// /// Length in bytes of this entry. /// - UINT32 Size; + UINT32 Size; /// /// Set to TRUE if this entry is a "deny" entry. /// Set to FALSE if this entry is a "normal" entry. /// - BOOLEAN DenyFlag; + BOOLEAN DenyFlag; /// /// Set to TRUE if this entry will not time out. /// Set to FALSE if this entry will time out. /// - BOOLEAN StaticFlag; + BOOLEAN StaticFlag; /// /// 16-bit ARP hardware identifier number. /// - UINT16 HwAddressType; + UINT16 HwAddressType; /// /// 16-bit protocol type number. /// - UINT16 SwAddressType; + UINT16 SwAddressType; /// /// The length of the hardware address. /// - UINT8 HwAddressLength; + UINT8 HwAddressLength; /// /// The length of the protocol address. /// - UINT8 SwAddressLength; + UINT8 SwAddressLength; } EFI_ARP_FIND_DATA; typedef struct { /// /// 16-bit protocol type number in host byte order. /// - UINT16 SwAddressType; + UINT16 SwAddressType; /// /// The length in bytes of the station's protocol address to register. /// - UINT8 SwAddressLength; + UINT8 SwAddressLength; /// /// The pointer to the first byte of the protocol address to register. For @@ -86,30 +86,29 @@ typedef struct { /// StationAddress points to the first byte of this station's IP /// address stored in network byte order. /// - VOID *StationAddress; + VOID *StationAddress; /// /// The timeout value in 100-ns units that is associated with each /// new dynamic ARP cache entry. If it is set to zero, the value is /// implementation-specific. /// - UINT32 EntryTimeOut; + UINT32 EntryTimeOut; /// /// The number of retries before a MAC address is resolved. If it is /// set to zero, the value is implementation-specific. /// - UINT32 RetryCount; + UINT32 RetryCount; /// /// The timeout value in 100-ns units that is used to wait for the ARP /// reply packet or the timeout value between two retries. Set to zero /// to use implementation-specific value. /// - UINT32 RetryTimeOut; + UINT32 RetryTimeOut; } EFI_ARP_CONFIG_DATA; - /** This function is used to assign a station address to the ARP cache for this instance of the ARP driver. @@ -247,7 +246,6 @@ EFI_STATUS IN BOOLEAN Refresh ); - /** This function removes specified ARP cache entries. @@ -363,17 +361,16 @@ EFI_STATUS /// network hardware addresses. /// struct _EFI_ARP_PROTOCOL { - EFI_ARP_CONFIGURE Configure; - EFI_ARP_ADD Add; - EFI_ARP_FIND Find; - EFI_ARP_DELETE Delete; - EFI_ARP_FLUSH Flush; - EFI_ARP_REQUEST Request; - EFI_ARP_CANCEL Cancel; + EFI_ARP_CONFIGURE Configure; + EFI_ARP_ADD Add; + EFI_ARP_FIND Find; + EFI_ARP_DELETE Delete; + EFI_ARP_FLUSH Flush; + EFI_ARP_REQUEST Request; + EFI_ARP_CANCEL Cancel; }; - -extern EFI_GUID gEfiArpServiceBindingProtocolGuid; -extern EFI_GUID gEfiArpProtocolGuid; +extern EFI_GUID gEfiArpServiceBindingProtocolGuid; +extern EFI_GUID gEfiArpProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/AtaPassThru.h b/MdePkg/Include/Protocol/AtaPassThru.h index 888dff2..33d0e21 100644 --- a/MdePkg/Include/Protocol/AtaPassThru.h +++ b/MdePkg/Include/Protocol/AtaPassThru.h @@ -22,89 +22,88 @@ typedef struct _EFI_ATA_PASS_THRU_PROTOCOL EFI_ATA_PASS_THRU_PROTOCOL; typedef struct { - UINT32 Attributes; - UINT32 IoAlign; + UINT32 Attributes; + UINT32 IoAlign; } EFI_ATA_PASS_THRU_MODE; /// /// If this bit is set, then the EFI_ATA_PASS_THRU_PROTOCOL interface is for physical /// devices on the ATA controller. /// -#define EFI_ATA_PASS_THRU_ATTRIBUTES_PHYSICAL 0x0001 +#define EFI_ATA_PASS_THRU_ATTRIBUTES_PHYSICAL 0x0001 /// /// If this bit is set, then the EFI_ATA_PASS_THRU_PROTOCOL interface is for logical /// devices on the ATA controller. /// -#define EFI_ATA_PASS_THRU_ATTRIBUTES_LOGICAL 0x0002 +#define EFI_ATA_PASS_THRU_ATTRIBUTES_LOGICAL 0x0002 /// /// If this bit is set, then the EFI_ATA_PASS_THRU_PROTOCOL interface supports non blocking /// I/O. Every EFI_ATA_PASS_THRU_PROTOCOL must support blocking I/O. The support of non-blocking /// I/O is optional. /// -#define EFI_ATA_PASS_THRU_ATTRIBUTES_NONBLOCKIO 0x0004 +#define EFI_ATA_PASS_THRU_ATTRIBUTES_NONBLOCKIO 0x0004 typedef struct _EFI_ATA_COMMAND_BLOCK { - UINT8 Reserved1[2]; - UINT8 AtaCommand; - UINT8 AtaFeatures; - UINT8 AtaSectorNumber; - UINT8 AtaCylinderLow; - UINT8 AtaCylinderHigh; - UINT8 AtaDeviceHead; - UINT8 AtaSectorNumberExp; - UINT8 AtaCylinderLowExp; - UINT8 AtaCylinderHighExp; - UINT8 AtaFeaturesExp; - UINT8 AtaSectorCount; - UINT8 AtaSectorCountExp; - UINT8 Reserved2[6]; + UINT8 Reserved1[2]; + UINT8 AtaCommand; + UINT8 AtaFeatures; + UINT8 AtaSectorNumber; + UINT8 AtaCylinderLow; + UINT8 AtaCylinderHigh; + UINT8 AtaDeviceHead; + UINT8 AtaSectorNumberExp; + UINT8 AtaCylinderLowExp; + UINT8 AtaCylinderHighExp; + UINT8 AtaFeaturesExp; + UINT8 AtaSectorCount; + UINT8 AtaSectorCountExp; + UINT8 Reserved2[6]; } EFI_ATA_COMMAND_BLOCK; typedef struct _EFI_ATA_STATUS_BLOCK { - UINT8 Reserved1[2]; - UINT8 AtaStatus; - UINT8 AtaError; - UINT8 AtaSectorNumber; - UINT8 AtaCylinderLow; - UINT8 AtaCylinderHigh; - UINT8 AtaDeviceHead; - UINT8 AtaSectorNumberExp; - UINT8 AtaCylinderLowExp; - UINT8 AtaCylinderHighExp; - UINT8 Reserved2; - UINT8 AtaSectorCount; - UINT8 AtaSectorCountExp; - UINT8 Reserved3[6]; + UINT8 Reserved1[2]; + UINT8 AtaStatus; + UINT8 AtaError; + UINT8 AtaSectorNumber; + UINT8 AtaCylinderLow; + UINT8 AtaCylinderHigh; + UINT8 AtaDeviceHead; + UINT8 AtaSectorNumberExp; + UINT8 AtaCylinderLowExp; + UINT8 AtaCylinderHighExp; + UINT8 Reserved2; + UINT8 AtaSectorCount; + UINT8 AtaSectorCountExp; + UINT8 Reserved3[6]; } EFI_ATA_STATUS_BLOCK; typedef UINT8 EFI_ATA_PASS_THRU_CMD_PROTOCOL; -#define EFI_ATA_PASS_THRU_PROTOCOL_ATA_HARDWARE_RESET 0x00 -#define EFI_ATA_PASS_THRU_PROTOCOL_ATA_SOFTWARE_RESET 0x01 -#define EFI_ATA_PASS_THRU_PROTOCOL_ATA_NON_DATA 0x02 -#define EFI_ATA_PASS_THRU_PROTOCOL_PIO_DATA_IN 0x04 -#define EFI_ATA_PASS_THRU_PROTOCOL_PIO_DATA_OUT 0x05 -#define EFI_ATA_PASS_THRU_PROTOCOL_DMA 0x06 -#define EFI_ATA_PASS_THRU_PROTOCOL_DMA_QUEUED 0x07 -#define EFI_ATA_PASS_THRU_PROTOCOL_DEVICE_DIAGNOSTIC 0x08 -#define EFI_ATA_PASS_THRU_PROTOCOL_DEVICE_RESET 0x09 -#define EFI_ATA_PASS_THRU_PROTOCOL_UDMA_DATA_IN 0x0A -#define EFI_ATA_PASS_THRU_PROTOCOL_UDMA_DATA_OUT 0x0B -#define EFI_ATA_PASS_THRU_PROTOCOL_FPDMA 0x0C -#define EFI_ATA_PASS_THRU_PROTOCOL_RETURN_RESPONSE 0xFF +#define EFI_ATA_PASS_THRU_PROTOCOL_ATA_HARDWARE_RESET 0x00 +#define EFI_ATA_PASS_THRU_PROTOCOL_ATA_SOFTWARE_RESET 0x01 +#define EFI_ATA_PASS_THRU_PROTOCOL_ATA_NON_DATA 0x02 +#define EFI_ATA_PASS_THRU_PROTOCOL_PIO_DATA_IN 0x04 +#define EFI_ATA_PASS_THRU_PROTOCOL_PIO_DATA_OUT 0x05 +#define EFI_ATA_PASS_THRU_PROTOCOL_DMA 0x06 +#define EFI_ATA_PASS_THRU_PROTOCOL_DMA_QUEUED 0x07 +#define EFI_ATA_PASS_THRU_PROTOCOL_DEVICE_DIAGNOSTIC 0x08 +#define EFI_ATA_PASS_THRU_PROTOCOL_DEVICE_RESET 0x09 +#define EFI_ATA_PASS_THRU_PROTOCOL_UDMA_DATA_IN 0x0A +#define EFI_ATA_PASS_THRU_PROTOCOL_UDMA_DATA_OUT 0x0B +#define EFI_ATA_PASS_THRU_PROTOCOL_FPDMA 0x0C +#define EFI_ATA_PASS_THRU_PROTOCOL_RETURN_RESPONSE 0xFF typedef UINT8 EFI_ATA_PASS_THRU_LENGTH; -#define EFI_ATA_PASS_THRU_LENGTH_BYTES 0x80 +#define EFI_ATA_PASS_THRU_LENGTH_BYTES 0x80 +#define EFI_ATA_PASS_THRU_LENGTH_MASK 0x70 +#define EFI_ATA_PASS_THRU_LENGTH_NO_DATA_TRANSFER 0x00 +#define EFI_ATA_PASS_THRU_LENGTH_FEATURES 0x10 +#define EFI_ATA_PASS_THRU_LENGTH_SECTOR_COUNT 0x20 +#define EFI_ATA_PASS_THRU_LENGTH_TPSIU 0x30 -#define EFI_ATA_PASS_THRU_LENGTH_MASK 0x70 -#define EFI_ATA_PASS_THRU_LENGTH_NO_DATA_TRANSFER 0x00 -#define EFI_ATA_PASS_THRU_LENGTH_FEATURES 0x10 -#define EFI_ATA_PASS_THRU_LENGTH_SECTOR_COUNT 0x20 -#define EFI_ATA_PASS_THRU_LENGTH_TPSIU 0x30 - -#define EFI_ATA_PASS_THRU_LENGTH_COUNT 0x0F +#define EFI_ATA_PASS_THRU_LENGTH_COUNT 0x0F typedef struct { /// @@ -112,12 +111,12 @@ typedef struct { /// command. It must be aligned to the boundary specified in the IoAlign field /// in the EFI_ATA_PASS_THRU_MODE structure. /// - EFI_ATA_STATUS_BLOCK *Asb; + EFI_ATA_STATUS_BLOCK *Asb; /// /// A pointer to buffer that contains the Command Data Block to send to the ATA /// device specified by Port and PortMultiplierPort. /// - EFI_ATA_COMMAND_BLOCK *Acb; + EFI_ATA_COMMAND_BLOCK *Acb; /// /// The timeout, in 100 ns units, to use for the execution of this ATA command. /// A Timeout value of 0 means that this function will wait indefinitely for the @@ -125,7 +124,7 @@ typedef struct { /// will return EFI_TIMEOUT if the time required to execute the ATA command is /// greater than Timeout. /// - UINT64 Timeout; + UINT64 Timeout; /// /// A pointer to the data buffer to transfer between the ATA controller and the /// ATA device for read and bidirectional commands. For all write and non data @@ -133,7 +132,7 @@ typedef struct { /// If this field is not NULL, then it must be aligned on the boundary specified /// by the IoAlign field in the EFI_ATA_PASS_THRU_MODE structure. /// - VOID *InDataBuffer; + VOID *InDataBuffer; /// /// A pointer to the data buffer to transfer between the ATA controller and the /// ATA device for write or bidirectional commands. For all read and non data @@ -141,7 +140,7 @@ typedef struct { /// If this field is not NULL, then it must be aligned on the boundary specified /// by the IoAlign field in the EFI_ATA_PASS_THRU_MODE structure. /// - VOID *OutDataBuffer; + VOID *OutDataBuffer; /// /// On input, the size, in bytes, of InDataBuffer. On output, the number of bytes /// transferred between the ATA controller and the ATA device. If InTransferLength @@ -149,7 +148,7 @@ typedef struct { /// InTransferLength will be updated to contain the number of bytes that the ATA /// controller is able to transfer, and EFI_BAD_BUFFER_SIZE will be returned. /// - UINT32 InTransferLength; + UINT32 InTransferLength; /// /// On Input, the size, in bytes of OutDataBuffer. On Output, the Number of bytes /// transferred between ATA Controller and the ATA device. If OutTransferLength is @@ -157,18 +156,17 @@ typedef struct { /// OutTransferLength will be updated to contain the number of bytes that the ATA /// controller is able to transfer, and EFI_BAD_BUFFER_SIZE will be returned. /// - UINT32 OutTransferLength; + UINT32 OutTransferLength; /// /// Specifies the protocol used when the ATA device executes the command. /// - EFI_ATA_PASS_THRU_CMD_PROTOCOL Protocol; + EFI_ATA_PASS_THRU_CMD_PROTOCOL Protocol; /// /// Specifies the way in which the ATA command length is encoded. /// - EFI_ATA_PASS_THRU_LENGTH Length; + EFI_ATA_PASS_THRU_LENGTH Length; } EFI_ATA_PASS_THRU_COMMAND_PACKET; - /** Sends an ATA command to an ATA device that is attached to the ATA controller. This function supports both blocking I/O and non-blocking I/O. The blocking I/O functionality is required, @@ -453,16 +451,16 @@ EFI_STATUS ); struct _EFI_ATA_PASS_THRU_PROTOCOL { - EFI_ATA_PASS_THRU_MODE *Mode; - EFI_ATA_PASS_THRU_PASSTHRU PassThru; - EFI_ATA_PASS_THRU_GET_NEXT_PORT GetNextPort; - EFI_ATA_PASS_THRU_GET_NEXT_DEVICE GetNextDevice; - EFI_ATA_PASS_THRU_BUILD_DEVICE_PATH BuildDevicePath; - EFI_ATA_PASS_THRU_GET_DEVICE GetDevice; - EFI_ATA_PASS_THRU_RESET_PORT ResetPort; - EFI_ATA_PASS_THRU_RESET_DEVICE ResetDevice; + EFI_ATA_PASS_THRU_MODE *Mode; + EFI_ATA_PASS_THRU_PASSTHRU PassThru; + EFI_ATA_PASS_THRU_GET_NEXT_PORT GetNextPort; + EFI_ATA_PASS_THRU_GET_NEXT_DEVICE GetNextDevice; + EFI_ATA_PASS_THRU_BUILD_DEVICE_PATH BuildDevicePath; + EFI_ATA_PASS_THRU_GET_DEVICE GetDevice; + EFI_ATA_PASS_THRU_RESET_PORT ResetPort; + EFI_ATA_PASS_THRU_RESET_DEVICE ResetDevice; }; -extern EFI_GUID gEfiAtaPassThruProtocolGuid; +extern EFI_GUID gEfiAtaPassThruProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/AuthenticationInfo.h b/MdePkg/Include/Protocol/AuthenticationInfo.h index 07aaa0b..b298e2a 100644 --- a/MdePkg/Include/Protocol/AuthenticationInfo.h +++ b/MdePkg/Include/Protocol/AuthenticationInfo.h @@ -33,41 +33,41 @@ typedef struct { /// /// Authentication Type GUID. /// - EFI_GUID Guid; + EFI_GUID Guid; /// /// Length of this structure in bytes. /// - UINT16 Length; + UINT16 Length; } AUTH_NODE_HEADER; typedef struct { - AUTH_NODE_HEADER Header; + AUTH_NODE_HEADER Header; /// /// RADIUS Server IPv4 or IPv6 Address. /// - UINT8 RadiusIpAddr[16]; ///< IPv4 or IPv6 address. + UINT8 RadiusIpAddr[16]; ///< IPv4 or IPv6 address. /// /// Reserved for future use. /// - UINT16 Reserved; + UINT16 Reserved; /// /// Network Access Server IPv4 or IPv6 Address (OPTIONAL). /// - UINT8 NasIpAddr[16]; ///< IPv4 or IPv6 address. + UINT8 NasIpAddr[16]; ///< IPv4 or IPv6 address. /// /// Network Access Server Secret Length in bytes (OPTIONAL). /// - UINT16 NasSecretLength; + UINT16 NasSecretLength; /// /// Network Access Server Secret (OPTIONAL). /// - UINT8 NasSecret[1]; + UINT8 NasSecret[1]; /// /// CHAP Initiator Secret Length in bytes on offset NasSecret + NasSecretLength. @@ -105,22 +105,22 @@ typedef struct { } CHAP_RADIUS_AUTH_NODE; typedef struct { - AUTH_NODE_HEADER Header; + AUTH_NODE_HEADER Header; /// /// Reserved for future use. /// - UINT16 Reserved; + UINT16 Reserved; /// /// User Secret Length in bytes. /// - UINT16 UserSecretLength; + UINT16 UserSecretLength; /// /// User Secret. /// - UINT8 UserSecret[1]; + UINT8 UserSecret[1]; /// /// User Name Length in bytes on offset UserSecret + UserSecretLength. @@ -220,12 +220,12 @@ EFI_STATUS /// information associated with the physical or logical device. /// struct _EFI_AUTHENTICATION_INFO_PROTOCOL { - EFI_AUTHENTICATION_INFO_PROTOCOL_GET Get; - EFI_AUTHENTICATION_INFO_PROTOCOL_SET Set; + EFI_AUTHENTICATION_INFO_PROTOCOL_GET Get; + EFI_AUTHENTICATION_INFO_PROTOCOL_SET Set; }; -extern EFI_GUID gEfiAuthenticationInfoProtocolGuid; -extern EFI_GUID gEfiAuthenticationChapRadiusGuid; -extern EFI_GUID gEfiAuthenticationChapLocalGuid; +extern EFI_GUID gEfiAuthenticationInfoProtocolGuid; +extern EFI_GUID gEfiAuthenticationChapRadiusGuid; +extern EFI_GUID gEfiAuthenticationChapLocalGuid; #endif diff --git a/MdePkg/Include/Protocol/Bds.h b/MdePkg/Include/Protocol/Bds.h index bda2c37..ae37173 100644 --- a/MdePkg/Include/Protocol/Bds.h +++ b/MdePkg/Include/Protocol/Bds.h @@ -20,7 +20,7 @@ /// /// Declare forward reference for the BDS Architectural Protocol /// -typedef struct _EFI_BDS_ARCH_PROTOCOL EFI_BDS_ARCH_PROTOCOL; +typedef struct _EFI_BDS_ARCH_PROTOCOL EFI_BDS_ARCH_PROTOCOL; /** This function uses policy data from the platform to determine what operating @@ -58,9 +58,9 @@ VOID /// the boot device can be used to load and invoke an OS or a system utility. /// struct _EFI_BDS_ARCH_PROTOCOL { - EFI_BDS_ENTRY Entry; + EFI_BDS_ENTRY Entry; }; -extern EFI_GUID gEfiBdsArchProtocolGuid; +extern EFI_GUID gEfiBdsArchProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Bis.h b/MdePkg/Include/Protocol/Bis.h index 2be6718..329084d 100644 --- a/MdePkg/Include/Protocol/Bis.h +++ b/MdePkg/Include/Protocol/Bis.h @@ -29,32 +29,29 @@ SPDX-License-Identifier: BSD-2-Clause-Patent 0xedd35e31, 0x7b9, 0x11d2, { 0x83,0xa3,0x0,0xa0,0xc9,0x1f,0xad,0xcf } \ } - - -typedef struct _EFI_BIS_PROTOCOL EFI_BIS_PROTOCOL; - +typedef struct _EFI_BIS_PROTOCOL EFI_BIS_PROTOCOL; // // Basic types // -typedef VOID *BIS_APPLICATION_HANDLE; -typedef UINT16 BIS_ALG_ID; -typedef UINT32 BIS_CERT_ID; +typedef VOID *BIS_APPLICATION_HANDLE; +typedef UINT16 BIS_ALG_ID; +typedef UINT32 BIS_CERT_ID; /// /// EFI_BIS_DATA instances obtained from BIS must be freed by calling Free( ). /// typedef struct { - UINT32 Length; ///< The length of Data in 8 bit bytes. - UINT8 *Data; ///< 32 Bit Flat Address of data. + UINT32 Length; ///< The length of Data in 8 bit bytes. + UINT8 *Data; ///< 32 Bit Flat Address of data. } EFI_BIS_DATA; /// /// EFI_BIS_VERSION type. /// typedef struct { - UINT32 Major; ///< The major BIS version number. - UINT32 Minor; ///< A minor BIS version number. + UINT32 Major; ///< The major BIS version number. + UINT32 Minor; ///< A minor BIS version number. } EFI_BIS_VERSION; // @@ -63,16 +60,16 @@ typedef struct { // and to interpret results of Initialize. // ----------------------------------------------------// // -#define BIS_CURRENT_VERSION_MAJOR BIS_VERSION_1 -#define BIS_VERSION_1 1 +#define BIS_CURRENT_VERSION_MAJOR BIS_VERSION_1 +#define BIS_VERSION_1 1 /// /// EFI_BIS_SIGNATURE_INFO type. /// typedef struct { - BIS_CERT_ID CertificateID; ///< Truncated hash of platform Boot Object - BIS_ALG_ID AlgorithmID; ///< A signature algorithm number. - UINT16 KeyLength; ///< The length of alg. keys in bits. + BIS_CERT_ID CertificateID; ///< Truncated hash of platform Boot Object + BIS_ALG_ID AlgorithmID; ///< A signature algorithm number. + UINT16 KeyLength; ///< The length of alg. keys in bits. } EFI_BIS_SIGNATURE_INFO; /// @@ -80,13 +77,13 @@ typedef struct { /// The exact numeric values come from the /// "Common Data Security Architecture (CDSA) Specification". /// -#define BIS_ALG_DSA (41) // CSSM_ALGID_DSA -#define BIS_ALG_RSA_MD5 (42) // CSSM_ALGID_MD5_WITH_RSA +#define BIS_ALG_DSA (41) // CSSM_ALGID_DSA +#define BIS_ALG_RSA_MD5 (42) // CSSM_ALGID_MD5_WITH_RSA /// /// values for EFI_BIS_SIGNATURE_INFO.CertificateId. /// -#define BIS_CERT_ID_DSA BIS_ALG_DSA // CSSM_ALGID_DSA -#define BIS_CERT_ID_RSA_MD5 BIS_ALG_RSA_MD5 // CSSM_ALGID_MD5_WITH_RSA +#define BIS_CERT_ID_DSA BIS_ALG_DSA // CSSM_ALGID_DSA +#define BIS_CERT_ID_RSA_MD5 BIS_ALG_RSA_MD5 // CSSM_ALGID_MD5_WITH_RSA /// /// The mask value that gets applied to the truncated hash of a /// platform Boot Object Authorization Certificate to create the certificateID. @@ -102,13 +99,13 @@ typedef struct { /// elements are contained in a EFI_BIS_DATA struct pointed to /// by the provided EFI_BIS_DATA*. /// -#define BIS_GET_SIGINFO_COUNT(BisDataPtr) ((BisDataPtr)->Length / sizeof (EFI_BIS_SIGNATURE_INFO)) +#define BIS_GET_SIGINFO_COUNT(BisDataPtr) ((BisDataPtr)->Length / sizeof (EFI_BIS_SIGNATURE_INFO)) /// /// BIS_GET_SIGINFO_ARRAY - produces a EFI_BIS_SIGNATURE_INFO* /// from a given EFI_BIS_DATA*. /// -#define BIS_GET_SIGINFO_ARRAY(BisDataPtr) ((EFI_BIS_SIGNATURE_INFO *) (BisDataPtr)->Data) +#define BIS_GET_SIGINFO_ARRAY(BisDataPtr) ((EFI_BIS_SIGNATURE_INFO *) (BisDataPtr)->Data) /// /// Support an old name for backward compatibility. @@ -427,19 +424,19 @@ EFI_STATUS /// certificate for the purpose of an integrity and authorization check. /// struct _EFI_BIS_PROTOCOL { - EFI_BIS_INITIALIZE Initialize; - EFI_BIS_SHUTDOWN Shutdown; - EFI_BIS_FREE Free; - EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_CERTIFICATE GetBootObjectAuthorizationCertificate; - EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_CHECKFLAG GetBootObjectAuthorizationCheckFlag; - EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_UPDATE_TOKEN GetBootObjectAuthorizationUpdateToken; - EFI_BIS_GET_SIGNATURE_INFO GetSignatureInfo; - EFI_BIS_UPDATE_BOOT_OBJECT_AUTHORIZATION UpdateBootObjectAuthorization; - EFI_BIS_VERIFY_BOOT_OBJECT VerifyBootObject; - EFI_BIS_VERIFY_OBJECT_WITH_CREDENTIAL VerifyObjectWithCredential; + EFI_BIS_INITIALIZE Initialize; + EFI_BIS_SHUTDOWN Shutdown; + EFI_BIS_FREE Free; + EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_CERTIFICATE GetBootObjectAuthorizationCertificate; + EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_CHECKFLAG GetBootObjectAuthorizationCheckFlag; + EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_UPDATE_TOKEN GetBootObjectAuthorizationUpdateToken; + EFI_BIS_GET_SIGNATURE_INFO GetSignatureInfo; + EFI_BIS_UPDATE_BOOT_OBJECT_AUTHORIZATION UpdateBootObjectAuthorization; + EFI_BIS_VERIFY_BOOT_OBJECT VerifyBootObject; + EFI_BIS_VERIFY_OBJECT_WITH_CREDENTIAL VerifyObjectWithCredential; }; -extern EFI_GUID gEfiBisProtocolGuid; -extern EFI_GUID gBootObjectAuthorizationParmsetGuid; +extern EFI_GUID gEfiBisProtocolGuid; +extern EFI_GUID gBootObjectAuthorizationParmsetGuid; #endif diff --git a/MdePkg/Include/Protocol/BlockIo.h b/MdePkg/Include/Protocol/BlockIo.h index 3bd7688..ac9adf7 100644 --- a/MdePkg/Include/Protocol/BlockIo.h +++ b/MdePkg/Include/Protocol/BlockIo.h @@ -17,17 +17,17 @@ 0x964e5b21, 0x6459, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \ } -typedef struct _EFI_BLOCK_IO_PROTOCOL EFI_BLOCK_IO_PROTOCOL; +typedef struct _EFI_BLOCK_IO_PROTOCOL EFI_BLOCK_IO_PROTOCOL; /// /// Protocol GUID name defined in EFI1.1. /// -#define BLOCK_IO_PROTOCOL EFI_BLOCK_IO_PROTOCOL_GUID +#define BLOCK_IO_PROTOCOL EFI_BLOCK_IO_PROTOCOL_GUID /// /// Protocol defined in EFI1.1. /// -typedef EFI_BLOCK_IO_PROTOCOL EFI_BLOCK_IO; +typedef EFI_BLOCK_IO_PROTOCOL EFI_BLOCK_IO; /** Reset the Block Device. @@ -129,84 +129,84 @@ typedef struct { /// /// The curent media Id. If the media changes, this value is changed. /// - UINT32 MediaId; + UINT32 MediaId; /// /// TRUE if the media is removable; otherwise, FALSE. /// - BOOLEAN RemovableMedia; + BOOLEAN RemovableMedia; /// /// TRUE if there is a media currently present in the device; /// othersise, FALSE. THis field shows the media present status /// as of the most recent ReadBlocks() or WriteBlocks() call. /// - BOOLEAN MediaPresent; + BOOLEAN MediaPresent; /// /// TRUE if LBA 0 is the first block of a partition; otherwise /// FALSE. For media with only one partition this would be TRUE. /// - BOOLEAN LogicalPartition; + BOOLEAN LogicalPartition; /// /// TRUE if the media is marked read-only otherwise, FALSE. /// This field shows the read-only status as of the most recent WriteBlocks () call. /// - BOOLEAN ReadOnly; + BOOLEAN ReadOnly; /// /// TRUE if the WriteBlock () function caches write data. /// - BOOLEAN WriteCaching; + BOOLEAN WriteCaching; /// /// The intrinsic block size of the device. If the media changes, then /// this field is updated. /// - UINT32 BlockSize; + UINT32 BlockSize; /// /// Supplies the alignment requirement for any buffer to read or write block(s). /// - UINT32 IoAlign; + UINT32 IoAlign; /// /// The last logical block address on the device. /// If the media changes, then this field is updated. /// - EFI_LBA LastBlock; + EFI_LBA LastBlock; /// /// Only present if EFI_BLOCK_IO_PROTOCOL.Revision is greater than or equal to /// EFI_BLOCK_IO_PROTOCOL_REVISION2. Returns the first LBA is aligned to /// a physical block boundary. /// - EFI_LBA LowestAlignedLba; + EFI_LBA LowestAlignedLba; /// /// Only present if EFI_BLOCK_IO_PROTOCOL.Revision is greater than or equal to /// EFI_BLOCK_IO_PROTOCOL_REVISION2. Returns the number of logical blocks /// per physical block. /// - UINT32 LogicalBlocksPerPhysicalBlock; + UINT32 LogicalBlocksPerPhysicalBlock; /// /// Only present if EFI_BLOCK_IO_PROTOCOL.Revision is greater than or equal to /// EFI_BLOCK_IO_PROTOCOL_REVISION3. Returns the optimal transfer length /// granularity as a number of logical blocks. /// - UINT32 OptimalTransferLengthGranularity; + UINT32 OptimalTransferLengthGranularity; } EFI_BLOCK_IO_MEDIA; -#define EFI_BLOCK_IO_PROTOCOL_REVISION 0x00010000 -#define EFI_BLOCK_IO_PROTOCOL_REVISION2 0x00020001 -#define EFI_BLOCK_IO_PROTOCOL_REVISION3 0x0002001F +#define EFI_BLOCK_IO_PROTOCOL_REVISION 0x00010000 +#define EFI_BLOCK_IO_PROTOCOL_REVISION2 0x00020001 +#define EFI_BLOCK_IO_PROTOCOL_REVISION3 0x0002001F /// /// Revision defined in EFI1.1. /// -#define EFI_BLOCK_IO_INTERFACE_REVISION EFI_BLOCK_IO_PROTOCOL_REVISION +#define EFI_BLOCK_IO_INTERFACE_REVISION EFI_BLOCK_IO_PROTOCOL_REVISION /// /// This protocol provides control over block devices. @@ -217,19 +217,18 @@ struct _EFI_BLOCK_IO_PROTOCOL { /// revisions must be backwards compatible. If a future version is not /// back wards compatible, it is not the same GUID. /// - UINT64 Revision; + UINT64 Revision; /// /// Pointer to the EFI_BLOCK_IO_MEDIA data for this device. /// - EFI_BLOCK_IO_MEDIA *Media; - - EFI_BLOCK_RESET Reset; - EFI_BLOCK_READ ReadBlocks; - EFI_BLOCK_WRITE WriteBlocks; - EFI_BLOCK_FLUSH FlushBlocks; + EFI_BLOCK_IO_MEDIA *Media; + EFI_BLOCK_RESET Reset; + EFI_BLOCK_READ ReadBlocks; + EFI_BLOCK_WRITE WriteBlocks; + EFI_BLOCK_FLUSH FlushBlocks; }; -extern EFI_GUID gEfiBlockIoProtocolGuid; +extern EFI_GUID gEfiBlockIoProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/BlockIo2.h b/MdePkg/Include/Protocol/BlockIo2.h index a2868b9..d25f51f 100644 --- a/MdePkg/Include/Protocol/BlockIo2.h +++ b/MdePkg/Include/Protocol/BlockIo2.h @@ -20,27 +20,25 @@ 0xa77b2472, 0xe282, 0x4e9f, {0xa2, 0x45, 0xc2, 0xc0, 0xe2, 0x7b, 0xbc, 0xc1} \ } -typedef struct _EFI_BLOCK_IO2_PROTOCOL EFI_BLOCK_IO2_PROTOCOL; +typedef struct _EFI_BLOCK_IO2_PROTOCOL EFI_BLOCK_IO2_PROTOCOL; /** The struct of Block IO2 Token. **/ typedef struct { - /// /// If Event is NULL, then blocking I/O is performed.If Event is not NULL and /// non-blocking I/O is supported, then non-blocking I/O is performed, and /// Event will be signaled when the read request is completed. /// - EFI_EVENT Event; + EFI_EVENT Event; /// /// Defines whether or not the signaled event encountered an error. /// - EFI_STATUS TransactionStatus; + EFI_STATUS TransactionStatus; } EFI_BLOCK_IO2_TOKEN; - /** Reset the block device hardware. @@ -56,7 +54,7 @@ typedef struct { **/ typedef EFI_STATUS -(EFIAPI *EFI_BLOCK_RESET_EX) ( +(EFIAPI *EFI_BLOCK_RESET_EX)( IN EFI_BLOCK_IO2_PROTOCOL *This, IN BOOLEAN ExtendedVerification ); @@ -96,13 +94,13 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLOCK_READ_EX) ( +(EFIAPI *EFI_BLOCK_READ_EX)( IN EFI_BLOCK_IO2_PROTOCOL *This, IN UINT32 MediaId, IN EFI_LBA LBA, IN OUT EFI_BLOCK_IO2_TOKEN *Token, IN UINTN BufferSize, - OUT VOID *Buffer + OUT VOID *Buffer ); /** @@ -138,7 +136,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLOCK_WRITE_EX) ( +(EFIAPI *EFI_BLOCK_WRITE_EX)( IN EFI_BLOCK_IO2_PROTOCOL *This, IN UINT32 MediaId, IN EFI_LBA LBA, @@ -171,7 +169,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLOCK_FLUSH_EX) ( +(EFIAPI *EFI_BLOCK_FLUSH_EX)( IN EFI_BLOCK_IO2_PROTOCOL *This, IN OUT EFI_BLOCK_IO2_TOKEN *Token ); @@ -186,15 +184,14 @@ struct _EFI_BLOCK_IO2_PROTOCOL { /// A pointer to the EFI_BLOCK_IO_MEDIA data for this device. /// Type EFI_BLOCK_IO_MEDIA is defined in BlockIo.h. /// - EFI_BLOCK_IO_MEDIA *Media; + EFI_BLOCK_IO_MEDIA *Media; - EFI_BLOCK_RESET_EX Reset; - EFI_BLOCK_READ_EX ReadBlocksEx; - EFI_BLOCK_WRITE_EX WriteBlocksEx; - EFI_BLOCK_FLUSH_EX FlushBlocksEx; + EFI_BLOCK_RESET_EX Reset; + EFI_BLOCK_READ_EX ReadBlocksEx; + EFI_BLOCK_WRITE_EX WriteBlocksEx; + EFI_BLOCK_FLUSH_EX FlushBlocksEx; }; -extern EFI_GUID gEfiBlockIo2ProtocolGuid; +extern EFI_GUID gEfiBlockIo2ProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/BlockIoCrypto.h b/MdePkg/Include/Protocol/BlockIoCrypto.h index 2387771..bcc0ed4 100644 --- a/MdePkg/Include/Protocol/BlockIoCrypto.h +++ b/MdePkg/Include/Protocol/BlockIoCrypto.h @@ -20,7 +20,7 @@ 0xa00490ba, 0x3f1a, 0x4b4c, {0xab, 0x90, 0x4f, 0xa9, 0x97, 0x26, 0xa1, 0xe8} \ } -typedef struct _EFI_BLOCK_IO_CRYPTO_PROTOCOL EFI_BLOCK_IO_CRYPTO_PROTOCOL; +typedef struct _EFI_BLOCK_IO_CRYPTO_PROTOCOL EFI_BLOCK_IO_CRYPTO_PROTOCOL; /// /// The struct of Block I/O Crypto Token. @@ -32,27 +32,27 @@ typedef struct { // Event will be signaled when the read request is completed and data was // decrypted (when Index was specified). // - EFI_EVENT Event; + EFI_EVENT Event; // // Defines whether or not the signaled event encountered an error. // - EFI_STATUS TransactionStatus; + EFI_STATUS TransactionStatus; } EFI_BLOCK_IO_CRYPTO_TOKEN; typedef struct { // // GUID of the algorithm. // - EFI_GUID Algorithm; + EFI_GUID Algorithm; // // Specifies KeySizein bits used with this Algorithm. // - UINT64 KeySize; + UINT64 KeySize; // // Specifies bitmask of block sizes supported by this algorithm. // Bit j being set means that 2^j bytes crypto block size is supported. // - UINT64 CryptoBlockSizeBitMask; + UINT64 CryptoBlockSizeBitMask; } EFI_BLOCK_IO_CRYPTO_CAPABILITY; /// @@ -63,7 +63,7 @@ typedef struct { /// the Inline Cryptographic Interface. /// typedef struct { - UINT64 InputSize; + UINT64 InputSize; } EFI_BLOCK_IO_CRYPTO_IV_INPUT; #define EFI_BLOCK_IO_CRYPTO_ALGO_GUID_AES_XTS \ @@ -71,12 +71,12 @@ typedef struct { 0x2f87ba6a, 0x5c04, 0x4385, {0xa7, 0x80, 0xf3, 0xbf, 0x78, 0xa9, 0x7b, 0xec} \ } -extern EFI_GUID gEfiBlockIoCryptoAlgoAesXtsGuid; +extern EFI_GUID gEfiBlockIoCryptoAlgoAesXtsGuid; typedef struct { - EFI_BLOCK_IO_CRYPTO_IV_INPUT Header; - UINT64 CryptoBlockNumber; - UINT64 CryptoBlockByteSize; + EFI_BLOCK_IO_CRYPTO_IV_INPUT Header; + UINT64 CryptoBlockNumber; + UINT64 CryptoBlockByteSize; } EFI_BLOCK_IO_CRYPTO_IV_INPUT_AES_XTS; #define EFI_BLOCK_IO_CRYPTO_ALGO_GUID_AES_CBC_MICROSOFT_BITLOCKER \ @@ -84,33 +84,33 @@ typedef struct { 0x689e4c62, 0x70bf, 0x4cf3, {0x88, 0xbb, 0x33, 0xb3, 0x18, 0x26, 0x86, 0x70} \ } -extern EFI_GUID gEfiBlockIoCryptoAlgoAesCbcMsBitlockerGuid; +extern EFI_GUID gEfiBlockIoCryptoAlgoAesCbcMsBitlockerGuid; typedef struct { - EFI_BLOCK_IO_CRYPTO_IV_INPUT Header; - UINT64 CryptoBlockByteOffset; - UINT64 CryptoBlockByteSize; + EFI_BLOCK_IO_CRYPTO_IV_INPUT Header; + UINT64 CryptoBlockByteOffset; + UINT64 CryptoBlockByteSize; } EFI_BLOCK_IO_CRYPTO_IV_INPUT_AES_CBC_MICROSOFT_BITLOCKER; -#define EFI_BLOCK_IO_CRYPTO_INDEX_ANY 0xFFFFFFFFFFFFFFFF +#define EFI_BLOCK_IO_CRYPTO_INDEX_ANY 0xFFFFFFFFFFFFFFFF typedef struct { // // Is inline cryptographic capability supported on this device. // - BOOLEAN Supported; + BOOLEAN Supported; // // Maximum number of keys that can be configured at the same time. // - UINT64 KeyCount; + UINT64 KeyCount; // // Number of supported capabilities. // - UINT64 CapabilityCount; + UINT64 CapabilityCount; // // Array of supported capabilities. // - EFI_BLOCK_IO_CRYPTO_CAPABILITY Capabilities[1]; + EFI_BLOCK_IO_CRYPTO_CAPABILITY Capabilities[1]; } EFI_BLOCK_IO_CRYPTO_CAPABILITIES; typedef struct { @@ -118,38 +118,38 @@ typedef struct { // Configuration table index. A special Index EFI_BLOCK_IO_CRYPTO_INDEX_ANY can be // used to set any available entry in the configuration table. // - UINT64 Index; + UINT64 Index; // // Identifies the owner of the configuration table entry. Entry can also be used // with the Nil value to clear key from the configuration table index. // - EFI_GUID KeyOwnerGuid; + EFI_GUID KeyOwnerGuid; // // A supported capability to be used. The CryptoBlockSizeBitMask field of the // structure should have only one bit set from the supported mask. // - EFI_BLOCK_IO_CRYPTO_CAPABILITY Capability; + EFI_BLOCK_IO_CRYPTO_CAPABILITY Capability; // // Pointer to the key. The size of the key is defined by the KeySize field of // the capability specified by the Capability parameter. // - VOID *CryptoKey; + VOID *CryptoKey; } EFI_BLOCK_IO_CRYPTO_CONFIGURATION_TABLE_ENTRY; typedef struct { // // Configuration table index. // - UINT64 Index; + UINT64 Index; // // Identifies the current owner of the entry. // - EFI_GUID KeyOwnerGuid; + EFI_GUID KeyOwnerGuid; // // The capability to be used. The CryptoBlockSizeBitMask field of the structure // has only one bit set from the supported mask. // - EFI_BLOCK_IO_CRYPTO_CAPABILITY Capability; + EFI_BLOCK_IO_CRYPTO_CAPABILITY Capability; } EFI_BLOCK_IO_CRYPTO_RESPONSE_CONFIGURATION_ENTRY; /** @@ -179,7 +179,7 @@ typedef struct { **/ typedef EFI_STATUS -(EFIAPI *EFI_BLOCK_IO_CRYPTO_RESET) ( +(EFIAPI *EFI_BLOCK_IO_CRYPTO_RESET)( IN EFI_BLOCK_IO_CRYPTO_PROTOCOL *This, IN BOOLEAN ExtendedVerification ); @@ -212,9 +212,9 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLOCK_IO_CRYPTO_GET_CAPABILITIES) ( +(EFIAPI *EFI_BLOCK_IO_CRYPTO_GET_CAPABILITIES)( IN EFI_BLOCK_IO_CRYPTO_PROTOCOL *This, - OUT EFI_BLOCK_IO_CRYPTO_CAPABILITIES *Capabilities + OUT EFI_BLOCK_IO_CRYPTO_CAPABILITIES *Capabilities ); /** @@ -281,11 +281,11 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLOCK_IO_CRYPTO_SET_CONFIGURATION) ( +(EFIAPI *EFI_BLOCK_IO_CRYPTO_SET_CONFIGURATION)( IN EFI_BLOCK_IO_CRYPTO_PROTOCOL *This, IN UINT64 ConfigurationCount, IN EFI_BLOCK_IO_CRYPTO_CONFIGURATION_TABLE_ENTRY *ConfigurationTable, - OUT EFI_BLOCK_IO_CRYPTO_RESPONSE_CONFIGURATION_ENTRY *ResultingTable OPTIONAL + OUT EFI_BLOCK_IO_CRYPTO_RESPONSE_CONFIGURATION_ENTRY *ResultingTable OPTIONAL ); /** @@ -322,13 +322,13 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLOCK_IO_CRYPTO_GET_CONFIGURATION) ( +(EFIAPI *EFI_BLOCK_IO_CRYPTO_GET_CONFIGURATION)( IN EFI_BLOCK_IO_CRYPTO_PROTOCOL *This, IN UINT64 StartIndex, IN UINT64 ConfigurationCount, IN EFI_GUID *KeyOwnerGuid OPTIONAL, - OUT EFI_BLOCK_IO_CRYPTO_RESPONSE_CONFIGURATION_ENTRY *ConfigurationTable -); + OUT EFI_BLOCK_IO_CRYPTO_RESPONSE_CONFIGURATION_ENTRY *ConfigurationTable + ); /** Reads the requested number of blocks from the device and optionally decrypts @@ -387,13 +387,13 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLOCK_IO_CRYPTO_READ_EXTENDED) ( +(EFIAPI *EFI_BLOCK_IO_CRYPTO_READ_EXTENDED)( IN EFI_BLOCK_IO_CRYPTO_PROTOCOL *This, IN UINT32 MediaId, IN EFI_LBA LBA, IN OUT EFI_BLOCK_IO_CRYPTO_TOKEN *Token, IN UINT64 BufferSize, - OUT VOID *Buffer, + OUT VOID *Buffer, IN UINT64 *Index OPTIONAL, IN VOID *CryptoIvInput OPTIONAL ); @@ -453,7 +453,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLOCK_IO_CRYPTO_WRITE_EXTENDED) ( +(EFIAPI *EFI_BLOCK_IO_CRYPTO_WRITE_EXTENDED)( IN EFI_BLOCK_IO_CRYPTO_PROTOCOL *This, IN UINT32 MediaId, IN EFI_LBA LBA, @@ -498,7 +498,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLOCK_IO_CRYPTO_FLUSH) ( +(EFIAPI *EFI_BLOCK_IO_CRYPTO_FLUSH)( IN EFI_BLOCK_IO_CRYPTO_PROTOCOL *This, IN OUT EFI_BLOCK_IO_CRYPTO_TOKEN *Token ); @@ -508,17 +508,16 @@ EFI_STATUS /// drivers and applications to perform block encryption on a storage device, such as UFS. /// struct _EFI_BLOCK_IO_CRYPTO_PROTOCOL { - EFI_BLOCK_IO_MEDIA *Media; - EFI_BLOCK_IO_CRYPTO_RESET Reset; - EFI_BLOCK_IO_CRYPTO_GET_CAPABILITIES GetCapabilities; - EFI_BLOCK_IO_CRYPTO_SET_CONFIGURATION SetConfiguration; - EFI_BLOCK_IO_CRYPTO_GET_CONFIGURATION GetConfiguration; - EFI_BLOCK_IO_CRYPTO_READ_EXTENDED ReadExtended; - EFI_BLOCK_IO_CRYPTO_WRITE_EXTENDED WriteExtended; - EFI_BLOCK_IO_CRYPTO_FLUSH FlushBlocks; + EFI_BLOCK_IO_MEDIA *Media; + EFI_BLOCK_IO_CRYPTO_RESET Reset; + EFI_BLOCK_IO_CRYPTO_GET_CAPABILITIES GetCapabilities; + EFI_BLOCK_IO_CRYPTO_SET_CONFIGURATION SetConfiguration; + EFI_BLOCK_IO_CRYPTO_GET_CONFIGURATION GetConfiguration; + EFI_BLOCK_IO_CRYPTO_READ_EXTENDED ReadExtended; + EFI_BLOCK_IO_CRYPTO_WRITE_EXTENDED WriteExtended; + EFI_BLOCK_IO_CRYPTO_FLUSH FlushBlocks; }; -extern EFI_GUID gEfiBlockIoCryptoProtocolGuid; +extern EFI_GUID gEfiBlockIoCryptoProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/BluetoothAttribute.h b/MdePkg/Include/Protocol/BluetoothAttribute.h index 88f1258..829e666 100644 --- a/MdePkg/Include/Protocol/BluetoothAttribute.h +++ b/MdePkg/Include/Protocol/BluetoothAttribute.h @@ -32,100 +32,99 @@ typedef struct _EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL EFI_BLUETOOTH_ATTRIBUTE_PROTOCO // Bluetooth UUID // typedef struct { - UINT8 Length; + UINT8 Length; union { - UINT16 Uuid16; - UINT32 Uuid32; - UINT8 Uuid128[16]; + UINT16 Uuid16; + UINT32 Uuid32; + UINT8 Uuid128[16]; } Data; } EFI_BLUETOOTH_UUID; - #define UUID_16BIT_TYPE_LEN 2 #define UUID_32BIT_TYPE_LEN 4 #define UUID_128BIT_TYPE_LEN 16 -#define BLUETOOTH_IS_ATTRIBUTE_OF_TYPE(a,t) ((a)->Type.Length == UUID_16BIT_TYPE_LEN && (a)->Type.Data.Uuid16 == (t)) +#define BLUETOOTH_IS_ATTRIBUTE_OF_TYPE(a, t) ((a)->Type.Length == UUID_16BIT_TYPE_LEN && (a)->Type.Data.Uuid16 == (t)) // // Bluetooth Attribute Permission // typedef union { struct { - UINT16 Readable : 1; - UINT16 ReadEncryption : 1; - UINT16 ReadAuthentication : 1; - UINT16 ReadAuthorization : 1; - UINT16 ReadKeySize : 5; - UINT16 Reserved1 : 7; - UINT16 Writeable : 1; - UINT16 WriteEncryption : 1; - UINT16 WriteAuthentication : 1; - UINT16 WriteAuthorization : 1; - UINT16 WriteKeySize : 5; - UINT16 Reserved2 : 7; + UINT16 Readable : 1; + UINT16 ReadEncryption : 1; + UINT16 ReadAuthentication : 1; + UINT16 ReadAuthorization : 1; + UINT16 ReadKeySize : 5; + UINT16 Reserved1 : 7; + UINT16 Writeable : 1; + UINT16 WriteEncryption : 1; + UINT16 WriteAuthentication : 1; + UINT16 WriteAuthorization : 1; + UINT16 WriteKeySize : 5; + UINT16 Reserved2 : 7; } Permission; - UINT32 Data32; + UINT32 Data32; } EFI_BLUETOOTH_ATTRIBUTE_PERMISSION; typedef struct { - EFI_BLUETOOTH_UUID Type; - UINT16 Length; - UINT16 AttributeHandle; - EFI_BLUETOOTH_ATTRIBUTE_PERMISSION AttributePermission; + EFI_BLUETOOTH_UUID Type; + UINT16 Length; + UINT16 AttributeHandle; + EFI_BLUETOOTH_ATTRIBUTE_PERMISSION AttributePermission; } EFI_BLUETOOTH_ATTRIBUTE_HEADER; typedef struct { - EFI_BLUETOOTH_ATTRIBUTE_HEADER Header; - UINT16 EndGroupHandle; - EFI_BLUETOOTH_UUID ServiceUuid; + EFI_BLUETOOTH_ATTRIBUTE_HEADER Header; + UINT16 EndGroupHandle; + EFI_BLUETOOTH_UUID ServiceUuid; } EFI_BLUETOOTH_GATT_PRIMARY_SERVICE_INFO; typedef struct { - EFI_BLUETOOTH_ATTRIBUTE_HEADER Header; - UINT16 StartGroupHandle; - UINT16 EndGroupHandle; - EFI_BLUETOOTH_UUID ServiceUuid; + EFI_BLUETOOTH_ATTRIBUTE_HEADER Header; + UINT16 StartGroupHandle; + UINT16 EndGroupHandle; + EFI_BLUETOOTH_UUID ServiceUuid; } EFI_BLUETOOTH_GATT_INCLUDE_SERVICE_INFO; typedef struct { - EFI_BLUETOOTH_ATTRIBUTE_HEADER Header; - UINT8 CharacteristicProperties; - UINT16 CharacteristicValueHandle; - EFI_BLUETOOTH_UUID CharacteristicUuid; + EFI_BLUETOOTH_ATTRIBUTE_HEADER Header; + UINT8 CharacteristicProperties; + UINT16 CharacteristicValueHandle; + EFI_BLUETOOTH_UUID CharacteristicUuid; } EFI_BLUETOOTH_GATT_CHARACTERISTIC_INFO; typedef struct { - EFI_BLUETOOTH_ATTRIBUTE_HEADER Header; - EFI_BLUETOOTH_UUID CharacteristicDescriptorUuid; + EFI_BLUETOOTH_ATTRIBUTE_HEADER Header; + EFI_BLUETOOTH_UUID CharacteristicDescriptorUuid; } EFI_BLUETOOTH_GATT_CHARACTERISTIC_DESCRIPTOR_INFO; #pragma pack() typedef struct { - UINT16 AttributeHandle; + UINT16 AttributeHandle; } EFI_BLUETOOTH_ATTRIBUTE_CALLBACK_PARAMETER_NOTIFICATION; typedef struct { - UINT16 AttributeHandle; + UINT16 AttributeHandle; } EFI_BLUETOOTH_ATTRIBUTE_CALLBACK_PARAMETER_INDICATION; typedef struct { - UINT32 Version; - UINT8 AttributeOpCode; + UINT32 Version; + UINT8 AttributeOpCode; union { - EFI_BLUETOOTH_ATTRIBUTE_CALLBACK_PARAMETER_NOTIFICATION Notification; - EFI_BLUETOOTH_ATTRIBUTE_CALLBACK_PARAMETER_INDICATION Indication; + EFI_BLUETOOTH_ATTRIBUTE_CALLBACK_PARAMETER_NOTIFICATION Notification; + EFI_BLUETOOTH_ATTRIBUTE_CALLBACK_PARAMETER_INDICATION Indication; } Parameter; } EFI_BLUETOOTH_ATTRIBUTE_CALLBACK_PARAMETER; typedef struct { - UINT32 Version; - BLUETOOTH_LE_ADDRESS BD_ADDR; - BLUETOOTH_LE_ADDRESS DirectAddress; - UINT8 RSSI; - UINTN AdvertisementDataSize; - VOID *AdvertisementData; + UINT32 Version; + BLUETOOTH_LE_ADDRESS BD_ADDR; + BLUETOOTH_LE_ADDRESS DirectAddress; + UINT8 RSSI; + UINTN AdvertisementDataSize; + VOID *AdvertisementData; } EFI_BLUETOOTH_LE_DEVICE_INFO; /** @@ -143,7 +142,7 @@ typedef struct { **/ typedef EFI_STATUS -(EFIAPI *EFI_BLUETOOTH_ATTRIBUTE_CALLBACK_FUNCTION) ( +(EFIAPI *EFI_BLUETOOTH_ATTRIBUTE_CALLBACK_FUNCTION)( IN EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL *This, IN VOID *Data, IN UINTN DataLength, @@ -177,7 +176,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLUETOOTH_ATTRIBUTE_SEND_REQUEST) ( +(EFIAPI *EFI_BLUETOOTH_ATTRIBUTE_SEND_REQUEST)( IN EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL *This, IN VOID *Data, IN UINTN DataLength, @@ -263,15 +262,13 @@ EFI_STATUS ); struct _EFI_BLUETOOTH_ATTRIBUTE_PROTOCOL { - EFI_BLUETOOTH_ATTRIBUTE_SEND_REQUEST SendRequest; - EFI_BLUETOOTH_ATTRIBUTE_REGISTER_FOR_SERVER_NOTIFICATION RegisterForServerNotification; - EFI_BLUETOOTH_ATTRIBUTE_GET_SERVICE_INFO GetServiceInfo; - EFI_BLUETOOTH_ATTRIBUTE_GET_DEVICE_INFO GetDeviceInfo; + EFI_BLUETOOTH_ATTRIBUTE_SEND_REQUEST SendRequest; + EFI_BLUETOOTH_ATTRIBUTE_REGISTER_FOR_SERVER_NOTIFICATION RegisterForServerNotification; + EFI_BLUETOOTH_ATTRIBUTE_GET_SERVICE_INFO GetServiceInfo; + EFI_BLUETOOTH_ATTRIBUTE_GET_DEVICE_INFO GetDeviceInfo; }; - -extern EFI_GUID gEfiBluetoothAttributeProtocolGuid; -extern EFI_GUID gEfiBluetoothAttributeServiceBindingProtocolGuid; +extern EFI_GUID gEfiBluetoothAttributeProtocolGuid; +extern EFI_GUID gEfiBluetoothAttributeServiceBindingProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/BluetoothConfig.h b/MdePkg/Include/Protocol/BluetoothConfig.h index 052b860..57ff991 100644 --- a/MdePkg/Include/Protocol/BluetoothConfig.h +++ b/MdePkg/Include/Protocol/BluetoothConfig.h @@ -22,9 +22,9 @@ typedef struct _EFI_BLUETOOTH_CONFIG_PROTOCOL EFI_BLUETOOTH_CONFIG_PROTOCOL; -typedef UINT32 EFI_BLUETOOTH_CONFIG_REMOTE_DEVICE_STATE_TYPE; -#define EFI_BLUETOOTH_CONFIG_REMOTE_DEVICE_STATE_CONNECTED 0x1 -#define EFI_BLUETOOTH_CONFIG_REMOTE_DEVICE_STATE_PAIRED 0x2 +typedef UINT32 EFI_BLUETOOTH_CONFIG_REMOTE_DEVICE_STATE_TYPE; +#define EFI_BLUETOOTH_CONFIG_REMOTE_DEVICE_STATE_CONNECTED 0x1 +#define EFI_BLUETOOTH_CONFIG_REMOTE_DEVICE_STATE_PAIRED 0x2 /// /// EFI_BLUETOOTH_SCAN_CALLBACK_INFORMATION @@ -33,19 +33,19 @@ typedef struct { /// /// 48bit Bluetooth device address. /// - BLUETOOTH_ADDRESS BDAddr; + BLUETOOTH_ADDRESS BDAddr; /// /// State of the remote deive /// - UINT8 RemoteDeviceState; + UINT8 RemoteDeviceState; /// /// Bluetooth ClassOfDevice. See Bluetooth specification for detail. /// - BLUETOOTH_CLASS_OF_DEVICE ClassOfDevice; + BLUETOOTH_CLASS_OF_DEVICE ClassOfDevice; /// /// Remote device name /// - UINT8 RemoteDeviceName[BLUETOOTH_HCI_COMMAND_LOCAL_READABLE_NAME_MAX_SIZE]; + UINT8 RemoteDeviceName[BLUETOOTH_HCI_COMMAND_LOCAL_READABLE_NAME_MAX_SIZE]; } EFI_BLUETOOTH_SCAN_CALLBACK_INFORMATION; /// @@ -85,19 +85,19 @@ typedef enum { /// EfiBluetoothConfigDataTypeAvailableDeviceList, EfiBluetoothConfigDataTypeRandomAddress, /* Relevant for LE*/ - EfiBluetoothConfigDataTypeRSSI, /* Relevant for LE*/ + EfiBluetoothConfigDataTypeRSSI, /* Relevant for LE*/ /// /// Advertisement report. Data structure is UNIT8[]. /// EfiBluetoothConfigDataTypeAdvertisementData, /* Relevant for LE*/ - EfiBluetoothConfigDataTypeIoCapability, /* Relevant for LE*/ - EfiBluetoothConfigDataTypeOOBDataFlag, /* Relevant for LE*/ + EfiBluetoothConfigDataTypeIoCapability, /* Relevant for LE*/ + EfiBluetoothConfigDataTypeOOBDataFlag, /* Relevant for LE*/ /// /// KeyType of Authentication Requirements flag of local /// device as UINT8, indicating requested security properties. /// See Bluetooth specification 3.H.3.5.1. BIT0: MITM, BIT1:SC. /// - EfiBluetoothConfigDataTypeKeyType, /* Relevant for LE*/ + EfiBluetoothConfigDataTypeKeyType, /* Relevant for LE*/ EfiBluetoothConfigDataTypeEncKeySize, /* Relevant for LE*/ EfiBluetoothConfigDataTypeMax, } EFI_BLUETOOTH_CONFIG_DATA_TYPE; @@ -154,7 +154,6 @@ typedef enum { EfiBluetoothConnCallbackTypeEncrypted } EFI_BLUETOOTH_CONNECT_COMPLETE_CALLBACK_TYPE; - /** Initialize Bluetooth host controller and local device. @@ -183,7 +182,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLUETOOTH_CONFIG_SCAN_CALLBACK_FUNCTION) ( +(EFIAPI *EFI_BLUETOOTH_CONFIG_SCAN_CALLBACK_FUNCTION)( IN EFI_BLUETOOTH_CONFIG_PROTOCOL *This, IN VOID *Context, IN EFI_BLUETOOTH_SCAN_CALLBACK_INFORMATION *CallbackInfo @@ -505,19 +504,19 @@ EFI_STATUS /// This protocol abstracts user interface configuration for Bluetooth device. /// struct _EFI_BLUETOOTH_CONFIG_PROTOCOL { - EFI_BLUETOOTH_CONFIG_INIT Init; - EFI_BLUETOOTH_CONFIG_SCAN Scan; - EFI_BLUETOOTH_CONFIG_CONNECT Connect; - EFI_BLUETOOTH_CONFIG_DISCONNECT Disconnect; - EFI_BLUETOOTH_CONFIG_GET_DATA GetData; - EFI_BLUETOOTH_CONFIG_SET_DATA SetData; - EFI_BLUETOOTH_CONFIG_GET_REMOTE_DATA GetRemoteData; - EFI_BLUETOOTH_CONFIG_REGISTER_PIN_CALLBACK RegisterPinCallback; - EFI_BLUETOOTH_CONFIG_REGISTER_GET_LINK_KEY_CALLBACK RegisterGetLinkKeyCallback; - EFI_BLUETOOTH_CONFIG_REGISTER_SET_LINK_KEY_CALLBACK RegisterSetLinkKeyCallback; - EFI_BLUETOOTH_CONFIG_REGISTER_CONNECT_COMPLETE_CALLBACK RegisterLinkConnectCompleteCallback; + EFI_BLUETOOTH_CONFIG_INIT Init; + EFI_BLUETOOTH_CONFIG_SCAN Scan; + EFI_BLUETOOTH_CONFIG_CONNECT Connect; + EFI_BLUETOOTH_CONFIG_DISCONNECT Disconnect; + EFI_BLUETOOTH_CONFIG_GET_DATA GetData; + EFI_BLUETOOTH_CONFIG_SET_DATA SetData; + EFI_BLUETOOTH_CONFIG_GET_REMOTE_DATA GetRemoteData; + EFI_BLUETOOTH_CONFIG_REGISTER_PIN_CALLBACK RegisterPinCallback; + EFI_BLUETOOTH_CONFIG_REGISTER_GET_LINK_KEY_CALLBACK RegisterGetLinkKeyCallback; + EFI_BLUETOOTH_CONFIG_REGISTER_SET_LINK_KEY_CALLBACK RegisterSetLinkKeyCallback; + EFI_BLUETOOTH_CONFIG_REGISTER_CONNECT_COMPLETE_CALLBACK RegisterLinkConnectCompleteCallback; }; -extern EFI_GUID gEfiBluetoothConfigProtocolGuid; +extern EFI_GUID gEfiBluetoothConfigProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/BluetoothHc.h b/MdePkg/Include/Protocol/BluetoothHc.h index 035b272..d75cb08 100644 --- a/MdePkg/Include/Protocol/BluetoothHc.h +++ b/MdePkg/Include/Protocol/BluetoothHc.h @@ -110,7 +110,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLUETOOTH_HC_ASYNC_FUNC_CALLBACK) ( +(EFIAPI *EFI_BLUETOOTH_HC_ASYNC_FUNC_CALLBACK)( IN VOID *Data, IN UINTN DataLength, IN VOID *Context @@ -142,7 +142,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLUETOOTH_HC_ASYNC_RECEIVE_EVENT) ( +(EFIAPI *EFI_BLUETOOTH_HC_ASYNC_RECEIVE_EVENT)( IN EFI_BLUETOOTH_HC_PROTOCOL *This, IN BOOLEAN IsNewTransfer, IN UINTN PollingInterval, @@ -255,7 +255,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLUETOOTH_HC_ASYNC_RECEIVE_ACL_DATA) ( +(EFIAPI *EFI_BLUETOOTH_HC_ASYNC_RECEIVE_ACL_DATA)( IN EFI_BLUETOOTH_HC_PROTOCOL *This, IN BOOLEAN IsNewTransfer, IN UINTN PollingInterval, @@ -361,7 +361,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLUETOOTH_HC_ASYNC_RECEIVE_SCO_DATA) ( +(EFIAPI *EFI_BLUETOOTH_HC_ASYNC_RECEIVE_SCO_DATA)( IN EFI_BLUETOOTH_HC_PROTOCOL *This, IN BOOLEAN IsNewTransfer, IN UINTN PollingInterval, @@ -377,42 +377,41 @@ struct _EFI_BLUETOOTH_HC_PROTOCOL { // // Send HCI command packet. // - EFI_BLUETOOTH_HC_SEND_COMMAND SendCommand; + EFI_BLUETOOTH_HC_SEND_COMMAND SendCommand; // // Receive HCI event packets. // - EFI_BLUETOOTH_HC_RECEIVE_EVENT ReceiveEvent; + EFI_BLUETOOTH_HC_RECEIVE_EVENT ReceiveEvent; // // Non-blocking receive HCI event packets. // - EFI_BLUETOOTH_HC_ASYNC_RECEIVE_EVENT AsyncReceiveEvent; + EFI_BLUETOOTH_HC_ASYNC_RECEIVE_EVENT AsyncReceiveEvent; // // Send HCI ACL (asynchronous connection-oriented) data packets. // - EFI_BLUETOOTH_HC_SEND_ACL_DATA SendACLData; + EFI_BLUETOOTH_HC_SEND_ACL_DATA SendACLData; // // Receive HCI ACL data packets. // - EFI_BLUETOOTH_HC_RECEIVE_ACL_DATA ReceiveACLData; + EFI_BLUETOOTH_HC_RECEIVE_ACL_DATA ReceiveACLData; // // Non-blocking receive HCI ACL data packets. // - EFI_BLUETOOTH_HC_ASYNC_RECEIVE_ACL_DATA AsyncReceiveACLData; + EFI_BLUETOOTH_HC_ASYNC_RECEIVE_ACL_DATA AsyncReceiveACLData; // // Send HCI synchronous (SCO and eSCO) data packets. // - EFI_BLUETOOTH_HC_SEND_SCO_DATA SendSCOData; + EFI_BLUETOOTH_HC_SEND_SCO_DATA SendSCOData; // // Receive HCI synchronous data packets. // - EFI_BLUETOOTH_HC_RECEIVE_SCO_DATA ReceiveSCOData; + EFI_BLUETOOTH_HC_RECEIVE_SCO_DATA ReceiveSCOData; // // Non-blocking receive HCI synchronous data packets. // - EFI_BLUETOOTH_HC_ASYNC_RECEIVE_SCO_DATA AsyncReceiveSCOData; + EFI_BLUETOOTH_HC_ASYNC_RECEIVE_SCO_DATA AsyncReceiveSCOData; }; -extern EFI_GUID gEfiBluetoothHcProtocolGuid; +extern EFI_GUID gEfiBluetoothHcProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/BluetoothIo.h b/MdePkg/Include/Protocol/BluetoothIo.h index 7b9a2d6..620bfbc 100644 --- a/MdePkg/Include/Protocol/BluetoothIo.h +++ b/MdePkg/Include/Protocol/BluetoothIo.h @@ -36,31 +36,31 @@ typedef struct { /// /// The version of the structure /// - UINT32 Version; + UINT32 Version; /// /// 48bit Bluetooth device address. /// - BLUETOOTH_ADDRESS BD_ADDR; + BLUETOOTH_ADDRESS BD_ADDR; /// /// Bluetooth PageScanRepetitionMode. See Bluetooth specification for detail. /// - UINT8 PageScanRepetitionMode; + UINT8 PageScanRepetitionMode; /// /// Bluetooth ClassOfDevice. See Bluetooth specification for detail. /// - BLUETOOTH_CLASS_OF_DEVICE ClassOfDevice; + BLUETOOTH_CLASS_OF_DEVICE ClassOfDevice; /// /// Bluetooth CloseOffset. See Bluetooth specification for detail. /// - UINT16 ClockOffset; + UINT16 ClockOffset; /// /// Bluetooth RSSI. See Bluetooth specification for detail. /// - UINT8 RSSI; + UINT8 RSSI; /// /// Bluetooth ExtendedInquiryResponse. See Bluetooth specification for detail. /// - UINT8 ExtendedInquiryResponse[240]; + UINT8 ExtendedInquiryResponse[240]; } EFI_BLUETOOTH_DEVICE_INFO; /** @@ -172,7 +172,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLUETOOTH_IO_ASYNC_FUNC_CALLBACK) ( +(EFIAPI *EFI_BLUETOOTH_IO_ASYNC_FUNC_CALLBACK)( IN UINT16 ChannelID, IN VOID *Data, IN UINTN DataLength, @@ -282,7 +282,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLUETOOTH_IO_CHANNEL_SERVICE_CALLBACK) ( +(EFIAPI *EFI_BLUETOOTH_IO_CHANNEL_SERVICE_CALLBACK)( IN VOID *Data, IN UINTN DataLength, IN VOID *Context @@ -311,7 +311,7 @@ EFI_STATUS IN EFI_BLUETOOTH_IO_PROTOCOL *This, IN EFI_HANDLE Handle, IN EFI_BLUETOOTH_IO_CHANNEL_SERVICE_CALLBACK Callback, - IN VOID* Context + IN VOID *Context ); /** @@ -405,7 +405,7 @@ struct _EFI_BLUETOOTH_IO_PROTOCOL { EFI_BLUETOOTH_IO_L2CAP_REGISTER_SERVICE L2CapRegisterService; }; -extern EFI_GUID gEfiBluetoothIoServiceBindingProtocolGuid; -extern EFI_GUID gEfiBluetoothIoProtocolGuid; +extern EFI_GUID gEfiBluetoothIoServiceBindingProtocolGuid; +extern EFI_GUID gEfiBluetoothIoProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/BluetoothLeConfig.h b/MdePkg/Include/Protocol/BluetoothLeConfig.h index 5ecb45e..6331e60 100644 --- a/MdePkg/Include/Protocol/BluetoothLeConfig.h +++ b/MdePkg/Include/Protocol/BluetoothLeConfig.h @@ -47,38 +47,38 @@ typedef struct { /// structure as defined here. Future version of this specification may extend this data structure in a /// backward compatible way and increase the value of Version. /// - UINT32 Version; + UINT32 Version; /// /// Passive scanning or active scanning. See Bluetooth specification. /// - UINT8 ScanType; + UINT8 ScanType; /// /// Recommended scan interval to be used while performing scan. /// - UINT16 ScanInterval; + UINT16 ScanInterval; /// /// Recommended scan window to be used while performing a scan. /// - UINT16 ScanWindow; + UINT16 ScanWindow; /// /// Recommended scanning filter policy to be used while performing a scan. /// - UINT8 ScanningFilterPolicy; + UINT8 ScanningFilterPolicy; /// /// This is one byte flag to serve as a filter to remove unneeded scan /// result. For example, set BIT0 means scan in LE Limited Discoverable /// Mode. Set BIT1 means scan in LE General Discoverable Mode. /// - UINT8 AdvertisementFlagFilter; + UINT8 AdvertisementFlagFilter; } EFI_BLUETOOTH_LE_CONFIG_SCAN_PARAMETER; -typedef struct{ - BLUETOOTH_LE_ADDRESS BDAddr; - BLUETOOTH_LE_ADDRESS DirectAddress; - UINT8 RemoteDeviceState; - INT8 RSSI; - UINTN AdvertisementDataSize; - VOID *AdvertisementData; +typedef struct { + BLUETOOTH_LE_ADDRESS BDAddr; + BLUETOOTH_LE_ADDRESS DirectAddress; + UINT8 RemoteDeviceState; + INT8 RSSI; + UINTN AdvertisementDataSize; + VOID *AdvertisementData; } EFI_BLUETOOTH_LE_SCAN_CALLBACK_INFORMATION; /** @@ -93,7 +93,7 @@ typedef struct{ **/ typedef EFI_STATUS -(EFIAPI *EFI_BLUETOOTH_LE_CONFIG_SCAN_CALLBACK_FUNCTION) ( +(EFIAPI *EFI_BLUETOOTH_LE_CONFIG_SCAN_CALLBACK_FUNCTION)( IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN VOID *Context, IN EFI_BLUETOOTH_LE_SCAN_CALLBACK_INFORMATION *CallbackInfo @@ -141,31 +141,31 @@ typedef struct { /// extend this data structure in a backward compatible way and /// increase the value of Version. /// - UINT32 Version; + UINT32 Version; /// /// Recommended scan interval to be used while performing scan before connect. /// - UINT16 ScanInterval; + UINT16 ScanInterval; /// /// Recommended scan window to be used while performing a connection /// - UINT16 ScanWindow; + UINT16 ScanWindow; /// /// Minimum allowed connection interval. Shall be less than or equal to ConnIntervalMax. /// - UINT16 ConnIntervalMin; + UINT16 ConnIntervalMin; /// /// Maximum allowed connection interval. Shall be greater than or equal to ConnIntervalMin. /// - UINT16 ConnIntervalMax; + UINT16 ConnIntervalMax; /// /// Slave latency for the connection in number of connection events. /// - UINT16 ConnLatency; + UINT16 ConnLatency; /// /// Link supervision timeout for the connection. /// - UINT16 SupervisionTimeout; + UINT16 SupervisionTimeout; } EFI_BLUETOOTH_LE_CONFIG_CONNECT_PARAMETER; /** @@ -250,7 +250,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLUETOOTH_LE_CONFIG_GET_DATA) ( +(EFIAPI *EFI_BLUETOOTH_LE_CONFIG_GET_DATA)( IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN EFI_BLUETOOTH_CONFIG_DATA_TYPE DataType, IN OUT UINTN *DataSize, @@ -278,7 +278,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLUETOOTH_LE_CONFIG_SET_DATA) ( +(EFIAPI *EFI_BLUETOOTH_LE_CONFIG_SET_DATA)( IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN EFI_BLUETOOTH_CONFIG_DATA_TYPE DataType, IN UINTN DataSize, @@ -309,7 +309,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLUETOOTH_LE_CONFIG_GET_REMOTE_DATA) ( +(EFIAPI *EFI_BLUETOOTH_LE_CONFIG_GET_REMOTE_DATA)( IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN EFI_BLUETOOTH_CONFIG_DATA_TYPE DataType, IN BLUETOOTH_LE_ADDRESS *BDAddr, @@ -369,7 +369,7 @@ typedef enum { **/ typedef EFI_STATUS -(EFIAPI *EFI_BLUETOOTH_LE_SMP_CALLBACK) ( +(EFIAPI *EFI_BLUETOOTH_LE_SMP_CALLBACK)( IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN VOID *Context, IN BLUETOOTH_LE_ADDRESS *BDAddr, @@ -397,7 +397,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLUETOOTH_LE_REGISTER_SMP_AUTH_CALLBACK) ( +(EFIAPI *EFI_BLUETOOTH_LE_REGISTER_SMP_AUTH_CALLBACK)( IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN EFI_BLUETOOTH_LE_SMP_CALLBACK Callback, IN VOID *Context @@ -423,7 +423,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLUETOOTH_LE_SEND_SMP_AUTH_DATA) ( +(EFIAPI *EFI_BLUETOOTH_LE_SEND_SMP_AUTH_DATA)( IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN BLUETOOTH_LE_ADDRESS *BDAddr, IN EFI_BLUETOOTH_LE_SMP_EVENT_DATA_TYPE EventDataType, @@ -433,8 +433,8 @@ EFI_STATUS typedef enum { // For local device only - EfiBluetoothSmpLocalIR, /* If Key hierarchy is supported */ - EfiBluetoothSmpLocalER, /* If Key hierarchy is supported */ + EfiBluetoothSmpLocalIR, /* If Key hierarchy is supported */ + EfiBluetoothSmpLocalER, /* If Key hierarchy is supported */ EfiBluetoothSmpLocalDHK, /* If Key hierarchy is supported. OPTIONAL */ // For peer specific EfiBluetoothSmpKeysDistributed = 0x1000, @@ -446,8 +446,8 @@ typedef enum { EfiBluetoothSmpPeerRand, EfiBluetoothSmpPeerEDIV, EfiBluetoothSmpPeerSignCounter, - EfiBluetoothSmpLocalLTK, /* If Key hierarchy not supported */ - EfiBluetoothSmpLocalIRK, /* If Key hierarchy not supported */ + EfiBluetoothSmpLocalLTK, /* If Key hierarchy not supported */ + EfiBluetoothSmpLocalIRK, /* If Key hierarchy not supported */ EfiBluetoothSmpLocalCSRK, /* If Key hierarchy not supported */ EfiBluetoothSmpLocalSignCounter, EfiBluetoothSmpLocalDIV, @@ -473,7 +473,7 @@ typedef enum { **/ typedef EFI_STATUS -(EFIAPI * EFI_BLUETOOTH_LE_CONFIG_SMP_GET_DATA_CALLBACK) ( +(EFIAPI *EFI_BLUETOOTH_LE_CONFIG_SMP_GET_DATA_CALLBACK)( IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN VOID *Context, IN BLUETOOTH_LE_ADDRESS *BDAddr, @@ -499,7 +499,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI * EFI_BLUETOOTH_LE_CONFIG_REGISTER_SMP_GET_DATA_CALLBACK) ( +(EFIAPI *EFI_BLUETOOTH_LE_CONFIG_REGISTER_SMP_GET_DATA_CALLBACK)( IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN EFI_BLUETOOTH_LE_CONFIG_SMP_GET_DATA_CALLBACK Callback, IN VOID *Context @@ -521,7 +521,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI * EFI_BLUETOOTH_LE_CONFIG_SMP_SET_DATA_CALLBACK) ( +(EFIAPI *EFI_BLUETOOTH_LE_CONFIG_SMP_SET_DATA_CALLBACK)( IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN VOID *Context, IN BLUETOOTH_LE_ADDRESS *BDAddr, @@ -547,7 +547,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI * EFI_BLUETOOTH_LE_CONFIG_REGISTER_SMP_SET_DATA_CALLBACK) ( +(EFIAPI *EFI_BLUETOOTH_LE_CONFIG_REGISTER_SMP_SET_DATA_CALLBACK)( IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN EFI_BLUETOOTH_LE_CONFIG_SMP_SET_DATA_CALLBACK Callback, IN VOID *Context @@ -569,7 +569,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLUETOOTH_LE_CONFIG_CONNECT_COMPLETE_CALLBACK) ( +(EFIAPI *EFI_BLUETOOTH_LE_CONFIG_CONNECT_COMPLETE_CALLBACK)( IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN VOID *Context, IN EFI_BLUETOOTH_CONNECT_COMPLETE_CALLBACK_TYPE CallbackType, @@ -600,7 +600,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_BLUETOOTH_LE_CONFIG_REGISTER_CONNECT_COMPLETE_CALLBACK) ( +(EFIAPI *EFI_BLUETOOTH_LE_CONFIG_REGISTER_CONNECT_COMPLETE_CALLBACK)( IN EFI_BLUETOOTH_LE_CONFIG_PROTOCOL *This, IN EFI_BLUETOOTH_LE_CONFIG_CONNECT_COMPLETE_CALLBACK Callback, IN VOID *Context @@ -610,20 +610,20 @@ EFI_STATUS /// This protocol abstracts user interface configuration for BluetoothLe device. /// struct _EFI_BLUETOOTH_LE_CONFIG_PROTOCOL { - EFI_BLUETOOTH_LE_CONFIG_INIT Init; - EFI_BLUETOOTH_LE_CONFIG_SCAN Scan; - EFI_BLUETOOTH_LE_CONFIG_CONNECT Connect; - EFI_BLUETOOTH_LE_CONFIG_DISCONNECT Disconnect; - EFI_BLUETOOTH_LE_CONFIG_GET_DATA GetData; - EFI_BLUETOOTH_LE_CONFIG_SET_DATA SetData; - EFI_BLUETOOTH_LE_CONFIG_GET_REMOTE_DATA GetRemoteData; - EFI_BLUETOOTH_LE_REGISTER_SMP_AUTH_CALLBACK RegisterSmpAuthCallback; - EFI_BLUETOOTH_LE_SEND_SMP_AUTH_DATA SendSmpAuthData; - EFI_BLUETOOTH_LE_CONFIG_REGISTER_SMP_GET_DATA_CALLBACK RegisterSmpGetDataCallback; - EFI_BLUETOOTH_LE_CONFIG_REGISTER_SMP_SET_DATA_CALLBACK RegisterSmpSetDataCallback; - EFI_BLUETOOTH_LE_CONFIG_REGISTER_CONNECT_COMPLETE_CALLBACK RegisterLinkConnectCompleteCallback; + EFI_BLUETOOTH_LE_CONFIG_INIT Init; + EFI_BLUETOOTH_LE_CONFIG_SCAN Scan; + EFI_BLUETOOTH_LE_CONFIG_CONNECT Connect; + EFI_BLUETOOTH_LE_CONFIG_DISCONNECT Disconnect; + EFI_BLUETOOTH_LE_CONFIG_GET_DATA GetData; + EFI_BLUETOOTH_LE_CONFIG_SET_DATA SetData; + EFI_BLUETOOTH_LE_CONFIG_GET_REMOTE_DATA GetRemoteData; + EFI_BLUETOOTH_LE_REGISTER_SMP_AUTH_CALLBACK RegisterSmpAuthCallback; + EFI_BLUETOOTH_LE_SEND_SMP_AUTH_DATA SendSmpAuthData; + EFI_BLUETOOTH_LE_CONFIG_REGISTER_SMP_GET_DATA_CALLBACK RegisterSmpGetDataCallback; + EFI_BLUETOOTH_LE_CONFIG_REGISTER_SMP_SET_DATA_CALLBACK RegisterSmpSetDataCallback; + EFI_BLUETOOTH_LE_CONFIG_REGISTER_CONNECT_COMPLETE_CALLBACK RegisterLinkConnectCompleteCallback; }; -extern EFI_GUID gEfiBluetoothLeConfigProtocolGuid; +extern EFI_GUID gEfiBluetoothLeConfigProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/BootManagerPolicy.h b/MdePkg/Include/Protocol/BootManagerPolicy.h index 34032a3..13f1a7f 100644 --- a/MdePkg/Include/Protocol/BootManagerPolicy.h +++ b/MdePkg/Include/Protocol/BootManagerPolicy.h @@ -33,7 +33,7 @@ typedef struct _EFI_BOOT_MANAGER_POLICY_PROTOCOL EFI_BOOT_MANAGER_POLICY_PROTOCOL; -#define EFI_BOOT_MANAGER_POLICY_PROTOCOL_REVISION 0x00010000 +#define EFI_BOOT_MANAGER_POLICY_PROTOCOL_REVISION 0x00010000 /** Connect a device path following the platforms EFI Boot Manager policy. @@ -118,15 +118,15 @@ EFI_STATUS ); struct _EFI_BOOT_MANAGER_POLICY_PROTOCOL { - UINT64 Revision; - EFI_BOOT_MANAGER_POLICY_CONNECT_DEVICE_PATH ConnectDevicePath; - EFI_BOOT_MANAGER_POLICY_CONNECT_DEVICE_CLASS ConnectDeviceClass; + UINT64 Revision; + EFI_BOOT_MANAGER_POLICY_CONNECT_DEVICE_PATH ConnectDevicePath; + EFI_BOOT_MANAGER_POLICY_CONNECT_DEVICE_CLASS ConnectDeviceClass; }; -extern EFI_GUID gEfiBootManagerPolicyProtocolGuid; +extern EFI_GUID gEfiBootManagerPolicyProtocolGuid; -extern EFI_GUID gEfiBootManagerPolicyConsoleGuid; -extern EFI_GUID gEfiBootManagerPolicyNetworkGuid; -extern EFI_GUID gEfiBootManagerPolicyConnectAllGuid; +extern EFI_GUID gEfiBootManagerPolicyConsoleGuid; +extern EFI_GUID gEfiBootManagerPolicyNetworkGuid; +extern EFI_GUID gEfiBootManagerPolicyConnectAllGuid; #endif diff --git a/MdePkg/Include/Protocol/BusSpecificDriverOverride.h b/MdePkg/Include/Protocol/BusSpecificDriverOverride.h index 57894b4..869643b 100644 --- a/MdePkg/Include/Protocol/BusSpecificDriverOverride.h +++ b/MdePkg/Include/Protocol/BusSpecificDriverOverride.h @@ -22,7 +22,7 @@ 0x3bc1b285, 0x8a15, 0x4a82, {0xaa, 0xbf, 0x4d, 0x7d, 0x13, 0xfb, 0x32, 0x65 } \ } -typedef struct _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL; +typedef struct _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL; // // Prototypes for the Bus Specific Driver Override Protocol @@ -58,9 +58,9 @@ EFI_STATUS /// drivers to controllers. /// struct _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL { - EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_GET_DRIVER GetDriver; + EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_GET_DRIVER GetDriver; }; -extern EFI_GUID gEfiBusSpecificDriverOverrideProtocolGuid; +extern EFI_GUID gEfiBusSpecificDriverOverrideProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Capsule.h b/MdePkg/Include/Protocol/Capsule.h index e698278..6fcbc2c 100644 --- a/MdePkg/Include/Protocol/Capsule.h +++ b/MdePkg/Include/Protocol/Capsule.h @@ -24,6 +24,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define EFI_CAPSULE_ARCH_PROTOCOL_GUID \ { 0x5053697e, 0x2cbc, 0x4819, {0x90, 0xd9, 0x05, 0x80, 0xde, 0xee, 0x57, 0x54 }} -extern EFI_GUID gEfiCapsuleArchProtocolGuid; +extern EFI_GUID gEfiCapsuleArchProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/ComponentName.h b/MdePkg/Include/Protocol/ComponentName.h index 14c1343..46fa5e7 100644 --- a/MdePkg/Include/Protocol/ComponentName.h +++ b/MdePkg/Include/Protocol/ComponentName.h @@ -19,8 +19,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent 0x107a772c, 0xd5e1, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ } -typedef struct _EFI_COMPONENT_NAME_PROTOCOL EFI_COMPONENT_NAME_PROTOCOL; - +typedef struct _EFI_COMPONENT_NAME_PROTOCOL EFI_COMPONENT_NAME_PROTOCOL; /** Retrieves a Unicode string that is the user-readable name of the EFI Driver. @@ -52,7 +51,6 @@ EFI_STATUS OUT CHAR16 **DriverName ); - /** Retrieves a Unicode string that is the user readable name of the controller that is being managed by an EFI Driver. @@ -108,16 +106,16 @@ EFI_STATUS /// and controllers managed by UEFI Drivers. /// struct _EFI_COMPONENT_NAME_PROTOCOL { - EFI_COMPONENT_NAME_GET_DRIVER_NAME GetDriverName; - EFI_COMPONENT_NAME_GET_CONTROLLER_NAME GetControllerName; + EFI_COMPONENT_NAME_GET_DRIVER_NAME GetDriverName; + EFI_COMPONENT_NAME_GET_CONTROLLER_NAME GetControllerName; /// /// A Null-terminated ASCII string that contains one or more /// ISO 639-2 language codes. This is the list of language codes /// that this protocol supports. /// - CHAR8 *SupportedLanguages; + CHAR8 *SupportedLanguages; }; -extern EFI_GUID gEfiComponentNameProtocolGuid; +extern EFI_GUID gEfiComponentNameProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/ComponentName2.h b/MdePkg/Include/Protocol/ComponentName2.h index 1ebebfd..2fb2f83 100644 --- a/MdePkg/Include/Protocol/ComponentName2.h +++ b/MdePkg/Include/Protocol/ComponentName2.h @@ -17,8 +17,7 @@ #define EFI_COMPONENT_NAME2_PROTOCOL_GUID \ {0x6a7a5cff, 0xe8d9, 0x4f70, { 0xba, 0xda, 0x75, 0xab, 0x30, 0x25, 0xce, 0x14 } } -typedef struct _EFI_COMPONENT_NAME2_PROTOCOL EFI_COMPONENT_NAME2_PROTOCOL; - +typedef struct _EFI_COMPONENT_NAME2_PROTOCOL EFI_COMPONENT_NAME2_PROTOCOL; /** Retrieves a string that is the user readable name of @@ -64,7 +63,6 @@ EFI_STATUS OUT CHAR16 **DriverName ); - /** Retrieves a string that is the user readable name of the controller that is being managed by an EFI Driver. @@ -148,8 +146,8 @@ EFI_STATUS /// and controllers managed by UEFI Drivers. /// struct _EFI_COMPONENT_NAME2_PROTOCOL { - EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName; - EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME GetControllerName; + EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName; + EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME GetControllerName; /// /// A Null-terminated ASCII string array that contains one or more @@ -158,9 +156,9 @@ struct _EFI_COMPONENT_NAME2_PROTOCOL { /// driver is up to the driver writer. SupportedLanguages is /// specified in RFC 4646 format. /// - CHAR8 *SupportedLanguages; + CHAR8 *SupportedLanguages; }; -extern EFI_GUID gEfiComponentName2ProtocolGuid; +extern EFI_GUID gEfiComponentName2ProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Cpu.h b/MdePkg/Include/Protocol/Cpu.h index e392f4c..3d25ad0 100644 --- a/MdePkg/Include/Protocol/Cpu.h +++ b/MdePkg/Include/Protocol/Cpu.h @@ -16,7 +16,7 @@ #define EFI_CPU_ARCH_PROTOCOL_GUID \ { 0x26baccb1, 0x6f42, 0x11d4, {0xbc, 0xe7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } } -typedef struct _EFI_CPU_ARCH_PROTOCOL EFI_CPU_ARCH_PROTOCOL; +typedef struct _EFI_CPU_ARCH_PROTOCOL EFI_CPU_ARCH_PROTOCOL; /// /// The type of flush operation @@ -90,7 +90,6 @@ EFI_STATUS IN EFI_CPU_FLUSH_TYPE FlushType ); - /** This function enables interrupt processing by the processor. @@ -106,7 +105,6 @@ EFI_STATUS IN EFI_CPU_ARCH_PROTOCOL *This ); - /** This function disables interrupt processing by the processor. @@ -122,7 +120,6 @@ EFI_STATUS IN EFI_CPU_ARCH_PROTOCOL *This ); - /** This function retrieves the processor's current interrupt state a returns it in State. If interrupts are currently enabled, then TRUE is returned. If interrupts @@ -143,7 +140,6 @@ EFI_STATUS OUT BOOLEAN *State ); - /** This function generates an INIT on the processor. If this function succeeds, then the processor will be reset, and control will not be returned to the caller. If InitType is @@ -167,7 +163,6 @@ EFI_STATUS IN EFI_CPU_INIT_TYPE InitType ); - /** This function registers and enables the handler specified by InterruptHandler for a processor interrupt or exception type specified by InterruptType. If InterruptHandler is NULL, then the @@ -197,7 +192,6 @@ EFI_STATUS IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler ); - /** This function reads the processor timer specified by TimerIndex and returns it in TimerValue. @@ -224,7 +218,6 @@ EFI_STATUS OUT UINT64 *TimerPeriod OPTIONAL ); - /** This function modifies the attributes for the memory region specified by BaseAddress and Length from their current attributes to the attributes specified by Attributes. @@ -257,7 +250,6 @@ EFI_STATUS IN UINT64 Attributes ); - /// /// The EFI_CPU_ARCH_PROTOCOL is used to abstract processor-specific functions from the DXE /// Foundation. This includes flushing caches, enabling and disabling interrupts, hooking interrupt @@ -265,20 +257,20 @@ EFI_STATUS /// determining the processor frequency. /// struct _EFI_CPU_ARCH_PROTOCOL { - EFI_CPU_FLUSH_DATA_CACHE FlushDataCache; - EFI_CPU_ENABLE_INTERRUPT EnableInterrupt; - EFI_CPU_DISABLE_INTERRUPT DisableInterrupt; - EFI_CPU_GET_INTERRUPT_STATE GetInterruptState; - EFI_CPU_INIT Init; - EFI_CPU_REGISTER_INTERRUPT_HANDLER RegisterInterruptHandler; - EFI_CPU_GET_TIMER_VALUE GetTimerValue; - EFI_CPU_SET_MEMORY_ATTRIBUTES SetMemoryAttributes; + EFI_CPU_FLUSH_DATA_CACHE FlushDataCache; + EFI_CPU_ENABLE_INTERRUPT EnableInterrupt; + EFI_CPU_DISABLE_INTERRUPT DisableInterrupt; + EFI_CPU_GET_INTERRUPT_STATE GetInterruptState; + EFI_CPU_INIT Init; + EFI_CPU_REGISTER_INTERRUPT_HANDLER RegisterInterruptHandler; + EFI_CPU_GET_TIMER_VALUE GetTimerValue; + EFI_CPU_SET_MEMORY_ATTRIBUTES SetMemoryAttributes; /// /// The number of timers that are available in a processor. The value in this /// field is a constant that must not be modified after the CPU Architectural /// Protocol is installed. All consumers must treat this as a read-only field. /// - UINT32 NumberOfTimers; + UINT32 NumberOfTimers; /// /// The size, in bytes, of the alignment required for DMA buffer allocations. /// This is typically the size of the largest data cache line in the platform. @@ -286,9 +278,9 @@ struct _EFI_CPU_ARCH_PROTOCOL { /// CPU Architectural Protocol is installed. All consumers must treat this as /// a read-only field. /// - UINT32 DmaBufferAlignment; + UINT32 DmaBufferAlignment; }; -extern EFI_GUID gEfiCpuArchProtocolGuid; +extern EFI_GUID gEfiCpuArchProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/CpuIo2.h b/MdePkg/Include/Protocol/CpuIo2.h index 2eac429..39ddda6 100644 --- a/MdePkg/Include/Protocol/CpuIo2.h +++ b/MdePkg/Include/Protocol/CpuIo2.h @@ -109,11 +109,11 @@ typedef struct { /// /// This service provides the various modalities of memory and I/O read. /// - EFI_CPU_IO_PROTOCOL_IO_MEM Read; + EFI_CPU_IO_PROTOCOL_IO_MEM Read; /// /// This service provides the various modalities of memory and I/O write. /// - EFI_CPU_IO_PROTOCOL_IO_MEM Write; + EFI_CPU_IO_PROTOCOL_IO_MEM Write; } EFI_CPU_IO_PROTOCOL_ACCESS; /// @@ -124,13 +124,13 @@ struct _EFI_CPU_IO2_PROTOCOL { /// /// Enables a driver to access memory-mapped registers in the EFI system memory space. /// - EFI_CPU_IO_PROTOCOL_ACCESS Mem; + EFI_CPU_IO_PROTOCOL_ACCESS Mem; /// /// Enables a driver to access registers in the EFI CPU I/O space. /// - EFI_CPU_IO_PROTOCOL_ACCESS Io; + EFI_CPU_IO_PROTOCOL_ACCESS Io; }; -extern EFI_GUID gEfiCpuIo2ProtocolGuid; +extern EFI_GUID gEfiCpuIo2ProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/DebugPort.h b/MdePkg/Include/Protocol/DebugPort.h index d6accb5..f90a404 100644 --- a/MdePkg/Include/Protocol/DebugPort.h +++ b/MdePkg/Include/Protocol/DebugPort.h @@ -12,7 +12,6 @@ #ifndef __DEBUG_PORT_H__ #define __DEBUG_PORT_H__ - /// /// DebugPortIo protocol {EBA4E8D2-3858-41EC-A281-2647BA9660D0} /// @@ -21,7 +20,7 @@ 0xEBA4E8D2, 0x3858, 0x41EC, {0xA2, 0x81, 0x26, 0x47, 0xBA, 0x96, 0x60, 0xD0 } \ } -extern EFI_GUID gEfiDebugPortProtocolGuid; +extern EFI_GUID gEfiDebugPortProtocolGuid; typedef struct _EFI_DEBUGPORT_PROTOCOL EFI_DEBUGPORT_PROTOCOL; @@ -111,30 +110,30 @@ EFI_STATUS /// This protocol provides the communication link between the debug agent and the remote host. /// struct _EFI_DEBUGPORT_PROTOCOL { - EFI_DEBUGPORT_RESET Reset; - EFI_DEBUGPORT_WRITE Write; - EFI_DEBUGPORT_READ Read; - EFI_DEBUGPORT_POLL Poll; + EFI_DEBUGPORT_RESET Reset; + EFI_DEBUGPORT_WRITE Write; + EFI_DEBUGPORT_READ Read; + EFI_DEBUGPORT_POLL Poll; }; // // DEBUGPORT variable definitions... // -#define EFI_DEBUGPORT_VARIABLE_NAME L"DEBUGPORT" -#define EFI_DEBUGPORT_VARIABLE_GUID EFI_DEBUGPORT_PROTOCOL_GUID +#define EFI_DEBUGPORT_VARIABLE_NAME L"DEBUGPORT" +#define EFI_DEBUGPORT_VARIABLE_GUID EFI_DEBUGPORT_PROTOCOL_GUID extern EFI_GUID gEfiDebugPortVariableGuid; // // DebugPort device path definitions... // -#define DEVICE_PATH_MESSAGING_DEBUGPORT EFI_DEBUGPORT_PROTOCOL_GUID +#define DEVICE_PATH_MESSAGING_DEBUGPORT EFI_DEBUGPORT_PROTOCOL_GUID extern EFI_GUID gEfiDebugPortDevicePathGuid; typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - EFI_GUID Guid; + EFI_DEVICE_PATH_PROTOCOL Header; + EFI_GUID Guid; } DEBUGPORT_DEVICE_PATH; #endif diff --git a/MdePkg/Include/Protocol/DebugSupport.h b/MdePkg/Include/Protocol/DebugSupport.h index 7fb1d3b..ec5b92a 100644 --- a/MdePkg/Include/Protocol/DebugSupport.h +++ b/MdePkg/Include/Protocol/DebugSupport.h @@ -32,221 +32,221 @@ typedef struct _EFI_DEBUG_SUPPORT_PROTOCOL EFI_DEBUG_SUPPORT_PROTOCOL; /// Processor exception to be hooked. /// All exception types for IA32, X64, Itanium and EBC processors are defined. /// -typedef INTN EFI_EXCEPTION_TYPE; +typedef INTN EFI_EXCEPTION_TYPE; /// /// IA-32 processor exception types. /// -#define EXCEPT_IA32_DIVIDE_ERROR 0 -#define EXCEPT_IA32_DEBUG 1 -#define EXCEPT_IA32_NMI 2 -#define EXCEPT_IA32_BREAKPOINT 3 -#define EXCEPT_IA32_OVERFLOW 4 -#define EXCEPT_IA32_BOUND 5 -#define EXCEPT_IA32_INVALID_OPCODE 6 -#define EXCEPT_IA32_DOUBLE_FAULT 8 -#define EXCEPT_IA32_INVALID_TSS 10 -#define EXCEPT_IA32_SEG_NOT_PRESENT 11 -#define EXCEPT_IA32_STACK_FAULT 12 -#define EXCEPT_IA32_GP_FAULT 13 -#define EXCEPT_IA32_PAGE_FAULT 14 -#define EXCEPT_IA32_FP_ERROR 16 -#define EXCEPT_IA32_ALIGNMENT_CHECK 17 -#define EXCEPT_IA32_MACHINE_CHECK 18 -#define EXCEPT_IA32_SIMD 19 +#define EXCEPT_IA32_DIVIDE_ERROR 0 +#define EXCEPT_IA32_DEBUG 1 +#define EXCEPT_IA32_NMI 2 +#define EXCEPT_IA32_BREAKPOINT 3 +#define EXCEPT_IA32_OVERFLOW 4 +#define EXCEPT_IA32_BOUND 5 +#define EXCEPT_IA32_INVALID_OPCODE 6 +#define EXCEPT_IA32_DOUBLE_FAULT 8 +#define EXCEPT_IA32_INVALID_TSS 10 +#define EXCEPT_IA32_SEG_NOT_PRESENT 11 +#define EXCEPT_IA32_STACK_FAULT 12 +#define EXCEPT_IA32_GP_FAULT 13 +#define EXCEPT_IA32_PAGE_FAULT 14 +#define EXCEPT_IA32_FP_ERROR 16 +#define EXCEPT_IA32_ALIGNMENT_CHECK 17 +#define EXCEPT_IA32_MACHINE_CHECK 18 +#define EXCEPT_IA32_SIMD 19 /// /// FXSAVE_STATE. /// FP / MMX / XMM registers (see fxrstor instruction definition). /// typedef struct { - UINT16 Fcw; - UINT16 Fsw; - UINT16 Ftw; - UINT16 Opcode; - UINT32 Eip; - UINT16 Cs; - UINT16 Reserved1; - UINT32 DataOffset; - UINT16 Ds; - UINT8 Reserved2[10]; - UINT8 St0Mm0[10], Reserved3[6]; - UINT8 St1Mm1[10], Reserved4[6]; - UINT8 St2Mm2[10], Reserved5[6]; - UINT8 St3Mm3[10], Reserved6[6]; - UINT8 St4Mm4[10], Reserved7[6]; - UINT8 St5Mm5[10], Reserved8[6]; - UINT8 St6Mm6[10], Reserved9[6]; - UINT8 St7Mm7[10], Reserved10[6]; - UINT8 Xmm0[16]; - UINT8 Xmm1[16]; - UINT8 Xmm2[16]; - UINT8 Xmm3[16]; - UINT8 Xmm4[16]; - UINT8 Xmm5[16]; - UINT8 Xmm6[16]; - UINT8 Xmm7[16]; - UINT8 Reserved11[14 * 16]; + UINT16 Fcw; + UINT16 Fsw; + UINT16 Ftw; + UINT16 Opcode; + UINT32 Eip; + UINT16 Cs; + UINT16 Reserved1; + UINT32 DataOffset; + UINT16 Ds; + UINT8 Reserved2[10]; + UINT8 St0Mm0[10], Reserved3[6]; + UINT8 St1Mm1[10], Reserved4[6]; + UINT8 St2Mm2[10], Reserved5[6]; + UINT8 St3Mm3[10], Reserved6[6]; + UINT8 St4Mm4[10], Reserved7[6]; + UINT8 St5Mm5[10], Reserved8[6]; + UINT8 St6Mm6[10], Reserved9[6]; + UINT8 St7Mm7[10], Reserved10[6]; + UINT8 Xmm0[16]; + UINT8 Xmm1[16]; + UINT8 Xmm2[16]; + UINT8 Xmm3[16]; + UINT8 Xmm4[16]; + UINT8 Xmm5[16]; + UINT8 Xmm6[16]; + UINT8 Xmm7[16]; + UINT8 Reserved11[14 * 16]; } EFI_FX_SAVE_STATE_IA32; /// /// IA-32 processor context definition. /// typedef struct { - UINT32 ExceptionData; - EFI_FX_SAVE_STATE_IA32 FxSaveState; - UINT32 Dr0; - UINT32 Dr1; - UINT32 Dr2; - UINT32 Dr3; - UINT32 Dr6; - UINT32 Dr7; - UINT32 Cr0; - UINT32 Cr1; /* Reserved */ - UINT32 Cr2; - UINT32 Cr3; - UINT32 Cr4; - UINT32 Eflags; - UINT32 Ldtr; - UINT32 Tr; - UINT32 Gdtr[2]; - UINT32 Idtr[2]; - UINT32 Eip; - UINT32 Gs; - UINT32 Fs; - UINT32 Es; - UINT32 Ds; - UINT32 Cs; - UINT32 Ss; - UINT32 Edi; - UINT32 Esi; - UINT32 Ebp; - UINT32 Esp; - UINT32 Ebx; - UINT32 Edx; - UINT32 Ecx; - UINT32 Eax; + UINT32 ExceptionData; + EFI_FX_SAVE_STATE_IA32 FxSaveState; + UINT32 Dr0; + UINT32 Dr1; + UINT32 Dr2; + UINT32 Dr3; + UINT32 Dr6; + UINT32 Dr7; + UINT32 Cr0; + UINT32 Cr1; /* Reserved */ + UINT32 Cr2; + UINT32 Cr3; + UINT32 Cr4; + UINT32 Eflags; + UINT32 Ldtr; + UINT32 Tr; + UINT32 Gdtr[2]; + UINT32 Idtr[2]; + UINT32 Eip; + UINT32 Gs; + UINT32 Fs; + UINT32 Es; + UINT32 Ds; + UINT32 Cs; + UINT32 Ss; + UINT32 Edi; + UINT32 Esi; + UINT32 Ebp; + UINT32 Esp; + UINT32 Ebx; + UINT32 Edx; + UINT32 Ecx; + UINT32 Eax; } EFI_SYSTEM_CONTEXT_IA32; /// /// x64 processor exception types. /// -#define EXCEPT_X64_DIVIDE_ERROR 0 -#define EXCEPT_X64_DEBUG 1 -#define EXCEPT_X64_NMI 2 -#define EXCEPT_X64_BREAKPOINT 3 -#define EXCEPT_X64_OVERFLOW 4 -#define EXCEPT_X64_BOUND 5 -#define EXCEPT_X64_INVALID_OPCODE 6 -#define EXCEPT_X64_DOUBLE_FAULT 8 -#define EXCEPT_X64_INVALID_TSS 10 -#define EXCEPT_X64_SEG_NOT_PRESENT 11 -#define EXCEPT_X64_STACK_FAULT 12 -#define EXCEPT_X64_GP_FAULT 13 -#define EXCEPT_X64_PAGE_FAULT 14 -#define EXCEPT_X64_FP_ERROR 16 -#define EXCEPT_X64_ALIGNMENT_CHECK 17 -#define EXCEPT_X64_MACHINE_CHECK 18 -#define EXCEPT_X64_SIMD 19 +#define EXCEPT_X64_DIVIDE_ERROR 0 +#define EXCEPT_X64_DEBUG 1 +#define EXCEPT_X64_NMI 2 +#define EXCEPT_X64_BREAKPOINT 3 +#define EXCEPT_X64_OVERFLOW 4 +#define EXCEPT_X64_BOUND 5 +#define EXCEPT_X64_INVALID_OPCODE 6 +#define EXCEPT_X64_DOUBLE_FAULT 8 +#define EXCEPT_X64_INVALID_TSS 10 +#define EXCEPT_X64_SEG_NOT_PRESENT 11 +#define EXCEPT_X64_STACK_FAULT 12 +#define EXCEPT_X64_GP_FAULT 13 +#define EXCEPT_X64_PAGE_FAULT 14 +#define EXCEPT_X64_FP_ERROR 16 +#define EXCEPT_X64_ALIGNMENT_CHECK 17 +#define EXCEPT_X64_MACHINE_CHECK 18 +#define EXCEPT_X64_SIMD 19 /// /// FXSAVE_STATE. /// FP / MMX / XMM registers (see fxrstor instruction definition). /// typedef struct { - UINT16 Fcw; - UINT16 Fsw; - UINT16 Ftw; - UINT16 Opcode; - UINT64 Rip; - UINT64 DataOffset; - UINT8 Reserved1[8]; - UINT8 St0Mm0[10], Reserved2[6]; - UINT8 St1Mm1[10], Reserved3[6]; - UINT8 St2Mm2[10], Reserved4[6]; - UINT8 St3Mm3[10], Reserved5[6]; - UINT8 St4Mm4[10], Reserved6[6]; - UINT8 St5Mm5[10], Reserved7[6]; - UINT8 St6Mm6[10], Reserved8[6]; - UINT8 St7Mm7[10], Reserved9[6]; - UINT8 Xmm0[16]; - UINT8 Xmm1[16]; - UINT8 Xmm2[16]; - UINT8 Xmm3[16]; - UINT8 Xmm4[16]; - UINT8 Xmm5[16]; - UINT8 Xmm6[16]; - UINT8 Xmm7[16]; + UINT16 Fcw; + UINT16 Fsw; + UINT16 Ftw; + UINT16 Opcode; + UINT64 Rip; + UINT64 DataOffset; + UINT8 Reserved1[8]; + UINT8 St0Mm0[10], Reserved2[6]; + UINT8 St1Mm1[10], Reserved3[6]; + UINT8 St2Mm2[10], Reserved4[6]; + UINT8 St3Mm3[10], Reserved5[6]; + UINT8 St4Mm4[10], Reserved6[6]; + UINT8 St5Mm5[10], Reserved7[6]; + UINT8 St6Mm6[10], Reserved8[6]; + UINT8 St7Mm7[10], Reserved9[6]; + UINT8 Xmm0[16]; + UINT8 Xmm1[16]; + UINT8 Xmm2[16]; + UINT8 Xmm3[16]; + UINT8 Xmm4[16]; + UINT8 Xmm5[16]; + UINT8 Xmm6[16]; + UINT8 Xmm7[16]; // // NOTE: UEFI 2.0 spec definition as follows. // - UINT8 Reserved11[14 * 16]; + UINT8 Reserved11[14 * 16]; } EFI_FX_SAVE_STATE_X64; /// /// x64 processor context definition. /// typedef struct { - UINT64 ExceptionData; - EFI_FX_SAVE_STATE_X64 FxSaveState; - UINT64 Dr0; - UINT64 Dr1; - UINT64 Dr2; - UINT64 Dr3; - UINT64 Dr6; - UINT64 Dr7; - UINT64 Cr0; - UINT64 Cr1; /* Reserved */ - UINT64 Cr2; - UINT64 Cr3; - UINT64 Cr4; - UINT64 Cr8; - UINT64 Rflags; - UINT64 Ldtr; - UINT64 Tr; - UINT64 Gdtr[2]; - UINT64 Idtr[2]; - UINT64 Rip; - UINT64 Gs; - UINT64 Fs; - UINT64 Es; - UINT64 Ds; - UINT64 Cs; - UINT64 Ss; - UINT64 Rdi; - UINT64 Rsi; - UINT64 Rbp; - UINT64 Rsp; - UINT64 Rbx; - UINT64 Rdx; - UINT64 Rcx; - UINT64 Rax; - UINT64 R8; - UINT64 R9; - UINT64 R10; - UINT64 R11; - UINT64 R12; - UINT64 R13; - UINT64 R14; - UINT64 R15; + UINT64 ExceptionData; + EFI_FX_SAVE_STATE_X64 FxSaveState; + UINT64 Dr0; + UINT64 Dr1; + UINT64 Dr2; + UINT64 Dr3; + UINT64 Dr6; + UINT64 Dr7; + UINT64 Cr0; + UINT64 Cr1; /* Reserved */ + UINT64 Cr2; + UINT64 Cr3; + UINT64 Cr4; + UINT64 Cr8; + UINT64 Rflags; + UINT64 Ldtr; + UINT64 Tr; + UINT64 Gdtr[2]; + UINT64 Idtr[2]; + UINT64 Rip; + UINT64 Gs; + UINT64 Fs; + UINT64 Es; + UINT64 Ds; + UINT64 Cs; + UINT64 Ss; + UINT64 Rdi; + UINT64 Rsi; + UINT64 Rbp; + UINT64 Rsp; + UINT64 Rbx; + UINT64 Rdx; + UINT64 Rcx; + UINT64 Rax; + UINT64 R8; + UINT64 R9; + UINT64 R10; + UINT64 R11; + UINT64 R12; + UINT64 R13; + UINT64 R14; + UINT64 R15; } EFI_SYSTEM_CONTEXT_X64; /// /// Itanium Processor Family Exception types. /// -#define EXCEPT_IPF_VHTP_TRANSLATION 0 -#define EXCEPT_IPF_INSTRUCTION_TLB 1 -#define EXCEPT_IPF_DATA_TLB 2 -#define EXCEPT_IPF_ALT_INSTRUCTION_TLB 3 -#define EXCEPT_IPF_ALT_DATA_TLB 4 -#define EXCEPT_IPF_DATA_NESTED_TLB 5 -#define EXCEPT_IPF_INSTRUCTION_KEY_MISSED 6 -#define EXCEPT_IPF_DATA_KEY_MISSED 7 -#define EXCEPT_IPF_DIRTY_BIT 8 -#define EXCEPT_IPF_INSTRUCTION_ACCESS_BIT 9 -#define EXCEPT_IPF_DATA_ACCESS_BIT 10 -#define EXCEPT_IPF_BREAKPOINT 11 -#define EXCEPT_IPF_EXTERNAL_INTERRUPT 12 +#define EXCEPT_IPF_VHTP_TRANSLATION 0 +#define EXCEPT_IPF_INSTRUCTION_TLB 1 +#define EXCEPT_IPF_DATA_TLB 2 +#define EXCEPT_IPF_ALT_INSTRUCTION_TLB 3 +#define EXCEPT_IPF_ALT_DATA_TLB 4 +#define EXCEPT_IPF_DATA_NESTED_TLB 5 +#define EXCEPT_IPF_INSTRUCTION_KEY_MISSED 6 +#define EXCEPT_IPF_DATA_KEY_MISSED 7 +#define EXCEPT_IPF_DIRTY_BIT 8 +#define EXCEPT_IPF_INSTRUCTION_ACCESS_BIT 9 +#define EXCEPT_IPF_DATA_ACCESS_BIT 10 +#define EXCEPT_IPF_BREAKPOINT 11 +#define EXCEPT_IPF_EXTERNAL_INTERRUPT 12 // // 13 - 19 reserved // @@ -272,9 +272,9 @@ typedef struct { // // 37 - 44 reserved // -#define EXCEPT_IPF_IA32_EXCEPTION 45 -#define EXCEPT_IPF_IA32_INTERCEPT 46 -#define EXCEPT_IPF_IA32_INTERRUPT 47 +#define EXCEPT_IPF_IA32_EXCEPTION 45 +#define EXCEPT_IPF_IA32_INTERCEPT 46 +#define EXCEPT_IPF_IA32_INTERRUPT 47 /// /// IPF processor context definition. @@ -284,391 +284,387 @@ typedef struct { // The first reserved field is necessary to preserve alignment for the correct // bits in UNAT and to insure F2 is 16 byte aligned. // - UINT64 Reserved; - UINT64 R1; - UINT64 R2; - UINT64 R3; - UINT64 R4; - UINT64 R5; - UINT64 R6; - UINT64 R7; - UINT64 R8; - UINT64 R9; - UINT64 R10; - UINT64 R11; - UINT64 R12; - UINT64 R13; - UINT64 R14; - UINT64 R15; - UINT64 R16; - UINT64 R17; - UINT64 R18; - UINT64 R19; - UINT64 R20; - UINT64 R21; - UINT64 R22; - UINT64 R23; - UINT64 R24; - UINT64 R25; - UINT64 R26; - UINT64 R27; - UINT64 R28; - UINT64 R29; - UINT64 R30; - UINT64 R31; - - UINT64 F2[2]; - UINT64 F3[2]; - UINT64 F4[2]; - UINT64 F5[2]; - UINT64 F6[2]; - UINT64 F7[2]; - UINT64 F8[2]; - UINT64 F9[2]; - UINT64 F10[2]; - UINT64 F11[2]; - UINT64 F12[2]; - UINT64 F13[2]; - UINT64 F14[2]; - UINT64 F15[2]; - UINT64 F16[2]; - UINT64 F17[2]; - UINT64 F18[2]; - UINT64 F19[2]; - UINT64 F20[2]; - UINT64 F21[2]; - UINT64 F22[2]; - UINT64 F23[2]; - UINT64 F24[2]; - UINT64 F25[2]; - UINT64 F26[2]; - UINT64 F27[2]; - UINT64 F28[2]; - UINT64 F29[2]; - UINT64 F30[2]; - UINT64 F31[2]; - - UINT64 Pr; - - UINT64 B0; - UINT64 B1; - UINT64 B2; - UINT64 B3; - UINT64 B4; - UINT64 B5; - UINT64 B6; - UINT64 B7; + UINT64 Reserved; + UINT64 R1; + UINT64 R2; + UINT64 R3; + UINT64 R4; + UINT64 R5; + UINT64 R6; + UINT64 R7; + UINT64 R8; + UINT64 R9; + UINT64 R10; + UINT64 R11; + UINT64 R12; + UINT64 R13; + UINT64 R14; + UINT64 R15; + UINT64 R16; + UINT64 R17; + UINT64 R18; + UINT64 R19; + UINT64 R20; + UINT64 R21; + UINT64 R22; + UINT64 R23; + UINT64 R24; + UINT64 R25; + UINT64 R26; + UINT64 R27; + UINT64 R28; + UINT64 R29; + UINT64 R30; + UINT64 R31; + + UINT64 F2[2]; + UINT64 F3[2]; + UINT64 F4[2]; + UINT64 F5[2]; + UINT64 F6[2]; + UINT64 F7[2]; + UINT64 F8[2]; + UINT64 F9[2]; + UINT64 F10[2]; + UINT64 F11[2]; + UINT64 F12[2]; + UINT64 F13[2]; + UINT64 F14[2]; + UINT64 F15[2]; + UINT64 F16[2]; + UINT64 F17[2]; + UINT64 F18[2]; + UINT64 F19[2]; + UINT64 F20[2]; + UINT64 F21[2]; + UINT64 F22[2]; + UINT64 F23[2]; + UINT64 F24[2]; + UINT64 F25[2]; + UINT64 F26[2]; + UINT64 F27[2]; + UINT64 F28[2]; + UINT64 F29[2]; + UINT64 F30[2]; + UINT64 F31[2]; + + UINT64 Pr; + + UINT64 B0; + UINT64 B1; + UINT64 B2; + UINT64 B3; + UINT64 B4; + UINT64 B5; + UINT64 B6; + UINT64 B7; // // application registers // - UINT64 ArRsc; - UINT64 ArBsp; - UINT64 ArBspstore; - UINT64 ArRnat; + UINT64 ArRsc; + UINT64 ArBsp; + UINT64 ArBspstore; + UINT64 ArRnat; - UINT64 ArFcr; + UINT64 ArFcr; - UINT64 ArEflag; - UINT64 ArCsd; - UINT64 ArSsd; - UINT64 ArCflg; - UINT64 ArFsr; - UINT64 ArFir; - UINT64 ArFdr; + UINT64 ArEflag; + UINT64 ArCsd; + UINT64 ArSsd; + UINT64 ArCflg; + UINT64 ArFsr; + UINT64 ArFir; + UINT64 ArFdr; - UINT64 ArCcv; + UINT64 ArCcv; - UINT64 ArUnat; + UINT64 ArUnat; - UINT64 ArFpsr; + UINT64 ArFpsr; - UINT64 ArPfs; - UINT64 ArLc; - UINT64 ArEc; + UINT64 ArPfs; + UINT64 ArLc; + UINT64 ArEc; // // control registers // - UINT64 CrDcr; - UINT64 CrItm; - UINT64 CrIva; - UINT64 CrPta; - UINT64 CrIpsr; - UINT64 CrIsr; - UINT64 CrIip; - UINT64 CrIfa; - UINT64 CrItir; - UINT64 CrIipa; - UINT64 CrIfs; - UINT64 CrIim; - UINT64 CrIha; + UINT64 CrDcr; + UINT64 CrItm; + UINT64 CrIva; + UINT64 CrPta; + UINT64 CrIpsr; + UINT64 CrIsr; + UINT64 CrIip; + UINT64 CrIfa; + UINT64 CrItir; + UINT64 CrIipa; + UINT64 CrIfs; + UINT64 CrIim; + UINT64 CrIha; // // debug registers // - UINT64 Dbr0; - UINT64 Dbr1; - UINT64 Dbr2; - UINT64 Dbr3; - UINT64 Dbr4; - UINT64 Dbr5; - UINT64 Dbr6; - UINT64 Dbr7; - - UINT64 Ibr0; - UINT64 Ibr1; - UINT64 Ibr2; - UINT64 Ibr3; - UINT64 Ibr4; - UINT64 Ibr5; - UINT64 Ibr6; - UINT64 Ibr7; + UINT64 Dbr0; + UINT64 Dbr1; + UINT64 Dbr2; + UINT64 Dbr3; + UINT64 Dbr4; + UINT64 Dbr5; + UINT64 Dbr6; + UINT64 Dbr7; + + UINT64 Ibr0; + UINT64 Ibr1; + UINT64 Ibr2; + UINT64 Ibr3; + UINT64 Ibr4; + UINT64 Ibr5; + UINT64 Ibr6; + UINT64 Ibr7; // // virtual registers - nat bits for R1-R31 // - UINT64 IntNat; - + UINT64 IntNat; } EFI_SYSTEM_CONTEXT_IPF; /// /// EBC processor exception types. /// -#define EXCEPT_EBC_UNDEFINED 0 -#define EXCEPT_EBC_DIVIDE_ERROR 1 -#define EXCEPT_EBC_DEBUG 2 -#define EXCEPT_EBC_BREAKPOINT 3 -#define EXCEPT_EBC_OVERFLOW 4 -#define EXCEPT_EBC_INVALID_OPCODE 5 ///< Opcode out of range. -#define EXCEPT_EBC_STACK_FAULT 6 -#define EXCEPT_EBC_ALIGNMENT_CHECK 7 -#define EXCEPT_EBC_INSTRUCTION_ENCODING 8 ///< Malformed instruction. -#define EXCEPT_EBC_BAD_BREAK 9 ///< BREAK 0 or undefined BREAK. -#define EXCEPT_EBC_STEP 10 ///< To support debug stepping. +#define EXCEPT_EBC_UNDEFINED 0 +#define EXCEPT_EBC_DIVIDE_ERROR 1 +#define EXCEPT_EBC_DEBUG 2 +#define EXCEPT_EBC_BREAKPOINT 3 +#define EXCEPT_EBC_OVERFLOW 4 +#define EXCEPT_EBC_INVALID_OPCODE 5 ///< Opcode out of range. +#define EXCEPT_EBC_STACK_FAULT 6 +#define EXCEPT_EBC_ALIGNMENT_CHECK 7 +#define EXCEPT_EBC_INSTRUCTION_ENCODING 8 ///< Malformed instruction. +#define EXCEPT_EBC_BAD_BREAK 9 ///< BREAK 0 or undefined BREAK. +#define EXCEPT_EBC_STEP 10 ///< To support debug stepping. /// /// For coding convenience, define the maximum valid EBC exception. /// -#define MAX_EBC_EXCEPTION EXCEPT_EBC_STEP +#define MAX_EBC_EXCEPTION EXCEPT_EBC_STEP /// /// EBC processor context definition. /// typedef struct { - UINT64 R0; - UINT64 R1; - UINT64 R2; - UINT64 R3; - UINT64 R4; - UINT64 R5; - UINT64 R6; - UINT64 R7; - UINT64 Flags; - UINT64 ControlFlags; - UINT64 Ip; + UINT64 R0; + UINT64 R1; + UINT64 R2; + UINT64 R3; + UINT64 R4; + UINT64 R5; + UINT64 R6; + UINT64 R7; + UINT64 Flags; + UINT64 ControlFlags; + UINT64 Ip; } EFI_SYSTEM_CONTEXT_EBC; - - /// /// ARM processor exception types. /// -#define EXCEPT_ARM_RESET 0 -#define EXCEPT_ARM_UNDEFINED_INSTRUCTION 1 -#define EXCEPT_ARM_SOFTWARE_INTERRUPT 2 -#define EXCEPT_ARM_PREFETCH_ABORT 3 -#define EXCEPT_ARM_DATA_ABORT 4 -#define EXCEPT_ARM_RESERVED 5 -#define EXCEPT_ARM_IRQ 6 -#define EXCEPT_ARM_FIQ 7 +#define EXCEPT_ARM_RESET 0 +#define EXCEPT_ARM_UNDEFINED_INSTRUCTION 1 +#define EXCEPT_ARM_SOFTWARE_INTERRUPT 2 +#define EXCEPT_ARM_PREFETCH_ABORT 3 +#define EXCEPT_ARM_DATA_ABORT 4 +#define EXCEPT_ARM_RESERVED 5 +#define EXCEPT_ARM_IRQ 6 +#define EXCEPT_ARM_FIQ 7 /// /// For coding convenience, define the maximum valid ARM exception. /// -#define MAX_ARM_EXCEPTION EXCEPT_ARM_FIQ +#define MAX_ARM_EXCEPTION EXCEPT_ARM_FIQ /// /// ARM processor context definition. /// typedef struct { - UINT32 R0; - UINT32 R1; - UINT32 R2; - UINT32 R3; - UINT32 R4; - UINT32 R5; - UINT32 R6; - UINT32 R7; - UINT32 R8; - UINT32 R9; - UINT32 R10; - UINT32 R11; - UINT32 R12; - UINT32 SP; - UINT32 LR; - UINT32 PC; - UINT32 CPSR; - UINT32 DFSR; - UINT32 DFAR; - UINT32 IFSR; - UINT32 IFAR; + UINT32 R0; + UINT32 R1; + UINT32 R2; + UINT32 R3; + UINT32 R4; + UINT32 R5; + UINT32 R6; + UINT32 R7; + UINT32 R8; + UINT32 R9; + UINT32 R10; + UINT32 R11; + UINT32 R12; + UINT32 SP; + UINT32 LR; + UINT32 PC; + UINT32 CPSR; + UINT32 DFSR; + UINT32 DFAR; + UINT32 IFSR; + UINT32 IFAR; } EFI_SYSTEM_CONTEXT_ARM; - /// /// AARCH64 processor exception types. /// -#define EXCEPT_AARCH64_SYNCHRONOUS_EXCEPTIONS 0 -#define EXCEPT_AARCH64_IRQ 1 -#define EXCEPT_AARCH64_FIQ 2 -#define EXCEPT_AARCH64_SERROR 3 +#define EXCEPT_AARCH64_SYNCHRONOUS_EXCEPTIONS 0 +#define EXCEPT_AARCH64_IRQ 1 +#define EXCEPT_AARCH64_FIQ 2 +#define EXCEPT_AARCH64_SERROR 3 /// /// For coding convenience, define the maximum valid ARM exception. /// -#define MAX_AARCH64_EXCEPTION EXCEPT_AARCH64_SERROR +#define MAX_AARCH64_EXCEPTION EXCEPT_AARCH64_SERROR typedef struct { // General Purpose Registers - UINT64 X0; - UINT64 X1; - UINT64 X2; - UINT64 X3; - UINT64 X4; - UINT64 X5; - UINT64 X6; - UINT64 X7; - UINT64 X8; - UINT64 X9; - UINT64 X10; - UINT64 X11; - UINT64 X12; - UINT64 X13; - UINT64 X14; - UINT64 X15; - UINT64 X16; - UINT64 X17; - UINT64 X18; - UINT64 X19; - UINT64 X20; - UINT64 X21; - UINT64 X22; - UINT64 X23; - UINT64 X24; - UINT64 X25; - UINT64 X26; - UINT64 X27; - UINT64 X28; - UINT64 FP; // x29 - Frame pointer - UINT64 LR; // x30 - Link Register - UINT64 SP; // x31 - Stack pointer + UINT64 X0; + UINT64 X1; + UINT64 X2; + UINT64 X3; + UINT64 X4; + UINT64 X5; + UINT64 X6; + UINT64 X7; + UINT64 X8; + UINT64 X9; + UINT64 X10; + UINT64 X11; + UINT64 X12; + UINT64 X13; + UINT64 X14; + UINT64 X15; + UINT64 X16; + UINT64 X17; + UINT64 X18; + UINT64 X19; + UINT64 X20; + UINT64 X21; + UINT64 X22; + UINT64 X23; + UINT64 X24; + UINT64 X25; + UINT64 X26; + UINT64 X27; + UINT64 X28; + UINT64 FP; // x29 - Frame pointer + UINT64 LR; // x30 - Link Register + UINT64 SP; // x31 - Stack pointer // FP/SIMD Registers - UINT64 V0[2]; - UINT64 V1[2]; - UINT64 V2[2]; - UINT64 V3[2]; - UINT64 V4[2]; - UINT64 V5[2]; - UINT64 V6[2]; - UINT64 V7[2]; - UINT64 V8[2]; - UINT64 V9[2]; - UINT64 V10[2]; - UINT64 V11[2]; - UINT64 V12[2]; - UINT64 V13[2]; - UINT64 V14[2]; - UINT64 V15[2]; - UINT64 V16[2]; - UINT64 V17[2]; - UINT64 V18[2]; - UINT64 V19[2]; - UINT64 V20[2]; - UINT64 V21[2]; - UINT64 V22[2]; - UINT64 V23[2]; - UINT64 V24[2]; - UINT64 V25[2]; - UINT64 V26[2]; - UINT64 V27[2]; - UINT64 V28[2]; - UINT64 V29[2]; - UINT64 V30[2]; - UINT64 V31[2]; - - UINT64 ELR; // Exception Link Register - UINT64 SPSR; // Saved Processor Status Register - UINT64 FPSR; // Floating Point Status Register - UINT64 ESR; // Exception syndrome register - UINT64 FAR; // Fault Address Register + UINT64 V0[2]; + UINT64 V1[2]; + UINT64 V2[2]; + UINT64 V3[2]; + UINT64 V4[2]; + UINT64 V5[2]; + UINT64 V6[2]; + UINT64 V7[2]; + UINT64 V8[2]; + UINT64 V9[2]; + UINT64 V10[2]; + UINT64 V11[2]; + UINT64 V12[2]; + UINT64 V13[2]; + UINT64 V14[2]; + UINT64 V15[2]; + UINT64 V16[2]; + UINT64 V17[2]; + UINT64 V18[2]; + UINT64 V19[2]; + UINT64 V20[2]; + UINT64 V21[2]; + UINT64 V22[2]; + UINT64 V23[2]; + UINT64 V24[2]; + UINT64 V25[2]; + UINT64 V26[2]; + UINT64 V27[2]; + UINT64 V28[2]; + UINT64 V29[2]; + UINT64 V30[2]; + UINT64 V31[2]; + + UINT64 ELR; // Exception Link Register + UINT64 SPSR; // Saved Processor Status Register + UINT64 FPSR; // Floating Point Status Register + UINT64 ESR; // Exception syndrome register + UINT64 FAR; // Fault Address Register } EFI_SYSTEM_CONTEXT_AARCH64; /// /// RISC-V processor exception types. /// -#define EXCEPT_RISCV_INST_MISALIGNED 0 -#define EXCEPT_RISCV_INST_ACCESS_FAULT 1 -#define EXCEPT_RISCV_ILLEGAL_INST 2 -#define EXCEPT_RISCV_BREAKPOINT 3 -#define EXCEPT_RISCV_LOAD_ADDRESS_MISALIGNED 4 -#define EXCEPT_RISCV_LOAD_ACCESS_FAULT 5 -#define EXCEPT_RISCV_STORE_AMO_ADDRESS_MISALIGNED 6 -#define EXCEPT_RISCV_STORE_AMO_ACCESS_FAULT 7 -#define EXCEPT_RISCV_ENV_CALL_FROM_UMODE 8 -#define EXCEPT_RISCV_ENV_CALL_FROM_SMODE 9 -#define EXCEPT_RISCV_ENV_CALL_FROM_HMODE 10 -#define EXCEPT_RISCV_ENV_CALL_FROM_MMODE 11 - -#define EXCEPT_RISCV_SOFTWARE_INT 0x0 -#define EXCEPT_RISCV_TIMER_INT 0x1 +#define EXCEPT_RISCV_INST_MISALIGNED 0 +#define EXCEPT_RISCV_INST_ACCESS_FAULT 1 +#define EXCEPT_RISCV_ILLEGAL_INST 2 +#define EXCEPT_RISCV_BREAKPOINT 3 +#define EXCEPT_RISCV_LOAD_ADDRESS_MISALIGNED 4 +#define EXCEPT_RISCV_LOAD_ACCESS_FAULT 5 +#define EXCEPT_RISCV_STORE_AMO_ADDRESS_MISALIGNED 6 +#define EXCEPT_RISCV_STORE_AMO_ACCESS_FAULT 7 +#define EXCEPT_RISCV_ENV_CALL_FROM_UMODE 8 +#define EXCEPT_RISCV_ENV_CALL_FROM_SMODE 9 +#define EXCEPT_RISCV_ENV_CALL_FROM_HMODE 10 +#define EXCEPT_RISCV_ENV_CALL_FROM_MMODE 11 + +#define EXCEPT_RISCV_SOFTWARE_INT 0x0 +#define EXCEPT_RISCV_TIMER_INT 0x1 typedef struct { - UINT64 X0; - UINT64 X1; - UINT64 X2; - UINT64 X3; - UINT64 X4; - UINT64 X5; - UINT64 X6; - UINT64 X7; - UINT64 X8; - UINT64 X9; - UINT64 X10; - UINT64 X11; - UINT64 X12; - UINT64 X13; - UINT64 X14; - UINT64 X15; - UINT64 X16; - UINT64 X17; - UINT64 X18; - UINT64 X19; - UINT64 X20; - UINT64 X21; - UINT64 X22; - UINT64 X23; - UINT64 X24; - UINT64 X25; - UINT64 X26; - UINT64 X27; - UINT64 X28; - UINT64 X29; - UINT64 X30; - UINT64 X31; + UINT64 X0; + UINT64 X1; + UINT64 X2; + UINT64 X3; + UINT64 X4; + UINT64 X5; + UINT64 X6; + UINT64 X7; + UINT64 X8; + UINT64 X9; + UINT64 X10; + UINT64 X11; + UINT64 X12; + UINT64 X13; + UINT64 X14; + UINT64 X15; + UINT64 X16; + UINT64 X17; + UINT64 X18; + UINT64 X19; + UINT64 X20; + UINT64 X21; + UINT64 X22; + UINT64 X23; + UINT64 X24; + UINT64 X25; + UINT64 X26; + UINT64 X27; + UINT64 X28; + UINT64 X29; + UINT64 X30; + UINT64 X31; } EFI_SYSTEM_CONTEXT_RISCV64; /// /// Universal EFI_SYSTEM_CONTEXT definition. /// typedef union { - EFI_SYSTEM_CONTEXT_EBC *SystemContextEbc; - EFI_SYSTEM_CONTEXT_IA32 *SystemContextIa32; - EFI_SYSTEM_CONTEXT_X64 *SystemContextX64; - EFI_SYSTEM_CONTEXT_IPF *SystemContextIpf; - EFI_SYSTEM_CONTEXT_ARM *SystemContextArm; - EFI_SYSTEM_CONTEXT_AARCH64 *SystemContextAArch64; - EFI_SYSTEM_CONTEXT_RISCV64 *SystemContextRiscV64; + EFI_SYSTEM_CONTEXT_EBC *SystemContextEbc; + EFI_SYSTEM_CONTEXT_IA32 *SystemContextIa32; + EFI_SYSTEM_CONTEXT_X64 *SystemContextX64; + EFI_SYSTEM_CONTEXT_IPF *SystemContextIpf; + EFI_SYSTEM_CONTEXT_ARM *SystemContextArm; + EFI_SYSTEM_CONTEXT_AARCH64 *SystemContextAArch64; + EFI_SYSTEM_CONTEXT_RISCV64 *SystemContextRiscV64; } EFI_SYSTEM_CONTEXT; // @@ -705,15 +701,14 @@ VOID /// Machine type definition /// typedef enum { - IsaIa32 = IMAGE_FILE_MACHINE_I386, ///< 0x014C - IsaX64 = IMAGE_FILE_MACHINE_X64, ///< 0x8664 - IsaIpf = IMAGE_FILE_MACHINE_IA64, ///< 0x0200 - IsaEbc = IMAGE_FILE_MACHINE_EBC, ///< 0x0EBC - IsaArm = IMAGE_FILE_MACHINE_ARMTHUMB_MIXED, ///< 0x01c2 - IsaAArch64 = IMAGE_FILE_MACHINE_ARM64 ///< 0xAA64 + IsaIa32 = IMAGE_FILE_MACHINE_I386, ///< 0x014C + IsaX64 = IMAGE_FILE_MACHINE_X64, ///< 0x8664 + IsaIpf = IMAGE_FILE_MACHINE_IA64, ///< 0x0200 + IsaEbc = IMAGE_FILE_MACHINE_EBC, ///< 0x0EBC + IsaArm = IMAGE_FILE_MACHINE_ARMTHUMB_MIXED, ///< 0x01c2 + IsaAArch64 = IMAGE_FILE_MACHINE_ARM64 ///< 0xAA64 } EFI_INSTRUCTION_SET_ARCHITECTURE; - // // DebugSupport member function definitions // @@ -815,13 +810,13 @@ struct _EFI_DEBUG_SUPPORT_PROTOCOL { /// /// Declares the processor architecture for this instance of the EFI Debug Support protocol. /// - EFI_INSTRUCTION_SET_ARCHITECTURE Isa; - EFI_GET_MAXIMUM_PROCESSOR_INDEX GetMaximumProcessorIndex; - EFI_REGISTER_PERIODIC_CALLBACK RegisterPeriodicCallback; - EFI_REGISTER_EXCEPTION_CALLBACK RegisterExceptionCallback; - EFI_INVALIDATE_INSTRUCTION_CACHE InvalidateInstructionCache; + EFI_INSTRUCTION_SET_ARCHITECTURE Isa; + EFI_GET_MAXIMUM_PROCESSOR_INDEX GetMaximumProcessorIndex; + EFI_REGISTER_PERIODIC_CALLBACK RegisterPeriodicCallback; + EFI_REGISTER_EXCEPTION_CALLBACK RegisterExceptionCallback; + EFI_INVALIDATE_INSTRUCTION_CACHE InvalidateInstructionCache; }; -extern EFI_GUID gEfiDebugSupportProtocolGuid; +extern EFI_GUID gEfiDebugSupportProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Decompress.h b/MdePkg/Include/Protocol/Decompress.h index 9e6726e..964c8f6 100644 --- a/MdePkg/Include/Protocol/Decompress.h +++ b/MdePkg/Include/Protocol/Decompress.h @@ -14,7 +14,7 @@ 0xd8117cfe, 0x94a6, 0x11d4, {0x9a, 0x3a, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ } -typedef struct _EFI_DECOMPRESS_PROTOCOL EFI_DECOMPRESS_PROTOCOL; +typedef struct _EFI_DECOMPRESS_PROTOCOL EFI_DECOMPRESS_PROTOCOL; /** The GetInfo() function retrieves the size of the uncompressed buffer @@ -107,10 +107,10 @@ EFI_STATUS /// Provides a decompression service. /// struct _EFI_DECOMPRESS_PROTOCOL { - EFI_DECOMPRESS_GET_INFO GetInfo; - EFI_DECOMPRESS_DECOMPRESS Decompress; + EFI_DECOMPRESS_GET_INFO GetInfo; + EFI_DECOMPRESS_DECOMPRESS Decompress; }; -extern EFI_GUID gEfiDecompressProtocolGuid; +extern EFI_GUID gEfiDecompressProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/DeferredImageLoad.h b/MdePkg/Include/Protocol/DeferredImageLoad.h index 4a201af..61c60f4 100644 --- a/MdePkg/Include/Protocol/DeferredImageLoad.h +++ b/MdePkg/Include/Protocol/DeferredImageLoad.h @@ -22,7 +22,7 @@ 0x15853d7c, 0x3ddf, 0x43e0, { 0xa1, 0xcb, 0xeb, 0xf8, 0x5b, 0x8f, 0x87, 0x2c } \ }; -typedef struct _EFI_DEFERRED_IMAGE_LOAD_PROTOCOL EFI_DEFERRED_IMAGE_LOAD_PROTOCOL; +typedef struct _EFI_DEFERRED_IMAGE_LOAD_PROTOCOL EFI_DEFERRED_IMAGE_LOAD_PROTOCOL; /** Returns information about a deferred image. @@ -66,9 +66,9 @@ EFI_STATUS /// This protocol returns information about a deferred image. /// struct _EFI_DEFERRED_IMAGE_LOAD_PROTOCOL { - EFI_DEFERRED_IMAGE_INFO GetImageInfo; + EFI_DEFERRED_IMAGE_INFO GetImageInfo; }; -extern EFI_GUID gEfiDeferredImageLoadProtocolGuid; +extern EFI_GUID gEfiDeferredImageLoadProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/DeviceIo.h b/MdePkg/Include/Protocol/DeviceIo.h index e157997..c25b437 100644 --- a/MdePkg/Include/Protocol/DeviceIo.h +++ b/MdePkg/Include/Protocol/DeviceIo.h @@ -27,7 +27,7 @@ typedef struct _EFI_DEVICE_IO_PROTOCOL EFI_DEVICE_IO_PROTOCOL; /// /// Protocol defined in EFI1.1. /// -typedef EFI_DEVICE_IO_PROTOCOL EFI_DEVICE_IO_INTERFACE; +typedef EFI_DEVICE_IO_PROTOCOL EFI_DEVICE_IO_INTERFACE; /// /// Device IO Access Width @@ -76,8 +76,8 @@ EFI_STATUS ); typedef struct { - EFI_DEVICE_IO Read; - EFI_DEVICE_IO Write; + EFI_DEVICE_IO Read; + EFI_DEVICE_IO Write; } EFI_IO_ACCESS; /** @@ -240,23 +240,23 @@ struct _EFI_DEVICE_IO_PROTOCOL { /// /// Allows reads and writes to memory mapped I/O space. /// - EFI_IO_ACCESS Mem; + EFI_IO_ACCESS Mem; /// /// Allows reads and writes to I/O space. /// - EFI_IO_ACCESS Io; + EFI_IO_ACCESS Io; /// /// Allows reads and writes to PCI configuration space. /// - EFI_IO_ACCESS Pci; - EFI_IO_MAP Map; - EFI_PCI_DEVICE_PATH PciDevicePath; - EFI_IO_UNMAP Unmap; - EFI_IO_ALLOCATE_BUFFER AllocateBuffer; - EFI_IO_FLUSH Flush; - EFI_IO_FREE_BUFFER FreeBuffer; + EFI_IO_ACCESS Pci; + EFI_IO_MAP Map; + EFI_PCI_DEVICE_PATH PciDevicePath; + EFI_IO_UNMAP Unmap; + EFI_IO_ALLOCATE_BUFFER AllocateBuffer; + EFI_IO_FLUSH Flush; + EFI_IO_FREE_BUFFER FreeBuffer; }; -extern EFI_GUID gEfiDeviceIoProtocolGuid; +extern EFI_GUID gEfiDeviceIoProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/DevicePath.h b/MdePkg/Include/Protocol/DevicePath.h index 5914cde..9060dd7 100644 --- a/MdePkg/Include/Protocol/DevicePath.h +++ b/MdePkg/Include/Protocol/DevicePath.h @@ -41,97 +41,96 @@ SPDX-License-Identifier: BSD-2-Clause-Patent that make up the Device Path. **/ typedef struct { - UINT8 Type; ///< 0x01 Hardware Device Path. + UINT8 Type; ///< 0x01 Hardware Device Path. ///< 0x02 ACPI Device Path. ///< 0x03 Messaging Device Path. ///< 0x04 Media Device Path. ///< 0x05 BIOS Boot Specification Device Path. ///< 0x7F End of Hardware Device Path. - UINT8 SubType; ///< Varies by Type + UINT8 SubType; ///< Varies by Type ///< 0xFF End Entire Device Path, or ///< 0x01 End This Instance of a Device Path and start a new ///< Device Path. - UINT8 Length[2]; ///< Specific Device Path data. Type and Sub-Type define - ///< type of data. Size of data is included in Length. - + UINT8 Length[2]; ///< Specific Device Path data. Type and Sub-Type define + ///< type of data. Size of data is included in Length. } EFI_DEVICE_PATH_PROTOCOL; /// /// Device Path protocol definition for backward-compatible with EFI1.1. /// -typedef EFI_DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH; +typedef EFI_DEVICE_PATH_PROTOCOL EFI_DEVICE_PATH; /// /// Hardware Device Paths. /// -#define HARDWARE_DEVICE_PATH 0x01 +#define HARDWARE_DEVICE_PATH 0x01 /// /// PCI Device Path SubType. /// -#define HW_PCI_DP 0x01 +#define HW_PCI_DP 0x01 /// /// PCI Device Path. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// PCI Function Number. /// - UINT8 Function; + UINT8 Function; /// /// PCI Device Number. /// - UINT8 Device; + UINT8 Device; } PCI_DEVICE_PATH; /// /// PCCARD Device Path SubType. /// -#define HW_PCCARD_DP 0x02 +#define HW_PCCARD_DP 0x02 /// /// PCCARD Device Path. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Function Number (0 = First Function). /// - UINT8 FunctionNumber; + UINT8 FunctionNumber; } PCCARD_DEVICE_PATH; /// /// Memory Mapped Device Path SubType. /// -#define HW_MEMMAP_DP 0x03 +#define HW_MEMMAP_DP 0x03 /// /// Memory Mapped Device Path. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// EFI_MEMORY_TYPE /// - UINT32 MemoryType; + UINT32 MemoryType; /// /// Starting Memory Address. /// - EFI_PHYSICAL_ADDRESS StartingAddress; + EFI_PHYSICAL_ADDRESS StartingAddress; /// /// Ending Memory Address. /// - EFI_PHYSICAL_ADDRESS EndingAddress; + EFI_PHYSICAL_ADDRESS EndingAddress; } MEMMAP_DEVICE_PATH; /// /// Hardware Vendor Device Path SubType. /// -#define HW_VENDOR_DP 0x04 +#define HW_VENDOR_DP 0x04 /// /// The Vendor Device Path allows the creation of vendor-defined Device Paths. A vendor must @@ -139,11 +138,11 @@ typedef struct { /// contents on the n bytes that follow in the Vendor Device Path node. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Vendor-assigned GUID that defines the data that follows. /// - EFI_GUID Guid; + EFI_GUID Guid; /// /// Vendor-defined variable size data. /// @@ -152,56 +151,56 @@ typedef struct { /// /// Controller Device Path SubType. /// -#define HW_CONTROLLER_DP 0x05 +#define HW_CONTROLLER_DP 0x05 /// /// Controller Device Path. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Controller number. /// - UINT32 ControllerNumber; + UINT32 ControllerNumber; } CONTROLLER_DEVICE_PATH; /// /// BMC Device Path SubType. /// -#define HW_BMC_DP 0x06 +#define HW_BMC_DP 0x06 /// /// BMC Device Path. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Interface Type. /// - UINT8 InterfaceType; + UINT8 InterfaceType; /// /// Base Address. /// - UINT8 BaseAddress[8]; + UINT8 BaseAddress[8]; } BMC_DEVICE_PATH; /// /// ACPI Device Paths. /// -#define ACPI_DEVICE_PATH 0x02 +#define ACPI_DEVICE_PATH 0x02 /// /// ACPI Device Path SubType. /// -#define ACPI_DP 0x01 +#define ACPI_DP 0x01 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Device's PnP hardware ID stored in a numeric 32-bit /// compressed EISA-type ID. This value must match the /// corresponding _HID in the ACPI name space. /// - UINT32 HID; + UINT32 HID; /// /// Unique ID that is required by ACPI if two devices have the /// same _HID. This value must also match the corresponding @@ -209,34 +208,34 @@ typedef struct { /// numeric value type of _UID is supported. Thus, strings must /// not be used for the _UID in the ACPI name space. /// - UINT32 UID; + UINT32 UID; } ACPI_HID_DEVICE_PATH; /// /// Expanded ACPI Device Path SubType. /// -#define ACPI_EXTENDED_DP 0x02 +#define ACPI_EXTENDED_DP 0x02 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Device's PnP hardware ID stored in a numeric 32-bit /// compressed EISA-type ID. This value must match the /// corresponding _HID in the ACPI name space. /// - UINT32 HID; + UINT32 HID; /// /// Unique ID that is required by ACPI if two devices have the /// same _HID. This value must also match the corresponding /// _UID/_HID pair in the ACPI name space. /// - UINT32 UID; + UINT32 UID; /// /// Device's compatible PnP hardware ID stored in a numeric /// 32-bit compressed EISA-type ID. This value must match at /// least one of the compatible device IDs returned by the /// corresponding _CID in the ACPI name space. /// - UINT32 CID; + UINT32 CID; /// /// Optional variable length _HIDSTR. /// Optional variable length _UIDSTR. @@ -251,18 +250,18 @@ typedef struct { // bits[31:16] - binary number // Compressed ASCII is 5 bits per character 0b00001 = 'A' 0b11010 = 'Z' // -#define PNP_EISA_ID_CONST 0x41d0 -#define EISA_ID(_Name, _Num) ((UINT32)((_Name) | (_Num) << 16)) -#define EISA_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId))) -#define EFI_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId))) +#define PNP_EISA_ID_CONST 0x41d0 +#define EISA_ID(_Name, _Num) ((UINT32)((_Name) | (_Num) << 16)) +#define EISA_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId))) +#define EFI_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId))) -#define PNP_EISA_ID_MASK 0xffff -#define EISA_ID_TO_NUM(_Id) ((_Id) >> 16) +#define PNP_EISA_ID_MASK 0xffff +#define EISA_ID_TO_NUM(_Id) ((_Id) >> 16) /// /// ACPI _ADR Device Path SubType. /// -#define ACPI_ADR_DP 0x03 +#define ACPI_ADR_DP 0x03 /// /// The _ADR device path is used to contain video output device attributes to support the Graphics @@ -270,13 +269,13 @@ typedef struct { /// devices are displaying the same output. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// _ADR value. For video output devices the value of this /// field comes from Table B-2 of the ACPI 3.0 specification. At /// least one _ADR value is required. /// - UINT32 ADR; + UINT32 ADR; // // This device path may optionally contain more than one _ADR entry. // @@ -285,16 +284,16 @@ typedef struct { /// /// ACPI NVDIMM Device Path SubType. /// -#define ACPI_NVDIMM_DP 0x04 +#define ACPI_NVDIMM_DP 0x04 /// /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// NFIT Device Handle, the _ADR of the NVDIMM device. /// The value of this field comes from Section 9.20.3 of the ACPI 6.2A specification. /// - UINT32 NFITDeviceHandle; + UINT32 NFITDeviceHandle; } ACPI_NVDIMM_DEVICE_PATH; #define ACPI_ADR_DISPLAY_TYPE_OTHER 0 @@ -319,171 +318,171 @@ typedef struct { /// system. This Device Path can describe physical messaging information like SCSI ID, or abstract /// information like networking protocol IP addresses. /// -#define MESSAGING_DEVICE_PATH 0x03 +#define MESSAGING_DEVICE_PATH 0x03 /// /// ATAPI Device Path SubType /// -#define MSG_ATAPI_DP 0x01 +#define MSG_ATAPI_DP 0x01 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Set to zero for primary, or one for secondary. /// - UINT8 PrimarySecondary; + UINT8 PrimarySecondary; /// /// Set to zero for master, or one for slave mode. /// - UINT8 SlaveMaster; + UINT8 SlaveMaster; /// /// Logical Unit Number. /// - UINT16 Lun; + UINT16 Lun; } ATAPI_DEVICE_PATH; /// /// SCSI Device Path SubType. /// -#define MSG_SCSI_DP 0x02 +#define MSG_SCSI_DP 0x02 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Target ID on the SCSI bus (PUN). /// - UINT16 Pun; + UINT16 Pun; /// /// Logical Unit Number (LUN). /// - UINT16 Lun; + UINT16 Lun; } SCSI_DEVICE_PATH; /// /// Fibre Channel SubType. /// -#define MSG_FIBRECHANNEL_DP 0x03 +#define MSG_FIBRECHANNEL_DP 0x03 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Reserved for the future. /// - UINT32 Reserved; + UINT32 Reserved; /// /// Fibre Channel World Wide Number. /// - UINT64 WWN; + UINT64 WWN; /// /// Fibre Channel Logical Unit Number. /// - UINT64 Lun; + UINT64 Lun; } FIBRECHANNEL_DEVICE_PATH; /// /// Fibre Channel Ex SubType. /// -#define MSG_FIBRECHANNELEX_DP 0x15 +#define MSG_FIBRECHANNELEX_DP 0x15 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Reserved for the future. /// - UINT32 Reserved; + UINT32 Reserved; /// /// 8 byte array containing Fibre Channel End Device Port Name. /// - UINT8 WWN[8]; + UINT8 WWN[8]; /// /// 8 byte array containing Fibre Channel Logical Unit Number. /// - UINT8 Lun[8]; + UINT8 Lun[8]; } FIBRECHANNELEX_DEVICE_PATH; /// /// 1394 Device Path SubType /// -#define MSG_1394_DP 0x04 +#define MSG_1394_DP 0x04 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Reserved for the future. /// - UINT32 Reserved; + UINT32 Reserved; /// /// 1394 Global Unique ID (GUID). /// - UINT64 Guid; + UINT64 Guid; } F1394_DEVICE_PATH; /// /// USB Device Path SubType. /// -#define MSG_USB_DP 0x05 +#define MSG_USB_DP 0x05 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// USB Parent Port Number. /// - UINT8 ParentPortNumber; + UINT8 ParentPortNumber; /// /// USB Interface Number. /// - UINT8 InterfaceNumber; + UINT8 InterfaceNumber; } USB_DEVICE_PATH; /// /// USB Class Device Path SubType. /// -#define MSG_USB_CLASS_DP 0x0f +#define MSG_USB_CLASS_DP 0x0f typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Vendor ID assigned by USB-IF. A value of 0xFFFF will /// match any Vendor ID. /// - UINT16 VendorId; + UINT16 VendorId; /// /// Product ID assigned by USB-IF. A value of 0xFFFF will /// match any Product ID. /// - UINT16 ProductId; + UINT16 ProductId; /// /// The class code assigned by the USB-IF. A value of 0xFF /// will match any class code. /// - UINT8 DeviceClass; + UINT8 DeviceClass; /// /// The subclass code assigned by the USB-IF. A value of /// 0xFF will match any subclass code. /// - UINT8 DeviceSubClass; + UINT8 DeviceSubClass; /// /// The protocol code assigned by the USB-IF. A value of /// 0xFF will match any protocol code. /// - UINT8 DeviceProtocol; + UINT8 DeviceProtocol; } USB_CLASS_DEVICE_PATH; /// /// USB WWID Device Path SubType. /// -#define MSG_USB_WWID_DP 0x10 +#define MSG_USB_WWID_DP 0x10 /// /// This device path describes a USB device using its serial number. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// USB interface number. /// - UINT16 InterfaceNumber; + UINT16 InterfaceNumber; /// /// USB vendor id of the device. /// - UINT16 VendorId; + UINT16 VendorId; /// /// USB product id of the device. /// - UINT16 ProductId; + UINT16 ProductId; /// /// Last 64-or-fewer UTF-16 characters of the USB /// serial number. The length of the string is @@ -498,136 +497,136 @@ typedef struct { /// #define MSG_DEVICE_LOGICAL_UNIT_DP 0x11 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Logical Unit Number for the interface. /// - UINT8 Lun; + UINT8 Lun; } DEVICE_LOGICAL_UNIT_DEVICE_PATH; /// /// SATA Device Path SubType. /// -#define MSG_SATA_DP 0x12 +#define MSG_SATA_DP 0x12 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// The HBA port number that facilitates the connection to the /// device or a port multiplier. The value 0xFFFF is reserved. /// - UINT16 HBAPortNumber; + UINT16 HBAPortNumber; /// /// The Port multiplier port number that facilitates the connection /// to the device. Must be set to 0xFFFF if the device is directly /// connected to the HBA. /// - UINT16 PortMultiplierPortNumber; + UINT16 PortMultiplierPortNumber; /// /// Logical Unit Number. /// - UINT16 Lun; + UINT16 Lun; } SATA_DEVICE_PATH; /// /// Flag for if the device is directly connected to the HBA. /// -#define SATA_HBA_DIRECT_CONNECT_FLAG 0x8000 +#define SATA_HBA_DIRECT_CONNECT_FLAG 0x8000 /// /// I2O Device Path SubType. /// -#define MSG_I2O_DP 0x06 +#define MSG_I2O_DP 0x06 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Target ID (TID) for a device. /// - UINT32 Tid; + UINT32 Tid; } I2O_DEVICE_PATH; /// /// MAC Address Device Path SubType. /// -#define MSG_MAC_ADDR_DP 0x0b +#define MSG_MAC_ADDR_DP 0x0b typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// The MAC address for a network interface padded with 0s. /// - EFI_MAC_ADDRESS MacAddress; + EFI_MAC_ADDRESS MacAddress; /// /// Network interface type(i.e. 802.3, FDDI). /// - UINT8 IfType; + UINT8 IfType; } MAC_ADDR_DEVICE_PATH; /// /// IPv4 Device Path SubType /// -#define MSG_IPv4_DP 0x0c +#define MSG_IPv4_DP 0x0c typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// The local IPv4 address. /// - EFI_IPv4_ADDRESS LocalIpAddress; + EFI_IPv4_ADDRESS LocalIpAddress; /// /// The remote IPv4 address. /// - EFI_IPv4_ADDRESS RemoteIpAddress; + EFI_IPv4_ADDRESS RemoteIpAddress; /// /// The local port number. /// - UINT16 LocalPort; + UINT16 LocalPort; /// /// The remote port number. /// - UINT16 RemotePort; + UINT16 RemotePort; /// /// The network protocol(i.e. UDP, TCP). /// - UINT16 Protocol; + UINT16 Protocol; /// /// 0x00 - The Source IP Address was assigned though DHCP. /// 0x01 - The Source IP Address is statically bound. /// - BOOLEAN StaticIpAddress; + BOOLEAN StaticIpAddress; /// /// The gateway IP address /// - EFI_IPv4_ADDRESS GatewayIpAddress; + EFI_IPv4_ADDRESS GatewayIpAddress; /// /// The subnet mask /// - EFI_IPv4_ADDRESS SubnetMask; + EFI_IPv4_ADDRESS SubnetMask; } IPv4_DEVICE_PATH; /// /// IPv6 Device Path SubType. /// -#define MSG_IPv6_DP 0x0d +#define MSG_IPv6_DP 0x0d typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// The local IPv6 address. /// - EFI_IPv6_ADDRESS LocalIpAddress; + EFI_IPv6_ADDRESS LocalIpAddress; /// /// The remote IPv6 address. /// - EFI_IPv6_ADDRESS RemoteIpAddress; + EFI_IPv6_ADDRESS RemoteIpAddress; /// /// The local port number. /// - UINT16 LocalPort; + UINT16 LocalPort; /// /// The remote port number. /// - UINT16 RemotePort; + UINT16 RemotePort; /// /// The network protocol(i.e. UDP, TCP). /// - UINT16 Protocol; + UINT16 Protocol; /// /// 0x00 - The Local IP Address was manually configured. /// 0x01 - The Local IP Address is assigned through IPv6 @@ -635,23 +634,23 @@ typedef struct { /// 0x02 - The Local IP Address is assigned through IPv6 /// stateful configuration. /// - UINT8 IpAddressOrigin; + UINT8 IpAddressOrigin; /// /// The prefix length /// - UINT8 PrefixLength; + UINT8 PrefixLength; /// /// The gateway IP address /// - EFI_IPv6_ADDRESS GatewayIpAddress; + EFI_IPv6_ADDRESS GatewayIpAddress; } IPv6_DEVICE_PATH; /// /// InfiniBand Device Path SubType. /// -#define MSG_INFINIBAND_DP 0x09 +#define MSG_INFINIBAND_DP 0x09 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Flags to help identify/manage InfiniBand device path elements: /// Bit 0 - IOC/Service (0b = IOC, 1b = Service). @@ -661,24 +660,24 @@ typedef struct { /// Bit 4 - Network Protocol. /// All other bits are reserved. /// - UINT32 ResourceFlags; + UINT32 ResourceFlags; /// /// 128-bit Global Identifier for remote fabric port. /// - UINT8 PortGid[16]; + UINT8 PortGid[16]; /// /// 64-bit unique identifier to remote IOC or server process. /// Interpretation of field specified by Resource Flags (bit 0). /// - UINT64 ServiceId; + UINT64 ServiceId; /// /// 64-bit persistent ID of remote IOC port. /// - UINT64 TargetPortId; + UINT64 TargetPortId; /// /// 64-bit persistent ID of remote device. /// - UINT64 DeviceId; + UINT64 DeviceId; } INFINIBAND_DEVICE_PATH; #define INFINIBAND_RESOURCE_FLAG_IOC_SERVICE 0x01 @@ -690,23 +689,23 @@ typedef struct { /// /// UART Device Path SubType. /// -#define MSG_UART_DP 0x0e +#define MSG_UART_DP 0x0e typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Reserved. /// - UINT32 Reserved; + UINT32 Reserved; /// /// The baud rate setting for the UART style device. A value of 0 /// means that the device's default baud rate will be used. /// - UINT64 BaudRate; + UINT64 BaudRate; /// /// The number of data bits for the UART style device. A value /// of 0 means that the device's default number of data bits will be used. /// - UINT8 DataBits; + UINT8 DataBits; /// /// The parity setting for the UART style device. /// Parity 0x00 - Default Parity. @@ -716,7 +715,7 @@ typedef struct { /// Parity 0x04 - Mark Parity. /// Parity 0x05 - Space Parity. /// - UINT8 Parity; + UINT8 Parity; /// /// The number of stop bits for the UART style device. /// Stop Bits 0x00 - Default Stop Bits. @@ -724,205 +723,205 @@ typedef struct { /// Stop Bits 0x02 - 1.5 Stop Bits. /// Stop Bits 0x03 - 2 Stop Bits. /// - UINT8 StopBits; + UINT8 StopBits; } UART_DEVICE_PATH; /// /// NVDIMM Namespace Device Path SubType. /// -#define NVDIMM_NAMESPACE_DP 0x20 +#define NVDIMM_NAMESPACE_DP 0x20 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Namespace unique label identifier UUID. /// - EFI_GUID Uuid; + EFI_GUID Uuid; } NVDIMM_NAMESPACE_DEVICE_PATH; // // Use VENDOR_DEVICE_PATH struct // -#define MSG_VENDOR_DP 0x0a -typedef VENDOR_DEVICE_PATH VENDOR_DEFINED_DEVICE_PATH; +#define MSG_VENDOR_DP 0x0a +typedef VENDOR_DEVICE_PATH VENDOR_DEFINED_DEVICE_PATH; -#define DEVICE_PATH_MESSAGING_PC_ANSI EFI_PC_ANSI_GUID -#define DEVICE_PATH_MESSAGING_VT_100 EFI_VT_100_GUID -#define DEVICE_PATH_MESSAGING_VT_100_PLUS EFI_VT_100_PLUS_GUID -#define DEVICE_PATH_MESSAGING_VT_UTF8 EFI_VT_UTF8_GUID +#define DEVICE_PATH_MESSAGING_PC_ANSI EFI_PC_ANSI_GUID +#define DEVICE_PATH_MESSAGING_VT_100 EFI_VT_100_GUID +#define DEVICE_PATH_MESSAGING_VT_100_PLUS EFI_VT_100_PLUS_GUID +#define DEVICE_PATH_MESSAGING_VT_UTF8 EFI_VT_UTF8_GUID /// /// A new device path node is defined to declare flow control characteristics. /// UART Flow Control Messaging Device Path /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL GUID. /// - EFI_GUID Guid; + EFI_GUID Guid; /// /// Bitmap of supported flow control types. /// Bit 0 set indicates hardware flow control. /// Bit 1 set indicates Xon/Xoff flow control. /// All other bits are reserved and are clear. /// - UINT32 FlowControlMap; + UINT32 FlowControlMap; } UART_FLOW_CONTROL_DEVICE_PATH; -#define UART_FLOW_CONTROL_HARDWARE 0x00000001 -#define UART_FLOW_CONTROL_XON_XOFF 0x00000010 +#define UART_FLOW_CONTROL_HARDWARE 0x00000001 +#define UART_FLOW_CONTROL_XON_XOFF 0x00000010 -#define DEVICE_PATH_MESSAGING_SAS EFI_SAS_DEVICE_PATH_GUID +#define DEVICE_PATH_MESSAGING_SAS EFI_SAS_DEVICE_PATH_GUID /// /// Serial Attached SCSI (SAS) Device Path. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// DEVICE_PATH_MESSAGING_SAS GUID. /// - EFI_GUID Guid; + EFI_GUID Guid; /// /// Reserved for future use. /// - UINT32 Reserved; + UINT32 Reserved; /// /// SAS Address for Serial Attached SCSI Target. /// - UINT64 SasAddress; + UINT64 SasAddress; /// /// SAS Logical Unit Number. /// - UINT64 Lun; + UINT64 Lun; /// /// More Information about the device and its interconnect. /// - UINT16 DeviceTopology; + UINT16 DeviceTopology; /// /// Relative Target Port (RTP). /// - UINT16 RelativeTargetPort; + UINT16 RelativeTargetPort; } SAS_DEVICE_PATH; /// /// Serial Attached SCSI (SAS) Ex Device Path SubType /// -#define MSG_SASEX_DP 0x16 +#define MSG_SASEX_DP 0x16 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// 8-byte array of the SAS Address for Serial Attached SCSI Target Port. /// - UINT8 SasAddress[8]; + UINT8 SasAddress[8]; /// /// 8-byte array of the SAS Logical Unit Number. /// - UINT8 Lun[8]; + UINT8 Lun[8]; /// /// More Information about the device and its interconnect. /// - UINT16 DeviceTopology; + UINT16 DeviceTopology; /// /// Relative Target Port (RTP). /// - UINT16 RelativeTargetPort; + UINT16 RelativeTargetPort; } SASEX_DEVICE_PATH; /// /// NvmExpress Namespace Device Path SubType. /// -#define MSG_NVME_NAMESPACE_DP 0x17 +#define MSG_NVME_NAMESPACE_DP 0x17 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - UINT32 NamespaceId; - UINT64 NamespaceUuid; + EFI_DEVICE_PATH_PROTOCOL Header; + UINT32 NamespaceId; + UINT64 NamespaceUuid; } NVME_NAMESPACE_DEVICE_PATH; /// /// DNS Device Path SubType /// -#define MSG_DNS_DP 0x1F +#define MSG_DNS_DP 0x1F typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Indicates the DNS server address is IPv4 or IPv6 address. /// - UINT8 IsIPv6; + UINT8 IsIPv6; /// /// Instance of the DNS server address. /// - EFI_IP_ADDRESS DnsServerIp[]; + EFI_IP_ADDRESS DnsServerIp[]; } DNS_DEVICE_PATH; /// /// Uniform Resource Identifiers (URI) Device Path SubType /// -#define MSG_URI_DP 0x18 +#define MSG_URI_DP 0x18 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Instance of the URI pursuant to RFC 3986. /// - CHAR8 Uri[]; + CHAR8 Uri[]; } URI_DEVICE_PATH; /// /// Universal Flash Storage (UFS) Device Path SubType. /// -#define MSG_UFS_DP 0x19 +#define MSG_UFS_DP 0x19 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Target ID on the UFS bus (PUN). /// - UINT8 Pun; + UINT8 Pun; /// /// Logical Unit Number (LUN). /// - UINT8 Lun; + UINT8 Lun; } UFS_DEVICE_PATH; /// /// SD (Secure Digital) Device Path SubType. /// -#define MSG_SD_DP 0x1A +#define MSG_SD_DP 0x1A typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - UINT8 SlotNumber; + EFI_DEVICE_PATH_PROTOCOL Header; + UINT8 SlotNumber; } SD_DEVICE_PATH; /// /// EMMC (Embedded MMC) Device Path SubType. /// -#define MSG_EMMC_DP 0x1D +#define MSG_EMMC_DP 0x1D typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - UINT8 SlotNumber; + EFI_DEVICE_PATH_PROTOCOL Header; + UINT8 SlotNumber; } EMMC_DEVICE_PATH; /// /// iSCSI Device Path SubType /// -#define MSG_ISCSI_DP 0x13 +#define MSG_ISCSI_DP 0x13 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Network Protocol (0 = TCP, 1+ = reserved). /// - UINT16 NetworkProtocol; + UINT16 NetworkProtocol; /// /// iSCSI Login Options. /// - UINT16 LoginOption; + UINT16 LoginOption; /// /// iSCSI Logical Unit Number. /// - UINT64 Lun; + UINT64 Lun; /// /// iSCSI Target Portal group tag the initiator intends /// to establish a session with. /// - UINT16 TargetPortalGroupTag; + UINT16 TargetPortalGroupTag; /// /// iSCSI NodeTarget Name. The length of the name /// is determined by subtracting the offset of this field from Length. @@ -930,90 +929,90 @@ typedef struct { /// CHAR8 iSCSI Target Name. } ISCSI_DEVICE_PATH; -#define ISCSI_LOGIN_OPTION_NO_HEADER_DIGEST 0x0000 -#define ISCSI_LOGIN_OPTION_HEADER_DIGEST_USING_CRC32C 0x0002 -#define ISCSI_LOGIN_OPTION_NO_DATA_DIGEST 0x0000 -#define ISCSI_LOGIN_OPTION_DATA_DIGEST_USING_CRC32C 0x0008 -#define ISCSI_LOGIN_OPTION_AUTHMETHOD_CHAP 0x0000 -#define ISCSI_LOGIN_OPTION_AUTHMETHOD_NON 0x1000 -#define ISCSI_LOGIN_OPTION_CHAP_BI 0x0000 -#define ISCSI_LOGIN_OPTION_CHAP_UNI 0x2000 +#define ISCSI_LOGIN_OPTION_NO_HEADER_DIGEST 0x0000 +#define ISCSI_LOGIN_OPTION_HEADER_DIGEST_USING_CRC32C 0x0002 +#define ISCSI_LOGIN_OPTION_NO_DATA_DIGEST 0x0000 +#define ISCSI_LOGIN_OPTION_DATA_DIGEST_USING_CRC32C 0x0008 +#define ISCSI_LOGIN_OPTION_AUTHMETHOD_CHAP 0x0000 +#define ISCSI_LOGIN_OPTION_AUTHMETHOD_NON 0x1000 +#define ISCSI_LOGIN_OPTION_CHAP_BI 0x0000 +#define ISCSI_LOGIN_OPTION_CHAP_UNI 0x2000 /// /// VLAN Device Path SubType. /// -#define MSG_VLAN_DP 0x14 +#define MSG_VLAN_DP 0x14 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// VLAN identifier (0-4094). /// - UINT16 VlanId; + UINT16 VlanId; } VLAN_DEVICE_PATH; /// /// Bluetooth Device Path SubType. /// -#define MSG_BLUETOOTH_DP 0x1b +#define MSG_BLUETOOTH_DP 0x1b typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// 48bit Bluetooth device address. /// - BLUETOOTH_ADDRESS BD_ADDR; + BLUETOOTH_ADDRESS BD_ADDR; } BLUETOOTH_DEVICE_PATH; /// /// Wi-Fi Device Path SubType. /// -#define MSG_WIFI_DP 0x1C +#define MSG_WIFI_DP 0x1C typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Service set identifier. A 32-byte octets string. /// - UINT8 SSId[32]; + UINT8 SSId[32]; } WIFI_DEVICE_PATH; /// /// Bluetooth LE Device Path SubType. /// -#define MSG_BLUETOOTH_LE_DP 0x1E +#define MSG_BLUETOOTH_LE_DP 0x1E typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - BLUETOOTH_LE_ADDRESS Address; + EFI_DEVICE_PATH_PROTOCOL Header; + BLUETOOTH_LE_ADDRESS Address; } BLUETOOTH_LE_DEVICE_PATH; // // Media Device Path // -#define MEDIA_DEVICE_PATH 0x04 +#define MEDIA_DEVICE_PATH 0x04 /// /// Hard Drive Media Device Path SubType. /// -#define MEDIA_HARDDRIVE_DP 0x01 +#define MEDIA_HARDDRIVE_DP 0x01 /// /// The Hard Drive Media Device Path is used to represent a partition on a hard drive. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Describes the entry in a partition table, starting with entry 1. /// Partition number zero represents the entire device. Valid /// partition numbers for a MBR partition are [1, 4]. Valid /// partition numbers for a GPT partition are [1, NumberOfPartitionEntries]. /// - UINT32 PartitionNumber; + UINT32 PartitionNumber; /// /// Starting LBA of the partition on the hard drive. /// - UINT64 PartitionStart; + UINT64 PartitionStart; /// /// Size of the partition in units of Logical Blocks. /// - UINT64 PartitionSize; + UINT64 PartitionSize; /// /// Signature unique to this partition: /// If SignatureType is 0, this field has to be initialized with 16 zeros. @@ -1021,68 +1020,68 @@ typedef struct { /// The other 12 bytes are initialized with zeros. /// If SignatureType is 2, this field contains a 16 byte signature. /// - UINT8 Signature[16]; + UINT8 Signature[16]; /// /// Partition Format: (Unused values reserved). /// 0x01 - PC-AT compatible legacy MBR. /// 0x02 - GUID Partition Table. /// - UINT8 MBRType; + UINT8 MBRType; /// /// Type of Disk Signature: (Unused values reserved). /// 0x00 - No Disk Signature. /// 0x01 - 32-bit signature from address 0x1b8 of the type 0x01 MBR. /// 0x02 - GUID signature. /// - UINT8 SignatureType; + UINT8 SignatureType; } HARDDRIVE_DEVICE_PATH; -#define MBR_TYPE_PCAT 0x01 -#define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02 +#define MBR_TYPE_PCAT 0x01 +#define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02 -#define NO_DISK_SIGNATURE 0x00 -#define SIGNATURE_TYPE_MBR 0x01 -#define SIGNATURE_TYPE_GUID 0x02 +#define NO_DISK_SIGNATURE 0x00 +#define SIGNATURE_TYPE_MBR 0x01 +#define SIGNATURE_TYPE_GUID 0x02 /// /// CD-ROM Media Device Path SubType. /// -#define MEDIA_CDROM_DP 0x02 +#define MEDIA_CDROM_DP 0x02 /// /// The CD-ROM Media Device Path is used to define a system partition that exists on a CD-ROM. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Boot Entry number from the Boot Catalog. The Initial/Default entry is defined as zero. /// - UINT32 BootEntry; + UINT32 BootEntry; /// /// Starting RBA of the partition on the medium. CD-ROMs use Relative logical Block Addressing. /// - UINT64 PartitionStart; + UINT64 PartitionStart; /// /// Size of the partition in units of Blocks, also called Sectors. /// - UINT64 PartitionSize; + UINT64 PartitionSize; } CDROM_DEVICE_PATH; // // Use VENDOR_DEVICE_PATH struct // -#define MEDIA_VENDOR_DP 0x03 ///< Media vendor device path subtype. +#define MEDIA_VENDOR_DP 0x03 ///< Media vendor device path subtype. /// /// File Path Media Device Path SubType /// -#define MEDIA_FILEPATH_DP 0x04 +#define MEDIA_FILEPATH_DP 0x04 typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// A NULL-terminated Path string including directory and file names. /// - CHAR16 PathName[1]; + CHAR16 PathName[1]; } FILEPATH_DEVICE_PATH; #define SIZE_OF_FILEPATH_DEVICE_PATH OFFSET_OF(FILEPATH_DEVICE_PATH,PathName) @@ -1090,7 +1089,7 @@ typedef struct { /// /// Media Protocol Device Path SubType. /// -#define MEDIA_PROTOCOL_DP 0x05 +#define MEDIA_PROTOCOL_DP 0x05 /// /// The Media Protocol Device Path is used to denote the protocol that is being @@ -1098,157 +1097,156 @@ typedef struct { /// Many protocols are inherent to the style of device path. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// The ID of the protocol. /// - EFI_GUID Protocol; + EFI_GUID Protocol; } MEDIA_PROTOCOL_DEVICE_PATH; /// /// PIWG Firmware File SubType. /// -#define MEDIA_PIWG_FW_FILE_DP 0x06 +#define MEDIA_PIWG_FW_FILE_DP 0x06 /// /// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware file. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Firmware file name /// - EFI_GUID FvFileName; + EFI_GUID FvFileName; } MEDIA_FW_VOL_FILEPATH_DEVICE_PATH; /// /// PIWG Firmware Volume Device Path SubType. /// -#define MEDIA_PIWG_FW_VOL_DP 0x07 +#define MEDIA_PIWG_FW_VOL_DP 0x07 /// /// This device path is used by systems implementing the UEFI PI Specification 1.0 to describe a firmware volume. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Firmware volume name. /// - EFI_GUID FvName; + EFI_GUID FvName; } MEDIA_FW_VOL_DEVICE_PATH; /// /// Media relative offset range device path. /// -#define MEDIA_RELATIVE_OFFSET_RANGE_DP 0x08 +#define MEDIA_RELATIVE_OFFSET_RANGE_DP 0x08 /// /// Used to describe the offset range of media relative. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - UINT32 Reserved; - UINT64 StartingOffset; - UINT64 EndingOffset; + EFI_DEVICE_PATH_PROTOCOL Header; + UINT32 Reserved; + UINT64 StartingOffset; + UINT64 EndingOffset; } MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH; /// /// This GUID defines a RAM Disk supporting a raw disk format in volatile memory. /// -#define EFI_VIRTUAL_DISK_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE +#define EFI_VIRTUAL_DISK_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_VOLATILE -extern EFI_GUID gEfiVirtualDiskGuid; +extern EFI_GUID gEfiVirtualDiskGuid; /// /// This GUID defines a RAM Disk supporting an ISO image in volatile memory. /// -#define EFI_VIRTUAL_CD_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE +#define EFI_VIRTUAL_CD_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_VOLATILE -extern EFI_GUID gEfiVirtualCdGuid; +extern EFI_GUID gEfiVirtualCdGuid; /// /// This GUID defines a RAM Disk supporting a raw disk format in persistent memory. /// -#define EFI_PERSISTENT_VIRTUAL_DISK_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT +#define EFI_PERSISTENT_VIRTUAL_DISK_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_DISK_REGION_PERSISTENT -extern EFI_GUID gEfiPersistentVirtualDiskGuid; +extern EFI_GUID gEfiPersistentVirtualDiskGuid; /// /// This GUID defines a RAM Disk supporting an ISO image in persistent memory. /// -#define EFI_PERSISTENT_VIRTUAL_CD_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT +#define EFI_PERSISTENT_VIRTUAL_CD_GUID EFI_ACPI_6_0_NFIT_GUID_RAM_DISK_SUPPORTING_VIRTUAL_CD_REGION_PERSISTENT -extern EFI_GUID gEfiPersistentVirtualCdGuid; +extern EFI_GUID gEfiPersistentVirtualCdGuid; /// /// Media ram disk device path. /// -#define MEDIA_RAM_DISK_DP 0x09 +#define MEDIA_RAM_DISK_DP 0x09 /// /// Used to describe the ram disk device path. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Starting Memory Address. /// - UINT32 StartingAddr[2]; + UINT32 StartingAddr[2]; /// /// Ending Memory Address. /// - UINT32 EndingAddr[2]; + UINT32 EndingAddr[2]; /// /// GUID that defines the type of the RAM Disk. /// - EFI_GUID TypeGuid; + EFI_GUID TypeGuid; /// /// RAM Diskinstance number, if supported. The default value is zero. /// - UINT16 Instance; + UINT16 Instance; } MEDIA_RAM_DISK_DEVICE_PATH; /// /// BIOS Boot Specification Device Path. /// -#define BBS_DEVICE_PATH 0x05 +#define BBS_DEVICE_PATH 0x05 /// /// BIOS Boot Specification Device Path SubType. /// -#define BBS_BBS_DP 0x01 +#define BBS_BBS_DP 0x01 /// /// This Device Path is used to describe the booting of non-EFI-aware operating systems. /// typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; + EFI_DEVICE_PATH_PROTOCOL Header; /// /// Device Type as defined by the BIOS Boot Specification. /// - UINT16 DeviceType; + UINT16 DeviceType; /// /// Status Flags as defined by the BIOS Boot Specification. /// - UINT16 StatusFlag; + UINT16 StatusFlag; /// /// Null-terminated ASCII string that describes the boot device to a user. /// - CHAR8 String[1]; + CHAR8 String[1]; } BBS_BBS_DEVICE_PATH; // // DeviceType definitions - from BBS specification // -#define BBS_TYPE_FLOPPY 0x01 -#define BBS_TYPE_HARDDRIVE 0x02 -#define BBS_TYPE_CDROM 0x03 -#define BBS_TYPE_PCMCIA 0x04 -#define BBS_TYPE_USB 0x05 -#define BBS_TYPE_EMBEDDED_NETWORK 0x06 -#define BBS_TYPE_BEV 0x80 -#define BBS_TYPE_UNKNOWN 0xFF - +#define BBS_TYPE_FLOPPY 0x01 +#define BBS_TYPE_HARDDRIVE 0x02 +#define BBS_TYPE_CDROM 0x03 +#define BBS_TYPE_PCMCIA 0x04 +#define BBS_TYPE_USB 0x05 +#define BBS_TYPE_EMBEDDED_NETWORK 0x06 +#define BBS_TYPE_BEV 0x80 +#define BBS_TYPE_UNKNOWN 0xFF /// /// Union of all possible Device Paths and pointers to Device Paths. @@ -1309,8 +1307,6 @@ typedef union { BBS_BBS_DEVICE_PATH Bbs; } EFI_DEV_PATH; - - typedef union { EFI_DEVICE_PATH_PROTOCOL *DevPath; PCI_DEVICE_PATH *Pci; @@ -1370,10 +1366,10 @@ typedef union { #pragma pack() -#define END_DEVICE_PATH_TYPE 0x7f -#define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xFF -#define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01 +#define END_DEVICE_PATH_TYPE 0x7f +#define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xFF +#define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01 -extern EFI_GUID gEfiDevicePathProtocolGuid; +extern EFI_GUID gEfiDevicePathProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/DevicePathFromText.h b/MdePkg/Include/Protocol/DevicePathFromText.h index 5698020..f2abf61 100644 --- a/MdePkg/Include/Protocol/DevicePathFromText.h +++ b/MdePkg/Include/Protocol/DevicePathFromText.h @@ -30,12 +30,11 @@ **/ typedef -EFI_DEVICE_PATH_PROTOCOL* +EFI_DEVICE_PATH_PROTOCOL * (EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_NODE)( IN CONST CHAR16 *TextDeviceNode ); - /** Convert text to the binary representation of a device node. @@ -48,7 +47,7 @@ EFI_DEVICE_PATH_PROTOCOL* **/ typedef -EFI_DEVICE_PATH_PROTOCOL* +EFI_DEVICE_PATH_PROTOCOL * (EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_PATH)( IN CONST CHAR16 *TextDevicePath ); @@ -57,10 +56,10 @@ EFI_DEVICE_PATH_PROTOCOL* /// This protocol converts text to device paths and device nodes. /// typedef struct { - EFI_DEVICE_PATH_FROM_TEXT_NODE ConvertTextToDeviceNode; - EFI_DEVICE_PATH_FROM_TEXT_PATH ConvertTextToDevicePath; + EFI_DEVICE_PATH_FROM_TEXT_NODE ConvertTextToDeviceNode; + EFI_DEVICE_PATH_FROM_TEXT_PATH ConvertTextToDevicePath; } EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL; -extern EFI_GUID gEfiDevicePathFromTextProtocolGuid; +extern EFI_GUID gEfiDevicePathFromTextProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/DevicePathToText.h b/MdePkg/Include/Protocol/DevicePathToText.h index 245dae4..ef3770a 100644 --- a/MdePkg/Include/Protocol/DevicePathToText.h +++ b/MdePkg/Include/Protocol/DevicePathToText.h @@ -34,7 +34,7 @@ **/ typedef -CHAR16* +CHAR16 * (EFIAPI *EFI_DEVICE_PATH_TO_TEXT_NODE)( IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode, IN BOOLEAN DisplayOnly, @@ -57,7 +57,7 @@ CHAR16* **/ typedef -CHAR16* +CHAR16 * (EFIAPI *EFI_DEVICE_PATH_TO_TEXT_PATH)( IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN BOOLEAN DisplayOnly, @@ -68,12 +68,10 @@ CHAR16* /// This protocol converts device paths and device nodes to text. /// typedef struct { - EFI_DEVICE_PATH_TO_TEXT_NODE ConvertDeviceNodeToText; - EFI_DEVICE_PATH_TO_TEXT_PATH ConvertDevicePathToText; + EFI_DEVICE_PATH_TO_TEXT_NODE ConvertDeviceNodeToText; + EFI_DEVICE_PATH_TO_TEXT_PATH ConvertDevicePathToText; } EFI_DEVICE_PATH_TO_TEXT_PROTOCOL; -extern EFI_GUID gEfiDevicePathToTextProtocolGuid; +extern EFI_GUID gEfiDevicePathToTextProtocolGuid; #endif - - diff --git a/MdePkg/Include/Protocol/DevicePathUtilities.h b/MdePkg/Include/Protocol/DevicePathUtilities.h index be12f2b..780ea52 100644 --- a/MdePkg/Include/Protocol/DevicePathUtilities.h +++ b/MdePkg/Include/Protocol/DevicePathUtilities.h @@ -33,7 +33,6 @@ UINTN IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath ); - /** Create a duplicate of the specified path. @@ -44,7 +43,7 @@ UINTN **/ typedef -EFI_DEVICE_PATH_PROTOCOL* +EFI_DEVICE_PATH_PROTOCOL * (EFIAPI *EFI_DEVICE_PATH_UTILS_DUP_DEVICE_PATH)( IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath ); @@ -63,7 +62,7 @@ EFI_DEVICE_PATH_PROTOCOL* **/ typedef -EFI_DEVICE_PATH_PROTOCOL* +EFI_DEVICE_PATH_PROTOCOL * (EFIAPI *EFI_DEVICE_PATH_UTILS_APPEND_PATH)( IN CONST EFI_DEVICE_PATH_PROTOCOL *Src1, IN CONST EFI_DEVICE_PATH_PROTOCOL *Src2 @@ -83,7 +82,7 @@ EFI_DEVICE_PATH_PROTOCOL* **/ typedef -EFI_DEVICE_PATH_PROTOCOL* +EFI_DEVICE_PATH_PROTOCOL * (EFIAPI *EFI_DEVICE_PATH_UTILS_APPEND_NODE)( IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode @@ -100,7 +99,7 @@ EFI_DEVICE_PATH_PROTOCOL* **/ typedef -EFI_DEVICE_PATH_PROTOCOL* +EFI_DEVICE_PATH_PROTOCOL * (EFIAPI *EFI_DEVICE_PATH_UTILS_APPEND_INSTANCE)( IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance @@ -123,7 +122,7 @@ EFI_DEVICE_PATH_PROTOCOL* **/ typedef -EFI_DEVICE_PATH_PROTOCOL* +EFI_DEVICE_PATH_PROTOCOL * (EFIAPI *EFI_DEVICE_PATH_UTILS_GET_NEXT_INSTANCE)( IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathInstance, OUT UINTN *DevicePathInstanceSize @@ -145,12 +144,12 @@ EFI_DEVICE_PATH_PROTOCOL* **/ typedef -EFI_DEVICE_PATH_PROTOCOL* +EFI_DEVICE_PATH_PROTOCOL * (EFIAPI *EFI_DEVICE_PATH_UTILS_CREATE_NODE)( IN UINT8 NodeType, IN UINT8 NodeSubType, IN UINT16 NodeLength -); + ); /** Returns whether a device path is multi-instance. @@ -171,16 +170,16 @@ BOOLEAN /// This protocol is used to creates and manipulates device paths and device nodes. /// typedef struct { - EFI_DEVICE_PATH_UTILS_GET_DEVICE_PATH_SIZE GetDevicePathSize; - EFI_DEVICE_PATH_UTILS_DUP_DEVICE_PATH DuplicateDevicePath; - EFI_DEVICE_PATH_UTILS_APPEND_PATH AppendDevicePath; - EFI_DEVICE_PATH_UTILS_APPEND_NODE AppendDeviceNode; - EFI_DEVICE_PATH_UTILS_APPEND_INSTANCE AppendDevicePathInstance; - EFI_DEVICE_PATH_UTILS_GET_NEXT_INSTANCE GetNextDevicePathInstance; - EFI_DEVICE_PATH_UTILS_IS_MULTI_INSTANCE IsDevicePathMultiInstance; - EFI_DEVICE_PATH_UTILS_CREATE_NODE CreateDeviceNode; + EFI_DEVICE_PATH_UTILS_GET_DEVICE_PATH_SIZE GetDevicePathSize; + EFI_DEVICE_PATH_UTILS_DUP_DEVICE_PATH DuplicateDevicePath; + EFI_DEVICE_PATH_UTILS_APPEND_PATH AppendDevicePath; + EFI_DEVICE_PATH_UTILS_APPEND_NODE AppendDeviceNode; + EFI_DEVICE_PATH_UTILS_APPEND_INSTANCE AppendDevicePathInstance; + EFI_DEVICE_PATH_UTILS_GET_NEXT_INSTANCE GetNextDevicePathInstance; + EFI_DEVICE_PATH_UTILS_IS_MULTI_INSTANCE IsDevicePathMultiInstance; + EFI_DEVICE_PATH_UTILS_CREATE_NODE CreateDeviceNode; } EFI_DEVICE_PATH_UTILITIES_PROTOCOL; -extern EFI_GUID gEfiDevicePathUtilitiesProtocolGuid; +extern EFI_GUID gEfiDevicePathUtilitiesProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Dhcp4.h b/MdePkg/Include/Protocol/Dhcp4.h index 83aae13..3b2c615 100644 --- a/MdePkg/Include/Protocol/Dhcp4.h +++ b/MdePkg/Include/Protocol/Dhcp4.h @@ -27,151 +27,146 @@ SPDX-License-Identifier: BSD-2-Clause-Patent typedef struct _EFI_DHCP4_PROTOCOL EFI_DHCP4_PROTOCOL; - #pragma pack(1) typedef struct { /// /// DHCP option code. /// - UINT8 OpCode; + UINT8 OpCode; /// /// Length of the DHCP option data. Not present if OpCode is 0 or 255. /// - UINT8 Length; + UINT8 Length; /// /// Start of the DHCP option data. Not present if OpCode is 0 or 255 or if Length is zero. /// - UINT8 Data[1]; + UINT8 Data[1]; } EFI_DHCP4_PACKET_OPTION; #pragma pack() - #pragma pack(1) /// /// EFI_DHCP4_PACKET defines the format of DHCPv4 packets. See RFC 2131 for more information. /// typedef struct { - UINT8 OpCode; - UINT8 HwType; - UINT8 HwAddrLen; - UINT8 Hops; - UINT32 Xid; - UINT16 Seconds; - UINT16 Reserved; - EFI_IPv4_ADDRESS ClientAddr; ///< Client IP address from client. - EFI_IPv4_ADDRESS YourAddr; ///< Client IP address from server. - EFI_IPv4_ADDRESS ServerAddr; ///< IP address of next server in bootstrap. - EFI_IPv4_ADDRESS GatewayAddr; ///< Relay agent IP address. - UINT8 ClientHwAddr[16]; ///< Client hardware address. - CHAR8 ServerName[64]; - CHAR8 BootFileName[128]; -}EFI_DHCP4_HEADER; + UINT8 OpCode; + UINT8 HwType; + UINT8 HwAddrLen; + UINT8 Hops; + UINT32 Xid; + UINT16 Seconds; + UINT16 Reserved; + EFI_IPv4_ADDRESS ClientAddr; ///< Client IP address from client. + EFI_IPv4_ADDRESS YourAddr; ///< Client IP address from server. + EFI_IPv4_ADDRESS ServerAddr; ///< IP address of next server in bootstrap. + EFI_IPv4_ADDRESS GatewayAddr; ///< Relay agent IP address. + UINT8 ClientHwAddr[16]; ///< Client hardware address. + CHAR8 ServerName[64]; + CHAR8 BootFileName[128]; +} EFI_DHCP4_HEADER; #pragma pack() - #pragma pack(1) typedef struct { /// /// Size of the EFI_DHCP4_PACKET buffer. /// - UINT32 Size; + UINT32 Size; /// /// Length of the EFI_DHCP4_PACKET from the first byte of the Header field /// to the last byte of the Option[] field. /// - UINT32 Length; + UINT32 Length; struct { /// /// DHCP packet header. /// - EFI_DHCP4_HEADER Header; + EFI_DHCP4_HEADER Header; /// /// DHCP magik cookie in network byte order. /// - UINT32 Magik; + UINT32 Magik; /// /// Start of the DHCP packed option data. /// - UINT8 Option[1]; + UINT8 Option[1]; } Dhcp4; } EFI_DHCP4_PACKET; #pragma pack() - typedef enum { /// /// The EFI DHCPv4 Protocol driver is stopped. /// - Dhcp4Stopped = 0x0, + Dhcp4Stopped = 0x0, /// /// The EFI DHCPv4 Protocol driver is inactive. /// - Dhcp4Init = 0x1, + Dhcp4Init = 0x1, /// /// The EFI DHCPv4 Protocol driver is collecting DHCP offer packets from DHCP servers. /// - Dhcp4Selecting = 0x2, + Dhcp4Selecting = 0x2, /// /// The EFI DHCPv4 Protocol driver has sent the request to the DHCP server and is waiting for a response. /// - Dhcp4Requesting = 0x3, + Dhcp4Requesting = 0x3, /// /// The DHCP configuration has completed. /// - Dhcp4Bound = 0x4, + Dhcp4Bound = 0x4, /// /// The DHCP configuration is being renewed and another request has /// been sent out, but it has not received a response from the server yet. /// - Dhcp4Renewing = 0x5, + Dhcp4Renewing = 0x5, /// /// The DHCP configuration has timed out and the EFI DHCPv4 /// Protocol driver is trying to extend the lease time. /// - Dhcp4Rebinding = 0x6, + Dhcp4Rebinding = 0x6, /// /// The EFI DHCPv4 Protocol driver was initialized with a previously /// allocated or known IP address. /// - Dhcp4InitReboot = 0x7, + Dhcp4InitReboot = 0x7, /// /// The EFI DHCPv4 Protocol driver is seeking to reuse the previously /// allocated IP address by sending a request to the DHCP server. /// - Dhcp4Rebooting = 0x8 + Dhcp4Rebooting = 0x8 } EFI_DHCP4_STATE; - -typedef enum{ +typedef enum { /// /// The packet to start the configuration sequence is about to be sent. /// - Dhcp4SendDiscover = 0x01, + Dhcp4SendDiscover = 0x01, /// /// A reply packet was just received. /// - Dhcp4RcvdOffer = 0x02, + Dhcp4RcvdOffer = 0x02, /// /// It is time for Dhcp4Callback to select an offer. /// - Dhcp4SelectOffer = 0x03, + Dhcp4SelectOffer = 0x03, /// /// A request packet is about to be sent. /// - Dhcp4SendRequest = 0x04, + Dhcp4SendRequest = 0x04, /// /// A DHCPACK packet was received and will be passed to Dhcp4Callback. /// - Dhcp4RcvdAck = 0x05, + Dhcp4RcvdAck = 0x05, /// /// A DHCPNAK packet was received and will be passed to Dhcp4Callback. /// - Dhcp4RcvdNak = 0x06, + Dhcp4RcvdNak = 0x06, /// /// A decline packet is about to be sent. /// - Dhcp4SendDecline = 0x07, + Dhcp4SendDecline = 0x07, /// /// The DHCP configuration process has completed. No packet is associated with this event. /// @@ -180,7 +175,7 @@ typedef enum{ /// It is time to enter the Dhcp4Renewing state and to contact the server /// that originally issued the network address. No packet is associated with this event. /// - Dhcp4EnterRenewing = 0x09, + Dhcp4EnterRenewing = 0x09, /// /// It is time to enter the Dhcp4Rebinding state and to contact any server. /// No packet is associated with this event. @@ -191,13 +186,13 @@ typedef enum{ /// the user released the configuration, or a DHCPNAK packet was received in /// the Dhcp4Renewing or Dhcp4Rebinding state. No packet is associated with this event. /// - Dhcp4AddressLost = 0x0b, + Dhcp4AddressLost = 0x0b, /// /// The DHCP process failed because a DHCPNAK packet was received or the user /// aborted the DHCP process at a time when the configuration was not available yet. /// No packet is associated with this event. /// - Dhcp4Fail = 0x0c + Dhcp4Fail = 0x0c } EFI_DHCP4_EVENT; /** @@ -249,25 +244,25 @@ typedef struct { /// event and waiting for a response during the Dhcp4RcvdOffer event. /// Set to zero to use the default try counts and timeout values. /// - UINT32 DiscoverTryCount; + UINT32 DiscoverTryCount; /// /// The maximum amount of time (in seconds) to wait for returned packets in each /// of the retries. Timeout values of zero will default to a timeout value /// of one second. Set to NULL to use default timeout values. /// - UINT32 *DiscoverTimeout; + UINT32 *DiscoverTimeout; /// /// The number of times to try sending a packet during the Dhcp4SendRequest event /// and waiting for a response during the Dhcp4RcvdAck event before accepting /// failure. Set to zero to use the default try counts and timeout values. /// - UINT32 RequestTryCount; + UINT32 RequestTryCount; /// /// The maximum amount of time (in seconds) to wait for return packets in each of the retries. /// Timeout values of zero will default to a timeout value of one second. /// Set to NULL to use default timeout values. /// - UINT32 *RequestTimeout; + UINT32 *RequestTimeout; /// /// For a DHCPDISCOVER, setting this parameter to the previously allocated IP /// address will cause the EFI DHCPv4 Protocol driver to enter the Dhcp4InitReboot state. @@ -275,20 +270,20 @@ typedef struct { /// For a DHCPINFORM this parameter should be set to the client network address /// which was assigned to the client during a DHCPDISCOVER. /// - EFI_IPv4_ADDRESS ClientAddress; + EFI_IPv4_ADDRESS ClientAddress; /// /// The callback function to intercept various events that occurred in /// the DHCP configuration process. Set to NULL to ignore all those events. /// - EFI_DHCP4_CALLBACK Dhcp4Callback; + EFI_DHCP4_CALLBACK Dhcp4Callback; /// /// The pointer to the context that will be passed to Dhcp4Callback when it is called. /// - VOID *CallbackContext; + VOID *CallbackContext; /// /// Number of DHCP options in the OptionList. /// - UINT32 OptionCount; + UINT32 OptionCount; /// /// List of DHCP options to be included in every packet that is sent during the /// Dhcp4SendDiscover event. Pad options are appended automatically by DHCP driver @@ -296,122 +291,118 @@ typedef struct { /// ignored by the driver. OptionList can be freed after EFI_DHCP4_PROTOCOL.Configure() /// returns. Ignored if OptionCount is zero. /// - EFI_DHCP4_PACKET_OPTION **OptionList; + EFI_DHCP4_PACKET_OPTION **OptionList; } EFI_DHCP4_CONFIG_DATA; - typedef struct { /// /// The EFI DHCPv4 Protocol driver operating state. /// - EFI_DHCP4_STATE State; + EFI_DHCP4_STATE State; /// /// The configuration data of the current EFI DHCPv4 Protocol driver instance. /// - EFI_DHCP4_CONFIG_DATA ConfigData; + EFI_DHCP4_CONFIG_DATA ConfigData; /// /// The client IP address that was acquired from the DHCP server. If it is zero, /// the DHCP acquisition has not completed yet and the following fields in this structure are undefined. /// - EFI_IPv4_ADDRESS ClientAddress; + EFI_IPv4_ADDRESS ClientAddress; /// /// The local hardware address. /// - EFI_MAC_ADDRESS ClientMacAddress; + EFI_MAC_ADDRESS ClientMacAddress; /// /// The server IP address that is providing the DHCP service to this client. /// - EFI_IPv4_ADDRESS ServerAddress; + EFI_IPv4_ADDRESS ServerAddress; /// /// The router IP address that was acquired from the DHCP server. /// May be zero if the server does not offer this address. /// - EFI_IPv4_ADDRESS RouterAddress; + EFI_IPv4_ADDRESS RouterAddress; /// /// The subnet mask of the connected network that was acquired from the DHCP server. /// - EFI_IPv4_ADDRESS SubnetMask; + EFI_IPv4_ADDRESS SubnetMask; /// /// The lease time (in 1-second units) of the configured IP address. /// The value 0xFFFFFFFF means that the lease time is infinite. /// A default lease of 7 days is used if the DHCP server does not provide a value. /// - UINT32 LeaseTime; + UINT32 LeaseTime; /// /// The cached latest DHCPACK or DHCPNAK or BOOTP REPLY packet. May be NULL if no packet is cached. /// - EFI_DHCP4_PACKET *ReplyPacket; + EFI_DHCP4_PACKET *ReplyPacket; } EFI_DHCP4_MODE_DATA; - typedef struct { /// /// Alternate listening address. It can be a unicast, multicast, or broadcast address. /// - EFI_IPv4_ADDRESS ListenAddress; + EFI_IPv4_ADDRESS ListenAddress; /// /// The subnet mask of above listening unicast/broadcast IP address. /// Ignored if ListenAddress is a multicast address. /// - EFI_IPv4_ADDRESS SubnetMask; + EFI_IPv4_ADDRESS SubnetMask; /// /// Alternate station source (or listening) port number. /// If zero, then the default station port number (68) will be used. /// - UINT16 ListenPort; + UINT16 ListenPort; } EFI_DHCP4_LISTEN_POINT; - typedef struct { /// /// The completion status of transmitting and receiving. /// - EFI_STATUS Status; + EFI_STATUS Status; /// /// If not NULL, the event that will be signaled when the collection process /// completes. If NULL, this function will busy-wait until the collection process competes. /// - EFI_EVENT CompletionEvent; + EFI_EVENT CompletionEvent; /// /// The pointer to the server IP address. This address may be a unicast, multicast, or broadcast address. /// - EFI_IPv4_ADDRESS RemoteAddress; + EFI_IPv4_ADDRESS RemoteAddress; /// /// The server listening port number. If zero, the default server listening port number (67) will be used. /// - UINT16 RemotePort; + UINT16 RemotePort; /// /// The pointer to the gateway address to override the existing setting. /// - EFI_IPv4_ADDRESS GatewayAddress; + EFI_IPv4_ADDRESS GatewayAddress; /// /// The number of entries in ListenPoints. If zero, the default station address and port number 68 are used. /// - UINT32 ListenPointCount; + UINT32 ListenPointCount; /// /// An array of station address and port number pairs that are used as receiving filters. /// The first entry is also used as the source address and source port of the outgoing packet. /// - EFI_DHCP4_LISTEN_POINT *ListenPoints; + EFI_DHCP4_LISTEN_POINT *ListenPoints; /// /// The number of seconds to collect responses. Zero is invalid. /// - UINT32 TimeoutValue; + UINT32 TimeoutValue; /// /// The pointer to the packet to be transmitted. /// - EFI_DHCP4_PACKET *Packet; + EFI_DHCP4_PACKET *Packet; /// /// Number of received packets. /// - UINT32 ResponseCount; + UINT32 ResponseCount; /// /// The pointer to the allocated list of received packets. /// - EFI_DHCP4_PACKET *ResponseList; + EFI_DHCP4_PACKET *ResponseList; } EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN; - /** Returns the current operating mode and cached data packet for the EFI DHCPv4 Protocol driver. @@ -487,7 +478,6 @@ EFI_STATUS IN EFI_DHCP4_CONFIG_DATA *Dhcp4CfgData OPTIONAL ); - /** Starts the DHCP configuration process. @@ -677,7 +667,6 @@ EFI_STATUS OUT EFI_DHCP4_PACKET **NewPacket ); - /** Transmits a DHCP formatted packet and optionally waits for responses. @@ -710,7 +699,6 @@ EFI_STATUS IN EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN *Token ); - /** Parses the packed DHCP option data. @@ -757,18 +745,18 @@ EFI_STATUS /// and to provide DHCPv4 server and PXE boot server discovery services. /// struct _EFI_DHCP4_PROTOCOL { - EFI_DHCP4_GET_MODE_DATA GetModeData; - EFI_DHCP4_CONFIGURE Configure; - EFI_DHCP4_START Start; - EFI_DHCP4_RENEW_REBIND RenewRebind; - EFI_DHCP4_RELEASE Release; - EFI_DHCP4_STOP Stop; - EFI_DHCP4_BUILD Build; - EFI_DHCP4_TRANSMIT_RECEIVE TransmitReceive; - EFI_DHCP4_PARSE Parse; + EFI_DHCP4_GET_MODE_DATA GetModeData; + EFI_DHCP4_CONFIGURE Configure; + EFI_DHCP4_START Start; + EFI_DHCP4_RENEW_REBIND RenewRebind; + EFI_DHCP4_RELEASE Release; + EFI_DHCP4_STOP Stop; + EFI_DHCP4_BUILD Build; + EFI_DHCP4_TRANSMIT_RECEIVE TransmitReceive; + EFI_DHCP4_PARSE Parse; }; -extern EFI_GUID gEfiDhcp4ProtocolGuid; -extern EFI_GUID gEfiDhcp4ServiceBindingProtocolGuid; +extern EFI_GUID gEfiDhcp4ProtocolGuid; +extern EFI_GUID gEfiDhcp4ServiceBindingProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Dhcp6.h b/MdePkg/Include/Protocol/Dhcp6.h index e10c7fd..808b14f 100644 --- a/MdePkg/Include/Protocol/Dhcp6.h +++ b/MdePkg/Include/Protocol/Dhcp6.h @@ -30,47 +30,47 @@ typedef enum { /// The EFI DHCPv6 Protocol instance is configured, and start() needs /// to be called /// - Dhcp6Init = 0x0, + Dhcp6Init = 0x0, /// /// A Solicit packet is sent out to discover DHCPv6 server, and the EFI /// DHCPv6 Protocol instance is collecting Advertise packets. /// - Dhcp6Selecting = 0x1, + Dhcp6Selecting = 0x1, /// /// A Request is sent out to the DHCPv6 server, and the EFI DHCPv6 /// Protocol instance is waiting for Reply packet. /// - Dhcp6Requesting = 0x2, + Dhcp6Requesting = 0x2, /// /// A Decline packet is sent out to indicate one or more addresses of the /// configured IA are in use by another node, and the EFI DHCPv6. /// Protocol instance is waiting for Reply packet. /// - Dhcp6Declining = 0x3, + Dhcp6Declining = 0x3, /// /// A Confirm packet is sent out to confirm the IPv6 addresses of the /// configured IA, and the EFI DHCPv6 Protocol instance is waiting for Reply packet. /// - Dhcp6Confirming = 0x4, + Dhcp6Confirming = 0x4, /// /// A Release packet is sent out to release one or more IPv6 addresses of /// the configured IA, and the EFI DHCPv6 Protocol instance is waiting for Reply packet. /// - Dhcp6Releasing = 0x5, + Dhcp6Releasing = 0x5, /// /// The DHCPv6 S.A.R.R process is completed for the configured IA. /// - Dhcp6Bound = 0x6, + Dhcp6Bound = 0x6, /// /// A Renew packet is sent out to extend lifetime for the IPv6 addresses of /// the configured IA, and the EFI DHCPv6 Protocol instance is waiting for Reply packet. /// - Dhcp6Renewing = 0x7, + Dhcp6Renewing = 0x7, /// /// A Rebind packet is sent out to extend lifetime for the IPv6 addresses of /// the configured IA, and the EFI DHCPv6 Protocol instance is waiting for Reply packet. /// - Dhcp6Rebinding = 0x8 + Dhcp6Rebinding = 0x8 } EFI_DHCP6_STATE; typedef enum { @@ -78,64 +78,64 @@ typedef enum { /// A Solicit packet is about to be sent. The packet is passed to Dhcp6Callback and /// can be modified or replaced in Dhcp6Callback. /// - Dhcp6SendSolicit = 0x0, + Dhcp6SendSolicit = 0x0, /// /// An Advertise packet is received and will be passed to Dhcp6Callback. /// - Dhcp6RcvdAdvertise = 0x1, + Dhcp6RcvdAdvertise = 0x1, /// /// It is time for Dhcp6Callback to determine whether select the default Advertise /// packet by RFC 3315 policy, or overwrite it by specific user policy. /// - Dhcp6SelectAdvertise = 0x2, + Dhcp6SelectAdvertise = 0x2, /// /// A Request packet is about to be sent. The packet is passed to Dhcp6Callback and /// can be modified or replaced in Dhcp6Callback. /// - Dhcp6SendRequest = 0x3, + Dhcp6SendRequest = 0x3, /// /// A Reply packet is received and will be passed to Dhcp6Callback. /// - Dhcp6RcvdReply = 0x4, + Dhcp6RcvdReply = 0x4, /// /// A Reconfigure packet is received and will be passed to Dhcp6Callback. /// - Dhcp6RcvdReconfigure = 0x5, + Dhcp6RcvdReconfigure = 0x5, /// /// A Decline packet is about to be sent. The packet is passed to Dhcp6Callback and /// can be modified or replaced in Dhcp6Callback. /// - Dhcp6SendDecline = 0x6, + Dhcp6SendDecline = 0x6, /// /// A Confirm packet is about to be sent. The packet is passed to Dhcp6Callback and /// can be modified or replaced in Dhcp6Callback. /// - Dhcp6SendConfirm = 0x7, + Dhcp6SendConfirm = 0x7, /// /// A Release packet is about to be sent. The packet is passed to Dhcp6Callback and /// can be modified or replaced in Dhcp6Callback. /// - Dhcp6SendRelease = 0x8, + Dhcp6SendRelease = 0x8, /// /// A Renew packet is about to be sent. The packet is passed to Dhcp6Callback and /// can be modified or replaced in Dhcp6Callback. /// - Dhcp6EnterRenewing = 0x9, + Dhcp6EnterRenewing = 0x9, /// /// A Rebind packet is about to be sent. The packet is passed to Dhcp6Callback and /// can be modified or replaced in Dhcp6Callback. /// - Dhcp6EnterRebinding = 0xa + Dhcp6EnterRebinding = 0xa } EFI_DHCP6_EVENT; /// /// An IA which carries assigned not temporary address. /// -#define EFI_DHCP6_IA_TYPE_NA 3 +#define EFI_DHCP6_IA_TYPE_NA 3 /// /// An IA which carries assigned temporary address. /// -#define EFI_DHCP6_IA_TYPE_TA 4 +#define EFI_DHCP6_IA_TYPE_TA 4 #pragma pack(1) /// @@ -147,31 +147,31 @@ typedef struct { /// /// The DHCPv6 option code, stored in network order. /// - UINT16 OpCode; + UINT16 OpCode; /// /// Length of the DHCPv6 option data, stored in network order. /// From the first byte to the last byte of the Data field. /// - UINT16 OpLen; + UINT16 OpLen; /// /// The data for the DHCPv6 option, stored in network order. /// - UINT8 Data[1]; + UINT8 Data[1]; } EFI_DHCP6_PACKET_OPTION; /// /// EFI_DHCP6_HEADER /// defines the format of the DHCPv6 header. See RFC 3315 for more information. /// -typedef struct{ +typedef struct { /// /// The DHCPv6 transaction ID. /// - UINT32 MessageType:8; + UINT32 MessageType : 8; /// /// The DHCPv6 message type. /// - UINT32 TransactionId:24; + UINT32 TransactionId : 24; } EFI_DHCP6_HEADER; /// @@ -182,21 +182,21 @@ typedef struct { /// /// Size of the EFI_DHCP6_PACKET buffer. /// - UINT32 Size; + UINT32 Size; /// /// Length of the EFI_DHCP6_PACKET from the first byte of the Header field to the last /// byte of the Option[] field. /// - UINT32 Length; - struct{ + UINT32 Length; + struct { /// /// The DHCPv6 packet header. /// - EFI_DHCP6_HEADER Header; + EFI_DHCP6_HEADER Header; /// /// Start of the DHCPv6 packed option data. /// - UINT8 Option[1]; + UINT8 Option[1]; } Dhcp6; } EFI_DHCP6_PACKET; @@ -206,91 +206,91 @@ typedef struct { /// /// Length of DUID in octects. /// - UINT16 Length; + UINT16 Length; /// /// Array of DUID octects. /// - UINT8 Duid[1]; + UINT8 Duid[1]; } EFI_DHCP6_DUID; typedef struct { /// /// Initial retransmission timeout. /// - UINT32 Irt; + UINT32 Irt; /// /// Maximum retransmission count for one packet. If Mrc is zero, there's no upper limit /// for retransmission count. /// - UINT32 Mrc; + UINT32 Mrc; /// /// Maximum retransmission timeout for each retry. It's the upper bound of the number of /// retransmission timeout. If Mrt is zero, there is no upper limit for retransmission /// timeout. /// - UINT32 Mrt; + UINT32 Mrt; /// /// Maximum retransmission duration for one packet. It's the upper bound of the numbers /// the client may retransmit a message. If Mrd is zero, there's no upper limit for /// retransmission duration. /// - UINT32 Mrd; + UINT32 Mrd; } EFI_DHCP6_RETRANSMISSION; typedef struct { /// /// The IPv6 address. /// - EFI_IPv6_ADDRESS IpAddress; + EFI_IPv6_ADDRESS IpAddress; /// /// The preferred lifetime in unit of seconds for the IPv6 address. /// - UINT32 PreferredLifetime; + UINT32 PreferredLifetime; /// /// The valid lifetime in unit of seconds for the IPv6 address. /// - UINT32 ValidLifetime; + UINT32 ValidLifetime; } EFI_DHCP6_IA_ADDRESS; typedef struct { - UINT16 Type; ///< Type for an IA. - UINT32 IaId; ///< The identifier for an IA. + UINT16 Type; ///< Type for an IA. + UINT32 IaId; ///< The identifier for an IA. } EFI_DHCP6_IA_DESCRIPTOR; typedef struct { /// /// The descriptor for IA. /// - EFI_DHCP6_IA_DESCRIPTOR Descriptor; + EFI_DHCP6_IA_DESCRIPTOR Descriptor; /// /// The state of the configured IA. /// - EFI_DHCP6_STATE State; + EFI_DHCP6_STATE State; /// /// Pointer to the cached latest Reply packet. May be NULL if no packet is cached. /// - EFI_DHCP6_PACKET *ReplyPacket; + EFI_DHCP6_PACKET *ReplyPacket; /// /// Number of IPv6 addresses of the configured IA. /// - UINT32 IaAddressCount; + UINT32 IaAddressCount; /// /// List of the IPv6 addresses of the configured IA. When the state of the configured IA is /// in Dhcp6Bound, Dhcp6Renewing and Dhcp6Rebinding, the IPv6 addresses are usable. /// - EFI_DHCP6_IA_ADDRESS IaAddress[1]; + EFI_DHCP6_IA_ADDRESS IaAddress[1]; } EFI_DHCP6_IA; typedef struct { /// /// Pointer to the DHCPv6 unique identifier. The caller is responsible for freeing this buffer. /// - EFI_DHCP6_DUID *ClientId; + EFI_DHCP6_DUID *ClientId; /// /// Pointer to the configured IA of current instance. The caller can free this buffer after /// using it. /// - EFI_DHCP6_IA *Ia; + EFI_DHCP6_IA *Ia; } EFI_DHCP6_MODE_DATA; /** @@ -329,15 +329,15 @@ typedef struct { /// The callback function is to intercept various events that occur in the DHCPv6 S.A.R.R /// process. Set to NULL to ignore all those events. /// - EFI_DHCP6_CALLBACK Dhcp6Callback; + EFI_DHCP6_CALLBACK Dhcp6Callback; /// /// Pointer to the context that will be passed to Dhcp6Callback. /// - VOID *CallbackContext; + VOID *CallbackContext; /// /// Number of the DHCPv6 options in the OptionList. /// - UINT32 OptionCount; + UINT32 OptionCount; /// /// List of the DHCPv6 options to be included in Solicit and Request packet. The buffer /// can be freed after EFI_DHCP6_PROTOCOL.Configure() returns. Ignored if @@ -345,11 +345,11 @@ typedef struct { /// and any IA option, which will be appended by EFI DHCPv6 Protocol instance /// automatically. /// - EFI_DHCP6_PACKET_OPTION **OptionList; + EFI_DHCP6_PACKET_OPTION **OptionList; /// /// The descriptor for the IA of the EFI DHCPv6 Protocol instance. /// - EFI_DHCP6_IA_DESCRIPTOR IaDescriptor; + EFI_DHCP6_IA_DESCRIPTOR IaDescriptor; /// /// If not NULL, the event will be signaled when any IPv6 address information of the /// configured IA is updated, including IPv6 address, preferred lifetime and valid @@ -357,24 +357,24 @@ typedef struct { /// renewrebind(), decline(), release() and stop() will be blocking /// operations, and they will wait for the exchange process completion or failure. /// - EFI_EVENT IaInfoEvent; + EFI_EVENT IaInfoEvent; /// /// If TRUE, the EFI DHCPv6 Protocol instance is willing to accept Reconfigure packet. /// Otherwise, it will ignore it. Reconfigure Accept option can not be specified through /// OptionList parameter. /// - BOOLEAN ReconfigureAccept; + BOOLEAN ReconfigureAccept; /// /// If TRUE, the EFI DHCPv6 Protocol instance will send Solicit packet with Rapid /// Commit option. Otherwise, Rapid Commit option will not be included in Solicit /// packet. Rapid Commit option can not be specified through OptionList parameter. /// - BOOLEAN RapidCommit; + BOOLEAN RapidCommit; /// /// Parameter to control Solicit packet retransmission behavior. The /// buffer can be freed after EFI_DHCP6_PROTOCOL.Configure() returns. /// - EFI_DHCP6_RETRANSMISSION *SolicitRetransmission; + EFI_DHCP6_RETRANSMISSION *SolicitRetransmission; } EFI_DHCP6_CONFIG_DATA; /** @@ -756,25 +756,25 @@ EFI_STATUS IN EFI_DHCP6_PACKET *Packet, IN OUT UINT32 *OptionCount, OUT EFI_DHCP6_PACKET_OPTION *PacketOptionList[] OPTIONAL -); + ); /// /// The EFI DHCPv6 Protocol is used to get IPv6 addresses and other configuration parameters /// from DHCPv6 servers. /// struct _EFI_DHCP6_PROTOCOL { - EFI_DHCP6_GET_MODE_DATA GetModeData; - EFI_DHCP6_CONFIGURE Configure; - EFI_DHCP6_START Start; - EFI_DHCP6_INFO_REQUEST InfoRequest; - EFI_DHCP6_RENEW_REBIND RenewRebind; - EFI_DHCP6_DECLINE Decline; - EFI_DHCP6_RELEASE Release; - EFI_DHCP6_STOP Stop; - EFI_DHCP6_PARSE Parse; + EFI_DHCP6_GET_MODE_DATA GetModeData; + EFI_DHCP6_CONFIGURE Configure; + EFI_DHCP6_START Start; + EFI_DHCP6_INFO_REQUEST InfoRequest; + EFI_DHCP6_RENEW_REBIND RenewRebind; + EFI_DHCP6_DECLINE Decline; + EFI_DHCP6_RELEASE Release; + EFI_DHCP6_STOP Stop; + EFI_DHCP6_PARSE Parse; }; -extern EFI_GUID gEfiDhcp6ProtocolGuid; -extern EFI_GUID gEfiDhcp6ServiceBindingProtocolGuid; +extern EFI_GUID gEfiDhcp6ProtocolGuid; +extern EFI_GUID gEfiDhcp6ServiceBindingProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/DiskInfo.h b/MdePkg/Include/Protocol/DiskInfo.h index 9027909..32fe714 100644 --- a/MdePkg/Include/Protocol/DiskInfo.h +++ b/MdePkg/Include/Protocol/DiskInfo.h @@ -25,7 +25,7 @@ /// /// Forward declaration for EFI_DISK_INFO_PROTOCOL /// -typedef struct _EFI_DISK_INFO_PROTOCOL EFI_DISK_INFO_PROTOCOL; +typedef struct _EFI_DISK_INFO_PROTOCOL EFI_DISK_INFO_PROTOCOL; /// /// Global ID for an IDE interface. Used to fill in EFI_DISK_INFO_PROTOCOL.Interface @@ -186,36 +186,36 @@ struct _EFI_DISK_INFO_PROTOCOL { /// A GUID that defines the format of buffers for the other member functions /// of this protocol. /// - EFI_GUID Interface; + EFI_GUID Interface; /// /// Return the results of the Inquiry command to a drive in InquiryData. Data /// format of Inquiry data is defined by the Interface GUID. /// - EFI_DISK_INFO_INQUIRY Inquiry; + EFI_DISK_INFO_INQUIRY Inquiry; /// /// Return the results of the Identify command to a drive in IdentifyData. Data /// format of Identify data is defined by the Interface GUID. /// - EFI_DISK_INFO_IDENTIFY Identify; + EFI_DISK_INFO_IDENTIFY Identify; /// /// Return the results of the Request Sense command to a drive in SenseData. Data /// format of Sense data is defined by the Interface GUID. /// - EFI_DISK_INFO_SENSE_DATA SenseData; + EFI_DISK_INFO_SENSE_DATA SenseData; /// /// Specific controller. /// - EFI_DISK_INFO_WHICH_IDE WhichIde; + EFI_DISK_INFO_WHICH_IDE WhichIde; }; -extern EFI_GUID gEfiDiskInfoProtocolGuid; +extern EFI_GUID gEfiDiskInfoProtocolGuid; -extern EFI_GUID gEfiDiskInfoIdeInterfaceGuid; -extern EFI_GUID gEfiDiskInfoScsiInterfaceGuid; -extern EFI_GUID gEfiDiskInfoUsbInterfaceGuid; -extern EFI_GUID gEfiDiskInfoAhciInterfaceGuid; -extern EFI_GUID gEfiDiskInfoNvmeInterfaceGuid; -extern EFI_GUID gEfiDiskInfoUfsInterfaceGuid; -extern EFI_GUID gEfiDiskInfoSdMmcInterfaceGuid; +extern EFI_GUID gEfiDiskInfoIdeInterfaceGuid; +extern EFI_GUID gEfiDiskInfoScsiInterfaceGuid; +extern EFI_GUID gEfiDiskInfoUsbInterfaceGuid; +extern EFI_GUID gEfiDiskInfoAhciInterfaceGuid; +extern EFI_GUID gEfiDiskInfoNvmeInterfaceGuid; +extern EFI_GUID gEfiDiskInfoUfsInterfaceGuid; +extern EFI_GUID gEfiDiskInfoSdMmcInterfaceGuid; #endif diff --git a/MdePkg/Include/Protocol/DiskIo.h b/MdePkg/Include/Protocol/DiskIo.h index c051eef..eaa5cbc 100644 --- a/MdePkg/Include/Protocol/DiskIo.h +++ b/MdePkg/Include/Protocol/DiskIo.h @@ -28,7 +28,7 @@ typedef struct _EFI_DISK_IO_PROTOCOL EFI_DISK_IO_PROTOCOL; /// /// Protocol defined in EFI1.1. /// -typedef EFI_DISK_IO_PROTOCOL EFI_DISK_IO; +typedef EFI_DISK_IO_PROTOCOL EFI_DISK_IO; /** Read BufferSize bytes from Offset into Buffer. @@ -85,7 +85,7 @@ EFI_STATUS IN VOID *Buffer ); -#define EFI_DISK_IO_PROTOCOL_REVISION 0x00010000 +#define EFI_DISK_IO_PROTOCOL_REVISION 0x00010000 /// /// Revision defined in EFI1.1 @@ -101,11 +101,11 @@ struct _EFI_DISK_IO_PROTOCOL { /// revisions must be backwards compatible. If a future version is not /// backwards compatible, it is not the same GUID. /// - UINT64 Revision; - EFI_DISK_READ ReadDisk; - EFI_DISK_WRITE WriteDisk; + UINT64 Revision; + EFI_DISK_READ ReadDisk; + EFI_DISK_WRITE WriteDisk; }; -extern EFI_GUID gEfiDiskIoProtocolGuid; +extern EFI_GUID gEfiDiskIoProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/DiskIo2.h b/MdePkg/Include/Protocol/DiskIo2.h index 08f2aab..c989bb5 100644 --- a/MdePkg/Include/Protocol/DiskIo2.h +++ b/MdePkg/Include/Protocol/DiskIo2.h @@ -30,12 +30,12 @@ typedef struct { // The caller must be prepared to handle the case where the callback associated with Event occurs // before the original asynchronous I/O request call returns. // - EFI_EVENT Event; + EFI_EVENT Event; // // Defines whether or not the signaled event encountered an error. // - EFI_STATUS TransactionStatus; + EFI_STATUS TransactionStatus; } EFI_DISK_IO2_TOKEN; /** @@ -49,7 +49,7 @@ typedef struct { **/ typedef EFI_STATUS -(EFIAPI *EFI_DISK_CANCEL_EX) ( +(EFIAPI *EFI_DISK_CANCEL_EX)( IN EFI_DISK_IO2_PROTOCOL *This ); @@ -77,7 +77,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_DISK_READ_EX) ( +(EFIAPI *EFI_DISK_READ_EX)( IN EFI_DISK_IO2_PROTOCOL *This, IN UINT32 MediaId, IN UINT64 Offset, @@ -110,7 +110,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_DISK_WRITE_EX) ( +(EFIAPI *EFI_DISK_WRITE_EX)( IN EFI_DISK_IO2_PROTOCOL *This, IN UINT32 MediaId, IN UINT64 Offset, @@ -138,12 +138,12 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_DISK_FLUSH_EX) ( +(EFIAPI *EFI_DISK_FLUSH_EX)( IN EFI_DISK_IO2_PROTOCOL *This, IN OUT EFI_DISK_IO2_TOKEN *Token ); -#define EFI_DISK_IO2_PROTOCOL_REVISION 0x00020000 +#define EFI_DISK_IO2_PROTOCOL_REVISION 0x00020000 /// /// This protocol is used to abstract Block I/O interfaces. @@ -154,13 +154,13 @@ struct _EFI_DISK_IO2_PROTOCOL { /// revisions must be backwards compatible. If a future version is not /// backwards compatible, it is not the same GUID. /// - UINT64 Revision; - EFI_DISK_CANCEL_EX Cancel; - EFI_DISK_READ_EX ReadDiskEx; - EFI_DISK_WRITE_EX WriteDiskEx; - EFI_DISK_FLUSH_EX FlushDiskEx; + UINT64 Revision; + EFI_DISK_CANCEL_EX Cancel; + EFI_DISK_READ_EX ReadDiskEx; + EFI_DISK_WRITE_EX WriteDiskEx; + EFI_DISK_FLUSH_EX FlushDiskEx; }; -extern EFI_GUID gEfiDiskIo2ProtocolGuid; +extern EFI_GUID gEfiDiskIo2ProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Dns4.h b/MdePkg/Include/Protocol/Dns4.h index c92c30a..43eeff1 100644 --- a/MdePkg/Include/Protocol/Dns4.h +++ b/MdePkg/Include/Protocol/Dns4.h @@ -39,7 +39,7 @@ typedef struct { /// DnsServerListCount is zero, the DNS server configuration /// will be retrieved from DHCP server automatically. /// - UINTN DnsServerListCount; + UINTN DnsServerListCount; /// /// Pointer to DNS server list containing DnsServerListCount entries or NULL /// if DnsServerListCountis 0. For Configure(), this will be NULL when there are @@ -51,16 +51,16 @@ typedef struct { /// freed by the caller. When used with Configure(), the buffer /// containing the list will be allocated and released by the caller. /// - EFI_IPv4_ADDRESS *DnsServerList; + EFI_IPv4_ADDRESS *DnsServerList; /// /// Set to TRUE to use the default IP address/subnet mask and default routing table. /// - BOOLEAN UseDefaultSetting; + BOOLEAN UseDefaultSetting; /// /// If TRUE, enable DNS cache function for this DNS instance. If FALSE, all DNS /// query will not lookup local DNS cache. /// - BOOLEAN EnableDnsCache; + BOOLEAN EnableDnsCache; /// /// Use the protocol number defined in "Links to UEFI-Related /// Documents"(http://uefi.org/uefi) under the heading "IANA @@ -68,31 +68,30 @@ typedef struct { /// protocol values are invalid. An implementation can choose to /// support only UDP, or both TCP and UDP. /// - UINT8 Protocol; + UINT8 Protocol; /// /// If UseDefaultSetting is FALSE indicates the station address to use. /// - EFI_IPv4_ADDRESS StationIp; + EFI_IPv4_ADDRESS StationIp; /// /// If UseDefaultSetting is FALSE indicates the subnet mask to use. /// - EFI_IPv4_ADDRESS SubnetMask; + EFI_IPv4_ADDRESS SubnetMask; /// /// Local port number. Set to zero to use the automatically assigned port number. /// - UINT16 LocalPort; + UINT16 LocalPort; /// /// Retry number if no response received after RetryInterval. /// - UINT32 RetryCount; + UINT32 RetryCount; /// /// Minimum interval of retry is 2 second. If the retry interval is less than 2 /// seconds, then use the 2 seconds. /// - UINT32 RetryInterval; + UINT32 RetryInterval; } EFI_DNS4_CONFIG_DATA; - /// /// EFI_DNS4_CACHE_ENTRY /// @@ -100,11 +99,11 @@ typedef struct { /// /// Host name. /// - CHAR16 *HostName; + CHAR16 *HostName; /// /// IP address of this host. /// - EFI_IPv4_ADDRESS *IpAddress; + EFI_IPv4_ADDRESS *IpAddress; /// /// Time in second unit that this entry will remain in DNS cache. A value of zero /// means that this entry is permanent. A nonzero value will override the existing @@ -112,7 +111,7 @@ typedef struct { /// default timeout value for the dynamically created DNS cache entry after one DNS /// resolve succeeds. /// - UINT32 Timeout; + UINT32 Timeout; } EFI_DNS4_CACHE_ENTRY; /// @@ -122,12 +121,12 @@ typedef struct { /// /// The configuration data of this instance. /// - EFI_DNS4_CONFIG_DATA DnsConfigData; + EFI_DNS4_CONFIG_DATA DnsConfigData; /// /// Number of configured DNS server. Each DNS instance has its own DNS server /// configuration. /// - UINT32 DnsServerCount; + UINT32 DnsServerCount; /// /// Pointer to common list of addresses of all configured DNS server /// used by EFI_DNS4_PROTOCOL instances. List will include @@ -135,17 +134,17 @@ typedef struct { /// The storage for this list is allocated by the driver publishing this /// protocol, and must be freed by the caller. /// - EFI_IPv4_ADDRESS *DnsServerList; + EFI_IPv4_ADDRESS *DnsServerList; /// /// Number of DNS Cache entries. The DNS Cache is shared among all DNS instances. /// - UINT32 DnsCacheCount; + UINT32 DnsCacheCount; /// /// Pointer to a buffer containing DnsCacheCount DNS Cache /// entry structures. The storage for this list is allocated by the driver /// publishing this protocol and must be freed by caller. /// - EFI_DNS4_CACHE_ENTRY *DnsCacheList; + EFI_DNS4_CACHE_ENTRY *DnsCacheList; } EFI_DNS4_MODE_DATA; /// @@ -155,11 +154,11 @@ typedef struct { /// /// Number of the returned IP addresses. /// - UINT32 IpCount; + UINT32 IpCount; /// /// Pointer to the all the returned IP addresses. /// - EFI_IPv4_ADDRESS *IpList; + EFI_IPv4_ADDRESS *IpList; } DNS_HOST_TO_ADDR_DATA; /// @@ -170,7 +169,7 @@ typedef struct { /// Pointer to the primary name for this host address. It's the caller's /// responsibility to free the response memory. /// - CHAR16 *HostName; + CHAR16 *HostName; } DNS_ADDR_TO_HOST_DATA; /// @@ -180,30 +179,30 @@ typedef struct { /// /// The Owner name. /// - CHAR8 *QName; + CHAR8 *QName; /// /// The Type Code of this RR. /// - UINT16 QType; + UINT16 QType; /// /// The CLASS code of this RR. /// - UINT16 QClass; + UINT16 QClass; /// /// 32 bit integer which specify the time interval that the resource record may be /// cached before the source of the information should again be consulted. Zero means /// this RR can not be cached. /// - UINT32 TTL; + UINT32 TTL; /// /// 16 big integer which specify the length of RData. /// - UINT16 DataLength; + UINT16 DataLength; /// /// A string of octets that describe the resource, the format of this information /// varies according to QType and QClass difference. /// - CHAR8 *RData; + CHAR8 *RData; } DNS_RESOURCE_RECORD; /// @@ -213,12 +212,12 @@ typedef struct { /// /// Number of returned matching RRs. /// - UINTN RRCount; + UINTN RRCount; /// /// Pointer to the all the returned matching RRs. It's caller responsibility to free /// the allocated memory to hold the returned RRs. /// - DNS_RESOURCE_RECORD *RRList; + DNS_RESOURCE_RECORD *RRList; } DNS_GENERAL_LOOKUP_DATA; /// @@ -229,7 +228,7 @@ typedef struct { /// This Event will be signaled after the Status field is updated by the EFI DNS /// protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL. /// - EFI_EVENT Event; + EFI_EVENT Event; /// /// Will be set to one of the following values: /// EFI_SUCCESS: The host name to address translation completed successfully. @@ -239,17 +238,17 @@ typedef struct { /// EFI_DEVICE_ERROR: An unexpected system or network error occurred. /// EFI_NO_MEDIA: There was a media error. /// - EFI_STATUS Status; + EFI_STATUS Status; /// /// Retry number if no response received after RetryInterval. If zero, use the /// parameter configured through Dns.Configure() interface. /// - UINT32 RetryCount; + UINT32 RetryCount; /// /// Minimum interval of retry is 2 second. If the retry interval is less than 2 /// seconds, then use the 2 seconds. If zero, use the parameter configured through /// Dns.Configure() interface. - UINT32 RetryInterval; + UINT32 RetryInterval; /// /// DNSv4 completion token data /// @@ -258,17 +257,17 @@ typedef struct { /// When the Token is used for host name to address translation, H2AData is a pointer /// to the DNS_HOST_TO_ADDR_DATA. /// - DNS_HOST_TO_ADDR_DATA *H2AData; + DNS_HOST_TO_ADDR_DATA *H2AData; /// /// When the Token is used for host address to host name translation, A2HData is a /// pointer to the DNS_ADDR_TO_HOST_DATA. /// - DNS_ADDR_TO_HOST_DATA *A2HData; + DNS_ADDR_TO_HOST_DATA *A2HData; /// /// When the Token is used for a general lookup function, GLookupDATA is a pointer to /// the DNS_GENERAL_LOOKUP_DATA. /// - DNS_GENERAL_LOOKUP_DATA *GLookupData; + DNS_GENERAL_LOOKUP_DATA *GLookupData; } RspData; } EFI_DNS4_COMPLETION_TOKEN; @@ -289,7 +288,7 @@ typedef struct { **/ typedef EFI_STATUS -(EFIAPI *EFI_DNS4_GET_MODE_DATA) ( +(EFIAPI *EFI_DNS4_GET_MODE_DATA)( IN EFI_DNS4_PROTOCOL *This, OUT EFI_DNS4_MODE_DATA *DnsModeData ); @@ -321,7 +320,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_DNS4_CONFIGURE) ( +(EFIAPI *EFI_DNS4_CONFIGURE)( IN EFI_DNS4_PROTOCOL *This, IN EFI_DNS4_CONFIG_DATA *DnsConfigData ); @@ -348,10 +347,10 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_DNS4_HOST_NAME_TO_IP) ( - IN EFI_DNS4_PROTOCOL *This, - IN CHAR16 *HostName, - IN EFI_DNS4_COMPLETION_TOKEN *Token +(EFIAPI *EFI_DNS4_HOST_NAME_TO_IP)( + IN EFI_DNS4_PROTOCOL *This, + IN CHAR16 *HostName, + IN EFI_DNS4_COMPLETION_TOKEN *Token ); /** @@ -378,10 +377,10 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_DNS4_IP_TO_HOST_NAME) ( - IN EFI_DNS4_PROTOCOL *This, - IN EFI_IPv4_ADDRESS IpAddress, - IN EFI_DNS4_COMPLETION_TOKEN *Token +(EFIAPI *EFI_DNS4_IP_TO_HOST_NAME)( + IN EFI_DNS4_PROTOCOL *This, + IN EFI_IPv4_ADDRESS IpAddress, + IN EFI_DNS4_COMPLETION_TOKEN *Token ); /** @@ -413,7 +412,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_DNS4_GENERAL_LOOKUP) ( +(EFIAPI *EFI_DNS4_GENERAL_LOOKUP)( IN EFI_DNS4_PROTOCOL *This, IN CHAR8 *QName, IN UINT16 QType, @@ -449,7 +448,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_DNS4_UPDATE_DNS_CACHE) ( +(EFIAPI *EFI_DNS4_UPDATE_DNS_CACHE)( IN EFI_DNS4_PROTOCOL *This, IN BOOLEAN DeleteFlag, IN BOOLEAN Override, @@ -479,7 +478,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_DNS4_POLL) ( +(EFIAPI *EFI_DNS4_POLL)( IN EFI_DNS4_PROTOCOL *This ); @@ -510,7 +509,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_DNS4_CANCEL) ( +(EFIAPI *EFI_DNS4_CANCEL)( IN EFI_DNS4_PROTOCOL *This, IN EFI_DNS4_COMPLETION_TOKEN *Token ); @@ -521,17 +520,17 @@ EFI_STATUS /// from DNS. /// struct _EFI_DNS4_PROTOCOL { - EFI_DNS4_GET_MODE_DATA GetModeData; - EFI_DNS4_CONFIGURE Configure; - EFI_DNS4_HOST_NAME_TO_IP HostNameToIp; - EFI_DNS4_IP_TO_HOST_NAME IpToHostName; - EFI_DNS4_GENERAL_LOOKUP GeneralLookUp; - EFI_DNS4_UPDATE_DNS_CACHE UpdateDnsCache; - EFI_DNS4_POLL Poll; - EFI_DNS4_CANCEL Cancel; + EFI_DNS4_GET_MODE_DATA GetModeData; + EFI_DNS4_CONFIGURE Configure; + EFI_DNS4_HOST_NAME_TO_IP HostNameToIp; + EFI_DNS4_IP_TO_HOST_NAME IpToHostName; + EFI_DNS4_GENERAL_LOOKUP GeneralLookUp; + EFI_DNS4_UPDATE_DNS_CACHE UpdateDnsCache; + EFI_DNS4_POLL Poll; + EFI_DNS4_CANCEL Cancel; }; -extern EFI_GUID gEfiDns4ServiceBindingProtocolGuid; -extern EFI_GUID gEfiDns4ProtocolGuid; +extern EFI_GUID gEfiDns4ServiceBindingProtocolGuid; +extern EFI_GUID gEfiDns4ProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Dns6.h b/MdePkg/Include/Protocol/Dns6.h index ebf368f..3b6697a 100644 --- a/MdePkg/Include/Protocol/Dns6.h +++ b/MdePkg/Include/Protocol/Dns6.h @@ -35,23 +35,23 @@ typedef struct { /// If TRUE, enable DNS cache function for this DNS instance. If FALSE, all DNS query /// will not lookup local DNS cache. /// - BOOLEAN EnableDnsCache; + BOOLEAN EnableDnsCache; /// /// Use the protocol number defined in /// http://www.iana.org/assignments/protocol-numbers. Beside TCP/UDP, Other protocol /// is invalid value. An implementation can choose to support UDP, or both TCP and UDP. /// - UINT8 Protocol; + UINT8 Protocol; /// /// The local IP address to use. Set to zero to let the underlying IPv6 /// driver choose a source address. If not zero it must be one of the /// configured IP addresses in the underlying IPv6 driver. /// - EFI_IPv6_ADDRESS StationIp; + EFI_IPv6_ADDRESS StationIp; /// /// Local port number. Set to zero to use the automatically assigned port number. /// - UINT16 LocalPort; + UINT16 LocalPort; /// /// Count of the DNS servers. When used with GetModeData(), /// this field is the count of originally configured servers when @@ -60,7 +60,7 @@ typedef struct { /// DnsServerListCount is zero, the DNS server configuration /// will be retrieved from DHCP server automatically. /// - UINT32 DnsServerCount; + UINT32 DnsServerCount; /// /// Pointer to DNS server list containing DnsServerListCount /// entries or NULL if DnsServerListCount is 0. For Configure(), @@ -72,15 +72,15 @@ typedef struct { /// freed by the caller. When used with Configure(), the buffer /// containing the list will be allocated and released by the caller. /// - EFI_IPv6_ADDRESS *DnsServerList; + EFI_IPv6_ADDRESS *DnsServerList; /// /// Retry number if no response received after RetryInterval. /// - UINT32 RetryCount; + UINT32 RetryCount; /// /// Minimum interval of retry is 2 second. If the retry interval is less than 2 /// seconds, then use the 2 seconds. - UINT32 RetryInterval; + UINT32 RetryInterval; } EFI_DNS6_CONFIG_DATA; /// @@ -90,18 +90,18 @@ typedef struct { /// /// Host name. This should be interpreted as Unicode characters. /// - CHAR16 *HostName; + CHAR16 *HostName; /// /// IP address of this host. /// - EFI_IPv6_ADDRESS *IpAddress; + EFI_IPv6_ADDRESS *IpAddress; /// /// Time in second unit that this entry will remain in DNS cache. A value of zero means /// that this entry is permanent. A nonzero value will override the existing one if /// this entry to be added is dynamic entry. Implementations may set its default /// timeout value for the dynamically created DNS cache entry after one DNS resolve /// succeeds. - UINT32 Timeout; + UINT32 Timeout; } EFI_DNS6_CACHE_ENTRY; /// @@ -111,28 +111,28 @@ typedef struct { /// /// The configuration data of this instance. /// - EFI_DNS6_CONFIG_DATA DnsConfigData; + EFI_DNS6_CONFIG_DATA DnsConfigData; /// /// Number of configured DNS6 servers. /// - UINT32 DnsServerCount; + UINT32 DnsServerCount; /// /// Pointer to common list of addresses of all configured DNS server used by EFI_DNS6_PROTOCOL /// instances. List will include DNS servers configured by this or any other EFI_DNS6_PROTOCOL /// instance. The storage for this list is allocated by the driver publishing this protocol, /// and must be freed by the caller. /// - EFI_IPv6_ADDRESS *DnsServerList; + EFI_IPv6_ADDRESS *DnsServerList; /// /// Number of DNS Cache entries. The DNS Cache is shared among all DNS instances. /// - UINT32 DnsCacheCount; + UINT32 DnsCacheCount; /// /// Pointer to a buffer containing DnsCacheCount DNS Cache /// entry structures. The storage for thislist is allocated by the driver /// publishing this protocol and must be freed by caller. /// - EFI_DNS6_CACHE_ENTRY *DnsCacheList; + EFI_DNS6_CACHE_ENTRY *DnsCacheList; } EFI_DNS6_MODE_DATA; /// @@ -142,11 +142,11 @@ typedef struct { /// /// Number of the returned IP address. /// - UINT32 IpCount; + UINT32 IpCount; /// /// Pointer to the all the returned IP address. /// - EFI_IPv6_ADDRESS *IpList; + EFI_IPv6_ADDRESS *IpList; } DNS6_HOST_TO_ADDR_DATA; /// @@ -157,7 +157,7 @@ typedef struct { /// Pointer to the primary name for this host address. It's the caller's /// responsibility to free the response memory. /// - CHAR16 *HostName; + CHAR16 *HostName; } DNS6_ADDR_TO_HOST_DATA; /// @@ -167,30 +167,30 @@ typedef struct { /// /// The Owner name. /// - CHAR8 *QName; + CHAR8 *QName; /// /// The Type Code of this RR. /// - UINT16 QType; + UINT16 QType; /// /// The CLASS code of this RR. /// - UINT16 QClass; + UINT16 QClass; /// /// 32 bit integer which specify the time interval that the resource record may be /// cached before the source of the information should again be consulted. Zero means /// this RR cannot be cached. /// - UINT32 TTL; + UINT32 TTL; /// /// 16 big integer which specify the length of RData. /// - UINT16 DataLength; + UINT16 DataLength; /// /// A string of octets that describe the resource, the format of this information /// varies according to QType and QClass difference. /// - CHAR8 *RData; + CHAR8 *RData; } DNS6_RESOURCE_RECORD; /// @@ -200,12 +200,12 @@ typedef struct { /// /// Number of returned matching RRs. /// - UINTN RRCount; + UINTN RRCount; /// /// Pointer to the all the returned matching RRs. It's caller responsibility to free /// the allocated memory to hold the returned RRs. /// - DNS6_RESOURCE_RECORD *RRList; + DNS6_RESOURCE_RECORD *RRList; } DNS6_GENERAL_LOOKUP_DATA; /// @@ -216,7 +216,7 @@ typedef struct { /// This Event will be signaled after the Status field is updated by the EFI DNSv6 /// protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL. /// - EFI_EVENT Event; + EFI_EVENT Event; /// /// Will be set to one of the following values: /// EFI_SUCCESS: The host name to address translation completed successfully. @@ -226,18 +226,18 @@ typedef struct { /// EFI_DEVICE_ERROR: An unexpected system or network error occurred. /// EFI_NO_MEDIA: There was a media error. /// - EFI_STATUS Status; + EFI_STATUS Status; /// /// The parameter configured through DNSv6.Configure() interface. Retry number if no /// response received after RetryInterval. /// - UINT32 RetryCount; + UINT32 RetryCount; /// /// The parameter configured through DNSv6.Configure() interface. Minimum interval of /// retry is 2 seconds. If the retry interval is less than 2 seconds, then use the 2 /// seconds. /// - UINT32 RetryInterval; + UINT32 RetryInterval; /// /// DNSv6 completion token data /// @@ -278,7 +278,7 @@ typedef struct { **/ typedef EFI_STATUS -(EFIAPI * EFI_DNS6_GET_MODE_DATA)( +(EFIAPI *EFI_DNS6_GET_MODE_DATA)( IN EFI_DNS6_PROTOCOL *This, OUT EFI_DNS6_MODE_DATA *DnsModeData ); @@ -308,7 +308,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI * EFI_DNS6_CONFIGURE)( +(EFIAPI *EFI_DNS6_CONFIGURE)( IN EFI_DNS6_PROTOCOL *This, IN EFI_DNS6_CONFIG_DATA *DnsConfigData ); @@ -337,7 +337,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_DNS6_HOST_NAME_TO_IP) ( +(EFIAPI *EFI_DNS6_HOST_NAME_TO_IP)( IN EFI_DNS6_PROTOCOL *This, IN CHAR16 *HostName, IN EFI_DNS6_COMPLETION_TOKEN *Token @@ -368,7 +368,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_DNS6_IP_TO_HOST_NAME) ( +(EFIAPI *EFI_DNS6_IP_TO_HOST_NAME)( IN EFI_DNS6_PROTOCOL *This, IN EFI_IPv6_ADDRESS IpAddress, IN EFI_DNS6_COMPLETION_TOKEN *Token @@ -405,7 +405,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_DNS6_GENERAL_LOOKUP) ( +(EFIAPI *EFI_DNS6_GENERAL_LOOKUP)( IN EFI_DNS6_PROTOCOL *This, IN CHAR8 *QName, IN UINT16 QType, @@ -442,7 +442,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_DNS6_UPDATE_DNS_CACHE) ( +(EFIAPI *EFI_DNS6_UPDATE_DNS_CACHE)( IN EFI_DNS6_PROTOCOL *This, IN BOOLEAN DeleteFlag, IN BOOLEAN Override, @@ -474,7 +474,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_DNS6_POLL) ( +(EFIAPI *EFI_DNS6_POLL)( IN EFI_DNS6_PROTOCOL *This ); @@ -506,7 +506,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_DNS6_CANCEL) ( +(EFIAPI *EFI_DNS6_CANCEL)( IN EFI_DNS6_PROTOCOL *This, IN EFI_DNS6_COMPLETION_TOKEN *Token ); @@ -517,17 +517,17 @@ EFI_STATUS /// DNSv6. /// struct _EFI_DNS6_PROTOCOL { - EFI_DNS6_GET_MODE_DATA GetModeData; - EFI_DNS6_CONFIGURE Configure; - EFI_DNS6_HOST_NAME_TO_IP HostNameToIp; - EFI_DNS6_IP_TO_HOST_NAME IpToHostName; - EFI_DNS6_GENERAL_LOOKUP GeneralLookUp; - EFI_DNS6_UPDATE_DNS_CACHE UpdateDnsCache; - EFI_DNS6_POLL Poll; - EFI_DNS6_CANCEL Cancel; + EFI_DNS6_GET_MODE_DATA GetModeData; + EFI_DNS6_CONFIGURE Configure; + EFI_DNS6_HOST_NAME_TO_IP HostNameToIp; + EFI_DNS6_IP_TO_HOST_NAME IpToHostName; + EFI_DNS6_GENERAL_LOOKUP GeneralLookUp; + EFI_DNS6_UPDATE_DNS_CACHE UpdateDnsCache; + EFI_DNS6_POLL Poll; + EFI_DNS6_CANCEL Cancel; }; -extern EFI_GUID gEfiDns6ServiceBindingProtocolGuid; -extern EFI_GUID gEfiDns6ProtocolGuid; +extern EFI_GUID gEfiDns6ServiceBindingProtocolGuid; +extern EFI_GUID gEfiDns6ProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/DriverBinding.h b/MdePkg/Include/Protocol/DriverBinding.h index a58e812..078b014 100644 --- a/MdePkg/Include/Protocol/DriverBinding.h +++ b/MdePkg/Include/Protocol/DriverBinding.h @@ -20,7 +20,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent 0x18a031ab, 0xb443, 0x4d1a, {0xa5, 0xc0, 0xc, 0x9, 0x26, 0x1e, 0x9f, 0x71 } \ } -typedef struct _EFI_DRIVER_BINDING_PROTOCOL EFI_DRIVER_BINDING_PROTOCOL; +typedef struct _EFI_DRIVER_BINDING_PROTOCOL EFI_DRIVER_BINDING_PROTOCOL; /** Tests to see if this driver supports a given controller. If a child device is provided, @@ -155,9 +155,9 @@ EFI_STATUS /// If a controller is supported, then it also provides routines to start and stop the controller. /// struct _EFI_DRIVER_BINDING_PROTOCOL { - EFI_DRIVER_BINDING_SUPPORTED Supported; - EFI_DRIVER_BINDING_START Start; - EFI_DRIVER_BINDING_STOP Stop; + EFI_DRIVER_BINDING_SUPPORTED Supported; + EFI_DRIVER_BINDING_START Start; + EFI_DRIVER_BINDING_STOP Stop; /// /// The version number of the UEFI driver that produced the @@ -171,13 +171,13 @@ struct _EFI_DRIVER_BINDING_PROTOCOL { /// platform/OEM specific drivers. The Version values of 0x10- /// 0xffffffef are reserved for IHV-developed drivers. /// - UINT32 Version; + UINT32 Version; /// /// The image handle of the UEFI driver that produced this instance /// of the EFI_DRIVER_BINDING_PROTOCOL. /// - EFI_HANDLE ImageHandle; + EFI_HANDLE ImageHandle; /// /// The handle on which this instance of the @@ -187,9 +187,9 @@ struct _EFI_DRIVER_BINDING_PROTOCOL { /// EFI_DRIVER_BINDING_PROTOCOL, this value may not be /// the same as ImageHandle. /// - EFI_HANDLE DriverBindingHandle; + EFI_HANDLE DriverBindingHandle; }; -extern EFI_GUID gEfiDriverBindingProtocolGuid; +extern EFI_GUID gEfiDriverBindingProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/DriverConfiguration.h b/MdePkg/Include/Protocol/DriverConfiguration.h index 4b0076d..7d7e987 100644 --- a/MdePkg/Include/Protocol/DriverConfiguration.h +++ b/MdePkg/Include/Protocol/DriverConfiguration.h @@ -19,7 +19,7 @@ 0x107a772b, 0xd5e1, 0x11d4, {0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ } -typedef struct _EFI_DRIVER_CONFIGURATION_PROTOCOL EFI_DRIVER_CONFIGURATION_PROTOCOL; +typedef struct _EFI_DRIVER_CONFIGURATION_PROTOCOL EFI_DRIVER_CONFIGURATION_PROTOCOL; /** Allows the user to set controller specific options for a controller that a @@ -139,23 +139,21 @@ EFI_STATUS OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED *ActionRequired ); - /// /// Used to set configuration options for a controller that an EFI Driver is managing. /// struct _EFI_DRIVER_CONFIGURATION_PROTOCOL { - EFI_DRIVER_CONFIGURATION_SET_OPTIONS SetOptions; - EFI_DRIVER_CONFIGURATION_OPTIONS_VALID OptionsValid; - EFI_DRIVER_CONFIGURATION_FORCE_DEFAULTS ForceDefaults; + EFI_DRIVER_CONFIGURATION_SET_OPTIONS SetOptions; + EFI_DRIVER_CONFIGURATION_OPTIONS_VALID OptionsValid; + EFI_DRIVER_CONFIGURATION_FORCE_DEFAULTS ForceDefaults; /// /// A Null-terminated ASCII string that contains one or more /// ISO 639-2 language codes. This is the list of language /// codes that this protocol supports. /// - CHAR8 *SupportedLanguages; + CHAR8 *SupportedLanguages; }; - -extern EFI_GUID gEfiDriverConfigurationProtocolGuid; +extern EFI_GUID gEfiDriverConfigurationProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/DriverConfiguration2.h b/MdePkg/Include/Protocol/DriverConfiguration2.h index ed4a65d..2847c1a 100644 --- a/MdePkg/Include/Protocol/DriverConfiguration2.h +++ b/MdePkg/Include/Protocol/DriverConfiguration2.h @@ -17,19 +17,19 @@ 0xbfd7dc1d, 0x24f1, 0x40d9, {0x82, 0xe7, 0x2e, 0x09, 0xbb, 0x6b, 0x4e, 0xbe } \ } -typedef struct _EFI_DRIVER_CONFIGURATION2_PROTOCOL EFI_DRIVER_CONFIGURATION2_PROTOCOL; +typedef struct _EFI_DRIVER_CONFIGURATION2_PROTOCOL EFI_DRIVER_CONFIGURATION2_PROTOCOL; typedef enum { /// /// The controller is still in a usable state. No actions /// are required before this controller can be used again. /// - EfiDriverConfigurationActionNone = 0, + EfiDriverConfigurationActionNone = 0, /// /// The driver has detected that the controller is not in a /// usable state, and it needs to be stopped. /// - EfiDriverConfigurationActionStopController = 1, + EfiDriverConfigurationActionStopController = 1, /// /// This controller needs to be stopped and restarted /// before it can be used again. @@ -39,14 +39,14 @@ typedef enum { /// A configuration change has been made that requires the platform to be restarted before /// the controller can be used again. /// - EfiDriverConfigurationActionRestartPlatform = 3, + EfiDriverConfigurationActionRestartPlatform = 3, EfiDriverConfigurationActionMaximum } EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED; -#define EFI_DRIVER_CONFIGURATION_SAFE_DEFAULTS 0x00000000 -#define EFI_DRIVER_CONFIGURATION_MANUFACTURING_DEFAULTS 0x00000001 -#define EFI_DRIVER_CONFIGURATION_CUSTOM_DEFAULTS 0x00000002 -#define EFI_DRIVER_CONFIGURATION_PERORMANCE_DEFAULTS 0x00000003 +#define EFI_DRIVER_CONFIGURATION_SAFE_DEFAULTS 0x00000000 +#define EFI_DRIVER_CONFIGURATION_MANUFACTURING_DEFAULTS 0x00000001 +#define EFI_DRIVER_CONFIGURATION_CUSTOM_DEFAULTS 0x00000002 +#define EFI_DRIVER_CONFIGURATION_PERORMANCE_DEFAULTS 0x00000003 /** Allows the user to set controller specific options for a controller that a @@ -169,16 +169,16 @@ EFI_STATUS /// Used to set configuration options for a controller that an EFI Driver is managing. /// struct _EFI_DRIVER_CONFIGURATION2_PROTOCOL { - EFI_DRIVER_CONFIGURATION2_SET_OPTIONS SetOptions; - EFI_DRIVER_CONFIGURATION2_OPTIONS_VALID OptionsValid; - EFI_DRIVER_CONFIGURATION2_FORCE_DEFAULTS ForceDefaults; + EFI_DRIVER_CONFIGURATION2_SET_OPTIONS SetOptions; + EFI_DRIVER_CONFIGURATION2_OPTIONS_VALID OptionsValid; + EFI_DRIVER_CONFIGURATION2_FORCE_DEFAULTS ForceDefaults; /// /// A Null-terminated ASCII string that contains one or more RFC 4646 /// language codes. This is the list of language codes that this protocol supports. /// - CHAR8 *SupportedLanguages; + CHAR8 *SupportedLanguages; }; -extern EFI_GUID gEfiDriverConfiguration2ProtocolGuid; +extern EFI_GUID gEfiDriverConfiguration2ProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/DriverDiagnostics.h b/MdePkg/Include/Protocol/DriverDiagnostics.h index 8139c99..aadcdb4 100644 --- a/MdePkg/Include/Protocol/DriverDiagnostics.h +++ b/MdePkg/Include/Protocol/DriverDiagnostics.h @@ -17,29 +17,29 @@ SPDX-License-Identifier: BSD-2-Clause-Patent 0x0784924f, 0xe296, 0x11d4, {0x9a, 0x49, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ } -typedef struct _EFI_DRIVER_DIAGNOSTICS_PROTOCOL EFI_DRIVER_DIAGNOSTICS_PROTOCOL; +typedef struct _EFI_DRIVER_DIAGNOSTICS_PROTOCOL EFI_DRIVER_DIAGNOSTICS_PROTOCOL; typedef enum { /// /// Performs standard diagnostics on the controller. /// - EfiDriverDiagnosticTypeStandard = 0, + EfiDriverDiagnosticTypeStandard = 0, /// /// This is an optional diagnostic type that performs diagnostics on the controller that may /// take an extended amount of time to execute. /// - EfiDriverDiagnosticTypeExtended = 1, + EfiDriverDiagnosticTypeExtended = 1, /// /// This is an optional diagnostic type that performs diagnostics on the controller that are /// suitable for a manufacturing and test environment. /// - EfiDriverDiagnosticTypeManufacturing= 2, + EfiDriverDiagnosticTypeManufacturing = 2, /// /// This is an optional diagnostic type that would only be used in the situation where an /// EFI_NOT_READY had been returned by a previous call to RunDiagnostics() /// and there is a desire to cancel the current running diagnostics operation. /// - EfiDriverDiagnosticTypeCancel = 3, + EfiDriverDiagnosticTypeCancel = 3, EfiDriverDiagnosticTypeMaximum } EFI_DRIVER_DIAGNOSTIC_TYPE; @@ -112,14 +112,14 @@ EFI_STATUS /// Used to perform diagnostics on a controller that an EFI Driver is managing. /// struct _EFI_DRIVER_DIAGNOSTICS_PROTOCOL { - EFI_DRIVER_DIAGNOSTICS_RUN_DIAGNOSTICS RunDiagnostics; + EFI_DRIVER_DIAGNOSTICS_RUN_DIAGNOSTICS RunDiagnostics; /// /// A Null-terminated ASCII string that contains one or more ISO 639-2 /// language codes. This is the list of language codes that this protocol supports. /// - CHAR8 *SupportedLanguages; + CHAR8 *SupportedLanguages; }; -extern EFI_GUID gEfiDriverDiagnosticsProtocolGuid; +extern EFI_GUID gEfiDriverDiagnosticsProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/DriverDiagnostics2.h b/MdePkg/Include/Protocol/DriverDiagnostics2.h index 9babeb1..54fb9f6 100644 --- a/MdePkg/Include/Protocol/DriverDiagnostics2.h +++ b/MdePkg/Include/Protocol/DriverDiagnostics2.h @@ -16,7 +16,7 @@ 0x4d330321, 0x025f, 0x4aac, {0x90, 0xd8, 0x5e, 0xd9, 0x00, 0x17, 0x3b, 0x63 } \ } -typedef struct _EFI_DRIVER_DIAGNOSTICS2_PROTOCOL EFI_DRIVER_DIAGNOSTICS2_PROTOCOL; +typedef struct _EFI_DRIVER_DIAGNOSTICS2_PROTOCOL EFI_DRIVER_DIAGNOSTICS2_PROTOCOL; /** Runs diagnostics on a controller. @@ -92,14 +92,14 @@ EFI_STATUS /// Used to perform diagnostics on a controller that an EFI Driver is managing. /// struct _EFI_DRIVER_DIAGNOSTICS2_PROTOCOL { - EFI_DRIVER_DIAGNOSTICS2_RUN_DIAGNOSTICS RunDiagnostics; + EFI_DRIVER_DIAGNOSTICS2_RUN_DIAGNOSTICS RunDiagnostics; /// /// A Null-terminated ASCII string that contains one or more RFC 4646 /// language codes. This is the list of language codes that this protocol supports. /// - CHAR8 *SupportedLanguages; + CHAR8 *SupportedLanguages; }; -extern EFI_GUID gEfiDriverDiagnostics2ProtocolGuid; +extern EFI_GUID gEfiDriverDiagnostics2ProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/DriverFamilyOverride.h b/MdePkg/Include/Protocol/DriverFamilyOverride.h index 8ea730e..767c543 100644 --- a/MdePkg/Include/Protocol/DriverFamilyOverride.h +++ b/MdePkg/Include/Protocol/DriverFamilyOverride.h @@ -14,12 +14,13 @@ SPDX-License-Identifier: BSD-2-Clause-Patent 0xb1ee129e, 0xda36, 0x4181, { 0x91, 0xf8, 0x4, 0xa4, 0x92, 0x37, 0x66, 0xa7 } \ } -typedef struct _EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL; +typedef struct _EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL; // // Prototypes for the Driver Family Override Protocol // // + /** This function returns the version value associated with the driver specified by This. @@ -52,9 +53,9 @@ UINT32 /// Bus Specific Driver Override Protocol. /// struct _EFI_DRIVER_FAMILY_OVERRIDE_PROTOCOL { - EFI_DRIVER_FAMILY_OVERRIDE_GET_VERSION GetVersion; + EFI_DRIVER_FAMILY_OVERRIDE_GET_VERSION GetVersion; }; -extern EFI_GUID gEfiDriverFamilyOverrideProtocolGuid; +extern EFI_GUID gEfiDriverFamilyOverrideProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/DriverHealth.h b/MdePkg/Include/Protocol/DriverHealth.h index fa2aa78..9de0254 100644 --- a/MdePkg/Include/Protocol/DriverHealth.h +++ b/MdePkg/Include/Protocol/DriverHealth.h @@ -37,7 +37,7 @@ 0x2a534210, 0x9280, 0x41d8, { 0xae, 0x79, 0xca, 0xda, 0x1, 0xa2, 0xb1, 0x27 } \ } -typedef struct _EFI_DRIVER_HEALTH_PROTOCOL EFI_DRIVER_HEALTH_PROTOCOL; +typedef struct _EFI_DRIVER_HEALTH_PROTOCOL EFI_DRIVER_HEALTH_PROTOCOL; /// /// EFI_DRIVER_HEALTH_HEALTH_STATUS @@ -55,8 +55,8 @@ typedef enum { /// EFI_DRIVER_HEALTH_HII_MESSAGE /// typedef struct { - EFI_HII_HANDLE HiiHandle; - EFI_STRING_ID StringId; + EFI_HII_HANDLE HiiHandle; + EFI_STRING_ID StringId; /// /// 64-bit numeric value of the warning/error specified by this message. @@ -66,7 +66,7 @@ typedef struct { /// The values 0x8000000000000000 to 0x8fffffffffffffff is reserved for platform/OEM drivers. /// All other values are reserved and should not be used. /// - UINT64 MessageCode; + UINT64 MessageCode; } EFI_DRIVER_HEALTH_HII_MESSAGE; /** @@ -228,14 +228,10 @@ EFI_STATUS /// hardware configuration changes. /// struct _EFI_DRIVER_HEALTH_PROTOCOL { - EFI_DRIVER_HEALTH_GET_HEALTH_STATUS GetHealthStatus; - EFI_DRIVER_HEALTH_REPAIR Repair; + EFI_DRIVER_HEALTH_GET_HEALTH_STATUS GetHealthStatus; + EFI_DRIVER_HEALTH_REPAIR Repair; }; -extern EFI_GUID gEfiDriverHealthProtocolGuid; +extern EFI_GUID gEfiDriverHealthProtocolGuid; #endif - - - - diff --git a/MdePkg/Include/Protocol/DriverSupportedEfiVersion.h b/MdePkg/Include/Protocol/DriverSupportedEfiVersion.h index 9514bd6..4de1264 100644 --- a/MdePkg/Include/Protocol/DriverSupportedEfiVersion.h +++ b/MdePkg/Include/Protocol/DriverSupportedEfiVersion.h @@ -15,7 +15,6 @@ #define EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL_GUID \ { 0x5c198761, 0x16a8, 0x4e69, { 0x97, 0x2c, 0x89, 0xd6, 0x79, 0x54, 0xf8, 0x1d } } - /// /// The EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL provides a /// mechanism for an EFI driver to publish the version of the EFI @@ -28,13 +27,13 @@ typedef struct _EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL { /// The size, in bytes, of the entire structure. Future versions of this /// specification may grow the size of the structure. /// - UINT32 Length; + UINT32 Length; /// /// The latest version of the UEFI specification that this driver conforms to. /// - UINT32 FirmwareVersion; + UINT32 FirmwareVersion; } EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL; -extern EFI_GUID gEfiDriverSupportedEfiVersionProtocolGuid; +extern EFI_GUID gEfiDriverSupportedEfiVersionProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/DxeMmReadyToLock.h b/MdePkg/Include/Protocol/DxeMmReadyToLock.h index ecf4445..a90e8c7 100644 --- a/MdePkg/Include/Protocol/DxeMmReadyToLock.h +++ b/MdePkg/Include/Protocol/DxeMmReadyToLock.h @@ -14,6 +14,6 @@ 0x60ff8964, 0xe906, 0x41d0, { 0xaf, 0xed, 0xf2, 0x41, 0xe9, 0x74, 0xe0, 0x8e } \ } -extern EFI_GUID gEfiDxeMmReadyToLockProtocolGuid; +extern EFI_GUID gEfiDxeMmReadyToLockProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/DxeSmmReadyToLock.h b/MdePkg/Include/Protocol/DxeSmmReadyToLock.h index c7926c8..c82e0fd 100644 --- a/MdePkg/Include/Protocol/DxeSmmReadyToLock.h +++ b/MdePkg/Include/Protocol/DxeSmmReadyToLock.h @@ -27,8 +27,8 @@ #include -#define EFI_DXE_SMM_READY_TO_LOCK_PROTOCOL_GUID EFI_DXE_MM_READY_TO_LOCK_PROTOCOL_GUID +#define EFI_DXE_SMM_READY_TO_LOCK_PROTOCOL_GUID EFI_DXE_MM_READY_TO_LOCK_PROTOCOL_GUID -extern EFI_GUID gEfiDxeSmmReadyToLockProtocolGuid; +extern EFI_GUID gEfiDxeSmmReadyToLockProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Eap.h b/MdePkg/Include/Protocol/Eap.h index 203d0f4..37b94b5 100644 --- a/MdePkg/Include/Protocol/Eap.h +++ b/MdePkg/Include/Protocol/Eap.h @@ -16,7 +16,6 @@ #ifndef __EFI_EAP_PROTOCOL_H__ #define __EFI_EAP_PROTOCOL_H__ - #define EFI_EAP_PROTOCOL_GUID \ { \ 0x5d9f96db, 0xe731, 0x4caa, {0xa0, 0xd, 0x72, 0xe1, 0x87, 0xcd, 0x77, 0x62 } \ @@ -28,21 +27,21 @@ typedef struct _EFI_EAP_PROTOCOL EFI_EAP_PROTOCOL; /// Type for the identification number assigned to the Port by the /// System in which the Port resides. /// -typedef VOID * EFI_PORT_HANDLE; +typedef VOID *EFI_PORT_HANDLE; /// /// EAP Authentication Method Type (RFC 3748) ///@{ -#define EFI_EAP_TYPE_TLS 13 ///< REQUIRED - RFC 5216 +#define EFI_EAP_TYPE_TLS 13///< REQUIRED - RFC 5216 ///@} // // EAP_TYPE MD5, OTP and TOEKN_CARD has been removed from UEFI2.3.1B. // Definitions are kept for backward compatibility. // -#define EFI_EAP_TYPE_MD5 4 -#define EFI_EAP_TYPE_OTP 5 -#define EFI_EAP_TYPE_TOKEN_CARD 6 +#define EFI_EAP_TYPE_MD5 4 +#define EFI_EAP_TYPE_OTP 5 +#define EFI_EAP_TYPE_TOKEN_CARD 6 /** One user provided EAP authentication method. @@ -146,11 +145,10 @@ EFI_STATUS /// Port means a NIC. For the details of EAP protocol, please refer to RFC 2284. /// struct _EFI_EAP_PROTOCOL { - EFI_EAP_SET_DESIRED_AUTHENTICATION_METHOD SetDesiredAuthMethod; - EFI_EAP_REGISTER_AUTHENTICATION_METHOD RegisterAuthMethod; + EFI_EAP_SET_DESIRED_AUTHENTICATION_METHOD SetDesiredAuthMethod; + EFI_EAP_REGISTER_AUTHENTICATION_METHOD RegisterAuthMethod; }; -extern EFI_GUID gEfiEapProtocolGuid; +extern EFI_GUID gEfiEapProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/EapConfiguration.h b/MdePkg/Include/Protocol/EapConfiguration.h index 3ca02c3..6fcddab 100644 --- a/MdePkg/Include/Protocol/EapConfiguration.h +++ b/MdePkg/Include/Protocol/EapConfiguration.h @@ -25,7 +25,7 @@ typedef struct _EFI_EAP_CONFIGURATION_PROTOCOL EFI_EAP_CONFIGURATION_PROTOCOL; /// /// Make sure it not conflict with any real EapTypeXXX /// -#define EFI_EAP_TYPE_ATTRIBUTE 0 +#define EFI_EAP_TYPE_ATTRIBUTE 0 typedef enum { /// @@ -98,7 +98,7 @@ typedef UINT8 EFI_EAP_TYPE; **/ typedef EFI_STATUS -(EFIAPI *EFI_EAP_CONFIGURATION_SET_DATA) ( +(EFIAPI *EFI_EAP_CONFIGURATION_SET_DATA)( IN EFI_EAP_CONFIGURATION_PROTOCOL *This, IN EFI_EAP_TYPE EapType, IN EFI_EAP_CONFIG_DATA_TYPE DataType, @@ -130,7 +130,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_EAP_CONFIGURATION_GET_DATA) ( +(EFIAPI *EFI_EAP_CONFIGURATION_GET_DATA)( IN EFI_EAP_CONFIGURATION_PROTOCOL *This, IN EFI_EAP_TYPE EapType, IN EFI_EAP_CONFIG_DATA_TYPE DataType, @@ -144,10 +144,10 @@ EFI_STATUS /// private key file. /// struct _EFI_EAP_CONFIGURATION_PROTOCOL { - EFI_EAP_CONFIGURATION_SET_DATA SetData; - EFI_EAP_CONFIGURATION_GET_DATA GetData; + EFI_EAP_CONFIGURATION_SET_DATA SetData; + EFI_EAP_CONFIGURATION_GET_DATA GetData; }; -extern EFI_GUID gEfiEapConfigurationProtocolGuid; +extern EFI_GUID gEfiEapConfigurationProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/EapManagement.h b/MdePkg/Include/Protocol/EapManagement.h index 8e6addb..ea1b0d7 100644 --- a/MdePkg/Include/Protocol/EapManagement.h +++ b/MdePkg/Include/Protocol/EapManagement.h @@ -30,8 +30,8 @@ typedef struct _EFI_EAP_MANAGEMENT_PROTOCOL EFI_EAP_MANAGEMENT_PROTOCOL; /// PAE Capabilities /// ///@{ -#define PAE_SUPPORT_AUTHENTICATOR 0x01 -#define PAE_SUPPORT_SUPPLICANT 0x02 +#define PAE_SUPPORT_AUTHENTICATOR 0x01 +#define PAE_SUPPORT_SUPPLICANT 0x02 ///@} /// @@ -42,18 +42,18 @@ typedef struct _EFI_EAPOL_PORT_INFO { /// The identification number assigned to the Port by the System in /// which the Port resides. /// - EFI_PORT_HANDLE PortNumber; + EFI_PORT_HANDLE PortNumber; /// /// The protocol version number of the EAPOL implementation /// supported by the Port. /// - UINT8 ProtocolVersion; + UINT8 ProtocolVersion; /// /// The capabilities of the PAE associated with the Port. This field /// indicates whether Authenticator functionality, Supplicant /// functionality, both, or neither, is supported by the Port's PAE. /// - UINT8 PaeCapabilities; + UINT8 PaeCapabilities; } EFI_EAPOL_PORT_INFO; /// @@ -74,10 +74,10 @@ typedef enum _EFI_EAPOL_SUPPLICANT_PAE_STATE { /// Definitions for ValidFieldMask /// ///@{ -#define AUTH_PERIOD_FIELD_VALID 0x01 -#define HELD_PERIOD_FIELD_VALID 0x02 -#define START_PERIOD_FIELD_VALID 0x04 -#define MAX_START_FIELD_VALID 0x08 +#define AUTH_PERIOD_FIELD_VALID 0x01 +#define HELD_PERIOD_FIELD_VALID 0x02 +#define START_PERIOD_FIELD_VALID 0x04 +#define MAX_START_FIELD_VALID 0x08 ///@} /// @@ -87,25 +87,25 @@ typedef struct _EFI_EAPOL_SUPPLICANT_PAE_CONFIGURATION { /// /// Indicates which of the following fields are valid. /// - UINT8 ValidFieldMask; + UINT8 ValidFieldMask; /// /// The initial value for the authWhile timer. Its default value is 30s. /// - UINTN AuthPeriod; + UINTN AuthPeriod; /// /// The initial value for the heldWhile timer. Its default value is 60s. /// - UINTN HeldPeriod; + UINTN HeldPeriod; /// /// The initial value for the startWhen timer. Its default value is 30s. /// - UINTN StartPeriod; + UINTN StartPeriod; /// /// The maximum number of successive EAPOL-Start messages will /// be sent before the Supplicant assumes that there is no /// Authenticator present. Its default value is 3. /// - UINTN MaxStart; + UINTN MaxStart; } EFI_EAPOL_SUPPLICANT_PAE_CONFIGURATION; /// @@ -115,55 +115,55 @@ typedef struct _EFI_EAPOL_SUPPLICANT_PAE_STATISTICS { /// /// The number of EAPOL frames of any type that have been received by this Supplican. /// - UINTN EapolFramesReceived; + UINTN EapolFramesReceived; /// /// The number of EAPOL frames of any type that have been transmitted by this Supplicant. /// - UINTN EapolFramesTransmitted; + UINTN EapolFramesTransmitted; /// /// The number of EAPOL Start frames that have been transmitted by this Supplicant. /// - UINTN EapolStartFramesTransmitted; + UINTN EapolStartFramesTransmitted; /// /// The number of EAPOL Logoff frames that have been transmitted by this Supplicant. /// - UINTN EapolLogoffFramesTransmitted; + UINTN EapolLogoffFramesTransmitted; /// /// The number of EAP Resp/Id frames that have been transmitted by this Supplicant. /// - UINTN EapRespIdFramesTransmitted; + UINTN EapRespIdFramesTransmitted; /// /// The number of valid EAP Response frames (other than Resp/Id frames) that have been /// transmitted by this Supplicant. /// - UINTN EapResponseFramesTransmitted; + UINTN EapResponseFramesTransmitted; /// /// The number of EAP Req/Id frames that have been received by this Supplicant. /// - UINTN EapReqIdFramesReceived; + UINTN EapReqIdFramesReceived; /// /// The number of EAP Request frames (other than Rq/Id frames) that have been received /// by this Supplicant. /// - UINTN EapRequestFramesReceived; + UINTN EapRequestFramesReceived; /// /// The number of EAPOL frames that have been received by this Supplicant in which the /// frame type is not recognized. /// - UINTN InvalidEapolFramesReceived; + UINTN InvalidEapolFramesReceived; /// /// The number of EAPOL frames that have been received by this Supplicant in which the /// Packet Body Length field (7.5.5) is invalid. /// - UINTN EapLengthErrorFramesReceived; + UINTN EapLengthErrorFramesReceived; /// /// The protocol version number carried in the most recently received EAPOL frame. /// - UINTN LastEapolFrameVersion; + UINTN LastEapolFrameVersion; /// /// The source MAC address carried in the most recently received EAPOL frame. /// - UINTN LastEapolFrameSource; + UINTN LastEapolFrameSource; } EFI_EAPOL_SUPPLICANT_PAE_STATISTICS; /** @@ -391,7 +391,6 @@ struct _EFI_EAP_MANAGEMENT_PROTOCOL { EFI_EAP_GET_SUPPLICANT_STATISTICS GetSupplicantStatistics; }; -extern EFI_GUID gEfiEapManagementProtocolGuid; +extern EFI_GUID gEfiEapManagementProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/EapManagement2.h b/MdePkg/Include/Protocol/EapManagement2.h index f8a89b0..ab42b04 100644 --- a/MdePkg/Include/Protocol/EapManagement2.h +++ b/MdePkg/Include/Protocol/EapManagement2.h @@ -49,7 +49,7 @@ typedef struct _EFI_EAP_MANAGEMENT2_PROTOCOL EFI_EAP_MANAGEMENT2_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI *EFI_EAP_GET_KEY) ( +(EFIAPI *EFI_EAP_GET_KEY)( IN EFI_EAP_MANAGEMENT2_PROTOCOL *This, IN OUT UINT8 *Msk, IN OUT UINTN *MskSize, @@ -76,6 +76,6 @@ struct _EFI_EAP_MANAGEMENT2_PROTOCOL { EFI_EAP_GET_KEY GetKey; }; -extern EFI_GUID gEfiEapManagement2ProtocolGuid; +extern EFI_GUID gEfiEapManagement2ProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Ebc.h b/MdePkg/Include/Protocol/Ebc.h index 2b7191a..993ec0c 100644 --- a/MdePkg/Include/Protocol/Ebc.h +++ b/MdePkg/Include/Protocol/Ebc.h @@ -59,26 +59,26 @@ // // #define OPCODE_27 0x27 // -#define OPCODE_MOVQQ 0x28 // Does this go away? -#define OPCODE_LOADSP 0x29 -#define OPCODE_STORESP 0x2A -#define OPCODE_PUSH 0x2B -#define OPCODE_POP 0x2C -#define OPCODE_CMPIEQ 0x2D -#define OPCODE_CMPILTE 0x2E -#define OPCODE_CMPIGTE 0x2F -#define OPCODE_CMPIULTE 0x30 -#define OPCODE_CMPIUGTE 0x31 -#define OPCODE_MOVNW 0x32 -#define OPCODE_MOVND 0x33 +#define OPCODE_MOVQQ 0x28 // Does this go away? +#define OPCODE_LOADSP 0x29 +#define OPCODE_STORESP 0x2A +#define OPCODE_PUSH 0x2B +#define OPCODE_POP 0x2C +#define OPCODE_CMPIEQ 0x2D +#define OPCODE_CMPILTE 0x2E +#define OPCODE_CMPIGTE 0x2F +#define OPCODE_CMPIULTE 0x30 +#define OPCODE_CMPIUGTE 0x31 +#define OPCODE_MOVNW 0x32 +#define OPCODE_MOVND 0x33 // // #define OPCODE_34 0x34 // -#define OPCODE_PUSHN 0x35 -#define OPCODE_POPN 0x36 -#define OPCODE_MOVI 0x37 -#define OPCODE_MOVIN 0x38 -#define OPCODE_MOVREL 0x39 +#define OPCODE_PUSHN 0x35 +#define OPCODE_POPN 0x36 +#define OPCODE_MOVI 0x37 +#define OPCODE_MOVIN 0x38 +#define OPCODE_MOVREL 0x39 // // Bit masks for opcode encodings @@ -103,16 +103,16 @@ // // Bit masks for operand encodings // -#define OPERAND_M_INDIRECT1 0x08 -#define OPERAND_M_INDIRECT2 0x80 -#define OPERAND_M_OP1 0x07 -#define OPERAND_M_OP2 0x70 +#define OPERAND_M_INDIRECT1 0x08 +#define OPERAND_M_INDIRECT2 0x80 +#define OPERAND_M_OP1 0x07 +#define OPERAND_M_OP2 0x70 // // Masks for data manipulation instructions // -#define DATAMANIP_M_64 0x40 // 64-bit width operation -#define DATAMANIP_M_IMMDATA 0x80 +#define DATAMANIP_M_64 0x40 // 64-bit width operation +#define DATAMANIP_M_IMMDATA 0x80 // // For MOV instructions, need a mask for the opcode when immediate @@ -139,46 +139,46 @@ // // Masks for CALL instruction encodings // -#define OPERAND_M_RELATIVE_ADDR 0x10 -#define OPERAND_M_NATIVE_CALL 0x20 +#define OPERAND_M_RELATIVE_ADDR 0x10 +#define OPERAND_M_NATIVE_CALL 0x20 // // Masks for decoding push/pop instructions // -#define PUSHPOP_M_IMMDATA 0x80 // opcode bit indicating immediate data -#define PUSHPOP_M_64 0x40 // opcode bit indicating 64-bit operation +#define PUSHPOP_M_IMMDATA 0x80 // opcode bit indicating immediate data +#define PUSHPOP_M_64 0x40 // opcode bit indicating 64-bit operation // // Mask for operand of JMP instruction // -#define JMP_M_RELATIVE 0x10 -#define JMP_M_CONDITIONAL 0x80 -#define JMP_M_CS 0x40 +#define JMP_M_RELATIVE 0x10 +#define JMP_M_CONDITIONAL 0x80 +#define JMP_M_CS 0x40 // // Macros to determine if a given operand is indirect // -#define OPERAND1_INDIRECT(op) ((op) & OPERAND_M_INDIRECT1) -#define OPERAND2_INDIRECT(op) ((op) & OPERAND_M_INDIRECT2) +#define OPERAND1_INDIRECT(op) ((op) & OPERAND_M_INDIRECT1) +#define OPERAND2_INDIRECT(op) ((op) & OPERAND_M_INDIRECT2) // // Macros to extract the operands from second byte of instructions // -#define OPERAND1_REGNUM(op) ((op) & OPERAND_M_OP1) -#define OPERAND2_REGNUM(op) (((op) & OPERAND_M_OP2) >> 4) +#define OPERAND1_REGNUM(op) ((op) & OPERAND_M_OP1) +#define OPERAND2_REGNUM(op) (((op) & OPERAND_M_OP2) >> 4) -#define OPERAND1_CHAR(op) ('0' + OPERAND1_REGNUM (op)) -#define OPERAND2_CHAR(op) ('0' + OPERAND2_REGNUM (op)) +#define OPERAND1_CHAR(op) ('0' + OPERAND1_REGNUM (op)) +#define OPERAND2_CHAR(op) ('0' + OPERAND2_REGNUM (op)) // // Condition masks usually for byte 1 encodings of code // -#define CONDITION_M_CONDITIONAL 0x80 -#define CONDITION_M_CS 0x40 +#define CONDITION_M_CONDITIONAL 0x80 +#define CONDITION_M_CS 0x40 /// /// Protocol Guid Name defined in spec. /// -#define EFI_EBC_PROTOCOL_GUID EFI_EBC_INTERPRETER_PROTOCOL_GUID +#define EFI_EBC_PROTOCOL_GUID EFI_EBC_INTERPRETER_PROTOCOL_GUID /// /// Define for forward reference. @@ -294,15 +294,15 @@ EFI_STATUS /// image can then be run using the standard EFI start image services. /// struct _EFI_EBC_PROTOCOL { - EFI_EBC_CREATE_THUNK CreateThunk; - EFI_EBC_UNLOAD_IMAGE UnloadImage; - EFI_EBC_REGISTER_ICACHE_FLUSH RegisterICacheFlush; - EFI_EBC_GET_VERSION GetVersion; + EFI_EBC_CREATE_THUNK CreateThunk; + EFI_EBC_UNLOAD_IMAGE UnloadImage; + EFI_EBC_REGISTER_ICACHE_FLUSH RegisterICacheFlush; + EFI_EBC_GET_VERSION GetVersion; }; // // Extern the global EBC protocol GUID // -extern EFI_GUID gEfiEbcProtocolGuid; +extern EFI_GUID gEfiEbcProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/EdidActive.h b/MdePkg/Include/Protocol/EdidActive.h index bfc2151..5bdb22b 100644 --- a/MdePkg/Include/Protocol/EdidActive.h +++ b/MdePkg/Include/Protocol/EdidActive.h @@ -28,7 +28,7 @@ typedef struct { /// is available from the video output device. Otherwise, it must be a /// minimum of 128 bytes. /// - UINT32 SizeOfEdid; + UINT32 SizeOfEdid; /// /// A pointer to a read-only array of bytes that contains the EDID @@ -41,6 +41,6 @@ typedef struct { UINT8 *Edid; } EFI_EDID_ACTIVE_PROTOCOL; -extern EFI_GUID gEfiEdidActiveProtocolGuid; +extern EFI_GUID gEfiEdidActiveProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/EdidDiscovered.h b/MdePkg/Include/Protocol/EdidDiscovered.h index 7ddfe2b..6be9285 100644 --- a/MdePkg/Include/Protocol/EdidDiscovered.h +++ b/MdePkg/Include/Protocol/EdidDiscovered.h @@ -26,7 +26,7 @@ typedef struct { /// is available from the video output device. Otherwise, it must be a /// minimum of 128 bytes. /// - UINT32 SizeOfEdid; + UINT32 SizeOfEdid; /// /// A pointer to a read-only array of bytes that contains the EDID @@ -39,6 +39,6 @@ typedef struct { UINT8 *Edid; } EFI_EDID_DISCOVERED_PROTOCOL; -extern EFI_GUID gEfiEdidDiscoveredProtocolGuid; +extern EFI_GUID gEfiEdidDiscoveredProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/EdidOverride.h b/MdePkg/Include/Protocol/EdidOverride.h index 709ee48..065a0cc 100644 --- a/MdePkg/Include/Protocol/EdidOverride.h +++ b/MdePkg/Include/Protocol/EdidOverride.h @@ -19,8 +19,8 @@ typedef struct _EFI_EDID_OVERRIDE_PROTOCOL EFI_EDID_OVERRIDE_PROTOCOL; -#define EFI_EDID_OVERRIDE_DONT_OVERRIDE 0x01 -#define EFI_EDID_OVERRIDE_ENABLE_HOT_PLUG 0x02 +#define EFI_EDID_OVERRIDE_DONT_OVERRIDE 0x01 +#define EFI_EDID_OVERRIDE_ENABLE_HOT_PLUG 0x02 /** Returns policy information and potentially a replacement EDID for the specified video output device. @@ -53,9 +53,9 @@ EFI_STATUS /// EDID information to the producer of the Graphics Output protocol. /// struct _EFI_EDID_OVERRIDE_PROTOCOL { - EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID GetEdid; + EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID GetEdid; }; -extern EFI_GUID gEfiEdidOverrideProtocolGuid; +extern EFI_GUID gEfiEdidOverrideProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/EraseBlock.h b/MdePkg/Include/Protocol/EraseBlock.h index cb809c1..bfa5921 100644 --- a/MdePkg/Include/Protocol/EraseBlock.h +++ b/MdePkg/Include/Protocol/EraseBlock.h @@ -19,7 +19,7 @@ typedef struct _EFI_ERASE_BLOCK_PROTOCOL EFI_ERASE_BLOCK_PROTOCOL; -#define EFI_ERASE_BLOCK_PROTOCOL_REVISION ((2<<16) | (60)) +#define EFI_ERASE_BLOCK_PROTOCOL_REVISION ((2<<16) | (60)) /// /// EFI_ERASE_BLOCK_TOKEN @@ -30,11 +30,11 @@ typedef struct { // non-blocking I/O is supported, then non-blocking I/O is performed, and // Event will be signaled when the erase request is completed. // - EFI_EVENT Event; + EFI_EVENT Event; // // Defines whether the signaled event encountered an error. // - EFI_STATUS TransactionStatus; + EFI_STATUS TransactionStatus; } EFI_ERASE_BLOCK_TOKEN; /** @@ -66,7 +66,7 @@ typedef struct { **/ typedef EFI_STATUS -(EFIAPI *EFI_BLOCK_ERASE) ( +(EFIAPI *EFI_BLOCK_ERASE)( IN EFI_ERASE_BLOCK_PROTOCOL *This, IN UINT32 MediaId, IN EFI_LBA LBA, @@ -85,15 +85,15 @@ struct _EFI_ERASE_BLOCK_PROTOCOL { // revisions must be backwards compatible. If a future version is not // backwards compatible, it is not the same GUID. // - UINT64 Revision; + UINT64 Revision; // // Returns the erase length granularity as a number of logical blocks. A // value of 1 means the erase granularity is one logical block. // - UINT32 EraseLengthGranularity; - EFI_BLOCK_ERASE EraseBlocks; + UINT32 EraseLengthGranularity; + EFI_BLOCK_ERASE EraseBlocks; }; -extern EFI_GUID gEfiEraseBlockProtocolGuid; +extern EFI_GUID gEfiEraseBlockProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/FirmwareManagement.h b/MdePkg/Include/Protocol/FirmwareManagement.h index b501261..f37067d 100644 --- a/MdePkg/Include/Protocol/FirmwareManagement.h +++ b/MdePkg/Include/Protocol/FirmwareManagement.h @@ -20,7 +20,6 @@ #ifndef __EFI_FIRMWARE_MANAGEMENT_PROTOCOL_H__ #define __EFI_FIRMWARE_MANAGEMENT_PROTOCOL_H__ - #define EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GUID \ { \ 0x86c77a67, 0xb97, 0x4633, {0xa1, 0x87, 0x49, 0x10, 0x4d, 0x6, 0x85, 0xc7 } \ @@ -31,26 +30,26 @@ typedef struct _EFI_FIRMWARE_MANAGEMENT_PROTOCOL EFI_FIRMWARE_MANAGEMENT_PROTOCO /// /// Dependency Expression Opcode /// -#define EFI_FMP_DEP_PUSH_GUID 0x00 -#define EFI_FMP_DEP_PUSH_VERSION 0x01 -#define EFI_FMP_DEP_VERSION_STR 0x02 -#define EFI_FMP_DEP_AND 0x03 -#define EFI_FMP_DEP_OR 0x04 -#define EFI_FMP_DEP_NOT 0x05 -#define EFI_FMP_DEP_TRUE 0x06 -#define EFI_FMP_DEP_FALSE 0x07 -#define EFI_FMP_DEP_EQ 0x08 -#define EFI_FMP_DEP_GT 0x09 -#define EFI_FMP_DEP_GTE 0x0A -#define EFI_FMP_DEP_LT 0x0B -#define EFI_FMP_DEP_LTE 0x0C -#define EFI_FMP_DEP_END 0x0D +#define EFI_FMP_DEP_PUSH_GUID 0x00 +#define EFI_FMP_DEP_PUSH_VERSION 0x01 +#define EFI_FMP_DEP_VERSION_STR 0x02 +#define EFI_FMP_DEP_AND 0x03 +#define EFI_FMP_DEP_OR 0x04 +#define EFI_FMP_DEP_NOT 0x05 +#define EFI_FMP_DEP_TRUE 0x06 +#define EFI_FMP_DEP_FALSE 0x07 +#define EFI_FMP_DEP_EQ 0x08 +#define EFI_FMP_DEP_GT 0x09 +#define EFI_FMP_DEP_GTE 0x0A +#define EFI_FMP_DEP_LT 0x0B +#define EFI_FMP_DEP_LTE 0x0C +#define EFI_FMP_DEP_END 0x0D /// /// Image Attribute - Dependency /// typedef struct { - UINT8 Dependencies[1]; + UINT8 Dependencies[1]; } EFI_FIRMWARE_IMAGE_DEP; /// @@ -61,32 +60,32 @@ typedef struct { /// A unique number identifying the firmware image within the device. The number is /// between 1 and DescriptorCount. /// - UINT8 ImageIndex; + UINT8 ImageIndex; /// /// A unique GUID identifying the firmware image type. /// - EFI_GUID ImageTypeId; + EFI_GUID ImageTypeId; /// /// A unique number identifying the firmware image. /// - UINT64 ImageId; + UINT64 ImageId; /// /// A pointer to a null-terminated string representing the firmware image name. /// - CHAR16 *ImageIdName; + CHAR16 *ImageIdName; /// /// Identifies the version of the device firmware. The format is vendor specific and new /// version must have a greater value than an old version. /// - UINT32 Version; + UINT32 Version; /// /// A pointer to a null-terminated string representing the firmware image version name. /// - CHAR16 *VersionName; + CHAR16 *VersionName; /// /// Size of the image in bytes. If size=0, then only ImageIndex and ImageTypeId are valid. /// - UINTN Size; + UINTN Size; /// /// Image attributes that are supported by this device. See 'Image Attribute Definitions' /// for possible returned values of this parameter. A value of 1 indicates the attribute is @@ -94,32 +93,32 @@ typedef struct { /// value of 0 indicates the attribute is not supported and the current setting value in /// AttributesSetting is meaningless. /// - UINT64 AttributesSupported; + UINT64 AttributesSupported; /// /// Image attributes. See 'Image Attribute Definitions' for possible returned values of /// this parameter. /// - UINT64 AttributesSetting; + UINT64 AttributesSetting; /// /// Image compatibilities. See 'Image Compatibility Definitions' for possible returned /// values of this parameter. /// - UINT64 Compatibilities; + UINT64 Compatibilities; /// /// Describes the lowest ImageDescriptor version that the device will accept. Only /// present in version 2 or higher. /// - UINT32 LowestSupportedImageVersion; + UINT32 LowestSupportedImageVersion; /// /// Describes the version that was last attempted to update. If no update attempted the /// value will be 0. If the update attempted was improperly formatted and no version /// number was available then the value will be zero. Only present in version 3 or higher. - UINT32 LastAttemptVersion; + UINT32 LastAttemptVersion; /// /// Describes the status that was last attempted to update. If no update has been attempted /// the value will be LAST_ATTEMPT_STATUS_SUCCESS. Only present in version 3 or higher. /// - UINT32 LastAttemptStatus; + UINT32 LastAttemptStatus; /// /// An optional number to identify the unique hardware instance within the system for /// devices that may have multiple instances (Example: a plug in pci network card). This @@ -135,11 +134,10 @@ typedef struct { /// unique hardware instance number or a hardware instance number is not needed. Only /// present in version 3 or higher. /// - UINT64 HardwareInstance; - EFI_FIRMWARE_IMAGE_DEP *Dependencies; + UINT64 HardwareInstance; + EFI_FIRMWARE_IMAGE_DEP *Dependencies; } EFI_FIRMWARE_IMAGE_DESCRIPTOR; - // // Image Attribute Definitions // @@ -147,34 +145,33 @@ typedef struct { /// The attribute IMAGE_ATTRIBUTE_IMAGE_UPDATABLE indicates this device supports firmware /// image update. /// -#define IMAGE_ATTRIBUTE_IMAGE_UPDATABLE 0x0000000000000001 +#define IMAGE_ATTRIBUTE_IMAGE_UPDATABLE 0x0000000000000001 /// /// The attribute IMAGE_ATTRIBUTE_RESET_REQUIRED indicates a reset of the device is required /// for the new firmware image to take effect after a firmware update. The device is the device hosting /// the firmware image. /// -#define IMAGE_ATTRIBUTE_RESET_REQUIRED 0x0000000000000002 +#define IMAGE_ATTRIBUTE_RESET_REQUIRED 0x0000000000000002 /// /// The attribute IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED indicates authentication is /// required to perform the following image operations: GetImage(), SetImage(), and /// CheckImage(). See 'Image Attribute - Authentication'. /// -#define IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED 0x0000000000000004 +#define IMAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED 0x0000000000000004 /// /// The attribute IMAGE_ATTRIBUTE_IN_USE indicates the current state of the firmware image. /// This distinguishes firmware images in a device that supports redundant images. /// -#define IMAGE_ATTRIBUTE_IN_USE 0x0000000000000008 +#define IMAGE_ATTRIBUTE_IN_USE 0x0000000000000008 /// /// The attribute IMAGE_ATTRIBUTE_UEFI_IMAGE indicates that this image is an EFI compatible image. /// -#define IMAGE_ATTRIBUTE_UEFI_IMAGE 0x0000000000000010 +#define IMAGE_ATTRIBUTE_UEFI_IMAGE 0x0000000000000010 /// /// The attribute IMAGE_ATTRIBUTE_DEPENDENCY indicates that there is an EFI_FIRMWARE_IMAGE_DEP /// section associated with the image. /// -#define IMAGE_ATTRIBUTE_DEPENDENCY 0x0000000000000020 - +#define IMAGE_ATTRIBUTE_DEPENDENCY 0x0000000000000020 // // Image Compatibility Definitions @@ -184,13 +181,12 @@ typedef struct { /// Values from 0x0000000000010000 thru 0xFFFFFFFFFFFFFFFF are used by firmware vendor for /// compatibility check. /// -#define IMAGE_COMPATIBILITY_CHECK_SUPPORTED 0x0000000000000001 +#define IMAGE_COMPATIBILITY_CHECK_SUPPORTED 0x0000000000000001 /// /// Descriptor Version exposed by GetImageInfo() function /// -#define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION 4 - +#define EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION 4 /// /// Image Attribute - Authentication Required @@ -200,7 +196,7 @@ typedef struct { /// It is included in the signature of AuthInfo. It is used to ensure freshness/no replay. /// It is incremented during each firmware image operation. /// - UINT64 MonotonicCount; + UINT64 MonotonicCount; /// /// Provides the authorization for the firmware image operations. It is a signature across /// the image data and the Monotonic Count value. Caller uses the private key that is @@ -208,10 +204,9 @@ typedef struct { /// Because this is defined as a signature, WIN_CERTIFICATE_UEFI_GUID.CertType must /// be EFI_CERT_TYPE_PKCS7_GUID. /// - WIN_CERTIFICATE_UEFI_GUID AuthInfo; + WIN_CERTIFICATE_UEFI_GUID AuthInfo; } EFI_FIRMWARE_IMAGE_AUTHENTICATION; - // // ImageUpdatable Definitions // @@ -221,31 +216,30 @@ typedef struct { /// the current image. SetImage VendorCode is optional but can be used for vendor /// specific action. /// -#define IMAGE_UPDATABLE_VALID 0x0000000000000001 +#define IMAGE_UPDATABLE_VALID 0x0000000000000001 /// /// IMAGE_UPDATABLE_INVALID indicates SetImage() will reject the new image. No additional /// information is provided for the rejection. /// -#define IMAGE_UPDATABLE_INVALID 0x0000000000000002 +#define IMAGE_UPDATABLE_INVALID 0x0000000000000002 /// /// IMAGE_UPDATABLE_INVALID_TYPE indicates SetImage() will reject the new image. The /// rejection is due to the new image is not a firmware image recognized for this device. /// -#define IMAGE_UPDATABLE_INVALID_TYPE 0x0000000000000004 +#define IMAGE_UPDATABLE_INVALID_TYPE 0x0000000000000004 /// /// IMAGE_UPDATABLE_INVALID_OLD indicates SetImage() will reject the new image. The /// rejection is due to the new image version is older than the current firmware image /// version in the device. The device firmware update policy does not support firmware /// version downgrade. /// -#define IMAGE_UPDATABLE_INVALID_OLD 0x0000000000000008 +#define IMAGE_UPDATABLE_INVALID_OLD 0x0000000000000008 /// /// IMAGE_UPDATABLE_VALID_WITH_VENDOR_CODE indicates SetImage() will accept and update /// the new image only if a correct VendorCode is provided or else image would be /// rejected and SetImage will return appropriate error. /// -#define IMAGE_UPDATABLE_VALID_WITH_VENDOR_CODE 0x0000000000000010 - +#define IMAGE_UPDATABLE_VALID_WITH_VENDOR_CODE 0x0000000000000010 // // Package Attribute Definitions @@ -254,17 +248,17 @@ typedef struct { /// The attribute PACKAGE_ATTRIBUTE_VERSION_UPDATABLE indicates this device supports the /// update of the firmware package version. /// -#define PACKAGE_ATTRIBUTE_VERSION_UPDATABLE 0x0000000000000001 +#define PACKAGE_ATTRIBUTE_VERSION_UPDATABLE 0x0000000000000001 /// /// The attribute PACKAGE_ATTRIBUTE_RESET_REQUIRED indicates a reset of the device is /// required for the new package info to take effect after an update. /// -#define PACKAGE_ATTRIBUTE_RESET_REQUIRED 0x0000000000000002 +#define PACKAGE_ATTRIBUTE_RESET_REQUIRED 0x0000000000000002 /// /// The attribute PACKAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED indicates authentication /// is required to update the package info. /// -#define PACKAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED 0x0000000000000004 +#define PACKAGE_ATTRIBUTE_AUTHENTICATION_REQUIRED 0x0000000000000004 /** Callback function to report the process of the firmware updating. @@ -551,14 +545,14 @@ EFI_STATUS /// - Label all the firmware images within a device with a single version. /// struct _EFI_FIRMWARE_MANAGEMENT_PROTOCOL { - EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_IMAGE_INFO GetImageInfo; - EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_IMAGE GetImage; - EFI_FIRMWARE_MANAGEMENT_PROTOCOL_SET_IMAGE SetImage; - EFI_FIRMWARE_MANAGEMENT_PROTOCOL_CHECK_IMAGE CheckImage; - EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_PACKAGE_INFO GetPackageInfo; - EFI_FIRMWARE_MANAGEMENT_PROTOCOL_SET_PACKAGE_INFO SetPackageInfo; + EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_IMAGE_INFO GetImageInfo; + EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_IMAGE GetImage; + EFI_FIRMWARE_MANAGEMENT_PROTOCOL_SET_IMAGE SetImage; + EFI_FIRMWARE_MANAGEMENT_PROTOCOL_CHECK_IMAGE CheckImage; + EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_PACKAGE_INFO GetPackageInfo; + EFI_FIRMWARE_MANAGEMENT_PROTOCOL_SET_PACKAGE_INFO SetPackageInfo; }; -extern EFI_GUID gEfiFirmwareManagementProtocolGuid; +extern EFI_GUID gEfiFirmwareManagementProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/FirmwareVolume2.h b/MdePkg/Include/Protocol/FirmwareVolume2.h index 0792324..93749c8 100644 --- a/MdePkg/Include/Protocol/FirmwareVolume2.h +++ b/MdePkg/Include/Protocol/FirmwareVolume2.h @@ -21,62 +21,61 @@ typedef struct _EFI_FIRMWARE_VOLUME2_PROTOCOL EFI_FIRMWARE_VOLUME2_PROTOCOL; - /// /// EFI_FV_ATTRIBUTES /// -typedef UINT64 EFI_FV_ATTRIBUTES; +typedef UINT64 EFI_FV_ATTRIBUTES; // // EFI_FV_ATTRIBUTES bit definitions // // EFI_FV_ATTRIBUTES bit semantics -#define EFI_FV2_READ_DISABLE_CAP 0x0000000000000001ULL -#define EFI_FV2_READ_ENABLE_CAP 0x0000000000000002ULL -#define EFI_FV2_READ_STATUS 0x0000000000000004ULL -#define EFI_FV2_WRITE_DISABLE_CAP 0x0000000000000008ULL -#define EFI_FV2_WRITE_ENABLE_CAP 0x0000000000000010ULL -#define EFI_FV2_WRITE_STATUS 0x0000000000000020ULL -#define EFI_FV2_LOCK_CAP 0x0000000000000040ULL -#define EFI_FV2_LOCK_STATUS 0x0000000000000080ULL -#define EFI_FV2_WRITE_POLICY_RELIABLE 0x0000000000000100ULL -#define EFI_FV2_READ_LOCK_CAP 0x0000000000001000ULL -#define EFI_FV2_READ_LOCK_STATUS 0x0000000000002000ULL -#define EFI_FV2_WRITE_LOCK_CAP 0x0000000000004000ULL -#define EFI_FV2_WRITE_LOCK_STATUS 0x0000000000008000ULL -#define EFI_FV2_ALIGNMENT 0x00000000001F0000ULL -#define EFI_FV2_ALIGNMENT_1 0x0000000000000000ULL -#define EFI_FV2_ALIGNMENT_2 0x0000000000010000ULL -#define EFI_FV2_ALIGNMENT_4 0x0000000000020000ULL -#define EFI_FV2_ALIGNMENT_8 0x0000000000030000ULL -#define EFI_FV2_ALIGNMENT_16 0x0000000000040000ULL -#define EFI_FV2_ALIGNMENT_32 0x0000000000050000ULL -#define EFI_FV2_ALIGNMENT_64 0x0000000000060000ULL -#define EFI_FV2_ALIGNMENT_128 0x0000000000070000ULL -#define EFI_FV2_ALIGNMENT_256 0x0000000000080000ULL -#define EFI_FV2_ALIGNMENT_512 0x0000000000090000ULL -#define EFI_FV2_ALIGNMENT_1K 0x00000000000A0000ULL -#define EFI_FV2_ALIGNMENT_2K 0x00000000000B0000ULL -#define EFI_FV2_ALIGNMENT_4K 0x00000000000C0000ULL -#define EFI_FV2_ALIGNMENT_8K 0x00000000000D0000ULL -#define EFI_FV2_ALIGNMENT_16K 0x00000000000E0000ULL -#define EFI_FV2_ALIGNMENT_32K 0x00000000000F0000ULL -#define EFI_FV2_ALIGNMENT_64K 0x0000000000100000ULL -#define EFI_FV2_ALIGNMENT_128K 0x0000000000110000ULL -#define EFI_FV2_ALIGNMENT_256K 0x0000000000120000ULL -#define EFI_FV2_ALIGNMENT_512K 0x0000000000130000ULL -#define EFI_FV2_ALIGNMENT_1M 0x0000000000140000ULL -#define EFI_FV2_ALIGNMENT_2M 0x0000000000150000ULL -#define EFI_FV2_ALIGNMENT_4M 0x0000000000160000ULL -#define EFI_FV2_ALIGNMENT_8M 0x0000000000170000ULL -#define EFI_FV2_ALIGNMENT_16M 0x0000000000180000ULL -#define EFI_FV2_ALIGNMENT_32M 0x0000000000190000ULL -#define EFI_FV2_ALIGNMENT_64M 0x00000000001A0000ULL -#define EFI_FV2_ALIGNMENT_128M 0x00000000001B0000ULL -#define EFI_FV2_ALIGNMENT_256M 0x00000000001C0000ULL -#define EFI_FV2_ALIGNMENT_512M 0x00000000001D0000ULL -#define EFI_FV2_ALIGNMENT_1G 0x00000000001E0000ULL -#define EFI_FV2_ALIGNMENT_2G 0x00000000001F0000ULL +#define EFI_FV2_READ_DISABLE_CAP 0x0000000000000001ULL +#define EFI_FV2_READ_ENABLE_CAP 0x0000000000000002ULL +#define EFI_FV2_READ_STATUS 0x0000000000000004ULL +#define EFI_FV2_WRITE_DISABLE_CAP 0x0000000000000008ULL +#define EFI_FV2_WRITE_ENABLE_CAP 0x0000000000000010ULL +#define EFI_FV2_WRITE_STATUS 0x0000000000000020ULL +#define EFI_FV2_LOCK_CAP 0x0000000000000040ULL +#define EFI_FV2_LOCK_STATUS 0x0000000000000080ULL +#define EFI_FV2_WRITE_POLICY_RELIABLE 0x0000000000000100ULL +#define EFI_FV2_READ_LOCK_CAP 0x0000000000001000ULL +#define EFI_FV2_READ_LOCK_STATUS 0x0000000000002000ULL +#define EFI_FV2_WRITE_LOCK_CAP 0x0000000000004000ULL +#define EFI_FV2_WRITE_LOCK_STATUS 0x0000000000008000ULL +#define EFI_FV2_ALIGNMENT 0x00000000001F0000ULL +#define EFI_FV2_ALIGNMENT_1 0x0000000000000000ULL +#define EFI_FV2_ALIGNMENT_2 0x0000000000010000ULL +#define EFI_FV2_ALIGNMENT_4 0x0000000000020000ULL +#define EFI_FV2_ALIGNMENT_8 0x0000000000030000ULL +#define EFI_FV2_ALIGNMENT_16 0x0000000000040000ULL +#define EFI_FV2_ALIGNMENT_32 0x0000000000050000ULL +#define EFI_FV2_ALIGNMENT_64 0x0000000000060000ULL +#define EFI_FV2_ALIGNMENT_128 0x0000000000070000ULL +#define EFI_FV2_ALIGNMENT_256 0x0000000000080000ULL +#define EFI_FV2_ALIGNMENT_512 0x0000000000090000ULL +#define EFI_FV2_ALIGNMENT_1K 0x00000000000A0000ULL +#define EFI_FV2_ALIGNMENT_2K 0x00000000000B0000ULL +#define EFI_FV2_ALIGNMENT_4K 0x00000000000C0000ULL +#define EFI_FV2_ALIGNMENT_8K 0x00000000000D0000ULL +#define EFI_FV2_ALIGNMENT_16K 0x00000000000E0000ULL +#define EFI_FV2_ALIGNMENT_32K 0x00000000000F0000ULL +#define EFI_FV2_ALIGNMENT_64K 0x0000000000100000ULL +#define EFI_FV2_ALIGNMENT_128K 0x0000000000110000ULL +#define EFI_FV2_ALIGNMENT_256K 0x0000000000120000ULL +#define EFI_FV2_ALIGNMENT_512K 0x0000000000130000ULL +#define EFI_FV2_ALIGNMENT_1M 0x0000000000140000ULL +#define EFI_FV2_ALIGNMENT_2M 0x0000000000150000ULL +#define EFI_FV2_ALIGNMENT_4M 0x0000000000160000ULL +#define EFI_FV2_ALIGNMENT_8M 0x0000000000170000ULL +#define EFI_FV2_ALIGNMENT_16M 0x0000000000180000ULL +#define EFI_FV2_ALIGNMENT_32M 0x0000000000190000ULL +#define EFI_FV2_ALIGNMENT_64M 0x00000000001A0000ULL +#define EFI_FV2_ALIGNMENT_128M 0x00000000001B0000ULL +#define EFI_FV2_ALIGNMENT_256M 0x00000000001C0000ULL +#define EFI_FV2_ALIGNMENT_512M 0x00000000001D0000ULL +#define EFI_FV2_ALIGNMENT_1G 0x00000000001E0000ULL +#define EFI_FV2_ALIGNMENT_2G 0x00000000001F0000ULL /** Returns the attributes and current settings of the firmware volume. @@ -104,11 +103,10 @@ typedef UINT64 EFI_FV_ATTRIBUTES; **/ typedef EFI_STATUS -(EFIAPI * EFI_FV_GET_ATTRIBUTES)( +(EFIAPI *EFI_FV_GET_ATTRIBUTES)( IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This, OUT EFI_FV_ATTRIBUTES *FvAttributes -); - + ); /** Modifies the current settings of the firmware volume according to the input parameter. @@ -199,11 +197,10 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI * EFI_FV_SET_ATTRIBUTES)( +(EFIAPI *EFI_FV_SET_ATTRIBUTES)( IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This, IN OUT EFI_FV_ATTRIBUTES *FvAttributes -); - + ); /** Retrieves a file and/or file information from the firmware volume. @@ -294,7 +291,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI * EFI_FV_READ_FILE)( +(EFIAPI *EFI_FV_READ_FILE)( IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This, IN CONST EFI_GUID *NameGuid, IN OUT VOID **Buffer, @@ -302,9 +299,7 @@ EFI_STATUS OUT EFI_FV_FILETYPE *FoundType, OUT EFI_FV_FILE_ATTRIBUTES *FileAttributes, OUT UINT32 *AuthenticationStatus -); - - + ); /** Locates the requested section within a file and returns it in a buffer. @@ -402,7 +397,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI * EFI_FV_READ_SECTION)( +(EFIAPI *EFI_FV_READ_SECTION)( IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This, IN CONST EFI_GUID *NameGuid, IN EFI_SECTION_TYPE SectionType, @@ -410,14 +405,14 @@ EFI_STATUS IN OUT VOID **Buffer, IN OUT UINTN *BufferSize, OUT UINT32 *AuthenticationStatus -); + ); /// /// EFI_FV_WRITE_POLICY, two policies (unreliable write and reliable write) are defined. /// typedef UINT32 EFI_FV_WRITE_POLICY; -#define EFI_FV_UNRELIABLE_WRITE 0x00000000 -#define EFI_FV_RELIABLE_WRITE 0x00000001 +#define EFI_FV_UNRELIABLE_WRITE 0x00000000 +#define EFI_FV_RELIABLE_WRITE 0x00000001 // // EFI_FV_WRITE_FILE_DATA @@ -426,23 +421,23 @@ typedef struct { /// /// Pointer to a GUID, which is the file name to be written. /// - EFI_GUID *NameGuid; + EFI_GUID *NameGuid; /// /// Indicates the type of file to be written. /// - EFI_FV_FILETYPE Type; + EFI_FV_FILETYPE Type; /// /// Indicates the attributes for the file to be written. /// - EFI_FV_FILE_ATTRIBUTES FileAttributes; + EFI_FV_FILE_ATTRIBUTES FileAttributes; /// /// Pointer to a buffer containing the file to be written. /// - VOID *Buffer; + VOID *Buffer; /// /// Indicates the size of the file image contained in Buffer. /// - UINT32 BufferSize; + UINT32 BufferSize; } EFI_FV_WRITE_FILE_DATA; /** @@ -513,13 +508,12 @@ typedef struct { **/ typedef EFI_STATUS -(EFIAPI * EFI_FV_WRITE_FILE)( +(EFIAPI *EFI_FV_WRITE_FILE)( IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This, IN UINT32 NumberOfFiles, IN EFI_FV_WRITE_POLICY WritePolicy, IN EFI_FV_WRITE_FILE_DATA *FileData -); - + ); /** Retrieves information about the next file in the firmware volume store @@ -598,14 +592,14 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI * EFI_FV_GET_NEXT_FILE)( +(EFIAPI *EFI_FV_GET_NEXT_FILE)( IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This, IN OUT VOID *Key, IN OUT EFI_FV_FILETYPE *FileType, OUT EFI_GUID *NameGuid, OUT EFI_FV_FILE_ATTRIBUTES *Attributes, OUT UINTN *Size -); + ); /** Return information about a firmware volume. @@ -661,8 +655,7 @@ EFI_STATUS IN CONST EFI_GUID *InformationType, IN OUT UINTN *BufferSize, OUT VOID *Buffer -); - + ); /** Sets information about a firmware volume. @@ -711,8 +704,7 @@ EFI_STATUS IN CONST EFI_GUID *InformationType, IN UINTN BufferSize, IN CONST VOID *Buffer -); - + ); /// /// The Firmware Volume Protocol contains the file-level @@ -728,29 +720,28 @@ EFI_STATUS /// Protocol. /// struct _EFI_FIRMWARE_VOLUME2_PROTOCOL { - EFI_FV_GET_ATTRIBUTES GetVolumeAttributes; - EFI_FV_SET_ATTRIBUTES SetVolumeAttributes; - EFI_FV_READ_FILE ReadFile; - EFI_FV_READ_SECTION ReadSection; - EFI_FV_WRITE_FILE WriteFile; - EFI_FV_GET_NEXT_FILE GetNextFile; + EFI_FV_GET_ATTRIBUTES GetVolumeAttributes; + EFI_FV_SET_ATTRIBUTES SetVolumeAttributes; + EFI_FV_READ_FILE ReadFile; + EFI_FV_READ_SECTION ReadSection; + EFI_FV_WRITE_FILE WriteFile; + EFI_FV_GET_NEXT_FILE GetNextFile; /// /// Data field that indicates the size in bytes /// of the Key input buffer for the /// GetNextFile() API. /// - UINT32 KeySize; + UINT32 KeySize; /// /// Handle of the parent firmware volume. /// - EFI_HANDLE ParentHandle; - EFI_FV_GET_INFO GetInfo; - EFI_FV_SET_INFO SetInfo; + EFI_HANDLE ParentHandle; + EFI_FV_GET_INFO GetInfo; + EFI_FV_SET_INFO SetInfo; }; - -extern EFI_GUID gEfiFirmwareVolume2ProtocolGuid; +extern EFI_GUID gEfiFirmwareVolume2ProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/FirmwareVolumeBlock.h b/MdePkg/Include/Protocol/FirmwareVolumeBlock.h index 9d4f6eb..3fcc082 100644 --- a/MdePkg/Include/Protocol/FirmwareVolumeBlock.h +++ b/MdePkg/Include/Protocol/FirmwareVolumeBlock.h @@ -44,11 +44,10 @@ typedef EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI * EFI_FVB_GET_ATTRIBUTES)( +(EFIAPI *EFI_FVB_GET_ATTRIBUTES)( IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This, OUT EFI_FVB_ATTRIBUTES_2 *Attributes -); - + ); /** The SetAttributes() function sets configurable firmware volume @@ -74,11 +73,10 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI * EFI_FVB_SET_ATTRIBUTES)( +(EFIAPI *EFI_FVB_SET_ATTRIBUTES)( IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This, IN OUT EFI_FVB_ATTRIBUTES_2 *Attributes -); - + ); /** The GetPhysicalAddress() function retrieves the base address of @@ -99,10 +97,10 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI * EFI_FVB_GET_PHYSICAL_ADDRESS)( +(EFIAPI *EFI_FVB_GET_PHYSICAL_ADDRESS)( IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This, OUT EFI_PHYSICAL_ADDRESS *Address -); + ); /** The GetBlockSize() function retrieves the size of the requested @@ -132,13 +130,12 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI * EFI_FVB_GET_BLOCK_SIZE)( +(EFIAPI *EFI_FVB_GET_BLOCK_SIZE)( IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This, IN EFI_LBA Lba, OUT UINTN *BlockSize, OUT UINTN *NumberOfBlocks -); - + ); /** Reads the specified number of bytes into a buffer from the specified block. @@ -195,7 +192,7 @@ EFI_STATUS IN UINTN Offset, IN OUT UINTN *NumBytes, IN OUT UINT8 *Buffer -); + ); /** Writes the specified number of bytes from the input buffer to the block. @@ -258,22 +255,18 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI * EFI_FVB_WRITE)( +(EFIAPI *EFI_FVB_WRITE)( IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This, IN EFI_LBA Lba, IN UINTN Offset, IN OUT UINTN *NumBytes, IN UINT8 *Buffer -); - - - + ); /// /// EFI_LBA_LIST_TERMINATOR /// -#define EFI_LBA_LIST_TERMINATOR 0xFFFFFFFFFFFFFFFFULL - +#define EFI_LBA_LIST_TERMINATOR 0xFFFFFFFFFFFFFFFFULL /** Erases and initializes a firmware volume block. @@ -325,10 +318,10 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI * EFI_FVB_ERASE_BLOCKS)( +(EFIAPI *EFI_FVB_ERASE_BLOCKS)( IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This, ... -); + ); /// /// The Firmware Volume Block Protocol is the low-level interface @@ -339,22 +332,21 @@ EFI_STATUS /// produces the Firmware Volume Protocol will bind to the /// Firmware Volume Block Protocol. /// -struct _EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL{ - EFI_FVB_GET_ATTRIBUTES GetAttributes; - EFI_FVB_SET_ATTRIBUTES SetAttributes; - EFI_FVB_GET_PHYSICAL_ADDRESS GetPhysicalAddress; - EFI_FVB_GET_BLOCK_SIZE GetBlockSize; - EFI_FVB_READ Read; - EFI_FVB_WRITE Write; - EFI_FVB_ERASE_BLOCKS EraseBlocks; +struct _EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL { + EFI_FVB_GET_ATTRIBUTES GetAttributes; + EFI_FVB_SET_ATTRIBUTES SetAttributes; + EFI_FVB_GET_PHYSICAL_ADDRESS GetPhysicalAddress; + EFI_FVB_GET_BLOCK_SIZE GetBlockSize; + EFI_FVB_READ Read; + EFI_FVB_WRITE Write; + EFI_FVB_ERASE_BLOCKS EraseBlocks; /// /// The handle of the parent firmware volume. /// - EFI_HANDLE ParentHandle; + EFI_HANDLE ParentHandle; }; - -extern EFI_GUID gEfiFirmwareVolumeBlockProtocolGuid; -extern EFI_GUID gEfiFirmwareVolumeBlock2ProtocolGuid; +extern EFI_GUID gEfiFirmwareVolumeBlockProtocolGuid; +extern EFI_GUID gEfiFirmwareVolumeBlock2ProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/FormBrowser2.h b/MdePkg/Include/Protocol/FormBrowser2.h index 0220ae2..436a772 100644 --- a/MdePkg/Include/Protocol/FormBrowser2.h +++ b/MdePkg/Include/Protocol/FormBrowser2.h @@ -17,10 +17,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define EFI_FORM_BROWSER2_PROTOCOL_GUID \ {0xb9d4c360, 0xbcfb, 0x4f9b, {0x92, 0x98, 0x53, 0xc1, 0x36, 0x98, 0x22, 0x58 }} - -typedef struct _EFI_FORM_BROWSER2_PROTOCOL EFI_FORM_BROWSER2_PROTOCOL; - - +typedef struct _EFI_FORM_BROWSER2_PROTOCOL EFI_FORM_BROWSER2_PROTOCOL; /** @@ -41,24 +38,23 @@ typedef struct _EFI_FORM_BROWSER2_PROTOCOL EFI_FORM_BROWSER2_PROTOCOL; window will end. **/ typedef struct { - UINTN LeftColumn; - UINTN RightColumn; - UINTN TopRow; - UINTN BottomRow; + UINTN LeftColumn; + UINTN RightColumn; + UINTN TopRow; + UINTN BottomRow; } EFI_SCREEN_DESCRIPTOR; typedef UINTN EFI_BROWSER_ACTION_REQUEST; -#define EFI_BROWSER_ACTION_REQUEST_NONE 0 -#define EFI_BROWSER_ACTION_REQUEST_RESET 1 -#define EFI_BROWSER_ACTION_REQUEST_SUBMIT 2 -#define EFI_BROWSER_ACTION_REQUEST_EXIT 3 -#define EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT 4 -#define EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT 5 -#define EFI_BROWSER_ACTION_REQUEST_FORM_APPLY 6 -#define EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD 7 -#define EFI_BROWSER_ACTION_REQUEST_RECONNECT 8 - +#define EFI_BROWSER_ACTION_REQUEST_NONE 0 +#define EFI_BROWSER_ACTION_REQUEST_RESET 1 +#define EFI_BROWSER_ACTION_REQUEST_SUBMIT 2 +#define EFI_BROWSER_ACTION_REQUEST_EXIT 3 +#define EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT 4 +#define EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT 5 +#define EFI_BROWSER_ACTION_REQUEST_FORM_APPLY 6 +#define EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD 7 +#define EFI_BROWSER_ACTION_REQUEST_RECONNECT 8 /** Initialize the browser to display the specified configuration forms. @@ -106,8 +102,7 @@ EFI_STATUS IN EFI_FORM_ID FormId OPTIONAL, IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions OPTIONAL, OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OPTIONAL -); - + ); /** This function is called by a callback handler to retrieve uncommitted state data from the browser. @@ -157,17 +152,17 @@ EFI_STATUS IN CONST BOOLEAN RetrieveData, IN CONST EFI_GUID *VariableGuid OPTIONAL, IN CONST CHAR16 *VariableName OPTIONAL -); + ); /// /// This interface will allow the caller to direct the configuration /// driver to use either the HII database or use the passed-in packet of data. /// struct _EFI_FORM_BROWSER2_PROTOCOL { - EFI_SEND_FORM2 SendForm; - EFI_BROWSER_CALLBACK2 BrowserCallback; -} ; + EFI_SEND_FORM2 SendForm; + EFI_BROWSER_CALLBACK2 BrowserCallback; +}; -extern EFI_GUID gEfiFormBrowser2ProtocolGuid; +extern EFI_GUID gEfiFormBrowser2ProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Ftp4.h b/MdePkg/Include/Protocol/Ftp4.h index 3b05de8..f2dd8b8 100644 --- a/MdePkg/Include/Protocol/Ftp4.h +++ b/MdePkg/Include/Protocol/Ftp4.h @@ -18,7 +18,6 @@ #ifndef __EFI_FTP4_PROTOCOL_H__ #define __EFI_FTP4_PROTOCOL_H__ - #define EFI_FTP4_SERVICE_BINDING_PROTOCOL_GUID \ { \ 0xfaaecb1, 0x226e, 0x4782, {0xaa, 0xce, 0x7d, 0xb9, 0xbc, 0xbf, 0x4d, 0xaf } \ @@ -42,7 +41,7 @@ typedef struct { /// equal to TPL_CALLBACK. If it is set to NULL, this function will not return until the /// function completes. /// - EFI_EVENT Event; + EFI_EVENT Event; /// /// The variable to receive the result of the completed operation. /// EFI_SUCCESS: The FTP connection is established successfully @@ -63,7 +62,7 @@ typedef struct { /// error is received. /// EFI_DEVICE_ERROR: An unexpected system or network error occurred. /// - EFI_STATUS Status; + EFI_STATUS Status; } EFI_FTP4_CONNECTION_TOKEN; /// @@ -74,47 +73,47 @@ typedef struct { /// Pointer to a ASCII string that contains user name. The caller is /// responsible for freeing Username after GetModeData() is called. /// - UINT8 *Username; + UINT8 *Username; /// /// Pointer to a ASCII string that contains password. The caller is /// responsible for freeing Password after GetModeData() is called. /// - UINT8 *Password; + UINT8 *Password; /// /// Set it to TRUE to initiate an active data connection. Set it to /// FALSE to initiate a passive data connection. /// - BOOLEAN Active; + BOOLEAN Active; /// /// Boolean value indicating if default network settting used. /// - BOOLEAN UseDefaultSetting; + BOOLEAN UseDefaultSetting; /// /// IP address of station if UseDefaultSetting is FALSE. /// - EFI_IPv4_ADDRESS StationIp; + EFI_IPv4_ADDRESS StationIp; /// /// Subnet mask of station if UseDefaultSetting is FALSE. /// - EFI_IPv4_ADDRESS SubnetMask; + EFI_IPv4_ADDRESS SubnetMask; /// /// IP address of gateway if UseDefaultSetting is FALSE. /// - EFI_IPv4_ADDRESS GatewayIp; + EFI_IPv4_ADDRESS GatewayIp; /// /// IP address of FTPv4 server. /// - EFI_IPv4_ADDRESS ServerIp; + EFI_IPv4_ADDRESS ServerIp; /// /// FTPv4 server port number of control connection, and the default /// value is 21 as convention. /// - UINT16 ServerPort; + UINT16 ServerPort; /// /// FTPv4 server port number of data connection. If it is zero, use /// (ServerPort - 1) by convention. /// - UINT16 AltDataPort; + UINT16 AltDataPort; /// /// A byte indicate the representation type. The right 4 bit is used for /// first parameter, the left 4 bit is use for second parameter @@ -124,15 +123,15 @@ typedef struct { /// - If it is a local type, the second parameter is the local byte byte size. /// - If it is a image type, the second parameter is undefined. /// - UINT8 RepType; + UINT8 RepType; /// /// Defines the file structure in FTP used. 0x00 = file, 0x01 = record, 0x02 = page. /// - UINT8 FileStruct; + UINT8 FileStruct; /// /// Defines the transifer mode used in FTP. 0x00 = stream, 0x01 = Block, 0x02 = Compressed. /// - UINT8 TransMode; + UINT8 TransMode; } EFI_FTP4_CONFIG_DATA; typedef struct _EFI_FTP4_COMMAND_TOKEN EFI_FTP4_COMMAND_TOKEN; @@ -172,20 +171,20 @@ struct _EFI_FTP4_COMMAND_TOKEN { /// set to NULL, related function must wait until the function /// completes. /// - EFI_EVENT Event; + EFI_EVENT Event; /// /// Pointer to a null-terminated ASCII name string. /// - UINT8 *Pathname; + UINT8 *Pathname; /// /// The size of data buffer in bytes. /// - UINT64 DataBufferSize; + UINT64 DataBufferSize; /// /// Pointer to the data buffer. Data downloaded from FTP server /// through connection is downloaded here. /// - VOID *DataBuffer; + VOID *DataBuffer; /// /// Pointer to a callback function. If it is receiving function that leads /// to inbound data, the callback function is called when databuffer is @@ -198,11 +197,11 @@ struct _EFI_FTP4_COMMAND_TOKEN { /// DataBufferSize, again. If there is no data remained, /// DataBufferSize should be set to 0. /// - EFI_FTP4_DATA_CALLBACK DataCallback; + EFI_FTP4_DATA_CALLBACK DataCallback; /// /// Pointer to the parameter for DataCallback. /// - VOID *Context; + VOID *Context; /// /// The variable to receive the result of the completed operation. /// EFI_SUCCESS: The FTP command is completed successfully. @@ -223,7 +222,7 @@ struct _EFI_FTP4_COMMAND_TOKEN { /// error is received. /// EFI_DEVICE_ERROR: An unexpected system or network error occurred. /// - EFI_STATUS Status; + EFI_STATUS Status; }; /** @@ -353,7 +352,6 @@ EFI_STATUS IN EFI_FTP4_CONFIG_DATA *FtpConfigData OPTIONAL ); - /** Downloads a file from an FTPv4 server. @@ -511,8 +509,7 @@ struct _EFI_FTP4_PROTOCOL { EFI_FTP4_POLL Poll; }; -extern EFI_GUID gEfiFtp4ServiceBindingProtocolGuid; -extern EFI_GUID gEfiFtp4ProtocolGuid; +extern EFI_GUID gEfiFtp4ServiceBindingProtocolGuid; +extern EFI_GUID gEfiFtp4ProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/GraphicsOutput.h b/MdePkg/Include/Protocol/GraphicsOutput.h index b80ac44..fa00fa3 100644 --- a/MdePkg/Include/Protocol/GraphicsOutput.h +++ b/MdePkg/Include/Protocol/GraphicsOutput.h @@ -19,10 +19,10 @@ typedef struct _EFI_GRAPHICS_OUTPUT_PROTOCOL EFI_GRAPHICS_OUTPUT_PROTOCOL; typedef struct { - UINT32 RedMask; - UINT32 GreenMask; - UINT32 BlueMask; - UINT32 ReservedMask; + UINT32 RedMask; + UINT32 GreenMask; + UINT32 BlueMask; + UINT32 ReservedMask; } EFI_PIXEL_BITMASK; typedef enum { @@ -61,29 +61,29 @@ typedef struct { /// The version of this data structure. A value of zero represents the /// EFI_GRAPHICS_OUTPUT_MODE_INFORMATION structure as defined in this specification. /// - UINT32 Version; + UINT32 Version; /// /// The size of video screen in pixels in the X dimension. /// - UINT32 HorizontalResolution; + UINT32 HorizontalResolution; /// /// The size of video screen in pixels in the Y dimension. /// - UINT32 VerticalResolution; + UINT32 VerticalResolution; /// /// Enumeration that defines the physical format of the pixel. A value of PixelBltOnly /// implies that a linear frame buffer is not available for this mode. /// - EFI_GRAPHICS_PIXEL_FORMAT PixelFormat; + EFI_GRAPHICS_PIXEL_FORMAT PixelFormat; /// /// This bit-mask is only valid if PixelFormat is set to PixelPixelBitMask. /// A bit being set defines what bits are used for what purpose such as Red, Green, Blue, or Reserved. /// - EFI_PIXEL_BITMASK PixelInformation; + EFI_PIXEL_BITMASK PixelInformation; /// /// Defines the number of pixel elements per video memory line. /// - UINT32 PixelsPerScanLine; + UINT32 PixelsPerScanLine; } EFI_GRAPHICS_OUTPUT_MODE_INFORMATION; /** @@ -129,15 +129,15 @@ EFI_STATUS ); typedef struct { - UINT8 Blue; - UINT8 Green; - UINT8 Red; - UINT8 Reserved; + UINT8 Blue; + UINT8 Green; + UINT8 Red; + UINT8 Reserved; } EFI_GRAPHICS_OUTPUT_BLT_PIXEL; typedef union { - EFI_GRAPHICS_OUTPUT_BLT_PIXEL Pixel; - UINT32 Raw; + EFI_GRAPHICS_OUTPUT_BLT_PIXEL Pixel; + UINT32 Raw; } EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION; /// @@ -225,29 +225,29 @@ typedef struct { /// /// The number of modes supported by QueryMode() and SetMode(). /// - UINT32 MaxMode; + UINT32 MaxMode; /// /// Current Mode of the graphics device. Valid mode numbers are 0 to MaxMode -1. /// - UINT32 Mode; + UINT32 Mode; /// /// Pointer to read-only EFI_GRAPHICS_OUTPUT_MODE_INFORMATION data. /// - EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info; + EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info; /// /// Size of Info structure in bytes. /// - UINTN SizeOfInfo; + UINTN SizeOfInfo; /// /// Base address of graphics linear frame buffer. /// Offset zero in FrameBufferBase represents the upper left pixel of the display. /// - EFI_PHYSICAL_ADDRESS FrameBufferBase; + EFI_PHYSICAL_ADDRESS FrameBufferBase; /// /// Amount of frame buffer needed to support the active mode as defined by /// PixelsPerScanLine xVerticalResolution x PixelElementSize. /// - UINTN FrameBufferSize; + UINTN FrameBufferSize; } EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE; /// @@ -256,15 +256,15 @@ typedef struct { /// frame buffer is also exposed so software can write directly to the video hardware. /// struct _EFI_GRAPHICS_OUTPUT_PROTOCOL { - EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE QueryMode; - EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE SetMode; - EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT Blt; + EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE QueryMode; + EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE SetMode; + EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT Blt; /// /// Pointer to EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE data. /// - EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *Mode; + EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *Mode; }; -extern EFI_GUID gEfiGraphicsOutputProtocolGuid; +extern EFI_GUID gEfiGraphicsOutputProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/GuidedSectionExtraction.h b/MdePkg/Include/Protocol/GuidedSectionExtraction.h index 5f55b0b..d20fed3 100644 --- a/MdePkg/Include/Protocol/GuidedSectionExtraction.h +++ b/MdePkg/Include/Protocol/GuidedSectionExtraction.h @@ -28,7 +28,6 @@ typedef struct _EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL; - /** The ExtractSection() function processes the input section and allocates a buffer from the pool in which it returns the section @@ -117,8 +116,7 @@ EFI_STATUS OUT VOID **OutputBuffer, OUT UINTN *OutputSize, OUT UINT32 *AuthenticationStatus -); - + ); /// /// Typically, protocol interface structures are identified by associating them with a GUID. Each @@ -128,8 +126,7 @@ EFI_STATUS /// Extraction Protocol is used to correlate it with the GUIDed section type that it is intended to process. /// struct _EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL { - EFI_EXTRACT_GUIDED_SECTION ExtractSection; + EFI_EXTRACT_GUIDED_SECTION ExtractSection; }; - #endif diff --git a/MdePkg/Include/Protocol/Hash.h b/MdePkg/Include/Protocol/Hash.h index 931d791..b76821f 100644 --- a/MdePkg/Include/Protocol/Hash.h +++ b/MdePkg/Include/Protocol/Hash.h @@ -75,20 +75,20 @@ SPDX-License-Identifier: BSD-2-Clause-Patent typedef struct _EFI_HASH_PROTOCOL EFI_HASH_PROTOCOL; -typedef UINT8 EFI_MD5_HASH[16]; -typedef UINT8 EFI_SHA1_HASH[20]; -typedef UINT8 EFI_SHA224_HASH[28]; -typedef UINT8 EFI_SHA256_HASH[32]; -typedef UINT8 EFI_SHA384_HASH[48]; -typedef UINT8 EFI_SHA512_HASH[64]; +typedef UINT8 EFI_MD5_HASH[16]; +typedef UINT8 EFI_SHA1_HASH[20]; +typedef UINT8 EFI_SHA224_HASH[28]; +typedef UINT8 EFI_SHA256_HASH[32]; +typedef UINT8 EFI_SHA384_HASH[48]; +typedef UINT8 EFI_SHA512_HASH[64]; typedef union { - EFI_MD5_HASH *Md5Hash; - EFI_SHA1_HASH *Sha1Hash; - EFI_SHA224_HASH *Sha224Hash; - EFI_SHA256_HASH *Sha256Hash; - EFI_SHA384_HASH *Sha384Hash; - EFI_SHA512_HASH *Sha512Hash; + EFI_MD5_HASH *Md5Hash; + EFI_SHA1_HASH *Sha1Hash; + EFI_SHA224_HASH *Sha224Hash; + EFI_SHA256_HASH *Sha256Hash; + EFI_SHA384_HASH *Sha384Hash; + EFI_SHA512_HASH *Sha512Hash; } EFI_HASH_OUTPUT; /** @@ -151,19 +151,19 @@ EFI_STATUS /// using one or more hash algorithms. /// struct _EFI_HASH_PROTOCOL { - EFI_HASH_GET_HASH_SIZE GetHashSize; - EFI_HASH_HASH Hash; + EFI_HASH_GET_HASH_SIZE GetHashSize; + EFI_HASH_HASH Hash; }; -extern EFI_GUID gEfiHashServiceBindingProtocolGuid; -extern EFI_GUID gEfiHashProtocolGuid; -extern EFI_GUID gEfiHashAlgorithmSha1Guid; -extern EFI_GUID gEfiHashAlgorithmSha224Guid; -extern EFI_GUID gEfiHashAlgorithmSha256Guid; -extern EFI_GUID gEfiHashAlgorithmSha384Guid; -extern EFI_GUID gEfiHashAlgorithmSha512Guid; -extern EFI_GUID gEfiHashAlgorithmMD5Guid; -extern EFI_GUID gEfiHashAlgorithmSha1NoPadGuid; -extern EFI_GUID gEfiHashAlgorithmSha256NoPadGuid; +extern EFI_GUID gEfiHashServiceBindingProtocolGuid; +extern EFI_GUID gEfiHashProtocolGuid; +extern EFI_GUID gEfiHashAlgorithmSha1Guid; +extern EFI_GUID gEfiHashAlgorithmSha224Guid; +extern EFI_GUID gEfiHashAlgorithmSha256Guid; +extern EFI_GUID gEfiHashAlgorithmSha384Guid; +extern EFI_GUID gEfiHashAlgorithmSha512Guid; +extern EFI_GUID gEfiHashAlgorithmMD5Guid; +extern EFI_GUID gEfiHashAlgorithmSha1NoPadGuid; +extern EFI_GUID gEfiHashAlgorithmSha256NoPadGuid; #endif diff --git a/MdePkg/Include/Protocol/Hash2.h b/MdePkg/Include/Protocol/Hash2.h index 55ce4cf..59a41b4 100644 --- a/MdePkg/Include/Protocol/Hash2.h +++ b/MdePkg/Include/Protocol/Hash2.h @@ -42,20 +42,20 @@ SPDX-License-Identifier: BSD-2-Clause-Patent typedef struct _EFI_HASH2_PROTOCOL EFI_HASH2_PROTOCOL; -typedef UINT8 EFI_MD5_HASH2[16]; -typedef UINT8 EFI_SHA1_HASH2[20]; -typedef UINT8 EFI_SHA224_HASH2[28]; -typedef UINT8 EFI_SHA256_HASH2[32]; -typedef UINT8 EFI_SHA384_HASH2[48]; -typedef UINT8 EFI_SHA512_HASH2[64]; +typedef UINT8 EFI_MD5_HASH2[16]; +typedef UINT8 EFI_SHA1_HASH2[20]; +typedef UINT8 EFI_SHA224_HASH2[28]; +typedef UINT8 EFI_SHA256_HASH2[32]; +typedef UINT8 EFI_SHA384_HASH2[48]; +typedef UINT8 EFI_SHA512_HASH2[64]; typedef union { - EFI_MD5_HASH2 Md5Hash; - EFI_SHA1_HASH2 Sha1Hash; - EFI_SHA224_HASH2 Sha224Hash; - EFI_SHA256_HASH2 Sha256Hash; - EFI_SHA384_HASH2 Sha384Hash; - EFI_SHA512_HASH2 Sha512Hash; + EFI_MD5_HASH2 Md5Hash; + EFI_SHA1_HASH2 Sha1Hash; + EFI_SHA224_HASH2 Sha224Hash; + EFI_SHA256_HASH2 Sha256Hash; + EFI_SHA384_HASH2 Sha384Hash; + EFI_SHA512_HASH2 Sha512Hash; } EFI_HASH2_OUTPUT; /** @@ -183,14 +183,14 @@ EFI_STATUS /// finalization are performed by the supporting driver. /// struct _EFI_HASH2_PROTOCOL { - EFI_HASH2_GET_HASH_SIZE GetHashSize; - EFI_HASH2_HASH Hash; - EFI_HASH2_HASH_INIT HashInit; - EFI_HASH2_HASH_UPDATE HashUpdate; - EFI_HASH2_HASH_FINAL HashFinal; + EFI_HASH2_GET_HASH_SIZE GetHashSize; + EFI_HASH2_HASH Hash; + EFI_HASH2_HASH_INIT HashInit; + EFI_HASH2_HASH_UPDATE HashUpdate; + EFI_HASH2_HASH_FINAL HashFinal; }; -extern EFI_GUID gEfiHash2ServiceBindingProtocolGuid; -extern EFI_GUID gEfiHash2ProtocolGuid; +extern EFI_GUID gEfiHash2ServiceBindingProtocolGuid; +extern EFI_GUID gEfiHash2ProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/HiiConfigAccess.h b/MdePkg/Include/Protocol/HiiConfigAccess.h index 53aefd3..3baf91e 100644 --- a/MdePkg/Include/Protocol/HiiConfigAccess.h +++ b/MdePkg/Include/Protocol/HiiConfigAccess.h @@ -13,7 +13,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ - #ifndef __EFI_HII_CONFIG_ACCESS_H__ #define __EFI_HII_CONFIG_ACCESS_H__ @@ -22,22 +21,22 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define EFI_HII_CONFIG_ACCESS_PROTOCOL_GUID \ { 0x330d4706, 0xf2a0, 0x4e4f, { 0xa3, 0x69, 0xb6, 0x6f, 0xa8, 0xd5, 0x43, 0x85 } } -typedef struct _EFI_HII_CONFIG_ACCESS_PROTOCOL EFI_HII_CONFIG_ACCESS_PROTOCOL; +typedef struct _EFI_HII_CONFIG_ACCESS_PROTOCOL EFI_HII_CONFIG_ACCESS_PROTOCOL; typedef UINTN EFI_BROWSER_ACTION; -#define EFI_BROWSER_ACTION_CHANGING 0 -#define EFI_BROWSER_ACTION_CHANGED 1 -#define EFI_BROWSER_ACTION_RETRIEVE 2 -#define EFI_BROWSER_ACTION_FORM_OPEN 3 -#define EFI_BROWSER_ACTION_FORM_CLOSE 4 -#define EFI_BROWSER_ACTION_SUBMITTED 5 -#define EFI_BROWSER_ACTION_DEFAULT_STANDARD 0x1000 -#define EFI_BROWSER_ACTION_DEFAULT_MANUFACTURING 0x1001 -#define EFI_BROWSER_ACTION_DEFAULT_SAFE 0x1002 -#define EFI_BROWSER_ACTION_DEFAULT_PLATFORM 0x2000 -#define EFI_BROWSER_ACTION_DEFAULT_HARDWARE 0x3000 -#define EFI_BROWSER_ACTION_DEFAULT_FIRMWARE 0x4000 +#define EFI_BROWSER_ACTION_CHANGING 0 +#define EFI_BROWSER_ACTION_CHANGED 1 +#define EFI_BROWSER_ACTION_RETRIEVE 2 +#define EFI_BROWSER_ACTION_FORM_OPEN 3 +#define EFI_BROWSER_ACTION_FORM_CLOSE 4 +#define EFI_BROWSER_ACTION_SUBMITTED 5 +#define EFI_BROWSER_ACTION_DEFAULT_STANDARD 0x1000 +#define EFI_BROWSER_ACTION_DEFAULT_MANUFACTURING 0x1001 +#define EFI_BROWSER_ACTION_DEFAULT_SAFE 0x1002 +#define EFI_BROWSER_ACTION_DEFAULT_PLATFORM 0x2000 +#define EFI_BROWSER_ACTION_DEFAULT_HARDWARE 0x3000 +#define EFI_BROWSER_ACTION_DEFAULT_FIRMWARE 0x4000 /** @@ -109,13 +108,12 @@ typedef UINTN EFI_BROWSER_ACTION; **/ typedef EFI_STATUS -(EFIAPI * EFI_HII_ACCESS_EXTRACT_CONFIG)( +(EFIAPI *EFI_HII_ACCESS_EXTRACT_CONFIG)( IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN CONST EFI_STRING Request, OUT EFI_STRING *Progress, OUT EFI_STRING *Results -); - + ); /** @@ -159,11 +157,11 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI * EFI_HII_ACCESS_ROUTE_CONFIG)( +(EFIAPI *EFI_HII_ACCESS_ROUTE_CONFIG)( IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN CONST EFI_STRING Configuration, OUT EFI_STRING *Progress -); + ); /** @@ -200,7 +198,7 @@ EFI_STATUS IN OUT EFI_IFR_TYPE_VALUE *Value, OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest ) - ; +; /// /// This protocol provides a callable interface between the HII and @@ -208,13 +206,11 @@ EFI_STATUS /// to publish this protocol. /// struct _EFI_HII_CONFIG_ACCESS_PROTOCOL { - EFI_HII_ACCESS_EXTRACT_CONFIG ExtractConfig; - EFI_HII_ACCESS_ROUTE_CONFIG RouteConfig; - EFI_HII_ACCESS_FORM_CALLBACK Callback; -} ; + EFI_HII_ACCESS_EXTRACT_CONFIG ExtractConfig; + EFI_HII_ACCESS_ROUTE_CONFIG RouteConfig; + EFI_HII_ACCESS_FORM_CALLBACK Callback; +}; -extern EFI_GUID gEfiHiiConfigAccessProtocolGuid; +extern EFI_GUID gEfiHiiConfigAccessProtocolGuid; #endif - - diff --git a/MdePkg/Include/Protocol/HiiConfigKeyword.h b/MdePkg/Include/Protocol/HiiConfigKeyword.h index c650d0d..0792681 100644 --- a/MdePkg/Include/Protocol/HiiConfigKeyword.h +++ b/MdePkg/Include/Protocol/HiiConfigKeyword.h @@ -20,16 +20,16 @@ SPDX-License-Identifier: BSD-2-Clause-Patent 0x0a8badd5, 0x03b8, 0x4d19, {0xb1, 0x28, 0x7b, 0x8f, 0x0e, 0xda, 0xa5, 0x96 } \ } -//*********************************************************** +// *********************************************************** // Progress Errors -//*********************************************************** -#define KEYWORD_HANDLER_NO_ERROR 0x00000000 -#define KEYWORD_HANDLER_NAMESPACE_ID_NOT_FOUND 0x00000001 -#define KEYWORD_HANDLER_MALFORMED_STRING 0x00000002 -#define KEYWORD_HANDLER_KEYWORD_NOT_FOUND 0x00000004 -#define KEYWORD_HANDLER_INCOMPATIBLE_VALUE_DETECTED 0x00000008 -#define KEYWORD_HANDLER_ACCESS_NOT_PERMITTED 0x00000010 -#define KEYWORD_HANDLER_UNDEFINED_PROCESSING_ERROR 0x80000000 +// *********************************************************** +#define KEYWORD_HANDLER_NO_ERROR 0x00000000 +#define KEYWORD_HANDLER_NAMESPACE_ID_NOT_FOUND 0x00000001 +#define KEYWORD_HANDLER_MALFORMED_STRING 0x00000002 +#define KEYWORD_HANDLER_KEYWORD_NOT_FOUND 0x00000004 +#define KEYWORD_HANDLER_INCOMPATIBLE_VALUE_DETECTED 0x00000008 +#define KEYWORD_HANDLER_ACCESS_NOT_PERMITTED 0x00000010 +#define KEYWORD_HANDLER_UNDEFINED_PROCESSING_ERROR 0x80000000 typedef struct _EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL; @@ -94,14 +94,13 @@ typedef struct _EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL EFI_CONFIG_KEYWORD_HANDLER_P **/ typedef EFI_STATUS -(EFIAPI *EFI_CONFIG_KEYWORD_HANDLER_SET_DATA) ( +(EFIAPI *EFI_CONFIG_KEYWORD_HANDLER_SET_DATA)( IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL *This, IN CONST EFI_STRING KeywordString, OUT EFI_STRING *Progress, OUT UINT32 *ProgressErr ); - /** This function accepts a formatted string, finds the underlying @@ -173,7 +172,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_CONFIG_KEYWORD_HANDLER_GET_DATA) ( +(EFIAPI *EFI_CONFIG_KEYWORD_HANDLER_GET_DATA)( IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL *This, IN CONST EFI_STRING NameSpaceId OPTIONAL, IN CONST EFI_STRING KeywordString OPTIONAL, @@ -189,10 +188,10 @@ EFI_STATUS /// struct _EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL { - EFI_CONFIG_KEYWORD_HANDLER_SET_DATA SetData; - EFI_CONFIG_KEYWORD_HANDLER_GET_DATA GetData; + EFI_CONFIG_KEYWORD_HANDLER_SET_DATA SetData; + EFI_CONFIG_KEYWORD_HANDLER_GET_DATA GetData; }; -extern EFI_GUID gEfiConfigKeywordHandlerProtocolGuid; +extern EFI_GUID gEfiConfigKeywordHandlerProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/HiiConfigRouting.h b/MdePkg/Include/Protocol/HiiConfigRouting.h index 7a11c2b..23e0547 100644 --- a/MdePkg/Include/Protocol/HiiConfigRouting.h +++ b/MdePkg/Include/Protocol/HiiConfigRouting.h @@ -20,7 +20,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define EFI_HII_CONFIG_ROUTING_PROTOCOL_GUID \ { 0x587e72d7, 0xcc50, 0x4f79, { 0x82, 0x09, 0xca, 0x29, 0x1f, 0xc1, 0xa1, 0x0f } } - typedef struct _EFI_HII_CONFIG_ROUTING_PROTOCOL EFI_HII_CONFIG_ROUTING_PROTOCOL; /** @@ -108,12 +107,12 @@ typedef struct _EFI_HII_CONFIG_ROUTING_PROTOCOL EFI_HII_CONFIG_ROUTING_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI * EFI_HII_EXTRACT_CONFIG)( +(EFIAPI *EFI_HII_EXTRACT_CONFIG)( IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This, IN CONST EFI_STRING Request, OUT EFI_STRING *Progress, OUT EFI_STRING *Results -); + ); /** This function allows the caller to request the current configuration @@ -150,10 +149,10 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI * EFI_HII_EXPORT_CONFIG)( +(EFIAPI *EFI_HII_EXPORT_CONFIG)( IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This, OUT EFI_STRING *Results -); + ); /** @@ -196,12 +195,11 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI * EFI_HII_ROUTE_CONFIG)( +(EFIAPI *EFI_HII_ROUTE_CONFIG)( IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This, IN CONST EFI_STRING Configuration, OUT EFI_STRING *Progress -); - + ); /** @@ -266,16 +264,14 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI * EFI_HII_BLOCK_TO_CONFIG)( +(EFIAPI *EFI_HII_BLOCK_TO_CONFIG)( IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This, IN CONST EFI_STRING ConfigRequest, IN CONST UINT8 *Block, IN CONST UINTN BlockSize, OUT EFI_STRING *Config, OUT EFI_STRING *Progress -); - - + ); /** This function maps a configuration containing a series of @@ -343,13 +339,13 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI * EFI_HII_CONFIG_TO_BLOCK)( +(EFIAPI *EFI_HII_CONFIG_TO_BLOCK)( IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This, IN CONST EFI_STRING ConfigResp, IN OUT UINT8 *Block, IN OUT UINTN *BlockSize, OUT EFI_STRING *Progress -); + ); /** This helper function is to be called by drivers to extract portions of @@ -386,7 +382,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI * EFI_HII_GET_ALT_CFG)( +(EFIAPI *EFI_HII_GET_ALT_CFG)( IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This, IN CONST EFI_STRING ConfigResp, IN CONST EFI_GUID *Guid, @@ -402,16 +398,14 @@ EFI_STATUS /// instance of this protocol in the system. /// struct _EFI_HII_CONFIG_ROUTING_PROTOCOL { - EFI_HII_EXTRACT_CONFIG ExtractConfig; - EFI_HII_EXPORT_CONFIG ExportConfig; - EFI_HII_ROUTE_CONFIG RouteConfig; - EFI_HII_BLOCK_TO_CONFIG BlockToConfig; - EFI_HII_CONFIG_TO_BLOCK ConfigToBlock; - EFI_HII_GET_ALT_CFG GetAltConfig; + EFI_HII_EXTRACT_CONFIG ExtractConfig; + EFI_HII_EXPORT_CONFIG ExportConfig; + EFI_HII_ROUTE_CONFIG RouteConfig; + EFI_HII_BLOCK_TO_CONFIG BlockToConfig; + EFI_HII_CONFIG_TO_BLOCK ConfigToBlock; + EFI_HII_GET_ALT_CFG GetAltConfig; }; -extern EFI_GUID gEfiHiiConfigRoutingProtocolGuid; - +extern EFI_GUID gEfiHiiConfigRoutingProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/HiiDatabase.h b/MdePkg/Include/Protocol/HiiDatabase.h index cc69e1a..1084c53 100644 --- a/MdePkg/Include/Protocol/HiiDatabase.h +++ b/MdePkg/Include/Protocol/HiiDatabase.h @@ -16,19 +16,18 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define EFI_HII_DATABASE_PROTOCOL_GUID \ { 0xef9fc172, 0xa1b2, 0x4693, { 0xb3, 0x27, 0x6d, 0x32, 0xfc, 0x41, 0x60, 0x42 } } - typedef struct _EFI_HII_DATABASE_PROTOCOL EFI_HII_DATABASE_PROTOCOL; - /// /// EFI_HII_DATABASE_NOTIFY_TYPE. /// -typedef UINTN EFI_HII_DATABASE_NOTIFY_TYPE; +typedef UINTN EFI_HII_DATABASE_NOTIFY_TYPE; + +#define EFI_HII_DATABASE_NOTIFY_NEW_PACK 0x00000001 +#define EFI_HII_DATABASE_NOTIFY_REMOVE_PACK 0x00000002 +#define EFI_HII_DATABASE_NOTIFY_EXPORT_PACK 0x00000004 +#define EFI_HII_DATABASE_NOTIFY_ADD_PACK 0x00000008 -#define EFI_HII_DATABASE_NOTIFY_NEW_PACK 0x00000001 -#define EFI_HII_DATABASE_NOTIFY_REMOVE_PACK 0x00000002 -#define EFI_HII_DATABASE_NOTIFY_EXPORT_PACK 0x00000004 -#define EFI_HII_DATABASE_NOTIFY_ADD_PACK 0x00000008 /** Functions which are registered to receive notification of @@ -63,7 +62,7 @@ EFI_STATUS IN CONST EFI_HII_PACKAGE_HEADER *Package, IN EFI_HII_HANDLE Handle, IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType -); + ); /** @@ -105,8 +104,7 @@ EFI_STATUS IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList, IN EFI_HANDLE DriverHandle OPTIONAL, OUT EFI_HII_HANDLE *Handle -); - + ); /** @@ -132,8 +130,7 @@ EFI_STATUS (EFIAPI *EFI_HII_DATABASE_REMOVE_PACK)( IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN EFI_HII_HANDLE Handle -); - + ); /** @@ -181,8 +178,7 @@ EFI_STATUS IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN EFI_HII_HANDLE Handle, IN CONST EFI_HII_PACKAGE_LIST_HEADER *PackageList -); - + ); /** @@ -235,7 +231,7 @@ EFI_STATUS IN CONST EFI_GUID *PackageGuid, IN OUT UINTN *HandleBufferLength, OUT EFI_HII_HANDLE *Handle -); + ); /** @@ -285,8 +281,7 @@ EFI_STATUS IN EFI_HII_HANDLE Handle, IN OUT UINTN *BufferSize, OUT EFI_HII_PACKAGE_LIST_HEADER *Buffer -); - + ); /** @@ -348,8 +343,7 @@ EFI_STATUS IN EFI_HII_DATABASE_NOTIFY PackageNotifyFn, IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType, OUT EFI_HANDLE *NotifyHandle -); - + ); /** @@ -371,8 +365,7 @@ EFI_STATUS (EFIAPI *EFI_HII_DATABASE_UNREGISTER_NOTIFY)( IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN EFI_HANDLE NotificationHandle -); - + ); /** @@ -412,8 +405,7 @@ EFI_STATUS IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN OUT UINT16 *KeyGuidBufferLength, OUT EFI_GUID *KeyGuidBuffer -); - + ); /** @@ -448,7 +440,7 @@ EFI_STATUS IN CONST EFI_GUID *KeyGuid, IN OUT UINT16 *KeyboardLayoutLength, OUT EFI_HII_KEYBOARD_LAYOUT *KeyboardLayout -); + ); /** @@ -475,7 +467,7 @@ EFI_STATUS (EFIAPI *EFI_HII_SET_KEYBOARD_LAYOUT)( IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN CONST EFI_GUID *KeyGuid -); + ); /** @@ -502,25 +494,25 @@ EFI_STATUS IN CONST EFI_HII_DATABASE_PROTOCOL *This, IN EFI_HII_HANDLE PackageListHandle, OUT EFI_HANDLE *DriverHandle -); + ); /// /// Database manager for HII-related data structures. /// struct _EFI_HII_DATABASE_PROTOCOL { - EFI_HII_DATABASE_NEW_PACK NewPackageList; - EFI_HII_DATABASE_REMOVE_PACK RemovePackageList; - EFI_HII_DATABASE_UPDATE_PACK UpdatePackageList; - EFI_HII_DATABASE_LIST_PACKS ListPackageLists; - EFI_HII_DATABASE_EXPORT_PACKS ExportPackageLists; - EFI_HII_DATABASE_REGISTER_NOTIFY RegisterPackageNotify; - EFI_HII_DATABASE_UNREGISTER_NOTIFY UnregisterPackageNotify; - EFI_HII_FIND_KEYBOARD_LAYOUTS FindKeyboardLayouts; - EFI_HII_GET_KEYBOARD_LAYOUT GetKeyboardLayout; - EFI_HII_SET_KEYBOARD_LAYOUT SetKeyboardLayout; - EFI_HII_DATABASE_GET_PACK_HANDLE GetPackageListHandle; + EFI_HII_DATABASE_NEW_PACK NewPackageList; + EFI_HII_DATABASE_REMOVE_PACK RemovePackageList; + EFI_HII_DATABASE_UPDATE_PACK UpdatePackageList; + EFI_HII_DATABASE_LIST_PACKS ListPackageLists; + EFI_HII_DATABASE_EXPORT_PACKS ExportPackageLists; + EFI_HII_DATABASE_REGISTER_NOTIFY RegisterPackageNotify; + EFI_HII_DATABASE_UNREGISTER_NOTIFY UnregisterPackageNotify; + EFI_HII_FIND_KEYBOARD_LAYOUTS FindKeyboardLayouts; + EFI_HII_GET_KEYBOARD_LAYOUT GetKeyboardLayout; + EFI_HII_SET_KEYBOARD_LAYOUT SetKeyboardLayout; + EFI_HII_DATABASE_GET_PACK_HANDLE GetPackageListHandle; }; -extern EFI_GUID gEfiHiiDatabaseProtocolGuid; +extern EFI_GUID gEfiHiiDatabaseProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/HiiFont.h b/MdePkg/Include/Protocol/HiiFont.h index 539d45f..596e101 100644 --- a/MdePkg/Include/Protocol/HiiFont.h +++ b/MdePkg/Include/Protocol/HiiFont.h @@ -20,21 +20,21 @@ SPDX-License-Identifier: BSD-2-Clause-Patent typedef struct _EFI_HII_FONT_PROTOCOL EFI_HII_FONT_PROTOCOL; -typedef VOID *EFI_FONT_HANDLE; +typedef VOID *EFI_FONT_HANDLE; /// /// EFI_HII_OUT_FLAGS. /// -typedef UINT32 EFI_HII_OUT_FLAGS; +typedef UINT32 EFI_HII_OUT_FLAGS; -#define EFI_HII_OUT_FLAG_CLIP 0x00000001 -#define EFI_HII_OUT_FLAG_WRAP 0x00000002 -#define EFI_HII_OUT_FLAG_CLIP_CLEAN_Y 0x00000004 -#define EFI_HII_OUT_FLAG_CLIP_CLEAN_X 0x00000008 -#define EFI_HII_OUT_FLAG_TRANSPARENT 0x00000010 -#define EFI_HII_IGNORE_IF_NO_GLYPH 0x00000020 -#define EFI_HII_IGNORE_LINE_BREAK 0x00000040 -#define EFI_HII_DIRECT_TO_SCREEN 0x00000080 +#define EFI_HII_OUT_FLAG_CLIP 0x00000001 +#define EFI_HII_OUT_FLAG_WRAP 0x00000002 +#define EFI_HII_OUT_FLAG_CLIP_CLEAN_Y 0x00000004 +#define EFI_HII_OUT_FLAG_CLIP_CLEAN_X 0x00000008 +#define EFI_HII_OUT_FLAG_TRANSPARENT 0x00000010 +#define EFI_HII_IGNORE_IF_NO_GLYPH 0x00000020 +#define EFI_HII_IGNORE_LINE_BREAK 0x00000040 +#define EFI_HII_DIRECT_TO_SCREEN 0x00000080 /** Definition of EFI_HII_ROW_INFO. @@ -43,26 +43,26 @@ typedef struct _EFI_HII_ROW_INFO { /// /// The index of the first character in the string which is displayed on the line. /// - UINTN StartIndex; + UINTN StartIndex; /// /// The index of the last character in the string which is displayed on the line. /// If this is the same as StartIndex, then no characters are displayed. /// - UINTN EndIndex; - UINTN LineHeight; ///< The height of the line, in pixels. - UINTN LineWidth; ///< The width of the text on the line, in pixels. + UINTN EndIndex; + UINTN LineHeight; ///< The height of the line, in pixels. + UINTN LineWidth; ///< The width of the text on the line, in pixels. /// /// The font baseline offset in pixels from the bottom of the row, or 0 if none. /// - UINTN BaselineOffset; + UINTN BaselineOffset; } EFI_HII_ROW_INFO; /// /// Font info flag. All flags (FONT, SIZE, STYLE, and COLOR) are defined. /// They are defined as EFI_FONT_INFO_*** /// -typedef UINT32 EFI_FONT_INFO_MASK; +typedef UINT32 EFI_FONT_INFO_MASK; #define EFI_FONT_INFO_SYS_FONT 0x00000001 #define EFI_FONT_INFO_SYS_SIZE 0x00000002 @@ -79,9 +79,9 @@ typedef UINT32 EFI_FONT_INFO_MASK; // EFI_FONT_INFO // typedef struct { - EFI_HII_FONT_STYLE FontStyle; - UINT16 FontSize; ///< character cell height in pixels - CHAR16 FontName[1]; + EFI_HII_FONT_STYLE FontStyle; + UINT16 FontSize; ///< character cell height in pixels + CHAR16 FontName[1]; } EFI_FONT_INFO; /** @@ -97,10 +97,10 @@ typedef struct { font requested and the font available. **/ typedef struct _EFI_FONT_DISPLAY_INFO { - EFI_GRAPHICS_OUTPUT_BLT_PIXEL ForegroundColor; - EFI_GRAPHICS_OUTPUT_BLT_PIXEL BackgroundColor; - EFI_FONT_INFO_MASK FontInfoMask; - EFI_FONT_INFO FontInfo; + EFI_GRAPHICS_OUTPUT_BLT_PIXEL ForegroundColor; + EFI_GRAPHICS_OUTPUT_BLT_PIXEL BackgroundColor; + EFI_FONT_INFO_MASK FontInfoMask; + EFI_FONT_INFO FontInfo; } EFI_FONT_DISPLAY_INFO; /** @@ -220,9 +220,7 @@ EFI_STATUS OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL, OUT UINTN *RowInfoArraySize OPTIONAL, OUT UINTN *ColumnInfoArray OPTIONAL -); - - + ); /** @@ -358,8 +356,7 @@ EFI_STATUS OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL, OUT UINTN *RowInfoArraySize OPTIONAL, OUT UINTN *ColumnInfoArray OPTIONAL -); - + ); /** @@ -403,7 +400,7 @@ EFI_STATUS IN CONST EFI_FONT_DISPLAY_INFO *StringInfo, OUT EFI_IMAGE_OUTPUT **Blt, OUT UINTN *Baseline OPTIONAL -); + ); /** @@ -450,19 +447,18 @@ EFI_STATUS IN CONST EFI_FONT_DISPLAY_INFO *StringInfoIn OPTIONAL, OUT EFI_FONT_DISPLAY_INFO **StringInfoOut, IN CONST EFI_STRING String OPTIONAL -); + ); /// /// The protocol provides the service to retrieve the font informations. /// struct _EFI_HII_FONT_PROTOCOL { - EFI_HII_STRING_TO_IMAGE StringToImage; - EFI_HII_STRING_ID_TO_IMAGE StringIdToImage; - EFI_HII_GET_GLYPH GetGlyph; - EFI_HII_GET_FONT_INFO GetFontInfo; + EFI_HII_STRING_TO_IMAGE StringToImage; + EFI_HII_STRING_ID_TO_IMAGE StringIdToImage; + EFI_HII_GET_GLYPH GetGlyph; + EFI_HII_GET_FONT_INFO GetFontInfo; }; -extern EFI_GUID gEfiHiiFontProtocolGuid; - +extern EFI_GUID gEfiHiiFontProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/HiiImage.h b/MdePkg/Include/Protocol/HiiImage.h index d72ac76..14cf28f 100644 --- a/MdePkg/Include/Protocol/HiiImage.h +++ b/MdePkg/Include/Protocol/HiiImage.h @@ -19,11 +19,10 @@ typedef struct _EFI_HII_IMAGE_PROTOCOL EFI_HII_IMAGE_PROTOCOL; - /// /// Flags in EFI_IMAGE_INPUT /// -#define EFI_IMAGE_TRANSPARENT 0x00000001 +#define EFI_IMAGE_TRANSPARENT 0x00000001 /** @@ -44,13 +43,12 @@ typedef struct _EFI_HII_IMAGE_PROTOCOL EFI_HII_IMAGE_PROTOCOL; **/ typedef struct _EFI_IMAGE_INPUT { - UINT32 Flags; - UINT16 Width; - UINT16 Height; - EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Bitmap; + UINT32 Flags; + UINT16 Width; + UINT16 Height; + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Bitmap; } EFI_IMAGE_INPUT; - /** This function adds the image Image to the group of images @@ -83,7 +81,7 @@ EFI_STATUS IN EFI_HII_HANDLE PackageList, OUT EFI_IMAGE_ID *ImageId, IN CONST EFI_IMAGE_INPUT *Image -); + ); /** @@ -125,7 +123,7 @@ EFI_STATUS IN EFI_HII_HANDLE PackageList, IN EFI_IMAGE_ID ImageId, OUT EFI_IMAGE_INPUT *Image -); + ); /** @@ -156,14 +154,13 @@ EFI_STATUS IN EFI_HII_HANDLE PackageList, IN EFI_IMAGE_ID ImageId, IN CONST EFI_IMAGE_INPUT *Image -); - + ); /// /// EFI_HII_DRAW_FLAGS describes how the image is to be drawn. /// These flags are defined as EFI_HII_DRAW_FLAG_*** /// -typedef UINT32 EFI_HII_DRAW_FLAGS; +typedef UINT32 EFI_HII_DRAW_FLAGS; #define EFI_HII_DRAW_FLAG_CLIP 0x00000001 #define EFI_HII_DRAW_FLAG_TRANSPARENT 0x00000030 @@ -188,15 +185,14 @@ typedef UINT32 EFI_HII_DRAW_FLAGS; **/ typedef struct _EFI_IMAGE_OUTPUT { - UINT16 Width; - UINT16 Height; + UINT16 Width; + UINT16 Height; union { - EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Bitmap; - EFI_GRAPHICS_OUTPUT_PROTOCOL *Screen; + EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Bitmap; + EFI_GRAPHICS_OUTPUT_PROTOCOL *Screen; } Image; } EFI_IMAGE_OUTPUT; - /** This function renders an image to a bitmap or the screen using @@ -253,7 +249,7 @@ EFI_STATUS IN OUT EFI_IMAGE_OUTPUT **Blt, IN UINTN BltX, IN UINTN BltY -); + ); /** @@ -325,29 +321,26 @@ EFI_STATUS typedef EFI_STATUS (EFIAPI *EFI_HII_DRAW_IMAGE_ID)( -IN CONST EFI_HII_IMAGE_PROTOCOL *This, -IN EFI_HII_DRAW_FLAGS Flags, -IN EFI_HII_HANDLE PackageList, -IN EFI_IMAGE_ID ImageId, -IN OUT EFI_IMAGE_OUTPUT **Blt, -IN UINTN BltX, -IN UINTN BltY -); - + IN CONST EFI_HII_IMAGE_PROTOCOL *This, + IN EFI_HII_DRAW_FLAGS Flags, + IN EFI_HII_HANDLE PackageList, + IN EFI_IMAGE_ID ImageId, + IN OUT EFI_IMAGE_OUTPUT **Blt, + IN UINTN BltX, + IN UINTN BltY + ); /// /// Services to access to images in the images database. /// struct _EFI_HII_IMAGE_PROTOCOL { - EFI_HII_NEW_IMAGE NewImage; - EFI_HII_GET_IMAGE GetImage; - EFI_HII_SET_IMAGE SetImage; - EFI_HII_DRAW_IMAGE DrawImage; - EFI_HII_DRAW_IMAGE_ID DrawImageId; + EFI_HII_NEW_IMAGE NewImage; + EFI_HII_GET_IMAGE GetImage; + EFI_HII_SET_IMAGE SetImage; + EFI_HII_DRAW_IMAGE DrawImage; + EFI_HII_DRAW_IMAGE_ID DrawImageId; }; -extern EFI_GUID gEfiHiiImageProtocolGuid; +extern EFI_GUID gEfiHiiImageProtocolGuid; #endif - - diff --git a/MdePkg/Include/Protocol/HiiImageDecoder.h b/MdePkg/Include/Protocol/HiiImageDecoder.h index 3e035a0..bb1dce9 100644 --- a/MdePkg/Include/Protocol/HiiImageDecoder.h +++ b/MdePkg/Include/Protocol/HiiImageDecoder.h @@ -10,6 +10,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent This Protocol was introduced in UEFI Specification 2.6. **/ + #ifndef __HII_IMAGE_DECODER_H__ #define __HII_IMAGE_DECODER_H__ @@ -18,7 +19,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define EFI_HII_IMAGE_DECODER_PROTOCOL_GUID \ {0x9e66f251, 0x727c, 0x418c, { 0xbf, 0xd6, 0xc2, 0xb4, 0x25, 0x28, 0x18, 0xea }} - #define EFI_HII_IMAGE_DECODER_NAME_JPEG_GUID \ {0xefefd093, 0xd9b, 0x46eb, { 0xa8, 0x56, 0x48, 0x35, 0x7, 0x0, 0xc9, 0x8 }} @@ -53,8 +53,8 @@ typedef struct _EFI_HII_IMAGE_DECODER_IMAGE_INFO_HEADER { UINT8 ColorDepthInBits; } EFI_HII_IMAGE_DECODER_IMAGE_INFO_HEADER; -#define EFI_IMAGE_JPEG_SCANTYPE_PROGREESSIVE 0x01 -#define EFI_IMAGE_JPEG_SCANTYPE_INTERLACED 0x02 +#define EFI_IMAGE_JPEG_SCANTYPE_PROGREESSIVE 0x01 +#define EFI_IMAGE_JPEG_SCANTYPE_INTERLACED 0x02 // // EFI_HII_IMAGE_DECODER_JPEG_INFO @@ -63,9 +63,9 @@ typedef struct _EFI_HII_IMAGE_DECODER_IMAGE_INFO_HEADER { // Reserved Reserved // typedef struct _EFI_HII_IMAGE_DECODER_JPEG_INFO { - EFI_HII_IMAGE_DECODER_IMAGE_INFO_HEADER Header; - UINT16 ScanType; - UINT64 Reserved; + EFI_HII_IMAGE_DECODER_IMAGE_INFO_HEADER Header; + UINT16 ScanType; + UINT64 Reserved; } EFI_HII_IMAGE_DECODER_JPEG_INFO; // @@ -75,17 +75,17 @@ typedef struct _EFI_HII_IMAGE_DECODER_JPEG_INFO { // Reserved Reserved // typedef struct _EFI_HII_IMAGE_DECODER_PNG_INFO { - EFI_HII_IMAGE_DECODER_IMAGE_INFO_HEADER Header; - UINT16 Channels; - UINT64 Reserved; + EFI_HII_IMAGE_DECODER_IMAGE_INFO_HEADER Header; + UINT16 Channels; + UINT64 Reserved; } EFI_HII_IMAGE_DECODER_PNG_INFO; // // EFI_HII_IMAGE_DECODER_OTHER_INFO // typedef struct _EFI_HII_IMAGE_DECODER_OTHER_INFO { - EFI_HII_IMAGE_DECODER_IMAGE_INFO_HEADER Header; - CHAR16 ImageExtenion[1]; + EFI_HII_IMAGE_DECODER_IMAGE_INFO_HEADER Header; + CHAR16 ImageExtenion[1]; // // Variable length of image file extension name. // @@ -193,8 +193,8 @@ struct _EFI_HII_IMAGE_DECODER_PROTOCOL { EFI_HII_IMAGE_DECODER_DECODE DecodeImage; }; -extern EFI_GUID gEfiHiiImageDecoderProtocolGuid; -extern EFI_GUID gEfiHiiImageDecoderNameJpegGuid; -extern EFI_GUID gEfiHiiImageDecoderNamePngGuid; +extern EFI_GUID gEfiHiiImageDecoderProtocolGuid; +extern EFI_GUID gEfiHiiImageDecoderNameJpegGuid; +extern EFI_GUID gEfiHiiImageDecoderNamePngGuid; #endif diff --git a/MdePkg/Include/Protocol/HiiImageEx.h b/MdePkg/Include/Protocol/HiiImageEx.h index ffdd9bf..1e5a565 100644 --- a/MdePkg/Include/Protocol/HiiImageEx.h +++ b/MdePkg/Include/Protocol/HiiImageEx.h @@ -235,14 +235,14 @@ EFI_STATUS /// Protocol which allows access to the images in the images database. /// struct _EFI_HII_IMAGE_EX_PROTOCOL { - EFI_HII_NEW_IMAGE_EX NewImageEx; - EFI_HII_GET_IMAGE_EX GetImageEx; - EFI_HII_SET_IMAGE_EX SetImageEx; - EFI_HII_DRAW_IMAGE_EX DrawImageEx; - EFI_HII_DRAW_IMAGE_ID_EX DrawImageIdEx; - EFI_HII_GET_IMAGE_INFO GetImageInfo; + EFI_HII_NEW_IMAGE_EX NewImageEx; + EFI_HII_GET_IMAGE_EX GetImageEx; + EFI_HII_SET_IMAGE_EX SetImageEx; + EFI_HII_DRAW_IMAGE_EX DrawImageEx; + EFI_HII_DRAW_IMAGE_ID_EX DrawImageIdEx; + EFI_HII_GET_IMAGE_INFO GetImageInfo; }; -extern EFI_GUID gEfiHiiImageExProtocolGuid; +extern EFI_GUID gEfiHiiImageExProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/HiiPackageList.h b/MdePkg/Include/Protocol/HiiPackageList.h index 865d8d8..5267e45 100644 --- a/MdePkg/Include/Protocol/HiiPackageList.h +++ b/MdePkg/Include/Protocol/HiiPackageList.h @@ -16,12 +16,8 @@ #define EFI_HII_PACKAGE_LIST_PROTOCOL_GUID \ { 0x6a1ee763, 0xd47a, 0x43b4, {0xaa, 0xbe, 0xef, 0x1d, 0xe2, 0xab, 0x56, 0xfc}} -typedef EFI_HII_PACKAGE_LIST_HEADER * EFI_HII_PACKAGE_LIST_PROTOCOL; - -extern EFI_GUID gEfiHiiPackageListProtocolGuid; - +typedef EFI_HII_PACKAGE_LIST_HEADER *EFI_HII_PACKAGE_LIST_PROTOCOL; +extern EFI_GUID gEfiHiiPackageListProtocolGuid; #endif - - diff --git a/MdePkg/Include/Protocol/HiiPopup.h b/MdePkg/Include/Protocol/HiiPopup.h index 8e21707..c3d47b0 100644 --- a/MdePkg/Include/Protocol/HiiPopup.h +++ b/MdePkg/Include/Protocol/HiiPopup.h @@ -16,7 +16,7 @@ #define EFI_HII_POPUP_PROTOCOL_GUID \ {0x4311edc0, 0x6054, 0x46d4, {0x9e, 0x40, 0x89, 0x3e, 0xa9, 0x52, 0xfc, 0xcc}} -#define EFI_HII_POPUP_PROTOCOL_REVISION 1 +#define EFI_HII_POPUP_PROTOCOL_REVISION 1 typedef struct _EFI_HII_POPUP_PROTOCOL EFI_HII_POPUP_PROTOCOL; @@ -58,21 +58,20 @@ typedef enum { **/ typedef EFI_STATUS -(EFIAPI * EFI_HII_CREATE_POPUP) ( +(EFIAPI *EFI_HII_CREATE_POPUP)( IN EFI_HII_POPUP_PROTOCOL *This, IN EFI_HII_POPUP_STYLE PopupStyle, IN EFI_HII_POPUP_TYPE PopupType, IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID Message, OUT EFI_HII_POPUP_SELECTION *UserSelection OPTIONAL -); + ); struct _EFI_HII_POPUP_PROTOCOL { - UINT64 Revision; - EFI_HII_CREATE_POPUP CreatePopup; + UINT64 Revision; + EFI_HII_CREATE_POPUP CreatePopup; }; -extern EFI_GUID gEfiHiiPopupProtocolGuid; +extern EFI_GUID gEfiHiiPopupProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/HiiString.h b/MdePkg/Include/Protocol/HiiString.h index ade4121..9149341 100644 --- a/MdePkg/Include/Protocol/HiiString.h +++ b/MdePkg/Include/Protocol/HiiString.h @@ -61,8 +61,7 @@ EFI_STATUS IN CONST CHAR16 *LanguageName OPTIONAL, IN CONST EFI_STRING String, IN CONST EFI_FONT_INFO *StringFontInfo OPTIONAL -); - + ); /** This function retrieves the string specified by StringId which is associated @@ -107,7 +106,7 @@ EFI_STATUS OUT EFI_STRING String, IN OUT UINTN *StringSize, OUT EFI_FONT_INFO **StringFontInfo OPTIONAL -); + ); /** This function updates the string specified by StringId in the specified PackageList to the text @@ -141,8 +140,7 @@ EFI_STATUS IN CONST CHAR8 *Language, IN EFI_STRING String, IN CONST EFI_FONT_INFO *StringFontInfo OPTIONAL -); - + ); /** This function returns the list of supported languages. @@ -173,8 +171,7 @@ EFI_STATUS IN EFI_HII_HANDLE PackageList, IN OUT CHAR8 *Languages, IN OUT UINTN *LanguagesSize -); - + ); /** Each string package has associated with it a single primary language and zero @@ -217,21 +214,19 @@ EFI_STATUS IN CONST CHAR8 *PrimaryLanguage, IN OUT CHAR8 *SecondaryLanguages, IN OUT UINTN *SecondaryLanguagesSize -); - + ); /// /// Services to manipulate the string. /// struct _EFI_HII_STRING_PROTOCOL { - EFI_HII_NEW_STRING NewString; - EFI_HII_GET_STRING GetString; - EFI_HII_SET_STRING SetString; - EFI_HII_GET_LANGUAGES GetLanguages; - EFI_HII_GET_2ND_LANGUAGES GetSecondaryLanguages; + EFI_HII_NEW_STRING NewString; + EFI_HII_GET_STRING GetString; + EFI_HII_SET_STRING SetString; + EFI_HII_GET_LANGUAGES GetLanguages; + EFI_HII_GET_2ND_LANGUAGES GetSecondaryLanguages; }; - -extern EFI_GUID gEfiHiiStringProtocolGuid; +extern EFI_GUID gEfiHiiStringProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Http.h b/MdePkg/Include/Protocol/Http.h index 8347363..28e6221 100644 --- a/MdePkg/Include/Protocol/Http.h +++ b/MdePkg/Include/Protocol/Http.h @@ -110,22 +110,22 @@ typedef struct { /// information in every TCP connection made by this instance. In addition, when set /// to TRUE, LocalAddress and LocalSubnet are ignored. /// - BOOLEAN UseDefaultAddress; + BOOLEAN UseDefaultAddress; /// /// If UseDefaultAddress is set to FALSE, this defines the local IP address to be /// used in every TCP connection opened by this instance. /// - EFI_IPv4_ADDRESS LocalAddress; + EFI_IPv4_ADDRESS LocalAddress; /// /// If UseDefaultAddress is set to FALSE, this defines the local subnet to be used /// in every TCP connection opened by this instance. /// - EFI_IPv4_ADDRESS LocalSubnet; + EFI_IPv4_ADDRESS LocalSubnet; /// /// This defines the local port to be used in /// every TCP connection opened by this instance. /// - UINT16 LocalPort; + UINT16 LocalPort; } EFI_HTTPv4_ACCESS_POINT; /// @@ -135,45 +135,44 @@ typedef struct { /// /// Local IP address to be used in every TCP connection opened by this instance. /// - EFI_IPv6_ADDRESS LocalAddress; + EFI_IPv6_ADDRESS LocalAddress; /// /// Local port to be used in every TCP connection opened by this instance. /// - UINT16 LocalPort; + UINT16 LocalPort; } EFI_HTTPv6_ACCESS_POINT; /// /// EFI_HTTP_CONFIG_DATA_ACCESS_POINT /// - typedef struct { /// /// HTTP version that this instance will support. /// - EFI_HTTP_VERSION HttpVersion; + EFI_HTTP_VERSION HttpVersion; /// /// Time out (in milliseconds) when blocking for requests. /// - UINT32 TimeOutMillisec; + UINT32 TimeOutMillisec; /// /// Defines behavior of EFI DNS and TCP protocols consumed by this instance. If /// FALSE, this instance will use EFI_DNS4_PROTOCOL and EFI_TCP4_PROTOCOL. If TRUE, /// this instance will use EFI_DNS6_PROTOCOL and EFI_TCP6_PROTOCOL. /// - BOOLEAN LocalAddressIsIPv6; + BOOLEAN LocalAddressIsIPv6; union { /// /// When LocalAddressIsIPv6 is FALSE, this points to the local address, subnet, and /// port used by the underlying TCP protocol. /// - EFI_HTTPv4_ACCESS_POINT *IPv4Node; + EFI_HTTPv4_ACCESS_POINT *IPv4Node; /// /// When LocalAddressIsIPv6 is TRUE, this points to the local IPv6 address and port /// used by the underlying TCP protocol. /// - EFI_HTTPv6_ACCESS_POINT *IPv6Node; + EFI_HTTPv6_ACCESS_POINT *IPv6Node; } AccessPoint; } EFI_HTTP_CONFIG_DATA; @@ -184,14 +183,14 @@ typedef struct { /// /// The HTTP method (e.g. GET, POST) for this HTTP Request. /// - EFI_HTTP_METHOD Method; + EFI_HTTP_METHOD Method; /// /// The URI of a remote host. From the information in this field, the HTTP instance /// will be able to determine whether to use HTTP or HTTPS and will also be able to /// determine the port number to use. If no port number is specified, port 80 (HTTP) /// is assumed. See RFC 3986 for more details on URI syntax. /// - CHAR16 *Url; + CHAR16 *Url; } EFI_HTTP_REQUEST_DATA; /// @@ -201,7 +200,7 @@ typedef struct { /// /// Response status code returned by the remote host. /// - EFI_HTTP_STATUS_CODE StatusCode; + EFI_HTTP_STATUS_CODE StatusCode; } EFI_HTTP_RESPONSE_DATA; /// @@ -212,12 +211,12 @@ typedef struct { /// Null terminated string which describes a field name. See RFC 2616 Section 14 for /// detailed information about field names. /// - CHAR8 *FieldName; + CHAR8 *FieldName; /// /// Null terminated string which describes the corresponding field value. See RFC 2616 /// Section 14 for detailed information about field values. /// - CHAR8 *FieldValue; + CHAR8 *FieldValue; } EFI_HTTP_HEADER; /// @@ -232,37 +231,36 @@ typedef struct { /// When the token is used to send a HTTP request, Request is a pointer to storage that /// contains such data as URL and HTTP method. /// - EFI_HTTP_REQUEST_DATA *Request; + EFI_HTTP_REQUEST_DATA *Request; /// /// When used to await a response, Response points to storage containing HTTP response /// status code. /// - EFI_HTTP_RESPONSE_DATA *Response; + EFI_HTTP_RESPONSE_DATA *Response; } Data; /// /// Number of HTTP header structures in Headers list. On request, this count is /// provided by the caller. On response, this count is provided by the HTTP driver. /// - UINTN HeaderCount; + UINTN HeaderCount; /// /// Array containing list of HTTP headers. On request, this array is populated by the /// caller. On response, this array is allocated and populated by the HTTP driver. It /// is the responsibility of the caller to free this memory on both request and /// response. /// - EFI_HTTP_HEADER *Headers; + EFI_HTTP_HEADER *Headers; /// /// Length in bytes of the HTTP body. This can be zero depending on the HttpMethod type. /// - UINTN BodyLength; + UINTN BodyLength; /// /// Body associated with the HTTP request or response. This can be NULL depending on /// the HttpMethod type. /// - VOID *Body; + VOID *Body; } EFI_HTTP_MESSAGE; - /// /// EFI_HTTP_TOKEN /// @@ -272,7 +270,7 @@ typedef struct { /// Protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL. The Task Priority /// Level (TPL) of Event must be lower than or equal to TPL_CALLBACK. /// - EFI_EVENT Event; + EFI_EVENT Event; /// /// Status will be set to one of the following value if the HTTP request is /// successfully sent or if an unexpected error occurs: @@ -284,11 +282,11 @@ typedef struct { /// EFI_TIMEOUT: The HTTP request timed out before reaching the remote host. /// EFI_DEVICE_ERROR: An unexpected system or network error occurred. /// - EFI_STATUS Status; + EFI_STATUS Status; /// /// Pointer to storage containing HTTP message data. /// - EFI_HTTP_MESSAGE *Message; + EFI_HTTP_MESSAGE *Message; } EFI_HTTP_TOKEN; /** @@ -383,7 +381,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_HTTP_REQUEST) ( +(EFIAPI *EFI_HTTP_REQUEST)( IN EFI_HTTP_PROTOCOL *This, IN EFI_HTTP_TOKEN *Token ); @@ -465,7 +463,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_HTTP_RESPONSE) ( +(EFIAPI *EFI_HTTP_RESPONSE)( IN EFI_HTTP_PROTOCOL *This, IN EFI_HTTP_TOKEN *Token ); @@ -491,7 +489,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_HTTP_POLL) ( +(EFIAPI *EFI_HTTP_POLL)( IN EFI_HTTP_PROTOCOL *This ); @@ -502,15 +500,15 @@ EFI_STATUS /// TCP protocol. /// struct _EFI_HTTP_PROTOCOL { - EFI_HTTP_GET_MODE_DATA GetModeData; - EFI_HTTP_CONFIGURE Configure; - EFI_HTTP_REQUEST Request; - EFI_HTTP_CANCEL Cancel; - EFI_HTTP_RESPONSE Response; - EFI_HTTP_POLL Poll; + EFI_HTTP_GET_MODE_DATA GetModeData; + EFI_HTTP_CONFIGURE Configure; + EFI_HTTP_REQUEST Request; + EFI_HTTP_CANCEL Cancel; + EFI_HTTP_RESPONSE Response; + EFI_HTTP_POLL Poll; }; -extern EFI_GUID gEfiHttpServiceBindingProtocolGuid; -extern EFI_GUID gEfiHttpProtocolGuid; +extern EFI_GUID gEfiHttpServiceBindingProtocolGuid; +extern EFI_GUID gEfiHttpProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/HttpBootCallback.h b/MdePkg/Include/Protocol/HttpBootCallback.h index 2e3518b..926f6c1 100644 --- a/MdePkg/Include/Protocol/HttpBootCallback.h +++ b/MdePkg/Include/Protocol/HttpBootCallback.h @@ -17,7 +17,7 @@ 0xba23b311, 0x343d, 0x11e6, {0x91, 0x85, 0x58, 0x20, 0xb1, 0xd6, 0x52, 0x99} \ } -typedef struct _EFI_HTTP_BOOT_CALLBACK_PROTOCOL EFI_HTTP_BOOT_CALLBACK_PROTOCOL; +typedef struct _EFI_HTTP_BOOT_CALLBACK_PROTOCOL EFI_HTTP_BOOT_CALLBACK_PROTOCOL; /// /// EFI_HTTP_BOOT_CALLBACK_DATA_TYPE @@ -72,13 +72,13 @@ typedef enum { **/ typedef EFI_STATUS -(EFIAPI * EFI_HTTP_BOOT_CALLBACK) ( +(EFIAPI *EFI_HTTP_BOOT_CALLBACK)( IN EFI_HTTP_BOOT_CALLBACK_PROTOCOL *This, IN EFI_HTTP_BOOT_CALLBACK_DATA_TYPE DataType, IN BOOLEAN Received, IN UINT32 DataLength, IN VOID *Data OPTIONAL - ); + ); /// /// EFI HTTP Boot Callback Protocol is invoked when the HTTP Boot driver is about to transmit or @@ -86,9 +86,9 @@ EFI_STATUS /// as the Load File Protocol for the HTTP Boot. /// struct _EFI_HTTP_BOOT_CALLBACK_PROTOCOL { - EFI_HTTP_BOOT_CALLBACK Callback; + EFI_HTTP_BOOT_CALLBACK Callback; }; -extern EFI_GUID gEfiHttpBootCallbackProtocolGuid; +extern EFI_GUID gEfiHttpBootCallbackProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/HttpUtilities.h b/MdePkg/Include/Protocol/HttpUtilities.h index 6fd45e2..05ed4d7 100644 --- a/MdePkg/Include/Protocol/HttpUtilities.h +++ b/MdePkg/Include/Protocol/HttpUtilities.h @@ -22,7 +22,6 @@ typedef struct _EFI_HTTP_UTILITIES_PROTOCOL EFI_HTTP_UTILITIES_PROTOCOL; - /** Create HTTP header based on a combination of seed header, fields to delete, and fields to append. @@ -57,7 +56,7 @@ typedef struct _EFI_HTTP_UTILITIES_PROTOCOL EFI_HTTP_UTILITIES_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI *EFI_HTTP_UTILS_BUILD) ( +(EFIAPI *EFI_HTTP_UTILS_BUILD)( IN EFI_HTTP_UTILITIES_PROTOCOL *This, IN UINTN SeedMessageSize, IN VOID *SeedMessage OPTIONAL, @@ -92,7 +91,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_HTTP_UTILS_PARSE) ( +(EFIAPI *EFI_HTTP_UTILS_PARSE)( IN EFI_HTTP_UTILITIES_PROTOCOL *This, IN CHAR8 *HttpMessage, IN UINTN HttpMessageSize, @@ -100,7 +99,6 @@ EFI_STATUS OUT UINTN *FieldCount ); - /// /// EFI_HTTP_UTILITIES_PROTOCOL /// designed to be used by EFI drivers and applications to parse HTTP @@ -109,10 +107,10 @@ EFI_STATUS /// infrastructure. /// struct _EFI_HTTP_UTILITIES_PROTOCOL { - EFI_HTTP_UTILS_BUILD Build; - EFI_HTTP_UTILS_PARSE Parse; + EFI_HTTP_UTILS_BUILD Build; + EFI_HTTP_UTILS_PARSE Parse; }; -extern EFI_GUID gEfiHttpUtilitiesProtocolGuid; +extern EFI_GUID gEfiHttpUtilitiesProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/I2cBusConfigurationManagement.h b/MdePkg/Include/Protocol/I2cBusConfigurationManagement.h index ca784a7..fb139de 100644 --- a/MdePkg/Include/Protocol/I2cBusConfigurationManagement.h +++ b/MdePkg/Include/Protocol/I2cBusConfigurationManagement.h @@ -86,7 +86,6 @@ /// typedef struct _EFI_I2C_BUS_CONFIGURATION_MANAGEMENT_PROTOCOL EFI_I2C_BUS_CONFIGURATION_MANAGEMENT_PROTOCOL; - /** Enable access to an I2C bus configuration. @@ -140,7 +139,7 @@ typedef struct _EFI_I2C_BUS_CONFIGURATION_MANAGEMENT_PROTOCOL EFI_I2C_BUS_CONFIG **/ typedef EFI_STATUS -(EFIAPI *EFI_I2C_BUS_CONFIGURATION_MANAGEMENT_PROTOCOL_ENABLE_I2C_BUS_CONFIGURATION) ( +(EFIAPI *EFI_I2C_BUS_CONFIGURATION_MANAGEMENT_PROTOCOL_ENABLE_I2C_BUS_CONFIGURATION)( IN CONST EFI_I2C_BUS_CONFIGURATION_MANAGEMENT_PROTOCOL *This, IN UINTN I2cBusConfiguration, IN EFI_EVENT Event OPTIONAL, @@ -154,12 +153,12 @@ struct _EFI_I2C_BUS_CONFIGURATION_MANAGEMENT_PROTOCOL { /// /// Enable an I2C bus configuration for use. /// - EFI_I2C_BUS_CONFIGURATION_MANAGEMENT_PROTOCOL_ENABLE_I2C_BUS_CONFIGURATION EnableI2cBusConfiguration; + EFI_I2C_BUS_CONFIGURATION_MANAGEMENT_PROTOCOL_ENABLE_I2C_BUS_CONFIGURATION EnableI2cBusConfiguration; }; /// /// Reference to variable defined in the .DEC file /// -extern EFI_GUID gEfiI2cBusConfigurationManagementProtocolGuid; +extern EFI_GUID gEfiI2cBusConfigurationManagementProtocolGuid; -#endif // __I2C_BUS_CONFIGURATION_MANAGEMENT_H__ +#endif // __I2C_BUS_CONFIGURATION_MANAGEMENT_H__ diff --git a/MdePkg/Include/Protocol/I2cEnumerate.h b/MdePkg/Include/Protocol/I2cEnumerate.h index d7d0253..e1890e4 100644 --- a/MdePkg/Include/Protocol/I2cEnumerate.h +++ b/MdePkg/Include/Protocol/I2cEnumerate.h @@ -16,9 +16,9 @@ #include -#define EFI_I2C_ENUMERATE_PROTOCOL_GUID { 0xda8cd7c4, 0x1c00, 0x49e2, { 0x80, 0x3e, 0x52, 0x14, 0xe7, 0x01, 0x89, 0x4c }} +#define EFI_I2C_ENUMERATE_PROTOCOL_GUID { 0xda8cd7c4, 0x1c00, 0x49e2, { 0x80, 0x3e, 0x52, 0x14, 0xe7, 0x01, 0x89, 0x4c }} -typedef struct _EFI_I2C_ENUMERATE_PROTOCOL EFI_I2C_ENUMERATE_PROTOCOL; +typedef struct _EFI_I2C_ENUMERATE_PROTOCOL EFI_I2C_ENUMERATE_PROTOCOL; /** Enumerate the I2C devices @@ -45,7 +45,7 @@ typedef struct _EFI_I2C_ENUMERATE_PROTOCOL EFI_I2C_ENUMERATE_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI *EFI_I2C_ENUMERATE_PROTOCOL_ENUMERATE) ( +(EFIAPI *EFI_I2C_ENUMERATE_PROTOCOL_ENUMERATE)( IN CONST EFI_I2C_ENUMERATE_PROTOCOL *This, IN OUT CONST EFI_I2C_DEVICE **Device ); @@ -73,7 +73,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_I2C_ENUMERATE_PROTOCOL_GET_BUS_FREQUENCY) ( +(EFIAPI *EFI_I2C_ENUMERATE_PROTOCOL_GET_BUS_FREQUENCY)( IN CONST EFI_I2C_ENUMERATE_PROTOCOL *This, IN UINTN I2cBusConfiguration, OUT UINTN *BusClockHertz @@ -87,18 +87,18 @@ struct _EFI_I2C_ENUMERATE_PROTOCOL { /// Traverse the set of I2C devices on an I2C bus. This routine /// returns the next I2C device on an I2C bus. /// - EFI_I2C_ENUMERATE_PROTOCOL_ENUMERATE Enumerate; + EFI_I2C_ENUMERATE_PROTOCOL_ENUMERATE Enumerate; /// /// Get the requested I2C bus frequency for a specified bus /// configuration. /// - EFI_I2C_ENUMERATE_PROTOCOL_GET_BUS_FREQUENCY GetBusFrequency; + EFI_I2C_ENUMERATE_PROTOCOL_GET_BUS_FREQUENCY GetBusFrequency; }; /// /// Reference to variable defined in the .DEC file /// -extern EFI_GUID gEfiI2cEnumerateProtocolGuid; +extern EFI_GUID gEfiI2cEnumerateProtocolGuid; -#endif // __I2C_ENUMERATE_H__ +#endif // __I2C_ENUMERATE_H__ diff --git a/MdePkg/Include/Protocol/I2cHost.h b/MdePkg/Include/Protocol/I2cHost.h index 4657c64..d820734 100644 --- a/MdePkg/Include/Protocol/I2cHost.h +++ b/MdePkg/Include/Protocol/I2cHost.h @@ -37,7 +37,6 @@ /// typedef struct _EFI_I2C_HOST_PROTOCOL EFI_I2C_HOST_PROTOCOL; - /** Queue an I2C transaction for execution on the I2C controller. @@ -113,7 +112,7 @@ typedef struct _EFI_I2C_HOST_PROTOCOL EFI_I2C_HOST_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI *EFI_I2C_HOST_PROTOCOL_QUEUE_REQUEST) ( +(EFIAPI *EFI_I2C_HOST_PROTOCOL_QUEUE_REQUEST)( IN CONST EFI_I2C_HOST_PROTOCOL *This, IN UINTN I2cBusConfiguration, IN UINTN SlaveAddress, @@ -129,18 +128,18 @@ struct _EFI_I2C_HOST_PROTOCOL { /// /// Queue an I2C transaction for execution on the I2C bus /// - EFI_I2C_HOST_PROTOCOL_QUEUE_REQUEST QueueRequest; + EFI_I2C_HOST_PROTOCOL_QUEUE_REQUEST QueueRequest; /// /// Pointer to an EFI_I2C_CONTROLLER_CAPABILITIES data structure /// containing the capabilities of the I2C host controller. /// - CONST EFI_I2C_CONTROLLER_CAPABILITIES *I2cControllerCapabilities; + CONST EFI_I2C_CONTROLLER_CAPABILITIES *I2cControllerCapabilities; }; /// /// Reference to variable defined in the .DEC file /// -extern EFI_GUID gEfiI2cHostProtocolGuid; +extern EFI_GUID gEfiI2cHostProtocolGuid; -#endif // __I2C_HOST_H__ +#endif // __I2C_HOST_H__ diff --git a/MdePkg/Include/Protocol/I2cIo.h b/MdePkg/Include/Protocol/I2cIo.h index 09076df..e38fd94 100644 --- a/MdePkg/Include/Protocol/I2cIo.h +++ b/MdePkg/Include/Protocol/I2cIo.h @@ -17,7 +17,7 @@ #include -#define EFI_I2C_IO_PROTOCOL_GUID { 0xb60a3e6b, 0x18c4, 0x46e5, { 0xa2, 0x9a, 0xc9, 0xa1, 0x06, 0x65, 0xa2, 0x8e }} +#define EFI_I2C_IO_PROTOCOL_GUID { 0xb60a3e6b, 0x18c4, 0x46e5, { 0xa2, 0x9a, 0xc9, 0xa1, 0x06, 0x65, 0xa2, 0x8e }} /// /// I2C I/O protocol @@ -38,8 +38,7 @@ /// for the I2C device required to implement the EFI_I2C_ENUMERATE_PROTOCOL. /// The order of the list must be preserved. /// -typedef struct _EFI_I2C_IO_PROTOCOL EFI_I2C_IO_PROTOCOL; - +typedef struct _EFI_I2C_IO_PROTOCOL EFI_I2C_IO_PROTOCOL; /** Queue an I2C transaction for execution on the I2C device. @@ -114,7 +113,7 @@ typedef struct _EFI_I2C_IO_PROTOCOL EFI_I2C_IO_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI *EFI_I2C_IO_PROTOCOL_QUEUE_REQUEST) ( +(EFIAPI *EFI_I2C_IO_PROTOCOL_QUEUE_REQUEST)( IN CONST EFI_I2C_IO_PROTOCOL *This, IN UINTN SlaveAddressIndex, IN EFI_EVENT Event OPTIONAL, @@ -129,7 +128,7 @@ struct _EFI_I2C_IO_PROTOCOL { /// /// Queue an I2C transaction for execution on the I2C device. /// - EFI_I2C_IO_PROTOCOL_QUEUE_REQUEST QueueRequest; + EFI_I2C_IO_PROTOCOL_QUEUE_REQUEST QueueRequest; /// /// Unique value assigned by the silicon manufacture or the third @@ -137,30 +136,30 @@ struct _EFI_I2C_IO_PROTOCOL { /// combines both the manufacture name and the I2C part number into /// a single value specified as a GUID. /// - CONST EFI_GUID *DeviceGuid; + CONST EFI_GUID *DeviceGuid; /// /// Unique ID of the I2C part within the system /// - UINT32 DeviceIndex; + UINT32 DeviceIndex; /// /// Hardware revision - ACPI _HRV value. See the Advanced Configuration /// and Power Interface Specification, Revision 5.0 for the field format /// and the Plug and play support for I2C web-page for restriction on values. /// - UINT32 HardwareRevision; + UINT32 HardwareRevision; /// /// Pointer to an EFI_I2C_CONTROLLER_CAPABILITIES data structure containing /// the capabilities of the I2C host controller. /// - CONST EFI_I2C_CONTROLLER_CAPABILITIES *I2cControllerCapabilities; + CONST EFI_I2C_CONTROLLER_CAPABILITIES *I2cControllerCapabilities; }; /// /// Reference to variable defined in the .DEC file /// -extern EFI_GUID gEfiI2cIoProtocolGuid; +extern EFI_GUID gEfiI2cIoProtocolGuid; -#endif // __I2C_IO_H__ +#endif // __I2C_IO_H__ diff --git a/MdePkg/Include/Protocol/I2cMaster.h b/MdePkg/Include/Protocol/I2cMaster.h index 58244c2..6ba70e2 100644 --- a/MdePkg/Include/Protocol/I2cMaster.h +++ b/MdePkg/Include/Protocol/I2cMaster.h @@ -17,7 +17,7 @@ #include -#define EFI_I2C_MASTER_PROTOCOL_GUID { 0xcd72881f, 0x45b5, 0x4feb, { 0x98, 0xc8, 0x31, 0x3d, 0xa8, 0x11, 0x74, 0x62 }} +#define EFI_I2C_MASTER_PROTOCOL_GUID { 0xcd72881f, 0x45b5, 0x4feb, { 0x98, 0xc8, 0x31, 0x3d, 0xa8, 0x11, 0x74, 0x62 }} typedef struct _EFI_I2C_MASTER_PROTOCOL EFI_I2C_MASTER_PROTOCOL; @@ -48,7 +48,7 @@ typedef struct _EFI_I2C_MASTER_PROTOCOL EFI_I2C_MASTER_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI *EFI_I2C_MASTER_PROTOCOL_SET_BUS_FREQUENCY) ( +(EFIAPI *EFI_I2C_MASTER_PROTOCOL_SET_BUS_FREQUENCY)( IN CONST EFI_I2C_MASTER_PROTOCOL *This, IN OUT UINTN *BusClockHertz ); @@ -70,7 +70,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_I2C_MASTER_PROTOCOL_RESET) ( +(EFIAPI *EFI_I2C_MASTER_PROTOCOL_RESET)( IN CONST EFI_I2C_MASTER_PROTOCOL *This ); @@ -143,7 +143,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_I2C_MASTER_PROTOCOL_START_REQUEST) ( +(EFIAPI *EFI_I2C_MASTER_PROTOCOL_START_REQUEST)( IN CONST EFI_I2C_MASTER_PROTOCOL *This, IN UINTN SlaveAddress, IN EFI_I2C_REQUEST_PACKET *RequestPacket, @@ -162,25 +162,25 @@ struct _EFI_I2C_MASTER_PROTOCOL { /// /// Set the clock frequency for the I2C bus. /// - EFI_I2C_MASTER_PROTOCOL_SET_BUS_FREQUENCY SetBusFrequency; + EFI_I2C_MASTER_PROTOCOL_SET_BUS_FREQUENCY SetBusFrequency; /// /// Reset the I2C host controller. /// - EFI_I2C_MASTER_PROTOCOL_RESET Reset; + EFI_I2C_MASTER_PROTOCOL_RESET Reset; /// /// Start an I2C transaction in master mode on the host controller. /// - EFI_I2C_MASTER_PROTOCOL_START_REQUEST StartRequest; + EFI_I2C_MASTER_PROTOCOL_START_REQUEST StartRequest; /// /// Pointer to an EFI_I2C_CONTROLLER_CAPABILITIES data structure containing /// the capabilities of the I2C host controller. /// - CONST EFI_I2C_CONTROLLER_CAPABILITIES *I2cControllerCapabilities; + CONST EFI_I2C_CONTROLLER_CAPABILITIES *I2cControllerCapabilities; }; -extern EFI_GUID gEfiI2cMasterProtocolGuid; +extern EFI_GUID gEfiI2cMasterProtocolGuid; -#endif // __I2C_MASTER_H__ +#endif // __I2C_MASTER_H__ diff --git a/MdePkg/Include/Protocol/IScsiInitiatorName.h b/MdePkg/Include/Protocol/IScsiInitiatorName.h index 3f0bb0a..f7a0bb4 100644 --- a/MdePkg/Include/Protocol/IScsiInitiatorName.h +++ b/MdePkg/Include/Protocol/IScsiInitiatorName.h @@ -41,8 +41,6 @@ EFI_STATUS OUT VOID *Buffer ); - - /** Sets the iSCSI Initiator Name. @@ -71,11 +69,10 @@ typedef EFI_STATUS /// iSCSI Initiator Name Protocol for setting and obtaining the iSCSI Initiator Name. /// struct _EFI_ISCSI_INITIATOR_NAME_PROTOCOL { - EFI_ISCSI_INITIATOR_NAME_GET Get; - EFI_ISCSI_INITIATOR_NAME_SET Set; + EFI_ISCSI_INITIATOR_NAME_GET Get; + EFI_ISCSI_INITIATOR_NAME_SET Set; }; -extern EFI_GUID gEfiIScsiInitiatorNameProtocolGuid; +extern EFI_GUID gEfiIScsiInitiatorNameProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/IdeControllerInit.h b/MdePkg/Include/Protocol/IdeControllerInit.h index 021a989..46c43bd 100644 --- a/MdePkg/Include/Protocol/IdeControllerInit.h +++ b/MdePkg/Include/Protocol/IdeControllerInit.h @@ -38,7 +38,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// Forward declaration for EFI_IDE_CONTROLLER_INIT_PROTOCOL. /// -typedef struct _EFI_IDE_CONTROLLER_INIT_PROTOCOL EFI_IDE_CONTROLLER_INIT_PROTOCOL; +typedef struct _EFI_IDE_CONTROLLER_INIT_PROTOCOL EFI_IDE_CONTROLLER_INIT_PROTOCOL; /// /// The phase of the IDE Controller enumeration. @@ -119,8 +119,8 @@ typedef enum { /// EFI_ATA_MODE structure. /// typedef struct { - BOOLEAN Valid; ///< TRUE if Mode is valid. - UINT32 Mode; ///< The actual ATA mode. This field is not a bit map. + BOOLEAN Valid; ///< TRUE if Mode is valid. + UINT32 Mode; ///< The actual ATA mode. This field is not a bit map. } EFI_ATA_MODE; /// @@ -136,11 +136,11 @@ typedef struct { /// can support new transport protocols beyond UDMA. Type EFI_ATA_EXT_TRANSFER_PROTOCOL /// is defined below. /// - EFI_ATA_EXT_TRANSFER_PROTOCOL TransferProtocol; + EFI_ATA_EXT_TRANSFER_PROTOCOL TransferProtocol; /// /// The mode for operating the transfer protocol that is identified by TransferProtocol. /// - UINT32 Mode; + UINT32 Mode; } EFI_ATA_EXTENDED_MODE; /// @@ -154,7 +154,7 @@ typedef struct { /// of PIO mode 1 is governed by the ATA/ATAPI specification. Type EFI_ATA_MODE /// is defined below. /// - EFI_ATA_MODE PioMode; + EFI_ATA_MODE PioMode; /// /// This field specifies the single word DMA mode. Single word DMA modes are defined /// in the ATA/ATAPI specification, versions 1 and 2. Single word DMA support was @@ -164,26 +164,26 @@ typedef struct { /// mode 1. The actual meaning of single word DMA mode 1 is governed by the ATA/ /// ATAPI specification. /// - EFI_ATA_MODE SingleWordDmaMode; + EFI_ATA_MODE SingleWordDmaMode; /// /// This field specifies the multiword DMA mode. Various multiword DMA modes are /// defined in the ATA/ATAPI specification. A value of 1 in this field means multiword /// DMA mode 1. The actual meaning of multiword DMA mode 1 is governed by the /// ATA/ATAPI specification. /// - EFI_ATA_MODE MultiWordDmaMode; + EFI_ATA_MODE MultiWordDmaMode; /// /// This field specifies the ultra DMA (UDMA) mode. UDMA modes are defined in the /// ATA/ATAPI specification. A value of 1 in this field means UDMA mode 1. The /// actual meaning of UDMA mode 1 is governed by the ATA/ATAPI specification. /// - EFI_ATA_MODE UdmaMode; + EFI_ATA_MODE UdmaMode; /// /// The number of extended-mode bitmap entries. Extended modes describe transfer /// protocols beyond PIO, single word DMA, multiword DMA, and UDMA. This field /// can be zero and provides extensibility. /// - UINT32 ExtModeCount; + UINT32 ExtModeCount; /// /// ExtModeCount number of entries. Each entry represents a transfer protocol other /// than the ones defined above (i.e., PIO, single word DMA, multiword DMA, and @@ -191,7 +191,7 @@ typedef struct { /// transfer protocol is defined to cover SATA transfers. Type /// EFI_ATA_EXTENDED_MODE is defined below. /// - EFI_ATA_EXTENDED_MODE ExtMode[1]; + EFI_ATA_EXTENDED_MODE ExtMode[1]; } EFI_ATA_COLLECTIVE_MODE; /// @@ -222,12 +222,12 @@ typedef union { /// The data that is returned by an ATA device upon successful completion /// of the ATA IDENTIFY_DEVICE command. /// - EFI_ATA_IDENTIFY_DATA AtaData; + EFI_ATA_IDENTIFY_DATA AtaData; /// /// The data that is returned by an ATAPI device upon successful completion /// of the ATA IDENTIFY_PACKET_DEVICE command. /// - EFI_ATAPI_IDENTIFY_DATA AtapiData; + EFI_ATAPI_IDENTIFY_DATA AtapiData; } EFI_IDENTIFY_DATA; /** @@ -551,9 +551,9 @@ struct _EFI_IDE_CONTROLLER_INIT_PROTOCOL { /// each of which can have up to one device. In the presence of a multiplier, /// each channel can have fifteen devices. /// - UINT8 ChannelCount; + UINT8 ChannelCount; }; -extern EFI_GUID gEfiIdeControllerInitProtocolGuid; +extern EFI_GUID gEfiIdeControllerInitProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/IncompatiblePciDeviceSupport.h b/MdePkg/Include/Protocol/IncompatiblePciDeviceSupport.h index 8bb4c3e..b56d3eb 100644 --- a/MdePkg/Include/Protocol/IncompatiblePciDeviceSupport.h +++ b/MdePkg/Include/Protocol/IncompatiblePciDeviceSupport.h @@ -159,9 +159,9 @@ struct _EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL { /// resource configuration requirements if the specified device is a recognized /// incompatible PCI device. /// - EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_CHECK_DEVICE CheckDevice; + EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_CHECK_DEVICE CheckDevice; }; -extern EFI_GUID gEfiIncompatiblePciDeviceSupportProtocolGuid; +extern EFI_GUID gEfiIncompatiblePciDeviceSupportProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Ip4.h b/MdePkg/Include/Protocol/Ip4.h index b1c5cb0..4c0ed6f 100644 --- a/MdePkg/Include/Protocol/Ip4.h +++ b/MdePkg/Include/Protocol/Ip4.h @@ -40,9 +40,9 @@ typedef struct _EFI_IP4_PROTOCOL EFI_IP4_PROTOCOL; /// The definition in here is only present to provide backwards compatability. /// typedef struct { - EFI_HANDLE InstanceHandle; - EFI_IPv4_ADDRESS Ip4Address; - EFI_IPv4_ADDRESS SubnetMask; + EFI_HANDLE InstanceHandle; + EFI_IPv4_ADDRESS Ip4Address; + EFI_IPv4_ADDRESS SubnetMask; } EFI_IP4_ADDRESS_PAIR; /// @@ -60,182 +60,178 @@ typedef struct { /// The default IPv4 protocol packets to send and receive. Ignored /// when AcceptPromiscuous is TRUE. /// - UINT8 DefaultProtocol; + UINT8 DefaultProtocol; /// /// Set to TRUE to receive all IPv4 packets that get through the receive filters. /// Set to FALSE to receive only the DefaultProtocol IPv4 /// packets that get through the receive filters. /// - BOOLEAN AcceptAnyProtocol; + BOOLEAN AcceptAnyProtocol; /// /// Set to TRUE to receive ICMP error report packets. Ignored when /// AcceptPromiscuous or AcceptAnyProtocol is TRUE. /// - BOOLEAN AcceptIcmpErrors; + BOOLEAN AcceptIcmpErrors; /// /// Set to TRUE to receive broadcast IPv4 packets. Ignored when /// AcceptPromiscuous is TRUE. /// Set to FALSE to stop receiving broadcast IPv4 packets. /// - BOOLEAN AcceptBroadcast; + BOOLEAN AcceptBroadcast; /// /// Set to TRUE to receive all IPv4 packets that are sent to any /// hardware address or any protocol address. /// Set to FALSE to stop receiving all promiscuous IPv4 packets /// - BOOLEAN AcceptPromiscuous; + BOOLEAN AcceptPromiscuous; /// /// Set to TRUE to use the default IPv4 address and default routing table. /// - BOOLEAN UseDefaultAddress; + BOOLEAN UseDefaultAddress; /// /// The station IPv4 address that will be assigned to this EFI IPv4Protocol instance. /// - EFI_IPv4_ADDRESS StationAddress; + EFI_IPv4_ADDRESS StationAddress; /// /// The subnet address mask that is associated with the station address. /// - EFI_IPv4_ADDRESS SubnetMask; + EFI_IPv4_ADDRESS SubnetMask; /// /// TypeOfService field in transmitted IPv4 packets. /// - UINT8 TypeOfService; + UINT8 TypeOfService; /// /// TimeToLive field in transmitted IPv4 packets. /// - UINT8 TimeToLive; + UINT8 TimeToLive; /// /// State of the DoNotFragment bit in transmitted IPv4 packets. /// - BOOLEAN DoNotFragment; + BOOLEAN DoNotFragment; /// /// Set to TRUE to send and receive unformatted packets. The other /// IPv4 receive filters are still applied. Fragmentation is disabled for RawData mode. /// - BOOLEAN RawData; + BOOLEAN RawData; /// /// The timer timeout value (number of microseconds) for the /// receive timeout event to be associated with each assembled /// packet. Zero means do not drop assembled packets. /// - UINT32 ReceiveTimeout; + UINT32 ReceiveTimeout; /// /// The timer timeout value (number of microseconds) for the /// transmit timeout event to be associated with each outgoing /// packet. Zero means do not drop outgoing packets. /// - UINT32 TransmitTimeout; + UINT32 TransmitTimeout; } EFI_IP4_CONFIG_DATA; - typedef struct { - EFI_IPv4_ADDRESS SubnetAddress; - EFI_IPv4_ADDRESS SubnetMask; - EFI_IPv4_ADDRESS GatewayAddress; + EFI_IPv4_ADDRESS SubnetAddress; + EFI_IPv4_ADDRESS SubnetMask; + EFI_IPv4_ADDRESS GatewayAddress; } EFI_IP4_ROUTE_TABLE; typedef struct { - UINT8 Type; - UINT8 Code; + UINT8 Type; + UINT8 Code; } EFI_IP4_ICMP_TYPE; typedef struct { /// /// Set to TRUE after this EFI IPv4 Protocol instance has been successfully configured. /// - BOOLEAN IsStarted; + BOOLEAN IsStarted; /// /// The maximum packet size, in bytes, of the packet which the upper layer driver could feed. /// - UINT32 MaxPacketSize; + UINT32 MaxPacketSize; /// /// Current configuration settings. /// - EFI_IP4_CONFIG_DATA ConfigData; + EFI_IP4_CONFIG_DATA ConfigData; /// /// Set to TRUE when the EFI IPv4 Protocol instance has a station address and subnet mask. /// - BOOLEAN IsConfigured; + BOOLEAN IsConfigured; /// /// Number of joined multicast groups. /// - UINT32 GroupCount; + UINT32 GroupCount; /// /// List of joined multicast group addresses. /// - EFI_IPv4_ADDRESS *GroupTable; + EFI_IPv4_ADDRESS *GroupTable; /// /// Number of entries in the routing table. /// - UINT32 RouteCount; + UINT32 RouteCount; /// /// Routing table entries. /// - EFI_IP4_ROUTE_TABLE *RouteTable; + EFI_IP4_ROUTE_TABLE *RouteTable; /// /// Number of entries in the supported ICMP types list. /// - UINT32 IcmpTypeCount; + UINT32 IcmpTypeCount; /// /// Array of ICMP types and codes that are supported by this EFI IPv4 Protocol driver /// - EFI_IP4_ICMP_TYPE *IcmpTypeList; + EFI_IP4_ICMP_TYPE *IcmpTypeList; } EFI_IP4_MODE_DATA; #pragma pack(1) typedef struct { - UINT8 HeaderLength:4; - UINT8 Version:4; - UINT8 TypeOfService; - UINT16 TotalLength; - UINT16 Identification; - UINT16 Fragmentation; - UINT8 TimeToLive; - UINT8 Protocol; - UINT16 Checksum; - EFI_IPv4_ADDRESS SourceAddress; - EFI_IPv4_ADDRESS DestinationAddress; + UINT8 HeaderLength : 4; + UINT8 Version : 4; + UINT8 TypeOfService; + UINT16 TotalLength; + UINT16 Identification; + UINT16 Fragmentation; + UINT8 TimeToLive; + UINT8 Protocol; + UINT16 Checksum; + EFI_IPv4_ADDRESS SourceAddress; + EFI_IPv4_ADDRESS DestinationAddress; } EFI_IP4_HEADER; #pragma pack() - typedef struct { - UINT32 FragmentLength; - VOID *FragmentBuffer; + UINT32 FragmentLength; + VOID *FragmentBuffer; } EFI_IP4_FRAGMENT_DATA; - typedef struct { - EFI_TIME TimeStamp; - EFI_EVENT RecycleSignal; - UINT32 HeaderLength; - EFI_IP4_HEADER *Header; - UINT32 OptionsLength; - VOID *Options; - UINT32 DataLength; - UINT32 FragmentCount; - EFI_IP4_FRAGMENT_DATA FragmentTable[1]; + EFI_TIME TimeStamp; + EFI_EVENT RecycleSignal; + UINT32 HeaderLength; + EFI_IP4_HEADER *Header; + UINT32 OptionsLength; + VOID *Options; + UINT32 DataLength; + UINT32 FragmentCount; + EFI_IP4_FRAGMENT_DATA FragmentTable[1]; } EFI_IP4_RECEIVE_DATA; - typedef struct { - EFI_IPv4_ADDRESS SourceAddress; - EFI_IPv4_ADDRESS GatewayAddress; - UINT8 Protocol; - UINT8 TypeOfService; - UINT8 TimeToLive; - BOOLEAN DoNotFragment; + EFI_IPv4_ADDRESS SourceAddress; + EFI_IPv4_ADDRESS GatewayAddress; + UINT8 Protocol; + UINT8 TypeOfService; + UINT8 TimeToLive; + BOOLEAN DoNotFragment; } EFI_IP4_OVERRIDE_DATA; typedef struct { - EFI_IPv4_ADDRESS DestinationAddress; - EFI_IP4_OVERRIDE_DATA *OverrideData; //OPTIONAL - UINT32 OptionsLength; //OPTIONAL - VOID *OptionsBuffer; //OPTIONAL - UINT32 TotalDataLength; - UINT32 FragmentCount; - EFI_IP4_FRAGMENT_DATA FragmentTable[1]; + EFI_IPv4_ADDRESS DestinationAddress; + EFI_IP4_OVERRIDE_DATA *OverrideData; // OPTIONAL + UINT32 OptionsLength; // OPTIONAL + VOID *OptionsBuffer; // OPTIONAL + UINT32 TotalDataLength; + UINT32 FragmentCount; + EFI_IP4_FRAGMENT_DATA FragmentTable[1]; } EFI_IP4_TRANSMIT_DATA; typedef struct { @@ -245,21 +241,21 @@ typedef struct { /// EFI_NOTIFY_SIGNAL. The Task Priority Level (TPL) of /// Event must be lower than or equal to TPL_CALLBACK. /// - EFI_EVENT Event; + EFI_EVENT Event; /// /// The status that is returned to the caller at the end of the operation /// to indicate whether this operation completed successfully. /// - EFI_STATUS Status; + EFI_STATUS Status; union { /// /// When this token is used for receiving, RxData is a pointer to the EFI_IP4_RECEIVE_DATA. /// - EFI_IP4_RECEIVE_DATA *RxData; + EFI_IP4_RECEIVE_DATA *RxData; /// /// When this token is used for transmitting, TxData is a pointer to the EFI_IP4_TRANSMIT_DATA. /// - EFI_IP4_TRANSMIT_DATA *TxData; + EFI_IP4_TRANSMIT_DATA *TxData; } Packet; } EFI_IP4_COMPLETION_TOKEN; @@ -590,17 +586,17 @@ EFI_STATUS /// used by drivers, daemons, and applications to transmit and receive network packets. /// struct _EFI_IP4_PROTOCOL { - EFI_IP4_GET_MODE_DATA GetModeData; - EFI_IP4_CONFIGURE Configure; - EFI_IP4_GROUPS Groups; - EFI_IP4_ROUTES Routes; - EFI_IP4_TRANSMIT Transmit; - EFI_IP4_RECEIVE Receive; - EFI_IP4_CANCEL Cancel; - EFI_IP4_POLL Poll; + EFI_IP4_GET_MODE_DATA GetModeData; + EFI_IP4_CONFIGURE Configure; + EFI_IP4_GROUPS Groups; + EFI_IP4_ROUTES Routes; + EFI_IP4_TRANSMIT Transmit; + EFI_IP4_RECEIVE Receive; + EFI_IP4_CANCEL Cancel; + EFI_IP4_POLL Poll; }; -extern EFI_GUID gEfiIp4ServiceBindingProtocolGuid; -extern EFI_GUID gEfiIp4ProtocolGuid; +extern EFI_GUID gEfiIp4ServiceBindingProtocolGuid; +extern EFI_GUID gEfiIp4ProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Ip4Config.h b/MdePkg/Include/Protocol/Ip4Config.h index 08e716c..89b07e4 100644 --- a/MdePkg/Include/Protocol/Ip4Config.h +++ b/MdePkg/Include/Protocol/Ip4Config.h @@ -9,6 +9,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent This Protocol is introduced in UEFI Specification 2.0. **/ + #ifndef __EFI_IP4CONFIG_PROTOCOL_H__ #define __EFI_IP4CONFIG_PROTOCOL_H__ @@ -36,23 +37,22 @@ typedef struct { /// /// Default station IP address, stored in network byte order. /// - EFI_IPv4_ADDRESS StationAddress; + EFI_IPv4_ADDRESS StationAddress; /// /// Default subnet mask, stored in network byte order. /// - EFI_IPv4_ADDRESS SubnetMask; + EFI_IPv4_ADDRESS SubnetMask; /// /// Number of entries in the following RouteTable. May be zero. /// - UINT32 RouteTableSize; + UINT32 RouteTableSize; /// /// Default routing table data (stored in network byte order). /// Ignored if RouteTableSize is zero. /// - EFI_IP4_ROUTE_TABLE *RouteTable; + EFI_IP4_ROUTE_TABLE *RouteTable; } EFI_IP4_IPCONFIG_DATA; - /** Starts running the configuration policy for the EFI IPv4 Protocol driver. @@ -166,11 +166,11 @@ EFI_STATUS /// configurations for the EFI IPv4 Protocol driver. /// struct _EFI_IP4_CONFIG_PROTOCOL { - EFI_IP4_CONFIG_START Start; - EFI_IP4_CONFIG_STOP Stop; - EFI_IP4_CONFIG_GET_DATA GetData; + EFI_IP4_CONFIG_START Start; + EFI_IP4_CONFIG_STOP Stop; + EFI_IP4_CONFIG_GET_DATA GetData; }; -extern EFI_GUID gEfiIp4ConfigProtocolGuid; +extern EFI_GUID gEfiIp4ConfigProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Ip4Config2.h b/MdePkg/Include/Protocol/Ip4Config2.h index 7ba2d6c..b824567 100644 --- a/MdePkg/Include/Protocol/Ip4Config2.h +++ b/MdePkg/Include/Protocol/Ip4Config2.h @@ -9,6 +9,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent This Protocol is introduced in UEFI Specification 2.5 **/ + #ifndef __EFI_IP4CONFIG2_PROTOCOL_H__ #define __EFI_IP4CONFIG2_PROTOCOL_H__ @@ -21,7 +22,6 @@ This Protocol is introduced in UEFI Specification 2.5 typedef struct _EFI_IP4_CONFIG2_PROTOCOL EFI_IP4_CONFIG2_PROTOCOL; - /// /// EFI_IP4_CONFIG2_DATA_TYPE /// @@ -78,7 +78,7 @@ typedef enum { /// /// EFI_IP4_CONFIG2_INTERFACE_INFO related definitions /// -#define EFI_IP4_CONFIG2_INTERFACE_INFO_NAME_SIZE 32 +#define EFI_IP4_CONFIG2_INTERFACE_INFO_NAME_SIZE 32 /// /// EFI_IP4_CONFIG2_INTERFACE_INFO @@ -87,32 +87,32 @@ typedef struct { /// /// The name of the interface. It is a NULL-terminated Unicode string. /// - CHAR16 Name[EFI_IP4_CONFIG2_INTERFACE_INFO_NAME_SIZE]; + CHAR16 Name[EFI_IP4_CONFIG2_INTERFACE_INFO_NAME_SIZE]; /// /// The interface type of the network interface. See RFC 1700, /// section "Number Hardware Type". /// - UINT8 IfType; + UINT8 IfType; /// /// The size, in bytes, of the network interface's hardware address. /// - UINT32 HwAddressSize; + UINT32 HwAddressSize; /// /// The hardware address for the network interface. /// - EFI_MAC_ADDRESS HwAddress; + EFI_MAC_ADDRESS HwAddress; /// /// The station IPv4 address of this EFI IPv4 network stack. /// - EFI_IPv4_ADDRESS StationAddress; + EFI_IPv4_ADDRESS StationAddress; /// /// The subnet address mask that is associated with the station address. /// - EFI_IPv4_ADDRESS SubnetMask; + EFI_IPv4_ADDRESS SubnetMask; /// /// Size of the following RouteTable, in bytes. May be zero. /// - UINT32 RouteTableSize; + UINT32 RouteTableSize; /// /// The route table of the IPv4 network stack runs on this interface. /// Set to NULL if RouteTableSize is zero. Type EFI_IP4_ROUTE_TABLE is defined in @@ -150,11 +150,11 @@ typedef struct { /// /// The IPv4 unicast address. /// - EFI_IPv4_ADDRESS Address; + EFI_IPv4_ADDRESS Address; /// /// The subnet mask. /// - EFI_IPv4_ADDRESS SubnetMask; + EFI_IPv4_ADDRESS SubnetMask; } EFI_IP4_CONFIG2_MANUAL_ADDRESS; /** @@ -200,7 +200,7 @@ typedef struct { **/ typedef EFI_STATUS -(EFIAPI *EFI_IP4_CONFIG2_SET_DATA) ( +(EFIAPI *EFI_IP4_CONFIG2_SET_DATA)( IN EFI_IP4_CONFIG2_PROTOCOL *This, IN EFI_IP4_CONFIG2_DATA_TYPE DataType, IN UINTN DataSize, @@ -242,7 +242,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_IP4_CONFIG2_GET_DATA) ( +(EFIAPI *EFI_IP4_CONFIG2_GET_DATA)( IN EFI_IP4_CONFIG2_PROTOCOL *This, IN EFI_IP4_CONFIG2_DATA_TYPE DataType, IN OUT UINTN *DataSize, @@ -271,7 +271,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_IP4_CONFIG2_REGISTER_NOTIFY) ( +(EFIAPI *EFI_IP4_CONFIG2_REGISTER_NOTIFY)( IN EFI_IP4_CONFIG2_PROTOCOL *This, IN EFI_IP4_CONFIG2_DATA_TYPE DataType, IN EFI_EVENT Event @@ -292,7 +292,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_IP4_CONFIG2_UNREGISTER_NOTIFY) ( +(EFIAPI *EFI_IP4_CONFIG2_UNREGISTER_NOTIFY)( IN EFI_IP4_CONFIG2_PROTOCOL *This, IN EFI_IP4_CONFIG2_DATA_TYPE DataType, IN EFI_EVENT Event @@ -305,13 +305,12 @@ EFI_STATUS /// the EFI IPv4 network stack runs on. /// struct _EFI_IP4_CONFIG2_PROTOCOL { - EFI_IP4_CONFIG2_SET_DATA SetData; - EFI_IP4_CONFIG2_GET_DATA GetData; - EFI_IP4_CONFIG2_REGISTER_NOTIFY RegisterDataNotify; - EFI_IP4_CONFIG2_UNREGISTER_NOTIFY UnregisterDataNotify; + EFI_IP4_CONFIG2_SET_DATA SetData; + EFI_IP4_CONFIG2_GET_DATA GetData; + EFI_IP4_CONFIG2_REGISTER_NOTIFY RegisterDataNotify; + EFI_IP4_CONFIG2_UNREGISTER_NOTIFY UnregisterDataNotify; }; -extern EFI_GUID gEfiIp4Config2ProtocolGuid; +extern EFI_GUID gEfiIp4Config2ProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/Ip6.h b/MdePkg/Include/Protocol/Ip6.h index f432372..4aff36f 100644 --- a/MdePkg/Include/Protocol/Ip6.h +++ b/MdePkg/Include/Protocol/Ip6.h @@ -23,7 +23,6 @@ #include - #define EFI_IP6_SERVICE_BINDING_PROTOCOL_GUID \ { \ 0xec835dd3, 0xfe0f, 0x617b, {0xa6, 0x21, 0xb3, 0x50, 0xc3, 0xe1, 0x33, 0x88 } \ @@ -40,7 +39,7 @@ typedef struct _EFI_IP6_PROTOCOL EFI_IP6_PROTOCOL; /// EFI_IP6_ADDRESS_PAIR is deprecated in the UEFI 2.4B and should not be used any more. /// The definition in here is only present to provide backwards compatability. /// -typedef struct{ +typedef struct { /// /// The EFI IPv6 Protocol instance handle that is using this address/prefix pair. /// @@ -78,57 +77,57 @@ typedef struct { /// ICMPv6 type definitions for error messages /// ///@{ -#define ICMP_V6_DEST_UNREACHABLE 0x1 -#define ICMP_V6_PACKET_TOO_BIG 0x2 -#define ICMP_V6_TIME_EXCEEDED 0x3 -#define ICMP_V6_PARAMETER_PROBLEM 0x4 +#define ICMP_V6_DEST_UNREACHABLE 0x1 +#define ICMP_V6_PACKET_TOO_BIG 0x2 +#define ICMP_V6_TIME_EXCEEDED 0x3 +#define ICMP_V6_PARAMETER_PROBLEM 0x4 ///@} /// /// ICMPv6 type definition for informational messages /// ///@{ -#define ICMP_V6_ECHO_REQUEST 0x80 -#define ICMP_V6_ECHO_REPLY 0x81 -#define ICMP_V6_LISTENER_QUERY 0x82 -#define ICMP_V6_LISTENER_REPORT 0x83 -#define ICMP_V6_LISTENER_DONE 0x84 -#define ICMP_V6_ROUTER_SOLICIT 0x85 -#define ICMP_V6_ROUTER_ADVERTISE 0x86 -#define ICMP_V6_NEIGHBOR_SOLICIT 0x87 -#define ICMP_V6_NEIGHBOR_ADVERTISE 0x88 -#define ICMP_V6_REDIRECT 0x89 -#define ICMP_V6_LISTENER_REPORT_2 0x8F +#define ICMP_V6_ECHO_REQUEST 0x80 +#define ICMP_V6_ECHO_REPLY 0x81 +#define ICMP_V6_LISTENER_QUERY 0x82 +#define ICMP_V6_LISTENER_REPORT 0x83 +#define ICMP_V6_LISTENER_DONE 0x84 +#define ICMP_V6_ROUTER_SOLICIT 0x85 +#define ICMP_V6_ROUTER_ADVERTISE 0x86 +#define ICMP_V6_NEIGHBOR_SOLICIT 0x87 +#define ICMP_V6_NEIGHBOR_ADVERTISE 0x88 +#define ICMP_V6_REDIRECT 0x89 +#define ICMP_V6_LISTENER_REPORT_2 0x8F ///@} /// /// ICMPv6 code definitions for ICMP_V6_DEST_UNREACHABLE /// ///@{ -#define ICMP_V6_NO_ROUTE_TO_DEST 0x0 -#define ICMP_V6_COMM_PROHIBITED 0x1 -#define ICMP_V6_BEYOND_SCOPE 0x2 -#define ICMP_V6_ADDR_UNREACHABLE 0x3 -#define ICMP_V6_PORT_UNREACHABLE 0x4 -#define ICMP_V6_SOURCE_ADDR_FAILED 0x5 -#define ICMP_V6_ROUTE_REJECTED 0x6 +#define ICMP_V6_NO_ROUTE_TO_DEST 0x0 +#define ICMP_V6_COMM_PROHIBITED 0x1 +#define ICMP_V6_BEYOND_SCOPE 0x2 +#define ICMP_V6_ADDR_UNREACHABLE 0x3 +#define ICMP_V6_PORT_UNREACHABLE 0x4 +#define ICMP_V6_SOURCE_ADDR_FAILED 0x5 +#define ICMP_V6_ROUTE_REJECTED 0x6 ///@} /// /// ICMPv6 code definitions for ICMP_V6_TIME_EXCEEDED /// ///@{ -#define ICMP_V6_TIMEOUT_HOP_LIMIT 0x0 -#define ICMP_V6_TIMEOUT_REASSEMBLE 0x1 +#define ICMP_V6_TIMEOUT_HOP_LIMIT 0x0 +#define ICMP_V6_TIMEOUT_REASSEMBLE 0x1 ///@} /// /// ICMPv6 code definitions for ICMP_V6_PARAMETER_PROBLEM /// ///@{ -#define ICMP_V6_ERRONEOUS_HEADER 0x0 -#define ICMP_V6_UNRECOGNIZE_NEXT_HDR 0x1 -#define ICMP_V6_UNRECOGNIZE_OPTION 0x2 +#define ICMP_V6_ERRONEOUS_HEADER 0x0 +#define ICMP_V6_UNRECOGNIZE_NEXT_HDR 0x1 +#define ICMP_V6_UNRECOGNIZE_OPTION 0x2 ///@} /// @@ -142,7 +141,7 @@ typedef struct { /// the IPv6 header if there are no extension headers. Ignored when /// AcceptPromiscuous is TRUE. /// - UINT8 DefaultProtocol; + UINT8 DefaultProtocol; /// /// Set to TRUE to receive all IPv6 packets that get through the /// receive filters. @@ -150,23 +149,23 @@ typedef struct { /// packets that get through the receive filters. Ignored when /// AcceptPromiscuous is TRUE. /// - BOOLEAN AcceptAnyProtocol; + BOOLEAN AcceptAnyProtocol; /// /// Set to TRUE to receive ICMP error report packets. Ignored when /// AcceptPromiscuous or AcceptAnyProtocol is TRUE. /// - BOOLEAN AcceptIcmpErrors; + BOOLEAN AcceptIcmpErrors; /// /// Set to TRUE to receive all IPv6 packets that are sent to any /// hardware address or any protocol address. Set to FALSE to stop /// receiving all promiscuous IPv6 packets. /// - BOOLEAN AcceptPromiscuous; + BOOLEAN AcceptPromiscuous; /// /// The destination address of the packets that will be transmitted. /// Ignored if it is unspecified. /// - EFI_IPv6_ADDRESS DestinationAddress; + EFI_IPv6_ADDRESS DestinationAddress; /// /// The station IPv6 address that will be assigned to this EFI IPv6 /// Protocol instance. This field can be set and changed only when @@ -186,41 +185,41 @@ typedef struct { /// only be successfully bound to this EFI IPv6 protocol instance /// after IP6ModeData.IsConfigured changed to TRUE. /// - EFI_IPv6_ADDRESS StationAddress; + EFI_IPv6_ADDRESS StationAddress; /// /// TrafficClass field in transmitted IPv6 packets. Default value /// is zero. /// - UINT8 TrafficClass; + UINT8 TrafficClass; /// /// HopLimit field in transmitted IPv6 packets. /// - UINT8 HopLimit; + UINT8 HopLimit; /// /// FlowLabel field in transmitted IPv6 packets. Default value is /// zero. /// - UINT32 FlowLabel; + UINT32 FlowLabel; /// /// The timer timeout value (number of microseconds) for the /// receive timeout event to be associated with each assembled /// packet. Zero means do not drop assembled packets. /// - UINT32 ReceiveTimeout; + UINT32 ReceiveTimeout; /// /// The timer timeout value (number of microseconds) for the /// transmit timeout event to be associated with each outgoing /// packet. Zero means do not drop outgoing packets. /// - UINT32 TransmitTimeout; + UINT32 TransmitTimeout; } EFI_IP6_CONFIG_DATA; /// /// EFI_IP6_ADDRESS_INFO /// typedef struct { - EFI_IPv6_ADDRESS Address; ///< The IPv6 address. - UINT8 PrefixLength; ///< The length of the prefix associated with the Address. + EFI_IPv6_ADDRESS Address; ///< The IPv6 address. + UINT8 PrefixLength; ///< The length of the prefix associated with the Address. } EFI_IP6_ADDRESS_INFO; /// @@ -233,15 +232,15 @@ typedef struct { /// packets to this prefix. If the IPv6 address is all zeros, then the /// prefix is on-link. /// - EFI_IPv6_ADDRESS Gateway; + EFI_IPv6_ADDRESS Gateway; /// /// The destination prefix to be routed. /// - EFI_IPv6_ADDRESS Destination; + EFI_IPv6_ADDRESS Destination; /// /// The length of the prefix associated with the Destination. /// - UINT8 PrefixLength; + UINT8 PrefixLength; } EFI_IP6_ROUTE_TABLE; /// @@ -261,9 +260,9 @@ typedef enum { /// EfiNeighborReachable, /// - ///Reachable Time has elapsed since the last positive confirmation - ///was received. In this state, the forward path to the neighbor was - ///functioning properly. + /// Reachable Time has elapsed since the last positive confirmation + /// was received. In this state, the forward path to the neighbor was + /// functioning properly. /// EfiNeighborStale, /// @@ -285,9 +284,9 @@ typedef enum { /// of entries about individual neighbors to which traffic has been sent recently. /// typedef struct { - EFI_IPv6_ADDRESS Neighbor; ///< The on-link unicast/anycast IP address of the neighbor. - EFI_MAC_ADDRESS LinkAddress; ///< Link-layer address of the neighbor. - EFI_IP6_NEIGHBOR_STATE State; ///< State of this neighbor cache entry. + EFI_IPv6_ADDRESS Neighbor; ///< The on-link unicast/anycast IP address of the neighbor. + EFI_MAC_ADDRESS LinkAddress; ///< Link-layer address of the neighbor. + EFI_IP6_NEIGHBOR_STATE State; ///< State of this neighbor cache entry. } EFI_IP6_NEIGHBOR_CACHE; /// @@ -296,8 +295,8 @@ typedef struct { /// IPv6 Protocol driver. /// typedef struct { - UINT8 Type; ///< The type of ICMP message. - UINT8 Code; ///< The code of the ICMP message. + UINT8 Type; ///< The type of ICMP message. + UINT8 Code; ///< The code of the ICMP message. } EFI_IP6_ICMP_TYPE; /// @@ -309,82 +308,82 @@ typedef struct { /// All other fields in this structure are undefined until this field is TRUE. /// Set to FALSE when the EFI IPv6 Protocol instance is stopped. /// - BOOLEAN IsStarted; + BOOLEAN IsStarted; /// /// The maximum packet size, in bytes, of the packet which the upper layer driver could feed. /// - UINT32 MaxPacketSize; + UINT32 MaxPacketSize; /// /// Current configuration settings. Undefined until IsStarted is TRUE. /// - EFI_IP6_CONFIG_DATA ConfigData; + EFI_IP6_CONFIG_DATA ConfigData; /// /// Set to TRUE when the EFI IPv6 Protocol instance is configured. /// The instance is configured when it has a station address and /// corresponding prefix length. /// Set to FALSE when the EFI IPv6 Protocol instance is not configured. /// - BOOLEAN IsConfigured; + BOOLEAN IsConfigured; /// /// Number of configured IPv6 addresses on this interface. /// - UINT32 AddressCount; + UINT32 AddressCount; /// /// List of currently configured IPv6 addresses and corresponding /// prefix lengths assigned to this interface. It is caller's /// responsibility to free this buffer. /// - EFI_IP6_ADDRESS_INFO *AddressList; + EFI_IP6_ADDRESS_INFO *AddressList; /// /// Number of joined multicast groups. Undefined until /// IsConfigured is TRUE. /// - UINT32 GroupCount; + UINT32 GroupCount; /// /// List of joined multicast group addresses. It is caller's /// responsibility to free this buffer. Undefined until /// IsConfigured is TRUE. /// - EFI_IPv6_ADDRESS *GroupTable; + EFI_IPv6_ADDRESS *GroupTable; /// /// Number of entries in the routing table. Undefined until /// IsConfigured is TRUE. /// - UINT32 RouteCount; + UINT32 RouteCount; /// /// Routing table entries. It is caller's responsibility to free this buffer. /// - EFI_IP6_ROUTE_TABLE *RouteTable; + EFI_IP6_ROUTE_TABLE *RouteTable; /// /// Number of entries in the neighbor cache. Undefined until /// IsConfigured is TRUE. /// - UINT32 NeighborCount; + UINT32 NeighborCount; /// /// Neighbor cache entries. It is caller's responsibility to free this /// buffer. Undefined until IsConfigured is TRUE. /// - EFI_IP6_NEIGHBOR_CACHE *NeighborCache; + EFI_IP6_NEIGHBOR_CACHE *NeighborCache; /// /// Number of entries in the prefix table. Undefined until /// IsConfigured is TRUE. /// - UINT32 PrefixCount; + UINT32 PrefixCount; /// /// On-link Prefix table entries. It is caller's responsibility to free this /// buffer. Undefined until IsConfigured is TRUE. /// - EFI_IP6_ADDRESS_INFO *PrefixTable; + EFI_IP6_ADDRESS_INFO *PrefixTable; /// /// Number of entries in the supported ICMP types list. /// - UINT32 IcmpTypeCount; + UINT32 IcmpTypeCount; /// /// Array of ICMP types and codes that are supported by this EFI /// IPv6 Protocol driver. It is caller's responsibility to free this /// buffer. /// - EFI_IP6_ICMP_TYPE *IcmpTypeList; + EFI_IP6_ICMP_TYPE *IcmpTypeList; } EFI_IP6_MODE_DATA; /// @@ -394,16 +393,16 @@ typedef struct { /// #pragma pack(1) typedef struct _EFI_IP6_HEADER { - UINT8 TrafficClassH:4; - UINT8 Version:4; - UINT8 FlowLabelH:4; - UINT8 TrafficClassL:4; - UINT16 FlowLabelL; - UINT16 PayloadLength; - UINT8 NextHeader; - UINT8 HopLimit; - EFI_IPv6_ADDRESS SourceAddress; - EFI_IPv6_ADDRESS DestinationAddress; + UINT8 TrafficClassH : 4; + UINT8 Version : 4; + UINT8 FlowLabelH : 4; + UINT8 TrafficClassL : 4; + UINT16 FlowLabelL; + UINT16 PayloadLength; + UINT8 NextHeader; + UINT8 HopLimit; + EFI_IPv6_ADDRESS SourceAddress; + EFI_IPv6_ADDRESS DestinationAddress; } EFI_IP6_HEADER; #pragma pack() @@ -413,8 +412,8 @@ typedef struct _EFI_IP6_HEADER { /// fragment to transmit or that has been received. /// typedef struct _EFI_IP6_FRAGMENT_DATA { - UINT32 FragmentLength; ///< Length of fragment data. This field may not be set to zero. - VOID *FragmentBuffer; ///< Pointer to fragment data. This field may not be set to NULL. + UINT32 FragmentLength; ///< Length of fragment data. This field may not be set to zero. + VOID *FragmentBuffer; ///< Pointer to fragment data. This field may not be set to NULL. } EFI_IP6_FRAGMENT_DATA; /// @@ -425,36 +424,36 @@ typedef struct _EFI_IP6_RECEIVE_DATA { /// Time when the EFI IPv6 Protocol driver accepted the packet. /// Ignored if it is zero. /// - EFI_TIME TimeStamp; + EFI_TIME TimeStamp; /// /// After this event is signaled, the receive data structure is released /// and must not be referenced. /// - EFI_EVENT RecycleSignal; + EFI_EVENT RecycleSignal; /// - ///Length of the IPv6 packet headers, including both the IPv6 - ///header and any extension headers. + /// Length of the IPv6 packet headers, including both the IPv6 + /// header and any extension headers. /// - UINT32 HeaderLength; + UINT32 HeaderLength; /// /// Pointer to the IPv6 packet header. If the IPv6 packet was /// fragmented, this argument is a pointer to the header in the first /// fragment. /// - EFI_IP6_HEADER *Header; + EFI_IP6_HEADER *Header; /// /// Sum of the lengths of IPv6 packet buffers in FragmentTable. May /// be zero. /// - UINT32 DataLength; + UINT32 DataLength; /// /// Number of IPv6 payload fragments. May be zero. /// - UINT32 FragmentCount; + UINT32 FragmentCount; /// /// Array of payload fragment lengths and buffer pointers. /// - EFI_IP6_FRAGMENT_DATA FragmentTable[1]; + EFI_IP6_FRAGMENT_DATA FragmentTable[1]; } EFI_IP6_RECEIVE_DATA; /// @@ -463,9 +462,9 @@ typedef struct _EFI_IP6_RECEIVE_DATA { /// default parameters or settings for one Transmit() function call. /// typedef struct _EFI_IP6_OVERRIDE_DATA { - UINT8 Protocol; ///< Protocol type override. - UINT8 HopLimit; ///< Hop-Limit override. - UINT32 FlowLabel; ///< Flow-Label override. + UINT8 Protocol; ///< Protocol type override. + UINT8 HopLimit; ///< Hop-Limit override. + UINT32 FlowLabel; ///< Flow-Label override. } EFI_IP6_OVERRIDE_DATA; /// @@ -476,39 +475,39 @@ typedef struct _EFI_IP6_TRANSMIT_DATA { /// The destination IPv6 address. If it is unspecified, /// ConfigData.DestinationAddress will be used instead. /// - EFI_IPv6_ADDRESS DestinationAddress; + EFI_IPv6_ADDRESS DestinationAddress; /// /// If not NULL, the IPv6 transmission control override data. /// - EFI_IP6_OVERRIDE_DATA *OverrideData; + EFI_IP6_OVERRIDE_DATA *OverrideData; /// /// Total length in byte of the IPv6 extension headers specified in /// ExtHdrs. /// - UINT32 ExtHdrsLength; + UINT32 ExtHdrsLength; /// /// Pointer to the IPv6 extension headers. The IP layer will append /// the required extension headers if they are not specified by /// ExtHdrs. Ignored if ExtHdrsLength is zero. /// - VOID *ExtHdrs; + VOID *ExtHdrs; /// /// The protocol of first extension header in ExtHdrs. Ignored if /// ExtHdrsLength is zero. /// - UINT8 NextHeader; + UINT8 NextHeader; /// /// Total length in bytes of the FragmentTable data to transmit. /// - UINT32 DataLength; + UINT32 DataLength; /// /// Number of entries in the fragment data table. /// - UINT32 FragmentCount; + UINT32 FragmentCount; /// /// Start of the fragment data table. /// - EFI_IP6_FRAGMENT_DATA FragmentTable[1]; + EFI_IP6_FRAGMENT_DATA FragmentTable[1]; } EFI_IP6_TRANSMIT_DATA; /// @@ -520,7 +519,7 @@ typedef struct { /// This Event will be signaled after the Status field is updated by /// the EFI IPv6 Protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL. /// - EFI_EVENT Event; + EFI_EVENT Event; /// /// Will be set to one of the following values: /// - EFI_SUCCESS: The receive or transmit completed @@ -534,16 +533,16 @@ typedef struct { /// failed because of an IPsec policy check. /// - EFI_NO_MEDIA: There was a media error. /// - EFI_STATUS Status; + EFI_STATUS Status; union { /// /// When the Token is used for receiving, RxData is a pointer to the EFI_IP6_RECEIVE_DATA. /// - EFI_IP6_RECEIVE_DATA *RxData; + EFI_IP6_RECEIVE_DATA *RxData; /// /// When the Token is used for transmitting, TxData is a pointer to the EFI_IP6_TRANSMIT_DATA. /// - EFI_IP6_TRANSMIT_DATA *TxData; + EFI_IP6_TRANSMIT_DATA *TxData; } Packet; } EFI_IP6_COMPLETION_TOKEN; @@ -930,18 +929,18 @@ EFI_STATUS /// used by drivers, daemons, and applications to transmit and receive network packets. /// struct _EFI_IP6_PROTOCOL { - EFI_IP6_GET_MODE_DATA GetModeData; - EFI_IP6_CONFIGURE Configure; - EFI_IP6_GROUPS Groups; - EFI_IP6_ROUTES Routes; - EFI_IP6_NEIGHBORS Neighbors; - EFI_IP6_TRANSMIT Transmit; - EFI_IP6_RECEIVE Receive; - EFI_IP6_CANCEL Cancel; - EFI_IP6_POLL Poll; + EFI_IP6_GET_MODE_DATA GetModeData; + EFI_IP6_CONFIGURE Configure; + EFI_IP6_GROUPS Groups; + EFI_IP6_ROUTES Routes; + EFI_IP6_NEIGHBORS Neighbors; + EFI_IP6_TRANSMIT Transmit; + EFI_IP6_RECEIVE Receive; + EFI_IP6_CANCEL Cancel; + EFI_IP6_POLL Poll; }; -extern EFI_GUID gEfiIp6ServiceBindingProtocolGuid; -extern EFI_GUID gEfiIp6ProtocolGuid; +extern EFI_GUID gEfiIp6ServiceBindingProtocolGuid; +extern EFI_GUID gEfiIp6ProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Ip6Config.h b/MdePkg/Include/Protocol/Ip6Config.h index 7fcfa27..b755b93 100644 --- a/MdePkg/Include/Protocol/Ip6Config.h +++ b/MdePkg/Include/Protocol/Ip6Config.h @@ -6,6 +6,7 @@ Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ + #ifndef __EFI_IP6CONFIG_PROTOCOL_H__ #define __EFI_IP6CONFIG_PROTOCOL_H__ @@ -102,39 +103,39 @@ typedef struct { /// /// The name of the interface. It is a NULL-terminated string. /// - CHAR16 Name[32]; + CHAR16 Name[32]; /// /// The interface type of the network interface. /// - UINT8 IfType; + UINT8 IfType; /// /// The size, in bytes, of the network interface's hardware address. /// - UINT32 HwAddressSize; + UINT32 HwAddressSize; /// /// The hardware address for the network interface. /// - EFI_MAC_ADDRESS HwAddress; + EFI_MAC_ADDRESS HwAddress; /// /// Number of EFI_IP6_ADDRESS_INFO structures pointed to by AddressInfo. /// - UINT32 AddressInfoCount; + UINT32 AddressInfoCount; /// /// Pointer to an array of EFI_IP6_ADDRESS_INFO instances /// which contain the local IPv6 addresses and the corresponding /// prefix length information. Set to NULL if AddressInfoCount /// is zero. /// - EFI_IP6_ADDRESS_INFO *AddressInfo; + EFI_IP6_ADDRESS_INFO *AddressInfo; /// /// Number of route table entries in the following RouteTable. /// - UINT32 RouteCount; + UINT32 RouteCount; /// /// The route table of the IPv6 network stack runs on this interface. /// Set to NULL if RouteCount is zero. /// - EFI_IP6_ROUTE_TABLE *RouteTable; + EFI_IP6_ROUTE_TABLE *RouteTable; } EFI_IP6_CONFIG_INTERFACE_INFO; /// @@ -142,7 +143,7 @@ typedef struct { /// describes the 64-bit interface ID. /// typedef struct { - UINT8 Id[8]; + UINT8 Id[8]; } EFI_IP6_CONFIG_INTERFACE_ID; /// @@ -190,12 +191,11 @@ typedef struct { /// stack manually when the policy is Ip6ConfigPolicyManual. /// typedef struct { - EFI_IPv6_ADDRESS Address; ///< The IPv6 unicast address. - BOOLEAN IsAnycast; ///< Set to TRUE if Address is anycast. - UINT8 PrefixLength; ///< The length, in bits, of the prefix associated with this Address. + EFI_IPv6_ADDRESS Address; ///< The IPv6 unicast address. + BOOLEAN IsAnycast; ///< Set to TRUE if Address is anycast. + UINT8 PrefixLength; ///< The length, in bits, of the prefix associated with this Address. } EFI_IP6_CONFIG_MANUAL_ADDRESS; - /** Set the configuration for the EFI IPv6 network stack running on the communication device this EFI IPv6 Configuration Protocol instance manages. @@ -356,13 +356,12 @@ EFI_STATUS /// types of configurations for the EFI IPv6 network stack. /// struct _EFI_IP6_CONFIG_PROTOCOL { - EFI_IP6_CONFIG_SET_DATA SetData; - EFI_IP6_CONFIG_GET_DATA GetData; - EFI_IP6_CONFIG_REGISTER_NOTIFY RegisterDataNotify; - EFI_IP6_CONFIG_UNREGISTER_NOTIFY UnregisterDataNotify; + EFI_IP6_CONFIG_SET_DATA SetData; + EFI_IP6_CONFIG_GET_DATA GetData; + EFI_IP6_CONFIG_REGISTER_NOTIFY RegisterDataNotify; + EFI_IP6_CONFIG_UNREGISTER_NOTIFY UnregisterDataNotify; }; -extern EFI_GUID gEfiIp6ConfigProtocolGuid; +extern EFI_GUID gEfiIp6ConfigProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/IpSec.h b/MdePkg/Include/Protocol/IpSec.h index a78010b..0b5d55a 100644 --- a/MdePkg/Include/Protocol/IpSec.h +++ b/MdePkg/Include/Protocol/IpSec.h @@ -33,19 +33,18 @@ 0xa3979e64, 0xace8, 0x4ddc, {0xbc, 0x7, 0x4d, 0x66, 0xb8, 0xfd, 0x9, 0x77 } \ } -typedef struct _EFI_IPSEC_PROTOCOL EFI_IPSEC_PROTOCOL; -typedef struct _EFI_IPSEC2_PROTOCOL EFI_IPSEC2_PROTOCOL; +typedef struct _EFI_IPSEC_PROTOCOL EFI_IPSEC_PROTOCOL; +typedef struct _EFI_IPSEC2_PROTOCOL EFI_IPSEC2_PROTOCOL; /// /// EFI_IPSEC_FRAGMENT_DATA /// defines the instances of packet fragments. /// typedef struct _EFI_IPSEC_FRAGMENT_DATA { - UINT32 FragmentLength; - VOID *FragmentBuffer; + UINT32 FragmentLength; + VOID *FragmentBuffer; } EFI_IPSEC_FRAGMENT_DATA; - /** Handles IPsec packet processing for inbound and outbound IP packets. @@ -83,7 +82,7 @@ EFI_STATUS IN OUT EFI_IPSEC_FRAGMENT_DATA **FragmentTable, IN UINT32 *FragmentCount, IN EFI_IPSEC_TRAFFIC_DIR TrafficDirection, - OUT EFI_EVENT *RecycleSignal + OUT EFI_EVENT *RecycleSignal ); /// @@ -95,9 +94,9 @@ EFI_STATUS // and IPv6 environment. /// struct _EFI_IPSEC_PROTOCOL { - EFI_IPSEC_PROCESS Process; ///< Handle the IPsec message. - EFI_EVENT DisabledEvent; ///< Event signaled when the interface is disabled. - BOOLEAN DisabledFlag; ///< State of the interface. + EFI_IPSEC_PROCESS Process; ///< Handle the IPsec message. + EFI_EVENT DisabledEvent; ///< Event signaled when the interface is disabled. + BOOLEAN DisabledFlag; ///< State of the interface. }; /** @@ -185,7 +184,7 @@ struct _EFI_IPSEC_PROTOCOL { **/ typedef EFI_STATUS -(EFIAPI *EFI_IPSEC_PROCESSEXT) ( +(EFIAPI *EFI_IPSEC_PROCESSEXT)( IN EFI_IPSEC2_PROTOCOL *This, IN EFI_HANDLE NicHandle, IN UINT8 IpVer, @@ -196,7 +195,7 @@ EFI_STATUS IN OUT EFI_IPSEC_FRAGMENT_DATA **FragmentTable, IN OUT UINT32 *FragmentCount, IN EFI_IPSEC_TRAFFIC_DIR TrafficDirection, - OUT EFI_EVENT *RecycleSignal + OUT EFI_EVENT *RecycleSignal ); /// @@ -208,11 +207,11 @@ EFI_STATUS /// encrypting each IP packet in a data stream. /// struct _EFI_IPSEC2_PROTOCOL { -EFI_IPSEC_PROCESSEXT ProcessExt; -EFI_EVENT DisabledEvent; -BOOLEAN DisabledFlag; + EFI_IPSEC_PROCESSEXT ProcessExt; + EFI_EVENT DisabledEvent; + BOOLEAN DisabledFlag; }; -extern EFI_GUID gEfiIpSecProtocolGuid; -extern EFI_GUID gEfiIpSec2ProtocolGuid; +extern EFI_GUID gEfiIpSecProtocolGuid; +extern EFI_GUID gEfiIpSec2ProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/IpSecConfig.h b/MdePkg/Include/Protocol/IpSecConfig.h index 24d1b4d..7136060 100644 --- a/MdePkg/Include/Protocol/IpSecConfig.h +++ b/MdePkg/Include/Protocol/IpSecConfig.h @@ -14,7 +14,6 @@ #ifndef __EFI_IPSE_CCONFIG_PROTOCOL_H__ #define __EFI_IPSE_CCONFIG_PROTOCOL_H__ - #define EFI_IPSEC_CONFIG_PROTOCOL_GUID \ { \ 0xce5e5929, 0xc7a3, 0x4602, {0xad, 0x9e, 0xc9, 0xda, 0xf9, 0x4e, 0xbf, 0xcf } \ @@ -64,11 +63,10 @@ typedef enum { /// EFI_IP_ADDRESS_INFO /// typedef struct _EFI_IP_ADDRESS_INFO { - EFI_IP_ADDRESS Address; ///< The IPv4 or IPv6 address - UINT8 PrefixLength; ///< The length of the prefix associated with the Address. + EFI_IP_ADDRESS Address; ///< The IPv4 or IPv6 address + UINT8 PrefixLength; ///< The length of the prefix associated with the Address. } EFI_IP_ADDRESS_INFO; - /// /// EFI_IPSEC_SPD_SELECTOR /// @@ -76,52 +74,52 @@ typedef struct _EFI_IPSEC_SPD_SELECTOR { /// /// Specifies the actual number of entries in LocalAddress. /// - UINT32 LocalAddressCount; + UINT32 LocalAddressCount; /// /// A list of ranges of IPv4 or IPv6 addresses, which refers to the /// addresses being protected by IPsec policy. /// - EFI_IP_ADDRESS_INFO *LocalAddress; + EFI_IP_ADDRESS_INFO *LocalAddress; /// /// Specifies the actual number of entries in RemoteAddress. /// - UINT32 RemoteAddressCount; + UINT32 RemoteAddressCount; /// /// A list of ranges of IPv4 or IPv6 addresses, which are peer entities /// to LocalAddress. /// - EFI_IP_ADDRESS_INFO *RemoteAddress; + EFI_IP_ADDRESS_INFO *RemoteAddress; /// /// Next layer protocol. Obtained from the IPv4 Protocol or the IPv6 /// Next Header fields. The next layer protocol is whatever comes /// after any IP extension headers that are present. A zero value is a /// wildcard that matches any value in NextLayerProtocol field. /// - UINT16 NextLayerProtocol; + UINT16 NextLayerProtocol; /// /// Local Port if the Next Layer Protocol uses two ports (as do TCP, /// UDP, and others). A zero value is a wildcard that matches any /// value in LocalPort field. /// - UINT16 LocalPort; + UINT16 LocalPort; /// /// A designed port range size. The start port is LocalPort, and /// the total number of ports is described by LocalPortRange. /// This field is ignored if NextLayerProtocol does not use /// ports. /// - UINT16 LocalPortRange; + UINT16 LocalPortRange; /// /// Remote Port if the Next Layer Protocol uses two ports. A zero /// value is a wildcard that matches any value in RemotePort field. /// - UINT16 RemotePort; + UINT16 RemotePort; /// /// A designed port range size. The start port is RemotePort, and /// the total number of ports is described by RemotePortRange. /// This field is ignored if NextLayerProtocol does not use ports. /// - UINT16 RemotePortRange; + UINT16 RemotePortRange; } EFI_IPSEC_SPD_SELECTOR; /// @@ -179,17 +177,17 @@ typedef struct _EFI_IPSEC_SA_LIFETIME { /// AH, this is the authentication algorithm. The ByteCount /// includes pad bytes for cryptographic operations. /// - UINT64 ByteCount; + UINT64 ByteCount; /// /// A time interval in second that warns the implementation to /// initiate action such as setting up a replacement SA. /// - UINT64 SoftLifetime; + UINT64 SoftLifetime; /// /// A time interval in second when the current SA ends and is /// destroyed. /// - UINT64 HardLifetime; + UINT64 HardLifetime; } EFI_IPSEC_SA_LIFETIME; /// @@ -223,17 +221,17 @@ typedef struct _EFI_IPSEC_TUNNEL_OPTION { /// /// Local tunnel address when IPsec mode is EfiIPsecTunnel. /// - EFI_IP_ADDRESS LocalTunnelAddress; + EFI_IP_ADDRESS LocalTunnelAddress; /// /// Remote tunnel address when IPsec mode is EfiIPsecTunnel. /// - EFI_IP_ADDRESS RemoteTunnelAddress; + EFI_IP_ADDRESS RemoteTunnelAddress; /// /// The option of copying the DF bit from an outbound package /// to the tunnel mode header that it emits, when traffic is /// carried via a tunnel mode SA. /// - EFI_IPSEC_TUNNEL_DF_OPTION DF; + EFI_IPSEC_TUNNEL_DF_OPTION DF; } EFI_IPSEC_TUNNEL_OPTION; /// @@ -253,47 +251,47 @@ typedef struct _EFI_IPSEC_PROCESS_POLICY { /// Extended Sequence Number. Is this SA using extended sequence /// numbers. 64 bit counter is used if TRUE. /// - BOOLEAN ExtSeqNum; + BOOLEAN ExtSeqNum; /// /// A flag indicating whether overflow of the sequence number /// counter should generate an auditable event and prevent /// transmission of additional packets on the SA, or whether rollover /// is permitted. /// - BOOLEAN SeqOverflow; + BOOLEAN SeqOverflow; /// /// Is this SA using stateful fragment checking. TRUE represents /// stateful fragment checking. /// - BOOLEAN FragCheck; + BOOLEAN FragCheck; /// /// A time interval after which a SA must be replaced with a new SA /// (and new SPI) or terminated. /// - EFI_IPSEC_SA_LIFETIME SaLifetime; + EFI_IPSEC_SA_LIFETIME SaLifetime; /// /// IPsec mode: tunnel or transport. /// - EFI_IPSEC_MODE Mode; + EFI_IPSEC_MODE Mode; /// /// Tunnel Option. TunnelOption is ignored if Mode is EfiIPsecTransport. /// - EFI_IPSEC_TUNNEL_OPTION *TunnelOption; + EFI_IPSEC_TUNNEL_OPTION *TunnelOption; /// /// IPsec protocol: AH or ESP /// - EFI_IPSEC_PROTOCOL_TYPE Proto; + EFI_IPSEC_PROTOCOL_TYPE Proto; /// /// Cryptographic algorithm type used for authentication. /// - UINT8 AuthAlgoId; + UINT8 AuthAlgoId; /// /// Cryptographic algorithm type used for encryption. EncAlgo is /// NULL when IPsec protocol is AH. For ESP protocol, EncAlgo /// can also be used to describe the algorithm if a combined mode /// algorithm is used. /// - UINT8 EncAlgoId; + UINT8 EncAlgoId; } EFI_IPSEC_PROCESS_POLICY; /// @@ -306,19 +304,18 @@ typedef struct _EFI_IPSEC_SA_ID { /// that is used by a receiver to identity the SA to which an incoming /// package should be bound. /// - UINT32 Spi; + UINT32 Spi; /// /// IPsec protocol: AH or ESP /// - EFI_IPSEC_PROTOCOL_TYPE Proto; + EFI_IPSEC_PROTOCOL_TYPE Proto; /// /// Destination IP address. /// - EFI_IP_ADDRESS DestAddress; + EFI_IP_ADDRESS DestAddress; } EFI_IPSEC_SA_ID; - -#define MAX_PEERID_LEN 128 +#define MAX_PEERID_LEN 128 /// /// EFI_IPSEC_SPD_DATA @@ -328,7 +325,7 @@ typedef struct _EFI_IPSEC_SPD_DATA { /// A null-terminated ASCII name string which is used as a symbolic /// identifier for an IPsec Local or Remote address. /// - UINT8 Name[MAX_PEERID_LEN]; + UINT8 Name[MAX_PEERID_LEN]; /// /// Bit-mapped list describing Populate from Packet flags. When /// creating a SA, if PackageFlag bit is set to TRUE, instantiate @@ -344,29 +341,29 @@ typedef struct _EFI_IPSEC_SPD_DATA { /// Bit 4: EFI_IPSEC_SPD_SELECTOR.RemotePort /// Others: Reserved. /// - UINT32 PackageFlag; + UINT32 PackageFlag; /// /// The traffic direction of data gram. /// - EFI_IPSEC_TRAFFIC_DIR TrafficDirection; + EFI_IPSEC_TRAFFIC_DIR TrafficDirection; /// /// Processing choices to indicate which action is required by this /// policy. /// - EFI_IPSEC_ACTION Action; + EFI_IPSEC_ACTION Action; /// /// The policy and rule information for a SPD entry. /// - EFI_IPSEC_PROCESS_POLICY *ProcessingPolicy; + EFI_IPSEC_PROCESS_POLICY *ProcessingPolicy; /// /// Specifies the actual number of entries in SaId list. /// - UINTN SaIdCount; + UINTN SaIdCount; /// /// The SAD entry used for the traffic processing. The /// existed SAD entry links indicate this is the manual key case. /// - EFI_IPSEC_SA_ID SaId[1]; + EFI_IPSEC_SA_ID SaId[1]; } EFI_IPSEC_SPD_DATA; /// @@ -375,9 +372,9 @@ typedef struct _EFI_IPSEC_SPD_DATA { /// The required authentication algorithm is specified in RFC 4305. /// typedef struct _EFI_IPSEC_AH_ALGO_INFO { - UINT8 AuthAlgoId; - UINTN AuthKeyLength; - VOID *AuthKey; + UINT8 AuthAlgoId; + UINTN AuthKeyLength; + VOID *AuthKey; } EFI_IPSEC_AH_ALGO_INFO; /// @@ -389,20 +386,20 @@ typedef struct _EFI_IPSEC_AH_ALGO_INFO { /// confidentiality and authentication services. /// typedef struct _EFI_IPSEC_ESP_ALGO_INFO { - UINT8 EncAlgoId; - UINTN EncKeyLength; - VOID *EncKey; - UINT8 AuthAlgoId; - UINTN AuthKeyLength; - VOID *AuthKey; + UINT8 EncAlgoId; + UINTN EncKeyLength; + VOID *EncKey; + UINT8 AuthAlgoId; + UINTN AuthKeyLength; + VOID *AuthKey; } EFI_IPSEC_ESP_ALGO_INFO; /// /// EFI_IPSEC_ALGO_INFO /// typedef union { - EFI_IPSEC_AH_ALGO_INFO AhAlgoInfo; - EFI_IPSEC_ESP_ALGO_INFO EspAlgoInfo; + EFI_IPSEC_AH_ALGO_INFO AhAlgoInfo; + EFI_IPSEC_ESP_ALGO_INFO EspAlgoInfo; } EFI_IPSEC_ALGO_INFO; /// @@ -412,40 +409,40 @@ typedef struct _EFI_IPSEC_SA_DATA { /// /// IPsec mode: tunnel or transport. /// - EFI_IPSEC_MODE Mode; + EFI_IPSEC_MODE Mode; /// /// Sequence Number Counter. A 64-bit counter used to generate the /// sequence number field in AH or ESP headers. /// - UINT64 SNCount; + UINT64 SNCount; /// /// Anti-Replay Window. A 64-bit counter and a bit-map used to /// determine whether an inbound AH or ESP packet is a replay. /// - UINT8 AntiReplayWindows; + UINT8 AntiReplayWindows; /// /// AH/ESP cryptographic algorithm, key and parameters. /// - EFI_IPSEC_ALGO_INFO AlgoInfo; + EFI_IPSEC_ALGO_INFO AlgoInfo; /// /// Lifetime of this SA. /// - EFI_IPSEC_SA_LIFETIME SaLifetime; + EFI_IPSEC_SA_LIFETIME SaLifetime; /// /// Any observed path MTU and aging variables. The Path MTU /// processing is defined in section 8 of RFC 4301. /// - UINT32 PathMTU; + UINT32 PathMTU; /// /// Link to one SPD entry. /// - EFI_IPSEC_SPD_SELECTOR *SpdSelector; + EFI_IPSEC_SPD_SELECTOR *SpdSelector; /// /// Indication of whether it's manually set or negotiated automatically. /// If ManualSet is FALSE, the corresponding SA entry is inserted through /// IKE protocol negotiation. /// - BOOLEAN ManualSet; + BOOLEAN ManualSet; } EFI_IPSEC_SA_DATA; /// @@ -455,51 +452,50 @@ typedef struct _EFI_IPSEC_SA_DATA2 { /// /// IPsec mode: tunnel or transport /// - EFI_IPSEC_MODE Mode; + EFI_IPSEC_MODE Mode; /// /// Sequence Number Counter. A 64-bit counter used to generate the sequence /// number field in AH or ESP headers. /// - UINT64 SNCount; + UINT64 SNCount; /// /// Anti-Replay Window. A 64-bit counter and a bit-map used to determine /// whether an inbound AH or ESP packet is a replay. /// - UINT8 AntiReplayWindows; + UINT8 AntiReplayWindows; /// /// AH/ESP cryptographic algorithm, key and parameters. /// - EFI_IPSEC_ALGO_INFO AlgoInfo; + EFI_IPSEC_ALGO_INFO AlgoInfo; /// /// Lifetime of this SA. /// - EFI_IPSEC_SA_LIFETIME SaLifetime; + EFI_IPSEC_SA_LIFETIME SaLifetime; /// /// Any observed path MTU and aging variables. The Path MTU processing is /// defined in section 8 of RFC 4301. /// - UINT32 PathMTU; + UINT32 PathMTU; /// /// Link to one SPD entry /// - EFI_IPSEC_SPD_SELECTOR *SpdSelector; + EFI_IPSEC_SPD_SELECTOR *SpdSelector; /// /// Indication of whether it's manually set or negotiated automatically. /// If ManualSet is FALSE, the corresponding SA entry is inserted through IKE /// protocol negotiation /// - BOOLEAN ManualSet; + BOOLEAN ManualSet; /// /// The tunnel header IP source address. /// - EFI_IP_ADDRESS TunnelSourceAddress; + EFI_IP_ADDRESS TunnelSourceAddress; /// /// The tunnel header IP destination address. /// - EFI_IP_ADDRESS TunnelDestinationAddress; + EFI_IP_ADDRESS TunnelDestinationAddress; } EFI_IPSEC_SA_DATA2; - /// /// EFI_IPSEC_PAD_ID /// specifies the identifier for PAD entry, which is also used for SPD lookup. @@ -509,19 +505,19 @@ typedef struct _EFI_IPSEC_PAD_ID { /// /// Flag to identify which type of PAD Id is used. /// - BOOLEAN PeerIdValid; + BOOLEAN PeerIdValid; union { /// /// Pointer to the IPv4 or IPv6 address range. /// - EFI_IP_ADDRESS_INFO IpAddress; + EFI_IP_ADDRESS_INFO IpAddress; /// /// Pointer to a null terminated ASCII string /// representing the symbolic names. A PeerId can be a DNS /// name, Distinguished Name, RFC 822 email address or Key ID /// (specified in section 4.4.3.1 of RFC 4301) /// - UINT8 PeerId[MAX_PEERID_LEN]; + UINT8 PeerId[MAX_PEERID_LEN]; } Id; } EFI_IPSEC_PAD_ID; @@ -531,9 +527,9 @@ typedef struct _EFI_IPSEC_PAD_ID { /// of type EFI_IPSEC_CONFIG_DATA_TYPE. /// typedef union { - EFI_IPSEC_SPD_SELECTOR SpdSelector; - EFI_IPSEC_SA_ID SaId; - EFI_IPSEC_PAD_ID PadId; + EFI_IPSEC_SPD_SELECTOR SpdSelector; + EFI_IPSEC_SA_ID SaId; + EFI_IPSEC_PAD_ID PadId; } EFI_IPSEC_CONFIG_SELECTOR; /// @@ -569,39 +565,38 @@ typedef struct _EFI_IPSEC_PAD_DATA { /// /// Authentication Protocol for IPsec security association management. /// - EFI_IPSEC_AUTH_PROTOCOL_TYPE AuthProtocol; + EFI_IPSEC_AUTH_PROTOCOL_TYPE AuthProtocol; /// /// Authentication method used. /// - EFI_IPSEC_AUTH_METHOD AuthMethod; + EFI_IPSEC_AUTH_METHOD AuthMethod; /// /// The IKE ID payload will be used as a symbolic name for SPD /// lookup if IkeIdFlag is TRUE. Otherwise, the remote IP /// address provided in traffic selector playloads will be used. /// - BOOLEAN IkeIdFlag; + BOOLEAN IkeIdFlag; /// /// The size of Authentication data buffer, in bytes. /// - UINTN AuthDataSize; + UINTN AuthDataSize; /// /// Buffer for Authentication data, (e.g., the pre-shared secret or the /// trust anchor relative to which the peer's certificate will be /// validated). /// - VOID *AuthData; + VOID *AuthData; /// /// The size of RevocationData, in bytes /// - UINTN RevocationDataSize; + UINTN RevocationDataSize; /// /// Pointer to CRL or OCSP data, if certificates are used for /// authentication method. /// - VOID *RevocationData; + VOID *RevocationData; } EFI_IPSEC_PAD_DATA; - /** Set the security association, security policy and peer authorization configuration information for the EFI IPsec driver. @@ -789,13 +784,13 @@ EFI_STATUS /// protocol for IPsec configuration in both IPv4 and IPv6 environment. /// struct _EFI_IPSEC_CONFIG_PROTOCOL { - EFI_IPSEC_CONFIG_SET_DATA SetData; - EFI_IPSEC_CONFIG_GET_DATA GetData; - EFI_IPSEC_CONFIG_GET_NEXT_SELECTOR GetNextSelector; - EFI_IPSEC_CONFIG_REGISTER_NOTIFY RegisterDataNotify; - EFI_IPSEC_CONFIG_UNREGISTER_NOTIFY UnregisterDataNotify; + EFI_IPSEC_CONFIG_SET_DATA SetData; + EFI_IPSEC_CONFIG_GET_DATA GetData; + EFI_IPSEC_CONFIG_GET_NEXT_SELECTOR GetNextSelector; + EFI_IPSEC_CONFIG_REGISTER_NOTIFY RegisterDataNotify; + EFI_IPSEC_CONFIG_UNREGISTER_NOTIFY UnregisterDataNotify; }; -extern EFI_GUID gEfiIpSecConfigProtocolGuid; +extern EFI_GUID gEfiIpSecConfigProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/IsaHc.h b/MdePkg/Include/Protocol/IsaHc.h index 6628996..221c86b 100644 --- a/MdePkg/Include/Protocol/IsaHc.h +++ b/MdePkg/Include/Protocol/IsaHc.h @@ -26,8 +26,8 @@ 0xfad7933a, 0x6c21, 0x4234, {0xa4, 0x34, 0x0a, 0x8a, 0x0d, 0x2b, 0x07, 0x81} \ } -typedef struct _EFI_ISA_HC_PROTOCOL EFI_ISA_HC_PROTOCOL; -typedef struct _EFI_ISA_HC_PROTOCOL *PEFI_ISA_HC_PROTOCOL; +typedef struct _EFI_ISA_HC_PROTOCOL EFI_ISA_HC_PROTOCOL; +typedef struct _EFI_ISA_HC_PROTOCOL *PEFI_ISA_HC_PROTOCOL; /** Open I/O aperture. @@ -52,7 +52,7 @@ typedef struct _EFI_ISA_HC_PROTOCOL *PEFI_ISA_HC_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI *EFI_ISA_HC_OPEN_IO) ( +(EFIAPI *EFI_ISA_HC_OPEN_IO)( IN CONST EFI_ISA_HC_PROTOCOL *This, IN UINT16 IoAddress, IN UINT16 IoLength, @@ -77,7 +77,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_ISA_HC_CLOSE_IO) ( +(EFIAPI *EFI_ISA_HC_CLOSE_IO)( IN CONST EFI_ISA_HC_PROTOCOL *This, IN UINT64 IoApertureHandle ); @@ -90,21 +90,21 @@ struct _EFI_ISA_HC_PROTOCOL { /// The version of this protocol. Higher version numbers are backward /// compatible with lower version numbers. /// - UINT32 Version; + UINT32 Version; /// /// Open an I/O aperture. /// - EFI_ISA_HC_OPEN_IO OpenIoAperture; + EFI_ISA_HC_OPEN_IO OpenIoAperture; /// /// Close an I/O aperture. /// - EFI_ISA_HC_CLOSE_IO CloseIoAperture; + EFI_ISA_HC_CLOSE_IO CloseIoAperture; }; /// /// Reference to variable defined in the .DEC file /// -extern EFI_GUID gEfiIsaHcProtocolGuid; -extern EFI_GUID gEfiIsaHcServiceBindingProtocolGuid; +extern EFI_GUID gEfiIsaHcProtocolGuid; +extern EFI_GUID gEfiIsaHcServiceBindingProtocolGuid; -#endif // __ISA_HC_H__ +#endif // __ISA_HC_H__ diff --git a/MdePkg/Include/Protocol/Kms.h b/MdePkg/Include/Protocol/Kms.h index 7dac7ef..c37fcbb 100644 --- a/MdePkg/Include/Protocol/Kms.h +++ b/MdePkg/Include/Protocol/Kms.h @@ -27,12 +27,11 @@ typedef struct _EFI_KMS_PROTOCOL EFI_KMS_PROTOCOL; // Where appropriate, EFI_KMS_DATA_TYPE values may be combined using a bitwise 'OR' // operation to indicate support for multiple data types. // -#define EFI_KMS_DATA_TYPE_NONE 0 -#define EFI_KMS_DATA_TYPE_BINARY 1 -#define EFI_KMS_DATA_TYPE_ASCII 2 -#define EFI_KMS_DATA_TYPE_UNICODE 4 -#define EFI_KMS_DATA_TYPE_UTF8 8 - +#define EFI_KMS_DATA_TYPE_NONE 0 +#define EFI_KMS_DATA_TYPE_BINARY 1 +#define EFI_KMS_DATA_TYPE_ASCII 2 +#define EFI_KMS_DATA_TYPE_UNICODE 4 +#define EFI_KMS_DATA_TYPE_UTF8 8 // // The key formats recognized by the KMS protocol are defined by an EFI_GUID which specifies @@ -160,76 +159,76 @@ typedef struct _EFI_KMS_PROTOCOL EFI_KMS_PROTOCOL; } ///@} -#define EFI_KMS_ATTRIBUTE_TYPE_NONE 0x00 -#define EFI_KMS_ATTRIBUTE_TYPE_INTEGER 0x01 -#define EFI_KMS_ATTRIBUTE_TYPE_LONG_INTEGER 0x02 -#define EFI_KMS_ATTRIBUTE_TYPE_BIG_INTEGER 0x03 -#define EFI_KMS_ATTRIBUTE_TYPE_ENUMERATION 0x04 -#define EFI_KMS_ATTRIBUTE_TYPE_BOOLEAN 0x05 -#define EFI_KMS_ATTRIBUTE_TYPE_BYTE_STRING 0x06 -#define EFI_KMS_ATTRIBUTE_TYPE_TEXT_STRING 0x07 -#define EFI_KMS_ATTRIBUTE_TYPE_DATE_TIME 0x08 -#define EFI_KMS_ATTRIBUTE_TYPE_INTERVAL 0x09 -#define EFI_KMS_ATTRIBUTE_TYPE_STRUCTURE 0x0A -#define EFI_KMS_ATTRIBUTE_TYPE_DYNAMIC 0x0B +#define EFI_KMS_ATTRIBUTE_TYPE_NONE 0x00 +#define EFI_KMS_ATTRIBUTE_TYPE_INTEGER 0x01 +#define EFI_KMS_ATTRIBUTE_TYPE_LONG_INTEGER 0x02 +#define EFI_KMS_ATTRIBUTE_TYPE_BIG_INTEGER 0x03 +#define EFI_KMS_ATTRIBUTE_TYPE_ENUMERATION 0x04 +#define EFI_KMS_ATTRIBUTE_TYPE_BOOLEAN 0x05 +#define EFI_KMS_ATTRIBUTE_TYPE_BYTE_STRING 0x06 +#define EFI_KMS_ATTRIBUTE_TYPE_TEXT_STRING 0x07 +#define EFI_KMS_ATTRIBUTE_TYPE_DATE_TIME 0x08 +#define EFI_KMS_ATTRIBUTE_TYPE_INTERVAL 0x09 +#define EFI_KMS_ATTRIBUTE_TYPE_STRUCTURE 0x0A +#define EFI_KMS_ATTRIBUTE_TYPE_DYNAMIC 0x0B typedef struct { /// /// Length in bytes of the KeyData. /// - UINT32 KeySize; + UINT32 KeySize; /// /// The data of the key. /// - UINT8 KeyData[1]; + UINT8 KeyData[1]; } EFI_KMS_FORMAT_GENERIC_DYNAMIC; typedef struct { /// /// The size in bytes for the client identifier. /// - UINT16 ClientIdSize; + UINT16 ClientIdSize; /// /// Pointer to a valid client identifier. /// - VOID *ClientId; + VOID *ClientId; /// /// The client name string type used by this client. The string type set here must be one of /// the string types reported in the ClientNameStringTypes field of the KMS protocol. If the /// KMS does not support client names, this field should be set to EFI_KMS_DATA_TYPE_NONE. /// - UINT8 ClientNameType; + UINT8 ClientNameType; /// /// The size in characters for the client name. This field will be ignored if /// ClientNameStringType is set to EFI_KMS_DATA_TYPE_NONE. Otherwise, it must contain /// number of characters contained in the ClientName field. /// - UINT8 ClientNameCount; + UINT8 ClientNameCount; /// /// Pointer to a client name. This field will be ignored if ClientNameStringType is set to /// EFI_KMS_DATA_TYPE_NONE. Otherwise, it must point to a valid string of the specified type. /// - VOID *ClientName; + VOID *ClientName; } EFI_KMS_CLIENT_INFO; typedef struct { /// /// The size of the KeyIdentifier field in bytes. This field is limited to the range 0 to 255. /// - UINT8 KeyIdentifierSize; + UINT8 KeyIdentifierSize; /// /// Pointer to an array of KeyIdentifierType elements. /// - VOID *KeyIdentifier; + VOID *KeyIdentifier; /// /// An EFI_GUID which specifies the algorithm and key value size for this key. /// - EFI_GUID KeyFormat; + EFI_GUID KeyFormat; /// /// Pointer to a key value for a key specified by the KeyFormat field. A NULL value for this /// field indicates that no key is available. /// - VOID *KeyValue; + VOID *KeyValue; /// /// Specifies the results of KMS operations performed with this descriptor. This field is used /// to indicate the status of individual operations when a KMS function is called with multiple @@ -255,31 +254,31 @@ typedef struct { /// Part of a tag-type-length triplet that identifies the KeyAttributeData formatting. The /// definition of the value is outside the scope of this standard and may be defined by the KMS. /// - UINT16 Tag; + UINT16 Tag; /// /// Part of a tag-type-length triplet that identifies the KeyAttributeData formatting. The /// definition of the value is outside the scope of this standard and may be defined by the KMS. /// - UINT16 Type; + UINT16 Type; /// /// Length in bytes of the KeyAttributeData. /// - UINT32 Length; + UINT32 Length; /// /// An array of bytes to hold the attribute data associated with the KeyAttributeIdentifier. /// - UINT8 KeyAttributeData[1]; + UINT8 KeyAttributeData[1]; } EFI_KMS_DYNAMIC_FIELD; typedef struct { /// /// The number of members in the EFI_KMS_DYNAMIC_ATTRIBUTE structure. /// - UINT32 FieldCount; + UINT32 FieldCount; /// /// An array of EFI_KMS_DYNAMIC_FIELD structures. /// - EFI_KMS_DYNAMIC_FIELD Field[1]; + EFI_KMS_DYNAMIC_FIELD Field[1]; } EFI_KMS_DYNAMIC_ATTRIBUTE; typedef struct { @@ -288,17 +287,17 @@ typedef struct { /// by the EFI_KMS_DATA_TYPE constants, except that EFI_KMS_DATA_TYPE_BINARY is not /// valid for this field. /// - UINT8 KeyAttributeIdentifierType; + UINT8 KeyAttributeIdentifierType; /// /// The length of the KeyAttributeIdentifier field in units defined by KeyAttributeIdentifierType /// field. This field is limited to the range 0 to 255. /// - UINT8 KeyAttributeIdentifierCount; + UINT8 KeyAttributeIdentifierCount; /// /// Pointer to an array of KeyAttributeIdentifierType elements. For string types, there must /// not be a null-termination element at the end of the array. /// - VOID *KeyAttributeIdentifier; + VOID *KeyAttributeIdentifier; /// /// The instance number of this attribute. If there is only one instance, the value is set to /// one. If this value is set to 0xFFFF (all binary 1's) then this field should be ignored if an @@ -307,22 +306,22 @@ typedef struct { /// field in the request. If set to 0xFFFF in the request, it will match any attribute with the /// same KeyAttributeIdentifier. /// - UINT16 KeyAttributeInstance; + UINT16 KeyAttributeInstance; /// /// The data type of the KeyAttributeValue (e.g. struct, bool, etc.). See the list of /// KeyAttributeType definitions. /// - UINT16 KeyAttributeType; + UINT16 KeyAttributeType; /// /// The size in bytes of the KeyAttribute field. A value of zero for this field indicates that no /// key attribute value is available. /// - UINT16 KeyAttributeValueSize; + UINT16 KeyAttributeValueSize; /// /// Pointer to a key attribute value for the attribute specified by the KeyAttributeIdentifier /// field. If the KeyAttributeValueSize field is zero, then this field must be NULL. /// - VOID *KeyAttributeValue; + VOID *KeyAttributeValue; /// /// KeyAttributeStatusSpecifies the results of KMS operations performed with this attribute. /// This field is used to indicate the status of individual operations when a KMS function is @@ -358,7 +357,7 @@ typedef struct { **/ typedef EFI_STATUS -(EFIAPI *EFI_KMS_GET_SERVICE_STATUS) ( +(EFIAPI *EFI_KMS_GET_SERVICE_STATUS)( IN EFI_KMS_PROTOCOL *This ); @@ -407,7 +406,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_KMS_REGISTER_CLIENT) ( +(EFIAPI *EFI_KMS_REGISTER_CLIENT)( IN EFI_KMS_PROTOCOL *This, IN EFI_KMS_CLIENT_INFO *Client, IN OUT UINTN *ClientDataSize OPTIONAL, @@ -501,7 +500,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_KMS_CREATE_KEY) ( +(EFIAPI *EFI_KMS_CREATE_KEY)( IN EFI_KMS_PROTOCOL *This, IN EFI_KMS_CLIENT_INFO *Client, IN OUT UINT16 *KeyDescriptorCount, @@ -589,7 +588,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_KMS_GET_KEY) ( +(EFIAPI *EFI_KMS_GET_KEY)( IN EFI_KMS_PROTOCOL *This, IN EFI_KMS_CLIENT_INFO *Client, IN OUT UINT16 *KeyDescriptorCount, @@ -675,7 +674,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_KMS_ADD_KEY) ( +(EFIAPI *EFI_KMS_ADD_KEY)( IN EFI_KMS_PROTOCOL *This, IN EFI_KMS_CLIENT_INFO *Client, IN OUT UINT16 *KeyDescriptorCount, @@ -754,7 +753,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_KMS_DELETE_KEY) ( +(EFIAPI *EFI_KMS_DELETE_KEY)( IN EFI_KMS_PROTOCOL *This, IN EFI_KMS_CLIENT_INFO *Client, IN OUT UINT16 *KeyDescriptorCount, @@ -841,7 +840,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_KMS_GET_KEY_ATTRIBUTES) ( +(EFIAPI *EFI_KMS_GET_KEY_ATTRIBUTES)( IN EFI_KMS_PROTOCOL *This, IN EFI_KMS_CLIENT_INFO *Client, IN UINT8 *KeyIdentifierSize, @@ -931,7 +930,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_KMS_ADD_KEY_ATTRIBUTES) ( +(EFIAPI *EFI_KMS_ADD_KEY_ATTRIBUTES)( IN EFI_KMS_PROTOCOL *This, IN EFI_KMS_CLIENT_INFO *Client, IN UINT8 *KeyIdentifierSize, @@ -1014,7 +1013,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_KMS_DELETE_KEY_ATTRIBUTES) ( +(EFIAPI *EFI_KMS_DELETE_KEY_ATTRIBUTES)( IN EFI_KMS_PROTOCOL *This, IN EFI_KMS_CLIENT_INFO *Client, IN UINT8 *KeyIdentifierSize, @@ -1117,7 +1116,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_KMS_GET_KEY_BY_ATTRIBUTES) ( +(EFIAPI *EFI_KMS_GET_KEY_BY_ATTRIBUTES)( IN EFI_KMS_PROTOCOL *This, IN EFI_KMS_CLIENT_INFO *Client, IN OUT UINTN *KeyAttributeCount, @@ -1138,64 +1137,64 @@ struct _EFI_KMS_PROTOCOL { /// connected to the KMS, then a call to this function will initiate a connection. This is the /// only function that is valid for use prior to the service being marked available. /// - EFI_KMS_GET_SERVICE_STATUS GetServiceStatus; + EFI_KMS_GET_SERVICE_STATUS GetServiceStatus; /// /// Register a specific client with the KMS. /// - EFI_KMS_REGISTER_CLIENT RegisterClient; + EFI_KMS_REGISTER_CLIENT RegisterClient; /// /// Request the generation of a new key and retrieve it. /// - EFI_KMS_CREATE_KEY CreateKey; + EFI_KMS_CREATE_KEY CreateKey; /// /// Retrieve an existing key. /// - EFI_KMS_GET_KEY GetKey; + EFI_KMS_GET_KEY GetKey; /// /// Add a local key to KMS database. If there is an existing key with this key identifier in the /// KMS database, it will be replaced with the new key. /// - EFI_KMS_ADD_KEY AddKey; + EFI_KMS_ADD_KEY AddKey; /// /// Delete an existing key from the KMS database. /// - EFI_KMS_DELETE_KEY DeleteKey; + EFI_KMS_DELETE_KEY DeleteKey; /// /// Get attributes for an existing key in the KMS database. /// - EFI_KMS_GET_KEY_ATTRIBUTES GetKeyAttributes; + EFI_KMS_GET_KEY_ATTRIBUTES GetKeyAttributes; /// /// Add attributes to an existing key in the KMS database. /// - EFI_KMS_ADD_KEY_ATTRIBUTES AddKeyAttributes; + EFI_KMS_ADD_KEY_ATTRIBUTES AddKeyAttributes; /// /// Delete attributes for an existing key in the KMS database. /// - EFI_KMS_DELETE_KEY_ATTRIBUTES DeleteKeyAttributes; + EFI_KMS_DELETE_KEY_ATTRIBUTES DeleteKeyAttributes; /// /// Get existing key(s) with the specified attributes. /// - EFI_KMS_GET_KEY_BY_ATTRIBUTES GetKeyByAttributes; + EFI_KMS_GET_KEY_BY_ATTRIBUTES GetKeyByAttributes; /// /// The version of this EFI_KMS_PROTOCOL structure. This must be set to 0x00020040 for /// the initial version of this protocol. /// - UINT32 ProtocolVersion; + UINT32 ProtocolVersion; /// /// Optional GUID used to identify a specific KMS. This GUID may be supplied by the provider, /// by the implementation, or may be null. If is null, then the ServiceName must not be null. /// - EFI_GUID ServiceId; + EFI_GUID ServiceId; /// /// Optional pointer to a unicode string which may be used to identify the KMS or provide /// other information about the supplier. /// - CHAR16 *ServiceName; + CHAR16 *ServiceName; /// /// Optional 32-bit value which may be used to indicate the version of the KMS provided by /// the supplier. /// - UINT32 ServiceVersion; + UINT32 ServiceVersion; /// /// TRUE if and only if the service is active and available for use. To avoid unnecessary /// delays in POST, this protocol may be installed without connecting to the service. In this @@ -1204,64 +1203,64 @@ struct _EFI_KMS_PROTOCOL { /// as defined in the reminder of this protocol are not guaranteed to be valid until the service /// has been marked available. /// - BOOLEAN ServiceAvailable; + BOOLEAN ServiceAvailable; /// /// TRUE if and only if the service supports client identifiers. Client identifiers may be used /// for auditing, access control or any other purpose specific to the implementation. /// - BOOLEAN ClientIdSupported; + BOOLEAN ClientIdSupported; /// /// TRUE if and only if the service requires a client identifier in order to process key requests. /// FALSE otherwise. /// - BOOLEAN ClientIdRequired; + BOOLEAN ClientIdRequired; /// /// The maximum size in bytes for the client identifier. /// - UINT16 ClientIdMaxSize; + UINT16 ClientIdMaxSize; /// /// The client name string type(s) supported by the KMS service. If client names are not /// supported, this field will be set the EFI_KMS_DATA_TYPE_NONE. Otherwise, it will be set /// to the inclusive 'OR' of all client name formats supported. Client names may be used for /// auditing, access control or any other purpose specific to the implementation. /// - UINT8 ClientNameStringTypes; + UINT8 ClientNameStringTypes; /// /// TRUE if only if the KMS requires a client name to be supplied to the service. /// FALSE otherwise. /// - BOOLEAN ClientNameRequired; + BOOLEAN ClientNameRequired; /// /// The maximum number of characters allowed for the client name. /// - UINT16 ClientNameMaxCount; + UINT16 ClientNameMaxCount; /// /// TRUE if and only if the service supports arbitrary client data requests. The use of client /// data requires the caller to have specific knowledge of the individual KMS service and /// should be used only if absolutely necessary. /// FALSE otherwise. /// - BOOLEAN ClientDataSupported; + BOOLEAN ClientDataSupported; /// /// The maximum size in bytes for the client data. If the maximum data size is not specified /// by the KMS or it is not known, then this field must be filled with all ones. /// - UINTN ClientDataMaxSize; + UINTN ClientDataMaxSize; /// /// TRUE if variable length key identifiers are supported. /// FALSE if a fixed length key identifier is supported. /// - BOOLEAN KeyIdVariableLenSupported; + BOOLEAN KeyIdVariableLenSupported; /// /// If KeyIdVariableLenSupported is TRUE, this is the maximum supported key identifier length /// in bytes. Otherwise this is the fixed length of key identifier supported. Key ids shorter /// than the fixed length will be padded on the right with blanks. /// - UINTN KeyIdMaxSize; + UINTN KeyIdMaxSize; /// /// The number of key format/size GUIDs returned in the KeyFormats field. /// - UINTN KeyFormatsCount; + UINTN KeyFormatsCount; /// /// A pointer to an array of EFI_GUID values which specify key formats/sizes supported by /// this KMS. Each format/size pair will be specified by a separate EFI_GUID. At least one @@ -1273,26 +1272,26 @@ struct _EFI_KMS_PROTOCOL { /// using an arbitrary GUID, but any GUID not recognized by the implementation or not /// supported by the KMS will return an error code of EFI_UNSUPPORTED /// - EFI_GUID *KeyFormats; + EFI_GUID *KeyFormats; /// /// TRUE if key attributes are supported. /// FALSE if key attributes are not supported. /// - BOOLEAN KeyAttributesSupported; + BOOLEAN KeyAttributesSupported; /// /// The key attribute identifier string type(s) supported by the KMS service. If key attributes /// are not supported, this field will be set to EFI_KMS_DATA_TYPE_NONE. Otherwise, it will /// be set to the inclusive 'OR' of all key attribute identifier string types supported. /// EFI_KMS_DATA_TYPE_BINARY is not valid for this field. /// - UINT8 KeyAttributeIdStringTypes; - UINT16 KeyAttributeIdMaxCount; + UINT8 KeyAttributeIdStringTypes; + UINT16 KeyAttributeIdMaxCount; /// /// The number of predefined KeyAttributes structures returned in the KeyAttributes /// parameter. If the KMS does not support predefined key attributes, or if it does not /// provide a method to obtain predefined key attributes data, then this field must be zero. /// - UINTN KeyAttributesCount; + UINTN KeyAttributesCount; /// /// A pointer to an array of KeyAttributes structures which contains the predefined /// attributes supported by this KMS. Each structure must contain a valid key attribute @@ -1305,33 +1304,33 @@ struct _EFI_KMS_PROTOCOL { /// does not distinguish between predefined and used defined attributes, and therefore, /// predefined attributes not enumerated will still be processed to the KMS. /// - EFI_KMS_KEY_ATTRIBUTE *KeyAttributes; + EFI_KMS_KEY_ATTRIBUTE *KeyAttributes; }; -extern EFI_GUID gEfiKmsFormatGeneric128Guid; -extern EFI_GUID gEfiKmsFormatGeneric160Guid; -extern EFI_GUID gEfiKmsFormatGeneric256Guid; -extern EFI_GUID gEfiKmsFormatGeneric512Guid; -extern EFI_GUID gEfiKmsFormatGeneric1024Guid; -extern EFI_GUID gEfiKmsFormatGeneric2048Guid; -extern EFI_GUID gEfiKmsFormatGeneric3072Guid; -extern EFI_GUID gEfiKmsFormatMd2128Guid; -extern EFI_GUID gEfiKmsFormatMdc2128Guid; -extern EFI_GUID gEfiKmsFormatMd4128Guid; -extern EFI_GUID gEfiKmsFormatMdc4128Guid; -extern EFI_GUID gEfiKmsFormatMd5128Guid; -extern EFI_GUID gEfiKmsFormatMd5sha128Guid; -extern EFI_GUID gEfiKmsFormatSha1160Guid; -extern EFI_GUID gEfiKmsFormatSha256256Guid; -extern EFI_GUID gEfiKmsFormatSha512512Guid; -extern EFI_GUID gEfiKmsFormatAesxts128Guid; -extern EFI_GUID gEfiKmsFormatAesxts256Guid; -extern EFI_GUID gEfiKmsFormatAescbc128Guid; -extern EFI_GUID gEfiKmsFormatAescbc256Guid; -extern EFI_GUID gEfiKmsFormatRsasha11024Guid; -extern EFI_GUID gEfiKmsFormatRsasha12048Guid; -extern EFI_GUID gEfiKmsFormatRsasha2562048Guid; -extern EFI_GUID gEfiKmsFormatRsasha2563072Guid; -extern EFI_GUID gEfiKmsProtocolGuid; +extern EFI_GUID gEfiKmsFormatGeneric128Guid; +extern EFI_GUID gEfiKmsFormatGeneric160Guid; +extern EFI_GUID gEfiKmsFormatGeneric256Guid; +extern EFI_GUID gEfiKmsFormatGeneric512Guid; +extern EFI_GUID gEfiKmsFormatGeneric1024Guid; +extern EFI_GUID gEfiKmsFormatGeneric2048Guid; +extern EFI_GUID gEfiKmsFormatGeneric3072Guid; +extern EFI_GUID gEfiKmsFormatMd2128Guid; +extern EFI_GUID gEfiKmsFormatMdc2128Guid; +extern EFI_GUID gEfiKmsFormatMd4128Guid; +extern EFI_GUID gEfiKmsFormatMdc4128Guid; +extern EFI_GUID gEfiKmsFormatMd5128Guid; +extern EFI_GUID gEfiKmsFormatMd5sha128Guid; +extern EFI_GUID gEfiKmsFormatSha1160Guid; +extern EFI_GUID gEfiKmsFormatSha256256Guid; +extern EFI_GUID gEfiKmsFormatSha512512Guid; +extern EFI_GUID gEfiKmsFormatAesxts128Guid; +extern EFI_GUID gEfiKmsFormatAesxts256Guid; +extern EFI_GUID gEfiKmsFormatAescbc128Guid; +extern EFI_GUID gEfiKmsFormatAescbc256Guid; +extern EFI_GUID gEfiKmsFormatRsasha11024Guid; +extern EFI_GUID gEfiKmsFormatRsasha12048Guid; +extern EFI_GUID gEfiKmsFormatRsasha2562048Guid; +extern EFI_GUID gEfiKmsFormatRsasha2563072Guid; +extern EFI_GUID gEfiKmsProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/LegacyRegion2.h b/MdePkg/Include/Protocol/LegacyRegion2.h index eca5917..764998d 100644 --- a/MdePkg/Include/Protocol/LegacyRegion2.h +++ b/MdePkg/Include/Protocol/LegacyRegion2.h @@ -14,7 +14,6 @@ #ifndef __LEGACY_REGION2_H__ #define __LEGACY_REGION2_H__ - #define EFI_LEGACY_REGION2_PROTOCOL_GUID \ { \ 0x70101eaf, 0x85, 0x440c, {0xb3, 0x56, 0x8e, 0xe3, 0x6f, 0xef, 0x24, 0xf0 } \ @@ -49,13 +48,12 @@ typedef struct _EFI_LEGACY_REGION2_PROTOCOL EFI_LEGACY_REGION2_PROTOCOL; typedef EFI_STATUS (EFIAPI *EFI_LEGACY_REGION2_DECODE)( - IN EFI_LEGACY_REGION2_PROTOCOL *This, - IN UINT32 Start, - IN UINT32 Length, - OUT UINT32 *Granularity, - IN BOOLEAN *On - ); - + IN EFI_LEGACY_REGION2_PROTOCOL *This, + IN UINT32 Start, + IN UINT32 Length, + OUT UINT32 *Granularity, + IN BOOLEAN *On + ); /** Modify the hardware to disallow memory writes in a region. @@ -80,12 +78,11 @@ EFI_STATUS typedef EFI_STATUS (EFIAPI *EFI_LEGACY_REGION2_LOCK)( - IN EFI_LEGACY_REGION2_PROTOCOL *This, - IN UINT32 Start, - IN UINT32 Length, - OUT UINT32 *Granularity - ); - + IN EFI_LEGACY_REGION2_PROTOCOL *This, + IN UINT32 Start, + IN UINT32 Length, + OUT UINT32 *Granularity + ); /** Modify the hardware to disallow memory attribute changes in a region. @@ -121,7 +118,6 @@ EFI_STATUS OUT UINT32 *Granularity OPTIONAL ); - /** Modify the hardware to allow memory writes in a region. @@ -145,12 +141,11 @@ EFI_STATUS typedef EFI_STATUS (EFIAPI *EFI_LEGACY_REGION2_UNLOCK)( - IN EFI_LEGACY_REGION2_PROTOCOL *This, - IN UINT32 Start, - IN UINT32 Length, - OUT UINT32 *Granularity - ); - + IN EFI_LEGACY_REGION2_PROTOCOL *This, + IN UINT32 Start, + IN UINT32 Length, + OUT UINT32 *Granularity + ); typedef enum { LegacyRegionDecoded, ///< This region is currently set to allow reads. @@ -162,30 +157,28 @@ typedef enum { LegacyRegionNotLocked ///< This region's attributes are not locked. } EFI_LEGACY_REGION_ATTRIBUTE; - typedef struct { /// /// The beginning of the physical address of this /// region. /// - UINT32 Start; + UINT32 Start; /// /// The number of bytes in this region. /// - UINT32 Length; + UINT32 Length; /// /// Attribute of the Legacy Region Descriptor that /// describes the capabilities for that memory region. /// - EFI_LEGACY_REGION_ATTRIBUTE Attribute; + EFI_LEGACY_REGION_ATTRIBUTE Attribute; /// /// Describes the byte length programmability /// associated with the Start address and the specified /// Attribute setting. - UINT32 Granularity; + UINT32 Granularity; } EFI_LEGACY_REGION_DESCRIPTOR; - /** Get region information for the attributes of the Legacy Region. @@ -213,7 +206,6 @@ EFI_STATUS OUT EFI_LEGACY_REGION_DESCRIPTOR **Descriptor ); - /// /// The EFI_LEGACY_REGION2_PROTOCOL is used to abstract the hardware control of the memory /// attributes of the Option ROM shadowing region, 0xC0000 to 0xFFFFF. @@ -221,13 +213,13 @@ EFI_STATUS /// boot-lock. These protocols may be set in any combination. /// struct _EFI_LEGACY_REGION2_PROTOCOL { - EFI_LEGACY_REGION2_DECODE Decode; - EFI_LEGACY_REGION2_LOCK Lock; - EFI_LEGACY_REGION2_BOOT_LOCK BootLock; - EFI_LEGACY_REGION2_UNLOCK UnLock; - EFI_LEGACY_REGION_GET_INFO GetInfo; + EFI_LEGACY_REGION2_DECODE Decode; + EFI_LEGACY_REGION2_LOCK Lock; + EFI_LEGACY_REGION2_BOOT_LOCK BootLock; + EFI_LEGACY_REGION2_UNLOCK UnLock; + EFI_LEGACY_REGION_GET_INFO GetInfo; }; -extern EFI_GUID gEfiLegacyRegion2ProtocolGuid; +extern EFI_GUID gEfiLegacyRegion2ProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/LegacySpiController.h b/MdePkg/Include/Protocol/LegacySpiController.h index 31f14b1..71844b2 100644 --- a/MdePkg/Include/Protocol/LegacySpiController.h +++ b/MdePkg/Include/Protocol/LegacySpiController.h @@ -23,7 +23,7 @@ { 0xbf, 0x35, 0x0e, 0x78, 0xdd, 0xb5, 0x24, 0xfc }} typedef -struct _EFI_LEGACY_SPI_CONTROLLER_PROTOCOL + struct _EFI_LEGACY_SPI_CONTROLLER_PROTOCOL EFI_LEGACY_SPI_CONTROLLER_PROTOCOL; /** @@ -46,7 +46,7 @@ EFI_LEGACY_SPI_CONTROLLER_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI *EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_ERASE_BLOCK_OPCODE) ( +(EFIAPI *EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_ERASE_BLOCK_OPCODE)( IN CONST EFI_LEGACY_SPI_CONTROLLER_PROTOCOL *This, IN UINT8 EraseBlockOpcode ); @@ -71,7 +71,7 @@ typedef EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_WRITE_STATUS_PREFIX) ( +(EFIAPI *EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_WRITE_STATUS_PREFIX)( IN CONST EFI_LEGACY_SPI_CONTROLLER_PROTOCOL *This, IN UINT8 WriteStatusPrefix ); @@ -96,7 +96,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_BIOS_BASE_ADDRESS) ( +(EFIAPI *EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_BIOS_BASE_ADDRESS)( IN CONST EFI_LEGACY_SPI_CONTROLLER_PROTOCOL *This, IN UINT32 BiosBaseAddress ); @@ -116,7 +116,7 @@ typedef EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_CLEAR_SPI_PROTECT) ( +(EFIAPI *EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_CLEAR_SPI_PROTECT)( IN CONST EFI_LEGACY_SPI_CONTROLLER_PROTOCOL *This ); @@ -137,7 +137,7 @@ EFI_STATUS **/ typedef BOOLEAN -(EFIAPI *EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_IS_RANGE_PROTECTED) ( +(EFIAPI *EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_IS_RANGE_PROTECTED)( IN CONST EFI_LEGACY_SPI_CONTROLLER_PROTOCOL *This, IN UINT32 BiosAddress, IN UINT32 BlocksToProtect @@ -170,7 +170,7 @@ BOOLEAN **/ typedef EFI_STATUS -(EFIAPI *EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_PROTECT_NEXT_RANGE) ( +(EFIAPI *EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_PROTECT_NEXT_RANGE)( IN CONST EFI_LEGACY_SPI_CONTROLLER_PROTOCOL *This, IN UINT32 BiosAddress, IN UINT32 BlocksToProtect @@ -195,7 +195,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_LOCK_CONTROLLER) ( +(EFIAPI *EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_LOCK_CONTROLLER)( IN CONST EFI_LEGACY_SPI_CONTROLLER_PROTOCOL *This ); @@ -206,54 +206,54 @@ struct _EFI_LEGACY_SPI_CONTROLLER_PROTOCOL { /// /// Maximum offset from the BIOS base address that is able to be protected. /// - UINT32 MaximumOffset; + UINT32 MaximumOffset; /// /// Maximum number of bytes that can be protected by one range register. /// - UINT32 MaximumRangeBytes; + UINT32 MaximumRangeBytes; /// /// The number of registers available for protecting the BIOS. /// - UINT32 RangeRegisterCount; + UINT32 RangeRegisterCount; /// /// Set the erase block opcode. /// - EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_ERASE_BLOCK_OPCODE EraseBlockOpcode; + EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_ERASE_BLOCK_OPCODE EraseBlockOpcode; /// /// Set the write status prefix opcode. /// - EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_WRITE_STATUS_PREFIX WriteStatusPrefix; + EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_WRITE_STATUS_PREFIX WriteStatusPrefix; /// /// Set the BIOS base address. /// - EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_BIOS_BASE_ADDRESS BiosBaseAddress; + EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_BIOS_BASE_ADDRESS BiosBaseAddress; /// /// Clear the SPI protect range registers. /// - EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_CLEAR_SPI_PROTECT ClearSpiProtect; + EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_CLEAR_SPI_PROTECT ClearSpiProtect; /// /// Determine if the SPI range is protected. /// - EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_IS_RANGE_PROTECTED IsRangeProtected; + EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_IS_RANGE_PROTECTED IsRangeProtected; /// /// Set the next protect range register. /// - EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_PROTECT_NEXT_RANGE ProtectNextRange; + EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_PROTECT_NEXT_RANGE ProtectNextRange; /// /// Lock the SPI controller configuration. /// - EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_LOCK_CONTROLLER LockController; + EFI_LEGACY_SPI_CONTROLLER_PROTOCOL_LOCK_CONTROLLER LockController; }; -extern EFI_GUID gEfiLegacySpiControllerProtocolGuid; +extern EFI_GUID gEfiLegacySpiControllerProtocolGuid; #endif // __LEGACY_SPI_CONTROLLER_PROTOCOL_H__ diff --git a/MdePkg/Include/Protocol/LegacySpiFlash.h b/MdePkg/Include/Protocol/LegacySpiFlash.h index 3089a80..5b96515 100644 --- a/MdePkg/Include/Protocol/LegacySpiFlash.h +++ b/MdePkg/Include/Protocol/LegacySpiFlash.h @@ -44,7 +44,7 @@ typedef struct _EFI_LEGACY_SPI_FLASH_PROTOCOL EFI_LEGACY_SPI_FLASH_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI *EFI_LEGACY_SPI_FLASH_PROTOCOL_BIOS_BASE_ADDRESS) ( +(EFIAPI *EFI_LEGACY_SPI_FLASH_PROTOCOL_BIOS_BASE_ADDRESS)( IN CONST EFI_LEGACY_SPI_FLASH_PROTOCOL *This, IN UINT32 BiosBaseAddress ); @@ -64,7 +64,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_LEGACY_SPI_FLASH_PROTOCOL_CLEAR_SPI_PROTECT) ( +(EFIAPI *EFI_LEGACY_SPI_FLASH_PROTOCOL_CLEAR_SPI_PROTECT)( IN CONST EFI_LEGACY_SPI_FLASH_PROTOCOL *This ); @@ -85,7 +85,7 @@ typedef EFI_STATUS **/ typedef BOOLEAN -(EFIAPI *EFI_LEGACY_SPI_FLASH_PROTOCOL_IS_RANGE_PROTECTED) ( +(EFIAPI *EFI_LEGACY_SPI_FLASH_PROTOCOL_IS_RANGE_PROTECTED)( IN CONST EFI_LEGACY_SPI_FLASH_PROTOCOL *This, IN UINT32 BiosAddress, IN UINT32 BlocksToProtect @@ -119,7 +119,7 @@ BOOLEAN **/ typedef EFI_STATUS -(EFIAPI *EFI_LEGACY_SPI_FLASH_PROTOCOL_PROTECT_NEXT_RANGE) ( +(EFIAPI *EFI_LEGACY_SPI_FLASH_PROTOCOL_PROTECT_NEXT_RANGE)( IN CONST EFI_LEGACY_SPI_FLASH_PROTOCOL *This, IN UINT32 BiosAddress, IN UINT32 BlocksToProtect @@ -145,7 +145,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_LEGACY_SPI_FLASH_PROTOCOL_LOCK_CONTROLLER) ( +(EFIAPI *EFI_LEGACY_SPI_FLASH_PROTOCOL_LOCK_CONTROLLER)( IN CONST EFI_LEGACY_SPI_FLASH_PROTOCOL *This ); @@ -158,7 +158,7 @@ struct _EFI_LEGACY_SPI_FLASH_PROTOCOL { /// This protocol manipulates the SPI NOR flash parts using a common set of /// commands. /// - EFI_SPI_NOR_FLASH_PROTOCOL FlashProtocol; + EFI_SPI_NOR_FLASH_PROTOCOL FlashProtocol; // // Legacy flash (SPI host) controller support @@ -167,29 +167,29 @@ struct _EFI_LEGACY_SPI_FLASH_PROTOCOL { /// /// Set the BIOS base address. /// - EFI_LEGACY_SPI_FLASH_PROTOCOL_BIOS_BASE_ADDRESS BiosBaseAddress; + EFI_LEGACY_SPI_FLASH_PROTOCOL_BIOS_BASE_ADDRESS BiosBaseAddress; /// /// Clear the SPI protect range registers. /// - EFI_LEGACY_SPI_FLASH_PROTOCOL_CLEAR_SPI_PROTECT ClearSpiProtect; + EFI_LEGACY_SPI_FLASH_PROTOCOL_CLEAR_SPI_PROTECT ClearSpiProtect; /// /// Determine if the SPI range is protected. /// - EFI_LEGACY_SPI_FLASH_PROTOCOL_IS_RANGE_PROTECTED IsRangeProtected; + EFI_LEGACY_SPI_FLASH_PROTOCOL_IS_RANGE_PROTECTED IsRangeProtected; /// /// Set the next protect range register. /// - EFI_LEGACY_SPI_FLASH_PROTOCOL_PROTECT_NEXT_RANGE ProtectNextRange; + EFI_LEGACY_SPI_FLASH_PROTOCOL_PROTECT_NEXT_RANGE ProtectNextRange; /// /// Lock the SPI controller configuration. /// - EFI_LEGACY_SPI_FLASH_PROTOCOL_LOCK_CONTROLLER LockController; + EFI_LEGACY_SPI_FLASH_PROTOCOL_LOCK_CONTROLLER LockController; }; -extern EFI_GUID gEfiLegacySpiFlashProtocolGuid; +extern EFI_GUID gEfiLegacySpiFlashProtocolGuid; #endif // __LEGACY_SPI_FLASH_PROTOCOL_H__ diff --git a/MdePkg/Include/Protocol/LegacySpiSmmController.h b/MdePkg/Include/Protocol/LegacySpiSmmController.h index 008a343..7b238dc 100644 --- a/MdePkg/Include/Protocol/LegacySpiSmmController.h +++ b/MdePkg/Include/Protocol/LegacySpiSmmController.h @@ -22,9 +22,9 @@ { 0x8c, 0xcb, 0xd2, 0x7d, 0xfe, 0x32, 0xdb, 0x9b }} typedef -struct _EFI_LEGACY_SPI_CONTROLLER_PROTOCOL + struct _EFI_LEGACY_SPI_CONTROLLER_PROTOCOL EFI_LEGACY_SPI_SMM_CONTROLLER_PROTOCOL; -extern EFI_GUID gEfiLegacySpiSmmControllerProtocolGuid; +extern EFI_GUID gEfiLegacySpiSmmControllerProtocolGuid; #endif // __LEGACY_SPI_SMM_CONTROLLER_PROTOCOL_H__ diff --git a/MdePkg/Include/Protocol/LegacySpiSmmFlash.h b/MdePkg/Include/Protocol/LegacySpiSmmFlash.h index 1babbc0..a4b25fb 100644 --- a/MdePkg/Include/Protocol/LegacySpiSmmFlash.h +++ b/MdePkg/Include/Protocol/LegacySpiSmmFlash.h @@ -22,9 +22,9 @@ { 0x97, 0x29, 0x3f, 0x35, 0x3d, 0x4f, 0x87, 0x9f }} typedef -struct _EFI_LEGACY_SPI_FLASH_PROTOCOL + struct _EFI_LEGACY_SPI_FLASH_PROTOCOL EFI_LEGACY_SPI_SMM_FLASH_PROTOCOL; -extern EFI_GUID gEfiLegacySpiSmmFlashProtocolGuid; +extern EFI_GUID gEfiLegacySpiSmmFlashProtocolGuid; #endif // __SPI_SMM_FLASH_PROTOCOL_H__ diff --git a/MdePkg/Include/Protocol/LoadFile.h b/MdePkg/Include/Protocol/LoadFile.h index 929cc8e..10221d6 100644 --- a/MdePkg/Include/Protocol/LoadFile.h +++ b/MdePkg/Include/Protocol/LoadFile.h @@ -23,14 +23,14 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// Protocol Guid defined by EFI1.1. /// -#define LOAD_FILE_PROTOCOL EFI_LOAD_FILE_PROTOCOL_GUID +#define LOAD_FILE_PROTOCOL EFI_LOAD_FILE_PROTOCOL_GUID typedef struct _EFI_LOAD_FILE_PROTOCOL EFI_LOAD_FILE_PROTOCOL; /// /// Backward-compatible with EFI1.1 /// -typedef EFI_LOAD_FILE_PROTOCOL EFI_LOAD_FILE_INTERFACE; +typedef EFI_LOAD_FILE_PROTOCOL EFI_LOAD_FILE_INTERFACE; /** Causes the driver to load a specified file. @@ -74,9 +74,9 @@ EFI_STATUS /// The EFI_LOAD_FILE_PROTOCOL is a simple protocol used to obtain files from arbitrary devices. /// struct _EFI_LOAD_FILE_PROTOCOL { - EFI_LOAD_FILE LoadFile; + EFI_LOAD_FILE LoadFile; }; -extern EFI_GUID gEfiLoadFileProtocolGuid; +extern EFI_GUID gEfiLoadFileProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/LoadFile2.h b/MdePkg/Include/Protocol/LoadFile2.h index 1f4dc8e..21bb37b 100644 --- a/MdePkg/Include/Protocol/LoadFile2.h +++ b/MdePkg/Include/Protocol/LoadFile2.h @@ -23,11 +23,10 @@ /// /// Protocol Guid defined by UEFI2.1. /// -#define LOAD_FILE2_PROTOCOL EFI_LOAD_FILE2_PROTOCOL_GUID +#define LOAD_FILE2_PROTOCOL EFI_LOAD_FILE2_PROTOCOL_GUID typedef struct _EFI_LOAD_FILE2_PROTOCOL EFI_LOAD_FILE2_PROTOCOL; - /** Causes the driver to load a specified file. @@ -71,9 +70,9 @@ EFI_STATUS /// The EFI_LOAD_FILE_PROTOCOL is a simple protocol used to obtain files from arbitrary devices. /// struct _EFI_LOAD_FILE2_PROTOCOL { - EFI_LOAD_FILE2 LoadFile; + EFI_LOAD_FILE2 LoadFile; }; -extern EFI_GUID gEfiLoadFile2ProtocolGuid; +extern EFI_GUID gEfiLoadFile2ProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/LoadedImage.h b/MdePkg/Include/Protocol/LoadedImage.h index d6e05a9..c1e65a7 100644 --- a/MdePkg/Include/Protocol/LoadedImage.h +++ b/MdePkg/Include/Protocol/LoadedImage.h @@ -25,7 +25,7 @@ /// /// Protocol GUID defined in EFI1.1. /// -#define LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE_PROTOCOL_GUID +#define LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE_PROTOCOL_GUID /// /// EFI_SYSTEM_TABLE & EFI_IMAGE_UNLOAD are defined in EfiApi.h @@ -35,40 +35,40 @@ /// /// Revision defined in EFI1.1. /// -#define EFI_LOADED_IMAGE_INFORMATION_REVISION EFI_LOADED_IMAGE_PROTOCOL_REVISION +#define EFI_LOADED_IMAGE_INFORMATION_REVISION EFI_LOADED_IMAGE_PROTOCOL_REVISION /// /// Can be used on any image handle to obtain information about the loaded image. /// typedef struct { - UINT32 Revision; ///< Defines the revision of the EFI_LOADED_IMAGE_PROTOCOL structure. - ///< All future revisions will be backward compatible to the current revision. - EFI_HANDLE ParentHandle; ///< Parent image's image handle. NULL if the image is loaded directly from - ///< the firmware's boot manager. - EFI_SYSTEM_TABLE *SystemTable; ///< the image's EFI system table pointer. + UINT32 Revision; ///< Defines the revision of the EFI_LOADED_IMAGE_PROTOCOL structure. + ///< All future revisions will be backward compatible to the current revision. + EFI_HANDLE ParentHandle; ///< Parent image's image handle. NULL if the image is loaded directly from + ///< the firmware's boot manager. + EFI_SYSTEM_TABLE *SystemTable; ///< the image's EFI system table pointer. // // Source location of image // - EFI_HANDLE DeviceHandle; ///< The device handle that the EFI Image was loaded from. - EFI_DEVICE_PATH_PROTOCOL *FilePath; ///< A pointer to the file path portion specific to DeviceHandle - ///< that the EFI Image was loaded from. - VOID *Reserved; ///< Reserved. DO NOT USE. + EFI_HANDLE DeviceHandle; ///< The device handle that the EFI Image was loaded from. + EFI_DEVICE_PATH_PROTOCOL *FilePath; ///< A pointer to the file path portion specific to DeviceHandle + ///< that the EFI Image was loaded from. + VOID *Reserved; ///< Reserved. DO NOT USE. // // Images load options // - UINT32 LoadOptionsSize;///< The size in bytes of LoadOptions. - VOID *LoadOptions; ///< A pointer to the image's binary load options. + UINT32 LoadOptionsSize; ///< The size in bytes of LoadOptions. + VOID *LoadOptions; ///< A pointer to the image's binary load options. // // Location of where image was loaded // - VOID *ImageBase; ///< The base address at which the image was loaded. - UINT64 ImageSize; ///< The size in bytes of the loaded image. - EFI_MEMORY_TYPE ImageCodeType; ///< The memory type that the code sections were loaded as. - EFI_MEMORY_TYPE ImageDataType; ///< The memory type that the data sections were loaded as. - EFI_IMAGE_UNLOAD Unload; + VOID *ImageBase; ///< The base address at which the image was loaded. + UINT64 ImageSize; ///< The size in bytes of the loaded image. + EFI_MEMORY_TYPE ImageCodeType; ///< The memory type that the code sections were loaded as. + EFI_MEMORY_TYPE ImageDataType; ///< The memory type that the data sections were loaded as. + EFI_IMAGE_UNLOAD Unload; } EFI_LOADED_IMAGE_PROTOCOL; // @@ -76,7 +76,7 @@ typedef struct { // typedef EFI_LOADED_IMAGE_PROTOCOL EFI_LOADED_IMAGE; -extern EFI_GUID gEfiLoadedImageProtocolGuid; -extern EFI_GUID gEfiLoadedImageDevicePathProtocolGuid; +extern EFI_GUID gEfiLoadedImageProtocolGuid; +extern EFI_GUID gEfiLoadedImageDevicePathProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/ManagedNetwork.h b/MdePkg/Include/Protocol/ManagedNetwork.h index 28f35a6..9ec9a68 100644 --- a/MdePkg/Include/Protocol/ManagedNetwork.h +++ b/MdePkg/Include/Protocol/ManagedNetwork.h @@ -84,38 +84,37 @@ typedef struct { } EFI_MANAGED_NETWORK_CONFIG_DATA; typedef struct { - EFI_TIME Timestamp; - EFI_EVENT RecycleEvent; - UINT32 PacketLength; - UINT32 HeaderLength; - UINT32 AddressLength; - UINT32 DataLength; - BOOLEAN BroadcastFlag; - BOOLEAN MulticastFlag; - BOOLEAN PromiscuousFlag; - UINT16 ProtocolType; - VOID *DestinationAddress; - VOID *SourceAddress; - VOID *MediaHeader; - VOID *PacketData; + EFI_TIME Timestamp; + EFI_EVENT RecycleEvent; + UINT32 PacketLength; + UINT32 HeaderLength; + UINT32 AddressLength; + UINT32 DataLength; + BOOLEAN BroadcastFlag; + BOOLEAN MulticastFlag; + BOOLEAN PromiscuousFlag; + UINT16 ProtocolType; + VOID *DestinationAddress; + VOID *SourceAddress; + VOID *MediaHeader; + VOID *PacketData; } EFI_MANAGED_NETWORK_RECEIVE_DATA; typedef struct { - UINT32 FragmentLength; - VOID *FragmentBuffer; + UINT32 FragmentLength; + VOID *FragmentBuffer; } EFI_MANAGED_NETWORK_FRAGMENT_DATA; typedef struct { - EFI_MAC_ADDRESS *DestinationAddress; //OPTIONAL - EFI_MAC_ADDRESS *SourceAddress; //OPTIONAL - UINT16 ProtocolType; //OPTIONAL - UINT32 DataLength; - UINT16 HeaderLength; //OPTIONAL - UINT16 FragmentCount; - EFI_MANAGED_NETWORK_FRAGMENT_DATA FragmentTable[1]; + EFI_MAC_ADDRESS *DestinationAddress; // OPTIONAL + EFI_MAC_ADDRESS *SourceAddress; // OPTIONAL + UINT16 ProtocolType; // OPTIONAL + UINT32 DataLength; + UINT16 HeaderLength; // OPTIONAL + UINT16 FragmentCount; + EFI_MANAGED_NETWORK_FRAGMENT_DATA FragmentTable[1]; } EFI_MANAGED_NETWORK_TRANSMIT_DATA; - typedef struct { /// /// This Event will be signaled after the Status field is updated @@ -123,21 +122,21 @@ typedef struct { /// EFI_NOTIFY_SIGNAL. The Task Priority Level (TPL) of /// Event must be lower than or equal to TPL_CALLBACK. /// - EFI_EVENT Event; + EFI_EVENT Event; /// /// The status that is returned to the caller at the end of the operation /// to indicate whether this operation completed successfully. /// - EFI_STATUS Status; + EFI_STATUS Status; union { /// /// When this token is used for receiving, RxData is a pointer to the EFI_MANAGED_NETWORK_RECEIVE_DATA. /// - EFI_MANAGED_NETWORK_RECEIVE_DATA *RxData; + EFI_MANAGED_NETWORK_RECEIVE_DATA *RxData; /// /// When this token is used for transmitting, TxData is a pointer to the EFI_MANAGED_NETWORK_TRANSMIT_DATA. /// - EFI_MANAGED_NETWORK_TRANSMIT_DATA *TxData; + EFI_MANAGED_NETWORK_TRANSMIT_DATA *TxData; } Packet; } EFI_MANAGED_NETWORK_COMPLETION_TOKEN; @@ -298,7 +297,6 @@ EFI_STATUS IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token ); - /** Aborts an asynchronous transmit or receive request. @@ -350,17 +348,17 @@ EFI_STATUS /// perform raw (unformatted) asynchronous network packet I/O. /// struct _EFI_MANAGED_NETWORK_PROTOCOL { - EFI_MANAGED_NETWORK_GET_MODE_DATA GetModeData; - EFI_MANAGED_NETWORK_CONFIGURE Configure; - EFI_MANAGED_NETWORK_MCAST_IP_TO_MAC McastIpToMac; - EFI_MANAGED_NETWORK_GROUPS Groups; - EFI_MANAGED_NETWORK_TRANSMIT Transmit; - EFI_MANAGED_NETWORK_RECEIVE Receive; - EFI_MANAGED_NETWORK_CANCEL Cancel; - EFI_MANAGED_NETWORK_POLL Poll; + EFI_MANAGED_NETWORK_GET_MODE_DATA GetModeData; + EFI_MANAGED_NETWORK_CONFIGURE Configure; + EFI_MANAGED_NETWORK_MCAST_IP_TO_MAC McastIpToMac; + EFI_MANAGED_NETWORK_GROUPS Groups; + EFI_MANAGED_NETWORK_TRANSMIT Transmit; + EFI_MANAGED_NETWORK_RECEIVE Receive; + EFI_MANAGED_NETWORK_CANCEL Cancel; + EFI_MANAGED_NETWORK_POLL Poll; }; -extern EFI_GUID gEfiManagedNetworkServiceBindingProtocolGuid; -extern EFI_GUID gEfiManagedNetworkProtocolGuid; +extern EFI_GUID gEfiManagedNetworkServiceBindingProtocolGuid; +extern EFI_GUID gEfiManagedNetworkProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Metronome.h b/MdePkg/Include/Protocol/Metronome.h index 4f9c083..d0e1d3d 100644 --- a/MdePkg/Include/Protocol/Metronome.h +++ b/MdePkg/Include/Protocol/Metronome.h @@ -20,7 +20,7 @@ /// /// Declare forward reference for the Metronome Architectural Protocol /// -typedef struct _EFI_METRONOME_ARCH_PROTOCOL EFI_METRONOME_ARCH_PROTOCOL; +typedef struct _EFI_METRONOME_ARCH_PROTOCOL EFI_METRONOME_ARCH_PROTOCOL; /** The WaitForTick() function waits for the number of ticks specified by @@ -47,8 +47,8 @@ typedef struct _EFI_METRONOME_ARCH_PROTOCOL EFI_METRONOME_ARCH_PROTOCOL; typedef EFI_STATUS (EFIAPI *EFI_METRONOME_WAIT_FOR_TICK)( - IN EFI_METRONOME_ARCH_PROTOCOL *This, - IN UINT32 TickNumber + IN EFI_METRONOME_ARCH_PROTOCOL *This, + IN UINT32 TickNumber ); /// @@ -57,7 +57,7 @@ EFI_STATUS /// require calibrated delays. /// struct _EFI_METRONOME_ARCH_PROTOCOL { - EFI_METRONOME_WAIT_FOR_TICK WaitForTick; + EFI_METRONOME_WAIT_FOR_TICK WaitForTick; /// /// The period of platform's known time source in 100 nS units. @@ -66,9 +66,9 @@ struct _EFI_METRONOME_ARCH_PROTOCOL { /// not be modified after the Metronome architectural protocol is /// installed. All consumers must treat this as a read-only field. /// - UINT32 TickPeriod; + UINT32 TickPeriod; }; -extern EFI_GUID gEfiMetronomeArchProtocolGuid; +extern EFI_GUID gEfiMetronomeArchProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/MmAccess.h b/MdePkg/Include/Protocol/MmAccess.h index 6b5eccb..8d108612 100644 --- a/MdePkg/Include/Protocol/MmAccess.h +++ b/MdePkg/Include/Protocol/MmAccess.h @@ -24,8 +24,7 @@ 0xc2702b74, 0x800c, 0x4131, {0x87, 0x46, 0x8f, 0xb5, 0xb8, 0x9c, 0xe4, 0xac } \ } - -typedef struct _EFI_MM_ACCESS_PROTOCOL EFI_MM_ACCESS_PROTOCOL; +typedef struct _EFI_MM_ACCESS_PROTOCOL EFI_MM_ACCESS_PROTOCOL; /** Opens the MMRAM area to be accessible by a boot-service driver. @@ -107,21 +106,20 @@ EFI_STATUS /// controller would publish this protocol. /// struct _EFI_MM_ACCESS_PROTOCOL { - EFI_MM_OPEN Open; - EFI_MM_CLOSE Close; - EFI_MM_LOCK Lock; - EFI_MM_CAPABILITIES GetCapabilities; + EFI_MM_OPEN Open; + EFI_MM_CLOSE Close; + EFI_MM_LOCK Lock; + EFI_MM_CAPABILITIES GetCapabilities; /// /// Indicates the current state of the MMRAM. Set to TRUE if MMRAM is locked. /// - BOOLEAN LockState; + BOOLEAN LockState; /// /// Indicates the current state of the MMRAM. Set to TRUE if MMRAM is open. /// - BOOLEAN OpenState; + BOOLEAN OpenState; }; -extern EFI_GUID gEfiMmAccessProtocolGuid; +extern EFI_GUID gEfiMmAccessProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/MmBase.h b/MdePkg/Include/Protocol/MmBase.h index 1e1d7b7..fa0310f 100644 --- a/MdePkg/Include/Protocol/MmBase.h +++ b/MdePkg/Include/Protocol/MmBase.h @@ -19,7 +19,7 @@ 0xf4ccbfb7, 0xf6e0, 0x47fd, {0x9d, 0xd4, 0x10, 0xa8, 0xf1, 0x50, 0xc1, 0x91 } \ } -typedef struct _EFI_MM_BASE_PROTOCOL EFI_MM_BASE_PROTOCOL; +typedef struct _EFI_MM_BASE_PROTOCOL EFI_MM_BASE_PROTOCOL; /** Service to indicate whether the driver is currently executing in the MM Initialization phase. @@ -71,11 +71,10 @@ EFI_STATUS /// services and determine whether the driver is being invoked inside MMRAM or outside of MMRAM. /// struct _EFI_MM_BASE_PROTOCOL { - EFI_MM_INSIDE_OUT InMm; - EFI_MM_GET_MMST_LOCATION GetMmstLocation; + EFI_MM_INSIDE_OUT InMm; + EFI_MM_GET_MMST_LOCATION GetMmstLocation; }; -extern EFI_GUID gEfiMmBaseProtocolGuid; +extern EFI_GUID gEfiMmBaseProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/MmCommunication.h b/MdePkg/Include/Protocol/MmCommunication.h index 34c3e2b..0ccb989 100644 --- a/MdePkg/Include/Protocol/MmCommunication.h +++ b/MdePkg/Include/Protocol/MmCommunication.h @@ -22,15 +22,15 @@ typedef struct { /// /// Allows for disambiguation of the message format. /// - EFI_GUID HeaderGuid; + EFI_GUID HeaderGuid; /// /// Describes the size of Data (in bytes) and does not include the size of the header. /// - UINTN MessageLength; + UINTN MessageLength; /// /// Designates an array of bytes that is MessageLength in size. /// - UINT8 Data[1]; + UINT8 Data[1]; } EFI_MM_COMMUNICATE_HEADER; #pragma pack() @@ -40,7 +40,7 @@ typedef struct { 0xc68ed8e2, 0x9dc6, 0x4cbd, { 0x9d, 0x94, 0xdb, 0x65, 0xac, 0xc5, 0xc3, 0x32 } \ } -typedef struct _EFI_MM_COMMUNICATION_PROTOCOL EFI_MM_COMMUNICATION_PROTOCOL; +typedef struct _EFI_MM_COMMUNICATION_PROTOCOL EFI_MM_COMMUNICATION_PROTOCOL; /** Communicates with a registered handler. @@ -78,10 +78,9 @@ EFI_STATUS /// between DXE drivers and a registered MMI handler. /// struct _EFI_MM_COMMUNICATION_PROTOCOL { - EFI_MM_COMMUNICATE Communicate; + EFI_MM_COMMUNICATE Communicate; }; -extern EFI_GUID gEfiMmCommunicationProtocolGuid; +extern EFI_GUID gEfiMmCommunicationProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/MmCommunication2.h b/MdePkg/Include/Protocol/MmCommunication2.h index 05f56dc..3495a73 100644 --- a/MdePkg/Include/Protocol/MmCommunication2.h +++ b/MdePkg/Include/Protocol/MmCommunication2.h @@ -20,7 +20,7 @@ 0x378daedc, 0xf06b, 0x4446, { 0x83, 0x14, 0x40, 0xab, 0x93, 0x3c, 0x87, 0xa3 } \ } -typedef struct _EFI_MM_COMMUNICATION2_PROTOCOL EFI_MM_COMMUNICATION2_PROTOCOL; +typedef struct _EFI_MM_COMMUNICATION2_PROTOCOL EFI_MM_COMMUNICATION2_PROTOCOL; /** Communicates with a registered handler. @@ -60,10 +60,9 @@ EFI_STATUS /// between DXE drivers and a registered MMI handler. /// struct _EFI_MM_COMMUNICATION2_PROTOCOL { - EFI_MM_COMMUNICATE2 Communicate; + EFI_MM_COMMUNICATE2 Communicate; }; -extern EFI_GUID gEfiMmCommunication2ProtocolGuid; +extern EFI_GUID gEfiMmCommunication2ProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/MmConfiguration.h b/MdePkg/Include/Protocol/MmConfiguration.h index d2fb6a1..e9d4108 100644 --- a/MdePkg/Include/Protocol/MmConfiguration.h +++ b/MdePkg/Include/Protocol/MmConfiguration.h @@ -21,7 +21,7 @@ 0x26eeb3de, 0xb689, 0x492e, {0x80, 0xf0, 0xbe, 0x8b, 0xd7, 0xda, 0x4b, 0xa7 } \ } -typedef struct _EFI_MM_CONFIGURATION_PROTOCOL EFI_MM_CONFIGURATION_PROTOCOL; +typedef struct _EFI_MM_CONFIGURATION_PROTOCOL EFI_MM_CONFIGURATION_PROTOCOL; /** Register the MM Foundation entry point. @@ -54,11 +54,10 @@ struct _EFI_MM_CONFIGURATION_PROTOCOL { /// /// A pointer to an array MMRAM ranges used by the initial MM entry code. /// - EFI_MM_RESERVED_MMRAM_REGION *MmramReservedRegions; - EFI_MM_REGISTER_MM_ENTRY RegisterMmEntry; + EFI_MM_RESERVED_MMRAM_REGION *MmramReservedRegions; + EFI_MM_REGISTER_MM_ENTRY RegisterMmEntry; }; -extern EFI_GUID gEfiMmConfigurationProtocolGuid; +extern EFI_GUID gEfiMmConfigurationProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/MmControl.h b/MdePkg/Include/Protocol/MmControl.h index c89ffea..2cb5b9b 100644 --- a/MdePkg/Include/Protocol/MmControl.h +++ b/MdePkg/Include/Protocol/MmControl.h @@ -27,7 +27,7 @@ } typedef struct _EFI_MM_CONTROL_PROTOCOL EFI_MM_CONTROL_PROTOCOL; -typedef UINTN EFI_MM_PERIOD; +typedef UINTN EFI_MM_PERIOD; /** Invokes MMI activation from either the preboot or runtime environment. @@ -83,18 +83,17 @@ EFI_STATUS /// these signals. /// struct _EFI_MM_CONTROL_PROTOCOL { - EFI_MM_ACTIVATE Trigger; - EFI_MM_DEACTIVATE Clear; + EFI_MM_ACTIVATE Trigger; + EFI_MM_DEACTIVATE Clear; /// /// Minimum interval at which the platform can set the period. A maximum is not /// specified in that the MM infrastructure code can emulate a maximum interval that is /// greater than the hardware capabilities by using software emulation in the MM /// infrastructure code. /// - EFI_MM_PERIOD MinimumTriggerPeriod; + EFI_MM_PERIOD MinimumTriggerPeriod; }; -extern EFI_GUID gEfiMmControlProtocolGuid; +extern EFI_GUID gEfiMmControlProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/MmCpu.h b/MdePkg/Include/Protocol/MmCpu.h index 4df527e..ee1b6aa 100644 --- a/MdePkg/Include/Protocol/MmCpu.h +++ b/MdePkg/Include/Protocol/MmCpu.h @@ -26,82 +26,82 @@ typedef enum { /// /// x86/X64 standard registers /// - EFI_MM_SAVE_STATE_REGISTER_GDTBASE = 4, - EFI_MM_SAVE_STATE_REGISTER_IDTBASE = 5, - EFI_MM_SAVE_STATE_REGISTER_LDTBASE = 6, - EFI_MM_SAVE_STATE_REGISTER_GDTLIMIT = 7, - EFI_MM_SAVE_STATE_REGISTER_IDTLIMIT = 8, - EFI_MM_SAVE_STATE_REGISTER_LDTLIMIT = 9, - EFI_MM_SAVE_STATE_REGISTER_LDTINFO = 10, - EFI_MM_SAVE_STATE_REGISTER_ES = 20, - EFI_MM_SAVE_STATE_REGISTER_CS = 21, - EFI_MM_SAVE_STATE_REGISTER_SS = 22, - EFI_MM_SAVE_STATE_REGISTER_DS = 23, - EFI_MM_SAVE_STATE_REGISTER_FS = 24, - EFI_MM_SAVE_STATE_REGISTER_GS = 25, - EFI_MM_SAVE_STATE_REGISTER_LDTR_SEL = 26, - EFI_MM_SAVE_STATE_REGISTER_TR_SEL = 27, - EFI_MM_SAVE_STATE_REGISTER_DR7 = 28, - EFI_MM_SAVE_STATE_REGISTER_DR6 = 29, - EFI_MM_SAVE_STATE_REGISTER_R8 = 30, - EFI_MM_SAVE_STATE_REGISTER_R9 = 31, - EFI_MM_SAVE_STATE_REGISTER_R10 = 32, - EFI_MM_SAVE_STATE_REGISTER_R11 = 33, - EFI_MM_SAVE_STATE_REGISTER_R12 = 34, - EFI_MM_SAVE_STATE_REGISTER_R13 = 35, - EFI_MM_SAVE_STATE_REGISTER_R14 = 36, - EFI_MM_SAVE_STATE_REGISTER_R15 = 37, - EFI_MM_SAVE_STATE_REGISTER_RAX = 38, - EFI_MM_SAVE_STATE_REGISTER_RBX = 39, - EFI_MM_SAVE_STATE_REGISTER_RCX = 40, - EFI_MM_SAVE_STATE_REGISTER_RDX = 41, - EFI_MM_SAVE_STATE_REGISTER_RSP = 42, - EFI_MM_SAVE_STATE_REGISTER_RBP = 43, - EFI_MM_SAVE_STATE_REGISTER_RSI = 44, - EFI_MM_SAVE_STATE_REGISTER_RDI = 45, - EFI_MM_SAVE_STATE_REGISTER_RIP = 46, - EFI_MM_SAVE_STATE_REGISTER_RFLAGS = 51, - EFI_MM_SAVE_STATE_REGISTER_CR0 = 52, - EFI_MM_SAVE_STATE_REGISTER_CR3 = 53, - EFI_MM_SAVE_STATE_REGISTER_CR4 = 54, - EFI_MM_SAVE_STATE_REGISTER_FCW = 256, - EFI_MM_SAVE_STATE_REGISTER_FSW = 257, - EFI_MM_SAVE_STATE_REGISTER_FTW = 258, - EFI_MM_SAVE_STATE_REGISTER_OPCODE = 259, - EFI_MM_SAVE_STATE_REGISTER_FP_EIP = 260, - EFI_MM_SAVE_STATE_REGISTER_FP_CS = 261, - EFI_MM_SAVE_STATE_REGISTER_DATAOFFSET = 262, - EFI_MM_SAVE_STATE_REGISTER_FP_DS = 263, - EFI_MM_SAVE_STATE_REGISTER_MM0 = 264, - EFI_MM_SAVE_STATE_REGISTER_MM1 = 265, - EFI_MM_SAVE_STATE_REGISTER_MM2 = 266, - EFI_MM_SAVE_STATE_REGISTER_MM3 = 267, - EFI_MM_SAVE_STATE_REGISTER_MM4 = 268, - EFI_MM_SAVE_STATE_REGISTER_MM5 = 269, - EFI_MM_SAVE_STATE_REGISTER_MM6 = 270, - EFI_MM_SAVE_STATE_REGISTER_MM7 = 271, - EFI_MM_SAVE_STATE_REGISTER_XMM0 = 272, - EFI_MM_SAVE_STATE_REGISTER_XMM1 = 273, - EFI_MM_SAVE_STATE_REGISTER_XMM2 = 274, - EFI_MM_SAVE_STATE_REGISTER_XMM3 = 275, - EFI_MM_SAVE_STATE_REGISTER_XMM4 = 276, - EFI_MM_SAVE_STATE_REGISTER_XMM5 = 277, - EFI_MM_SAVE_STATE_REGISTER_XMM6 = 278, - EFI_MM_SAVE_STATE_REGISTER_XMM7 = 279, - EFI_MM_SAVE_STATE_REGISTER_XMM8 = 280, - EFI_MM_SAVE_STATE_REGISTER_XMM9 = 281, - EFI_MM_SAVE_STATE_REGISTER_XMM10 = 282, - EFI_MM_SAVE_STATE_REGISTER_XMM11 = 283, - EFI_MM_SAVE_STATE_REGISTER_XMM12 = 284, - EFI_MM_SAVE_STATE_REGISTER_XMM13 = 285, - EFI_MM_SAVE_STATE_REGISTER_XMM14 = 286, - EFI_MM_SAVE_STATE_REGISTER_XMM15 = 287, + EFI_MM_SAVE_STATE_REGISTER_GDTBASE = 4, + EFI_MM_SAVE_STATE_REGISTER_IDTBASE = 5, + EFI_MM_SAVE_STATE_REGISTER_LDTBASE = 6, + EFI_MM_SAVE_STATE_REGISTER_GDTLIMIT = 7, + EFI_MM_SAVE_STATE_REGISTER_IDTLIMIT = 8, + EFI_MM_SAVE_STATE_REGISTER_LDTLIMIT = 9, + EFI_MM_SAVE_STATE_REGISTER_LDTINFO = 10, + EFI_MM_SAVE_STATE_REGISTER_ES = 20, + EFI_MM_SAVE_STATE_REGISTER_CS = 21, + EFI_MM_SAVE_STATE_REGISTER_SS = 22, + EFI_MM_SAVE_STATE_REGISTER_DS = 23, + EFI_MM_SAVE_STATE_REGISTER_FS = 24, + EFI_MM_SAVE_STATE_REGISTER_GS = 25, + EFI_MM_SAVE_STATE_REGISTER_LDTR_SEL = 26, + EFI_MM_SAVE_STATE_REGISTER_TR_SEL = 27, + EFI_MM_SAVE_STATE_REGISTER_DR7 = 28, + EFI_MM_SAVE_STATE_REGISTER_DR6 = 29, + EFI_MM_SAVE_STATE_REGISTER_R8 = 30, + EFI_MM_SAVE_STATE_REGISTER_R9 = 31, + EFI_MM_SAVE_STATE_REGISTER_R10 = 32, + EFI_MM_SAVE_STATE_REGISTER_R11 = 33, + EFI_MM_SAVE_STATE_REGISTER_R12 = 34, + EFI_MM_SAVE_STATE_REGISTER_R13 = 35, + EFI_MM_SAVE_STATE_REGISTER_R14 = 36, + EFI_MM_SAVE_STATE_REGISTER_R15 = 37, + EFI_MM_SAVE_STATE_REGISTER_RAX = 38, + EFI_MM_SAVE_STATE_REGISTER_RBX = 39, + EFI_MM_SAVE_STATE_REGISTER_RCX = 40, + EFI_MM_SAVE_STATE_REGISTER_RDX = 41, + EFI_MM_SAVE_STATE_REGISTER_RSP = 42, + EFI_MM_SAVE_STATE_REGISTER_RBP = 43, + EFI_MM_SAVE_STATE_REGISTER_RSI = 44, + EFI_MM_SAVE_STATE_REGISTER_RDI = 45, + EFI_MM_SAVE_STATE_REGISTER_RIP = 46, + EFI_MM_SAVE_STATE_REGISTER_RFLAGS = 51, + EFI_MM_SAVE_STATE_REGISTER_CR0 = 52, + EFI_MM_SAVE_STATE_REGISTER_CR3 = 53, + EFI_MM_SAVE_STATE_REGISTER_CR4 = 54, + EFI_MM_SAVE_STATE_REGISTER_FCW = 256, + EFI_MM_SAVE_STATE_REGISTER_FSW = 257, + EFI_MM_SAVE_STATE_REGISTER_FTW = 258, + EFI_MM_SAVE_STATE_REGISTER_OPCODE = 259, + EFI_MM_SAVE_STATE_REGISTER_FP_EIP = 260, + EFI_MM_SAVE_STATE_REGISTER_FP_CS = 261, + EFI_MM_SAVE_STATE_REGISTER_DATAOFFSET = 262, + EFI_MM_SAVE_STATE_REGISTER_FP_DS = 263, + EFI_MM_SAVE_STATE_REGISTER_MM0 = 264, + EFI_MM_SAVE_STATE_REGISTER_MM1 = 265, + EFI_MM_SAVE_STATE_REGISTER_MM2 = 266, + EFI_MM_SAVE_STATE_REGISTER_MM3 = 267, + EFI_MM_SAVE_STATE_REGISTER_MM4 = 268, + EFI_MM_SAVE_STATE_REGISTER_MM5 = 269, + EFI_MM_SAVE_STATE_REGISTER_MM6 = 270, + EFI_MM_SAVE_STATE_REGISTER_MM7 = 271, + EFI_MM_SAVE_STATE_REGISTER_XMM0 = 272, + EFI_MM_SAVE_STATE_REGISTER_XMM1 = 273, + EFI_MM_SAVE_STATE_REGISTER_XMM2 = 274, + EFI_MM_SAVE_STATE_REGISTER_XMM3 = 275, + EFI_MM_SAVE_STATE_REGISTER_XMM4 = 276, + EFI_MM_SAVE_STATE_REGISTER_XMM5 = 277, + EFI_MM_SAVE_STATE_REGISTER_XMM6 = 278, + EFI_MM_SAVE_STATE_REGISTER_XMM7 = 279, + EFI_MM_SAVE_STATE_REGISTER_XMM8 = 280, + EFI_MM_SAVE_STATE_REGISTER_XMM9 = 281, + EFI_MM_SAVE_STATE_REGISTER_XMM10 = 282, + EFI_MM_SAVE_STATE_REGISTER_XMM11 = 283, + EFI_MM_SAVE_STATE_REGISTER_XMM12 = 284, + EFI_MM_SAVE_STATE_REGISTER_XMM13 = 285, + EFI_MM_SAVE_STATE_REGISTER_XMM14 = 286, + EFI_MM_SAVE_STATE_REGISTER_XMM15 = 287, /// /// Pseudo-Registers /// - EFI_MM_SAVE_STATE_REGISTER_IO = 512, - EFI_MM_SAVE_STATE_REGISTER_LMA = 513, - EFI_MM_SAVE_STATE_REGISTER_PROCESSOR_ID = 514 + EFI_MM_SAVE_STATE_REGISTER_IO = 512, + EFI_MM_SAVE_STATE_REGISTER_LMA = 513, + EFI_MM_SAVE_STATE_REGISTER_PROCESSOR_ID = 514 } EFI_MM_SAVE_STATE_REGISTER; /// @@ -117,20 +117,20 @@ typedef enum { /// Size width of I/O instruction /// typedef enum { - EFI_MM_SAVE_STATE_IO_WIDTH_UINT8 = 0, - EFI_MM_SAVE_STATE_IO_WIDTH_UINT16 = 1, - EFI_MM_SAVE_STATE_IO_WIDTH_UINT32 = 2, - EFI_MM_SAVE_STATE_IO_WIDTH_UINT64 = 3 + EFI_MM_SAVE_STATE_IO_WIDTH_UINT8 = 0, + EFI_MM_SAVE_STATE_IO_WIDTH_UINT16 = 1, + EFI_MM_SAVE_STATE_IO_WIDTH_UINT32 = 2, + EFI_MM_SAVE_STATE_IO_WIDTH_UINT64 = 3 } EFI_MM_SAVE_STATE_IO_WIDTH; /// /// Types of I/O instruction /// typedef enum { - EFI_MM_SAVE_STATE_IO_TYPE_INPUT = 1, - EFI_MM_SAVE_STATE_IO_TYPE_OUTPUT = 2, - EFI_MM_SAVE_STATE_IO_TYPE_STRING = 4, - EFI_MM_SAVE_STATE_IO_TYPE_REP_PREFIX = 8 + EFI_MM_SAVE_STATE_IO_TYPE_INPUT = 1, + EFI_MM_SAVE_STATE_IO_TYPE_OUTPUT = 2, + EFI_MM_SAVE_STATE_IO_TYPE_STRING = 4, + EFI_MM_SAVE_STATE_IO_TYPE_REP_PREFIX = 8 } EFI_MM_SAVE_STATE_IO_TYPE; /// @@ -161,7 +161,7 @@ typedef struct _EFI_MM_SAVE_STATE_IO_INFO { EFI_MM_SAVE_STATE_IO_TYPE IoType; } EFI_MM_SAVE_STATE_IO_INFO; -typedef struct _EFI_MM_CPU_PROTOCOL EFI_MM_CPU_PROTOCOL; +typedef struct _EFI_MM_CPU_PROTOCOL EFI_MM_CPU_PROTOCOL; /** Read data from the CPU save state. @@ -192,7 +192,6 @@ EFI_STATUS OUT VOID *Buffer ); - /** Write data to the CPU save state. @@ -231,11 +230,10 @@ EFI_STATUS /// format. /// struct _EFI_MM_CPU_PROTOCOL { - EFI_MM_READ_SAVE_STATE ReadSaveState; - EFI_MM_WRITE_SAVE_STATE WriteSaveState; + EFI_MM_READ_SAVE_STATE ReadSaveState; + EFI_MM_WRITE_SAVE_STATE WriteSaveState; }; -extern EFI_GUID gEfiMmCpuProtocolGuid; +extern EFI_GUID gEfiMmCpuProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/MmCpuIo.h b/MdePkg/Include/Protocol/MmCpuIo.h index 2e7c829..a723f87 100644 --- a/MdePkg/Include/Protocol/MmCpuIo.h +++ b/MdePkg/Include/Protocol/MmCpuIo.h @@ -16,7 +16,7 @@ 0x3242A9D8, 0xCE70, 0x4AA0, { 0x95, 0x5D, 0x5E, 0x7B, 0x14, 0x0D, 0xE4, 0xD2 } \ } -typedef struct _EFI_MM_CPU_IO_PROTOCOL EFI_MM_CPU_IO_PROTOCOL; +typedef struct _EFI_MM_CPU_IO_PROTOCOL EFI_MM_CPU_IO_PROTOCOL; /// /// Width of the MM CPU I/O operations @@ -64,11 +64,11 @@ typedef struct { /// /// This service provides the various modalities of memory and I/O read. /// - EFI_MM_CPU_IO Read; + EFI_MM_CPU_IO Read; /// /// This service provides the various modalities of memory and I/O write. /// - EFI_MM_CPU_IO Write; + EFI_MM_CPU_IO Write; } EFI_MM_IO_ACCESS; /// @@ -78,13 +78,13 @@ struct _EFI_MM_CPU_IO_PROTOCOL { /// /// Allows reads and writes to memory-mapped I/O space. /// - EFI_MM_IO_ACCESS Mem; + EFI_MM_IO_ACCESS Mem; /// /// Allows reads and writes to I/O space. /// - EFI_MM_IO_ACCESS Io; + EFI_MM_IO_ACCESS Io; }; -extern EFI_GUID gEfiMmCpuIoProtocolGuid; +extern EFI_GUID gEfiMmCpuIoProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/MmEndOfDxe.h b/MdePkg/Include/Protocol/MmEndOfDxe.h index cecee97..8b86555 100644 --- a/MdePkg/Include/Protocol/MmEndOfDxe.h +++ b/MdePkg/Include/Protocol/MmEndOfDxe.h @@ -19,6 +19,6 @@ 0x24e70042, 0xd5c5, 0x4260, { 0x8c, 0x39, 0xa, 0xd3, 0xaa, 0x32, 0xe9, 0x3d } \ } -extern EFI_GUID gEfiMmEndOfDxeProtocolGuid; +extern EFI_GUID gEfiMmEndOfDxeProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/MmGpiDispatch.h b/MdePkg/Include/Protocol/MmGpiDispatch.h index ed20e97..0ce11bb 100644 --- a/MdePkg/Include/Protocol/MmGpiDispatch.h +++ b/MdePkg/Include/Protocol/MmGpiDispatch.h @@ -36,7 +36,7 @@ typedef struct { /// 0 corresponds to logical GPI[0]; 1 corresponds to logical GPI[1]; and /// GpiNum of N corresponds to GPI[N], where N can span from 0 to 2^64-1. /// - UINT64 GpiNum; + UINT64 GpiNum; } EFI_MM_GPI_REGISTER_CONTEXT; typedef struct _EFI_MM_GPI_DISPATCH_PROTOCOL EFI_MM_GPI_DISPATCH_PROTOCOL; @@ -105,15 +105,14 @@ EFI_STATUS /// for the General Purpose Input (GPI) MMI source generator. /// struct _EFI_MM_GPI_DISPATCH_PROTOCOL { - EFI_MM_GPI_REGISTER Register; - EFI_MM_GPI_UNREGISTER UnRegister; + EFI_MM_GPI_REGISTER Register; + EFI_MM_GPI_UNREGISTER UnRegister; /// /// Denotes the maximum value of inputs that can have handlers attached. /// - UINTN NumSupportedGpis; + UINTN NumSupportedGpis; }; -extern EFI_GUID gEfiMmGpiDispatchProtocolGuid; +extern EFI_GUID gEfiMmGpiDispatchProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/MmIoTrapDispatch.h b/MdePkg/Include/Protocol/MmIoTrapDispatch.h index 3c9905f..e18d88d 100644 --- a/MdePkg/Include/Protocol/MmIoTrapDispatch.h +++ b/MdePkg/Include/Protocol/MmIoTrapDispatch.h @@ -37,16 +37,16 @@ typedef enum { /// IO trap event that should invoke the handler /// typedef struct { - UINT16 Address; - UINT16 Length; - EFI_MM_IO_TRAP_DISPATCH_TYPE Type; + UINT16 Address; + UINT16 Length; + EFI_MM_IO_TRAP_DISPATCH_TYPE Type; } EFI_MM_IO_TRAP_REGISTER_CONTEXT; /// /// IO Trap context structure containing information about the IO trap that occurred /// typedef struct { - UINT32 WriteData; + UINT32 WriteData; } EFI_MM_IO_TRAP_CONTEXT; typedef struct _EFI_MM_IO_TRAP_DISPATCH_PROTOCOL EFI_MM_IO_TRAP_DISPATCH_PROTOCOL; @@ -92,7 +92,7 @@ EFI_STATUS IN CONST EFI_MM_IO_TRAP_DISPATCH_PROTOCOL *This, IN EFI_MM_HANDLER_ENTRY_POINT DispatchFunction, IN OUT EFI_MM_IO_TRAP_REGISTER_CONTEXT *RegisterContext, - OUT EFI_HANDLE *DispatchHandle + OUT EFI_HANDLE *DispatchHandle ); /** @@ -120,11 +120,10 @@ EFI_STATUS /// This protocol provides a parent dispatch service for IO trap MMI sources. /// struct _EFI_MM_IO_TRAP_DISPATCH_PROTOCOL { - EFI_MM_IO_TRAP_DISPATCH_REGISTER Register; - EFI_MM_IO_TRAP_DISPATCH_UNREGISTER UnRegister; + EFI_MM_IO_TRAP_DISPATCH_REGISTER Register; + EFI_MM_IO_TRAP_DISPATCH_UNREGISTER UnRegister; }; -extern EFI_GUID gEfiMmIoTrapDispatchProtocolGuid; +extern EFI_GUID gEfiMmIoTrapDispatchProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/MmMp.h b/MdePkg/Include/Protocol/MmMp.h index beace13..ad958c8 100644 --- a/MdePkg/Include/Protocol/MmMp.h +++ b/MdePkg/Include/Protocol/MmMp.h @@ -26,24 +26,24 @@ // // Revision definition. // -#define EFI_MM_MP_PROTOCOL_REVISION 0x00 +#define EFI_MM_MP_PROTOCOL_REVISION 0x00 // // Attribute flags // -#define EFI_MM_MP_TIMEOUT_SUPPORTED 0x01 +#define EFI_MM_MP_TIMEOUT_SUPPORTED 0x01 // // Completion token // -typedef VOID* MM_COMPLETION; +typedef VOID *MM_COMPLETION; typedef struct { - MM_COMPLETION Completion; - EFI_STATUS Status; + MM_COMPLETION Completion; + EFI_STATUS Status; } MM_DISPATCH_COMPLETION_TOKEN; -typedef struct _EFI_MM_MP_PROTOCOL EFI_MM_MP_PROTOCOL; +typedef struct _EFI_MM_MP_PROTOCOL EFI_MM_MP_PROTOCOL; /** Service to retrieves the number of logical processor in the platform. @@ -57,11 +57,10 @@ typedef struct _EFI_MM_MP_PROTOCOL EFI_MM_MP_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI *EFI_MM_GET_NUMBER_OF_PROCESSORS) ( +(EFIAPI *EFI_MM_GET_NUMBER_OF_PROCESSORS)( IN CONST EFI_MM_MP_PROTOCOL *This, OUT UINTN *NumberOfProcessors -); - + ); /** This service allows the caller to invoke a procedure one of the application processors (AP). This @@ -124,7 +123,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_MM_DISPATCH_PROCEDURE) ( +(EFIAPI *EFI_MM_DISPATCH_PROCEDURE)( IN CONST EFI_MM_MP_PROTOCOL *This, IN EFI_AP_PROCEDURE2 Procedure, IN UINTN CpuNumber, @@ -132,7 +131,7 @@ EFI_STATUS IN OUT VOID *ProcedureArguments OPTIONAL, IN OUT MM_COMPLETION *Token, IN OUT EFI_STATUS *CPUStatus -); + ); /** This service allows the caller to invoke a procedure on all running application processors (AP) @@ -202,15 +201,14 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_MM_BROADCAST_PROCEDURE) ( +(EFIAPI *EFI_MM_BROADCAST_PROCEDURE)( IN CONST EFI_MM_MP_PROTOCOL *This, IN EFI_AP_PROCEDURE2 Procedure, IN UINTN TimeoutInMicroseconds, IN OUT VOID *ProcedureArguments OPTIONAL, IN OUT MM_COMPLETION *Token, IN OUT EFI_STATUS *CPUStatus -); - + ); /** This service allows the caller to set a startup procedure that will be executed when an AP powers @@ -238,11 +236,11 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_MM_SET_STARTUP_PROCEDURE) ( +(EFIAPI *EFI_MM_SET_STARTUP_PROCEDURE)( IN CONST EFI_MM_MP_PROTOCOL *This, IN EFI_AP_PROCEDURE Procedure, IN OUT VOID *ProcedureArguments OPTIONAL -); + ); /** When non-blocking execution of a procedure on an AP is invoked with DispatchProcedure, @@ -274,10 +272,10 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_CHECK_FOR_PROCEDURE) ( +(EFIAPI *EFI_CHECK_FOR_PROCEDURE)( IN CONST EFI_MM_MP_PROTOCOL *This, IN MM_COMPLETION Token -); + ); /** When a non-blocking execution of a procedure on an AP is invoked via DispatchProcedure, @@ -306,28 +304,26 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_WAIT_FOR_PROCEDURE) ( +(EFIAPI *EFI_WAIT_FOR_PROCEDURE)( IN CONST EFI_MM_MP_PROTOCOL *This, IN MM_COMPLETION Token -); - - + ); /// /// The MM MP protocol provides a set of functions to allow execution of procedures on processors that /// have entered MM. /// struct _EFI_MM_MP_PROTOCOL { - UINT32 Revision; - UINT32 Attributes; - EFI_MM_GET_NUMBER_OF_PROCESSORS GetNumberOfProcessors; - EFI_MM_DISPATCH_PROCEDURE DispatchProcedure; - EFI_MM_BROADCAST_PROCEDURE BroadcastProcedure; - EFI_MM_SET_STARTUP_PROCEDURE SetStartupProcedure; - EFI_CHECK_FOR_PROCEDURE CheckForProcedure; - EFI_WAIT_FOR_PROCEDURE WaitForProcedure; + UINT32 Revision; + UINT32 Attributes; + EFI_MM_GET_NUMBER_OF_PROCESSORS GetNumberOfProcessors; + EFI_MM_DISPATCH_PROCEDURE DispatchProcedure; + EFI_MM_BROADCAST_PROCEDURE BroadcastProcedure; + EFI_MM_SET_STARTUP_PROCEDURE SetStartupProcedure; + EFI_CHECK_FOR_PROCEDURE CheckForProcedure; + EFI_WAIT_FOR_PROCEDURE WaitForProcedure; }; -extern EFI_GUID gEfiMmMpProtocolGuid; +extern EFI_GUID gEfiMmMpProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/MmPciRootBridgeIo.h b/MdePkg/Include/Protocol/MmPciRootBridgeIo.h index faf6e27..7535a39 100644 --- a/MdePkg/Include/Protocol/MmPciRootBridgeIo.h +++ b/MdePkg/Include/Protocol/MmPciRootBridgeIo.h @@ -23,9 +23,8 @@ /// UEFI 2.1 Specifcation, section 13.2, except that the functions for Map() and Unmap() may return /// EFI_UNSUPPORTED. /// -typedef EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL EFI_MM_PCI_ROOT_BRIDGE_IO_PROTOCOL; +typedef EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL EFI_MM_PCI_ROOT_BRIDGE_IO_PROTOCOL; -extern EFI_GUID gEfiMmPciRootBridgeIoProtocolGuid; +extern EFI_GUID gEfiMmPciRootBridgeIoProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/MmPeriodicTimerDispatch.h b/MdePkg/Include/Protocol/MmPeriodicTimerDispatch.h index 8733de7..01b4e6b 100644 --- a/MdePkg/Include/Protocol/MmPeriodicTimerDispatch.h +++ b/MdePkg/Include/Protocol/MmPeriodicTimerDispatch.h @@ -46,13 +46,13 @@ typedef struct { /// The minimum period of time in 100 nanosecond units that the child gets called. The /// child will be called back after a time greater than the time Period. /// - UINT64 Period; + UINT64 Period; /// /// The period of time interval between MMIs. Children of this interface should use this /// field when registering for periodic timer intervals when a finer granularity periodic /// MMI is desired. /// - UINT64 MmiTickInterval; + UINT64 MmiTickInterval; } EFI_MM_PERIODIC_TIMER_REGISTER_CONTEXT; /// @@ -65,10 +65,10 @@ typedef struct { /// ElapsedTime is the actual time in 100 nanosecond units elapsed since last called, a /// value of 0 indicates an unknown amount of time. /// - UINT64 ElapsedTime; + UINT64 ElapsedTime; } EFI_MM_PERIODIC_TIMER_CONTEXT; -typedef struct _EFI_MM_PERIODIC_TIMER_DISPATCH_PROTOCOL EFI_MM_PERIODIC_TIMER_DISPATCH_PROTOCOL; +typedef struct _EFI_MM_PERIODIC_TIMER_DISPATCH_PROTOCOL EFI_MM_PERIODIC_TIMER_DISPATCH_PROTOCOL; /** Register a child MMI source dispatch function for MM periodic timer. @@ -153,12 +153,11 @@ EFI_STATUS /// This protocol provides the parent dispatch service for the periodical timer MMI source generator. /// struct _EFI_MM_PERIODIC_TIMER_DISPATCH_PROTOCOL { - EFI_MM_PERIODIC_TIMER_REGISTER Register; - EFI_MM_PERIODIC_TIMER_UNREGISTER UnRegister; - EFI_MM_PERIODIC_TIMER_INTERVAL GetNextShorterInterval; + EFI_MM_PERIODIC_TIMER_REGISTER Register; + EFI_MM_PERIODIC_TIMER_UNREGISTER UnRegister; + EFI_MM_PERIODIC_TIMER_INTERVAL GetNextShorterInterval; }; -extern EFI_GUID gEfiMmPeriodicTimerDispatchProtocolGuid; +extern EFI_GUID gEfiMmPeriodicTimerDispatchProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/MmPowerButtonDispatch.h b/MdePkg/Include/Protocol/MmPowerButtonDispatch.h index a7697a8..0a61b3f 100644 --- a/MdePkg/Include/Protocol/MmPowerButtonDispatch.h +++ b/MdePkg/Include/Protocol/MmPowerButtonDispatch.h @@ -38,7 +38,7 @@ typedef struct { /// /// Designates whether this handler should be invoked upon entry or exit. /// - EFI_POWER_BUTTON_PHASE Phase; + EFI_POWER_BUTTON_PHASE Phase; } EFI_MM_POWER_BUTTON_REGISTER_CONTEXT; typedef struct _EFI_MM_POWER_BUTTON_DISPATCH_PROTOCOL EFI_MM_POWER_BUTTON_DISPATCH_PROTOCOL; @@ -101,11 +101,10 @@ EFI_STATUS /// This protocol provides the parent dispatch service for the power button MMI source generator. /// struct _EFI_MM_POWER_BUTTON_DISPATCH_PROTOCOL { - EFI_MM_POWER_BUTTON_REGISTER Register; - EFI_MM_POWER_BUTTON_UNREGISTER UnRegister; + EFI_MM_POWER_BUTTON_REGISTER Register; + EFI_MM_POWER_BUTTON_UNREGISTER UnRegister; }; -extern EFI_GUID gEfiMmPowerButtonDispatchProtocolGuid; +extern EFI_GUID gEfiMmPowerButtonDispatchProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/MmReadyToLock.h b/MdePkg/Include/Protocol/MmReadyToLock.h index 17088cd..b8fa3b5 100644 --- a/MdePkg/Include/Protocol/MmReadyToLock.h +++ b/MdePkg/Include/Protocol/MmReadyToLock.h @@ -21,6 +21,6 @@ 0x47b7fa8c, 0xf4bd, 0x4af6, { 0x82, 0x00, 0x33, 0x30, 0x86, 0xf0, 0xd2, 0xc8 } \ } -extern EFI_GUID gEfiMmReadyToLockProtocolGuid; +extern EFI_GUID gEfiMmReadyToLockProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/MmReportStatusCodeHandler.h b/MdePkg/Include/Protocol/MmReportStatusCodeHandler.h index f97509e..64c865f 100644 --- a/MdePkg/Include/Protocol/MmReportStatusCodeHandler.h +++ b/MdePkg/Include/Protocol/MmReportStatusCodeHandler.h @@ -25,7 +25,7 @@ EFI_STATUS IN UINT32 Instance, IN EFI_GUID *CallerId, IN EFI_STATUS_CODE_DATA *Data -); + ); /** Register the callback function for ReportStatusCode() notification. @@ -46,7 +46,7 @@ typedef EFI_STATUS (EFIAPI *EFI_MM_RSC_HANDLER_REGISTER)( IN EFI_MM_RSC_HANDLER_CALLBACK Callback -); + ); /** Remove a previously registered callback function from the notification list. @@ -66,13 +66,13 @@ typedef EFI_STATUS (EFIAPI *EFI_MM_RSC_HANDLER_UNREGISTER)( IN EFI_MM_RSC_HANDLER_CALLBACK Callback -); + ); typedef struct _EFI_MM_RSC_HANDLER_PROTOCOL { EFI_MM_RSC_HANDLER_REGISTER Register; EFI_MM_RSC_HANDLER_UNREGISTER Unregister; } EFI_MM_RSC_HANDLER_PROTOCOL; -extern EFI_GUID gEfiMmRscHandlerProtocolGuid; +extern EFI_GUID gEfiMmRscHandlerProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/MmStandbyButtonDispatch.h b/MdePkg/Include/Protocol/MmStandbyButtonDispatch.h index 49d105b..1a76f85 100644 --- a/MdePkg/Include/Protocol/MmStandbyButtonDispatch.h +++ b/MdePkg/Include/Protocol/MmStandbyButtonDispatch.h @@ -39,7 +39,7 @@ typedef struct { /// Describes whether the child handler should be invoked upon the entry to the button /// activation or upon exit. /// - EFI_STANDBY_BUTTON_PHASE Phase; + EFI_STANDBY_BUTTON_PHASE Phase; } EFI_MM_STANDBY_BUTTON_REGISTER_CONTEXT; typedef struct _EFI_MM_STANDBY_BUTTON_DISPATCH_PROTOCOL EFI_MM_STANDBY_BUTTON_DISPATCH_PROTOCOL; @@ -103,11 +103,10 @@ EFI_STATUS /// button MMI source generator. /// struct _EFI_MM_STANDBY_BUTTON_DISPATCH_PROTOCOL { - EFI_MM_STANDBY_BUTTON_REGISTER Register; - EFI_MM_STANDBY_BUTTON_UNREGISTER UnRegister; + EFI_MM_STANDBY_BUTTON_REGISTER Register; + EFI_MM_STANDBY_BUTTON_UNREGISTER UnRegister; }; -extern EFI_GUID gEfiMmStandbyButtonDispatchProtocolGuid; +extern EFI_GUID gEfiMmStandbyButtonDispatchProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/MmStatusCode.h b/MdePkg/Include/Protocol/MmStatusCode.h index ce9c51e..771cbee 100644 --- a/MdePkg/Include/Protocol/MmStatusCode.h +++ b/MdePkg/Include/Protocol/MmStatusCode.h @@ -11,13 +11,12 @@ #ifndef _MM_STATUS_CODE_H__ #define _MM_STATUS_CODE_H__ - #define EFI_MM_STATUS_CODE_PROTOCOL_GUID \ { \ 0x6afd2b77, 0x98c1, 0x4acd, {0xa6, 0xf9, 0x8a, 0x94, 0x39, 0xde, 0xf, 0xb1} \ } -typedef struct _EFI_MM_STATUS_CODE_PROTOCOL EFI_MM_STATUS_CODE_PROTOCOL; +typedef struct _EFI_MM_STATUS_CODE_PROTOCOL EFI_MM_STATUS_CODE_PROTOCOL; /** Service to emit the status code in MM. @@ -50,10 +49,9 @@ EFI_STATUS ); struct _EFI_MM_STATUS_CODE_PROTOCOL { - EFI_MM_REPORT_STATUS_CODE ReportStatusCode; + EFI_MM_REPORT_STATUS_CODE ReportStatusCode; }; -extern EFI_GUID gEfiMmStatusCodeProtocolGuid; +extern EFI_GUID gEfiMmStatusCodeProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/MmSwDispatch.h b/MdePkg/Include/Protocol/MmSwDispatch.h index a3f4b41..e781066 100644 --- a/MdePkg/Include/Protocol/MmSwDispatch.h +++ b/MdePkg/Include/Protocol/MmSwDispatch.h @@ -25,7 +25,7 @@ /// child registration for each SwMmiInputValue. /// typedef struct { - UINTN SwMmiInputValue; + UINTN SwMmiInputValue; } EFI_MM_SW_REGISTER_CONTEXT; /// @@ -38,18 +38,18 @@ typedef struct { /// /// The 0-based index of the CPU which generated the software MMI. /// - UINTN SwMmiCpuIndex; + UINTN SwMmiCpuIndex; /// /// This value corresponds directly to the CommandPort parameter used in the call to Trigger(). /// - UINT8 CommandPort; + UINT8 CommandPort; /// /// This value corresponds directly to the DataPort parameter used in the call to Trigger(). /// - UINT8 DataPort; + UINT8 DataPort; } EFI_MM_SW_CONTEXT; -typedef struct _EFI_MM_SW_DISPATCH_PROTOCOL EFI_MM_SW_DISPATCH_PROTOCOL; +typedef struct _EFI_MM_SW_DISPATCH_PROTOCOL EFI_MM_SW_DISPATCH_PROTOCOL; /** Register a child MMI source dispatch function for the specified software MMI. @@ -106,7 +106,7 @@ EFI_STATUS (EFIAPI *EFI_MM_SW_UNREGISTER)( IN CONST EFI_MM_SW_DISPATCH_PROTOCOL *This, IN EFI_HANDLE DispatchHandle -); + ); /// /// Interface structure for the MM Software MMI Dispatch Protocol. @@ -116,15 +116,15 @@ EFI_STATUS /// interrupt in the EFI_MM_SW_REGISTER_CONTEXT is denoted by MaximumSwiValue. /// struct _EFI_MM_SW_DISPATCH_PROTOCOL { - EFI_MM_SW_REGISTER Register; - EFI_MM_SW_UNREGISTER UnRegister; + EFI_MM_SW_REGISTER Register; + EFI_MM_SW_UNREGISTER UnRegister; /// /// A read-only field that describes the maximum value that can be used in the /// EFI_MM_SW_DISPATCH_PROTOCOL.Register() service. /// - UINTN MaximumSwiValue; + UINTN MaximumSwiValue; }; -extern EFI_GUID gEfiMmSwDispatchProtocolGuid; +extern EFI_GUID gEfiMmSwDispatchProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/MmSxDispatch.h b/MdePkg/Include/Protocol/MmSxDispatch.h index 8a53be6..f9f74a2 100644 --- a/MdePkg/Include/Protocol/MmSxDispatch.h +++ b/MdePkg/Include/Protocol/MmSxDispatch.h @@ -45,11 +45,11 @@ typedef enum { /// The dispatch function's context /// typedef struct { - EFI_SLEEP_TYPE Type; - EFI_SLEEP_PHASE Phase; + EFI_SLEEP_TYPE Type; + EFI_SLEEP_PHASE Phase; } EFI_MM_SX_REGISTER_CONTEXT; -typedef struct _EFI_MM_SX_DISPATCH_PROTOCOL EFI_MM_SX_DISPATCH_PROTOCOL; +typedef struct _EFI_MM_SX_DISPATCH_PROTOCOL EFI_MM_SX_DISPATCH_PROTOCOL; /** Provides the parent dispatch service for a given Sx source generator. @@ -120,10 +120,10 @@ EFI_STATUS /// respond to sleep state related events. /// struct _EFI_MM_SX_DISPATCH_PROTOCOL { - EFI_MM_SX_REGISTER Register; - EFI_MM_SX_UNREGISTER UnRegister; + EFI_MM_SX_REGISTER Register; + EFI_MM_SX_UNREGISTER UnRegister; }; -extern EFI_GUID gEfiMmSxDispatchProtocolGuid; +extern EFI_GUID gEfiMmSxDispatchProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/MmUsbDispatch.h b/MdePkg/Include/Protocol/MmUsbDispatch.h index c5d5bc5..b250add 100644 --- a/MdePkg/Include/Protocol/MmUsbDispatch.h +++ b/MdePkg/Include/Protocol/MmUsbDispatch.h @@ -39,14 +39,14 @@ typedef struct { /// emulation event, such as port-trap on the PS/2* keyboard control registers, or to a /// USB wake event, such as resumption from a sleep state. /// - EFI_USB_MMI_TYPE Type; + EFI_USB_MMI_TYPE Type; /// /// The device path is part of the context structure and describes the location of the /// particular USB host controller in the system for which this register event will occur. /// This location is important because of the possible integration of several USB host /// controllers in a system. /// - EFI_DEVICE_PATH_PROTOCOL *Device; + EFI_DEVICE_PATH_PROTOCOL *Device; } EFI_MM_USB_REGISTER_CONTEXT; typedef struct _EFI_MM_USB_DISPATCH_PROTOCOL EFI_MM_USB_DISPATCH_PROTOCOL; @@ -114,11 +114,10 @@ EFI_STATUS /// This protocol provides the parent dispatch service for the USB MMI source generator. /// struct _EFI_MM_USB_DISPATCH_PROTOCOL { - EFI_MM_USB_REGISTER Register; - EFI_MM_USB_UNREGISTER UnRegister; + EFI_MM_USB_REGISTER Register; + EFI_MM_USB_UNREGISTER UnRegister; }; -extern EFI_GUID gEfiMmUsbDispatchProtocolGuid; +extern EFI_GUID gEfiMmUsbDispatchProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/MonotonicCounter.h b/MdePkg/Include/Protocol/MonotonicCounter.h index 467bd07..ad90247 100644 --- a/MdePkg/Include/Protocol/MonotonicCounter.h +++ b/MdePkg/Include/Protocol/MonotonicCounter.h @@ -17,6 +17,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define EFI_MONOTONIC_COUNTER_ARCH_PROTOCOL_GUID \ {0x1da97072, 0xbddc, 0x4b30, {0x99, 0xf1, 0x72, 0xa0, 0xb5, 0x6f, 0xff, 0x2a} } -extern EFI_GUID gEfiMonotonicCounterArchProtocolGuid; +extern EFI_GUID gEfiMonotonicCounterArchProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/MpService.h b/MdePkg/Include/Protocol/MpService.h index 9445c55..433a6e9 100644 --- a/MdePkg/Include/Protocol/MpService.h +++ b/MdePkg/Include/Protocol/MpService.h @@ -50,7 +50,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// Value used in the NumberProcessors parameter of the GetProcessorInfo function /// -#define CPU_V2_EXTENDED_TOPOLOGY BIT24 +#define CPU_V2_EXTENDED_TOPOLOGY BIT24 /// /// Forward declaration for the EFI_MP_SERVICES_PROTOCOL. @@ -60,21 +60,21 @@ typedef struct _EFI_MP_SERVICES_PROTOCOL EFI_MP_SERVICES_PROTOCOL; /// /// Terminator for a list of failed CPUs returned by StartAllAPs(). /// -#define END_OF_CPU_LIST 0xffffffff +#define END_OF_CPU_LIST 0xffffffff /// /// This bit is used in the StatusFlag field of EFI_PROCESSOR_INFORMATION and /// indicates whether the processor is playing the role of BSP. If the bit is 1, /// then the processor is BSP. Otherwise, it is AP. /// -#define PROCESSOR_AS_BSP_BIT 0x00000001 +#define PROCESSOR_AS_BSP_BIT 0x00000001 /// /// This bit is used in the StatusFlag field of EFI_PROCESSOR_INFORMATION and /// indicates whether the processor is enabled. If the bit is 1, then the /// processor is enabled. Otherwise, it is disabled. /// -#define PROCESSOR_ENABLED_BIT 0x00000002 +#define PROCESSOR_ENABLED_BIT 0x00000002 /// /// This bit is used in the StatusFlag field of EFI_PROCESSOR_INFORMATION and @@ -90,58 +90,56 @@ typedef struct { /// /// Zero-based physical package number that identifies the cartridge of the processor. /// - UINT32 Package; + UINT32 Package; /// /// Zero-based physical core number within package of the processor. /// - UINT32 Core; + UINT32 Core; /// /// Zero-based logical thread number within core of the processor. /// - UINT32 Thread; + UINT32 Thread; } EFI_CPU_PHYSICAL_LOCATION; /// /// Structure that defines the 6-level physical location of the processor /// typedef struct { -/// -/// Package Zero-based physical package number that identifies the cartridge of the processor. -/// -UINT32 Package; -/// -/// Module Zero-based physical module number within package of the processor. -/// -UINT32 Module; -/// -/// Tile Zero-based physical tile number within module of the processor. -/// -UINT32 Tile; -/// -/// Die Zero-based physical die number within tile of the processor. -/// -UINT32 Die; -/// -/// Core Zero-based physical core number within die of the processor. -/// -UINT32 Core; -/// -/// Thread Zero-based logical thread number within core of the processor. -/// -UINT32 Thread; + /// + /// Package Zero-based physical package number that identifies the cartridge of the processor. + /// + UINT32 Package; + /// + /// Module Zero-based physical module number within package of the processor. + /// + UINT32 Module; + /// + /// Tile Zero-based physical tile number within module of the processor. + /// + UINT32 Tile; + /// + /// Die Zero-based physical die number within tile of the processor. + /// + UINT32 Die; + /// + /// Core Zero-based physical core number within die of the processor. + /// + UINT32 Core; + /// + /// Thread Zero-based logical thread number within core of the processor. + /// + UINT32 Thread; } EFI_CPU_PHYSICAL_LOCATION2; - typedef union { /// The 6-level physical location of the processor, including the /// physical package number that identifies the cartridge, the physical /// module number within package, the physical tile number within the module, /// the physical die number within the tile, the physical core number within /// package, and logical thread number within core. - EFI_CPU_PHYSICAL_LOCATION2 Location2; + EFI_CPU_PHYSICAL_LOCATION2 Location2; } EXTENDED_PROCESSOR_INFORMATION; - /// /// Structure that describes information about a logical CPU. /// @@ -152,7 +150,7 @@ typedef struct { /// are used, and higher bits are reserved. For IPF, the lower 16 bits contains /// id/eid, and higher bits are reserved. /// - UINT64 ProcessorId; + UINT64 ProcessorId; /// /// Flags indicating if the processor is BSP or AP, if the processor is enabled /// or disabled, and if the processor is healthy. Bits 3..31 are reserved and @@ -171,17 +169,17 @@ typedef struct { /// 1 1 1 Healthy Enabled BSP. /// /// - UINT32 StatusFlag; + UINT32 StatusFlag; /// /// The physical location of the processor, including the physical package number /// that identifies the cartridge, the physical core number within package, and /// logical thread number within core. /// - EFI_CPU_PHYSICAL_LOCATION Location; + EFI_CPU_PHYSICAL_LOCATION Location; /// /// The extended information of the processor. This field is filled only when /// CPU_V2_EXTENDED_TOPOLOGY is set in parameter ProcessorNumber. - EXTENDED_PROCESSOR_INFORMATION ExtendedInformation; + EXTENDED_PROCESSOR_INFORMATION ExtendedInformation; } EFI_PROCESSOR_INFORMATION; /** @@ -662,15 +660,15 @@ EFI_STATUS /// UEFI images must be aware that the functionality of this protocol may be reduced. /// struct _EFI_MP_SERVICES_PROTOCOL { - EFI_MP_SERVICES_GET_NUMBER_OF_PROCESSORS GetNumberOfProcessors; - EFI_MP_SERVICES_GET_PROCESSOR_INFO GetProcessorInfo; - EFI_MP_SERVICES_STARTUP_ALL_APS StartupAllAPs; - EFI_MP_SERVICES_STARTUP_THIS_AP StartupThisAP; - EFI_MP_SERVICES_SWITCH_BSP SwitchBSP; - EFI_MP_SERVICES_ENABLEDISABLEAP EnableDisableAP; - EFI_MP_SERVICES_WHOAMI WhoAmI; + EFI_MP_SERVICES_GET_NUMBER_OF_PROCESSORS GetNumberOfProcessors; + EFI_MP_SERVICES_GET_PROCESSOR_INFO GetProcessorInfo; + EFI_MP_SERVICES_STARTUP_ALL_APS StartupAllAPs; + EFI_MP_SERVICES_STARTUP_THIS_AP StartupThisAP; + EFI_MP_SERVICES_SWITCH_BSP SwitchBSP; + EFI_MP_SERVICES_ENABLEDISABLEAP EnableDisableAP; + EFI_MP_SERVICES_WHOAMI WhoAmI; }; -extern EFI_GUID gEfiMpServiceProtocolGuid; +extern EFI_GUID gEfiMpServiceProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Mtftp4.h b/MdePkg/Include/Protocol/Mtftp4.h index e5d418f..8fbb8d4 100644 --- a/MdePkg/Include/Protocol/Mtftp4.h +++ b/MdePkg/Include/Protocol/Mtftp4.h @@ -22,21 +22,21 @@ SPDX-License-Identifier: BSD-2-Clause-Patent 0x78247c57, 0x63db, 0x4708, {0x99, 0xc2, 0xa8, 0xb4, 0xa9, 0xa6, 0x1f, 0x6b } \ } -typedef struct _EFI_MTFTP4_PROTOCOL EFI_MTFTP4_PROTOCOL; -typedef struct _EFI_MTFTP4_TOKEN EFI_MTFTP4_TOKEN; +typedef struct _EFI_MTFTP4_PROTOCOL EFI_MTFTP4_PROTOCOL; +typedef struct _EFI_MTFTP4_TOKEN EFI_MTFTP4_TOKEN; // -//MTFTP4 packet opcode definition +// MTFTP4 packet opcode definition // -#define EFI_MTFTP4_OPCODE_RRQ 1 -#define EFI_MTFTP4_OPCODE_WRQ 2 -#define EFI_MTFTP4_OPCODE_DATA 3 -#define EFI_MTFTP4_OPCODE_ACK 4 -#define EFI_MTFTP4_OPCODE_ERROR 5 -#define EFI_MTFTP4_OPCODE_OACK 6 -#define EFI_MTFTP4_OPCODE_DIR 7 -#define EFI_MTFTP4_OPCODE_DATA8 8 -#define EFI_MTFTP4_OPCODE_ACK8 9 +#define EFI_MTFTP4_OPCODE_RRQ 1 +#define EFI_MTFTP4_OPCODE_WRQ 2 +#define EFI_MTFTP4_OPCODE_DATA 3 +#define EFI_MTFTP4_OPCODE_ACK 4 +#define EFI_MTFTP4_OPCODE_ERROR 5 +#define EFI_MTFTP4_OPCODE_OACK 6 +#define EFI_MTFTP4_OPCODE_DIR 7 +#define EFI_MTFTP4_OPCODE_DATA8 8 +#define EFI_MTFTP4_OPCODE_ACK8 9 // // MTFTP4 error code definition @@ -57,80 +57,80 @@ typedef struct _EFI_MTFTP4_TOKEN EFI_MTFTP4_TOKEN; #pragma pack(1) typedef struct { - UINT16 OpCode; - UINT8 Filename[1]; + UINT16 OpCode; + UINT8 Filename[1]; } EFI_MTFTP4_REQ_HEADER; typedef struct { - UINT16 OpCode; - UINT8 Data[1]; + UINT16 OpCode; + UINT8 Data[1]; } EFI_MTFTP4_OACK_HEADER; typedef struct { - UINT16 OpCode; - UINT16 Block; - UINT8 Data[1]; + UINT16 OpCode; + UINT16 Block; + UINT8 Data[1]; } EFI_MTFTP4_DATA_HEADER; typedef struct { - UINT16 OpCode; - UINT16 Block[1]; + UINT16 OpCode; + UINT16 Block[1]; } EFI_MTFTP4_ACK_HEADER; typedef struct { - UINT16 OpCode; - UINT64 Block; - UINT8 Data[1]; + UINT16 OpCode; + UINT64 Block; + UINT8 Data[1]; } EFI_MTFTP4_DATA8_HEADER; typedef struct { - UINT16 OpCode; - UINT64 Block[1]; + UINT16 OpCode; + UINT64 Block[1]; } EFI_MTFTP4_ACK8_HEADER; typedef struct { - UINT16 OpCode; - UINT16 ErrorCode; - UINT8 ErrorMessage[1]; + UINT16 OpCode; + UINT16 ErrorCode; + UINT8 ErrorMessage[1]; } EFI_MTFTP4_ERROR_HEADER; typedef union { /// /// Type of packets as defined by the MTFTPv4 packet opcodes. /// - UINT16 OpCode; + UINT16 OpCode; /// /// Read request packet header. /// - EFI_MTFTP4_REQ_HEADER Rrq; + EFI_MTFTP4_REQ_HEADER Rrq; /// /// Write request packet header. /// - EFI_MTFTP4_REQ_HEADER Wrq; + EFI_MTFTP4_REQ_HEADER Wrq; /// /// Option acknowledge packet header. /// - EFI_MTFTP4_OACK_HEADER Oack; + EFI_MTFTP4_OACK_HEADER Oack; /// /// Data packet header. /// - EFI_MTFTP4_DATA_HEADER Data; + EFI_MTFTP4_DATA_HEADER Data; /// /// Acknowledgement packet header. /// - EFI_MTFTP4_ACK_HEADER Ack; + EFI_MTFTP4_ACK_HEADER Ack; /// /// Data packet header with big block number. /// - EFI_MTFTP4_DATA8_HEADER Data8; + EFI_MTFTP4_DATA8_HEADER Data8; /// /// Acknowledgement header with big block num. /// - EFI_MTFTP4_ACK8_HEADER Ack8; + EFI_MTFTP4_ACK8_HEADER Ack8; /// /// Error packet header. /// - EFI_MTFTP4_ERROR_HEADER Error; + EFI_MTFTP4_ERROR_HEADER Error; } EFI_MTFTP4_PACKET; #pragma pack() @@ -139,39 +139,36 @@ typedef union { /// MTFTP4 option definition. /// typedef struct { - UINT8 *OptionStr; - UINT8 *ValueStr; + UINT8 *OptionStr; + UINT8 *ValueStr; } EFI_MTFTP4_OPTION; - typedef struct { - BOOLEAN UseDefaultSetting; - EFI_IPv4_ADDRESS StationIp; - EFI_IPv4_ADDRESS SubnetMask; - UINT16 LocalPort; - EFI_IPv4_ADDRESS GatewayIp; - EFI_IPv4_ADDRESS ServerIp; - UINT16 InitialServerPort; - UINT16 TryCount; - UINT16 TimeoutValue; + BOOLEAN UseDefaultSetting; + EFI_IPv4_ADDRESS StationIp; + EFI_IPv4_ADDRESS SubnetMask; + UINT16 LocalPort; + EFI_IPv4_ADDRESS GatewayIp; + EFI_IPv4_ADDRESS ServerIp; + UINT16 InitialServerPort; + UINT16 TryCount; + UINT16 TimeoutValue; } EFI_MTFTP4_CONFIG_DATA; - typedef struct { - EFI_MTFTP4_CONFIG_DATA ConfigData; - UINT8 SupportedOptionCount; - UINT8 **SupportedOptoins; - UINT8 UnsupportedOptionCount; - UINT8 **UnsupportedOptoins; + EFI_MTFTP4_CONFIG_DATA ConfigData; + UINT8 SupportedOptionCount; + UINT8 **SupportedOptoins; + UINT8 UnsupportedOptionCount; + UINT8 **UnsupportedOptoins; } EFI_MTFTP4_MODE_DATA; - typedef struct { - EFI_IPv4_ADDRESS GatewayIp; - EFI_IPv4_ADDRESS ServerIp; - UINT16 ServerPort; - UINT16 TryCount; - UINT16 TimeoutValue; + EFI_IPv4_ADDRESS GatewayIp; + EFI_IPv4_ADDRESS ServerIp; + UINT16 ServerPort; + UINT16 TryCount; + UINT16 TimeoutValue; } EFI_MTFTP4_OVERRIDE_DATA; // @@ -250,7 +247,6 @@ EFI_STATUS OUT VOID **Buffer ); - /** Submits an asynchronous interrupt transfer to an interrupt endpoint of a USB device. @@ -269,7 +265,6 @@ EFI_STATUS OUT EFI_MTFTP4_MODE_DATA *ModeData ); - /** Initializes, changes, or resets the default operational setting for this EFI MTFTPv4 Protocol driver instance. @@ -299,7 +294,6 @@ EFI_STATUS IN EFI_MTFTP4_CONFIG_DATA *MtftpConfigData OPTIONAL ); - /** Gets information about a file from an MTFTPv4 server. @@ -389,7 +383,6 @@ EFI_STATUS OUT EFI_MTFTP4_OPTION **OptionList OPTIONAL ); - /** Downloads a file from an MTFTPv4 server. @@ -420,8 +413,6 @@ EFI_STATUS IN EFI_MTFTP4_TOKEN *Token ); - - /** Sends a file to an MTFTPv4 server. @@ -450,7 +441,6 @@ EFI_STATUS IN EFI_MTFTP4_TOKEN *Token ); - /** Downloads a data file "directory" from an MTFTPv4 server. May be unsupported in some EFI implementations. @@ -522,7 +512,7 @@ struct _EFI_MTFTP4_TOKEN { /// The status that is returned to the caller at the end of the operation /// to indicate whether this operation completed successfully. /// - EFI_STATUS Status; + EFI_STATUS Status; /// /// The event that will be signaled when the operation completes. If /// set to NULL, the corresponding function will wait until the read or @@ -530,58 +520,57 @@ struct _EFI_MTFTP4_TOKEN { /// EVT_NOTIFY_SIGNAL. The Task Priority Level (TPL) of /// Event must be lower than or equal to TPL_CALLBACK. /// - EFI_EVENT Event; + EFI_EVENT Event; /// /// If not NULL, the data that will be used to override the existing configure data. /// - EFI_MTFTP4_OVERRIDE_DATA *OverrideData; + EFI_MTFTP4_OVERRIDE_DATA *OverrideData; /// /// The pointer to the null-terminated ASCII file name string. /// - UINT8 *Filename; + UINT8 *Filename; /// /// The pointer to the null-terminated ASCII mode string. If NULL, "octet" is used. /// - UINT8 *ModeStr; + UINT8 *ModeStr; /// /// Number of option/value string pairs. /// - UINT32 OptionCount; + UINT32 OptionCount; /// /// The pointer to an array of option/value string pairs. Ignored if OptionCount is zero. /// - EFI_MTFTP4_OPTION *OptionList; + EFI_MTFTP4_OPTION *OptionList; /// /// The size of the data buffer. /// - UINT64 BufferSize; + UINT64 BufferSize; /// /// The pointer to the data buffer. Data that is downloaded from the /// MTFTPv4 server is stored here. Data that is uploaded to the /// MTFTPv4 server is read from here. Ignored if BufferSize is zero. /// - VOID *Buffer; + VOID *Buffer; /// /// The pointer to the context that will be used by CheckPacket, /// TimeoutCallback and PacketNeeded. /// - VOID *Context; + VOID *Context; /// /// The pointer to the callback function to check the contents of the received packet. /// - EFI_MTFTP4_CHECK_PACKET CheckPacket; + EFI_MTFTP4_CHECK_PACKET CheckPacket; /// /// The pointer to the function to be called when a timeout occurs. /// - EFI_MTFTP4_TIMEOUT_CALLBACK TimeoutCallback; + EFI_MTFTP4_TIMEOUT_CALLBACK TimeoutCallback; /// /// The pointer to the function to provide the needed packet contents. /// - EFI_MTFTP4_PACKET_NEEDED PacketNeeded; + EFI_MTFTP4_PACKET_NEEDED PacketNeeded; }; -extern EFI_GUID gEfiMtftp4ServiceBindingProtocolGuid; -extern EFI_GUID gEfiMtftp4ProtocolGuid; +extern EFI_GUID gEfiMtftp4ServiceBindingProtocolGuid; +extern EFI_GUID gEfiMtftp4ProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/Mtftp6.h b/MdePkg/Include/Protocol/Mtftp6.h index bb9f2d2..4abf296 100644 --- a/MdePkg/Include/Protocol/Mtftp6.h +++ b/MdePkg/Include/Protocol/Mtftp6.h @@ -16,7 +16,6 @@ #ifndef __EFI_MTFTP6_PROTOCOL_H__ #define __EFI_MTFTP6_PROTOCOL_H__ - #define EFI_MTFTP6_SERVICE_BINDING_PROTOCOL_GUID \ { \ 0xd9760ff3, 0x3cca, 0x4267, {0x80, 0xf9, 0x75, 0x27, 0xfa, 0xfa, 0x42, 0x23 } \ @@ -27,21 +26,21 @@ 0xbf0a78ba, 0xec29, 0x49cf, {0xa1, 0xc9, 0x7a, 0xe5, 0x4e, 0xab, 0x6a, 0x51 } \ } -typedef struct _EFI_MTFTP6_PROTOCOL EFI_MTFTP6_PROTOCOL; -typedef struct _EFI_MTFTP6_TOKEN EFI_MTFTP6_TOKEN; +typedef struct _EFI_MTFTP6_PROTOCOL EFI_MTFTP6_PROTOCOL; +typedef struct _EFI_MTFTP6_TOKEN EFI_MTFTP6_TOKEN; /// /// MTFTP Packet OpCodes ///@{ -#define EFI_MTFTP6_OPCODE_RRQ 1 ///< The MTFTPv6 packet is a read request. -#define EFI_MTFTP6_OPCODE_WRQ 2 ///< The MTFTPv6 packet is a write request. -#define EFI_MTFTP6_OPCODE_DATA 3 ///< The MTFTPv6 packet is a data packet. -#define EFI_MTFTP6_OPCODE_ACK 4 ///< The MTFTPv6 packet is an acknowledgement packet. -#define EFI_MTFTP6_OPCODE_ERROR 5 ///< The MTFTPv6 packet is an error packet. -#define EFI_MTFTP6_OPCODE_OACK 6 ///< The MTFTPv6 packet is an option acknowledgement packet. -#define EFI_MTFTP6_OPCODE_DIR 7 ///< The MTFTPv6 packet is a directory query packet. -#define EFI_MTFTP6_OPCODE_DATA8 8 ///< The MTFTPv6 packet is a data packet with a big block number. -#define EFI_MTFTP6_OPCODE_ACK8 9 ///< The MTFTPv6 packet is an acknowledgement packet with a big block number. +#define EFI_MTFTP6_OPCODE_RRQ 1 ///< The MTFTPv6 packet is a read request. +#define EFI_MTFTP6_OPCODE_WRQ 2 ///< The MTFTPv6 packet is a write request. +#define EFI_MTFTP6_OPCODE_DATA 3 ///< The MTFTPv6 packet is a data packet. +#define EFI_MTFTP6_OPCODE_ACK 4 ///< The MTFTPv6 packet is an acknowledgement packet. +#define EFI_MTFTP6_OPCODE_ERROR 5 ///< The MTFTPv6 packet is an error packet. +#define EFI_MTFTP6_OPCODE_OACK 6 ///< The MTFTPv6 packet is an option acknowledgement packet. +#define EFI_MTFTP6_OPCODE_DIR 7 ///< The MTFTPv6 packet is a directory query packet. +#define EFI_MTFTP6_OPCODE_DATA8 8 ///< The MTFTPv6 packet is a data packet with a big block number. +#define EFI_MTFTP6_OPCODE_ACK8 9 ///< The MTFTPv6 packet is an acknowledgement packet with a big block number. ///@} /// @@ -50,39 +49,39 @@ typedef struct _EFI_MTFTP6_TOKEN EFI_MTFTP6_TOKEN; /// /// The error code is not defined. See the error message in the packet (if any) for details. /// -#define EFI_MTFTP6_ERRORCODE_NOT_DEFINED 0 +#define EFI_MTFTP6_ERRORCODE_NOT_DEFINED 0 /// /// The file was not found. /// -#define EFI_MTFTP6_ERRORCODE_FILE_NOT_FOUND 1 +#define EFI_MTFTP6_ERRORCODE_FILE_NOT_FOUND 1 /// /// There was an access violation. /// -#define EFI_MTFTP6_ERRORCODE_ACCESS_VIOLATION 2 +#define EFI_MTFTP6_ERRORCODE_ACCESS_VIOLATION 2 /// /// The disk was full or its allocation was exceeded. /// -#define EFI_MTFTP6_ERRORCODE_DISK_FULL 3 +#define EFI_MTFTP6_ERRORCODE_DISK_FULL 3 /// /// The MTFTPv6 operation was illegal. /// -#define EFI_MTFTP6_ERRORCODE_ILLEGAL_OPERATION 4 +#define EFI_MTFTP6_ERRORCODE_ILLEGAL_OPERATION 4 /// /// The transfer ID is unknown. /// -#define EFI_MTFTP6_ERRORCODE_UNKNOWN_TRANSFER_ID 5 +#define EFI_MTFTP6_ERRORCODE_UNKNOWN_TRANSFER_ID 5 /// /// The file already exists. /// -#define EFI_MTFTP6_ERRORCODE_FILE_ALREADY_EXISTS 6 +#define EFI_MTFTP6_ERRORCODE_FILE_ALREADY_EXISTS 6 /// /// There is no such user. /// -#define EFI_MTFTP6_ERRORCODE_NO_SUCH_USER 7 +#define EFI_MTFTP6_ERRORCODE_NO_SUCH_USER 7 /// /// The request has been denied due to option negotiation. /// -#define EFI_MTFTP6_ERRORCODE_REQUEST_DENIED 8 +#define EFI_MTFTP6_ERRORCODE_REQUEST_DENIED 8 ///@} #pragma pack(1) @@ -202,15 +201,15 @@ typedef struct { /// EFI_MTFTP6_PACKET /// typedef union { - UINT16 OpCode; ///< Type of packets as defined by the MTFTPv6 packet opcodes. - EFI_MTFTP6_REQ_HEADER Rrq; ///< Read request packet header. - EFI_MTFTP6_REQ_HEADER Wrq; ///< write request packet header. - EFI_MTFTP6_OACK_HEADER Oack; ///< Option acknowledge packet header. - EFI_MTFTP6_DATA_HEADER Data; ///< Data packet header. - EFI_MTFTP6_ACK_HEADER Ack; ///< Acknowledgement packet header. - EFI_MTFTP6_DATA8_HEADER Data8; ///< Data packet header with big block number. - EFI_MTFTP6_ACK8_HEADER Ack8; ///< Acknowledgement header with big block number. - EFI_MTFTP6_ERROR_HEADER Error; ///< Error packet header. + UINT16 OpCode; ///< Type of packets as defined by the MTFTPv6 packet opcodes. + EFI_MTFTP6_REQ_HEADER Rrq; ///< Read request packet header. + EFI_MTFTP6_REQ_HEADER Wrq; ///< write request packet header. + EFI_MTFTP6_OACK_HEADER Oack; ///< Option acknowledge packet header. + EFI_MTFTP6_DATA_HEADER Data; ///< Data packet header. + EFI_MTFTP6_ACK_HEADER Ack; ///< Acknowledgement packet header. + EFI_MTFTP6_DATA8_HEADER Data8; ///< Data packet header with big block number. + EFI_MTFTP6_ACK8_HEADER Ack8; ///< Acknowledgement header with big block number. + EFI_MTFTP6_ERROR_HEADER Error; ///< Error packet header. } EFI_MTFTP6_PACKET; #pragma pack() @@ -224,28 +223,28 @@ typedef struct { /// driver choose a source address. If not zero it must be one of the /// configured IP addresses in the underlying IPv6 driver. /// - EFI_IPv6_ADDRESS StationIp; + EFI_IPv6_ADDRESS StationIp; /// /// Local port number. Set to zero to use the automatically assigned port number. /// - UINT16 LocalPort; + UINT16 LocalPort; /// /// The IP address of the MTFTPv6 server. /// - EFI_IPv6_ADDRESS ServerIp; + EFI_IPv6_ADDRESS ServerIp; /// /// The initial MTFTPv6 server port number. Request packets are /// sent to this port. This number is almost always 69 and using zero /// defaults to 69. - UINT16 InitialServerPort; + UINT16 InitialServerPort; /// /// The number of times to transmit MTFTPv6 request packets and wait for a response. /// - UINT16 TryCount; + UINT16 TryCount; /// /// The number of seconds to wait for a response after sending the MTFTPv6 request packet. /// - UINT16 TimeoutValue; + UINT16 TimeoutValue; } EFI_MTFTP6_CONFIG_DATA; /// @@ -255,17 +254,17 @@ typedef struct { /// /// The configuration data of this instance. /// - EFI_MTFTP6_CONFIG_DATA ConfigData; + EFI_MTFTP6_CONFIG_DATA ConfigData; /// /// The number of option strings in the following SupportedOptions array. /// - UINT8 SupportedOptionCount; + UINT8 SupportedOptionCount; /// /// An array of null-terminated ASCII option strings that are recognized and supported by /// this EFI MTFTPv6 Protocol driver implementation. The buffer is /// read only to the caller and the caller should NOT free the buffer. /// - UINT8 **SupportedOptions; + UINT8 **SupportedOptions; } EFI_MTFTP6_MODE_DATA; /// @@ -276,32 +275,32 @@ typedef struct { /// IP address of the MTFTPv6 server. If set to all zero, the value that /// was set by the EFI_MTFTP6_PROTOCOL.Configure() function will be used. /// - EFI_IPv6_ADDRESS ServerIp; + EFI_IPv6_ADDRESS ServerIp; /// /// MTFTPv6 server port number. If set to zero, it will use the value /// that was set by the EFI_MTFTP6_PROTOCOL.Configure() function. /// - UINT16 ServerPort; + UINT16 ServerPort; /// /// Number of times to transmit MTFTPv6 request packets and wait /// for a response. If set to zero, the value that was set by /// theEFI_MTFTP6_PROTOCOL.Configure() function will be used. /// - UINT16 TryCount; + UINT16 TryCount; /// /// Number of seconds to wait for a response after sending the /// MTFTPv6 request packet. If set to zero, the value that was set by /// the EFI_MTFTP6_PROTOCOL.Configure() function will be used. /// - UINT16 TimeoutValue; + UINT16 TimeoutValue; } EFI_MTFTP6_OVERRIDE_DATA; /// /// EFI_MTFTP6_OPTION /// typedef struct { - UINT8 *OptionStr; ///< Pointer to the null-terminated ASCII MTFTPv6 option string. - UINT8 *ValueStr; ///< Pointer to the null-terminated ASCII MTFTPv6 value string. + UINT8 *OptionStr; ///< Pointer to the null-terminated ASCII MTFTPv6 option string. + UINT8 *ValueStr; ///< Pointer to the null-terminated ASCII MTFTPv6 value string. } EFI_MTFTP6_OPTION; /** @@ -392,30 +391,30 @@ struct _EFI_MTFTP6_TOKEN { /// to indicate whether this operation completed successfully. /// Defined Status values are listed below. /// - EFI_STATUS Status; + EFI_STATUS Status; /// /// The event that will be signaled when the operation completes. If /// set to NULL, the corresponding function will wait until the read or /// write operation finishes. The type of Event must be EVT_NOTIFY_SIGNAL. /// - EFI_EVENT Event; + EFI_EVENT Event; /// /// If not NULL, the data that will be used to override the existing /// configure data. /// - EFI_MTFTP6_OVERRIDE_DATA *OverrideData; + EFI_MTFTP6_OVERRIDE_DATA *OverrideData; /// /// Pointer to the null-terminated ASCII file name string. /// - UINT8 *Filename; + UINT8 *Filename; /// /// Pointer to the null-terminated ASCII mode string. If NULL, octet is used. /// - UINT8 *ModeStr; + UINT8 *ModeStr; /// /// Number of option/value string pairs. /// - UINT32 OptionCount; + UINT32 OptionCount; /// /// Pointer to an array of option/value string pairs. Ignored if /// OptionCount is zero. Both a remote server and this driver @@ -423,37 +422,37 @@ struct _EFI_MTFTP6_TOKEN { /// options are unrecognized by this implementation, it is sent to the /// remote server without being changed. /// - EFI_MTFTP6_OPTION *OptionList; + EFI_MTFTP6_OPTION *OptionList; /// /// On input, the size, in bytes, of Buffer. On output, the number /// of bytes transferred. /// - UINT64 BufferSize; + UINT64 BufferSize; /// /// Pointer to the data buffer. Data that is downloaded from the /// MTFTPv6 server is stored here. Data that is uploaded to the /// MTFTPv6 server is read from here. Ignored if BufferSize is zero. /// - VOID *Buffer; + VOID *Buffer; /// /// Pointer to the context that will be used by CheckPacket, /// TimeoutCallback and PacketNeeded. /// - VOID *Context; + VOID *Context; /// /// Pointer to the callback function to check the contents of the /// received packet. /// - EFI_MTFTP6_CHECK_PACKET CheckPacket; + EFI_MTFTP6_CHECK_PACKET CheckPacket; /// /// Pointer to the function to be called when a timeout occurs. /// - EFI_MTFTP6_TIMEOUT_CALLBACK TimeoutCallback; + EFI_MTFTP6_TIMEOUT_CALLBACK TimeoutCallback; /// /// Pointer to the function to provide the needed packet contents. /// Only used in WriteFile() operation. /// - EFI_MTFTP6_PACKET_NEEDED PacketNeeded; + EFI_MTFTP6_PACKET_NEEDED PacketNeeded; }; /** @@ -516,7 +515,7 @@ EFI_STATUS (EFIAPI *EFI_MTFTP6_CONFIGURE)( IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_CONFIG_DATA *MtftpConfigData OPTIONAL -); + ); /** Get information about a file from an MTFTPv6 server. @@ -577,7 +576,7 @@ EFI_STATUS IN EFI_MTFTP6_OPTION *OptionList OPTIONAL, OUT UINT32 *PacketLength, OUT EFI_MTFTP6_PACKET **Packet OPTIONAL -); + ); /** Parse the options in an MTFTPv6 OACK packet. @@ -769,7 +768,7 @@ EFI_STATUS (EFIAPI *EFI_MTFTP6_READ_DIRECTORY)( IN EFI_MTFTP6_PROTOCOL *This, IN EFI_MTFTP6_TOKEN *Token -); + ); /** Polls for incoming data packets and processes outgoing data packets. @@ -803,18 +802,17 @@ EFI_STATUS /// driver and EFI IPv6 Protocol driver. /// struct _EFI_MTFTP6_PROTOCOL { - EFI_MTFTP6_GET_MODE_DATA GetModeData; - EFI_MTFTP6_CONFIGURE Configure; - EFI_MTFTP6_GET_INFO GetInfo; - EFI_MTFTP6_PARSE_OPTIONS ParseOptions; - EFI_MTFTP6_READ_FILE ReadFile; - EFI_MTFTP6_WRITE_FILE WriteFile; - EFI_MTFTP6_READ_DIRECTORY ReadDirectory; - EFI_MTFTP6_POLL Poll; + EFI_MTFTP6_GET_MODE_DATA GetModeData; + EFI_MTFTP6_CONFIGURE Configure; + EFI_MTFTP6_GET_INFO GetInfo; + EFI_MTFTP6_PARSE_OPTIONS ParseOptions; + EFI_MTFTP6_READ_FILE ReadFile; + EFI_MTFTP6_WRITE_FILE WriteFile; + EFI_MTFTP6_READ_DIRECTORY ReadDirectory; + EFI_MTFTP6_POLL Poll; }; -extern EFI_GUID gEfiMtftp6ServiceBindingProtocolGuid; -extern EFI_GUID gEfiMtftp6ProtocolGuid; +extern EFI_GUID gEfiMtftp6ServiceBindingProtocolGuid; +extern EFI_GUID gEfiMtftp6ProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/NetworkInterfaceIdentifier.h b/MdePkg/Include/Protocol/NetworkInterfaceIdentifier.h index 2242a37..78acb4d 100644 --- a/MdePkg/Include/Protocol/NetworkInterfaceIdentifier.h +++ b/MdePkg/Include/Protocol/NetworkInterfaceIdentifier.h @@ -31,53 +31,51 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // // Revision defined in UEFI Specification 2.4 // -#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION 0x00020000 - +#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION 0x00020000 /// /// Revision defined in EFI1.1. /// -#define EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE_REVISION EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION +#define EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE_REVISION EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION /// /// Forward reference for pure ANSI compatability. /// -typedef struct _EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL; +typedef struct _EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL; /// /// Protocol defined in EFI1.1. /// -typedef EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE; +typedef EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE; /// /// An optional protocol that is used to describe details about the software /// layer that is used to produce the Simple Network Protocol. /// struct _EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL { - UINT64 Revision; ///< The revision of the EFI_NETWORK_INTERFACE_IDENTIFIER protocol. - UINT64 Id; ///< The address of the first byte of the identifying structure for this network - ///< interface. This is only valid when the network interface is started - ///< (see Start()). When the network interface is not started, this field is set to zero. - UINT64 ImageAddr; ///< The address of the first byte of the identifying structure for this - ///< network interface. This is set to zero if there is no structure. - UINT32 ImageSize; ///< The size of unrelocated network interface image. - CHAR8 StringId[4];///< A four-character ASCII string that is sent in the class identifier field of - ///< option 60 in DHCP. For a Type of EfiNetworkInterfaceUndi, this field is UNDI. - UINT8 Type; ///< Network interface type. This will be set to one of the values - ///< in EFI_NETWORK_INTERFACE_TYPE. - UINT8 MajorVer; ///< Major version number. - UINT8 MinorVer; ///< Minor version number. - BOOLEAN Ipv6Supported; ///< TRUE if the network interface supports IPv6; otherwise FALSE. - UINT16 IfNum; ///< The network interface number that is being identified by this Network - ///< Interface Identifier Protocol. This field must be less than or - ///< equal to the (IFcnt | IFcntExt <<8 ) fields in the !PXE structure. - + UINT64 Revision; ///< The revision of the EFI_NETWORK_INTERFACE_IDENTIFIER protocol. + UINT64 Id; ///< The address of the first byte of the identifying structure for this network + ///< interface. This is only valid when the network interface is started + ///< (see Start()). When the network interface is not started, this field is set to zero. + UINT64 ImageAddr; ///< The address of the first byte of the identifying structure for this + ///< network interface. This is set to zero if there is no structure. + UINT32 ImageSize; ///< The size of unrelocated network interface image. + CHAR8 StringId[4]; ///< A four-character ASCII string that is sent in the class identifier field of + ///< option 60 in DHCP. For a Type of EfiNetworkInterfaceUndi, this field is UNDI. + UINT8 Type; ///< Network interface type. This will be set to one of the values + ///< in EFI_NETWORK_INTERFACE_TYPE. + UINT8 MajorVer; ///< Major version number. + UINT8 MinorVer; ///< Minor version number. + BOOLEAN Ipv6Supported; ///< TRUE if the network interface supports IPv6; otherwise FALSE. + UINT16 IfNum; ///< The network interface number that is being identified by this Network + ///< Interface Identifier Protocol. This field must be less than or + ///< equal to the (IFcnt | IFcntExt <<8 ) fields in the !PXE structure. }; /// -///******************************************************* +/// ******************************************************* /// EFI_NETWORK_INTERFACE_TYPE -///******************************************************* +/// ******************************************************* /// typedef enum { EfiNetworkInterfaceUndi = 1 @@ -86,27 +84,27 @@ typedef enum { /// /// Forward reference for pure ANSI compatability. /// -typedef struct undiconfig_table UNDI_CONFIG_TABLE; +typedef struct undiconfig_table UNDI_CONFIG_TABLE; /// /// The format of the configuration table for UNDI /// struct undiconfig_table { - UINT32 NumberOfInterfaces; ///< The number of NIC devices + UINT32 NumberOfInterfaces; ///< The number of NIC devices ///< that this UNDI controls. - UINT32 reserved; - UNDI_CONFIG_TABLE *nextlink; ///< A pointer to the next UNDI + UINT32 reserved; + UNDI_CONFIG_TABLE *nextlink; ///< A pointer to the next UNDI ///< configuration table. /// /// The length of this array is given in the NumberOfInterfaces field. /// struct { - VOID *NII_InterfacePointer; ///< Pointer to the NII interface structure. - VOID *DevicePathPointer; ///< Pointer to the device path for this NIC. + VOID *NII_InterfacePointer; ///< Pointer to the NII interface structure. + VOID *DevicePathPointer; ///< Pointer to the device path for this NIC. } NII_entry[1]; }; -extern EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid; -extern EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid_31; +extern EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid; +extern EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid_31; #endif diff --git a/MdePkg/Include/Protocol/NvdimmLabel.h b/MdePkg/Include/Protocol/NvdimmLabel.h index 1f289ec..e46999a 100644 --- a/MdePkg/Include/Protocol/NvdimmLabel.h +++ b/MdePkg/Include/Protocol/NvdimmLabel.h @@ -23,70 +23,70 @@ SPDX-License-Identifier: BSD-2-Clause-Patent typedef struct _EFI_NVDIMM_LABEL_PROTOCOL EFI_NVDIMM_LABEL_PROTOCOL; -#define EFI_NVDIMM_LABEL_INDEX_SIG_LEN 16 -#define EFI_NVDIMM_LABEL_INDEX_ALIGN 256 +#define EFI_NVDIMM_LABEL_INDEX_SIG_LEN 16 +#define EFI_NVDIMM_LABEL_INDEX_ALIGN 256 typedef struct { /// /// Signature of the Index Block data structure. Must be "NAMESPACE_INDEX\0". /// - CHAR8 Sig[EFI_NVDIMM_LABEL_INDEX_SIG_LEN]; + CHAR8 Sig[EFI_NVDIMM_LABEL_INDEX_SIG_LEN]; /// /// Attributes of this Label Storage Area. /// - UINT8 Flags[3]; + UINT8 Flags[3]; /// /// Size of each label in bytes, 128 bytes << LabelSize. /// 1 means 256 bytes, 2 means 512 bytes, etc. Shall be 1 or greater. /// - UINT8 LabelSize; + UINT8 LabelSize; /// /// Sequence number used to identify which of the two Index Blocks is current. /// - UINT32 Seq; + UINT32 Seq; /// /// The offset of this Index Block in the Label Storage Area. /// - UINT64 MyOff; + UINT64 MyOff; /// /// The size of this Index Block in bytes. /// This field must be a multiple of the EFI_NVDIMM_LABEL_INDEX_ALIGN. /// - UINT64 MySize; + UINT64 MySize; /// /// The offset of the other Index Block paired with this one. /// - UINT64 OtherOff; + UINT64 OtherOff; /// /// The offset of the first slot where labels are stored in this Label Storage Area. /// - UINT64 LabelOff; + UINT64 LabelOff; /// /// The total number of slots for storing labels in this Label Storage Area. /// - UINT32 NSlot; + UINT32 NSlot; /// /// Major version number. Value shall be 1. /// - UINT16 Major; + UINT16 Major; /// /// Minor version number. Value shall be 2. /// - UINT16 Minor; + UINT16 Minor; /// /// 64-bit Fletcher64 checksum of all fields in this Index Block. /// - UINT64 Checksum; + UINT64 Checksum; /// /// Array of unsigned bytes implementing a bitmask that tracks which label slots are free. @@ -95,156 +95,156 @@ typedef struct { /// padded with additional zero bytes to make the Index Block size a multiple of EFI_NVDIMM_LABEL_INDEX_ALIGN. /// Any bits allocated beyond NSlot bits must be zero. /// - UINT8 Free[]; + UINT8 Free[]; } EFI_NVDIMM_LABEL_INDEX_BLOCK; -#define EFI_NVDIMM_LABEL_NAME_LEN 64 +#define EFI_NVDIMM_LABEL_NAME_LEN 64 /// /// The label is read-only. /// -#define EFI_NVDIMM_LABEL_FLAGS_ROLABEL 0x00000001 +#define EFI_NVDIMM_LABEL_FLAGS_ROLABEL 0x00000001 /// /// When set, the complete label set is local to a single NVDIMM Label Storage Area. /// When clear, the complete label set is contained on multiple NVDIMM Label Storage Areas. /// -#define EFI_NVDIMM_LABEL_FLAGS_LOCAL 0x00000002 +#define EFI_NVDIMM_LABEL_FLAGS_LOCAL 0x00000002 /// /// This reserved flag is utilized on older implementations and has been deprecated. /// Do not use. // -#define EFI_NVDIMM_LABEL_FLAGS_RESERVED 0x00000004 +#define EFI_NVDIMM_LABEL_FLAGS_RESERVED 0x00000004 /// /// When set, the label set is being updated. /// -#define EFI_NVDIMM_LABEL_FLAGS_UPDATING 0x00000008 +#define EFI_NVDIMM_LABEL_FLAGS_UPDATING 0x00000008 typedef struct { /// /// Unique Label Identifier UUID per RFC 4122. /// - EFI_GUID Uuid; + EFI_GUID Uuid; /// /// NULL-terminated string using UTF-8 character formatting. /// - CHAR8 Name[EFI_NVDIMM_LABEL_NAME_LEN]; + CHAR8 Name[EFI_NVDIMM_LABEL_NAME_LEN]; /// /// Attributes of this namespace. /// - UINT32 Flags; + UINT32 Flags; /// /// Total number of labels describing this namespace. /// - UINT16 NLabel; + UINT16 NLabel; /// /// Position of this label in list of labels for this namespace. /// - UINT16 Position; + UINT16 Position; /// /// The SetCookie is utilized by SW to perform consistency checks on the Interleave Set to verify the current /// physical device configuration matches the original physical configuration when the labels were created /// for the set.The label is considered invalid if the actual label set cookie doesn't match the cookie stored here. /// - UINT64 SetCookie; + UINT64 SetCookie; /// /// This is the default logical block size in bytes and may be superseded by a block size that is specified /// in the AbstractionGuid. /// - UINT64 LbaSize; + UINT64 LbaSize; /// /// The DPA is the DIMM Physical address where the NVM contributing to this namespace begins on this NVDIMM. /// - UINT64 Dpa; + UINT64 Dpa; /// /// The extent of the DPA contributed by this label. /// - UINT64 RawSize; + UINT64 RawSize; /// /// Current slot in the Label Storage Area where this label is stored. /// - UINT32 Slot; + UINT32 Slot; /// /// Alignment hint used to advertise the preferred alignment of the data from within the namespace defined by this label. /// - UINT8 Alignment; + UINT8 Alignment; /// /// Shall be 0. /// - UINT8 Reserved[3]; + UINT8 Reserved[3]; /// /// Range Type GUID that describes the access mechanism for the specified DPA range. /// - EFI_GUID TypeGuid; + EFI_GUID TypeGuid; /// /// Identifies the address abstraction mechanism for this namespace. A value of 0 indicates no mechanism used. /// - EFI_GUID AddressAbstractionGuid; + EFI_GUID AddressAbstractionGuid; /// /// Shall be 0. /// - UINT8 Reserved1[88]; + UINT8 Reserved1[88]; /// /// 64-bit Fletcher64 checksum of all fields in this Label. /// This field is considered zero when the checksum is computed. /// - UINT64 Checksum; + UINT64 Checksum; } EFI_NVDIMM_LABEL; typedef struct { /// /// The Region Offset field from the ACPI NFIT NVDIMM Region Mapping Structure for a given entry. /// - UINT64 RegionOffset; + UINT64 RegionOffset; /// /// The serial number of the NVDIMM, assigned by the module vendor. /// - UINT32 SerialNumber; + UINT32 SerialNumber; /// /// The identifier indicating the vendor of the NVDIMM. /// - UINT16 VendorId; + UINT16 VendorId; /// /// The manufacturing date of the NVDIMM, assigned by the module vendor. /// - UINT16 ManufacturingDate; + UINT16 ManufacturingDate; /// /// The manufacturing location from for the NVDIMM, assigned by the module vendor. /// - UINT8 ManufacturingLocation; + UINT8 ManufacturingLocation; /// /// Shall be 0. /// - UINT8 Reserved[31]; + UINT8 Reserved[31]; } EFI_NVDIMM_LABEL_SET_COOKIE_MAP; typedef struct { /// /// Array size is 1 if EFI_NVDIMM_LABEL_FLAGS_LOCAL is set indicating a Local Namespaces. /// - EFI_NVDIMM_LABEL_SET_COOKIE_MAP Mapping[0]; + EFI_NVDIMM_LABEL_SET_COOKIE_MAP Mapping[0]; } EFI_NVDIMM_LABEL_SET_COOKIE_INFO; /** @@ -262,7 +262,7 @@ typedef struct { **/ typedef EFI_STATUS -(EFIAPI *EFI_NVDIMM_LABEL_STORAGE_INFORMATION) ( +(EFIAPI *EFI_NVDIMM_LABEL_STORAGE_INFORMATION)( IN EFI_NVDIMM_LABEL_PROTOCOL *This, OUT UINT32 *SizeOfLabelStorageArea, OUT UINT32 *MaxTransferLength @@ -293,7 +293,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_NVDIMM_LABEL_STORAGE_READ) ( +(EFIAPI *EFI_NVDIMM_LABEL_STORAGE_READ)( IN CONST EFI_NVDIMM_LABEL_PROTOCOL *This, IN UINT32 Offset, IN UINT32 TransferLength, @@ -324,7 +324,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_NVDIMM_LABEL_STORAGE_WRITE) ( +(EFIAPI *EFI_NVDIMM_LABEL_STORAGE_WRITE)( IN CONST EFI_NVDIMM_LABEL_PROTOCOL *This, IN UINT32 Offset, IN UINT32 TransferLength, @@ -335,11 +335,11 @@ EFI_STATUS /// Provides services that allow management of labels contained in a Label Storage Area. /// struct _EFI_NVDIMM_LABEL_PROTOCOL { - EFI_NVDIMM_LABEL_STORAGE_INFORMATION LabelStorageInformation; - EFI_NVDIMM_LABEL_STORAGE_READ LabelStorageRead; - EFI_NVDIMM_LABEL_STORAGE_WRITE LabelStorageWrite; + EFI_NVDIMM_LABEL_STORAGE_INFORMATION LabelStorageInformation; + EFI_NVDIMM_LABEL_STORAGE_READ LabelStorageRead; + EFI_NVDIMM_LABEL_STORAGE_WRITE LabelStorageWrite; }; -extern EFI_GUID gEfiNvdimmLabelProtocolGuid; +extern EFI_GUID gEfiNvdimmLabelProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/NvmExpressPassthru.h b/MdePkg/Include/Protocol/NvmExpressPassthru.h index 870b9b5..a6cba98 100644 --- a/MdePkg/Include/Protocol/NvmExpressPassthru.h +++ b/MdePkg/Include/Protocol/NvmExpressPassthru.h @@ -22,98 +22,99 @@ typedef struct _EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL; typedef struct { - UINT32 Attributes; - UINT32 IoAlign; - UINT32 NvmeVersion; + UINT32 Attributes; + UINT32 IoAlign; + UINT32 NvmeVersion; } EFI_NVM_EXPRESS_PASS_THRU_MODE; // // If this bit is set, then the EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL interface is // for directly addressable namespaces. // -#define EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_PHYSICAL 0x0001 +#define EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_PHYSICAL 0x0001 // // If this bit is set, then the EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL interface is // for a single volume logical namespace comprised of multiple namespaces. // -#define EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_LOGICAL 0x0002 +#define EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_LOGICAL 0x0002 // // If this bit is set, then the EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL interface // supports non-blocking I/O. // -#define EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_NONBLOCKIO 0x0004 +#define EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_NONBLOCKIO 0x0004 // // If this bit is set, then the EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL interface // supports NVM command set. // -#define EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_CMD_SET_NVM 0x0008 +#define EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_CMD_SET_NVM 0x0008 // // FusedOperation // -#define NORMAL_CMD 0x00 -#define FUSED_FIRST_CMD 0x01 -#define FUSED_SECOND_CMD 0x02 +#define NORMAL_CMD 0x00 +#define FUSED_FIRST_CMD 0x01 +#define FUSED_SECOND_CMD 0x02 typedef struct { - UINT32 Opcode:8; - UINT32 FusedOperation:2; - UINT32 Reserved:22; + UINT32 Opcode : 8; + UINT32 FusedOperation : 2; + UINT32 Reserved : 22; } NVME_CDW0; // // Flags // -#define CDW2_VALID 0x01 -#define CDW3_VALID 0x02 -#define CDW10_VALID 0x04 -#define CDW11_VALID 0x08 -#define CDW12_VALID 0x10 -#define CDW13_VALID 0x20 -#define CDW14_VALID 0x40 -#define CDW15_VALID 0x80 +#define CDW2_VALID 0x01 +#define CDW3_VALID 0x02 +#define CDW10_VALID 0x04 +#define CDW11_VALID 0x08 +#define CDW12_VALID 0x10 +#define CDW13_VALID 0x20 +#define CDW14_VALID 0x40 +#define CDW15_VALID 0x80 // // Queue Type // -#define NVME_ADMIN_QUEUE 0x00 -#define NVME_IO_QUEUE 0x01 +#define NVME_ADMIN_QUEUE 0x00 +#define NVME_IO_QUEUE 0x01 typedef struct { - NVME_CDW0 Cdw0; - UINT8 Flags; - UINT32 Nsid; - UINT32 Cdw2; - UINT32 Cdw3; - UINT32 Cdw10; - UINT32 Cdw11; - UINT32 Cdw12; - UINT32 Cdw13; - UINT32 Cdw14; - UINT32 Cdw15; + NVME_CDW0 Cdw0; + UINT8 Flags; + UINT32 Nsid; + UINT32 Cdw2; + UINT32 Cdw3; + UINT32 Cdw10; + UINT32 Cdw11; + UINT32 Cdw12; + UINT32 Cdw13; + UINT32 Cdw14; + UINT32 Cdw15; } EFI_NVM_EXPRESS_COMMAND; typedef struct { - UINT32 DW0; - UINT32 DW1; - UINT32 DW2; - UINT32 DW3; + UINT32 DW0; + UINT32 DW1; + UINT32 DW2; + UINT32 DW3; } EFI_NVM_EXPRESS_COMPLETION; typedef struct { - UINT64 CommandTimeout; - VOID *TransferBuffer; - UINT32 TransferLength; - VOID *MetadataBuffer; - UINT32 MetadataLength; - UINT8 QueueType; - EFI_NVM_EXPRESS_COMMAND *NvmeCmd; - EFI_NVM_EXPRESS_COMPLETION *NvmeCompletion; + UINT64 CommandTimeout; + VOID *TransferBuffer; + UINT32 TransferLength; + VOID *MetadataBuffer; + UINT32 MetadataLength; + UINT8 QueueType; + EFI_NVM_EXPRESS_COMMAND *NvmeCmd; + EFI_NVM_EXPRESS_COMPLETION *NvmeCompletion; } EFI_NVM_EXPRESS_PASS_THRU_COMMAND_PACKET; // // Protocol function prototypes // + /** Sends an NVM Express Command Packet to an NVM Express controller or namespace. This function supports both blocking I/O and non-blocking I/O. The blocking I/O functionality is required, and the non-blocking @@ -263,21 +264,20 @@ EFI_STATUS (EFIAPI *EFI_NVM_EXPRESS_PASS_THRU_GET_NAMESPACE)( IN EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL *This, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, - OUT UINT32 *NamespaceId + OUT UINT32 *NamespaceId ); // // Protocol Interface Structure // struct _EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL { - EFI_NVM_EXPRESS_PASS_THRU_MODE *Mode; - EFI_NVM_EXPRESS_PASS_THRU_PASSTHRU PassThru; - EFI_NVM_EXPRESS_PASS_THRU_GET_NEXT_NAMESPACE GetNextNamespace; - EFI_NVM_EXPRESS_PASS_THRU_BUILD_DEVICE_PATH BuildDevicePath; - EFI_NVM_EXPRESS_PASS_THRU_GET_NAMESPACE GetNamespace; + EFI_NVM_EXPRESS_PASS_THRU_MODE *Mode; + EFI_NVM_EXPRESS_PASS_THRU_PASSTHRU PassThru; + EFI_NVM_EXPRESS_PASS_THRU_GET_NEXT_NAMESPACE GetNextNamespace; + EFI_NVM_EXPRESS_PASS_THRU_BUILD_DEVICE_PATH BuildDevicePath; + EFI_NVM_EXPRESS_PASS_THRU_GET_NAMESPACE GetNamespace; }; -extern EFI_GUID gEfiNvmExpressPassThruProtocolGuid; +extern EFI_GUID gEfiNvmExpressPassThruProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/PartitionInfo.h b/MdePkg/Include/Protocol/PartitionInfo.h index f57f4c6..ad5cf1c 100644 --- a/MdePkg/Include/Protocol/PartitionInfo.h +++ b/MdePkg/Include/Protocol/PartitionInfo.h @@ -21,11 +21,10 @@ #define EFI_PARTITION_INFO_PROTOCOL_GUID \ { 0x8cf2f62c, 0xbc9b, 0x4821, { 0x80, 0x8d, 0xec, 0x9e, 0xc4, 0x21, 0xa1, 0xa0 }}; - -#define EFI_PARTITION_INFO_PROTOCOL_REVISION 0x0001000 -#define PARTITION_TYPE_OTHER 0x00 -#define PARTITION_TYPE_MBR 0x01 -#define PARTITION_TYPE_GPT 0x02 +#define EFI_PARTITION_INFO_PROTOCOL_REVISION 0x0001000 +#define PARTITION_TYPE_OTHER 0x00 +#define PARTITION_TYPE_MBR 0x01 +#define PARTITION_TYPE_GPT 0x02 #pragma pack(1) @@ -36,25 +35,25 @@ typedef struct { // // Set to EFI_PARTITION_INFO_PROTOCOL_REVISION. // - UINT32 Revision; + UINT32 Revision; // // Partition info type (PARTITION_TYPE_MBR, PARTITION_TYPE_GPT, or PARTITION_TYPE_OTHER). // - UINT32 Type; + UINT32 Type; // // If 1, partition describes an EFI System Partition. // - UINT8 System; - UINT8 Reserved[7]; + UINT8 System; + UINT8 Reserved[7]; union { /// /// MBR data /// - MBR_PARTITION_RECORD Mbr; + MBR_PARTITION_RECORD Mbr; /// /// GPT data /// - EFI_PARTITION_ENTRY Gpt; + EFI_PARTITION_ENTRY Gpt; } Info; } EFI_PARTITION_INFO_PROTOCOL; @@ -63,6 +62,6 @@ typedef struct { /// /// Partition Information Protocol GUID variable. /// -extern EFI_GUID gEfiPartitionInfoProtocolGuid; +extern EFI_GUID gEfiPartitionInfoProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Pcd.h b/MdePkg/Include/Protocol/Pcd.h index 6dc5388..25f73cd 100644 --- a/MdePkg/Include/Protocol/Pcd.h +++ b/MdePkg/Include/Protocol/Pcd.h @@ -17,13 +17,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #ifndef __PCD_H__ #define __PCD_H__ -extern EFI_GUID gPcdProtocolGuid; +extern EFI_GUID gPcdProtocolGuid; #define PCD_PROTOCOL_GUID \ { 0x11b34006, 0xd85b, 0x4d0a, { 0xa2, 0x90, 0xd5, 0xa5, 0x71, 0x31, 0xe, 0xf7 } } -#define PCD_INVALID_TOKEN_NUMBER ((UINTN) 0) - +#define PCD_INVALID_TOKEN_NUMBER ((UINTN) 0) /** Sets the SKU value for subsequent calls to set or get PCD token values. @@ -53,8 +52,6 @@ VOID IN UINTN SkuId ); - - /** Retrieves an 8-bit value for a given PCD token. @@ -72,8 +69,6 @@ UINT8 IN UINTN TokenNumber ); - - /** Retrieves a 16-bit value for a given PCD token. @@ -91,8 +86,6 @@ UINT16 IN UINTN TokenNumber ); - - /** Retrieves a 32-bit value for a given PCD token. @@ -110,8 +103,6 @@ UINT32 IN UINTN TokenNumber ); - - /** Retrieves a 64-bit value for a given PCD token. @@ -129,8 +120,6 @@ UINT64 IN UINTN TokenNumber ); - - /** Retrieves a pointer to a value for a given PCD token. @@ -150,8 +139,6 @@ VOID * IN UINTN TokenNumber ); - - /** Retrieves a Boolean value for a given PCD token. @@ -171,8 +158,6 @@ BOOLEAN IN UINTN TokenNumber ); - - /** Retrieves the size of the value for a given PCD token. @@ -190,8 +175,6 @@ UINTN IN UINTN TokenNumber ); - - /** Retrieves an 8-bit value for a given PCD token. @@ -213,8 +196,6 @@ UINT8 IN UINTN TokenNumber ); - - /** Retrieves a 16-bit value for a given PCD token. @@ -236,8 +217,6 @@ UINT16 IN UINTN TokenNumber ); - - /** Retrieves a 32-bit value for a given PCD token. @@ -259,8 +238,6 @@ UINT32 IN UINTN TokenNumber ); - - /** Retrieves an 64-bit value for a given PCD token. @@ -282,8 +259,6 @@ UINT64 IN UINTN TokenNumber ); - - /** Retrieves a pointer to a value for a given PCD token. @@ -305,8 +280,6 @@ VOID * IN UINTN TokenNumber ); - - /** Retrieves a Boolean value for a given PCD token. @@ -328,8 +301,6 @@ BOOLEAN IN UINTN TokenNumber ); - - /** Retrieves the size of the value for a given PCD token. @@ -349,8 +320,6 @@ UINTN IN UINTN TokenNumber ); - - /** Sets an 8-bit value for a given PCD token. @@ -375,8 +344,6 @@ EFI_STATUS IN UINT8 Value ); - - /** Sets a 16-bit value for a given PCD token. @@ -401,8 +368,6 @@ EFI_STATUS IN UINT16 Value ); - - /** Sets a 32-bit value for a given PCD token. @@ -427,8 +392,6 @@ EFI_STATUS IN UINT32 Value ); - - /** Sets a 64-bit value for a given PCD token. @@ -453,8 +416,6 @@ EFI_STATUS IN UINT64 Value ); - - /** Sets a value of a specified size for a given PCD token. @@ -484,8 +445,6 @@ EFI_STATUS IN VOID *Buffer ); - - /** Sets a Boolean value for a given PCD token. @@ -510,8 +469,6 @@ EFI_STATUS IN BOOLEAN Value ); - - /** Sets an 8-bit value for a given PCD token. @@ -538,8 +495,6 @@ EFI_STATUS IN UINT8 Value ); - - /** Sets an 16-bit value for a given PCD token. @@ -566,8 +521,6 @@ EFI_STATUS IN UINT16 Value ); - - /** Sets a 32-bit value for a given PCD token. @@ -594,8 +547,6 @@ EFI_STATUS IN UINT32 Value ); - - /** Sets a 64-bit value for a given PCD token. @@ -622,8 +573,6 @@ EFI_STATUS IN UINT64 Value ); - - /** Sets a value of a specified size for a given PCD token. @@ -655,8 +604,6 @@ EFI_STATUS IN VOID *Buffer ); - - /** Sets a Boolean value for a given PCD token. @@ -683,8 +630,6 @@ EFI_STATUS IN BOOLEAN Value ); - - /** Callback on SET function prototype definition. @@ -713,8 +658,6 @@ VOID IN UINTN TokenDataSize ); - - /** Specifies a function to be called anytime the value of a designated token is changed. @@ -735,8 +678,6 @@ EFI_STATUS IN PCD_PROTOCOL_CALLBACK CallBackFunction ); - - /** Cancels a previously set callback function for a particular PCD token number. @@ -757,8 +698,6 @@ EFI_STATUS IN PCD_PROTOCOL_CALLBACK CallBackFunction ); - - /** Retrieves the next valid token number in a given namespace. @@ -792,8 +731,6 @@ EFI_STATUS IN OUT UINTN *TokenNumber ); - - /** Retrieves the next valid PCD token namespace for a given namespace. @@ -820,42 +757,42 @@ EFI_STATUS /// This service abstracts the ability to set/get Platform Configuration Database (PCD). /// typedef struct { - PCD_PROTOCOL_SET_SKU SetSku; - - PCD_PROTOCOL_GET8 Get8; - PCD_PROTOCOL_GET16 Get16; - PCD_PROTOCOL_GET32 Get32; - PCD_PROTOCOL_GET64 Get64; - PCD_PROTOCOL_GET_POINTER GetPtr; - PCD_PROTOCOL_GET_BOOLEAN GetBool; - PCD_PROTOCOL_GET_SIZE GetSize; - - PCD_PROTOCOL_GET_EX_8 Get8Ex; - PCD_PROTOCOL_GET_EX_16 Get16Ex; - PCD_PROTOCOL_GET_EX_32 Get32Ex; - PCD_PROTOCOL_GET_EX_64 Get64Ex; - PCD_PROTOCOL_GET_EX_POINTER GetPtrEx; - PCD_PROTOCOL_GET_EX_BOOLEAN GetBoolEx; - PCD_PROTOCOL_GET_EX_SIZE GetSizeEx; - - PCD_PROTOCOL_SET8 Set8; - PCD_PROTOCOL_SET16 Set16; - PCD_PROTOCOL_SET32 Set32; - PCD_PROTOCOL_SET64 Set64; - PCD_PROTOCOL_SET_POINTER SetPtr; - PCD_PROTOCOL_SET_BOOLEAN SetBool; - - PCD_PROTOCOL_SET_EX_8 Set8Ex; - PCD_PROTOCOL_SET_EX_16 Set16Ex; - PCD_PROTOCOL_SET_EX_32 Set32Ex; - PCD_PROTOCOL_SET_EX_64 Set64Ex; - PCD_PROTOCOL_SET_EX_POINTER SetPtrEx; - PCD_PROTOCOL_SET_EX_BOOLEAN SetBoolEx; - - PCD_PROTOCOL_CALLBACK_ONSET CallbackOnSet; - PCD_PROTOCOL_CANCEL_CALLBACK CancelCallback; - PCD_PROTOCOL_GET_NEXT_TOKEN GetNextToken; - PCD_PROTOCOL_GET_NEXT_TOKENSPACE GetNextTokenSpace; + PCD_PROTOCOL_SET_SKU SetSku; + + PCD_PROTOCOL_GET8 Get8; + PCD_PROTOCOL_GET16 Get16; + PCD_PROTOCOL_GET32 Get32; + PCD_PROTOCOL_GET64 Get64; + PCD_PROTOCOL_GET_POINTER GetPtr; + PCD_PROTOCOL_GET_BOOLEAN GetBool; + PCD_PROTOCOL_GET_SIZE GetSize; + + PCD_PROTOCOL_GET_EX_8 Get8Ex; + PCD_PROTOCOL_GET_EX_16 Get16Ex; + PCD_PROTOCOL_GET_EX_32 Get32Ex; + PCD_PROTOCOL_GET_EX_64 Get64Ex; + PCD_PROTOCOL_GET_EX_POINTER GetPtrEx; + PCD_PROTOCOL_GET_EX_BOOLEAN GetBoolEx; + PCD_PROTOCOL_GET_EX_SIZE GetSizeEx; + + PCD_PROTOCOL_SET8 Set8; + PCD_PROTOCOL_SET16 Set16; + PCD_PROTOCOL_SET32 Set32; + PCD_PROTOCOL_SET64 Set64; + PCD_PROTOCOL_SET_POINTER SetPtr; + PCD_PROTOCOL_SET_BOOLEAN SetBool; + + PCD_PROTOCOL_SET_EX_8 Set8Ex; + PCD_PROTOCOL_SET_EX_16 Set16Ex; + PCD_PROTOCOL_SET_EX_32 Set32Ex; + PCD_PROTOCOL_SET_EX_64 Set64Ex; + PCD_PROTOCOL_SET_EX_POINTER SetPtrEx; + PCD_PROTOCOL_SET_EX_BOOLEAN SetBoolEx; + + PCD_PROTOCOL_CALLBACK_ONSET CallbackOnSet; + PCD_PROTOCOL_CANCEL_CALLBACK CancelCallback; + PCD_PROTOCOL_GET_NEXT_TOKEN GetNextToken; + PCD_PROTOCOL_GET_NEXT_TOKENSPACE GetNextTokenSpace; } PCD_PROTOCOL; #endif diff --git a/MdePkg/Include/Protocol/PcdInfo.h b/MdePkg/Include/Protocol/PcdInfo.h index b0ec7f6..ea4fe1a 100644 --- a/MdePkg/Include/Protocol/PcdInfo.h +++ b/MdePkg/Include/Protocol/PcdInfo.h @@ -19,7 +19,7 @@ #ifndef __PCD_INFO_H__ #define __PCD_INFO_H__ -extern EFI_GUID gGetPcdInfoProtocolGuid; +extern EFI_GUID gGetPcdInfoProtocolGuid; #define GET_PCD_INFO_PROTOCOL_GUID \ { 0x5be40f57, 0xfa68, 0x4610, { 0xbb, 0xbf, 0xe9, 0xc5, 0xfc, 0xda, 0xd3, 0x65 } } @@ -27,7 +27,7 @@ extern EFI_GUID gGetPcdInfoProtocolGuid; /// /// The forward declaration for GET_PCD_INFO_PROTOCOL. /// -typedef struct _GET_PCD_INFO_PROTOCOL GET_PCD_INFO_PROTOCOL; +typedef struct _GET_PCD_INFO_PROTOCOL GET_PCD_INFO_PROTOCOL; /** Retrieve additional information associated with a PCD token. @@ -43,10 +43,10 @@ typedef struct _GET_PCD_INFO_PROTOCOL GET_PCD_INFO_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI *GET_PCD_INFO_PROTOCOL_GET_INFO) ( +(EFIAPI *GET_PCD_INFO_PROTOCOL_GET_INFO)( IN UINTN TokenNumber, OUT EFI_PCD_INFO *PcdInfo -); + ); /** Retrieve additional information associated with a PCD token. @@ -63,11 +63,11 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *GET_PCD_INFO_PROTOCOL_GET_INFO_EX) ( +(EFIAPI *GET_PCD_INFO_PROTOCOL_GET_INFO_EX)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber, OUT EFI_PCD_INFO *PcdInfo -); + ); /** Retrieve the currently set SKU Id. @@ -78,9 +78,9 @@ EFI_STATUS **/ typedef UINTN -(EFIAPI *GET_PCD_INFO_PROTOCOL_GET_SKU) ( +(EFIAPI *GET_PCD_INFO_PROTOCOL_GET_SKU)( VOID -); + ); /// /// This is the PCD service to use when querying for some additional data that can be contained in the @@ -90,13 +90,12 @@ struct _GET_PCD_INFO_PROTOCOL { /// /// Retrieve additional information associated with a PCD. /// - GET_PCD_INFO_PROTOCOL_GET_INFO GetInfo; - GET_PCD_INFO_PROTOCOL_GET_INFO_EX GetInfoEx; + GET_PCD_INFO_PROTOCOL_GET_INFO GetInfo; + GET_PCD_INFO_PROTOCOL_GET_INFO_EX GetInfoEx; /// /// Retrieve the currently set SKU Id. /// - GET_PCD_INFO_PROTOCOL_GET_SKU GetSku; + GET_PCD_INFO_PROTOCOL_GET_SKU GetSku; }; #endif - diff --git a/MdePkg/Include/Protocol/PciEnumerationComplete.h b/MdePkg/Include/Protocol/PciEnumerationComplete.h index 13bd3e17..2d63ef2 100644 --- a/MdePkg/Include/Protocol/PciEnumerationComplete.h +++ b/MdePkg/Include/Protocol/PciEnumerationComplete.h @@ -19,6 +19,6 @@ 0x30cfe3e7, 0x3de1, 0x4586, { 0xbe, 0x20, 0xde, 0xab, 0xa1, 0xb3, 0xb7, 0x93 } \ } -extern EFI_GUID gEfiPciEnumerationCompleteProtocolGuid; +extern EFI_GUID gEfiPciEnumerationCompleteProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/PciHostBridgeResourceAllocation.h b/MdePkg/Include/Protocol/PciHostBridgeResourceAllocation.h index 17b1b5a..5ef7c00 100644 --- a/MdePkg/Include/Protocol/PciHostBridgeResourceAllocation.h +++ b/MdePkg/Include/Protocol/PciHostBridgeResourceAllocation.h @@ -47,7 +47,7 @@ typedef struct _EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL EFI_PCI_HOST_BR /// the PCI bus driver needs to include requests for 64 bit /// memory address in the corresponding 32 bit memory pool. /// -#define EFI_PCI_HOST_BRIDGE_MEM64_DECODE 2 +#define EFI_PCI_HOST_BRIDGE_MEM64_DECODE 2 /// /// A UINT64 value that contains the status of a PCI resource requested @@ -61,7 +61,7 @@ typedef UINT64 EFI_RESOURCE_ALLOCATION_STATUS; /// Configuration parameter returned by GetProposedResources() to identify /// a PCI resources request that can be satisfied. /// -#define EFI_RESOURCE_SATISFIED 0x0000000000000000ULL +#define EFI_RESOURCE_SATISFIED 0x0000000000000000ULL /// /// The request of this resource type could not be fulfilled for its @@ -375,38 +375,38 @@ struct _EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL { /// The notification from the PCI bus enumerator that it is about to enter /// a certain phase during the enumeration process. /// - EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_NOTIFY_PHASE NotifyPhase; + EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_NOTIFY_PHASE NotifyPhase; /// /// Retrieves the device handle for the next PCI root bridge that is produced by the /// host bridge to which this instance of the EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL is attached. /// - EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_GET_NEXT_ROOT_BRIDGE GetNextRootBridge; + EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_GET_NEXT_ROOT_BRIDGE GetNextRootBridge; /// /// Retrieves the allocation-related attributes of a PCI root bridge. /// - EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_GET_ATTRIBUTES GetAllocAttributes; + EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_GET_ATTRIBUTES GetAllocAttributes; /// /// Sets up a PCI root bridge for bus enumeration. /// - EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_START_BUS_ENUMERATION StartBusEnumeration; + EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_START_BUS_ENUMERATION StartBusEnumeration; /// /// Sets up the PCI root bridge so that it decodes a specific range of bus numbers. /// - EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_SET_BUS_NUMBERS SetBusNumbers; + EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_SET_BUS_NUMBERS SetBusNumbers; /// /// Submits the resource requirements for the specified PCI root bridge. /// - EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_SUBMIT_RESOURCES SubmitResources; + EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_SUBMIT_RESOURCES SubmitResources; /// /// Returns the proposed resource assignment for the specified PCI root bridges. /// - EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_GET_PROPOSED_RESOURCES GetProposedResources; + EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_GET_PROPOSED_RESOURCES GetProposedResources; /// /// Provides hooks from the PCI bus driver to every PCI controller @@ -414,9 +414,9 @@ struct _EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL { /// allow the host bridge driver to preinitialize individual PCI controllers /// before enumeration. /// - EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_PREPROCESS_CONTROLLER PreprocessController; + EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_PREPROCESS_CONTROLLER PreprocessController; }; -extern EFI_GUID gEfiPciHostBridgeResourceAllocationProtocolGuid; +extern EFI_GUID gEfiPciHostBridgeResourceAllocationProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/PciHotPlugInit.h b/MdePkg/Include/Protocol/PciHotPlugInit.h index 72dd248..cd90977 100644 --- a/MdePkg/Include/Protocol/PciHotPlugInit.h +++ b/MdePkg/Include/Protocol/PciHotPlugInit.h @@ -76,18 +76,18 @@ typedef UINT16 EFI_HPC_STATE; /// disabled in hardware, or it may be disabled due to user preferences, /// hardware failure, or other reasons. No resource padding is required. /// -#define EFI_HPC_STATE_INITIALIZED 0x01 +#define EFI_HPC_STATE_INITIALIZED 0x01 /// /// The HPC initialization function was called, the HPC completed /// initialization, and it was enabled. Resource padding is required. /// -#define EFI_HPC_STATE_ENABLED 0x02 +#define EFI_HPC_STATE_ENABLED 0x02 /// /// Location definition for PCI Hot Plug Controller /// -typedef struct{ +typedef struct { /// /// /// The device path to the root HPC. An HPC cannot control its parent buses. @@ -95,7 +95,7 @@ typedef struct{ /// correct HpcPciAddress to the InitializeRootHpc() and GetResourcePadding() /// functions. /// - EFI_DEVICE_PATH_PROTOCOL *HpcDevicePath; + EFI_DEVICE_PATH_PROTOCOL *HpcDevicePath; /// /// The device path to the Hot Plug Bus (HPB) that is controlled by the root /// HPC. The PCI bus driver uses this information to check if a particular PCI @@ -103,7 +103,7 @@ typedef struct{ /// device path of its parent. For Standard(PCI) Hot Plug Controllers (SHPCs) /// and PCI Express*, HpbDevicePath is the same as HpcDevicePath. /// - EFI_DEVICE_PATH_PROTOCOL *HpbDevicePath; + EFI_DEVICE_PATH_PROTOCOL *HpbDevicePath; } EFI_HPC_LOCATION; /// @@ -254,19 +254,19 @@ struct _EFI_PCI_HOT_PLUG_INIT_PROTOCOL { /// /// Returns a list of root HPCs and the buses that they control. /// - EFI_GET_ROOT_HPC_LIST GetRootHpcList; + EFI_GET_ROOT_HPC_LIST GetRootHpcList; /// /// Initializes the specified root HPC. /// - EFI_INITIALIZE_ROOT_HPC InitializeRootHpc; + EFI_INITIALIZE_ROOT_HPC InitializeRootHpc; /// /// Returns the resource padding that is required by the HPC. /// - EFI_GET_HOT_PLUG_PADDING GetResourcePadding; + EFI_GET_HOT_PLUG_PADDING GetResourcePadding; }; -extern EFI_GUID gEfiPciHotPlugInitProtocolGuid; +extern EFI_GUID gEfiPciHotPlugInitProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/PciHotPlugRequest.h b/MdePkg/Include/Protocol/PciHotPlugRequest.h index 780bbe1..78b4fcb 100644 --- a/MdePkg/Include/Protocol/PciHotPlugRequest.h +++ b/MdePkg/Include/Protocol/PciHotPlugRequest.h @@ -51,7 +51,7 @@ /// /// Forward declaration for EFI_PCI_HOTPLUG_REQUEST_PROTOCOL /// -typedef struct _EFI_PCI_HOTPLUG_REQUEST_PROTOCOL EFI_PCI_HOTPLUG_REQUEST_PROTOCOL; +typedef struct _EFI_PCI_HOTPLUG_REQUEST_PROTOCOL EFI_PCI_HOTPLUG_REQUEST_PROTOCOL; /// /// Enumeration of PCI hot plug operations @@ -156,9 +156,9 @@ struct _EFI_PCI_HOTPLUG_REQUEST_PROTOCOL { /// to create or destroy handles for the PCI-like devices. See Section 0 for /// a detailed description. /// - EFI_PCI_HOTPLUG_REQUEST_NOTIFY Notify; + EFI_PCI_HOTPLUG_REQUEST_NOTIFY Notify; }; -extern EFI_GUID gEfiPciHotPlugRequestProtocolGuid; +extern EFI_GUID gEfiPciHotPlugRequestProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/PciIo.h b/MdePkg/Include/Protocol/PciIo.h index d77ceec..55c5de3 100644 --- a/MdePkg/Include/Protocol/PciIo.h +++ b/MdePkg/Include/Protocol/PciIo.h @@ -18,7 +18,7 @@ 0x4cf5b200, 0x68b8, 0x4ca5, {0x9e, 0xec, 0xb2, 0x3e, 0x3f, 0x50, 0x2, 0x9a } \ } -typedef struct _EFI_PCI_IO_PROTOCOL EFI_PCI_IO_PROTOCOL; +typedef struct _EFI_PCI_IO_PROTOCOL EFI_PCI_IO_PROTOCOL; /// /// ******************************************************* @@ -26,7 +26,7 @@ typedef struct _EFI_PCI_IO_PROTOCOL EFI_PCI_IO_PROTOCOL; /// ******************************************************* /// typedef enum { - EfiPciIoWidthUint8 = 0, + EfiPciIoWidthUint8 = 0, EfiPciIoWidthUint16, EfiPciIoWidthUint32, EfiPciIoWidthUint64, @@ -44,30 +44,30 @@ typedef enum { // // Complete PCI address generater // -#define EFI_PCI_IO_PASS_THROUGH_BAR 0xff ///< Special BAR that passes a memory or I/O cycle through unchanged -#define EFI_PCI_IO_ATTRIBUTE_MASK 0x077f ///< All the following I/O and Memory cycles -#define EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO 0x0001 ///< I/O cycles 0x0000-0x00FF (10 bit decode) -#define EFI_PCI_IO_ATTRIBUTE_ISA_IO 0x0002 ///< I/O cycles 0x0100-0x03FF or greater (10 bit decode) -#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO 0x0004 ///< I/O cycles 0x3C6, 0x3C8, 0x3C9 (10 bit decode) -#define EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY 0x0008 ///< MEM cycles 0xA0000-0xBFFFF (24 bit decode) -#define EFI_PCI_IO_ATTRIBUTE_VGA_IO 0x0010 ///< I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (10 bit decode) -#define EFI_PCI_IO_ATTRIBUTE_IDE_PRIMARY_IO 0x0020 ///< I/O cycles 0x1F0-0x1F7, 0x3F6, 0x3F7 (10 bit decode) -#define EFI_PCI_IO_ATTRIBUTE_IDE_SECONDARY_IO 0x0040 ///< I/O cycles 0x170-0x177, 0x376, 0x377 (10 bit decode) -#define EFI_PCI_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x0080 ///< Map a memory range so writes are combined -#define EFI_PCI_IO_ATTRIBUTE_IO 0x0100 ///< Enable the I/O decode bit in the PCI Config Header -#define EFI_PCI_IO_ATTRIBUTE_MEMORY 0x0200 ///< Enable the Memory decode bit in the PCI Config Header -#define EFI_PCI_IO_ATTRIBUTE_BUS_MASTER 0x0400 ///< Enable the DMA bit in the PCI Config Header -#define EFI_PCI_IO_ATTRIBUTE_MEMORY_CACHED 0x0800 ///< Map a memory range so all r/w accesses are cached -#define EFI_PCI_IO_ATTRIBUTE_MEMORY_DISABLE 0x1000 ///< Disable a memory range -#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_DEVICE 0x2000 ///< Clear for an add-in PCI Device -#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM 0x4000 ///< Clear for a physical PCI Option ROM accessed through ROM BAR -#define EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE 0x8000 ///< Clear for PCI controllers that can not genrate a DAC -#define EFI_PCI_IO_ATTRIBUTE_ISA_IO_16 0x10000 ///< I/O cycles 0x0100-0x03FF or greater (16 bit decode) -#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16 0x20000 ///< I/O cycles 0x3C6, 0x3C8, 0x3C9 (16 bit decode) -#define EFI_PCI_IO_ATTRIBUTE_VGA_IO_16 0x40000 ///< I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (16 bit decode) - -#define EFI_PCI_DEVICE_ENABLE (EFI_PCI_IO_ATTRIBUTE_IO | EFI_PCI_IO_ATTRIBUTE_MEMORY | EFI_PCI_IO_ATTRIBUTE_BUS_MASTER) -#define EFI_VGA_DEVICE_ENABLE (EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO | EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY | EFI_PCI_IO_ATTRIBUTE_VGA_IO | EFI_PCI_IO_ATTRIBUTE_IO) +#define EFI_PCI_IO_PASS_THROUGH_BAR 0xff ///< Special BAR that passes a memory or I/O cycle through unchanged +#define EFI_PCI_IO_ATTRIBUTE_MASK 0x077f ///< All the following I/O and Memory cycles +#define EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO 0x0001 ///< I/O cycles 0x0000-0x00FF (10 bit decode) +#define EFI_PCI_IO_ATTRIBUTE_ISA_IO 0x0002 ///< I/O cycles 0x0100-0x03FF or greater (10 bit decode) +#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO 0x0004 ///< I/O cycles 0x3C6, 0x3C8, 0x3C9 (10 bit decode) +#define EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY 0x0008 ///< MEM cycles 0xA0000-0xBFFFF (24 bit decode) +#define EFI_PCI_IO_ATTRIBUTE_VGA_IO 0x0010 ///< I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (10 bit decode) +#define EFI_PCI_IO_ATTRIBUTE_IDE_PRIMARY_IO 0x0020 ///< I/O cycles 0x1F0-0x1F7, 0x3F6, 0x3F7 (10 bit decode) +#define EFI_PCI_IO_ATTRIBUTE_IDE_SECONDARY_IO 0x0040 ///< I/O cycles 0x170-0x177, 0x376, 0x377 (10 bit decode) +#define EFI_PCI_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x0080 ///< Map a memory range so writes are combined +#define EFI_PCI_IO_ATTRIBUTE_IO 0x0100 ///< Enable the I/O decode bit in the PCI Config Header +#define EFI_PCI_IO_ATTRIBUTE_MEMORY 0x0200 ///< Enable the Memory decode bit in the PCI Config Header +#define EFI_PCI_IO_ATTRIBUTE_BUS_MASTER 0x0400 ///< Enable the DMA bit in the PCI Config Header +#define EFI_PCI_IO_ATTRIBUTE_MEMORY_CACHED 0x0800 ///< Map a memory range so all r/w accesses are cached +#define EFI_PCI_IO_ATTRIBUTE_MEMORY_DISABLE 0x1000 ///< Disable a memory range +#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_DEVICE 0x2000 ///< Clear for an add-in PCI Device +#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM 0x4000 ///< Clear for a physical PCI Option ROM accessed through ROM BAR +#define EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE 0x8000 ///< Clear for PCI controllers that can not genrate a DAC +#define EFI_PCI_IO_ATTRIBUTE_ISA_IO_16 0x10000 ///< I/O cycles 0x0100-0x03FF or greater (16 bit decode) +#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16 0x20000 ///< I/O cycles 0x3C6, 0x3C8, 0x3C9 (16 bit decode) +#define EFI_PCI_IO_ATTRIBUTE_VGA_IO_16 0x40000 ///< I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (16 bit decode) + +#define EFI_PCI_DEVICE_ENABLE (EFI_PCI_IO_ATTRIBUTE_IO | EFI_PCI_IO_ATTRIBUTE_MEMORY | EFI_PCI_IO_ATTRIBUTE_BUS_MASTER) +#define EFI_VGA_DEVICE_ENABLE (EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO | EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY | EFI_PCI_IO_ATTRIBUTE_VGA_IO | EFI_PCI_IO_ATTRIBUTE_IO) /// /// ******************************************************* @@ -190,11 +190,11 @@ typedef struct { /// /// Read PCI controller registers in the PCI memory or I/O space. /// - EFI_PCI_IO_PROTOCOL_IO_MEM Read; + EFI_PCI_IO_PROTOCOL_IO_MEM Read; /// /// Write PCI controller registers in the PCI memory or I/O space. /// - EFI_PCI_IO_PROTOCOL_IO_MEM Write; + EFI_PCI_IO_PROTOCOL_IO_MEM Write; } EFI_PCI_IO_PROTOCOL_ACCESS; /** @@ -229,11 +229,11 @@ typedef struct { /// /// Read PCI controller registers in PCI configuration space. /// - EFI_PCI_IO_PROTOCOL_CONFIG Read; + EFI_PCI_IO_PROTOCOL_CONFIG Read; /// /// Write PCI controller registers in PCI configuration space. /// - EFI_PCI_IO_PROTOCOL_CONFIG Write; + EFI_PCI_IO_PROTOCOL_CONFIG Write; } EFI_PCI_IO_PROTOCOL_CONFIG_ACCESS; /** @@ -514,26 +514,26 @@ EFI_STATUS /// retrieve the EFI_PCI_IO_PROTOCOL instance that is associated with the PCI controller. /// struct _EFI_PCI_IO_PROTOCOL { - EFI_PCI_IO_PROTOCOL_POLL_IO_MEM PollMem; - EFI_PCI_IO_PROTOCOL_POLL_IO_MEM PollIo; - EFI_PCI_IO_PROTOCOL_ACCESS Mem; - EFI_PCI_IO_PROTOCOL_ACCESS Io; - EFI_PCI_IO_PROTOCOL_CONFIG_ACCESS Pci; - EFI_PCI_IO_PROTOCOL_COPY_MEM CopyMem; - EFI_PCI_IO_PROTOCOL_MAP Map; - EFI_PCI_IO_PROTOCOL_UNMAP Unmap; - EFI_PCI_IO_PROTOCOL_ALLOCATE_BUFFER AllocateBuffer; - EFI_PCI_IO_PROTOCOL_FREE_BUFFER FreeBuffer; - EFI_PCI_IO_PROTOCOL_FLUSH Flush; - EFI_PCI_IO_PROTOCOL_GET_LOCATION GetLocation; - EFI_PCI_IO_PROTOCOL_ATTRIBUTES Attributes; - EFI_PCI_IO_PROTOCOL_GET_BAR_ATTRIBUTES GetBarAttributes; - EFI_PCI_IO_PROTOCOL_SET_BAR_ATTRIBUTES SetBarAttributes; + EFI_PCI_IO_PROTOCOL_POLL_IO_MEM PollMem; + EFI_PCI_IO_PROTOCOL_POLL_IO_MEM PollIo; + EFI_PCI_IO_PROTOCOL_ACCESS Mem; + EFI_PCI_IO_PROTOCOL_ACCESS Io; + EFI_PCI_IO_PROTOCOL_CONFIG_ACCESS Pci; + EFI_PCI_IO_PROTOCOL_COPY_MEM CopyMem; + EFI_PCI_IO_PROTOCOL_MAP Map; + EFI_PCI_IO_PROTOCOL_UNMAP Unmap; + EFI_PCI_IO_PROTOCOL_ALLOCATE_BUFFER AllocateBuffer; + EFI_PCI_IO_PROTOCOL_FREE_BUFFER FreeBuffer; + EFI_PCI_IO_PROTOCOL_FLUSH Flush; + EFI_PCI_IO_PROTOCOL_GET_LOCATION GetLocation; + EFI_PCI_IO_PROTOCOL_ATTRIBUTES Attributes; + EFI_PCI_IO_PROTOCOL_GET_BAR_ATTRIBUTES GetBarAttributes; + EFI_PCI_IO_PROTOCOL_SET_BAR_ATTRIBUTES SetBarAttributes; /// /// The size, in bytes, of the ROM image. /// - UINT64 RomSize; + UINT64 RomSize; /// /// A pointer to the in memory copy of the ROM image. The PCI Bus Driver is responsible @@ -543,9 +543,9 @@ struct _EFI_PCI_IO_PROTOCOL { /// The Attributes() function can be used to determine from which of these two sources /// the RomImage buffer was initialized. /// - VOID *RomImage; + VOID *RomImage; }; -extern EFI_GUID gEfiPciIoProtocolGuid; +extern EFI_GUID gEfiPciIoProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/PciOverride.h b/MdePkg/Include/Protocol/PciOverride.h index 0a7635d..91f20a1 100644 --- a/MdePkg/Include/Protocol/PciOverride.h +++ b/MdePkg/Include/Protocol/PciOverride.h @@ -34,7 +34,6 @@ /// typedef EFI_PCI_PLATFORM_PROTOCOL EFI_PCI_OVERRIDE_PROTOCOL; - -extern EFI_GUID gEfiPciOverrideProtocolGuid; +extern EFI_GUID gEfiPciOverrideProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/PciPlatform.h b/MdePkg/Include/Protocol/PciPlatform.h index 4b0cf07..355f4ba 100644 --- a/MdePkg/Include/Protocol/PciPlatform.h +++ b/MdePkg/Include/Protocol/PciPlatform.h @@ -110,13 +110,13 @@ typedef struct _EFI_PCI_PLATFORM_PROTOCOL EFI_PCI_PLATFORM_PROTOCOL; /// be treated like EFI_RESERVE_ISA_IO_NO_ALIAS | /// EFI_RESERVE_VGA_IO_ALIAS. /// -typedef UINT32 EFI_PCI_PLATFORM_POLICY; +typedef UINT32 EFI_PCI_PLATFORM_POLICY; /// /// Does not set aside either ISA or VGA I/O resources during PCI /// enumeration. /// -#define EFI_RESERVE_NONE_IO_ALIAS 0x0000 +#define EFI_RESERVE_NONE_IO_ALIAS 0x0000 /// /// Sets aside ISA I/O range and all aliases: @@ -125,22 +125,22 @@ typedef UINT32 EFI_PCI_PLATFORM_POLICY; /// - n900..nBFF /// - nD00..nFFF. /// -#define EFI_RESERVE_ISA_IO_ALIAS 0x0001 +#define EFI_RESERVE_ISA_IO_ALIAS 0x0001 /// /// Sets aside ISA I/O range 0x100-0x3FF. /// -#define EFI_RESERVE_ISA_IO_NO_ALIAS 0x0002 +#define EFI_RESERVE_ISA_IO_NO_ALIAS 0x0002 /// /// Sets aside VGA I/O ranges and all aliases. /// -#define EFI_RESERVE_VGA_IO_ALIAS 0x0004 +#define EFI_RESERVE_VGA_IO_ALIAS 0x0004 /// /// Sets aside VGA I/O ranges /// -#define EFI_RESERVE_VGA_IO_NO_ALIAS 0x0008 +#define EFI_RESERVE_VGA_IO_NO_ALIAS 0x0008 /// /// EFI_PCI_EXECUTION_PHASE is used to call a platform protocol and execute @@ -317,22 +317,22 @@ struct _EFI_PCI_PLATFORM_PROTOCOL { /// The notification from the PCI bus enumerator to the platform that it is about to /// enter a certain phase during the enumeration process. /// - EFI_PCI_PLATFORM_PHASE_NOTIFY PlatformNotify; + EFI_PCI_PLATFORM_PHASE_NOTIFY PlatformNotify; /// /// The notification from the PCI bus enumerator to the platform for each PCI /// controller at several predefined points during PCI controller initialization. /// - EFI_PCI_PLATFORM_PREPROCESS_CONTROLLER PlatformPrepController; + EFI_PCI_PLATFORM_PREPROCESS_CONTROLLER PlatformPrepController; /// /// Retrieves the platform policy regarding enumeration. /// - EFI_PCI_PLATFORM_GET_PLATFORM_POLICY GetPlatformPolicy; + EFI_PCI_PLATFORM_GET_PLATFORM_POLICY GetPlatformPolicy; /// /// Gets the PCI device's option ROM from a platform-specific location. /// - EFI_PCI_PLATFORM_GET_PCI_ROM GetPciRom; + EFI_PCI_PLATFORM_GET_PCI_ROM GetPciRom; }; -extern EFI_GUID gEfiPciPlatformProtocolGuid; +extern EFI_GUID gEfiPciPlatformProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/PciRootBridgeIo.h b/MdePkg/Include/Protocol/PciRootBridgeIo.h index 068bcd8..b2927b0 100644 --- a/MdePkg/Include/Protocol/PciRootBridgeIo.h +++ b/MdePkg/Include/Protocol/PciRootBridgeIo.h @@ -20,7 +20,7 @@ 0x2f707ebb, 0x4a1a, 0x11d4, {0x9a, 0x38, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ } -typedef struct _EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL; +typedef struct _EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL; /// /// ******************************************************* @@ -82,24 +82,24 @@ typedef enum { EfiPciOperationMaximum } EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_OPERATION; -#define EFI_PCI_ATTRIBUTE_ISA_MOTHERBOARD_IO 0x0001 -#define EFI_PCI_ATTRIBUTE_ISA_IO 0x0002 -#define EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO 0x0004 -#define EFI_PCI_ATTRIBUTE_VGA_MEMORY 0x0008 -#define EFI_PCI_ATTRIBUTE_VGA_IO 0x0010 -#define EFI_PCI_ATTRIBUTE_IDE_PRIMARY_IO 0x0020 -#define EFI_PCI_ATTRIBUTE_IDE_SECONDARY_IO 0x0040 -#define EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x0080 -#define EFI_PCI_ATTRIBUTE_MEMORY_CACHED 0x0800 -#define EFI_PCI_ATTRIBUTE_MEMORY_DISABLE 0x1000 -#define EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE 0x8000 -#define EFI_PCI_ATTRIBUTE_ISA_IO_16 0x10000 -#define EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO_16 0x20000 -#define EFI_PCI_ATTRIBUTE_VGA_IO_16 0x40000 - -#define EFI_PCI_ATTRIBUTE_VALID_FOR_ALLOCATE_BUFFER (EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE | EFI_PCI_ATTRIBUTE_MEMORY_CACHED | EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE) - -#define EFI_PCI_ATTRIBUTE_INVALID_FOR_ALLOCATE_BUFFER (~EFI_PCI_ATTRIBUTE_VALID_FOR_ALLOCATE_BUFFER) +#define EFI_PCI_ATTRIBUTE_ISA_MOTHERBOARD_IO 0x0001 +#define EFI_PCI_ATTRIBUTE_ISA_IO 0x0002 +#define EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO 0x0004 +#define EFI_PCI_ATTRIBUTE_VGA_MEMORY 0x0008 +#define EFI_PCI_ATTRIBUTE_VGA_IO 0x0010 +#define EFI_PCI_ATTRIBUTE_IDE_PRIMARY_IO 0x0020 +#define EFI_PCI_ATTRIBUTE_IDE_SECONDARY_IO 0x0040 +#define EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x0080 +#define EFI_PCI_ATTRIBUTE_MEMORY_CACHED 0x0800 +#define EFI_PCI_ATTRIBUTE_MEMORY_DISABLE 0x1000 +#define EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE 0x8000 +#define EFI_PCI_ATTRIBUTE_ISA_IO_16 0x10000 +#define EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO_16 0x20000 +#define EFI_PCI_ATTRIBUTE_VGA_IO_16 0x40000 + +#define EFI_PCI_ATTRIBUTE_VALID_FOR_ALLOCATE_BUFFER (EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE | EFI_PCI_ATTRIBUTE_MEMORY_CACHED | EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE) + +#define EFI_PCI_ATTRIBUTE_INVALID_FOR_ALLOCATE_BUFFER (~EFI_PCI_ATTRIBUTE_VALID_FOR_ALLOCATE_BUFFER) #define EFI_PCI_ADDRESS(bus, dev, func, reg) \ (UINT64) ( \ @@ -109,11 +109,11 @@ typedef enum { (((UINTN) (reg)) < 256 ? ((UINTN) (reg)) : (UINT64) (LShiftU64 ((UINT64) (reg), 32)))) typedef struct { - UINT8 Register; - UINT8 Function; - UINT8 Device; - UINT8 Bus; - UINT32 ExtendedRegister; + UINT8 Register; + UINT8 Function; + UINT8 Device; + UINT8 Bus; + UINT32 ExtendedRegister; } EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS; /** @@ -175,11 +175,11 @@ typedef struct { /// /// Read PCI controller registers in the PCI root bridge memory space. /// - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM Read; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM Read; /// /// Write PCI controller registers in the PCI root bridge memory space. /// - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM Write; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_IO_MEM Write; } EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS; /** @@ -409,28 +409,28 @@ struct _EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL { /// /// The EFI_HANDLE of the PCI Host Bridge of which this PCI Root Bridge is a member. /// - EFI_HANDLE ParentHandle; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_POLL_IO_MEM PollMem; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_POLL_IO_MEM PollIo; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS Mem; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS Io; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS Pci; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_COPY_MEM CopyMem; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_MAP Map; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_UNMAP Unmap; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ALLOCATE_BUFFER AllocateBuffer; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_FREE_BUFFER FreeBuffer; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_FLUSH Flush; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GET_ATTRIBUTES GetAttributes; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_SET_ATTRIBUTES SetAttributes; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_CONFIGURATION Configuration; + EFI_HANDLE ParentHandle; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_POLL_IO_MEM PollMem; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_POLL_IO_MEM PollIo; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS Mem; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS Io; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ACCESS Pci; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_COPY_MEM CopyMem; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_MAP Map; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_UNMAP Unmap; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_ALLOCATE_BUFFER AllocateBuffer; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_FREE_BUFFER FreeBuffer; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_FLUSH Flush; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GET_ATTRIBUTES GetAttributes; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_SET_ATTRIBUTES SetAttributes; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_CONFIGURATION Configuration; /// /// The segment number that this PCI root bridge resides. /// - UINT32 SegmentNumber; + UINT32 SegmentNumber; }; -extern EFI_GUID gEfiPciRootBridgeIoProtocolGuid; +extern EFI_GUID gEfiPciRootBridgeIoProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/PiPcd.h b/MdePkg/Include/Protocol/PiPcd.h index 67d48d5..e26733b 100644 --- a/MdePkg/Include/Protocol/PiPcd.h +++ b/MdePkg/Include/Protocol/PiPcd.h @@ -22,12 +22,12 @@ #ifndef __PI_PCD_H__ #define __PI_PCD_H__ -extern EFI_GUID gEfiPcdProtocolGuid; +extern EFI_GUID gEfiPcdProtocolGuid; #define EFI_PCD_PROTOCOL_GUID \ { 0x13a3f0f6, 0x264a, 0x3ef0, { 0xf2, 0xe0, 0xde, 0xc5, 0x12, 0x34, 0x2f, 0x34 } } -#define EFI_PCD_INVALID_TOKEN_NUMBER ((UINTN) 0) +#define EFI_PCD_INVALID_TOKEN_NUMBER ((UINTN) 0) /** SetSku() sets the SKU Id to be used for subsequent calls to set or get PCD values. SetSku() is @@ -48,7 +48,7 @@ typedef VOID (EFIAPI *EFI_PCD_PROTOCOL_SET_SKU)( IN UINTN SkuId -); + ); /** Retrieves an 8-bit value for a given PCD token. @@ -64,7 +64,7 @@ UINT8 (EFIAPI *EFI_PCD_PROTOCOL_GET_8)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber -); + ); /** Retrieves the current word-sized value for a PCD token number. @@ -80,7 +80,7 @@ UINT16 (EFIAPI *EFI_PCD_PROTOCOL_GET_16)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber -); + ); /** Retrieves the current 32-bit sized value for a PCD token number. @@ -96,7 +96,7 @@ UINT32 (EFIAPI *EFI_PCD_PROTOCOL_GET_32)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber -); + ); /** Retrieves the 64-bit sized value for a PCD token number. @@ -113,7 +113,7 @@ UINT64 (EFIAPI *EFI_PCD_PROTOCOL_GET_64)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber -); + ); /** Retrieves the current pointer to the value for a PCD token number. Do not make any assumptions @@ -130,7 +130,7 @@ VOID * (EFIAPI *EFI_PCD_PROTOCOL_GET_POINTER)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber -); + ); /** Retrieves the current BOOLEAN-sized value for a PCD token number. If the TokenNumber is @@ -146,7 +146,7 @@ BOOLEAN (EFIAPI *EFI_PCD_PROTOCOL_GET_BOOLEAN)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber -); + ); /** Retrieves the current size of a particular PCD token. If the TokenNumber is invalid, the results are @@ -162,7 +162,7 @@ UINTN (EFIAPI *EFI_PCD_PROTOCOL_GET_SIZE)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber -); + ); /** Sets an 8-bit value for a given PCD token. @@ -186,7 +186,7 @@ EFI_STATUS IN CONST EFI_GUID *Guid, IN UINTN TokenNumber, IN UINT8 Value -); + ); /** Sets an 16-bit value for a given PCD token. @@ -210,7 +210,7 @@ EFI_STATUS IN CONST EFI_GUID *Guid, IN UINTN TokenNumber, IN UINT16 Value -); + ); /** Sets an 32-bit value for a given PCD token. @@ -234,7 +234,7 @@ EFI_STATUS IN CONST EFI_GUID *Guid, IN UINTN TokenNumber, IN UINT32 Value -); + ); /** Sets an 64-bit value for a given PCD token. @@ -258,7 +258,7 @@ EFI_STATUS IN CONST EFI_GUID *Guid, IN UINTN TokenNumber, IN UINT64 Value -); + ); /** Sets a value of a specified size for a given PCD token. @@ -286,7 +286,7 @@ EFI_STATUS IN UINTN TokenNumber, IN OUT UINTN *SizeOfValue, IN VOID *Buffer -); + ); /** Sets a Boolean value for a given PCD token. @@ -310,7 +310,7 @@ EFI_STATUS IN CONST EFI_GUID *Guid, IN UINTN TokenNumber, IN BOOLEAN Value -); + ); typedef VOID @@ -319,7 +319,7 @@ VOID IN UINTN CallBackToken, IN OUT VOID *TokenData, IN UINTN TokenDataSize -); + ); /** Specifies a function to be called anytime the value of a designated token is changed. @@ -337,7 +337,7 @@ EFI_STATUS IN CONST EFI_GUID *Guid OPTIONAL, IN UINTN CallBackToken, IN EFI_PCD_PROTOCOL_CALLBACK CallBackFunction -); + ); /** Cancels a callback function that was set through a previous call to the CallBackOnSet function. @@ -355,7 +355,7 @@ EFI_STATUS IN CONST EFI_GUID *Guid OPTIONAL, IN UINTN CallBackToken, IN EFI_PCD_PROTOCOL_CALLBACK CallBackFunction -); + ); /** Gets the next valid token number in a given namespace. This is useful since the PCD infrastructure @@ -373,7 +373,7 @@ EFI_STATUS (EFIAPI *EFI_PCD_PROTOCOL_GET_NEXT_TOKEN)( IN CONST EFI_GUID *Guid OPTIONAL, IN UINTN *TokenNumber -); + ); /** Gets the next valid token namespace for a given namespace. This is useful to traverse the valid @@ -392,27 +392,27 @@ typedef EFI_STATUS (EFIAPI *EFI_PCD_PROTOCOL_GET_NEXT_TOKEN_SPACE)( IN OUT CONST EFI_GUID **Guid -); + ); typedef struct _EFI_PCD_PROTOCOL { - EFI_PCD_PROTOCOL_SET_SKU SetSku; - EFI_PCD_PROTOCOL_GET_8 Get8; - EFI_PCD_PROTOCOL_GET_16 Get16; - EFI_PCD_PROTOCOL_GET_32 Get32; - EFI_PCD_PROTOCOL_GET_64 Get64; - EFI_PCD_PROTOCOL_GET_POINTER GetPtr; - EFI_PCD_PROTOCOL_GET_BOOLEAN GetBool; - EFI_PCD_PROTOCOL_GET_SIZE GetSize; - EFI_PCD_PROTOCOL_SET_8 Set8; - EFI_PCD_PROTOCOL_SET_16 Set16; - EFI_PCD_PROTOCOL_SET_32 Set32; - EFI_PCD_PROTOCOL_SET_64 Set64; - EFI_PCD_PROTOCOL_SET_POINTER SetPtr; - EFI_PCD_PROTOCOL_SET_BOOLEAN SetBool; - EFI_PCD_PROTOCOL_CALLBACK_ON_SET CallbackOnSet; - EFI_PCD_PROTOCOL_CANCEL_CALLBACK CancelCallback; - EFI_PCD_PROTOCOL_GET_NEXT_TOKEN GetNextToken; - EFI_PCD_PROTOCOL_GET_NEXT_TOKEN_SPACE GetNextTokenSpace; + EFI_PCD_PROTOCOL_SET_SKU SetSku; + EFI_PCD_PROTOCOL_GET_8 Get8; + EFI_PCD_PROTOCOL_GET_16 Get16; + EFI_PCD_PROTOCOL_GET_32 Get32; + EFI_PCD_PROTOCOL_GET_64 Get64; + EFI_PCD_PROTOCOL_GET_POINTER GetPtr; + EFI_PCD_PROTOCOL_GET_BOOLEAN GetBool; + EFI_PCD_PROTOCOL_GET_SIZE GetSize; + EFI_PCD_PROTOCOL_SET_8 Set8; + EFI_PCD_PROTOCOL_SET_16 Set16; + EFI_PCD_PROTOCOL_SET_32 Set32; + EFI_PCD_PROTOCOL_SET_64 Set64; + EFI_PCD_PROTOCOL_SET_POINTER SetPtr; + EFI_PCD_PROTOCOL_SET_BOOLEAN SetBool; + EFI_PCD_PROTOCOL_CALLBACK_ON_SET CallbackOnSet; + EFI_PCD_PROTOCOL_CANCEL_CALLBACK CancelCallback; + EFI_PCD_PROTOCOL_GET_NEXT_TOKEN GetNextToken; + EFI_PCD_PROTOCOL_GET_NEXT_TOKEN_SPACE GetNextTokenSpace; } EFI_PCD_PROTOCOL; #endif diff --git a/MdePkg/Include/Protocol/PiPcdInfo.h b/MdePkg/Include/Protocol/PiPcdInfo.h index eb90f6b..0402fee 100644 --- a/MdePkg/Include/Protocol/PiPcdInfo.h +++ b/MdePkg/Include/Protocol/PiPcdInfo.h @@ -13,7 +13,7 @@ #ifndef __PI_PCD_INFO_H__ #define __PI_PCD_INFO_H__ -extern EFI_GUID gEfiGetPcdInfoProtocolGuid; +extern EFI_GUID gEfiGetPcdInfoProtocolGuid; #define EFI_GET_PCD_INFO_PROTOCOL_GUID \ { 0xfd0f4478, 0xefd, 0x461d, { 0xba, 0x2d, 0xe5, 0x8c, 0x45, 0xfd, 0x5f, 0x5e } } @@ -21,7 +21,7 @@ extern EFI_GUID gEfiGetPcdInfoProtocolGuid; /// /// The forward declaration for EFI_GET_PCD_INFO_PROTOCOL. /// -typedef struct _EFI_GET_PCD_INFO_PROTOCOL EFI_GET_PCD_INFO_PROTOCOL; +typedef struct _EFI_GET_PCD_INFO_PROTOCOL EFI_GET_PCD_INFO_PROTOCOL; /** Retrieve additional information associated with a PCD token. @@ -38,11 +38,11 @@ typedef struct _EFI_GET_PCD_INFO_PROTOCOL EFI_GET_PCD_INFO_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI *EFI_GET_PCD_INFO_PROTOCOL_GET_INFO) ( +(EFIAPI *EFI_GET_PCD_INFO_PROTOCOL_GET_INFO)( IN CONST EFI_GUID *Guid, IN UINTN TokenNumber, OUT EFI_PCD_INFO *PcdInfo -); + ); /** Retrieve the currently set SKU Id. @@ -53,9 +53,9 @@ EFI_STATUS **/ typedef UINTN -(EFIAPI *EFI_GET_PCD_INFO_PROTOCOL_GET_SKU) ( +(EFIAPI *EFI_GET_PCD_INFO_PROTOCOL_GET_SKU)( VOID -); + ); /// /// Callers to this protocol must be at a TPL_APPLICATION task priority level. @@ -74,4 +74,3 @@ struct _EFI_GET_PCD_INFO_PROTOCOL { }; #endif - diff --git a/MdePkg/Include/Protocol/Pkcs7Verify.h b/MdePkg/Include/Protocol/Pkcs7Verify.h index 7b3454e..068eda8 100644 --- a/MdePkg/Include/Protocol/Pkcs7Verify.h +++ b/MdePkg/Include/Protocol/Pkcs7Verify.h @@ -26,7 +26,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent typedef struct _EFI_PKCS7_VERIFY_PROTOCOL EFI_PKCS7_VERIFY_PROTOCOL; - /** Processes a buffer containing binary DER-encoded PKCS7 signature. The signed data content may be embedded within the buffer or separated. Funtion @@ -115,7 +114,7 @@ typedef struct _EFI_PKCS7_VERIFY_PROTOCOL EFI_PKCS7_VERIFY_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI *EFI_PKCS7_VERIFY_BUFFER) ( +(EFIAPI *EFI_PKCS7_VERIFY_BUFFER)( IN EFI_PKCS7_VERIFY_PROTOCOL *This, IN VOID *SignedData, IN UINTN SignedDataSize, @@ -196,7 +195,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_PKCS7_VERIFY_SIGNATURE) ( +(EFIAPI *EFI_PKCS7_VERIFY_SIGNATURE)( IN EFI_PKCS7_VERIFY_PROTOCOL *This, IN VOID *Signature, IN UINTN SignatureSize, @@ -214,10 +213,10 @@ EFI_STATUS /// Support of other hash algorithms is optional. /// struct _EFI_PKCS7_VERIFY_PROTOCOL { - EFI_PKCS7_VERIFY_BUFFER VerifyBuffer; - EFI_PKCS7_VERIFY_SIGNATURE VerifySignature; + EFI_PKCS7_VERIFY_BUFFER VerifyBuffer; + EFI_PKCS7_VERIFY_SIGNATURE VerifySignature; }; -extern EFI_GUID gEfiPkcs7VerifyProtocolGuid; +extern EFI_GUID gEfiPkcs7VerifyProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/PlatformDriverOverride.h b/MdePkg/Include/Protocol/PlatformDriverOverride.h index 1d26034..6979827 100644 --- a/MdePkg/Include/Protocol/PlatformDriverOverride.h +++ b/MdePkg/Include/Protocol/PlatformDriverOverride.h @@ -17,7 +17,7 @@ 0x6b30c738, 0xa391, 0x11d4, {0x9a, 0x3b, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ } -typedef struct _EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL; +typedef struct _EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL; // // Prototypes for the Platform Driver Override Protocol @@ -124,11 +124,11 @@ EFI_STATUS /// order from highest precedence to lowest precedence. /// struct _EFI_PLATFORM_DRIVER_OVERRIDE_PROTOCOL { - EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER GetDriver; - EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER_PATH GetDriverPath; - EFI_PLATFORM_DRIVER_OVERRIDE_DRIVER_LOADED DriverLoaded; + EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER GetDriver; + EFI_PLATFORM_DRIVER_OVERRIDE_GET_DRIVER_PATH GetDriverPath; + EFI_PLATFORM_DRIVER_OVERRIDE_DRIVER_LOADED DriverLoaded; }; -extern EFI_GUID gEfiPlatformDriverOverrideProtocolGuid; +extern EFI_GUID gEfiPlatformDriverOverrideProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/PlatformToDriverConfiguration.h b/MdePkg/Include/Protocol/PlatformToDriverConfiguration.h index fdb80f0..48b8389 100644 --- a/MdePkg/Include/Protocol/PlatformToDriverConfiguration.h +++ b/MdePkg/Include/Protocol/PlatformToDriverConfiguration.h @@ -16,10 +16,8 @@ #define EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL_GUID \ { 0x642cd590, 0x8059, 0x4c0a, { 0xa9, 0x58, 0xc5, 0xec, 0x7, 0xd2, 0x3c, 0x4b } } - typedef struct _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL; - /** The UEFI driver must call Query early in the Start() function before any time consuming operations are performed. If @@ -128,7 +126,7 @@ EFI_STATUS OUT EFI_GUID **ParameterTypeGuid, OUT VOID **ParameterBlock, OUT UINTN *ParameterBlockSize -); + ); typedef enum { /// @@ -141,7 +139,7 @@ typedef enum { /// this controller can be used again with the updated /// configuration settings. /// - EfiPlatformConfigurationActionNone = 0, + EfiPlatformConfigurationActionNone = 0, /// /// The driver has detected that the controller specified @@ -150,7 +148,7 @@ typedef enum { /// DisconnectControservice to perform this operation, and /// it should be performed as soon as possible. /// - EfiPlatformConfigurationActionStopController = 1, + EfiPlatformConfigurationActionStopController = 1, /// /// This controller specified by ControllerHandle needs to @@ -171,7 +169,7 @@ typedef enum { /// delayed until all of the configuration options have /// been set. /// - EfiPlatformConfigurationActionRestartPlatform = 3, + EfiPlatformConfigurationActionRestartPlatform = 3, /// /// The controller specified by ControllerHandle is still @@ -184,7 +182,7 @@ typedef enum { /// configuration settings are not guaranteed to persist /// after ControllerHandle is stopped. /// - EfiPlatformConfigurationActionNvramFailed = 4, + EfiPlatformConfigurationActionNvramFailed = 4, /// /// The controller specified by ControllerHandle is still @@ -198,11 +196,10 @@ typedef enum { /// ParameterTypeGuid is supported by the platform, Query /// should return EFI_NOT_FOUND. /// - EfiPlatformConfigurationActionUnsupportedGuid = 5, + EfiPlatformConfigurationActionUnsupportedGuid = 5, EfiPlatformConfigurationActionMaximum } EFI_PLATFORM_CONFIGURATION_ACTION; - /** The UEFI driver repeatedly calls Query, processes the information returned by the platform, and calls Response passing @@ -264,10 +261,9 @@ EFI_STATUS IN CONST UINTN *Instance, IN CONST EFI_GUID *ParameterTypeGuid, IN CONST VOID *ParameterBlock, - IN CONST UINTN ParameterBlockSize , + IN CONST UINTN ParameterBlockSize, IN CONST EFI_PLATFORM_CONFIGURATION_ACTION ConfigurationAction -); - + ); /// /// The EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL is used by the @@ -282,12 +278,10 @@ EFI_STATUS /// taken. /// struct _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL { - EFI_PLATFORM_TO_DRIVER_CONFIGURATION_QUERY Query; - EFI_PLATFORM_TO_DRIVER_CONFIGURATION_RESPONSE Response; + EFI_PLATFORM_TO_DRIVER_CONFIGURATION_QUERY Query; + EFI_PLATFORM_TO_DRIVER_CONFIGURATION_RESPONSE Response; }; - - #define EFI_PLATFORM_TO_DRIVER_CONFIGURATION_CLP_GUID \ {0x345ecc0e, 0xcb6, 0x4b75, { 0xbb, 0x57, 0x1b, 0x12, 0x9c, 0x47, 0x33,0x3e } } @@ -304,46 +298,43 @@ struct _EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL { used. **/ typedef struct { - CHAR8 *CLPCommand; ///< A pointer to the null-terminated UTF-8 string that specifies the DMTF SM CLP command - ///< line that the driver is required to parse and process when this function is called. - ///< See the DMTF SM CLP Specification 1.0 Final Standard for details on the - ///< format and syntax of the CLP command line string. CLPCommand buffer - ///< is allocated by the producer of the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOOL. - UINT32 CLPCommandLength; ///< The length of the CLP Command in bytes. - CHAR8 *CLPReturnString; ///< A pointer to the null-terminated UTF-8 string that indicates the CLP return status - ///< that the driver is required to provide to the calling agent. - ///< The calling agent may parse and/ or pass - ///< this for processing and user feedback. The SM CLP Command Response string - ///< buffer is filled in by the UEFI driver in the "keyword=value" format - ///< described in the SM CLP Specification, unless otherwise requested via the SM - ///< CLP Coutput option in the Command Line string buffer. UEFI driver's support - ///< for this default "keyword=value" output format is required if the UEFI - ///< driver supports this protocol, while support for other SM CLP output - ///< formats is optional (the UEFI Driver should return an EFI_UNSUPPORTED if - ///< the SM CLP Coutput option requested by the caller is not supported by the - ///< UEFI Driver). CLPReturnString buffer is allocated by the consumer of the - ///< EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOC OL and undefined prior to the call to - ///< Response(). - UINT32 CLPReturnStringLength; ///< The length of the CLP return status string in bytes. - UINT8 CLPCmdStatus; ///< SM CLP Command Status (see DMTF SM CLP Specification 1.0 Final Standard - - ///< Table 4) CLPErrorValue SM CLP Processing Error Value (see DMTF SM - ///< CLP Specification 1.0 Final Standard - Table 6). This field is filled in by - ///< the consumer of the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOC - ///< OL and undefined prior to the call to Response(). - UINT8 CLPErrorValue; ///< SM CLP Processing Error Value (see DMTF SM CLP Specification 1.0 Final Standard - Table 6). - ///< This field is filled in by the consumer of the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL and undefined prior to the call to Response(). - UINT16 CLPMsgCode; ///< Bit 15: OEM Message Code Flag 0 = Message Code is an SM CLP Probable - ///< Cause Value. (see SM CLP Specification Table 11) 1 = Message Code is OEM - ///< Specific Bits 14-0: Message Code This field is filled in by the consumer of - ///< the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOC OL and undefined prior to the call to - ///< Response(). - + CHAR8 *CLPCommand; ///< A pointer to the null-terminated UTF-8 string that specifies the DMTF SM CLP command + ///< line that the driver is required to parse and process when this function is called. + ///< See the DMTF SM CLP Specification 1.0 Final Standard for details on the + ///< format and syntax of the CLP command line string. CLPCommand buffer + ///< is allocated by the producer of the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOOL. + UINT32 CLPCommandLength; ///< The length of the CLP Command in bytes. + CHAR8 *CLPReturnString; ///< A pointer to the null-terminated UTF-8 string that indicates the CLP return status + ///< that the driver is required to provide to the calling agent. + ///< The calling agent may parse and/ or pass + ///< this for processing and user feedback. The SM CLP Command Response string + ///< buffer is filled in by the UEFI driver in the "keyword=value" format + ///< described in the SM CLP Specification, unless otherwise requested via the SM + ///< CLP Coutput option in the Command Line string buffer. UEFI driver's support + ///< for this default "keyword=value" output format is required if the UEFI + ///< driver supports this protocol, while support for other SM CLP output + ///< formats is optional (the UEFI Driver should return an EFI_UNSUPPORTED if + ///< the SM CLP Coutput option requested by the caller is not supported by the + ///< UEFI Driver). CLPReturnString buffer is allocated by the consumer of the + ///< EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOC OL and undefined prior to the call to + ///< Response(). + UINT32 CLPReturnStringLength; ///< The length of the CLP return status string in bytes. + UINT8 CLPCmdStatus; ///< SM CLP Command Status (see DMTF SM CLP Specification 1.0 Final Standard - + ///< Table 4) CLPErrorValue SM CLP Processing Error Value (see DMTF SM + ///< CLP Specification 1.0 Final Standard - Table 6). This field is filled in by + ///< the consumer of the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOC + ///< OL and undefined prior to the call to Response(). + UINT8 CLPErrorValue; ///< SM CLP Processing Error Value (see DMTF SM CLP Specification 1.0 Final Standard - Table 6). + ///< This field is filled in by the consumer of the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOCOL and undefined prior to the call to Response(). + UINT16 CLPMsgCode; ///< Bit 15: OEM Message Code Flag 0 = Message Code is an SM CLP Probable + ///< Cause Value. (see SM CLP Specification Table 11) 1 = Message Code is OEM + ///< Specific Bits 14-0: Message Code This field is filled in by the consumer of + ///< the EFI_PLATFORM_TO_DRIVER_CONFIGURATION_PROTOC OL and undefined prior to the call to + ///< Response(). } EFI_CONFIGURE_CLP_PARAMETER_BLK; +extern EFI_GUID gEfiPlatformToDriverConfigurationClpGuid; - -extern EFI_GUID gEfiPlatformToDriverConfigurationClpGuid; - -extern EFI_GUID gEfiPlatformToDriverConfigurationProtocolGuid; +extern EFI_GUID gEfiPlatformToDriverConfigurationProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/PxeBaseCode.h b/MdePkg/Include/Protocol/PxeBaseCode.h index bf60dd0..11872d6 100644 --- a/MdePkg/Include/Protocol/PxeBaseCode.h +++ b/MdePkg/Include/Protocol/PxeBaseCode.h @@ -11,6 +11,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent This Protocol is introduced in EFI Specification 1.10. **/ + #ifndef __PXE_BASE_CODE_PROTOCOL_H__ #define __PXE_BASE_CODE_PROTOCOL_H__ @@ -22,94 +23,94 @@ SPDX-License-Identifier: BSD-2-Clause-Patent 0x03c4e603, 0xac28, 0x11d3, {0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ } -typedef struct _EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE_PROTOCOL; +typedef struct _EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE_PROTOCOL; /// /// Protocol defined in EFI1.1. /// -typedef EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE; +typedef EFI_PXE_BASE_CODE_PROTOCOL EFI_PXE_BASE_CODE; /// /// Default IP TTL and ToS. /// -#define DEFAULT_TTL 16 -#define DEFAULT_ToS 0 +#define DEFAULT_TTL 16 +#define DEFAULT_ToS 0 /// /// ICMP error format. /// typedef struct { - UINT8 Type; - UINT8 Code; - UINT16 Checksum; + UINT8 Type; + UINT8 Code; + UINT16 Checksum; union { - UINT32 reserved; - UINT32 Mtu; - UINT32 Pointer; + UINT32 reserved; + UINT32 Mtu; + UINT32 Pointer; struct { - UINT16 Identifier; - UINT16 Sequence; + UINT16 Identifier; + UINT16 Sequence; } Echo; } u; - UINT8 Data[494]; + UINT8 Data[494]; } EFI_PXE_BASE_CODE_ICMP_ERROR; /// /// TFTP error format. /// typedef struct { - UINT8 ErrorCode; - CHAR8 ErrorString[127]; + UINT8 ErrorCode; + CHAR8 ErrorString[127]; } EFI_PXE_BASE_CODE_TFTP_ERROR; /// /// IP Receive Filter definitions. /// -#define EFI_PXE_BASE_CODE_MAX_IPCNT 8 +#define EFI_PXE_BASE_CODE_MAX_IPCNT 8 /// /// IP Receive Filter structure. /// typedef struct { - UINT8 Filters; - UINT8 IpCnt; - UINT16 reserved; - EFI_IP_ADDRESS IpList[EFI_PXE_BASE_CODE_MAX_IPCNT]; + UINT8 Filters; + UINT8 IpCnt; + UINT16 reserved; + EFI_IP_ADDRESS IpList[EFI_PXE_BASE_CODE_MAX_IPCNT]; } EFI_PXE_BASE_CODE_IP_FILTER; -#define EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP 0x0001 -#define EFI_PXE_BASE_CODE_IP_FILTER_BROADCAST 0x0002 -#define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS 0x0004 -#define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS_MULTICAST 0x0008 +#define EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP 0x0001 +#define EFI_PXE_BASE_CODE_IP_FILTER_BROADCAST 0x0002 +#define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS 0x0004 +#define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS_MULTICAST 0x0008 /// /// ARP cache entries. /// typedef struct { - EFI_IP_ADDRESS IpAddr; - EFI_MAC_ADDRESS MacAddr; + EFI_IP_ADDRESS IpAddr; + EFI_MAC_ADDRESS MacAddr; } EFI_PXE_BASE_CODE_ARP_ENTRY; /// /// ARP route table entries. /// typedef struct { - EFI_IP_ADDRESS IpAddr; - EFI_IP_ADDRESS SubnetMask; - EFI_IP_ADDRESS GwAddr; + EFI_IP_ADDRESS IpAddr; + EFI_IP_ADDRESS SubnetMask; + EFI_IP_ADDRESS GwAddr; } EFI_PXE_BASE_CODE_ROUTE_ENTRY; // // UDP definitions // -typedef UINT16 EFI_PXE_BASE_CODE_UDP_PORT; +typedef UINT16 EFI_PXE_BASE_CODE_UDP_PORT; -#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_IP 0x0001 -#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_PORT 0x0002 -#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_IP 0x0004 -#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_PORT 0x0008 -#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_USE_FILTER 0x0010 -#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_MAY_FRAGMENT 0x0020 +#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_IP 0x0001 +#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_PORT 0x0002 +#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_IP 0x0004 +#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_DEST_PORT 0x0008 +#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_USE_FILTER 0x0010 +#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_MAY_FRAGMENT 0x0020 // // Discover() definitions @@ -136,7 +137,7 @@ typedef UINT16 EFI_PXE_BASE_CODE_UDP_PORT; // 32768 through 65279 are for vendor use // 65280 through 65534 are reserved // -#define EFI_PXE_BASE_CODE_BOOT_TYPE_PXETEST 65535 +#define EFI_PXE_BASE_CODE_BOOT_TYPE_PXETEST 65535 #define EFI_PXE_BASE_CODE_BOOT_LAYER_MASK 0x7FFF #define EFI_PXE_BASE_CODE_BOOT_LAYER_INITIAL 0x0000 @@ -148,39 +149,38 @@ typedef UINT16 EFI_PXE_BASE_CODE_UDP_PORT; // http://www.ietf.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xml // #if defined (MDE_CPU_IA32) -#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x0006 +#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x0006 #elif defined (MDE_CPU_X64) -#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x0007 +#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x0007 #elif defined (MDE_CPU_ARM) -#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x000A +#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x000A #elif defined (MDE_CPU_AARCH64) -#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x000B +#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x000B #elif defined (MDE_CPU_RISCV64) -#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x001B +#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x001B #endif - /// /// Discover() server list structure. /// typedef struct { - UINT16 Type; - BOOLEAN AcceptAnyResponse; - UINT8 Reserved; - EFI_IP_ADDRESS IpAddr; + UINT16 Type; + BOOLEAN AcceptAnyResponse; + UINT8 Reserved; + EFI_IP_ADDRESS IpAddr; } EFI_PXE_BASE_CODE_SRVLIST; /// /// Discover() information override structure. /// typedef struct { - BOOLEAN UseMCast; - BOOLEAN UseBCast; - BOOLEAN UseUCast; - BOOLEAN MustUseList; - EFI_IP_ADDRESS ServerMCastIp; - UINT16 IpCnt; - EFI_PXE_BASE_CODE_SRVLIST SrvList[1]; + BOOLEAN UseMCast; + BOOLEAN UseBCast; + BOOLEAN UseUCast; + BOOLEAN MustUseList; + EFI_IP_ADDRESS ServerMCastIp; + UINT16 IpCnt; + EFI_PXE_BASE_CODE_SRVLIST SrvList[1]; } EFI_PXE_BASE_CODE_DISCOVER_INFO; /// @@ -204,58 +204,58 @@ typedef enum { /// perform the "get file size" and "read directory" operations of MTFTP. /// typedef struct { - EFI_IP_ADDRESS MCastIp; - EFI_PXE_BASE_CODE_UDP_PORT CPort; - EFI_PXE_BASE_CODE_UDP_PORT SPort; - UINT16 ListenTimeout; - UINT16 TransmitTimeout; + EFI_IP_ADDRESS MCastIp; + EFI_PXE_BASE_CODE_UDP_PORT CPort; + EFI_PXE_BASE_CODE_UDP_PORT SPort; + UINT16 ListenTimeout; + UINT16 TransmitTimeout; } EFI_PXE_BASE_CODE_MTFTP_INFO; /// /// DHCPV4 Packet structure. /// typedef struct { - UINT8 BootpOpcode; - UINT8 BootpHwType; - UINT8 BootpHwAddrLen; - UINT8 BootpGateHops; - UINT32 BootpIdent; - UINT16 BootpSeconds; - UINT16 BootpFlags; - UINT8 BootpCiAddr[4]; - UINT8 BootpYiAddr[4]; - UINT8 BootpSiAddr[4]; - UINT8 BootpGiAddr[4]; - UINT8 BootpHwAddr[16]; - UINT8 BootpSrvName[64]; - UINT8 BootpBootFile[128]; - UINT32 DhcpMagik; - UINT8 DhcpOptions[56]; + UINT8 BootpOpcode; + UINT8 BootpHwType; + UINT8 BootpHwAddrLen; + UINT8 BootpGateHops; + UINT32 BootpIdent; + UINT16 BootpSeconds; + UINT16 BootpFlags; + UINT8 BootpCiAddr[4]; + UINT8 BootpYiAddr[4]; + UINT8 BootpSiAddr[4]; + UINT8 BootpGiAddr[4]; + UINT8 BootpHwAddr[16]; + UINT8 BootpSrvName[64]; + UINT8 BootpBootFile[128]; + UINT32 DhcpMagik; + UINT8 DhcpOptions[56]; } EFI_PXE_BASE_CODE_DHCPV4_PACKET; /// /// DHCPV6 Packet structure. /// typedef struct { - UINT32 MessageType:8; - UINT32 TransactionId:24; - UINT8 DhcpOptions[1024]; + UINT32 MessageType : 8; + UINT32 TransactionId : 24; + UINT8 DhcpOptions[1024]; } EFI_PXE_BASE_CODE_DHCPV6_PACKET; /// /// Packet structure. /// typedef union { - UINT8 Raw[1472]; - EFI_PXE_BASE_CODE_DHCPV4_PACKET Dhcpv4; - EFI_PXE_BASE_CODE_DHCPV6_PACKET Dhcpv6; + UINT8 Raw[1472]; + EFI_PXE_BASE_CODE_DHCPV4_PACKET Dhcpv4; + EFI_PXE_BASE_CODE_DHCPV6_PACKET Dhcpv6; } EFI_PXE_BASE_CODE_PACKET; // // PXE Base Code Mode structure // -#define EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES 8 -#define EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES 8 +#define EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES 8 +#define EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES 8 /// /// EFI_PXE_BASE_CODE_MODE. @@ -264,40 +264,40 @@ typedef union { /// EFI_PXE_BASE_CODE_PROTOCOL functions. /// typedef struct { - BOOLEAN Started; - BOOLEAN Ipv6Available; - BOOLEAN Ipv6Supported; - BOOLEAN UsingIpv6; - BOOLEAN BisSupported; - BOOLEAN BisDetected; - BOOLEAN AutoArp; - BOOLEAN SendGUID; - BOOLEAN DhcpDiscoverValid; - BOOLEAN DhcpAckReceived; - BOOLEAN ProxyOfferReceived; - BOOLEAN PxeDiscoverValid; - BOOLEAN PxeReplyReceived; - BOOLEAN PxeBisReplyReceived; - BOOLEAN IcmpErrorReceived; - BOOLEAN TftpErrorReceived; - BOOLEAN MakeCallbacks; - UINT8 TTL; - UINT8 ToS; - EFI_IP_ADDRESS StationIp; - EFI_IP_ADDRESS SubnetMask; - EFI_PXE_BASE_CODE_PACKET DhcpDiscover; - EFI_PXE_BASE_CODE_PACKET DhcpAck; - EFI_PXE_BASE_CODE_PACKET ProxyOffer; - EFI_PXE_BASE_CODE_PACKET PxeDiscover; - EFI_PXE_BASE_CODE_PACKET PxeReply; - EFI_PXE_BASE_CODE_PACKET PxeBisReply; - EFI_PXE_BASE_CODE_IP_FILTER IpFilter; - UINT32 ArpCacheEntries; - EFI_PXE_BASE_CODE_ARP_ENTRY ArpCache[EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES]; - UINT32 RouteTableEntries; - EFI_PXE_BASE_CODE_ROUTE_ENTRY RouteTable[EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES]; - EFI_PXE_BASE_CODE_ICMP_ERROR IcmpError; - EFI_PXE_BASE_CODE_TFTP_ERROR TftpError; + BOOLEAN Started; + BOOLEAN Ipv6Available; + BOOLEAN Ipv6Supported; + BOOLEAN UsingIpv6; + BOOLEAN BisSupported; + BOOLEAN BisDetected; + BOOLEAN AutoArp; + BOOLEAN SendGUID; + BOOLEAN DhcpDiscoverValid; + BOOLEAN DhcpAckReceived; + BOOLEAN ProxyOfferReceived; + BOOLEAN PxeDiscoverValid; + BOOLEAN PxeReplyReceived; + BOOLEAN PxeBisReplyReceived; + BOOLEAN IcmpErrorReceived; + BOOLEAN TftpErrorReceived; + BOOLEAN MakeCallbacks; + UINT8 TTL; + UINT8 ToS; + EFI_IP_ADDRESS StationIp; + EFI_IP_ADDRESS SubnetMask; + EFI_PXE_BASE_CODE_PACKET DhcpDiscover; + EFI_PXE_BASE_CODE_PACKET DhcpAck; + EFI_PXE_BASE_CODE_PACKET ProxyOffer; + EFI_PXE_BASE_CODE_PACKET PxeDiscover; + EFI_PXE_BASE_CODE_PACKET PxeReply; + EFI_PXE_BASE_CODE_PACKET PxeBisReply; + EFI_PXE_BASE_CODE_IP_FILTER IpFilter; + UINT32 ArpCacheEntries; + EFI_PXE_BASE_CODE_ARP_ENTRY ArpCache[EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES]; + UINT32 RouteTableEntries; + EFI_PXE_BASE_CODE_ROUTE_ENTRY RouteTable[EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES]; + EFI_PXE_BASE_CODE_ICMP_ERROR IcmpError; + EFI_PXE_BASE_CODE_TFTP_ERROR TftpError; } EFI_PXE_BASE_CODE_MODE; // @@ -885,7 +885,7 @@ EFI_STATUS // // PXE Base Code Protocol structure // -#define EFI_PXE_BASE_CODE_PROTOCOL_REVISION 0x00010000 +#define EFI_PXE_BASE_CODE_PROTOCOL_REVISION 0x00010000 // // Revision defined in EFI1.1 @@ -906,25 +906,25 @@ struct _EFI_PXE_BASE_CODE_PROTOCOL { /// be backwards compatible. If a future version is not backwards compatible /// it is not the same GUID. /// - UINT64 Revision; - EFI_PXE_BASE_CODE_START Start; - EFI_PXE_BASE_CODE_STOP Stop; - EFI_PXE_BASE_CODE_DHCP Dhcp; - EFI_PXE_BASE_CODE_DISCOVER Discover; - EFI_PXE_BASE_CODE_MTFTP Mtftp; - EFI_PXE_BASE_CODE_UDP_WRITE UdpWrite; - EFI_PXE_BASE_CODE_UDP_READ UdpRead; - EFI_PXE_BASE_CODE_SET_IP_FILTER SetIpFilter; - EFI_PXE_BASE_CODE_ARP Arp; - EFI_PXE_BASE_CODE_SET_PARAMETERS SetParameters; - EFI_PXE_BASE_CODE_SET_STATION_IP SetStationIp; - EFI_PXE_BASE_CODE_SET_PACKETS SetPackets; + UINT64 Revision; + EFI_PXE_BASE_CODE_START Start; + EFI_PXE_BASE_CODE_STOP Stop; + EFI_PXE_BASE_CODE_DHCP Dhcp; + EFI_PXE_BASE_CODE_DISCOVER Discover; + EFI_PXE_BASE_CODE_MTFTP Mtftp; + EFI_PXE_BASE_CODE_UDP_WRITE UdpWrite; + EFI_PXE_BASE_CODE_UDP_READ UdpRead; + EFI_PXE_BASE_CODE_SET_IP_FILTER SetIpFilter; + EFI_PXE_BASE_CODE_ARP Arp; + EFI_PXE_BASE_CODE_SET_PARAMETERS SetParameters; + EFI_PXE_BASE_CODE_SET_STATION_IP SetStationIp; + EFI_PXE_BASE_CODE_SET_PACKETS SetPackets; /// /// The pointer to the EFI_PXE_BASE_CODE_MODE data for this device. /// - EFI_PXE_BASE_CODE_MODE *Mode; + EFI_PXE_BASE_CODE_MODE *Mode; }; -extern EFI_GUID gEfiPxeBaseCodeProtocolGuid; +extern EFI_GUID gEfiPxeBaseCodeProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/PxeBaseCodeCallBack.h b/MdePkg/Include/Protocol/PxeBaseCodeCallBack.h index 505515d..65b3220 100644 --- a/MdePkg/Include/Protocol/PxeBaseCodeCallBack.h +++ b/MdePkg/Include/Protocol/PxeBaseCodeCallBack.h @@ -24,7 +24,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// UEFI Revision Number Definition. /// -#define EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL_REVISION 0x00010000 +#define EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL_REVISION 0x00010000 /// /// EFI 1.1 Revision Number defintion. @@ -35,12 +35,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// UEFI Protocol name. /// -typedef struct _EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL; +typedef struct _EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL; /// /// EFI1.1 Protocol name. /// -typedef EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL EFI_PXE_BASE_CODE_CALLBACK; +typedef EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL EFI_PXE_BASE_CODE_CALLBACK; /// /// Event type list for PXE Base Code Protocol function. @@ -114,11 +114,10 @@ struct _EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL { /// be backwards compatible. If a future version is not backwards compatible /// it is not the same GUID. /// - UINT64 Revision; - EFI_PXE_CALLBACK Callback; + UINT64 Revision; + EFI_PXE_CALLBACK Callback; }; -extern EFI_GUID gEfiPxeBaseCodeCallbackProtocolGuid; +extern EFI_GUID gEfiPxeBaseCodeCallbackProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/RamDisk.h b/MdePkg/Include/Protocol/RamDisk.h index a0512af..2ab5a5e 100644 --- a/MdePkg/Include/Protocol/RamDisk.h +++ b/MdePkg/Include/Protocol/RamDisk.h @@ -21,7 +21,7 @@ // // Forward reference for pure ANSI compatability // -typedef struct _EFI_RAM_DISK_PROTOCOL EFI_RAM_DISK_PROTOCOL; +typedef struct _EFI_RAM_DISK_PROTOCOL EFI_RAM_DISK_PROTOCOL; /** Register a RAM disk with specified address, size and type. @@ -55,7 +55,7 @@ typedef struct _EFI_RAM_DISK_PROTOCOL EFI_RAM_DISK_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI *EFI_RAM_DISK_REGISTER_RAMDISK) ( +(EFIAPI *EFI_RAM_DISK_REGISTER_RAMDISK)( IN UINT64 RamDiskBase, IN UINT64 RamDiskSize, IN EFI_GUID *RamDiskType, @@ -80,7 +80,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_RAM_DISK_UNREGISTER_RAMDISK) ( +(EFIAPI *EFI_RAM_DISK_UNREGISTER_RAMDISK)( IN EFI_DEVICE_PATH_PROTOCOL *DevicePath ); @@ -88,13 +88,13 @@ EFI_STATUS /// RAM Disk Protocol structure. /// struct _EFI_RAM_DISK_PROTOCOL { - EFI_RAM_DISK_REGISTER_RAMDISK Register; - EFI_RAM_DISK_UNREGISTER_RAMDISK Unregister; + EFI_RAM_DISK_REGISTER_RAMDISK Register; + EFI_RAM_DISK_UNREGISTER_RAMDISK Unregister; }; /// /// RAM Disk Protocol GUID variable. /// -extern EFI_GUID gEfiRamDiskProtocolGuid; +extern EFI_GUID gEfiRamDiskProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/RealTimeClock.h b/MdePkg/Include/Protocol/RealTimeClock.h index cf1a9a7..f300f5e 100644 --- a/MdePkg/Include/Protocol/RealTimeClock.h +++ b/MdePkg/Include/Protocol/RealTimeClock.h @@ -25,6 +25,6 @@ #define EFI_REAL_TIME_CLOCK_ARCH_PROTOCOL_GUID \ { 0x27CFAC87, 0x46CC, 0x11d4, {0x9A, 0x38, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } } -extern EFI_GUID gEfiRealTimeClockArchProtocolGuid; +extern EFI_GUID gEfiRealTimeClockArchProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/RedfishDiscover.h b/MdePkg/Include/Protocol/RedfishDiscover.h index 8dbb70b..70b83eb 100644 --- a/MdePkg/Include/Protocol/RedfishDiscover.h +++ b/MdePkg/Include/Protocol/RedfishDiscover.h @@ -22,15 +22,15 @@ 0x5db12509, 0x4550, 0x4347, { 0x96, 0xb3, 0x73, 0xc0, 0xff, 0x6e, 0x86, 0x9f } \ } -#define REDFISH_DISCOVER_TOKEN_SIGNATURE SIGNATURE_32 ('R', 'F', 'T', 'S') +#define REDFISH_DISCOVER_TOKEN_SIGNATURE SIGNATURE_32 ('R', 'F', 'T', 'S') typedef UINT32 EFI_REDFISH_DISCOVER_FLAG; -#define EFI_REDFISH_DISCOVER_HOST_INTERFACE 0x00000001 ///< Discover Redfish server reported in SMBIOS 42h. -#define EFI_REDFISH_DISCOVER_SSDP 0x00000002 ///< Discover Redfish server using UPnP Http search method. -#define EFI_REDFISH_DISCOVER_SSDP_UDP6 0x00000004 ///< Use UDP version 6. -#define EFI_REDFISH_DISCOVER_KEEP_ALIVE 0x00000008 ///< Keep to send UPnP Search in the duration indicated in - ///< EFI_REDFISH_DISCOVER_DURATION_MASK. -#define EFI_REDFISH_DISCOVER_RENEW 0x00000010 ///< Set this bit to indicate this function to notify the caller +#define EFI_REDFISH_DISCOVER_HOST_INTERFACE 0x00000001 ///< Discover Redfish server reported in SMBIOS 42h. +#define EFI_REDFISH_DISCOVER_SSDP 0x00000002 ///< Discover Redfish server using UPnP Http search method. +#define EFI_REDFISH_DISCOVER_SSDP_UDP6 0x00000004 ///< Use UDP version 6. +#define EFI_REDFISH_DISCOVER_KEEP_ALIVE 0x00000008 ///< Keep to send UPnP Search in the duration indicated in + ///< EFI_REDFISH_DISCOVER_DURATION_MASK. +#define EFI_REDFISH_DISCOVER_RENEW 0x00000010 ///< Set this bit to indicate this function to notify the caller ///< a list of all Redfish servers it found. Otherwise, this fucntion ///< just notify the caller new found Redfish servers. ///< @@ -56,37 +56,37 @@ typedef struct { } EFI_REDFISH_DISCOVERED_INFORMATION; typedef struct { - EFI_STATUS Status; ///< Status of Redfish service discovery. - EFI_REDFISH_DISCOVERED_INFORMATION Information; ///< Redfish service discovered. + EFI_STATUS Status; ///< Status of Redfish service discovery. + EFI_REDFISH_DISCOVERED_INFORMATION Information; ///< Redfish service discovered. } EFI_REDFISH_DISCOVERED_INSTANCE; typedef struct { - UINTN NumberOfServiceFound; ///< Must be 0 when pass to Acquire (). - EFI_REDFISH_DISCOVERED_INSTANCE *RedfishInstances; ///< Must be NULL when pass to Acquire (). + UINTN NumberOfServiceFound; ///< Must be 0 when pass to Acquire (). + EFI_REDFISH_DISCOVERED_INSTANCE *RedfishInstances; ///< Must be NULL when pass to Acquire (). } EFI_REDFISH_DISCOVERED_LIST; typedef struct { - EFI_MAC_ADDRESS MacAddress; ///< MAC address of network interfase to discover Redfish service. - BOOLEAN IsIpv6; ///< Indicates it's IP versino 6. - EFI_IP_ADDRESS SubnetId; ///< Subnet ID. - UINT8 SubnetPrefixLength; ///< Subnet prefix-length for IPv4 and IPv6. - UINT16 VlanId; ///< VLAN ID. + EFI_MAC_ADDRESS MacAddress; ///< MAC address of network interfase to discover Redfish service. + BOOLEAN IsIpv6; ///< Indicates it's IP versino 6. + EFI_IP_ADDRESS SubnetId; ///< Subnet ID. + UINT8 SubnetPrefixLength; ///< Subnet prefix-length for IPv4 and IPv6. + UINT16 VlanId; ///< VLAN ID. } EFI_REDFISH_DISCOVER_NETWORK_INTERFACE; typedef struct { - UINT32 Signature; ///< Token signature. - EFI_REDFISH_DISCOVERED_LIST DiscoverList; ///< The memory of EFI_REDFISH_DISCOVERED_LIST is - ///< allocated by Acquire() and freed when caller invoke Release(). - EFI_EVENT Event; ///< The TPL_CALLBACK event to be notified when Redfish services - ///< are discovered or any errors occurred during discovery. - UINTN Timeout; ///< The timeout value declared in EFI_REDFISH_DISCOVERED_TOKEN - ///< determines the seconds to drop discover process. - ///< Basically, the nearby Redfish services must response in >=1 - ///< and <= 5 seconds. The valid timeout value used to have - ///< asynchronous discovery is >= 1 and <= 5 seconds. Set the - ///< timeout to zero means to discover Redfish service synchronously. - ///< Event in token is created by caller to listen the Reefish services - ///< found by Acquire(). + UINT32 Signature; ///< Token signature. + EFI_REDFISH_DISCOVERED_LIST DiscoverList; ///< The memory of EFI_REDFISH_DISCOVERED_LIST is + ///< allocated by Acquire() and freed when caller invoke Release(). + EFI_EVENT Event; ///< The TPL_CALLBACK event to be notified when Redfish services + ///< are discovered or any errors occurred during discovery. + UINTN Timeout; ///< The timeout value declared in EFI_REDFISH_DISCOVERED_TOKEN + ///< determines the seconds to drop discover process. + ///< Basically, the nearby Redfish services must response in >=1 + ///< and <= 5 seconds. The valid timeout value used to have + ///< asynchronous discovery is >= 1 and <= 5 seconds. Set the + ///< timeout to zero means to discover Redfish service synchronously. + ///< Event in token is created by caller to listen the Reefish services + ///< found by Acquire(). } EFI_REDFISH_DISCOVERED_TOKEN; /** @@ -112,7 +112,7 @@ EFI_STATUS IN EFI_HANDLE ImageHandle, OUT UINTN *NumberOfNetworkInterfaces, OUT EFI_REDFISH_DISCOVER_NETWORK_INTERFACE **NetworkInterfaces -); + ); /** This function acquires Redfish services by discovering static Redfish setting @@ -146,7 +146,7 @@ EFI_STATUS IN EFI_REDFISH_DISCOVER_NETWORK_INTERFACE *TargetNetworkInterface OPTIONAL, IN EFI_REDFISH_DISCOVER_FLAG Flags, IN EFI_REDFISH_DISCOVERED_TOKEN *Token -); + ); /** This function aborts Redfish service discovery on the given network interface. @@ -163,7 +163,7 @@ EFI_STATUS (EFIAPI *EFI_REDFISH_DISCOVER_ABORT_ACQUIRE)( IN EFI_REDFISH_DISCOVER_PROTOCOL *This, IN EFI_REDFISH_DISCOVER_NETWORK_INTERFACE *TargetNetworkInterface OPTIONAL -); + ); /** This function releases Redfish services found by RedfishServiceAcquire(). @@ -180,14 +180,14 @@ EFI_STATUS (EFIAPI *EFI_REDFISH_DISCOVER_RELEASE_SERVICE)( IN EFI_REDFISH_DISCOVER_PROTOCOL *This, IN EFI_REDFISH_DISCOVERED_LIST *List -); + ); struct _EFI_REDFISH_DISCOVER_PROTOCOL { - EFI_REDFISH_DISCOVER_NETWORK_LIST GetNetworkInterfaceList; - EFI_REDFISH_DISCOVER_ACQUIRE_SERVICE AcquireRedfishService; - EFI_REDFISH_DISCOVER_ABORT_ACQUIRE AbortAcquireRedfishService; - EFI_REDFISH_DISCOVER_RELEASE_SERVICE ReleaseRedfishService; + EFI_REDFISH_DISCOVER_NETWORK_LIST GetNetworkInterfaceList; + EFI_REDFISH_DISCOVER_ACQUIRE_SERVICE AcquireRedfishService; + EFI_REDFISH_DISCOVER_ABORT_ACQUIRE AbortAcquireRedfishService; + EFI_REDFISH_DISCOVER_RELEASE_SERVICE ReleaseRedfishService; }; -extern EFI_GUID gEfiRedfishDiscoverProtocolGuid; +extern EFI_GUID gEfiRedfishDiscoverProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/RegularExpressionProtocol.h b/MdePkg/Include/Protocol/RegularExpressionProtocol.h index ac4f982..ca05be8 100644 --- a/MdePkg/Include/Protocol/RegularExpressionProtocol.h +++ b/MdePkg/Include/Protocol/RegularExpressionProtocol.h @@ -33,14 +33,13 @@ SPDX-License-Identifier: BSD-2-Clause-Patent 0x9A473A4A, 0x4CEB, 0xB95A, {0x41, 0x5E, 0x5B, 0xA0, 0xBC, 0x63, 0x9B, 0x2E } \ } -typedef struct _EFI_REGULAR_EXPRESSION_PROTOCOL EFI_REGULAR_EXPRESSION_PROTOCOL; - +typedef struct _EFI_REGULAR_EXPRESSION_PROTOCOL EFI_REGULAR_EXPRESSION_PROTOCOL; typedef struct { - CONST CHAR16 *CapturePtr; // Pointer to the start of the captured sub-expression - // within matched String. + CONST CHAR16 *CapturePtr; // Pointer to the start of the captured sub-expression + // within matched String. - UINTN Length; // Length of captured sub-expression. + UINTN Length; // Length of captured sub-expression. } EFI_REGEX_CAPTURE; typedef EFI_GUID EFI_REGEX_SYNTAX_TYPE; @@ -48,6 +47,7 @@ typedef EFI_GUID EFI_REGEX_SYNTAX_TYPE; // // Protocol member functions // + /** Returns information about the regular expression syntax types supported by the implementation. @@ -82,7 +82,7 @@ typedef EFI_GUID EFI_REGEX_SYNTAX_TYPE; **/ typedef EFI_STATUS -(EFIAPI *EFI_REGULAR_EXPRESSION_GET_INFO) ( +(EFIAPI *EFI_REGULAR_EXPRESSION_GET_INFO)( IN EFI_REGULAR_EXPRESSION_PROTOCOL *This, IN OUT UINTN *RegExSyntaxTypeListSize, OUT EFI_REGEX_SYNTAX_TYPE *RegExSyntaxTypeList @@ -139,7 +139,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_REGULAR_EXPRESSION_MATCH) ( +(EFIAPI *EFI_REGULAR_EXPRESSION_MATCH)( IN EFI_REGULAR_EXPRESSION_PROTOCOL *This, IN CHAR16 *String, IN CHAR16 *Pattern, @@ -150,26 +150,26 @@ EFI_STATUS ); struct _EFI_REGULAR_EXPRESSION_PROTOCOL { - EFI_REGULAR_EXPRESSION_MATCH MatchString; - EFI_REGULAR_EXPRESSION_GET_INFO GetInfo; -} ; + EFI_REGULAR_EXPRESSION_MATCH MatchString; + EFI_REGULAR_EXPRESSION_GET_INFO GetInfo; +}; -extern EFI_GUID gEfiRegularExpressionProtocolGuid; +extern EFI_GUID gEfiRegularExpressionProtocolGuid; // // For regular expression rules specified in the POSIX Extended Regular // Expression (ERE) Syntax: // -extern EFI_GUID gEfiRegexSyntaxTypePosixExtendedGuid; +extern EFI_GUID gEfiRegexSyntaxTypePosixExtendedGuid; // // For regular expression rules specifiedin the ECMA 262 Specification // -extern EFI_GUID gEfiRegexSyntaxTypeEcma262Guid; +extern EFI_GUID gEfiRegexSyntaxTypeEcma262Guid; // // For regular expression rules specified in the Perl standard: // -extern EFI_GUID gEfiRegexSyntaxTypePerlGuid; +extern EFI_GUID gEfiRegexSyntaxTypePerlGuid; #endif diff --git a/MdePkg/Include/Protocol/ReportStatusCodeHandler.h b/MdePkg/Include/Protocol/ReportStatusCodeHandler.h index 1b21d2d..e77274c 100644 --- a/MdePkg/Include/Protocol/ReportStatusCodeHandler.h +++ b/MdePkg/Include/Protocol/ReportStatusCodeHandler.h @@ -26,7 +26,7 @@ EFI_STATUS IN UINT32 Instance, IN EFI_GUID *CallerId, IN EFI_STATUS_CODE_DATA *Data -); + ); /** Register the callback function for ReportStatusCode() notification. @@ -60,7 +60,7 @@ EFI_STATUS (EFIAPI *EFI_RSC_HANDLER_REGISTER)( IN EFI_RSC_HANDLER_CALLBACK Callback, IN EFI_TPL Tpl -); + ); /** Remove a previously registered callback function from the notification list. @@ -79,13 +79,13 @@ typedef EFI_STATUS (EFIAPI *EFI_RSC_HANDLER_UNREGISTER)( IN EFI_RSC_HANDLER_CALLBACK Callback -); + ); typedef struct { - EFI_RSC_HANDLER_REGISTER Register; - EFI_RSC_HANDLER_UNREGISTER Unregister; + EFI_RSC_HANDLER_REGISTER Register; + EFI_RSC_HANDLER_UNREGISTER Unregister; } EFI_RSC_HANDLER_PROTOCOL; -extern EFI_GUID gEfiRscHandlerProtocolGuid; +extern EFI_GUID gEfiRscHandlerProtocolGuid; #endif // __REPORT_STATUS_CODE_HANDLER_H__ diff --git a/MdePkg/Include/Protocol/Reset.h b/MdePkg/Include/Protocol/Reset.h index 78ae63a..adf9bdd 100644 --- a/MdePkg/Include/Protocol/Reset.h +++ b/MdePkg/Include/Protocol/Reset.h @@ -20,6 +20,6 @@ #define EFI_RESET_ARCH_PROTOCOL_GUID \ { 0x27CFAC88, 0x46CC, 0x11d4, {0x9A, 0x38, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } } -extern EFI_GUID gEfiResetArchProtocolGuid; +extern EFI_GUID gEfiResetArchProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/ResetNotification.h b/MdePkg/Include/Protocol/ResetNotification.h index 26f8a33..f72a826 100644 --- a/MdePkg/Include/Protocol/ResetNotification.h +++ b/MdePkg/Include/Protocol/ResetNotification.h @@ -41,10 +41,10 @@ typedef struct _EFI_RESET_NOTIFICATION_PROTOCOL EFI_RESET_NOTIFICATION_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI *EFI_REGISTER_RESET_NOTIFY) ( +(EFIAPI *EFI_REGISTER_RESET_NOTIFY)( IN EFI_RESET_NOTIFICATION_PROTOCOL *This, IN EFI_RESET_SYSTEM ResetFunction -); + ); /** Unregister a notification function. @@ -63,18 +63,16 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_UNREGISTER_RESET_NOTIFY) ( +(EFIAPI *EFI_UNREGISTER_RESET_NOTIFY)( IN EFI_RESET_NOTIFICATION_PROTOCOL *This, IN EFI_RESET_SYSTEM ResetFunction -); + ); struct _EFI_RESET_NOTIFICATION_PROTOCOL { - EFI_REGISTER_RESET_NOTIFY RegisterResetNotify; - EFI_UNREGISTER_RESET_NOTIFY UnregisterResetNotify; + EFI_REGISTER_RESET_NOTIFY RegisterResetNotify; + EFI_UNREGISTER_RESET_NOTIFY UnregisterResetNotify; }; - -extern EFI_GUID gEfiResetNotificationProtocolGuid; +extern EFI_GUID gEfiResetNotificationProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/Rest.h b/MdePkg/Include/Protocol/Rest.h index e54710c..8da6ed7 100644 --- a/MdePkg/Include/Protocol/Rest.h +++ b/MdePkg/Include/Protocol/Rest.h @@ -43,7 +43,7 @@ typedef struct _EFI_REST_PROTOCOL EFI_REST_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI *EFI_REST_SEND_RECEIVE) ( +(EFIAPI *EFI_REST_SEND_RECEIVE)( IN EFI_REST_PROTOCOL *This, IN EFI_HTTP_MESSAGE *RequestMessage, OUT EFI_HTTP_MESSAGE *ResponseMessage @@ -66,7 +66,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_REST_GET_TIME) ( +(EFIAPI *EFI_REST_GET_TIME)( IN EFI_REST_PROTOCOL *This, OUT EFI_TIME *Time ); @@ -79,10 +79,10 @@ EFI_STATUS /// interfaces that abstract HTTP access to the resources. /// struct _EFI_REST_PROTOCOL { - EFI_REST_SEND_RECEIVE SendReceive; - EFI_REST_GET_TIME GetServiceTime; + EFI_REST_SEND_RECEIVE SendReceive; + EFI_REST_GET_TIME GetServiceTime; }; -extern EFI_GUID gEfiRestProtocolGuid; +extern EFI_GUID gEfiRestProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/RestEx.h b/MdePkg/Include/Protocol/RestEx.h index dc1b438..e9bc7be 100644 --- a/MdePkg/Include/Protocol/RestEx.h +++ b/MdePkg/Include/Protocol/RestEx.h @@ -21,7 +21,7 @@ #include // -//GUID definitions +// GUID definitions // #define EFI_REST_EX_SERVICE_BINDING_PROTOCOL_GUID \ { \ @@ -35,25 +35,25 @@ typedef struct _EFI_REST_EX_PROTOCOL EFI_REST_EX_PROTOCOL; -//******************************************************* -//EFI_REST_EX_SERVICE_INFO_VER -//******************************************************* +// ******************************************************* +// EFI_REST_EX_SERVICE_INFO_VER +// ******************************************************* typedef struct { - UINT8 Major; - UINT8 Minor; + UINT8 Major; + UINT8 Minor; } EFI_REST_EX_SERVICE_INFO_VER; -//******************************************************* -//EFI_REST_EX_SERVICE_INFO_HEADER -//******************************************************* +// ******************************************************* +// EFI_REST_EX_SERVICE_INFO_HEADER +// ******************************************************* typedef struct { - UINT32 Length; - EFI_REST_EX_SERVICE_INFO_VER RestServiceInfoVer; + UINT32 Length; + EFI_REST_EX_SERVICE_INFO_VER RestServiceInfoVer; } EFI_REST_EX_SERVICE_INFO_HEADER; -//******************************************************* +// ******************************************************* // EFI_REST_EX_SERVICE_TYPE -//******************************************************* +// ******************************************************* typedef enum { EfiRestExServiceUnspecific = 1, EfiRestExServiceRedfish, @@ -62,66 +62,66 @@ typedef enum { EfiRestExServiceTypeMax } EFI_REST_EX_SERVICE_TYPE; -//******************************************************* +// ******************************************************* // EFI_REST_EX_SERVICE_ACCESS_MODE -//******************************************************* +// ******************************************************* typedef enum { - EfiRestExServiceInBandAccess = 1, + EfiRestExServiceInBandAccess = 1, EfiRestExServiceOutOfBandAccess = 2, EfiRestExServiceModeMax } EFI_REST_EX_SERVICE_ACCESS_MODE; -//******************************************************* +// ******************************************************* // EFI_REST_EX_CONFIG_TYPE -//******************************************************* +// ******************************************************* typedef enum { EfiRestExConfigHttp, EfiRestExConfigUnspecific, EfiRestExConfigTypeMax } EFI_REST_EX_CONFIG_TYPE; -//******************************************************* -//EFI_REST_EX_SERVICE_INFO v1.0 -//******************************************************* +// ******************************************************* +// EFI_REST_EX_SERVICE_INFO v1.0 +// ******************************************************* typedef struct { - EFI_REST_EX_SERVICE_INFO_HEADER EfiRestExServiceInfoHeader; - EFI_REST_EX_SERVICE_TYPE RestServiceType; - EFI_REST_EX_SERVICE_ACCESS_MODE RestServiceAccessMode; - EFI_GUID VendorRestServiceName; - UINT32 VendorSpecificDataLength; - UINT8 *VendorSpecifcData; - EFI_REST_EX_CONFIG_TYPE RestExConfigType; - UINT8 RestExConfigDataLength; + EFI_REST_EX_SERVICE_INFO_HEADER EfiRestExServiceInfoHeader; + EFI_REST_EX_SERVICE_TYPE RestServiceType; + EFI_REST_EX_SERVICE_ACCESS_MODE RestServiceAccessMode; + EFI_GUID VendorRestServiceName; + UINT32 VendorSpecificDataLength; + UINT8 *VendorSpecifcData; + EFI_REST_EX_CONFIG_TYPE RestExConfigType; + UINT8 RestExConfigDataLength; } EFI_REST_EX_SERVICE_INFO_V_1_0; -//******************************************************* -//EFI_REST_EX_SERVICE_INFO -//******************************************************* +// ******************************************************* +// EFI_REST_EX_SERVICE_INFO +// ******************************************************* typedef union { - EFI_REST_EX_SERVICE_INFO_HEADER EfiRestExServiceInfoHeader; - EFI_REST_EX_SERVICE_INFO_V_1_0 EfiRestExServiceInfoV10; + EFI_REST_EX_SERVICE_INFO_HEADER EfiRestExServiceInfoHeader; + EFI_REST_EX_SERVICE_INFO_V_1_0 EfiRestExServiceInfoV10; } EFI_REST_EX_SERVICE_INFO; -//******************************************************* +// ******************************************************* // EFI_REST_EX_HTTP_CONFIG_DATA -//******************************************************* +// ******************************************************* typedef struct { EFI_HTTP_CONFIG_DATA HttpConfigData; UINT32 SendReceiveTimeout; } EFI_REST_EX_HTTP_CONFIG_DATA; -//******************************************************* -//EFI_REST_EX_CONFIG_DATA -//******************************************************* +// ******************************************************* +// EFI_REST_EX_CONFIG_DATA +// ******************************************************* typedef UINT8 *EFI_REST_EX_CONFIG_DATA; -//******************************************************* -//EFI_REST_EX_TOKEN -//******************************************************* +// ******************************************************* +// EFI_REST_EX_TOKEN +// ******************************************************* typedef struct { - EFI_EVENT Event; - EFI_STATUS Status; - EFI_HTTP_MESSAGE *ResponseMessage; + EFI_EVENT Event; + EFI_STATUS Status; + EFI_HTTP_MESSAGE *ResponseMessage; } EFI_REST_EX_TOKEN; /** @@ -361,7 +361,7 @@ EFI_STATUS IN EFI_REST_EX_PROTOCOL *This, IN EFI_HTTP_MESSAGE *RequestMessage OPTIONAL, IN EFI_REST_EX_TOKEN *RestExToken -); + ); /// /// EFI REST(EX) protocols are designed to support REST communication between EFI REST client @@ -375,16 +375,16 @@ EFI_STATUS /// interface after the corresponding configuration is initialized. /// struct _EFI_REST_EX_PROTOCOL { - EFI_REST_SEND_RECEIVE SendReceive; - EFI_REST_GET_TIME GetServiceTime; - EFI_REST_EX_GET_SERVICE GetService; - EFI_REST_EX_GET_MODE_DATA GetModeData; - EFI_REST_EX_CONFIGURE Configure; - EFI_REST_EX_ASYNC_SEND_RECEIVE AyncSendReceive; - EFI_REST_EX_EVENT_SERVICE EventService; + EFI_REST_SEND_RECEIVE SendReceive; + EFI_REST_GET_TIME GetServiceTime; + EFI_REST_EX_GET_SERVICE GetService; + EFI_REST_EX_GET_MODE_DATA GetModeData; + EFI_REST_EX_CONFIGURE Configure; + EFI_REST_EX_ASYNC_SEND_RECEIVE AyncSendReceive; + EFI_REST_EX_EVENT_SERVICE EventService; }; -extern EFI_GUID gEfiRestExServiceBindingProtocolGuid; -extern EFI_GUID gEfiRestExProtocolGuid; +extern EFI_GUID gEfiRestExServiceBindingProtocolGuid; +extern EFI_GUID gEfiRestExProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/RestJsonStructure.h b/MdePkg/Include/Protocol/RestJsonStructure.h index ea3c4a6..29d69d6 100644 --- a/MdePkg/Include/Protocol/RestJsonStructure.h +++ b/MdePkg/Include/Protocol/RestJsonStructure.h @@ -21,8 +21,8 @@ 0xa9a048f6, 0x48a0, 0x4714, {0xb7, 0xda, 0xa9, 0xad,0x87, 0xd4, 0xda, 0xc9 } \ } -typedef struct _EFI_REST_JSON_STRUCTURE_PROTOCOL EFI_REST_JSON_STRUCTURE_PROTOCOL; -typedef CHAR8 * EFI_REST_JSON_RESOURCE_TYPE_DATATYPE; +typedef struct _EFI_REST_JSON_STRUCTURE_PROTOCOL EFI_REST_JSON_STRUCTURE_PROTOCOL; +typedef CHAR8 *EFI_REST_JSON_RESOURCE_TYPE_DATATYPE; /// /// Structure defintions of resource name space. @@ -32,10 +32,10 @@ typedef CHAR8 * EFI_REST_JSON_RESOURCE_TYPE_DATATYPE; /// REST API. /// typedef struct _EFI_REST_JSON_RESOURCE_TYPE_NAMESPACE { - CHAR8 *ResourceTypeName; ///< Resource type name - CHAR8 *MajorVersion; ///< Resource major version - CHAR8 *MinorVersion; ///< Resource minor version - CHAR8 *ErrataVersion; ///< Resource errata version + CHAR8 *ResourceTypeName; ///< Resource type name + CHAR8 *MajorVersion; ///< Resource major version + CHAR8 *MinorVersion; ///< Resource minor version + CHAR8 *ErrataVersion; ///< Resource errata version } EFI_REST_JSON_RESOURCE_TYPE_NAMESPACE; /// @@ -44,17 +44,17 @@ typedef struct _EFI_REST_JSON_RESOURCE_TYPE_NAMESPACE { /// REST resource type consists of name space and data type. /// typedef struct _EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER { - EFI_REST_JSON_RESOURCE_TYPE_NAMESPACE NameSpace; ///< Namespace of this resource type. - EFI_REST_JSON_RESOURCE_TYPE_DATATYPE DataType; ///< Name of data type declared in this - ///< resource type. + EFI_REST_JSON_RESOURCE_TYPE_NAMESPACE NameSpace; ///< Namespace of this resource type. + EFI_REST_JSON_RESOURCE_TYPE_DATATYPE DataType; ///< Name of data type declared in this + ///< resource type. } EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER; /// /// List of JSON to C structure conversions which this convertor supports. /// typedef struct _EFI_REST_JSON_STRUCTURE_SUPPORTED { - LIST_ENTRY NextSupportedRsrcInterp; ///< Linklist to next supported conversion. - EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER RestResourceInterp; ///< JSON resource type this convertor supports. + LIST_ENTRY NextSupportedRsrcInterp; ///< Linklist to next supported conversion. + EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER RestResourceInterp; ///< JSON resource type this convertor supports. } EFI_REST_JSON_STRUCTURE_SUPPORTED; /// @@ -65,7 +65,7 @@ typedef struct _EFI_REST_JSON_STRUCTURE_HEADER { ///< choice the proper interpreter. ///< Follow by a pointer points to JSON structure, the content in the ///< JSON structure is implementation-specific according to converter producer. - VOID *JsonStructurePointer; + VOID *JsonStructurePointer; } EFI_REST_JSON_STRUCTURE_HEADER; /** @@ -87,7 +87,7 @@ EFI_STATUS IN EFI_REST_JSON_RESOURCE_TYPE_IDENTIFIER *JsonRsrcIdentifier OPTIONAL, IN CHAR8 *ResourceJsonText, OUT EFI_REST_JSON_STRUCTURE_HEADER **JsonStructure -); + ); /** Convert the given REST JSON structure into JSON text. @@ -106,7 +106,7 @@ EFI_STATUS IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This, IN EFI_REST_JSON_STRUCTURE_HEADER *JsonStructureHeader, OUT CHAR8 **ResourceJsonText -); + ); /** This function destroys the REST JSON structure. @@ -123,7 +123,8 @@ EFI_STATUS (EFIAPI *EFI_REST_JSON_STRUCTURE_DESTORY_STRUCTURE)( IN EFI_REST_JSON_STRUCTURE_PROTOCOL *This, IN EFI_REST_JSON_STRUCTURE_HEADER *JsonStructureHeader -); + ); + /** This function provides REST JSON resource to structure converter registration. @@ -146,16 +147,16 @@ EFI_STATUS IN EFI_REST_JSON_STRUCTURE_TO_STRUCTURE ToStructure, IN EFI_REST_JSON_STRUCTURE_TO_JSON ToJson, IN EFI_REST_JSON_STRUCTURE_DESTORY_STRUCTURE DestroyStructure -); + ); /// /// EFI REST JSON to C structure protocol definition. /// struct _EFI_REST_JSON_STRUCTURE_PROTOCOL { - EFI_REST_JSON_STRUCTURE_REGISTER Register; ///< Register JSON to C structure convertor - EFI_REST_JSON_STRUCTURE_TO_STRUCTURE ToStructure; ///< The function to convert JSON to C structure - EFI_REST_JSON_STRUCTURE_TO_JSON ToJson; ///< The function to convert C structure to JSON - EFI_REST_JSON_STRUCTURE_DESTORY_STRUCTURE DestoryStructure; ///< Destory C structure. + EFI_REST_JSON_STRUCTURE_REGISTER Register; ///< Register JSON to C structure convertor + EFI_REST_JSON_STRUCTURE_TO_STRUCTURE ToStructure; ///< The function to convert JSON to C structure + EFI_REST_JSON_STRUCTURE_TO_JSON ToJson; ///< The function to convert C structure to JSON + EFI_REST_JSON_STRUCTURE_DESTORY_STRUCTURE DestoryStructure; ///< Destory C structure. }; #endif diff --git a/MdePkg/Include/Protocol/Rng.h b/MdePkg/Include/Protocol/Rng.h index 2d89275..baf4255 100644 --- a/MdePkg/Include/Protocol/Rng.h +++ b/MdePkg/Include/Protocol/Rng.h @@ -93,7 +93,7 @@ typedef EFI_GUID EFI_RNG_ALGORITHM; **/ typedef EFI_STATUS -(EFIAPI *EFI_RNG_GET_INFO) ( +(EFIAPI *EFI_RNG_GET_INFO)( IN EFI_RNG_PROTOCOL *This, IN OUT UINTN *RNGAlgorithmListSize, OUT EFI_RNG_ALGORITHM *RNGAlgorithmList @@ -123,7 +123,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_RNG_GET_RNG) ( +(EFIAPI *EFI_RNG_GET_RNG)( IN EFI_RNG_PROTOCOL *This, IN EFI_RNG_ALGORITHM *RNGAlgorithm OPTIONAL, IN UINTN RNGValueLength, @@ -135,16 +135,16 @@ EFI_STATUS /// applications, or entropy for seeding other random number generators. /// struct _EFI_RNG_PROTOCOL { - EFI_RNG_GET_INFO GetInfo; - EFI_RNG_GET_RNG GetRNG; + EFI_RNG_GET_INFO GetInfo; + EFI_RNG_GET_RNG GetRNG; }; -extern EFI_GUID gEfiRngProtocolGuid; -extern EFI_GUID gEfiRngAlgorithmSp80090Hash256Guid; -extern EFI_GUID gEfiRngAlgorithmSp80090Hmac256Guid; -extern EFI_GUID gEfiRngAlgorithmSp80090Ctr256Guid; -extern EFI_GUID gEfiRngAlgorithmX9313DesGuid; -extern EFI_GUID gEfiRngAlgorithmX931AesGuid; -extern EFI_GUID gEfiRngAlgorithmRaw; +extern EFI_GUID gEfiRngProtocolGuid; +extern EFI_GUID gEfiRngAlgorithmSp80090Hash256Guid; +extern EFI_GUID gEfiRngAlgorithmSp80090Hmac256Guid; +extern EFI_GUID gEfiRngAlgorithmSp80090Ctr256Guid; +extern EFI_GUID gEfiRngAlgorithmX9313DesGuid; +extern EFI_GUID gEfiRngAlgorithmX931AesGuid; +extern EFI_GUID gEfiRngAlgorithmRaw; #endif diff --git a/MdePkg/Include/Protocol/Runtime.h b/MdePkg/Include/Protocol/Runtime.h index b7d9ea9..c535559 100644 --- a/MdePkg/Include/Protocol/Runtime.h +++ b/MdePkg/Include/Protocol/Runtime.h @@ -24,14 +24,14 @@ #define EFI_RUNTIME_ARCH_PROTOCOL_GUID \ { 0xb7dfb4e1, 0x52f, 0x449f, {0x87, 0xbe, 0x98, 0x18, 0xfc, 0x91, 0xb7, 0x33 } } -typedef struct _EFI_RUNTIME_ARCH_PROTOCOL EFI_RUNTIME_ARCH_PROTOCOL; +typedef struct _EFI_RUNTIME_ARCH_PROTOCOL EFI_RUNTIME_ARCH_PROTOCOL; /// /// LIST_ENTRY from BaseType /// typedef LIST_ENTRY EFI_LIST_ENTRY; -typedef struct _EFI_RUNTIME_IMAGE_ENTRY EFI_RUNTIME_IMAGE_ENTRY; +typedef struct _EFI_RUNTIME_IMAGE_ENTRY EFI_RUNTIME_IMAGE_ENTRY; /// /// EFI_RUNTIME_IMAGE_ENTRY @@ -41,27 +41,27 @@ struct _EFI_RUNTIME_IMAGE_ENTRY { /// Start of image that has been loaded in memory. It is a pointer /// to either the DOS header or PE header of the image. /// - VOID *ImageBase; + VOID *ImageBase; /// /// Size in bytes of the image represented by ImageBase. /// - UINT64 ImageSize; + UINT64 ImageSize; /// /// Information about the fix-ups that were performed on ImageBase when it was /// loaded into memory. /// - VOID *RelocationData; + VOID *RelocationData; /// /// The ImageHandle passed into ImageBase when it was loaded. /// - EFI_HANDLE Handle; + EFI_HANDLE Handle; /// /// Entry for this node in the EFI_RUNTIME_ARCHITECTURE_PROTOCOL.ImageHead list. /// - EFI_LIST_ENTRY Link; + EFI_LIST_ENTRY Link; }; -typedef struct _EFI_RUNTIME_EVENT_ENTRY EFI_RUNTIME_EVENT_ENTRY; +typedef struct _EFI_RUNTIME_EVENT_ENTRY EFI_RUNTIME_EVENT_ENTRY; /// /// EFI_RUNTIME_EVENT_ENTRY @@ -70,28 +70,28 @@ struct _EFI_RUNTIME_EVENT_ENTRY { /// /// The same as Type passed into CreateEvent(). /// - UINT32 Type; + UINT32 Type; /// /// The same as NotifyTpl passed into CreateEvent(). /// - EFI_TPL NotifyTpl; + EFI_TPL NotifyTpl; /// /// The same as NotifyFunction passed into CreateEvent(). /// - EFI_EVENT_NOTIFY NotifyFunction; + EFI_EVENT_NOTIFY NotifyFunction; /// /// The same as NotifyContext passed into CreateEvent(). /// - VOID *NotifyContext; + VOID *NotifyContext; /// /// The EFI_EVENT returned by CreateEvent(). Event must be in runtime memory. /// - EFI_EVENT *Event; + EFI_EVENT *Event; /// /// Entry for this node in the /// EFI_RUNTIME_ARCHITECTURE_PROTOCOL.EventHead list. /// - EFI_LIST_ENTRY Link; + EFI_LIST_ENTRY Link; }; /// @@ -105,18 +105,18 @@ struct _EFI_RUNTIME_EVENT_ENTRY { /// by a runtime DXE driver and may only be consumed by the DXE Foundation. /// struct _EFI_RUNTIME_ARCH_PROTOCOL { - EFI_LIST_ENTRY ImageHead; ///< A list of type EFI_RUNTIME_IMAGE_ENTRY. - EFI_LIST_ENTRY EventHead; ///< A list of type EFI_RUNTIME_EVENT_ENTRY. - UINTN MemoryDescriptorSize; ///< Size of a memory descriptor that is returned by GetMemoryMap(). - UINT32 MemoryDesciptorVersion; ///< Version of a memory descriptor that is returned by GetMemoryMap(). - UINTN MemoryMapSize;///< Size of the memory map in bytes contained in MemoryMapPhysical and MemoryMapVirtual. - EFI_MEMORY_DESCRIPTOR *MemoryMapPhysical; ///< Pointer to a runtime buffer that contains a copy of - ///< the memory map returned via GetMemoryMap(). - EFI_MEMORY_DESCRIPTOR *MemoryMapVirtual; ///< Pointer to MemoryMapPhysical that is updated to virtual mode after SetVirtualAddressMap(). - BOOLEAN VirtualMode; ///< Boolean that is TRUE if SetVirtualAddressMap() has been called. - BOOLEAN AtRuntime; ///< Boolean that is TRUE if ExitBootServices () has been called. + EFI_LIST_ENTRY ImageHead; ///< A list of type EFI_RUNTIME_IMAGE_ENTRY. + EFI_LIST_ENTRY EventHead; ///< A list of type EFI_RUNTIME_EVENT_ENTRY. + UINTN MemoryDescriptorSize; ///< Size of a memory descriptor that is returned by GetMemoryMap(). + UINT32 MemoryDesciptorVersion; ///< Version of a memory descriptor that is returned by GetMemoryMap(). + UINTN MemoryMapSize; ///< Size of the memory map in bytes contained in MemoryMapPhysical and MemoryMapVirtual. + EFI_MEMORY_DESCRIPTOR *MemoryMapPhysical; ///< Pointer to a runtime buffer that contains a copy of + ///< the memory map returned via GetMemoryMap(). + EFI_MEMORY_DESCRIPTOR *MemoryMapVirtual; ///< Pointer to MemoryMapPhysical that is updated to virtual mode after SetVirtualAddressMap(). + BOOLEAN VirtualMode; ///< Boolean that is TRUE if SetVirtualAddressMap() has been called. + BOOLEAN AtRuntime; ///< Boolean that is TRUE if ExitBootServices () has been called. }; -extern EFI_GUID gEfiRuntimeArchProtocolGuid; +extern EFI_GUID gEfiRuntimeArchProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/S3SaveState.h b/MdePkg/Include/Protocol/S3SaveState.h index c1b8f8b..c2b2694 100644 --- a/MdePkg/Include/Protocol/S3SaveState.h +++ b/MdePkg/Include/Protocol/S3SaveState.h @@ -20,10 +20,9 @@ #define EFI_S3_SAVE_STATE_PROTOCOL_GUID \ { 0xe857caf6, 0xc046, 0x45dc, { 0xbe, 0x3f, 0xee, 0x7, 0x65, 0xfb, 0xa8, 0x87 }} - typedef VOID *EFI_S3_BOOT_SCRIPT_POSITION; -typedef struct _EFI_S3_SAVE_STATE_PROTOCOL EFI_S3_SAVE_STATE_PROTOCOL; +typedef struct _EFI_S3_SAVE_STATE_PROTOCOL EFI_S3_SAVE_STATE_PROTOCOL; /** Record operations that need to be replayed during an S3 resume. @@ -45,10 +44,10 @@ typedef struct _EFI_S3_SAVE_STATE_PROTOCOL EFI_S3_SAVE_STATE_PROTOCOL; typedef EFI_STATUS (EFIAPI *EFI_S3_SAVE_STATE_WRITE)( - IN CONST EFI_S3_SAVE_STATE_PROTOCOL *This, - IN UINTN OpCode, - ... -); + IN CONST EFI_S3_SAVE_STATE_PROTOCOL *This, + IN UINTN OpCode, + ... + ); /** Record operations that need to be replayed during an S3 resume. @@ -89,12 +88,12 @@ EFI_STATUS typedef EFI_STATUS (EFIAPI *EFI_S3_SAVE_STATE_INSERT)( - IN CONST EFI_S3_SAVE_STATE_PROTOCOL *This, - IN BOOLEAN BeforeOrAfter, - IN OUT EFI_S3_BOOT_SCRIPT_POSITION *Position OPTIONAL, - IN UINTN OpCode, - ... -); + IN CONST EFI_S3_SAVE_STATE_PROTOCOL *This, + IN BOOLEAN BeforeOrAfter, + IN OUT EFI_S3_BOOT_SCRIPT_POSITION *Position OPTIONAL, + IN UINTN OpCode, + ... + ); /** Find a label within the boot script table and, if not present, optionally create it. @@ -126,12 +125,12 @@ EFI_STATUS typedef EFI_STATUS (EFIAPI *EFI_S3_SAVE_STATE_LABEL)( - IN CONST EFI_S3_SAVE_STATE_PROTOCOL *This, - IN BOOLEAN BeforeOrAfter, - IN BOOLEAN CreateIfNotFound, - IN OUT EFI_S3_BOOT_SCRIPT_POSITION *Position OPTIONAL, - IN CONST CHAR8 *Label -); + IN CONST EFI_S3_SAVE_STATE_PROTOCOL *This, + IN BOOLEAN BeforeOrAfter, + IN BOOLEAN CreateIfNotFound, + IN OUT EFI_S3_BOOT_SCRIPT_POSITION *Position OPTIONAL, + IN CONST CHAR8 *Label + ); /** Compare two positions in the boot script table and return their relative position. @@ -152,19 +151,19 @@ EFI_STATUS typedef EFI_STATUS (EFIAPI *EFI_S3_SAVE_STATE_COMPARE)( - IN CONST EFI_S3_SAVE_STATE_PROTOCOL *This, - IN EFI_S3_BOOT_SCRIPT_POSITION Position1, - IN EFI_S3_BOOT_SCRIPT_POSITION Position2, - OUT UINTN *RelativePosition -); + IN CONST EFI_S3_SAVE_STATE_PROTOCOL *This, + IN EFI_S3_BOOT_SCRIPT_POSITION Position1, + IN EFI_S3_BOOT_SCRIPT_POSITION Position2, + OUT UINTN *RelativePosition + ); struct _EFI_S3_SAVE_STATE_PROTOCOL { - EFI_S3_SAVE_STATE_WRITE Write; - EFI_S3_SAVE_STATE_INSERT Insert; - EFI_S3_SAVE_STATE_LABEL Label; - EFI_S3_SAVE_STATE_COMPARE Compare; + EFI_S3_SAVE_STATE_WRITE Write; + EFI_S3_SAVE_STATE_INSERT Insert; + EFI_S3_SAVE_STATE_LABEL Label; + EFI_S3_SAVE_STATE_COMPARE Compare; }; -extern EFI_GUID gEfiS3SaveStateProtocolGuid; +extern EFI_GUID gEfiS3SaveStateProtocolGuid; #endif // __S3_SAVE_STATE_H__ diff --git a/MdePkg/Include/Protocol/S3SmmSaveState.h b/MdePkg/Include/Protocol/S3SmmSaveState.h index bbc01ac..cabcc24 100644 --- a/MdePkg/Include/Protocol/S3SmmSaveState.h +++ b/MdePkg/Include/Protocol/S3SmmSaveState.h @@ -31,10 +31,8 @@ #define EFI_S3_SMM_SAVE_STATE_PROTOCOL_GUID \ {0x320afe62, 0xe593, 0x49cb, { 0xa9, 0xf1, 0xd4, 0xc2, 0xf4, 0xaf, 0x1, 0x4c }} - typedef EFI_S3_SAVE_STATE_PROTOCOL EFI_S3_SMM_SAVE_STATE_PROTOCOL; -extern EFI_GUID gEfiS3SmmSaveStateProtocolGuid; +extern EFI_GUID gEfiS3SmmSaveStateProtocolGuid; #endif // __S3_SMM_SAVE_STATE_H__ - diff --git a/MdePkg/Include/Protocol/ScsiIo.h b/MdePkg/Include/Protocol/ScsiIo.h index 05e46bd..7ebfd9a 100644 --- a/MdePkg/Include/Protocol/ScsiIo.h +++ b/MdePkg/Include/Protocol/ScsiIo.h @@ -25,34 +25,34 @@ typedef struct _EFI_SCSI_IO_PROTOCOL EFI_SCSI_IO_PROTOCOL; // // SCSI Device type information, defined in the SCSI Primary Commands standard (e.g., SPC-4) // -#define EFI_SCSI_IO_TYPE_DISK 0x00 ///< Disk device -#define EFI_SCSI_IO_TYPE_TAPE 0x01 ///< Tape device -#define EFI_SCSI_IO_TYPE_PRINTER 0x02 ///< Printer -#define EFI_SCSI_IO_TYPE_PROCESSOR 0x03 ///< Processor -#define EFI_SCSI_IO_TYPE_WORM 0x04 ///< Write-once read-multiple -#define EFI_SCSI_IO_TYPE_CDROM 0x05 ///< CD or DVD device -#define EFI_SCSI_IO_TYPE_SCANNER 0x06 ///< Scanner device -#define EFI_SCSI_IO_TYPE_OPTICAL 0x07 ///< Optical memory device -#define EFI_SCSI_IO_TYPE_MEDIUMCHANGER 0x08 ///< Medium Changer device -#define EFI_SCSI_IO_TYPE_COMMUNICATION 0x09 ///< Communications device -#define MFI_SCSI_IO_TYPE_A 0x0A ///< Obsolete -#define MFI_SCSI_IO_TYPE_B 0x0B ///< Obsolete -#define MFI_SCSI_IO_TYPE_RAID 0x0C ///< Storage array controller device (e.g., RAID) -#define MFI_SCSI_IO_TYPE_SES 0x0D ///< Enclosure services device -#define MFI_SCSI_IO_TYPE_RBC 0x0E ///< Simplified direct-access device (e.g., magnetic disk) -#define MFI_SCSI_IO_TYPE_OCRW 0x0F ///< Optical card reader/writer device -#define MFI_SCSI_IO_TYPE_BRIDGE 0x10 ///< Bridge Controller Commands -#define MFI_SCSI_IO_TYPE_OSD 0x11 ///< Object-based Storage Device -#define EFI_SCSI_IO_TYPE_RESERVED_LOW 0x12 ///< Reserved (low) -#define EFI_SCSI_IO_TYPE_RESERVED_HIGH 0x1E ///< Reserved (high) -#define EFI_SCSI_IO_TYPE_UNKNOWN 0x1F ///< Unknown no device type +#define EFI_SCSI_IO_TYPE_DISK 0x00 ///< Disk device +#define EFI_SCSI_IO_TYPE_TAPE 0x01 ///< Tape device +#define EFI_SCSI_IO_TYPE_PRINTER 0x02 ///< Printer +#define EFI_SCSI_IO_TYPE_PROCESSOR 0x03 ///< Processor +#define EFI_SCSI_IO_TYPE_WORM 0x04 ///< Write-once read-multiple +#define EFI_SCSI_IO_TYPE_CDROM 0x05 ///< CD or DVD device +#define EFI_SCSI_IO_TYPE_SCANNER 0x06 ///< Scanner device +#define EFI_SCSI_IO_TYPE_OPTICAL 0x07 ///< Optical memory device +#define EFI_SCSI_IO_TYPE_MEDIUMCHANGER 0x08 ///< Medium Changer device +#define EFI_SCSI_IO_TYPE_COMMUNICATION 0x09 ///< Communications device +#define MFI_SCSI_IO_TYPE_A 0x0A ///< Obsolete +#define MFI_SCSI_IO_TYPE_B 0x0B ///< Obsolete +#define MFI_SCSI_IO_TYPE_RAID 0x0C ///< Storage array controller device (e.g., RAID) +#define MFI_SCSI_IO_TYPE_SES 0x0D ///< Enclosure services device +#define MFI_SCSI_IO_TYPE_RBC 0x0E ///< Simplified direct-access device (e.g., magnetic disk) +#define MFI_SCSI_IO_TYPE_OCRW 0x0F ///< Optical card reader/writer device +#define MFI_SCSI_IO_TYPE_BRIDGE 0x10 ///< Bridge Controller Commands +#define MFI_SCSI_IO_TYPE_OSD 0x11 ///< Object-based Storage Device +#define EFI_SCSI_IO_TYPE_RESERVED_LOW 0x12 ///< Reserved (low) +#define EFI_SCSI_IO_TYPE_RESERVED_HIGH 0x1E ///< Reserved (high) +#define EFI_SCSI_IO_TYPE_UNKNOWN 0x1F ///< Unknown no device type // // SCSI Data Direction definition // -#define EFI_SCSI_IO_DATA_DIRECTION_READ 0 -#define EFI_SCSI_IO_DATA_DIRECTION_WRITE 1 -#define EFI_SCSI_IO_DATA_DIRECTION_BIDIRECTIONAL 2 +#define EFI_SCSI_IO_DATA_DIRECTION_READ 0 +#define EFI_SCSI_IO_DATA_DIRECTION_WRITE 1 +#define EFI_SCSI_IO_DATA_DIRECTION_BIDIRECTIONAL 2 // // SCSI Host Adapter Status definition @@ -70,19 +70,18 @@ typedef struct _EFI_SCSI_IO_PROTOCOL EFI_SCSI_IO_PROTOCOL; #define EFI_SCSI_IO_STATUS_HOST_ADAPTER_PHASE_ERROR 0x14 ///< Target bus phase sequence failure #define EFI_SCSI_IO_STATUS_HOST_ADAPTER_OTHER 0x7f - // // SCSI Target Status definition // -#define EFI_SCSI_IO_STATUS_TARGET_GOOD 0x00 -#define EFI_SCSI_IO_STATUS_TARGET_CHECK_CONDITION 0x02 ///< check condition -#define EFI_SCSI_IO_STATUS_TARGET_CONDITION_MET 0x04 ///< condition met -#define EFI_SCSI_IO_STATUS_TARGET_BUSY 0x08 ///< busy -#define EFI_SCSI_IO_STATUS_TARGET_INTERMEDIATE 0x10 ///< intermediate -#define EFI_SCSI_IO_STATUS_TARGET_INTERMEDIATE_CONDITION_MET 0x14 ///< intermediate-condition met -#define EFI_SCSI_IO_STATUS_TARGET_RESERVATION_CONFLICT 0x18 ///< reservation conflict -#define EFI_SCSI_IO_STATUS_TARGET_COMMOND_TERMINATED 0x22 ///< command terminated -#define EFI_SCSI_IO_STATUS_TARGET_QUEUE_FULL 0x28 ///< queue full +#define EFI_SCSI_IO_STATUS_TARGET_GOOD 0x00 +#define EFI_SCSI_IO_STATUS_TARGET_CHECK_CONDITION 0x02 ///< check condition +#define EFI_SCSI_IO_STATUS_TARGET_CONDITION_MET 0x04 ///< condition met +#define EFI_SCSI_IO_STATUS_TARGET_BUSY 0x08 ///< busy +#define EFI_SCSI_IO_STATUS_TARGET_INTERMEDIATE 0x10 ///< intermediate +#define EFI_SCSI_IO_STATUS_TARGET_INTERMEDIATE_CONDITION_MET 0x14 ///< intermediate-condition met +#define EFI_SCSI_IO_STATUS_TARGET_RESERVATION_CONFLICT 0x18 ///< reservation conflict +#define EFI_SCSI_IO_STATUS_TARGET_COMMOND_TERMINATED 0x22 ///< command terminated +#define EFI_SCSI_IO_STATUS_TARGET_QUEUE_FULL 0x28 ///< queue full typedef struct { /// @@ -93,63 +92,63 @@ typedef struct { /// EFI_TIMEOUT if the time required to execute the SCSI Request /// Packet is greater than Timeout. /// - UINT64 Timeout; + UINT64 Timeout; /// /// A pointer to the data buffer to transfer between the SCSI /// controller and the SCSI device for SCSI READ command /// - VOID *InDataBuffer; + VOID *InDataBuffer; /// /// A pointer to the data buffer to transfer between the SCSI /// controller and the SCSI device for SCSI WRITE command. /// - VOID *OutDataBuffer; + VOID *OutDataBuffer; /// /// A pointer to the sense data that was generated by the execution of /// the SCSI Request Packet. /// - VOID *SenseData; + VOID *SenseData; /// /// A pointer to buffer that contains the Command Data Block to /// send to the SCSI device. /// - VOID *Cdb; + VOID *Cdb; /// /// On Input, the size, in bytes, of InDataBuffer. On output, the /// number of bytes transferred between the SCSI controller and the SCSI device. /// - UINT32 InTransferLength; + UINT32 InTransferLength; /// /// On Input, the size, in bytes of OutDataBuffer. On Output, the /// Number of bytes transferred between SCSI Controller and the SCSI device. /// - UINT32 OutTransferLength; + UINT32 OutTransferLength; /// /// The length, in bytes, of the buffer Cdb. The standard values are /// 6, 10, 12, and 16, but other values are possible if a variable length CDB is used. /// - UINT8 CdbLength; + UINT8 CdbLength; /// /// The direction of the data transfer. 0 for reads, 1 for writes. A /// value of 2 is Reserved for Bi-Directional SCSI commands. /// - UINT8 DataDirection; + UINT8 DataDirection; /// /// The status of the SCSI Host Controller that produces the SCSI /// bus where the SCSI device attached when the SCSI Request /// Packet was executed on the SCSI Controller. /// - UINT8 HostAdapterStatus; + UINT8 HostAdapterStatus; /// /// The status returned by the SCSI device when the SCSI Request /// Packet was executed. /// - UINT8 TargetStatus; + UINT8 TargetStatus; /// /// On input, the length in bytes of the SenseData buffer. On /// output, the number of bytes written to the SenseData buffer. /// - UINT8 SenseDataLength; + UINT8 SenseDataLength; } EFI_SCSI_IO_SCSI_REQUEST_PACKET; /** @@ -230,7 +229,6 @@ EFI_STATUS IN EFI_SCSI_IO_PROTOCOL *This ); - /** Sends a SCSI Request Packet to the SCSI Controller for execution. @@ -291,11 +289,11 @@ EFI_STATUS /// Provides services to manage and communicate with SCSI devices. /// struct _EFI_SCSI_IO_PROTOCOL { - EFI_SCSI_IO_PROTOCOL_GET_DEVICE_TYPE GetDeviceType; - EFI_SCSI_IO_PROTOCOL_GET_DEVICE_LOCATION GetDeviceLocation; - EFI_SCSI_IO_PROTOCOL_RESET_BUS ResetBus; - EFI_SCSI_IO_PROTOCOL_RESET_DEVICE ResetDevice; - EFI_SCSI_IO_PROTOCOL_EXEC_SCSI_COMMAND ExecuteScsiCommand; + EFI_SCSI_IO_PROTOCOL_GET_DEVICE_TYPE GetDeviceType; + EFI_SCSI_IO_PROTOCOL_GET_DEVICE_LOCATION GetDeviceLocation; + EFI_SCSI_IO_PROTOCOL_RESET_BUS ResetBus; + EFI_SCSI_IO_PROTOCOL_RESET_DEVICE ResetDevice; + EFI_SCSI_IO_PROTOCOL_EXEC_SCSI_COMMAND ExecuteScsiCommand; /// /// Supplies the alignment requirement for any buffer used in a data transfer. @@ -303,9 +301,9 @@ struct _EFI_SCSI_IO_PROTOCOL { /// Otherwise, IoAlign must be a power of 2, and the requirement is that the /// start address of a buffer must be evenly divisible by IoAlign with no remainder. /// - UINT32 IoAlign; + UINT32 IoAlign; }; -extern EFI_GUID gEfiScsiIoProtocolGuid; +extern EFI_GUID gEfiScsiIoProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/ScsiPassThru.h b/MdePkg/Include/Protocol/ScsiPassThru.h index b0acf09..c87fb97 100644 --- a/MdePkg/Include/Protocol/ScsiPassThru.h +++ b/MdePkg/Include/Protocol/ScsiPassThru.h @@ -24,7 +24,7 @@ /// /// Forward reference for pure ANSI compatability /// -typedef struct _EFI_SCSI_PASS_THRU_PROTOCOL EFI_SCSI_PASS_THRU_PROTOCOL; +typedef struct _EFI_SCSI_PASS_THRU_PROTOCOL EFI_SCSI_PASS_THRU_PROTOCOL; #define EFI_SCSI_PASS_THRU_ATTRIBUTES_PHYSICAL 0x0001 #define EFI_SCSI_PASS_THRU_ATTRIBUTES_LOGICAL 0x0002 @@ -49,15 +49,15 @@ typedef struct _EFI_SCSI_PASS_THRU_PROTOCOL EFI_SCSI_PASS_THRU_PROTOCOL; // // SCSI Target Status definition // -#define EFI_SCSI_STATUS_TARGET_GOOD 0x00 -#define EFI_SCSI_STATUS_TARGET_CHECK_CONDITION 0x02 // check condition -#define EFI_SCSI_STATUS_TARGET_CONDITION_MET 0x04 // condition met -#define EFI_SCSI_STATUS_TARGET_BUSY 0x08 // busy -#define EFI_SCSI_STATUS_TARGET_INTERMEDIATE 0x10 // intermediate -#define EFI_SCSI_STATUS_TARGET_INTERMEDIATE_CONDITION_MET 0x14 // intermediate-condition met -#define EFI_SCSI_STATUS_TARGET_RESERVATION_CONFLICT 0x18 // reservation conflict -#define EFI_SCSI_STATUS_TARGET_COMMOND_TERMINATED 0x22 // command terminated -#define EFI_SCSI_STATUS_TARGET_QUEUE_FULL 0x28 // queue full +#define EFI_SCSI_STATUS_TARGET_GOOD 0x00 +#define EFI_SCSI_STATUS_TARGET_CHECK_CONDITION 0x02 // check condition +#define EFI_SCSI_STATUS_TARGET_CONDITION_MET 0x04 // condition met +#define EFI_SCSI_STATUS_TARGET_BUSY 0x08 // busy +#define EFI_SCSI_STATUS_TARGET_INTERMEDIATE 0x10 // intermediate +#define EFI_SCSI_STATUS_TARGET_INTERMEDIATE_CONDITION_MET 0x14 // intermediate-condition met +#define EFI_SCSI_STATUS_TARGET_RESERVATION_CONFLICT 0x18 // reservation conflict +#define EFI_SCSI_STATUS_TARGET_COMMOND_TERMINATED 0x22 // command terminated +#define EFI_SCSI_STATUS_TARGET_QUEUE_FULL 0x28 // queue full typedef struct { /// @@ -68,78 +68,78 @@ typedef struct { /// EFI_TIMEOUT if the time required to execute the SCSI Request /// Packet is greater than Timeout. /// - UINT64 Timeout; + UINT64 Timeout; /// /// A pointer to the data buffer to transfer between the SCSI /// controller and the SCSI device. Must be aligned to the boundary /// specified in the IoAlign field of the /// EFI_SCSI_PASS_THRU_MODE structure. /// - VOID *DataBuffer; + VOID *DataBuffer; /// /// A pointer to the sense data that was generated by the execution of /// the SCSI Request Packet. /// - VOID *SenseData; + VOID *SenseData; /// /// A pointer to buffer that contains the Command Data Block to /// send to the SCSI device. /// - VOID *Cdb; + VOID *Cdb; /// /// On Input, the size, in bytes, of InDataBuffer. On output, the /// number of bytes transferred between the SCSI controller and the SCSI device. /// - UINT32 TransferLength; + UINT32 TransferLength; /// /// The length, in bytes, of the buffer Cdb. The standard values are /// 6, 10, 12, and 16, but other values are possible if a variable length CDB is used. /// - UINT8 CdbLength; + UINT8 CdbLength; /// /// The direction of the data transfer. 0 for reads, 1 for writes. A /// value of 2 is Reserved for Bi-Directional SCSI commands. /// - UINT8 DataDirection; + UINT8 DataDirection; /// /// The status of the SCSI Host Controller that produces the SCSI /// bus where the SCSI device attached when the SCSI Request /// Packet was executed on the SCSI Controller. /// - UINT8 HostAdapterStatus; + UINT8 HostAdapterStatus; /// /// The status returned by the SCSI device when the SCSI Request /// Packet was executed. /// - UINT8 TargetStatus; + UINT8 TargetStatus; /// /// On input, the length in bytes of the SenseData buffer. On /// output, the number of bytes written to the SenseData buffer. /// - UINT8 SenseDataLength; + UINT8 SenseDataLength; } EFI_SCSI_PASS_THRU_SCSI_REQUEST_PACKET; typedef struct { /// /// A Null-terminated Unicode string that represents the printable name of the SCSI controller. /// - CHAR16 *ControllerName; + CHAR16 *ControllerName; /// /// A Null-terminated Unicode string that represents the printable name of the SCSI channel. /// - CHAR16 *ChannelName; + CHAR16 *ChannelName; /// /// The Target ID of the host adapter on the SCSI channel. /// - UINT32 AdapterId; + UINT32 AdapterId; /// /// Additional information on the attributes of the SCSI channel. /// - UINT32 Attributes; + UINT32 Attributes; /// /// Supplies the alignment requirement for any buffer used in a data transfer. /// - UINT32 IoAlign; + UINT32 IoAlign; } EFI_SCSI_PASS_THRU_MODE; /** @@ -363,15 +363,15 @@ struct _EFI_SCSI_PASS_THRU_PROTOCOL { /// /// A pointer to the EFI_SCSI_PASS_THRU_MODE data for this SCSI channel. /// - EFI_SCSI_PASS_THRU_MODE *Mode; - EFI_SCSI_PASS_THRU_PASSTHRU PassThru; - EFI_SCSI_PASS_THRU_GET_NEXT_DEVICE GetNextDevice; - EFI_SCSI_PASS_THRU_BUILD_DEVICE_PATH BuildDevicePath; - EFI_SCSI_PASS_THRU_GET_TARGET_LUN GetTargetLun; - EFI_SCSI_PASS_THRU_RESET_CHANNEL ResetChannel; - EFI_SCSI_PASS_THRU_RESET_TARGET ResetTarget; + EFI_SCSI_PASS_THRU_MODE *Mode; + EFI_SCSI_PASS_THRU_PASSTHRU PassThru; + EFI_SCSI_PASS_THRU_GET_NEXT_DEVICE GetNextDevice; + EFI_SCSI_PASS_THRU_BUILD_DEVICE_PATH BuildDevicePath; + EFI_SCSI_PASS_THRU_GET_TARGET_LUN GetTargetLun; + EFI_SCSI_PASS_THRU_RESET_CHANNEL ResetChannel; + EFI_SCSI_PASS_THRU_RESET_TARGET ResetTarget; }; -extern EFI_GUID gEfiScsiPassThruProtocolGuid; +extern EFI_GUID gEfiScsiPassThruProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/ScsiPassThruExt.h b/MdePkg/Include/Protocol/ScsiPassThruExt.h index 994fbba..84a31d9 100644 --- a/MdePkg/Include/Protocol/ScsiPassThruExt.h +++ b/MdePkg/Include/Protocol/ScsiPassThruExt.h @@ -18,33 +18,33 @@ typedef struct _EFI_EXT_SCSI_PASS_THRU_PROTOCOL EFI_EXT_SCSI_PASS_THRU_PROTOCOL; -#define TARGET_MAX_BYTES 0x10 +#define TARGET_MAX_BYTES 0x10 -#define EFI_EXT_SCSI_PASS_THRU_ATTRIBUTES_PHYSICAL 0x0001 -#define EFI_EXT_SCSI_PASS_THRU_ATTRIBUTES_LOGICAL 0x0002 -#define EFI_EXT_SCSI_PASS_THRU_ATTRIBUTES_NONBLOCKIO 0x0004 +#define EFI_EXT_SCSI_PASS_THRU_ATTRIBUTES_PHYSICAL 0x0001 +#define EFI_EXT_SCSI_PASS_THRU_ATTRIBUTES_LOGICAL 0x0002 +#define EFI_EXT_SCSI_PASS_THRU_ATTRIBUTES_NONBLOCKIO 0x0004 // // DataDirection // -#define EFI_EXT_SCSI_DATA_DIRECTION_READ 0 -#define EFI_EXT_SCSI_DATA_DIRECTION_WRITE 1 -#define EFI_EXT_SCSI_DATA_DIRECTION_BIDIRECTIONAL 2 +#define EFI_EXT_SCSI_DATA_DIRECTION_READ 0 +#define EFI_EXT_SCSI_DATA_DIRECTION_WRITE 1 +#define EFI_EXT_SCSI_DATA_DIRECTION_BIDIRECTIONAL 2 // // HostAdapterStatus // -#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_OK 0x00 -#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_TIMEOUT_COMMAND 0x09 -#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_TIMEOUT 0x0b -#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_MESSAGE_REJECT 0x0d -#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_BUS_RESET 0x0e -#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_PARITY_ERROR 0x0f -#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_REQUEST_SENSE_FAILED 0x10 -#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_SELECTION_TIMEOUT 0x11 -#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_DATA_OVERRUN_UNDERRUN 0x12 -#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_BUS_FREE 0x13 -#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_PHASE_ERROR 0x14 -#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_OTHER 0x7f +#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_OK 0x00 +#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_TIMEOUT_COMMAND 0x09 +#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_TIMEOUT 0x0b +#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_MESSAGE_REJECT 0x0d +#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_BUS_RESET 0x0e +#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_PARITY_ERROR 0x0f +#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_REQUEST_SENSE_FAILED 0x10 +#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_SELECTION_TIMEOUT 0x11 +#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_DATA_OVERRUN_UNDERRUN 0x12 +#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_BUS_FREE 0x13 +#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_PHASE_ERROR 0x14 +#define EFI_EXT_SCSI_STATUS_HOST_ADAPTER_OTHER 0x7f // // TargetStatus // @@ -63,15 +63,15 @@ typedef struct { /// /// The Target ID of the host adapter on the SCSI channel. /// - UINT32 AdapterId; + UINT32 AdapterId; /// /// Additional information on the attributes of the SCSI channel. /// - UINT32 Attributes; + UINT32 Attributes; /// /// Supplies the alignment requirement for any buffer used in a data transfer. /// - UINT32 IoAlign; + UINT32 IoAlign; } EFI_EXT_SCSI_PASS_THRU_MODE; typedef struct { @@ -83,62 +83,62 @@ typedef struct { /// EFI_TIMEOUT if the time required to execute the SCSI /// Request Packet is greater than Timeout. /// - UINT64 Timeout; + UINT64 Timeout; /// /// A pointer to the data buffer to transfer between the SCSI /// controller and the SCSI device for read and bidirectional commands. /// - VOID *InDataBuffer; + VOID *InDataBuffer; /// /// A pointer to the data buffer to transfer between the SCSI /// controller and the SCSI device for write or bidirectional commands. /// - VOID *OutDataBuffer; + VOID *OutDataBuffer; /// /// A pointer to the sense data that was generated by the execution of /// the SCSI Request Packet. /// - VOID *SenseData; + VOID *SenseData; /// /// A pointer to buffer that contains the Command Data Block to /// send to the SCSI device specified by Target and Lun. /// - VOID *Cdb; + VOID *Cdb; /// /// On Input, the size, in bytes, of InDataBuffer. On output, the /// number of bytes transferred between the SCSI controller and the SCSI device. /// - UINT32 InTransferLength; + UINT32 InTransferLength; /// /// On Input, the size, in bytes of OutDataBuffer. On Output, the /// Number of bytes transferred between SCSI Controller and the SCSI device. /// - UINT32 OutTransferLength; + UINT32 OutTransferLength; /// /// The length, in bytes, of the buffer Cdb. The standard values are 6, /// 10, 12, and 16, but other values are possible if a variable length CDB is used. /// - UINT8 CdbLength; + UINT8 CdbLength; /// /// The direction of the data transfer. 0 for reads, 1 for writes. A /// value of 2 is Reserved for Bi-Directional SCSI commands. /// - UINT8 DataDirection; + UINT8 DataDirection; /// /// The status of the host adapter specified by This when the SCSI /// Request Packet was executed on the target device. /// - UINT8 HostAdapterStatus; + UINT8 HostAdapterStatus; /// /// The status returned by the device specified by Target and Lun /// when the SCSI Request Packet was executed. /// - UINT8 TargetStatus; + UINT8 TargetStatus; /// /// On input, the length in bytes of the SenseData buffer. On /// output, the number of bytes written to the SenseData buffer. /// - UINT8 SenseDataLength; + UINT8 SenseDataLength; } EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET; /** @@ -373,16 +373,16 @@ struct _EFI_EXT_SCSI_PASS_THRU_PROTOCOL { /// /// A pointer to the EFI_EXT_SCSI_PASS_THRU_MODE data for this SCSI channel. /// - EFI_EXT_SCSI_PASS_THRU_MODE *Mode; - EFI_EXT_SCSI_PASS_THRU_PASSTHRU PassThru; - EFI_EXT_SCSI_PASS_THRU_GET_NEXT_TARGET_LUN GetNextTargetLun; - EFI_EXT_SCSI_PASS_THRU_BUILD_DEVICE_PATH BuildDevicePath; - EFI_EXT_SCSI_PASS_THRU_GET_TARGET_LUN GetTargetLun; - EFI_EXT_SCSI_PASS_THRU_RESET_CHANNEL ResetChannel; - EFI_EXT_SCSI_PASS_THRU_RESET_TARGET_LUN ResetTargetLun; - EFI_EXT_SCSI_PASS_THRU_GET_NEXT_TARGET GetNextTarget; + EFI_EXT_SCSI_PASS_THRU_MODE *Mode; + EFI_EXT_SCSI_PASS_THRU_PASSTHRU PassThru; + EFI_EXT_SCSI_PASS_THRU_GET_NEXT_TARGET_LUN GetNextTargetLun; + EFI_EXT_SCSI_PASS_THRU_BUILD_DEVICE_PATH BuildDevicePath; + EFI_EXT_SCSI_PASS_THRU_GET_TARGET_LUN GetTargetLun; + EFI_EXT_SCSI_PASS_THRU_RESET_CHANNEL ResetChannel; + EFI_EXT_SCSI_PASS_THRU_RESET_TARGET_LUN ResetTargetLun; + EFI_EXT_SCSI_PASS_THRU_GET_NEXT_TARGET GetNextTarget; }; -extern EFI_GUID gEfiExtScsiPassThruProtocolGuid; +extern EFI_GUID gEfiExtScsiPassThruProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/SdMmcPassThru.h b/MdePkg/Include/Protocol/SdMmcPassThru.h index ac5470b..1db145e 100644 --- a/MdePkg/Include/Protocol/SdMmcPassThru.h +++ b/MdePkg/Include/Protocol/SdMmcPassThru.h @@ -37,28 +37,28 @@ typedef enum { } EFI_SD_MMC_RESPONSE_TYPE; typedef struct _EFI_SD_MMC_COMMAND_BLOCK { - UINT16 CommandIndex; - UINT32 CommandArgument; - UINT32 CommandType; // One of the EFI_SD_MMC_COMMAND_TYPE values - UINT32 ResponseType; // One of the EFI_SD_MMC_RESPONSE_TYPE values + UINT16 CommandIndex; + UINT32 CommandArgument; + UINT32 CommandType; // One of the EFI_SD_MMC_COMMAND_TYPE values + UINT32 ResponseType; // One of the EFI_SD_MMC_RESPONSE_TYPE values } EFI_SD_MMC_COMMAND_BLOCK; typedef struct _EFI_SD_MMC_STATUS_BLOCK { - UINT32 Resp0; - UINT32 Resp1; - UINT32 Resp2; - UINT32 Resp3; + UINT32 Resp0; + UINT32 Resp1; + UINT32 Resp2; + UINT32 Resp3; } EFI_SD_MMC_STATUS_BLOCK; typedef struct _EFI_SD_MMC_PASS_THRU_COMMAND_PACKET { - UINT64 Timeout; - EFI_SD_MMC_COMMAND_BLOCK *SdMmcCmdBlk; - EFI_SD_MMC_STATUS_BLOCK *SdMmcStatusBlk; - VOID *InDataBuffer; - VOID *OutDataBuffer; - UINT32 InTransferLength; - UINT32 OutTransferLength; - EFI_STATUS TransactionStatus; + UINT64 Timeout; + EFI_SD_MMC_COMMAND_BLOCK *SdMmcCmdBlk; + EFI_SD_MMC_STATUS_BLOCK *SdMmcStatusBlk; + VOID *InDataBuffer; + VOID *OutDataBuffer; + UINT32 InTransferLength; + UINT32 OutTransferLength; + EFI_STATUS TransactionStatus; } EFI_SD_MMC_PASS_THRU_COMMAND_PACKET; /** @@ -100,12 +100,12 @@ typedef struct _EFI_SD_MMC_PASS_THRU_COMMAND_PACKET { **/ typedef EFI_STATUS -(EFIAPI *EFI_SD_MMC_PASS_THRU_PASSTHRU) ( +(EFIAPI *EFI_SD_MMC_PASS_THRU_PASSTHRU)( IN EFI_SD_MMC_PASS_THRU_PROTOCOL *This, IN UINT8 Slot, IN OUT EFI_SD_MMC_PASS_THRU_COMMAND_PACKET *Packet, IN EFI_EVENT Event OPTIONAL -); + ); /** Used to retrieve next slot numbers supported by the SD controller. The function @@ -138,10 +138,10 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SD_MMC_PASS_THRU_GET_NEXT_SLOT) ( +(EFIAPI *EFI_SD_MMC_PASS_THRU_GET_NEXT_SLOT)( IN EFI_SD_MMC_PASS_THRU_PROTOCOL *This, IN OUT UINT8 *Slot -); + ); /** Used to allocate and build a device path node for an SD card on the SD controller. @@ -179,11 +179,11 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SD_MMC_PASS_THRU_BUILD_DEVICE_PATH) ( +(EFIAPI *EFI_SD_MMC_PASS_THRU_BUILD_DEVICE_PATH)( IN EFI_SD_MMC_PASS_THRU_PROTOCOL *This, IN UINT8 Slot, OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath -); + ); /** This function retrieves an SD card slot number based on the input device path. @@ -208,11 +208,11 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SD_MMC_PASS_THRU_GET_SLOT_NUMBER) ( +(EFIAPI *EFI_SD_MMC_PASS_THRU_GET_SLOT_NUMBER)( IN EFI_SD_MMC_PASS_THRU_PROTOCOL *This, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, OUT UINT8 *Slot -); + ); /** Resets an SD card that is connected to the SD controller. @@ -239,20 +239,20 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SD_MMC_PASS_THRU_RESET_DEVICE) ( +(EFIAPI *EFI_SD_MMC_PASS_THRU_RESET_DEVICE)( IN EFI_SD_MMC_PASS_THRU_PROTOCOL *This, IN UINT8 Slot -); + ); struct _EFI_SD_MMC_PASS_THRU_PROTOCOL { - UINT32 IoAlign; - EFI_SD_MMC_PASS_THRU_PASSTHRU PassThru; - EFI_SD_MMC_PASS_THRU_GET_NEXT_SLOT GetNextSlot; - EFI_SD_MMC_PASS_THRU_BUILD_DEVICE_PATH BuildDevicePath; - EFI_SD_MMC_PASS_THRU_GET_SLOT_NUMBER GetSlotNumber; - EFI_SD_MMC_PASS_THRU_RESET_DEVICE ResetDevice; + UINT32 IoAlign; + EFI_SD_MMC_PASS_THRU_PASSTHRU PassThru; + EFI_SD_MMC_PASS_THRU_GET_NEXT_SLOT GetNextSlot; + EFI_SD_MMC_PASS_THRU_BUILD_DEVICE_PATH BuildDevicePath; + EFI_SD_MMC_PASS_THRU_GET_SLOT_NUMBER GetSlotNumber; + EFI_SD_MMC_PASS_THRU_RESET_DEVICE ResetDevice; }; -extern EFI_GUID gEfiSdMmcPassThruProtocolGuid; +extern EFI_GUID gEfiSdMmcPassThruProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Security.h b/MdePkg/Include/Protocol/Security.h index 0df2a22..d0c1c4d 100644 --- a/MdePkg/Include/Protocol/Security.h +++ b/MdePkg/Include/Protocol/Security.h @@ -28,7 +28,7 @@ #define EFI_SECURITY_ARCH_PROTOCOL_GUID \ { 0xA46423E3, 0x4617, 0x49f1, {0xB9, 0xFF, 0xD1, 0xBF, 0xA9, 0x11, 0x58, 0x39 } } -typedef struct _EFI_SECURITY_ARCH_PROTOCOL EFI_SECURITY_ARCH_PROTOCOL; +typedef struct _EFI_SECURITY_ARCH_PROTOCOL EFI_SECURITY_ARCH_PROTOCOL; /** The EFI_SECURITY_ARCH_PROTOCOL (SAP) is used to abstract platform-specific @@ -89,9 +89,9 @@ EFI_STATUS /// attestation logging, and other exception operations. /// struct _EFI_SECURITY_ARCH_PROTOCOL { - EFI_SECURITY_FILE_AUTHENTICATION_STATE FileAuthenticationState; + EFI_SECURITY_FILE_AUTHENTICATION_STATE FileAuthenticationState; }; -extern EFI_GUID gEfiSecurityArchProtocolGuid; +extern EFI_GUID gEfiSecurityArchProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Security2.h b/MdePkg/Include/Protocol/Security2.h index 1fdc1d9..fd38f2c 100644 --- a/MdePkg/Include/Protocol/Security2.h +++ b/MdePkg/Include/Protocol/Security2.h @@ -31,7 +31,7 @@ #define EFI_SECURITY2_ARCH_PROTOCOL_GUID \ { 0x94ab2f58, 0x1438, 0x4ef1, {0x91, 0x52, 0x18, 0x94, 0x1a, 0x3a, 0x0e, 0x68 } } -typedef struct _EFI_SECURITY2_ARCH_PROTOCOL EFI_SECURITY2_ARCH_PROTOCOL; +typedef struct _EFI_SECURITY2_ARCH_PROTOCOL EFI_SECURITY2_ARCH_PROTOCOL; /** The DXE Foundation uses this service to measure and/or verify a UEFI image. @@ -78,13 +78,13 @@ typedef struct _EFI_SECURITY2_ARCH_PROTOCOL EFI_SECURITY2_ARCH_PROTOCOL; drivers from the device path specified by DevicePath. The image has been added into the list of the deferred images. **/ -typedef EFI_STATUS (EFIAPI *EFI_SECURITY2_FILE_AUTHENTICATION) ( +typedef EFI_STATUS (EFIAPI *EFI_SECURITY2_FILE_AUTHENTICATION)( IN CONST EFI_SECURITY2_ARCH_PROTOCOL *This, IN CONST EFI_DEVICE_PATH_PROTOCOL *File OPTIONAL, IN VOID *FileBuffer, IN UINTN FileSize, IN BOOLEAN BootPolicy -); + ); /// /// The EFI_SECURITY2_ARCH_PROTOCOL is used to abstract platform-specific policy from the @@ -93,9 +93,9 @@ typedef EFI_STATUS (EFIAPI *EFI_SECURITY2_FILE_AUTHENTICATION) ( /// or registered hashes). /// struct _EFI_SECURITY2_ARCH_PROTOCOL { - EFI_SECURITY2_FILE_AUTHENTICATION FileAuthentication; + EFI_SECURITY2_FILE_AUTHENTICATION FileAuthentication; }; -extern EFI_GUID gEfiSecurity2ArchProtocolGuid; +extern EFI_GUID gEfiSecurity2ArchProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/SecurityPolicy.h b/MdePkg/Include/Protocol/SecurityPolicy.h index 9f6b525..99a49bf 100644 --- a/MdePkg/Include/Protocol/SecurityPolicy.h +++ b/MdePkg/Include/Protocol/SecurityPolicy.h @@ -15,6 +15,6 @@ #define EFI_SECURITY_POLICY_PROTOCOL_GUID \ {0x78E4D245, 0xCD4D, 0x4a05, {0xA2, 0xBA, 0x47, 0x43, 0xE8, 0x6C, 0xFC, 0xAB} } -extern EFI_GUID gEfiSecurityPolicyProtocolGuid; +extern EFI_GUID gEfiSecurityPolicyProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/SerialIo.h b/MdePkg/Include/Protocol/SerialIo.h index 16a865b..30a2260 100644 --- a/MdePkg/Include/Protocol/SerialIo.h +++ b/MdePkg/Include/Protocol/SerialIo.h @@ -29,11 +29,10 @@ typedef struct _EFI_SERIAL_IO_PROTOCOL EFI_SERIAL_IO_PROTOCOL; - /// /// Backward-compatible with EFI1.1. /// -typedef EFI_SERIAL_IO_PROTOCOL SERIAL_IO_INTERFACE; +typedef EFI_SERIAL_IO_PROTOCOL SERIAL_IO_INTERFACE; /// /// Parity type that is computed or checked as each character is transmitted or received. If the @@ -80,13 +79,14 @@ typedef enum { // // Read Write // -#define EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE 0x00001000 -#define EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE 0x00002000 -#define EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE 0x00004000 +#define EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE 0x00001000 +#define EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE 0x00002000 +#define EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE 0x00004000 // // Serial IO Member Functions // + /** Reset the serial device. @@ -254,22 +254,22 @@ EFI_STATUS **/ typedef struct { - UINT32 ControlMask; + UINT32 ControlMask; // // current Attributes // - UINT32 Timeout; - UINT64 BaudRate; - UINT32 ReceiveFifoDepth; - UINT32 DataBits; - UINT32 Parity; - UINT32 StopBits; + UINT32 Timeout; + UINT64 BaudRate; + UINT32 ReceiveFifoDepth; + UINT32 DataBits; + UINT32 Parity; + UINT32 StopBits; } EFI_SERIAL_IO_MODE; -#define EFI_SERIAL_IO_PROTOCOL_REVISION 0x00010000 -#define EFI_SERIAL_IO_PROTOCOL_REVISION1p1 0x00010001 -#define SERIAL_IO_INTERFACE_REVISION EFI_SERIAL_IO_PROTOCOL_REVISION +#define EFI_SERIAL_IO_PROTOCOL_REVISION 0x00010000 +#define EFI_SERIAL_IO_PROTOCOL_REVISION1p1 0x00010001 +#define SERIAL_IO_INTERFACE_REVISION EFI_SERIAL_IO_PROTOCOL_REVISION /// /// The Serial I/O protocol is used to communicate with UART-style serial devices. @@ -282,17 +282,17 @@ struct _EFI_SERIAL_IO_PROTOCOL { /// must be backwards compatible. If a future version is not backwards compatible, /// it is not the same GUID. /// - UINT32 Revision; - EFI_SERIAL_RESET Reset; - EFI_SERIAL_SET_ATTRIBUTES SetAttributes; - EFI_SERIAL_SET_CONTROL_BITS SetControl; - EFI_SERIAL_GET_CONTROL_BITS GetControl; - EFI_SERIAL_WRITE Write; - EFI_SERIAL_READ Read; + UINT32 Revision; + EFI_SERIAL_RESET Reset; + EFI_SERIAL_SET_ATTRIBUTES SetAttributes; + EFI_SERIAL_SET_CONTROL_BITS SetControl; + EFI_SERIAL_GET_CONTROL_BITS GetControl; + EFI_SERIAL_WRITE Write; + EFI_SERIAL_READ Read; /// /// Pointer to SERIAL_IO_MODE data. /// - EFI_SERIAL_IO_MODE *Mode; + EFI_SERIAL_IO_MODE *Mode; /// /// Pointer to a GUID identifying the device connected to the serial port. /// This field is NULL when the protocol is installed by the serial port @@ -300,10 +300,10 @@ struct _EFI_SERIAL_IO_PROTOCOL { /// with a known device attached. The field will remain NULL if there is /// no platform serial device identification information available. /// - CONST EFI_GUID *DeviceTypeGuid; // Revision 1.1 + CONST EFI_GUID *DeviceTypeGuid; // Revision 1.1 }; -extern EFI_GUID gEfiSerialIoProtocolGuid; -extern EFI_GUID gEfiSerialTerminalDeviceTypeGuid; +extern EFI_GUID gEfiSerialIoProtocolGuid; +extern EFI_GUID gEfiSerialTerminalDeviceTypeGuid; #endif diff --git a/MdePkg/Include/Protocol/ServiceBinding.h b/MdePkg/Include/Protocol/ServiceBinding.h index 92047f7..b39af73 100644 --- a/MdePkg/Include/Protocol/ServiceBinding.h +++ b/MdePkg/Include/Protocol/ServiceBinding.h @@ -81,8 +81,8 @@ EFI_STATUS /// protocol and calling DestroyChild() when it is finished with that protocol. /// struct _EFI_SERVICE_BINDING_PROTOCOL { - EFI_SERVICE_BINDING_CREATE_CHILD CreateChild; - EFI_SERVICE_BINDING_DESTROY_CHILD DestroyChild; + EFI_SERVICE_BINDING_CREATE_CHILD CreateChild; + EFI_SERVICE_BINDING_DESTROY_CHILD DestroyChild; }; #endif diff --git a/MdePkg/Include/Protocol/Shell.h b/MdePkg/Include/Protocol/Shell.h index cfb7878..5efee49 100644 --- a/MdePkg/Include/Protocol/Shell.h +++ b/MdePkg/Include/Protocol/Shell.h @@ -22,110 +22,110 @@ typedef enum { /// /// The operation completed successfully. /// - SHELL_SUCCESS = 0, + SHELL_SUCCESS = 0, /// /// The image failed to load. /// - SHELL_LOAD_ERROR = 1, + SHELL_LOAD_ERROR = 1, /// /// The parameter was incorrect. /// - SHELL_INVALID_PARAMETER = 2, + SHELL_INVALID_PARAMETER = 2, /// /// The operation is not supported. /// - SHELL_UNSUPPORTED = 3, + SHELL_UNSUPPORTED = 3, /// /// The buffer was not the proper size for the request. /// - SHELL_BAD_BUFFER_SIZE = 4, + SHELL_BAD_BUFFER_SIZE = 4, /// /// The buffer was not large enough to hold the requested data. /// The required buffer size is returned in the appropriate /// parameter when this error occurs. /// - SHELL_BUFFER_TOO_SMALL = 5, + SHELL_BUFFER_TOO_SMALL = 5, /// /// There is no data pending upon return. /// - SHELL_NOT_READY = 6, + SHELL_NOT_READY = 6, /// /// The physical device reported an error while attempting the /// operation. /// - SHELL_DEVICE_ERROR = 7, + SHELL_DEVICE_ERROR = 7, /// /// The device cannot be written to. /// - SHELL_WRITE_PROTECTED = 8, + SHELL_WRITE_PROTECTED = 8, /// /// The resource has run out. /// - SHELL_OUT_OF_RESOURCES = 9, + SHELL_OUT_OF_RESOURCES = 9, /// /// An inconsistency was detected on the file system causing the /// operation to fail. /// - SHELL_VOLUME_CORRUPTED = 10, + SHELL_VOLUME_CORRUPTED = 10, /// /// There is no more space on the file system. /// - SHELL_VOLUME_FULL = 11, + SHELL_VOLUME_FULL = 11, /// /// The device does not contain any medium to perform the /// operation. /// - SHELL_NO_MEDIA = 12, + SHELL_NO_MEDIA = 12, /// /// The medium in the device has changed since the last /// access. /// - SHELL_MEDIA_CHANGED = 13, + SHELL_MEDIA_CHANGED = 13, /// /// The item was not found. /// - SHELL_NOT_FOUND = 14, + SHELL_NOT_FOUND = 14, /// /// Access was denied. /// - SHELL_ACCESS_DENIED = 15, + SHELL_ACCESS_DENIED = 15, // note the skipping of 16 and 17 /// /// A timeout time expired. /// - SHELL_TIMEOUT = 18, + SHELL_TIMEOUT = 18, /// /// The protocol has not been started. /// - SHELL_NOT_STARTED = 19, + SHELL_NOT_STARTED = 19, /// /// The protocol has already been started. /// - SHELL_ALREADY_STARTED = 20, + SHELL_ALREADY_STARTED = 20, /// /// The operation was aborted. /// - SHELL_ABORTED = 21, + SHELL_ABORTED = 21, // note the skipping of 22, 23, and 24 @@ -133,30 +133,29 @@ typedef enum { /// A function encountered an internal version that was /// incompatible with a version requested by the caller. /// - SHELL_INCOMPATIBLE_VERSION = 25, + SHELL_INCOMPATIBLE_VERSION = 25, /// /// The function was not performed due to a security violation. /// - SHELL_SECURITY_VIOLATION = 26, + SHELL_SECURITY_VIOLATION = 26, /// /// The function was performed and resulted in an unequal /// comparison.. /// - SHELL_NOT_EQUAL = 27 + SHELL_NOT_EQUAL = 27 } SHELL_STATUS; - // replaced EFI_LIST_ENTRY with LIST_ENTRY for simplicity. // they are identical outside of the name. typedef struct { - LIST_ENTRY Link; ///< Linked list members. - EFI_STATUS Status; ///< Status of opening the file. Valid only if Handle != NULL. - CONST CHAR16 *FullName; ///< Fully qualified filename. - CONST CHAR16 *FileName; ///< name of this file. - SHELL_FILE_HANDLE Handle; ///< Handle for interacting with the opened file or NULL if closed. - EFI_FILE_INFO *Info; ///< Pointer to the FileInfo struct for this file or NULL. + LIST_ENTRY Link; ///< Linked list members. + EFI_STATUS Status; ///< Status of opening the file. Valid only if Handle != NULL. + CONST CHAR16 *FullName; ///< Fully qualified filename. + CONST CHAR16 *FileName; ///< name of this file. + SHELL_FILE_HANDLE Handle; ///< Handle for interacting with the opened file or NULL if closed. + EFI_FILE_INFO *Info; ///< Pointer to the FileInfo struct for this file or NULL. } EFI_SHELL_FILE_INFO; /** @@ -168,7 +167,7 @@ typedef struct { **/ typedef BOOLEAN -(EFIAPI *EFI_SHELL_BATCH_IS_ACTIVE) ( +(EFIAPI *EFI_SHELL_BATCH_IS_ACTIVE)( VOID ); @@ -272,7 +271,7 @@ EFI_STATUS **/ typedef VOID -(EFIAPI *EFI_SHELL_DISABLE_PAGE_BREAK) ( +(EFIAPI *EFI_SHELL_DISABLE_PAGE_BREAK)( VOID ); @@ -281,7 +280,7 @@ VOID **/ typedef VOID -(EFIAPI *EFI_SHELL_ENABLE_PAGE_BREAK) ( +(EFIAPI *EFI_SHELL_ENABLE_PAGE_BREAK)( VOID ); @@ -318,7 +317,7 @@ VOID **/ typedef EFI_STATUS -(EFIAPI *EFI_SHELL_EXECUTE) ( +(EFIAPI *EFI_SHELL_EXECUTE)( IN EFI_HANDLE *ParentImageHandle, IN CHAR16 *CommandLine OPTIONAL, IN CHAR16 **Environment OPTIONAL, @@ -368,9 +367,9 @@ EFI_STATUS typedef EFI_STATUS (EFIAPI *EFI_SHELL_FIND_FILES_IN_DIR)( -IN SHELL_FILE_HANDLE FileDirHandle, -OUT EFI_SHELL_FILE_INFO **FileList -); + IN SHELL_FILE_HANDLE FileDirHandle, + OUT EFI_SHELL_FILE_INFO **FileList + ); /** Flushes data back to a device. @@ -406,7 +405,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SHELL_FREE_FILE_LIST) ( +(EFIAPI *EFI_SHELL_FREE_FILE_LIST)( IN EFI_SHELL_FILE_INFO **FileList ); @@ -428,7 +427,7 @@ EFI_STATUS **/ typedef CONST CHAR16 * -(EFIAPI *EFI_SHELL_GET_CUR_DIR) ( +(EFIAPI *EFI_SHELL_GET_CUR_DIR)( IN CONST CHAR16 *FileSystemMapping OPTIONAL ); @@ -468,7 +467,7 @@ typedef UINT32 EFI_SHELL_DEVICE_NAME_FLAGS; **/ typedef EFI_STATUS -(EFIAPI *EFI_SHELL_GET_DEVICE_NAME) ( +(EFIAPI *EFI_SHELL_GET_DEVICE_NAME)( IN EFI_HANDLE DeviceHandle, IN EFI_SHELL_DEVICE_NAME_FLAGS Flags, IN CHAR8 *Language, @@ -490,7 +489,7 @@ EFI_STATUS **/ typedef CONST EFI_DEVICE_PATH_PROTOCOL * -(EFIAPI *EFI_SHELL_GET_DEVICE_PATH_FROM_MAP) ( +(EFIAPI *EFI_SHELL_GET_DEVICE_PATH_FROM_MAP)( IN CONST CHAR16 *Mapping ); @@ -507,7 +506,7 @@ CONST EFI_DEVICE_PATH_PROTOCOL * **/ typedef EFI_DEVICE_PATH_PROTOCOL * -(EFIAPI *EFI_SHELL_GET_DEVICE_PATH_FROM_FILE_PATH) ( +(EFIAPI *EFI_SHELL_GET_DEVICE_PATH_FROM_FILE_PATH)( IN CONST CHAR16 *Path ); @@ -536,7 +535,7 @@ EFI_DEVICE_PATH_PROTOCOL * **/ typedef CONST CHAR16 * -(EFIAPI *EFI_SHELL_GET_ENV) ( +(EFIAPI *EFI_SHELL_GET_ENV)( IN CONST CHAR16 *Name OPTIONAL ); @@ -564,7 +563,7 @@ CONST CHAR16 * **/ typedef CONST CHAR16 * -(EFIAPI *EFI_SHELL_GET_ENV_EX) ( +(EFIAPI *EFI_SHELL_GET_ENV_EX)( IN CONST CHAR16 *Name, OUT UINT32 *Attributes OPTIONAL ); @@ -600,7 +599,7 @@ EFI_FILE_INFO * **/ typedef CHAR16 * -(EFIAPI *EFI_SHELL_GET_FILE_PATH_FROM_DEVICE_PATH) ( +(EFIAPI *EFI_SHELL_GET_FILE_PATH_FROM_DEVICE_PATH)( IN CONST EFI_DEVICE_PATH_PROTOCOL *Path ); @@ -717,7 +716,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SHELL_GET_HELP_TEXT) ( +(EFIAPI *EFI_SHELL_GET_HELP_TEXT)( IN CONST CHAR16 *Command, IN CONST CHAR16 *Sections OPTIONAL, OUT CHAR16 **HelpText @@ -745,7 +744,7 @@ EFI_STATUS **/ typedef CONST CHAR16 * -(EFIAPI *EFI_SHELL_GET_MAP_FROM_DEVICE_PATH) ( +(EFIAPI *EFI_SHELL_GET_MAP_FROM_DEVICE_PATH)( IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath ); @@ -759,7 +758,7 @@ CONST CHAR16 * **/ typedef BOOLEAN -(EFIAPI *EFI_SHELL_GET_PAGE_BREAK) ( +(EFIAPI *EFI_SHELL_GET_PAGE_BREAK)( VOID ); @@ -773,9 +772,9 @@ BOOLEAN **/ typedef BOOLEAN -(EFIAPI *EFI_SHELL_IS_ROOT_SHELL) ( -VOID -); +(EFIAPI *EFI_SHELL_IS_ROOT_SHELL)( + VOID + ); /** Opens a file or a directory by file name. @@ -831,7 +830,7 @@ VOID **/ typedef EFI_STATUS -(EFIAPI *EFI_SHELL_OPEN_FILE_BY_NAME) ( +(EFIAPI *EFI_SHELL_OPEN_FILE_BY_NAME)( IN CONST CHAR16 *FileName, OUT SHELL_FILE_HANDLE *FileHandle, IN UINT64 OpenMode @@ -854,7 +853,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SHELL_OPEN_FILE_LIST) ( +(EFIAPI *EFI_SHELL_OPEN_FILE_LIST)( IN CHAR16 *Path, IN UINT64 OpenMode, IN OUT EFI_SHELL_FILE_INFO **FileList @@ -926,7 +925,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SHELL_READ_FILE) ( +(EFIAPI *EFI_SHELL_READ_FILE)( IN SHELL_FILE_HANDLE FileHandle, IN OUT UINTN *ReadSize, IN OUT VOID *Buffer @@ -965,7 +964,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SHELL_REMOVE_DUP_IN_FILE_LIST) ( +(EFIAPI *EFI_SHELL_REMOVE_DUP_IN_FILE_LIST)( IN EFI_SHELL_FILE_INFO **FileList ); @@ -1046,7 +1045,7 @@ CONST CHAR16 * **/ typedef EFI_STATUS -(EFIAPI *EFI_SHELL_SET_CUR_DIR) ( +(EFIAPI *EFI_SHELL_SET_CUR_DIR)( IN CONST CHAR16 *FileSystem OPTIONAL, IN CONST CHAR16 *Dir ); @@ -1074,7 +1073,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SHELL_SET_ENV) ( +(EFIAPI *EFI_SHELL_SET_ENV)( IN CONST CHAR16 *Name, IN CONST CHAR16 *Value, IN BOOLEAN Volatile @@ -1203,56 +1202,56 @@ EFI_STATUS // } // typedef struct _EFI_SHELL_PROTOCOL { - EFI_SHELL_EXECUTE Execute; - EFI_SHELL_GET_ENV GetEnv; - EFI_SHELL_SET_ENV SetEnv; - EFI_SHELL_GET_ALIAS GetAlias; - EFI_SHELL_SET_ALIAS SetAlias; - EFI_SHELL_GET_HELP_TEXT GetHelpText; - EFI_SHELL_GET_DEVICE_PATH_FROM_MAP GetDevicePathFromMap; - EFI_SHELL_GET_MAP_FROM_DEVICE_PATH GetMapFromDevicePath; - EFI_SHELL_GET_DEVICE_PATH_FROM_FILE_PATH GetDevicePathFromFilePath; - EFI_SHELL_GET_FILE_PATH_FROM_DEVICE_PATH GetFilePathFromDevicePath; - EFI_SHELL_SET_MAP SetMap; - EFI_SHELL_GET_CUR_DIR GetCurDir; - EFI_SHELL_SET_CUR_DIR SetCurDir; - EFI_SHELL_OPEN_FILE_LIST OpenFileList; - EFI_SHELL_FREE_FILE_LIST FreeFileList; - EFI_SHELL_REMOVE_DUP_IN_FILE_LIST RemoveDupInFileList; - EFI_SHELL_BATCH_IS_ACTIVE BatchIsActive; - EFI_SHELL_IS_ROOT_SHELL IsRootShell; - EFI_SHELL_ENABLE_PAGE_BREAK EnablePageBreak; - EFI_SHELL_DISABLE_PAGE_BREAK DisablePageBreak; - EFI_SHELL_GET_PAGE_BREAK GetPageBreak; - EFI_SHELL_GET_DEVICE_NAME GetDeviceName; - EFI_SHELL_GET_FILE_INFO GetFileInfo; - EFI_SHELL_SET_FILE_INFO SetFileInfo; - EFI_SHELL_OPEN_FILE_BY_NAME OpenFileByName; - EFI_SHELL_CLOSE_FILE CloseFile; - EFI_SHELL_CREATE_FILE CreateFile; - EFI_SHELL_READ_FILE ReadFile; - EFI_SHELL_WRITE_FILE WriteFile; - EFI_SHELL_DELETE_FILE DeleteFile; - EFI_SHELL_DELETE_FILE_BY_NAME DeleteFileByName; - EFI_SHELL_GET_FILE_POSITION GetFilePosition; - EFI_SHELL_SET_FILE_POSITION SetFilePosition; - EFI_SHELL_FLUSH_FILE FlushFile; - EFI_SHELL_FIND_FILES FindFiles; - EFI_SHELL_FIND_FILES_IN_DIR FindFilesInDir; - EFI_SHELL_GET_FILE_SIZE GetFileSize; - EFI_SHELL_OPEN_ROOT OpenRoot; - EFI_SHELL_OPEN_ROOT_BY_HANDLE OpenRootByHandle; - EFI_EVENT ExecutionBreak; - UINT32 MajorVersion; - UINT32 MinorVersion; + EFI_SHELL_EXECUTE Execute; + EFI_SHELL_GET_ENV GetEnv; + EFI_SHELL_SET_ENV SetEnv; + EFI_SHELL_GET_ALIAS GetAlias; + EFI_SHELL_SET_ALIAS SetAlias; + EFI_SHELL_GET_HELP_TEXT GetHelpText; + EFI_SHELL_GET_DEVICE_PATH_FROM_MAP GetDevicePathFromMap; + EFI_SHELL_GET_MAP_FROM_DEVICE_PATH GetMapFromDevicePath; + EFI_SHELL_GET_DEVICE_PATH_FROM_FILE_PATH GetDevicePathFromFilePath; + EFI_SHELL_GET_FILE_PATH_FROM_DEVICE_PATH GetFilePathFromDevicePath; + EFI_SHELL_SET_MAP SetMap; + EFI_SHELL_GET_CUR_DIR GetCurDir; + EFI_SHELL_SET_CUR_DIR SetCurDir; + EFI_SHELL_OPEN_FILE_LIST OpenFileList; + EFI_SHELL_FREE_FILE_LIST FreeFileList; + EFI_SHELL_REMOVE_DUP_IN_FILE_LIST RemoveDupInFileList; + EFI_SHELL_BATCH_IS_ACTIVE BatchIsActive; + EFI_SHELL_IS_ROOT_SHELL IsRootShell; + EFI_SHELL_ENABLE_PAGE_BREAK EnablePageBreak; + EFI_SHELL_DISABLE_PAGE_BREAK DisablePageBreak; + EFI_SHELL_GET_PAGE_BREAK GetPageBreak; + EFI_SHELL_GET_DEVICE_NAME GetDeviceName; + EFI_SHELL_GET_FILE_INFO GetFileInfo; + EFI_SHELL_SET_FILE_INFO SetFileInfo; + EFI_SHELL_OPEN_FILE_BY_NAME OpenFileByName; + EFI_SHELL_CLOSE_FILE CloseFile; + EFI_SHELL_CREATE_FILE CreateFile; + EFI_SHELL_READ_FILE ReadFile; + EFI_SHELL_WRITE_FILE WriteFile; + EFI_SHELL_DELETE_FILE DeleteFile; + EFI_SHELL_DELETE_FILE_BY_NAME DeleteFileByName; + EFI_SHELL_GET_FILE_POSITION GetFilePosition; + EFI_SHELL_SET_FILE_POSITION SetFilePosition; + EFI_SHELL_FLUSH_FILE FlushFile; + EFI_SHELL_FIND_FILES FindFiles; + EFI_SHELL_FIND_FILES_IN_DIR FindFilesInDir; + EFI_SHELL_GET_FILE_SIZE GetFileSize; + EFI_SHELL_OPEN_ROOT OpenRoot; + EFI_SHELL_OPEN_ROOT_BY_HANDLE OpenRootByHandle; + EFI_EVENT ExecutionBreak; + UINT32 MajorVersion; + UINT32 MinorVersion; // Added for Shell 2.1 - EFI_SHELL_REGISTER_GUID_NAME RegisterGuidName; - EFI_SHELL_GET_GUID_NAME GetGuidName; - EFI_SHELL_GET_GUID_FROM_NAME GetGuidFromName; - EFI_SHELL_GET_ENV_EX GetEnvEx; + EFI_SHELL_REGISTER_GUID_NAME RegisterGuidName; + EFI_SHELL_GET_GUID_NAME GetGuidName; + EFI_SHELL_GET_GUID_FROM_NAME GetGuidFromName; + EFI_SHELL_GET_ENV_EX GetEnvEx; } EFI_SHELL_PROTOCOL; -extern EFI_GUID gEfiShellProtocolGuid; +extern EFI_GUID gEfiShellProtocolGuid; enum ShellVersion { SHELL_MAJOR_VERSION = 2, diff --git a/MdePkg/Include/Protocol/ShellDynamicCommand.h b/MdePkg/Include/Protocol/ShellDynamicCommand.h index 7ab3104..f1bb59d 100644 --- a/MdePkg/Include/Protocol/ShellDynamicCommand.h +++ b/MdePkg/Include/Protocol/ShellDynamicCommand.h @@ -19,13 +19,11 @@ 0x3c7200e9, 0x005f, 0x4ea4, { 0x87, 0xde, 0xa3, 0xdf, 0xac, 0x8a, 0x27, 0xc3 } \ } - // // Define for forward reference. // typedef struct _EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL; - /** This is the shell command handler function pointer callback type. This function handles the command when it is invoked in the shell. @@ -41,7 +39,7 @@ typedef struct _EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL EFI_SHELL_DYNAMIC_COMMAND_PRO **/ typedef SHELL_STATUS -(EFIAPI * SHELL_COMMAND_HANDLER)( +(EFIAPI *SHELL_COMMAND_HANDLER)( IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL *This, IN EFI_SYSTEM_TABLE *SystemTable, IN EFI_SHELL_PARAMETERS_PROTOCOL *ShellParameters, @@ -59,21 +57,19 @@ SHELL_STATUS @return string Pool allocated help string, must be freed by caller **/ typedef -CHAR16* -(EFIAPI * SHELL_COMMAND_GETHELP)( +CHAR16 * +(EFIAPI *SHELL_COMMAND_GETHELP)( IN EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL *This, IN CONST CHAR8 *Language ); /// EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL protocol structure. struct _EFI_SHELL_DYNAMIC_COMMAND_PROTOCOL { - - CONST CHAR16 *CommandName; - SHELL_COMMAND_HANDLER Handler; - SHELL_COMMAND_GETHELP GetHelp; - + CONST CHAR16 *CommandName; + SHELL_COMMAND_HANDLER Handler; + SHELL_COMMAND_GETHELP GetHelp; }; -extern EFI_GUID gEfiShellDynamicCommandProtocolGuid; +extern EFI_GUID gEfiShellDynamicCommandProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/ShellParameters.h b/MdePkg/Include/Protocol/ShellParameters.h index 1f939bd..847e1a1 100644 --- a/MdePkg/Include/Protocol/ShellParameters.h +++ b/MdePkg/Include/Protocol/ShellParameters.h @@ -23,32 +23,32 @@ typedef struct _EFI_SHELL_PARAMETERS_PROTOCOL { /// path of the executable. Any quotation marks that were used to preserve /// whitespace have been removed. /// - CHAR16 **Argv; + CHAR16 **Argv; /// /// The number of elements in the Argv array. /// - UINTN Argc; + UINTN Argc; /// /// The file handle for the standard input for this executable. This may be different /// from the ConInHandle in EFI_SYSTEM_TABLE. /// - SHELL_FILE_HANDLE StdIn; + SHELL_FILE_HANDLE StdIn; /// /// The file handle for the standard output for this executable. This may be different /// from the ConOutHandle in EFI_SYSTEM_TABLE. /// - SHELL_FILE_HANDLE StdOut; + SHELL_FILE_HANDLE StdOut; /// /// The file handle for the standard error output for this executable. This may be /// different from the StdErrHandle in EFI_SYSTEM_TABLE. /// - SHELL_FILE_HANDLE StdErr; + SHELL_FILE_HANDLE StdErr; } EFI_SHELL_PARAMETERS_PROTOCOL; -extern EFI_GUID gEfiShellParametersProtocolGuid; +extern EFI_GUID gEfiShellParametersProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/SimpleFileSystem.h b/MdePkg/Include/Protocol/SimpleFileSystem.h index 38d54db..5c28ae7 100644 --- a/MdePkg/Include/Protocol/SimpleFileSystem.h +++ b/MdePkg/Include/Protocol/SimpleFileSystem.h @@ -20,21 +20,21 @@ SPDX-License-Identifier: BSD-2-Clause-Patent 0x964e5b22, 0x6459, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \ } -typedef struct _EFI_SIMPLE_FILE_SYSTEM_PROTOCOL EFI_SIMPLE_FILE_SYSTEM_PROTOCOL; +typedef struct _EFI_SIMPLE_FILE_SYSTEM_PROTOCOL EFI_SIMPLE_FILE_SYSTEM_PROTOCOL; -typedef struct _EFI_FILE_PROTOCOL EFI_FILE_PROTOCOL; -typedef struct _EFI_FILE_PROTOCOL *EFI_FILE_HANDLE; +typedef struct _EFI_FILE_PROTOCOL EFI_FILE_PROTOCOL; +typedef struct _EFI_FILE_PROTOCOL *EFI_FILE_HANDLE; /// /// Protocol GUID name defined in EFI1.1. /// -#define SIMPLE_FILE_SYSTEM_PROTOCOL EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID +#define SIMPLE_FILE_SYSTEM_PROTOCOL EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID /// /// Protocol name defined in EFI1.1. /// -typedef EFI_SIMPLE_FILE_SYSTEM_PROTOCOL EFI_FILE_IO_INTERFACE; -typedef EFI_FILE_PROTOCOL EFI_FILE; +typedef EFI_SIMPLE_FILE_SYSTEM_PROTOCOL EFI_FILE_IO_INTERFACE; +typedef EFI_FILE_PROTOCOL EFI_FILE; /** Open the root directory on a volume. @@ -76,8 +76,8 @@ struct _EFI_SIMPLE_FILE_SYSTEM_PROTOCOL { /// specified by this specification is 0x00010000. All future revisions /// must be backwards compatible. /// - UINT64 Revision; - EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_OPEN_VOLUME OpenVolume; + UINT64 Revision; + EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_OPEN_VOLUME OpenVolume; }; /** @@ -130,13 +130,13 @@ EFI_STATUS // // File attributes // -#define EFI_FILE_READ_ONLY 0x0000000000000001ULL -#define EFI_FILE_HIDDEN 0x0000000000000002ULL -#define EFI_FILE_SYSTEM 0x0000000000000004ULL -#define EFI_FILE_RESERVED 0x0000000000000008ULL -#define EFI_FILE_DIRECTORY 0x0000000000000010ULL -#define EFI_FILE_ARCHIVE 0x0000000000000020ULL -#define EFI_FILE_VALID_ATTR 0x0000000000000037ULL +#define EFI_FILE_READ_ONLY 0x0000000000000001ULL +#define EFI_FILE_HIDDEN 0x0000000000000002ULL +#define EFI_FILE_SYSTEM 0x0000000000000004ULL +#define EFI_FILE_RESERVED 0x0000000000000008ULL +#define EFI_FILE_DIRECTORY 0x0000000000000010ULL +#define EFI_FILE_ARCHIVE 0x0000000000000020ULL +#define EFI_FILE_VALID_ATTR 0x0000000000000037ULL /** Closes a specified file handle. @@ -365,12 +365,12 @@ typedef struct { // The caller must be prepared to handle the case where the callback associated with Event // occurs before the original asynchronous I/O request call returns. // - EFI_EVENT Event; + EFI_EVENT Event; // // Defines whether or not the signaled event encountered an error. // - EFI_STATUS Status; + EFI_STATUS Status; // // For OpenEx(): Not Used, ignored. @@ -380,7 +380,7 @@ typedef struct { // In both cases, the size is measured in bytes. // For FlushEx(): Not used, ignored. // - UINTN BufferSize; + UINTN BufferSize; // // For OpenEx(): Not Used, ignored. @@ -388,7 +388,7 @@ typedef struct { // For WriteEx(): The buffer of data to write. // For FlushEx(): Not Used, ignored. // - VOID *Buffer; + VOID *Buffer; } EFI_FILE_IO_TOKEN; /** @@ -434,7 +434,6 @@ EFI_STATUS IN OUT EFI_FILE_IO_TOKEN *Token ); - /** Reads data from a file. @@ -453,11 +452,10 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_FILE_READ_EX) ( +(EFIAPI *EFI_FILE_READ_EX)( IN EFI_FILE_PROTOCOL *This, IN OUT EFI_FILE_IO_TOKEN *Token -); - + ); /** Writes data to a file. @@ -480,10 +478,10 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_FILE_WRITE_EX) ( +(EFIAPI *EFI_FILE_WRITE_EX)( IN EFI_FILE_PROTOCOL *This, IN OUT EFI_FILE_IO_TOKEN *Token -); + ); /** Flushes all modified data associated with a file to a device. @@ -506,19 +504,19 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_FILE_FLUSH_EX) ( +(EFIAPI *EFI_FILE_FLUSH_EX)( IN EFI_FILE_PROTOCOL *This, IN OUT EFI_FILE_IO_TOKEN *Token ); -#define EFI_FILE_PROTOCOL_REVISION 0x00010000 -#define EFI_FILE_PROTOCOL_REVISION2 0x00020000 -#define EFI_FILE_PROTOCOL_LATEST_REVISION EFI_FILE_PROTOCOL_REVISION2 +#define EFI_FILE_PROTOCOL_REVISION 0x00010000 +#define EFI_FILE_PROTOCOL_REVISION2 0x00020000 +#define EFI_FILE_PROTOCOL_LATEST_REVISION EFI_FILE_PROTOCOL_REVISION2 // // Revision defined in EFI1.1. // -#define EFI_FILE_REVISION EFI_FILE_PROTOCOL_REVISION +#define EFI_FILE_REVISION EFI_FILE_PROTOCOL_REVISION /// /// The EFI_FILE_PROTOCOL provides file IO access to supported file systems. @@ -533,24 +531,23 @@ struct _EFI_FILE_PROTOCOL { /// by this specification is EFI_FILE_PROTOCOL_LATEST_REVISION. /// Future versions are required to be backward compatible to version 1.0. /// - UINT64 Revision; - EFI_FILE_OPEN Open; - EFI_FILE_CLOSE Close; - EFI_FILE_DELETE Delete; - EFI_FILE_READ Read; - EFI_FILE_WRITE Write; - EFI_FILE_GET_POSITION GetPosition; - EFI_FILE_SET_POSITION SetPosition; - EFI_FILE_GET_INFO GetInfo; - EFI_FILE_SET_INFO SetInfo; - EFI_FILE_FLUSH Flush; - EFI_FILE_OPEN_EX OpenEx; - EFI_FILE_READ_EX ReadEx; - EFI_FILE_WRITE_EX WriteEx; - EFI_FILE_FLUSH_EX FlushEx; + UINT64 Revision; + EFI_FILE_OPEN Open; + EFI_FILE_CLOSE Close; + EFI_FILE_DELETE Delete; + EFI_FILE_READ Read; + EFI_FILE_WRITE Write; + EFI_FILE_GET_POSITION GetPosition; + EFI_FILE_SET_POSITION SetPosition; + EFI_FILE_GET_INFO GetInfo; + EFI_FILE_SET_INFO SetInfo; + EFI_FILE_FLUSH Flush; + EFI_FILE_OPEN_EX OpenEx; + EFI_FILE_READ_EX ReadEx; + EFI_FILE_WRITE_EX WriteEx; + EFI_FILE_FLUSH_EX FlushEx; }; - -extern EFI_GUID gEfiSimpleFileSystemProtocolGuid; +extern EFI_GUID gEfiSimpleFileSystemProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/SimpleNetwork.h b/MdePkg/Include/Protocol/SimpleNetwork.h index 2f4ae0d..29ede24 100644 --- a/MdePkg/Include/Protocol/SimpleNetwork.h +++ b/MdePkg/Include/Protocol/SimpleNetwork.h @@ -25,13 +25,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent 0xA19832B9, 0xAC25, 0x11D3, {0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } \ } -typedef struct _EFI_SIMPLE_NETWORK_PROTOCOL EFI_SIMPLE_NETWORK_PROTOCOL; - +typedef struct _EFI_SIMPLE_NETWORK_PROTOCOL EFI_SIMPLE_NETWORK_PROTOCOL; /// /// Protocol defined in EFI1.1. /// -typedef EFI_SIMPLE_NETWORK_PROTOCOL EFI_SIMPLE_NETWORK; +typedef EFI_SIMPLE_NETWORK_PROTOCOL EFI_SIMPLE_NETWORK; /// /// Simple Network Protocol data structures. @@ -41,99 +40,99 @@ typedef struct { /// Total number of frames received. Includes frames with errors and /// dropped frames. /// - UINT64 RxTotalFrames; + UINT64 RxTotalFrames; /// /// Number of valid frames received and copied into receive buffers. /// - UINT64 RxGoodFrames; + UINT64 RxGoodFrames; /// /// Number of frames below the minimum length for the media. /// This would be <64 for ethernet. /// - UINT64 RxUndersizeFrames; + UINT64 RxUndersizeFrames; /// /// Number of frames longer than the maxminum length for the /// media. This would be >1500 for ethernet. /// - UINT64 RxOversizeFrames; + UINT64 RxOversizeFrames; /// /// Valid frames that were dropped because receive buffers were full. /// - UINT64 RxDroppedFrames; + UINT64 RxDroppedFrames; /// /// Number of valid unicast frames received and not dropped. /// - UINT64 RxUnicastFrames; + UINT64 RxUnicastFrames; /// /// Number of valid broadcast frames received and not dropped. /// - UINT64 RxBroadcastFrames; + UINT64 RxBroadcastFrames; /// /// Number of valid mutlicast frames received and not dropped. /// - UINT64 RxMulticastFrames; + UINT64 RxMulticastFrames; /// /// Number of frames w/ CRC or alignment errors. /// - UINT64 RxCrcErrorFrames; + UINT64 RxCrcErrorFrames; /// /// Total number of bytes received. Includes frames with errors /// and dropped frames. // - UINT64 RxTotalBytes; + UINT64 RxTotalBytes; /// /// Transmit statistics. /// - UINT64 TxTotalFrames; - UINT64 TxGoodFrames; - UINT64 TxUndersizeFrames; - UINT64 TxOversizeFrames; - UINT64 TxDroppedFrames; - UINT64 TxUnicastFrames; - UINT64 TxBroadcastFrames; - UINT64 TxMulticastFrames; - UINT64 TxCrcErrorFrames; - UINT64 TxTotalBytes; + UINT64 TxTotalFrames; + UINT64 TxGoodFrames; + UINT64 TxUndersizeFrames; + UINT64 TxOversizeFrames; + UINT64 TxDroppedFrames; + UINT64 TxUnicastFrames; + UINT64 TxBroadcastFrames; + UINT64 TxMulticastFrames; + UINT64 TxCrcErrorFrames; + UINT64 TxTotalBytes; /// /// Number of collisions detection on this subnet. /// - UINT64 Collisions; + UINT64 Collisions; /// /// Number of frames destined for unsupported protocol. /// - UINT64 UnsupportedProtocol; + UINT64 UnsupportedProtocol; /// /// Number of valid frames received that were duplicated. /// - UINT64 RxDuplicatedFrames; + UINT64 RxDuplicatedFrames; /// /// Number of encrypted frames received that failed to decrypt. /// - UINT64 RxDecryptErrorFrames; + UINT64 RxDecryptErrorFrames; /// /// Number of frames that failed to transmit after exceeding the retry limit. /// - UINT64 TxErrorFrames; + UINT64 TxErrorFrames; /// /// Number of frames transmitted successfully after more than one attempt. /// - UINT64 TxRetryFrames; + UINT64 TxRetryFrames; } EFI_NETWORK_STATISTICS; /// @@ -154,97 +153,98 @@ typedef enum { #define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS 0x08 #define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST 0x10 -#define EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT 0x01 -#define EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT 0x02 -#define EFI_SIMPLE_NETWORK_COMMAND_INTERRUPT 0x04 -#define EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT 0x08 +#define EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT 0x01 +#define EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT 0x02 +#define EFI_SIMPLE_NETWORK_COMMAND_INTERRUPT 0x04 +#define EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT 0x08 -#define MAX_MCAST_FILTER_CNT 16 +#define MAX_MCAST_FILTER_CNT 16 typedef struct { /// /// Reports the current state of the network interface. /// - UINT32 State; + UINT32 State; /// /// The size, in bytes, of the network interface's HW address. /// - UINT32 HwAddressSize; + UINT32 HwAddressSize; /// /// The size, in bytes, of the network interface's media header. /// - UINT32 MediaHeaderSize; + UINT32 MediaHeaderSize; /// /// The maximum size, in bytes, of the packets supported by the network interface. /// - UINT32 MaxPacketSize; + UINT32 MaxPacketSize; /// /// The size, in bytes, of the NVRAM device attached to the network interface. /// - UINT32 NvRamSize; + UINT32 NvRamSize; /// /// The size that must be used for all NVRAM reads and writes. The /// start address for NVRAM read and write operations and the total /// length of those operations, must be a multiple of this value. The /// legal values for this field are 0, 1, 2, 4, and 8. /// - UINT32 NvRamAccessSize; + UINT32 NvRamAccessSize; /// /// The multicast receive filter settings supported by the network interface. /// - UINT32 ReceiveFilterMask; + UINT32 ReceiveFilterMask; /// /// The current multicast receive filter settings. /// - UINT32 ReceiveFilterSetting; + UINT32 ReceiveFilterSetting; /// /// The maximum number of multicast address receive filters supported by the driver. /// - UINT32 MaxMCastFilterCount; + UINT32 MaxMCastFilterCount; /// /// The current number of multicast address receive filters. /// - UINT32 MCastFilterCount; + UINT32 MCastFilterCount; /// /// Array containing the addresses of the current multicast address receive filters. /// - EFI_MAC_ADDRESS MCastFilter[MAX_MCAST_FILTER_CNT]; + EFI_MAC_ADDRESS MCastFilter[MAX_MCAST_FILTER_CNT]; /// /// The current HW MAC address for the network interface. /// - EFI_MAC_ADDRESS CurrentAddress; + EFI_MAC_ADDRESS CurrentAddress; /// /// The current HW MAC address for broadcast packets. /// - EFI_MAC_ADDRESS BroadcastAddress; + EFI_MAC_ADDRESS BroadcastAddress; /// /// The permanent HW MAC address for the network interface. /// - EFI_MAC_ADDRESS PermanentAddress; + EFI_MAC_ADDRESS PermanentAddress; /// /// The interface type of the network interface. /// - UINT8 IfType; + UINT8 IfType; /// /// TRUE if the HW MAC address can be changed. /// - BOOLEAN MacAddressChangeable; + BOOLEAN MacAddressChangeable; /// /// TRUE if the network interface can transmit more than one packet at a time. /// - BOOLEAN MultipleTxSupported; + BOOLEAN MultipleTxSupported; /// /// TRUE if the presence of media can be determined; otherwise FALSE. /// - BOOLEAN MediaPresentSupported; + BOOLEAN MediaPresentSupported; /// /// TRUE if media are connected to the network interface; otherwise FALSE. /// - BOOLEAN MediaPresent; + BOOLEAN MediaPresent; } EFI_SIMPLE_NETWORK_MODE; // // Protocol Member Functions // + /** Changes the state of a network interface from "stopped" to "started". @@ -632,7 +632,7 @@ EFI_STATUS // // Revision defined in EFI1.1 // -#define EFI_SIMPLE_NETWORK_INTERFACE_REVISION EFI_SIMPLE_NETWORK_PROTOCOL_REVISION +#define EFI_SIMPLE_NETWORK_INTERFACE_REVISION EFI_SIMPLE_NETWORK_PROTOCOL_REVISION /// /// The EFI_SIMPLE_NETWORK_PROTOCOL protocol is used to initialize access @@ -646,30 +646,30 @@ struct _EFI_SIMPLE_NETWORK_PROTOCOL { /// be backwards compatible. If a future version is not backwards compatible /// it is not the same GUID. /// - UINT64 Revision; - EFI_SIMPLE_NETWORK_START Start; - EFI_SIMPLE_NETWORK_STOP Stop; - EFI_SIMPLE_NETWORK_INITIALIZE Initialize; - EFI_SIMPLE_NETWORK_RESET Reset; - EFI_SIMPLE_NETWORK_SHUTDOWN Shutdown; - EFI_SIMPLE_NETWORK_RECEIVE_FILTERS ReceiveFilters; - EFI_SIMPLE_NETWORK_STATION_ADDRESS StationAddress; - EFI_SIMPLE_NETWORK_STATISTICS Statistics; - EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC MCastIpToMac; - EFI_SIMPLE_NETWORK_NVDATA NvData; - EFI_SIMPLE_NETWORK_GET_STATUS GetStatus; - EFI_SIMPLE_NETWORK_TRANSMIT Transmit; - EFI_SIMPLE_NETWORK_RECEIVE Receive; + UINT64 Revision; + EFI_SIMPLE_NETWORK_START Start; + EFI_SIMPLE_NETWORK_STOP Stop; + EFI_SIMPLE_NETWORK_INITIALIZE Initialize; + EFI_SIMPLE_NETWORK_RESET Reset; + EFI_SIMPLE_NETWORK_SHUTDOWN Shutdown; + EFI_SIMPLE_NETWORK_RECEIVE_FILTERS ReceiveFilters; + EFI_SIMPLE_NETWORK_STATION_ADDRESS StationAddress; + EFI_SIMPLE_NETWORK_STATISTICS Statistics; + EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC MCastIpToMac; + EFI_SIMPLE_NETWORK_NVDATA NvData; + EFI_SIMPLE_NETWORK_GET_STATUS GetStatus; + EFI_SIMPLE_NETWORK_TRANSMIT Transmit; + EFI_SIMPLE_NETWORK_RECEIVE Receive; /// /// Event used with WaitForEvent() to wait for a packet to be received. /// - EFI_EVENT WaitForPacket; + EFI_EVENT WaitForPacket; /// /// Pointer to the EFI_SIMPLE_NETWORK_MODE data for the device. /// - EFI_SIMPLE_NETWORK_MODE *Mode; + EFI_SIMPLE_NETWORK_MODE *Mode; }; -extern EFI_GUID gEfiSimpleNetworkProtocolGuid; +extern EFI_GUID gEfiSimpleNetworkProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/SimplePointer.h b/MdePkg/Include/Protocol/SimplePointer.h index c631414..f8d45a6 100644 --- a/MdePkg/Include/Protocol/SimplePointer.h +++ b/MdePkg/Include/Protocol/SimplePointer.h @@ -16,7 +16,7 @@ 0x31878c87, 0xb75, 0x11d5, {0x9a, 0x4f, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ } -typedef struct _EFI_SIMPLE_POINTER_PROTOCOL EFI_SIMPLE_POINTER_PROTOCOL; +typedef struct _EFI_SIMPLE_POINTER_PROTOCOL EFI_SIMPLE_POINTER_PROTOCOL; // // Data structures @@ -25,25 +25,25 @@ typedef struct { /// /// The signed distance in counts that the pointer device has been moved along the x-axis. /// - INT32 RelativeMovementX; + INT32 RelativeMovementX; /// /// The signed distance in counts that the pointer device has been moved along the y-axis. /// - INT32 RelativeMovementY; + INT32 RelativeMovementY; /// /// The signed distance in counts that the pointer device has been moved along the z-axis. /// - INT32 RelativeMovementZ; + INT32 RelativeMovementZ; /// /// If TRUE, then the left button of the pointer device is being /// pressed. If FALSE, then the left button of the pointer device is not being pressed. /// - BOOLEAN LeftButton; + BOOLEAN LeftButton; /// /// If TRUE, then the right button of the pointer device is being /// pressed. If FALSE, then the right button of the pointer device is not being pressed. /// - BOOLEAN RightButton; + BOOLEAN RightButton; } EFI_SIMPLE_POINTER_STATE; typedef struct { @@ -51,25 +51,25 @@ typedef struct { /// The resolution of the pointer device on the x-axis in counts/mm. /// If 0, then the pointer device does not support an x-axis. /// - UINT64 ResolutionX; + UINT64 ResolutionX; /// /// The resolution of the pointer device on the y-axis in counts/mm. /// If 0, then the pointer device does not support an x-axis. /// - UINT64 ResolutionY; + UINT64 ResolutionY; /// /// The resolution of the pointer device on the z-axis in counts/mm. /// If 0, then the pointer device does not support an x-axis. /// - UINT64 ResolutionZ; + UINT64 ResolutionZ; /// /// TRUE if a left button is present on the pointer device. Otherwise FALSE. /// - BOOLEAN LeftButton; + BOOLEAN LeftButton; /// /// TRUE if a right button is present on the pointer device. Otherwise FALSE. /// - BOOLEAN RightButton; + BOOLEAN RightButton; } EFI_SIMPLE_POINTER_MODE; /** @@ -120,18 +120,18 @@ EFI_STATUS /// retrieve the capabilities of the pointer device. /// struct _EFI_SIMPLE_POINTER_PROTOCOL { - EFI_SIMPLE_POINTER_RESET Reset; - EFI_SIMPLE_POINTER_GET_STATE GetState; + EFI_SIMPLE_POINTER_RESET Reset; + EFI_SIMPLE_POINTER_GET_STATE GetState; /// /// Event to use with WaitForEvent() to wait for input from the pointer device. /// - EFI_EVENT WaitForInput; + EFI_EVENT WaitForInput; /// /// Pointer to EFI_SIMPLE_POINTER_MODE data. /// - EFI_SIMPLE_POINTER_MODE *Mode; + EFI_SIMPLE_POINTER_MODE *Mode; }; -extern EFI_GUID gEfiSimplePointerProtocolGuid; +extern EFI_GUID gEfiSimplePointerProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/SimpleTextIn.h b/MdePkg/Include/Protocol/SimpleTextIn.h index e22e05e..838fae2 100644 --- a/MdePkg/Include/Protocol/SimpleTextIn.h +++ b/MdePkg/Include/Protocol/SimpleTextIn.h @@ -17,24 +17,24 @@ 0x387477c1, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \ } -typedef struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL EFI_SIMPLE_TEXT_INPUT_PROTOCOL; +typedef struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL EFI_SIMPLE_TEXT_INPUT_PROTOCOL; /// /// Protocol GUID name defined in EFI1.1. /// -#define SIMPLE_INPUT_PROTOCOL EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID +#define SIMPLE_INPUT_PROTOCOL EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID /// /// Protocol name in EFI1.1 for backward-compatible. /// -typedef struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL SIMPLE_INPUT_INTERFACE; +typedef struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL SIMPLE_INPUT_INTERFACE; /// /// The keystroke information for the key that was pressed. /// typedef struct { - UINT16 ScanCode; - CHAR16 UnicodeChar; + UINT16 ScanCode; + CHAR16 UnicodeChar; } EFI_INPUT_KEY; // @@ -114,14 +114,14 @@ EFI_STATUS /// It is the minimum required protocol for ConsoleIn. /// struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL { - EFI_INPUT_RESET Reset; - EFI_INPUT_READ_KEY ReadKeyStroke; + EFI_INPUT_RESET Reset; + EFI_INPUT_READ_KEY ReadKeyStroke; /// /// Event to use with WaitForEvent() to wait for a key to be available /// - EFI_EVENT WaitForKey; + EFI_EVENT WaitForKey; }; -extern EFI_GUID gEfiSimpleTextInProtocolGuid; +extern EFI_GUID gEfiSimpleTextInProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/SimpleTextInEx.h b/MdePkg/Include/Protocol/SimpleTextInEx.h index 2df583e..8317325 100644 --- a/MdePkg/Include/Protocol/SimpleTextInEx.h +++ b/MdePkg/Include/Protocol/SimpleTextInEx.h @@ -18,7 +18,6 @@ #define EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID \ {0xdd9e7534, 0x7762, 0x4698, { 0x8c, 0x14, 0xf5, 0x85, 0x17, 0xa6, 0x25, 0xaa } } - typedef struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL; /** @@ -51,8 +50,7 @@ EFI_STATUS (EFIAPI *EFI_INPUT_RESET_EX)( IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, IN BOOLEAN ExtendedVerification -); - + ); /// /// EFI_KEY_TOGGLE_STATE. The toggle states are defined. @@ -68,25 +66,25 @@ typedef struct _EFI_KEY_STATE { /// returned value is valid only if the high /// order bit has been set. /// - UINT32 KeyShiftState; + UINT32 KeyShiftState; /// /// Reflects the current internal state of /// various toggled attributes. The returned /// value is valid only if the high order /// bit has been set. /// - EFI_KEY_TOGGLE_STATE KeyToggleState; + EFI_KEY_TOGGLE_STATE KeyToggleState; } EFI_KEY_STATE; typedef struct { /// /// The EFI scan code and Unicode value returned from the input device. /// - EFI_INPUT_KEY Key; + EFI_INPUT_KEY Key; /// /// The current state of various toggled attributes as well as input modifier values. /// - EFI_KEY_STATE KeyState; + EFI_KEY_STATE KeyState; } EFI_KEY_DATA; // @@ -95,55 +93,55 @@ typedef struct { // // Shift state // -#define EFI_SHIFT_STATE_VALID 0x80000000 -#define EFI_RIGHT_SHIFT_PRESSED 0x00000001 -#define EFI_LEFT_SHIFT_PRESSED 0x00000002 -#define EFI_RIGHT_CONTROL_PRESSED 0x00000004 -#define EFI_LEFT_CONTROL_PRESSED 0x00000008 -#define EFI_RIGHT_ALT_PRESSED 0x00000010 -#define EFI_LEFT_ALT_PRESSED 0x00000020 -#define EFI_RIGHT_LOGO_PRESSED 0x00000040 -#define EFI_LEFT_LOGO_PRESSED 0x00000080 -#define EFI_MENU_KEY_PRESSED 0x00000100 -#define EFI_SYS_REQ_PRESSED 0x00000200 +#define EFI_SHIFT_STATE_VALID 0x80000000 +#define EFI_RIGHT_SHIFT_PRESSED 0x00000001 +#define EFI_LEFT_SHIFT_PRESSED 0x00000002 +#define EFI_RIGHT_CONTROL_PRESSED 0x00000004 +#define EFI_LEFT_CONTROL_PRESSED 0x00000008 +#define EFI_RIGHT_ALT_PRESSED 0x00000010 +#define EFI_LEFT_ALT_PRESSED 0x00000020 +#define EFI_RIGHT_LOGO_PRESSED 0x00000040 +#define EFI_LEFT_LOGO_PRESSED 0x00000080 +#define EFI_MENU_KEY_PRESSED 0x00000100 +#define EFI_SYS_REQ_PRESSED 0x00000200 // // Toggle state // -#define EFI_TOGGLE_STATE_VALID 0x80 -#define EFI_KEY_STATE_EXPOSED 0x40 -#define EFI_SCROLL_LOCK_ACTIVE 0x01 -#define EFI_NUM_LOCK_ACTIVE 0x02 -#define EFI_CAPS_LOCK_ACTIVE 0x04 +#define EFI_TOGGLE_STATE_VALID 0x80 +#define EFI_KEY_STATE_EXPOSED 0x40 +#define EFI_SCROLL_LOCK_ACTIVE 0x01 +#define EFI_NUM_LOCK_ACTIVE 0x02 +#define EFI_CAPS_LOCK_ACTIVE 0x04 // // EFI Scan codes // -#define SCAN_F11 0x0015 -#define SCAN_F12 0x0016 -#define SCAN_PAUSE 0x0048 -#define SCAN_F13 0x0068 -#define SCAN_F14 0x0069 -#define SCAN_F15 0x006A -#define SCAN_F16 0x006B -#define SCAN_F17 0x006C -#define SCAN_F18 0x006D -#define SCAN_F19 0x006E -#define SCAN_F20 0x006F -#define SCAN_F21 0x0070 -#define SCAN_F22 0x0071 -#define SCAN_F23 0x0072 -#define SCAN_F24 0x0073 -#define SCAN_MUTE 0x007F -#define SCAN_VOLUME_UP 0x0080 -#define SCAN_VOLUME_DOWN 0x0081 -#define SCAN_BRIGHTNESS_UP 0x0100 -#define SCAN_BRIGHTNESS_DOWN 0x0101 -#define SCAN_SUSPEND 0x0102 -#define SCAN_HIBERNATE 0x0103 -#define SCAN_TOGGLE_DISPLAY 0x0104 -#define SCAN_RECOVERY 0x0105 -#define SCAN_EJECT 0x0106 +#define SCAN_F11 0x0015 +#define SCAN_F12 0x0016 +#define SCAN_PAUSE 0x0048 +#define SCAN_F13 0x0068 +#define SCAN_F14 0x0069 +#define SCAN_F15 0x006A +#define SCAN_F16 0x006B +#define SCAN_F17 0x006C +#define SCAN_F18 0x006D +#define SCAN_F19 0x006E +#define SCAN_F20 0x006F +#define SCAN_F21 0x0070 +#define SCAN_F22 0x0071 +#define SCAN_F23 0x0072 +#define SCAN_F24 0x0073 +#define SCAN_MUTE 0x007F +#define SCAN_VOLUME_UP 0x0080 +#define SCAN_VOLUME_DOWN 0x0081 +#define SCAN_BRIGHTNESS_UP 0x0100 +#define SCAN_BRIGHTNESS_DOWN 0x0101 +#define SCAN_SUSPEND 0x0102 +#define SCAN_HIBERNATE 0x0103 +#define SCAN_TOGGLE_DISPLAY 0x0104 +#define SCAN_RECOVERY 0x0105 +#define SCAN_EJECT 0x0106 /** The function reads the next keystroke from the input device. If @@ -196,7 +194,7 @@ EFI_STATUS (EFIAPI *EFI_INPUT_READ_KEY_EX)( IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, OUT EFI_KEY_DATA *KeyData -); + ); /** The SetState() function allows the input device hardware to @@ -223,7 +221,7 @@ EFI_STATUS (EFIAPI *EFI_SET_STATE)( IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, IN EFI_KEY_TOGGLE_STATE *KeyToggleState -); + ); /// /// The function will be called when the key sequence is typed specified by KeyData. @@ -232,7 +230,7 @@ typedef EFI_STATUS (EFIAPI *EFI_KEY_NOTIFY_FUNCTION)( IN EFI_KEY_DATA *KeyData -); + ); /** The RegisterKeystrokeNotify() function registers a function @@ -267,7 +265,7 @@ EFI_STATUS IN EFI_KEY_DATA *KeyData, IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction, OUT VOID **NotifyHandle -); + ); /** The UnregisterKeystrokeNotify() function removes the @@ -289,8 +287,7 @@ EFI_STATUS (EFIAPI *EFI_UNREGISTER_KEYSTROKE_NOTIFY)( IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, IN VOID *NotificationHandle -); - + ); /// /// The EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL is used on the ConsoleIn @@ -298,20 +295,18 @@ EFI_STATUS /// which allows a variety of extended shift state information to be /// returned. /// -struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL{ - EFI_INPUT_RESET_EX Reset; - EFI_INPUT_READ_KEY_EX ReadKeyStrokeEx; +struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL { + EFI_INPUT_RESET_EX Reset; + EFI_INPUT_READ_KEY_EX ReadKeyStrokeEx; /// /// Event to use with WaitForEvent() to wait for a key to be available. /// - EFI_EVENT WaitForKeyEx; - EFI_SET_STATE SetState; - EFI_REGISTER_KEYSTROKE_NOTIFY RegisterKeyNotify; - EFI_UNREGISTER_KEYSTROKE_NOTIFY UnregisterKeyNotify; + EFI_EVENT WaitForKeyEx; + EFI_SET_STATE SetState; + EFI_REGISTER_KEYSTROKE_NOTIFY RegisterKeyNotify; + EFI_UNREGISTER_KEYSTROKE_NOTIFY UnregisterKeyNotify; }; - -extern EFI_GUID gEfiSimpleTextInputExProtocolGuid; +extern EFI_GUID gEfiSimpleTextInputExProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/SimpleTextOut.h b/MdePkg/Include/Protocol/SimpleTextOut.h index 100d69a..12dbbc1 100644 --- a/MdePkg/Include/Protocol/SimpleTextOut.h +++ b/MdePkg/Include/Protocol/SimpleTextOut.h @@ -22,14 +22,14 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// Protocol GUID defined in EFI1.1. /// -#define SIMPLE_TEXT_OUTPUT_PROTOCOL EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID +#define SIMPLE_TEXT_OUTPUT_PROTOCOL EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID typedef struct _EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL; /// /// Backward-compatible with EFI1.1. /// -typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SIMPLE_TEXT_OUTPUT_INTERFACE; +typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SIMPLE_TEXT_OUTPUT_INTERFACE; // // Defines for required EFI Unicode Box Draw characters @@ -84,39 +84,39 @@ typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SIMPLE_TEXT_OUTPUT_INTERFACE; // // EFI Required Geometric Shapes Code Chart // -#define GEOMETRICSHAPE_UP_TRIANGLE 0x25b2 -#define GEOMETRICSHAPE_RIGHT_TRIANGLE 0x25ba -#define GEOMETRICSHAPE_DOWN_TRIANGLE 0x25bc -#define GEOMETRICSHAPE_LEFT_TRIANGLE 0x25c4 +#define GEOMETRICSHAPE_UP_TRIANGLE 0x25b2 +#define GEOMETRICSHAPE_RIGHT_TRIANGLE 0x25ba +#define GEOMETRICSHAPE_DOWN_TRIANGLE 0x25bc +#define GEOMETRICSHAPE_LEFT_TRIANGLE 0x25c4 // // EFI Required Arrow shapes // -#define ARROW_LEFT 0x2190 -#define ARROW_UP 0x2191 -#define ARROW_RIGHT 0x2192 -#define ARROW_DOWN 0x2193 +#define ARROW_LEFT 0x2190 +#define ARROW_UP 0x2191 +#define ARROW_RIGHT 0x2192 +#define ARROW_DOWN 0x2193 // // EFI Console Colours // -#define EFI_BLACK 0x00 -#define EFI_BLUE 0x01 -#define EFI_GREEN 0x02 -#define EFI_CYAN (EFI_BLUE | EFI_GREEN) -#define EFI_RED 0x04 -#define EFI_MAGENTA (EFI_BLUE | EFI_RED) -#define EFI_BROWN (EFI_GREEN | EFI_RED) -#define EFI_LIGHTGRAY (EFI_BLUE | EFI_GREEN | EFI_RED) -#define EFI_BRIGHT 0x08 -#define EFI_DARKGRAY (EFI_BLACK | EFI_BRIGHT) -#define EFI_LIGHTBLUE (EFI_BLUE | EFI_BRIGHT) -#define EFI_LIGHTGREEN (EFI_GREEN | EFI_BRIGHT) -#define EFI_LIGHTCYAN (EFI_CYAN | EFI_BRIGHT) -#define EFI_LIGHTRED (EFI_RED | EFI_BRIGHT) -#define EFI_LIGHTMAGENTA (EFI_MAGENTA | EFI_BRIGHT) -#define EFI_YELLOW (EFI_BROWN | EFI_BRIGHT) -#define EFI_WHITE (EFI_BLUE | EFI_GREEN | EFI_RED | EFI_BRIGHT) +#define EFI_BLACK 0x00 +#define EFI_BLUE 0x01 +#define EFI_GREEN 0x02 +#define EFI_CYAN (EFI_BLUE | EFI_GREEN) +#define EFI_RED 0x04 +#define EFI_MAGENTA (EFI_BLUE | EFI_RED) +#define EFI_BROWN (EFI_GREEN | EFI_RED) +#define EFI_LIGHTGRAY (EFI_BLUE | EFI_GREEN | EFI_RED) +#define EFI_BRIGHT 0x08 +#define EFI_DARKGRAY (EFI_BLACK | EFI_BRIGHT) +#define EFI_LIGHTBLUE (EFI_BLUE | EFI_BRIGHT) +#define EFI_LIGHTGREEN (EFI_GREEN | EFI_BRIGHT) +#define EFI_LIGHTCYAN (EFI_CYAN | EFI_BRIGHT) +#define EFI_LIGHTRED (EFI_RED | EFI_BRIGHT) +#define EFI_LIGHTMAGENTA (EFI_MAGENTA | EFI_BRIGHT) +#define EFI_YELLOW (EFI_BROWN | EFI_BRIGHT) +#define EFI_WHITE (EFI_BLUE | EFI_GREEN | EFI_RED | EFI_BRIGHT) // // Macro to accept color values in their raw form to create @@ -129,7 +129,7 @@ typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SIMPLE_TEXT_OUTPUT_INTERFACE; // // Do not use EFI_BACKGROUND_xxx values with this macro. // -#define EFI_TEXT_ATTR(Foreground,Background) ((Foreground) | ((Background) << 4)) +#define EFI_TEXT_ATTR(Foreground, Background) ((Foreground) | ((Background) << 4)) #define EFI_BACKGROUND_BLACK 0x00 #define EFI_BACKGROUND_BLUE 0x10 @@ -350,7 +350,7 @@ typedef struct { /// /// The number of modes supported by QueryMode () and SetMode (). /// - INT32 MaxMode; + INT32 MaxMode; // // current settings @@ -359,23 +359,23 @@ typedef struct { /// /// The text mode of the output device(s). /// - INT32 Mode; + INT32 Mode; /// /// The current character output attribute. /// - INT32 Attribute; + INT32 Attribute; /// /// The cursor's column. /// - INT32 CursorColumn; + INT32 CursorColumn; /// /// The cursor's row. /// - INT32 CursorRow; + INT32 CursorRow; /// /// The cursor is currently visible or not. /// - BOOLEAN CursorVisible; + BOOLEAN CursorVisible; } EFI_SIMPLE_TEXT_OUTPUT_MODE; /// @@ -385,25 +385,25 @@ typedef struct { /// devices is at least 80 x 25 characters. /// struct _EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL { - EFI_TEXT_RESET Reset; + EFI_TEXT_RESET Reset; - EFI_TEXT_STRING OutputString; - EFI_TEXT_TEST_STRING TestString; + EFI_TEXT_STRING OutputString; + EFI_TEXT_TEST_STRING TestString; - EFI_TEXT_QUERY_MODE QueryMode; - EFI_TEXT_SET_MODE SetMode; - EFI_TEXT_SET_ATTRIBUTE SetAttribute; + EFI_TEXT_QUERY_MODE QueryMode; + EFI_TEXT_SET_MODE SetMode; + EFI_TEXT_SET_ATTRIBUTE SetAttribute; - EFI_TEXT_CLEAR_SCREEN ClearScreen; - EFI_TEXT_SET_CURSOR_POSITION SetCursorPosition; - EFI_TEXT_ENABLE_CURSOR EnableCursor; + EFI_TEXT_CLEAR_SCREEN ClearScreen; + EFI_TEXT_SET_CURSOR_POSITION SetCursorPosition; + EFI_TEXT_ENABLE_CURSOR EnableCursor; /// /// Pointer to SIMPLE_TEXT_OUTPUT_MODE data. /// - EFI_SIMPLE_TEXT_OUTPUT_MODE *Mode; + EFI_SIMPLE_TEXT_OUTPUT_MODE *Mode; }; -extern EFI_GUID gEfiSimpleTextOutProtocolGuid; +extern EFI_GUID gEfiSimpleTextOutProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/SmartCardEdge.h b/MdePkg/Include/Protocol/SmartCardEdge.h index ebece5a..1251680 100644 --- a/MdePkg/Include/Protocol/SmartCardEdge.h +++ b/MdePkg/Include/Protocol/SmartCardEdge.h @@ -22,20 +22,20 @@ 0xd317f29b, 0xa325, 0x4712, {0x9b, 0xf1, 0xc6, 0x19, 0x54, 0xdc, 0x19, 0x8c} \ } -typedef struct _EFI_SMART_CARD_EDGE_PROTOCOL EFI_SMART_CARD_EDGE_PROTOCOL; +typedef struct _EFI_SMART_CARD_EDGE_PROTOCOL EFI_SMART_CARD_EDGE_PROTOCOL; // // Maximum size for a Smart Card AID (Application IDentifier) // -#define SCARD_AID_MAXSIZE 0x0010 +#define SCARD_AID_MAXSIZE 0x0010 // // Size of CSN (Card Serial Number) // -#define SCARD_CSN_SIZE 0x0010 +#define SCARD_CSN_SIZE 0x0010 // // Current specification version 1.00 // -#define SMART_CARD_EDGE_PROTOCOL_VERSION_1 0x00000100 +#define SMART_CARD_EDGE_PROTOCOL_VERSION_1 0x00000100 // // Parameters type definition // @@ -47,23 +47,23 @@ typedef UINT8 SMART_CARD_CSN[SCARD_CSN_SIZE]; // // value of tag field for header, the number of containers // -#define SC_EDGE_TAG_HEADER 0x0000 +#define SC_EDGE_TAG_HEADER 0x0000 // // value of tag field for certificate // -#define SC_EDGE_TAG_CERT 0x0001 +#define SC_EDGE_TAG_CERT 0x0001 // // value of tag field for key index associated with certificate // -#define SC_EDGE_TAG_KEY_ID 0x0002 +#define SC_EDGE_TAG_KEY_ID 0x0002 // // value of tag field for key type // -#define SC_EDGE_TAG_KEY_TYPE 0x0003 +#define SC_EDGE_TAG_KEY_TYPE 0x0003 // // value of tag field for key size // -#define SC_EDGE_TAG_KEY_SIZE 0x0004 +#define SC_EDGE_TAG_KEY_SIZE 0x0004 // // Length of L fields of TLV items @@ -71,42 +71,42 @@ typedef UINT8 SMART_CARD_CSN[SCARD_CSN_SIZE]; // // size of L field for header // -#define SC_EDGE_L_SIZE_HEADER 1 +#define SC_EDGE_L_SIZE_HEADER 1 // // size of L field for certificate (big endian) // -#define SC_EDGE_L_SIZE_CERT 2 +#define SC_EDGE_L_SIZE_CERT 2 // // size of L field for key index // -#define SC_EDGE_L_SIZE_KEY_ID 1 +#define SC_EDGE_L_SIZE_KEY_ID 1 // // size of L field for key type // -#define SC_EDGE_L_SIZE_KEY_TYPE 1 +#define SC_EDGE_L_SIZE_KEY_TYPE 1 // // size of L field for key size (big endian) // -#define SC_EDGE_L_SIZE_KEY_SIZE 2 +#define SC_EDGE_L_SIZE_KEY_SIZE 2 // // Some TLV items have a fixed value for L field // // value of L field for header // -#define SC_EDGE_L_VALUE_HEADER 1 +#define SC_EDGE_L_VALUE_HEADER 1 // // value of L field for key index // -#define SC_EDGE_L_VALUE_KEY_ID 1 +#define SC_EDGE_L_VALUE_KEY_ID 1 // // value of L field for key type // -#define SC_EDGE_L_VALUE_KEY_TYPE 1 +#define SC_EDGE_L_VALUE_KEY_TYPE 1 // // value of L field for key size // -#define SC_EDGE_L_VALUE_KEY_SIZE 2 +#define SC_EDGE_L_VALUE_KEY_SIZE 2 // // Possible values for key type @@ -114,35 +114,35 @@ typedef UINT8 SMART_CARD_CSN[SCARD_CSN_SIZE]; // // RSA decryption // -#define SC_EDGE_RSA_EXCHANGE 0x01 +#define SC_EDGE_RSA_EXCHANGE 0x01 // // RSA signature // -#define SC_EDGE_RSA_SIGNATURE 0x02 +#define SC_EDGE_RSA_SIGNATURE 0x02 // // ECDSA signature // -#define SC_EDGE_ECDSA_256 0x03 +#define SC_EDGE_ECDSA_256 0x03 // // ECDSA signature // -#define SC_EDGE_ECDSA_384 0x04 +#define SC_EDGE_ECDSA_384 0x04 // // ECDSA signature // -#define SC_EDGE_ECDSA_521 0x05 +#define SC_EDGE_ECDSA_521 0x05 // // ECDH agreement // -#define SC_EDGE_ECDH_256 0x06 +#define SC_EDGE_ECDH_256 0x06 // // ECDH agreement // -#define SC_EDGE_ECDH_384 0x07 +#define SC_EDGE_ECDH_384 0x07 // // ECDH agreement // -#define SC_EDGE_ECDH_521 0x08 +#define SC_EDGE_ECDH_521 0x08 // // Padding methods GUIDs for signature @@ -155,7 +155,7 @@ typedef UINT8 SMART_CARD_CSN[SCARD_CSN_SIZE]; 0x9317ec24, 0x7cb0, 0x4d0e, {0x8b, 0x32, 0x2e, 0xd9, 0x20, 0x9c, 0xd8, 0xaf} \ } -extern EFI_GUID gEfiPaddingRsassaPkcs1V1P5Guid; +extern EFI_GUID gEfiPaddingRsassaPkcs1V1P5Guid; // // RSASSA-PSS padding method, for signature @@ -165,7 +165,7 @@ extern EFI_GUID gEfiPaddingRsassaPkcs1V1P5Guid; 0x7b2349e0, 0x522d, 0x4f8e, {0xb9, 0x27, 0x69, 0xd9, 0x7c, 0x9e, 0x79, 0x5f} \ } -extern EFI_GUID gEfiPaddingRsassaPssGuid; +extern EFI_GUID gEfiPaddingRsassaPssGuid; // // Padding methods GUIDs for decryption @@ -178,7 +178,7 @@ extern EFI_GUID gEfiPaddingRsassaPssGuid; 0x3629ddb1, 0x228c, 0x452e, {0xb6, 0x16, 0x09, 0xed, 0x31, 0x6a, 0x97, 0x00} \ } -extern EFI_GUID gEfiPaddingNoneGuid; +extern EFI_GUID gEfiPaddingNoneGuid; // // RSAES-PKCS#1-V1.5 padding, for decryption @@ -188,7 +188,7 @@ extern EFI_GUID gEfiPaddingNoneGuid; 0xe1c1d0a9, 0x40b1, 0x4632, {0xbd, 0xcc, 0xd9, 0xd6, 0xe5, 0x29, 0x56, 0x31} \ } -extern EFI_GUID gEfiPaddingRsaesPkcs1V1P5Guid; +extern EFI_GUID gEfiPaddingRsaesPkcs1V1P5Guid; // // RSAES-OAEP padding, for decryption @@ -198,7 +198,7 @@ extern EFI_GUID gEfiPaddingRsaesPkcs1V1P5Guid; 0xc1e63ac4, 0xd0cf, 0x4ce6, {0x83, 0x5b, 0xee, 0xd0, 0xe6, 0xa8, 0xa4, 0x5b} \ } -extern EFI_GUID gEfiPaddingRsaesOaepGuid; +extern EFI_GUID gEfiPaddingRsaesOaepGuid; /** This function retrieves the context driver. @@ -245,15 +245,15 @@ extern EFI_GUID gEfiPaddingRsaesOaepGuid; **/ typedef EFI_STATUS -(EFIAPI *EFI_SMART_CARD_EDGE_GET_CONTEXT) ( +(EFIAPI *EFI_SMART_CARD_EDGE_GET_CONTEXT)( IN EFI_SMART_CARD_EDGE_PROTOCOL *This, - OUT UINTN *NumberAidSupported, + OUT UINTN *NumberAidSupported, IN OUT UINTN *AidTableSize OPTIONAL, - OUT SMART_CARD_AID *AidTable OPTIONAL, - OUT UINTN *NumberSCPresent, + OUT SMART_CARD_AID *AidTable OPTIONAL, + OUT UINTN *NumberSCPresent, IN OUT UINTN *CsnTableSize OPTIONAL, - OUT SMART_CARD_CSN *CsnTable OPTIONAL, - OUT UINT32 *VersionScEdgeProtocol OPTIONAL + OUT SMART_CARD_CSN *CsnTable OPTIONAL, + OUT UINT32 *VersionScEdgeProtocol OPTIONAL ); /** @@ -287,11 +287,11 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SMART_CARD_EDGE_CONNECT) ( +(EFIAPI *EFI_SMART_CARD_EDGE_CONNECT)( IN EFI_SMART_CARD_EDGE_PROTOCOL *This, - OUT EFI_HANDLE *SCardHandle, + OUT EFI_HANDLE *SCardHandle, IN UINT8 *ScardCsn OPTIONAL, - OUT UINT8 *ScardAid OPTIONAL + OUT UINT8 *ScardAid OPTIONAL ); /** @@ -311,7 +311,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SMART_CARD_EDGE_DISCONNECT) ( +(EFIAPI *EFI_SMART_CARD_EDGE_DISCONNECT)( IN EFI_SMART_CARD_EDGE_PROTOCOL *This, IN EFI_HANDLE SCardHandle ); @@ -332,10 +332,10 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SMART_CARD_EDGE_GET_CSN) ( +(EFIAPI *EFI_SMART_CARD_EDGE_GET_CSN)( IN EFI_SMART_CARD_EDGE_PROTOCOL *This, IN EFI_HANDLE SCardHandle, - OUT UINT8 Csn[SCARD_CSN_SIZE] + OUT UINT8 Csn[SCARD_CSN_SIZE] ); /** @@ -359,11 +359,11 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SMART_CARD_EDGE_GET_READER_NAME) ( +(EFIAPI *EFI_SMART_CARD_EDGE_GET_READER_NAME)( IN EFI_SMART_CARD_EDGE_PROTOCOL *This, IN EFI_HANDLE SCardHandle, IN OUT UINTN *ReaderNameLength, - OUT CHAR16 *ReaderName OPTIONAL + OUT CHAR16 *ReaderName OPTIONAL ); /** @@ -409,13 +409,13 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SMART_CARD_EDGE_VERIFY_PIN) ( +(EFIAPI *EFI_SMART_CARD_EDGE_VERIFY_PIN)( IN EFI_SMART_CARD_EDGE_PROTOCOL *This, IN EFI_HANDLE SCardHandle, IN INT32 PinSize, IN UINT8 *PinCode, - OUT BOOLEAN *PinResult, - OUT UINT32 *RemainingAttempts OPTIONAL + OUT BOOLEAN *PinResult, + OUT UINT32 *RemainingAttempts OPTIONAL ); /** @@ -440,10 +440,10 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SMART_CARD_EDGE_GET_PIN_REMAINING) ( +(EFIAPI *EFI_SMART_CARD_EDGE_GET_PIN_REMAINING)( IN EFI_SMART_CARD_EDGE_PROTOCOL *This, IN EFI_HANDLE SCardHandle, - OUT UINT32 *RemainingAttempts + OUT UINT32 *RemainingAttempts ); /** @@ -479,12 +479,12 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SMART_CARD_EDGE_GET_DATA) ( +(EFIAPI *EFI_SMART_CARD_EDGE_GET_DATA)( IN EFI_SMART_CARD_EDGE_PROTOCOL *This, IN EFI_HANDLE SCardHandle, IN EFI_GUID *DataId, IN OUT UINTN *DataSize, - OUT VOID *Data OPTIONAL + OUT VOID *Data OPTIONAL ); /** @@ -530,11 +530,11 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SMART_CARD_EDGE_GET_CREDENTIAL) ( +(EFIAPI *EFI_SMART_CARD_EDGE_GET_CREDENTIAL)( IN EFI_SMART_CARD_EDGE_PROTOCOL *This, IN EFI_HANDLE SCardHandle, IN OUT UINTN *CredentialSize, - OUT UINT8 *CredentialList OPTIONAL + OUT UINT8 *CredentialList OPTIONAL ); /** @@ -588,7 +588,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SMART_CARD_EDGE_SIGN_DATA) ( +(EFIAPI *EFI_SMART_CARD_EDGE_SIGN_DATA)( IN EFI_SMART_CARD_EDGE_PROTOCOL *This, IN EFI_HANDLE SCardHandle, IN UINTN KeyId, @@ -596,7 +596,7 @@ EFI_STATUS IN EFI_GUID *HashAlgorithm, IN EFI_GUID *PaddingMethod, IN UINT8 *HashedData, - OUT UINT8 *SignatureData + OUT UINT8 *SignatureData ); /** @@ -652,7 +652,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SMART_CARD_EDGE_DECRYPT_DATA) ( +(EFIAPI *EFI_SMART_CARD_EDGE_DECRYPT_DATA)( IN EFI_SMART_CARD_EDGE_PROTOCOL *This, IN EFI_HANDLE SCardHandle, IN UINTN KeyId, @@ -661,7 +661,7 @@ EFI_STATUS IN UINTN EncryptedSize, IN UINT8 *EncryptedData, IN OUT UINTN *PlaintextSize, - OUT UINT8 *PlaintextData + OUT UINT8 *PlaintextData ); /** @@ -702,13 +702,13 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SMART_CARD_EDGE_BUILD_DH_AGREEMENT) ( +(EFIAPI *EFI_SMART_CARD_EDGE_BUILD_DH_AGREEMENT)( IN EFI_SMART_CARD_EDGE_PROTOCOL *This, IN EFI_HANDLE SCardHandle, IN UINTN KeyId, IN UINT8 *dataQx, IN UINT8 *dataQy, - OUT UINT8 *DHAgreement + OUT UINT8 *DHAgreement ); /// @@ -716,21 +716,20 @@ EFI_STATUS /// smart card in the reader or to the reader itself. /// struct _EFI_SMART_CARD_EDGE_PROTOCOL { - EFI_SMART_CARD_EDGE_GET_CONTEXT GetContext; - EFI_SMART_CARD_EDGE_CONNECT Connect; - EFI_SMART_CARD_EDGE_DISCONNECT Disconnect; - EFI_SMART_CARD_EDGE_GET_CSN GetCsn; - EFI_SMART_CARD_EDGE_GET_READER_NAME GetReaderName; - EFI_SMART_CARD_EDGE_VERIFY_PIN VerifyPin; - EFI_SMART_CARD_EDGE_GET_PIN_REMAINING GetPinRemaining; - EFI_SMART_CARD_EDGE_GET_DATA GetData; - EFI_SMART_CARD_EDGE_GET_CREDENTIAL GetCredential; - EFI_SMART_CARD_EDGE_SIGN_DATA SignData; - EFI_SMART_CARD_EDGE_DECRYPT_DATA DecryptData; - EFI_SMART_CARD_EDGE_BUILD_DH_AGREEMENT BuildDHAgreement; + EFI_SMART_CARD_EDGE_GET_CONTEXT GetContext; + EFI_SMART_CARD_EDGE_CONNECT Connect; + EFI_SMART_CARD_EDGE_DISCONNECT Disconnect; + EFI_SMART_CARD_EDGE_GET_CSN GetCsn; + EFI_SMART_CARD_EDGE_GET_READER_NAME GetReaderName; + EFI_SMART_CARD_EDGE_VERIFY_PIN VerifyPin; + EFI_SMART_CARD_EDGE_GET_PIN_REMAINING GetPinRemaining; + EFI_SMART_CARD_EDGE_GET_DATA GetData; + EFI_SMART_CARD_EDGE_GET_CREDENTIAL GetCredential; + EFI_SMART_CARD_EDGE_SIGN_DATA SignData; + EFI_SMART_CARD_EDGE_DECRYPT_DATA DecryptData; + EFI_SMART_CARD_EDGE_BUILD_DH_AGREEMENT BuildDHAgreement; }; -extern EFI_GUID gEfiSmartCardEdgeProtocolGuid; +extern EFI_GUID gEfiSmartCardEdgeProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/SmartCardReader.h b/MdePkg/Include/Protocol/SmartCardReader.h index 8fb670b..0ce117c 100644 --- a/MdePkg/Include/Protocol/SmartCardReader.h +++ b/MdePkg/Include/Protocol/SmartCardReader.h @@ -17,40 +17,40 @@ 0x2a4d1adf, 0x21dc, 0x4b81, {0xa4, 0x2f, 0x8b, 0x8e, 0xe2, 0x38, 0x00, 0x60} \ } -typedef struct _EFI_SMART_CARD_READER_PROTOCOL EFI_SMART_CARD_READER_PROTOCOL; +typedef struct _EFI_SMART_CARD_READER_PROTOCOL EFI_SMART_CARD_READER_PROTOCOL; // // Codes for access mode // -#define SCARD_AM_READER 0x0001 // Exclusive access to reader -#define SCARD_AM_CARD 0x0002 // Exclusive access to card +#define SCARD_AM_READER 0x0001 // Exclusive access to reader +#define SCARD_AM_CARD 0x0002 // Exclusive access to card // // Codes for card action // -#define SCARD_CA_NORESET 0x0000 // Don't reset card -#define SCARD_CA_COLDRESET 0x0001 // Perform a cold reset -#define SCARD_CA_WARMRESET 0x0002 // Perform a warm reset -#define SCARD_CA_UNPOWER 0x0003 // Power off the card -#define SCARD_CA_EJECT 0x0004 // Eject the card +#define SCARD_CA_NORESET 0x0000 // Don't reset card +#define SCARD_CA_COLDRESET 0x0001 // Perform a cold reset +#define SCARD_CA_WARMRESET 0x0002 // Perform a warm reset +#define SCARD_CA_UNPOWER 0x0003 // Power off the card +#define SCARD_CA_EJECT 0x0004 // Eject the card // // Protocol types // -#define SCARD_PROTOCOL_UNDEFINED 0x0000 -#define SCARD_PROTOCOL_T0 0x0001 -#define SCARD_PROTOCOL_T1 0x0002 -#define SCARD_PROTOCOL_RAW 0x0004 +#define SCARD_PROTOCOL_UNDEFINED 0x0000 +#define SCARD_PROTOCOL_T0 0x0001 +#define SCARD_PROTOCOL_T1 0x0002 +#define SCARD_PROTOCOL_RAW 0x0004 // // Codes for state type // -#define SCARD_UNKNOWN 0x0000 /* state is unknown */ -#define SCARD_ABSENT 0x0001 /* Card is absent */ -#define SCARD_INACTIVE 0x0002 /* Card is present and not powered*/ -#define SCARD_ACTIVE 0x0003 /* Card is present and powered */ +#define SCARD_UNKNOWN 0x0000 /* state is unknown */ +#define SCARD_ABSENT 0x0001 /* Card is absent */ +#define SCARD_INACTIVE 0x0002 /* Card is present and not powered*/ +#define SCARD_ACTIVE 0x0003 /* Card is present and powered */ // // Macro to generate a ControlCode & PC/SC part 10 control code // -#define SCARD_CTL_CODE(code) (0x42000000 + (code)) -#define CM_IOCTL_GET_FEATURE_REQUEST SCARD_CTL_CODE(3400) +#define SCARD_CTL_CODE(code) (0x42000000 + (code)) +#define CM_IOCTL_GET_FEATURE_REQUEST SCARD_CTL_CODE(3400) /** This function requests connection to the smart card or the reader, using the @@ -87,12 +87,12 @@ typedef struct _EFI_SMART_CARD_READER_PROTOCOL EFI_SMART_CARD_READER_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI *EFI_SMART_CARD_READER_CONNECT) ( +(EFIAPI *EFI_SMART_CARD_READER_CONNECT)( IN EFI_SMART_CARD_READER_PROTOCOL *This, IN UINT32 AccessMode, IN UINT32 CardAction, IN UINT32 PreferredProtocols, - OUT UINT32 *ActiveProtocol + OUT UINT32 *ActiveProtocol ); /** @@ -116,7 +116,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SMART_CARD_READER_DISCONNECT) ( +(EFIAPI *EFI_SMART_CARD_READER_DISCONNECT)( IN EFI_SMART_CARD_READER_PROTOCOL *This, IN UINT32 CardAction ); @@ -159,13 +159,13 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SMART_CARD_READER_STATUS) ( +(EFIAPI *EFI_SMART_CARD_READER_STATUS)( IN EFI_SMART_CARD_READER_PROTOCOL *This, - OUT CHAR16 *ReaderName OPTIONAL, + OUT CHAR16 *ReaderName OPTIONAL, IN OUT UINTN *ReaderNameLength OPTIONAL, - OUT UINT32 *State OPTIONAL, - OUT UINT32 *CardProtocol OPTIONAL, - OUT UINT8 *Atr OPTIONAL, + OUT UINT32 *State OPTIONAL, + OUT UINT32 *CardProtocol OPTIONAL, + OUT UINT8 *Atr OPTIONAL, IN OUT UINTN *AtrLength OPTIONAL ); @@ -203,11 +203,11 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SMART_CARD_READER_TRANSMIT) ( +(EFIAPI *EFI_SMART_CARD_READER_TRANSMIT)( IN EFI_SMART_CARD_READER_PROTOCOL *This, IN UINT8 *CAPDU, IN UINTN CAPDULength, - OUT UINT8 *RAPDU, + OUT UINT8 *RAPDU, IN OUT UINTN *RAPDULength ); @@ -252,12 +252,12 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SMART_CARD_READER_CONTROL) ( +(EFIAPI *EFI_SMART_CARD_READER_CONTROL)( IN EFI_SMART_CARD_READER_PROTOCOL *This, IN UINT32 ControlCode, IN UINT8 *InBuffer OPTIONAL, IN UINTN InBufferLength OPTIONAL, - OUT UINT8 *OutBuffer OPTIONAL, + OUT UINT8 *OutBuffer OPTIONAL, IN OUT UINTN *OutBufferLength OPTIONAL ); @@ -293,10 +293,10 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SMART_CARD_READER_GET_ATTRIB) ( +(EFIAPI *EFI_SMART_CARD_READER_GET_ATTRIB)( IN EFI_SMART_CARD_READER_PROTOCOL *This, IN UINT32 Attrib, - OUT UINT8 *OutBuffer, + OUT UINT8 *OutBuffer, IN OUT UINTN *OutBufferLength ); @@ -305,15 +305,14 @@ EFI_STATUS /// smart card in the reader or to the reader itself. /// struct _EFI_SMART_CARD_READER_PROTOCOL { - EFI_SMART_CARD_READER_CONNECT SCardConnect; - EFI_SMART_CARD_READER_DISCONNECT SCardDisconnect; - EFI_SMART_CARD_READER_STATUS SCardStatus; - EFI_SMART_CARD_READER_TRANSMIT SCardTransmit; - EFI_SMART_CARD_READER_CONTROL SCardControl; - EFI_SMART_CARD_READER_GET_ATTRIB SCardGetAttrib; + EFI_SMART_CARD_READER_CONNECT SCardConnect; + EFI_SMART_CARD_READER_DISCONNECT SCardDisconnect; + EFI_SMART_CARD_READER_STATUS SCardStatus; + EFI_SMART_CARD_READER_TRANSMIT SCardTransmit; + EFI_SMART_CARD_READER_CONTROL SCardControl; + EFI_SMART_CARD_READER_GET_ATTRIB SCardGetAttrib; }; -extern EFI_GUID gEfiSmartCardReaderProtocolGuid; +extern EFI_GUID gEfiSmartCardReaderProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/Smbios.h b/MdePkg/Include/Protocol/Smbios.h index ee39636..f9346aa 100644 --- a/MdePkg/Include/Protocol/Smbios.h +++ b/MdePkg/Include/Protocol/Smbios.h @@ -26,58 +26,58 @@ #define EFI_SMBIOS_PROTOCOL_GUID \ { 0x3583ff6, 0xcb36, 0x4940, { 0x94, 0x7e, 0xb9, 0xb3, 0x9f, 0x4a, 0xfa, 0xf7 }} -#define EFI_SMBIOS_TYPE_BIOS_INFORMATION SMBIOS_TYPE_BIOS_INFORMATION -#define EFI_SMBIOS_TYPE_SYSTEM_INFORMATION SMBIOS_TYPE_SYSTEM_INFORMATION -#define EFI_SMBIOS_TYPE_BASEBOARD_INFORMATION SMBIOS_TYPE_BASEBOARD_INFORMATION -#define EFI_SMBIOS_TYPE_SYSTEM_ENCLOSURE SMBIOS_TYPE_SYSTEM_ENCLOSURE -#define EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION SMBIOS_TYPE_PROCESSOR_INFORMATION -#define EFI_SMBIOS_TYPE_MEMORY_CONTROLLER_INFORMATION SMBIOS_TYPE_MEMORY_CONTROLLER_INFORMATION -#define EFI_SMBIOS_TYPE_MEMORY_MODULE_INFORMATON SMBIOS_TYPE_MEMORY_MODULE_INFORMATON -#define EFI_SMBIOS_TYPE_CACHE_INFORMATION SMBIOS_TYPE_CACHE_INFORMATION -#define EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION -#define EFI_SMBIOS_TYPE_SYSTEM_SLOTS SMBIOS_TYPE_SYSTEM_SLOTS -#define EFI_SMBIOS_TYPE_ONBOARD_DEVICE_INFORMATION SMBIOS_TYPE_ONBOARD_DEVICE_INFORMATION -#define EFI_SMBIOS_TYPE_OEM_STRINGS SMBIOS_TYPE_OEM_STRINGS -#define EFI_SMBIOS_TYPE_SYSTEM_CONFIGURATION_OPTIONS SMBIOS_TYPE_SYSTEM_CONFIGURATION_OPTIONS -#define EFI_SMBIOS_TYPE_BIOS_LANGUAGE_INFORMATION SMBIOS_TYPE_BIOS_LANGUAGE_INFORMATION -#define EFI_SMBIOS_TYPE_GROUP_ASSOCIATIONS SMBIOS_TYPE_GROUP_ASSOCIATIONS -#define EFI_SMBIOS_TYPE_SYSTEM_EVENT_LOG SMBIOS_TYPE_SYSTEM_EVENT_LOG -#define EFI_SMBIOS_TYPE_PHYSICAL_MEMORY_ARRAY SMBIOS_TYPE_PHYSICAL_MEMORY_ARRAY -#define EFI_SMBIOS_TYPE_MEMORY_DEVICE SMBIOS_TYPE_MEMORY_DEVICE -#define EFI_SMBIOS_TYPE_32BIT_MEMORY_ERROR_INFORMATION SMBIOS_TYPE_32BIT_MEMORY_ERROR_INFORMATION -#define EFI_SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS -#define EFI_SMBIOS_TYPE_MEMORY_DEVICE_MAPPED_ADDRESS SMBIOS_TYPE_MEMORY_DEVICE_MAPPED_ADDRESS -#define EFI_SMBIOS_TYPE_BUILT_IN_POINTING_DEVICE SMBIOS_TYPE_BUILT_IN_POINTING_DEVICE -#define EFI_SMBIOS_TYPE_PORTABLE_BATTERY SMBIOS_TYPE_PORTABLE_BATTERY -#define EFI_SMBIOS_TYPE_SYSTEM_RESET SMBIOS_TYPE_SYSTEM_RESET -#define EFI_SMBIOS_TYPE_HARDWARE_SECURITY SMBIOS_TYPE_HARDWARE_SECURITY -#define EFI_SMBIOS_TYPE_SYSTEM_POWER_CONTROLS SMBIOS_TYPE_SYSTEM_POWER_CONTROLS -#define EFI_SMBIOS_TYPE_VOLTAGE_PROBE SMBIOS_TYPE_VOLTAGE_PROBE -#define EFI_SMBIOS_TYPE_COOLING_DEVICE SMBIOS_TYPE_COOLING_DEVICE -#define EFI_SMBIOS_TYPE_TEMPERATURE_PROBE SMBIOS_TYPE_TEMPERATURE_PROBE -#define EFI_SMBIOS_TYPE_ELECTRICAL_CURRENT_PROBE SMBIOS_TYPE_ELECTRICAL_CURRENT_PROBE -#define EFI_SMBIOS_TYPE_OUT_OF_BAND_REMOTE_ACCESS SMBIOS_TYPE_OUT_OF_BAND_REMOTE_ACCESS -#define EFI_SMBIOS_TYPE_BOOT_INTEGRITY_SERVICE SMBIOS_TYPE_BOOT_INTEGRITY_SERVICE -#define EFI_SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION -#define EFI_SMBIOS_TYPE_64BIT_MEMORY_ERROR_INFORMATION SMBIOS_TYPE_64BIT_MEMORY_ERROR_INFORMATION -#define EFI_SMBIOS_TYPE_MANAGEMENT_DEVICE SMBIOS_TYPE_MANAGEMENT_DEVICE -#define EFI_SMBIOS_TYPE_MANAGEMENT_DEVICE_COMPONENT SMBIOS_TYPE_MANAGEMENT_DEVICE_COMPONENT -#define EFI_SMBIOS_TYPE_MANAGEMENT_DEVICE_THRESHOLD_DATA SMBIOS_TYPE_MANAGEMENT_DEVICE_THRESHOLD_DATA -#define EFI_SMBIOS_TYPE_MEMORY_CHANNEL SMBIOS_TYPE_MEMORY_CHANNEL -#define EFI_SMBIOS_TYPE_IPMI_DEVICE_INFORMATION SMBIOS_TYPE_IPMI_DEVICE_INFORMATION -#define EFI_SMBIOS_TYPE_SYSTEM_POWER_SUPPLY SMBIOS_TYPE_SYSTEM_POWER_SUPPLY -#define EFI_SMBIOS_TYPE_ADDITIONAL_INFORMATION SMBIOS_TYPE_ADDITIONAL_INFORMATION -#define EFI_SMBIOS_TYPE_ONBOARD_DEVICES_EXTENDED_INFORMATION SMBIOS_TYPE_ONBOARD_DEVICES_EXTENDED_INFORMATION -#define EFI_SMBIOS_TYPE_MANAGEMENT_CONTROLLER_HOST_INTERFACE SMBIOS_TYPE_MANAGEMENT_CONTROLLER_HOST_INTERFACE -#define EFI_SMBIOS_TYPE_INACTIVE SMBIOS_TYPE_INACTIVE -#define EFI_SMBIOS_TYPE_END_OF_TABLE SMBIOS_TYPE_END_OF_TABLE -#define EFI_SMBIOS_OEM_BEGIN SMBIOS_OEM_BEGIN -#define EFI_SMBIOS_OEM_END SMBIOS_OEM_END - -typedef SMBIOS_TABLE_STRING EFI_SMBIOS_STRING; -typedef SMBIOS_TYPE EFI_SMBIOS_TYPE; -typedef SMBIOS_HANDLE EFI_SMBIOS_HANDLE; -typedef SMBIOS_STRUCTURE EFI_SMBIOS_TABLE_HEADER; +#define EFI_SMBIOS_TYPE_BIOS_INFORMATION SMBIOS_TYPE_BIOS_INFORMATION +#define EFI_SMBIOS_TYPE_SYSTEM_INFORMATION SMBIOS_TYPE_SYSTEM_INFORMATION +#define EFI_SMBIOS_TYPE_BASEBOARD_INFORMATION SMBIOS_TYPE_BASEBOARD_INFORMATION +#define EFI_SMBIOS_TYPE_SYSTEM_ENCLOSURE SMBIOS_TYPE_SYSTEM_ENCLOSURE +#define EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION SMBIOS_TYPE_PROCESSOR_INFORMATION +#define EFI_SMBIOS_TYPE_MEMORY_CONTROLLER_INFORMATION SMBIOS_TYPE_MEMORY_CONTROLLER_INFORMATION +#define EFI_SMBIOS_TYPE_MEMORY_MODULE_INFORMATON SMBIOS_TYPE_MEMORY_MODULE_INFORMATON +#define EFI_SMBIOS_TYPE_CACHE_INFORMATION SMBIOS_TYPE_CACHE_INFORMATION +#define EFI_SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION SMBIOS_TYPE_PORT_CONNECTOR_INFORMATION +#define EFI_SMBIOS_TYPE_SYSTEM_SLOTS SMBIOS_TYPE_SYSTEM_SLOTS +#define EFI_SMBIOS_TYPE_ONBOARD_DEVICE_INFORMATION SMBIOS_TYPE_ONBOARD_DEVICE_INFORMATION +#define EFI_SMBIOS_TYPE_OEM_STRINGS SMBIOS_TYPE_OEM_STRINGS +#define EFI_SMBIOS_TYPE_SYSTEM_CONFIGURATION_OPTIONS SMBIOS_TYPE_SYSTEM_CONFIGURATION_OPTIONS +#define EFI_SMBIOS_TYPE_BIOS_LANGUAGE_INFORMATION SMBIOS_TYPE_BIOS_LANGUAGE_INFORMATION +#define EFI_SMBIOS_TYPE_GROUP_ASSOCIATIONS SMBIOS_TYPE_GROUP_ASSOCIATIONS +#define EFI_SMBIOS_TYPE_SYSTEM_EVENT_LOG SMBIOS_TYPE_SYSTEM_EVENT_LOG +#define EFI_SMBIOS_TYPE_PHYSICAL_MEMORY_ARRAY SMBIOS_TYPE_PHYSICAL_MEMORY_ARRAY +#define EFI_SMBIOS_TYPE_MEMORY_DEVICE SMBIOS_TYPE_MEMORY_DEVICE +#define EFI_SMBIOS_TYPE_32BIT_MEMORY_ERROR_INFORMATION SMBIOS_TYPE_32BIT_MEMORY_ERROR_INFORMATION +#define EFI_SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS +#define EFI_SMBIOS_TYPE_MEMORY_DEVICE_MAPPED_ADDRESS SMBIOS_TYPE_MEMORY_DEVICE_MAPPED_ADDRESS +#define EFI_SMBIOS_TYPE_BUILT_IN_POINTING_DEVICE SMBIOS_TYPE_BUILT_IN_POINTING_DEVICE +#define EFI_SMBIOS_TYPE_PORTABLE_BATTERY SMBIOS_TYPE_PORTABLE_BATTERY +#define EFI_SMBIOS_TYPE_SYSTEM_RESET SMBIOS_TYPE_SYSTEM_RESET +#define EFI_SMBIOS_TYPE_HARDWARE_SECURITY SMBIOS_TYPE_HARDWARE_SECURITY +#define EFI_SMBIOS_TYPE_SYSTEM_POWER_CONTROLS SMBIOS_TYPE_SYSTEM_POWER_CONTROLS +#define EFI_SMBIOS_TYPE_VOLTAGE_PROBE SMBIOS_TYPE_VOLTAGE_PROBE +#define EFI_SMBIOS_TYPE_COOLING_DEVICE SMBIOS_TYPE_COOLING_DEVICE +#define EFI_SMBIOS_TYPE_TEMPERATURE_PROBE SMBIOS_TYPE_TEMPERATURE_PROBE +#define EFI_SMBIOS_TYPE_ELECTRICAL_CURRENT_PROBE SMBIOS_TYPE_ELECTRICAL_CURRENT_PROBE +#define EFI_SMBIOS_TYPE_OUT_OF_BAND_REMOTE_ACCESS SMBIOS_TYPE_OUT_OF_BAND_REMOTE_ACCESS +#define EFI_SMBIOS_TYPE_BOOT_INTEGRITY_SERVICE SMBIOS_TYPE_BOOT_INTEGRITY_SERVICE +#define EFI_SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION +#define EFI_SMBIOS_TYPE_64BIT_MEMORY_ERROR_INFORMATION SMBIOS_TYPE_64BIT_MEMORY_ERROR_INFORMATION +#define EFI_SMBIOS_TYPE_MANAGEMENT_DEVICE SMBIOS_TYPE_MANAGEMENT_DEVICE +#define EFI_SMBIOS_TYPE_MANAGEMENT_DEVICE_COMPONENT SMBIOS_TYPE_MANAGEMENT_DEVICE_COMPONENT +#define EFI_SMBIOS_TYPE_MANAGEMENT_DEVICE_THRESHOLD_DATA SMBIOS_TYPE_MANAGEMENT_DEVICE_THRESHOLD_DATA +#define EFI_SMBIOS_TYPE_MEMORY_CHANNEL SMBIOS_TYPE_MEMORY_CHANNEL +#define EFI_SMBIOS_TYPE_IPMI_DEVICE_INFORMATION SMBIOS_TYPE_IPMI_DEVICE_INFORMATION +#define EFI_SMBIOS_TYPE_SYSTEM_POWER_SUPPLY SMBIOS_TYPE_SYSTEM_POWER_SUPPLY +#define EFI_SMBIOS_TYPE_ADDITIONAL_INFORMATION SMBIOS_TYPE_ADDITIONAL_INFORMATION +#define EFI_SMBIOS_TYPE_ONBOARD_DEVICES_EXTENDED_INFORMATION SMBIOS_TYPE_ONBOARD_DEVICES_EXTENDED_INFORMATION +#define EFI_SMBIOS_TYPE_MANAGEMENT_CONTROLLER_HOST_INTERFACE SMBIOS_TYPE_MANAGEMENT_CONTROLLER_HOST_INTERFACE +#define EFI_SMBIOS_TYPE_INACTIVE SMBIOS_TYPE_INACTIVE +#define EFI_SMBIOS_TYPE_END_OF_TABLE SMBIOS_TYPE_END_OF_TABLE +#define EFI_SMBIOS_OEM_BEGIN SMBIOS_OEM_BEGIN +#define EFI_SMBIOS_OEM_END SMBIOS_OEM_END + +typedef SMBIOS_TABLE_STRING EFI_SMBIOS_STRING; +typedef SMBIOS_TYPE EFI_SMBIOS_TYPE; +typedef SMBIOS_HANDLE EFI_SMBIOS_HANDLE; +typedef SMBIOS_STRUCTURE EFI_SMBIOS_TABLE_HEADER; typedef struct _EFI_SMBIOS_PROTOCOL EFI_SMBIOS_PROTOCOL; @@ -116,7 +116,7 @@ EFI_STATUS IN EFI_HANDLE ProducerHandle OPTIONAL, IN OUT EFI_SMBIOS_HANDLE *SmbiosHandle, IN EFI_SMBIOS_TABLE_HEADER *Record -); + ); /** Update the string associated with an existing SMBIOS record. @@ -137,11 +137,11 @@ EFI_STATUS typedef EFI_STATUS (EFIAPI *EFI_SMBIOS_UPDATE_STRING)( - IN CONST EFI_SMBIOS_PROTOCOL *This, - IN EFI_SMBIOS_HANDLE *SmbiosHandle, - IN UINTN *StringNumber, - IN CHAR8 *String -); + IN CONST EFI_SMBIOS_PROTOCOL *This, + IN EFI_SMBIOS_HANDLE *SmbiosHandle, + IN UINTN *StringNumber, + IN CHAR8 *String + ); /** Remove an SMBIOS record. @@ -157,9 +157,9 @@ EFI_STATUS typedef EFI_STATUS (EFIAPI *EFI_SMBIOS_REMOVE)( - IN CONST EFI_SMBIOS_PROTOCOL *This, - IN EFI_SMBIOS_HANDLE SmbiosHandle -); + IN CONST EFI_SMBIOS_PROTOCOL *This, + IN EFI_SMBIOS_HANDLE SmbiosHandle + ); /** Allow the caller to discover all or some of the SMBIOS records. @@ -186,22 +186,22 @@ EFI_STATUS typedef EFI_STATUS (EFIAPI *EFI_SMBIOS_GET_NEXT)( - IN CONST EFI_SMBIOS_PROTOCOL *This, - IN OUT EFI_SMBIOS_HANDLE *SmbiosHandle, - IN EFI_SMBIOS_TYPE *Type OPTIONAL, - OUT EFI_SMBIOS_TABLE_HEADER **Record, - OUT EFI_HANDLE *ProducerHandle OPTIONAL -); + IN CONST EFI_SMBIOS_PROTOCOL *This, + IN OUT EFI_SMBIOS_HANDLE *SmbiosHandle, + IN EFI_SMBIOS_TYPE *Type OPTIONAL, + OUT EFI_SMBIOS_TABLE_HEADER **Record, + OUT EFI_HANDLE *ProducerHandle OPTIONAL + ); struct _EFI_SMBIOS_PROTOCOL { - EFI_SMBIOS_ADD Add; - EFI_SMBIOS_UPDATE_STRING UpdateString; - EFI_SMBIOS_REMOVE Remove; - EFI_SMBIOS_GET_NEXT GetNext; - UINT8 MajorVersion; ///< The major revision of the SMBIOS specification supported. - UINT8 MinorVersion; ///< The minor revision of the SMBIOS specification supported. + EFI_SMBIOS_ADD Add; + EFI_SMBIOS_UPDATE_STRING UpdateString; + EFI_SMBIOS_REMOVE Remove; + EFI_SMBIOS_GET_NEXT GetNext; + UINT8 MajorVersion; ///< The major revision of the SMBIOS specification supported. + UINT8 MinorVersion; ///< The minor revision of the SMBIOS specification supported. }; -extern EFI_GUID gEfiSmbiosProtocolGuid; +extern EFI_GUID gEfiSmbiosProtocolGuid; #endif // __SMBIOS_PROTOCOL_H__ diff --git a/MdePkg/Include/Protocol/SmbusHc.h b/MdePkg/Include/Protocol/SmbusHc.h index 3945a2c..9a4155e 100644 --- a/MdePkg/Include/Protocol/SmbusHc.h +++ b/MdePkg/Include/Protocol/SmbusHc.h @@ -123,9 +123,7 @@ EFI_STATUS IN BOOLEAN PecCheck, IN OUT UINTN *Length, IN OUT VOID *Buffer -); - - + ); /** @@ -186,8 +184,7 @@ EFI_STATUS IN BOOLEAN ArpAll, IN EFI_SMBUS_UDID *SmbusUdid OPTIONAL, IN OUT EFI_SMBUS_DEVICE_ADDRESS *SlaveAddress OPTIONAL -); - + ); /** The GetArpMap() function returns the mapping of all the SMBus devices @@ -214,7 +211,7 @@ EFI_STATUS IN CONST EFI_SMBUS_HC_PROTOCOL *This, IN OUT UINTN *Length, IN OUT EFI_SMBUS_DEVICE_MAP **SmbusDeviceMap -); + ); /** The notify function does some actions. @@ -232,8 +229,7 @@ EFI_STATUS (EFIAPI *EFI_SMBUS_NOTIFY_FUNCTION)( IN EFI_SMBUS_DEVICE_ADDRESS SlaveAddress, IN UINTN Data -); - + ); /** @@ -267,8 +263,7 @@ EFI_STATUS IN EFI_SMBUS_DEVICE_ADDRESS SlaveAddress, IN UINTN Data, IN EFI_SMBUS_NOTIFY_FUNCTION NotifyFunction -); - + ); /// /// The EFI_SMBUS_HC_PROTOCOL provides SMBus host controller management and basic data @@ -276,13 +271,12 @@ EFI_STATUS /// host controller. /// struct _EFI_SMBUS_HC_PROTOCOL { - EFI_SMBUS_HC_EXECUTE_OPERATION Execute; - EFI_SMBUS_HC_PROTOCOL_ARP_DEVICE ArpDevice; - EFI_SMBUS_HC_PROTOCOL_GET_ARP_MAP GetArpMap; - EFI_SMBUS_HC_PROTOCOL_NOTIFY Notify; + EFI_SMBUS_HC_EXECUTE_OPERATION Execute; + EFI_SMBUS_HC_PROTOCOL_ARP_DEVICE ArpDevice; + EFI_SMBUS_HC_PROTOCOL_GET_ARP_MAP GetArpMap; + EFI_SMBUS_HC_PROTOCOL_NOTIFY Notify; }; - -extern EFI_GUID gEfiSmbusHcProtocolGuid; +extern EFI_GUID gEfiSmbusHcProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/SmmAccess2.h b/MdePkg/Include/Protocol/SmmAccess2.h index cc71de4..1df3156 100644 --- a/MdePkg/Include/Protocol/SmmAccess2.h +++ b/MdePkg/Include/Protocol/SmmAccess2.h @@ -21,9 +21,9 @@ #include -#define EFI_SMM_ACCESS2_PROTOCOL_GUID EFI_MM_ACCESS_PROTOCOL_GUID +#define EFI_SMM_ACCESS2_PROTOCOL_GUID EFI_MM_ACCESS_PROTOCOL_GUID -typedef EFI_MM_ACCESS_PROTOCOL EFI_SMM_ACCESS2_PROTOCOL; +typedef EFI_MM_ACCESS_PROTOCOL EFI_SMM_ACCESS2_PROTOCOL; typedef EFI_MM_OPEN EFI_SMM_OPEN2; @@ -32,7 +32,6 @@ typedef EFI_MM_CLOSE EFI_SMM_CLOSE2; typedef EFI_MM_LOCK EFI_SMM_LOCK2; typedef EFI_MM_CAPABILITIES EFI_SMM_CAPABILITIES2; -extern EFI_GUID gEfiSmmAccess2ProtocolGuid; +extern EFI_GUID gEfiSmmAccess2ProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/SmmBase2.h b/MdePkg/Include/Protocol/SmmBase2.h index f42bf9c..04fb6b1 100644 --- a/MdePkg/Include/Protocol/SmmBase2.h +++ b/MdePkg/Include/Protocol/SmmBase2.h @@ -17,7 +17,7 @@ #define EFI_SMM_BASE2_PROTOCOL_GUID EFI_MM_BASE_PROTOCOL_GUID -typedef struct _EFI_SMM_BASE2_PROTOCOL EFI_SMM_BASE2_PROTOCOL; +typedef struct _EFI_SMM_BASE2_PROTOCOL EFI_SMM_BASE2_PROTOCOL; /** Service to indicate whether the driver is currently executing in the SMM Initialization phase. @@ -69,11 +69,10 @@ EFI_STATUS /// services and determine whether the driver is being invoked inside SMRAM or outside of SMRAM. /// struct _EFI_SMM_BASE2_PROTOCOL { - EFI_SMM_INSIDE_OUT2 InSmm; - EFI_SMM_GET_SMST_LOCATION2 GetSmstLocation; + EFI_SMM_INSIDE_OUT2 InSmm; + EFI_SMM_GET_SMST_LOCATION2 GetSmstLocation; }; -extern EFI_GUID gEfiSmmBase2ProtocolGuid; +extern EFI_GUID gEfiSmmBase2ProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/SmmCommunication.h b/MdePkg/Include/Protocol/SmmCommunication.h index 535913d..01829ac 100644 --- a/MdePkg/Include/Protocol/SmmCommunication.h +++ b/MdePkg/Include/Protocol/SmmCommunication.h @@ -14,14 +14,12 @@ #include - typedef EFI_MM_COMMUNICATE_HEADER EFI_SMM_COMMUNICATE_HEADER; -#define EFI_SMM_COMMUNICATION_PROTOCOL_GUID EFI_MM_COMMUNICATION_PROTOCOL_GUID +#define EFI_SMM_COMMUNICATION_PROTOCOL_GUID EFI_MM_COMMUNICATION_PROTOCOL_GUID typedef EFI_MM_COMMUNICATION_PROTOCOL EFI_SMM_COMMUNICATION_PROTOCOL; -extern EFI_GUID gEfiSmmCommunicationProtocolGuid; +extern EFI_GUID gEfiSmmCommunicationProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/SmmConfiguration.h b/MdePkg/Include/Protocol/SmmConfiguration.h index 8c60548..bd76f76 100644 --- a/MdePkg/Include/Protocol/SmmConfiguration.h +++ b/MdePkg/Include/Protocol/SmmConfiguration.h @@ -17,7 +17,7 @@ #include #include -#define EFI_SMM_CONFIGURATION_PROTOCOL_GUID EFI_MM_CONFIGURATION_PROTOCOL_GUID +#define EFI_SMM_CONFIGURATION_PROTOCOL_GUID EFI_MM_CONFIGURATION_PROTOCOL_GUID /// /// Structure describing a SMRAM region which cannot be used for the SMRAM heap. @@ -35,7 +35,7 @@ typedef struct _EFI_SMM_RESERVED_SMRAM_REGION { UINT64 SmramReservedSize; } EFI_SMM_RESERVED_SMRAM_REGION; -typedef struct _EFI_SMM_CONFIGURATION_PROTOCOL EFI_SMM_CONFIGURATION_PROTOCOL; +typedef struct _EFI_SMM_CONFIGURATION_PROTOCOL EFI_SMM_CONFIGURATION_PROTOCOL; /** Register the SMM Foundation entry point. @@ -68,11 +68,10 @@ struct _EFI_SMM_CONFIGURATION_PROTOCOL { /// /// A pointer to an array SMRAM ranges used by the initial SMM entry code. /// - EFI_SMM_RESERVED_SMRAM_REGION *SmramReservedRegions; - EFI_SMM_REGISTER_SMM_ENTRY RegisterSmmEntry; + EFI_SMM_RESERVED_SMRAM_REGION *SmramReservedRegions; + EFI_SMM_REGISTER_SMM_ENTRY RegisterSmmEntry; }; -extern EFI_GUID gEfiSmmConfigurationProtocolGuid; +extern EFI_GUID gEfiSmmConfigurationProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/SmmControl2.h b/MdePkg/Include/Protocol/SmmControl2.h index b28c3c1..4d23e4e 100644 --- a/MdePkg/Include/Protocol/SmmControl2.h +++ b/MdePkg/Include/Protocol/SmmControl2.h @@ -21,15 +21,14 @@ #include -#define EFI_SMM_CONTROL2_PROTOCOL_GUID EFI_MM_CONTROL_PROTOCOL_GUID +#define EFI_SMM_CONTROL2_PROTOCOL_GUID EFI_MM_CONTROL_PROTOCOL_GUID typedef EFI_MM_CONTROL_PROTOCOL EFI_SMM_CONTROL2_PROTOCOL; -typedef EFI_MM_PERIOD EFI_SMM_PERIOD; +typedef EFI_MM_PERIOD EFI_SMM_PERIOD; typedef EFI_MM_ACTIVATE EFI_SMM_ACTIVATE2; typedef EFI_MM_DEACTIVATE EFI_SMM_DEACTIVATE2; -extern EFI_GUID gEfiSmmControl2ProtocolGuid; +extern EFI_GUID gEfiSmmControl2ProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/SmmCpu.h b/MdePkg/Include/Protocol/SmmCpu.h index 90a7321..d72b512 100644 --- a/MdePkg/Include/Protocol/SmmCpu.h +++ b/MdePkg/Include/Protocol/SmmCpu.h @@ -92,29 +92,27 @@ #define EFI_SMM_SAVE_STATE_REGISTER_LMA EFI_MM_SAVE_STATE_REGISTER_LMA #define EFI_SMM_SAVE_STATE_REGISTER_PROCESSOR_ID EFI_MM_SAVE_STATE_REGISTER_PROCESSOR_ID -typedef EFI_MM_SAVE_STATE_REGISTER EFI_SMM_SAVE_STATE_REGISTER; - - -#define EFI_SMM_SAVE_STATE_REGISTER_LMA_32BIT EFI_MM_SAVE_STATE_REGISTER_LMA_32BIT -#define EFI_SMM_SAVE_STATE_REGISTER_LMA_64BIT EFI_MM_SAVE_STATE_REGISTER_LMA_64BIT +typedef EFI_MM_SAVE_STATE_REGISTER EFI_SMM_SAVE_STATE_REGISTER; +#define EFI_SMM_SAVE_STATE_REGISTER_LMA_32BIT EFI_MM_SAVE_STATE_REGISTER_LMA_32BIT +#define EFI_SMM_SAVE_STATE_REGISTER_LMA_64BIT EFI_MM_SAVE_STATE_REGISTER_LMA_64BIT /// /// Size width of I/O instruction /// -#define EFI_SMM_SAVE_STATE_IO_WIDTH_UINT8 EFI_MM_SAVE_STATE_IO_WIDTH_UINT8 -#define EFI_SMM_SAVE_STATE_IO_WIDTH_UINT16 EFI_MM_SAVE_STATE_IO_WIDTH_UINT16 -#define EFI_SMM_SAVE_STATE_IO_WIDTH_UINT32 EFI_MM_SAVE_STATE_IO_WIDTH_UINT32 -#define EFI_SMM_SAVE_STATE_IO_WIDTH_UINT64 EFI_MM_SAVE_STATE_IO_WIDTH_UINT64 +#define EFI_SMM_SAVE_STATE_IO_WIDTH_UINT8 EFI_MM_SAVE_STATE_IO_WIDTH_UINT8 +#define EFI_SMM_SAVE_STATE_IO_WIDTH_UINT16 EFI_MM_SAVE_STATE_IO_WIDTH_UINT16 +#define EFI_SMM_SAVE_STATE_IO_WIDTH_UINT32 EFI_MM_SAVE_STATE_IO_WIDTH_UINT32 +#define EFI_SMM_SAVE_STATE_IO_WIDTH_UINT64 EFI_MM_SAVE_STATE_IO_WIDTH_UINT64 typedef EFI_MM_SAVE_STATE_IO_WIDTH EFI_SMM_SAVE_STATE_IO_WIDTH; /// /// Types of I/O instruction /// -#define EFI_SMM_SAVE_STATE_IO_TYPE_INPUT EFI_MM_SAVE_STATE_IO_TYPE_INPUT -#define EFI_SMM_SAVE_STATE_IO_TYPE_OUTPUT EFI_MM_SAVE_STATE_IO_TYPE_OUTPUT -#define EFI_SMM_SAVE_STATE_IO_TYPE_STRING EFI_MM_SAVE_STATE_IO_TYPE_STRING -#define EFI_SMM_SAVE_STATE_IO_TYPE_REP_PREFIX EFI_MM_SAVE_STATE_IO_TYPE_REP_PREFIX +#define EFI_SMM_SAVE_STATE_IO_TYPE_INPUT EFI_MM_SAVE_STATE_IO_TYPE_INPUT +#define EFI_SMM_SAVE_STATE_IO_TYPE_OUTPUT EFI_MM_SAVE_STATE_IO_TYPE_OUTPUT +#define EFI_SMM_SAVE_STATE_IO_TYPE_STRING EFI_MM_SAVE_STATE_IO_TYPE_STRING +#define EFI_SMM_SAVE_STATE_IO_TYPE_REP_PREFIX EFI_MM_SAVE_STATE_IO_TYPE_REP_PREFIX typedef EFI_MM_SAVE_STATE_IO_TYPE EFI_SMM_SAVE_STATE_IO_TYPE; typedef EFI_MM_SAVE_STATE_IO_INFO EFI_SMM_SAVE_STATE_IO_INFO; @@ -124,7 +122,6 @@ typedef EFI_MM_CPU_PROTOCOL EFI_SMM_CPU_PROTOCOL; typedef EFI_MM_READ_SAVE_STATE EFI_SMM_READ_SAVE_STATE; typedef EFI_MM_WRITE_SAVE_STATE EFI_SMM_WRITE_SAVE_STATE; -extern EFI_GUID gEfiSmmCpuProtocolGuid; +extern EFI_GUID gEfiSmmCpuProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/SmmCpuIo2.h b/MdePkg/Include/Protocol/SmmCpuIo2.h index 78b8546..4b52ec5 100644 --- a/MdePkg/Include/Protocol/SmmCpuIo2.h +++ b/MdePkg/Include/Protocol/SmmCpuIo2.h @@ -13,23 +13,23 @@ #include -#define EFI_SMM_CPU_IO2_PROTOCOL_GUID EFI_MM_CPU_IO_PROTOCOL_GUID +#define EFI_SMM_CPU_IO2_PROTOCOL_GUID EFI_MM_CPU_IO_PROTOCOL_GUID -typedef EFI_MM_CPU_IO_PROTOCOL EFI_SMM_CPU_IO2_PROTOCOL; +typedef EFI_MM_CPU_IO_PROTOCOL EFI_SMM_CPU_IO2_PROTOCOL; /// /// Width of the SMM CPU I/O operations /// -#define SMM_IO_UINT8 MM_IO_UINT8 -#define SMM_IO_UINT16 MM_IO_UINT16 -#define SMM_IO_UINT32 MM_IO_UINT32 -#define SMM_IO_UINT64 MM_IO_UINT64 +#define SMM_IO_UINT8 MM_IO_UINT8 +#define SMM_IO_UINT16 MM_IO_UINT16 +#define SMM_IO_UINT32 MM_IO_UINT32 +#define SMM_IO_UINT64 MM_IO_UINT64 typedef EFI_MM_IO_WIDTH EFI_SMM_IO_WIDTH; -typedef EFI_MM_CPU_IO EFI_SMM_CPU_IO2; +typedef EFI_MM_CPU_IO EFI_SMM_CPU_IO2; typedef EFI_MM_IO_ACCESS EFI_SMM_IO_ACCESS2; -extern EFI_GUID gEfiSmmCpuIo2ProtocolGuid; +extern EFI_GUID gEfiSmmCpuIo2ProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/SmmEndOfDxe.h b/MdePkg/Include/Protocol/SmmEndOfDxe.h index ca69c1c..db9e6bb 100644 --- a/MdePkg/Include/Protocol/SmmEndOfDxe.h +++ b/MdePkg/Include/Protocol/SmmEndOfDxe.h @@ -19,8 +19,8 @@ #include -#define EFI_SMM_END_OF_DXE_PROTOCOL_GUID EFI_MM_END_OF_DXE_PROTOCOL_GUID +#define EFI_SMM_END_OF_DXE_PROTOCOL_GUID EFI_MM_END_OF_DXE_PROTOCOL_GUID -extern EFI_GUID gEfiSmmEndOfDxeProtocolGuid; +extern EFI_GUID gEfiSmmEndOfDxeProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/SmmGpiDispatch2.h b/MdePkg/Include/Protocol/SmmGpiDispatch2.h index b5787e2..38b6386 100644 --- a/MdePkg/Include/Protocol/SmmGpiDispatch2.h +++ b/MdePkg/Include/Protocol/SmmGpiDispatch2.h @@ -23,11 +23,11 @@ #include #include -#define EFI_SMM_GPI_DISPATCH2_PROTOCOL_GUID EFI_MM_GPI_DISPATCH_PROTOCOL_GUID +#define EFI_SMM_GPI_DISPATCH2_PROTOCOL_GUID EFI_MM_GPI_DISPATCH_PROTOCOL_GUID /// /// The dispatch function's context. /// -typedef EFI_MM_GPI_REGISTER_CONTEXT EFI_SMM_GPI_REGISTER_CONTEXT; +typedef EFI_MM_GPI_REGISTER_CONTEXT EFI_SMM_GPI_REGISTER_CONTEXT; typedef EFI_MM_GPI_REGISTER EFI_SMM_GPI_REGISTER2; @@ -35,9 +35,6 @@ typedef EFI_MM_GPI_UNREGISTER EFI_SMM_GPI_UNREGISTER2; typedef EFI_MM_GPI_DISPATCH_PROTOCOL EFI_SMM_GPI_DISPATCH2_PROTOCOL; - - -extern EFI_GUID gEfiSmmGpiDispatch2ProtocolGuid; +extern EFI_GUID gEfiSmmGpiDispatch2ProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/SmmIoTrapDispatch2.h b/MdePkg/Include/Protocol/SmmIoTrapDispatch2.h index 3756b10..b7f62d6 100644 --- a/MdePkg/Include/Protocol/SmmIoTrapDispatch2.h +++ b/MdePkg/Include/Protocol/SmmIoTrapDispatch2.h @@ -37,11 +37,10 @@ typedef EFI_MM_IO_TRAP_CONTEXT EFI_SMM_IO_TRAP_CONTEXT; typedef EFI_MM_IO_TRAP_DISPATCH_PROTOCOL EFI_SMM_IO_TRAP_DISPATCH2_PROTOCOL; -typedef EFI_MM_IO_TRAP_DISPATCH_REGISTER EFI_SMM_IO_TRAP_DISPATCH2_REGISTER; +typedef EFI_MM_IO_TRAP_DISPATCH_REGISTER EFI_SMM_IO_TRAP_DISPATCH2_REGISTER; typedef EFI_MM_IO_TRAP_DISPATCH_UNREGISTER EFI_SMM_IO_TRAP_DISPATCH2_UNREGISTER; -extern EFI_GUID gEfiSmmIoTrapDispatch2ProtocolGuid; +extern EFI_GUID gEfiSmmIoTrapDispatch2ProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/SmmPciRootBridgeIo.h b/MdePkg/Include/Protocol/SmmPciRootBridgeIo.h index a275be3..93ddcb4 100644 --- a/MdePkg/Include/Protocol/SmmPciRootBridgeIo.h +++ b/MdePkg/Include/Protocol/SmmPciRootBridgeIo.h @@ -13,16 +13,15 @@ #include -#define EFI_SMM_PCI_ROOT_BRIDGE_IO_PROTOCOL_GUID EFI_MM_PCI_ROOT_BRIDGE_IO_PROTOCOL_GUID +#define EFI_SMM_PCI_ROOT_BRIDGE_IO_PROTOCOL_GUID EFI_MM_PCI_ROOT_BRIDGE_IO_PROTOCOL_GUID /// /// This protocol provides the same functionality as the PCI Root Bridge I/O Protocol defined in the /// UEFI 2.1 Specifcation, section 13.2, except that the functions for Map() and Unmap() may return /// EFI_UNSUPPORTED. /// -typedef EFI_MM_PCI_ROOT_BRIDGE_IO_PROTOCOL EFI_SMM_PCI_ROOT_BRIDGE_IO_PROTOCOL; +typedef EFI_MM_PCI_ROOT_BRIDGE_IO_PROTOCOL EFI_SMM_PCI_ROOT_BRIDGE_IO_PROTOCOL; -extern EFI_GUID gEfiSmmPciRootBridgeIoProtocolGuid; +extern EFI_GUID gEfiSmmPciRootBridgeIoProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/SmmPeriodicTimerDispatch2.h b/MdePkg/Include/Protocol/SmmPeriodicTimerDispatch2.h index 79b64fe..9dca4de 100644 --- a/MdePkg/Include/Protocol/SmmPeriodicTimerDispatch2.h +++ b/MdePkg/Include/Protocol/SmmPeriodicTimerDispatch2.h @@ -18,7 +18,7 @@ #include #include -#define EFI_SMM_PERIODIC_TIMER_DISPATCH2_PROTOCOL_GUID EFI_MM_PERIODIC_TIMER_DISPATCH_PROTOCOL_GUID +#define EFI_SMM_PERIODIC_TIMER_DISPATCH2_PROTOCOL_GUID EFI_MM_PERIODIC_TIMER_DISPATCH_PROTOCOL_GUID /// /// Example: A chipset supports periodic SMIs on every 64ms or 2 seconds. @@ -44,13 +44,13 @@ typedef struct { /// The minimum period of time in 100 nanosecond units that the child gets called. The /// child will be called back after a time greater than the time Period. /// - UINT64 Period; + UINT64 Period; /// /// The period of time interval between SMIs. Children of this interface should use this /// field when registering for periodic timer intervals when a finer granularity periodic /// SMI is desired. /// - UINT64 SmiTickInterval; + UINT64 SmiTickInterval; } EFI_SMM_PERIODIC_TIMER_REGISTER_CONTEXT; /// @@ -60,7 +60,7 @@ typedef struct { /// typedef EFI_MM_PERIODIC_TIMER_CONTEXT EFI_SMM_PERIODIC_TIMER_CONTEXT; -typedef struct _EFI_SMM_PERIODIC_TIMER_DISPATCH2_PROTOCOL EFI_SMM_PERIODIC_TIMER_DISPATCH2_PROTOCOL; +typedef struct _EFI_SMM_PERIODIC_TIMER_DISPATCH2_PROTOCOL EFI_SMM_PERIODIC_TIMER_DISPATCH2_PROTOCOL; /** Register a child SMI source dispatch function for SMM periodic timer. @@ -145,12 +145,11 @@ EFI_STATUS /// This protocol provides the parent dispatch service for the periodical timer SMI source generator. /// struct _EFI_SMM_PERIODIC_TIMER_DISPATCH2_PROTOCOL { - EFI_SMM_PERIODIC_TIMER_REGISTER2 Register; - EFI_SMM_PERIODIC_TIMER_UNREGISTER2 UnRegister; - EFI_SMM_PERIODIC_TIMER_INTERVAL2 GetNextShorterInterval; + EFI_SMM_PERIODIC_TIMER_REGISTER2 Register; + EFI_SMM_PERIODIC_TIMER_UNREGISTER2 UnRegister; + EFI_SMM_PERIODIC_TIMER_INTERVAL2 GetNextShorterInterval; }; -extern EFI_GUID gEfiSmmPeriodicTimerDispatch2ProtocolGuid; +extern EFI_GUID gEfiSmmPeriodicTimerDispatch2ProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/SmmPowerButtonDispatch2.h b/MdePkg/Include/Protocol/SmmPowerButtonDispatch2.h index 2b1f249..5a37aa3 100644 --- a/MdePkg/Include/Protocol/SmmPowerButtonDispatch2.h +++ b/MdePkg/Include/Protocol/SmmPowerButtonDispatch2.h @@ -17,7 +17,7 @@ #include -#define EFI_SMM_POWER_BUTTON_DISPATCH2_PROTOCOL_GUID EFI_MM_POWER_BUTTON_DISPATCH_PROTOCOL_GUID +#define EFI_SMM_POWER_BUTTON_DISPATCH2_PROTOCOL_GUID EFI_MM_POWER_BUTTON_DISPATCH_PROTOCOL_GUID /// /// The dispatch function's context. @@ -30,7 +30,6 @@ typedef EFI_MM_POWER_BUTTON_REGISTER EFI_SMM_POWER_BUTTON_REGISTER2; typedef EFI_MM_POWER_BUTTON_UNREGISTER EFI_SMM_POWER_BUTTON_UNREGISTER2; -extern EFI_GUID gEfiSmmPowerButtonDispatch2ProtocolGuid; +extern EFI_GUID gEfiSmmPowerButtonDispatch2ProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/SmmReadyToLock.h b/MdePkg/Include/Protocol/SmmReadyToLock.h index f701984..236aec68 100644 --- a/MdePkg/Include/Protocol/SmmReadyToLock.h +++ b/MdePkg/Include/Protocol/SmmReadyToLock.h @@ -21,8 +21,8 @@ #include -#define EFI_SMM_READY_TO_LOCK_PROTOCOL_GUID EFI_MM_READY_TO_LOCK_PROTOCOL_GUID +#define EFI_SMM_READY_TO_LOCK_PROTOCOL_GUID EFI_MM_READY_TO_LOCK_PROTOCOL_GUID -extern EFI_GUID gEfiSmmReadyToLockProtocolGuid; +extern EFI_GUID gEfiSmmReadyToLockProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/SmmReportStatusCodeHandler.h b/MdePkg/Include/Protocol/SmmReportStatusCodeHandler.h index d0b36ac..9b24eb3 100644 --- a/MdePkg/Include/Protocol/SmmReportStatusCodeHandler.h +++ b/MdePkg/Include/Protocol/SmmReportStatusCodeHandler.h @@ -14,7 +14,7 @@ #include -#define EFI_SMM_RSC_HANDLER_PROTOCOL_GUID EFI_MM_RSC_HANDLER_PROTOCOL_GUID +#define EFI_SMM_RSC_HANDLER_PROTOCOL_GUID EFI_MM_RSC_HANDLER_PROTOCOL_GUID typedef EFI_MM_RSC_HANDLER_CALLBACK EFI_SMM_RSC_HANDLER_CALLBACK; @@ -24,6 +24,6 @@ typedef EFI_MM_RSC_HANDLER_UNREGISTER EFI_SMM_RSC_HANDLER_UNREGISTER; typedef EFI_MM_RSC_HANDLER_PROTOCOL EFI_SMM_RSC_HANDLER_PROTOCOL; -extern EFI_GUID gEfiSmmRscHandlerProtocolGuid; +extern EFI_GUID gEfiSmmRscHandlerProtocolGuid; #endif // __SMM_REPORT_STATUS_CODE_HANDLER_PROTOCOL_H__ diff --git a/MdePkg/Include/Protocol/SmmStandbyButtonDispatch2.h b/MdePkg/Include/Protocol/SmmStandbyButtonDispatch2.h index c41c180..ca26d58 100644 --- a/MdePkg/Include/Protocol/SmmStandbyButtonDispatch2.h +++ b/MdePkg/Include/Protocol/SmmStandbyButtonDispatch2.h @@ -17,7 +17,7 @@ #include -#define EFI_SMM_STANDBY_BUTTON_DISPATCH2_PROTOCOL_GUID EFI_MM_STANDBY_BUTTON_DISPATCH_PROTOCOL_GUID +#define EFI_SMM_STANDBY_BUTTON_DISPATCH2_PROTOCOL_GUID EFI_MM_STANDBY_BUTTON_DISPATCH_PROTOCOL_GUID /// /// The dispatch function's context. @@ -30,7 +30,6 @@ typedef EFI_MM_STANDBY_BUTTON_REGISTER EFI_SMM_STANDBY_BUTTON_REGISTER2; typedef EFI_MM_STANDBY_BUTTON_UNREGISTER EFI_SMM_STANDBY_BUTTON_UNREGISTER2; -extern EFI_GUID gEfiSmmStandbyButtonDispatch2ProtocolGuid; +extern EFI_GUID gEfiSmmStandbyButtonDispatch2ProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/SmmStatusCode.h b/MdePkg/Include/Protocol/SmmStatusCode.h index 521c0d8..79ca480 100644 --- a/MdePkg/Include/Protocol/SmmStatusCode.h +++ b/MdePkg/Include/Protocol/SmmStatusCode.h @@ -13,13 +13,12 @@ #include -#define EFI_SMM_STATUS_CODE_PROTOCOL_GUID EFI_MM_STATUS_CODE_PROTOCOL_GUID +#define EFI_SMM_STATUS_CODE_PROTOCOL_GUID EFI_MM_STATUS_CODE_PROTOCOL_GUID -typedef EFI_MM_STATUS_CODE_PROTOCOL EFI_SMM_STATUS_CODE_PROTOCOL; +typedef EFI_MM_STATUS_CODE_PROTOCOL EFI_SMM_STATUS_CODE_PROTOCOL; typedef EFI_MM_REPORT_STATUS_CODE EFI_SMM_REPORT_STATUS_CODE; -extern EFI_GUID gEfiSmmStatusCodeProtocolGuid; +extern EFI_GUID gEfiSmmStatusCodeProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/SmmSwDispatch2.h b/MdePkg/Include/Protocol/SmmSwDispatch2.h index f264bb3..d0db953 100644 --- a/MdePkg/Include/Protocol/SmmSwDispatch2.h +++ b/MdePkg/Include/Protocol/SmmSwDispatch2.h @@ -15,7 +15,7 @@ #include #include -#define EFI_SMM_SW_DISPATCH2_PROTOCOL_GUID EFI_MM_SW_DISPATCH_PROTOCOL_GUID +#define EFI_SMM_SW_DISPATCH2_PROTOCOL_GUID EFI_MM_SW_DISPATCH_PROTOCOL_GUID /// /// A particular chipset may not support all possible software SMI input values. @@ -23,7 +23,7 @@ /// child registration for each SwSmiInputValue. /// typedef struct { - UINTN SwSmiInputValue; + UINTN SwSmiInputValue; } EFI_SMM_SW_REGISTER_CONTEXT; /// @@ -36,18 +36,18 @@ typedef struct { /// /// The 0-based index of the CPU which generated the software SMI. /// - UINTN SwSmiCpuIndex; + UINTN SwSmiCpuIndex; /// /// This value corresponds directly to the CommandPort parameter used in the call to Trigger(). /// - UINT8 CommandPort; + UINT8 CommandPort; /// /// This value corresponds directly to the DataPort parameter used in the call to Trigger(). /// - UINT8 DataPort; + UINT8 DataPort; } EFI_SMM_SW_CONTEXT; -typedef struct _EFI_SMM_SW_DISPATCH2_PROTOCOL EFI_SMM_SW_DISPATCH2_PROTOCOL; +typedef struct _EFI_SMM_SW_DISPATCH2_PROTOCOL EFI_SMM_SW_DISPATCH2_PROTOCOL; /** Register a child SMI source dispatch function for the specified software SMI. @@ -104,7 +104,7 @@ EFI_STATUS (EFIAPI *EFI_SMM_SW_UNREGISTER2)( IN CONST EFI_SMM_SW_DISPATCH2_PROTOCOL *This, IN EFI_HANDLE DispatchHandle -); + ); /// /// Interface structure for the SMM Software SMI Dispatch Protocol. @@ -114,15 +114,15 @@ EFI_STATUS /// interrupt in the EFI_SMM_SW_REGISTER_CONTEXT is denoted by MaximumSwiValue. /// struct _EFI_SMM_SW_DISPATCH2_PROTOCOL { - EFI_SMM_SW_REGISTER2 Register; - EFI_SMM_SW_UNREGISTER2 UnRegister; + EFI_SMM_SW_REGISTER2 Register; + EFI_SMM_SW_UNREGISTER2 UnRegister; /// /// A read-only field that describes the maximum value that can be used in the /// EFI_SMM_SW_DISPATCH2_PROTOCOL.Register() service. /// - UINTN MaximumSwiValue; + UINTN MaximumSwiValue; }; -extern EFI_GUID gEfiSmmSwDispatch2ProtocolGuid; +extern EFI_GUID gEfiSmmSwDispatch2ProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/SmmSxDispatch2.h b/MdePkg/Include/Protocol/SmmSxDispatch2.h index c3ab8bb..ff44530 100644 --- a/MdePkg/Include/Protocol/SmmSxDispatch2.h +++ b/MdePkg/Include/Protocol/SmmSxDispatch2.h @@ -14,19 +14,19 @@ #include -#define EFI_SMM_SX_DISPATCH2_PROTOCOL_GUID EFI_MM_SX_DISPATCH_PROTOCOL_GUID +#define EFI_SMM_SX_DISPATCH2_PROTOCOL_GUID EFI_MM_SX_DISPATCH_PROTOCOL_GUID /// /// The dispatch function's context /// typedef EFI_MM_SX_REGISTER_CONTEXT EFI_SMM_SX_REGISTER_CONTEXT; -typedef EFI_MM_SX_DISPATCH_PROTOCOL EFI_SMM_SX_DISPATCH2_PROTOCOL; +typedef EFI_MM_SX_DISPATCH_PROTOCOL EFI_SMM_SX_DISPATCH2_PROTOCOL; typedef EFI_MM_SX_REGISTER EFI_SMM_SX_REGISTER2; typedef EFI_MM_SX_UNREGISTER EFI_SMM_SX_UNREGISTER2; -extern EFI_GUID gEfiSmmSxDispatch2ProtocolGuid; +extern EFI_GUID gEfiSmmSxDispatch2ProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/SmmUsbDispatch2.h b/MdePkg/Include/Protocol/SmmUsbDispatch2.h index a74fb90..5c0dc5e 100644 --- a/MdePkg/Include/Protocol/SmmUsbDispatch2.h +++ b/MdePkg/Include/Protocol/SmmUsbDispatch2.h @@ -17,7 +17,7 @@ #include -#define EFI_SMM_USB_DISPATCH2_PROTOCOL_GUID EFI_MM_USB_DISPATCH_PROTOCOL_GUID +#define EFI_SMM_USB_DISPATCH2_PROTOCOL_GUID EFI_MM_USB_DISPATCH_PROTOCOL_GUID /// /// USB SMI event types @@ -35,7 +35,6 @@ typedef EFI_MM_USB_REGISTER EFI_SMM_USB_REGISTER2; typedef EFI_MM_USB_UNREGISTER EFI_SMM_USB_UNREGISTER2; -extern EFI_GUID gEfiSmmUsbDispatch2ProtocolGuid; +extern EFI_GUID gEfiSmmUsbDispatch2ProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/SpiConfiguration.h b/MdePkg/Include/Protocol/SpiConfiguration.h index 44e4760..3f8fb9f 100644 --- a/MdePkg/Include/Protocol/SpiConfiguration.h +++ b/MdePkg/Include/Protocol/SpiConfiguration.h @@ -54,7 +54,7 @@ typedef struct _EFI_SPI_PERIPHERAL EFI_SPI_PERIPHERAL; **/ typedef EFI_STATUS -(EFIAPI *EFI_SPI_CHIP_SELECT) ( +(EFIAPI *EFI_SPI_CHIP_SELECT)( IN CONST EFI_SPI_PERIPHERAL *SpiPeripheral, IN BOOLEAN PinValue ); @@ -85,7 +85,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SPI_CLOCK) ( +(EFIAPI *EFI_SPI_CLOCK)( IN CONST EFI_SPI_PERIPHERAL *SpiPeripheral, IN UINT32 *ClockHz ); @@ -99,31 +99,31 @@ typedef struct _EFI_SPI_PART { /// /// A Unicode string specifying the SPI chip vendor. /// - CONST CHAR16 *Vendor; + CONST CHAR16 *Vendor; /// /// A Unicode string specifying the SPI chip part number. /// - CONST CHAR16 *PartNumber; + CONST CHAR16 *PartNumber; /// /// The minimum SPI bus clock frequency used to access this chip. This value /// may be specified in the chip's datasheet. If not, use the value of zero. /// - UINT32 MinClockHz; + UINT32 MinClockHz; /// /// The maximum SPI bus clock frequency used to access this chip. This value /// is found in the chip's datasheet. /// - UINT32 MaxClockHz; + UINT32 MaxClockHz; /// /// Specify the polarity of the chip select pin. This value can be found in /// the SPI chip's datasheet. Specify TRUE when a one asserts the chip select - ///and FALSE when a zero asserts the chip select. + /// and FALSE when a zero asserts the chip select. /// - BOOLEAN ChipSelectPolarity; + BOOLEAN ChipSelectPolarity; } EFI_SPI_PART; /// @@ -137,26 +137,26 @@ typedef struct _EFI_SPI_BUS { /// /// A Unicode string describing the SPI bus /// - CONST CHAR16 *FriendlyName; + CONST CHAR16 *FriendlyName; /// /// Address of the first EFI_SPI_PERIPHERAL data structure connected to this /// bus. Specify NULL if there are no SPI peripherals connected to this bus. /// - CONST EFI_SPI_PERIPHERAL *Peripherallist; + CONST EFI_SPI_PERIPHERAL *Peripherallist; /// /// Address of an EFI_DEVICE_PATH_PROTOCOL data structure which uniquely /// describes the SPI controller. /// - CONST EFI_DEVICE_PATH_PROTOCOL *ControllerPath; + CONST EFI_DEVICE_PATH_PROTOCOL *ControllerPath; /// /// Address of the routine which controls the clock used by the SPI bus for /// this SPI peripheral. The SPI host co ntroller's clock routine is called /// when this value is set to NULL. /// - EFI_SPI_CLOCK Clock; + EFI_SPI_CLOCK Clock; /// /// Address of a data structure containing the additional values which @@ -165,7 +165,7 @@ typedef struct _EFI_SPI_BUS { /// host's SPI controller driver. When Clock is not NULL, the declaration for /// this data structure is provided by the board layer. /// - VOID *ClockParameter; + VOID *ClockParameter; } EFI_SPI_BUS; /// @@ -180,12 +180,12 @@ struct _EFI_SPI_PERIPHERAL { /// Address of the next EFI_SPI_PERIPHERAL data structure. Specify NULL if /// the current data structure is the last one on the SPI bus. /// - CONST EFI_SPI_PERIPHERAL *NextSpiPeripheral; + CONST EFI_SPI_PERIPHERAL *NextSpiPeripheral; /// /// A unicode string describing the function of the SPI part. /// - CONST CHAR16 *FriendlyName; + CONST CHAR16 *FriendlyName; /// /// Address of a GUID provided by the vendor of the SPI peripheral driver. @@ -195,32 +195,32 @@ struct _EFI_SPI_PERIPHERAL { /// This reduces the comparison logic in the SPI peripheral driver's /// Supported routine. /// - CONST GUID *SpiPeripheralDriverGuid; + CONST GUID *SpiPeripheralDriverGuid; /// /// The address of an EFI_SPI_PART data structure which describes this chip. /// - CONST EFI_SPI_PART *SpiPart; + CONST EFI_SPI_PART *SpiPart; /// /// The maximum clock frequency is specified in the EFI_SPI_P ART. When this /// this value is non-zero and less than the value in the EFI_SPI_PART then /// this value is used for the maximum clock frequency for the SPI part. /// - UINT32 MaxClockHz; + UINT32 MaxClockHz; /// /// Specify the idle value of the clock as found in the datasheet. /// Use zero (0) if the clock'S idle value is low or one (1) if the the /// clock's idle value is high. /// - BOOLEAN ClockPolarity; + BOOLEAN ClockPolarity; /// /// Specify the clock delay after chip select. Specify zero (0) to delay an /// entire clock cycle or one (1) to delay only half a clock cycle. /// - BOOLEAN ClockPhase; + BOOLEAN ClockPhase; /// /// SPI peripheral attributes, select zero or more of: @@ -229,27 +229,27 @@ struct _EFI_SPI_PERIPHERAL { /// * SPI_PART_SUPPORTS_4_B1T_DATA_BUS_W1DTH - The SPI peripheral is wired to /// support a 4-bit data bus /// - UINT32 Attributes; + UINT32 Attributes; /// /// Address of a vendor specific data structure containing additional board /// configuration details related to the SPI chip. The SPI peripheral layer /// uses this data structure when configuring the chip. /// - CONST VOID *ConfigurationData; + CONST VOID *ConfigurationData; /// /// The address of an EFI_SPI_BUS data structure which describes the SPI bus /// to which this chip is connected. /// - CONST EFI_SPI_BUS *SpiBus; + CONST EFI_SPI_BUS *SpiBus; /// /// Address of the routine which controls the chip select pin for this SPI /// peripheral. Call the SPI host controller's chip select routine when this /// value is set to NULL. /// - EFI_SPI_CHIP_SELECT ChipSelect; + EFI_SPI_CHIP_SELECT ChipSelect; /// /// Address of a data structure containing the additional values which @@ -260,7 +260,7 @@ struct _EFI_SPI_PERIPHERAL { /// control. When Chipselect is not NULL, the declaration for this data /// structure is provided by the board layer. /// - VOID *ChipSelectParameter; + VOID *ChipSelectParameter; }; /// @@ -274,14 +274,14 @@ typedef struct _EFI_SPI_CONFIGURATION_PROTOCOL { /// /// The number of SPI busses on the board. /// - UINT32 BusCount; + UINT32 BusCount; /// /// The address of an array of EFI_SPI_BUS data structure addresses. /// - CONST EFI_SPI_BUS *CONST *CONST Buslist; + CONST EFI_SPI_BUS *CONST *CONST Buslist; } EFI_SPI_CONFIGURATION_PROTOCOL; -extern EFI_GUID gEfiSpiConfigurationProtocolGuid; +extern EFI_GUID gEfiSpiConfigurationProtocolGuid; #endif // __SPI_CONFIGURATION_PROTOCOL_H__ diff --git a/MdePkg/Include/Protocol/SpiHc.h b/MdePkg/Include/Protocol/SpiHc.h index 6840c25..30128dd 100644 --- a/MdePkg/Include/Protocol/SpiHc.h +++ b/MdePkg/Include/Protocol/SpiHc.h @@ -54,7 +54,7 @@ typedef struct _EFI_SPI_HC_PROTOCOL EFI_SPI_HC_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI *EFI_SPI_HC_PROTOCOL_CHIP_SELECT) ( +(EFIAPI *EFI_SPI_HC_PROTOCOL_CHIP_SELECT)( IN CONST EFI_SPI_HC_PROTOCOL *This, IN CONST EFI_SPI_PERIPHERAL *SpiPeripheral, IN BOOLEAN PinValue @@ -87,7 +87,7 @@ typedef EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SPI_HC_PROTOCOL_CLOCK) ( +(EFIAPI *EFI_SPI_HC_PROTOCOL_CLOCK)( IN CONST EFI_SPI_HC_PROTOCOL *This, IN CONST EFI_SPI_PERIPHERAL *SpiPeripheral, IN UINT32 *ClockHz @@ -116,7 +116,7 @@ typedef EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SPI_HC_PROTOCOL_TRANSACTION) ( +(EFIAPI *EFI_SPI_HC_PROTOCOL_TRANSACTION)( IN CONST EFI_SPI_HC_PROTOCOL *This, IN EFI_SPI_BUS_TRANSACTION *BusTransaction ); @@ -151,38 +151,38 @@ struct _EFI_SPI_HC_PROTOCOL { /// sending) operation.The SPI host controller must support a 1 - bit bus /// width. /// - UINT32 Attributes; + UINT32 Attributes; /// /// Mask of frame sizes which the SPI host controller supports. Frame size of /// N-bits is supported when bit N-1 is set. The host controller must support /// a frame size of 8-bits. /// - UINT32 FrameSizeSupportMask; + UINT32 FrameSizeSupportMask; /// /// Maximum transfer size in bytes: 1 - Oxffffffff /// - UINT32 MaximumTransferBytes; + UINT32 MaximumTransferBytes; /// /// Assert or deassert the SPI chip select. /// - EFI_SPI_HC_PROTOCOL_CHIP_SELECT ChipSelect; + EFI_SPI_HC_PROTOCOL_CHIP_SELECT ChipSelect; /// /// Set up the clock generator to produce the correct clock frequency, phase /// and polarity for a SPI chip. /// - EFI_SPI_HC_PROTOCOL_CLOCK Clock; + EFI_SPI_HC_PROTOCOL_CLOCK Clock; /// /// Perform the SPI transaction on the SPI peripheral using the SPI host /// controller. /// - EFI_SPI_HC_PROTOCOL_TRANSACTION Transaction; + EFI_SPI_HC_PROTOCOL_TRANSACTION Transaction; }; -extern EFI_GUID gEfiSpiHcProtocolGuid; +extern EFI_GUID gEfiSpiHcProtocolGuid; #endif // __SPI_HC_PROTOCOL_H__ diff --git a/MdePkg/Include/Protocol/SpiIo.h b/MdePkg/Include/Protocol/SpiIo.h index 3e9c4b0..b4fc5e0 100644 --- a/MdePkg/Include/Protocol/SpiIo.h +++ b/MdePkg/Include/Protocol/SpiIo.h @@ -125,7 +125,7 @@ typedef enum { **/ typedef EFI_STATUS -(EFIAPI *EFI_SPI_IO_PROTOCOL_TRANSACTION) ( +(EFIAPI *EFI_SPI_IO_PROTOCOL_TRANSACTION)( IN CONST EFI_SPI_IO_PROTOCOL *This, IN EFI_SPI_TRANSACTION_TYPE TransactionType, IN BOOLEAN DebugTransaction, @@ -158,7 +158,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SPI_IO_PROTOCOL_UPDATE_SPI_PERIPHERAL) ( +(EFIAPI *EFI_SPI_IO_PROTOCOL_UPDATE_SPI_PERIPHERAL)( IN CONST EFI_SPI_IO_PROTOCOL *This, IN CONST EFI_SPI_PERIPHERAL *SpiPeripheral ); @@ -171,13 +171,13 @@ typedef struct _EFI_SPI_BUS_TRANSACTION { /// /// Pointer to the SPI peripheral being manipulated. /// - CONST EFI_SPI_PERIPHERAL *SpiPeripheral; + CONST EFI_SPI_PERIPHERAL *SpiPeripheral; /// /// Type of transaction specified by one of the EFI_SPI_TRANSACTION_TYPE /// values. /// - EFI_SPI_TRANSACTION_TYPE TransactionType; + EFI_SPI_TRANSACTION_TYPE TransactionType; /// /// TRUE if the transaction is being debugged. Debugging may be turned on for @@ -185,34 +185,34 @@ typedef struct _EFI_SPI_BUS_TRANSACTION { /// messages. All other transactions with this value set to FALSE will not /// display any debugging messages. /// - BOOLEAN DebugTransaction; + BOOLEAN DebugTransaction; /// /// SPI bus width in bits: 1, 2, 4 /// - UINT32 BusWidth; + UINT32 BusWidth; /// /// Frame size in bits, range: 1 - 32 /// - UINT32 FrameSize; + UINT32 FrameSize; /// /// Length of the write buffer in bytes /// - UINT32 WriteBytes; + UINT32 WriteBytes; /// /// Buffer containing data to send to the SPI peripheral /// Frame sizes 1 - 8 bits: UINT8 (one byte) per frame /// Frame sizes 7 - 16 bits : UINT16 (two bytes) per frame /// - UINT8 *WriteBuffer; + UINT8 *WriteBuffer; /// /// Length of the read buffer in bytes /// - UINT32 ReadBytes; + UINT32 ReadBytes; /// /// Buffer to receive the data from the SPI peripheral @@ -220,7 +220,7 @@ typedef struct _EFI_SPI_BUS_TRANSACTION { /// * Frame sizes 7 - 16 bits : UINT16 (two bytes) per frame /// * Frame sizes 17 - 32 bits : UINT32 (four bytes) per frame /// - UINT8 *ReadBuffer; + UINT8 *ReadBuffer; } EFI_SPI_BUS_TRANSACTION; /// @@ -232,13 +232,13 @@ struct _EFI_SPI_IO_PROTOCOL { /// Address of an EFI_SPI_PERIPHERAL data structure associated with this /// protocol instance. /// - CONST EFI_SPI_PERIPHERAL *SpiPeripheral; + CONST EFI_SPI_PERIPHERAL *SpiPeripheral; /// /// Address of the original EFI_SPI_PERIPHERAL data structure associated with /// this protocol instance. /// - CONST EFI_SPI_PERIPHERAL *OriginalSpiPeripheral; + CONST EFI_SPI_PERIPHERAL *OriginalSpiPeripheral; /// /// Mask of frame sizes which the SPI 10 layer supports. Frame size of N-bits @@ -247,12 +247,12 @@ struct _EFI_SPI_IO_PROTOCOL { /// 8-bit frame sizes by the SPI bus layer if the frame size is not supported /// by the SPI host controller. /// - UINT32 FrameSizeSupportMask; + UINT32 FrameSizeSupportMask; /// /// Maximum transfer size in bytes: 1 - Oxffffffff /// - UINT32 MaximumTransferBytes; + UINT32 MaximumTransferBytes; /// /// Transaction attributes: One or more from: @@ -265,22 +265,22 @@ struct _EFI_SPI_IO_PROTOCOL { /// * SPI_IO_TRANSFER_SIZE_INCLUDES_ADDRESS /// - Transfer size includes the 3 address bytes /// - UINT32 Attributes; + UINT32 Attributes; /// /// Pointer to legacy SPI controller protocol /// - CONST EFI_LEGACY_SPI_CONTROLLER_PROTOCOL *LegacySpiProtocol; + CONST EFI_LEGACY_SPI_CONTROLLER_PROTOCOL *LegacySpiProtocol; /// /// Initiate a SPI transaction between the host and a SPI peripheral. /// - EFI_SPI_IO_PROTOCOL_TRANSACTION Transaction; + EFI_SPI_IO_PROTOCOL_TRANSACTION Transaction; /// /// Update the SPI peripheral associated with this SPI 10 instance. /// - EFI_SPI_IO_PROTOCOL_UPDATE_SPI_PERIPHERAL UpdateSpiPeripheral; + EFI_SPI_IO_PROTOCOL_UPDATE_SPI_PERIPHERAL UpdateSpiPeripheral; }; #endif // __SPI_IO_PROTOCOL_H__ diff --git a/MdePkg/Include/Protocol/SpiNorFlash.h b/MdePkg/Include/Protocol/SpiNorFlash.h index 87aeb04..bab1d36 100644 --- a/MdePkg/Include/Protocol/SpiNorFlash.h +++ b/MdePkg/Include/Protocol/SpiNorFlash.h @@ -44,7 +44,7 @@ typedef struct _EFI_SPI_NOR_FLASH_PROTOCOL EFI_SPI_NOR_FLASH_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI *EFI_SPI_NOR_FLASH_PROTOCOL_GET_FLASH_ID) ( +(EFIAPI *EFI_SPI_NOR_FLASH_PROTOCOL_GET_FLASH_ID)( IN CONST EFI_SPI_NOR_FLASH_PROTOCOL *This, OUT UINT8 *Buffer ); @@ -69,7 +69,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SPI_NOR_FLASH_PROTOCOL_READ_DATA) ( +(EFIAPI *EFI_SPI_NOR_FLASH_PROTOCOL_READ_DATA)( IN CONST EFI_SPI_NOR_FLASH_PROTOCOL *This, IN UINT32 FlashAddress, IN UINT32 LengthInBytes, @@ -92,7 +92,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SPI_NOR_FLASH_PROTOCOL_READ_STATUS) ( +(EFIAPI *EFI_SPI_NOR_FLASH_PROTOCOL_READ_STATUS)( IN CONST EFI_SPI_NOR_FLASH_PROTOCOL *This, IN UINT32 LengthInBytes, OUT UINT8 *FlashStatus @@ -115,7 +115,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SPI_NOR_FLASH_PROTOCOL_WRITE_STATUS) ( +(EFIAPI *EFI_SPI_NOR_FLASH_PROTOCOL_WRITE_STATUS)( IN CONST EFI_SPI_NOR_FLASH_PROTOCOL *This, IN UINT32 LengthInBytes, IN UINT8 *FlashStatus @@ -143,7 +143,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SPI_NOR_FLASH_PROTOCOL_WRITE_DATA) ( +(EFIAPI *EFI_SPI_NOR_FLASH_PROTOCOL_WRITE_DATA)( IN CONST EFI_SPI_NOR_FLASH_PROTOCOL *This, IN UINT32 FlashAddress, IN UINT32 LengthInBytes, @@ -170,7 +170,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SPI_NOR_FLASH_PROTOCOL_ERASE) ( +(EFIAPI *EFI_SPI_NOR_FLASH_PROTOCOL_ERASE)( IN CONST EFI_SPI_NOR_FLASH_PROTOCOL *This, IN UINT32 FlashAddress, IN UINT32 BlockCount @@ -198,59 +198,59 @@ struct _EFI_SPI_NOR_FLASH_PROTOCOL { /// /// Pointer to an EFI_SPI_PERIPHERAL data structure /// - CONST EFI_SPI_PERIPHERAL *SpiPeripheral; + CONST EFI_SPI_PERIPHERAL *SpiPeripheral; /// /// Flash size in bytes /// - UINT32 FlashSize; + UINT32 FlashSize; /// /// Manufacture and Device ID /// - UINT8 Deviceid[3]; + UINT8 Deviceid[3]; /// /// Erase block size in bytes /// - UINT32 EraseBlockBytes; + UINT32 EraseBlockBytes; /// /// Read the 3 byte manufacture and device ID from the SPI flash. /// - EFI_SPI_NOR_FLASH_PROTOCOL_GET_FLASH_ID GetFlashid; + EFI_SPI_NOR_FLASH_PROTOCOL_GET_FLASH_ID GetFlashid; /// /// Read data from the SPI flash. /// - EFI_SPI_NOR_FLASH_PROTOCOL_READ_DATA ReadData; + EFI_SPI_NOR_FLASH_PROTOCOL_READ_DATA ReadData; /// /// Low frequency read data from the SPI flash. /// - EFI_SPI_NOR_FLASH_PROTOCOL_READ_DATA LfReadData; + EFI_SPI_NOR_FLASH_PROTOCOL_READ_DATA LfReadData; /// /// Read the flash status register. /// - EFI_SPI_NOR_FLASH_PROTOCOL_READ_STATUS ReadStatus; + EFI_SPI_NOR_FLASH_PROTOCOL_READ_STATUS ReadStatus; /// /// Write the flash status register. /// - EFI_SPI_NOR_FLASH_PROTOCOL_WRITE_STATUS WriteStatus; + EFI_SPI_NOR_FLASH_PROTOCOL_WRITE_STATUS WriteStatus; /// /// Write data to the SPI flash. /// - EFI_SPI_NOR_FLASH_PROTOCOL_WRITE_DATA WriteData; + EFI_SPI_NOR_FLASH_PROTOCOL_WRITE_DATA WriteData; /// /// Efficiently erases one or more 4KiB regions in the SPI flash. /// - EFI_SPI_NOR_FLASH_PROTOCOL_ERASE Erase; + EFI_SPI_NOR_FLASH_PROTOCOL_ERASE Erase; }; -extern EFI_GUID gEfiSpiNorFlashProtocolGuid; +extern EFI_GUID gEfiSpiNorFlashProtocolGuid; #endif // __SPI_NOR_FLASH_PROTOCOL_H__ diff --git a/MdePkg/Include/Protocol/SpiSmmConfiguration.h b/MdePkg/Include/Protocol/SpiSmmConfiguration.h index 8ec5c26..c9e4f6e 100644 --- a/MdePkg/Include/Protocol/SpiSmmConfiguration.h +++ b/MdePkg/Include/Protocol/SpiSmmConfiguration.h @@ -22,9 +22,9 @@ { 0xa3, 0xaa, 0xfd, 0x4c, 0x9c, 0x9d, 0xef, 0x59 }} typedef -struct _EFI_SPI_CONFIGURATION_PROTOCOL + struct _EFI_SPI_CONFIGURATION_PROTOCOL EFI_SPI_SMM_CONFIGURATION_PROTOCOL; -extern EFI_GUID gEfiSpiSmmConfigurationProtocolGuid; +extern EFI_GUID gEfiSpiSmmConfigurationProtocolGuid; #endif // __SPI_SMM_CONFIGURATION_H__ diff --git a/MdePkg/Include/Protocol/SpiSmmHc.h b/MdePkg/Include/Protocol/SpiSmmHc.h index a7a812e..b2b4c49 100644 --- a/MdePkg/Include/Protocol/SpiSmmHc.h +++ b/MdePkg/Include/Protocol/SpiSmmHc.h @@ -22,9 +22,9 @@ { 0x8a, 0x54, 0x5c, 0x2c, 0xff, 0xe7, 0x3e, 0xcb }} typedef -struct _EFI_SPI_HC_PROTOCOL + struct _EFI_SPI_HC_PROTOCOL EFI_SPI_SMM_HC_PROTOCOL; -extern EFI_GUID gEfiSpiSmmHcProtocolGuid; +extern EFI_GUID gEfiSpiSmmHcProtocolGuid; #endif // __SPI_SMM_HC_H__ diff --git a/MdePkg/Include/Protocol/SpiSmmNorFlash.h b/MdePkg/Include/Protocol/SpiSmmNorFlash.h index 7f1558e..48b5e0f 100644 --- a/MdePkg/Include/Protocol/SpiSmmNorFlash.h +++ b/MdePkg/Include/Protocol/SpiSmmNorFlash.h @@ -22,9 +22,9 @@ { 0x86, 0x04, 0x87, 0xff, 0x6d, 0x66, 0x2c, 0x9a } } typedef -struct _EFI_SPI_NOR_FLASH_PROTOCOL + struct _EFI_SPI_NOR_FLASH_PROTOCOL EFI_SPI_SMM_NOR_FLASH_PROTOCOL; -extern EFI_GUID gEfiSpiSmmNorFlashProtocolGuid; +extern EFI_GUID gEfiSpiSmmNorFlashProtocolGuid; #endif // __SPI_SMM_NOR_FLASH_PROTOCOL_H__ diff --git a/MdePkg/Include/Protocol/StatusCode.h b/MdePkg/Include/Protocol/StatusCode.h index 265453a..ad5fbf5 100644 --- a/MdePkg/Include/Protocol/StatusCode.h +++ b/MdePkg/Include/Protocol/StatusCode.h @@ -45,9 +45,9 @@ EFI_STATUS /// This protocol must be produced by a runtime DXE driver. /// typedef struct _EFI_STATUS_CODE_PROTOCOL { - EFI_REPORT_STATUS_CODE ReportStatusCode; + EFI_REPORT_STATUS_CODE ReportStatusCode; } EFI_STATUS_CODE_PROTOCOL; -extern EFI_GUID gEfiStatusCodeRuntimeProtocolGuid; +extern EFI_GUID gEfiStatusCodeRuntimeProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/StorageSecurityCommand.h b/MdePkg/Include/Protocol/StorageSecurityCommand.h index 5d43cbc..810af59 100644 --- a/MdePkg/Include/Protocol/StorageSecurityCommand.h +++ b/MdePkg/Include/Protocol/StorageSecurityCommand.h @@ -18,7 +18,7 @@ 0xC88B0B6D, 0x0DFC, 0x49A7, {0x9C, 0xB4, 0x49, 0x07, 0x4B, 0x4C, 0x3A, 0x78 } \ } -typedef struct _EFI_STORAGE_SECURITY_COMMAND_PROTOCOL EFI_STORAGE_SECURITY_COMMAND_PROTOCOL; +typedef struct _EFI_STORAGE_SECURITY_COMMAND_PROTOCOL EFI_STORAGE_SECURITY_COMMAND_PROTOCOL; /** Send a security protocol command to a device that receives data and/or the result @@ -166,7 +166,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_STORAGE_SECURITY_SEND_DATA) ( +(EFIAPI *EFI_STORAGE_SECURITY_SEND_DATA)( IN EFI_STORAGE_SECURITY_COMMAND_PROTOCOL *This, IN UINT32 MediaId, IN UINT64 Timeout, @@ -174,7 +174,7 @@ EFI_STATUS IN UINT16 SecurityProtocolSpecificData, IN UINTN PayloadBufferSize, IN VOID *PayloadBuffer -); + ); /// /// The EFI_STORAGE_SECURITY_COMMAND_PROTOCOL is used to send security protocol @@ -197,10 +197,10 @@ EFI_STATUS /// or their successors. /// struct _EFI_STORAGE_SECURITY_COMMAND_PROTOCOL { - EFI_STORAGE_SECURITY_RECEIVE_DATA ReceiveData; - EFI_STORAGE_SECURITY_SEND_DATA SendData; + EFI_STORAGE_SECURITY_RECEIVE_DATA ReceiveData; + EFI_STORAGE_SECURITY_SEND_DATA SendData; }; -extern EFI_GUID gEfiStorageSecurityCommandProtocolGuid; +extern EFI_GUID gEfiStorageSecurityCommandProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/SuperIo.h b/MdePkg/Include/Protocol/SuperIo.h index 34db647..8026150 100644 --- a/MdePkg/Include/Protocol/SuperIo.h +++ b/MdePkg/Include/Protocol/SuperIo.h @@ -18,17 +18,17 @@ { 0x215fdd18, 0xbd50, 0x4feb, { 0x89, 0xb, 0x58, 0xca, 0xb, 0x47, 0x39, 0xe9 } } typedef union { - ACPI_SMALL_RESOURCE_HEADER *SmallHeader; - ACPI_LARGE_RESOURCE_HEADER *LargeHeader; + ACPI_SMALL_RESOURCE_HEADER *SmallHeader; + ACPI_LARGE_RESOURCE_HEADER *LargeHeader; } ACPI_RESOURCE_HEADER_PTR; typedef struct { - UINT8 Register; ///< Register number. - UINT8 AndMask; ///< Bitwise AND mask. - UINT8 OrMask; ///< Bitwise OR mask. + UINT8 Register; ///< Register number. + UINT8 AndMask; ///< Bitwise AND mask. + UINT8 OrMask; ///< Bitwise OR mask. } EFI_SIO_REGISTER_MODIFY; -typedef struct _EFI_SIO_PROTOCOL EFI_SIO_PROTOCOL; +typedef struct _EFI_SIO_PROTOCOL EFI_SIO_PROTOCOL; /** Provides a low level access to the registers for the Super I/O. @@ -62,7 +62,7 @@ EFI_STATUS IN BOOLEAN ExitCfgMode, IN UINT8 Register, IN OUT UINT8 *Value -); + ); /** Provides an interface to get a list of the current resources consumed by the device in the ACPI @@ -88,7 +88,7 @@ EFI_STATUS (EFIAPI *EFI_SIO_GET_RESOURCES)( IN CONST EFI_SIO_PROTOCOL *This, OUT ACPI_RESOURCE_HEADER_PTR *ResourceList -); + ); /** Sets the resources for the device. @@ -108,7 +108,7 @@ EFI_STATUS (EFIAPI *EFI_SIO_SET_RESOURCES)( IN CONST EFI_SIO_PROTOCOL *This, IN ACPI_RESOURCE_HEADER_PTR ResourceList -); + ); /** Provides a collection of resource descriptor lists. Each resource descriptor list in the collection @@ -125,7 +125,7 @@ EFI_STATUS (EFIAPI *EFI_SIO_POSSIBLE_RESOURCES)( IN CONST EFI_SIO_PROTOCOL *This, OUT ACPI_RESOURCE_HEADER_PTR *ResourceCollection -); + ); /** Provides an interface for a table based programming of the Super I/O registers. @@ -154,16 +154,16 @@ EFI_STATUS IN CONST EFI_SIO_PROTOCOL *This, IN CONST EFI_SIO_REGISTER_MODIFY *Command, IN UINTN NumberOfCommands -); + ); struct _EFI_SIO_PROTOCOL { EFI_SIO_REGISTER_ACCESS RegisterAccess; EFI_SIO_GET_RESOURCES GetResources; EFI_SIO_SET_RESOURCES SetResources; EFI_SIO_POSSIBLE_RESOURCES PossibleResources; - EFI_SIO_MODIFY Modify; + EFI_SIO_MODIFY Modify; }; -extern EFI_GUID gEfiSioProtocolGuid; +extern EFI_GUID gEfiSioProtocolGuid; #endif // __EFI_SUPER_IO_PROTOCOL_H__ diff --git a/MdePkg/Include/Protocol/SuperIoControl.h b/MdePkg/Include/Protocol/SuperIoControl.h index c49bb89..8116070 100644 --- a/MdePkg/Include/Protocol/SuperIoControl.h +++ b/MdePkg/Include/Protocol/SuperIoControl.h @@ -19,8 +19,8 @@ 0xb91978df, 0x9fc1, 0x427d, { 0xbb, 0x5, 0x4c, 0x82, 0x84, 0x55, 0xca, 0x27 } \ } -typedef struct _EFI_SIO_CONTROL_PROTOCOL EFI_SIO_CONTROL_PROTOCOL; -typedef struct _EFI_SIO_CONTROL_PROTOCOL *PEFI_SIO_CONTROL_PROTOCOL; +typedef struct _EFI_SIO_CONTROL_PROTOCOL EFI_SIO_CONTROL_PROTOCOL; +typedef struct _EFI_SIO_CONTROL_PROTOCOL *PEFI_SIO_CONTROL_PROTOCOL; /** Enable an ISA-style device. @@ -70,17 +70,17 @@ struct _EFI_SIO_CONTROL_PROTOCOL { /// /// The version of this protocol. /// - UINT32 Version; + UINT32 Version; /// /// Enable a device. /// - EFI_SIO_CONTROL_ENABLE EnableDevice; + EFI_SIO_CONTROL_ENABLE EnableDevice; /// /// Disable a device. /// - EFI_SIO_CONTROL_DISABLE DisableDevice; + EFI_SIO_CONTROL_DISABLE DisableDevice; }; -extern EFI_GUID gEfiSioControlProtocolGuid; +extern EFI_GUID gEfiSioControlProtocolGuid; #endif // __EFI_SUPER_IO_CONTROL_PROTOCOL_H__ diff --git a/MdePkg/Include/Protocol/Supplicant.h b/MdePkg/Include/Protocol/Supplicant.h index a55d811..d786221 100644 --- a/MdePkg/Include/Protocol/Supplicant.h +++ b/MdePkg/Include/Protocol/Supplicant.h @@ -212,10 +212,10 @@ typedef struct { // If TRUE, indicates GTK is just refreshed after a successful call to // EFI_SUPPLICANT_PROTOCOL.BuildResponsePacket(). // - BOOLEAN GTKRefresh; + BOOLEAN GTKRefresh; } EFI_SUPPLICANT_KEY_REFRESH; -#define EFI_MAX_KEY_LEN 64 +#define EFI_MAX_KEY_LEN 64 /// /// EFI_SUPPLICANT_KEY @@ -224,45 +224,45 @@ typedef struct { // // The key value. // - UINT8 Key[EFI_MAX_KEY_LEN]; + UINT8 Key[EFI_MAX_KEY_LEN]; // // Length in bytes of the Key. Should be up to EFI_MAX_KEY_LEN. // - UINT8 KeyLen; + UINT8 KeyLen; // // The key identifier. // - UINT8 KeyId; + UINT8 KeyId; // // Defines whether this key is a group key, pairwise key, PeerKey, or // Integrity Group. // - EFI_SUPPLICANT_KEY_TYPE KeyType; + EFI_SUPPLICANT_KEY_TYPE KeyType; // // The value is set according to the KeyType. // - EFI_80211_MAC_ADDRESS Addr; + EFI_80211_MAC_ADDRESS Addr; // // The Receive Sequence Count value. // - UINT8 Rsc[8]; + UINT8 Rsc[8]; // // Length in bytes of the Rsc. Should be up to 8. // - UINT8 RscLen; + UINT8 RscLen; // // Indicates whether the key is configured by the Authenticator or // Supplicant. The value true indicates Authenticator. // - BOOLEAN IsAuthenticator; + BOOLEAN IsAuthenticator; // // The cipher suite required for this association. // - EFI_80211_SUITE_SELECTOR CipherSuite; + EFI_80211_SUITE_SELECTOR CipherSuite; // // Indicates the direction for which the keys are to be installed. // - EFI_SUPPLICANT_KEY_DIRECTION Direction; + EFI_SUPPLICANT_KEY_DIRECTION Direction; } EFI_SUPPLICANT_KEY; /// @@ -272,12 +272,12 @@ typedef struct { // // Indicates the number of GTKs that are contained in GTKList. // - UINT8 GTKCount; + UINT8 GTKCount; // // A variable-length array of GTKs of type EFI_SUPPLICANT_KEY. The number of // entries is specified by GTKCount. // - EFI_SUPPLICANT_KEY GTKList[1]; + EFI_SUPPLICANT_KEY GTKList[1]; } EFI_SUPPLICANT_GTK_LIST; /// @@ -287,11 +287,11 @@ typedef struct { // // Length of data buffer in the fragment. // - UINT32 FragmentLength; + UINT32 FragmentLength; // // Pointer to the data buffer in the fragment. // - VOID *FragmentBuffer; + VOID *FragmentBuffer; } EFI_SUPPLICANT_FRAGMENT_DATA; /** @@ -333,11 +333,11 @@ typedef struct { **/ typedef EFI_STATUS -(EFIAPI *EFI_SUPPLICANT_BUILD_RESPONSE_PACKET) ( +(EFIAPI *EFI_SUPPLICANT_BUILD_RESPONSE_PACKET)( IN EFI_SUPPLICANT_PROTOCOL *This, IN UINT8 *RequestBuffer OPTIONAL, IN UINTN RequestBufferSize OPTIONAL, - OUT UINT8 *Buffer, + OUT UINT8 *Buffer, IN OUT UINTN *BufferSize ); @@ -367,7 +367,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SUPPLICANT_PROCESS_PACKET) ( +(EFIAPI *EFI_SUPPLICANT_PROCESS_PACKET)( IN EFI_SUPPLICANT_PROTOCOL *This, IN OUT EFI_SUPPLICANT_FRAGMENT_DATA **FragmentTable, IN UINT32 *FragmentCount, @@ -395,7 +395,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SUPPLICANT_SET_DATA) ( +(EFIAPI *EFI_SUPPLICANT_SET_DATA)( IN EFI_SUPPLICANT_PROTOCOL *This, IN EFI_SUPPLICANT_DATA_TYPE DataType, IN VOID *Data, @@ -432,10 +432,10 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_SUPPLICANT_GET_DATA) ( +(EFIAPI *EFI_SUPPLICANT_GET_DATA)( IN EFI_SUPPLICANT_PROTOCOL *This, IN EFI_SUPPLICANT_DATA_TYPE DataType, - OUT UINT8 *Data OPTIONAL, + OUT UINT8 *Data OPTIONAL, IN OUT UINTN *DataSize ); @@ -452,7 +452,7 @@ struct _EFI_SUPPLICANT_PROTOCOL { EFI_SUPPLICANT_GET_DATA GetData; }; -extern EFI_GUID gEfiSupplicantServiceBindingProtocolGuid; -extern EFI_GUID gEfiSupplicantProtocolGuid; +extern EFI_GUID gEfiSupplicantServiceBindingProtocolGuid; +extern EFI_GUID gEfiSupplicantProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/TapeIo.h b/MdePkg/Include/Protocol/TapeIo.h index 359f064..350b846 100644 --- a/MdePkg/Include/Protocol/TapeIo.h +++ b/MdePkg/Include/Protocol/TapeIo.h @@ -18,23 +18,23 @@ SPDX-License-Identifier: BSD-2-Clause-Patent typedef struct _EFI_TAPE_IO_PROTOCOL EFI_TAPE_IO_PROTOCOL; typedef struct _EFI_TAPE_HEADER { - UINT64 Signature; - UINT32 Revision; - UINT32 BootDescSize; - UINT32 BootDescCRC; - EFI_GUID TapeGUID; - EFI_GUID TapeType; - EFI_GUID TapeUnique; - UINT32 BLLocation; - UINT32 BLBlocksize; - UINT32 BLFilesize; - CHAR8 OSVersion[40]; - CHAR8 AppVersion[40]; - CHAR8 CreationDate[10]; - CHAR8 CreationTime[10]; - CHAR8 SystemName[256]; // UTF-8 - CHAR8 TapeTitle[120]; // UTF-8 - CHAR8 pad[468]; // pad to 1024 + UINT64 Signature; + UINT32 Revision; + UINT32 BootDescSize; + UINT32 BootDescCRC; + EFI_GUID TapeGUID; + EFI_GUID TapeType; + EFI_GUID TapeUnique; + UINT32 BLLocation; + UINT32 BLBlocksize; + UINT32 BLFilesize; + CHAR8 OSVersion[40]; + CHAR8 AppVersion[40]; + CHAR8 CreationDate[10]; + CHAR8 CreationTime[10]; + CHAR8 SystemName[256]; // UTF-8 + CHAR8 TapeTitle[120]; // UTF-8 + CHAR8 pad[468]; // pad to 1024 } EFI_TAPE_HEADER; /** @@ -108,7 +108,6 @@ EFI_STATUS IN VOID *Buffer ); - /** Rewinds the tape. @@ -129,7 +128,6 @@ EFI_STATUS IN EFI_TAPE_IO_PROTOCOL *This ); - /** Positions the tape. @@ -162,7 +160,6 @@ EFI_STATUS IN UINTN Type ); - /** Writes filemarks to the media. @@ -188,7 +185,6 @@ EFI_STATUS IN UINTN Count ); - /** Resets the tape device. @@ -218,14 +214,14 @@ EFI_STATUS /// to load the bootloader image from tape. /// struct _EFI_TAPE_IO_PROTOCOL { - EFI_TAPE_READ TapeRead; - EFI_TAPE_WRITE TapeWrite; - EFI_TAPE_REWIND TapeRewind; - EFI_TAPE_SPACE TapeSpace; - EFI_TAPE_WRITEFM TapeWriteFM; - EFI_TAPE_RESET TapeReset; + EFI_TAPE_READ TapeRead; + EFI_TAPE_WRITE TapeWrite; + EFI_TAPE_REWIND TapeRewind; + EFI_TAPE_SPACE TapeSpace; + EFI_TAPE_WRITEFM TapeWriteFM; + EFI_TAPE_RESET TapeReset; }; -extern EFI_GUID gEfiTapeIoProtocolGuid; +extern EFI_GUID gEfiTapeIoProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Tcg2Protocol.h b/MdePkg/Include/Protocol/Tcg2Protocol.h index 5ef13cc..f1326a5 100644 --- a/MdePkg/Include/Protocol/Tcg2Protocol.h +++ b/MdePkg/Include/Protocol/Tcg2Protocol.h @@ -19,79 +19,79 @@ SPDX-License-Identifier: BSD-2-Clause-Patent typedef struct tdEFI_TCG2_PROTOCOL EFI_TCG2_PROTOCOL; typedef struct tdEFI_TCG2_VERSION { - UINT8 Major; - UINT8 Minor; + UINT8 Major; + UINT8 Minor; } EFI_TCG2_VERSION; typedef UINT32 EFI_TCG2_EVENT_LOG_BITMAP; typedef UINT32 EFI_TCG2_EVENT_LOG_FORMAT; typedef UINT32 EFI_TCG2_EVENT_ALGORITHM_BITMAP; -#define EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2 0x00000001 -#define EFI_TCG2_EVENT_LOG_FORMAT_TCG_2 0x00000002 +#define EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2 0x00000001 +#define EFI_TCG2_EVENT_LOG_FORMAT_TCG_2 0x00000002 typedef struct tdEFI_TCG2_BOOT_SERVICE_CAPABILITY { // // Allocated size of the structure // - UINT8 Size; + UINT8 Size; // // Version of the EFI_TCG2_BOOT_SERVICE_CAPABILITY structure itself. // For this version of the protocol, the Major version shall be set to 1 // and the Minor version shall be set to 1. // - EFI_TCG2_VERSION StructureVersion; + EFI_TCG2_VERSION StructureVersion; // // Version of the EFI TCG2 protocol. // For this version of the protocol, the Major version shall be set to 1 // and the Minor version shall be set to 1. // - EFI_TCG2_VERSION ProtocolVersion; + EFI_TCG2_VERSION ProtocolVersion; // // Supported hash algorithms (this bitmap is determined by the supported PCR // banks in the TPM and the hashing algorithms supported by the firmware) // - EFI_TCG2_EVENT_ALGORITHM_BITMAP HashAlgorithmBitmap; + EFI_TCG2_EVENT_ALGORITHM_BITMAP HashAlgorithmBitmap; // // Bitmap of supported event log formats // - EFI_TCG2_EVENT_LOG_BITMAP SupportedEventLogs; + EFI_TCG2_EVENT_LOG_BITMAP SupportedEventLogs; // // False = TPM not present // - BOOLEAN TPMPresentFlag; + BOOLEAN TPMPresentFlag; // // Max size (in bytes) of a command that can be sent to the TPM // - UINT16 MaxCommandSize; + UINT16 MaxCommandSize; // // Max size (in bytes) of a response that can be provided by the TPM // - UINT16 MaxResponseSize; + UINT16 MaxResponseSize; // // 4-byte Vendor ID // (see TCG Vendor ID registry, Section "TPM Capabilities Vendor ID") // - UINT32 ManufacturerID; + UINT32 ManufacturerID; // // Maximum number of PCR banks (hashing algorithms) supported. // No granularity is provided to support a specific set of algorithms. // Minimum value is 1. // - UINT32 NumberOfPCRBanks; + UINT32 NumberOfPCRBanks; // // A bitmap of currently active PCR banks (hashing algorithms). // This is a subset of the supported hashing algorithms reported in HashAlgorithmBitMap. // NumberOfPcrBanks defines the number of bits that are set. // - EFI_TCG2_EVENT_ALGORITHM_BITMAP ActivePcrBanks; + EFI_TCG2_EVENT_ALGORITHM_BITMAP ActivePcrBanks; } EFI_TCG2_BOOT_SERVICE_CAPABILITY; -#define EFI_TCG2_BOOT_HASH_ALG_SHA1 0x00000001 -#define EFI_TCG2_BOOT_HASH_ALG_SHA256 0x00000002 -#define EFI_TCG2_BOOT_HASH_ALG_SHA384 0x00000004 -#define EFI_TCG2_BOOT_HASH_ALG_SHA512 0x00000008 -#define EFI_TCG2_BOOT_HASH_ALG_SM3_256 0x00000010 +#define EFI_TCG2_BOOT_HASH_ALG_SHA1 0x00000001 +#define EFI_TCG2_BOOT_HASH_ALG_SHA256 0x00000002 +#define EFI_TCG2_BOOT_HASH_ALG_SHA384 0x00000004 +#define EFI_TCG2_BOOT_HASH_ALG_SHA512 0x00000008 +#define EFI_TCG2_BOOT_HASH_ALG_SM3_256 0x00000010 // // This bit is shall be set when an event shall be extended but not logged. @@ -100,7 +100,7 @@ typedef struct tdEFI_TCG2_BOOT_SERVICE_CAPABILITY { // // This bit shall be set when the intent is to measure a PE/COFF image. // -#define PE_COFF_IMAGE 0x0000000000000010 +#define PE_COFF_IMAGE 0x0000000000000010 #define MAX_PCR_INDEX 23 @@ -112,28 +112,28 @@ typedef struct { // // Size of the event header itself (sizeof(EFI_TCG2_EVENT_HEADER)). // - UINT32 HeaderSize; + UINT32 HeaderSize; // // Header version. For this version of this specification, the value shall be 1. // - UINT16 HeaderVersion; + UINT16 HeaderVersion; // // Index of the PCR that shall be extended (0 - 23). // - TCG_PCRINDEX PCRIndex; + TCG_PCRINDEX PCRIndex; // // Type of the event that shall be extended (and optionally logged). // - TCG_EVENTTYPE EventType; + TCG_EVENTTYPE EventType; } EFI_TCG2_EVENT_HEADER; typedef struct tdEFI_TCG2_EVENT { // // Total size of the event including the Size component, the header and the Event data. // - UINT32 Size; - EFI_TCG2_EVENT_HEADER Header; - UINT8 Event[1]; + UINT32 Size; + EFI_TCG2_EVENT_HEADER Header; + UINT8 Event[1]; } EFI_TCG2_EVENT; #pragma pack() @@ -159,7 +159,7 @@ typedef struct tdEFI_TCG2_EVENT { **/ typedef EFI_STATUS -(EFIAPI *EFI_TCG2_GET_CAPABILITY) ( +(EFIAPI *EFI_TCG2_GET_CAPABILITY)( IN EFI_TCG2_PROTOCOL *This, IN OUT EFI_TCG2_BOOT_SERVICE_CAPABILITY *ProtocolCapability ); @@ -183,7 +183,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TCG2_GET_EVENT_LOG) ( +(EFIAPI *EFI_TCG2_GET_EVENT_LOG)( IN EFI_TCG2_PROTOCOL *This, IN EFI_TCG2_EVENT_LOG_FORMAT EventLogFormat, OUT EFI_PHYSICAL_ADDRESS *EventLogLocation, @@ -212,7 +212,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI * EFI_TCG2_HASH_LOG_EXTEND_EVENT) ( +(EFIAPI *EFI_TCG2_HASH_LOG_EXTEND_EVENT)( IN EFI_TCG2_PROTOCOL *This, IN UINT64 Flags, IN EFI_PHYSICAL_ADDRESS DataToHash, @@ -236,7 +236,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TCG2_SUBMIT_COMMAND) ( +(EFIAPI *EFI_TCG2_SUBMIT_COMMAND)( IN EFI_TCG2_PROTOCOL *This, IN UINT32 InputParameterBlockSize, IN UINT8 *InputParameterBlock, @@ -255,7 +255,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TCG2_GET_ACTIVE_PCR_BANKS) ( +(EFIAPI *EFI_TCG2_GET_ACTIVE_PCR_BANKS)( IN EFI_TCG2_PROTOCOL *This, OUT UINT32 *ActivePcrBanks ); @@ -271,7 +271,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TCG2_SET_ACTIVE_PCR_BANKS) ( +(EFIAPI *EFI_TCG2_SET_ACTIVE_PCR_BANKS)( IN EFI_TCG2_PROTOCOL *This, IN UINT32 ActivePcrBanks ); @@ -288,23 +288,23 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TCG2_GET_RESULT_OF_SET_ACTIVE_PCR_BANKS) ( +(EFIAPI *EFI_TCG2_GET_RESULT_OF_SET_ACTIVE_PCR_BANKS)( IN EFI_TCG2_PROTOCOL *This, OUT UINT32 *OperationPresent, OUT UINT32 *Response ); struct tdEFI_TCG2_PROTOCOL { - EFI_TCG2_GET_CAPABILITY GetCapability; - EFI_TCG2_GET_EVENT_LOG GetEventLog; - EFI_TCG2_HASH_LOG_EXTEND_EVENT HashLogExtendEvent; - EFI_TCG2_SUBMIT_COMMAND SubmitCommand; - EFI_TCG2_GET_ACTIVE_PCR_BANKS GetActivePcrBanks; - EFI_TCG2_SET_ACTIVE_PCR_BANKS SetActivePcrBanks; - EFI_TCG2_GET_RESULT_OF_SET_ACTIVE_PCR_BANKS GetResultOfSetActivePcrBanks; + EFI_TCG2_GET_CAPABILITY GetCapability; + EFI_TCG2_GET_EVENT_LOG GetEventLog; + EFI_TCG2_HASH_LOG_EXTEND_EVENT HashLogExtendEvent; + EFI_TCG2_SUBMIT_COMMAND SubmitCommand; + EFI_TCG2_GET_ACTIVE_PCR_BANKS GetActivePcrBanks; + EFI_TCG2_SET_ACTIVE_PCR_BANKS SetActivePcrBanks; + EFI_TCG2_GET_RESULT_OF_SET_ACTIVE_PCR_BANKS GetResultOfSetActivePcrBanks; }; -extern EFI_GUID gEfiTcg2ProtocolGuid; +extern EFI_GUID gEfiTcg2ProtocolGuid; // // Log entries after Get Event Log service @@ -313,23 +313,23 @@ extern EFI_GUID gEfiTcg2ProtocolGuid; #define EFI_TCG2_FINAL_EVENTS_TABLE_GUID \ {0x1e2ed096, 0x30e2, 0x4254, { 0xbd, 0x89, 0x86, 0x3b, 0xbe, 0xf8, 0x23, 0x25 }} -extern EFI_GUID gEfiTcg2FinalEventsTableGuid; +extern EFI_GUID gEfiTcg2FinalEventsTableGuid; typedef struct tdEFI_TCG2_FINAL_EVENTS_TABLE { // // The version of this structure. // - UINT64 Version; + UINT64 Version; // // Number of events recorded after invocation of GetEventLog API // - UINT64 NumberOfEvents; + UINT64 NumberOfEvents; // // List of events of type TCG_PCR_EVENT2. // -//TCG_PCR_EVENT2 Event[1]; + // TCG_PCR_EVENT2 Event[1]; } EFI_TCG2_FINAL_EVENTS_TABLE; -#define EFI_TCG2_FINAL_EVENTS_TABLE_VERSION 1 +#define EFI_TCG2_FINAL_EVENTS_TABLE_VERSION 1 #endif diff --git a/MdePkg/Include/Protocol/TcgService.h b/MdePkg/Include/Protocol/TcgService.h index 0d4625b..a87157a 100644 --- a/MdePkg/Include/Protocol/TcgService.h +++ b/MdePkg/Include/Protocol/TcgService.h @@ -18,10 +18,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent typedef struct _EFI_TCG_PROTOCOL EFI_TCG_PROTOCOL; typedef struct { - UINT8 Major; - UINT8 Minor; - UINT8 RevMajor; - UINT8 RevMinor; + UINT8 Major; + UINT8 Minor; + UINT8 RevMajor; + UINT8 RevMinor; } TCG_VERSION; typedef struct _TCG_EFI_BOOT_SERVICE_CAPABILITY { @@ -34,7 +34,7 @@ typedef struct _TCG_EFI_BOOT_SERVICE_CAPABILITY { BOOLEAN TPMDeactivatedFlag; /// 01h = TPM currently deactivated. } TCG_EFI_BOOT_SERVICE_CAPABILITY; -typedef UINT32 TCG_ALGORITHM_ID; +typedef UINT32 TCG_ALGORITHM_ID; /** This service provides EFI protocol capability information, state information @@ -62,7 +62,7 @@ EFI_STATUS (EFIAPI *EFI_TCG_STATUS_CHECK)( IN EFI_TCG_PROTOCOL *This, OUT TCG_EFI_BOOT_SERVICE_CAPABILITY - *ProtocolCapability, + *ProtocolCapability, OUT UINT32 *TCGFeatureFlags, OUT EFI_PHYSICAL_ADDRESS *EventLogLocation, OUT EFI_PHYSICAL_ADDRESS *EventLogLastEntry @@ -176,20 +176,20 @@ EFI_STATUS IN TCG_ALGORITHM_ID AlgorithmId, IN OUT TCG_PCR_EVENT *TCGLogData, IN OUT UINT32 *EventNumber, - OUT EFI_PHYSICAL_ADDRESS *EventLogLastEntry + OUT EFI_PHYSICAL_ADDRESS *EventLogLastEntry ); /// /// The EFI_TCG Protocol abstracts TCG activity. /// struct _EFI_TCG_PROTOCOL { - EFI_TCG_STATUS_CHECK StatusCheck; - EFI_TCG_HASH_ALL HashAll; - EFI_TCG_LOG_EVENT LogEvent; - EFI_TCG_PASS_THROUGH_TO_TPM PassThroughToTpm; - EFI_TCG_HASH_LOG_EXTEND_EVENT HashLogExtendEvent; + EFI_TCG_STATUS_CHECK StatusCheck; + EFI_TCG_HASH_ALL HashAll; + EFI_TCG_LOG_EVENT LogEvent; + EFI_TCG_PASS_THROUGH_TO_TPM PassThroughToTpm; + EFI_TCG_HASH_LOG_EXTEND_EVENT HashLogExtendEvent; }; -extern EFI_GUID gEfiTcgProtocolGuid; +extern EFI_GUID gEfiTcgProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Tcp4.h b/MdePkg/Include/Protocol/Tcp4.h index 8ebd1c6..e81c2e7 100644 --- a/MdePkg/Include/Protocol/Tcp4.h +++ b/MdePkg/Include/Protocol/Tcp4.h @@ -34,11 +34,11 @@ typedef struct _EFI_TCP4_PROTOCOL EFI_TCP4_PROTOCOL; /// The definition in here is only present to provide backwards compatability. /// typedef struct { - EFI_HANDLE InstanceHandle; - EFI_IPv4_ADDRESS LocalAddress; - UINT16 LocalPort; - EFI_IPv4_ADDRESS RemoteAddress; - UINT16 RemotePort; + EFI_HANDLE InstanceHandle; + EFI_IPv4_ADDRESS LocalAddress; + UINT16 LocalPort; + EFI_IPv4_ADDRESS RemoteAddress; + UINT16 RemotePort; } EFI_TCP4_SERVICE_POINT; /// @@ -46,77 +46,77 @@ typedef struct { /// The definition in here is only present to provide backwards compatability. /// typedef struct { - EFI_HANDLE DriverHandle; - UINT32 ServiceCount; - EFI_TCP4_SERVICE_POINT Services[1]; + EFI_HANDLE DriverHandle; + UINT32 ServiceCount; + EFI_TCP4_SERVICE_POINT Services[1]; } EFI_TCP4_VARIABLE_DATA; typedef struct { - BOOLEAN UseDefaultAddress; - EFI_IPv4_ADDRESS StationAddress; - EFI_IPv4_ADDRESS SubnetMask; - UINT16 StationPort; - EFI_IPv4_ADDRESS RemoteAddress; - UINT16 RemotePort; - BOOLEAN ActiveFlag; + BOOLEAN UseDefaultAddress; + EFI_IPv4_ADDRESS StationAddress; + EFI_IPv4_ADDRESS SubnetMask; + UINT16 StationPort; + EFI_IPv4_ADDRESS RemoteAddress; + UINT16 RemotePort; + BOOLEAN ActiveFlag; } EFI_TCP4_ACCESS_POINT; typedef struct { - UINT32 ReceiveBufferSize; - UINT32 SendBufferSize; - UINT32 MaxSynBackLog; - UINT32 ConnectionTimeout; - UINT32 DataRetries; - UINT32 FinTimeout; - UINT32 TimeWaitTimeout; - UINT32 KeepAliveProbes; - UINT32 KeepAliveTime; - UINT32 KeepAliveInterval; - BOOLEAN EnableNagle; - BOOLEAN EnableTimeStamp; - BOOLEAN EnableWindowScaling; - BOOLEAN EnableSelectiveAck; - BOOLEAN EnablePathMtuDiscovery; + UINT32 ReceiveBufferSize; + UINT32 SendBufferSize; + UINT32 MaxSynBackLog; + UINT32 ConnectionTimeout; + UINT32 DataRetries; + UINT32 FinTimeout; + UINT32 TimeWaitTimeout; + UINT32 KeepAliveProbes; + UINT32 KeepAliveTime; + UINT32 KeepAliveInterval; + BOOLEAN EnableNagle; + BOOLEAN EnableTimeStamp; + BOOLEAN EnableWindowScaling; + BOOLEAN EnableSelectiveAck; + BOOLEAN EnablePathMtuDiscovery; } EFI_TCP4_OPTION; typedef struct { // // I/O parameters // - UINT8 TypeOfService; - UINT8 TimeToLive; + UINT8 TypeOfService; + UINT8 TimeToLive; // // Access Point // - EFI_TCP4_ACCESS_POINT AccessPoint; + EFI_TCP4_ACCESS_POINT AccessPoint; // // TCP Control Options // - EFI_TCP4_OPTION *ControlOption; + EFI_TCP4_OPTION *ControlOption; } EFI_TCP4_CONFIG_DATA; /// /// TCP4 connnection state /// typedef enum { - Tcp4StateClosed = 0, - Tcp4StateListen = 1, - Tcp4StateSynSent = 2, - Tcp4StateSynReceived = 3, - Tcp4StateEstablished = 4, - Tcp4StateFinWait1 = 5, - Tcp4StateFinWait2 = 6, - Tcp4StateClosing = 7, - Tcp4StateTimeWait = 8, - Tcp4StateCloseWait = 9, - Tcp4StateLastAck = 10 + Tcp4StateClosed = 0, + Tcp4StateListen = 1, + Tcp4StateSynSent = 2, + Tcp4StateSynReceived = 3, + Tcp4StateEstablished = 4, + Tcp4StateFinWait1 = 5, + Tcp4StateFinWait2 = 6, + Tcp4StateClosing = 7, + Tcp4StateTimeWait = 8, + Tcp4StateCloseWait = 9, + Tcp4StateLastAck = 10 } EFI_TCP4_CONNECTION_STATE; typedef struct { - EFI_EVENT Event; - EFI_STATUS Status; + EFI_EVENT Event; + EFI_STATUS Status; } EFI_TCP4_COMPLETION_TOKEN; typedef struct { @@ -146,17 +146,17 @@ typedef struct { /// EFI_DEVICE_ERROR: An unexpected system or network error occurred. /// EFI_NO_MEDIA: There was a media error. /// - EFI_TCP4_COMPLETION_TOKEN CompletionToken; + EFI_TCP4_COMPLETION_TOKEN CompletionToken; } EFI_TCP4_CONNECTION_TOKEN; typedef struct { - EFI_TCP4_COMPLETION_TOKEN CompletionToken; - EFI_HANDLE NewChildHandle; + EFI_TCP4_COMPLETION_TOKEN CompletionToken; + EFI_HANDLE NewChildHandle; } EFI_TCP4_LISTEN_TOKEN; typedef struct { - UINT32 FragmentLength; - VOID *FragmentBuffer; + UINT32 FragmentLength; + VOID *FragmentBuffer; } EFI_TCP4_FRAGMENT_DATA; typedef struct { @@ -202,22 +202,22 @@ typedef struct { /// EFI_DEVICE_ERROR: An unexpected system or network error occurs. /// EFI_NO_MEDIA: There was a media error. /// - EFI_TCP4_COMPLETION_TOKEN CompletionToken; + EFI_TCP4_COMPLETION_TOKEN CompletionToken; union { /// /// When this token is used for receiving, RxData is a pointer to EFI_TCP4_RECEIVE_DATA. /// - EFI_TCP4_RECEIVE_DATA *RxData; + EFI_TCP4_RECEIVE_DATA *RxData; /// /// When this token is used for transmitting, TxData is a pointer to EFI_TCP4_TRANSMIT_DATA. /// - EFI_TCP4_TRANSMIT_DATA *TxData; + EFI_TCP4_TRANSMIT_DATA *TxData; } Packet; } EFI_TCP4_IO_TOKEN; typedef struct { - EFI_TCP4_COMPLETION_TOKEN CompletionToken; - BOOLEAN AbortOnClose; + EFI_TCP4_COMPLETION_TOKEN CompletionToken; + BOOLEAN AbortOnClose; } EFI_TCP4_CLOSE_TOKEN; // @@ -281,7 +281,6 @@ EFI_STATUS IN EFI_TCP4_CONFIG_DATA *TcpConfigData OPTIONAL ); - /** Add or delete a route entry to the route table @@ -353,7 +352,6 @@ EFI_STATUS IN EFI_TCP4_CONNECTION_TOKEN *ConnectionToken ); - /** Listen on the passive instance to accept an incoming connection request. This is a nonblocking operation. @@ -420,7 +418,6 @@ EFI_STATUS IN EFI_TCP4_IO_TOKEN *Token ); - /** Places an asynchronous receive request into the receiving queue. @@ -525,7 +522,6 @@ EFI_STATUS IN EFI_TCP4_COMPLETION_TOKEN *Token OPTIONAL ); - /** Poll to receive incoming data and transmit outgoing segments. @@ -553,19 +549,19 @@ EFI_STATUS /// such as the routing table. /// struct _EFI_TCP4_PROTOCOL { - EFI_TCP4_GET_MODE_DATA GetModeData; - EFI_TCP4_CONFIGURE Configure; - EFI_TCP4_ROUTES Routes; - EFI_TCP4_CONNECT Connect; - EFI_TCP4_ACCEPT Accept; - EFI_TCP4_TRANSMIT Transmit; - EFI_TCP4_RECEIVE Receive; - EFI_TCP4_CLOSE Close; - EFI_TCP4_CANCEL Cancel; - EFI_TCP4_POLL Poll; + EFI_TCP4_GET_MODE_DATA GetModeData; + EFI_TCP4_CONFIGURE Configure; + EFI_TCP4_ROUTES Routes; + EFI_TCP4_CONNECT Connect; + EFI_TCP4_ACCEPT Accept; + EFI_TCP4_TRANSMIT Transmit; + EFI_TCP4_RECEIVE Receive; + EFI_TCP4_CLOSE Close; + EFI_TCP4_CANCEL Cancel; + EFI_TCP4_POLL Poll; }; -extern EFI_GUID gEfiTcp4ServiceBindingProtocolGuid; -extern EFI_GUID gEfiTcp4ProtocolGuid; +extern EFI_GUID gEfiTcp4ServiceBindingProtocolGuid; +extern EFI_GUID gEfiTcp4ProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Tcp6.h b/MdePkg/Include/Protocol/Tcp6.h index 7f22c42..a8787dd 100644 --- a/MdePkg/Include/Protocol/Tcp6.h +++ b/MdePkg/Include/Protocol/Tcp6.h @@ -28,7 +28,6 @@ 0x46e44855, 0xbd60, 0x4ab7, {0xab, 0x0d, 0xa6, 0x79, 0xb9, 0x44, 0x7d, 0x77 } \ } - typedef struct _EFI_TCP6_PROTOCOL EFI_TCP6_PROTOCOL; /// @@ -40,27 +39,27 @@ typedef struct { /// The EFI TCPv6 Protocol instance handle that is using this /// address/port pair. /// - EFI_HANDLE InstanceHandle; + EFI_HANDLE InstanceHandle; /// /// The local IPv6 address to which this TCP instance is bound. Set /// to 0::/128, if this TCP instance is configured to listen on all /// available source addresses. /// - EFI_IPv6_ADDRESS LocalAddress; + EFI_IPv6_ADDRESS LocalAddress; /// /// The local port number in host byte order. /// - UINT16 LocalPort; + UINT16 LocalPort; /// /// The remote IPv6 address. It may be 0::/128 if this TCP instance is /// not connected to any remote host. /// - EFI_IPv6_ADDRESS RemoteAddress; + EFI_IPv6_ADDRESS RemoteAddress; /// /// The remote port number in host byte order. It may be zero if this /// TCP instance is not connected to any remote host. /// - UINT16 RemotePort; + UINT16 RemotePort; } EFI_TCP6_SERVICE_POINT; /// @@ -68,9 +67,9 @@ typedef struct { /// The definition in here is only present to provide backwards compatability. /// typedef struct { - EFI_HANDLE DriverHandle; ///< The handle of the driver that creates this entry. - UINT32 ServiceCount; ///< The number of address/port pairs following this data structure. - EFI_TCP6_SERVICE_POINT Services[1]; ///< List of address/port pairs that are currently in use. + EFI_HANDLE DriverHandle; ///< The handle of the driver that creates this entry. + UINT32 ServiceCount; ///< The number of address/port pairs following this data structure. + EFI_TCP6_SERVICE_POINT Services[1]; ///< List of address/port pairs that are currently in use. } EFI_TCP6_VARIABLE_DATA; /// @@ -85,13 +84,13 @@ typedef struct { /// it must be one of the configured IP addresses in the underlying /// IPv6 driver. /// - EFI_IPv6_ADDRESS StationAddress; + EFI_IPv6_ADDRESS StationAddress; /// /// The local port number to which this EFI TCPv6 Protocol instance /// is bound. If the instance doesn't care the local port number, set /// StationPort to zero to use an ephemeral port. /// - UINT16 StationPort; + UINT16 StationPort; /// /// The remote IP address to which this EFI TCPv6 Protocol instance /// is connected. If ActiveFlag is FALSE (i.e. a passive TCPv6 @@ -103,7 +102,7 @@ typedef struct { /// can be set to zero and means that incoming connection requests /// from any address will be accepted. /// - EFI_IPv6_ADDRESS RemoteAddress; + EFI_IPv6_ADDRESS RemoteAddress; /// /// The remote port to which this EFI TCPv6 Protocol instance /// connects or from which connection request will be accepted by @@ -112,12 +111,12 @@ typedef struct { /// any port will be accepted. Its value can not be zero when /// ActiveFlag is TRUE. /// - UINT16 RemotePort; + UINT16 RemotePort; /// /// Set it to TRUE to initiate an active open. Set it to FALSE to /// initiate a passive open to act as a server. /// - BOOLEAN ActiveFlag; + BOOLEAN ActiveFlag; } EFI_TCP6_ACCESS_POINT; /// @@ -127,28 +126,28 @@ typedef struct { /// /// The size of the TCP receive buffer. /// - UINT32 ReceiveBufferSize; + UINT32 ReceiveBufferSize; /// /// The size of the TCP send buffer. /// - UINT32 SendBufferSize; + UINT32 SendBufferSize; /// /// The length of incoming connect request queue for a passive /// instance. When set to zero, the value is implementation specific. /// - UINT32 MaxSynBackLog; + UINT32 MaxSynBackLog; /// /// The maximum seconds a TCP instance will wait for before a TCP /// connection established. When set to zero, the value is /// implementation specific. /// - UINT32 ConnectionTimeout; + UINT32 ConnectionTimeout; /// - ///The number of times TCP will attempt to retransmit a packet on - ///an established connection. When set to zero, the value is - ///implementation specific. + /// The number of times TCP will attempt to retransmit a packet on + /// an established connection. When set to zero, the value is + /// implementation specific. /// - UINT32 DataRetries; + UINT32 DataRetries; /// /// How many seconds to wait in the FIN_WAIT_2 states for a final /// FIN flag before the TCP instance is closed. This timeout is in @@ -158,61 +157,61 @@ typedef struct { /// it should be disabled because the FIN_WAIT_2 timer itself is /// against the standard. The default value is 60. /// - UINT32 FinTimeout; + UINT32 FinTimeout; /// /// How many seconds to wait in TIME_WAIT state before the TCP /// instance is closed. The timer is disabled completely to provide a /// method to close the TCP connection quickly if it is set to zero. It /// is against the related RFC documents. /// - UINT32 TimeWaitTimeout; + UINT32 TimeWaitTimeout; /// /// The maximum number of TCP keep-alive probes to send before /// giving up and resetting the connection if no response from the /// other end. Set to zero to disable keep-alive probe. /// - UINT32 KeepAliveProbes; + UINT32 KeepAliveProbes; /// /// The number of seconds a connection needs to be idle before TCP /// sends out periodical keep-alive probes. When set to zero, the /// value is implementation specific. It should be ignored if keep- /// alive probe is disabled. /// - UINT32 KeepAliveTime; + UINT32 KeepAliveTime; /// /// The number of seconds between TCP keep-alive probes after the /// periodical keep-alive probe if no response. When set to zero, the /// value is implementation specific. It should be ignored if keep- /// alive probe is disabled. /// - UINT32 KeepAliveInterval; + UINT32 KeepAliveInterval; /// /// Set it to TRUE to enable the Nagle algorithm as defined in /// RFC896. Set it to FALSE to disable it. /// - BOOLEAN EnableNagle; + BOOLEAN EnableNagle; /// /// Set it to TRUE to enable TCP timestamps option as defined in /// RFC1323. Set to FALSE to disable it. /// - BOOLEAN EnableTimeStamp; + BOOLEAN EnableTimeStamp; /// /// Set it to TRUE to enable TCP window scale option as defined in /// RFC1323. Set it to FALSE to disable it. /// - BOOLEAN EnableWindowScaling; + BOOLEAN EnableWindowScaling; /// /// Set it to TRUE to enable selective acknowledge mechanism /// described in RFC 2018. Set it to FALSE to disable it. /// Implementation that supports SACK can optionally support /// DSAK as defined in RFC 2883. /// - BOOLEAN EnableSelectiveAck; + BOOLEAN EnableSelectiveAck; /// /// Set it to TRUE to enable path MTU discovery as defined in /// RFC 1191. Set to FALSE to disable it. /// - BOOLEAN EnablePathMtuDiscovery; + BOOLEAN EnablePathMtuDiscovery; } EFI_TCP6_OPTION; /// @@ -222,20 +221,20 @@ typedef struct { /// /// TrafficClass field in transmitted IPv6 packets. /// - UINT8 TrafficClass; + UINT8 TrafficClass; /// /// HopLimit field in transmitted IPv6 packets. /// - UINT8 HopLimit; + UINT8 HopLimit; /// /// Used to specify TCP communication end settings for a TCP instance. /// - EFI_TCP6_ACCESS_POINT AccessPoint; + EFI_TCP6_ACCESS_POINT AccessPoint; /// /// Used to configure the advance TCP option for a connection. If set /// to NULL, implementation specific options for TCP connection will be used. /// - EFI_TCP6_OPTION *ControlOption; + EFI_TCP6_OPTION *ControlOption; } EFI_TCP6_CONFIG_DATA; /// @@ -264,11 +263,11 @@ typedef struct { /// The Event to signal after request is finished and Status field is /// updated by the EFI TCPv6 Protocol driver. /// - EFI_EVENT Event; + EFI_EVENT Event; /// /// The result of the completed operation. /// - EFI_STATUS Status; + EFI_STATUS Status; } EFI_TCP6_COMPLETION_TOKEN; /// @@ -304,7 +303,7 @@ typedef struct { /// EFI_SECURITY_VIOLATION: The active open was failed because of IPSec policy check. /// EFI_NO_MEDIA: There was a media error. /// - EFI_TCP6_COMPLETION_TOKEN CompletionToken; + EFI_TCP6_COMPLETION_TOKEN CompletionToken; } EFI_TCP6_CONNECTION_TOKEN; /// @@ -323,8 +322,8 @@ typedef struct { /// EFI_ABORTED: The accept request has been aborted. /// EFI_SECURITY_VIOLATION: The accept operation was failed because of IPSec policy check. /// - EFI_TCP6_COMPLETION_TOKEN CompletionToken; - EFI_HANDLE NewChildHandle; + EFI_TCP6_COMPLETION_TOKEN CompletionToken; + EFI_HANDLE NewChildHandle; } EFI_TCP6_LISTEN_TOKEN; /// @@ -333,8 +332,8 @@ typedef struct { /// purpose of this structure is to provide scattered read and write. /// typedef struct { - UINT32 FragmentLength; ///< Length of data buffer in the fragment. - VOID *FragmentBuffer; ///< Pointer to the data buffer in the fragment. + UINT32 FragmentLength; ///< Length of data buffer in the fragment. + VOID *FragmentBuffer; ///< Pointer to the data buffer in the fragment. } EFI_TCP6_FRAGMENT_DATA; /// @@ -348,22 +347,22 @@ typedef struct { /// Whether the data is urgent. When this flag is set, the instance is in /// urgent mode. /// - BOOLEAN UrgentFlag; + BOOLEAN UrgentFlag; /// /// When calling Receive() function, it is the byte counts of all /// Fragmentbuffer in FragmentTable allocated by user. /// When the token is signaled by TCPv6 driver it is the length of /// received data in the fragments. /// - UINT32 DataLength; + UINT32 DataLength; /// /// Number of fragments. /// - UINT32 FragmentCount; + UINT32 FragmentCount; /// /// An array of fragment descriptors. /// - EFI_TCP6_FRAGMENT_DATA FragmentTable[1]; + EFI_TCP6_FRAGMENT_DATA FragmentTable[1]; } EFI_TCP6_RECEIVE_DATA; /// @@ -378,24 +377,24 @@ typedef struct { /// transmission may be delayed to combine with data from /// subsequent Transmit()s for efficiency. /// - BOOLEAN Push; + BOOLEAN Push; /// /// The data in the fragment table are urgent and urgent point is in /// effect if TRUE. Otherwise those data are NOT considered urgent. /// - BOOLEAN Urgent; + BOOLEAN Urgent; /// /// Length of the data in the fragments. /// - UINT32 DataLength; + UINT32 DataLength; /// /// Number of fragments. /// - UINT32 FragmentCount; + UINT32 FragmentCount; /// /// An array of fragment descriptors. /// - EFI_TCP6_FRAGMENT_DATA FragmentTable[1]; + EFI_TCP6_FRAGMENT_DATA FragmentTable[1]; } EFI_TCP6_TRANSMIT_DATA; /// @@ -432,18 +431,18 @@ typedef struct { /// operation was failed because of IPSec policy check /// EFI_NO_MEDIA: There was a media error. /// - EFI_TCP6_COMPLETION_TOKEN CompletionToken; + EFI_TCP6_COMPLETION_TOKEN CompletionToken; union { /// /// When this token is used for receiving, RxData is a pointer to /// EFI_TCP6_RECEIVE_DATA. /// - EFI_TCP6_RECEIVE_DATA *RxData; + EFI_TCP6_RECEIVE_DATA *RxData; /// /// When this token is used for transmitting, TxData is a pointer to /// EFI_TCP6_TRANSMIT_DATA. /// - EFI_TCP6_TRANSMIT_DATA *TxData; + EFI_TCP6_TRANSMIT_DATA *TxData; } Packet; } EFI_TCP6_IO_TOKEN; @@ -459,13 +458,13 @@ typedef struct { /// EFI_ABORTED: User called configure with NULL without close stopping. /// EFI_SECURITY_VIOLATION: The close operation was failed because of IPSec policy check. /// - EFI_TCP6_COMPLETION_TOKEN CompletionToken; + EFI_TCP6_COMPLETION_TOKEN CompletionToken; /// /// Abort the TCP connection on close instead of the standard TCP /// close process when it is set to TRUE. This option can be used to /// satisfy a fast disconnect. /// - BOOLEAN AbortOnClose; + BOOLEAN AbortOnClose; } EFI_TCP6_CLOSE_TOKEN; /** @@ -840,19 +839,18 @@ EFI_STATUS /// Each instance has its own independent settings. /// struct _EFI_TCP6_PROTOCOL { - EFI_TCP6_GET_MODE_DATA GetModeData; - EFI_TCP6_CONFIGURE Configure; - EFI_TCP6_CONNECT Connect; - EFI_TCP6_ACCEPT Accept; - EFI_TCP6_TRANSMIT Transmit; - EFI_TCP6_RECEIVE Receive; - EFI_TCP6_CLOSE Close; - EFI_TCP6_CANCEL Cancel; - EFI_TCP6_POLL Poll; + EFI_TCP6_GET_MODE_DATA GetModeData; + EFI_TCP6_CONFIGURE Configure; + EFI_TCP6_CONNECT Connect; + EFI_TCP6_ACCEPT Accept; + EFI_TCP6_TRANSMIT Transmit; + EFI_TCP6_RECEIVE Receive; + EFI_TCP6_CLOSE Close; + EFI_TCP6_CANCEL Cancel; + EFI_TCP6_POLL Poll; }; -extern EFI_GUID gEfiTcp6ServiceBindingProtocolGuid; -extern EFI_GUID gEfiTcp6ProtocolGuid; +extern EFI_GUID gEfiTcp6ServiceBindingProtocolGuid; +extern EFI_GUID gEfiTcp6ProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/Timer.h b/MdePkg/Include/Protocol/Timer.h index e786007..865de8e 100644 --- a/MdePkg/Include/Protocol/Timer.h +++ b/MdePkg/Include/Protocol/Timer.h @@ -20,7 +20,7 @@ /// /// Declare forward reference for the Timer Architectural Protocol /// -typedef struct _EFI_TIMER_ARCH_PROTOCOL EFI_TIMER_ARCH_PROTOCOL; +typedef struct _EFI_TIMER_ARCH_PROTOCOL EFI_TIMER_ARCH_PROTOCOL; /** This function of this type is called when a timer interrupt fires. This @@ -76,7 +76,7 @@ EFI_STATUS (EFIAPI *EFI_TIMER_REGISTER_HANDLER)( IN EFI_TIMER_ARCH_PROTOCOL *This, IN EFI_TIMER_NOTIFY NotifyFunction -); + ); /** This function adjusts the period of timer interrupts to the value specified @@ -153,7 +153,6 @@ EFI_STATUS IN EFI_TIMER_ARCH_PROTOCOL *This ); - /// /// This protocol provides the services to initialize a periodic timer /// interrupt, and to register a handler that is called each time the timer @@ -163,12 +162,12 @@ EFI_STATUS /// interrupt. /// struct _EFI_TIMER_ARCH_PROTOCOL { - EFI_TIMER_REGISTER_HANDLER RegisterHandler; - EFI_TIMER_SET_TIMER_PERIOD SetTimerPeriod; - EFI_TIMER_GET_TIMER_PERIOD GetTimerPeriod; - EFI_TIMER_GENERATE_SOFT_INTERRUPT GenerateSoftInterrupt; + EFI_TIMER_REGISTER_HANDLER RegisterHandler; + EFI_TIMER_SET_TIMER_PERIOD SetTimerPeriod; + EFI_TIMER_GET_TIMER_PERIOD GetTimerPeriod; + EFI_TIMER_GENERATE_SOFT_INTERRUPT GenerateSoftInterrupt; }; -extern EFI_GUID gEfiTimerArchProtocolGuid; +extern EFI_GUID gEfiTimerArchProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Timestamp.h b/MdePkg/Include/Protocol/Timestamp.h index aab2ba4..eb1e6d6 100644 --- a/MdePkg/Include/Protocol/Timestamp.h +++ b/MdePkg/Include/Protocol/Timestamp.h @@ -13,14 +13,13 @@ #ifndef __EFI_TIME_STAMP_PROTOCOL_H__ #define __EFI_TIME_STAMP_PROTOCOL_H__ - #define EFI_TIMESTAMP_PROTOCOL_GUID \ { 0xafbfde41, 0x2e6e, 0x4262, {0xba, 0x65, 0x62, 0xb9, 0x23, 0x6e, 0x54, 0x95 } } /// /// Declare forward reference for the Time Stamp Protocol /// -typedef struct _EFI_TIMESTAMP_PROTOCOL EFI_TIMESTAMP_PROTOCOL; +typedef struct _EFI_TIMESTAMP_PROTOCOL EFI_TIMESTAMP_PROTOCOL; /// /// EFI_TIMESTAMP_PROPERTIES @@ -29,13 +28,13 @@ typedef struct { /// /// The frequency of the timestamp counter in Hz. /// - UINT64 Frequency; + UINT64 Frequency; /// /// The value that the timestamp counter ends with immediately before it rolls over. /// For example, a 64-bit free running counter would have an EndValue of 0xFFFFFFFFFFFFFFFF. /// A 24-bit free running counter would have an EndValue of 0xFFFFFF. /// - UINT64 EndValue; + UINT64 EndValue; } EFI_TIMESTAMP_PROPERTIES; /** @@ -77,19 +76,16 @@ EFI_STATUS OUT EFI_TIMESTAMP_PROPERTIES *Properties ); - - /// /// EFI_TIMESTAMP_PROTOCOL /// The protocol provides a platform independent interface for retrieving a high resolution /// timestamp counter. /// struct _EFI_TIMESTAMP_PROTOCOL { - TIMESTAMP_GET GetTimestamp; - TIMESTAMP_GET_PROPERTIES GetProperties; + TIMESTAMP_GET GetTimestamp; + TIMESTAMP_GET_PROPERTIES GetProperties; }; -extern EFI_GUID gEfiTimestampProtocolGuid; +extern EFI_GUID gEfiTimestampProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/Tls.h b/MdePkg/Include/Protocol/Tls.h index fccbdb8..edcf0e3 100644 --- a/MdePkg/Include/Protocol/Tls.h +++ b/MdePkg/Include/Protocol/Tls.h @@ -114,8 +114,8 @@ typedef enum { /// SSL2.0 is obsolete and should not be used. /// typedef struct { - UINT8 Major; - UINT8 Minor; + UINT8 Major; + UINT8 Minor; } EFI_TLS_VERSION; /// @@ -134,8 +134,8 @@ typedef enum { /// #pragma pack (1) typedef struct { - UINT8 Data1; - UINT8 Data2; + UINT8 Data1; + UINT8 Data2; } EFI_TLS_CIPHER; #pragma pack () @@ -152,9 +152,9 @@ typedef UINT8 EFI_TLS_COMPRESSION; /// #pragma pack (1) typedef struct { - UINT16 ExtensionType; - UINT16 Length; - UINT8 Data[1]; + UINT16 ExtensionType; + UINT16 Length; + UINT8 Data[1]; } EFI_TLS_EXTENSION; #pragma pack () @@ -163,17 +163,17 @@ typedef struct { /// Use either EFI_TLS_VERIFY_NONE or EFI_TLS_VERIFY_PEER, the last two options /// are 'ORed' with EFI_TLS_VERIFY_PEER if they are desired. /// -typedef UINT32 EFI_TLS_VERIFY; +typedef UINT32 EFI_TLS_VERIFY; /// /// No certificates will be sent or the TLS/SSL handshake will be continued regardless /// of the certificate verification result. /// -#define EFI_TLS_VERIFY_NONE 0x0 +#define EFI_TLS_VERIFY_NONE 0x0 /// /// The TLS/SSL handshake is immediately terminated with an alert message containing /// the reason for the certificate verification failure. /// -#define EFI_TLS_VERIFY_PEER 0x1 +#define EFI_TLS_VERIFY_PEER 0x1 /// /// EFI_TLS_VERIFY_FAIL_IF_NO_PEER_CERT is only meaningful in the server mode. /// TLS session will fail if client certificate is absent. @@ -183,7 +183,7 @@ typedef UINT32 EFI_TLS_VERIFY; /// TLS session only verify client once, and doesn't request certificate during /// re-negotiation. /// -#define EFI_TLS_VERIFY_CLIENT_ONCE 0x4 +#define EFI_TLS_VERIFY_CLIENT_ONCE 0x4 /// /// EFI_TLS_VERIFY_HOST_FLAG @@ -193,43 +193,43 @@ typedef UINT32 EFI_TLS_VERIFY_HOST_FLAG; /// There is no additional flags set for hostname validation. /// Wildcards are supported and they match only in the left-most label. /// -#define EFI_TLS_VERIFY_FLAG_NONE 0x00 +#define EFI_TLS_VERIFY_FLAG_NONE 0x00 /// /// Always check the Subject Distinguished Name (DN) in the peer certificate even if the /// certificate contains Subject Alternative Name (SAN). /// -#define EFI_TLS_VERIFY_FLAG_ALWAYS_CHECK_SUBJECT 0x01 +#define EFI_TLS_VERIFY_FLAG_ALWAYS_CHECK_SUBJECT 0x01 /// /// Disable the match of all wildcards. /// -#define EFI_TLS_VERIFY_FLAG_NO_WILDCARDS 0x02 +#define EFI_TLS_VERIFY_FLAG_NO_WILDCARDS 0x02 /// /// Disable the "*" as wildcard in labels that have a prefix or suffix (e.g. "www*" or "*www"). /// -#define EFI_TLS_VERIFY_FLAG_NO_PARTIAL_WILDCARDS 0x04 +#define EFI_TLS_VERIFY_FLAG_NO_PARTIAL_WILDCARDS 0x04 /// /// Allow the "*" to match more than one labels. Otherwise, only matches a single label. /// -#define EFI_TLS_VERIFY_FLAG_MULTI_LABEL_WILDCARDS 0x08 +#define EFI_TLS_VERIFY_FLAG_MULTI_LABEL_WILDCARDS 0x08 /// /// Restrict to only match direct child sub-domains which start with ".". /// For example, a name of ".example.com" would match "www.example.com" with this flag, /// but would not match "www.sub.example.com". /// -#define EFI_TLS_VERIFY_FLAG_SINGLE_LABEL_SUBDOMAINS 0x10 +#define EFI_TLS_VERIFY_FLAG_SINGLE_LABEL_SUBDOMAINS 0x10 /// /// Never check the Subject Distinguished Name (DN) even there is no /// Subject Alternative Name (SAN) in the certificate. /// -#define EFI_TLS_VERIFY_FLAG_NEVER_CHECK_SUBJECT 0x20 +#define EFI_TLS_VERIFY_FLAG_NEVER_CHECK_SUBJECT 0x20 /// /// EFI_TLS_VERIFY_HOST /// #pragma pack (1) typedef struct { - EFI_TLS_VERIFY_HOST_FLAG Flags; - CHAR8 *HostName; + EFI_TLS_VERIFY_HOST_FLAG Flags; + CHAR8 *HostName; } EFI_TLS_VERIFY_HOST; #pragma pack () @@ -240,8 +240,8 @@ typedef struct { /// #pragma pack (1) typedef struct { - UINT32 GmtUnixTime; - UINT8 RandomBytes[28]; + UINT32 GmtUnixTime; + UINT8 RandomBytes[28]; } EFI_TLS_RANDOM; #pragma pack () @@ -252,7 +252,7 @@ typedef struct { /// #pragma pack (1) typedef struct { - UINT8 Data[48]; + UINT8 Data[48]; } EFI_TLS_MASTER_SECRET; #pragma pack () @@ -263,8 +263,8 @@ typedef struct { #define MAX_TLS_SESSION_ID_LENGTH 32 #pragma pack (1) typedef struct { - UINT16 Length; - UINT8 Data[MAX_TLS_SESSION_ID_LENGTH]; + UINT16 Length; + UINT8 Data[MAX_TLS_SESSION_ID_LENGTH]; } EFI_TLS_SESSION_ID; #pragma pack () @@ -305,7 +305,6 @@ typedef enum { EfiTlsSessionError, EfiTlsSessionStateMaximum - } EFI_TLS_SESSION_STATE; /// @@ -315,11 +314,11 @@ typedef struct { /// /// Length of data buffer in the fragment. /// - UINT32 FragmentLength; + UINT32 FragmentLength; /// /// Pointer to the data buffer in the fragment. /// - VOID *FragmentBuffer; + VOID *FragmentBuffer; } EFI_TLS_FRAGMENT_DATA; /// @@ -363,7 +362,7 @@ typedef enum { **/ typedef EFI_STATUS -(EFIAPI *EFI_TLS_SET_SESSION_DATA) ( +(EFIAPI *EFI_TLS_SET_SESSION_DATA)( IN EFI_TLS_PROTOCOL *This, IN EFI_TLS_SESSION_DATA_TYPE DataType, IN VOID *Data, @@ -395,7 +394,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TLS_GET_SESSION_DATA) ( +(EFIAPI *EFI_TLS_GET_SESSION_DATA)( IN EFI_TLS_PROTOCOL *This, IN EFI_TLS_SESSION_DATA_TYPE DataType, IN OUT VOID *Data OPTIONAL, @@ -442,7 +441,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TLS_BUILD_RESPONSE_PACKET) ( +(EFIAPI *EFI_TLS_BUILD_RESPONSE_PACKET)( IN EFI_TLS_PROTOCOL *This, IN UINT8 *RequestBuffer OPTIONAL, IN UINTN RequestSize OPTIONAL, @@ -486,7 +485,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TLS_PROCESS_PACKET) ( +(EFIAPI *EFI_TLS_PROCESS_PACKET)( IN EFI_TLS_PROTOCOL *This, IN OUT EFI_TLS_FRAGMENT_DATA **FragmentTable, IN UINT32 *FragmentCount, @@ -498,13 +497,13 @@ EFI_STATUS /// For detail of TLS, please refer to TLS related RFC. /// struct _EFI_TLS_PROTOCOL { - EFI_TLS_SET_SESSION_DATA SetSessionData; - EFI_TLS_GET_SESSION_DATA GetSessionData; - EFI_TLS_BUILD_RESPONSE_PACKET BuildResponsePacket; - EFI_TLS_PROCESS_PACKET ProcessPacket; + EFI_TLS_SET_SESSION_DATA SetSessionData; + EFI_TLS_GET_SESSION_DATA GetSessionData; + EFI_TLS_BUILD_RESPONSE_PACKET BuildResponsePacket; + EFI_TLS_PROCESS_PACKET ProcessPacket; }; -extern EFI_GUID gEfiTlsServiceBindingProtocolGuid; -extern EFI_GUID gEfiTlsProtocolGuid; +extern EFI_GUID gEfiTlsServiceBindingProtocolGuid; +extern EFI_GUID gEfiTlsProtocolGuid; -#endif // __EFI_TLS_PROTOCOL_H__ +#endif // __EFI_TLS_PROTOCOL_H__ diff --git a/MdePkg/Include/Protocol/TlsConfig.h b/MdePkg/Include/Protocol/TlsConfig.h index e02ac55..8b2a94d 100644 --- a/MdePkg/Include/Protocol/TlsConfig.h +++ b/MdePkg/Include/Protocol/TlsConfig.h @@ -9,6 +9,7 @@ This Protocol is introduced in UEFI Specification 2.5 **/ + #ifndef __EFI_TLS_CONFIGURATION_PROTOCOL_H__ #define __EFI_TLS_CONFIGURATION_PROTOCOL_H__ @@ -48,7 +49,6 @@ typedef enum { EfiTlsConfigDataTypeCertRevocationList, EfiTlsConfigDataTypeMaximum - } EFI_TLS_CONFIG_DATA_TYPE; /** @@ -117,10 +117,10 @@ EFI_STATUS /// TLS configuration, such as Certificate, private key data. /// struct _EFI_TLS_CONFIGURATION_PROTOCOL { - EFI_TLS_CONFIGURATION_SET_DATA SetData; - EFI_TLS_CONFIGURATION_GET_DATA GetData; + EFI_TLS_CONFIGURATION_SET_DATA SetData; + EFI_TLS_CONFIGURATION_GET_DATA GetData; }; -extern EFI_GUID gEfiTlsConfigurationProtocolGuid; +extern EFI_GUID gEfiTlsConfigurationProtocolGuid; -#endif //__EFI_TLS_CONFIGURATION_PROTOCOL_H__ +#endif //__EFI_TLS_CONFIGURATION_PROTOCOL_H__ diff --git a/MdePkg/Include/Protocol/TrEEProtocol.h b/MdePkg/Include/Protocol/TrEEProtocol.h index caacd61..68d49b5 100644 --- a/MdePkg/Include/Protocol/TrEEProtocol.h +++ b/MdePkg/Include/Protocol/TrEEProtocol.h @@ -18,65 +18,65 @@ SPDX-License-Identifier: BSD-2-Clause-Patent typedef struct _EFI_TREE_PROTOCOL EFI_TREE_PROTOCOL; typedef struct _TREE_VERSION { - UINT8 Major; - UINT8 Minor; + UINT8 Major; + UINT8 Minor; } TREE_VERSION; typedef UINT32 TREE_EVENT_LOG_BITMAP; typedef UINT32 TREE_EVENT_LOG_FORMAT; -#define TREE_EVENT_LOG_FORMAT_TCG_1_2 0x00000001 +#define TREE_EVENT_LOG_FORMAT_TCG_1_2 0x00000001 typedef struct _TREE_BOOT_SERVICE_CAPABILITY { // // Allocated size of the structure passed in // - UINT8 Size; + UINT8 Size; // // Version of the TREE_BOOT_SERVICE_CAPABILITY structure itself. // For this version of the protocol, the Major version shall be set to 1 // and the Minor version shall be set to 0. // - TREE_VERSION StructureVersion; + TREE_VERSION StructureVersion; // // Version of the TrEE protocol. // For this version of the protocol, the Major version shall be set to 1 // and the Minor version shall be set to 0. // - TREE_VERSION ProtocolVersion; + TREE_VERSION ProtocolVersion; // // Supported hash algorithms // - UINT32 HashAlgorithmBitmap; + UINT32 HashAlgorithmBitmap; // // Bitmap of supported event log formats // - TREE_EVENT_LOG_BITMAP SupportedEventLogs; + TREE_EVENT_LOG_BITMAP SupportedEventLogs; // // False = TrEE not present // - BOOLEAN TrEEPresentFlag; + BOOLEAN TrEEPresentFlag; // // Max size (in bytes) of a command that can be sent to the TrEE // - UINT16 MaxCommandSize; + UINT16 MaxCommandSize; // // Max size (in bytes) of a response that can be provided by the TrEE // - UINT16 MaxResponseSize; + UINT16 MaxResponseSize; // // 4-byte Vendor ID (see Trusted Computing Group, "TCG Vendor ID Registry," // Version 1.0, Revision 0.1, August 31, 2007, "TPM Capabilities Vendor ID" section) // - UINT32 ManufacturerID; + UINT32 ManufacturerID; } TREE_BOOT_SERVICE_CAPABILITY_1_0; typedef TREE_BOOT_SERVICE_CAPABILITY_1_0 TREE_BOOT_SERVICE_CAPABILITY; -#define TREE_BOOT_HASH_ALG_SHA1 0x00000001 -#define TREE_BOOT_HASH_ALG_SHA256 0x00000002 -#define TREE_BOOT_HASH_ALG_SHA384 0x00000004 -#define TREE_BOOT_HASH_ALG_SHA512 0x00000008 +#define TREE_BOOT_HASH_ALG_SHA1 0x00000001 +#define TREE_BOOT_HASH_ALG_SHA256 0x00000002 +#define TREE_BOOT_HASH_ALG_SHA384 0x00000004 +#define TREE_BOOT_HASH_ALG_SHA512 0x00000008 // // This bit is shall be set when an event shall be extended but not logged. @@ -85,12 +85,12 @@ typedef TREE_BOOT_SERVICE_CAPABILITY_1_0 TREE_BOOT_SERVICE_CAPABILITY; // // This bit shall be set when the intent is to measure a PE/COFF image. // -#define PE_COFF_IMAGE 0x0000000000000010 +#define PE_COFF_IMAGE 0x0000000000000010 typedef UINT32 TrEE_PCRINDEX; typedef UINT32 TrEE_EVENTTYPE; -#define MAX_PCR_INDEX 23 +#define MAX_PCR_INDEX 23 #define TREE_EVENT_HEADER_VERSION 1 #pragma pack(1) @@ -118,9 +118,9 @@ typedef struct { // // Total size of the event including the Size component, the header and the Event data. // - UINT32 Size; - TrEE_EVENT_HEADER Header; - UINT8 Event[1]; + UINT32 Size; + TrEE_EVENT_HEADER Header; + UINT8 Event[1]; } TrEE_EVENT; #pragma pack() @@ -146,7 +146,7 @@ typedef struct { **/ typedef EFI_STATUS -(EFIAPI *EFI_TREE_GET_CAPABILITY) ( +(EFIAPI *EFI_TREE_GET_CAPABILITY)( IN EFI_TREE_PROTOCOL *This, IN OUT TREE_BOOT_SERVICE_CAPABILITY *ProtocolCapability ); @@ -170,7 +170,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TREE_GET_EVENT_LOG) ( +(EFIAPI *EFI_TREE_GET_EVENT_LOG)( IN EFI_TREE_PROTOCOL *This, IN TREE_EVENT_LOG_FORMAT EventLogFormat, OUT EFI_PHYSICAL_ADDRESS *EventLogLocation, @@ -199,7 +199,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI * EFI_TREE_HASH_LOG_EXTEND_EVENT) ( +(EFIAPI *EFI_TREE_HASH_LOG_EXTEND_EVENT)( IN EFI_TREE_PROTOCOL *This, IN UINT64 Flags, IN EFI_PHYSICAL_ADDRESS DataToHash, @@ -223,7 +223,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TREE_SUBMIT_COMMAND) ( +(EFIAPI *EFI_TREE_SUBMIT_COMMAND)( IN EFI_TREE_PROTOCOL *This, IN UINT32 InputParameterBlockSize, IN UINT8 *InputParameterBlock, @@ -232,12 +232,12 @@ EFI_STATUS ); struct _EFI_TREE_PROTOCOL { - EFI_TREE_GET_CAPABILITY GetCapability; - EFI_TREE_GET_EVENT_LOG GetEventLog; - EFI_TREE_HASH_LOG_EXTEND_EVENT HashLogExtendEvent; - EFI_TREE_SUBMIT_COMMAND SubmitCommand; + EFI_TREE_GET_CAPABILITY GetCapability; + EFI_TREE_GET_EVENT_LOG GetEventLog; + EFI_TREE_HASH_LOG_EXTEND_EVENT HashLogExtendEvent; + EFI_TREE_SUBMIT_COMMAND SubmitCommand; }; -extern EFI_GUID gEfiTrEEProtocolGuid; +extern EFI_GUID gEfiTrEEProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Udp4.h b/MdePkg/Include/Protocol/Udp4.h index d071f50..a4ac6fd 100644 --- a/MdePkg/Include/Protocol/Udp4.h +++ b/MdePkg/Include/Protocol/Udp4.h @@ -17,7 +17,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include // -//GUID definitions +// GUID definitions // #define EFI_UDP4_SERVICE_BINDING_PROTOCOL_GUID \ { \ @@ -36,11 +36,11 @@ typedef struct _EFI_UDP4_PROTOCOL EFI_UDP4_PROTOCOL; /// The definition in here is only present to provide backwards compatability. /// typedef struct { - EFI_HANDLE InstanceHandle; - EFI_IPv4_ADDRESS LocalAddress; - UINT16 LocalPort; - EFI_IPv4_ADDRESS RemoteAddress; - UINT16 RemotePort; + EFI_HANDLE InstanceHandle; + EFI_IPv4_ADDRESS LocalAddress; + UINT16 LocalPort; + EFI_IPv4_ADDRESS RemoteAddress; + UINT16 RemotePort; } EFI_UDP4_SERVICE_POINT; /// @@ -48,52 +48,52 @@ typedef struct { /// The definition in here is only present to provide backwards compatability. /// typedef struct { - EFI_HANDLE DriverHandle; - UINT32 ServiceCount; - EFI_UDP4_SERVICE_POINT Services[1]; + EFI_HANDLE DriverHandle; + UINT32 ServiceCount; + EFI_UDP4_SERVICE_POINT Services[1]; } EFI_UDP4_VARIABLE_DATA; typedef struct { - UINT32 FragmentLength; - VOID *FragmentBuffer; + UINT32 FragmentLength; + VOID *FragmentBuffer; } EFI_UDP4_FRAGMENT_DATA; typedef struct { - EFI_IPv4_ADDRESS SourceAddress; - UINT16 SourcePort; - EFI_IPv4_ADDRESS DestinationAddress; - UINT16 DestinationPort; + EFI_IPv4_ADDRESS SourceAddress; + UINT16 SourcePort; + EFI_IPv4_ADDRESS DestinationAddress; + UINT16 DestinationPort; } EFI_UDP4_SESSION_DATA; typedef struct { // // Receiving Filters // - BOOLEAN AcceptBroadcast; - BOOLEAN AcceptPromiscuous; - BOOLEAN AcceptAnyPort; - BOOLEAN AllowDuplicatePort; + BOOLEAN AcceptBroadcast; + BOOLEAN AcceptPromiscuous; + BOOLEAN AcceptAnyPort; + BOOLEAN AllowDuplicatePort; // // I/O parameters // - UINT8 TypeOfService; - UINT8 TimeToLive; - BOOLEAN DoNotFragment; - UINT32 ReceiveTimeout; - UINT32 TransmitTimeout; + UINT8 TypeOfService; + UINT8 TimeToLive; + BOOLEAN DoNotFragment; + UINT32 ReceiveTimeout; + UINT32 TransmitTimeout; // // Access Point // - BOOLEAN UseDefaultAddress; - EFI_IPv4_ADDRESS StationAddress; - EFI_IPv4_ADDRESS SubnetMask; - UINT16 StationPort; - EFI_IPv4_ADDRESS RemoteAddress; - UINT16 RemotePort; + BOOLEAN UseDefaultAddress; + EFI_IPv4_ADDRESS StationAddress; + EFI_IPv4_ADDRESS SubnetMask; + UINT16 StationPort; + EFI_IPv4_ADDRESS RemoteAddress; + UINT16 RemotePort; } EFI_UDP4_CONFIG_DATA; typedef struct { - EFI_UDP4_SESSION_DATA *UdpSessionData; //OPTIONAL - EFI_IPv4_ADDRESS *GatewayAddress; //OPTIONAL + EFI_UDP4_SESSION_DATA *UdpSessionData; // OPTIONAL + EFI_IPv4_ADDRESS *GatewayAddress; // OPTIONAL UINT32 DataLength; UINT32 FragmentCount; EFI_UDP4_FRAGMENT_DATA FragmentTable[1]; @@ -108,13 +108,12 @@ typedef struct { EFI_UDP4_FRAGMENT_DATA FragmentTable[1]; } EFI_UDP4_RECEIVE_DATA; - typedef struct { - EFI_EVENT Event; - EFI_STATUS Status; + EFI_EVENT Event; + EFI_STATUS Status; union { - EFI_UDP4_RECEIVE_DATA *RxData; - EFI_UDP4_TRANSMIT_DATA *TxData; + EFI_UDP4_RECEIVE_DATA *RxData; + EFI_UDP4_TRANSMIT_DATA *TxData; } Packet; } EFI_UDP4_COMPLETION_TOKEN; @@ -148,7 +147,6 @@ EFI_STATUS OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL ); - /** Initializes, changes, or resets the operational parameters for this instance of the EFI UDPv4 Protocol. @@ -423,17 +421,17 @@ EFI_STATUS /// such as the routing table and group table, which are independent from each other. /// struct _EFI_UDP4_PROTOCOL { - EFI_UDP4_GET_MODE_DATA GetModeData; - EFI_UDP4_CONFIGURE Configure; - EFI_UDP4_GROUPS Groups; - EFI_UDP4_ROUTES Routes; - EFI_UDP4_TRANSMIT Transmit; - EFI_UDP4_RECEIVE Receive; - EFI_UDP4_CANCEL Cancel; - EFI_UDP4_POLL Poll; + EFI_UDP4_GET_MODE_DATA GetModeData; + EFI_UDP4_CONFIGURE Configure; + EFI_UDP4_GROUPS Groups; + EFI_UDP4_ROUTES Routes; + EFI_UDP4_TRANSMIT Transmit; + EFI_UDP4_RECEIVE Receive; + EFI_UDP4_CANCEL Cancel; + EFI_UDP4_POLL Poll; }; -extern EFI_GUID gEfiUdp4ServiceBindingProtocolGuid; -extern EFI_GUID gEfiUdp4ProtocolGuid; +extern EFI_GUID gEfiUdp4ServiceBindingProtocolGuid; +extern EFI_GUID gEfiUdp4ProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Udp6.h b/MdePkg/Include/Protocol/Udp6.h index 1169612..61fa623 100644 --- a/MdePkg/Include/Protocol/Udp6.h +++ b/MdePkg/Include/Protocol/Udp6.h @@ -65,15 +65,15 @@ typedef struct { /// /// The handle of the driver that creates this entry. /// - EFI_HANDLE DriverHandle; + EFI_HANDLE DriverHandle; /// /// The number of address/port pairs that follow this data structure. /// - UINT32 ServiceCount; + UINT32 ServiceCount; /// /// List of address/port pairs that are currently in use. /// - EFI_UDP6_SERVICE_POINT Services[1]; + EFI_UDP6_SERVICE_POINT Services[1]; } EFI_UDP6_VARIABLE_DATA; typedef struct _EFI_UDP6_PROTOCOL EFI_UDP6_PROTOCOL; @@ -83,8 +83,8 @@ typedef struct _EFI_UDP6_PROTOCOL EFI_UDP6_PROTOCOL; /// The purpose of this structure is to avoid copying the same packet multiple times. /// typedef struct { - UINT32 FragmentLength; ///< Length of the fragment data buffer. - VOID *FragmentBuffer; ///< Pointer to the fragment data buffer. + UINT32 FragmentLength; ///< Length of the fragment data buffer. + VOID *FragmentBuffer; ///< Pointer to the fragment data buffer. } EFI_UDP6_FRAGMENT_DATA; /// @@ -97,56 +97,56 @@ typedef struct { /// Address from which this packet is sent. This field should not be used when /// sending packets. /// - EFI_IPv6_ADDRESS SourceAddress; + EFI_IPv6_ADDRESS SourceAddress; /// /// Port from which this packet is sent. It is in host byte order. This field should /// not be used when sending packets. /// - UINT16 SourcePort; + UINT16 SourcePort; /// /// Address to which this packet is sent. When sending packet, it'll be ignored /// if it is zero. /// - EFI_IPv6_ADDRESS DestinationAddress; + EFI_IPv6_ADDRESS DestinationAddress; /// /// Port to which this packet is sent. When sending packet, it'll be /// ignored if it is zero. /// - UINT16 DestinationPort; + UINT16 DestinationPort; } EFI_UDP6_SESSION_DATA; typedef struct { /// /// Set to TRUE to accept UDP packets that are sent to any address. /// - BOOLEAN AcceptPromiscuous; + BOOLEAN AcceptPromiscuous; /// /// Set to TRUE to accept UDP packets that are sent to any port. /// - BOOLEAN AcceptAnyPort; + BOOLEAN AcceptAnyPort; /// /// Set to TRUE to allow this EFI UDPv6 Protocol child instance to open a port number /// that is already being used by another EFI UDPv6 Protocol child instance. /// - BOOLEAN AllowDuplicatePort; + BOOLEAN AllowDuplicatePort; /// /// TrafficClass field in transmitted IPv6 packets. /// - UINT8 TrafficClass; + UINT8 TrafficClass; /// /// HopLimit field in transmitted IPv6 packets. /// - UINT8 HopLimit; + UINT8 HopLimit; /// /// The receive timeout value (number of microseconds) to be associated with each /// incoming packet. Zero means do not drop incoming packets. /// - UINT32 ReceiveTimeout; + UINT32 ReceiveTimeout; /// /// The transmit timeout value (number of microseconds) to be associated with each /// outgoing packet. Zero means do not drop outgoing packets. /// - UINT32 TransmitTimeout; + UINT32 TransmitTimeout; /// /// The station IP address that will be assigned to this EFI UDPv6 Protocol instance. /// The EFI UDPv6 and EFI IPv6 Protocol drivers will only deliver incoming packets @@ -158,28 +158,28 @@ typedef struct { /// transitioning from the stopped to the started states. If no address is available /// for selecting, the EFI IPv6 Protocol driver will use EFI_IP6_CONFIG_PROTOCOL to /// retrieve the IPv6 address. - EFI_IPv6_ADDRESS StationAddress; + EFI_IPv6_ADDRESS StationAddress; /// /// The port number to which this EFI UDPv6 Protocol instance is bound. If a client /// of the EFI UDPv6 Protocol does not care about the port number, set StationPort /// to zero. The EFI UDPv6 Protocol driver will assign a random port number to transmitted /// UDP packets. Ignored it if AcceptAnyPort is TRUE. /// - UINT16 StationPort; + UINT16 StationPort; /// /// The IP address of remote host to which this EFI UDPv6 Protocol instance is connecting. /// If RemoteAddress is not 0::/128, this EFI UDPv6 Protocol instance will be connected to /// RemoteAddress; i.e., outgoing packets of this EFI UDPv6 Protocol instance will be sent /// to this address by default and only incoming packets from this address will be delivered /// to client. Ignored for incoming filtering if AcceptPromiscuous is TRUE. - EFI_IPv6_ADDRESS RemoteAddress; + EFI_IPv6_ADDRESS RemoteAddress; /// /// The port number of the remote host to which this EFI UDPv6 Protocol instance is connecting. /// If it is not zero, outgoing packets of this EFI UDPv6 Protocol instance will be sent to /// this port number by default and only incoming packets from this port will be delivered /// to client. Ignored if RemoteAddress is 0::/128 and ignored for incoming filtering if /// AcceptPromiscuous is TRUE. - UINT16 RemotePort; + UINT16 RemotePort; } EFI_UDP6_CONFIG_DATA; /// @@ -259,7 +259,7 @@ typedef struct { /// This Event will be signaled after the Status field is updated by the EFI UDPv6 Protocol /// driver. The type of Event must be EVT_NOTIFY_SIGNAL. /// - EFI_EVENT Event; + EFI_EVENT Event; /// /// Will be set to one of the following values: /// - EFI_SUCCESS: The receive or transmit operation completed successfully. @@ -280,16 +280,16 @@ typedef struct { /// - EFI_SECURITY_VIOLATION: The transmit or receive was failed because of IPsec policy check. /// - EFI_NO_MEDIA: There was a media error. /// - EFI_STATUS Status; + EFI_STATUS Status; union { /// /// When this token is used for receiving, RxData is a pointer to EFI_UDP6_RECEIVE_DATA. /// - EFI_UDP6_RECEIVE_DATA *RxData; + EFI_UDP6_RECEIVE_DATA *RxData; /// /// When this token is used for transmitting, TxData is a pointer to EFI_UDP6_TRANSMIT_DATA. /// - EFI_UDP6_TRANSMIT_DATA *TxData; + EFI_UDP6_TRANSMIT_DATA *TxData; } Packet; } EFI_UDP6_COMPLETION_TOKEN; @@ -321,7 +321,7 @@ EFI_STATUS OUT EFI_IP6_MODE_DATA *Ip6ModeData OPTIONAL, OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL, OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL -); + ); /** Initializes, changes, or resets the operational parameters for this instance of the EFI UDPv6 @@ -369,7 +369,7 @@ EFI_STATUS (EFIAPI *EFI_UDP6_CONFIGURE)( IN EFI_UDP6_PROTOCOL *This, IN EFI_UDP6_CONFIG_DATA *UdpConfigData OPTIONAL -); + ); /** Joins and leaves multicast groups. @@ -400,7 +400,7 @@ EFI_STATUS IN EFI_UDP6_PROTOCOL *This, IN BOOLEAN JoinFlag, IN EFI_IPv6_ADDRESS *MulticastAddress OPTIONAL -); + ); /** Queues outgoing data packets into the transmit queue. @@ -456,7 +456,7 @@ EFI_STATUS (EFIAPI *EFI_UDP6_TRANSMIT)( IN EFI_UDP6_PROTOCOL *This, IN EFI_UDP6_COMPLETION_TOKEN *Token -); + ); /** Places an asynchronous receive request into the receiving queue. @@ -495,7 +495,7 @@ EFI_STATUS (EFIAPI *EFI_UDP6_RECEIVE)( IN EFI_UDP6_PROTOCOL *This, IN EFI_UDP6_COMPLETION_TOKEN *Token -); + ); /** Aborts an asynchronous transmit or receive request. @@ -525,7 +525,7 @@ EFI_STATUS (EFIAPI *EFI_UDP6_CANCEL)( IN EFI_UDP6_PROTOCOL *This, IN EFI_UDP6_COMPLETION_TOKEN *Token OPTIONAL -); + ); /** Polls for incoming data packets and processes outgoing data packets. @@ -550,7 +550,7 @@ typedef EFI_STATUS (EFIAPI *EFI_UDP6_POLL)( IN EFI_UDP6_PROTOCOL *This -); + ); /// /// The EFI_UDP6_PROTOCOL defines an EFI UDPv6 Protocol session that can be used by any network drivers, @@ -559,16 +559,16 @@ EFI_STATUS /// Each instance has its own settings, such as group table, that are independent from each other. /// struct _EFI_UDP6_PROTOCOL { - EFI_UDP6_GET_MODE_DATA GetModeData; - EFI_UDP6_CONFIGURE Configure; - EFI_UDP6_GROUPS Groups; - EFI_UDP6_TRANSMIT Transmit; - EFI_UDP6_RECEIVE Receive; - EFI_UDP6_CANCEL Cancel; - EFI_UDP6_POLL Poll; + EFI_UDP6_GET_MODE_DATA GetModeData; + EFI_UDP6_CONFIGURE Configure; + EFI_UDP6_GROUPS Groups; + EFI_UDP6_TRANSMIT Transmit; + EFI_UDP6_RECEIVE Receive; + EFI_UDP6_CANCEL Cancel; + EFI_UDP6_POLL Poll; }; -extern EFI_GUID gEfiUdp6ServiceBindingProtocolGuid; -extern EFI_GUID gEfiUdp6ProtocolGuid; +extern EFI_GUID gEfiUdp6ServiceBindingProtocolGuid; +extern EFI_GUID gEfiUdp6ProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/UfsDeviceConfig.h b/MdePkg/Include/Protocol/UfsDeviceConfig.h index fdc1e1f..34676c7 100644 --- a/MdePkg/Include/Protocol/UfsDeviceConfig.h +++ b/MdePkg/Include/Protocol/UfsDeviceConfig.h @@ -21,7 +21,7 @@ // // Forward reference for pure ANSI compatability // -typedef struct _EFI_UFS_DEVICE_CONFIG_PROTOCOL EFI_UFS_DEVICE_CONFIG_PROTOCOL; +typedef struct _EFI_UFS_DEVICE_CONFIG_PROTOCOL EFI_UFS_DEVICE_CONFIG_PROTOCOL; /** Read or write specified device descriptor of a UFS device. @@ -48,7 +48,7 @@ typedef struct _EFI_UFS_DEVICE_CONFIG_PROTOCOL EFI_UFS_DEVICE_CONFIG_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI *EFI_UFS_DEVICE_CONFIG_RW_DESCRIPTOR) ( +(EFIAPI *EFI_UFS_DEVICE_CONFIG_RW_DESCRIPTOR)( IN EFI_UFS_DEVICE_CONFIG_PROTOCOL *This, IN BOOLEAN Read, IN UINT8 DescId, @@ -78,7 +78,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_UFS_DEVICE_CONFIG_RW_FLAG) ( +(EFIAPI *EFI_UFS_DEVICE_CONFIG_RW_FLAG)( IN EFI_UFS_DEVICE_CONFIG_PROTOCOL *This, IN BOOLEAN Read, IN UINT8 FlagId, @@ -110,7 +110,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_UFS_DEVICE_CONFIG_RW_ATTRIBUTE) ( +(EFIAPI *EFI_UFS_DEVICE_CONFIG_RW_ATTRIBUTE)( IN EFI_UFS_DEVICE_CONFIG_PROTOCOL *This, IN BOOLEAN Read, IN UINT8 AttrId, @@ -132,6 +132,6 @@ struct _EFI_UFS_DEVICE_CONFIG_PROTOCOL { /// /// UFS Device Config Protocol GUID variable. /// -extern EFI_GUID gEfiUfsDeviceConfigProtocolGuid; +extern EFI_GUID gEfiUfsDeviceConfigProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/UgaDraw.h b/MdePkg/Include/Protocol/UgaDraw.h index 288d2f4..8d33bf8 100644 --- a/MdePkg/Include/Protocol/UgaDraw.h +++ b/MdePkg/Include/Protocol/UgaDraw.h @@ -11,7 +11,6 @@ #ifndef __UGA_DRAW_H__ #define __UGA_DRAW_H__ - #define EFI_UGA_DRAW_PROTOCOL_GUID \ { \ 0x982c298b, 0xf4fa, 0x41cb, {0xb8, 0x38, 0x77, 0xaa, 0x68, 0x8f, 0xb8, 0x39 } \ @@ -67,15 +66,15 @@ EFI_STATUS ); typedef struct { - UINT8 Blue; - UINT8 Green; - UINT8 Red; - UINT8 Reserved; + UINT8 Blue; + UINT8 Green; + UINT8 Red; + UINT8 Reserved; } EFI_UGA_PIXEL; typedef union { - EFI_UGA_PIXEL Pixel; - UINT32 Raw; + EFI_UGA_PIXEL Pixel; + UINT32 Raw; } EFI_UGA_PIXEL_UNION; /// @@ -133,8 +132,8 @@ typedef enum { typedef EFI_STATUS (EFIAPI *EFI_UGA_DRAW_PROTOCOL_BLT)( - IN EFI_UGA_DRAW_PROTOCOL * This, - IN EFI_UGA_PIXEL * BltBuffer OPTIONAL, + IN EFI_UGA_DRAW_PROTOCOL *This, + IN EFI_UGA_PIXEL *BltBuffer OPTIONAL, IN EFI_UGA_BLT_OPERATION BltOperation, IN UINTN SourceX, IN UINTN SourceY, @@ -150,11 +149,11 @@ EFI_STATUS /// copy pixels to and from the graphics controller's frame buffer. /// struct _EFI_UGA_DRAW_PROTOCOL { - EFI_UGA_DRAW_PROTOCOL_GET_MODE GetMode; - EFI_UGA_DRAW_PROTOCOL_SET_MODE SetMode; - EFI_UGA_DRAW_PROTOCOL_BLT Blt; + EFI_UGA_DRAW_PROTOCOL_GET_MODE GetMode; + EFI_UGA_DRAW_PROTOCOL_SET_MODE SetMode; + EFI_UGA_DRAW_PROTOCOL_BLT Blt; }; -extern EFI_GUID gEfiUgaDrawProtocolGuid; +extern EFI_GUID gEfiUgaDrawProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/UgaIo.h b/MdePkg/Include/Protocol/UgaIo.h index 67a6abd..ffc5b3a 100644 --- a/MdePkg/Include/Protocol/UgaIo.h +++ b/MdePkg/Include/Protocol/UgaIo.h @@ -16,10 +16,10 @@ typedef struct _EFI_UGA_IO_PROTOCOL EFI_UGA_IO_PROTOCOL; -typedef UINT32 UGA_STATUS; +typedef UINT32 UGA_STATUS; typedef enum { - UgaDtParentBus = 1, + UgaDtParentBus = 1, UgaDtGraphicsController, UgaDtOutputController, UgaDtOutputPort, @@ -29,24 +29,24 @@ typedef enum { typedef UINT32 UGA_DEVICE_ID, *PUGA_DEVICE_ID; typedef struct { - UGA_DEVICE_TYPE deviceType; - UGA_DEVICE_ID deviceId; - UINT32 ui32DeviceContextSize; - UINT32 ui32SharedContextSize; + UGA_DEVICE_TYPE deviceType; + UGA_DEVICE_ID deviceId; + UINT32 ui32DeviceContextSize; + UINT32 ui32SharedContextSize; } UGA_DEVICE_DATA, *PUGA_DEVICE_DATA; typedef struct _UGA_DEVICE { - VOID *pvDeviceContext; - VOID *pvSharedContext; - VOID *pvRunTimeContext; - struct _UGA_DEVICE *pParentDevice; - VOID *pvBusIoServices; - VOID *pvStdIoServices; - UGA_DEVICE_DATA deviceData; + VOID *pvDeviceContext; + VOID *pvSharedContext; + VOID *pvRunTimeContext; + struct _UGA_DEVICE *pParentDevice; + VOID *pvBusIoServices; + VOID *pvStdIoServices; + UGA_DEVICE_DATA deviceData; } UGA_DEVICE, *PUGA_DEVICE; typedef enum { - UgaIoGetVersion = 1, + UgaIoGetVersion = 1, UgaIoGetChildDevice, UgaIoStartDevice, UgaIoStopDevice, @@ -72,15 +72,14 @@ typedef enum { } UGA_IO_REQUEST_CODE, *PUGA_IO_REQUEST_CODE; typedef struct { - IN UGA_IO_REQUEST_CODE ioRequestCode; - IN VOID *pvInBuffer; - IN UINT64 ui64InBufferSize; - OUT VOID *pvOutBuffer; - IN UINT64 ui64OutBufferSize; - OUT UINT64 ui64BytesReturned; + IN UGA_IO_REQUEST_CODE ioRequestCode; + IN VOID *pvInBuffer; + IN UINT64 ui64InBufferSize; + OUT VOID *pvOutBuffer; + IN UINT64 ui64OutBufferSize; + OUT UINT64 ui64BytesReturned; } UGA_IO_REQUEST, *PUGA_IO_REQUEST; - /** Dynamically allocate storage for a child UGA_DEVICE. @@ -108,7 +107,6 @@ EFI_STATUS OUT UGA_DEVICE **Device ); - /** Delete a dynamically allocated child UGA_DEVICE object that was allocated via CreateDevice(). @@ -125,8 +123,8 @@ EFI_STATUS typedef EFI_STATUS (EFIAPI *EFI_UGA_IO_PROTOCOL_DELETE_DEVICE)( - IN EFI_UGA_IO_PROTOCOL * This, - IN UGA_DEVICE * Device + IN EFI_UGA_IO_PROTOCOL *This, + IN UGA_DEVICE *Device ); /** @@ -156,12 +154,12 @@ typedef UGA_STATUS /// Provides a basic abstraction to send I/O requests to the graphics device and any of its children. /// struct _EFI_UGA_IO_PROTOCOL { - EFI_UGA_IO_PROTOCOL_CREATE_DEVICE CreateDevice; - EFI_UGA_IO_PROTOCOL_DELETE_DEVICE DeleteDevice; - PUGA_FW_SERVICE_DISPATCH DispatchService; + EFI_UGA_IO_PROTOCOL_CREATE_DEVICE CreateDevice; + EFI_UGA_IO_PROTOCOL_DELETE_DEVICE DeleteDevice; + PUGA_FW_SERVICE_DISPATCH DispatchService; }; -extern EFI_GUID gEfiUgaIoProtocolGuid; +extern EFI_GUID gEfiUgaIoProtocolGuid; // // Data structure that is stored in the EFI Configuration Table with the @@ -169,10 +167,10 @@ extern EFI_GUID gEfiUgaIoProtocolGuid; // EBC UGA drivers. // typedef struct { - UINT32 Version; - UINT32 HeaderSize; - UINT32 SizeOfEntries; - UINT32 NumberOfEntries; + UINT32 Version; + UINT32 HeaderSize; + UINT32 SizeOfEntries; + UINT32 NumberOfEntries; } EFI_DRIVER_OS_HANDOFF_HEADER; typedef enum { @@ -182,10 +180,10 @@ typedef enum { } EFI_DRIVER_HANOFF_ENUM; typedef struct { - EFI_DRIVER_HANOFF_ENUM Type; - EFI_DEVICE_PATH_PROTOCOL *DevicePath; - VOID *PciRomImage; - UINT64 PciRomSize; + EFI_DRIVER_HANOFF_ENUM Type; + EFI_DEVICE_PATH_PROTOCOL *DevicePath; + VOID *PciRomImage; + UINT64 PciRomSize; } EFI_DRIVER_OS_HANDOFF; #endif diff --git a/MdePkg/Include/Protocol/UnicodeCollation.h b/MdePkg/Include/Protocol/UnicodeCollation.h index c337c7b..c4025eb 100644 --- a/MdePkg/Include/Protocol/UnicodeCollation.h +++ b/MdePkg/Include/Protocol/UnicodeCollation.h @@ -21,27 +21,27 @@ SPDX-License-Identifier: BSD-2-Clause-Patent 0xa4c751fc, 0x23ae, 0x4c3e, {0x92, 0xe9, 0x49, 0x64, 0xcf, 0x63, 0xf3, 0x49 } \ } -typedef struct _EFI_UNICODE_COLLATION_PROTOCOL EFI_UNICODE_COLLATION_PROTOCOL; - +typedef struct _EFI_UNICODE_COLLATION_PROTOCOL EFI_UNICODE_COLLATION_PROTOCOL; /// /// Protocol GUID name defined in EFI1.1. /// -#define UNICODE_COLLATION_PROTOCOL EFI_UNICODE_COLLATION_PROTOCOL_GUID +#define UNICODE_COLLATION_PROTOCOL EFI_UNICODE_COLLATION_PROTOCOL_GUID /// /// Protocol defined in EFI1.1. /// -typedef EFI_UNICODE_COLLATION_PROTOCOL UNICODE_COLLATION_INTERFACE; +typedef EFI_UNICODE_COLLATION_PROTOCOL UNICODE_COLLATION_INTERFACE; /// /// Protocol data structures and defines /// -#define EFI_UNICODE_BYTE_ORDER_MARK (CHAR16) (0xfeff) +#define EFI_UNICODE_BYTE_ORDER_MARK (CHAR16) (0xfeff) // // Protocol member functions // + /** Performs a case-insensitive comparison of two Null-terminated strings. @@ -161,26 +161,26 @@ BOOLEAN /// comparisons of strings. /// struct _EFI_UNICODE_COLLATION_PROTOCOL { - EFI_UNICODE_COLLATION_STRICOLL StriColl; - EFI_UNICODE_COLLATION_METAIMATCH MetaiMatch; - EFI_UNICODE_COLLATION_STRLWR StrLwr; - EFI_UNICODE_COLLATION_STRUPR StrUpr; + EFI_UNICODE_COLLATION_STRICOLL StriColl; + EFI_UNICODE_COLLATION_METAIMATCH MetaiMatch; + EFI_UNICODE_COLLATION_STRLWR StrLwr; + EFI_UNICODE_COLLATION_STRUPR StrUpr; // // for supporting fat volumes // - EFI_UNICODE_COLLATION_FATTOSTR FatToStr; - EFI_UNICODE_COLLATION_STRTOFAT StrToFat; + EFI_UNICODE_COLLATION_FATTOSTR FatToStr; + EFI_UNICODE_COLLATION_STRTOFAT StrToFat; /// /// A Null-terminated ASCII string array that contains one or more language codes. /// When this field is used for UnicodeCollation2, it is specified in RFC 4646 format. /// When it is used for UnicodeCollation, it is specified in ISO 639-2 format. /// - CHAR8 *SupportedLanguages; + CHAR8 *SupportedLanguages; }; -extern EFI_GUID gEfiUnicodeCollationProtocolGuid; -extern EFI_GUID gEfiUnicodeCollation2ProtocolGuid; +extern EFI_GUID gEfiUnicodeCollationProtocolGuid; +extern EFI_GUID gEfiUnicodeCollation2ProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/Usb2HostController.h b/MdePkg/Include/Protocol/Usb2HostController.h index a2c6767..06e20be 100644 --- a/MdePkg/Include/Protocol/Usb2HostController.h +++ b/MdePkg/Include/Protocol/Usb2HostController.h @@ -24,35 +24,33 @@ /// typedef struct _EFI_USB2_HC_PROTOCOL EFI_USB2_HC_PROTOCOL; - typedef struct { - UINT16 PortStatus; ///< Contains current port status bitmap. - UINT16 PortChangeStatus; ///< Contains current port status change bitmap. + UINT16 PortStatus; ///< Contains current port status bitmap. + UINT16 PortChangeStatus; ///< Contains current port status change bitmap. } EFI_USB_PORT_STATUS; /// /// EFI_USB_PORT_STATUS.PortStatus bit definition /// -#define USB_PORT_STAT_CONNECTION 0x0001 -#define USB_PORT_STAT_ENABLE 0x0002 -#define USB_PORT_STAT_SUSPEND 0x0004 -#define USB_PORT_STAT_OVERCURRENT 0x0008 -#define USB_PORT_STAT_RESET 0x0010 -#define USB_PORT_STAT_POWER 0x0100 -#define USB_PORT_STAT_LOW_SPEED 0x0200 -#define USB_PORT_STAT_HIGH_SPEED 0x0400 -#define USB_PORT_STAT_SUPER_SPEED 0x0800 -#define USB_PORT_STAT_OWNER 0x2000 +#define USB_PORT_STAT_CONNECTION 0x0001 +#define USB_PORT_STAT_ENABLE 0x0002 +#define USB_PORT_STAT_SUSPEND 0x0004 +#define USB_PORT_STAT_OVERCURRENT 0x0008 +#define USB_PORT_STAT_RESET 0x0010 +#define USB_PORT_STAT_POWER 0x0100 +#define USB_PORT_STAT_LOW_SPEED 0x0200 +#define USB_PORT_STAT_HIGH_SPEED 0x0400 +#define USB_PORT_STAT_SUPER_SPEED 0x0800 +#define USB_PORT_STAT_OWNER 0x2000 /// /// EFI_USB_PORT_STATUS.PortChangeStatus bit definition /// -#define USB_PORT_STAT_C_CONNECTION 0x0001 -#define USB_PORT_STAT_C_ENABLE 0x0002 -#define USB_PORT_STAT_C_SUSPEND 0x0004 -#define USB_PORT_STAT_C_OVERCURRENT 0x0008 -#define USB_PORT_STAT_C_RESET 0x0010 - +#define USB_PORT_STAT_C_CONNECTION 0x0001 +#define USB_PORT_STAT_C_ENABLE 0x0002 +#define USB_PORT_STAT_C_SUSPEND 0x0004 +#define USB_PORT_STAT_C_OVERCURRENT 0x0008 +#define USB_PORT_STAT_C_RESET 0x0010 /// /// Usb port features value @@ -72,14 +70,14 @@ typedef enum { EfiUsbPortResetChange = 20 } EFI_USB_PORT_FEATURE; -#define EFI_USB_SPEED_FULL 0x0000 ///< 12 Mb/s, USB 1.1 OHCI and UHCI HC. -#define EFI_USB_SPEED_LOW 0x0001 ///< 1 Mb/s, USB 1.1 OHCI and UHCI HC. -#define EFI_USB_SPEED_HIGH 0x0002 ///< 480 Mb/s, USB 2.0 EHCI HC. -#define EFI_USB_SPEED_SUPER 0x0003 ///< 4.8 Gb/s, USB 3.0 XHCI HC. +#define EFI_USB_SPEED_FULL 0x0000 ///< 12 Mb/s, USB 1.1 OHCI and UHCI HC. +#define EFI_USB_SPEED_LOW 0x0001 ///< 1 Mb/s, USB 1.1 OHCI and UHCI HC. +#define EFI_USB_SPEED_HIGH 0x0002 ///< 480 Mb/s, USB 2.0 EHCI HC. +#define EFI_USB_SPEED_SUPER 0x0003 ///< 4.8 Gb/s, USB 3.0 XHCI HC. typedef struct { - UINT8 TranslatorHubAddress; ///< device address - UINT8 TranslatorPortNumber; ///< the port number of the hub that device is connected to. + UINT8 TranslatorHubAddress; ///< device address + UINT8 TranslatorPortNumber; ///< the port number of the hub that device is connected to. } EFI_USB2_HC_TRANSACTION_TRANSLATOR; // @@ -114,6 +112,7 @@ EFI_STATUS #define EFI_USB_HC_RESET_HOST_CONTROLLER 0x0002 #define EFI_USB_HC_RESET_GLOBAL_WITH_DEBUG 0x0004 #define EFI_USB_HC_RESET_HOST_WITH_DEBUG 0x0008 + /** Provides software reset for the USB host controller. @@ -192,7 +191,7 @@ EFI_STATUS (EFIAPI *EFI_USB2_HC_PROTOCOL_GET_STATE)( IN EFI_USB2_HC_PROTOCOL *This, OUT EFI_USB_HC_STATE *State -); + ); /** Sets the USB host controller to a specific state. @@ -258,7 +257,7 @@ EFI_STATUS OUT UINT32 *TransferResult ); -#define EFI_USB_MAX_BULK_BUFFER_NUM 10 +#define EFI_USB_MAX_BULK_BUFFER_NUM 10 /** Submits bulk transfer to a bulk endpoint of a USB device. @@ -401,8 +400,8 @@ EFI_STATUS OUT UINT32 *TransferResult ); -#define EFI_USB_MAX_ISO_BUFFER_NUM 7 -#define EFI_USB_MAX_ISO_BUFFER_NUM1 2 +#define EFI_USB_MAX_ISO_BUFFER_NUM 7 +#define EFI_USB_MAX_ISO_BUFFER_NUM1 2 /** Submits isochronous transfer to an isochronous endpoint of a USB device. @@ -624,35 +623,35 @@ EFI_STATUS /// instance, and an EFI_USB2_HC_PROTOCOL instance. /// struct _EFI_USB2_HC_PROTOCOL { - EFI_USB2_HC_PROTOCOL_GET_CAPABILITY GetCapability; - EFI_USB2_HC_PROTOCOL_RESET Reset; - EFI_USB2_HC_PROTOCOL_GET_STATE GetState; - EFI_USB2_HC_PROTOCOL_SET_STATE SetState; - EFI_USB2_HC_PROTOCOL_CONTROL_TRANSFER ControlTransfer; - EFI_USB2_HC_PROTOCOL_BULK_TRANSFER BulkTransfer; - EFI_USB2_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER AsyncInterruptTransfer; - EFI_USB2_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER SyncInterruptTransfer; - EFI_USB2_HC_PROTOCOL_ISOCHRONOUS_TRANSFER IsochronousTransfer; - EFI_USB2_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER AsyncIsochronousTransfer; - EFI_USB2_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS GetRootHubPortStatus; - EFI_USB2_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE SetRootHubPortFeature; - EFI_USB2_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE ClearRootHubPortFeature; + EFI_USB2_HC_PROTOCOL_GET_CAPABILITY GetCapability; + EFI_USB2_HC_PROTOCOL_RESET Reset; + EFI_USB2_HC_PROTOCOL_GET_STATE GetState; + EFI_USB2_HC_PROTOCOL_SET_STATE SetState; + EFI_USB2_HC_PROTOCOL_CONTROL_TRANSFER ControlTransfer; + EFI_USB2_HC_PROTOCOL_BULK_TRANSFER BulkTransfer; + EFI_USB2_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER AsyncInterruptTransfer; + EFI_USB2_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER SyncInterruptTransfer; + EFI_USB2_HC_PROTOCOL_ISOCHRONOUS_TRANSFER IsochronousTransfer; + EFI_USB2_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER AsyncIsochronousTransfer; + EFI_USB2_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS GetRootHubPortStatus; + EFI_USB2_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE SetRootHubPortFeature; + EFI_USB2_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE ClearRootHubPortFeature; /// /// The major revision number of the USB host controller. The revision information /// indicates the release of the Universal Serial Bus Specification with which the /// host controller is compliant. /// - UINT16 MajorRevision; + UINT16 MajorRevision; /// /// The minor revision number of the USB host controller. The revision information /// indicates the release of the Universal Serial Bus Specification with which the /// host controller is compliant. /// - UINT16 MinorRevision; + UINT16 MinorRevision; }; -extern EFI_GUID gEfiUsb2HcProtocolGuid; +extern EFI_GUID gEfiUsb2HcProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/UsbFunctionIo.h b/MdePkg/Include/Protocol/UsbFunctionIo.h index 1c003db..e360b60 100644 --- a/MdePkg/Include/Protocol/UsbFunctionIo.h +++ b/MdePkg/Include/Protocol/UsbFunctionIo.h @@ -29,9 +29,9 @@ 0x32d2963a, 0xfe5d, 0x4f30, {0xb6, 0x33, 0x6e, 0x5d, 0xc5, 0x58, 0x3, 0xcc} \ } -typedef struct _EFI_USBFN_IO_PROTOCOL EFI_USBFN_IO_PROTOCOL; +typedef struct _EFI_USBFN_IO_PROTOCOL EFI_USBFN_IO_PROTOCOL; -#define EFI_USBFN_IO_PROTOCOL_REVISION 0x00010001 +#define EFI_USBFN_IO_PROTOCOL_REVISION 0x00010001 typedef enum _EFI_USBFN_PORT_TYPE { EfiUsbUnknownPort = 0, @@ -42,25 +42,25 @@ typedef enum _EFI_USBFN_PORT_TYPE { } EFI_USBFN_PORT_TYPE; typedef struct { - EFI_USB_INTERFACE_DESCRIPTOR *InterfaceDescriptor; - EFI_USB_ENDPOINT_DESCRIPTOR **EndpointDescriptorTable; + EFI_USB_INTERFACE_DESCRIPTOR *InterfaceDescriptor; + EFI_USB_ENDPOINT_DESCRIPTOR **EndpointDescriptorTable; } EFI_USB_INTERFACE_INFO; typedef struct { - EFI_USB_CONFIG_DESCRIPTOR *ConfigDescriptor; - EFI_USB_INTERFACE_INFO **InterfaceInfoTable; + EFI_USB_CONFIG_DESCRIPTOR *ConfigDescriptor; + EFI_USB_INTERFACE_INFO **InterfaceInfoTable; } EFI_USB_CONFIG_INFO; typedef struct { - EFI_USB_DEVICE_DESCRIPTOR *DeviceDescriptor; - EFI_USB_CONFIG_INFO **ConfigInfoTable; + EFI_USB_DEVICE_DESCRIPTOR *DeviceDescriptor; + EFI_USB_CONFIG_INFO **ConfigInfoTable; } EFI_USB_DEVICE_INFO; typedef enum _EFI_USB_ENDPOINT_TYPE { UsbEndpointControl = 0x00, - //UsbEndpointIsochronous = 0x01, + // UsbEndpointIsochronous = 0x01, UsbEndpointBulk = 0x02, - //UsbEndpointInterrupt = 0x03 + // UsbEndpointInterrupt = 0x03 } EFI_USB_ENDPOINT_TYPE; typedef enum _EFI_USBFN_DEVICE_INFO_ID { @@ -139,11 +139,11 @@ typedef enum _EFI_USBFN_TRANSFER_STATUS { } EFI_USBFN_TRANSFER_STATUS; typedef struct _EFI_USBFN_TRANSFER_RESULT { - UINTN BytesTransferred; - EFI_USBFN_TRANSFER_STATUS TransferStatus; - UINT8 EndpointIndex; - EFI_USBFN_ENDPOINT_DIRECTION Direction; - VOID *Buffer; + UINTN BytesTransferred; + EFI_USBFN_TRANSFER_STATUS TransferStatus; + UINT8 EndpointIndex; + EFI_USBFN_ENDPOINT_DIRECTION Direction; + VOID *Buffer; } EFI_USBFN_TRANSFER_RESULT; typedef enum _EFI_USB_BUS_SPEED { @@ -184,9 +184,9 @@ typedef enum _EFI_USBFN_POLICY_TYPE { **/ typedef EFI_STATUS -(EFIAPI *EFI_USBFN_IO_DETECT_PORT) ( +(EFIAPI *EFI_USBFN_IO_DETECT_PORT)( IN EFI_USBFN_IO_PROTOCOL *This, - OUT EFI_USBFN_PORT_TYPE *PortType + OUT EFI_USBFN_PORT_TYPE *PortType ); /** @@ -214,9 +214,9 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_USBFN_IO_CONFIGURE_ENABLE_ENDPOINTS) ( +(EFIAPI *EFI_USBFN_IO_CONFIGURE_ENABLE_ENDPOINTS)( IN EFI_USBFN_IO_PROTOCOL *This, - OUT EFI_USB_DEVICE_INFO *DeviceInfo + OUT EFI_USB_DEVICE_INFO *DeviceInfo ); /** @@ -244,11 +244,11 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_USBFN_IO_GET_ENDPOINT_MAXPACKET_SIZE) ( +(EFIAPI *EFI_USBFN_IO_GET_ENDPOINT_MAXPACKET_SIZE)( IN EFI_USBFN_IO_PROTOCOL *This, IN EFI_USB_ENDPOINT_TYPE EndpointType, IN EFI_USB_BUS_SPEED BusSpeed, - OUT UINT16 *MaxPacketSize + OUT UINT16 *MaxPacketSize ); /** @@ -281,12 +281,12 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_USBFN_IO_GET_DEVICE_INFO) ( +(EFIAPI *EFI_USBFN_IO_GET_DEVICE_INFO)( IN EFI_USBFN_IO_PROTOCOL *This, IN EFI_USBFN_DEVICE_INFO_ID Id, IN OUT UINTN *BufferSize, - OUT VOID *Buffer OPTIONAL -); + OUT VOID *Buffer OPTIONAL + ); /** Returns the vendor-id and product-id of the device. @@ -302,11 +302,11 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_USBFN_IO_GET_VENDOR_ID_PRODUCT_ID) ( +(EFIAPI *EFI_USBFN_IO_GET_VENDOR_ID_PRODUCT_ID)( IN EFI_USBFN_IO_PROTOCOL *This, - OUT UINT16 *Vid, - OUT UINT16 *Pid -); + OUT UINT16 *Vid, + OUT UINT16 *Pid + ); /** Aborts the transfer on the specified endpoint. @@ -328,11 +328,11 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_USBFN_IO_ABORT_TRANSFER) ( +(EFIAPI *EFI_USBFN_IO_ABORT_TRANSFER)( IN EFI_USBFN_IO_PROTOCOL *This, IN UINT8 EndpointIndex, IN EFI_USBFN_ENDPOINT_DIRECTION Direction -); + ); /** Returns the stall state on the specified endpoint. @@ -355,12 +355,12 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_USBFN_IO_GET_ENDPOINT_STALL_STATE) ( +(EFIAPI *EFI_USBFN_IO_GET_ENDPOINT_STALL_STATE)( IN EFI_USBFN_IO_PROTOCOL *This, IN UINT8 EndpointIndex, IN EFI_USBFN_ENDPOINT_DIRECTION Direction, IN OUT BOOLEAN *State -); + ); /** Sets or clears the stall state on the specified endpoint. @@ -384,12 +384,12 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_USBFN_IO_SET_ENDPOINT_STALL_STATE) ( +(EFIAPI *EFI_USBFN_IO_SET_ENDPOINT_STALL_STATE)( IN EFI_USBFN_IO_PROTOCOL *This, IN UINT8 EndpointIndex, IN EFI_USBFN_ENDPOINT_DIRECTION Direction, IN OUT BOOLEAN *State -); + ); /** This function is called repeatedly to get information on USB bus states, @@ -419,12 +419,12 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_USBFN_IO_EVENTHANDLER) ( +(EFIAPI *EFI_USBFN_IO_EVENTHANDLER)( IN EFI_USBFN_IO_PROTOCOL *This, - OUT EFI_USBFN_MESSAGE *Message, + OUT EFI_USBFN_MESSAGE *Message, IN OUT UINTN *PayloadSize, - OUT EFI_USBFN_MESSAGE_PAYLOAD *Payload -); + OUT EFI_USBFN_MESSAGE_PAYLOAD *Payload + ); /** This function handles transferring data to or from the host on the specified @@ -467,13 +467,13 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_USBFN_IO_TRANSFER) ( +(EFIAPI *EFI_USBFN_IO_TRANSFER)( IN EFI_USBFN_IO_PROTOCOL *This, IN UINT8 EndpointIndex, IN EFI_USBFN_ENDPOINT_DIRECTION Direction, IN OUT UINTN *BufferSize, IN OUT VOID *Buffer -); + ); /** Returns the maximum supported transfer size. @@ -493,9 +493,9 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_USBFN_IO_GET_MAXTRANSFER_SIZE) ( +(EFIAPI *EFI_USBFN_IO_GET_MAXTRANSFER_SIZE)( IN EFI_USBFN_IO_PROTOCOL *This, - OUT UINTN *MaxTransferSize + OUT UINTN *MaxTransferSize ); /** @@ -521,10 +521,10 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_USBFN_IO_ALLOCATE_TRANSFER_BUFFER) ( +(EFIAPI *EFI_USBFN_IO_ALLOCATE_TRANSFER_BUFFER)( IN EFI_USBFN_IO_PROTOCOL *This, IN UINTN Size, - OUT VOID **Buffer + OUT VOID **Buffer ); /** @@ -544,7 +544,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_USBFN_IO_FREE_TRANSFER_BUFFER) ( +(EFIAPI *EFI_USBFN_IO_FREE_TRANSFER_BUFFER)( IN EFI_USBFN_IO_PROTOCOL *This, IN VOID *Buffer ); @@ -563,7 +563,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_USBFN_IO_START_CONTROLLER) ( +(EFIAPI *EFI_USBFN_IO_START_CONTROLLER)( IN EFI_USBFN_IO_PROTOCOL *This ); @@ -579,7 +579,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_USBFN_IO_STOP_CONTROLLER) ( +(EFIAPI *EFI_USBFN_IO_STOP_CONTROLLER)( IN EFI_USBFN_IO_PROTOCOL *This ); @@ -608,7 +608,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_USBFN_IO_SET_ENDPOINT_POLICY) ( +(EFIAPI *EFI_USBFN_IO_SET_ENDPOINT_POLICY)( IN EFI_USBFN_IO_PROTOCOL *This, IN UINT8 EndpointIndex, IN EFI_USBFN_ENDPOINT_DIRECTION Direction, @@ -644,7 +644,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_USBFN_IO_GET_ENDPOINT_POLICY) ( +(EFIAPI *EFI_USBFN_IO_GET_ENDPOINT_POLICY)( IN EFI_USBFN_IO_PROTOCOL *This, IN UINT8 EndpointIndex, IN EFI_USBFN_ENDPOINT_DIRECTION Direction, @@ -658,27 +658,26 @@ EFI_STATUS /// controller management for a USB Function port. /// struct _EFI_USBFN_IO_PROTOCOL { - UINT32 Revision; - EFI_USBFN_IO_DETECT_PORT DetectPort; - EFI_USBFN_IO_CONFIGURE_ENABLE_ENDPOINTS ConfigureEnableEndpoints; - EFI_USBFN_IO_GET_ENDPOINT_MAXPACKET_SIZE GetEndpointMaxPacketSize; - EFI_USBFN_IO_GET_DEVICE_INFO GetDeviceInfo; - EFI_USBFN_IO_GET_VENDOR_ID_PRODUCT_ID GetVendorIdProductId; - EFI_USBFN_IO_ABORT_TRANSFER AbortTransfer; - EFI_USBFN_IO_GET_ENDPOINT_STALL_STATE GetEndpointStallState; - EFI_USBFN_IO_SET_ENDPOINT_STALL_STATE SetEndpointStallState; - EFI_USBFN_IO_EVENTHANDLER EventHandler; - EFI_USBFN_IO_TRANSFER Transfer; - EFI_USBFN_IO_GET_MAXTRANSFER_SIZE GetMaxTransferSize; - EFI_USBFN_IO_ALLOCATE_TRANSFER_BUFFER AllocateTransferBuffer; - EFI_USBFN_IO_FREE_TRANSFER_BUFFER FreeTransferBuffer; - EFI_USBFN_IO_START_CONTROLLER StartController; - EFI_USBFN_IO_STOP_CONTROLLER StopController; - EFI_USBFN_IO_SET_ENDPOINT_POLICY SetEndpointPolicy; - EFI_USBFN_IO_GET_ENDPOINT_POLICY GetEndpointPolicy; + UINT32 Revision; + EFI_USBFN_IO_DETECT_PORT DetectPort; + EFI_USBFN_IO_CONFIGURE_ENABLE_ENDPOINTS ConfigureEnableEndpoints; + EFI_USBFN_IO_GET_ENDPOINT_MAXPACKET_SIZE GetEndpointMaxPacketSize; + EFI_USBFN_IO_GET_DEVICE_INFO GetDeviceInfo; + EFI_USBFN_IO_GET_VENDOR_ID_PRODUCT_ID GetVendorIdProductId; + EFI_USBFN_IO_ABORT_TRANSFER AbortTransfer; + EFI_USBFN_IO_GET_ENDPOINT_STALL_STATE GetEndpointStallState; + EFI_USBFN_IO_SET_ENDPOINT_STALL_STATE SetEndpointStallState; + EFI_USBFN_IO_EVENTHANDLER EventHandler; + EFI_USBFN_IO_TRANSFER Transfer; + EFI_USBFN_IO_GET_MAXTRANSFER_SIZE GetMaxTransferSize; + EFI_USBFN_IO_ALLOCATE_TRANSFER_BUFFER AllocateTransferBuffer; + EFI_USBFN_IO_FREE_TRANSFER_BUFFER FreeTransferBuffer; + EFI_USBFN_IO_START_CONTROLLER StartController; + EFI_USBFN_IO_STOP_CONTROLLER StopController; + EFI_USBFN_IO_SET_ENDPOINT_POLICY SetEndpointPolicy; + EFI_USBFN_IO_GET_ENDPOINT_POLICY GetEndpointPolicy; }; -extern EFI_GUID gEfiUsbFunctionIoProtocolGuid; +extern EFI_GUID gEfiUsbFunctionIoProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/UsbHostController.h b/MdePkg/Include/Protocol/UsbHostController.h index 4b69faa..8b626ec 100644 --- a/MdePkg/Include/Protocol/UsbHostController.h +++ b/MdePkg/Include/Protocol/UsbHostController.h @@ -461,7 +461,6 @@ EFI_STATUS IN EFI_USB_PORT_FEATURE PortFeature ); - /// /// The EFI_USB_HC_PROTOCOL provides USB host controller management, basic data transactions /// over a USB bus, and USB root hub access. A device driver that wishes to manage a USB bus in a @@ -470,33 +469,33 @@ EFI_STATUS /// EFI_DEVICE_PATH_PROTOCOL instance, and an EFI_USB_HC_PROTOCOL instance. /// struct _EFI_USB_HC_PROTOCOL { - EFI_USB_HC_PROTOCOL_RESET Reset; - EFI_USB_HC_PROTOCOL_GET_STATE GetState; - EFI_USB_HC_PROTOCOL_SET_STATE SetState; - EFI_USB_HC_PROTOCOL_CONTROL_TRANSFER ControlTransfer; - EFI_USB_HC_PROTOCOL_BULK_TRANSFER BulkTransfer; - EFI_USB_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER AsyncInterruptTransfer; - EFI_USB_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER SyncInterruptTransfer; - EFI_USB_HC_PROTOCOL_ISOCHRONOUS_TRANSFER IsochronousTransfer; - EFI_USB_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER AsyncIsochronousTransfer; - EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_NUMBER GetRootHubPortNumber; - EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS GetRootHubPortStatus; - EFI_USB_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE SetRootHubPortFeature; - EFI_USB_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE ClearRootHubPortFeature; + EFI_USB_HC_PROTOCOL_RESET Reset; + EFI_USB_HC_PROTOCOL_GET_STATE GetState; + EFI_USB_HC_PROTOCOL_SET_STATE SetState; + EFI_USB_HC_PROTOCOL_CONTROL_TRANSFER ControlTransfer; + EFI_USB_HC_PROTOCOL_BULK_TRANSFER BulkTransfer; + EFI_USB_HC_PROTOCOL_ASYNC_INTERRUPT_TRANSFER AsyncInterruptTransfer; + EFI_USB_HC_PROTOCOL_SYNC_INTERRUPT_TRANSFER SyncInterruptTransfer; + EFI_USB_HC_PROTOCOL_ISOCHRONOUS_TRANSFER IsochronousTransfer; + EFI_USB_HC_PROTOCOL_ASYNC_ISOCHRONOUS_TRANSFER AsyncIsochronousTransfer; + EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_NUMBER GetRootHubPortNumber; + EFI_USB_HC_PROTOCOL_GET_ROOTHUB_PORT_STATUS GetRootHubPortStatus; + EFI_USB_HC_PROTOCOL_SET_ROOTHUB_PORT_FEATURE SetRootHubPortFeature; + EFI_USB_HC_PROTOCOL_CLEAR_ROOTHUB_PORT_FEATURE ClearRootHubPortFeature; /// /// The major revision number of the USB host controller. The revision information /// indicates the release of the Universal Serial Bus Specification with which the /// host controller is compliant. /// - UINT16 MajorRevision; + UINT16 MajorRevision; /// /// The minor revision number of the USB host controller. The revision information /// indicates the release of the Universal Serial Bus Specification with which the /// host controller is compliant. /// - UINT16 MinorRevision; + UINT16 MinorRevision; }; -extern EFI_GUID gEfiUsbHcProtocolGuid; +extern EFI_GUID gEfiUsbHcProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/UsbIo.h b/MdePkg/Include/Protocol/UsbIo.h index 838db04..4816b90 100644 --- a/MdePkg/Include/Protocol/UsbIo.h +++ b/MdePkg/Include/Protocol/UsbIo.h @@ -23,7 +23,7 @@ 0x2B2F68D6, 0x0CD2, 0x44cf, {0x8E, 0x8B, 0xBB, 0xA2, 0x0B, 0x1B, 0x5B, 0x75 } \ } -typedef struct _EFI_USB_IO_PROTOCOL EFI_USB_IO_PROTOCOL; +typedef struct _EFI_USB_IO_PROTOCOL EFI_USB_IO_PROTOCOL; // // Related Definition for EFI USB I/O protocol @@ -32,11 +32,11 @@ typedef struct _EFI_USB_IO_PROTOCOL EFI_USB_IO_PROTOCOL; // // USB standard descriptors and reqeust // -typedef USB_DEVICE_REQUEST EFI_USB_DEVICE_REQUEST; -typedef USB_DEVICE_DESCRIPTOR EFI_USB_DEVICE_DESCRIPTOR; -typedef USB_CONFIG_DESCRIPTOR EFI_USB_CONFIG_DESCRIPTOR; -typedef USB_INTERFACE_DESCRIPTOR EFI_USB_INTERFACE_DESCRIPTOR; -typedef USB_ENDPOINT_DESCRIPTOR EFI_USB_ENDPOINT_DESCRIPTOR; +typedef USB_DEVICE_REQUEST EFI_USB_DEVICE_REQUEST; +typedef USB_DEVICE_DESCRIPTOR EFI_USB_DEVICE_DESCRIPTOR; +typedef USB_CONFIG_DESCRIPTOR EFI_USB_CONFIG_DESCRIPTOR; +typedef USB_INTERFACE_DESCRIPTOR EFI_USB_INTERFACE_DESCRIPTOR; +typedef USB_ENDPOINT_DESCRIPTOR EFI_USB_ENDPOINT_DESCRIPTOR; /// /// USB data transfer direction @@ -50,16 +50,16 @@ typedef enum { // // USB Transfer Results // -#define EFI_USB_NOERROR 0x00 -#define EFI_USB_ERR_NOTEXECUTE 0x01 -#define EFI_USB_ERR_STALL 0x02 -#define EFI_USB_ERR_BUFFER 0x04 -#define EFI_USB_ERR_BABBLE 0x08 -#define EFI_USB_ERR_NAK 0x10 -#define EFI_USB_ERR_CRC 0x20 -#define EFI_USB_ERR_TIMEOUT 0x40 -#define EFI_USB_ERR_BITSTUFF 0x80 -#define EFI_USB_ERR_SYSTEM 0x100 +#define EFI_USB_NOERROR 0x00 +#define EFI_USB_ERR_NOTEXECUTE 0x01 +#define EFI_USB_ERR_STALL 0x02 +#define EFI_USB_ERR_BUFFER 0x04 +#define EFI_USB_ERR_BABBLE 0x08 +#define EFI_USB_ERR_NAK 0x10 +#define EFI_USB_ERR_CRC 0x20 +#define EFI_USB_ERR_TIMEOUT 0x40 +#define EFI_USB_ERR_BITSTUFF 0x80 +#define EFI_USB_ERR_SYSTEM 0x100 /** Async USB transfer callback routine. @@ -88,7 +88,6 @@ EFI_STATUS // Prototype for EFI USB I/O protocol // - /** This function is used to manage a USB device with a control transfer pipe. A control transfer is typically used to perform device initialization and configuration. @@ -478,29 +477,29 @@ struct _EFI_USB_IO_PROTOCOL { // // IO transfer // - EFI_USB_IO_CONTROL_TRANSFER UsbControlTransfer; - EFI_USB_IO_BULK_TRANSFER UsbBulkTransfer; - EFI_USB_IO_ASYNC_INTERRUPT_TRANSFER UsbAsyncInterruptTransfer; - EFI_USB_IO_SYNC_INTERRUPT_TRANSFER UsbSyncInterruptTransfer; - EFI_USB_IO_ISOCHRONOUS_TRANSFER UsbIsochronousTransfer; - EFI_USB_IO_ASYNC_ISOCHRONOUS_TRANSFER UsbAsyncIsochronousTransfer; + EFI_USB_IO_CONTROL_TRANSFER UsbControlTransfer; + EFI_USB_IO_BULK_TRANSFER UsbBulkTransfer; + EFI_USB_IO_ASYNC_INTERRUPT_TRANSFER UsbAsyncInterruptTransfer; + EFI_USB_IO_SYNC_INTERRUPT_TRANSFER UsbSyncInterruptTransfer; + EFI_USB_IO_ISOCHRONOUS_TRANSFER UsbIsochronousTransfer; + EFI_USB_IO_ASYNC_ISOCHRONOUS_TRANSFER UsbAsyncIsochronousTransfer; // // Common device request // - EFI_USB_IO_GET_DEVICE_DESCRIPTOR UsbGetDeviceDescriptor; - EFI_USB_IO_GET_CONFIG_DESCRIPTOR UsbGetConfigDescriptor; - EFI_USB_IO_GET_INTERFACE_DESCRIPTOR UsbGetInterfaceDescriptor; - EFI_USB_IO_GET_ENDPOINT_DESCRIPTOR UsbGetEndpointDescriptor; - EFI_USB_IO_GET_STRING_DESCRIPTOR UsbGetStringDescriptor; - EFI_USB_IO_GET_SUPPORTED_LANGUAGE UsbGetSupportedLanguages; + EFI_USB_IO_GET_DEVICE_DESCRIPTOR UsbGetDeviceDescriptor; + EFI_USB_IO_GET_CONFIG_DESCRIPTOR UsbGetConfigDescriptor; + EFI_USB_IO_GET_INTERFACE_DESCRIPTOR UsbGetInterfaceDescriptor; + EFI_USB_IO_GET_ENDPOINT_DESCRIPTOR UsbGetEndpointDescriptor; + EFI_USB_IO_GET_STRING_DESCRIPTOR UsbGetStringDescriptor; + EFI_USB_IO_GET_SUPPORTED_LANGUAGE UsbGetSupportedLanguages; // // Reset controller's parent port // - EFI_USB_IO_PORT_RESET UsbPortReset; + EFI_USB_IO_PORT_RESET UsbPortReset; }; -extern EFI_GUID gEfiUsbIoProtocolGuid; +extern EFI_GUID gEfiUsbIoProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/UserCredential.h b/MdePkg/Include/Protocol/UserCredential.h index 0b49f15..986cf44 100644 --- a/MdePkg/Include/Protocol/UserCredential.h +++ b/MdePkg/Include/Protocol/UserCredential.h @@ -19,7 +19,7 @@ 0x71ee5e94, 0x65b9, 0x45d5, { 0x82, 0x1a, 0x3a, 0x4d, 0x86, 0xcf, 0xe6, 0xbe } \ } -typedef struct _EFI_USER_CREDENTIAL_PROTOCOL EFI_USER_CREDENTIAL_PROTOCOL; +typedef struct _EFI_USER_CREDENTIAL_PROTOCOL EFI_USER_CREDENTIAL_PROTOCOL; /** Enroll a user on a credential provider. @@ -266,21 +266,21 @@ EFI_STATUS /// This protocol provides support for a single class of credentials /// struct _EFI_USER_CREDENTIAL_PROTOCOL { - EFI_GUID Identifier; ///< Uniquely identifies this credential provider. - EFI_GUID Type; ///< Identifies this class of User Credential Provider. - EFI_CREDENTIAL_ENROLL Enroll; - EFI_CREDENTIAL_FORM Form; - EFI_CREDENTIAL_TILE Tile; - EFI_CREDENTIAL_TITLE Title; - EFI_CREDENTIAL_USER User; - EFI_CREDENTIAL_SELECT Select; - EFI_CREDENTIAL_DESELECT Deselect; - EFI_CREDENTIAL_DEFAULT Default; - EFI_CREDENTIAL_GET_INFO GetInfo; - EFI_CREDENTIAL_GET_NEXT_INFO GetNextInfo; - EFI_CREDENTIAL_CAPABILITIES Capabilities; + EFI_GUID Identifier; ///< Uniquely identifies this credential provider. + EFI_GUID Type; ///< Identifies this class of User Credential Provider. + EFI_CREDENTIAL_ENROLL Enroll; + EFI_CREDENTIAL_FORM Form; + EFI_CREDENTIAL_TILE Tile; + EFI_CREDENTIAL_TITLE Title; + EFI_CREDENTIAL_USER User; + EFI_CREDENTIAL_SELECT Select; + EFI_CREDENTIAL_DESELECT Deselect; + EFI_CREDENTIAL_DEFAULT Default; + EFI_CREDENTIAL_GET_INFO GetInfo; + EFI_CREDENTIAL_GET_NEXT_INFO GetNextInfo; + EFI_CREDENTIAL_CAPABILITIES Capabilities; }; -extern EFI_GUID gEfiUserCredentialProtocolGuid; +extern EFI_GUID gEfiUserCredentialProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/UserCredential2.h b/MdePkg/Include/Protocol/UserCredential2.h index f507b74..fc64ba5 100644 --- a/MdePkg/Include/Protocol/UserCredential2.h +++ b/MdePkg/Include/Protocol/UserCredential2.h @@ -18,7 +18,7 @@ 0xe98adb03, 0xb8b9, 0x4af8, { 0xba, 0x20, 0x26, 0xe9, 0x11, 0x4c, 0xbc, 0xe5 } \ } -typedef struct _EFI_USER_CREDENTIAL2_PROTOCOL EFI_USER_CREDENTIAL2_PROTOCOL; +typedef struct _EFI_USER_CREDENTIAL2_PROTOCOL EFI_USER_CREDENTIAL2_PROTOCOL; /** Enroll a user on a credential provider. @@ -279,30 +279,30 @@ EFI_STATUS typedef EFI_STATUS (EFIAPI *EFI_CREDENTIAL2_DELETE)( - IN CONST EFI_USER_CREDENTIAL2_PROTOCOL *This, - IN EFI_USER_PROFILE_HANDLE User -); + IN CONST EFI_USER_CREDENTIAL2_PROTOCOL *This, + IN EFI_USER_PROFILE_HANDLE User + ); /// /// This protocol provides support for a single class of credentials /// struct _EFI_USER_CREDENTIAL2_PROTOCOL { - EFI_GUID Identifier; ///< Uniquely identifies this credential provider. - EFI_GUID Type; ///< Identifies this class of User Credential Provider. - EFI_CREDENTIAL2_ENROLL Enroll; - EFI_CREDENTIAL2_FORM Form; - EFI_CREDENTIAL2_TILE Tile; - EFI_CREDENTIAL2_TITLE Title; - EFI_CREDENTIAL2_USER User; - EFI_CREDENTIAL2_SELECT Select; - EFI_CREDENTIAL2_DESELECT Deselect; - EFI_CREDENTIAL2_DEFAULT Default; - EFI_CREDENTIAL2_GET_INFO GetInfo; - EFI_CREDENTIAL2_GET_NEXT_INFO GetNextInfo; - EFI_CREDENTIAL_CAPABILITIES Capabilities; - EFI_CREDENTIAL2_DELETE Delete; + EFI_GUID Identifier; ///< Uniquely identifies this credential provider. + EFI_GUID Type; ///< Identifies this class of User Credential Provider. + EFI_CREDENTIAL2_ENROLL Enroll; + EFI_CREDENTIAL2_FORM Form; + EFI_CREDENTIAL2_TILE Tile; + EFI_CREDENTIAL2_TITLE Title; + EFI_CREDENTIAL2_USER User; + EFI_CREDENTIAL2_SELECT Select; + EFI_CREDENTIAL2_DESELECT Deselect; + EFI_CREDENTIAL2_DEFAULT Default; + EFI_CREDENTIAL2_GET_INFO GetInfo; + EFI_CREDENTIAL2_GET_NEXT_INFO GetNextInfo; + EFI_CREDENTIAL_CAPABILITIES Capabilities; + EFI_CREDENTIAL2_DELETE Delete; }; -extern EFI_GUID gEfiUserCredential2ProtocolGuid; +extern EFI_GUID gEfiUserCredential2ProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/UserManager.h b/MdePkg/Include/Protocol/UserManager.h index 26ac495..62b0d1a 100644 --- a/MdePkg/Include/Protocol/UserManager.h +++ b/MdePkg/Include/Protocol/UserManager.h @@ -24,23 +24,23 @@ 0xbaf1e6de, 0x209e, 0x4adb, { 0x8d, 0x96, 0xfd, 0x8b, 0x71, 0xf3, 0xf6, 0x83 } \ } -typedef VOID *EFI_USER_PROFILE_HANDLE; -typedef VOID *EFI_USER_INFO_HANDLE; +typedef VOID *EFI_USER_PROFILE_HANDLE; +typedef VOID *EFI_USER_INFO_HANDLE; /// /// The attributes of the user profile information. /// typedef UINT16 EFI_USER_INFO_ATTRIBS; -#define EFI_USER_INFO_STORAGE 0x000F -#define EFI_USER_INFO_STORAGE_VOLATILE 0x0000 -#define EFI_USER_INFO_STORAGE_CREDENTIAL_NV 0x0001 -#define EFI_USER_INFO_STORAGE_PLATFORM_NV 0x0002 +#define EFI_USER_INFO_STORAGE 0x000F +#define EFI_USER_INFO_STORAGE_VOLATILE 0x0000 +#define EFI_USER_INFO_STORAGE_CREDENTIAL_NV 0x0001 +#define EFI_USER_INFO_STORAGE_PLATFORM_NV 0x0002 -#define EFI_USER_INFO_ACCESS 0x0070 -#define EFI_USER_INFO_PUBLIC 0x0010 -#define EFI_USER_INFO_PRIVATE 0x0020 -#define EFI_USER_INFO_PROTECTED 0x0030 -#define EFI_USER_INFO_EXCLUSIVE 0x0080 +#define EFI_USER_INFO_ACCESS 0x0070 +#define EFI_USER_INFO_PUBLIC 0x0010 +#define EFI_USER_INFO_PRIVATE 0x0020 +#define EFI_USER_INFO_PROTECTED 0x0030 +#define EFI_USER_INFO_EXCLUSIVE 0x0080 /// /// User information structure @@ -50,23 +50,23 @@ typedef struct { /// The user credential identifier associated with this user information or else Nil if the /// information is not associated with any specific credential. /// - EFI_GUID Credential; + EFI_GUID Credential; /// /// The type of user information. /// - UINT8 InfoType; + UINT8 InfoType; /// /// Must be set to 0. /// - UINT8 Reserved1; + UINT8 Reserved1; /// /// The attributes of the user profile information. /// - EFI_USER_INFO_ATTRIBS InfoAttribs; + EFI_USER_INFO_ATTRIBS InfoAttribs; /// /// The size of the user information, in bytes, including this header. /// - UINT32 InfoSize; + UINT32 InfoSize; } EFI_USER_INFO; /// @@ -85,15 +85,15 @@ typedef struct { #define EFI_USER_CREDENTIAL_CLASS_SECURE_CARD \ { 0x8a6b4a83, 0x42fe, 0x45d2, { 0xa2, 0xef, 0x46, 0xf0, 0x6c, 0x7d, 0x98, 0x52 } } -typedef UINT64 EFI_CREDENTIAL_CAPABILITIES; +typedef UINT64 EFI_CREDENTIAL_CAPABILITIES; #define EFI_CREDENTIAL_CAPABILITIES_ENROLL 0x0000000000000001 /// /// Credential logon flags /// typedef UINT32 EFI_CREDENTIAL_LOGON_FLAGS; -#define EFI_CREDENTIAL_LOGON_FLAG_AUTO 0x00000001 -#define EFI_CREDENTIAL_LOGON_FLAG_DEFAULT 0x00000002 +#define EFI_CREDENTIAL_LOGON_FLAG_AUTO 0x00000001 +#define EFI_CREDENTIAL_LOGON_FLAG_DEFAULT 0x00000002 /// /// User information record types @@ -102,81 +102,81 @@ typedef UINT32 EFI_CREDENTIAL_LOGON_FLAGS; /// /// No information. /// -#define EFI_USER_INFO_EMPTY_RECORD 0x00 +#define EFI_USER_INFO_EMPTY_RECORD 0x00 /// /// Provide the user's name for the enrolled user. /// -#define EFI_USER_INFO_NAME_RECORD 0x01 +#define EFI_USER_INFO_NAME_RECORD 0x01 typedef CHAR16 *EFI_USER_INFO_NAME; /// /// Provides the date and time when the user profile was created. /// -#define EFI_USER_INFO_CREATE_DATE_RECORD 0x02 +#define EFI_USER_INFO_CREATE_DATE_RECORD 0x02 typedef EFI_TIME EFI_USER_INFO_CREATE_DATE; /// /// Provides the date and time when the user profile was selected. /// -#define EFI_USER_INFO_USAGE_DATE_RECORD 0x03 +#define EFI_USER_INFO_USAGE_DATE_RECORD 0x03 typedef EFI_TIME EFI_USER_INFO_USAGE_DATE; /// /// Provides the number of times that the user profile has been selected. /// -#define EFI_USER_INFO_USAGE_COUNT_RECORD 0x04 +#define EFI_USER_INFO_USAGE_COUNT_RECORD 0x04 typedef UINT64 EFI_USER_INFO_USAGE_COUNT; /// /// Provides a unique non-volatile user identifier for each enrolled user. /// -#define EFI_USER_INFO_IDENTIFIER_RECORD 0x05 +#define EFI_USER_INFO_IDENTIFIER_RECORD 0x05 typedef UINT8 EFI_USER_INFO_IDENTIFIER[16]; /// /// Specifies the type of a particular credential associated with the user profile. /// -#define EFI_USER_INFO_CREDENTIAL_TYPE_RECORD 0x06 +#define EFI_USER_INFO_CREDENTIAL_TYPE_RECORD 0x06 typedef EFI_GUID EFI_USER_INFO_CREDENTIAL_TYPE; /// /// Specifies the user-readable name of a particular credential type. /// -#define EFI_USER_INFO_CREDENTIAL_TYPE_NAME_RECORD 0x07 +#define EFI_USER_INFO_CREDENTIAL_TYPE_NAME_RECORD 0x07 typedef CHAR16 *EFI_USER_INFO_CREDENTIAL_TYPE_NAME; /// /// Specifies the credential provider. /// -#define EFI_USER_INFO_CREDENTIAL_PROVIDER_RECORD 0x08 +#define EFI_USER_INFO_CREDENTIAL_PROVIDER_RECORD 0x08 typedef EFI_GUID EFI_USER_INFO_CREDENTIAL_PROVIDER; /// /// Specifies the user-readable name of a particular credential's provider. /// -#define EFI_USER_INFO_CREDENTIAL_PROVIDER_NAME_RECORD 0x09 +#define EFI_USER_INFO_CREDENTIAL_PROVIDER_NAME_RECORD 0x09 typedef CHAR16 *EFI_USER_INFO_CREDENTIAL_PROVIDER_NAME; /// /// Provides PKCS#11 credential information from a smart card. /// -#define EFI_USER_INFO_PKCS11_RECORD 0x0A +#define EFI_USER_INFO_PKCS11_RECORD 0x0A /// /// Provides standard biometric information in the format specified by the ISO 19785 (Common /// Biometric Exchange Formats Framework) specification. /// -#define EFI_USER_INFO_CBEFF_RECORD 0x0B +#define EFI_USER_INFO_CBEFF_RECORD 0x0B typedef VOID *EFI_USER_INFO_CBEFF; /// /// Indicates how close of a match the fingerprint must be in order to be considered a match. /// -#define EFI_USER_INFO_FAR_RECORD 0x0C +#define EFI_USER_INFO_FAR_RECORD 0x0C typedef UINT8 EFI_USER_INFO_FAR; /// /// Indicates how many attempts the user has to with a particular credential before the system prevents /// further attempts. /// -#define EFI_USER_INFO_RETRY_RECORD 0x0D +#define EFI_USER_INFO_RETRY_RECORD 0x0D typedef UINT8 EFI_USER_INFO_RETRY; /// /// Provides the user's pre-OS access rights. /// -#define EFI_USER_INFO_ACCESS_POLICY_RECORD 0x0E +#define EFI_USER_INFO_ACCESS_POLICY_RECORD 0x0E typedef struct { - UINT32 Type; ///< Specifies the type of user access control. - UINT32 Size; ///< Specifies the size of the user access control record, in bytes, including this header. + UINT32 Type; ///< Specifies the type of user access control. + UINT32 Size; ///< Specifies the size of the user access control record, in bytes, including this header. } EFI_USER_INFO_ACCESS_CONTROL; typedef EFI_USER_INFO_ACCESS_CONTROL EFI_USER_INFO_ACCESS_POLICY; @@ -189,7 +189,7 @@ typedef EFI_USER_INFO_ACCESS_CONTROL EFI_USER_INFO_ACCESS_POLICY; /// Forbids the user from booting or loading executables from the specified device path or any child /// device paths. /// -#define EFI_USER_INFO_ACCESS_FORBID_LOAD 0x00000001 +#define EFI_USER_INFO_ACCESS_FORBID_LOAD 0x00000001 /// /// Permits the user from booting or loading executables from the specified device path or any child /// device paths. @@ -197,23 +197,23 @@ typedef EFI_USER_INFO_ACCESS_CONTROL EFI_USER_INFO_ACCESS_POLICY; /// The definition EFI_USER_INFO_ACCESS_PERMIT_BOOT in the specification should be typo and wait for /// spec update. /// -#define EFI_USER_INFO_ACCESS_PERMIT_LOAD 0x00000002 +#define EFI_USER_INFO_ACCESS_PERMIT_LOAD 0x00000002 /// /// Presence of this record indicates that a user can update enrollment information. /// -#define EFI_USER_INFO_ACCESS_ENROLL_SELF 0x00000003 +#define EFI_USER_INFO_ACCESS_ENROLL_SELF 0x00000003 /// /// Presence of this record indicates that a user can enroll new users. /// -#define EFI_USER_INFO_ACCESS_ENROLL_OTHERS 0x00000004 +#define EFI_USER_INFO_ACCESS_ENROLL_OTHERS 0x00000004 /// /// Presence of this record indicates that a user can update the user information of any user. /// -#define EFI_USER_INFO_ACCESS_MANAGE 0x00000005 +#define EFI_USER_INFO_ACCESS_MANAGE 0x00000005 /// /// Describes permissions usable when configuring the platform. /// -#define EFI_USER_INFO_ACCESS_SETUP 0x00000006 +#define EFI_USER_INFO_ACCESS_SETUP 0x00000006 /// /// Standard GUIDs for access to configure the platform. /// @@ -227,61 +227,61 @@ typedef EFI_USER_INFO_ACCESS_CONTROL EFI_USER_INFO_ACCESS_POLICY; /// /// Forbids UEFI drivers from being started from the specified device path(s) or any child device paths. /// -#define EFI_USER_INFO_ACCESS_FORBID_CONNECT 0x00000007 +#define EFI_USER_INFO_ACCESS_FORBID_CONNECT 0x00000007 /// /// Permits UEFI drivers to be started on the specified device path(s) or any child device paths. /// -#define EFI_USER_INFO_ACCESS_PERMIT_CONNECT 0x00000008 +#define EFI_USER_INFO_ACCESS_PERMIT_CONNECT 0x00000008 /// /// Modifies the boot order. /// -#define EFI_USER_INFO_ACCESS_BOOT_ORDER 0x00000009 +#define EFI_USER_INFO_ACCESS_BOOT_ORDER 0x00000009 typedef UINT32 EFI_USER_INFO_ACCESS_BOOT_ORDER_HDR; -#define EFI_USER_INFO_ACCESS_BOOT_ORDER_MASK 0x0000000F +#define EFI_USER_INFO_ACCESS_BOOT_ORDER_MASK 0x0000000F /// /// Insert new boot options at the beginning of the boot order. /// -#define EFI_USER_INFO_ACCESS_BOOT_ORDER_INSERT 0x00000000 +#define EFI_USER_INFO_ACCESS_BOOT_ORDER_INSERT 0x00000000 /// /// Append new boot options to the end of the boot order. /// -#define EFI_USER_INFO_ACCESS_BOOT_ORDER_APPEND 0x00000001 +#define EFI_USER_INFO_ACCESS_BOOT_ORDER_APPEND 0x00000001 /// /// Replace the entire boot order. /// -#define EFI_USER_INFO_ACCESS_BOOT_ORDER_REPLACE 0x00000002 +#define EFI_USER_INFO_ACCESS_BOOT_ORDER_REPLACE 0x00000002 /// /// The Boot Manager will not attempt find a default boot device /// when the default boot order is does not lead to a bootable device. /// -#define EFI_USER_INFO_ACCESS_BOOT_ORDER_NODEFAULT 0x00000010 +#define EFI_USER_INFO_ACCESS_BOOT_ORDER_NODEFAULT 0x00000010 /// /// Provides the expression which determines which credentials are required to assert user identity. /// -#define EFI_USER_INFO_IDENTITY_POLICY_RECORD 0x0F +#define EFI_USER_INFO_IDENTITY_POLICY_RECORD 0x0F typedef struct { - UINT32 Type; ///< Specifies either an operator or a data item. - UINT32 Length; ///< The length of this block, in bytes, including this header. + UINT32 Type; ///< Specifies either an operator or a data item. + UINT32 Length; ///< The length of this block, in bytes, including this header. } EFI_USER_INFO_IDENTITY_POLICY; /// /// User identity policy expression operators. /// -#define EFI_USER_INFO_IDENTITY_FALSE 0x00 -#define EFI_USER_INFO_IDENTITY_TRUE 0x01 -#define EFI_USER_INFO_IDENTITY_CREDENTIAL_TYPE 0x02 -#define EFI_USER_INFO_IDENTITY_CREDENTIAL_PROVIDER 0x03 -#define EFI_USER_INFO_IDENTITY_NOT 0x10 -#define EFI_USER_INFO_IDENTITY_AND 0x11 -#define EFI_USER_INFO_IDENTITY_OR 0x12 +#define EFI_USER_INFO_IDENTITY_FALSE 0x00 +#define EFI_USER_INFO_IDENTITY_TRUE 0x01 +#define EFI_USER_INFO_IDENTITY_CREDENTIAL_TYPE 0x02 +#define EFI_USER_INFO_IDENTITY_CREDENTIAL_PROVIDER 0x03 +#define EFI_USER_INFO_IDENTITY_NOT 0x10 +#define EFI_USER_INFO_IDENTITY_AND 0x11 +#define EFI_USER_INFO_IDENTITY_OR 0x12 /// /// Provides placeholder for additional user profile information identified by a GUID. /// -#define EFI_USER_INFO_GUID_RECORD 0xFF +#define EFI_USER_INFO_GUID_RECORD 0xFF typedef EFI_GUID EFI_USER_INFO_GUID; /// @@ -289,10 +289,10 @@ typedef EFI_GUID EFI_USER_INFO_GUID; /// A collection of EFI_USER_INFO records, prefixed with this header. /// typedef struct { - UINT64 Size; ///< Total size of the user information table, in bytes. + UINT64 Size; ///< Total size of the user information table, in bytes. } EFI_USER_INFO_TABLE; -typedef struct _EFI_USER_MANAGER_PROTOCOL EFI_USER_MANAGER_PROTOCOL; +typedef struct _EFI_USER_MANAGER_PROTOCOL EFI_USER_MANAGER_PROTOCOL; /** Create a new user profile. @@ -590,29 +590,29 @@ EFI_STATUS /// This protocol provides the services used to manage user profiles. /// struct _EFI_USER_MANAGER_PROTOCOL { - EFI_USER_PROFILE_CREATE Create; - EFI_USER_PROFILE_DELETE Delete; - EFI_USER_PROFILE_GET_NEXT GetNext; - EFI_USER_PROFILE_CURRENT Current; - EFI_USER_PROFILE_IDENTIFY Identify; - EFI_USER_PROFILE_FIND Find; - EFI_USER_PROFILE_NOTIFY Notify; - EFI_USER_PROFILE_GET_INFO GetInfo; - EFI_USER_PROFILE_SET_INFO SetInfo; - EFI_USER_PROFILE_DELETE_INFO DeleteInfo; - EFI_USER_PROFILE_GET_NEXT_INFO GetNextInfo; + EFI_USER_PROFILE_CREATE Create; + EFI_USER_PROFILE_DELETE Delete; + EFI_USER_PROFILE_GET_NEXT GetNext; + EFI_USER_PROFILE_CURRENT Current; + EFI_USER_PROFILE_IDENTIFY Identify; + EFI_USER_PROFILE_FIND Find; + EFI_USER_PROFILE_NOTIFY Notify; + EFI_USER_PROFILE_GET_INFO GetInfo; + EFI_USER_PROFILE_SET_INFO SetInfo; + EFI_USER_PROFILE_DELETE_INFO DeleteInfo; + EFI_USER_PROFILE_GET_NEXT_INFO GetNextInfo; }; -extern EFI_GUID gEfiUserManagerProtocolGuid; -extern EFI_GUID gEfiEventUserProfileChangedGuid; -extern EFI_GUID gEfiUserCredentialClassUnknownGuid; -extern EFI_GUID gEfiUserCredentialClassPasswordGuid; -extern EFI_GUID gEfiUserCredentialClassSmartCardGuid; -extern EFI_GUID gEfiUserCredentialClassFingerprintGuid; -extern EFI_GUID gEfiUserCredentialClassHandprintGuid; -extern EFI_GUID gEfiUserCredentialClassSecureCardGuid; -extern EFI_GUID gEfiUserInfoAccessSetupAdminGuid; -extern EFI_GUID gEfiUserInfoAccessSetupNormalGuid; -extern EFI_GUID gEfiUserInfoAccessSetupRestrictedGuid; +extern EFI_GUID gEfiUserManagerProtocolGuid; +extern EFI_GUID gEfiEventUserProfileChangedGuid; +extern EFI_GUID gEfiUserCredentialClassUnknownGuid; +extern EFI_GUID gEfiUserCredentialClassPasswordGuid; +extern EFI_GUID gEfiUserCredentialClassSmartCardGuid; +extern EFI_GUID gEfiUserCredentialClassFingerprintGuid; +extern EFI_GUID gEfiUserCredentialClassHandprintGuid; +extern EFI_GUID gEfiUserCredentialClassSecureCardGuid; +extern EFI_GUID gEfiUserInfoAccessSetupAdminGuid; +extern EFI_GUID gEfiUserInfoAccessSetupNormalGuid; +extern EFI_GUID gEfiUserInfoAccessSetupRestrictedGuid; #endif diff --git a/MdePkg/Include/Protocol/Variable.h b/MdePkg/Include/Protocol/Variable.h index 7be33ff..3382eb1 100644 --- a/MdePkg/Include/Protocol/Variable.h +++ b/MdePkg/Include/Protocol/Variable.h @@ -34,6 +34,6 @@ #define EFI_VARIABLE_ARCH_PROTOCOL_GUID \ { 0x1e5668e2, 0x8481, 0x11d4, {0xbc, 0xf1, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } } -extern EFI_GUID gEfiVariableArchProtocolGuid; +extern EFI_GUID gEfiVariableArchProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/VariableWrite.h b/MdePkg/Include/Protocol/VariableWrite.h index 850e296..db5e392 100644 --- a/MdePkg/Include/Protocol/VariableWrite.h +++ b/MdePkg/Include/Protocol/VariableWrite.h @@ -34,6 +34,6 @@ #define EFI_VARIABLE_WRITE_ARCH_PROTOCOL_GUID \ { 0x6441f818, 0x6362, 0x4e44, {0xb5, 0x70, 0x7d, 0xba, 0x31, 0xdd, 0x24, 0x53 } } -extern EFI_GUID gEfiVariableWriteArchProtocolGuid; +extern EFI_GUID gEfiVariableWriteArchProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/VlanConfig.h b/MdePkg/Include/Protocol/VlanConfig.h index f1b6d21..a22a559 100644 --- a/MdePkg/Include/Protocol/VlanConfig.h +++ b/MdePkg/Include/Protocol/VlanConfig.h @@ -12,7 +12,6 @@ #ifndef __EFI_VLANCONFIG_PROTOCOL_H__ #define __EFI_VLANCONFIG_PROTOCOL_H__ - #define EFI_VLAN_CONFIG_PROTOCOL_GUID \ { \ 0x9e23d768, 0xd2f3, 0x4366, {0x9f, 0xc3, 0x3a, 0x7a, 0xba, 0x86, 0x43, 0x74 } \ @@ -20,16 +19,14 @@ typedef struct _EFI_VLAN_CONFIG_PROTOCOL EFI_VLAN_CONFIG_PROTOCOL; - /// /// EFI_VLAN_FIND_DATA /// typedef struct { - UINT16 VlanId; ///< Vlan Identifier. - UINT8 Priority; ///< Priority of this VLAN. + UINT16 VlanId; ///< Vlan Identifier. + UINT8 Priority; ///< Priority of this VLAN. } EFI_VLAN_FIND_DATA; - /** Create a VLAN device or modify the configuration parameter of an already-configured VLAN. @@ -127,11 +124,11 @@ EFI_STATUS /// VLAN tagging implementation is IEEE802.1Q. /// struct _EFI_VLAN_CONFIG_PROTOCOL { - EFI_VLAN_CONFIG_SET Set; - EFI_VLAN_CONFIG_FIND Find; - EFI_VLAN_CONFIG_REMOVE Remove; + EFI_VLAN_CONFIG_SET Set; + EFI_VLAN_CONFIG_FIND Find; + EFI_VLAN_CONFIG_REMOVE Remove; }; -extern EFI_GUID gEfiVlanConfigProtocolGuid; +extern EFI_GUID gEfiVlanConfigProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/WatchdogTimer.h b/MdePkg/Include/Protocol/WatchdogTimer.h index d2dee48..f0cf596 100644 --- a/MdePkg/Include/Protocol/WatchdogTimer.h +++ b/MdePkg/Include/Protocol/WatchdogTimer.h @@ -19,7 +19,7 @@ /// /// Declare forward reference for the Timer Architectural Protocol /// -typedef struct _EFI_WATCHDOG_TIMER_ARCH_PROTOCOL EFI_WATCHDOG_TIMER_ARCH_PROTOCOL; +typedef struct _EFI_WATCHDOG_TIMER_ARCH_PROTOCOL EFI_WATCHDOG_TIMER_ARCH_PROTOCOL; /** A function of this type is called when the watchdog timer fires if a @@ -114,7 +114,6 @@ EFI_STATUS OUT UINT64 *TimerPeriod ); - /// /// This protocol provides the services required to implement the Boot Service /// SetWatchdogTimer(). It provides a service to set the amount of time to wait @@ -127,12 +126,11 @@ EFI_STATUS /// reset by calling the Runtime Service ResetSystem(). /// struct _EFI_WATCHDOG_TIMER_ARCH_PROTOCOL { - EFI_WATCHDOG_TIMER_REGISTER_HANDLER RegisterHandler; - EFI_WATCHDOG_TIMER_SET_TIMER_PERIOD SetTimerPeriod; - EFI_WATCHDOG_TIMER_GET_TIMER_PERIOD GetTimerPeriod; + EFI_WATCHDOG_TIMER_REGISTER_HANDLER RegisterHandler; + EFI_WATCHDOG_TIMER_SET_TIMER_PERIOD SetTimerPeriod; + EFI_WATCHDOG_TIMER_GET_TIMER_PERIOD GetTimerPeriod; }; -extern EFI_GUID gEfiWatchdogTimerArchProtocolGuid; +extern EFI_GUID gEfiWatchdogTimerArchProtocolGuid; #endif - diff --git a/MdePkg/Include/Protocol/WiFi.h b/MdePkg/Include/Protocol/WiFi.h index e82607c..daca023 100644 --- a/MdePkg/Include/Protocol/WiFi.h +++ b/MdePkg/Include/Protocol/WiFi.h @@ -138,11 +138,11 @@ typedef struct { /// /// A unique element ID defined in IEEE 802.11 specification. /// - UINT8 ElementID; + UINT8 ElementID; /// /// Specifies the number of octets in the element body. /// - UINT8 Length; + UINT8 Length; } EFI_80211_ELEMENT_HEADER; /// @@ -152,12 +152,12 @@ typedef struct { /// /// Common header of an element. /// - EFI_80211_ELEMENT_HEADER Hdr; + EFI_80211_ELEMENT_HEADER Hdr; /// /// Start of elements that are requested to be included in the Probe Response frame. /// The elements are listed in order of increasing element ID. /// - UINT8 RequestIDs[1]; + UINT8 RequestIDs[1]; } EFI_80211_ELEMENT_REQ; /// @@ -167,11 +167,11 @@ typedef struct { /// /// Common header of an element. /// - EFI_80211_ELEMENT_HEADER Hdr; + EFI_80211_ELEMENT_HEADER Hdr; /// /// Service set identifier. If Hdr.Length is zero, this field is ignored. /// - UINT8 SSId[32]; + UINT8 SSId[32]; } EFI_80211_ELEMENT_SSID; /// @@ -182,63 +182,63 @@ typedef struct { /// Determines whether infrastructure BSS, IBSS, MBSS, or all, are included in the /// scan. /// - EFI_80211_BSS_TYPE BSSType; + EFI_80211_BSS_TYPE BSSType; /// /// Indicates a specific or wildcard BSSID. Use all binary 1s to represent all SSIDs. /// - EFI_80211_MAC_ADDRESS BSSId; + EFI_80211_MAC_ADDRESS BSSId; /// /// Length in bytes of the SSId. If zero, ignore SSId field. /// - UINT8 SSIdLen; + UINT8 SSIdLen; /// /// Specifies the desired SSID or the wildcard SSID. Use NULL to represent all SSIDs. /// - UINT8 *SSId; + UINT8 *SSId; /// /// Indicates passive scanning if TRUE. /// - BOOLEAN PassiveMode; + BOOLEAN PassiveMode; /// /// The delay in microseconds to be used prior to transmitting a Probe frame during /// active scanning. If zero, the value can be overridden by an /// implementation-dependent default value. /// - UINT32 ProbeDelay; + UINT32 ProbeDelay; /// /// Specifies a list of channels that are examined when scanning for a BSS. If set to /// NULL, all valid channels will be scanned. /// - UINT32 *ChannelList; + UINT32 *ChannelList; /// /// Indicates the minimum time in TU to spend on each channel when scanning. If zero, /// the value can be overridden by an implementation-dependent default value. /// - UINT32 MinChannelTime; + UINT32 MinChannelTime; /// /// Indicates the maximum time in TU to spend on each channel when scanning. If zero, /// the value can be overridden by an implementation-dependent default value. /// - UINT32 MaxChannelTime; + UINT32 MaxChannelTime; /// /// Points to an optionally present element. This is an optional parameter and may be /// NULL. /// - EFI_80211_ELEMENT_REQ *RequestInformation; + EFI_80211_ELEMENT_REQ *RequestInformation; /// /// Indicates one or more SSID elements that are optionally present. This is an /// optional parameter and may be NULL. /// - EFI_80211_ELEMENT_SSID *SSIDList; + EFI_80211_ELEMENT_SSID *SSIDList; /// /// Specifies a desired specific access network type or the wildcard access network /// type. Use 15 as wildcard access network type. /// - EFI_80211_ACC_NET_TYPE AccessNetworkType; + EFI_80211_ACC_NET_TYPE AccessNetworkType; /// /// Specifies zero or more elements. This is an optional parameter and may be NULL. /// - UINT8 *VendorSpecificInfo; + UINT8 *VendorSpecificInfo; } EFI_80211_SCAN_DATA; /// @@ -249,15 +249,15 @@ typedef struct { /// Indicates the lowest channel number in the subband. It has a positive integer /// value less than 201. /// - UINT8 FirstChannelNum; + UINT8 FirstChannelNum; /// /// Indicates the number of channels in the subband. /// - UINT8 NumOfChannels; + UINT8 NumOfChannels; /// /// Indicates the maximum power in dBm allowed to be transmitted. /// - UINT8 MaxTxPowerLevel; + UINT8 MaxTxPowerLevel; } EFI_80211_COUNTRY_TRIPLET_SUBBAND; /// @@ -268,16 +268,16 @@ typedef struct { /// Indicates the operating extension identifier. It has a positive integer value of /// 201 or greater. /// - UINT8 OperatingExtId; + UINT8 OperatingExtId; /// /// Index into a set of values for radio equipment set of rules. /// - UINT8 OperatingClass; + UINT8 OperatingClass; /// /// Specifies aAirPropagationTime characteristics used in BSS operation. Refer the /// definition of aAirPropagationTime in IEEE 802.11 specification. /// - UINT8 CoverageClass; + UINT8 CoverageClass; } EFI_80211_COUNTRY_TRIPLET_OPERATE; /// @@ -287,11 +287,11 @@ typedef union { /// /// The subband triplet. /// - EFI_80211_COUNTRY_TRIPLET_SUBBAND Subband; + EFI_80211_COUNTRY_TRIPLET_SUBBAND Subband; /// /// The operating triplet. /// - EFI_80211_COUNTRY_TRIPLET_OPERATE Operating; + EFI_80211_COUNTRY_TRIPLET_OPERATE Operating; } EFI_80211_COUNTRY_TRIPLET; /// @@ -301,16 +301,16 @@ typedef struct { /// /// Common header of an element. /// - EFI_80211_ELEMENT_HEADER Hdr; + EFI_80211_ELEMENT_HEADER Hdr; /// /// Specifies country strings in 3 octets. /// - UINT8 CountryStr[3]; + UINT8 CountryStr[3]; /// /// Indicates a triplet that repeated in country element. The number of triplets is /// determined by the Hdr.Length field. /// - EFI_80211_COUNTRY_TRIPLET CountryTriplet[1]; + EFI_80211_COUNTRY_TRIPLET CountryTriplet[1]; } EFI_80211_ELEMENT_COUNTRY; /// @@ -321,47 +321,47 @@ typedef struct { /// Indicates the version number of the RSNA protocol. Value 1 is defined in current /// IEEE 802.11 specification. /// - UINT16 Version; + UINT16 Version; /// /// Specifies the cipher suite selector used by the BSS to protect group address frames. /// - UINT32 GroupDataCipherSuite; + UINT32 GroupDataCipherSuite; /// /// Indicates the number of pairwise cipher suite selectors that are contained in /// PairwiseCipherSuiteList. /// -//UINT16 PairwiseCipherSuiteCount; + // UINT16 PairwiseCipherSuiteCount; /// /// Contains a series of cipher suite selectors that indicate the pairwise cipher /// suites contained in this element. /// -//UINT32 PairwiseCipherSuiteList[PairwiseCipherSuiteCount]; + // UINT32 PairwiseCipherSuiteList[PairwiseCipherSuiteCount]; /// /// Indicates the number of AKM suite selectors that are contained in AKMSuiteList. /// -//UINT16 AKMSuiteCount; + // UINT16 AKMSuiteCount; /// /// Contains a series of AKM suite selectors that indicate the AKM suites contained in /// this element. /// -//UINT32 AKMSuiteList[AKMSuiteCount]; + // UINT32 AKMSuiteList[AKMSuiteCount]; /// /// Indicates requested or advertised capabilities. /// -//UINT16 RSNCapabilities; + // UINT16 RSNCapabilities; /// /// Indicates the number of PKMIDs in the PMKIDList. /// -//UINT16 PMKIDCount; + // UINT16 PMKIDCount; /// /// Contains zero or more PKMIDs that the STA believes to be valid for the destination /// AP. -//UINT8 PMKIDList[PMKIDCount][16]; + // UINT8 PMKIDList[PMKIDCount][16]; /// /// Specifies the cipher suite selector used by the BSS to protect group addressed /// robust management frames. /// -//UINT32 GroupManagementCipherSuite; + // UINT32 GroupManagementCipherSuite; } EFI_80211_ELEMENT_DATA_RSN; /// @@ -371,11 +371,11 @@ typedef struct { /// /// Common header of an element. /// - EFI_80211_ELEMENT_HEADER Hdr; + EFI_80211_ELEMENT_HEADER Hdr; /// /// Points to RSN element. The size of a RSN element is limited to 255 octets. /// - EFI_80211_ELEMENT_DATA_RSN *Data; + EFI_80211_ELEMENT_DATA_RSN *Data; } EFI_80211_ELEMENT_RSN; /// @@ -385,13 +385,13 @@ typedef struct { /// /// Common header of an element. /// - EFI_80211_ELEMENT_HEADER Hdr; + EFI_80211_ELEMENT_HEADER Hdr; /// /// Indicates the capabilities being advertised by the STA transmitting the element. /// This is a bit field with variable length. Refer to IEEE 802.11 specification for /// bit value. /// - UINT8 Capabilities[1]; + UINT8 Capabilities[1]; } EFI_80211_ELEMENT_EXT_CAP; /// @@ -401,77 +401,77 @@ typedef struct { /// /// Indicates a specific BSSID of the found BSS. /// - EFI_80211_MAC_ADDRESS BSSId; + EFI_80211_MAC_ADDRESS BSSId; /// /// Specifies the SSID of the found BSS. If NULL, ignore SSIdLen field. /// - UINT8 *SSId; + UINT8 *SSId; /// /// Specifies the SSID of the found BSS. If NULL, ignore SSIdLen field. /// - UINT8 SSIdLen; + UINT8 SSIdLen; /// /// Specifies the type of the found BSS. /// - EFI_80211_BSS_TYPE BSSType; + EFI_80211_BSS_TYPE BSSType; /// /// The beacon period in TU of the found BSS. /// - UINT16 BeaconPeriod; + UINT16 BeaconPeriod; /// /// The timestamp of the received frame from the found BSS. /// - UINT64 Timestamp; + UINT64 Timestamp; /// /// The advertised capabilities of the BSS. /// - UINT16 CapabilityInfo; + UINT16 CapabilityInfo; /// /// The set of data rates that shall be supported by all STAs that desire to join this /// BSS. /// - UINT8 *BSSBasicRateSet; + UINT8 *BSSBasicRateSet; /// /// The set of data rates that the peer STA desires to use for communication within /// the BSS. /// - UINT8 *OperationalRateSet; + UINT8 *OperationalRateSet; /// /// The information required to identify the regulatory domain in which the peer STA /// is located. /// - EFI_80211_ELEMENT_COUNTRY *Country; + EFI_80211_ELEMENT_COUNTRY *Country; /// /// The cipher suites and AKM suites supported in the BSS. /// - EFI_80211_ELEMENT_RSN RSN; + EFI_80211_ELEMENT_RSN RSN; /// /// Specifies the RSSI of the received frame. /// - UINT8 RSSI; + UINT8 RSSI; /// /// Specifies the RCPI of the received frame. /// - UINT8 RCPIMeasurement; + UINT8 RCPIMeasurement; /// /// Specifies the RSNI of the received frame. /// - UINT8 RSNIMeasurement; + UINT8 RSNIMeasurement; /// /// Specifies the elements requested by the request element of the Probe Request frame. /// This is an optional parameter and may be NULL. /// - UINT8 *RequestedElements; + UINT8 *RequestedElements; /// /// Specifies the BSS membership selectors that represent the set of features that /// shall be supported by all STAs to join this BSS. /// - UINT8 *BSSMembershipSelectorSet; + UINT8 *BSSMembershipSelectorSet; /// /// Specifies the parameters within the Extended Capabilities element that are /// supported by the MAC entity. This is an optional parameter and may be NULL. /// - EFI_80211_ELEMENT_EXT_CAP *ExtCapElement; + EFI_80211_ELEMENT_EXT_CAP *ExtCapElement; } EFI_80211_BSS_DESCRIPTION; /// @@ -481,15 +481,15 @@ typedef struct { /// /// Indicates the unique identifier within the containing element or sub-element. /// - UINT8 SubElementID; + UINT8 SubElementID; /// /// Specifies the number of octets in the Data field. /// - UINT8 Length; + UINT8 Length; /// /// A variable length data buffer. /// - UINT8 Data[1]; + UINT8 Data[1]; } EFI_80211_SUBELEMENT_INFO; /// @@ -499,16 +499,16 @@ typedef struct { /// /// Common header of an element. /// - EFI_80211_ELEMENT_HEADER Hdr; + EFI_80211_ELEMENT_HEADER Hdr; /// /// Indicates the maximum number of BSSIDs in the multiple BSSID set. When Indicator /// is set to n, 2n is the maximum number. /// - UINT8 Indicator; + UINT8 Indicator; /// /// Contains zero or more sub-elements. /// - EFI_80211_SUBELEMENT_INFO SubElement[1]; + EFI_80211_SUBELEMENT_INFO SubElement[1]; } EFI_80211_MULTIPLE_BSSID; /// @@ -518,43 +518,43 @@ typedef struct { /// /// Indicates a specific BSSID of the found BSS. /// - EFI_80211_MAC_ADDRESS BSSId; + EFI_80211_MAC_ADDRESS BSSId; /// /// Specifies the type of the found BSS. /// - EFI_80211_BSS_TYPE BSSType; + EFI_80211_BSS_TYPE BSSType; /// /// One octet field to report condensed capability information. /// - UINT8 ConCapInfo; + UINT8 ConCapInfo; /// /// Two octet's field to report condensed country string. /// - UINT8 ConCountryStr[2]; + UINT8 ConCountryStr[2]; /// /// Indicates the operating class value for the operating channel. /// - UINT8 OperatingClass; + UINT8 OperatingClass; /// /// Indicates the operating channel. /// - UINT8 Channel; + UINT8 Channel; /// /// Indicates the measurement pilot interval in TU. /// - UINT8 Interval; + UINT8 Interval; /// /// Indicates that the BSS is within a multiple BSSID set. /// - EFI_80211_MULTIPLE_BSSID *MultipleBSSID; + EFI_80211_MULTIPLE_BSSID *MultipleBSSID; /// /// Specifies the RCPI of the received frame. /// - UINT8 RCPIMeasurement; + UINT8 RCPIMeasurement; /// /// Specifies the RSNI of the received frame. /// - UINT8 RSNIMeasurement; + UINT8 RSNIMeasurement; } EFI_80211_BSS_DESP_PILOT; /// @@ -565,24 +565,24 @@ typedef struct { /// The number of EFI_80211_BSS_DESCRIPTION in BSSDespSet. If zero, BSSDespSet should /// be ignored. /// - UINTN NumOfBSSDesp; + UINTN NumOfBSSDesp; /// /// Points to zero or more instances of EFI_80211_BSS_DESCRIPTION. /// - EFI_80211_BSS_DESCRIPTION **BSSDespSet; + EFI_80211_BSS_DESCRIPTION **BSSDespSet; /// /// The number of EFI_80211_BSS_DESP_PILOT in BSSDespFromPilotSet. If zero, /// BSSDespFromPilotSet should be ignored. /// - UINTN NumofBSSDespFromPilot; + UINTN NumofBSSDespFromPilot; /// /// Points to zero or more instances of EFI_80211_BSS_DESP_PILOT. /// - EFI_80211_BSS_DESP_PILOT **BSSDespFromPilotSet; + EFI_80211_BSS_DESP_PILOT **BSSDespFromPilotSet; /// /// Specifies zero or more elements. This is an optional parameter and may be NULL. /// - UINT8 *VendorSpecificInfo; + UINT8 *VendorSpecificInfo; } EFI_80211_SCAN_RESULT; /// @@ -593,7 +593,7 @@ typedef struct { /// This Event will be signaled after the Status field is updated by the EFI Wireless /// MAC Connection Protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL. /// - EFI_EVENT Event; + EFI_EVENT Event; /// /// Will be set to one of the following values: /// EFI_SUCCESS: Scan operation completed successfully. @@ -602,19 +602,19 @@ typedef struct { /// EFI_ACCESS_DENIED: The scan operation is not completed due to some underlying /// hardware or software state. /// EFI_NOT_READY: The scan operation is started but not yet completed. - EFI_STATUS Status; + EFI_STATUS Status; /// /// Pointer to the scan data. /// - EFI_80211_SCAN_DATA *Data; + EFI_80211_SCAN_DATA *Data; /// /// Indicates the scan state. /// - EFI_80211_SCAN_RESULT_CODE ResultCode; + EFI_80211_SCAN_RESULT_CODE ResultCode; /// /// Indicates the scan result. It is caller's responsibility to free this buffer. /// - EFI_80211_SCAN_RESULT *Result; + EFI_80211_SCAN_RESULT *Result; } EFI_80211_SCAN_DATA_TOKEN; /// @@ -624,11 +624,11 @@ typedef struct { /// /// The first channel number in a subband of supported channels. /// - UINT8 FirstChannelNumber; + UINT8 FirstChannelNumber; /// /// The number of channels in a subband of supported channels. /// - UINT8 NumberOfChannels; + UINT8 NumberOfChannels; } EFI_80211_ELEMENT_SUPP_CHANNEL_TUPLE; /// @@ -652,37 +652,37 @@ typedef struct { /// /// Specifies the address of the peer MAC entity to associate with. /// - EFI_80211_MAC_ADDRESS BSSId; + EFI_80211_MAC_ADDRESS BSSId; /// /// Specifies the requested operational capabilities to the AP in 2 octets. /// - UINT16 CapabilityInfo; + UINT16 CapabilityInfo; /// /// Specifies a time limit in TU, after which the associate procedure is terminated. /// - UINT32 FailureTimeout; + UINT32 FailureTimeout; /// /// Specifies if in power save mode, how often the STA awakes and listens for the next /// beacon frame in TU. /// - UINT32 ListenInterval; + UINT32 ListenInterval; /// /// Indicates a list of channels in which the STA is capable of operating. /// - EFI_80211_ELEMENT_SUPP_CHANNEL *Channels; + EFI_80211_ELEMENT_SUPP_CHANNEL *Channels; /// /// The cipher suites and AKM suites selected by the STA. /// - EFI_80211_ELEMENT_RSN RSN; + EFI_80211_ELEMENT_RSN RSN; /// /// Specifies the parameters within the Extended Capabilities element that are /// supported by the MAC entity. This is an optional parameter and may be NULL. /// - EFI_80211_ELEMENT_EXT_CAP *ExtCapElement; + EFI_80211_ELEMENT_EXT_CAP *ExtCapElement; /// /// Specifies zero or more elements. This is an optional parameter and may be NULL. /// - UINT8 *VendorSpecificInfo; + UINT8 *VendorSpecificInfo; } EFI_80211_ASSOCIATE_DATA; /// @@ -692,15 +692,15 @@ typedef struct { /// /// Common header of an element. /// - EFI_80211_ELEMENT_HEADER Hdr; + EFI_80211_ELEMENT_HEADER Hdr; /// /// Specifies the timeout interval type. /// - UINT8 Type; + UINT8 Type; /// /// Specifies the timeout interval value. /// - UINT32 Value; + UINT32 Value; } EFI_80211_ELEMENT_TIMEOUT_VAL; /// @@ -711,38 +711,38 @@ typedef struct { /// Specifies the address of the peer MAC entity from which the association request /// was received. /// - EFI_80211_MAC_ADDRESS BSSId; + EFI_80211_MAC_ADDRESS BSSId; /// /// Specifies the operational capabilities advertised by the AP. /// - UINT16 CapabilityInfo; + UINT16 CapabilityInfo; /// /// Specifies the association ID value assigned by the AP. /// - UINT16 AssociationID; + UINT16 AssociationID; /// /// Indicates the measured RCPI of the corresponding association request frame. It is /// an optional parameter and is set to zero if unavailable. /// - UINT8 RCPIValue; + UINT8 RCPIValue; /// /// Indicates the measured RSNI at the time the corresponding association request /// frame was received. It is an optional parameter and is set to zero if unavailable. /// - UINT8 RSNIValue; + UINT8 RSNIValue; /// /// Specifies the parameters within the Extended Capabilities element that are /// supported by the MAC entity. This is an optional parameter and may be NULL. /// - EFI_80211_ELEMENT_EXT_CAP *ExtCapElement; + EFI_80211_ELEMENT_EXT_CAP *ExtCapElement; /// /// Specifies the timeout interval when the result code is AssociateRefusedTemporarily. /// - EFI_80211_ELEMENT_TIMEOUT_VAL TimeoutInterval; + EFI_80211_ELEMENT_TIMEOUT_VAL TimeoutInterval; /// /// Specifies zero or more elements. This is an optional parameter and may be NULL. /// - UINT8 *VendorSpecificInfo; + UINT8 *VendorSpecificInfo; } EFI_80211_ASSOCIATE_RESULT; /// @@ -783,15 +783,15 @@ typedef struct { /// Specifies the address of the peer MAC entity with which to perform the /// disassociation process. /// - EFI_80211_MAC_ADDRESS BSSId; + EFI_80211_MAC_ADDRESS BSSId; /// /// Specifies the reason for initiating the disassociation process. /// - EFI_80211_REASON_CODE ReasonCode; + EFI_80211_REASON_CODE ReasonCode; /// /// Zero or more elements, may be NULL. /// - UINT8 *VendorSpecificInfo; + UINT8 *VendorSpecificInfo; } EFI_80211_DISASSOCIATE_DATA; /// @@ -802,7 +802,7 @@ typedef struct { /// This Event will be signaled after the Status field is updated by the EFI Wireless /// MAC Connection Protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL. /// - EFI_EVENT Event; + EFI_EVENT Event; /// /// Will be set to one of the following values: /// EFI_SUCCESS: Disassociation operation completed successfully. @@ -811,15 +811,15 @@ typedef struct { /// underlying hardware or software state. /// EFI_NOT_READY: The disassociation operation is started but not yet completed. /// - EFI_STATUS Status; + EFI_STATUS Status; /// /// Pointer to the disassociation data. /// - EFI_80211_DISASSOCIATE_DATA *Data; + EFI_80211_DISASSOCIATE_DATA *Data; /// /// Indicates the disassociation state. /// - EFI_80211_DISASSOCIATE_RESULT_CODE ResultCode; + EFI_80211_DISASSOCIATE_RESULT_CODE ResultCode; } EFI_80211_DISASSOCIATE_DATA_TOKEN; /// @@ -830,31 +830,31 @@ typedef struct { /// Specifies the address of the peer MAC entity with which to perform the /// authentication process. /// - EFI_80211_MAC_ADDRESS BSSId; + EFI_80211_MAC_ADDRESS BSSId; /// /// Specifies the type of authentication algorithm to use during the authentication /// process. /// - EFI_80211_AUTHENTICATION_TYPE AuthType; + EFI_80211_AUTHENTICATION_TYPE AuthType; /// /// Specifies a time limit in TU after which the authentication procedure is /// terminated. /// - UINT32 FailureTimeout; + UINT32 FailureTimeout; /// /// Specifies the set of elements to be included in the first message of the FT /// authentication sequence, may be NULL. /// - UINT8 *FTContent; + UINT8 *FTContent; /// /// Specifies the set of elements to be included in the SAE Commit Message or SAE /// Confirm Message, may be NULL. /// - UINT8 *SAEContent; + UINT8 *SAEContent; /// /// Zero or more elements, may be NULL. /// - UINT8 *VendorSpecificInfo; + UINT8 *VendorSpecificInfo; } EFI_80211_AUTHENTICATE_DATA; /// @@ -865,21 +865,21 @@ typedef struct { /// Specifies the address of the peer MAC entity from which the authentication request /// was received. /// - EFI_80211_MAC_ADDRESS BSSId; + EFI_80211_MAC_ADDRESS BSSId; /// /// Specifies the set of elements to be included in the second message of the FT /// authentication sequence, may be NULL. /// - UINT8 *FTContent; + UINT8 *FTContent; /// /// Specifies the set of elements to be included in the SAE Commit Message or SAE /// Confirm Message, may be NULL. /// - UINT8 *SAEContent; + UINT8 *SAEContent; /// /// Zero or more elements, may be NULL. /// - UINT8 *VendorSpecificInfo; + UINT8 *VendorSpecificInfo; } EFI_80211_AUTHENTICATE_RESULT; /// @@ -890,7 +890,7 @@ typedef struct { /// This Event will be signaled after the Status field is updated by the EFI Wireless /// MAC Connection Protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL. /// - EFI_EVENT Event; + EFI_EVENT Event; /// /// Will be set to one of the following values: /// EFI_SUCCESS: Authentication operation completed successfully. @@ -901,20 +901,20 @@ typedef struct { /// underlying hardware or software state. /// EFI_NOT_READY: The authentication operation is started but not yet completed. /// - EFI_STATUS Status; + EFI_STATUS Status; /// /// Pointer to the authentication data. /// - EFI_80211_AUTHENTICATE_DATA *Data; + EFI_80211_AUTHENTICATE_DATA *Data; /// /// Indicates the association state. /// - EFI_80211_AUTHENTICATE_RESULT_CODE ResultCode; + EFI_80211_AUTHENTICATE_RESULT_CODE ResultCode; /// /// Indicates the association result. It is caller's responsibility to free this /// buffer. /// - EFI_80211_AUTHENTICATE_RESULT *Result; + EFI_80211_AUTHENTICATE_RESULT *Result; } EFI_80211_AUTHENTICATE_DATA_TOKEN; /// @@ -925,15 +925,15 @@ typedef struct { /// Specifies the address of the peer MAC entity with which to perform the /// deauthentication process. /// - EFI_80211_MAC_ADDRESS BSSId; + EFI_80211_MAC_ADDRESS BSSId; /// /// Specifies the reason for initiating the deauthentication process. /// - EFI_80211_REASON_CODE ReasonCode; + EFI_80211_REASON_CODE ReasonCode; /// /// Zero or more elements, may be NULL. /// - UINT8 *VendorSpecificInfo; + UINT8 *VendorSpecificInfo; } EFI_80211_DEAUTHENTICATE_DATA; /// @@ -944,7 +944,7 @@ typedef struct { /// This Event will be signaled after the Status field is updated by the EFI Wireless /// MAC Connection Protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL. /// - EFI_EVENT Event; + EFI_EVENT Event; /// /// Will be set to one of the following values: /// EFI_SUCCESS: Deauthentication operation completed successfully. @@ -954,11 +954,11 @@ typedef struct { /// EFI_NOT_READY: The deauthentication operation is started but not yet /// completed. /// - EFI_STATUS Status; + EFI_STATUS Status; /// /// Pointer to the deauthentication data. /// - EFI_80211_DEAUTHENTICATE_DATA *Data; + EFI_80211_DEAUTHENTICATE_DATA *Data; } EFI_80211_DEAUTHENTICATE_DATA_TOKEN; /** @@ -1111,13 +1111,13 @@ EFI_STATUS /// communication device that the EFI wireless network stack runs on. /// struct _EFI_WIRELESS_MAC_CONNECTION_PROTOCOL { - EFI_WIRELESS_MAC_CONNECTION_SCAN Scan; - EFI_WIRELESS_MAC_CONNECTION_ASSOCIATE Associate; - EFI_WIRELESS_MAC_CONNECTION_DISASSOCIATE Disassociate; - EFI_WIRELESS_MAC_CONNECTION_AUTHENTICATE Authenticate; - EFI_WIRELESS_MAC_CONNECTION_DEAUTHENTICATE Deauthenticate; + EFI_WIRELESS_MAC_CONNECTION_SCAN Scan; + EFI_WIRELESS_MAC_CONNECTION_ASSOCIATE Associate; + EFI_WIRELESS_MAC_CONNECTION_DISASSOCIATE Disassociate; + EFI_WIRELESS_MAC_CONNECTION_AUTHENTICATE Authenticate; + EFI_WIRELESS_MAC_CONNECTION_DEAUTHENTICATE Deauthenticate; }; -extern EFI_GUID gEfiWiFiProtocolGuid; +extern EFI_GUID gEfiWiFiProtocolGuid; #endif diff --git a/MdePkg/Include/Protocol/WiFi2.h b/MdePkg/Include/Protocol/WiFi2.h index 844e744..1cdbb58 100644 --- a/MdePkg/Include/Protocol/WiFi2.h +++ b/MdePkg/Include/Protocol/WiFi2.h @@ -60,10 +60,10 @@ typedef enum { /// EFI_80211_MAC_ADDRESS /// typedef struct { - UINT8 Addr[6]; + UINT8 Addr[6]; } EFI_80211_MAC_ADDRESS; -#define EFI_MAX_SSID_LEN 32 +#define EFI_MAX_SSID_LEN 32 /// /// EFI_80211_SSID @@ -72,11 +72,11 @@ typedef struct { // // Length in bytes of the SSId. If zero, ignore SSId field. // - UINT8 SSIdLen; + UINT8 SSIdLen; // // Specifies the service set identifier. // - UINT8 SSId[EFI_MAX_SSID_LEN]; + UINT8 SSId[EFI_MAX_SSID_LEN]; } EFI_80211_SSID; /// @@ -87,7 +87,7 @@ typedef struct { // The number of EFI_80211_SSID in SSIDList. If zero, SSIDList should be // ignored. // - UINT32 NumOfSSID; + UINT32 NumOfSSID; // // The SSIDList is a pointer to an array of EFI_80211_SSID instances. The // number of entries is specified by NumOfSSID. The array should only include @@ -95,7 +95,7 @@ typedef struct { // 10 elements in the SSIDList. It is the caller's responsibility to free // this buffer. // - EFI_80211_SSID SSIDList[1]; + EFI_80211_SSID SSIDList[1]; } EFI_80211_GET_NETWORKS_DATA; /// @@ -106,11 +106,11 @@ typedef struct { // Organization Unique Identifier, as defined in IEEE 802.11 standard, // usually set to 00-0F-AC. // - UINT8 Oui[3]; + UINT8 Oui[3]; // // Suites types, as defined in IEEE 802.11 standard. // - UINT8 SuiteType; + UINT8 SuiteType; } EFI_80211_SUITE_SELECTOR; /// @@ -121,12 +121,12 @@ typedef struct { // Indicates the number of AKM suite selectors that are contained in // AKMSuiteList. If zero, the AKMSuiteList is ignored. // - UINT16 AKMSuiteCount; + UINT16 AKMSuiteCount; // // A variable-length array of AKM suites, as defined in IEEE 802.11 standard, // Table 8-101. The number of entries is specified by AKMSuiteCount. // - EFI_80211_SUITE_SELECTOR AKMSuiteList[1]; + EFI_80211_SUITE_SELECTOR AKMSuiteList[1]; } EFI_80211_AKM_SUITE_SELECTOR; /// @@ -137,13 +137,13 @@ typedef struct { // Indicates the number of cipher suites that are contained in // CipherSuiteList. If zero, the CipherSuiteList is ignored. // - UINT16 CipherSuiteCount; + UINT16 CipherSuiteCount; // // A variable-length array of cipher suites, as defined in IEEE 802.11 // standard, Table 8-99. The number of entries is specified by // CipherSuiteCount. // - EFI_80211_SUITE_SELECTOR CipherSuiteList[1]; + EFI_80211_SUITE_SELECTOR CipherSuiteList[1]; } EFI_80211_CIPHER_SUITE_SELECTOR; /// @@ -153,19 +153,19 @@ typedef struct { // // Specifies the type of the BSS. // - EFI_80211_BSS_TYPE BSSType; + EFI_80211_BSS_TYPE BSSType; // // Specifies the SSID of the BSS. // - EFI_80211_SSID SSId; + EFI_80211_SSID SSId; // // Pointer to the AKM suites supported in the wireless network. // - EFI_80211_AKM_SUITE_SELECTOR *AKMSuite; + EFI_80211_AKM_SUITE_SELECTOR *AKMSuite; // // Pointer to the cipher suites supported in the wireless network. // - EFI_80211_CIPHER_SUITE_SELECTOR *CipherSuite; + EFI_80211_CIPHER_SUITE_SELECTOR *CipherSuite; } EFI_80211_NETWORK; /// @@ -175,12 +175,12 @@ typedef struct { // // Specifies the found wireless network. // - EFI_80211_NETWORK Network; + EFI_80211_NETWORK Network; // // Indicates the network quality as a value between 0 to 100, where 100 // indicates the highest network quality. // - UINT8 NetworkQuality; + UINT8 NetworkQuality; } EFI_80211_NETWORK_DESCRIPTION; /// @@ -191,12 +191,12 @@ typedef struct { // The number of EFI_80211_NETWORK_DESCRIPTION in NetworkDesc. If zero, // NetworkDesc should be ignored. // - UINT8 NumOfNetworkDesc; + UINT8 NumOfNetworkDesc; // // The NetworkDesc is a pointer to an array of EFI_80211_NETWORK_DESCRIPTION // instances. It is caller's responsibility to free this buffer. // - EFI_80211_NETWORK_DESCRIPTION NetworkDesc[1]; + EFI_80211_NETWORK_DESCRIPTION NetworkDesc[1]; } EFI_80211_GET_NETWORKS_RESULT; /// @@ -209,7 +209,7 @@ typedef struct { // Wireless MAC Connection Protocol II driver. The type of Event must be // EFI_NOTIFY_SIGNAL. // - EFI_EVENT Event; + EFI_EVENT Event; // // Will be set to one of the following values: // EFI_SUCCESS: The operation completed successfully. @@ -219,16 +219,16 @@ typedef struct { // hardware or software state. // EFI_NOT_READY: The operation is started but not yet completed. // - EFI_STATUS Status; + EFI_STATUS Status; // // Pointer to the input data for getting networks. // - EFI_80211_GET_NETWORKS_DATA *Data; + EFI_80211_GET_NETWORKS_DATA *Data; // // Indicates the scan result. It is caller's responsibility to free this // buffer. // - EFI_80211_GET_NETWORKS_RESULT *Result; + EFI_80211_GET_NETWORKS_RESULT *Result; } EFI_80211_GET_NETWORKS_TOKEN; /// @@ -238,14 +238,14 @@ typedef struct { // // Specifies the wireless network to connect to. // - EFI_80211_NETWORK *Network; + EFI_80211_NETWORK *Network; // // Specifies a time limit in seconds that is optionally present, after which // the connection establishment procedure is terminated by the UNDI driver. // This is an optional parameter and may be 0. Values of 5 seconds or higher // are recommended. // - UINT32 FailureTimeout; + UINT32 FailureTimeout; } EFI_80211_CONNECT_NETWORK_DATA; /// @@ -258,7 +258,7 @@ typedef struct { // Wireless MAC Connection Protocol II driver. The type of Event must be // EFI_NOTIFY_SIGNAL. // - EFI_EVENT Event; + EFI_EVENT Event; // // Will be set to one of the following values: // EFI_SUCCESS: The operation completed successfully. @@ -267,15 +267,15 @@ typedef struct { // hardware or software state. // EFI_NOT_READY: The operation is started but not yet completed. // - EFI_STATUS Status; + EFI_STATUS Status; // // Pointer to the connection data. // - EFI_80211_CONNECT_NETWORK_DATA *Data; + EFI_80211_CONNECT_NETWORK_DATA *Data; // // Indicates the connection state. // - EFI_80211_CONNECT_NETWORK_RESULT_CODE ResultCode; + EFI_80211_CONNECT_NETWORK_RESULT_CODE ResultCode; } EFI_80211_CONNECT_NETWORK_TOKEN; /// @@ -288,7 +288,7 @@ typedef struct { // Wireless MAC Connection Protocol II driver. The type of Event must be // EFI_NOTIFY_SIGNAL. // - EFI_EVENT Event; + EFI_EVENT Event; // // Will be set to one of the following values: // EFI_SUCCESS: The operation completed successfully @@ -296,7 +296,7 @@ typedef struct { // EFI_ACCESS_DENIED: The operation is not completed due to some underlying // hardware or software state. // - EFI_STATUS Status; + EFI_STATUS Status; } EFI_80211_DISCONNECT_NETWORK_TOKEN; /** @@ -325,7 +325,7 @@ typedef struct { **/ typedef EFI_STATUS -(EFIAPI *EFI_WIRELESS_MAC_CONNECTION_II_GET_NETWORKS) ( +(EFIAPI *EFI_WIRELESS_MAC_CONNECTION_II_GET_NETWORKS)( IN EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL *This, IN EFI_80211_GET_NETWORKS_TOKEN *Token ); @@ -356,7 +356,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_WIRELESS_MAC_CONNECTION_II_CONNECT_NETWORK) ( +(EFIAPI *EFI_WIRELESS_MAC_CONNECTION_II_CONNECT_NETWORK)( IN EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL *This, IN EFI_80211_CONNECT_NETWORK_TOKEN *Token ); @@ -385,7 +385,7 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_WIRELESS_MAC_CONNECTION_II_DISCONNECT_NETWORK) ( +(EFIAPI *EFI_WIRELESS_MAC_CONNECTION_II_DISCONNECT_NETWORK)( IN EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL *This, IN EFI_80211_DISCONNECT_NETWORK_TOKEN *Token ); @@ -397,11 +397,11 @@ EFI_STATUS /// network. /// struct _EFI_WIRELESS_MAC_CONNECTION_II_PROTOCOL { - EFI_WIRELESS_MAC_CONNECTION_II_GET_NETWORKS GetNetworks; - EFI_WIRELESS_MAC_CONNECTION_II_CONNECT_NETWORK ConnectNetwork; - EFI_WIRELESS_MAC_CONNECTION_II_DISCONNECT_NETWORK DisconnectNetwork; + EFI_WIRELESS_MAC_CONNECTION_II_GET_NETWORKS GetNetworks; + EFI_WIRELESS_MAC_CONNECTION_II_CONNECT_NETWORK ConnectNetwork; + EFI_WIRELESS_MAC_CONNECTION_II_DISCONNECT_NETWORK DisconnectNetwork; }; -extern EFI_GUID gEfiWiFi2ProtocolGuid; +extern EFI_GUID gEfiWiFi2ProtocolGuid; #endif diff --git a/MdePkg/Include/Register/Amd/Cpuid.h b/MdePkg/Include/Register/Amd/Cpuid.h index 8e91e84..44394fc 100644 --- a/MdePkg/Include/Register/Amd/Cpuid.h +++ b/MdePkg/Include/Register/Amd/Cpuid.h @@ -42,7 +42,6 @@ CPUID Signature Information /// @} /// - /** CPUID Extended Processor Signature and Features @@ -70,36 +69,36 @@ typedef union { /// /// [Bits 3:0] Stepping. /// - UINT32 Stepping:4; + UINT32 Stepping : 4; /// /// [Bits 7:4] Base Model. /// - UINT32 BaseModel:4; + UINT32 BaseModel : 4; /// /// [Bits 11:8] Base Family. /// - UINT32 BaseFamily:4; + UINT32 BaseFamily : 4; /// /// [Bit 15:12] Reserved. /// - UINT32 Reserved1:4; + UINT32 Reserved1 : 4; /// /// [Bits 19:16] Extended Model. /// - UINT32 ExtModel:4; + UINT32 ExtModel : 4; /// /// [Bits 27:20] Extended Family. /// - UINT32 ExtFamily:8; + UINT32 ExtFamily : 8; /// /// [Bit 31:28] Reserved. /// - UINT32 Reserved2:4; + UINT32 Reserved2 : 4; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_AMD_EXTENDED_CPU_SIG_EAX; /** @@ -114,16 +113,16 @@ typedef union { /// /// [Bits 27:0] Reserved. /// - UINT32 Reserved:28; + UINT32 Reserved : 28; /// /// [Bit 31:28] Package Type. /// - UINT32 PkgType:4; + UINT32 PkgType : 4; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_AMD_EXTENDED_CPU_SIG_EBX; /** @@ -138,116 +137,116 @@ typedef union { /// /// [Bit 0] LAHF/SAHF available in 64-bit mode. /// - UINT32 LAHF_SAHF:1; + UINT32 LAHF_SAHF : 1; /// /// [Bit 1] Core multi-processing legacy mode. /// - UINT32 CmpLegacy:1; + UINT32 CmpLegacy : 1; /// /// [Bit 2] Secure Virtual Mode feature. /// - UINT32 SVM:1; + UINT32 SVM : 1; /// /// [Bit 3] Extended APIC register space. /// - UINT32 ExtApicSpace:1; + UINT32 ExtApicSpace : 1; /// /// [Bit 4] LOCK MOV CR0 means MOV CR8. /// - UINT32 AltMovCr8:1; + UINT32 AltMovCr8 : 1; /// /// [Bit 5] LZCNT instruction support. /// - UINT32 LZCNT:1; + UINT32 LZCNT : 1; /// /// [Bit 6] SSE4A instruction support. /// - UINT32 SSE4A:1; + UINT32 SSE4A : 1; /// /// [Bit 7] Misaligned SSE Mode. /// - UINT32 MisAlignSse:1; + UINT32 MisAlignSse : 1; /// /// [Bit 8] ThreeDNow Prefetch instructions. /// - UINT32 PREFETCHW:1; + UINT32 PREFETCHW : 1; /// /// [Bit 9] OS Visible Work-around support. /// - UINT32 OSVW:1; + UINT32 OSVW : 1; /// /// [Bit 10] Instruction Based Sampling. /// - UINT32 IBS:1; + UINT32 IBS : 1; /// /// [Bit 11] Extended Operation Support. /// - UINT32 XOP:1; + UINT32 XOP : 1; /// /// [Bit 12] SKINIT and STGI support. /// - UINT32 SKINIT:1; + UINT32 SKINIT : 1; /// /// [Bit 13] Watchdog Timer support. /// - UINT32 WDT:1; + UINT32 WDT : 1; /// /// [Bit 14] Reserved. /// - UINT32 Reserved1:1; + UINT32 Reserved1 : 1; /// /// [Bit 15] Lightweight Profiling support. /// - UINT32 LWP:1; + UINT32 LWP : 1; /// /// [Bit 16] 4-Operand FMA instruction support. /// - UINT32 FMA4:1; + UINT32 FMA4 : 1; /// /// [Bit 17] Translation Cache Extension. /// - UINT32 TCE:1; + UINT32 TCE : 1; /// /// [Bit 21:18] Reserved. /// - UINT32 Reserved2:4; + UINT32 Reserved2 : 4; /// /// [Bit 22] Topology Extensions support. /// - UINT32 TopologyExtensions:1; + UINT32 TopologyExtensions : 1; /// /// [Bit 23] Core Performance Counter Extensions. /// - UINT32 PerfCtrExtCore:1; + UINT32 PerfCtrExtCore : 1; /// /// [Bit 25:24] Reserved. /// - UINT32 Reserved3:2; + UINT32 Reserved3 : 2; /// /// [Bit 26] Data Breakpoint Extension. /// - UINT32 DataBreakpointExtension:1; + UINT32 DataBreakpointExtension : 1; /// /// [Bit 27] Performance Time-Stamp Counter. /// - UINT32 PerfTsc:1; + UINT32 PerfTsc : 1; /// /// [Bit 28] L3 Performance Counter Extensions. /// - UINT32 PerfCtrExtL3:1; + UINT32 PerfCtrExtL3 : 1; /// /// [Bit 29] MWAITX and MONITORX capability. /// - UINT32 MwaitExtended:1; + UINT32 MwaitExtended : 1; /// /// [Bit 31:30] Reserved. /// - UINT32 Reserved4:2; + UINT32 Reserved4 : 2; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_AMD_EXTENDED_CPU_SIG_ECX; /** @@ -262,135 +261,134 @@ typedef union { /// /// [Bit 0] x87 floating point unit on-chip. /// - UINT32 FPU:1; + UINT32 FPU : 1; /// /// [Bit 1] Virtual-mode enhancements. /// - UINT32 VME:1; + UINT32 VME : 1; /// /// [Bit 2] Debugging extensions, IO breakpoints, CR4.DE. /// - UINT32 DE:1; + UINT32 DE : 1; /// /// [Bit 3] Page-size extensions (4 MB pages). /// - UINT32 PSE:1; + UINT32 PSE : 1; /// /// [Bit 4] Time stamp counter, RDTSC/RDTSCP instructions, CR4.TSD. /// - UINT32 TSC:1; + UINT32 TSC : 1; /// /// [Bit 5] MSRs, with RDMSR and WRMSR instructions. /// - UINT32 MSR:1; + UINT32 MSR : 1; /// /// [Bit 6] Physical-address extensions (PAE). /// - UINT32 PAE:1; + UINT32 PAE : 1; /// /// [Bit 7] Machine check exception, CR4.MCE. /// - UINT32 MCE:1; + UINT32 MCE : 1; /// /// [Bit 8] CMPXCHG8B instruction. /// - UINT32 CMPXCHG8B:1; + UINT32 CMPXCHG8B : 1; /// /// [Bit 9] APIC exists and is enabled. /// - UINT32 APIC:1; + UINT32 APIC : 1; /// /// [Bit 10] Reserved. /// - UINT32 Reserved1:1; + UINT32 Reserved1 : 1; /// /// [Bit 11] SYSCALL and SYSRET instructions. /// - UINT32 SYSCALL_SYSRET:1; + UINT32 SYSCALL_SYSRET : 1; /// /// [Bit 12] Memory-type range registers. /// - UINT32 MTRR:1; + UINT32 MTRR : 1; /// /// [Bit 13] Page global extension, CR4.PGE. /// - UINT32 PGE:1; + UINT32 PGE : 1; /// /// [Bit 14] Machine check architecture, MCG_CAP. /// - UINT32 MCA:1; + UINT32 MCA : 1; /// /// [Bit 15] Conditional move instructions, CMOV, FCOMI, FCMOV. /// - UINT32 CMOV:1; + UINT32 CMOV : 1; /// /// [Bit 16] Page attribute table. /// - UINT32 PAT:1; + UINT32 PAT : 1; /// /// [Bit 17] Page-size extensions. /// - UINT32 PSE36 : 1; + UINT32 PSE36 : 1; /// /// [Bit 19:18] Reserved. /// - UINT32 Reserved2:2; + UINT32 Reserved2 : 2; /// /// [Bit 20] No-execute page protection. /// - UINT32 NX:1; + UINT32 NX : 1; /// /// [Bit 21] Reserved. /// - UINT32 Reserved3:1; + UINT32 Reserved3 : 1; /// /// [Bit 22] AMD Extensions to MMX instructions. /// - UINT32 MmxExt:1; + UINT32 MmxExt : 1; /// /// [Bit 23] MMX instructions. /// - UINT32 MMX:1; + UINT32 MMX : 1; /// /// [Bit 24] FXSAVE and FXRSTOR instructions. /// - UINT32 FFSR:1; + UINT32 FFSR : 1; /// /// [Bit 25] FXSAVE and FXRSTOR instruction optimizations. /// - UINT32 FFXSR:1; + UINT32 FFXSR : 1; /// /// [Bit 26] 1-GByte large page support. /// - UINT32 Page1GB:1; + UINT32 Page1GB : 1; /// /// [Bit 27] RDTSCP instructions. /// - UINT32 RDTSCP:1; + UINT32 RDTSCP : 1; /// /// [Bit 28] Reserved. /// - UINT32 Reserved4:1; + UINT32 Reserved4 : 1; /// /// [Bit 29] Long Mode. /// - UINT32 LM:1; + UINT32 LM : 1; /// /// [Bit 30] 3DNow! instructions. /// - UINT32 ThreeDNow:1; + UINT32 ThreeDNow : 1; /// /// [Bit 31] AMD Extensions to 3DNow! instructions. /// - UINT32 ThreeDNowExt:1; + UINT32 ThreeDNowExt : 1; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_AMD_EXTENDED_CPU_SIG_EDX; - /** CPUID Linear Physical Address Size @@ -417,24 +415,24 @@ typedef union { /// /// [Bits 7:0] Maximum physical byte address size in bits. /// - UINT32 PhysicalAddressBits:8; + UINT32 PhysicalAddressBits : 8; /// /// [Bits 15:8] Maximum linear byte address size in bits. /// - UINT32 LinearAddressBits:8; + UINT32 LinearAddressBits : 8; /// /// [Bits 23:16] Maximum guest physical byte address size in bits. /// - UINT32 GuestPhysAddrSize:8; + UINT32 GuestPhysAddrSize : 8; /// /// [Bit 31:24] Reserved. /// - UINT32 Reserved:8; + UINT32 Reserved : 8; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_AMD_VIR_PHY_ADDRESS_SIZE_EAX; /** @@ -449,24 +447,24 @@ typedef union { /// /// [Bits 0] Clear Zero Instruction. /// - UINT32 CLZERO:1; + UINT32 CLZERO : 1; /// /// [Bits 1] Instructions retired count support. /// - UINT32 IRPerf:1; + UINT32 IRPerf : 1; /// /// [Bits 2] Restore error pointers for XSave instructions. /// - UINT32 XSaveErPtr:1; + UINT32 XSaveErPtr : 1; /// /// [Bit 31:3] Reserved. /// - UINT32 Reserved:29; + UINT32 Reserved : 29; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_AMD_VIR_PHY_ADDRESS_SIZE_EBX; /** @@ -481,31 +479,30 @@ typedef union { /// /// [Bits 7:0] Number of threads - 1. /// - UINT32 NC:8; + UINT32 NC : 8; /// /// [Bit 11:8] Reserved. /// - UINT32 Reserved1:4; + UINT32 Reserved1 : 4; /// /// [Bits 15:12] APIC ID size. /// - UINT32 ApicIdCoreIdSize:4; + UINT32 ApicIdCoreIdSize : 4; /// /// [Bits 17:16] Performance time-stamp counter size. /// - UINT32 PerfTscSize:2; + UINT32 PerfTscSize : 2; /// /// [Bit 31:18] Reserved. /// - UINT32 Reserved2:14; + UINT32 Reserved2 : 14; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_AMD_VIR_PHY_ADDRESS_SIZE_ECX; - /** CPUID AMD Processor Topology @@ -519,7 +516,7 @@ typedef union { CPUID_AMD_PROCESSOR_TOPOLOGY_ECX. @retval EDX Reserved. **/ -#define CPUID_AMD_PROCESSOR_TOPOLOGY 0x8000001E +#define CPUID_AMD_PROCESSOR_TOPOLOGY 0x8000001E /** CPUID AMD Processor Topology EAX for CPUID leaf @@ -533,12 +530,12 @@ typedef union { /// /// [Bit 31:0] Extended APIC Id. /// - UINT32 ExtendedApicId; + UINT32 ExtendedApicId; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_AMD_PROCESSOR_TOPOLOGY_EAX; /** @@ -553,20 +550,20 @@ typedef union { /// /// [Bits 7:0] Core Id. /// - UINT32 CoreId:8; + UINT32 CoreId : 8; /// /// [Bits 15:8] Threads per core. /// - UINT32 ThreadsPerCore:8; + UINT32 ThreadsPerCore : 8; /// /// [Bit 31:16] Reserved. /// - UINT32 Reserved:16; + UINT32 Reserved : 16; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_AMD_PROCESSOR_TOPOLOGY_EBX; /** @@ -581,23 +578,22 @@ typedef union { /// /// [Bits 7:0] Node Id. /// - UINT32 NodeId:8; + UINT32 NodeId : 8; /// /// [Bits 10:8] Nodes per processor. /// - UINT32 NodesPerProcessor:3; + UINT32 NodesPerProcessor : 3; /// /// [Bit 31:11] Reserved. /// - UINT32 Reserved:21; + UINT32 Reserved : 21; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_AMD_PROCESSOR_TOPOLOGY_ECX; - /** CPUID Memory Encryption Information @@ -621,7 +617,7 @@ typedef union { @endcode **/ -#define CPUID_MEMORY_ENCRYPTION_INFO 0x8000001F +#define CPUID_MEMORY_ENCRYPTION_INFO 0x8000001F /** CPUID Memory Encryption support information EAX for CPUID leaf @@ -635,32 +631,32 @@ typedef union { /// /// [Bit 0] Secure Memory Encryption (Sme) Support /// - UINT32 SmeBit:1; + UINT32 SmeBit : 1; /// /// [Bit 1] Secure Encrypted Virtualization (Sev) Support /// - UINT32 SevBit:1; + UINT32 SevBit : 1; /// /// [Bit 2] Page flush MSR support /// - UINT32 PageFlushMsrBit:1; + UINT32 PageFlushMsrBit : 1; /// /// [Bit 3] Encrypted state support /// - UINT32 SevEsBit:1; + UINT32 SevEsBit : 1; /// /// [Bit 31:4] Reserved /// - UINT32 ReservedBits:28; + UINT32 ReservedBits : 28; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_MEMORY_ENCRYPTION_INFO_EAX; /** @@ -675,23 +671,23 @@ typedef union { /// /// [Bit 5:0] Page table bit number used to enable memory encryption /// - UINT32 PtePosBits:6; + UINT32 PtePosBits : 6; /// /// [Bit 11:6] Reduction of system physical address space bits when /// memory encryption is enabled /// - UINT32 ReducedPhysBits:5; + UINT32 ReducedPhysBits : 5; /// /// [Bit 31:12] Reserved /// - UINT32 ReservedBits:21; + UINT32 ReservedBits : 21; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_MEMORY_ENCRYPTION_INFO_EBX; /** @@ -706,12 +702,12 @@ typedef union { /// /// [Bit 31:0] Number of encrypted guest supported simultaneously /// - UINT32 NumGuests; + UINT32 NumGuests; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_MEMORY_ENCRYPTION_INFO_ECX; /** @@ -726,12 +722,12 @@ typedef union { /// /// [Bit 31:0] Minimum SEV enabled, SEV-ES disabled ASID /// - UINT32 MinAsid; + UINT32 MinAsid; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_MEMORY_ENCRYPTION_INFO_EDX; #endif diff --git a/MdePkg/Include/Register/Amd/Fam17Msr.h b/MdePkg/Include/Register/Amd/Fam17Msr.h index 6201485..bb4e143 100644 --- a/MdePkg/Include/Register/Amd/Fam17Msr.h +++ b/MdePkg/Include/Register/Amd/Fam17Msr.h @@ -21,82 +21,82 @@ Secure Encrypted Virtualization - Encrypted State (SEV-ES) GHCB register **/ -#define MSR_SEV_ES_GHCB 0xc0010130 +#define MSR_SEV_ES_GHCB 0xc0010130 /** MSR information returned for #MSR_SEV_ES_GHCB **/ typedef union { struct { - UINT32 Function:12; - UINT32 Reserved1:20; - UINT32 Reserved2:32; + UINT32 Function : 12; + UINT32 Reserved1 : 20; + UINT32 Reserved2 : 32; } GhcbInfo; struct { - UINT8 Reserved[3]; - UINT8 SevEncryptionBitPos; - UINT16 SevEsProtocolMin; - UINT16 SevEsProtocolMax; + UINT8 Reserved[3]; + UINT8 SevEncryptionBitPos; + UINT16 SevEsProtocolMin; + UINT16 SevEsProtocolMax; } GhcbProtocol; struct { - UINT32 Function:12; - UINT32 ReasonCodeSet:4; - UINT32 ReasonCode:8; - UINT32 Reserved1:8; - UINT32 Reserved2:32; + UINT32 Function : 12; + UINT32 ReasonCodeSet : 4; + UINT32 ReasonCode : 8; + UINT32 Reserved1 : 8; + UINT32 Reserved2 : 32; } GhcbTerminate; struct { - UINT64 Function:12; - UINT64 Features:52; + UINT64 Function : 12; + UINT64 Features : 52; } GhcbHypervisorFeatures; struct { - UINT64 Function:12; - UINT64 GuestFrameNumber:52; + UINT64 Function : 12; + UINT64 GuestFrameNumber : 52; } GhcbGpaRegister; struct { - UINT64 Function:12; - UINT64 GuestFrameNumber:40; - UINT64 Operation:4; - UINT64 Reserved:8; + UINT64 Function : 12; + UINT64 GuestFrameNumber : 40; + UINT64 Operation : 4; + UINT64 Reserved : 8; } SnpPageStateChangeRequest; struct { - UINT32 Function:12; - UINT32 Reserved:20; - UINT32 ErrorCode; + UINT32 Function : 12; + UINT32 Reserved : 20; + UINT32 ErrorCode; } SnpPageStateChangeResponse; - VOID *Ghcb; + VOID *Ghcb; - UINT64 GhcbPhysicalAddress; + UINT64 GhcbPhysicalAddress; } MSR_SEV_ES_GHCB_REGISTER; -#define GHCB_INFO_SEV_INFO 1 -#define GHCB_INFO_SEV_INFO_GET 2 -#define GHCB_INFO_CPUID_REQUEST 4 -#define GHCB_INFO_CPUID_RESPONSE 5 -#define GHCB_INFO_GHCB_GPA_REGISTER_REQUEST 18 -#define GHCB_INFO_GHCB_GPA_REGISTER_RESPONSE 19 -#define GHCB_INFO_SNP_PAGE_STATE_CHANGE_REQUEST 20 -#define GHCB_INFO_SNP_PAGE_STATE_CHANGE_RESPONSE 21 -#define GHCB_HYPERVISOR_FEATURES_REQUEST 128 -#define GHCB_HYPERVISOR_FEATURES_RESPONSE 129 -#define GHCB_INFO_TERMINATE_REQUEST 256 - -#define GHCB_TERMINATE_GHCB 0 -#define GHCB_TERMINATE_GHCB_GENERAL 0 -#define GHCB_TERMINATE_GHCB_PROTOCOL 1 +#define GHCB_INFO_SEV_INFO 1 +#define GHCB_INFO_SEV_INFO_GET 2 +#define GHCB_INFO_CPUID_REQUEST 4 +#define GHCB_INFO_CPUID_RESPONSE 5 +#define GHCB_INFO_GHCB_GPA_REGISTER_REQUEST 18 +#define GHCB_INFO_GHCB_GPA_REGISTER_RESPONSE 19 +#define GHCB_INFO_SNP_PAGE_STATE_CHANGE_REQUEST 20 +#define GHCB_INFO_SNP_PAGE_STATE_CHANGE_RESPONSE 21 +#define GHCB_HYPERVISOR_FEATURES_REQUEST 128 +#define GHCB_HYPERVISOR_FEATURES_RESPONSE 129 +#define GHCB_INFO_TERMINATE_REQUEST 256 + +#define GHCB_TERMINATE_GHCB 0 +#define GHCB_TERMINATE_GHCB_GENERAL 0 +#define GHCB_TERMINATE_GHCB_PROTOCOL 1 /** Secure Encrypted Virtualization (SEV) status register **/ -#define MSR_SEV_STATUS 0xc0010131 +#define MSR_SEV_STATUS 0xc0010131 /** MSR information returned for #MSR_SEV_STATUS @@ -109,28 +109,28 @@ typedef union { /// /// [Bit 0] Secure Encrypted Virtualization (Sev) is enabled /// - UINT32 SevBit:1; + UINT32 SevBit : 1; /// /// [Bit 1] Secure Encrypted Virtualization Encrypted State (SevEs) is enabled /// - UINT32 SevEsBit:1; + UINT32 SevEsBit : 1; /// /// [Bit 2] Secure Nested Paging (SevSnp) is enabled /// - UINT32 SevSnpBit:1; + UINT32 SevSnpBit : 1; - UINT32 Reserved2:29; + UINT32 Reserved2 : 29; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SEV_STATUS_REGISTER; #endif diff --git a/MdePkg/Include/Register/Amd/Ghcb.h b/MdePkg/Include/Register/Amd/Ghcb.h index 8c5f46e..e7626a2 100644 --- a/MdePkg/Include/Register/Amd/Ghcb.h +++ b/MdePkg/Include/Register/Amd/Ghcb.h @@ -20,69 +20,69 @@ #include #define UD_EXCEPTION 6 -#define GP_EXCEPTION 13 -#define VC_EXCEPTION 29 +#define GP_EXCEPTION 13 +#define VC_EXCEPTION 29 -#define GHCB_VERSION_MIN 1 -#define GHCB_VERSION_MAX 1 +#define GHCB_VERSION_MIN 1 +#define GHCB_VERSION_MAX 1 #define GHCB_STANDARD_USAGE 0 // // SVM Exit Codes // -#define SVM_EXIT_DR7_READ 0x27ULL -#define SVM_EXIT_DR7_WRITE 0x37ULL -#define SVM_EXIT_RDTSC 0x6EULL -#define SVM_EXIT_RDPMC 0x6FULL -#define SVM_EXIT_CPUID 0x72ULL -#define SVM_EXIT_INVD 0x76ULL -#define SVM_EXIT_IOIO_PROT 0x7BULL -#define SVM_EXIT_MSR 0x7CULL -#define SVM_EXIT_VMMCALL 0x81ULL -#define SVM_EXIT_RDTSCP 0x87ULL -#define SVM_EXIT_WBINVD 0x89ULL -#define SVM_EXIT_MONITOR 0x8AULL -#define SVM_EXIT_MWAIT 0x8BULL -#define SVM_EXIT_NPF 0x400ULL +#define SVM_EXIT_DR7_READ 0x27ULL +#define SVM_EXIT_DR7_WRITE 0x37ULL +#define SVM_EXIT_RDTSC 0x6EULL +#define SVM_EXIT_RDPMC 0x6FULL +#define SVM_EXIT_CPUID 0x72ULL +#define SVM_EXIT_INVD 0x76ULL +#define SVM_EXIT_IOIO_PROT 0x7BULL +#define SVM_EXIT_MSR 0x7CULL +#define SVM_EXIT_VMMCALL 0x81ULL +#define SVM_EXIT_RDTSCP 0x87ULL +#define SVM_EXIT_WBINVD 0x89ULL +#define SVM_EXIT_MONITOR 0x8AULL +#define SVM_EXIT_MWAIT 0x8BULL +#define SVM_EXIT_NPF 0x400ULL // // VMG Special Exit Codes // -#define SVM_EXIT_MMIO_READ 0x80000001ULL -#define SVM_EXIT_MMIO_WRITE 0x80000002ULL -#define SVM_EXIT_NMI_COMPLETE 0x80000003ULL -#define SVM_EXIT_AP_RESET_HOLD 0x80000004ULL -#define SVM_EXIT_AP_JUMP_TABLE 0x80000005ULL -#define SVM_EXIT_SNP_PAGE_STATE_CHANGE 0x80000010ULL -#define SVM_EXIT_SNP_AP_CREATION 0x80000013ULL -#define SVM_EXIT_HYPERVISOR_FEATURES 0x8000FFFDULL -#define SVM_EXIT_UNSUPPORTED 0x8000FFFFULL +#define SVM_EXIT_MMIO_READ 0x80000001ULL +#define SVM_EXIT_MMIO_WRITE 0x80000002ULL +#define SVM_EXIT_NMI_COMPLETE 0x80000003ULL +#define SVM_EXIT_AP_RESET_HOLD 0x80000004ULL +#define SVM_EXIT_AP_JUMP_TABLE 0x80000005ULL +#define SVM_EXIT_SNP_PAGE_STATE_CHANGE 0x80000010ULL +#define SVM_EXIT_SNP_AP_CREATION 0x80000013ULL +#define SVM_EXIT_HYPERVISOR_FEATURES 0x8000FFFDULL +#define SVM_EXIT_UNSUPPORTED 0x8000FFFFULL // // IOIO Exit Information // -#define IOIO_TYPE_STR BIT2 -#define IOIO_TYPE_IN 1 -#define IOIO_TYPE_INS (IOIO_TYPE_IN | IOIO_TYPE_STR) -#define IOIO_TYPE_OUT 0 -#define IOIO_TYPE_OUTS (IOIO_TYPE_OUT | IOIO_TYPE_STR) - -#define IOIO_REP BIT3 - -#define IOIO_ADDR_64 BIT9 -#define IOIO_ADDR_32 BIT8 -#define IOIO_ADDR_16 BIT7 - -#define IOIO_DATA_32 BIT6 -#define IOIO_DATA_16 BIT5 -#define IOIO_DATA_8 BIT4 -#define IOIO_DATA_MASK (BIT6 | BIT5 | BIT4) -#define IOIO_DATA_OFFSET 4 +#define IOIO_TYPE_STR BIT2 +#define IOIO_TYPE_IN 1 +#define IOIO_TYPE_INS (IOIO_TYPE_IN | IOIO_TYPE_STR) +#define IOIO_TYPE_OUT 0 +#define IOIO_TYPE_OUTS (IOIO_TYPE_OUT | IOIO_TYPE_STR) + +#define IOIO_REP BIT3 + +#define IOIO_ADDR_64 BIT9 +#define IOIO_ADDR_32 BIT8 +#define IOIO_ADDR_16 BIT7 + +#define IOIO_DATA_32 BIT6 +#define IOIO_DATA_16 BIT5 +#define IOIO_DATA_8 BIT4 +#define IOIO_DATA_MASK (BIT6 | BIT5 | BIT4) +#define IOIO_DATA_OFFSET 4 #define IOIO_DATA_BYTES(x) (((x) & IOIO_DATA_MASK) >> IOIO_DATA_OFFSET) -#define IOIO_SEG_ES 0 -#define IOIO_SEG_DS (BIT11 | BIT10) +#define IOIO_SEG_ES 0 +#define IOIO_SEG_DS (BIT11 | BIT10) // // AP Creation Information @@ -92,54 +92,54 @@ #define SVM_VMGEXIT_SNP_AP_DESTROY 2 typedef PACKED struct { - UINT8 Reserved1[203]; - UINT8 Cpl; - UINT8 Reserved8[300]; - UINT64 Rax; - UINT8 Reserved4[264]; - UINT64 Rcx; - UINT64 Rdx; - UINT64 Rbx; - UINT8 Reserved5[112]; - UINT64 SwExitCode; - UINT64 SwExitInfo1; - UINT64 SwExitInfo2; - UINT64 SwScratch; - UINT8 Reserved6[56]; - UINT64 XCr0; - UINT8 ValidBitmap[16]; - UINT64 X87StateGpa; - UINT8 Reserved7[1016]; + UINT8 Reserved1[203]; + UINT8 Cpl; + UINT8 Reserved8[300]; + UINT64 Rax; + UINT8 Reserved4[264]; + UINT64 Rcx; + UINT64 Rdx; + UINT64 Rbx; + UINT8 Reserved5[112]; + UINT64 SwExitCode; + UINT64 SwExitInfo1; + UINT64 SwExitInfo2; + UINT64 SwScratch; + UINT8 Reserved6[56]; + UINT64 XCr0; + UINT8 ValidBitmap[16]; + UINT64 X87StateGpa; + UINT8 Reserved7[1016]; } GHCB_SAVE_AREA; typedef PACKED struct { - GHCB_SAVE_AREA SaveArea; - UINT8 SharedBuffer[2032]; - UINT8 Reserved1[10]; - UINT16 ProtocolVersion; - UINT32 GhcbUsage; + GHCB_SAVE_AREA SaveArea; + UINT8 SharedBuffer[2032]; + UINT8 Reserved1[10]; + UINT16 ProtocolVersion; + UINT32 GhcbUsage; } GHCB; #define GHCB_SAVE_AREA_QWORD_OFFSET(RegisterField) \ (OFFSET_OF (GHCB, SaveArea.RegisterField) / sizeof (UINT64)) typedef enum { - GhcbCpl = GHCB_SAVE_AREA_QWORD_OFFSET (Cpl), - GhcbRax = GHCB_SAVE_AREA_QWORD_OFFSET (Rax), - GhcbRbx = GHCB_SAVE_AREA_QWORD_OFFSET (Rbx), - GhcbRcx = GHCB_SAVE_AREA_QWORD_OFFSET (Rcx), - GhcbRdx = GHCB_SAVE_AREA_QWORD_OFFSET (Rdx), - GhcbXCr0 = GHCB_SAVE_AREA_QWORD_OFFSET (XCr0), - GhcbSwExitCode = GHCB_SAVE_AREA_QWORD_OFFSET (SwExitCode), - GhcbSwExitInfo1 = GHCB_SAVE_AREA_QWORD_OFFSET (SwExitInfo1), - GhcbSwExitInfo2 = GHCB_SAVE_AREA_QWORD_OFFSET (SwExitInfo2), - GhcbSwScratch = GHCB_SAVE_AREA_QWORD_OFFSET (SwScratch), + GhcbCpl = GHCB_SAVE_AREA_QWORD_OFFSET (Cpl), + GhcbRax = GHCB_SAVE_AREA_QWORD_OFFSET (Rax), + GhcbRbx = GHCB_SAVE_AREA_QWORD_OFFSET (Rbx), + GhcbRcx = GHCB_SAVE_AREA_QWORD_OFFSET (Rcx), + GhcbRdx = GHCB_SAVE_AREA_QWORD_OFFSET (Rdx), + GhcbXCr0 = GHCB_SAVE_AREA_QWORD_OFFSET (XCr0), + GhcbSwExitCode = GHCB_SAVE_AREA_QWORD_OFFSET (SwExitCode), + GhcbSwExitInfo1 = GHCB_SAVE_AREA_QWORD_OFFSET (SwExitInfo1), + GhcbSwExitInfo2 = GHCB_SAVE_AREA_QWORD_OFFSET (SwExitInfo2), + GhcbSwScratch = GHCB_SAVE_AREA_QWORD_OFFSET (SwScratch), } GHCB_REGISTER; typedef union { struct { - UINT32 Lower32Bits; - UINT32 Upper32Bits; + UINT32 Lower32Bits; + UINT32 Upper32Bits; } Elements; UINT64 Uint64; @@ -147,12 +147,12 @@ typedef union { typedef union { struct { - UINT32 Vector:8; - UINT32 Type:3; - UINT32 ErrorCodeValid:1; - UINT32 Rsvd:19; - UINT32 Valid:1; - UINT32 ErrorCode; + UINT32 Vector : 8; + UINT32 Type : 3; + UINT32 ErrorCodeValid : 1; + UINT32 Rsvd : 19; + UINT32 Valid : 1; + UINT32 ErrorCode; } Elements; UINT64 Uint64; @@ -166,40 +166,40 @@ typedef union { // // Hypervisor features // -#define GHCB_HV_FEATURES_SNP BIT0 -#define GHCB_HV_FEATURES_SNP_AP_CREATE (GHCB_HV_FEATURES_SNP | BIT1) -#define GHCB_HV_FEATURES_SNP_RESTRICTED_INJECTION (GHCB_HV_FEATURES_SNP_AP_CREATE | BIT2) -#define GHCB_HV_FEATURES_SNP_RESTRICTED_INJECTION_TIMER (GHCB_HV_FEATURES_SNP_RESTRICTED_INJECTION | BIT3) +#define GHCB_HV_FEATURES_SNP BIT0 +#define GHCB_HV_FEATURES_SNP_AP_CREATE (GHCB_HV_FEATURES_SNP | BIT1) +#define GHCB_HV_FEATURES_SNP_RESTRICTED_INJECTION (GHCB_HV_FEATURES_SNP_AP_CREATE | BIT2) +#define GHCB_HV_FEATURES_SNP_RESTRICTED_INJECTION_TIMER (GHCB_HV_FEATURES_SNP_RESTRICTED_INJECTION | BIT3) // // SNP Page State Change. // // Note that the PSMASH and UNSMASH operations are not supported when using the MSR protocol. // -#define SNP_PAGE_STATE_PRIVATE 1 -#define SNP_PAGE_STATE_SHARED 2 -#define SNP_PAGE_STATE_PSMASH 3 -#define SNP_PAGE_STATE_UNSMASH 4 +#define SNP_PAGE_STATE_PRIVATE 1 +#define SNP_PAGE_STATE_SHARED 2 +#define SNP_PAGE_STATE_PSMASH 3 +#define SNP_PAGE_STATE_UNSMASH 4 typedef struct { - UINT64 CurrentPage:12; - UINT64 GuestFrameNumber:40; - UINT64 Operation:4; - UINT64 PageSize:1; - UINT64 Reserved:7; + UINT64 CurrentPage : 12; + UINT64 GuestFrameNumber : 40; + UINT64 Operation : 4; + UINT64 PageSize : 1; + UINT64 Reserved : 7; } SNP_PAGE_STATE_ENTRY; typedef struct { - UINT16 CurrentEntry; - UINT16 EndEntry; - UINT32 Reserved; + UINT16 CurrentEntry; + UINT16 EndEntry; + UINT32 Reserved; } SNP_PAGE_STATE_HEADER; -#define SNP_PAGE_STATE_MAX_ENTRY 253 +#define SNP_PAGE_STATE_MAX_ENTRY 253 typedef struct { - SNP_PAGE_STATE_HEADER Header; - SNP_PAGE_STATE_ENTRY Entry[SNP_PAGE_STATE_MAX_ENTRY]; + SNP_PAGE_STATE_HEADER Header; + SNP_PAGE_STATE_ENTRY Entry[SNP_PAGE_STATE_MAX_ENTRY]; } SNP_PAGE_STATE_CHANGE_INFO; // @@ -217,22 +217,22 @@ typedef struct { #define SEV_ES_RESET_CODE_SEGMENT_TYPE 0xA #define SEV_ES_RESET_DATA_SEGMENT_TYPE 0x2 -#define SEV_ES_RESET_LDT_TYPE 0x2 -#define SEV_ES_RESET_TSS_TYPE 0x3 +#define SEV_ES_RESET_LDT_TYPE 0x2 +#define SEV_ES_RESET_TSS_TYPE 0x3 #pragma pack (1) typedef union { - struct { - UINT16 Type:4; - UINT16 Sbit:1; - UINT16 Dpl:2; - UINT16 Present:1; - UINT16 Avl:1; - UINT16 Reserved1:1; - UINT16 Db:1; - UINT16 Granularity:1; - } Bits; - UINT16 Uint16; + struct { + UINT16 Type : 4; + UINT16 Sbit : 1; + UINT16 Dpl : 2; + UINT16 Present : 1; + UINT16 Avl : 1; + UINT16 Reserved1 : 1; + UINT16 Db : 1; + UINT16 Granularity : 1; + } Bits; + UINT16 Uint16; } SEV_ES_SEGMENT_REGISTER_ATTRIBUTES; typedef struct { @@ -243,39 +243,39 @@ typedef struct { } SEV_ES_SEGMENT_REGISTER; typedef struct { - SEV_ES_SEGMENT_REGISTER Es; - SEV_ES_SEGMENT_REGISTER Cs; - SEV_ES_SEGMENT_REGISTER Ss; - SEV_ES_SEGMENT_REGISTER Ds; - SEV_ES_SEGMENT_REGISTER Fs; - SEV_ES_SEGMENT_REGISTER Gs; - SEV_ES_SEGMENT_REGISTER Gdtr; - SEV_ES_SEGMENT_REGISTER Ldtr; - SEV_ES_SEGMENT_REGISTER Idtr; - SEV_ES_SEGMENT_REGISTER Tr; - UINT8 Reserved1[42]; - UINT8 Vmpl; - UINT8 Reserved2[5]; - UINT64 Efer; - UINT8 Reserved3[112]; - UINT64 Cr4; - UINT8 Reserved4[8]; - UINT64 Cr0; - UINT64 Dr7; - UINT64 Dr6; - UINT64 Rflags; - UINT64 Rip; - UINT8 Reserved5[232]; - UINT64 GPat; - UINT8 Reserved6[320]; - UINT64 SevFeatures; - UINT8 Reserved7[48]; - UINT64 XCr0; - UINT8 Reserved8[24]; - UINT32 Mxcsr; - UINT16 X87Ftw; - UINT8 Reserved9[2]; - UINT16 X87Fcw; + SEV_ES_SEGMENT_REGISTER Es; + SEV_ES_SEGMENT_REGISTER Cs; + SEV_ES_SEGMENT_REGISTER Ss; + SEV_ES_SEGMENT_REGISTER Ds; + SEV_ES_SEGMENT_REGISTER Fs; + SEV_ES_SEGMENT_REGISTER Gs; + SEV_ES_SEGMENT_REGISTER Gdtr; + SEV_ES_SEGMENT_REGISTER Ldtr; + SEV_ES_SEGMENT_REGISTER Idtr; + SEV_ES_SEGMENT_REGISTER Tr; + UINT8 Reserved1[42]; + UINT8 Vmpl; + UINT8 Reserved2[5]; + UINT64 Efer; + UINT8 Reserved3[112]; + UINT64 Cr4; + UINT8 Reserved4[8]; + UINT64 Cr0; + UINT64 Dr7; + UINT64 Dr6; + UINT64 Rflags; + UINT64 Rip; + UINT8 Reserved5[232]; + UINT64 GPat; + UINT8 Reserved6[320]; + UINT64 SevFeatures; + UINT8 Reserved7[48]; + UINT64 XCr0; + UINT8 Reserved8[24]; + UINT32 Mxcsr; + UINT16 X87Ftw; + UINT8 Reserved9[2]; + UINT16 X87Fcw; } SEV_ES_SAVE_AREA; #pragma pack () diff --git a/MdePkg/Include/Register/Intel/ArchitecturalMsr.h b/MdePkg/Include/Register/Intel/ArchitecturalMsr.h index 28e71cf..071a8c6 100644 --- a/MdePkg/Include/Register/Intel/ArchitecturalMsr.h +++ b/MdePkg/Include/Register/Intel/ArchitecturalMsr.h @@ -34,8 +34,7 @@ @endcode @note MSR_IA32_P5_MC_ADDR is defined as IA32_P5_MC_ADDR in SDM. **/ -#define MSR_IA32_P5_MC_ADDR 0x00000000 - +#define MSR_IA32_P5_MC_ADDR 0x00000000 /** See Section 2.22, "MSRs in Pentium Processors.". DF_DM = 05_01H. @@ -53,8 +52,7 @@ @endcode @note MSR_IA32_P5_MC_TYPE is defined as IA32_P5_MC_TYPE in SDM. **/ -#define MSR_IA32_P5_MC_TYPE 0x00000001 - +#define MSR_IA32_P5_MC_TYPE 0x00000001 /** See Section 8.10.5, "Monitor/Mwait Address Range Determination.". Introduced @@ -73,8 +71,7 @@ @endcode @note MSR_IA32_MONITOR_FILTER_SIZE is defined as IA32_MONITOR_FILTER_SIZE in SDM. **/ -#define MSR_IA32_MONITOR_FILTER_SIZE 0x00000006 - +#define MSR_IA32_MONITOR_FILTER_SIZE 0x00000006 /** See Section 17.17, "Time-Stamp Counter.". Introduced at Display Family / @@ -93,8 +90,7 @@ @endcode @note MSR_IA32_TIME_STAMP_COUNTER is defined as IA32_TIME_STAMP_COUNTER in SDM. **/ -#define MSR_IA32_TIME_STAMP_COUNTER 0x00000010 - +#define MSR_IA32_TIME_STAMP_COUNTER 0x00000010 /** Platform ID (RO) The operating system can use this MSR to determine "slot" @@ -115,7 +111,7 @@ @endcode @note MSR_IA32_PLATFORM_ID is defined as IA32_PLATFORM_ID in SDM. **/ -#define MSR_IA32_PLATFORM_ID 0x00000017 +#define MSR_IA32_PLATFORM_ID 0x00000017 /** MSR information returned for MSR index #MSR_IA32_PLATFORM_ID @@ -125,8 +121,8 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:32; - UINT32 Reserved2:18; + UINT32 Reserved1 : 32; + UINT32 Reserved2 : 18; /// /// [Bits 52:50] Platform Id (RO) Contains information concerning the /// intended platform for the processor. @@ -141,16 +137,15 @@ typedef union { /// 1 1 0 Processor Flag 6 /// 1 1 1 Processor Flag 7 /// - UINT32 PlatformId:3; - UINT32 Reserved3:11; + UINT32 PlatformId : 3; + UINT32 Reserved3 : 11; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_PLATFORM_ID_REGISTER; - /** 06_01H. @@ -169,7 +164,7 @@ typedef union { @endcode @note MSR_IA32_APIC_BASE is defined as IA32_APIC_BASE in SDM. **/ -#define MSR_IA32_APIC_BASE 0x0000001B +#define MSR_IA32_APIC_BASE 0x0000001B /** MSR information returned for MSR index #MSR_IA32_APIC_BASE @@ -179,37 +174,36 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:8; + UINT32 Reserved1 : 8; /// /// [Bit 8] BSP flag (R/W). /// - UINT32 BSP:1; - UINT32 Reserved2:1; + UINT32 BSP : 1; + UINT32 Reserved2 : 1; /// /// [Bit 10] Enable x2APIC mode. Introduced at Display Family / Display /// Model 06_1AH. /// - UINT32 EXTD:1; + UINT32 EXTD : 1; /// /// [Bit 11] APIC Global Enable (R/W). /// - UINT32 EN:1; + UINT32 EN : 1; /// /// [Bits 31:12] APIC Base (R/W). /// - UINT32 ApicBase:20; + UINT32 ApicBase : 20; /// /// [Bits 63:32] APIC Base (R/W). /// - UINT32 ApicBaseHi:32; + UINT32 ApicBaseHi : 32; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_APIC_BASE_REGISTER; - /** Control Features in Intel 64 Processor (R/W). If any one enumeration condition for defined bit field holds. @@ -229,7 +223,7 @@ typedef union { @endcode @note MSR_IA32_FEATURE_CONTROL is defined as IA32_FEATURE_CONTROL in SDM. **/ -#define MSR_IA32_FEATURE_CONTROL 0x0000003A +#define MSR_IA32_FEATURE_CONTROL 0x0000003A /** MSR information returned for MSR index #MSR_IA32_FEATURE_CONTROL @@ -250,7 +244,7 @@ typedef union { /// is not deasserted. If any one enumeration condition for defined bit /// field position greater than bit 0 holds. /// - UINT32 Lock:1; + UINT32 Lock : 1; /// /// [Bit 1] Enable VMX inside SMX operation (R/WL): This bit enables a /// system executive to use VMX in conjunction with SMX to support @@ -259,61 +253,60 @@ typedef union { /// flag set (ECX bits 5 and 6 respectively). If CPUID.01H:ECX[5] = 1 && /// CPUID.01H:ECX[6] = 1. /// - UINT32 EnableVmxInsideSmx:1; + UINT32 EnableVmxInsideSmx : 1; /// /// [Bit 2] Enable VMX outside SMX operation (R/WL): This bit enables VMX /// for system executive that do not require SMX. BIOS must set this bit /// only when the CPUID function 1 returns VMX feature flag set (ECX bit /// 5). If CPUID.01H:ECX[5] = 1. /// - UINT32 EnableVmxOutsideSmx:1; - UINT32 Reserved1:5; + UINT32 EnableVmxOutsideSmx : 1; + UINT32 Reserved1 : 5; /// /// [Bits 14:8] SENTER Local Function Enables (R/WL): When set, each bit /// in the field represents an enable control for a corresponding SENTER /// function. This bit is supported only if CPUID.1:ECX.[bit 6] is set. If /// CPUID.01H:ECX[6] = 1. /// - UINT32 SenterLocalFunctionEnables:7; + UINT32 SenterLocalFunctionEnables : 7; /// /// [Bit 15] SENTER Global Enable (R/WL): This bit must be set to enable /// SENTER leaf functions. This bit is supported only if CPUID.1:ECX.[bit /// 6] is set. If CPUID.01H:ECX[6] = 1. /// - UINT32 SenterGlobalEnable:1; - UINT32 Reserved2:1; + UINT32 SenterGlobalEnable : 1; + UINT32 Reserved2 : 1; /// /// [Bit 17] SGX Launch Control Enable (R/WL): This bit must be set to /// enable runtime reconfiguration of SGX Launch Control via /// IA32_SGXLEPUBKEYHASHn MSR. If CPUID.(EAX=07H, ECX=0H): ECX[30] = 1. /// - UINT32 SgxLaunchControlEnable:1; + UINT32 SgxLaunchControlEnable : 1; /// /// [Bit 18] SGX Global Enable (R/WL): This bit must be set to enable SGX /// leaf functions. If CPUID.(EAX=07H, ECX=0H): EBX[2] = 1. /// - UINT32 SgxEnable:1; - UINT32 Reserved3:1; + UINT32 SgxEnable : 1; + UINT32 Reserved3 : 1; /// /// [Bit 20] LMCE On (R/WL): When set, system software can program the /// MSRs associated with LMCE to configure delivery of some machine check /// exceptions to a single logical processor. If IA32_MCG_CAP[27] = 1. /// - UINT32 LmceOn:1; - UINT32 Reserved4:11; - UINT32 Reserved5:32; + UINT32 LmceOn : 1; + UINT32 Reserved4 : 11; + UINT32 Reserved5 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_FEATURE_CONTROL_REGISTER; - /** Per Logical Processor TSC Adjust (R/Write to clear). If CPUID.(EAX=07H, ECX=0H): EBX[1] = 1. THREAD_ADJUST: Local offset value of the IA32_TSC for @@ -334,8 +327,7 @@ typedef union { @endcode @note MSR_IA32_TSC_ADJUST is defined as IA32_TSC_ADJUST in SDM. **/ -#define MSR_IA32_TSC_ADJUST 0x0000003B - +#define MSR_IA32_TSC_ADJUST 0x0000003B /** BIOS Update Trigger (W) Executing a WRMSR instruction to this MSR causes a @@ -357,8 +349,7 @@ typedef union { @endcode @note MSR_IA32_BIOS_UPDT_TRIG is defined as IA32_BIOS_UPDT_TRIG in SDM. **/ -#define MSR_IA32_BIOS_UPDT_TRIG 0x00000079 - +#define MSR_IA32_BIOS_UPDT_TRIG 0x00000079 /** BIOS Update Signature (RO) Returns the microcode update signature following @@ -380,7 +371,7 @@ typedef union { @endcode @note MSR_IA32_BIOS_SIGN_ID is defined as IA32_BIOS_SIGN_ID in SDM. **/ -#define MSR_IA32_BIOS_SIGN_ID 0x0000008B +#define MSR_IA32_BIOS_SIGN_ID 0x0000008B /** MSR information returned for MSR index #MSR_IA32_BIOS_SIGN_ID @@ -390,7 +381,7 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved:32; + UINT32 Reserved : 32; /// /// [Bits 63:32] Microcode update signature. This field contains the /// signature of the currently loaded microcode update when read following @@ -400,15 +391,14 @@ typedef union { /// is no microcode update loaded. Another nonzero value will be the /// signature. /// - UINT32 MicrocodeUpdateSignature:32; + UINT32 MicrocodeUpdateSignature : 32; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_BIOS_SIGN_ID_REGISTER; - /** IA32_SGXLEPUBKEYHASH[(64*n+63):(64*n)] (R/W) Bits (64*n+63):(64*n) of the SHA256 digest of the SIGSTRUCT.MODULUS for SGX Launch Enclave. On reset, the @@ -433,13 +423,12 @@ typedef union { MSR_IA32_SGXLEPUBKEYHASH3 is defined as IA32_SGXLEPUBKEYHASH3 in SDM. @{ **/ -#define MSR_IA32_SGXLEPUBKEYHASH0 0x0000008C -#define MSR_IA32_SGXLEPUBKEYHASH1 0x0000008D -#define MSR_IA32_SGXLEPUBKEYHASH2 0x0000008E -#define MSR_IA32_SGXLEPUBKEYHASH3 0x0000008F +#define MSR_IA32_SGXLEPUBKEYHASH0 0x0000008C +#define MSR_IA32_SGXLEPUBKEYHASH1 0x0000008D +#define MSR_IA32_SGXLEPUBKEYHASH2 0x0000008E +#define MSR_IA32_SGXLEPUBKEYHASH3 0x0000008F /// @} - /** SMM Monitor Configuration (R/W). If CPUID.01H: ECX[5]=1 or CPUID.01H: ECX[6] = 1. @@ -459,7 +448,7 @@ typedef union { @endcode @note MSR_IA32_SMM_MONITOR_CTL is defined as IA32_SMM_MONITOR_CTL in SDM. **/ -#define MSR_IA32_SMM_MONITOR_CTL 0x0000009B +#define MSR_IA32_SMM_MONITOR_CTL 0x0000009B /** MSR information returned for MSR index #MSR_IA32_SMM_MONITOR_CTL @@ -476,28 +465,28 @@ typedef union { /// if the bit is 0. This bit is cleared when the logical processor is /// reset. /// - UINT32 Valid:1; - UINT32 Reserved1:1; + UINT32 Valid : 1; + UINT32 Reserved1 : 1; /// /// [Bit 2] Controls SMI unblocking by VMXOFF (see Section 34.14.4). If /// IA32_VMX_MISC[28]. /// - UINT32 BlockSmi:1; - UINT32 Reserved2:9; + UINT32 BlockSmi : 1; + UINT32 Reserved2 : 9; /// /// [Bits 31:12] MSEG Base (R/W). /// - UINT32 MsegBase:20; - UINT32 Reserved3:32; + UINT32 MsegBase : 20; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_SMM_MONITOR_CTL_REGISTER; /** @@ -512,29 +501,29 @@ typedef struct { /// discover the MSEG revision identifier that a processor uses by reading /// the VMX capability MSR IA32_VMX_MISC. // - UINT32 MsegHeaderRevision; + UINT32 MsegHeaderRevision; /// /// Bits 31:1 of this field are reserved and must be zero. Bit 0 of the field /// is the IA-32e mode SMM feature bit. It indicates whether the logical /// processor will be in IA-32e mode after the STM is activated. /// - UINT32 MonitorFeatures; - UINT32 GdtrLimit; - UINT32 GdtrBaseOffset; - UINT32 CsSelector; - UINT32 EipOffset; - UINT32 EspOffset; - UINT32 Cr3Offset; + UINT32 MonitorFeatures; + UINT32 GdtrLimit; + UINT32 GdtrBaseOffset; + UINT32 CsSelector; + UINT32 EipOffset; + UINT32 EspOffset; + UINT32 Cr3Offset; /// /// Pad header so total size is 2KB /// - UINT8 Reserved[SIZE_2KB - 8 * sizeof (UINT32)]; + UINT8 Reserved[SIZE_2KB - 8 * sizeof (UINT32)]; } MSEG_HEADER; /// /// @{ Define values for the MonitorFeatures field of #MSEG_HEADER /// -#define STM_FEATURES_IA32E 0x1 +#define STM_FEATURES_IA32E 0x1 /// /// @} /// @@ -555,8 +544,7 @@ typedef struct { @endcode @note MSR_IA32_SMBASE is defined as IA32_SMBASE in SDM. **/ -#define MSR_IA32_SMBASE 0x0000009E - +#define MSR_IA32_SMBASE 0x0000009E /** General Performance Counters (R/W). @@ -583,17 +571,16 @@ typedef struct { MSR_IA32_PMC7 is defined as IA32_PMC7 in SDM. @{ **/ -#define MSR_IA32_PMC0 0x000000C1 -#define MSR_IA32_PMC1 0x000000C2 -#define MSR_IA32_PMC2 0x000000C3 -#define MSR_IA32_PMC3 0x000000C4 -#define MSR_IA32_PMC4 0x000000C5 -#define MSR_IA32_PMC5 0x000000C6 -#define MSR_IA32_PMC6 0x000000C7 -#define MSR_IA32_PMC7 0x000000C8 +#define MSR_IA32_PMC0 0x000000C1 +#define MSR_IA32_PMC1 0x000000C2 +#define MSR_IA32_PMC2 0x000000C3 +#define MSR_IA32_PMC3 0x000000C4 +#define MSR_IA32_PMC4 0x000000C5 +#define MSR_IA32_PMC5 0x000000C6 +#define MSR_IA32_PMC6 0x000000C7 +#define MSR_IA32_PMC7 0x000000C8 /// @} - /** TSC Frequency Clock Counter (R/Write to clear). If CPUID.06H: ECX[0] = 1. C0_MCNT: C0 TSC Frequency Clock Count Increments at fixed interval (relative @@ -613,8 +600,7 @@ typedef struct { @endcode @note MSR_IA32_MPERF is defined as IA32_MPERF in SDM. **/ -#define MSR_IA32_MPERF 0x000000E7 - +#define MSR_IA32_MPERF 0x000000E7 /** Actual Performance Clock Counter (R/Write to clear). If CPUID.06H: ECX[0] = @@ -635,8 +621,7 @@ typedef struct { @endcode @note MSR_IA32_APERF is defined as IA32_APERF in SDM. **/ -#define MSR_IA32_APERF 0x000000E8 - +#define MSR_IA32_APERF 0x000000E8 /** MTRR Capability (RO) Section 11.11.2.1, "IA32_MTRR_DEF_TYPE MSR.". @@ -656,7 +641,7 @@ typedef struct { @endcode @note MSR_IA32_MTRRCAP is defined as IA32_MTRRCAP in SDM. **/ -#define MSR_IA32_MTRRCAP 0x000000FE +#define MSR_IA32_MTRRCAP 0x000000FE /** MSR information returned for MSR index #MSR_IA32_MTRRCAP @@ -670,34 +655,33 @@ typedef union { /// [Bits 7:0] VCNT: The number of variable memory type ranges in the /// processor. /// - UINT32 VCNT:8; + UINT32 VCNT : 8; /// /// [Bit 8] Fixed range MTRRs are supported when set. /// - UINT32 FIX:1; - UINT32 Reserved1:1; + UINT32 FIX : 1; + UINT32 Reserved1 : 1; /// /// [Bit 10] WC Supported when set. /// - UINT32 WC:1; + UINT32 WC : 1; /// /// [Bit 11] SMRR Supported when set. /// - UINT32 SMRR:1; - UINT32 Reserved2:20; - UINT32 Reserved3:32; + UINT32 SMRR : 1; + UINT32 Reserved2 : 20; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_MTRRCAP_REGISTER; - /** SYSENTER_CS_MSR (R/W). Introduced at Display Family / Display Model 06_01H. @@ -716,7 +700,7 @@ typedef union { @endcode @note MSR_IA32_SYSENTER_CS is defined as IA32_SYSENTER_CS in SDM. **/ -#define MSR_IA32_SYSENTER_CS 0x00000174 +#define MSR_IA32_SYSENTER_CS 0x00000174 /** MSR information returned for MSR index #MSR_IA32_SYSENTER_CS @@ -729,21 +713,20 @@ typedef union { /// /// [Bits 15:0] CS Selector. /// - UINT32 CS:16; - UINT32 Reserved1:16; - UINT32 Reserved2:32; + UINT32 CS : 16; + UINT32 Reserved1 : 16; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_SYSENTER_CS_REGISTER; - /** SYSENTER_ESP_MSR (R/W). Introduced at Display Family / Display Model 06_01H. @@ -760,8 +743,7 @@ typedef union { @endcode @note MSR_IA32_SYSENTER_ESP is defined as IA32_SYSENTER_ESP in SDM. **/ -#define MSR_IA32_SYSENTER_ESP 0x00000175 - +#define MSR_IA32_SYSENTER_ESP 0x00000175 /** SYSENTER_EIP_MSR (R/W). Introduced at Display Family / Display Model 06_01H. @@ -779,8 +761,7 @@ typedef union { @endcode @note MSR_IA32_SYSENTER_EIP is defined as IA32_SYSENTER_EIP in SDM. **/ -#define MSR_IA32_SYSENTER_EIP 0x00000176 - +#define MSR_IA32_SYSENTER_EIP 0x00000176 /** Global Machine Check Capability (RO). Introduced at Display Family / Display @@ -800,7 +781,7 @@ typedef union { @endcode @note MSR_IA32_MCG_CAP is defined as IA32_MCG_CAP in SDM. **/ -#define MSR_IA32_MCG_CAP 0x00000179 +#define MSR_IA32_MCG_CAP 0x00000179 /** MSR information returned for MSR index #MSR_IA32_MCG_CAP @@ -813,38 +794,38 @@ typedef union { /// /// [Bits 7:0] Count: Number of reporting banks. /// - UINT32 Count:8; + UINT32 Count : 8; /// /// [Bit 8] MCG_CTL_P: IA32_MCG_CTL is present if this bit is set. /// - UINT32 MCG_CTL_P:1; + UINT32 MCG_CTL_P : 1; /// /// [Bit 9] MCG_EXT_P: Extended machine check state registers are present /// if this bit is set. /// - UINT32 MCG_EXT_P:1; + UINT32 MCG_EXT_P : 1; /// /// [Bit 10] MCP_CMCI_P: Support for corrected MC error event is present. /// Introduced at Display Family / Display Model 06_01H. /// - UINT32 MCP_CMCI_P:1; + UINT32 MCP_CMCI_P : 1; /// /// [Bit 11] MCG_TES_P: Threshold-based error status register are present /// if this bit is set. /// - UINT32 MCG_TES_P:1; - UINT32 Reserved1:4; + UINT32 MCG_TES_P : 1; + UINT32 Reserved1 : 4; /// /// [Bits 23:16] MCG_EXT_CNT: Number of extended machine check state /// registers present. /// - UINT32 MCG_EXT_CNT:8; + UINT32 MCG_EXT_CNT : 8; /// /// [Bit 24] MCG_SER_P: The processor supports software error recovery if /// this bit is set. /// - UINT32 MCG_SER_P:1; - UINT32 Reserved2:1; + UINT32 MCG_SER_P : 1; + UINT32 Reserved2 : 1; /// /// [Bit 26] MCG_ELOG_P: Indicates that the processor allows platform /// firmware to be invoked when an error is detected so that it may @@ -853,28 +834,27 @@ typedef union { /// check bank registers. Introduced at Display Family / Display Model /// 06_3EH. /// - UINT32 MCG_ELOG_P:1; + UINT32 MCG_ELOG_P : 1; /// /// [Bit 27] MCG_LMCE_P: Indicates that the processor support extended /// state in IA32_MCG_STATUS and associated MSR necessary to configure /// Local Machine Check Exception (LMCE). Introduced at Display Family / /// Display Model 06_3EH. /// - UINT32 MCG_LMCE_P:1; - UINT32 Reserved3:4; - UINT32 Reserved4:32; + UINT32 MCG_LMCE_P : 1; + UINT32 Reserved3 : 4; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_MCG_CAP_REGISTER; - /** Global Machine Check Status (R/W0). Introduced at Display Family / Display Model 06_01H. @@ -894,7 +874,7 @@ typedef union { @endcode @note MSR_IA32_MCG_STATUS is defined as IA32_MCG_STATUS in SDM. **/ -#define MSR_IA32_MCG_STATUS 0x0000017A +#define MSR_IA32_MCG_STATUS 0x0000017A /** MSR information returned for MSR index #MSR_IA32_MCG_STATUS @@ -908,35 +888,34 @@ typedef union { /// [Bit 0] RIPV. Restart IP valid. Introduced at Display Family / Display /// Model 06_01H. /// - UINT32 RIPV:1; + UINT32 RIPV : 1; /// /// [Bit 1] EIPV. Error IP valid. Introduced at Display Family / Display /// Model 06_01H. /// - UINT32 EIPV:1; + UINT32 EIPV : 1; /// /// [Bit 2] MCIP. Machine check in progress. Introduced at Display Family /// / Display Model 06_01H. /// - UINT32 MCIP:1; + UINT32 MCIP : 1; /// /// [Bit 3] LMCE_S. If IA32_MCG_CAP.LMCE_P[2 7] =1. /// - UINT32 LMCE_S:1; - UINT32 Reserved1:28; - UINT32 Reserved2:32; + UINT32 LMCE_S : 1; + UINT32 Reserved1 : 28; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_MCG_STATUS_REGISTER; - /** Global Machine Check Control (R/W). If IA32_MCG_CAP.CTL_P[8] =1. @@ -953,8 +932,7 @@ typedef union { @endcode @note MSR_IA32_MCG_CTL is defined as IA32_MCG_CTL in SDM. **/ -#define MSR_IA32_MCG_CTL 0x0000017B - +#define MSR_IA32_MCG_CTL 0x0000017B /** Performance Event Select Register n (R/W). If CPUID.0AH: EAX[15:8] > n. @@ -978,10 +956,10 @@ typedef union { MSR_IA32_PERFEVTSEL3 is defined as IA32_PERFEVTSEL3 in SDM. @{ **/ -#define MSR_IA32_PERFEVTSEL0 0x00000186 -#define MSR_IA32_PERFEVTSEL1 0x00000187 -#define MSR_IA32_PERFEVTSEL2 0x00000188 -#define MSR_IA32_PERFEVTSEL3 0x00000189 +#define MSR_IA32_PERFEVTSEL0 0x00000186 +#define MSR_IA32_PERFEVTSEL1 0x00000187 +#define MSR_IA32_PERFEVTSEL2 0x00000188 +#define MSR_IA32_PERFEVTSEL3 0x00000189 /// @} /** @@ -996,32 +974,32 @@ typedef union { /// /// [Bits 7:0] Event Select: Selects a performance event logic unit. /// - UINT32 EventSelect:8; + UINT32 EventSelect : 8; /// /// [Bits 15:8] UMask: Qualifies the microarchitectural condition to /// detect on the selected event logic. /// - UINT32 UMASK:8; + UINT32 UMASK : 8; /// /// [Bit 16] USR: Counts while in privilege level is not ring 0. /// - UINT32 USR:1; + UINT32 USR : 1; /// /// [Bit 17] OS: Counts while in privilege level is ring 0. /// - UINT32 OS:1; + UINT32 OS : 1; /// /// [Bit 18] Edge: Enables edge detection if set. /// - UINT32 E:1; + UINT32 E : 1; /// /// [Bit 19] PC: enables pin control. /// - UINT32 PC:1; + UINT32 PC : 1; /// /// [Bit 20] INT: enables interrupt on counter overflow. /// - UINT32 INT:1; + UINT32 INT : 1; /// /// [Bit 21] AnyThread: When set to 1, it enables counting the associated /// event conditions occurring across all logical processors sharing a @@ -1029,35 +1007,34 @@ typedef union { /// associated event conditions occurring in the logical processor which /// programmed the MSR. /// - UINT32 ANY:1; + UINT32 ANY : 1; /// /// [Bit 22] EN: enables the corresponding performance counter to commence /// counting when this bit is set. /// - UINT32 EN:1; + UINT32 EN : 1; /// /// [Bit 23] INV: invert the CMASK. /// - UINT32 INV:1; + UINT32 INV : 1; /// /// [Bits 31:24] CMASK: When CMASK is not zero, the corresponding /// performance counter increments each cycle if the event count is /// greater than or equal to the CMASK. /// - UINT32 CMASK:8; - UINT32 Reserved:32; + UINT32 CMASK : 8; + UINT32 Reserved : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_PERFEVTSEL_REGISTER; - /** Current performance state(P-State) operating point (RO). Introduced at Display Family / Display Model 0F_03H. @@ -1076,7 +1053,7 @@ typedef union { @endcode @note MSR_IA32_PERF_STATUS is defined as IA32_PERF_STATUS in SDM. **/ -#define MSR_IA32_PERF_STATUS 0x00000198 +#define MSR_IA32_PERF_STATUS 0x00000198 /** MSR information returned for MSR index #MSR_IA32_PERF_STATUS @@ -1089,21 +1066,20 @@ typedef union { /// /// [Bits 15:0] Current performance State Value. /// - UINT32 State:16; - UINT32 Reserved1:16; - UINT32 Reserved2:32; + UINT32 State : 16; + UINT32 Reserved1 : 16; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_PERF_STATUS_REGISTER; - /** (R/W). Introduced at Display Family / Display Model 0F_03H. @@ -1122,7 +1098,7 @@ typedef union { @endcode @note MSR_IA32_PERF_CTL is defined as IA32_PERF_CTL in SDM. **/ -#define MSR_IA32_PERF_CTL 0x00000199 +#define MSR_IA32_PERF_CTL 0x00000199 /** MSR information returned for MSR index #MSR_IA32_PERF_CTL @@ -1135,22 +1111,21 @@ typedef union { /// /// [Bits 15:0] Target performance State Value. /// - UINT32 TargetState:16; - UINT32 Reserved1:16; + UINT32 TargetState : 16; + UINT32 Reserved1 : 16; /// /// [Bit 32] IDA Engage. (R/W) When set to 1: disengages IDA. 06_0FH /// (Mobile only). /// - UINT32 IDA:1; - UINT32 Reserved2:31; + UINT32 IDA : 1; + UINT32 Reserved2 : 31; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_PERF_CTL_REGISTER; - /** Clock Modulation Control (R/W) See Section 14.7.3, "Software Controlled Clock Modulation.". If CPUID.01H:EDX[22] = 1. @@ -1170,7 +1145,7 @@ typedef union { @endcode @note MSR_IA32_CLOCK_MODULATION is defined as IA32_CLOCK_MODULATION in SDM. **/ -#define MSR_IA32_CLOCK_MODULATION 0x0000019A +#define MSR_IA32_CLOCK_MODULATION 0x0000019A /** MSR information returned for MSR index #MSR_IA32_CLOCK_MODULATION @@ -1184,31 +1159,30 @@ typedef union { /// [Bit 0] Extended On-Demand Clock Modulation Duty Cycle:. If /// CPUID.06H:EAX[5] = 1. /// - UINT32 ExtendedOnDemandClockModulationDutyCycle:1; + UINT32 ExtendedOnDemandClockModulationDutyCycle : 1; /// /// [Bits 3:1] On-Demand Clock Modulation Duty Cycle: Specific encoded /// values for target duty cycle modulation. If CPUID.01H:EDX[22] = 1. /// - UINT32 OnDemandClockModulationDutyCycle:3; + UINT32 OnDemandClockModulationDutyCycle : 3; /// /// [Bit 4] On-Demand Clock Modulation Enable: Set 1 to enable modulation. /// If CPUID.01H:EDX[22] = 1. /// - UINT32 OnDemandClockModulationEnable:1; - UINT32 Reserved1:27; - UINT32 Reserved2:32; + UINT32 OnDemandClockModulationEnable : 1; + UINT32 Reserved1 : 27; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_CLOCK_MODULATION_REGISTER; - /** Thermal Interrupt Control (R/W) Enables and disables the generation of an interrupt on temperature transitions detected with the processor's thermal @@ -1230,7 +1204,7 @@ typedef union { @endcode @note MSR_IA32_THERM_INTERRUPT is defined as IA32_THERM_INTERRUPT in SDM. **/ -#define MSR_IA32_THERM_INTERRUPT 0x0000019B +#define MSR_IA32_THERM_INTERRUPT 0x0000019B /** MSR information returned for MSR index #MSR_IA32_THERM_INTERRUPT @@ -1243,59 +1217,58 @@ typedef union { /// /// [Bit 0] High-Temperature Interrupt Enable. If CPUID.01H:EDX[22] = 1. /// - UINT32 HighTempEnable:1; + UINT32 HighTempEnable : 1; /// /// [Bit 1] Low-Temperature Interrupt Enable. If CPUID.01H:EDX[22] = 1. /// - UINT32 LowTempEnable:1; + UINT32 LowTempEnable : 1; /// /// [Bit 2] PROCHOT# Interrupt Enable. If CPUID.01H:EDX[22] = 1. /// - UINT32 PROCHOT_Enable:1; + UINT32 PROCHOT_Enable : 1; /// /// [Bit 3] FORCEPR# Interrupt Enable. If CPUID.01H:EDX[22] = 1. /// - UINT32 FORCEPR_Enable:1; + UINT32 FORCEPR_Enable : 1; /// /// [Bit 4] Critical Temperature Interrupt Enable. /// If CPUID.01H:EDX[22] = 1. /// - UINT32 CriticalTempEnable:1; - UINT32 Reserved1:3; + UINT32 CriticalTempEnable : 1; + UINT32 Reserved1 : 3; /// /// [Bits 14:8] Threshold #1 Value. If CPUID.01H:EDX[22] = 1. /// - UINT32 Threshold1:7; + UINT32 Threshold1 : 7; /// /// [Bit 15] Threshold #1 Interrupt Enable. If CPUID.01H:EDX[22] = 1. /// - UINT32 Threshold1Enable:1; + UINT32 Threshold1Enable : 1; /// /// [Bits 22:16] Threshold #2 Value. If CPUID.01H:EDX[22] = 1. /// - UINT32 Threshold2:7; + UINT32 Threshold2 : 7; /// /// [Bit 23] Threshold #2 Interrupt Enable. If CPUID.01H:EDX[22] = 1. /// - UINT32 Threshold2Enable:1; + UINT32 Threshold2Enable : 1; /// /// [Bit 24] Power Limit Notification Enable. If CPUID.06H:EAX[4] = 1. /// - UINT32 PowerLimitNotificationEnable:1; - UINT32 Reserved2:7; - UINT32 Reserved3:32; + UINT32 PowerLimitNotificationEnable : 1; + UINT32 Reserved2 : 7; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_THERM_INTERRUPT_REGISTER; - /** Thermal Status Information (RO) Contains status information about the processor's thermal sensor and automatic thermal monitoring facilities. See @@ -1315,7 +1288,7 @@ typedef union { @endcode @note MSR_IA32_THERM_STATUS is defined as IA32_THERM_STATUS in SDM. **/ -#define MSR_IA32_THERM_STATUS 0x0000019C +#define MSR_IA32_THERM_STATUS 0x0000019C /** MSR information returned for MSR index #MSR_IA32_THERM_STATUS @@ -1328,95 +1301,94 @@ typedef union { /// /// [Bit 0] Thermal Status (RO):. If CPUID.01H:EDX[22] = 1. /// - UINT32 ThermalStatus:1; + UINT32 ThermalStatus : 1; /// /// [Bit 1] Thermal Status Log (R/W):. If CPUID.01H:EDX[22] = 1. /// - UINT32 ThermalStatusLog:1; + UINT32 ThermalStatusLog : 1; /// /// [Bit 2] PROCHOT # or FORCEPR# event (RO). If CPUID.01H:EDX[22] = 1. /// - UINT32 PROCHOT_FORCEPR_Event:1; + UINT32 PROCHOT_FORCEPR_Event : 1; /// /// [Bit 3] PROCHOT # or FORCEPR# log (R/WC0). If CPUID.01H:EDX[22] = 1. /// - UINT32 PROCHOT_FORCEPR_Log:1; + UINT32 PROCHOT_FORCEPR_Log : 1; /// /// [Bit 4] Critical Temperature Status (RO). If CPUID.01H:EDX[22] = 1. /// - UINT32 CriticalTempStatus:1; + UINT32 CriticalTempStatus : 1; /// /// [Bit 5] Critical Temperature Status log (R/WC0). /// If CPUID.01H:EDX[22] = 1. /// - UINT32 CriticalTempStatusLog:1; + UINT32 CriticalTempStatusLog : 1; /// /// [Bit 6] Thermal Threshold #1 Status (RO). If CPUID.01H:ECX[8] = 1. /// - UINT32 ThermalThreshold1Status:1; + UINT32 ThermalThreshold1Status : 1; /// /// [Bit 7] Thermal Threshold #1 log (R/WC0). If CPUID.01H:ECX[8] = 1. /// - UINT32 ThermalThreshold1Log:1; + UINT32 ThermalThreshold1Log : 1; /// /// [Bit 8] Thermal Threshold #2 Status (RO). If CPUID.01H:ECX[8] = 1. /// - UINT32 ThermalThreshold2Status:1; + UINT32 ThermalThreshold2Status : 1; /// /// [Bit 9] Thermal Threshold #2 log (R/WC0). If CPUID.01H:ECX[8] = 1. /// - UINT32 ThermalThreshold2Log:1; + UINT32 ThermalThreshold2Log : 1; /// /// [Bit 10] Power Limitation Status (RO). If CPUID.06H:EAX[4] = 1. /// - UINT32 PowerLimitStatus:1; + UINT32 PowerLimitStatus : 1; /// /// [Bit 11] Power Limitation log (R/WC0). If CPUID.06H:EAX[4] = 1. /// - UINT32 PowerLimitLog:1; + UINT32 PowerLimitLog : 1; /// /// [Bit 12] Current Limit Status (RO). If CPUID.06H:EAX[7] = 1. /// - UINT32 CurrentLimitStatus:1; + UINT32 CurrentLimitStatus : 1; /// /// [Bit 13] Current Limit log (R/WC0). If CPUID.06H:EAX[7] = 1. /// - UINT32 CurrentLimitLog:1; + UINT32 CurrentLimitLog : 1; /// /// [Bit 14] Cross Domain Limit Status (RO). If CPUID.06H:EAX[7] = 1. /// - UINT32 CrossDomainLimitStatus:1; + UINT32 CrossDomainLimitStatus : 1; /// /// [Bit 15] Cross Domain Limit log (R/WC0). If CPUID.06H:EAX[7] = 1. /// - UINT32 CrossDomainLimitLog:1; + UINT32 CrossDomainLimitLog : 1; /// /// [Bits 22:16] Digital Readout (RO). If CPUID.06H:EAX[0] = 1. /// - UINT32 DigitalReadout:7; - UINT32 Reserved1:4; + UINT32 DigitalReadout : 7; + UINT32 Reserved1 : 4; /// /// [Bits 30:27] Resolution in Degrees Celsius (RO). If CPUID.06H:EAX[0] = /// 1. /// - UINT32 ResolutionInDegreesCelsius:4; + UINT32 ResolutionInDegreesCelsius : 4; /// /// [Bit 31] Reading Valid (RO). If CPUID.06H:EAX[0] = 1. /// - UINT32 ReadingValid:1; - UINT32 Reserved2:32; + UINT32 ReadingValid : 1; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_THERM_STATUS_REGISTER; - /** Enable Misc. Processor Features (R/W) Allows a variety of processor functions to be enabled and disabled. @@ -1436,7 +1408,7 @@ typedef union { @endcode @note MSR_IA32_MISC_ENABLE is defined as IA32_MISC_ENABLE in SDM. **/ -#define MSR_IA32_MISC_ENABLE 0x000001A0 +#define MSR_IA32_MISC_ENABLE 0x000001A0 /** MSR information returned for MSR index #MSR_IA32_MISC_ENABLE @@ -1451,8 +1423,8 @@ typedef union { /// REP MOVS and REP STORS) is enabled (default); when clear, fast-strings /// are disabled. Introduced at Display Family / Display Model 0F_0H. /// - UINT32 FastStrings:1; - UINT32 Reserved1:2; + UINT32 FastStrings : 1; + UINT32 Reserved1 : 2; /// /// [Bit 3] Automatic Thermal Control Circuit Enable (R/W) 1 = Setting /// this bit enables the thermal control circuit (TCC) portion of the @@ -1464,35 +1436,35 @@ typedef union { /// field varies with product. See respective tables where default value is /// listed. Introduced at Display Family / Display Model 0F_0H. /// - UINT32 AutomaticThermalControlCircuit:1; - UINT32 Reserved2:3; + UINT32 AutomaticThermalControlCircuit : 1; + UINT32 Reserved2 : 3; /// /// [Bit 7] Performance Monitoring Available (R) 1 = Performance /// monitoring enabled 0 = Performance monitoring disabled. Introduced at /// Display Family / Display Model 0F_0H. /// - UINT32 PerformanceMonitoring:1; - UINT32 Reserved3:3; + UINT32 PerformanceMonitoring : 1; + UINT32 Reserved3 : 3; /// /// [Bit 11] Branch Trace Storage Unavailable (RO) 1 = Processor doesn't /// support branch trace storage (BTS) 0 = BTS is supported. Introduced at /// Display Family / Display Model 0F_0H. /// - UINT32 BTS:1; + UINT32 BTS : 1; /// /// [Bit 12] Processor Event Based Sampling (PEBS) Unavailable (RO) 1 = /// PEBS is not supported; 0 = PEBS is supported. Introduced at Display /// Family / Display Model 06_0FH. /// - UINT32 PEBS:1; - UINT32 Reserved4:3; + UINT32 PEBS : 1; + UINT32 Reserved4 : 3; /// /// [Bit 16] Enhanced Intel SpeedStep Technology Enable (R/W) 0= Enhanced /// Intel SpeedStep Technology disabled 1 = Enhanced Intel SpeedStep /// Technology enabled. If CPUID.01H: ECX[7] =1. /// - UINT32 EIST:1; - UINT32 Reserved5:1; + UINT32 EIST : 1; + UINT32 Reserved5 : 1; /// /// [Bit 18] ENABLE MONITOR FSM (R/W) When this bit is set to 0, the /// MONITOR feature flag is not set (CPUID.01H:ECX[bit 3] = 0). This @@ -1505,8 +1477,8 @@ typedef union { /// set to 0 may generate a #GP exception. Introduced at Display Family / /// Display Model 0F_03H. /// - UINT32 MONITOR:1; - UINT32 Reserved6:3; + UINT32 MONITOR : 1; + UINT32 Reserved6 : 3; /// /// [Bit 22] Limit CPUID Maxval (R/W) When this bit is set to 1, CPUID.00H /// returns a maximum value in EAX[7:0] of 2. BIOS should contain a setup @@ -1520,15 +1492,15 @@ typedef union { /// depends on the availability of CPUID leaves greater than 2. Introduced /// at Display Family / Display Model 0F_03H. /// - UINT32 LimitCpuidMaxval:1; + UINT32 LimitCpuidMaxval : 1; /// /// [Bit 23] xTPR Message Disable (R/W) When set to 1, xTPR messages are /// disabled. xTPR messages are optional messages that allow the processor /// to inform the chipset of its priority. if CPUID.01H:ECX[14] = 1. /// - UINT32 xTPR_Message_Disable:1; - UINT32 Reserved7:8; - UINT32 Reserved8:2; + UINT32 xTPR_Message_Disable : 1; + UINT32 Reserved7 : 8; + UINT32 Reserved8 : 2; /// /// [Bit 34] XD Bit Disable (R/W) When set to 1, the Execute Disable Bit /// feature (XD Bit) is disabled and the XD Bit extended feature flag will @@ -1539,16 +1511,15 @@ typedef union { /// this bit to 1 when the XD Bit extended feature flag is set to 0 may /// generate a #GP exception. if CPUID.80000001H:EDX[2 0] = 1. /// - UINT32 XD:1; - UINT32 Reserved9:29; + UINT32 XD : 1; + UINT32 Reserved9 : 29; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_MISC_ENABLE_REGISTER; - /** Performance Energy Bias Hint (R/W). if CPUID.6H:ECX[3] = 1. @@ -1567,7 +1538,7 @@ typedef union { @endcode @note MSR_IA32_ENERGY_PERF_BIAS is defined as IA32_ENERGY_PERF_BIAS in SDM. **/ -#define MSR_IA32_ENERGY_PERF_BIAS 0x000001B0 +#define MSR_IA32_ENERGY_PERF_BIAS 0x000001B0 /** MSR information returned for MSR index #MSR_IA32_ENERGY_PERF_BIAS @@ -1581,21 +1552,20 @@ typedef union { /// [Bits 3:0] Power Policy Preference: 0 indicates preference to highest /// performance. 15 indicates preference to maximize energy saving. /// - UINT32 PowerPolicyPreference:4; - UINT32 Reserved1:28; - UINT32 Reserved2:32; + UINT32 PowerPolicyPreference : 4; + UINT32 Reserved1 : 28; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_ENERGY_PERF_BIAS_REGISTER; - /** Package Thermal Status Information (RO) Contains status information about the package's thermal sensor. See Section 14.8, "Package Level Thermal @@ -1615,7 +1585,7 @@ typedef union { @endcode @note MSR_IA32_PACKAGE_THERM_STATUS is defined as IA32_PACKAGE_THERM_STATUS in SDM. **/ -#define MSR_IA32_PACKAGE_THERM_STATUS 0x000001B1 +#define MSR_IA32_PACKAGE_THERM_STATUS 0x000001B1 /** MSR information returned for MSR index #MSR_IA32_PACKAGE_THERM_STATUS @@ -1628,70 +1598,69 @@ typedef union { /// /// [Bit 0] Pkg Thermal Status (RO):. /// - UINT32 ThermalStatus:1; + UINT32 ThermalStatus : 1; /// /// [Bit 1] Pkg Thermal Status Log (R/W):. /// - UINT32 ThermalStatusLog:1; + UINT32 ThermalStatusLog : 1; /// /// [Bit 2] Pkg PROCHOT # event (RO). /// - UINT32 PROCHOT_Event:1; + UINT32 PROCHOT_Event : 1; /// /// [Bit 3] Pkg PROCHOT # log (R/WC0). /// - UINT32 PROCHOT_Log:1; + UINT32 PROCHOT_Log : 1; /// /// [Bit 4] Pkg Critical Temperature Status (RO). /// - UINT32 CriticalTempStatus:1; + UINT32 CriticalTempStatus : 1; /// /// [Bit 5] Pkg Critical Temperature Status log (R/WC0). /// - UINT32 CriticalTempStatusLog:1; + UINT32 CriticalTempStatusLog : 1; /// /// [Bit 6] Pkg Thermal Threshold #1 Status (RO). /// - UINT32 ThermalThreshold1Status:1; + UINT32 ThermalThreshold1Status : 1; /// /// [Bit 7] Pkg Thermal Threshold #1 log (R/WC0). /// - UINT32 ThermalThreshold1Log:1; + UINT32 ThermalThreshold1Log : 1; /// /// [Bit 8] Pkg Thermal Threshold #2 Status (RO). /// - UINT32 ThermalThreshold2Status:1; + UINT32 ThermalThreshold2Status : 1; /// /// [Bit 9] Pkg Thermal Threshold #1 log (R/WC0). /// - UINT32 ThermalThreshold2Log:1; + UINT32 ThermalThreshold2Log : 1; /// /// [Bit 10] Pkg Power Limitation Status (RO). /// - UINT32 PowerLimitStatus:1; + UINT32 PowerLimitStatus : 1; /// /// [Bit 11] Pkg Power Limitation log (R/WC0). /// - UINT32 PowerLimitLog:1; - UINT32 Reserved1:4; + UINT32 PowerLimitLog : 1; + UINT32 Reserved1 : 4; /// /// [Bits 22:16] Pkg Digital Readout (RO). /// - UINT32 DigitalReadout:7; - UINT32 Reserved2:9; - UINT32 Reserved3:32; + UINT32 DigitalReadout : 7; + UINT32 Reserved2 : 9; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_PACKAGE_THERM_STATUS_REGISTER; - /** Pkg Thermal Interrupt Control (R/W) Enables and disables the generation of an interrupt on temperature transitions detected with the package's thermal @@ -1713,7 +1682,7 @@ typedef union { @endcode @note MSR_IA32_PACKAGE_THERM_INTERRUPT is defined as IA32_PACKAGE_THERM_INTERRUPT in SDM. **/ -#define MSR_IA32_PACKAGE_THERM_INTERRUPT 0x000001B2 +#define MSR_IA32_PACKAGE_THERM_INTERRUPT 0x000001B2 /** MSR information returned for MSR index #MSR_IA32_PACKAGE_THERM_INTERRUPT @@ -1726,55 +1695,54 @@ typedef union { /// /// [Bit 0] Pkg High-Temperature Interrupt Enable. /// - UINT32 HighTempEnable:1; + UINT32 HighTempEnable : 1; /// /// [Bit 1] Pkg Low-Temperature Interrupt Enable. /// - UINT32 LowTempEnable:1; + UINT32 LowTempEnable : 1; /// /// [Bit 2] Pkg PROCHOT# Interrupt Enable. /// - UINT32 PROCHOT_Enable:1; - UINT32 Reserved1:1; + UINT32 PROCHOT_Enable : 1; + UINT32 Reserved1 : 1; /// /// [Bit 4] Pkg Overheat Interrupt Enable. /// - UINT32 OverheatEnable:1; - UINT32 Reserved2:3; + UINT32 OverheatEnable : 1; + UINT32 Reserved2 : 3; /// /// [Bits 14:8] Pkg Threshold #1 Value. /// - UINT32 Threshold1:7; + UINT32 Threshold1 : 7; /// /// [Bit 15] Pkg Threshold #1 Interrupt Enable. /// - UINT32 Threshold1Enable:1; + UINT32 Threshold1Enable : 1; /// /// [Bits 22:16] Pkg Threshold #2 Value. /// - UINT32 Threshold2:7; + UINT32 Threshold2 : 7; /// /// [Bit 23] Pkg Threshold #2 Interrupt Enable. /// - UINT32 Threshold2Enable:1; + UINT32 Threshold2Enable : 1; /// /// [Bit 24] Pkg Power Limit Notification Enable. /// - UINT32 PowerLimitNotificationEnable:1; - UINT32 Reserved3:7; - UINT32 Reserved4:32; + UINT32 PowerLimitNotificationEnable : 1; + UINT32 Reserved3 : 7; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_PACKAGE_THERM_INTERRUPT_REGISTER; - /** Trace/Profile Resource Control (R/W). Introduced at Display Family / Display Model 06_0EH. @@ -1794,7 +1762,7 @@ typedef union { @endcode @note MSR_IA32_DEBUGCTL is defined as IA32_DEBUGCTL in SDM. **/ -#define MSR_IA32_DEBUGCTL 0x000001D9 +#define MSR_IA32_DEBUGCTL 0x000001D9 /** MSR information returned for MSR index #MSR_IA32_DEBUGCTL @@ -1809,83 +1777,82 @@ typedef union { /// running trace of the most recent branches taken by the processor in /// the LBR stack. Introduced at Display Family / Display Model 06_01H. /// - UINT32 LBR:1; + UINT32 LBR : 1; /// /// [Bit 1] BTF: Setting this bit to 1 enables the processor to treat /// EFLAGS.TF as single-step on branches instead of single-step on /// instructions. Introduced at Display Family / Display Model 06_01H. /// - UINT32 BTF:1; - UINT32 Reserved1:4; + UINT32 BTF : 1; + UINT32 Reserved1 : 4; /// /// [Bit 6] TR: Setting this bit to 1 enables branch trace messages to be /// sent. Introduced at Display Family / Display Model 06_0EH. /// - UINT32 TR:1; + UINT32 TR : 1; /// /// [Bit 7] BTS: Setting this bit enables branch trace messages (BTMs) to /// be logged in a BTS buffer. Introduced at Display Family / Display /// Model 06_0EH. /// - UINT32 BTS:1; + UINT32 BTS : 1; /// /// [Bit 8] BTINT: When clear, BTMs are logged in a BTS buffer in circular /// fashion. When this bit is set, an interrupt is generated by the BTS /// facility when the BTS buffer is full. Introduced at Display Family / /// Display Model 06_0EH. /// - UINT32 BTINT:1; + UINT32 BTINT : 1; /// /// [Bit 9] BTS_OFF_OS: When set, BTS or BTM is skipped if CPL = 0. /// Introduced at Display Family / Display Model 06_0FH. /// - UINT32 BTS_OFF_OS:1; + UINT32 BTS_OFF_OS : 1; /// /// [Bit 10] BTS_OFF_USR: When set, BTS or BTM is skipped if CPL > 0. /// Introduced at Display Family / Display Model 06_0FH. /// - UINT32 BTS_OFF_USR:1; + UINT32 BTS_OFF_USR : 1; /// /// [Bit 11] FREEZE_LBRS_ON_PMI: When set, the LBR stack is frozen on a /// PMI request. If CPUID.01H: ECX[15] = 1 && CPUID.0AH: EAX[7:0] > 1. /// - UINT32 FREEZE_LBRS_ON_PMI:1; + UINT32 FREEZE_LBRS_ON_PMI : 1; /// /// [Bit 12] FREEZE_PERFMON_ON_PMI: When set, each ENABLE bit of the /// global counter control MSR are frozen (address 38FH) on a PMI request. /// If CPUID.01H: ECX[15] = 1 && CPUID.0AH: EAX[7:0] > 1. /// - UINT32 FREEZE_PERFMON_ON_PMI:1; + UINT32 FREEZE_PERFMON_ON_PMI : 1; /// /// [Bit 13] ENABLE_UNCORE_PMI: When set, enables the logical processor to /// receive and generate PMI on behalf of the uncore. Introduced at /// Display Family / Display Model 06_1AH. /// - UINT32 ENABLE_UNCORE_PMI:1; + UINT32 ENABLE_UNCORE_PMI : 1; /// /// [Bit 14] FREEZE_WHILE_SMM: When set, freezes perfmon and trace /// messages while in SMM. If IA32_PERF_CAPABILITIES[ 12] = 1. /// - UINT32 FREEZE_WHILE_SMM:1; + UINT32 FREEZE_WHILE_SMM : 1; /// /// [Bit 15] RTM_DEBUG: When set, enables DR7 debug bit on XBEGIN. If /// (CPUID.(EAX=07H, ECX=0):EBX[11] = 1). /// - UINT32 RTM_DEBUG:1; - UINT32 Reserved2:16; - UINT32 Reserved3:32; + UINT32 RTM_DEBUG : 1; + UINT32 Reserved2 : 16; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_DEBUGCTL_REGISTER; - /** SMRR Base Address (Writeable only in SMM) Base address of SMM memory range. If IA32_MTRRCAP.SMRR[11] = 1. @@ -1905,7 +1872,7 @@ typedef union { @endcode @note MSR_IA32_SMRR_PHYSBASE is defined as IA32_SMRR_PHYSBASE in SDM. **/ -#define MSR_IA32_SMRR_PHYSBASE 0x000001F2 +#define MSR_IA32_SMRR_PHYSBASE 0x000001F2 /** MSR information returned for MSR index #MSR_IA32_SMRR_PHYSBASE @@ -1918,25 +1885,24 @@ typedef union { /// /// [Bits 7:0] Type. Specifies memory type of the range. /// - UINT32 Type:8; - UINT32 Reserved1:4; + UINT32 Type : 8; + UINT32 Reserved1 : 4; /// /// [Bits 31:12] PhysBase. SMRR physical Base Address. /// - UINT32 PhysBase:20; - UINT32 Reserved2:32; + UINT32 PhysBase : 20; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_SMRR_PHYSBASE_REGISTER; - /** SMRR Range Mask (Writeable only in SMM) Range Mask of SMM memory range. If IA32_MTRRCAP[SMRR] = 1. @@ -1956,7 +1922,7 @@ typedef union { @endcode @note MSR_IA32_SMRR_PHYSMASK is defined as IA32_SMRR_PHYSMASK in SDM. **/ -#define MSR_IA32_SMRR_PHYSMASK 0x000001F3 +#define MSR_IA32_SMRR_PHYSMASK 0x000001F3 /** MSR information returned for MSR index #MSR_IA32_SMRR_PHYSMASK @@ -1966,28 +1932,27 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:11; + UINT32 Reserved1 : 11; /// /// [Bit 11] Valid Enable range mask. /// - UINT32 Valid:1; + UINT32 Valid : 1; /// /// [Bits 31:12] PhysMask SMRR address range mask. /// - UINT32 PhysMask:20; - UINT32 Reserved2:32; + UINT32 PhysMask : 20; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_SMRR_PHYSMASK_REGISTER; - /** DCA Capability (R). If CPUID.01H: ECX[18] = 1. @@ -2003,8 +1968,7 @@ typedef union { @endcode @note MSR_IA32_PLATFORM_DCA_CAP is defined as IA32_PLATFORM_DCA_CAP in SDM. **/ -#define MSR_IA32_PLATFORM_DCA_CAP 0x000001F8 - +#define MSR_IA32_PLATFORM_DCA_CAP 0x000001F8 /** If set, CPU supports Prefetch-Hint type. If CPUID.01H: ECX[18] = 1. @@ -2022,8 +1986,7 @@ typedef union { @endcode @note MSR_IA32_CPU_DCA_CAP is defined as IA32_CPU_DCA_CAP in SDM. **/ -#define MSR_IA32_CPU_DCA_CAP 0x000001F9 - +#define MSR_IA32_CPU_DCA_CAP 0x000001F9 /** DCA type 0 Status and Control register. If CPUID.01H: ECX[18] = 1. @@ -2043,7 +2006,7 @@ typedef union { @endcode @note MSR_IA32_DCA_0_CAP is defined as IA32_DCA_0_CAP in SDM. **/ -#define MSR_IA32_DCA_0_CAP 0x000001FA +#define MSR_IA32_DCA_0_CAP 0x000001FA /** MSR information returned for MSR index #MSR_IA32_DCA_0_CAP @@ -2057,49 +2020,48 @@ typedef union { /// [Bit 0] DCA_ACTIVE: Set by HW when DCA is fuseenabled and no /// defeatures are set. /// - UINT32 DCA_ACTIVE:1; + UINT32 DCA_ACTIVE : 1; /// /// [Bits 2:1] TRANSACTION. /// - UINT32 TRANSACTION:2; + UINT32 TRANSACTION : 2; /// /// [Bits 6:3] DCA_TYPE. /// - UINT32 DCA_TYPE:4; + UINT32 DCA_TYPE : 4; /// /// [Bits 10:7] DCA_QUEUE_SIZE. /// - UINT32 DCA_QUEUE_SIZE:4; - UINT32 Reserved1:2; + UINT32 DCA_QUEUE_SIZE : 4; + UINT32 Reserved1 : 2; /// /// [Bits 16:13] DCA_DELAY: Writes will update the register but have no HW /// side-effect. /// - UINT32 DCA_DELAY:4; - UINT32 Reserved2:7; + UINT32 DCA_DELAY : 4; + UINT32 Reserved2 : 7; /// /// [Bit 24] SW_BLOCK: SW can request DCA block by setting this bit. /// - UINT32 SW_BLOCK:1; - UINT32 Reserved3:1; + UINT32 SW_BLOCK : 1; + UINT32 Reserved3 : 1; /// /// [Bit 26] HW_BLOCK: Set when DCA is blocked by HW (e.g. CR0.CD = 1). /// - UINT32 HW_BLOCK:1; - UINT32 Reserved4:5; - UINT32 Reserved5:32; + UINT32 HW_BLOCK : 1; + UINT32 Reserved4 : 5; + UINT32 Reserved5 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_DCA_0_CAP_REGISTER; - /** MTRRphysBasen. See Section 11.11.2.3, "Variable Range MTRRs". If CPUID.01H: EDX.MTRR[12] = 1 and IA32_MTRRCAP[7:0] > n. @@ -2129,16 +2091,16 @@ typedef union { MSR_IA32_MTRR_PHYSBASE9 is defined as IA32_MTRR_PHYSBASE9 in SDM. @{ **/ -#define MSR_IA32_MTRR_PHYSBASE0 0x00000200 -#define MSR_IA32_MTRR_PHYSBASE1 0x00000202 -#define MSR_IA32_MTRR_PHYSBASE2 0x00000204 -#define MSR_IA32_MTRR_PHYSBASE3 0x00000206 -#define MSR_IA32_MTRR_PHYSBASE4 0x00000208 -#define MSR_IA32_MTRR_PHYSBASE5 0x0000020A -#define MSR_IA32_MTRR_PHYSBASE6 0x0000020C -#define MSR_IA32_MTRR_PHYSBASE7 0x0000020E -#define MSR_IA32_MTRR_PHYSBASE8 0x00000210 -#define MSR_IA32_MTRR_PHYSBASE9 0x00000212 +#define MSR_IA32_MTRR_PHYSBASE0 0x00000200 +#define MSR_IA32_MTRR_PHYSBASE1 0x00000202 +#define MSR_IA32_MTRR_PHYSBASE2 0x00000204 +#define MSR_IA32_MTRR_PHYSBASE3 0x00000206 +#define MSR_IA32_MTRR_PHYSBASE4 0x00000208 +#define MSR_IA32_MTRR_PHYSBASE5 0x0000020A +#define MSR_IA32_MTRR_PHYSBASE6 0x0000020C +#define MSR_IA32_MTRR_PHYSBASE7 0x0000020E +#define MSR_IA32_MTRR_PHYSBASE8 0x00000210 +#define MSR_IA32_MTRR_PHYSBASE9 0x00000212 /// @} /** @@ -2153,12 +2115,12 @@ typedef union { /// /// [Bits 7:0] Type. Specifies memory type of the range. /// - UINT32 Type:8; - UINT32 Reserved1:4; + UINT32 Type : 8; + UINT32 Reserved1 : 4; /// /// [Bits 31:12] PhysBase. MTRR physical Base Address. /// - UINT32 PhysBase:20; + UINT32 PhysBase : 20; /// /// [Bits MAXPHYSADDR:32] PhysBase. Upper bits of MTRR physical Base Address. /// MAXPHYADDR: The bit position indicated by MAXPHYADDR depends on the @@ -2167,15 +2129,14 @@ typedef union { /// leaf 80000008H, the processor supports 36-bit physical address size, /// then bit PhysMask consists of bits 35:12, and bits 63:36 are reserved. /// - UINT32 PhysBaseHi:32; + UINT32 PhysBaseHi : 32; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_MTRR_PHYSBASE_REGISTER; - /** MTRRphysMaskn. See Section 11.11.2.3, "Variable Range MTRRs". If CPUID.01H: EDX.MTRR[12] = 1 and IA32_MTRRCAP[7:0] > n. @@ -2205,16 +2166,16 @@ typedef union { MSR_IA32_MTRR_PHYSMASK9 is defined as IA32_MTRR_PHYSMASK9 in SDM. @{ **/ -#define MSR_IA32_MTRR_PHYSMASK0 0x00000201 -#define MSR_IA32_MTRR_PHYSMASK1 0x00000203 -#define MSR_IA32_MTRR_PHYSMASK2 0x00000205 -#define MSR_IA32_MTRR_PHYSMASK3 0x00000207 -#define MSR_IA32_MTRR_PHYSMASK4 0x00000209 -#define MSR_IA32_MTRR_PHYSMASK5 0x0000020B -#define MSR_IA32_MTRR_PHYSMASK6 0x0000020D -#define MSR_IA32_MTRR_PHYSMASK7 0x0000020F -#define MSR_IA32_MTRR_PHYSMASK8 0x00000211 -#define MSR_IA32_MTRR_PHYSMASK9 0x00000213 +#define MSR_IA32_MTRR_PHYSMASK0 0x00000201 +#define MSR_IA32_MTRR_PHYSMASK1 0x00000203 +#define MSR_IA32_MTRR_PHYSMASK2 0x00000205 +#define MSR_IA32_MTRR_PHYSMASK3 0x00000207 +#define MSR_IA32_MTRR_PHYSMASK4 0x00000209 +#define MSR_IA32_MTRR_PHYSMASK5 0x0000020B +#define MSR_IA32_MTRR_PHYSMASK6 0x0000020D +#define MSR_IA32_MTRR_PHYSMASK7 0x0000020F +#define MSR_IA32_MTRR_PHYSMASK8 0x00000211 +#define MSR_IA32_MTRR_PHYSMASK9 0x00000213 /// @} /** @@ -2226,15 +2187,15 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:11; + UINT32 Reserved1 : 11; /// /// [Bit 11] Valid Enable range mask. /// - UINT32 V:1; + UINT32 V : 1; /// /// [Bits 31:12] PhysMask. MTRR address range mask. /// - UINT32 PhysMask:20; + UINT32 PhysMask : 20; /// /// [Bits MAXPHYSADDR:32] PhysMask. Upper bits of MTRR address range mask. /// MAXPHYADDR: The bit position indicated by MAXPHYADDR depends on the @@ -2243,15 +2204,14 @@ typedef union { /// leaf 80000008H, the processor supports 36-bit physical address size, /// then bit PhysMask consists of bits 35:12, and bits 63:36 are reserved. /// - UINT32 PhysMaskHi:32; + UINT32 PhysMaskHi : 32; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_MTRR_PHYSMASK_REGISTER; - /** MTRRfix64K_00000. If CPUID.01H: EDX.MTRR[12] =1. @@ -2268,8 +2228,7 @@ typedef union { @endcode @note MSR_IA32_MTRR_FIX64K_00000 is defined as IA32_MTRR_FIX64K_00000 in SDM. **/ -#define MSR_IA32_MTRR_FIX64K_00000 0x00000250 - +#define MSR_IA32_MTRR_FIX64K_00000 0x00000250 /** MTRRfix16K_80000. If CPUID.01H: EDX.MTRR[12] =1. @@ -2287,8 +2246,7 @@ typedef union { @endcode @note MSR_IA32_MTRR_FIX16K_80000 is defined as IA32_MTRR_FIX16K_80000 in SDM. **/ -#define MSR_IA32_MTRR_FIX16K_80000 0x00000258 - +#define MSR_IA32_MTRR_FIX16K_80000 0x00000258 /** MTRRfix16K_A0000. If CPUID.01H: EDX.MTRR[12] =1. @@ -2306,8 +2264,7 @@ typedef union { @endcode @note MSR_IA32_MTRR_FIX16K_A0000 is defined as IA32_MTRR_FIX16K_A0000 in SDM. **/ -#define MSR_IA32_MTRR_FIX16K_A0000 0x00000259 - +#define MSR_IA32_MTRR_FIX16K_A0000 0x00000259 /** See Section 11.11.2.2, "Fixed Range MTRRs.". If CPUID.01H: EDX.MTRR[12] =1. @@ -2325,8 +2282,7 @@ typedef union { @endcode @note MSR_IA32_MTRR_FIX4K_C0000 is defined as IA32_MTRR_FIX4K_C0000 in SDM. **/ -#define MSR_IA32_MTRR_FIX4K_C0000 0x00000268 - +#define MSR_IA32_MTRR_FIX4K_C0000 0x00000268 /** MTRRfix4K_C8000. If CPUID.01H: EDX.MTRR[12] =1. @@ -2344,8 +2300,7 @@ typedef union { @endcode @note MSR_IA32_MTRR_FIX4K_C8000 is defined as IA32_MTRR_FIX4K_C8000 in SDM. **/ -#define MSR_IA32_MTRR_FIX4K_C8000 0x00000269 - +#define MSR_IA32_MTRR_FIX4K_C8000 0x00000269 /** MTRRfix4K_D0000. If CPUID.01H: EDX.MTRR[12] =1. @@ -2363,8 +2318,7 @@ typedef union { @endcode @note MSR_IA32_MTRR_FIX4K_D0000 is defined as IA32_MTRR_FIX4K_D0000 in SDM. **/ -#define MSR_IA32_MTRR_FIX4K_D0000 0x0000026A - +#define MSR_IA32_MTRR_FIX4K_D0000 0x0000026A /** MTRRfix4K_D8000. If CPUID.01H: EDX.MTRR[12] =1. @@ -2382,8 +2336,7 @@ typedef union { @endcode @note MSR_IA32_MTRR_FIX4K_D8000 is defined as IA32_MTRR_FIX4K_D8000 in SDM. **/ -#define MSR_IA32_MTRR_FIX4K_D8000 0x0000026B - +#define MSR_IA32_MTRR_FIX4K_D8000 0x0000026B /** MTRRfix4K_E0000. If CPUID.01H: EDX.MTRR[12] =1. @@ -2401,8 +2354,7 @@ typedef union { @endcode @note MSR_IA32_MTRR_FIX4K_E0000 is defined as IA32_MTRR_FIX4K_E0000 in SDM. **/ -#define MSR_IA32_MTRR_FIX4K_E0000 0x0000026C - +#define MSR_IA32_MTRR_FIX4K_E0000 0x0000026C /** MTRRfix4K_E8000. If CPUID.01H: EDX.MTRR[12] =1. @@ -2420,8 +2372,7 @@ typedef union { @endcode @note MSR_IA32_MTRR_FIX4K_E8000 is defined as IA32_MTRR_FIX4K_E8000 in SDM. **/ -#define MSR_IA32_MTRR_FIX4K_E8000 0x0000026D - +#define MSR_IA32_MTRR_FIX4K_E8000 0x0000026D /** MTRRfix4K_F0000. If CPUID.01H: EDX.MTRR[12] =1. @@ -2439,8 +2390,7 @@ typedef union { @endcode @note MSR_IA32_MTRR_FIX4K_F0000 is defined as IA32_MTRR_FIX4K_F0000 in SDM. **/ -#define MSR_IA32_MTRR_FIX4K_F0000 0x0000026E - +#define MSR_IA32_MTRR_FIX4K_F0000 0x0000026E /** MTRRfix4K_F8000. If CPUID.01H: EDX.MTRR[12] =1. @@ -2458,8 +2408,7 @@ typedef union { @endcode @note MSR_IA32_MTRR_FIX4K_F8000 is defined as IA32_MTRR_FIX4K_F8000 in SDM. **/ -#define MSR_IA32_MTRR_FIX4K_F8000 0x0000026F - +#define MSR_IA32_MTRR_FIX4K_F8000 0x0000026F /** IA32_PAT (R/W). If CPUID.01H: EDX.MTRR[16] =1. @@ -2479,7 +2428,7 @@ typedef union { @endcode @note MSR_IA32_PAT is defined as IA32_PAT in SDM. **/ -#define MSR_IA32_PAT 0x00000277 +#define MSR_IA32_PAT 0x00000277 /** MSR information returned for MSR index #MSR_IA32_PAT @@ -2492,51 +2441,50 @@ typedef union { /// /// [Bits 2:0] PA0. /// - UINT32 PA0:3; - UINT32 Reserved1:5; + UINT32 PA0 : 3; + UINT32 Reserved1 : 5; /// /// [Bits 10:8] PA1. /// - UINT32 PA1:3; - UINT32 Reserved2:5; + UINT32 PA1 : 3; + UINT32 Reserved2 : 5; /// /// [Bits 18:16] PA2. /// - UINT32 PA2:3; - UINT32 Reserved3:5; + UINT32 PA2 : 3; + UINT32 Reserved3 : 5; /// /// [Bits 26:24] PA3. /// - UINT32 PA3:3; - UINT32 Reserved4:5; + UINT32 PA3 : 3; + UINT32 Reserved4 : 5; /// /// [Bits 34:32] PA4. /// - UINT32 PA4:3; - UINT32 Reserved5:5; + UINT32 PA4 : 3; + UINT32 Reserved5 : 5; /// /// [Bits 42:40] PA5. /// - UINT32 PA5:3; - UINT32 Reserved6:5; + UINT32 PA5 : 3; + UINT32 Reserved6 : 5; /// /// [Bits 50:48] PA6. /// - UINT32 PA6:3; - UINT32 Reserved7:5; + UINT32 PA6 : 3; + UINT32 Reserved7 : 5; /// /// [Bits 58:56] PA7. /// - UINT32 PA7:3; - UINT32 Reserved8:5; + UINT32 PA7 : 3; + UINT32 Reserved8 : 5; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_PAT_REGISTER; - /** Provides the programming interface to use corrected MC error signaling capability (R/W). If IA32_MCG_CAP[10] = 1 && IA32_MCG_CAP[7:0] > n. @@ -2588,38 +2536,38 @@ typedef union { MSR_IA32_MC31_CTL2 is defined as IA32_MC31_CTL2 in SDM. @{ **/ -#define MSR_IA32_MC0_CTL2 0x00000280 -#define MSR_IA32_MC1_CTL2 0x00000281 -#define MSR_IA32_MC2_CTL2 0x00000282 -#define MSR_IA32_MC3_CTL2 0x00000283 -#define MSR_IA32_MC4_CTL2 0x00000284 -#define MSR_IA32_MC5_CTL2 0x00000285 -#define MSR_IA32_MC6_CTL2 0x00000286 -#define MSR_IA32_MC7_CTL2 0x00000287 -#define MSR_IA32_MC8_CTL2 0x00000288 -#define MSR_IA32_MC9_CTL2 0x00000289 -#define MSR_IA32_MC10_CTL2 0x0000028A -#define MSR_IA32_MC11_CTL2 0x0000028B -#define MSR_IA32_MC12_CTL2 0x0000028C -#define MSR_IA32_MC13_CTL2 0x0000028D -#define MSR_IA32_MC14_CTL2 0x0000028E -#define MSR_IA32_MC15_CTL2 0x0000028F -#define MSR_IA32_MC16_CTL2 0x00000290 -#define MSR_IA32_MC17_CTL2 0x00000291 -#define MSR_IA32_MC18_CTL2 0x00000292 -#define MSR_IA32_MC19_CTL2 0x00000293 -#define MSR_IA32_MC20_CTL2 0x00000294 -#define MSR_IA32_MC21_CTL2 0x00000295 -#define MSR_IA32_MC22_CTL2 0x00000296 -#define MSR_IA32_MC23_CTL2 0x00000297 -#define MSR_IA32_MC24_CTL2 0x00000298 -#define MSR_IA32_MC25_CTL2 0x00000299 -#define MSR_IA32_MC26_CTL2 0x0000029A -#define MSR_IA32_MC27_CTL2 0x0000029B -#define MSR_IA32_MC28_CTL2 0x0000029C -#define MSR_IA32_MC29_CTL2 0x0000029D -#define MSR_IA32_MC30_CTL2 0x0000029E -#define MSR_IA32_MC31_CTL2 0x0000029F +#define MSR_IA32_MC0_CTL2 0x00000280 +#define MSR_IA32_MC1_CTL2 0x00000281 +#define MSR_IA32_MC2_CTL2 0x00000282 +#define MSR_IA32_MC3_CTL2 0x00000283 +#define MSR_IA32_MC4_CTL2 0x00000284 +#define MSR_IA32_MC5_CTL2 0x00000285 +#define MSR_IA32_MC6_CTL2 0x00000286 +#define MSR_IA32_MC7_CTL2 0x00000287 +#define MSR_IA32_MC8_CTL2 0x00000288 +#define MSR_IA32_MC9_CTL2 0x00000289 +#define MSR_IA32_MC10_CTL2 0x0000028A +#define MSR_IA32_MC11_CTL2 0x0000028B +#define MSR_IA32_MC12_CTL2 0x0000028C +#define MSR_IA32_MC13_CTL2 0x0000028D +#define MSR_IA32_MC14_CTL2 0x0000028E +#define MSR_IA32_MC15_CTL2 0x0000028F +#define MSR_IA32_MC16_CTL2 0x00000290 +#define MSR_IA32_MC17_CTL2 0x00000291 +#define MSR_IA32_MC18_CTL2 0x00000292 +#define MSR_IA32_MC19_CTL2 0x00000293 +#define MSR_IA32_MC20_CTL2 0x00000294 +#define MSR_IA32_MC21_CTL2 0x00000295 +#define MSR_IA32_MC22_CTL2 0x00000296 +#define MSR_IA32_MC23_CTL2 0x00000297 +#define MSR_IA32_MC24_CTL2 0x00000298 +#define MSR_IA32_MC25_CTL2 0x00000299 +#define MSR_IA32_MC26_CTL2 0x0000029A +#define MSR_IA32_MC27_CTL2 0x0000029B +#define MSR_IA32_MC28_CTL2 0x0000029C +#define MSR_IA32_MC29_CTL2 0x0000029D +#define MSR_IA32_MC30_CTL2 0x0000029E +#define MSR_IA32_MC31_CTL2 0x0000029F /// @} /** @@ -2634,26 +2582,25 @@ typedef union { /// /// [Bits 14:0] Corrected error count threshold. /// - UINT32 CorrectedErrorCountThreshold:15; - UINT32 Reserved1:15; + UINT32 CorrectedErrorCountThreshold : 15; + UINT32 Reserved1 : 15; /// /// [Bit 30] CMCI_EN. /// - UINT32 CMCI_EN:1; - UINT32 Reserved2:1; - UINT32 Reserved3:32; + UINT32 CMCI_EN : 1; + UINT32 Reserved2 : 1; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_MC_CTL2_REGISTER; - /** MTRRdefType (R/W). If CPUID.01H: EDX.MTRR[12] =1. @@ -2672,7 +2619,7 @@ typedef union { @endcode @note MSR_IA32_MTRR_DEF_TYPE is defined as IA32_MTRR_DEF_TYPE in SDM. **/ -#define MSR_IA32_MTRR_DEF_TYPE 0x000002FF +#define MSR_IA32_MTRR_DEF_TYPE 0x000002FF /** MSR information returned for MSR index #MSR_IA32_MTRR_DEF_TYPE @@ -2685,30 +2632,29 @@ typedef union { /// /// [Bits 2:0] Default Memory Type. /// - UINT32 Type:3; - UINT32 Reserved1:7; + UINT32 Type : 3; + UINT32 Reserved1 : 7; /// /// [Bit 10] Fixed Range MTRR Enable. /// - UINT32 FE:1; + UINT32 FE : 1; /// /// [Bit 11] MTRR Enable. /// - UINT32 E:1; - UINT32 Reserved2:20; - UINT32 Reserved3:32; + UINT32 E : 1; + UINT32 Reserved2 : 20; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_MTRR_DEF_TYPE_REGISTER; - /** Fixed-Function Performance Counter 0 (R/W): Counts Instr_Retired.Any. If CPUID.0AH: EDX[4:0] > 0. @@ -2726,8 +2672,7 @@ typedef union { @endcode @note MSR_IA32_FIXED_CTR0 is defined as IA32_FIXED_CTR0 in SDM. **/ -#define MSR_IA32_FIXED_CTR0 0x00000309 - +#define MSR_IA32_FIXED_CTR0 0x00000309 /** Fixed-Function Performance Counter 1 (R/W): Counts CPU_CLK_Unhalted.Core. If @@ -2746,8 +2691,7 @@ typedef union { @endcode @note MSR_IA32_FIXED_CTR1 is defined as IA32_FIXED_CTR1 in SDM. **/ -#define MSR_IA32_FIXED_CTR1 0x0000030A - +#define MSR_IA32_FIXED_CTR1 0x0000030A /** Fixed-Function Performance Counter 2 (R/W): Counts CPU_CLK_Unhalted.Ref. If @@ -2766,8 +2710,7 @@ typedef union { @endcode @note MSR_IA32_FIXED_CTR2 is defined as IA32_FIXED_CTR2 in SDM. **/ -#define MSR_IA32_FIXED_CTR2 0x0000030B - +#define MSR_IA32_FIXED_CTR2 0x0000030B /** RO. If CPUID.01H: ECX[15] = 1. @@ -2787,7 +2730,7 @@ typedef union { @endcode @note MSR_IA32_PERF_CAPABILITIES is defined as IA32_PERF_CAPABILITIES in SDM. **/ -#define MSR_IA32_PERF_CAPABILITIES 0x00000345 +#define MSR_IA32_PERF_CAPABILITIES 0x00000345 /** MSR information returned for MSR index #MSR_IA32_PERF_CAPABILITIES @@ -2800,41 +2743,40 @@ typedef union { /// /// [Bits 5:0] LBR format. /// - UINT32 LBR_FMT:6; + UINT32 LBR_FMT : 6; /// /// [Bit 6] PEBS Trap. /// - UINT32 PEBS_TRAP:1; + UINT32 PEBS_TRAP : 1; /// /// [Bit 7] PEBSSaveArchRegs. /// - UINT32 PEBS_ARCH_REG:1; + UINT32 PEBS_ARCH_REG : 1; /// /// [Bits 11:8] PEBS Record Format. /// - UINT32 PEBS_REC_FMT:4; + UINT32 PEBS_REC_FMT : 4; /// /// [Bit 12] 1: Freeze while SMM is supported. /// - UINT32 SMM_FREEZE:1; + UINT32 SMM_FREEZE : 1; /// /// [Bit 13] 1: Full width of counter writable via IA32_A_PMCx. /// - UINT32 FW_WRITE:1; - UINT32 Reserved1:18; - UINT32 Reserved2:32; + UINT32 FW_WRITE : 1; + UINT32 Reserved1 : 18; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_PERF_CAPABILITIES_REGISTER; - /** Fixed-Function Performance Counter Control (R/W) Counter increments while the results of ANDing respective enable bit in IA32_PERF_GLOBAL_CTRL with @@ -2856,7 +2798,7 @@ typedef union { @endcode @note MSR_IA32_FIXED_CTR_CTRL is defined as IA32_FIXED_CTR_CTRL in SDM. **/ -#define MSR_IA32_FIXED_CTR_CTRL 0x0000038D +#define MSR_IA32_FIXED_CTR_CTRL 0x0000038D /** MSR information returned for MSR index #MSR_IA32_FIXED_CTR_CTRL @@ -2869,11 +2811,11 @@ typedef union { /// /// [Bit 0] EN0_OS: Enable Fixed Counter 0 to count while CPL = 0. /// - UINT32 EN0_OS:1; + UINT32 EN0_OS : 1; /// /// [Bit 1] EN0_Usr: Enable Fixed Counter 0 to count while CPL > 0. /// - UINT32 EN0_Usr:1; + UINT32 EN0_Usr : 1; /// /// [Bit 2] AnyThread: When set to 1, it enables counting the associated /// event conditions occurring across all logical processors sharing a @@ -2881,19 +2823,19 @@ typedef union { /// associated event conditions occurring in the logical processor which /// programmed the MSR. If CPUID.0AH: EAX[7:0] > 2. /// - UINT32 AnyThread0:1; + UINT32 AnyThread0 : 1; /// /// [Bit 3] EN0_PMI: Enable PMI when fixed counter 0 overflows. /// - UINT32 EN0_PMI:1; + UINT32 EN0_PMI : 1; /// /// [Bit 4] EN1_OS: Enable Fixed Counter 1 to count while CPL = 0. /// - UINT32 EN1_OS:1; + UINT32 EN1_OS : 1; /// /// [Bit 5] EN1_Usr: Enable Fixed Counter 1 to count while CPL > 0. /// - UINT32 EN1_Usr:1; + UINT32 EN1_Usr : 1; /// /// [Bit 6] AnyThread: When set to 1, it enables counting the associated /// event conditions occurring across all logical processors sharing a @@ -2901,19 +2843,19 @@ typedef union { /// associated event conditions occurring in the logical processor which /// programmed the MSR. If CPUID.0AH: EAX[7:0] > 2. /// - UINT32 AnyThread1:1; + UINT32 AnyThread1 : 1; /// /// [Bit 7] EN1_PMI: Enable PMI when fixed counter 1 overflows. /// - UINT32 EN1_PMI:1; + UINT32 EN1_PMI : 1; /// /// [Bit 8] EN2_OS: Enable Fixed Counter 2 to count while CPL = 0. /// - UINT32 EN2_OS:1; + UINT32 EN2_OS : 1; /// /// [Bit 9] EN2_Usr: Enable Fixed Counter 2 to count while CPL > 0. /// - UINT32 EN2_Usr:1; + UINT32 EN2_Usr : 1; /// /// [Bit 10] AnyThread: When set to 1, it enables counting the associated /// event conditions occurring across all logical processors sharing a @@ -2921,25 +2863,24 @@ typedef union { /// associated event conditions occurring in the logical processor which /// programmed the MSR. If CPUID.0AH: EAX[7:0] > 2. /// - UINT32 AnyThread2:1; + UINT32 AnyThread2 : 1; /// /// [Bit 11] EN2_PMI: Enable PMI when fixed counter 2 overflows. /// - UINT32 EN2_PMI:1; - UINT32 Reserved1:20; - UINT32 Reserved2:32; + UINT32 EN2_PMI : 1; + UINT32 Reserved1 : 20; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_FIXED_CTR_CTRL_REGISTER; - /** Global Performance Counter Status (RO). If CPUID.0AH: EAX[7:0] > 0. @@ -2957,7 +2898,7 @@ typedef union { @endcode @note MSR_IA32_PERF_GLOBAL_STATUS is defined as IA32_PERF_GLOBAL_STATUS in SDM. **/ -#define MSR_IA32_PERF_GLOBAL_STATUS 0x0000038E +#define MSR_IA32_PERF_GLOBAL_STATUS 0x0000038E /** MSR information returned for MSR index #MSR_IA32_PERF_GLOBAL_STATUS @@ -2971,87 +2912,86 @@ typedef union { /// [Bit 0] Ovf_PMC0: Overflow status of IA32_PMC0. If CPUID.0AH: /// EAX[15:8] > 0. /// - UINT32 Ovf_PMC0:1; + UINT32 Ovf_PMC0 : 1; /// /// [Bit 1] Ovf_PMC1: Overflow status of IA32_PMC1. If CPUID.0AH: /// EAX[15:8] > 1. /// - UINT32 Ovf_PMC1:1; + UINT32 Ovf_PMC1 : 1; /// /// [Bit 2] Ovf_PMC2: Overflow status of IA32_PMC2. If CPUID.0AH: /// EAX[15:8] > 2. /// - UINT32 Ovf_PMC2:1; + UINT32 Ovf_PMC2 : 1; /// /// [Bit 3] Ovf_PMC3: Overflow status of IA32_PMC3. If CPUID.0AH: /// EAX[15:8] > 3. /// - UINT32 Ovf_PMC3:1; - UINT32 Reserved1:28; + UINT32 Ovf_PMC3 : 1; + UINT32 Reserved1 : 28; /// /// [Bit 32] Ovf_FixedCtr0: Overflow status of IA32_FIXED_CTR0. If /// CPUID.0AH: EAX[7:0] > 1. /// - UINT32 Ovf_FixedCtr0:1; + UINT32 Ovf_FixedCtr0 : 1; /// /// [Bit 33] Ovf_FixedCtr1: Overflow status of IA32_FIXED_CTR1. If /// CPUID.0AH: EAX[7:0] > 1. /// - UINT32 Ovf_FixedCtr1:1; + UINT32 Ovf_FixedCtr1 : 1; /// /// [Bit 34] Ovf_FixedCtr2: Overflow status of IA32_FIXED_CTR2. If /// CPUID.0AH: EAX[7:0] > 1. /// - UINT32 Ovf_FixedCtr2:1; - UINT32 Reserved2:20; + UINT32 Ovf_FixedCtr2 : 1; + UINT32 Reserved2 : 20; /// /// [Bit 55] Trace_ToPA_PMI: A PMI occurred due to a ToPA entry memory /// buffer was completely filled. If (CPUID.(EAX=07H, ECX=0):EBX[25] = 1) /// && IA32_RTIT_CTL.ToPA = 1. /// - UINT32 Trace_ToPA_PMI:1; - UINT32 Reserved3:2; + UINT32 Trace_ToPA_PMI : 1; + UINT32 Reserved3 : 2; /// /// [Bit 58] LBR_Frz: LBRs are frozen due to - /// IA32_DEBUGCTL.FREEZE_LBR_ON_PMI=1, - The LBR stack overflowed. If /// CPUID.0AH: EAX[7:0] > 3. /// - UINT32 LBR_Frz:1; + UINT32 LBR_Frz : 1; /// /// [Bit 59] CTR_Frz: Performance counters in the core PMU are frozen due /// to - IA32_DEBUGCTL.FREEZE_PERFMON_ON_ PMI=1, - one or more core PMU /// counters overflowed. If CPUID.0AH: EAX[7:0] > 3. /// - UINT32 CTR_Frz:1; + UINT32 CTR_Frz : 1; /// /// [Bit 60] ASCI: Data in the performance counters in the core PMU may /// include contributions from the direct or indirect operation intel SGX /// to protect an enclave. If CPUID.(EAX=07H, ECX=0):EBX[2] = 1. /// - UINT32 ASCI:1; + UINT32 ASCI : 1; /// /// [Bit 61] Ovf_Uncore: Uncore counter overflow status. If CPUID.0AH: /// EAX[7:0] > 2. /// - UINT32 Ovf_Uncore:1; + UINT32 Ovf_Uncore : 1; /// /// [Bit 62] OvfBuf: DS SAVE area Buffer overflow status. If CPUID.0AH: /// EAX[7:0] > 0. /// - UINT32 OvfBuf:1; + UINT32 OvfBuf : 1; /// /// [Bit 63] CondChgd: status bits of this register has changed. If /// CPUID.0AH: EAX[7:0] > 0. /// - UINT32 CondChgd:1; + UINT32 CondChgd : 1; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_PERF_GLOBAL_STATUS_REGISTER; - /** Global Performance Counter Control (R/W) Counter increments while the result of ANDing respective enable bit in this MSR with the corresponding OS or USR @@ -3073,7 +3013,7 @@ typedef union { @endcode @note MSR_IA32_PERF_GLOBAL_CTRL is defined as IA32_PERF_GLOBAL_CTRL in SDM. **/ -#define MSR_IA32_PERF_GLOBAL_CTRL 0x0000038F +#define MSR_IA32_PERF_GLOBAL_CTRL 0x0000038F /** MSR information returned for MSR index #MSR_IA32_PERF_GLOBAL_CTRL @@ -3081,28 +3021,27 @@ typedef union { typedef union { /// /// Individual bit fields -/// + /// struct { /// /// [Bits 31:0] EN_PMCn. If CPUID.0AH: EAX[15:8] > n. /// Enable bitmask. Only the first n-1 bits are valid. /// Bits n..31 are reserved. /// - UINT32 EN_PMCn:32; + UINT32 EN_PMCn : 32; /// /// [Bits 63:32] EN_FIXED_CTRn. If CPUID.0AH: EDX[4:0] > n. /// Enable bitmask. Only the first n-1 bits are valid. /// Bits 31:n are reserved. /// - UINT32 EN_FIXED_CTRn:32; + UINT32 EN_FIXED_CTRn : 32; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_PERF_GLOBAL_CTRL_REGISTER; - /** Global Performance Counter Overflow Control (R/W). If CPUID.0AH: EAX[7:0] > 0 && CPUID.0AH: EAX[7:0] <= 3. @@ -3122,7 +3061,7 @@ typedef union { @endcode @note MSR_IA32_PERF_GLOBAL_OVF_CTRL is defined as IA32_PERF_GLOBAL_OVF_CTRL in SDM. **/ -#define MSR_IA32_PERF_GLOBAL_OVF_CTRL 0x00000390 +#define MSR_IA32_PERF_GLOBAL_OVF_CTRL 0x00000390 /** MSR information returned for MSR index #MSR_IA32_PERF_GLOBAL_OVF_CTRL @@ -3137,41 +3076,40 @@ typedef union { /// Clear bitmask. Only the first n-1 bits are valid. /// Bits 31:n are reserved. /// - UINT32 Ovf_PMCn:32; + UINT32 Ovf_PMCn : 32; /// /// [Bits 54:32] Set 1 to Clear Ovf_FIXED_CTR0 bit. /// If CPUID.0AH: EDX[4:0] > n. /// Clear bitmask. Only the first n-1 bits are valid. /// Bits 22:n are reserved. /// - UINT32 Ovf_FIXED_CTRn:23; + UINT32 Ovf_FIXED_CTRn : 23; /// /// [Bit 55] Set 1 to Clear Trace_ToPA_PMI bit. If (CPUID.(EAX=07H, /// ECX=0):EBX[25] = 1) && IA32_RTIT_CTL.ToPA = 1. /// - UINT32 Trace_ToPA_PMI:1; - UINT32 Reserved2:5; + UINT32 Trace_ToPA_PMI : 1; + UINT32 Reserved2 : 5; /// /// [Bit 61] Set 1 to Clear Ovf_Uncore bit. Introduced at Display Family / /// Display Model 06_2EH. /// - UINT32 Ovf_Uncore:1; + UINT32 Ovf_Uncore : 1; /// /// [Bit 62] Set 1 to Clear OvfBuf: bit. If CPUID.0AH: EAX[7:0] > 0. /// - UINT32 OvfBuf:1; + UINT32 OvfBuf : 1; /// /// [Bit 63] Set to 1to clear CondChgd: bit. If CPUID.0AH: EAX[7:0] > 0. /// - UINT32 CondChgd:1; + UINT32 CondChgd : 1; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_PERF_GLOBAL_OVF_CTRL_REGISTER; - /** Global Performance Counter Overflow Reset Control (R/W). If CPUID.0AH: EAX[7:0] > 3. @@ -3191,7 +3129,7 @@ typedef union { @endcode @note MSR_IA32_PERF_GLOBAL_STATUS_RESET is defined as IA32_PERF_GLOBAL_STATUS_RESET in SDM. **/ -#define MSR_IA32_PERF_GLOBAL_STATUS_RESET 0x00000390 +#define MSR_IA32_PERF_GLOBAL_STATUS_RESET 0x00000390 /** MSR information returned for MSR index #MSR_IA32_PERF_GLOBAL_STATUS_RESET @@ -3206,53 +3144,52 @@ typedef union { /// Clear bitmask. Only the first n-1 bits are valid. /// Bits 31:n are reserved. /// - UINT32 Ovf_PMCn:32; + UINT32 Ovf_PMCn : 32; /// /// [Bits 54:32] Set 1 to Clear Ovf_FIXED_CTR0 bit. /// If CPUID.0AH: EDX[4:0] > n. /// Clear bitmask. Only the first n-1 bits are valid. /// Bits 22:n are reserved. /// - UINT32 Ovf_FIXED_CTRn:23; + UINT32 Ovf_FIXED_CTRn : 23; /// /// [Bit 55] Set 1 to Clear Trace_ToPA_PMI bit. If (CPUID.(EAX=07H, /// ECX=0):EBX[25] = 1) && IA32_RTIT_CTL.ToPA[8] = 1. /// - UINT32 Trace_ToPA_PMI:1; - UINT32 Reserved2:2; + UINT32 Trace_ToPA_PMI : 1; + UINT32 Reserved2 : 2; /// /// [Bit 58] Set 1 to Clear LBR_Frz bit. If CPUID.0AH: EAX[7:0] > 3. /// - UINT32 LBR_Frz:1; + UINT32 LBR_Frz : 1; /// /// [Bit 59] Set 1 to Clear CTR_Frz bit. If CPUID.0AH: EAX[7:0] > 3. /// - UINT32 CTR_Frz:1; + UINT32 CTR_Frz : 1; /// /// [Bit 60] Set 1 to Clear ASCI bit. If CPUID.0AH: EAX[7:0] > 3. /// - UINT32 ASCI:1; + UINT32 ASCI : 1; /// /// [Bit 61] Set 1 to Clear Ovf_Uncore bit. Introduced at Display Family / /// Display Model 06_2EH. /// - UINT32 Ovf_Uncore:1; + UINT32 Ovf_Uncore : 1; /// /// [Bit 62] Set 1 to Clear OvfBuf: bit. If CPUID.0AH: EAX[7:0] > 0. /// - UINT32 OvfBuf:1; + UINT32 OvfBuf : 1; /// /// [Bit 63] Set to 1to clear CondChgd: bit. If CPUID.0AH: EAX[7:0] > 0. /// - UINT32 CondChgd:1; + UINT32 CondChgd : 1; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_PERF_GLOBAL_STATUS_RESET_REGISTER; - /** Global Performance Counter Overflow Set Control (R/W). If CPUID.0AH: EAX[7:0] > 3. @@ -3272,7 +3209,7 @@ typedef union { @endcode @note MSR_IA32_PERF_GLOBAL_STATUS_SET is defined as IA32_PERF_GLOBAL_STATUS_SET in SDM. **/ -#define MSR_IA32_PERF_GLOBAL_STATUS_SET 0x00000391 +#define MSR_IA32_PERF_GLOBAL_STATUS_SET 0x00000391 /** MSR information returned for MSR index #MSR_IA32_PERF_GLOBAL_STATUS_SET @@ -3287,48 +3224,47 @@ typedef union { /// Set bitmask. Only the first n-1 bits are valid. /// Bits 31:n are reserved. /// - UINT32 Ovf_PMCn:32; + UINT32 Ovf_PMCn : 32; /// /// [Bits 54:32] Set 1 to cause Ovf_FIXED_CTRn = 1. /// If CPUID.0AH: EAX[7:0] > n. /// Set bitmask. Only the first n-1 bits are valid. /// Bits 22:n are reserved. /// - UINT32 Ovf_FIXED_CTRn:23; + UINT32 Ovf_FIXED_CTRn : 23; /// /// [Bit 55] Set 1 to cause Trace_ToPA_PMI = 1. If CPUID.0AH: EAX[7:0] > 3. /// - UINT32 Trace_ToPA_PMI:1; - UINT32 Reserved2:2; + UINT32 Trace_ToPA_PMI : 1; + UINT32 Reserved2 : 2; /// /// [Bit 58] Set 1 to cause LBR_Frz = 1. If CPUID.0AH: EAX[7:0] > 3. /// - UINT32 LBR_Frz:1; + UINT32 LBR_Frz : 1; /// /// [Bit 59] Set 1 to cause CTR_Frz = 1. If CPUID.0AH: EAX[7:0] > 3. /// - UINT32 CTR_Frz:1; + UINT32 CTR_Frz : 1; /// /// [Bit 60] Set 1 to cause ASCI = 1. If CPUID.0AH: EAX[7:0] > 3. /// - UINT32 ASCI:1; + UINT32 ASCI : 1; /// /// [Bit 61] Set 1 to cause Ovf_Uncore = 1. If CPUID.0AH: EAX[7:0] > 3. /// - UINT32 Ovf_Uncore:1; + UINT32 Ovf_Uncore : 1; /// /// [Bit 62] Set 1 to cause OvfBuf = 1. If CPUID.0AH: EAX[7:0] > 3. /// - UINT32 OvfBuf:1; - UINT32 Reserved3:1; + UINT32 OvfBuf : 1; + UINT32 Reserved3 : 1; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_PERF_GLOBAL_STATUS_SET_REGISTER; - /** Indicator of core perfmon interface is in use (RO). If CPUID.0AH: EAX[7:0] > 3. @@ -3347,7 +3283,7 @@ typedef union { @endcode @note MSR_IA32_PERF_GLOBAL_INUSE is defined as IA32_PERF_GLOBAL_INUSE in SDM. **/ -#define MSR_IA32_PERF_GLOBAL_INUSE 0x00000392 +#define MSR_IA32_PERF_GLOBAL_INUSE 0x00000392 /** MSR information returned for MSR index #MSR_IA32_PERF_GLOBAL_INUSE @@ -3362,26 +3298,25 @@ typedef union { /// Status bitmask. Only the first n-1 bits are valid. /// Bits 31:n are reserved. /// - UINT32 IA32_PERFEVTSELn:32; + UINT32 IA32_PERFEVTSELn : 32; /// /// [Bits 62:32] IA32_FIXED_CTRn in use. /// If CPUID.0AH: EAX[7:0] > n. /// Status bitmask. Only the first n-1 bits are valid. /// Bits 30:n are reserved. /// - UINT32 IA32_FIXED_CTRn:31; + UINT32 IA32_FIXED_CTRn : 31; /// /// [Bit 63] PMI in use. /// - UINT32 PMI:1; + UINT32 PMI : 1; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_PERF_GLOBAL_INUSE_REGISTER; - /** PEBS Control (R/W). @@ -3400,7 +3335,7 @@ typedef union { @endcode @note MSR_IA32_PEBS_ENABLE is defined as IA32_PEBS_ENABLE in SDM. **/ -#define MSR_IA32_PEBS_ENABLE 0x000003F1 +#define MSR_IA32_PEBS_ENABLE 0x000003F1 /** MSR information returned for MSR index #MSR_IA32_PEBS_ENABLE @@ -3414,25 +3349,24 @@ typedef union { /// [Bit 0] Enable PEBS on IA32_PMC0. Introduced at Display Family / /// Display Model 06_0FH. /// - UINT32 Enable:1; + UINT32 Enable : 1; /// /// [Bits 3:1] Reserved or Model specific. /// - UINT32 Reserved1:3; - UINT32 Reserved2:28; + UINT32 Reserved1 : 3; + UINT32 Reserved2 : 28; /// /// [Bits 35:32] Reserved or Model specific. /// - UINT32 Reserved3:4; - UINT32 Reserved4:28; + UINT32 Reserved3 : 4; + UINT32 Reserved4 : 28; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_PEBS_ENABLE_REGISTER; - /** MCn_CTL. If IA32_MCG_CAP.CNT > n. @@ -3478,38 +3412,37 @@ typedef union { MSR_IA32_MC28_CTL is defined as IA32_MC28_CTL in SDM. @{ **/ -#define MSR_IA32_MC0_CTL 0x00000400 -#define MSR_IA32_MC1_CTL 0x00000404 -#define MSR_IA32_MC2_CTL 0x00000408 -#define MSR_IA32_MC3_CTL 0x0000040C -#define MSR_IA32_MC4_CTL 0x00000410 -#define MSR_IA32_MC5_CTL 0x00000414 -#define MSR_IA32_MC6_CTL 0x00000418 -#define MSR_IA32_MC7_CTL 0x0000041C -#define MSR_IA32_MC8_CTL 0x00000420 -#define MSR_IA32_MC9_CTL 0x00000424 -#define MSR_IA32_MC10_CTL 0x00000428 -#define MSR_IA32_MC11_CTL 0x0000042C -#define MSR_IA32_MC12_CTL 0x00000430 -#define MSR_IA32_MC13_CTL 0x00000434 -#define MSR_IA32_MC14_CTL 0x00000438 -#define MSR_IA32_MC15_CTL 0x0000043C -#define MSR_IA32_MC16_CTL 0x00000440 -#define MSR_IA32_MC17_CTL 0x00000444 -#define MSR_IA32_MC18_CTL 0x00000448 -#define MSR_IA32_MC19_CTL 0x0000044C -#define MSR_IA32_MC20_CTL 0x00000450 -#define MSR_IA32_MC21_CTL 0x00000454 -#define MSR_IA32_MC22_CTL 0x00000458 -#define MSR_IA32_MC23_CTL 0x0000045C -#define MSR_IA32_MC24_CTL 0x00000460 -#define MSR_IA32_MC25_CTL 0x00000464 -#define MSR_IA32_MC26_CTL 0x00000468 -#define MSR_IA32_MC27_CTL 0x0000046C -#define MSR_IA32_MC28_CTL 0x00000470 +#define MSR_IA32_MC0_CTL 0x00000400 +#define MSR_IA32_MC1_CTL 0x00000404 +#define MSR_IA32_MC2_CTL 0x00000408 +#define MSR_IA32_MC3_CTL 0x0000040C +#define MSR_IA32_MC4_CTL 0x00000410 +#define MSR_IA32_MC5_CTL 0x00000414 +#define MSR_IA32_MC6_CTL 0x00000418 +#define MSR_IA32_MC7_CTL 0x0000041C +#define MSR_IA32_MC8_CTL 0x00000420 +#define MSR_IA32_MC9_CTL 0x00000424 +#define MSR_IA32_MC10_CTL 0x00000428 +#define MSR_IA32_MC11_CTL 0x0000042C +#define MSR_IA32_MC12_CTL 0x00000430 +#define MSR_IA32_MC13_CTL 0x00000434 +#define MSR_IA32_MC14_CTL 0x00000438 +#define MSR_IA32_MC15_CTL 0x0000043C +#define MSR_IA32_MC16_CTL 0x00000440 +#define MSR_IA32_MC17_CTL 0x00000444 +#define MSR_IA32_MC18_CTL 0x00000448 +#define MSR_IA32_MC19_CTL 0x0000044C +#define MSR_IA32_MC20_CTL 0x00000450 +#define MSR_IA32_MC21_CTL 0x00000454 +#define MSR_IA32_MC22_CTL 0x00000458 +#define MSR_IA32_MC23_CTL 0x0000045C +#define MSR_IA32_MC24_CTL 0x00000460 +#define MSR_IA32_MC25_CTL 0x00000464 +#define MSR_IA32_MC26_CTL 0x00000468 +#define MSR_IA32_MC27_CTL 0x0000046C +#define MSR_IA32_MC28_CTL 0x00000470 /// @} - /** MCn_STATUS. If IA32_MCG_CAP.CNT > n. @@ -3555,38 +3488,37 @@ typedef union { MSR_IA32_MC28_STATUS is defined as IA32_MC28_STATUS in SDM. @{ **/ -#define MSR_IA32_MC0_STATUS 0x00000401 -#define MSR_IA32_MC1_STATUS 0x00000405 -#define MSR_IA32_MC2_STATUS 0x00000409 -#define MSR_IA32_MC3_STATUS 0x0000040D -#define MSR_IA32_MC4_STATUS 0x00000411 -#define MSR_IA32_MC5_STATUS 0x00000415 -#define MSR_IA32_MC6_STATUS 0x00000419 -#define MSR_IA32_MC7_STATUS 0x0000041D -#define MSR_IA32_MC8_STATUS 0x00000421 -#define MSR_IA32_MC9_STATUS 0x00000425 -#define MSR_IA32_MC10_STATUS 0x00000429 -#define MSR_IA32_MC11_STATUS 0x0000042D -#define MSR_IA32_MC12_STATUS 0x00000431 -#define MSR_IA32_MC13_STATUS 0x00000435 -#define MSR_IA32_MC14_STATUS 0x00000439 -#define MSR_IA32_MC15_STATUS 0x0000043D -#define MSR_IA32_MC16_STATUS 0x00000441 -#define MSR_IA32_MC17_STATUS 0x00000445 -#define MSR_IA32_MC18_STATUS 0x00000449 -#define MSR_IA32_MC19_STATUS 0x0000044D -#define MSR_IA32_MC20_STATUS 0x00000451 -#define MSR_IA32_MC21_STATUS 0x00000455 -#define MSR_IA32_MC22_STATUS 0x00000459 -#define MSR_IA32_MC23_STATUS 0x0000045D -#define MSR_IA32_MC24_STATUS 0x00000461 -#define MSR_IA32_MC25_STATUS 0x00000465 -#define MSR_IA32_MC26_STATUS 0x00000469 -#define MSR_IA32_MC27_STATUS 0x0000046D -#define MSR_IA32_MC28_STATUS 0x00000471 +#define MSR_IA32_MC0_STATUS 0x00000401 +#define MSR_IA32_MC1_STATUS 0x00000405 +#define MSR_IA32_MC2_STATUS 0x00000409 +#define MSR_IA32_MC3_STATUS 0x0000040D +#define MSR_IA32_MC4_STATUS 0x00000411 +#define MSR_IA32_MC5_STATUS 0x00000415 +#define MSR_IA32_MC6_STATUS 0x00000419 +#define MSR_IA32_MC7_STATUS 0x0000041D +#define MSR_IA32_MC8_STATUS 0x00000421 +#define MSR_IA32_MC9_STATUS 0x00000425 +#define MSR_IA32_MC10_STATUS 0x00000429 +#define MSR_IA32_MC11_STATUS 0x0000042D +#define MSR_IA32_MC12_STATUS 0x00000431 +#define MSR_IA32_MC13_STATUS 0x00000435 +#define MSR_IA32_MC14_STATUS 0x00000439 +#define MSR_IA32_MC15_STATUS 0x0000043D +#define MSR_IA32_MC16_STATUS 0x00000441 +#define MSR_IA32_MC17_STATUS 0x00000445 +#define MSR_IA32_MC18_STATUS 0x00000449 +#define MSR_IA32_MC19_STATUS 0x0000044D +#define MSR_IA32_MC20_STATUS 0x00000451 +#define MSR_IA32_MC21_STATUS 0x00000455 +#define MSR_IA32_MC22_STATUS 0x00000459 +#define MSR_IA32_MC23_STATUS 0x0000045D +#define MSR_IA32_MC24_STATUS 0x00000461 +#define MSR_IA32_MC25_STATUS 0x00000465 +#define MSR_IA32_MC26_STATUS 0x00000469 +#define MSR_IA32_MC27_STATUS 0x0000046D +#define MSR_IA32_MC28_STATUS 0x00000471 /// @} - /** MCn_ADDR. If IA32_MCG_CAP.CNT > n. @@ -3632,38 +3564,37 @@ typedef union { MSR_IA32_MC28_ADDR is defined as IA32_MC28_ADDR in SDM. @{ **/ -#define MSR_IA32_MC0_ADDR 0x00000402 -#define MSR_IA32_MC1_ADDR 0x00000406 -#define MSR_IA32_MC2_ADDR 0x0000040A -#define MSR_IA32_MC3_ADDR 0x0000040E -#define MSR_IA32_MC4_ADDR 0x00000412 -#define MSR_IA32_MC5_ADDR 0x00000416 -#define MSR_IA32_MC6_ADDR 0x0000041A -#define MSR_IA32_MC7_ADDR 0x0000041E -#define MSR_IA32_MC8_ADDR 0x00000422 -#define MSR_IA32_MC9_ADDR 0x00000426 -#define MSR_IA32_MC10_ADDR 0x0000042A -#define MSR_IA32_MC11_ADDR 0x0000042E -#define MSR_IA32_MC12_ADDR 0x00000432 -#define MSR_IA32_MC13_ADDR 0x00000436 -#define MSR_IA32_MC14_ADDR 0x0000043A -#define MSR_IA32_MC15_ADDR 0x0000043E -#define MSR_IA32_MC16_ADDR 0x00000442 -#define MSR_IA32_MC17_ADDR 0x00000446 -#define MSR_IA32_MC18_ADDR 0x0000044A -#define MSR_IA32_MC19_ADDR 0x0000044E -#define MSR_IA32_MC20_ADDR 0x00000452 -#define MSR_IA32_MC21_ADDR 0x00000456 -#define MSR_IA32_MC22_ADDR 0x0000045A -#define MSR_IA32_MC23_ADDR 0x0000045E -#define MSR_IA32_MC24_ADDR 0x00000462 -#define MSR_IA32_MC25_ADDR 0x00000466 -#define MSR_IA32_MC26_ADDR 0x0000046A -#define MSR_IA32_MC27_ADDR 0x0000046E -#define MSR_IA32_MC28_ADDR 0x00000472 +#define MSR_IA32_MC0_ADDR 0x00000402 +#define MSR_IA32_MC1_ADDR 0x00000406 +#define MSR_IA32_MC2_ADDR 0x0000040A +#define MSR_IA32_MC3_ADDR 0x0000040E +#define MSR_IA32_MC4_ADDR 0x00000412 +#define MSR_IA32_MC5_ADDR 0x00000416 +#define MSR_IA32_MC6_ADDR 0x0000041A +#define MSR_IA32_MC7_ADDR 0x0000041E +#define MSR_IA32_MC8_ADDR 0x00000422 +#define MSR_IA32_MC9_ADDR 0x00000426 +#define MSR_IA32_MC10_ADDR 0x0000042A +#define MSR_IA32_MC11_ADDR 0x0000042E +#define MSR_IA32_MC12_ADDR 0x00000432 +#define MSR_IA32_MC13_ADDR 0x00000436 +#define MSR_IA32_MC14_ADDR 0x0000043A +#define MSR_IA32_MC15_ADDR 0x0000043E +#define MSR_IA32_MC16_ADDR 0x00000442 +#define MSR_IA32_MC17_ADDR 0x00000446 +#define MSR_IA32_MC18_ADDR 0x0000044A +#define MSR_IA32_MC19_ADDR 0x0000044E +#define MSR_IA32_MC20_ADDR 0x00000452 +#define MSR_IA32_MC21_ADDR 0x00000456 +#define MSR_IA32_MC22_ADDR 0x0000045A +#define MSR_IA32_MC23_ADDR 0x0000045E +#define MSR_IA32_MC24_ADDR 0x00000462 +#define MSR_IA32_MC25_ADDR 0x00000466 +#define MSR_IA32_MC26_ADDR 0x0000046A +#define MSR_IA32_MC27_ADDR 0x0000046E +#define MSR_IA32_MC28_ADDR 0x00000472 /// @} - /** MCn_MISC. If IA32_MCG_CAP.CNT > n. @@ -3709,38 +3640,37 @@ typedef union { MSR_IA32_MC28_MISC is defined as IA32_MC28_MISC in SDM. @{ **/ -#define MSR_IA32_MC0_MISC 0x00000403 -#define MSR_IA32_MC1_MISC 0x00000407 -#define MSR_IA32_MC2_MISC 0x0000040B -#define MSR_IA32_MC3_MISC 0x0000040F -#define MSR_IA32_MC4_MISC 0x00000413 -#define MSR_IA32_MC5_MISC 0x00000417 -#define MSR_IA32_MC6_MISC 0x0000041B -#define MSR_IA32_MC7_MISC 0x0000041F -#define MSR_IA32_MC8_MISC 0x00000423 -#define MSR_IA32_MC9_MISC 0x00000427 -#define MSR_IA32_MC10_MISC 0x0000042B -#define MSR_IA32_MC11_MISC 0x0000042F -#define MSR_IA32_MC12_MISC 0x00000433 -#define MSR_IA32_MC13_MISC 0x00000437 -#define MSR_IA32_MC14_MISC 0x0000043B -#define MSR_IA32_MC15_MISC 0x0000043F -#define MSR_IA32_MC16_MISC 0x00000443 -#define MSR_IA32_MC17_MISC 0x00000447 -#define MSR_IA32_MC18_MISC 0x0000044B -#define MSR_IA32_MC19_MISC 0x0000044F -#define MSR_IA32_MC20_MISC 0x00000453 -#define MSR_IA32_MC21_MISC 0x00000457 -#define MSR_IA32_MC22_MISC 0x0000045B -#define MSR_IA32_MC23_MISC 0x0000045F -#define MSR_IA32_MC24_MISC 0x00000463 -#define MSR_IA32_MC25_MISC 0x00000467 -#define MSR_IA32_MC26_MISC 0x0000046B -#define MSR_IA32_MC27_MISC 0x0000046F -#define MSR_IA32_MC28_MISC 0x00000473 +#define MSR_IA32_MC0_MISC 0x00000403 +#define MSR_IA32_MC1_MISC 0x00000407 +#define MSR_IA32_MC2_MISC 0x0000040B +#define MSR_IA32_MC3_MISC 0x0000040F +#define MSR_IA32_MC4_MISC 0x00000413 +#define MSR_IA32_MC5_MISC 0x00000417 +#define MSR_IA32_MC6_MISC 0x0000041B +#define MSR_IA32_MC7_MISC 0x0000041F +#define MSR_IA32_MC8_MISC 0x00000423 +#define MSR_IA32_MC9_MISC 0x00000427 +#define MSR_IA32_MC10_MISC 0x0000042B +#define MSR_IA32_MC11_MISC 0x0000042F +#define MSR_IA32_MC12_MISC 0x00000433 +#define MSR_IA32_MC13_MISC 0x00000437 +#define MSR_IA32_MC14_MISC 0x0000043B +#define MSR_IA32_MC15_MISC 0x0000043F +#define MSR_IA32_MC16_MISC 0x00000443 +#define MSR_IA32_MC17_MISC 0x00000447 +#define MSR_IA32_MC18_MISC 0x0000044B +#define MSR_IA32_MC19_MISC 0x0000044F +#define MSR_IA32_MC20_MISC 0x00000453 +#define MSR_IA32_MC21_MISC 0x00000457 +#define MSR_IA32_MC22_MISC 0x0000045B +#define MSR_IA32_MC23_MISC 0x0000045F +#define MSR_IA32_MC24_MISC 0x00000463 +#define MSR_IA32_MC25_MISC 0x00000467 +#define MSR_IA32_MC26_MISC 0x0000046B +#define MSR_IA32_MC27_MISC 0x0000046F +#define MSR_IA32_MC28_MISC 0x00000473 /// @} - /** Reporting Register of Basic VMX Capabilities (R/O) See Appendix A.1, "Basic VMX Information.". If CPUID.01H:ECX.[5] = 1. @@ -3757,7 +3687,7 @@ typedef union { @endcode @note MSR_IA32_VMX_BASIC is defined as IA32_VMX_BASIC in SDM. **/ -#define MSR_IA32_VMX_BASIC 0x00000480 +#define MSR_IA32_VMX_BASIC 0x00000480 /** MSR information returned for MSR index #MSR_IA32_VMX_BASIC @@ -3777,15 +3707,15 @@ typedef union { /// processors produced prior to this change, bit 31 of this MSR was read /// as 0. /// - UINT32 VmcsRevisonId:31; - UINT32 MustBeZero:1; + UINT32 VmcsRevisonId : 31; + UINT32 MustBeZero : 1; /// /// [Bit 44:32] Reports the number of bytes that software should allocate /// for the VMXON region and any VMCS region. It is a value greater than /// 0 and at most 4096(bit 44 is set if and only if bits 43:32 are clear). /// - UINT32 VmcsSize:13; - UINT32 Reserved1:3; + UINT32 VmcsSize : 13; + UINT32 Reserved1 : 3; /// /// [Bit 48] Indicates the width of the physical addresses that may be used /// for the VMXON region, each VMCS, and data structures referenced by @@ -3798,13 +3728,13 @@ typedef union { /// @note On processors that support Intel 64 architecture, the pointer /// must not set bits beyond the processor's physical address width. /// - UINT32 VmcsAddressWidth:1; + UINT32 VmcsAddressWidth : 1; /// /// [Bit 49] If bit 49 is read as 1, the logical processor supports the /// dual-monitor treatment of system-management interrupts and /// system-management mode. See Section 34.15 for details of this treatment. /// - UINT32 DualMonitor:1; + UINT32 DualMonitor : 1; /// /// [Bit 53:50] report the memory type that should be used for the VMCS, /// for data structures referenced by pointers in the VMCS (I/O bitmaps, @@ -3830,14 +3760,14 @@ typedef union { /// performance of software accesses to those structures to suffer. /// /// - UINT32 MemoryType:4; + UINT32 MemoryType : 4; /// /// [Bit 54] If bit 54 is read as 1, the processor reports information in /// the VM-exit instruction-information field on VM exitsdue to execution /// of the INS and OUTS instructions (see Section 27.2.4). This reporting /// is done only if this bit is read as 1. /// - UINT32 InsOutsReporting:1; + UINT32 InsOutsReporting : 1; /// /// [Bit 55] Bit 55 is read as 1 if any VMX controls that default to 1 may /// be cleared to 0. See Appendix A.2 for details. It also reports support @@ -3846,13 +3776,13 @@ typedef union { /// IA32_VMX_TRUE_ENTRY_CTLS. See Appendix A.3.1, Appendix A.3.2, /// Appendix A.4, and Appendix A.5 for details. /// - UINT32 VmxControls:1; - UINT32 Reserved2:8; + UINT32 VmxControls : 1; + UINT32 Reserved2 : 8; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_VMX_BASIC_REGISTER; /// @@ -3864,7 +3794,6 @@ typedef union { /// @} /// - /** Capability Reporting Register of Pinbased VM-execution Controls (R/O) See Appendix A.3.1, "Pin-Based VMExecution Controls.". If CPUID.01H:ECX.[5] = 1. @@ -3881,8 +3810,7 @@ typedef union { @endcode @note MSR_IA32_VMX_PINBASED_CTLS is defined as IA32_VMX_PINBASED_CTLS in SDM. **/ -#define MSR_IA32_VMX_PINBASED_CTLS 0x00000481 - +#define MSR_IA32_VMX_PINBASED_CTLS 0x00000481 /** Capability Reporting Register of Primary Processor-based VM-execution @@ -3901,8 +3829,7 @@ typedef union { @endcode @note MSR_IA32_VMX_PROCBASED_CTLS is defined as IA32_VMX_PROCBASED_CTLS in SDM. **/ -#define MSR_IA32_VMX_PROCBASED_CTLS 0x00000482 - +#define MSR_IA32_VMX_PROCBASED_CTLS 0x00000482 /** Capability Reporting Register of VM-exit Controls (R/O) See Appendix A.4, @@ -3920,8 +3847,7 @@ typedef union { @endcode @note MSR_IA32_VMX_EXIT_CTLS is defined as IA32_VMX_EXIT_CTLS in SDM. **/ -#define MSR_IA32_VMX_EXIT_CTLS 0x00000483 - +#define MSR_IA32_VMX_EXIT_CTLS 0x00000483 /** Capability Reporting Register of VMentry Controls (R/O) See Appendix A.5, @@ -3939,8 +3865,7 @@ typedef union { @endcode @note MSR_IA32_VMX_ENTRY_CTLS is defined as IA32_VMX_ENTRY_CTLS in SDM. **/ -#define MSR_IA32_VMX_ENTRY_CTLS 0x00000484 - +#define MSR_IA32_VMX_ENTRY_CTLS 0x00000484 /** Reporting Register of Miscellaneous VMX Capabilities (R/O) See Appendix A.6, @@ -3958,7 +3883,7 @@ typedef union { @endcode @note MSR_IA32_VMX_MISC is defined as IA32_VMX_MISC in SDM. **/ -#define MSR_IA32_VMX_MISC 0x00000485 +#define MSR_IA32_VMX_MISC 0x00000485 /** MSR information returned for MSR index #IA32_VMX_MISC @@ -3974,27 +3899,27 @@ typedef union { /// Specifically, the VMX-preemption timer (if it is active) counts down by /// 1 every time bit X in the TSC changes due to a TSC increment. /// - UINT32 VmxTimerRatio:5; + UINT32 VmxTimerRatio : 5; /// /// [Bit 5] If bit 5 is read as 1, VM exits store the value of IA32_EFER.LMA /// into the "IA-32e mode guest" VM-entry control;see Section 27.2 for more /// details. This bit is read as 1 on any logical processor that supports /// the 1-setting of the "unrestricted guest" VM-execution control. /// - UINT32 VmExitEferLma:1; + UINT32 VmExitEferLma : 1; /// /// [Bit 6] reports (if set) the support for activity state 1 (HLT). /// - UINT32 HltActivityStateSupported:1; + UINT32 HltActivityStateSupported : 1; /// /// [Bit 7] reports (if set) the support for activity state 2 (shutdown). /// - UINT32 ShutdownActivityStateSupported:1; + UINT32 ShutdownActivityStateSupported : 1; /// /// [Bit 8] reports (if set) the support for activity state 3 (wait-for-SIPI). /// - UINT32 WaitForSipiActivityStateSupported:1; - UINT32 Reserved1:5; + UINT32 WaitForSipiActivityStateSupported : 1; + UINT32 Reserved1 : 5; /// /// [Bit 14] If read as 1, Intel(R) Processor Trace (Intel PT) can be used /// in VMX operation. If the processor supports Intel PT but does not allow @@ -4004,19 +3929,19 @@ typedef union { /// operation) using the WRMSR instruction causes a general-protection /// exception. /// - UINT32 ProcessorTraceSupported:1; + UINT32 ProcessorTraceSupported : 1; /// /// [Bit 15] If read as 1, the RDMSR instruction can be used in system- /// management mode (SMM) to read the IA32_SMBASE MSR (MSR address 9EH). /// See Section 34.15.6.3. /// - UINT32 SmBaseMsrSupported:1; + UINT32 SmBaseMsrSupported : 1; /// /// [Bits 24:16] Indicate the number of CR3-target values supported by the /// processor. This number is a value between 0 and 256, inclusive (bit 24 /// is set if and only if bits 23:16 are clear). /// - UINT32 NumberOfCr3TargetValues:9; + UINT32 NumberOfCr3TargetValues : 9; /// /// [Bit 27:25] Bits 27:25 is used to compute the recommended maximum /// number of MSRs that should appear in the VM-exit MSR-store list, the @@ -4026,39 +3951,38 @@ typedef union { /// limit is exceeded, undefined processor behavior may result (including a /// machine check during the VMX transition). /// - UINT32 MsrStoreListMaximum:3; + UINT32 MsrStoreListMaximum : 3; /// /// [Bit 28] If read as 1, bit 2 of the IA32_SMM_MONITOR_CTL can be set /// to 1. VMXOFF unblocks SMIs unless IA32_SMM_MONITOR_CTL[bit 2] is 1 /// (see Section 34.14.4). /// - UINT32 BlockSmiSupported:1; + UINT32 BlockSmiSupported : 1; /// /// [Bit 29] read as 1, software can use VMWRITE to write to any supported /// field in the VMCS; otherwise, VMWRITE cannot be used to modify VM-exit /// information fields. /// - UINT32 VmWriteSupported:1; + UINT32 VmWriteSupported : 1; /// /// [Bit 30] If read as 1, VM entry allows injection of a software /// interrupt, software exception, or privileged software exception with an /// instruction length of 0. /// - UINT32 VmInjectSupported:1; - UINT32 Reserved2:1; + UINT32 VmInjectSupported : 1; + UINT32 Reserved2 : 1; /// /// [Bits 63:32] Reports the 32-bit MSEG revision identifier used by the /// processor. /// - UINT32 MsegRevisionIdentifier:32; + UINT32 MsegRevisionIdentifier : 32; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } IA32_VMX_MISC_REGISTER; - /** Capability Reporting Register of CR0 Bits Fixed to 0 (R/O) See Appendix A.7, "VMX-Fixed Bits in CR0.". If CPUID.01H:ECX.[5] = 1. @@ -4075,8 +3999,7 @@ typedef union { @endcode @note MSR_IA32_VMX_CR0_FIXED0 is defined as IA32_VMX_CR0_FIXED0 in SDM. **/ -#define MSR_IA32_VMX_CR0_FIXED0 0x00000486 - +#define MSR_IA32_VMX_CR0_FIXED0 0x00000486 /** Capability Reporting Register of CR0 Bits Fixed to 1 (R/O) See Appendix A.7, @@ -4094,8 +4017,7 @@ typedef union { @endcode @note MSR_IA32_VMX_CR0_FIXED1 is defined as IA32_VMX_CR0_FIXED1 in SDM. **/ -#define MSR_IA32_VMX_CR0_FIXED1 0x00000487 - +#define MSR_IA32_VMX_CR0_FIXED1 0x00000487 /** Capability Reporting Register of CR4 Bits Fixed to 0 (R/O) See Appendix A.8, @@ -4113,8 +4035,7 @@ typedef union { @endcode @note MSR_IA32_VMX_CR4_FIXED0 is defined as IA32_VMX_CR4_FIXED0 in SDM. **/ -#define MSR_IA32_VMX_CR4_FIXED0 0x00000488 - +#define MSR_IA32_VMX_CR4_FIXED0 0x00000488 /** Capability Reporting Register of CR4 Bits Fixed to 1 (R/O) See Appendix A.8, @@ -4132,8 +4053,7 @@ typedef union { @endcode @note MSR_IA32_VMX_CR4_FIXED1 is defined as IA32_VMX_CR4_FIXED1 in SDM. **/ -#define MSR_IA32_VMX_CR4_FIXED1 0x00000489 - +#define MSR_IA32_VMX_CR4_FIXED1 0x00000489 /** Capability Reporting Register of VMCS Field Enumeration (R/O) See Appendix @@ -4151,8 +4071,7 @@ typedef union { @endcode @note MSR_IA32_VMX_VMCS_ENUM is defined as IA32_VMX_VMCS_ENUM in SDM. **/ -#define MSR_IA32_VMX_VMCS_ENUM 0x0000048A - +#define MSR_IA32_VMX_VMCS_ENUM 0x0000048A /** Capability Reporting Register of Secondary Processor-based VM-execution @@ -4171,8 +4090,7 @@ typedef union { @endcode @note MSR_IA32_VMX_PROCBASED_CTLS2 is defined as IA32_VMX_PROCBASED_CTLS2 in SDM. **/ -#define MSR_IA32_VMX_PROCBASED_CTLS2 0x0000048B - +#define MSR_IA32_VMX_PROCBASED_CTLS2 0x0000048B /** Capability Reporting Register of EPT and VPID (R/O) See Appendix A.10, @@ -4191,8 +4109,7 @@ typedef union { @endcode @note MSR_IA32_VMX_EPT_VPID_CAP is defined as IA32_VMX_EPT_VPID_CAP in SDM. **/ -#define MSR_IA32_VMX_EPT_VPID_CAP 0x0000048C - +#define MSR_IA32_VMX_EPT_VPID_CAP 0x0000048C /** Capability Reporting Register of Pinbased VM-execution Flex Controls (R/O) @@ -4211,8 +4128,7 @@ typedef union { @endcode @note MSR_IA32_VMX_TRUE_PINBASED_CTLS is defined as IA32_VMX_TRUE_PINBASED_CTLS in SDM. **/ -#define MSR_IA32_VMX_TRUE_PINBASED_CTLS 0x0000048D - +#define MSR_IA32_VMX_TRUE_PINBASED_CTLS 0x0000048D /** Capability Reporting Register of Primary Processor-based VM-execution Flex @@ -4231,8 +4147,7 @@ typedef union { @endcode @note MSR_IA32_VMX_TRUE_PROCBASED_CTLS is defined as IA32_VMX_TRUE_PROCBASED_CTLS in SDM. **/ -#define MSR_IA32_VMX_TRUE_PROCBASED_CTLS 0x0000048E - +#define MSR_IA32_VMX_TRUE_PROCBASED_CTLS 0x0000048E /** Capability Reporting Register of VM-exit Flex Controls (R/O) See Appendix @@ -4250,8 +4165,7 @@ typedef union { @endcode @note MSR_IA32_VMX_TRUE_EXIT_CTLS is defined as IA32_VMX_TRUE_EXIT_CTLS in SDM. **/ -#define MSR_IA32_VMX_TRUE_EXIT_CTLS 0x0000048F - +#define MSR_IA32_VMX_TRUE_EXIT_CTLS 0x0000048F /** Capability Reporting Register of VMentry Flex Controls (R/O) See Appendix @@ -4269,8 +4183,7 @@ typedef union { @endcode @note MSR_IA32_VMX_TRUE_ENTRY_CTLS is defined as IA32_VMX_TRUE_ENTRY_CTLS in SDM. **/ -#define MSR_IA32_VMX_TRUE_ENTRY_CTLS 0x00000490 - +#define MSR_IA32_VMX_TRUE_ENTRY_CTLS 0x00000490 /** Capability Reporting Register of VMfunction Controls (R/O). If( @@ -4288,8 +4201,7 @@ typedef union { @endcode @note MSR_IA32_VMX_VMFUNC is defined as IA32_VMX_VMFUNC in SDM. **/ -#define MSR_IA32_VMX_VMFUNC 0x00000491 - +#define MSR_IA32_VMX_VMFUNC 0x00000491 /** Full Width Writable IA32_PMCn Alias (R/W). (If CPUID.0AH: EAX[15:8] > n) && @@ -4316,17 +4228,16 @@ typedef union { MSR_IA32_A_PMC7 is defined as IA32_A_PMC7 in SDM. @{ **/ -#define MSR_IA32_A_PMC0 0x000004C1 -#define MSR_IA32_A_PMC1 0x000004C2 -#define MSR_IA32_A_PMC2 0x000004C3 -#define MSR_IA32_A_PMC3 0x000004C4 -#define MSR_IA32_A_PMC4 0x000004C5 -#define MSR_IA32_A_PMC5 0x000004C6 -#define MSR_IA32_A_PMC6 0x000004C7 -#define MSR_IA32_A_PMC7 0x000004C8 +#define MSR_IA32_A_PMC0 0x000004C1 +#define MSR_IA32_A_PMC1 0x000004C2 +#define MSR_IA32_A_PMC2 0x000004C3 +#define MSR_IA32_A_PMC3 0x000004C4 +#define MSR_IA32_A_PMC4 0x000004C5 +#define MSR_IA32_A_PMC5 0x000004C6 +#define MSR_IA32_A_PMC6 0x000004C7 +#define MSR_IA32_A_PMC7 0x000004C8 /// @} - /** (R/W). If IA32_MCG_CAP.LMCE_P =1. @@ -4345,7 +4256,7 @@ typedef union { @endcode @note MSR_IA32_MCG_EXT_CTL is defined as IA32_MCG_EXT_CTL in SDM. **/ -#define MSR_IA32_MCG_EXT_CTL 0x000004D0 +#define MSR_IA32_MCG_EXT_CTL 0x000004D0 /** MSR information returned for MSR index #MSR_IA32_MCG_EXT_CTL @@ -4358,21 +4269,20 @@ typedef union { /// /// [Bit 0] LMCE_EN. /// - UINT32 LMCE_EN:1; - UINT32 Reserved1:31; - UINT32 Reserved2:32; + UINT32 LMCE_EN : 1; + UINT32 Reserved1 : 31; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_MCG_EXT_CTL_REGISTER; - /** Status and SVN Threshold of SGX Support for ACM (RO). If CPUID.(EAX=07H, ECX=0H): EBX[2] = 1. @@ -4391,7 +4301,7 @@ typedef union { @endcode @note MSR_IA32_SGX_SVN_STATUS is defined as IA32_SGX_SVN_STATUS in SDM. **/ -#define MSR_IA32_SGX_SVN_STATUS 0x00000500 +#define MSR_IA32_SGX_SVN_STATUS 0x00000500 /** MSR information returned for MSR index #MSR_IA32_SGX_SVN_STATUS @@ -4405,27 +4315,26 @@ typedef union { /// [Bit 0] Lock. See Section 41.11.3, "Interactions with Authenticated /// Code Modules (ACMs)". /// - UINT32 Lock:1; - UINT32 Reserved1:15; + UINT32 Lock : 1; + UINT32 Reserved1 : 15; /// /// [Bits 23:16] SGX_SVN_SINIT. See Section 41.11.3, "Interactions with /// Authenticated Code Modules (ACMs)". /// - UINT32 SGX_SVN_SINIT:8; - UINT32 Reserved2:8; - UINT32 Reserved3:32; + UINT32 SGX_SVN_SINIT : 8; + UINT32 Reserved2 : 8; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_SGX_SVN_STATUS_REGISTER; - /** Trace Output Base Register (R/W). If ((CPUID.(EAX=07H, ECX=0):EBX[25] = 1) && ( (CPUID.(EAX=14H,ECX=0): ECX[0] = 1) (CPUID.(EAX=14H,ECX=0): ECX[2] = 1) @@ -4446,7 +4355,7 @@ typedef union { @endcode @note MSR_IA32_RTIT_OUTPUT_BASE is defined as IA32_RTIT_OUTPUT_BASE in SDM. **/ -#define MSR_IA32_RTIT_OUTPUT_BASE 0x00000560 +#define MSR_IA32_RTIT_OUTPUT_BASE 0x00000560 /** MSR information returned for MSR index #MSR_IA32_RTIT_OUTPUT_BASE @@ -4456,23 +4365,22 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved:7; + UINT32 Reserved : 7; /// /// [Bits 31:7] Base physical address. /// - UINT32 Base:25; + UINT32 Base : 25; /// /// [Bits 63:32] Base physical address. /// - UINT32 BaseHi:32; + UINT32 BaseHi : 32; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_RTIT_OUTPUT_BASE_REGISTER; - /** Trace Output Mask Pointers Register (R/W). If ((CPUID.(EAX=07H, ECX=0):EBX[25] = 1) && ( (CPUID.(EAX=14H,ECX=0): ECX[0] = 1) @@ -4493,7 +4401,7 @@ typedef union { @endcode @note MSR_IA32_RTIT_OUTPUT_MASK_PTRS is defined as IA32_RTIT_OUTPUT_MASK_PTRS in SDM. **/ -#define MSR_IA32_RTIT_OUTPUT_MASK_PTRS 0x00000561 +#define MSR_IA32_RTIT_OUTPUT_MASK_PTRS 0x00000561 /** MSR information returned for MSR index #MSR_IA32_RTIT_OUTPUT_MASK_PTRS @@ -4503,20 +4411,20 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved:7; + UINT32 Reserved : 7; /// /// [Bits 31:7] MaskOrTableOffset. /// - UINT32 MaskOrTableOffset:25; + UINT32 MaskOrTableOffset : 25; /// /// [Bits 63:32] Output Offset. /// - UINT32 OutputOffset:32; + UINT32 OutputOffset : 32; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_RTIT_OUTPUT_MASK_PTRS_REGISTER; /** @@ -4530,24 +4438,24 @@ typedef union { /// /// [Bit 0] END. See Section 35.2.6.2, "Table of Physical Addresses (ToPA)". /// - UINT32 END:1; - UINT32 Reserved1:1; + UINT32 END : 1; + UINT32 Reserved1 : 1; /// /// [Bit 2] INT. See Section 35.2.6.2, "Table of Physical Addresses (ToPA)". /// - UINT32 INT:1; - UINT32 Reserved2:1; + UINT32 INT : 1; + UINT32 Reserved2 : 1; /// /// [Bit 4] STOP. See Section 35.2.6.2, "Table of Physical Addresses (ToPA)". /// - UINT32 STOP:1; - UINT32 Reserved3:1; + UINT32 STOP : 1; + UINT32 Reserved3 : 1; /// /// [Bit 6:9] Indicates the size of the associated output region. See Section /// 35.2.6.2, "Table of Physical Addresses (ToPA)". /// - UINT32 Size:4; - UINT32 Reserved4:2; + UINT32 Size : 4; + UINT32 Reserved4 : 2; /// /// [Bit 12:31] Output Region Base Physical Address low part. /// [Bit 12:31] Output Region Base Physical Address [12:63] value to match. @@ -4557,7 +4465,7 @@ typedef union { /// True address field is [12:MAXPHYADDR-1], [MAXPHYADDR:63] is reserved part. /// Detail see Section 35.2.6.2, "Table of Physical Addresses (ToPA)". /// - UINT32 Base:20; + UINT32 Base : 20; /// /// [Bit 32:63] Output Region Base Physical Address high part. /// [Bit 32:63] Output Region Base Physical Address [12:63] value to match. @@ -4567,12 +4475,12 @@ typedef union { /// True address field is [12:MAXPHYADDR-1], [MAXPHYADDR:63] is reserved part. /// Detail see Section 35.2.6.2, "Table of Physical Addresses (ToPA)". /// - UINT32 BaseHi:32; + UINT32 BaseHi : 32; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } RTIT_TOPA_TABLE_ENTRY; /// @@ -4615,7 +4523,7 @@ typedef enum { @endcode @note MSR_IA32_RTIT_CTL is defined as IA32_RTIT_CTL in SDM. **/ -#define MSR_IA32_RTIT_CTL 0x00000570 +#define MSR_IA32_RTIT_CTL 0x00000570 /** MSR information returned for MSR index #MSR_IA32_RTIT_CTL @@ -4628,99 +4536,98 @@ typedef union { /// /// [Bit 0] TraceEn. /// - UINT32 TraceEn:1; + UINT32 TraceEn : 1; /// /// [Bit 1] CYCEn. If (CPUID.(EAX=07H, ECX=0):EBX[1] = 1). /// - UINT32 CYCEn:1; + UINT32 CYCEn : 1; /// /// [Bit 2] OS. /// - UINT32 OS:1; + UINT32 OS : 1; /// /// [Bit 3] User. /// - UINT32 User:1; + UINT32 User : 1; /// /// [Bit 4] PwrEvtEn. /// - UINT32 PwrEvtEn:1; + UINT32 PwrEvtEn : 1; /// /// [Bit 5] FUPonPTW. /// - UINT32 FUPonPTW:1; + UINT32 FUPonPTW : 1; /// /// [Bit 6] FabricEn. If (CPUID.(EAX=07H, ECX=0):ECX[3] = 1). /// - UINT32 FabricEn:1; + UINT32 FabricEn : 1; /// /// [Bit 7] CR3 filter. /// - UINT32 CR3:1; + UINT32 CR3 : 1; /// /// [Bit 8] ToPA. /// - UINT32 ToPA:1; + UINT32 ToPA : 1; /// /// [Bit 9] MTCEn. If (CPUID.(EAX=07H, ECX=0):EBX[3] = 1). /// - UINT32 MTCEn:1; + UINT32 MTCEn : 1; /// /// [Bit 10] TSCEn. /// - UINT32 TSCEn:1; + UINT32 TSCEn : 1; /// /// [Bit 11] DisRETC. /// - UINT32 DisRETC:1; + UINT32 DisRETC : 1; /// /// [Bit 12] PTWEn. /// - UINT32 PTWEn:1; + UINT32 PTWEn : 1; /// /// [Bit 13] BranchEn. /// - UINT32 BranchEn:1; + UINT32 BranchEn : 1; /// /// [Bits 17:14] MTCFreq. If (CPUID.(EAX=07H, ECX=0):EBX[3] = 1). /// - UINT32 MTCFreq:4; - UINT32 Reserved3:1; + UINT32 MTCFreq : 4; + UINT32 Reserved3 : 1; /// /// [Bits 22:19] CYCThresh. If (CPUID.(EAX=07H, ECX=0):EBX[1] = 1). /// - UINT32 CYCThresh:4; - UINT32 Reserved4:1; + UINT32 CYCThresh : 4; + UINT32 Reserved4 : 1; /// /// [Bits 27:24] PSBFreq. If (CPUID.(EAX=07H, ECX=0):EBX[1] = 1). /// - UINT32 PSBFreq:4; - UINT32 Reserved5:4; + UINT32 PSBFreq : 4; + UINT32 Reserved5 : 4; /// /// [Bits 35:32] ADDR0_CFG. If (CPUID.(EAX=07H, ECX=1):EAX[2:0] > 0). /// - UINT32 ADDR0_CFG:4; + UINT32 ADDR0_CFG : 4; /// /// [Bits 39:36] ADDR1_CFG. If (CPUID.(EAX=07H, ECX=1):EAX[2:0] > 1). /// - UINT32 ADDR1_CFG:4; + UINT32 ADDR1_CFG : 4; /// /// [Bits 43:40] ADDR2_CFG. If (CPUID.(EAX=07H, ECX=1):EAX[2:0] > 2). /// - UINT32 ADDR2_CFG:4; + UINT32 ADDR2_CFG : 4; /// /// [Bits 47:44] ADDR3_CFG. If (CPUID.(EAX=07H, ECX=1):EAX[2:0] > 3). /// - UINT32 ADDR3_CFG:4; - UINT32 Reserved6:16; + UINT32 ADDR3_CFG : 4; + UINT32 Reserved6 : 16; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_RTIT_CTL_REGISTER; - /** Tracing Status Register (R/W). If (CPUID.(EAX=07H, ECX=0):EBX[25] = 1). @@ -4739,7 +4646,7 @@ typedef union { @endcode @note MSR_IA32_RTIT_STATUS is defined as IA32_RTIT_STATUS in SDM. **/ -#define MSR_IA32_RTIT_STATUS 0x00000571 +#define MSR_IA32_RTIT_STATUS 0x00000571 /** MSR information returned for MSR index #MSR_IA32_RTIT_STATUS @@ -4753,38 +4660,37 @@ typedef union { /// [Bit 0] FilterEn, (writes ignored). /// If (CPUID.(EAX=07H, ECX=0):EBX[2] = 1). /// - UINT32 FilterEn:1; + UINT32 FilterEn : 1; /// /// [Bit 1] ContexEn, (writes ignored). /// - UINT32 ContexEn:1; + UINT32 ContexEn : 1; /// /// [Bit 2] TriggerEn, (writes ignored). /// - UINT32 TriggerEn:1; - UINT32 Reserved1:1; + UINT32 TriggerEn : 1; + UINT32 Reserved1 : 1; /// /// [Bit 4] Error. /// - UINT32 Error:1; + UINT32 Error : 1; /// /// [Bit 5] Stopped. /// - UINT32 Stopped:1; - UINT32 Reserved2:26; + UINT32 Stopped : 1; + UINT32 Reserved2 : 26; /// /// [Bits 48:32] PacketByteCnt. If (CPUID.(EAX=07H, ECX=0):EBX[1] > 3). /// - UINT32 PacketByteCnt:17; - UINT32 Reserved3:15; + UINT32 PacketByteCnt : 17; + UINT32 Reserved3 : 15; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_RTIT_STATUS_REGISTER; - /** Trace Filter CR3 Match Register (R/W). If (CPUID.(EAX=07H, ECX=0):EBX[25] = 1). @@ -4804,7 +4710,7 @@ typedef union { @endcode @note MSR_IA32_RTIT_CR3_MATCH is defined as IA32_RTIT_CR3_MATCH in SDM. **/ -#define MSR_IA32_RTIT_CR3_MATCH 0x00000572 +#define MSR_IA32_RTIT_CR3_MATCH 0x00000572 /** MSR information returned for MSR index #MSR_IA32_RTIT_CR3_MATCH @@ -4814,23 +4720,22 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved:5; + UINT32 Reserved : 5; /// /// [Bits 31:5] CR3[63:5] value to match. /// - UINT32 Cr3:27; + UINT32 Cr3 : 27; /// /// [Bits 63:32] CR3[63:5] value to match. /// - UINT32 Cr3Hi:32; + UINT32 Cr3Hi : 32; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_RTIT_CR3_MATCH_REGISTER; - /** Region n Start Address (R/W). If (CPUID.(EAX=07H, ECX=1):EAX[2:0] > n). @@ -4853,13 +4758,12 @@ typedef union { MSR_IA32_RTIT_ADDR3_A is defined as IA32_RTIT_ADDR3_A in SDM. @{ **/ -#define MSR_IA32_RTIT_ADDR0_A 0x00000580 -#define MSR_IA32_RTIT_ADDR1_A 0x00000582 -#define MSR_IA32_RTIT_ADDR2_A 0x00000584 -#define MSR_IA32_RTIT_ADDR3_A 0x00000586 +#define MSR_IA32_RTIT_ADDR0_A 0x00000580 +#define MSR_IA32_RTIT_ADDR1_A 0x00000582 +#define MSR_IA32_RTIT_ADDR2_A 0x00000584 +#define MSR_IA32_RTIT_ADDR3_A 0x00000586 /// @} - /** Region n End Address (R/W). If (CPUID.(EAX=07H, ECX=1):EAX[2:0] > n). @@ -4882,13 +4786,12 @@ typedef union { MSR_IA32_RTIT_ADDR3_B is defined as IA32_RTIT_ADDR3_B in SDM. @{ **/ -#define MSR_IA32_RTIT_ADDR0_B 0x00000581 -#define MSR_IA32_RTIT_ADDR1_B 0x00000583 -#define MSR_IA32_RTIT_ADDR2_B 0x00000585 -#define MSR_IA32_RTIT_ADDR3_B 0x00000587 +#define MSR_IA32_RTIT_ADDR0_B 0x00000581 +#define MSR_IA32_RTIT_ADDR1_B 0x00000583 +#define MSR_IA32_RTIT_ADDR2_B 0x00000585 +#define MSR_IA32_RTIT_ADDR3_B 0x00000587 /// @} - /** MSR information returned for MSR indexes #MSR_IA32_RTIT_ADDR0_A to #MSR_IA32_RTIT_ADDR3_A and @@ -4902,23 +4805,22 @@ typedef union { /// /// [Bits 31:0] Virtual Address. /// - UINT32 VirtualAddress:32; + UINT32 VirtualAddress : 32; /// /// [Bits 47:32] Virtual Address. /// - UINT32 VirtualAddressHi:16; + UINT32 VirtualAddressHi : 16; /// /// [Bits 63:48] SignExt_VA. /// - UINT32 SignExt_VA:16; + UINT32 SignExt_VA : 16; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_RTIT_ADDR_REGISTER; - /** DS Save Area (R/W) Points to the linear address of the first byte of the DS buffer management area, which is used to manage the BTS and PEBS buffers. @@ -4941,8 +4843,7 @@ typedef union { @endcode @note MSR_IA32_DS_AREA is defined as IA32_DS_AREA in SDM. **/ -#define MSR_IA32_DS_AREA 0x00000600 - +#define MSR_IA32_DS_AREA 0x00000600 /** TSC Target of Local APIC's TSC Deadline Mode (R/W). If CPUID.01H:ECX.[24] = @@ -4961,8 +4862,7 @@ typedef union { @endcode @note MSR_IA32_TSC_DEADLINE is defined as IA32_TSC_DEADLINE in SDM. **/ -#define MSR_IA32_TSC_DEADLINE 0x000006E0 - +#define MSR_IA32_TSC_DEADLINE 0x000006E0 /** Enable/disable HWP (R/W). If CPUID.06H:EAX.[7] = 1. @@ -4982,7 +4882,7 @@ typedef union { @endcode @note MSR_IA32_PM_ENABLE is defined as IA32_PM_ENABLE in SDM. **/ -#define MSR_IA32_PM_ENABLE 0x00000770 +#define MSR_IA32_PM_ENABLE 0x00000770 /** MSR information returned for MSR index #MSR_IA32_PM_ENABLE @@ -4996,21 +4896,20 @@ typedef union { /// [Bit 0] HWP_ENABLE (R/W1-Once). See Section 14.4.2, "Enabling HWP". If /// CPUID.06H:EAX.[7] = 1. /// - UINT32 HWP_ENABLE:1; - UINT32 Reserved1:31; - UINT32 Reserved2:32; + UINT32 HWP_ENABLE : 1; + UINT32 Reserved1 : 31; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_PM_ENABLE_REGISTER; - /** HWP Performance Range Enumeration (RO). If CPUID.06H:EAX.[7] = 1. @@ -5028,7 +4927,7 @@ typedef union { @endcode @note MSR_IA32_HWP_CAPABILITIES is defined as IA32_HWP_CAPABILITIES in SDM. **/ -#define MSR_IA32_HWP_CAPABILITIES 0x00000771 +#define MSR_IA32_HWP_CAPABILITIES 0x00000771 /** MSR information returned for MSR index #MSR_IA32_HWP_CAPABILITIES @@ -5042,35 +4941,34 @@ typedef union { /// [Bits 7:0] Highest_Performance See Section 14.4.3, "HWP Performance /// Range and Dynamic Capabilities". If CPUID.06H:EAX.[7] = 1. /// - UINT32 Highest_Performance:8; + UINT32 Highest_Performance : 8; /// /// [Bits 15:8] Guaranteed_Performance See Section 14.4.3, "HWP /// Performance Range and Dynamic Capabilities". If CPUID.06H:EAX.[7] = 1. /// - UINT32 Guaranteed_Performance:8; + UINT32 Guaranteed_Performance : 8; /// /// [Bits 23:16] Most_Efficient_Performance See Section 14.4.3, "HWP /// Performance Range and Dynamic Capabilities". If CPUID.06H:EAX.[7] = 1. /// - UINT32 Most_Efficient_Performance:8; + UINT32 Most_Efficient_Performance : 8; /// /// [Bits 31:24] Lowest_Performance See Section 14.4.3, "HWP Performance /// Range and Dynamic Capabilities". If CPUID.06H:EAX.[7] = 1. /// - UINT32 Lowest_Performance:8; - UINT32 Reserved:32; + UINT32 Lowest_Performance : 8; + UINT32 Reserved : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_HWP_CAPABILITIES_REGISTER; - /** Power Management Control Hints for All Logical Processors in a Package (R/W). If CPUID.06H:EAX.[11] = 1. @@ -5090,7 +4988,7 @@ typedef union { @endcode @note MSR_IA32_HWP_REQUEST_PKG is defined as IA32_HWP_REQUEST_PKG in SDM. **/ -#define MSR_IA32_HWP_REQUEST_PKG 0x00000772 +#define MSR_IA32_HWP_REQUEST_PKG 0x00000772 /** MSR information returned for MSR index #MSR_IA32_HWP_REQUEST_PKG @@ -5104,36 +5002,35 @@ typedef union { /// [Bits 7:0] Minimum_Performance See Section 14.4.4, "Managing HWP". If /// CPUID.06H:EAX.[11] = 1. /// - UINT32 Minimum_Performance:8; + UINT32 Minimum_Performance : 8; /// /// [Bits 15:8] Maximum_Performance See Section 14.4.4, "Managing HWP". If /// CPUID.06H:EAX.[11] = 1. /// - UINT32 Maximum_Performance:8; + UINT32 Maximum_Performance : 8; /// /// [Bits 23:16] Desired_Performance See Section 14.4.4, "Managing HWP". /// If CPUID.06H:EAX.[11] = 1. /// - UINT32 Desired_Performance:8; + UINT32 Desired_Performance : 8; /// /// [Bits 31:24] Energy_Performance_Preference See Section 14.4.4, /// "Managing HWP". If CPUID.06H:EAX.[11] = 1 && CPUID.06H:EAX.[10] = 1. /// - UINT32 Energy_Performance_Preference:8; + UINT32 Energy_Performance_Preference : 8; /// /// [Bits 41:32] Activity_Window See Section 14.4.4, "Managing HWP". If /// CPUID.06H:EAX.[11] = 1 && CPUID.06H:EAX.[9] = 1. /// - UINT32 Activity_Window:10; - UINT32 Reserved:22; + UINT32 Activity_Window : 10; + UINT32 Reserved : 22; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_HWP_REQUEST_PKG_REGISTER; - /** Control HWP Native Interrupts (R/W). If CPUID.06H:EAX.[8] = 1. @@ -5152,7 +5049,7 @@ typedef union { @endcode @note MSR_IA32_HWP_INTERRUPT is defined as IA32_HWP_INTERRUPT in SDM. **/ -#define MSR_IA32_HWP_INTERRUPT 0x00000773 +#define MSR_IA32_HWP_INTERRUPT 0x00000773 /** MSR information returned for MSR index #MSR_IA32_HWP_INTERRUPT @@ -5166,26 +5063,25 @@ typedef union { /// [Bit 0] EN_Guaranteed_Performance_Change. See Section 14.4.6, "HWP /// Notifications". If CPUID.06H:EAX.[8] = 1. /// - UINT32 EN_Guaranteed_Performance_Change:1; + UINT32 EN_Guaranteed_Performance_Change : 1; /// /// [Bit 1] EN_Excursion_Minimum. See Section 14.4.6, "HWP Notifications". /// If CPUID.06H:EAX.[8] = 1. /// - UINT32 EN_Excursion_Minimum:1; - UINT32 Reserved1:30; - UINT32 Reserved2:32; + UINT32 EN_Excursion_Minimum : 1; + UINT32 Reserved1 : 30; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_HWP_INTERRUPT_REGISTER; - /** Power Management Control Hints to a Logical Processor (R/W). If CPUID.06H:EAX.[7] = 1. @@ -5205,7 +5101,7 @@ typedef union { @endcode @note MSR_IA32_HWP_REQUEST is defined as IA32_HWP_REQUEST in SDM. **/ -#define MSR_IA32_HWP_REQUEST 0x00000774 +#define MSR_IA32_HWP_REQUEST 0x00000774 /** MSR information returned for MSR index #MSR_IA32_HWP_REQUEST @@ -5219,41 +5115,40 @@ typedef union { /// [Bits 7:0] Minimum_Performance See Section 14.4.4, "Managing HWP". If /// CPUID.06H:EAX.[7] = 1. /// - UINT32 Minimum_Performance:8; + UINT32 Minimum_Performance : 8; /// /// [Bits 15:8] Maximum_Performance See Section 14.4.4, "Managing HWP". If /// CPUID.06H:EAX.[7] = 1. /// - UINT32 Maximum_Performance:8; + UINT32 Maximum_Performance : 8; /// /// [Bits 23:16] Desired_Performance See Section 14.4.4, "Managing HWP". /// If CPUID.06H:EAX.[7] = 1. /// - UINT32 Desired_Performance:8; + UINT32 Desired_Performance : 8; /// /// [Bits 31:24] Energy_Performance_Preference See Section 14.4.4, /// "Managing HWP". If CPUID.06H:EAX.[7] = 1 && CPUID.06H:EAX.[10] = 1. /// - UINT32 Energy_Performance_Preference:8; + UINT32 Energy_Performance_Preference : 8; /// /// [Bits 41:32] Activity_Window See Section 14.4.4, "Managing HWP". If /// CPUID.06H:EAX.[7] = 1 && CPUID.06H:EAX.[9] = 1. /// - UINT32 Activity_Window:10; + UINT32 Activity_Window : 10; /// /// [Bit 42] Package_Control See Section 14.4.4, "Managing HWP". If /// CPUID.06H:EAX.[7] = 1 && CPUID.06H:EAX.[11] = 1. /// - UINT32 Package_Control:1; - UINT32 Reserved:21; + UINT32 Package_Control : 1; + UINT32 Reserved : 21; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_HWP_REQUEST_REGISTER; - /** Log bits indicating changes to Guaranteed & excursions to Minimum (R/W). If CPUID.06H:EAX.[7] = 1. @@ -5273,7 +5168,7 @@ typedef union { @endcode @note MSR_IA32_HWP_STATUS is defined as IA32_HWP_STATUS in SDM. **/ -#define MSR_IA32_HWP_STATUS 0x00000777 +#define MSR_IA32_HWP_STATUS 0x00000777 /** MSR information returned for MSR index #MSR_IA32_HWP_STATUS @@ -5287,27 +5182,26 @@ typedef union { /// [Bit 0] Guaranteed_Performance_Change (R/WC0). See Section 14.4.5, /// "HWP Feedback". If CPUID.06H:EAX.[7] = 1. /// - UINT32 Guaranteed_Performance_Change:1; - UINT32 Reserved1:1; + UINT32 Guaranteed_Performance_Change : 1; + UINT32 Reserved1 : 1; /// /// [Bit 2] Excursion_To_Minimum (R/WC0). See Section 14.4.5, "HWP /// Feedback". If CPUID.06H:EAX.[7] = 1. /// - UINT32 Excursion_To_Minimum:1; - UINT32 Reserved2:29; - UINT32 Reserved3:32; + UINT32 Excursion_To_Minimum : 1; + UINT32 Reserved2 : 29; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_HWP_STATUS_REGISTER; - /** x2APIC ID Register (R/O) See x2APIC Specification. If CPUID.01H:ECX[21] = 1 && IA32_APIC_BASE.[10] = 1. @@ -5324,8 +5218,7 @@ typedef union { @endcode @note MSR_IA32_X2APIC_APICID is defined as IA32_X2APIC_APICID in SDM. **/ -#define MSR_IA32_X2APIC_APICID 0x00000802 - +#define MSR_IA32_X2APIC_APICID 0x00000802 /** x2APIC Version Register (R/O). If CPUID.01H:ECX.[21] = 1 && @@ -5343,8 +5236,7 @@ typedef union { @endcode @note MSR_IA32_X2APIC_VERSION is defined as IA32_X2APIC_VERSION in SDM. **/ -#define MSR_IA32_X2APIC_VERSION 0x00000803 - +#define MSR_IA32_X2APIC_VERSION 0x00000803 /** x2APIC Task Priority Register (R/W). If CPUID.01H:ECX.[21] = 1 && @@ -5363,8 +5255,7 @@ typedef union { @endcode @note MSR_IA32_X2APIC_TPR is defined as IA32_X2APIC_TPR in SDM. **/ -#define MSR_IA32_X2APIC_TPR 0x00000808 - +#define MSR_IA32_X2APIC_TPR 0x00000808 /** x2APIC Processor Priority Register (R/O). If CPUID.01H:ECX.[21] = 1 && @@ -5382,8 +5273,7 @@ typedef union { @endcode @note MSR_IA32_X2APIC_PPR is defined as IA32_X2APIC_PPR in SDM. **/ -#define MSR_IA32_X2APIC_PPR 0x0000080A - +#define MSR_IA32_X2APIC_PPR 0x0000080A /** x2APIC EOI Register (W/O). If CPUID.01H:ECX.[21] = 1 && IA32_APIC_BASE.[10] @@ -5402,8 +5292,7 @@ typedef union { @endcode @note MSR_IA32_X2APIC_EOI is defined as IA32_X2APIC_EOI in SDM. **/ -#define MSR_IA32_X2APIC_EOI 0x0000080B - +#define MSR_IA32_X2APIC_EOI 0x0000080B /** x2APIC Logical Destination Register (R/O). If CPUID.01H:ECX.[21] = 1 && @@ -5421,8 +5310,7 @@ typedef union { @endcode @note MSR_IA32_X2APIC_LDR is defined as IA32_X2APIC_LDR in SDM. **/ -#define MSR_IA32_X2APIC_LDR 0x0000080D - +#define MSR_IA32_X2APIC_LDR 0x0000080D /** x2APIC Spurious Interrupt Vector Register (R/W). If CPUID.01H:ECX.[21] = 1 @@ -5441,8 +5329,7 @@ typedef union { @endcode @note MSR_IA32_X2APIC_SIVR is defined as IA32_X2APIC_SIVR in SDM. **/ -#define MSR_IA32_X2APIC_SIVR 0x0000080F - +#define MSR_IA32_X2APIC_SIVR 0x0000080F /** x2APIC In-Service Register Bits (n * 32 + 31):(n * 32) (R/O). @@ -5468,17 +5355,16 @@ typedef union { MSR_IA32_X2APIC_ISR7 is defined as IA32_X2APIC_ISR7 in SDM. @{ **/ -#define MSR_IA32_X2APIC_ISR0 0x00000810 -#define MSR_IA32_X2APIC_ISR1 0x00000811 -#define MSR_IA32_X2APIC_ISR2 0x00000812 -#define MSR_IA32_X2APIC_ISR3 0x00000813 -#define MSR_IA32_X2APIC_ISR4 0x00000814 -#define MSR_IA32_X2APIC_ISR5 0x00000815 -#define MSR_IA32_X2APIC_ISR6 0x00000816 -#define MSR_IA32_X2APIC_ISR7 0x00000817 +#define MSR_IA32_X2APIC_ISR0 0x00000810 +#define MSR_IA32_X2APIC_ISR1 0x00000811 +#define MSR_IA32_X2APIC_ISR2 0x00000812 +#define MSR_IA32_X2APIC_ISR3 0x00000813 +#define MSR_IA32_X2APIC_ISR4 0x00000814 +#define MSR_IA32_X2APIC_ISR5 0x00000815 +#define MSR_IA32_X2APIC_ISR6 0x00000816 +#define MSR_IA32_X2APIC_ISR7 0x00000817 /// @} - /** x2APIC Trigger Mode Register Bits (n * 32 + ):(n * 32) (R/O). If CPUID.01H:ECX.[21] = 1 && IA32_APIC_BASE.[10] = 1. @@ -5503,17 +5389,16 @@ typedef union { MSR_IA32_X2APIC_TMR7 is defined as IA32_X2APIC_TMR7 in SDM. @{ **/ -#define MSR_IA32_X2APIC_TMR0 0x00000818 -#define MSR_IA32_X2APIC_TMR1 0x00000819 -#define MSR_IA32_X2APIC_TMR2 0x0000081A -#define MSR_IA32_X2APIC_TMR3 0x0000081B -#define MSR_IA32_X2APIC_TMR4 0x0000081C -#define MSR_IA32_X2APIC_TMR5 0x0000081D -#define MSR_IA32_X2APIC_TMR6 0x0000081E -#define MSR_IA32_X2APIC_TMR7 0x0000081F +#define MSR_IA32_X2APIC_TMR0 0x00000818 +#define MSR_IA32_X2APIC_TMR1 0x00000819 +#define MSR_IA32_X2APIC_TMR2 0x0000081A +#define MSR_IA32_X2APIC_TMR3 0x0000081B +#define MSR_IA32_X2APIC_TMR4 0x0000081C +#define MSR_IA32_X2APIC_TMR5 0x0000081D +#define MSR_IA32_X2APIC_TMR6 0x0000081E +#define MSR_IA32_X2APIC_TMR7 0x0000081F /// @} - /** x2APIC Interrupt Request Register Bits (n* 32 + 31):(n * 32) (R/O). If CPUID.01H:ECX.[21] = 1 && IA32_APIC_BASE.[10] = 1. @@ -5538,17 +5423,16 @@ typedef union { MSR_IA32_X2APIC_IRR7 is defined as IA32_X2APIC_IRR7 in SDM. @{ **/ -#define MSR_IA32_X2APIC_IRR0 0x00000820 -#define MSR_IA32_X2APIC_IRR1 0x00000821 -#define MSR_IA32_X2APIC_IRR2 0x00000822 -#define MSR_IA32_X2APIC_IRR3 0x00000823 -#define MSR_IA32_X2APIC_IRR4 0x00000824 -#define MSR_IA32_X2APIC_IRR5 0x00000825 -#define MSR_IA32_X2APIC_IRR6 0x00000826 -#define MSR_IA32_X2APIC_IRR7 0x00000827 +#define MSR_IA32_X2APIC_IRR0 0x00000820 +#define MSR_IA32_X2APIC_IRR1 0x00000821 +#define MSR_IA32_X2APIC_IRR2 0x00000822 +#define MSR_IA32_X2APIC_IRR3 0x00000823 +#define MSR_IA32_X2APIC_IRR4 0x00000824 +#define MSR_IA32_X2APIC_IRR5 0x00000825 +#define MSR_IA32_X2APIC_IRR6 0x00000826 +#define MSR_IA32_X2APIC_IRR7 0x00000827 /// @} - /** x2APIC Error Status Register (R/W). If CPUID.01H:ECX.[21] = 1 && IA32_APIC_BASE.[10] = 1. @@ -5566,8 +5450,7 @@ typedef union { @endcode @note MSR_IA32_X2APIC_ESR is defined as IA32_X2APIC_ESR in SDM. **/ -#define MSR_IA32_X2APIC_ESR 0x00000828 - +#define MSR_IA32_X2APIC_ESR 0x00000828 /** x2APIC LVT Corrected Machine Check Interrupt Register (R/W). If @@ -5586,8 +5469,7 @@ typedef union { @endcode @note MSR_IA32_X2APIC_LVT_CMCI is defined as IA32_X2APIC_LVT_CMCI in SDM. **/ -#define MSR_IA32_X2APIC_LVT_CMCI 0x0000082F - +#define MSR_IA32_X2APIC_LVT_CMCI 0x0000082F /** x2APIC Interrupt Command Register (R/W). If CPUID.01H:ECX.[21] = 1 && @@ -5606,8 +5488,7 @@ typedef union { @endcode @note MSR_IA32_X2APIC_ICR is defined as IA32_X2APIC_ICR in SDM. **/ -#define MSR_IA32_X2APIC_ICR 0x00000830 - +#define MSR_IA32_X2APIC_ICR 0x00000830 /** x2APIC LVT Timer Interrupt Register (R/W). If CPUID.01H:ECX.[21] = 1 && @@ -5626,8 +5507,7 @@ typedef union { @endcode @note MSR_IA32_X2APIC_LVT_TIMER is defined as IA32_X2APIC_LVT_TIMER in SDM. **/ -#define MSR_IA32_X2APIC_LVT_TIMER 0x00000832 - +#define MSR_IA32_X2APIC_LVT_TIMER 0x00000832 /** x2APIC LVT Thermal Sensor Interrupt Register (R/W). If CPUID.01H:ECX.[21] = @@ -5646,8 +5526,7 @@ typedef union { @endcode @note MSR_IA32_X2APIC_LVT_THERMAL is defined as IA32_X2APIC_LVT_THERMAL in SDM. **/ -#define MSR_IA32_X2APIC_LVT_THERMAL 0x00000833 - +#define MSR_IA32_X2APIC_LVT_THERMAL 0x00000833 /** x2APIC LVT Performance Monitor Interrupt Register (R/W). If @@ -5666,8 +5545,7 @@ typedef union { @endcode @note MSR_IA32_X2APIC_LVT_PMI is defined as IA32_X2APIC_LVT_PMI in SDM. **/ -#define MSR_IA32_X2APIC_LVT_PMI 0x00000834 - +#define MSR_IA32_X2APIC_LVT_PMI 0x00000834 /** x2APIC LVT LINT0 Register (R/W). If CPUID.01H:ECX.[21] = 1 && @@ -5686,8 +5564,7 @@ typedef union { @endcode @note MSR_IA32_X2APIC_LVT_LINT0 is defined as IA32_X2APIC_LVT_LINT0 in SDM. **/ -#define MSR_IA32_X2APIC_LVT_LINT0 0x00000835 - +#define MSR_IA32_X2APIC_LVT_LINT0 0x00000835 /** x2APIC LVT LINT1 Register (R/W). If CPUID.01H:ECX.[21] = 1 && @@ -5706,8 +5583,7 @@ typedef union { @endcode @note MSR_IA32_X2APIC_LVT_LINT1 is defined as IA32_X2APIC_LVT_LINT1 in SDM. **/ -#define MSR_IA32_X2APIC_LVT_LINT1 0x00000836 - +#define MSR_IA32_X2APIC_LVT_LINT1 0x00000836 /** x2APIC LVT Error Register (R/W). If CPUID.01H:ECX.[21] = 1 && @@ -5726,8 +5602,7 @@ typedef union { @endcode @note MSR_IA32_X2APIC_LVT_ERROR is defined as IA32_X2APIC_LVT_ERROR in SDM. **/ -#define MSR_IA32_X2APIC_LVT_ERROR 0x00000837 - +#define MSR_IA32_X2APIC_LVT_ERROR 0x00000837 /** x2APIC Initial Count Register (R/W). If CPUID.01H:ECX.[21] = 1 && @@ -5746,8 +5621,7 @@ typedef union { @endcode @note MSR_IA32_X2APIC_INIT_COUNT is defined as IA32_X2APIC_INIT_COUNT in SDM. **/ -#define MSR_IA32_X2APIC_INIT_COUNT 0x00000838 - +#define MSR_IA32_X2APIC_INIT_COUNT 0x00000838 /** x2APIC Current Count Register (R/O). If CPUID.01H:ECX.[21] = 1 && @@ -5765,8 +5639,7 @@ typedef union { @endcode @note MSR_IA32_X2APIC_CUR_COUNT is defined as IA32_X2APIC_CUR_COUNT in SDM. **/ -#define MSR_IA32_X2APIC_CUR_COUNT 0x00000839 - +#define MSR_IA32_X2APIC_CUR_COUNT 0x00000839 /** x2APIC Divide Configuration Register (R/W). If CPUID.01H:ECX.[21] = 1 && @@ -5785,8 +5658,7 @@ typedef union { @endcode @note MSR_IA32_X2APIC_DIV_CONF is defined as IA32_X2APIC_DIV_CONF in SDM. **/ -#define MSR_IA32_X2APIC_DIV_CONF 0x0000083E - +#define MSR_IA32_X2APIC_DIV_CONF 0x0000083E /** x2APIC Self IPI Register (W/O). If CPUID.01H:ECX.[21] = 1 && @@ -5805,8 +5677,7 @@ typedef union { @endcode @note MSR_IA32_X2APIC_SELF_IPI is defined as IA32_X2APIC_SELF_IPI in SDM. **/ -#define MSR_IA32_X2APIC_SELF_IPI 0x0000083F - +#define MSR_IA32_X2APIC_SELF_IPI 0x0000083F /** Silicon Debug Feature Control (R/W). If CPUID.01H:ECX.[11] = 1. @@ -5826,7 +5697,7 @@ typedef union { @endcode @note MSR_IA32_DEBUG_INTERFACE is defined as IA32_DEBUG_INTERFACE in SDM. **/ -#define MSR_IA32_DEBUG_INTERFACE 0x00000C80 +#define MSR_IA32_DEBUG_INTERFACE 0x00000C80 /** MSR information returned for MSR index #MSR_IA32_DEBUG_INTERFACE @@ -5840,32 +5711,31 @@ typedef union { /// [Bit 0] Enable (R/W) BIOS set 1 to enable Silicon debug features. /// Default is 0. If CPUID.01H:ECX.[11] = 1. /// - UINT32 Enable:1; - UINT32 Reserved1:29; + UINT32 Enable : 1; + UINT32 Reserved1 : 29; /// /// [Bit 30] Lock (R/W): If 1, locks any further change to the MSR. The /// lock bit is set automatically on the first SMI assertion even if not /// explicitly set by BIOS. Default is 0. If CPUID.01H:ECX.[11] = 1. /// - UINT32 Lock:1; + UINT32 Lock : 1; /// /// [Bit 31] Debug Occurred (R/O): This "sticky bit" is set by hardware to /// indicate the status of bit 0. Default is 0. If CPUID.01H:ECX.[11] = 1. /// - UINT32 DebugOccurred:1; - UINT32 Reserved2:32; + UINT32 DebugOccurred : 1; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_DEBUG_INTERFACE_REGISTER; - /** L3 QOS Configuration (R/W). If ( CPUID.(EAX=10H, ECX=1):ECX.[2] = 1 ). @@ -5884,7 +5754,7 @@ typedef union { @endcode @note MSR_IA32_L3_QOS_CFG is defined as IA32_L3_QOS_CFG in SDM. **/ -#define MSR_IA32_L3_QOS_CFG 0x00000C81 +#define MSR_IA32_L3_QOS_CFG 0x00000C81 /** MSR information returned for MSR index #MSR_IA32_L3_QOS_CFG @@ -5898,18 +5768,18 @@ typedef union { /// [Bit 0] Enable (R/W) Set 1 to enable L3 CAT masks and COS to operate /// in Code and Data Prioritization (CDP) mode. /// - UINT32 Enable:1; - UINT32 Reserved1:31; - UINT32 Reserved2:32; + UINT32 Enable : 1; + UINT32 Reserved1 : 31; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_L3_QOS_CFG_REGISTER; /** @@ -5930,7 +5800,7 @@ typedef union { @endcode @note MSR_IA32_L2_QOS_CFG is defined as IA32_L2_QOS_CFG in SDM. **/ -#define MSR_IA32_L2_QOS_CFG 0x00000C82 +#define MSR_IA32_L2_QOS_CFG 0x00000C82 /** MSR information returned for MSR index #MSR_IA32_L2_QOS_CFG @@ -5944,18 +5814,18 @@ typedef union { /// [Bit 0] Enable (R/W) Set 1 to enable L2 CAT masks and COS to operate /// in Code and Data Prioritization (CDP) mode. /// - UINT32 Enable:1; - UINT32 Reserved1:31; - UINT32 Reserved2:32; + UINT32 Enable : 1; + UINT32 Reserved1 : 31; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_L2_QOS_CFG_REGISTER; /** @@ -5977,7 +5847,7 @@ typedef union { @endcode @note MSR_IA32_QM_EVTSEL is defined as IA32_QM_EVTSEL in SDM. **/ -#define MSR_IA32_QM_EVTSEL 0x00000C8D +#define MSR_IA32_QM_EVTSEL 0x00000C8D /** MSR information returned for MSR index #MSR_IA32_QM_EVTSEL @@ -5991,22 +5861,21 @@ typedef union { /// [Bits 7:0] Event ID: ID of a supported monitoring event to report via /// IA32_QM_CTR. /// - UINT32 EventID:8; - UINT32 Reserved:24; + UINT32 EventID : 8; + UINT32 Reserved : 24; /// /// [Bits 63:32] Resource Monitoring ID: ID for monitoring hardware to /// report monitored data via IA32_QM_CTR. N = Ceil (Log:sub:`2` ( /// CPUID.(EAX= 0FH, ECX=0H).EBX[31:0] +1)). /// - UINT32 ResourceMonitoringID:32; + UINT32 ResourceMonitoringID : 32; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_QM_EVTSEL_REGISTER; - /** Monitoring Counter Register (R/O). If ( CPUID.(EAX=07H, ECX=0):EBX.[12] = 1 ). @@ -6025,7 +5894,7 @@ typedef union { @endcode @note MSR_IA32_QM_CTR is defined as IA32_QM_CTR in SDM. **/ -#define MSR_IA32_QM_CTR 0x00000C8E +#define MSR_IA32_QM_CTR 0x00000C8E /** MSR information returned for MSR index #MSR_IA32_QM_CTR @@ -6038,29 +5907,28 @@ typedef union { /// /// [Bits 31:0] Resource Monitored Data. /// - UINT32 ResourceMonitoredData:32; + UINT32 ResourceMonitoredData : 32; /// /// [Bits 61:32] Resource Monitored Data. /// - UINT32 ResourceMonitoredDataHi:30; + UINT32 ResourceMonitoredDataHi : 30; /// /// [Bit 62] Unavailable: If 1, indicates data for this RMID is not /// available or not monitored for this resource or RMID. /// - UINT32 Unavailable:1; + UINT32 Unavailable : 1; /// /// [Bit 63] Error: If 1, indicates and unsupported RMID or event type was /// written to IA32_PQR_QM_EVTSEL. /// - UINT32 Error:1; + UINT32 Error : 1; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_QM_CTR_REGISTER; - /** Resource Association Register (R/W). If ( (CPUID.(EAX=07H, ECX=0):EBX[12] =1) or (CPUID.(EAX=07H, ECX=0):EBX[15] =1 ) ). @@ -6080,7 +5948,7 @@ typedef union { @endcode @note MSR_IA32_PQR_ASSOC is defined as IA32_PQR_ASSOC in SDM. **/ -#define MSR_IA32_PQR_ASSOC 0x00000C8F +#define MSR_IA32_PQR_ASSOC 0x00000C8F /** MSR information returned for MSR index #MSR_IA32_PQR_ASSOC @@ -6095,21 +5963,20 @@ typedef union { /// to track internal operation, e.g. memory access. N = Ceil (Log:sub:`2` /// ( CPUID.(EAX= 0FH, ECX=0H).EBX[31:0] +1)). /// - UINT32 ResourceMonitoringID:32; + UINT32 ResourceMonitoringID : 32; /// /// [Bits 63:32] COS (R/W). The class of service (COS) to enforce (on /// writes); returns the current COS when read. If ( CPUID.(EAX=07H, /// ECX=0):EBX.[15] = 1 ). /// - UINT32 COS:32; + UINT32 COS : 32; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_PQR_ASSOC_REGISTER; - /** Supervisor State of MPX Configuration. (R/W). If (CPUID.(EAX=07H, ECX=0H):EBX[14] = 1). @@ -6129,7 +5996,7 @@ typedef union { @endcode @note MSR_IA32_BNDCFGS is defined as IA32_BNDCFGS in SDM. **/ -#define MSR_IA32_BNDCFGS 0x00000D90 +#define MSR_IA32_BNDCFGS 0x00000D90 /** MSR information returned for MSR index #MSR_IA32_BNDCFGS @@ -6142,29 +6009,28 @@ typedef union { /// /// [Bit 0] EN: Enable Intel MPX in supervisor mode. /// - UINT32 EN:1; + UINT32 EN : 1; /// /// [Bit 1] BNDPRESERVE: Preserve the bounds registers for near branch /// instructions in the absence of the BND prefix. /// - UINT32 BNDPRESERVE:1; - UINT32 Reserved:10; + UINT32 BNDPRESERVE : 1; + UINT32 Reserved : 10; /// /// [Bits 31:12] Base Address of Bound Directory. /// - UINT32 Base:20; + UINT32 Base : 20; /// /// [Bits 63:32] Base Address of Bound Directory. /// - UINT32 BaseHi:32; + UINT32 BaseHi : 32; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_BNDCFGS_REGISTER; - /** Extended Supervisor State Mask (R/W). If( CPUID.(0DH, 1):EAX.[3] = 1. @@ -6183,7 +6049,7 @@ typedef union { @endcode @note MSR_IA32_XSS is defined as IA32_XSS in SDM. **/ -#define MSR_IA32_XSS 0x00000DA0 +#define MSR_IA32_XSS 0x00000DA0 /** MSR information returned for MSR index #MSR_IA32_XSS @@ -6193,25 +6059,24 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:8; + UINT32 Reserved1 : 8; /// /// [Bit 8] Trace Packet Configuration State (R/W). /// - UINT32 TracePacketConfigurationState:1; - UINT32 Reserved2:23; - UINT32 Reserved3:32; + UINT32 TracePacketConfigurationState : 1; + UINT32 Reserved2 : 23; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_XSS_REGISTER; - /** Package Level Enable/disable HDC (R/W). If CPUID.06H:EAX.[13] = 1. @@ -6230,7 +6095,7 @@ typedef union { @endcode @note MSR_IA32_PKG_HDC_CTL is defined as IA32_PKG_HDC_CTL in SDM. **/ -#define MSR_IA32_PKG_HDC_CTL 0x00000DB0 +#define MSR_IA32_PKG_HDC_CTL 0x00000DB0 /** MSR information returned for MSR index #MSR_IA32_PKG_HDC_CTL @@ -6245,21 +6110,20 @@ typedef union { /// logical processors in the package. See Section 14.5.2, "Package level /// Enabling HDC". If CPUID.06H:EAX.[13] = 1. /// - UINT32 HDC_Pkg_Enable:1; - UINT32 Reserved1:31; - UINT32 Reserved2:32; + UINT32 HDC_Pkg_Enable : 1; + UINT32 Reserved1 : 31; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_PKG_HDC_CTL_REGISTER; - /** Enable/disable HWP (R/W). If CPUID.06H:EAX.[13] = 1. @@ -6278,7 +6142,7 @@ typedef union { @endcode @note MSR_IA32_PM_CTL1 is defined as IA32_PM_CTL1 in SDM. **/ -#define MSR_IA32_PM_CTL1 0x00000DB1 +#define MSR_IA32_PM_CTL1 0x00000DB1 /** MSR information returned for MSR index #MSR_IA32_PM_CTL1 @@ -6293,21 +6157,20 @@ typedef union { /// package level HDC control. See Section 14.5.3. /// If CPUID.06H:EAX.[13] = 1. /// - UINT32 HDC_Allow_Block:1; - UINT32 Reserved1:31; - UINT32 Reserved2:32; + UINT32 HDC_Allow_Block : 1; + UINT32 Reserved1 : 31; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_PM_CTL1_REGISTER; - /** Per-Logical_Processor HDC Idle Residency (R/0). If CPUID.06H:EAX.[13] = 1. Stall_Cycle_Cnt (R/W) Stalled cycles due to HDC forced idle on this logical @@ -6325,8 +6188,7 @@ typedef union { @endcode @note MSR_IA32_THREAD_STALL is defined as IA32_THREAD_STALL in SDM. **/ -#define MSR_IA32_THREAD_STALL 0x00000DB2 - +#define MSR_IA32_THREAD_STALL 0x00000DB2 /** Extended Feature Enables. If ( CPUID.80000001H:EDX.[2 0] @@ -6347,7 +6209,7 @@ typedef union { @endcode @note MSR_IA32_EFER is defined as IA32_EFER in SDM. **/ -#define MSR_IA32_EFER 0xC0000080 +#define MSR_IA32_EFER 0xC0000080 /** MSR information returned for MSR index #MSR_IA32_EFER @@ -6361,37 +6223,36 @@ typedef union { /// [Bit 0] SYSCALL Enable: IA32_EFER.SCE (R/W) Enables SYSCALL/SYSRET /// instructions in 64-bit mode. /// - UINT32 SCE:1; - UINT32 Reserved1:7; + UINT32 SCE : 1; + UINT32 Reserved1 : 7; /// /// [Bit 8] IA-32e Mode Enable: IA32_EFER.LME (R/W) Enables IA-32e mode /// operation. /// - UINT32 LME:1; - UINT32 Reserved2:1; + UINT32 LME : 1; + UINT32 Reserved2 : 1; /// /// [Bit 10] IA-32e Mode Active: IA32_EFER.LMA (R) Indicates IA-32e mode /// is active when set. /// - UINT32 LMA:1; + UINT32 LMA : 1; /// /// [Bit 11] Execute Disable Bit Enable: IA32_EFER.NXE (R/W). /// - UINT32 NXE:1; - UINT32 Reserved3:20; - UINT32 Reserved4:32; + UINT32 NXE : 1; + UINT32 Reserved3 : 20; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_EFER_REGISTER; - /** System Call Target Address (R/W). If CPUID.80000001:EDX.[29] = 1. @@ -6408,8 +6269,7 @@ typedef union { @endcode @note MSR_IA32_STAR is defined as IA32_STAR in SDM. **/ -#define MSR_IA32_STAR 0xC0000081 - +#define MSR_IA32_STAR 0xC0000081 /** IA-32e Mode System Call Target Address (R/W). If CPUID.80000001:EDX.[29] = 1. @@ -6427,7 +6287,7 @@ typedef union { @endcode @note MSR_IA32_LSTAR is defined as IA32_LSTAR in SDM. **/ -#define MSR_IA32_LSTAR 0xC0000082 +#define MSR_IA32_LSTAR 0xC0000082 /** IA-32e Mode System Call Target Address (R/W) Not used, as the SYSCALL @@ -6447,7 +6307,7 @@ typedef union { @endcode @note MSR_IA32_CSTAR is defined as IA32_CSTAR in SDM. **/ -#define MSR_IA32_CSTAR 0xC0000083 +#define MSR_IA32_CSTAR 0xC0000083 /** System Call Flag Mask (R/W). If CPUID.80000001:EDX.[29] = 1. @@ -6465,8 +6325,7 @@ typedef union { @endcode @note MSR_IA32_FMASK is defined as IA32_FMASK in SDM. **/ -#define MSR_IA32_FMASK 0xC0000084 - +#define MSR_IA32_FMASK 0xC0000084 /** Map of BASE Address of FS (R/W). If CPUID.80000001:EDX.[29] = 1. @@ -6484,8 +6343,7 @@ typedef union { @endcode @note MSR_IA32_FS_BASE is defined as IA32_FS_BASE in SDM. **/ -#define MSR_IA32_FS_BASE 0xC0000100 - +#define MSR_IA32_FS_BASE 0xC0000100 /** Map of BASE Address of GS (R/W). If CPUID.80000001:EDX.[29] = 1. @@ -6503,8 +6361,7 @@ typedef union { @endcode @note MSR_IA32_GS_BASE is defined as IA32_GS_BASE in SDM. **/ -#define MSR_IA32_GS_BASE 0xC0000101 - +#define MSR_IA32_GS_BASE 0xC0000101 /** Swap Target of BASE Address of GS (R/W). If CPUID.80000001:EDX.[29] = 1. @@ -6522,8 +6379,7 @@ typedef union { @endcode @note MSR_IA32_KERNEL_GS_BASE is defined as IA32_KERNEL_GS_BASE in SDM. **/ -#define MSR_IA32_KERNEL_GS_BASE 0xC0000102 - +#define MSR_IA32_KERNEL_GS_BASE 0xC0000102 /** Auxiliary TSC (RW). If CPUID.80000001H: EDX[27] = 1. @@ -6543,7 +6399,7 @@ typedef union { @endcode @note MSR_IA32_TSC_AUX is defined as IA32_TSC_AUX in SDM. **/ -#define MSR_IA32_TSC_AUX 0xC0000103 +#define MSR_IA32_TSC_AUX 0xC0000103 /** MSR information returned for MSR index #MSR_IA32_TSC_AUX @@ -6556,17 +6412,17 @@ typedef union { /// /// [Bits 31:0] AUX: Auxiliary signature of TSC. /// - UINT32 AUX:32; - UINT32 Reserved:32; + UINT32 AUX : 32; + UINT32 Reserved : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IA32_TSC_AUX_REGISTER; #endif diff --git a/MdePkg/Include/Register/Intel/Cpuid.h b/MdePkg/Include/Register/Intel/Cpuid.h index 5ec85ba..bd6349d 100644 --- a/MdePkg/Include/Register/Intel/Cpuid.h +++ b/MdePkg/Include/Register/Intel/Cpuid.h @@ -40,7 +40,7 @@ AsmCpuid (CPUID_SIGNATURE, &Eax, &Ebx, &Ecx, &Edx); @endcode **/ -#define CPUID_SIGNATURE 0x00 +#define CPUID_SIGNATURE 0x00 /// /// @{ CPUID signature values returned by Intel processors @@ -52,7 +52,6 @@ /// @} /// - /** CPUID Version Information @@ -77,7 +76,7 @@ AsmCpuid (CPUID_VERSION_INFO, &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32); @endcode **/ -#define CPUID_VERSION_INFO 0x01 +#define CPUID_VERSION_INFO 0x01 /** CPUID Version Information returned in EAX for CPUID leaf @@ -88,14 +87,14 @@ typedef union { /// Individual bit fields /// struct { - UINT32 SteppingId:4; ///< [Bits 3:0] Stepping ID - UINT32 Model:4; ///< [Bits 7:4] Model - UINT32 FamilyId:4; ///< [Bits 11:8] Family - UINT32 ProcessorType:2; ///< [Bits 13:12] Processor Type - UINT32 Reserved1:2; ///< [Bits 15:14] Reserved - UINT32 ExtendedModelId:4; ///< [Bits 19:16] Extended Model ID - UINT32 ExtendedFamilyId:8; ///< [Bits 27:20] Extended Family ID - UINT32 Reserved2:4; ///< Reserved + UINT32 SteppingId : 4; ///< [Bits 3:0] Stepping ID + UINT32 Model : 4; ///< [Bits 7:4] Model + UINT32 FamilyId : 4; ///< [Bits 11:8] Family + UINT32 ProcessorType : 2; ///< [Bits 13:12] Processor Type + UINT32 Reserved1 : 2; ///< [Bits 15:14] Reserved + UINT32 ExtendedModelId : 4; ///< [Bits 19:16] Extended Model ID + UINT32 ExtendedFamilyId : 8; ///< [Bits 27:20] Extended Family ID + UINT32 Reserved2 : 4; ///< Reserved } Bits; /// /// All bit fields as a 32-bit value @@ -126,13 +125,13 @@ typedef union { /// [Bits 7:0] Provides an entry into a brand string table that contains /// brand strings for IA-32 processors. /// - UINT32 BrandIndex:8; + UINT32 BrandIndex : 8; /// /// [Bits 15:8] Indicates the size of the cache line flushed by the CLFLUSH /// and CLFLUSHOPT instructions in 8-byte increments. This field was /// introduced in the Pentium 4 processor. /// - UINT32 CacheLineSize:8; + UINT32 CacheLineSize : 8; /// /// [Bits 23:16] Maximum number of addressable IDs for logical processors /// in this physical package. @@ -143,13 +142,13 @@ typedef union { /// logical processors in a physical package. This field is only valid if /// CPUID.1.EDX.HTT[bit 28]= 1. /// - UINT32 MaximumAddressableIdsForLogicalProcessors:8; + UINT32 MaximumAddressableIdsForLogicalProcessors : 8; /// /// [Bits 31:24] The 8-bit ID that is assigned to the local APIC on the /// processor during power up. This field was introduced in the Pentium 4 /// processor. /// - UINT32 InitialLocalApicId:8; + UINT32 InitialLocalApicId : 8; } Bits; /// /// All bit fields as a 32-bit value @@ -170,161 +169,161 @@ typedef union { /// [Bit 0] Streaming SIMD Extensions 3 (SSE3). A value of 1 indicates the /// processor supports this technology /// - UINT32 SSE3:1; + UINT32 SSE3 : 1; /// /// [Bit 1] A value of 1 indicates the processor supports the PCLMULQDQ /// instruction. Carryless Multiplication /// - UINT32 PCLMULQDQ:1; + UINT32 PCLMULQDQ : 1; /// /// [Bit 2] 64-bit DS Area. A value of 1 indicates the processor supports /// DS area using 64-bit layout. /// - UINT32 DTES64:1; + UINT32 DTES64 : 1; /// /// [Bit 3] MONITOR/MWAIT. A value of 1 indicates the processor supports /// this feature. /// - UINT32 MONITOR:1; + UINT32 MONITOR : 1; /// /// [Bit 4] CPL Qualified Debug Store. A value of 1 indicates the processor /// supports the extensions to the Debug Store feature to allow for branch /// message storage qualified by CPL /// - UINT32 DS_CPL:1; + UINT32 DS_CPL : 1; /// /// [Bit 5] Virtual Machine Extensions. A value of 1 indicates that the /// processor supports this technology. /// - UINT32 VMX:1; + UINT32 VMX : 1; /// /// [Bit 6] Safer Mode Extensions. A value of 1 indicates that the processor /// supports this technology /// - UINT32 SMX:1; + UINT32 SMX : 1; /// /// [Bit 7] Enhanced Intel SpeedStep(R) technology. A value of 1 indicates /// that the processor supports this technology /// - UINT32 EIST:1; + UINT32 EIST : 1; /// /// [Bit 8] Thermal Monitor 2. A value of 1 indicates whether the processor /// supports this technology /// - UINT32 TM2:1; + UINT32 TM2 : 1; /// /// [Bit 9] A value of 1 indicates the presence of the Supplemental Streaming /// SIMD Extensions 3 (SSSE3). A value of 0 indicates the instruction /// extensions are not present in the processor. /// - UINT32 SSSE3:1; + UINT32 SSSE3 : 1; /// /// [Bit 10] L1 Context ID. A value of 1 indicates the L1 data cache mode /// can be set to either adaptive mode or shared mode. A value of 0 indicates /// this feature is not supported. See definition of the IA32_MISC_ENABLE MSR /// Bit 24 (L1 Data Cache Context Mode) for details /// - UINT32 CNXT_ID:1; + UINT32 CNXT_ID : 1; /// /// [Bit 11] A value of 1 indicates the processor supports IA32_DEBUG_INTERFACE /// MSR for silicon debug /// - UINT32 SDBG:1; + UINT32 SDBG : 1; /// /// [Bit 12] A value of 1 indicates the processor supports FMA (Fused Multiple /// Add) extensions using YMM state. /// - UINT32 FMA:1; + UINT32 FMA : 1; /// /// [Bit 13] CMPXCHG16B Available. A value of 1 indicates that the feature /// is available. /// - UINT32 CMPXCHG16B:1; + UINT32 CMPXCHG16B : 1; /// /// [Bit 14] xTPR Update Control. A value of 1 indicates that the processor /// supports changing IA32_MISC_ENABLE[Bit 23]. /// - UINT32 xTPR_Update_Control:1; + UINT32 xTPR_Update_Control : 1; /// /// [Bit 15] Perfmon and Debug Capability: A value of 1 indicates the /// processor supports the performance and debug feature indication MSR /// IA32_PERF_CAPABILITIES. /// - UINT32 PDCM:1; - UINT32 Reserved:1; + UINT32 PDCM : 1; + UINT32 Reserved : 1; /// /// [Bit 17] Process-context identifiers. A value of 1 indicates that the /// processor supports PCIDs and that software may set CR4.PCIDE to 1. /// - UINT32 PCID:1; + UINT32 PCID : 1; /// /// [Bit 18] A value of 1 indicates the processor supports the ability to /// prefetch data from a memory mapped device. Direct Cache Access. /// - UINT32 DCA:1; + UINT32 DCA : 1; /// /// [Bit 19] A value of 1 indicates that the processor supports SSE4.1. /// - UINT32 SSE4_1:1; + UINT32 SSE4_1 : 1; /// /// [Bit 20] A value of 1 indicates that the processor supports SSE4.2. /// - UINT32 SSE4_2:1; + UINT32 SSE4_2 : 1; /// /// [Bit 21] A value of 1 indicates that the processor supports x2APIC /// feature. /// - UINT32 x2APIC:1; + UINT32 x2APIC : 1; /// /// [Bit 22] A value of 1 indicates that the processor supports MOVBE /// instruction. /// - UINT32 MOVBE:1; + UINT32 MOVBE : 1; /// /// [Bit 23] A value of 1 indicates that the processor supports the POPCNT /// instruction. /// - UINT32 POPCNT:1; + UINT32 POPCNT : 1; /// /// [Bit 24] A value of 1 indicates that the processor's local APIC timer /// supports one-shot operation using a TSC deadline value. /// - UINT32 TSC_Deadline:1; + UINT32 TSC_Deadline : 1; /// /// [Bit 25] A value of 1 indicates that the processor supports the AESNI /// instruction extensions. /// - UINT32 AESNI:1; + UINT32 AESNI : 1; /// /// [Bit 26] A value of 1 indicates that the processor supports the /// XSAVE/XRSTOR processor extended states feature, the XSETBV/XGETBV /// instructions, and XCR0. /// - UINT32 XSAVE:1; + UINT32 XSAVE : 1; /// /// [Bit 27] A value of 1 indicates that the OS has set CR4.OSXSAVE[Bit 18] /// to enable XSETBV/XGETBV instructions to access XCR0 and to support /// processor extended state management using XSAVE/XRSTOR. /// - UINT32 OSXSAVE:1; + UINT32 OSXSAVE : 1; /// /// [Bit 28] A value of 1 indicates the processor supports the AVX instruction /// extensions. /// - UINT32 AVX:1; + UINT32 AVX : 1; /// /// [Bit 29] A value of 1 indicates that processor supports 16-bit /// floating-point conversion instructions. /// - UINT32 F16C:1; + UINT32 F16C : 1; /// /// [Bit 30] A value of 1 indicates that processor supports RDRAND instruction. /// - UINT32 RDRAND:1; + UINT32 RDRAND : 1; /// /// [Bit 31] Always returns 0. /// - UINT32 NotUsed:1; + UINT32 NotUsed : 1; } Bits; /// /// All bit fields as a 32-bit value @@ -344,7 +343,7 @@ typedef union { /// /// [Bit 0] Floating Point Unit On-Chip. The processor contains an x87 FPU. /// - UINT32 FPU:1; + UINT32 FPU : 1; /// /// [Bit 1] Virtual 8086 Mode Enhancements. Virtual 8086 mode enhancements, /// including CR4.VME for controlling the feature, CR4.PVI for protected @@ -352,38 +351,38 @@ typedef union { /// the TSS with the software indirection bitmap, and EFLAGS.VIF and /// EFLAGS.VIP flags. /// - UINT32 VME:1; + UINT32 VME : 1; /// /// [Bit 2] Debugging Extensions. Support for I/O breakpoints, including /// CR4.DE for controlling the feature, and optional trapping of accesses to /// DR4 and DR5. /// - UINT32 DE:1; + UINT32 DE : 1; /// /// [Bit 3] Page Size Extension. Large pages of size 4 MByte are supported, /// including CR4.PSE for controlling the feature, the defined dirty bit in /// PDE (Page Directory Entries), optional reserved bit trapping in CR3, /// PDEs, and PTEs. /// - UINT32 PSE:1; + UINT32 PSE : 1; /// /// [Bit 4] Time Stamp Counter. The RDTSC instruction is supported, /// including CR4.TSD for controlling privilege. /// - UINT32 TSC:1; + UINT32 TSC : 1; /// /// [Bit 5] Model Specific Registers RDMSR and WRMSR Instructions. The /// RDMSR and WRMSR instructions are supported. Some of the MSRs are /// implementation dependent. /// - UINT32 MSR:1; + UINT32 MSR : 1; /// /// [Bit 6] Physical Address Extension. Physical addresses greater than 32 /// bits are supported: extended page table entry formats, an extra level in /// the page translation tables is defined, 2-MByte pages are supported /// instead of 4 Mbyte pages if PAE bit is 1. /// - UINT32 PAE:1; + UINT32 PAE : 1; /// /// [Bit 7] Machine Check Exception. Exception 18 is defined for Machine /// Checks, including CR4.MCE for controlling the feature. This feature does @@ -393,59 +392,59 @@ typedef union { /// processing of the exception, or test for the presence of the Machine /// Check feature. /// - UINT32 MCE:1; + UINT32 MCE : 1; /// /// [Bit 8] CMPXCHG8B Instruction. The compare-and-exchange 8 bytes(64 bits) /// instruction is supported (implicitly locked and atomic). /// - UINT32 CX8:1; + UINT32 CX8 : 1; /// /// [Bit 9] APIC On-Chip. The processor contains an Advanced Programmable /// Interrupt Controller (APIC), responding to memory mapped commands in the /// physical address range FFFE0000H to FFFE0FFFH (by default - some /// processors permit the APIC to be relocated). /// - UINT32 APIC:1; - UINT32 Reserved1:1; + UINT32 APIC : 1; + UINT32 Reserved1 : 1; /// /// [Bit 11] SYSENTER and SYSEXIT Instructions. The SYSENTER and SYSEXIT /// and associated MSRs are supported. /// - UINT32 SEP:1; + UINT32 SEP : 1; /// /// [Bit 12] Memory Type Range Registers. MTRRs are supported. The MTRRcap /// MSR contains feature bits that describe what memory types are supported, /// how many variable MTRRs are supported, and whether fixed MTRRs are /// supported. /// - UINT32 MTRR:1; + UINT32 MTRR : 1; /// /// [Bit 13] Page Global Bit. The global bit is supported in paging-structure /// entries that map a page, indicating TLB entries that are common to /// different processes and need not be flushed. The CR4.PGE bit controls /// this feature. /// - UINT32 PGE:1; + UINT32 PGE : 1; /// /// [Bit 14] Machine Check Architecture. A value of 1 indicates the Machine /// Check Architecture of reporting machine errors is supported. The MCG_CAP /// MSR contains feature bits describing how many banks of error reporting /// MSRs are supported. /// - UINT32 MCA:1; + UINT32 MCA : 1; /// /// [Bit 15] Conditional Move Instructions. The conditional move instruction /// CMOV is supported. In addition, if x87 FPU is present as indicated by the /// CPUID.FPU feature bit, then the FCOMI and FCMOV instructions are supported. /// - UINT32 CMOV:1; + UINT32 CMOV : 1; /// /// [Bit 16] Page Attribute Table. Page Attribute Table is supported. This /// feature augments the Memory Type Range Registers (MTRRs), allowing an /// operating system to specify attributes of memory accessed through a /// linear address on a 4KB granularity. /// - UINT32 PAT:1; + UINT32 PAT : 1; /// /// [Bit 17] 36-Bit Page Size Extension. 4-MByte pages addressing physical /// memory beyond 4 GBytes are supported with 32-bit paging. This feature @@ -453,36 +452,36 @@ typedef union { /// encoded in bits 20:13 of the page-directory entry. Such physical /// addresses are limited by MAXPHYADDR and may be up to 40 bits in size. /// - UINT32 PSE_36:1; + UINT32 PSE_36 : 1; /// /// [Bit 18] Processor Serial Number. The processor supports the 96-bit /// processor identification number feature and the feature is enabled. /// - UINT32 PSN:1; + UINT32 PSN : 1; /// /// [Bit 19] CLFLUSH Instruction. CLFLUSH Instruction is supported. /// - UINT32 CLFSH:1; - UINT32 Reserved2:1; + UINT32 CLFSH : 1; + UINT32 Reserved2 : 1; /// /// [Bit 21] Debug Store. The processor supports the ability to write debug /// information into a memory resident buffer. This feature is used by the /// branch trace store (BTS) and precise event-based sampling (PEBS) /// facilities. /// - UINT32 DS:1; + UINT32 DS : 1; /// /// [Bit 22] Thermal Monitor and Software Controlled Clock Facilities. The /// processor implements internal MSRs that allow processor temperature to /// be monitored and processor performance to be modulated in predefined /// duty cycles under software control. /// - UINT32 ACPI:1; + UINT32 ACPI : 1; /// /// [Bit 23] Intel MMX Technology. The processor supports the Intel MMX /// technology. /// - UINT32 MMX:1; + UINT32 MMX : 1; /// /// [Bit 24] FXSAVE and FXRSTOR Instructions. The FXSAVE and FXRSTOR /// instructions are supported for fast save and restore of the floating @@ -490,21 +489,21 @@ typedef union { /// available for an operating system to indicate that it supports the /// FXSAVE and FXRSTOR instructions. /// - UINT32 FXSR:1; + UINT32 FXSR : 1; /// /// [Bit 25] SSE. The processor supports the SSE extensions. /// - UINT32 SSE:1; + UINT32 SSE : 1; /// /// [Bit 26] SSE2. The processor supports the SSE2 extensions. /// - UINT32 SSE2:1; + UINT32 SSE2 : 1; /// /// [Bit 27] Self Snoop. The processor supports the management of /// conflicting memory types by performing a snoop of its own cache /// structure for transactions issued to the bus. /// - UINT32 SS:1; + UINT32 SS : 1; /// /// [Bit 28] Max APIC IDs reserved field is Valid. A value of 0 for HTT /// indicates there is only a single logical processor in the package and @@ -513,13 +512,13 @@ typedef union { /// addressable IDs for logical processors in this package) is valid for the /// package. /// - UINT32 HTT:1; + UINT32 HTT : 1; /// /// [Bit 29] Thermal Monitor. The processor implements the thermal monitor /// automatic thermal control circuitry (TCC). /// - UINT32 TM:1; - UINT32 Reserved3:1; + UINT32 TM : 1; + UINT32 Reserved3 : 1; /// /// [Bit 31] Pending Break Enable. The processor supports the use of the /// FERR#/PBE# pin when the processor is in the stop-clock state (STPCLK# is @@ -527,7 +526,7 @@ typedef union { /// the processor should return to normal operation to handle the interrupt. /// Bit 10 (PBE enable) in the IA32_MISC_ENABLE MSR enables this capability. /// - UINT32 PBE:1; + UINT32 PBE : 1; } Bits; /// /// All bit fields as a 32-bit value @@ -535,7 +534,6 @@ typedef union { UINT32 Uint32; } CPUID_VERSION_INFO_EDX; - /** CPUID Cache and TLB Information @@ -707,7 +705,7 @@ typedef union { use CPUID leaf 4 to query cache parameters **/ -#define CPUID_CACHE_INFO 0x02 +#define CPUID_CACHE_INFO 0x02 /** CPUID Cache and TLB Information returned in EAX, EBX, ECX, and EDX for CPUID @@ -718,24 +716,23 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved:31; + UINT32 Reserved : 31; /// /// [Bit 31] If 0, then the cache descriptor bytes in the register are valid. /// if 1, then none of the cache descriptor bytes in the register are valid. /// - UINT32 NotValid:1; + UINT32 NotValid : 1; } Bits; /// /// Array of Cache and TLB descriptor bytes /// - UINT8 CacheDescriptor[4]; + UINT8 CacheDescriptor[4]; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_CACHE_INFO_CACHE_TLB; - /** CPUID Processor Serial Number @@ -762,8 +759,7 @@ typedef union { AsmCpuid (CPUID_SERIAL_NUMBER, NULL, NULL, &Ecx, &Edx); @endcode **/ -#define CPUID_SERIAL_NUMBER 0x03 - +#define CPUID_SERIAL_NUMBER 0x03 /** CPUID Cache Parameters @@ -801,7 +797,7 @@ typedef union { } while (Eax.Bits.CacheType != CPUID_CACHE_PARAMS_CACHE_TYPE_NULL); @endcode **/ -#define CPUID_CACHE_PARAMS 0x04 +#define CPUID_CACHE_PARAMS 0x04 /** CPUID Cache Parameters Information returned in EAX for CPUID leaf @@ -816,23 +812,23 @@ typedef union { /// [Bits 4:0] Cache type field. If #CPUID_CACHE_PARAMS_CACHE_TYPE_NULL, /// then there is no information for the requested cache level. /// - UINT32 CacheType:5; + UINT32 CacheType : 5; /// /// [Bits 7:5] Cache level (Starts at 1). /// - UINT32 CacheLevel:3; + UINT32 CacheLevel : 3; /// /// [Bit 8] Self Initializing cache level (does not need SW initialization). /// - UINT32 SelfInitializingCache:1; + UINT32 SelfInitializingCache : 1; /// /// [Bit 9] Fully Associative cache. /// - UINT32 FullyAssociativeCache:1; + UINT32 FullyAssociativeCache : 1; /// /// [Bits 13:10] Reserved. /// - UINT32 Reserved:4; + UINT32 Reserved : 4; /// /// [Bits 25:14] Maximum number of addressable IDs for logical processors /// sharing this cache. @@ -842,7 +838,7 @@ typedef union { /// is the number of unique initial APIC IDs reserved for addressing /// different logical processors sharing this cache. /// - UINT32 MaximumAddressableIdsForLogicalProcessors:12; + UINT32 MaximumAddressableIdsForLogicalProcessors : 12; /// /// [Bits 31:26] Maximum number of addressable IDs for processor cores in /// the physical package. @@ -854,12 +850,12 @@ typedef union { /// The returned value is constant for valid initial values in ECX. Valid /// ECX values start from 0. /// - UINT32 MaximumAddressableIdsForProcessorCores:6; + UINT32 MaximumAddressableIdsForProcessorCores : 6; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_CACHE_PARAMS_EAX; /// @@ -886,22 +882,22 @@ typedef union { /// [Bits 11:0] System Coherency Line Size. Add one to the return value to /// get the result. /// - UINT32 LineSize:12; + UINT32 LineSize : 12; /// /// [Bits 21:12] Physical Line Partitions. Add one to the return value to /// get the result. /// - UINT32 LinePartitions:10; + UINT32 LinePartitions : 10; /// /// [Bits 31:22] Ways of associativity. Add one to the return value to get /// the result. /// - UINT32 Ways:10; + UINT32 Ways : 10; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_CACHE_PARAMS_EBX; /** @@ -920,29 +916,28 @@ typedef union { /// 1 = WBINVD/INVD is not guaranteed to act upon lower level caches of /// non-originating threads sharing this cache. /// - UINT32 Invalidate:1; + UINT32 Invalidate : 1; /// /// [Bit 1] Cache Inclusiveness. /// 0 = Cache is not inclusive of lower cache levels. /// 1 = Cache is inclusive of lower cache levels. /// - UINT32 CacheInclusiveness:1; + UINT32 CacheInclusiveness : 1; /// /// [Bit 2] Complex Cache Indexing. /// 0 = Direct mapped cache. /// 1 = A complex function is used to index the cache, potentially using all /// address bits. /// - UINT32 ComplexCacheIndexing:1; - UINT32 Reserved:29; + UINT32 ComplexCacheIndexing : 1; + UINT32 Reserved : 29; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_CACHE_PARAMS_EDX; - /** CPUID MONITOR/MWAIT Information @@ -967,7 +962,7 @@ typedef union { AsmCpuid (CPUID_MONITOR_MWAIT, &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32); @endcode **/ -#define CPUID_MONITOR_MWAIT 0x05 +#define CPUID_MONITOR_MWAIT 0x05 /** CPUID MONITOR/MWAIT Information returned in EAX for CPUID leaf @@ -982,13 +977,13 @@ typedef union { /// [Bits 15:0] Smallest monitor-line size in bytes (default is processor's /// monitor granularity). /// - UINT32 SmallestMonitorLineSize:16; - UINT32 Reserved:16; + UINT32 SmallestMonitorLineSize : 16; + UINT32 Reserved : 16; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_MONITOR_MWAIT_EAX; /** @@ -1004,13 +999,13 @@ typedef union { /// [Bits 15:0] Largest monitor-line size in bytes (default is processor's /// monitor granularity). /// - UINT32 LargestMonitorLineSize:16; - UINT32 Reserved:16; + UINT32 LargestMonitorLineSize : 16; + UINT32 Reserved : 16; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_MONITOR_MWAIT_EBX; /** @@ -1026,18 +1021,18 @@ typedef union { /// [Bit 0] If 0, then only EAX and EBX are valid. If 1, then EAX, EBX, ECX, /// and EDX are valid. /// - UINT32 ExtensionsSupported:1; + UINT32 ExtensionsSupported : 1; /// /// [Bit 1] Supports treating interrupts as break-event for MWAIT, even when /// interrupts disabled. /// - UINT32 InterruptAsBreak:1; - UINT32 Reserved:30; + UINT32 InterruptAsBreak : 1; + UINT32 Reserved : 30; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_MONITOR_MWAIT_ECX; /** @@ -1056,43 +1051,42 @@ typedef union { /// /// [Bits 3:0] Number of C0 sub C-states supported using MWAIT. /// - UINT32 C0States:4; + UINT32 C0States : 4; /// /// [Bits 7:4] Number of C1 sub C-states supported using MWAIT. /// - UINT32 C1States:4; + UINT32 C1States : 4; /// /// [Bits 11:8] Number of C2 sub C-states supported using MWAIT. /// - UINT32 C2States:4; + UINT32 C2States : 4; /// /// [Bits 15:12] Number of C3 sub C-states supported using MWAIT. /// - UINT32 C3States:4; + UINT32 C3States : 4; /// /// [Bits 19:16] Number of C4 sub C-states supported using MWAIT. /// - UINT32 C4States:4; + UINT32 C4States : 4; /// /// [Bits 23:20] Number of C5 sub C-states supported using MWAIT. /// - UINT32 C5States:4; + UINT32 C5States : 4; /// /// [Bits 27:24] Number of C6 sub C-states supported using MWAIT. /// - UINT32 C6States:4; + UINT32 C6States : 4; /// /// [Bits 31:28] Number of C7 sub C-states supported using MWAIT. /// - UINT32 C7States:4; + UINT32 C7States : 4; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_MONITOR_MWAIT_EDX; - /** CPUID Thermal and Power Management @@ -1115,7 +1109,7 @@ typedef union { AsmCpuid (CPUID_THERMAL_POWER_MANAGEMENT, &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, NULL); @endcode **/ -#define CPUID_THERMAL_POWER_MANAGEMENT 0x06 +#define CPUID_THERMAL_POWER_MANAGEMENT 0x06 /** CPUID Thermal and Power Management Information returned in EAX for CPUID leaf @@ -1129,87 +1123,87 @@ typedef union { /// /// [Bit 0] Digital temperature sensor is supported if set. /// - UINT32 DigitalTemperatureSensor:1; + UINT32 DigitalTemperatureSensor : 1; /// /// [Bit 1] Intel Turbo Boost Technology Available (see IA32_MISC_ENABLE[38]). /// - UINT32 TurboBoostTechnology:1; + UINT32 TurboBoostTechnology : 1; /// /// [Bit 2] APIC-Timer-always-running feature is supported if set. /// - UINT32 ARAT:1; - UINT32 Reserved1:1; + UINT32 ARAT : 1; + UINT32 Reserved1 : 1; /// /// [Bit 4] Power limit notification controls are supported if set. /// - UINT32 PLN:1; + UINT32 PLN : 1; /// /// [Bit 5] Clock modulation duty cycle extension is supported if set. /// - UINT32 ECMD:1; + UINT32 ECMD : 1; /// /// [Bit 6] Package thermal management is supported if set. /// - UINT32 PTM:1; + UINT32 PTM : 1; /// /// [Bit 7] HWP base registers (IA32_PM_ENABLE[Bit 0], IA32_HWP_CAPABILITIES, /// IA32_HWP_REQUEST, IA32_HWP_STATUS) are supported if set. /// - UINT32 HWP:1; + UINT32 HWP : 1; /// /// [Bit 8] IA32_HWP_INTERRUPT MSR is supported if set. /// - UINT32 HWP_Notification:1; + UINT32 HWP_Notification : 1; /// /// [Bit 9] IA32_HWP_REQUEST[Bits 41:32] is supported if set. /// - UINT32 HWP_Activity_Window:1; + UINT32 HWP_Activity_Window : 1; /// /// [Bit 10] IA32_HWP_REQUEST[Bits 31:24] is supported if set. /// - UINT32 HWP_Energy_Performance_Preference:1; + UINT32 HWP_Energy_Performance_Preference : 1; /// /// [Bit 11] IA32_HWP_REQUEST_PKG MSR is supported if set. /// - UINT32 HWP_Package_Level_Request:1; - UINT32 Reserved2:1; + UINT32 HWP_Package_Level_Request : 1; + UINT32 Reserved2 : 1; /// /// [Bit 13] HDC base registers IA32_PKG_HDC_CTL, IA32_PM_CTL1, /// IA32_THREAD_STALL MSRs are supported if set. /// - UINT32 HDC:1; + UINT32 HDC : 1; /// /// [Bit 14] Intel Turbo Boost Max Technology 3.0 available. /// - UINT32 TurboBoostMaxTechnology30:1; + UINT32 TurboBoostMaxTechnology30 : 1; /// /// [Bit 15] HWP Capabilities. /// Highest Performance change is supported if set. /// - UINT32 HWPCapabilities:1; + UINT32 HWPCapabilities : 1; /// /// [Bit 16] HWP PECI override is supported if set. /// - UINT32 HWPPECIOverride:1; + UINT32 HWPPECIOverride : 1; /// /// [Bit 17] Flexible HWP is supported if set. /// - UINT32 FlexibleHWP:1; + UINT32 FlexibleHWP : 1; /// /// [Bit 18] Fast access mode for the IA32_HWP_REQUEST MSR is supported if set. /// - UINT32 FastAccessMode:1; - UINT32 Reserved4:1; + UINT32 FastAccessMode : 1; + UINT32 Reserved4 : 1; /// /// [Bit 20] Ignoring Idle Logical Processor HWP request is supported if set. /// - UINT32 IgnoringIdleLogicalProcessorHWPRequest:1; - UINT32 Reserved5:11; + UINT32 IgnoringIdleLogicalProcessorHWPRequest : 1; + UINT32 Reserved5 : 11; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_THERMAL_POWER_MANAGEMENT_EAX; /** @@ -1224,13 +1218,13 @@ typedef union { /// /// {Bits 3:0] Number of Interrupt Thresholds in Digital Thermal Sensor. /// - UINT32 InterruptThresholds:4; - UINT32 Reserved:28; + UINT32 InterruptThresholds : 4; + UINT32 Reserved : 28; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_THERMAL_POWER_MANAGEMENT_EBX; /** @@ -1248,23 +1242,22 @@ typedef union { /// processor performance (since last reset of the counters), as a percentage /// of the expected processor performance when running at the TSC frequency. /// - UINT32 HardwareCoordinationFeedback:1; - UINT32 Reserved1:2; + UINT32 HardwareCoordinationFeedback : 1; + UINT32 Reserved1 : 2; /// /// [Bit 3] If this bit is set, then the processor supports performance-energy /// bias preference and the architectural MSR called IA32_ENERGY_PERF_BIAS /// (1B0H). /// - UINT32 PerformanceEnergyBias:1; - UINT32 Reserved2:28; + UINT32 PerformanceEnergyBias : 1; + UINT32 Reserved2 : 28; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_THERMAL_POWER_MANAGEMENT_ECX; - /** CPUID Structured Extended Feature Flags Enumeration @@ -1303,7 +1296,7 @@ typedef union { } @endcode **/ -#define CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS 0x07 +#define CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS 0x07 /// /// CPUID Structured Extended Feature Flags Enumeration sub-leaf @@ -1323,144 +1316,144 @@ typedef union { /// /// [Bit 0] Supports RDFSBASE/RDGSBASE/WRFSBASE/WRGSBASE if 1. /// - UINT32 FSGSBASE:1; + UINT32 FSGSBASE : 1; /// /// [Bit 1] IA32_TSC_ADJUST MSR is supported if 1. /// - UINT32 IA32_TSC_ADJUST:1; + UINT32 IA32_TSC_ADJUST : 1; /// /// [Bit 2] Intel SGX is supported if 1. See section 37.7 "DISCOVERING SUPPORT /// FOR INTEL(R) SGX AND ENABLING ENCLAVE INSTRUCTIONS". /// - UINT32 SGX:1; + UINT32 SGX : 1; /// /// [Bit 3] If 1 indicates the processor supports the first group of advanced /// bit manipulation extensions (ANDN, BEXTR, BLSI, BLSMSK, BLSR, TZCNT) /// - UINT32 BMI1:1; + UINT32 BMI1 : 1; /// /// [Bit 4] Hardware Lock Elision /// - UINT32 HLE:1; + UINT32 HLE : 1; /// /// [Bit 5] If 1 indicates the processor supports AVX2 instruction extensions. /// - UINT32 AVX2:1; + UINT32 AVX2 : 1; /// /// [Bit 6] x87 FPU Data Pointer updated only on x87 exceptions if 1. /// - UINT32 FDP_EXCPTN_ONLY:1; + UINT32 FDP_EXCPTN_ONLY : 1; /// /// [Bit 7] Supports Supervisor-Mode Execution Prevention if 1. /// - UINT32 SMEP:1; + UINT32 SMEP : 1; /// /// [Bit 8] If 1 indicates the processor supports the second group of /// advanced bit manipulation extensions (BZHI, MULX, PDEP, PEXT, RORX, /// SARX, SHLX, SHRX) /// - UINT32 BMI2:1; + UINT32 BMI2 : 1; /// /// [Bit 9] Supports Enhanced REP MOVSB/STOSB if 1. /// - UINT32 EnhancedRepMovsbStosb:1; + UINT32 EnhancedRepMovsbStosb : 1; /// /// [Bit 10] If 1, supports INVPCID instruction for system software that /// manages process-context identifiers. /// - UINT32 INVPCID:1; + UINT32 INVPCID : 1; /// /// [Bit 11] Restricted Transactional Memory /// - UINT32 RTM:1; + UINT32 RTM : 1; /// /// [Bit 12] Supports Intel(R) Resource Director Technology (Intel(R) RDT) /// Monitoring capability if 1. /// - UINT32 RDT_M:1; + UINT32 RDT_M : 1; /// /// [Bit 13] Deprecates FPU CS and FPU DS values if 1. /// - UINT32 DeprecateFpuCsDs:1; + UINT32 DeprecateFpuCsDs : 1; /// /// [Bit 14] Supports Intel(R) Memory Protection Extensions if 1. /// - UINT32 MPX:1; + UINT32 MPX : 1; /// /// [Bit 15] Supports Intel(R) Resource Director Technology (Intel(R) RDT) /// Allocation capability if 1. /// - UINT32 RDT_A:1; + UINT32 RDT_A : 1; /// /// [Bit 16] AVX512F. /// - UINT32 AVX512F:1; + UINT32 AVX512F : 1; /// /// [Bit 17] AVX512DQ. /// - UINT32 AVX512DQ:1; + UINT32 AVX512DQ : 1; /// /// [Bit 18] If 1 indicates the processor supports the RDSEED instruction. /// - UINT32 RDSEED:1; + UINT32 RDSEED : 1; /// /// [Bit 19] If 1 indicates the processor supports the ADCX and ADOX /// instructions. /// - UINT32 ADX:1; + UINT32 ADX : 1; /// /// [Bit 20] Supports Supervisor-Mode Access Prevention (and the CLAC/STAC /// instructions) if 1. /// - UINT32 SMAP:1; + UINT32 SMAP : 1; /// /// [Bit 21] AVX512_IFMA. /// - UINT32 AVX512_IFMA:1; - UINT32 Reserved6:1; + UINT32 AVX512_IFMA : 1; + UINT32 Reserved6 : 1; /// /// [Bit 23] If 1 indicates the processor supports the CLFLUSHOPT instruction. /// - UINT32 CLFLUSHOPT:1; + UINT32 CLFLUSHOPT : 1; /// /// [Bit 24] If 1 indicates the processor supports the CLWB instruction. /// - UINT32 CLWB:1; + UINT32 CLWB : 1; /// /// [Bit 25] If 1 indicates the processor supports the Intel Processor Trace /// extensions. /// - UINT32 IntelProcessorTrace:1; + UINT32 IntelProcessorTrace : 1; /// /// [Bit 26] AVX512PF. (Intel Xeon Phi only.). /// - UINT32 AVX512PF:1; + UINT32 AVX512PF : 1; /// /// [Bit 27] AVX512ER. (Intel Xeon Phi only.). /// - UINT32 AVX512ER:1; + UINT32 AVX512ER : 1; /// /// [Bit 28] AVX512CD. /// - UINT32 AVX512CD:1; + UINT32 AVX512CD : 1; /// /// [Bit 29] Supports Intel(R) Secure Hash Algorithm Extensions (Intel(R) /// SHA Extensions) if 1. /// - UINT32 SHA:1; + UINT32 SHA : 1; /// /// [Bit 30] AVX512BW. /// - UINT32 AVX512BW:1; + UINT32 AVX512BW : 1; /// /// [Bit 31] AVX512VL. /// - UINT32 AVX512VL:1; + UINT32 AVX512VL : 1; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_EBX; /** @@ -1477,54 +1470,54 @@ typedef union { /// [Bit 0] If 1 indicates the processor supports the PREFETCHWT1 instruction. /// (Intel Xeon Phi only.) /// - UINT32 PREFETCHWT1:1; + UINT32 PREFETCHWT1 : 1; /// /// [Bit 1] AVX512_VBMI. /// - UINT32 AVX512_VBMI:1; + UINT32 AVX512_VBMI : 1; /// /// [Bit 2] Supports user-mode instruction prevention if 1. /// - UINT32 UMIP:1; + UINT32 UMIP : 1; /// /// [Bit 3] Supports protection keys for user-mode pages if 1. /// - UINT32 PKU:1; + UINT32 PKU : 1; /// /// [Bit 4] If 1, OS has set CR4.PKE to enable protection keys (and the /// RDPKRU/WRPKRU instructions). /// - UINT32 OSPKE:1; - UINT32 Reserved5:9; + UINT32 OSPKE : 1; + UINT32 Reserved5 : 9; /// /// [Bits 14] AVX512_VPOPCNTDQ. (Intel Xeon Phi only.). /// - UINT32 AVX512_VPOPCNTDQ:1; - UINT32 Reserved7:1; + UINT32 AVX512_VPOPCNTDQ : 1; + UINT32 Reserved7 : 1; /// /// [Bits 16] Supports 5-level paging if 1. /// - UINT32 FiveLevelPage:1; + UINT32 FiveLevelPage : 1; /// /// [Bits 21:17] The value of MAWAU used by the BNDLDX and BNDSTX instructions /// in 64-bit mode. /// - UINT32 MAWAU:5; + UINT32 MAWAU : 5; /// /// [Bit 22] RDPID and IA32_TSC_AUX are available if 1. /// - UINT32 RDPID:1; - UINT32 Reserved3:7; + UINT32 RDPID : 1; + UINT32 Reserved3 : 7; /// /// [Bit 30] Supports SGX Launch Configuration if 1. /// - UINT32 SGX_LC:1; - UINT32 Reserved4:1; + UINT32 SGX_LC : 1; + UINT32 Reserved4 : 1; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_ECX; /** @@ -1540,27 +1533,27 @@ typedef union { /// /// [Bit 1:0] Reserved. /// - UINT32 Reserved1:2; + UINT32 Reserved1 : 2; /// /// [Bit 2] AVX512_4VNNIW. (Intel Xeon Phi only.) /// - UINT32 AVX512_4VNNIW:1; + UINT32 AVX512_4VNNIW : 1; /// /// [Bit 3] AVX512_4FMAPS. (Intel Xeon Phi only.) /// - UINT32 AVX512_4FMAPS:1; + UINT32 AVX512_4FMAPS : 1; /// /// [Bit 14:4] Reserved. /// - UINT32 Reserved4:11; + UINT32 Reserved4 : 11; /// /// [Bit 15] Hybrid. If 1, the processor is identified as a hybrid part. /// - UINT32 Hybrid:1; + UINT32 Hybrid : 1; /// /// [Bit 25:16] Reserved. /// - UINT32 Reserved5:10; + UINT32 Reserved5 : 10; /// /// [Bit 26] Enumerates support for indirect branch restricted speculation /// (IBRS) and the indirect branch pre-dictor barrier (IBPB). Processors @@ -1568,39 +1561,39 @@ typedef union { /// MSR. They allow software to set IA32_SPEC_CTRL[0] (IBRS) and /// IA32_PRED_CMD[0] (IBPB). /// - UINT32 EnumeratesSupportForIBRSAndIBPB:1; + UINT32 EnumeratesSupportForIBRSAndIBPB : 1; /// /// [Bit 27] Enumerates support for single thread indirect branch /// predictors (STIBP). Processors that set this bit support the /// IA32_SPEC_CTRL MSR. They allow software to set IA32_SPEC_CTRL[1] /// (STIBP). /// - UINT32 EnumeratesSupportForSTIBP:1; + UINT32 EnumeratesSupportForSTIBP : 1; /// /// [Bit 28] Enumerates support for L1D_FLUSH. Processors that set this bit /// support the IA32_FLUSH_CMD MSR. They allow software to set /// IA32_FLUSH_CMD[0] (L1D_FLUSH). /// - UINT32 EnumeratesSupportForL1D_FLUSH:1; + UINT32 EnumeratesSupportForL1D_FLUSH : 1; /// /// [Bit 29] Enumerates support for the IA32_ARCH_CAPABILITIES MSR. /// - UINT32 EnumeratesSupportForCapability:1; + UINT32 EnumeratesSupportForCapability : 1; /// /// [Bit 30] Enumerates support for the IA32_CORE_CAPABILITIES MSR. /// - UINT32 EnumeratesSupportForCoreCapabilitiesMsr:1; + UINT32 EnumeratesSupportForCoreCapabilitiesMsr : 1; /// /// [Bit 31] Enumerates support for Speculative Store Bypass Disable (SSBD). /// Processors that set this bit sup-port the IA32_SPEC_CTRL MSR. They allow /// software to set IA32_SPEC_CTRL[2] (SSBD). /// - UINT32 EnumeratesSupportForSSBD:1; + UINT32 EnumeratesSupportForSSBD : 1; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_EDX; /** @@ -1620,8 +1613,7 @@ typedef union { AsmCpuid (CPUID_DIRECT_CACHE_ACCESS_INFO, &Eax, NULL, NULL, NULL); @endcode **/ -#define CPUID_DIRECT_CACHE_ACCESS_INFO 0x09 - +#define CPUID_DIRECT_CACHE_ACCESS_INFO 0x09 /** CPUID Architectural Performance Monitoring @@ -1659,7 +1651,7 @@ typedef union { /// /// [Bit 7:0] Version ID of architectural performance monitoring. /// - UINT32 ArchPerfMonVerID:8; + UINT32 ArchPerfMonVerID : 8; /// /// [Bits 15:8] Number of general-purpose performance monitoring counter /// per logical processor. @@ -1669,7 +1661,7 @@ typedef union { /// paired with a corresponding performance counter in the 0C1H address /// block. /// - UINT32 PerformanceMonitorCounters:8; + UINT32 PerformanceMonitorCounters : 8; /// /// [Bits 23:16] Bit width of general-purpose, performance monitoring counter. /// @@ -1678,17 +1670,17 @@ typedef union { /// may be written with any value, and the high-order bits are sign-extended /// from the value of bit 31. /// - UINT32 PerformanceMonitorCounterWidth:8; + UINT32 PerformanceMonitorCounterWidth : 8; /// /// [Bits 31:24] Length of EBX bit vector to enumerate architectural /// performance monitoring events. /// - UINT32 EbxBitVectorLength:8; + UINT32 EbxBitVectorLength : 8; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING_EAX; /** @@ -1703,37 +1695,37 @@ typedef union { /// /// [Bit 0] Core cycle event not available if 1. /// - UINT32 UnhaltedCoreCycles:1; + UINT32 UnhaltedCoreCycles : 1; /// /// [Bit 1] Instruction retired event not available if 1. /// - UINT32 InstructionsRetired:1; + UINT32 InstructionsRetired : 1; /// /// [Bit 2] Reference cycles event not available if 1. /// - UINT32 UnhaltedReferenceCycles:1; + UINT32 UnhaltedReferenceCycles : 1; /// /// [Bit 3] Last-level cache reference event not available if 1. /// - UINT32 LastLevelCacheReferences:1; + UINT32 LastLevelCacheReferences : 1; /// /// [Bit 4] Last-level cache misses event not available if 1. /// - UINT32 LastLevelCacheMisses:1; + UINT32 LastLevelCacheMisses : 1; /// /// [Bit 5] Branch instruction retired event not available if 1. /// - UINT32 BranchInstructionsRetired:1; + UINT32 BranchInstructionsRetired : 1; /// /// [Bit 6] Branch mispredict retired event not available if 1. /// - UINT32 AllBranchMispredictRetired:1; - UINT32 Reserved:25; + UINT32 AllBranchMispredictRetired : 1; + UINT32 Reserved : 25; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING_EBX; /** @@ -1749,26 +1741,25 @@ typedef union { /// [Bits 4:0] Number of fixed-function performance counters /// (if Version ID > 1). /// - UINT32 FixedFunctionPerformanceCounters:5; + UINT32 FixedFunctionPerformanceCounters : 5; /// /// [Bits 12:5] Bit width of fixed-function performance counters /// (if Version ID > 1). /// - UINT32 FixedFunctionPerformanceCounterWidth:8; - UINT32 Reserved1:2; + UINT32 FixedFunctionPerformanceCounterWidth : 8; + UINT32 Reserved1 : 2; /// /// [Bits 15] AnyThread deprecation. /// - UINT32 AnyThreadDeprecation:1; - UINT32 Reserved2:16; + UINT32 AnyThreadDeprecation : 1; + UINT32 Reserved2 : 16; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_ARCHITECTURAL_PERFORMANCE_MONITORING_EDX; - /** CPUID Extended Topology Information @@ -1814,7 +1805,7 @@ typedef union { } while (Eax.Bits.ApicIdShift != 0); @endcode **/ -#define CPUID_EXTENDED_TOPOLOGY 0x0B +#define CPUID_EXTENDED_TOPOLOGY 0x0B /** CPUID Extended Topology Information EAX for CPUID leaf #CPUID_EXTENDED_TOPOLOGY. @@ -1833,13 +1824,13 @@ typedef union { /// Software should use this field (EAX[4:0]) to enumerate processor /// topology of the system. /// - UINT32 ApicIdShift:5; - UINT32 Reserved:27; + UINT32 ApicIdShift : 5; + UINT32 Reserved : 27; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_EXTENDED_TOPOLOGY_EAX; /** @@ -1861,13 +1852,13 @@ typedef union { /// available to BIOS/OS/Applications may be different from the value of /// EBX[15:0], depending on software and platform hardware configurations. /// - UINT32 LogicalProcessors:16; - UINT32 Reserved:16; + UINT32 LogicalProcessors : 16; + UINT32 Reserved : 16; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_EXTENDED_TOPOLOGY_EBX; /** @@ -1881,7 +1872,7 @@ typedef union { /// /// [Bits 7:0] Level number. Same value in ECX input. /// - UINT32 LevelNumber:8; + UINT32 LevelNumber : 8; /// /// [Bits 15:8] Level type. /// @@ -1889,26 +1880,25 @@ typedef union { /// The value of the "level type" field is not related to level numbers in /// any way, higher "level type" values do not mean higher levels. /// - UINT32 LevelType:8; - UINT32 Reserved:16; + UINT32 LevelType : 8; + UINT32 Reserved : 16; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_EXTENDED_TOPOLOGY_ECX; /// /// @{ Define value for CPUID_EXTENDED_TOPOLOGY_ECX.LevelType /// -#define CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_INVALID 0x00 -#define CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_SMT 0x01 -#define CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_CORE 0x02 +#define CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_INVALID 0x00 +#define CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_SMT 0x01 +#define CPUID_EXTENDED_TOPOLOGY_LEVEL_TYPE_CORE 0x02 /// /// @} /// - /** CPUID Extended State Information @@ -1918,7 +1908,7 @@ typedef union { CPUID_EXTENDED_STATE_SIZE_OFFSET (0x02). Sub leafs 2..n based on supported bits in XCR0 or IA32_XSS_MSR. **/ -#define CPUID_EXTENDED_STATE 0x0D +#define CPUID_EXTENDED_STATE 0x0D /** CPUID Extended State Information Main Leaf @@ -1953,7 +1943,7 @@ typedef union { ); @endcode **/ -#define CPUID_EXTENDED_STATE_MAIN_LEAF 0x00 +#define CPUID_EXTENDED_STATE_MAIN_LEAF 0x00 /** CPUID Extended State Information EAX for CPUID leaf #CPUID_EXTENDED_STATE, @@ -1967,42 +1957,42 @@ typedef union { /// /// [Bit 0] x87 state. /// - UINT32 x87:1; + UINT32 x87 : 1; /// /// [Bit 1] SSE state. /// - UINT32 SSE:1; + UINT32 SSE : 1; /// /// [Bit 2] AVX state. /// - UINT32 AVX:1; + UINT32 AVX : 1; /// /// [Bits 4:3] MPX state. /// - UINT32 MPX:2; + UINT32 MPX : 2; /// /// [Bits 7:5] AVX-512 state. /// - UINT32 AVX_512:3; + UINT32 AVX_512 : 3; /// /// [Bit 8] Used for IA32_XSS. /// - UINT32 IA32_XSS:1; + UINT32 IA32_XSS : 1; /// /// [Bit 9] PKRU state. /// - UINT32 PKRU:1; - UINT32 Reserved1:3; + UINT32 PKRU : 1; + UINT32 Reserved1 : 3; /// /// [Bit 13] Used for IA32_XSS, part 2. /// - UINT32 IA32_XSS_2:1; - UINT32 Reserved2:18; + UINT32 IA32_XSS_2 : 1; + UINT32 Reserved2 : 18; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_EXTENDED_STATE_MAIN_LEAF_EAX; /** @@ -2033,7 +2023,7 @@ typedef union { ); @endcode **/ -#define CPUID_EXTENDED_STATE_SUB_LEAF 0x01 +#define CPUID_EXTENDED_STATE_SUB_LEAF 0x01 /** CPUID Extended State Information EAX for CPUID leaf #CPUID_EXTENDED_STATE, @@ -2047,25 +2037,25 @@ typedef union { /// /// [Bit 0] XSAVEOPT is available. /// - UINT32 XSAVEOPT:1; + UINT32 XSAVEOPT : 1; /// /// [Bit 1] Supports XSAVEC and the compacted form of XRSTOR if set. /// - UINT32 XSAVEC:1; + UINT32 XSAVEC : 1; /// /// [Bit 2] Supports XGETBV with ECX = 1 if set. /// - UINT32 XGETBV:1; + UINT32 XGETBV : 1; /// /// [Bit 3] Supports XSAVES/XRSTORS and IA32_XSS if set. /// - UINT32 XSAVES:1; - UINT32 Reserved:28; + UINT32 XSAVES : 1; + UINT32 Reserved : 28; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_EXTENDED_STATE_SUB_LEAF_EAX; /** @@ -2080,26 +2070,26 @@ typedef union { /// /// [Bits 7:0] Used for XCR0. /// - UINT32 XCR0:1; + UINT32 XCR0 : 1; /// /// [Bit 8] PT STate. /// - UINT32 PT:1; + UINT32 PT : 1; /// /// [Bit 9] Used for XCR0. /// - UINT32 XCR0_1:1; - UINT32 Reserved1:3; + UINT32 XCR0_1 : 1; + UINT32 Reserved1 : 3; /// /// [Bit 13] HWP state. /// - UINT32 HWPState:1; - UINT32 Reserved8:18; + UINT32 HWPState : 1; + UINT32 Reserved8 : 18; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_EXTENDED_STATE_SUB_LEAF_ECX; /** @@ -2147,7 +2137,7 @@ typedef union { } @endcode **/ -#define CPUID_EXTENDED_STATE_SIZE_OFFSET 0x02 +#define CPUID_EXTENDED_STATE_SIZE_OFFSET 0x02 /** CPUID Extended State Information ECX for CPUID leaf #CPUID_EXTENDED_STATE, @@ -2163,23 +2153,22 @@ typedef union { /// supported in the IA32_XSS MSR; it is clear if bit n is instead supported /// in XCR0. /// - UINT32 XSS:1; + UINT32 XSS : 1; /// /// [Bit 1] is set if, when the compacted format of an XSAVE area is used, /// this extended state component located on the next 64-byte boundary /// following the preceding state component (otherwise, it is located /// immediately following the preceding state component). /// - UINT32 Compacted:1; - UINT32 Reserved:30; + UINT32 Compacted : 1; + UINT32 Reserved : 30; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_EXTENDED_STATE_SIZE_OFFSET_ECX; - /** CPUID Intel Resource Director Technology (Intel RDT) Monitoring Information @@ -2188,7 +2177,7 @@ typedef union { CPUID_INTEL_RDT_MONITORING_L3_CACHE_SUB_LEAF (0x01). **/ -#define CPUID_INTEL_RDT_MONITORING 0x0F +#define CPUID_INTEL_RDT_MONITORING 0x0F /** CPUID Intel Resource Director Technology (Intel RDT) Monitoring Information @@ -2215,7 +2204,7 @@ typedef union { ); @endcode **/ -#define CPUID_INTEL_RDT_MONITORING_ENUMERATION_SUB_LEAF 0x00 +#define CPUID_INTEL_RDT_MONITORING_ENUMERATION_SUB_LEAF 0x00 /** CPUID Intel RDT Monitoring Information EDX for CPUID leaf @@ -2227,17 +2216,17 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:1; + UINT32 Reserved1 : 1; /// /// [Bit 1] Supports L3 Cache Intel RDT Monitoring if 1. /// - UINT32 L3CacheRDT_M:1; - UINT32 Reserved2:30; + UINT32 L3CacheRDT_M : 1; + UINT32 Reserved2 : 30; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_INTEL_RDT_MONITORING_ENUMERATION_SUB_LEAF_EDX; /** @@ -2264,7 +2253,7 @@ typedef union { ); @endcode **/ -#define CPUID_INTEL_RDT_MONITORING_L3_CACHE_SUB_LEAF 0x01 +#define CPUID_INTEL_RDT_MONITORING_L3_CACHE_SUB_LEAF 0x01 /** CPUID L3 Cache Intel RDT Monitoring Capability Information EDX for CPUID leaf @@ -2279,24 +2268,23 @@ typedef union { /// /// [Bit 0] Supports L3 occupancy monitoring if 1. /// - UINT32 L3CacheOccupancyMonitoring:1; + UINT32 L3CacheOccupancyMonitoring : 1; /// /// [Bit 1] Supports L3 Total Bandwidth monitoring if 1. /// - UINT32 L3CacheTotalBandwidthMonitoring:1; + UINT32 L3CacheTotalBandwidthMonitoring : 1; /// /// [Bit 2] Supports L3 Local Bandwidth monitoring if 1. /// - UINT32 L3CacheLocalBandwidthMonitoring:1; - UINT32 Reserved:29; + UINT32 L3CacheLocalBandwidthMonitoring : 1; + UINT32 Reserved : 29; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_INTEL_RDT_MONITORING_L3_CACHE_SUB_LEAF_EDX; - /** CPUID Intel Resource Director Technology (Intel RDT) Allocation Information @@ -2305,7 +2293,7 @@ typedef union { CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF (0x01). CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF (0x02). **/ -#define CPUID_INTEL_RDT_ALLOCATION 0x10 +#define CPUID_INTEL_RDT_ALLOCATION 0x10 /** Intel Resource Director Technology (Intel RDT) Allocation Enumeration Sub-leaf @@ -2329,7 +2317,7 @@ typedef union { ); @endcode **/ -#define CPUID_INTEL_RDT_ALLOCATION_ENUMERATION_SUB_LEAF 0x00 +#define CPUID_INTEL_RDT_ALLOCATION_ENUMERATION_SUB_LEAF 0x00 /** CPUID L3 and L2 Cache Allocation Support Information EBX for CPUID leaf @@ -2341,28 +2329,27 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:1; + UINT32 Reserved1 : 1; /// /// [Bit 1] Supports L3 Cache Allocation Technology if 1. /// - UINT32 L3CacheAllocation:1; + UINT32 L3CacheAllocation : 1; /// /// [Bit 2] Supports L2 Cache Allocation Technology if 1. /// - UINT32 L2CacheAllocation:1; + UINT32 L2CacheAllocation : 1; /// /// [Bit 3] Supports Memory Bandwidth Allocation if 1. /// - UINT32 MemoryBandwidth:1; - UINT32 Reserved3:28; + UINT32 MemoryBandwidth : 1; + UINT32 Reserved3 : 28; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_INTEL_RDT_ALLOCATION_ENUMERATION_SUB_LEAF_EBX; - /** L3 Cache Allocation Technology Enumeration Sub-leaf @@ -2390,7 +2377,7 @@ typedef union { ); @endcode **/ -#define CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF 0x01 +#define CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF 0x01 /** CPUID L3 Cache Allocation Technology Information EAX for CPUID leaf @@ -2406,13 +2393,13 @@ typedef union { /// [Bits 4:0] Length of the capacity bit mask for the corresponding ResID /// using minus-one notation. /// - UINT32 CapacityLength:5; - UINT32 Reserved:27; + UINT32 CapacityLength : 5; + UINT32 Reserved : 27; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF_EAX; /** @@ -2425,17 +2412,17 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved3:2; + UINT32 Reserved3 : 2; /// /// [Bit 2] Code and Data Prioritization Technology supported if 1. /// - UINT32 CodeDataPrioritization:1; - UINT32 Reserved2:29; + UINT32 CodeDataPrioritization : 1; + UINT32 Reserved2 : 29; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF_ECX; /** @@ -2451,13 +2438,13 @@ typedef union { /// /// [Bits 15:0] Highest COS number supported for this ResID. /// - UINT32 HighestCosNumber:16; - UINT32 Reserved:16; + UINT32 HighestCosNumber : 16; + UINT32 Reserved : 16; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_INTEL_RDT_ALLOCATION_L3_CACHE_SUB_LEAF_EDX; /** @@ -2485,7 +2472,7 @@ typedef union { ); @endcode **/ -#define CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF 0x02 +#define CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF 0x02 /** CPUID L2 Cache Allocation Technology Information EAX for CPUID leaf @@ -2501,13 +2488,13 @@ typedef union { /// [Bits 4:0] Length of the capacity bit mask for the corresponding ResID /// using minus-one notation. /// - UINT32 CapacityLength:5; - UINT32 Reserved:27; + UINT32 CapacityLength : 5; + UINT32 Reserved : 27; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF_EAX; /** @@ -2523,13 +2510,13 @@ typedef union { /// /// [Bits 15:0] Highest COS number supported for this ResID. /// - UINT32 HighestCosNumber:16; - UINT32 Reserved:16; + UINT32 HighestCosNumber : 16; + UINT32 Reserved : 16; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_INTEL_RDT_ALLOCATION_L2_CACHE_SUB_LEAF_EDX; /** @@ -2563,7 +2550,7 @@ typedef union { ); @endcode **/ -#define CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF 0x03 +#define CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF 0x03 /** CPUID memory bandwidth Allocation Technology Information EAX for CPUID leaf @@ -2579,13 +2566,13 @@ typedef union { /// [Bits 11:0] Reports the maximum MBA throttling value supported for /// the corresponding ResID using minus-one notation. /// - UINT32 MaximumMBAThrottling:12; - UINT32 Reserved:20; + UINT32 MaximumMBAThrottling : 12; + UINT32 Reserved : 20; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF_EAX; /** @@ -2601,17 +2588,17 @@ typedef union { /// /// [Bits 1:0] Reserved. /// - UINT32 Reserved1:2; + UINT32 Reserved1 : 2; /// /// [Bits 3] Reports whether the response of the delay values is linear. /// - UINT32 Liner:1; - UINT32 Reserved2:29; + UINT32 Liner : 1; + UINT32 Reserved2 : 29; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF_ECX; /** @@ -2627,13 +2614,13 @@ typedef union { /// /// [Bits 15:0] Highest COS number supported for this ResID. /// - UINT32 HighestCosNumber:16; - UINT32 Reserved:16; + UINT32 HighestCosNumber : 16; + UINT32 Reserved : 16; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_INTEL_RDT_ALLOCATION_MEMORY_BANDWIDTH_SUB_LEAF_EDX; /** @@ -2651,7 +2638,7 @@ typedef union { until the sub-leaf type is invalid. **/ -#define CPUID_INTEL_SGX 0x12 +#define CPUID_INTEL_SGX 0x12 /** Sub-Leaf 0 Enumeration of Intel SGX Capabilities. @@ -2680,7 +2667,7 @@ typedef union { ); @endcode **/ -#define CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF 0x00 +#define CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF 0x00 /** Sub-Leaf 0 Enumeration of Intel SGX Capabilities EAX for CPUID leaf #CPUID_INTEL_SGX, @@ -2694,28 +2681,28 @@ typedef union { /// /// [Bit 0] If 1, indicates leaf functions of SGX1 instruction are supported. /// - UINT32 SGX1:1; + UINT32 SGX1 : 1; /// /// [Bit 1] If 1, indicates leaf functions of SGX2 instruction are supported. /// - UINT32 SGX2:1; - UINT32 Reserved1:3; + UINT32 SGX2 : 1; + UINT32 Reserved1 : 3; /// /// [Bit 5] If 1, indicates Intel SGX supports ENCLV instruction leaves /// EINCVIRTCHILD, EDECVIRTCHILD, and ESETCONTEXT. /// - UINT32 ENCLV:1; + UINT32 ENCLV : 1; /// /// [Bit 6] If 1, indicates Intel SGX supports ENCLS instruction leaves ETRACKC, /// ERDINFO, ELDBC, and ELDUC. /// - UINT32 ENCLS:1; - UINT32 Reserved2:25; + UINT32 ENCLS : 1; + UINT32 Reserved2 : 25; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF_EAX; /** @@ -2731,21 +2718,20 @@ typedef union { /// [Bit 7:0] The maximum supported enclave size is 2^(EDX[7:0]) bytes /// when not in 64-bit mode. /// - UINT32 MaxEnclaveSize_Not64:8; + UINT32 MaxEnclaveSize_Not64 : 8; /// /// [Bit 15:8] The maximum supported enclave size is 2^(EDX[15:8]) bytes /// when operating in 64-bit mode. /// - UINT32 MaxEnclaveSize_64:8; - UINT32 Reserved:16; + UINT32 MaxEnclaveSize_64 : 8; + UINT32 Reserved : 16; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_INTEL_SGX_CAPABILITIES_0_SUB_LEAF_EDX; - /** Sub-Leaf 1 Enumeration of Intel SGX Capabilities. Enumerates Intel SGX capability of processor state configuration and enclave @@ -2780,8 +2766,7 @@ typedef union { ); @endcode **/ -#define CPUID_INTEL_SGX_CAPABILITIES_1_SUB_LEAF 0x01 - +#define CPUID_INTEL_SGX_CAPABILITIES_1_SUB_LEAF 0x01 /** Sub-Leaf Index 2 or Higher Enumeration of Intel SGX Resources. @@ -2834,18 +2819,18 @@ typedef union { /// in EBX:EAX and EDX:ECX. /// All other encoding are reserved. /// - UINT32 SubLeafType:4; - UINT32 Reserved:8; + UINT32 SubLeafType : 4; + UINT32 Reserved : 8; /// /// [Bit 31:12] If EAX[3:0] = 0001b, these are bits 31:12 of the physical address of /// the base of the EPC section. /// - UINT32 LowAddressOfEpcSection:20; + UINT32 LowAddressOfEpcSection : 20; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_EAX; /** @@ -2861,13 +2846,13 @@ typedef union { /// [Bit 19:0] If EAX[3:0] = 0001b, these are bits 51:32 of the physical address of /// the base of the EPC section. /// - UINT32 HighAddressOfEpcSection:20; - UINT32 Reserved:12; + UINT32 HighAddressOfEpcSection : 20; + UINT32 Reserved : 12; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_EBX; /** @@ -2885,18 +2870,18 @@ typedef union { /// 0001b: The EPC section is confidentiality, integrity and replay protected. /// All other encoding are reserved. /// - UINT32 EpcSection:4; - UINT32 Reserved:8; + UINT32 EpcSection : 4; + UINT32 Reserved : 8; /// /// [Bit 31:12] If EAX[3:0] = 0001b, these are bits 31:12 of the size of the /// corresponding EPC section within the Processor Reserved Memory. /// - UINT32 LowSizeOfEpcSection:20; + UINT32 LowSizeOfEpcSection : 20; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_ECX; /** @@ -2912,16 +2897,15 @@ typedef union { /// [Bit 19:0] If EAX[3:0] = 0001b, these are bits 51:32 of the size of the /// corresponding EPC section within the Processor Reserved Memory. /// - UINT32 HighSizeOfEpcSection:20; - UINT32 Reserved:12; + UINT32 HighSizeOfEpcSection : 20; + UINT32 Reserved : 12; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_INTEL_SGX_CAPABILITIES_RESOURCES_SUB_LEAF_EDX; - /** CPUID Intel Processor Trace Information @@ -2930,7 +2914,7 @@ typedef union { CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF (0x01). **/ -#define CPUID_INTEL_PROCESSOR_TRACE 0x14 +#define CPUID_INTEL_PROCESSOR_TRACE 0x14 /** CPUID Intel Processor Trace Information Main Leaf @@ -2957,7 +2941,7 @@ typedef union { ); @endcode **/ -#define CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF 0x00 +#define CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF 0x00 /** CPUID Intel Processor Trace EBX for CPUID leaf #CPUID_INTEL_PROCESSOR_TRACE, @@ -2972,40 +2956,40 @@ typedef union { /// [Bit 0] If 1, indicates that IA32_RTIT_CTL.CR3Filter can be set to 1, /// and that IA32_RTIT_CR3_MATCH MSR can be accessed. /// - UINT32 Cr3Filter:1; + UINT32 Cr3Filter : 1; /// /// [Bit 1] If 1, indicates support of Configurable PSB and Cycle-Accurate /// Mode. /// - UINT32 ConfigurablePsb:1; + UINT32 ConfigurablePsb : 1; /// /// [Bit 2] If 1, indicates support of IP Filtering, TraceStop filtering, /// and preservation of Intel PT MSRs across warm reset. /// - UINT32 IpTraceStopFiltering:1; + UINT32 IpTraceStopFiltering : 1; /// /// [Bit 3] If 1, indicates support of MTC timing packet and suppression of /// COFI-based packets. /// - UINT32 Mtc:1; + UINT32 Mtc : 1; /// /// [Bit 4] If 1, indicates support of PTWRITE. Writes can set /// IA32_RTIT_CTL[12] (PTWEn) and IA32_RTIT_CTL[5] (FUPonPTW), and PTWRITE /// can generate packets. /// - UINT32 PTWrite:1; + UINT32 PTWrite : 1; /// /// [Bit 5] If 1, indicates support of Power Event Trace. Writes can set /// IA32_RTIT_CTL[4] (PwrEvtEn), enabling Power Event Trace packet /// generation. /// - UINT32 PowerEventTrace:1; - UINT32 Reserved:26; + UINT32 PowerEventTrace : 1; + UINT32 Reserved : 26; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF_EBX; /** @@ -3022,35 +3006,34 @@ typedef union { /// utilizing the ToPA output scheme; IA32_RTIT_OUTPUT_BASE and /// IA32_RTIT_OUTPUT_MASK_PTRS MSRs can be accessed. /// - UINT32 RTIT:1; + UINT32 RTIT : 1; /// /// [Bit 1] If 1, ToPA tables can hold any number of output entries, up to /// the maximum allowed by the MaskOrTableOffset field of /// IA32_RTIT_OUTPUT_MASK_PTRS. /// - UINT32 ToPA:1; + UINT32 ToPA : 1; /// /// [Bit 2] If 1, indicates support of Single-Range Output scheme. /// - UINT32 SingleRangeOutput:1; + UINT32 SingleRangeOutput : 1; /// /// [Bit 3] If 1, indicates support of output to Trace Transport subsystem. /// - UINT32 TraceTransportSubsystem:1; - UINT32 Reserved:27; + UINT32 TraceTransportSubsystem : 1; + UINT32 Reserved : 27; /// /// [Bit 31] If 1, generated packets which contain IP payloads have LIP /// values, which include the CS base component. /// - UINT32 LIP:1; + UINT32 LIP : 1; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF_ECX; - /** CPUID Intel Processor Trace Information Sub-leaf @@ -3084,7 +3067,7 @@ typedef union { } @endcode **/ -#define CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF 0x01 +#define CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF 0x01 /** CPUID Intel Processor Trace EAX for CPUID leaf #CPUID_INTEL_PROCESSOR_TRACE, @@ -3098,18 +3081,17 @@ typedef union { /// /// [Bits 2:0] Number of configurable Address Ranges for filtering. /// - UINT32 ConfigurableAddressRanges:3; - UINT32 Reserved:13; + UINT32 ConfigurableAddressRanges : 3; + UINT32 Reserved : 13; /// /// [Bits 31:16] Bitmap of supported MTC period encodings /// - UINT32 MtcPeriodEncodings:16; - + UINT32 MtcPeriodEncodings : 16; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF_EAX; /** @@ -3124,20 +3106,18 @@ typedef union { /// /// [Bits 15:0] Bitmap of supported Cycle Threshold value encodings. /// - UINT32 CycleThresholdEncodings:16; + UINT32 CycleThresholdEncodings : 16; /// /// [Bits 31:16] Bitmap of supported Configurable PSB frequency encodings. /// - UINT32 PsbFrequencyEncodings:16; - + UINT32 PsbFrequencyEncodings : 16; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_INTEL_PROCESSOR_TRACE_SUB_LEAF_EBX; - /** CPUID Time Stamp Counter and Nominal Core Crystal Clock Information @@ -3169,8 +3149,7 @@ typedef union { AsmCpuid (CPUID_TIME_STAMP_COUNTER, &Eax, &Ebx, &Ecx, NULL); @endcode **/ -#define CPUID_TIME_STAMP_COUNTER 0x15 - +#define CPUID_TIME_STAMP_COUNTER 0x15 /** CPUID Processor Frequency Information @@ -3205,7 +3184,7 @@ typedef union { AsmCpuid (CPUID_PROCESSOR_FREQUENCY, &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, NULL); @endcode **/ -#define CPUID_PROCESSOR_FREQUENCY 0x16 +#define CPUID_PROCESSOR_FREQUENCY 0x16 /** CPUID Processor Frequency Information EAX for CPUID leaf @@ -3219,13 +3198,13 @@ typedef union { /// /// [Bits 15:0] Processor Base Frequency (in MHz). /// - UINT32 ProcessorBaseFrequency:16; - UINT32 Reserved:16; + UINT32 ProcessorBaseFrequency : 16; + UINT32 Reserved : 16; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_PROCESSOR_FREQUENCY_EAX; /** @@ -3240,13 +3219,13 @@ typedef union { /// /// [Bits 15:0] Maximum Frequency (in MHz). /// - UINT32 MaximumFrequency:16; - UINT32 Reserved:16; + UINT32 MaximumFrequency : 16; + UINT32 Reserved : 16; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_PROCESSOR_FREQUENCY_EBX; /** @@ -3261,16 +3240,15 @@ typedef union { /// /// [Bits 15:0] Bus (Reference) Frequency (in MHz). /// - UINT32 BusFrequency:16; - UINT32 Reserved:16; + UINT32 BusFrequency : 16; + UINT32 Reserved : 16; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_PROCESSOR_FREQUENCY_ECX; - /** CPUID SoC Vendor Information @@ -3287,7 +3265,7 @@ typedef union { EAX:EBX:ECX:EDX and from the sub-leaf 1 fragment towards sub-leaf 3. **/ -#define CPUID_SOC_VENDOR 0x17 +#define CPUID_SOC_VENDOR 0x17 /** CPUID SoC Vendor Information @@ -3317,7 +3295,7 @@ typedef union { ); @endcode **/ -#define CPUID_SOC_VENDOR_MAIN_LEAF 0x00 +#define CPUID_SOC_VENDOR_MAIN_LEAF 0x00 /** CPUID SoC Vendor Information EBX for CPUID leaf #CPUID_SOC_VENDOR sub-leaf @@ -3331,19 +3309,19 @@ typedef union { /// /// [Bits 15:0] SOC Vendor ID. /// - UINT32 SocVendorId:16; + UINT32 SocVendorId : 16; /// /// [Bit 16] If 1, the SOC Vendor ID field is assigned via an industry /// standard enumeration scheme. Otherwise, the SOC Vendor ID field is /// assigned by Intel. /// - UINT32 IsVendorScheme:1; - UINT32 Reserved:15; + UINT32 IsVendorScheme : 1; + UINT32 Reserved : 15; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_SOC_VENDOR_MAIN_LEAF_EBX; /** @@ -3374,7 +3352,7 @@ typedef union { ); @endcode **/ -#define CPUID_SOC_VENDOR_BRAND_STRING1 0x01 +#define CPUID_SOC_VENDOR_BRAND_STRING1 0x01 /** CPUID SoC Vendor Brand String for CPUID leafs #CPUID_SOC_VENDOR_BRAND_STRING1, @@ -3384,11 +3362,11 @@ typedef union { /// /// 4 UTF-8 characters of Soc Vendor Brand String /// - CHAR8 BrandString[4]; + CHAR8 BrandString[4]; /// /// All fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_SOC_VENDOR_BRAND_STRING_DATA; /** @@ -3419,7 +3397,7 @@ typedef union { ); @endcode **/ -#define CPUID_SOC_VENDOR_BRAND_STRING2 0x02 +#define CPUID_SOC_VENDOR_BRAND_STRING2 0x02 /** CPUID SoC Vendor Information @@ -3449,7 +3427,7 @@ typedef union { ); @endcode **/ -#define CPUID_SOC_VENDOR_BRAND_STRING3 0x03 +#define CPUID_SOC_VENDOR_BRAND_STRING3 0x03 /** CPUID Deterministic Address Translation Parameters @@ -3474,7 +3452,7 @@ typedef union { CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_SUB_LEAF (0x*) **/ -#define CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS 0x18 +#define CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS 0x18 /** CPUID Deterministic Address Translation Parameters @@ -3503,7 +3481,7 @@ typedef union { ); @endcode **/ -#define CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_MAIN_LEAF 0x00 +#define CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_MAIN_LEAF 0x00 /** CPUID Deterministic Address Translation Parameters EBX for CPUID leafs. @@ -3516,41 +3494,41 @@ typedef union { /// /// [Bits 0] 4K page size entries supported by this structure. /// - UINT32 Page4K:1; + UINT32 Page4K : 1; /// /// [Bits 1] 2MB page size entries supported by this structure. /// - UINT32 Page2M:1; + UINT32 Page2M : 1; /// /// [Bits 2] 4MB page size entries supported by this structure. /// - UINT32 Page4M:1; + UINT32 Page4M : 1; /// /// [Bits 3] 1 GB page size entries supported by this structure. /// - UINT32 Page1G:1; + UINT32 Page1G : 1; /// /// [Bits 7:4] Reserved. /// - UINT32 Reserved1:4; + UINT32 Reserved1 : 4; /// /// [Bits 10:8] Partitioning (0: Soft partitioning between the logical /// processors sharing this structure) /// - UINT32 Partitioning:3; + UINT32 Partitioning : 3; /// /// [Bits 15:11] Reserved. /// - UINT32 Reserved2:5; + UINT32 Reserved2 : 5; /// /// [Bits 31:16] W = Ways of associativity. /// - UINT32 Way:16; + UINT32 Way : 16; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_EBX; /** @@ -3564,33 +3542,33 @@ typedef union { /// /// [Bits 4:0] Translation cache type field. /// - UINT32 TranslationCacheType:5; + UINT32 TranslationCacheType : 5; /// /// [Bits 7:5] Translation cache level (starts at 1). /// - UINT32 TranslationCacheLevel:3; + UINT32 TranslationCacheLevel : 3; /// /// [Bits 8] Fully associative structure. /// - UINT32 FullyAssociative:1; + UINT32 FullyAssociative : 1; /// /// [Bits 13:9] Reserved. /// - UINT32 Reserved1:5; + UINT32 Reserved1 : 5; /// /// [Bits 25:14] Maximum number of addressable IDs for logical /// processors sharing this translation cache. /// - UINT32 MaximumNum:12; + UINT32 MaximumNum : 12; /// /// [Bits 31:26] Reserved. /// - UINT32 Reserved2:6; + UINT32 Reserved2 : 6; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_DETERMINISTIC_ADDRESS_TRANSLATION_PARAMETERS_EDX; /// @@ -3604,7 +3582,6 @@ typedef union { /// @} /// - /** CPUID Hybrid Information Enumeration Leaf @@ -3629,12 +3606,12 @@ typedef union { @endcode **/ -#define CPUID_HYBRID_INFORMATION 0x1A +#define CPUID_HYBRID_INFORMATION 0x1A /// /// CPUID Hybrid Information Enumeration main leaf /// -#define CPUID_HYBRID_INFORMATION_MAIN_LEAF 0x00 +#define CPUID_HYBRID_INFORMATION_MAIN_LEAF 0x00 /** CPUID Hybrid Information EAX for CPUID leaf #CPUID_HYBRID_INFORMATION, @@ -3653,28 +3630,27 @@ typedef union { /// across core types, and not related to the model ID reported in CPUID /// leaf 01H, and does not identify the SOC. /// - UINT32 NativeModelId:24; + UINT32 NativeModelId : 24; /// /// [Bit 31:24] Core type /// - UINT32 CoreType:8; + UINT32 CoreType : 8; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_NATIVE_MODEL_ID_AND_CORE_TYPE_EAX; /// /// @{ Define value for CPUID_NATIVE_MODEL_ID_AND_CORE_TYPE_EAX.CoreType /// -#define CPUID_CORE_TYPE_INTEL_ATOM 0x20 -#define CPUID_CORE_TYPE_INTEL_CORE 0x40 +#define CPUID_CORE_TYPE_INTEL_ATOM 0x20 +#define CPUID_CORE_TYPE_INTEL_CORE 0x40 /// /// @} /// - /** CPUID V2 Extended Topology Enumeration Leaf @@ -3699,16 +3675,16 @@ typedef union { @param ECX Level number **/ -#define CPUID_V2_EXTENDED_TOPOLOGY 0x1F +#define CPUID_V2_EXTENDED_TOPOLOGY 0x1F /// /// @{ Define value for CPUID_EXTENDED_TOPOLOGY_ECX.LevelType /// The value of the "level type" field is not related to level numbers in /// any way, higher "level type" values do not mean higher levels. /// -#define CPUID_V2_EXTENDED_TOPOLOGY_LEVEL_TYPE_MODULE 0x03 -#define CPUID_V2_EXTENDED_TOPOLOGY_LEVEL_TYPE_TILE 0x04 -#define CPUID_V2_EXTENDED_TOPOLOGY_LEVEL_TYPE_DIE 0x05 +#define CPUID_V2_EXTENDED_TOPOLOGY_LEVEL_TYPE_MODULE 0x03 +#define CPUID_V2_EXTENDED_TOPOLOGY_LEVEL_TYPE_TILE 0x04 +#define CPUID_V2_EXTENDED_TOPOLOGY_LEVEL_TYPE_DIE 0x05 /// /// @} /// @@ -3730,8 +3706,7 @@ typedef union { AsmCpuid (CPUID_EXTENDED_FUNCTION, &Eax, NULL, NULL, NULL); @endcode **/ -#define CPUID_EXTENDED_FUNCTION 0x80000000 - +#define CPUID_EXTENDED_FUNCTION 0x80000000 /** CPUID Extended Processor Signature and Feature Bits @@ -3754,7 +3729,7 @@ typedef union { AsmCpuid (CPUID_EXTENDED_CPU_SIG, &Eax, NULL, &Ecx.Uint32, &Edx.Uint32); @endcode **/ -#define CPUID_EXTENDED_CPU_SIG 0x80000001 +#define CPUID_EXTENDED_CPU_SIG 0x80000001 /** CPUID Extended Processor Signature and Feature Bits ECX for CPUID leaf @@ -3768,23 +3743,23 @@ typedef union { /// /// [Bit 0] LAHF/SAHF available in 64-bit mode. /// - UINT32 LAHF_SAHF:1; - UINT32 Reserved1:4; + UINT32 LAHF_SAHF : 1; + UINT32 Reserved1 : 4; /// /// [Bit 5] LZCNT. /// - UINT32 LZCNT:1; - UINT32 Reserved2:2; + UINT32 LZCNT : 1; + UINT32 Reserved2 : 2; /// /// [Bit 8] PREFETCHW. /// - UINT32 PREFETCHW:1; - UINT32 Reserved3:23; + UINT32 PREFETCHW : 1; + UINT32 Reserved3 : 23; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_EXTENDED_CPU_SIG_ECX; /** @@ -3796,39 +3771,38 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:11; + UINT32 Reserved1 : 11; /// /// [Bit 11] SYSCALL/SYSRET available in 64-bit mode. /// - UINT32 SYSCALL_SYSRET:1; - UINT32 Reserved2:8; + UINT32 SYSCALL_SYSRET : 1; + UINT32 Reserved2 : 8; /// /// [Bit 20] Execute Disable Bit available. /// - UINT32 NX:1; - UINT32 Reserved3:5; + UINT32 NX : 1; + UINT32 Reserved3 : 5; /// /// [Bit 26] 1-GByte pages are available if 1. /// - UINT32 Page1GB:1; + UINT32 Page1GB : 1; /// /// [Bit 27] RDTSCP and IA32_TSC_AUX are available if 1. /// - UINT32 RDTSCP:1; - UINT32 Reserved4:1; + UINT32 RDTSCP : 1; + UINT32 Reserved4 : 1; /// /// [Bit 29] Intel(R) 64 Architecture available if 1. /// - UINT32 LM:1; - UINT32 Reserved5:2; + UINT32 LM : 1; + UINT32 Reserved5 : 2; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_EXTENDED_CPU_SIG_EDX; - /** CPUID Processor Brand String @@ -3849,7 +3823,7 @@ typedef union { AsmCpuid (CPUID_BRAND_STRING1, &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32); @endcode **/ -#define CPUID_BRAND_STRING1 0x80000002 +#define CPUID_BRAND_STRING1 0x80000002 /** CPUID Processor Brand String for CPUID leafs #CPUID_BRAND_STRING1, @@ -3859,11 +3833,11 @@ typedef union { /// /// 4 ASCII characters of Processor Brand String /// - CHAR8 BrandString[4]; + CHAR8 BrandString[4]; /// /// All fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_BRAND_STRING_DATA; /** @@ -3886,7 +3860,7 @@ typedef union { AsmCpuid (CPUID_BRAND_STRING2, &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32); @endcode **/ -#define CPUID_BRAND_STRING2 0x80000003 +#define CPUID_BRAND_STRING2 0x80000003 /** CPUID Processor Brand String @@ -3908,8 +3882,7 @@ typedef union { AsmCpuid (CPUID_BRAND_STRING3, &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32); @endcode **/ -#define CPUID_BRAND_STRING3 0x80000004 - +#define CPUID_BRAND_STRING3 0x80000004 /** CPUID Extended Cache information @@ -3929,7 +3902,7 @@ typedef union { AsmCpuid (CPUID_EXTENDED_CACHE_INFO, NULL, NULL, &Ecx.Uint32, NULL); @endcode **/ -#define CPUID_EXTENDED_CACHE_INFO 0x80000006 +#define CPUID_EXTENDED_CACHE_INFO 0x80000006 /** CPUID Extended Cache information ECX for CPUID leaf #CPUID_EXTENDED_CACHE_INFO. @@ -3942,23 +3915,23 @@ typedef union { /// /// [Bits 7:0] Cache line size in bytes. /// - UINT32 CacheLineSize:8; - UINT32 Reserved:4; + UINT32 CacheLineSize : 8; + UINT32 Reserved : 4; /// /// [Bits 15:12] L2 Associativity field. Supported values are in the range /// #CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_DISABLED to /// #CPUID_EXTENDED_CACHE_INFO_ECX_L2_ASSOCIATIVITY_FULL /// - UINT32 L2Associativity:4; + UINT32 L2Associativity : 4; /// /// [Bits 31:16] Cache size in 1K units. /// - UINT32 CacheSize:16; + UINT32 CacheSize : 16; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_EXTENDED_CACHE_INFO_ECX; /// @@ -3998,7 +3971,7 @@ typedef union { AsmCpuid (CPUID_EXTENDED_TIME_STAMP_COUNTER, NULL, NULL, NULL, &Edx.Uint32); @endcode **/ -#define CPUID_EXTENDED_TIME_STAMP_COUNTER 0x80000007 +#define CPUID_EXTENDED_TIME_STAMP_COUNTER 0x80000007 /** CPUID Extended Time Stamp Counter information EDX for CPUID leaf @@ -4009,20 +3982,19 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:8; + UINT32 Reserved1 : 8; /// /// [Bit 8] Invariant TSC available if 1. /// - UINT32 InvariantTsc:1; - UINT32 Reserved2:23; + UINT32 InvariantTsc : 1; + UINT32 Reserved2 : 23; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_EXTENDED_TIME_STAMP_COUNTER_EDX; - /** CPUID Linear Physical Address Size @@ -4041,7 +4013,7 @@ typedef union { AsmCpuid (CPUID_VIR_PHY_ADDRESS_SIZE, &Eax.Uint32, NULL, NULL, NULL); @endcode **/ -#define CPUID_VIR_PHY_ADDRESS_SIZE 0x80000008 +#define CPUID_VIR_PHY_ADDRESS_SIZE 0x80000008 /** CPUID Linear Physical Address Size EAX for CPUID leaf @@ -4059,17 +4031,17 @@ typedef union { /// If CPUID.80000008H:EAX[7:0] is supported, the maximum physical address /// number supported should come from this field. /// - UINT32 PhysicalAddressBits:8; + UINT32 PhysicalAddressBits : 8; /// /// [Bits 15:8] Number of linear address bits. /// - UINT32 LinearAddressBits:8; - UINT32 Reserved:16; + UINT32 LinearAddressBits : 8; + UINT32 Reserved : 16; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; } CPUID_VIR_PHY_ADDRESS_SIZE_EAX; #endif diff --git a/MdePkg/Include/Register/Intel/LocalApic.h b/MdePkg/Include/Register/Intel/LocalApic.h index 35625cf..cd08784 100644 --- a/MdePkg/Include/Register/Intel/LocalApic.h +++ b/MdePkg/Include/Register/Intel/LocalApic.h @@ -12,46 +12,46 @@ // // Definition for Local APIC registers and related values // -#define XAPIC_ID_OFFSET 0x20 -#define XAPIC_VERSION_OFFSET 0x30 -#define XAPIC_EOI_OFFSET 0x0b0 -#define XAPIC_ICR_DFR_OFFSET 0x0e0 -#define XAPIC_SPURIOUS_VECTOR_OFFSET 0x0f0 -#define XAPIC_ICR_LOW_OFFSET 0x300 -#define XAPIC_ICR_HIGH_OFFSET 0x310 -#define XAPIC_LVT_TIMER_OFFSET 0x320 -#define XAPIC_LVT_LINT0_OFFSET 0x350 -#define XAPIC_LVT_LINT1_OFFSET 0x360 -#define XAPIC_TIMER_INIT_COUNT_OFFSET 0x380 -#define XAPIC_TIMER_CURRENT_COUNT_OFFSET 0x390 -#define XAPIC_TIMER_DIVIDE_CONFIGURATION_OFFSET 0x3E0 - -#define X2APIC_MSR_BASE_ADDRESS 0x800 -#define X2APIC_MSR_ICR_ADDRESS 0x830 - -#define LOCAL_APIC_DELIVERY_MODE_FIXED 0 -#define LOCAL_APIC_DELIVERY_MODE_LOWEST_PRIORITY 1 -#define LOCAL_APIC_DELIVERY_MODE_SMI 2 -#define LOCAL_APIC_DELIVERY_MODE_NMI 4 -#define LOCAL_APIC_DELIVERY_MODE_INIT 5 -#define LOCAL_APIC_DELIVERY_MODE_STARTUP 6 -#define LOCAL_APIC_DELIVERY_MODE_EXTINT 7 - -#define LOCAL_APIC_DESTINATION_SHORTHAND_NO_SHORTHAND 0 -#define LOCAL_APIC_DESTINATION_SHORTHAND_SELF 1 -#define LOCAL_APIC_DESTINATION_SHORTHAND_ALL_INCLUDING_SELF 2 -#define LOCAL_APIC_DESTINATION_SHORTHAND_ALL_EXCLUDING_SELF 3 +#define XAPIC_ID_OFFSET 0x20 +#define XAPIC_VERSION_OFFSET 0x30 +#define XAPIC_EOI_OFFSET 0x0b0 +#define XAPIC_ICR_DFR_OFFSET 0x0e0 +#define XAPIC_SPURIOUS_VECTOR_OFFSET 0x0f0 +#define XAPIC_ICR_LOW_OFFSET 0x300 +#define XAPIC_ICR_HIGH_OFFSET 0x310 +#define XAPIC_LVT_TIMER_OFFSET 0x320 +#define XAPIC_LVT_LINT0_OFFSET 0x350 +#define XAPIC_LVT_LINT1_OFFSET 0x360 +#define XAPIC_TIMER_INIT_COUNT_OFFSET 0x380 +#define XAPIC_TIMER_CURRENT_COUNT_OFFSET 0x390 +#define XAPIC_TIMER_DIVIDE_CONFIGURATION_OFFSET 0x3E0 + +#define X2APIC_MSR_BASE_ADDRESS 0x800 +#define X2APIC_MSR_ICR_ADDRESS 0x830 + +#define LOCAL_APIC_DELIVERY_MODE_FIXED 0 +#define LOCAL_APIC_DELIVERY_MODE_LOWEST_PRIORITY 1 +#define LOCAL_APIC_DELIVERY_MODE_SMI 2 +#define LOCAL_APIC_DELIVERY_MODE_NMI 4 +#define LOCAL_APIC_DELIVERY_MODE_INIT 5 +#define LOCAL_APIC_DELIVERY_MODE_STARTUP 6 +#define LOCAL_APIC_DELIVERY_MODE_EXTINT 7 + +#define LOCAL_APIC_DESTINATION_SHORTHAND_NO_SHORTHAND 0 +#define LOCAL_APIC_DESTINATION_SHORTHAND_SELF 1 +#define LOCAL_APIC_DESTINATION_SHORTHAND_ALL_INCLUDING_SELF 2 +#define LOCAL_APIC_DESTINATION_SHORTHAND_ALL_EXCLUDING_SELF 3 // // Local APIC Version Register. // typedef union { struct { - UINT32 Version:8; ///< The version numbers of the local APIC. - UINT32 Reserved0:8; ///< Reserved. - UINT32 MaxLvtEntry:8; ///< Number of LVT entries minus 1. - UINT32 EoiBroadcastSuppression:1; ///< 1 if EOI-broadcast suppression supported. - UINT32 Reserved1:7; ///< Reserved. + UINT32 Version : 8; ///< The version numbers of the local APIC. + UINT32 Reserved0 : 8; ///< Reserved. + UINT32 MaxLvtEntry : 8; ///< Number of LVT entries minus 1. + UINT32 EoiBroadcastSuppression : 1; ///< 1 if EOI-broadcast suppression supported. + UINT32 Reserved1 : 7; ///< Reserved. } Bits; UINT32 Uint32; } LOCAL_APIC_VERSION; @@ -61,16 +61,16 @@ typedef union { // typedef union { struct { - UINT32 Vector:8; ///< The vector number of the interrupt being sent. - UINT32 DeliveryMode:3; ///< Specifies the type of IPI to be sent. - UINT32 DestinationMode:1; ///< 0: physical destination mode, 1: logical destination mode. - UINT32 DeliveryStatus:1; ///< Indicates the IPI delivery status. This field is reserved in x2APIC mode. - UINT32 Reserved0:1; ///< Reserved. - UINT32 Level:1; ///< 0 for the INIT level de-assert delivery mode. Otherwise 1. - UINT32 TriggerMode:1; ///< 0: edge, 1: level when using the INIT level de-assert delivery mode. - UINT32 Reserved1:2; ///< Reserved. - UINT32 DestinationShorthand:2; ///< A shorthand notation to specify the destination of the interrupt. - UINT32 Reserved2:12; ///< Reserved. + UINT32 Vector : 8; ///< The vector number of the interrupt being sent. + UINT32 DeliveryMode : 3; ///< Specifies the type of IPI to be sent. + UINT32 DestinationMode : 1; ///< 0: physical destination mode, 1: logical destination mode. + UINT32 DeliveryStatus : 1; ///< Indicates the IPI delivery status. This field is reserved in x2APIC mode. + UINT32 Reserved0 : 1; ///< Reserved. + UINT32 Level : 1; ///< 0 for the INIT level de-assert delivery mode. Otherwise 1. + UINT32 TriggerMode : 1; ///< 0: edge, 1: level when using the INIT level de-assert delivery mode. + UINT32 Reserved1 : 2; ///< Reserved. + UINT32 DestinationShorthand : 2; ///< A shorthand notation to specify the destination of the interrupt. + UINT32 Reserved2 : 12; ///< Reserved. } Bits; UINT32 Uint32; } LOCAL_APIC_ICR_LOW; @@ -80,8 +80,8 @@ typedef union { // typedef union { struct { - UINT32 Reserved0:24; ///< Reserved. - UINT32 Destination:8; ///< Specifies the target processor or processors in xAPIC mode. + UINT32 Reserved0 : 24; ///< Reserved. + UINT32 Destination : 8; ///< Specifies the target processor or processors in xAPIC mode. } Bits; UINT32 Uint32; ///< Destination field expanded to 32-bit in x2APIC mode. } LOCAL_APIC_ICR_HIGH; @@ -91,12 +91,12 @@ typedef union { // typedef union { struct { - UINT32 SpuriousVector:8; ///< Spurious Vector. - UINT32 SoftwareEnable:1; ///< APIC Software Enable/Disable. - UINT32 FocusProcessorChecking:1; ///< Focus Processor Checking. - UINT32 Reserved0:2; ///< Reserved. - UINT32 EoiBroadcastSuppression:1; ///< EOI-Broadcast Suppression. - UINT32 Reserved1:19; ///< Reserved. + UINT32 SpuriousVector : 8; ///< Spurious Vector. + UINT32 SoftwareEnable : 1; ///< APIC Software Enable/Disable. + UINT32 FocusProcessorChecking : 1; ///< Focus Processor Checking. + UINT32 Reserved0 : 2; ///< Reserved. + UINT32 EoiBroadcastSuppression : 1; ///< EOI-Broadcast Suppression. + UINT32 Reserved1 : 19; ///< Reserved. } Bits; UINT32 Uint32; } LOCAL_APIC_SVR; @@ -106,10 +106,10 @@ typedef union { // typedef union { struct { - UINT32 DivideValue1:2; ///< Low 2 bits of the divide value. - UINT32 Reserved0:1; ///< Always 0. - UINT32 DivideValue2:1; ///< Highest 1 bit of the divide value. - UINT32 Reserved1:28; ///< Reserved. + UINT32 DivideValue1 : 2; ///< Low 2 bits of the divide value. + UINT32 Reserved0 : 1; ///< Always 0. + UINT32 DivideValue2 : 1; ///< Highest 1 bit of the divide value. + UINT32 Reserved1 : 28; ///< Reserved. } Bits; UINT32 Uint32; } LOCAL_APIC_DCR; @@ -119,13 +119,13 @@ typedef union { // typedef union { struct { - UINT32 Vector:8; ///< The vector number of the interrupt being sent. - UINT32 Reserved0:4; ///< Reserved. - UINT32 DeliveryStatus:1; ///< 0: Idle, 1: send pending. - UINT32 Reserved1:3; ///< Reserved. - UINT32 Mask:1; ///< 0: Not masked, 1: Masked. - UINT32 TimerMode:1; ///< 0: One-shot, 1: Periodic. - UINT32 Reserved2:14; ///< Reserved. + UINT32 Vector : 8; ///< The vector number of the interrupt being sent. + UINT32 Reserved0 : 4; ///< Reserved. + UINT32 DeliveryStatus : 1; ///< 0: Idle, 1: send pending. + UINT32 Reserved1 : 3; ///< Reserved. + UINT32 Mask : 1; ///< 0: Not masked, 1: Masked. + UINT32 TimerMode : 1; ///< 0: One-shot, 1: Periodic. + UINT32 Reserved2 : 14; ///< Reserved. } Bits; UINT32 Uint32; } LOCAL_APIC_LVT_TIMER; @@ -135,15 +135,15 @@ typedef union { // typedef union { struct { - UINT32 Vector:8; ///< The vector number of the interrupt being sent. - UINT32 DeliveryMode:3; ///< Specifies the type of interrupt to be sent. - UINT32 Reserved0:1; ///< Reserved. - UINT32 DeliveryStatus:1; ///< 0: Idle, 1: send pending. - UINT32 InputPinPolarity:1; ///< Interrupt Input Pin Polarity. - UINT32 RemoteIrr:1; ///< RO. Set when the local APIC accepts the interrupt and reset when an EOI is received. - UINT32 TriggerMode:1; ///< 0:edge, 1:level. - UINT32 Mask:1; ///< 0: Not masked, 1: Masked. - UINT32 Reserved1:15; ///< Reserved. + UINT32 Vector : 8; ///< The vector number of the interrupt being sent. + UINT32 DeliveryMode : 3; ///< Specifies the type of interrupt to be sent. + UINT32 Reserved0 : 1; ///< Reserved. + UINT32 DeliveryStatus : 1; ///< 0: Idle, 1: send pending. + UINT32 InputPinPolarity : 1; ///< Interrupt Input Pin Polarity. + UINT32 RemoteIrr : 1; ///< RO. Set when the local APIC accepts the interrupt and reset when an EOI is received. + UINT32 TriggerMode : 1; ///< 0:edge, 1:level. + UINT32 Mask : 1; ///< 0: Not masked, 1: Masked. + UINT32 Reserved1 : 15; ///< Reserved. } Bits; UINT32 Uint32; } LOCAL_APIC_LVT_LINT; @@ -153,12 +153,12 @@ typedef union { // typedef union { struct { - UINT32 Reserved0:2; ///< Reserved - UINT32 DestinationMode:1; ///< Specifies the Destination Mode. - UINT32 RedirectionHint:1; ///< Specifies the Redirection Hint. - UINT32 Reserved1:8; ///< Reserved. - UINT32 DestinationId:8; ///< Specifies the Destination ID. - UINT32 BaseAddress:12; ///< Must be 0FEEH + UINT32 Reserved0 : 2; ///< Reserved + UINT32 DestinationMode : 1; ///< Specifies the Destination Mode. + UINT32 RedirectionHint : 1; ///< Specifies the Redirection Hint. + UINT32 Reserved1 : 8; ///< Reserved. + UINT32 DestinationId : 8; ///< Specifies the Destination ID. + UINT32 BaseAddress : 12; ///< Must be 0FEEH } Bits; UINT32 Uint32; } LOCAL_APIC_MSI_ADDRESS; @@ -168,16 +168,15 @@ typedef union { // typedef union { struct { - UINT32 Vector:8; ///< Interrupt vector in range 010h..0FEH - UINT32 DeliveryMode:3; ///< Specifies the type of interrupt to be sent. - UINT32 Reserved0:3; ///< Reserved. - UINT32 Level:1; ///< 0:Deassert, 1:Assert. Ignored for Edge triggered interrupts. - UINT32 TriggerMode:1; ///< 0:Edge, 1:Level. - UINT32 Reserved1:16; ///< Reserved. - UINT32 Reserved2:32; ///< Reserved. + UINT32 Vector : 8; ///< Interrupt vector in range 010h..0FEH + UINT32 DeliveryMode : 3; ///< Specifies the type of interrupt to be sent. + UINT32 Reserved0 : 3; ///< Reserved. + UINT32 Level : 1; ///< 0:Deassert, 1:Assert. Ignored for Edge triggered interrupts. + UINT32 TriggerMode : 1; ///< 0:Edge, 1:Level. + UINT32 Reserved1 : 16; ///< Reserved. + UINT32 Reserved2 : 32; ///< Reserved. } Bits; UINT64 Uint64; } LOCAL_APIC_MSI_DATA; #endif - diff --git a/MdePkg/Include/Register/Intel/Microcode.h b/MdePkg/Include/Register/Intel/Microcode.h index 93fa3d6..ff2e592 100644 --- a/MdePkg/Include/Register/Intel/Microcode.h +++ b/MdePkg/Include/Register/Intel/Microcode.h @@ -22,11 +22,11 @@ /// typedef union { struct { - UINT32 Year:16; - UINT32 Day:8; - UINT32 Month:8; + UINT32 Year : 16; + UINT32 Day : 8; + UINT32 Month : 8; } Bits; - UINT32 Uint32; + UINT32 Uint32; } CPU_MICROCODE_DATE; /// @@ -34,16 +34,16 @@ typedef union { /// typedef union { struct { - UINT32 Stepping:4; - UINT32 Model:4; - UINT32 Family:4; - UINT32 Type:2; - UINT32 Reserved1:2; - UINT32 ExtendedModel:4; - UINT32 ExtendedFamily:8; - UINT32 Reserved2:4; + UINT32 Stepping : 4; + UINT32 Model : 4; + UINT32 Family : 4; + UINT32 Type : 2; + UINT32 Reserved1 : 2; + UINT32 ExtendedModel : 4; + UINT32 ExtendedFamily : 8; + UINT32 Reserved2 : 4; } Bits; - UINT32 Uint32; + UINT32 Uint32; } CPU_MICROCODE_PROCESSOR_SIGNATURE; #pragma pack (1) @@ -55,7 +55,7 @@ typedef struct { /// /// Version number of the update header /// - UINT32 HeaderVersion; + UINT32 HeaderVersion; /// /// Unique version number for the update, the basis for the update /// signature provided by the processor to indicate the current update @@ -64,12 +64,12 @@ typedef struct { /// value in this field cannot be used for processor stepping identification /// alone. This is a signed 32-bit number. /// - UINT32 UpdateRevision; + UINT32 UpdateRevision; /// /// Date of the update creation in binary format: mmddyyyy (e.g. /// 07/18/98 is 07181998H). /// - CPU_MICROCODE_DATE Date; + CPU_MICROCODE_DATE Date; /// /// Extended family, extended model, type, family, model, and stepping /// of processor that requires this particular update revision (e.g., @@ -82,7 +82,7 @@ typedef struct { /// this field exactly corresponds to the bit representations returned by /// the CPUID instruction. /// - CPU_MICROCODE_PROCESSOR_SIGNATURE ProcessorSignature; + CPU_MICROCODE_PROCESSOR_SIGNATURE ProcessorSignature; /// /// Checksum of Update Data and Header. Used to verify the integrity of /// the update header and data. Checksum is correct when the @@ -90,12 +90,12 @@ typedef struct { /// Signature Table) that comprise the microcode update result in /// 00000000H. /// - UINT32 Checksum; + UINT32 Checksum; /// /// Version number of the loader program needed to correctly load this /// update. The initial version is 00000001H /// - UINT32 LoaderRevision; + UINT32 LoaderRevision; /// /// Platform type information is encoded in the lower 8 bits of this 4- /// byte field. Each bit represents a particular platform type for a given @@ -104,24 +104,24 @@ typedef struct { /// update is appropriate to load on a processor. Multiple bits may be set /// representing support for multiple platform IDs. /// - UINT32 ProcessorFlags; + UINT32 ProcessorFlags; /// /// Specifies the size of the encrypted data in bytes, and must be a /// multiple of DWORDs. If this value is 00000000H, then the microcode /// update encrypted data is 2000 bytes (or 500 DWORDs). /// - UINT32 DataSize; + UINT32 DataSize; /// /// Specifies the total size of the microcode update in bytes. It is the /// summation of the header size, the encrypted data size and the size of /// the optional extended signature table. This value is always a multiple /// of 1024. /// - UINT32 TotalSize; + UINT32 TotalSize; /// /// Reserved fields for future expansion. /// - UINT8 Reserved[12]; + UINT8 Reserved[12]; } CPU_MICROCODE_HEADER; /// @@ -133,7 +133,7 @@ typedef struct { /// Signature[n], processor flags[n] and checksum[n]) that exist in this /// microcode update /// - UINT32 ExtendedSignatureCount; + UINT32 ExtendedSignatureCount; /// /// Checksum of update extended processor signature table. Used to /// verify the integrity of the extended processor signature table. @@ -141,11 +141,11 @@ typedef struct { /// comprise the extended processor signature table results in /// 00000000H. /// - UINT32 ExtendedChecksum; + UINT32 ExtendedChecksum; /// /// Reserved fields. /// - UINT8 Reserved[12]; + UINT8 Reserved[12]; } CPU_MICROCODE_EXTENDED_TABLE_HEADER; /// @@ -164,7 +164,7 @@ typedef struct { /// this field exactly corresponds to the bit representations returned by /// the CPUID instruction. /// - CPU_MICROCODE_PROCESSOR_SIGNATURE ProcessorSignature; + CPU_MICROCODE_PROCESSOR_SIGNATURE ProcessorSignature; /// /// Platform type information is encoded in the lower 8 bits of this 4- /// byte field. Each bit represents a particular platform type for a given @@ -173,7 +173,7 @@ typedef struct { /// update is appropriate to load on a processor. Multiple bits may be set /// representing support for multiple platform IDs. /// - UINT32 ProcessorFlag; + UINT32 ProcessorFlag; /// /// Used by utility software to decompose a microcode update into /// multiple microcode updates where each of the new updates is @@ -186,7 +186,7 @@ typedef struct { /// summation of all DWORDs that comprise the created Extended /// Processor Patch results in 00000000H. /// - UINT32 Checksum; + UINT32 Checksum; } CPU_MICROCODE_EXTENDED_TABLE; #pragma pack () diff --git a/MdePkg/Include/Register/Intel/Msr/AtomMsr.h b/MdePkg/Include/Register/Intel/Msr/AtomMsr.h index c174df1..abe2795 100644 --- a/MdePkg/Include/Register/Intel/Msr/AtomMsr.h +++ b/MdePkg/Include/Register/Intel/Msr/AtomMsr.h @@ -57,7 +57,7 @@ @endcode @note MSR_ATOM_PLATFORM_ID is defined as MSR_PLATFORM_ID in SDM. **/ -#define MSR_ATOM_PLATFORM_ID 0x00000017 +#define MSR_ATOM_PLATFORM_ID 0x00000017 /** MSR information returned for MSR index #MSR_ATOM_PLATFORM_ID @@ -67,25 +67,24 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:8; + UINT32 Reserved1 : 8; /// /// [Bits 12:8] Maximum Qualified Ratio (R) The maximum allowed bus ratio. /// - UINT32 MaximumQualifiedRatio:5; - UINT32 Reserved2:19; - UINT32 Reserved3:32; + UINT32 MaximumQualifiedRatio : 5; + UINT32 Reserved2 : 19; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_ATOM_PLATFORM_ID_REGISTER; - /** Shared. Processor Hard Power-On Configuration (R/W) Enables and disables processor features; (R) indicates current processor configuration. @@ -105,7 +104,7 @@ typedef union { @endcode @note MSR_ATOM_EBL_CR_POWERON is defined as MSR_EBL_CR_POWERON in SDM. **/ -#define MSR_ATOM_EBL_CR_POWERON 0x0000002A +#define MSR_ATOM_EBL_CR_POWERON 0x0000002A /** MSR information returned for MSR index #MSR_ATOM_EBL_CR_POWERON @@ -115,81 +114,80 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:1; + UINT32 Reserved1 : 1; /// /// [Bit 1] Data Error Checking Enable (R/W) 1 = Enabled; 0 = Disabled /// Always 0. /// - UINT32 DataErrorCheckingEnable:1; + UINT32 DataErrorCheckingEnable : 1; /// /// [Bit 2] Response Error Checking Enable (R/W) 1 = Enabled; 0 = Disabled /// Always 0. /// - UINT32 ResponseErrorCheckingEnable:1; + UINT32 ResponseErrorCheckingEnable : 1; /// /// [Bit 3] AERR# Drive Enable (R/W) 1 = Enabled; 0 = Disabled Always 0. /// - UINT32 AERR_DriveEnable:1; + UINT32 AERR_DriveEnable : 1; /// /// [Bit 4] BERR# Enable for initiator bus requests (R/W) 1 = Enabled; 0 = /// Disabled Always 0. /// - UINT32 BERR_Enable:1; - UINT32 Reserved2:1; - UINT32 Reserved3:1; + UINT32 BERR_Enable : 1; + UINT32 Reserved2 : 1; + UINT32 Reserved3 : 1; /// /// [Bit 7] BINIT# Driver Enable (R/W) 1 = Enabled; 0 = Disabled Always 0. /// - UINT32 BINIT_DriverEnable:1; - UINT32 Reserved4:1; + UINT32 BINIT_DriverEnable : 1; + UINT32 Reserved4 : 1; /// /// [Bit 9] Execute BIST (R/O) 1 = Enabled; 0 = Disabled. /// - UINT32 ExecuteBIST:1; + UINT32 ExecuteBIST : 1; /// /// [Bit 10] AERR# Observation Enabled (R/O) 1 = Enabled; 0 = Disabled /// Always 0. /// - UINT32 AERR_ObservationEnabled:1; - UINT32 Reserved5:1; + UINT32 AERR_ObservationEnabled : 1; + UINT32 Reserved5 : 1; /// /// [Bit 12] BINIT# Observation Enabled (R/O) 1 = Enabled; 0 = Disabled /// Always 0. /// - UINT32 BINIT_ObservationEnabled:1; - UINT32 Reserved6:1; + UINT32 BINIT_ObservationEnabled : 1; + UINT32 Reserved6 : 1; /// /// [Bit 14] 1 MByte Power on Reset Vector (R/O) 1 = 1 MByte; 0 = 4 GBytes. /// - UINT32 ResetVector:1; - UINT32 Reserved7:1; + UINT32 ResetVector : 1; + UINT32 Reserved7 : 1; /// /// [Bits 17:16] APIC Cluster ID (R/O) Always 00B. /// - UINT32 APICClusterID:2; - UINT32 Reserved8:2; + UINT32 APICClusterID : 2; + UINT32 Reserved8 : 2; /// /// [Bits 21:20] Symmetric Arbitration ID (R/O) Always 00B. /// - UINT32 SymmetricArbitrationID:2; + UINT32 SymmetricArbitrationID : 2; /// /// [Bits 26:22] Integer Bus Frequency Ratio (R/O). /// - UINT32 IntegerBusFrequencyRatio:5; - UINT32 Reserved9:5; - UINT32 Reserved10:32; + UINT32 IntegerBusFrequencyRatio : 5; + UINT32 Reserved9 : 5; + UINT32 Reserved10 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_ATOM_EBL_CR_POWERON_REGISTER; - /** Unique. Last Branch Record n From IP (R/W) One of eight pairs of last branch record registers on the last branch record stack. The From_IP part of the @@ -217,17 +215,16 @@ typedef union { MSR_ATOM_LASTBRANCH_7_FROM_IP is defined as MSR_LASTBRANCH_7_FROM_IP in SDM. @{ **/ -#define MSR_ATOM_LASTBRANCH_0_FROM_IP 0x00000040 -#define MSR_ATOM_LASTBRANCH_1_FROM_IP 0x00000041 -#define MSR_ATOM_LASTBRANCH_2_FROM_IP 0x00000042 -#define MSR_ATOM_LASTBRANCH_3_FROM_IP 0x00000043 -#define MSR_ATOM_LASTBRANCH_4_FROM_IP 0x00000044 -#define MSR_ATOM_LASTBRANCH_5_FROM_IP 0x00000045 -#define MSR_ATOM_LASTBRANCH_6_FROM_IP 0x00000046 -#define MSR_ATOM_LASTBRANCH_7_FROM_IP 0x00000047 +#define MSR_ATOM_LASTBRANCH_0_FROM_IP 0x00000040 +#define MSR_ATOM_LASTBRANCH_1_FROM_IP 0x00000041 +#define MSR_ATOM_LASTBRANCH_2_FROM_IP 0x00000042 +#define MSR_ATOM_LASTBRANCH_3_FROM_IP 0x00000043 +#define MSR_ATOM_LASTBRANCH_4_FROM_IP 0x00000044 +#define MSR_ATOM_LASTBRANCH_5_FROM_IP 0x00000045 +#define MSR_ATOM_LASTBRANCH_6_FROM_IP 0x00000046 +#define MSR_ATOM_LASTBRANCH_7_FROM_IP 0x00000047 /// @} - /** Unique. Last Branch Record n To IP (R/W) One of eight pairs of last branch record registers on the last branch record stack. The To_IP part of the @@ -254,17 +251,16 @@ typedef union { MSR_ATOM_LASTBRANCH_7_TO_IP is defined as MSR_LASTBRANCH_7_TO_IP in SDM. @{ **/ -#define MSR_ATOM_LASTBRANCH_0_TO_IP 0x00000060 -#define MSR_ATOM_LASTBRANCH_1_TO_IP 0x00000061 -#define MSR_ATOM_LASTBRANCH_2_TO_IP 0x00000062 -#define MSR_ATOM_LASTBRANCH_3_TO_IP 0x00000063 -#define MSR_ATOM_LASTBRANCH_4_TO_IP 0x00000064 -#define MSR_ATOM_LASTBRANCH_5_TO_IP 0x00000065 -#define MSR_ATOM_LASTBRANCH_6_TO_IP 0x00000066 -#define MSR_ATOM_LASTBRANCH_7_TO_IP 0x00000067 +#define MSR_ATOM_LASTBRANCH_0_TO_IP 0x00000060 +#define MSR_ATOM_LASTBRANCH_1_TO_IP 0x00000061 +#define MSR_ATOM_LASTBRANCH_2_TO_IP 0x00000062 +#define MSR_ATOM_LASTBRANCH_3_TO_IP 0x00000063 +#define MSR_ATOM_LASTBRANCH_4_TO_IP 0x00000064 +#define MSR_ATOM_LASTBRANCH_5_TO_IP 0x00000065 +#define MSR_ATOM_LASTBRANCH_6_TO_IP 0x00000066 +#define MSR_ATOM_LASTBRANCH_7_TO_IP 0x00000067 /// @} - /** Shared. Scalable Bus Speed(RO) This field indicates the intended scalable bus clock speed for processors based on Intel Atom microarchitecture:. @@ -283,7 +279,7 @@ typedef union { @endcode @note MSR_ATOM_FSB_FREQ is defined as MSR_FSB_FREQ in SDM. **/ -#define MSR_ATOM_FSB_FREQ 0x000000CD +#define MSR_ATOM_FSB_FREQ 0x000000CD /** MSR information returned for MSR index #MSR_ATOM_FSB_FREQ @@ -309,21 +305,20 @@ typedef union { /// System Bus Speed when /// encoding is 011B. /// - UINT32 ScalableBusSpeed:3; - UINT32 Reserved1:29; - UINT32 Reserved2:32; + UINT32 ScalableBusSpeed : 3; + UINT32 Reserved1 : 29; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_ATOM_FSB_FREQ_REGISTER; - /** Shared. @@ -342,7 +337,7 @@ typedef union { @endcode @note MSR_ATOM_BBL_CR_CTL3 is defined as MSR_BBL_CR_CTL3 in SDM. **/ -#define MSR_ATOM_BBL_CR_CTL3 0x0000011E +#define MSR_ATOM_BBL_CR_CTL3 0x0000011E /** MSR information returned for MSR index #MSR_ATOM_BBL_CR_CTL3 @@ -356,33 +351,32 @@ typedef union { /// [Bit 0] L2 Hardware Enabled (RO) 1 = If the L2 is hardware-enabled 0 = /// Indicates if the L2 is hardware-disabled. /// - UINT32 L2HardwareEnabled:1; - UINT32 Reserved1:7; + UINT32 L2HardwareEnabled : 1; + UINT32 Reserved1 : 7; /// /// [Bit 8] L2 Enabled. (R/W) 1 = L2 cache has been initialized 0 = /// Disabled (default) Until this bit is set the processor will not /// respond to the WBINVD instruction or the assertion of the FLUSH# input. /// - UINT32 L2Enabled:1; - UINT32 Reserved2:14; + UINT32 L2Enabled : 1; + UINT32 Reserved2 : 14; /// /// [Bit 23] L2 Not Present (RO) 1. = L2 Present 2. = L2 Not Present. /// - UINT32 L2NotPresent:1; - UINT32 Reserved3:8; - UINT32 Reserved4:32; + UINT32 L2NotPresent : 1; + UINT32 Reserved3 : 8; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_ATOM_BBL_CR_CTL3_REGISTER; - /** Shared. @@ -401,7 +395,7 @@ typedef union { @endcode @note MSR_ATOM_PERF_STATUS is defined as MSR_PERF_STATUS in SDM. **/ -#define MSR_ATOM_PERF_STATUS 0x00000198 +#define MSR_ATOM_PERF_STATUS 0x00000198 /** MSR information returned for MSR index #MSR_ATOM_PERF_STATUS @@ -414,23 +408,22 @@ typedef union { /// /// [Bits 15:0] Current Performance State Value. /// - UINT32 CurrentPerformanceStateValue:16; - UINT32 Reserved1:16; - UINT32 Reserved2:8; + UINT32 CurrentPerformanceStateValue : 16; + UINT32 Reserved1 : 16; + UINT32 Reserved2 : 8; /// /// [Bits 44:40] Maximum Bus Ratio (R/O) Indicates maximum bus ratio /// configured for the processor. /// - UINT32 MaximumBusRatio:5; - UINT32 Reserved3:19; + UINT32 MaximumBusRatio : 5; + UINT32 Reserved3 : 19; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_ATOM_PERF_STATUS_REGISTER; - /** Shared. @@ -449,7 +442,7 @@ typedef union { @endcode @note MSR_ATOM_THERM2_CTL is defined as MSR_THERM2_CTL in SDM. **/ -#define MSR_ATOM_THERM2_CTL 0x0000019D +#define MSR_ATOM_THERM2_CTL 0x0000019D /** MSR information returned for MSR index #MSR_ATOM_THERM2_CTL @@ -459,7 +452,7 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:16; + UINT32 Reserved1 : 16; /// /// [Bit 16] TM_SELECT (R/W) Mode of automatic thermal monitor: 1. = /// Thermal Monitor 1 (thermally-initiated on-die modulation of the @@ -467,21 +460,20 @@ typedef union { /// frequency transitions) If bit 3 of the IA32_MISC_ENABLE register is /// cleared, TM_SELECT has no effect. Neither TM1 nor TM2 are enabled. /// - UINT32 TM_SELECT:1; - UINT32 Reserved2:15; - UINT32 Reserved3:32; + UINT32 TM_SELECT : 1; + UINT32 Reserved2 : 15; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_ATOM_THERM2_CTL_REGISTER; - /** Unique. Enable Misc. Processor Features (R/W) Allows a variety of processor functions to be enabled and disabled. @@ -501,7 +493,7 @@ typedef union { @endcode @note MSR_ATOM_IA32_MISC_ENABLE is defined as IA32_MISC_ENABLE in SDM. **/ -#define MSR_ATOM_IA32_MISC_ENABLE 0x000001A0 +#define MSR_ATOM_IA32_MISC_ENABLE 0x000001A0 /** MSR information returned for MSR index #MSR_ATOM_IA32_MISC_ENABLE @@ -514,36 +506,36 @@ typedef union { /// /// [Bit 0] Fast-Strings Enable See Table 2-2. /// - UINT32 FastStrings:1; - UINT32 Reserved1:2; + UINT32 FastStrings : 1; + UINT32 Reserved1 : 2; /// /// [Bit 3] Unique. Automatic Thermal Control Circuit Enable (R/W) See /// Table 2-2. Default value is 0. /// - UINT32 AutomaticThermalControlCircuit:1; - UINT32 Reserved2:3; + UINT32 AutomaticThermalControlCircuit : 1; + UINT32 Reserved2 : 3; /// /// [Bit 7] Shared. Performance Monitoring Available (R) See Table 2-2. /// - UINT32 PerformanceMonitoring:1; - UINT32 Reserved3:1; - UINT32 Reserved4:1; + UINT32 PerformanceMonitoring : 1; + UINT32 Reserved3 : 1; + UINT32 Reserved4 : 1; /// /// [Bit 10] Shared. FERR# Multiplexing Enable (R/W) 1 = FERR# asserted by /// the processor to indicate a pending break event within the processor 0 /// = Indicates compatible FERR# signaling behavior This bit must be set /// to 1 to support XAPIC interrupt model usage. /// - UINT32 FERR:1; + UINT32 FERR : 1; /// /// [Bit 11] Shared. Branch Trace Storage Unavailable (RO) See Table 2-2. /// - UINT32 BTS:1; + UINT32 BTS : 1; /// /// [Bit 12] Shared. Processor Event Based Sampling Unavailable (RO) See /// Table 2-2. /// - UINT32 PEBS:1; + UINT32 PEBS : 1; /// /// [Bit 13] Shared. TM2 Enable (R/W) When this bit is set (1) and the /// thermal sensor indicates that the die temperature is at the @@ -558,19 +550,19 @@ typedef union { /// contents of the TM2 bit location. The processor is operating out of /// specification if both this bit and the TM1 bit are set to 0. /// - UINT32 TM2:1; - UINT32 Reserved5:2; + UINT32 TM2 : 1; + UINT32 Reserved5 : 2; /// /// [Bit 16] Shared. Enhanced Intel SpeedStep Technology Enable (R/W) See /// Table 2-2. /// - UINT32 EIST:1; - UINT32 Reserved6:1; + UINT32 EIST : 1; + UINT32 Reserved6 : 1; /// /// [Bit 18] Shared. ENABLE MONITOR FSM (R/W) See Table 2-2. /// - UINT32 MONITOR:1; - UINT32 Reserved7:1; + UINT32 MONITOR : 1; + UINT32 Reserved7 : 1; /// /// [Bit 20] Shared. Enhanced Intel SpeedStep Technology Select Lock /// (R/WO) When set, this bit causes the following bits to become @@ -579,31 +571,30 @@ typedef union { /// be set before an Enhanced Intel SpeedStep Technology transition is /// requested. This bit is cleared on reset. /// - UINT32 EISTLock:1; - UINT32 Reserved8:1; + UINT32 EISTLock : 1; + UINT32 Reserved8 : 1; /// /// [Bit 22] Unique. Limit CPUID Maxval (R/W) See Table 2-2. /// - UINT32 LimitCpuidMaxval:1; + UINT32 LimitCpuidMaxval : 1; /// /// [Bit 23] Shared. xTPR Message Disable (R/W) See Table 2-2. /// - UINT32 xTPR_Message_Disable:1; - UINT32 Reserved9:8; - UINT32 Reserved10:2; + UINT32 xTPR_Message_Disable : 1; + UINT32 Reserved9 : 8; + UINT32 Reserved10 : 2; /// /// [Bit 34] Unique. XD Bit Disable (R/W) See Table 2-2. /// - UINT32 XD:1; - UINT32 Reserved11:29; + UINT32 XD : 1; + UINT32 Reserved11 : 29; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_ATOM_IA32_MISC_ENABLE_REGISTER; - /** Unique. Last Branch Record Stack TOS (R/W) Contains an index (bits 0-2) that points to the MSR containing the most recent branch record. See @@ -622,8 +613,7 @@ typedef union { @endcode @note MSR_ATOM_LASTBRANCH_TOS is defined as MSR_LASTBRANCH_TOS in SDM. **/ -#define MSR_ATOM_LASTBRANCH_TOS 0x000001C9 - +#define MSR_ATOM_LASTBRANCH_TOS 0x000001C9 /** Unique. Last Exception Record From Linear IP (R) Contains a pointer to the @@ -642,8 +632,7 @@ typedef union { @endcode @note MSR_ATOM_LER_FROM_LIP is defined as MSR_LER_FROM_LIP in SDM. **/ -#define MSR_ATOM_LER_FROM_LIP 0x000001DD - +#define MSR_ATOM_LER_FROM_LIP 0x000001DD /** Unique. Last Exception Record To Linear IP (R) This area contains a pointer @@ -663,8 +652,7 @@ typedef union { @endcode @note MSR_ATOM_LER_TO_LIP is defined as MSR_LER_TO_LIP in SDM. **/ -#define MSR_ATOM_LER_TO_LIP 0x000001DE - +#define MSR_ATOM_LER_TO_LIP 0x000001DE /** Unique. See Table 2-2. See Section 18.6.2.4, "Processor Event Based Sampling @@ -685,7 +673,7 @@ typedef union { @endcode @note MSR_ATOM_PEBS_ENABLE is defined as MSR_PEBS_ENABLE in SDM. **/ -#define MSR_ATOM_PEBS_ENABLE 0x000003F1 +#define MSR_ATOM_PEBS_ENABLE 0x000003F1 /** MSR information returned for MSR index #MSR_ATOM_PEBS_ENABLE @@ -698,21 +686,20 @@ typedef union { /// /// [Bit 0] Enable PEBS on IA32_PMC0. (R/W). /// - UINT32 Enable:1; - UINT32 Reserved1:31; - UINT32 Reserved2:32; + UINT32 Enable : 1; + UINT32 Reserved1 : 31; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_ATOM_PEBS_ENABLE_REGISTER; - /** Package. Package C2 Residency Note: C-state values are processor specific C-state code names, unrelated to MWAIT extension C-state parameters or ACPI @@ -733,8 +720,7 @@ typedef union { @endcode @note MSR_ATOM_PKG_C2_RESIDENCY is defined as MSR_PKG_C2_RESIDENCY in SDM. **/ -#define MSR_ATOM_PKG_C2_RESIDENCY 0x000003F8 - +#define MSR_ATOM_PKG_C2_RESIDENCY 0x000003F8 /** Package. Package C4 Residency Note: C-state values are processor specific @@ -756,8 +742,7 @@ typedef union { @endcode @note MSR_ATOM_PKG_C4_RESIDENCY is defined as MSR_PKG_C4_RESIDENCY in SDM. **/ -#define MSR_ATOM_PKG_C4_RESIDENCY 0x000003F9 - +#define MSR_ATOM_PKG_C4_RESIDENCY 0x000003F9 /** Package. Package C6 Residency Note: C-state values are processor specific @@ -779,6 +764,6 @@ typedef union { @endcode @note MSR_ATOM_PKG_C6_RESIDENCY is defined as MSR_PKG_C6_RESIDENCY in SDM. **/ -#define MSR_ATOM_PKG_C6_RESIDENCY 0x000003FA +#define MSR_ATOM_PKG_C6_RESIDENCY 0x000003FA #endif diff --git a/MdePkg/Include/Register/Intel/Msr/BroadwellMsr.h b/MdePkg/Include/Register/Intel/Msr/BroadwellMsr.h index d05869e..98beafc 100644 --- a/MdePkg/Include/Register/Intel/Msr/BroadwellMsr.h +++ b/MdePkg/Include/Register/Intel/Msr/BroadwellMsr.h @@ -58,7 +58,7 @@ @endcode @note MSR_BROADWELL_IA32_PERF_GLOBAL_STATUS is defined as IA32_PERF_GLOBAL_STATUS in SDM. **/ -#define MSR_BROADWELL_IA32_PERF_GLOBAL_STATUS 0x0000038E +#define MSR_BROADWELL_IA32_PERF_GLOBAL_STATUS 0x0000038E /** MSR information returned for MSR index #MSR_BROADWELL_IA32_PERF_GLOBAL_STATUS @@ -71,59 +71,58 @@ typedef union { /// /// [Bit 0] Ovf_PMC0. /// - UINT32 Ovf_PMC0:1; + UINT32 Ovf_PMC0 : 1; /// /// [Bit 1] Ovf_PMC1. /// - UINT32 Ovf_PMC1:1; + UINT32 Ovf_PMC1 : 1; /// /// [Bit 2] Ovf_PMC2. /// - UINT32 Ovf_PMC2:1; + UINT32 Ovf_PMC2 : 1; /// /// [Bit 3] Ovf_PMC3. /// - UINT32 Ovf_PMC3:1; - UINT32 Reserved1:28; + UINT32 Ovf_PMC3 : 1; + UINT32 Reserved1 : 28; /// /// [Bit 32] Ovf_FixedCtr0. /// - UINT32 Ovf_FixedCtr0:1; + UINT32 Ovf_FixedCtr0 : 1; /// /// [Bit 33] Ovf_FixedCtr1. /// - UINT32 Ovf_FixedCtr1:1; + UINT32 Ovf_FixedCtr1 : 1; /// /// [Bit 34] Ovf_FixedCtr2. /// - UINT32 Ovf_FixedCtr2:1; - UINT32 Reserved2:20; + UINT32 Ovf_FixedCtr2 : 1; + UINT32 Reserved2 : 20; /// /// [Bit 55] Trace_ToPA_PMI. See Section 36.2.6.2, "Table of Physical /// Addresses (ToPA).". /// - UINT32 Trace_ToPA_PMI:1; - UINT32 Reserved3:5; + UINT32 Trace_ToPA_PMI : 1; + UINT32 Reserved3 : 5; /// /// [Bit 61] Ovf_Uncore. /// - UINT32 Ovf_Uncore:1; + UINT32 Ovf_Uncore : 1; /// /// [Bit 62] Ovf_BufDSSAVE. /// - UINT32 OvfBuf:1; + UINT32 OvfBuf : 1; /// /// [Bit 63] CondChgd. /// - UINT32 CondChgd:1; + UINT32 CondChgd : 1; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_BROADWELL_IA32_PERF_GLOBAL_STATUS_REGISTER; - /** Core. C-State Configuration Control (R/W) Note: C-state values are processor specific C-state code names, unrelated to MWAIT extension C-state parameters @@ -144,7 +143,7 @@ typedef union { @endcode @note MSR_BROADWELL_PKG_CST_CONFIG_CONTROL is defined as MSR_PKG_CST_CONFIG_CONTROL in SDM. **/ -#define MSR_BROADWELL_PKG_CST_CONFIG_CONTROL 0x000000E2 +#define MSR_BROADWELL_PKG_CST_CONFIG_CONTROL 0x000000E2 /** MSR information returned for MSR index #MSR_BROADWELL_PKG_CST_CONFIG_CONTROL @@ -162,56 +161,55 @@ typedef union { /// C0/C1 (no package C-state support) 0001b: C2 0010b: C3 0011b: C6 /// 0100b: C7 0101b: C7s 0110b: C8 0111b: C9 1000b: C10. /// - UINT32 Limit:4; - UINT32 Reserved1:6; + UINT32 Limit : 4; + UINT32 Reserved1 : 6; /// /// [Bit 10] I/O MWAIT Redirection Enable (R/W). /// - UINT32 IO_MWAIT:1; - UINT32 Reserved2:4; + UINT32 IO_MWAIT : 1; + UINT32 Reserved2 : 4; /// /// [Bit 15] CFG Lock (R/WO). /// - UINT32 CFGLock:1; - UINT32 Reserved3:9; + UINT32 CFGLock : 1; + UINT32 Reserved3 : 9; /// /// [Bit 25] C3 State Auto Demotion Enable (R/W). /// - UINT32 C3AutoDemotion:1; + UINT32 C3AutoDemotion : 1; /// /// [Bit 26] C1 State Auto Demotion Enable (R/W). /// - UINT32 C1AutoDemotion:1; + UINT32 C1AutoDemotion : 1; /// /// [Bit 27] Enable C3 Undemotion (R/W). /// - UINT32 C3Undemotion:1; + UINT32 C3Undemotion : 1; /// /// [Bit 28] Enable C1 Undemotion (R/W). /// - UINT32 C1Undemotion:1; + UINT32 C1Undemotion : 1; /// /// [Bit 29] Enable Package C-State Auto-demotion (R/W). /// - UINT32 CStateAutoDemotion:1; + UINT32 CStateAutoDemotion : 1; /// /// [Bit 30] Enable Package C-State Undemotion (R/W). /// - UINT32 CStateUndemotion:1; - UINT32 Reserved4:1; - UINT32 Reserved5:32; + UINT32 CStateUndemotion : 1; + UINT32 Reserved4 : 1; + UINT32 Reserved5 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_BROADWELL_PKG_CST_CONFIG_CONTROL_REGISTER; - /** Package. Maximum Ratio Limit of Turbo Mode RO if MSR_PLATFORM_INFO.[28] = 0, RW if MSR_PLATFORM_INFO.[28] = 1. @@ -230,7 +228,7 @@ typedef union { @endcode @note MSR_BROADWELL_TURBO_RATIO_LIMIT is defined as MSR_TURBO_RATIO_LIMIT in SDM. **/ -#define MSR_BROADWELL_TURBO_RATIO_LIMIT 0x000001AD +#define MSR_BROADWELL_TURBO_RATIO_LIMIT 0x000001AD /** MSR information returned for MSR index #MSR_BROADWELL_TURBO_RATIO_LIMIT @@ -244,41 +242,40 @@ typedef union { /// [Bits 7:0] Package. Maximum Ratio Limit for 1C Maximum turbo ratio /// limit of 1 core active. /// - UINT32 Maximum1C:8; + UINT32 Maximum1C : 8; /// /// [Bits 15:8] Package. Maximum Ratio Limit for 2C Maximum turbo ratio /// limit of 2 core active. /// - UINT32 Maximum2C:8; + UINT32 Maximum2C : 8; /// /// [Bits 23:16] Package. Maximum Ratio Limit for 3C Maximum turbo ratio /// limit of 3 core active. /// - UINT32 Maximum3C:8; + UINT32 Maximum3C : 8; /// /// [Bits 31:24] Package. Maximum Ratio Limit for 4C Maximum turbo ratio /// limit of 4 core active. /// - UINT32 Maximum4C:8; + UINT32 Maximum4C : 8; /// /// [Bits 39:32] Package. Maximum Ratio Limit for 5C Maximum turbo ratio /// limit of 5core active. /// - UINT32 Maximum5C:8; + UINT32 Maximum5C : 8; /// /// [Bits 47:40] Package. Maximum Ratio Limit for 6C Maximum turbo ratio /// limit of 6core active. /// - UINT32 Maximum6C:8; - UINT32 Reserved:16; + UINT32 Maximum6C : 8; + UINT32 Reserved : 16; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_BROADWELL_TURBO_RATIO_LIMIT_REGISTER; - /** Package. Uncore Ratio Limit (R/W) Out of reset, the min_ratio and max_ratio fields represent the widest possible range of uncore frequencies. Writing to @@ -299,7 +296,7 @@ typedef union { AsmWriteMsr64 (MSR_BROADWELL_MSRUNCORE_RATIO_LIMIT, Msr.Uint64); @endcode **/ -#define MSR_BROADWELL_MSRUNCORE_RATIO_LIMIT 0x00000620 +#define MSR_BROADWELL_MSRUNCORE_RATIO_LIMIT 0x00000620 /** MSR information returned for MSR index #MSR_BROADWELL_MSRUNCORE_RATIO_LIMIT @@ -313,24 +310,24 @@ typedef union { /// [Bits 6:0] MAX_RATIO This field is used to limit the max ratio of the /// LLC/Ring. /// - UINT32 MAX_RATIO:7; - UINT32 Reserved2:1; + UINT32 MAX_RATIO : 7; + UINT32 Reserved2 : 1; /// /// [Bits 14:8] MIN_RATIO Writing to this field controls the minimum /// possible ratio of the LLC/Ring. /// - UINT32 MIN_RATIO:7; - UINT32 Reserved3:17; - UINT32 Reserved4:32; + UINT32 MIN_RATIO : 7; + UINT32 Reserved3 : 17; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_BROADWELL_MSRUNCORE_RATIO_LIMIT_REGISTER; /** @@ -349,6 +346,6 @@ typedef union { @endcode @note MSR_BROADWELL_PP0_ENERGY_STATUS is defined as MSR_PP0_ENERGY_STATUS in SDM. **/ -#define MSR_BROADWELL_PP0_ENERGY_STATUS 0x00000639 +#define MSR_BROADWELL_PP0_ENERGY_STATUS 0x00000639 #endif diff --git a/MdePkg/Include/Register/Intel/Msr/Core2Msr.h b/MdePkg/Include/Register/Intel/Msr/Core2Msr.h index e9d999c..1a6acb0 100644 --- a/MdePkg/Include/Register/Intel/Msr/Core2Msr.h +++ b/MdePkg/Include/Register/Intel/Msr/Core2Msr.h @@ -54,7 +54,7 @@ @endcode @note MSR_CORE2_PLATFORM_ID is defined as MSR_PLATFORM_ID in SDM. **/ -#define MSR_CORE2_PLATFORM_ID 0x00000017 +#define MSR_CORE2_PLATFORM_ID 0x00000017 /** MSR information returned for MSR index #MSR_CORE2_PLATFORM_ID @@ -64,26 +64,25 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:8; + UINT32 Reserved1 : 8; /// /// [Bits 12:8] Maximum Qualified Ratio (R) The maximum allowed bus ratio. /// - UINT32 MaximumQualifiedRatio:5; - UINT32 Reserved2:19; - UINT32 Reserved3:18; + UINT32 MaximumQualifiedRatio : 5; + UINT32 Reserved2 : 19; + UINT32 Reserved3 : 18; /// /// [Bits 52:50] See Table 2-2. /// - UINT32 PlatformId:3; - UINT32 Reserved4:11; + UINT32 PlatformId : 3; + UINT32 Reserved4 : 11; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_CORE2_PLATFORM_ID_REGISTER; - /** Shared. Processor Hard Power-On Configuration (R/W) Enables and disables processor features; (R) indicates current processor configuration. @@ -103,7 +102,7 @@ typedef union { @endcode @note MSR_CORE2_EBL_CR_POWERON is defined as MSR_EBL_CR_POWERON in SDM. **/ -#define MSR_CORE2_EBL_CR_POWERON 0x0000002A +#define MSR_CORE2_EBL_CR_POWERON 0x0000002A /** MSR information returned for MSR index #MSR_CORE2_EBL_CR_POWERON @@ -113,92 +112,91 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:1; + UINT32 Reserved1 : 1; /// /// [Bit 1] Data Error Checking Enable (R/W) 1 = Enabled; 0 = Disabled /// Note: Not all processor implements R/W. /// - UINT32 DataErrorCheckingEnable:1; + UINT32 DataErrorCheckingEnable : 1; /// /// [Bit 2] Response Error Checking Enable (R/W) 1 = Enabled; 0 = Disabled /// Note: Not all processor implements R/W. /// - UINT32 ResponseErrorCheckingEnable:1; + UINT32 ResponseErrorCheckingEnable : 1; /// /// [Bit 3] MCERR# Drive Enable (R/W) 1 = Enabled; 0 = Disabled Note: Not /// all processor implements R/W. /// - UINT32 MCERR_DriveEnable:1; + UINT32 MCERR_DriveEnable : 1; /// /// [Bit 4] Address Parity Enable (R/W) 1 = Enabled; 0 = Disabled Note: /// Not all processor implements R/W. /// - UINT32 AddressParityEnable:1; - UINT32 Reserved2:1; - UINT32 Reserved3:1; + UINT32 AddressParityEnable : 1; + UINT32 Reserved2 : 1; + UINT32 Reserved3 : 1; /// /// [Bit 7] BINIT# Driver Enable (R/W) 1 = Enabled; 0 = Disabled Note: Not /// all processor implements R/W. /// - UINT32 BINIT_DriverEnable:1; + UINT32 BINIT_DriverEnable : 1; /// /// [Bit 8] Output Tri-state Enabled (R/O) 1 = Enabled; 0 = Disabled. /// - UINT32 OutputTriStateEnable:1; + UINT32 OutputTriStateEnable : 1; /// /// [Bit 9] Execute BIST (R/O) 1 = Enabled; 0 = Disabled. /// - UINT32 ExecuteBIST:1; + UINT32 ExecuteBIST : 1; /// /// [Bit 10] MCERR# Observation Enabled (R/O) 1 = Enabled; 0 = Disabled. /// - UINT32 MCERR_ObservationEnabled:1; + UINT32 MCERR_ObservationEnabled : 1; /// /// [Bit 11] Intel TXT Capable Chipset. (R/O) 1 = Present; 0 = Not Present. /// - UINT32 IntelTXTCapableChipset:1; + UINT32 IntelTXTCapableChipset : 1; /// /// [Bit 12] BINIT# Observation Enabled (R/O) 1 = Enabled; 0 = Disabled. /// - UINT32 BINIT_ObservationEnabled:1; - UINT32 Reserved4:1; + UINT32 BINIT_ObservationEnabled : 1; + UINT32 Reserved4 : 1; /// /// [Bit 14] 1 MByte Power on Reset Vector (R/O) 1 = 1 MByte; 0 = 4 GBytes. /// - UINT32 ResetVector:1; - UINT32 Reserved5:1; + UINT32 ResetVector : 1; + UINT32 Reserved5 : 1; /// /// [Bits 17:16] APIC Cluster ID (R/O). /// - UINT32 APICClusterID:2; + UINT32 APICClusterID : 2; /// /// [Bit 18] N/2 Non-Integer Bus Ratio (R/O) 0 = Integer ratio; 1 = /// Non-integer ratio. /// - UINT32 NonIntegerBusRatio:1; - UINT32 Reserved6:1; + UINT32 NonIntegerBusRatio : 1; + UINT32 Reserved6 : 1; /// /// [Bits 21:20] Symmetric Arbitration ID (R/O). /// - UINT32 SymmetricArbitrationID:2; + UINT32 SymmetricArbitrationID : 2; /// /// [Bits 26:22] Integer Bus Frequency Ratio (R/O). /// - UINT32 IntegerBusFrequencyRatio:5; - UINT32 Reserved7:5; - UINT32 Reserved8:32; + UINT32 IntegerBusFrequencyRatio : 5; + UINT32 Reserved7 : 5; + UINT32 Reserved8 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_CORE2_EBL_CR_POWERON_REGISTER; - /** Unique. Control Features in Intel 64 Processor (R/W) See Table 2-2. @@ -217,7 +215,7 @@ typedef union { @endcode @note MSR_CORE2_FEATURE_CONTROL is defined as MSR_FEATURE_CONTROL in SDM. **/ -#define MSR_CORE2_FEATURE_CONTROL 0x0000003A +#define MSR_CORE2_FEATURE_CONTROL 0x0000003A /** MSR information returned for MSR index #MSR_CORE2_FEATURE_CONTROL @@ -227,27 +225,26 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:3; + UINT32 Reserved1 : 3; /// /// [Bit 3] Unique. SMRR Enable (R/WL) When this bit is set and the lock /// bit is set makes the SMRR_PHYS_BASE and SMRR_PHYS_MASK registers read /// visible and writeable while in SMM. /// - UINT32 SMRREnable:1; - UINT32 Reserved2:28; - UINT32 Reserved3:32; + UINT32 SMRREnable : 1; + UINT32 Reserved2 : 28; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_CORE2_FEATURE_CONTROL_REGISTER; - /** Unique. Last Branch Record n From IP (R/W) One of four pairs of last branch record registers on the last branch record stack. The From_IP part of the @@ -271,13 +268,12 @@ typedef union { MSR_CORE2_LASTBRANCH_3_FROM_IP is defined as MSR_LASTBRANCH_3_FROM_IP in SDM. @{ **/ -#define MSR_CORE2_LASTBRANCH_0_FROM_IP 0x00000040 -#define MSR_CORE2_LASTBRANCH_1_FROM_IP 0x00000041 -#define MSR_CORE2_LASTBRANCH_2_FROM_IP 0x00000042 -#define MSR_CORE2_LASTBRANCH_3_FROM_IP 0x00000043 +#define MSR_CORE2_LASTBRANCH_0_FROM_IP 0x00000040 +#define MSR_CORE2_LASTBRANCH_1_FROM_IP 0x00000041 +#define MSR_CORE2_LASTBRANCH_2_FROM_IP 0x00000042 +#define MSR_CORE2_LASTBRANCH_3_FROM_IP 0x00000043 /// @} - /** Unique. Last Branch Record n To IP (R/W) One of four pairs of last branch record registers on the last branch record stack. This To_IP part of the @@ -300,13 +296,12 @@ typedef union { MSR_CORE2_LASTBRANCH_3_TO_IP is defined as MSR_LASTBRANCH_3_TO_IP in SDM. @{ **/ -#define MSR_CORE2_LASTBRANCH_0_TO_IP 0x00000060 -#define MSR_CORE2_LASTBRANCH_1_TO_IP 0x00000061 -#define MSR_CORE2_LASTBRANCH_2_TO_IP 0x00000062 -#define MSR_CORE2_LASTBRANCH_3_TO_IP 0x00000063 +#define MSR_CORE2_LASTBRANCH_0_TO_IP 0x00000060 +#define MSR_CORE2_LASTBRANCH_1_TO_IP 0x00000061 +#define MSR_CORE2_LASTBRANCH_2_TO_IP 0x00000062 +#define MSR_CORE2_LASTBRANCH_3_TO_IP 0x00000063 /// @} - /** Unique. System Management Mode Base Address register (WO in SMM) Model-specific implementation of SMRR-like interface, read visible and write @@ -327,7 +322,7 @@ typedef union { @endcode @note MSR_CORE2_SMRR_PHYSBASE is defined as MSR_SMRR_PHYSBASE in SDM. **/ -#define MSR_CORE2_SMRR_PHYSBASE 0x000000A0 +#define MSR_CORE2_SMRR_PHYSBASE 0x000000A0 /** MSR information returned for MSR index #MSR_CORE2_SMRR_PHYSBASE @@ -337,24 +332,23 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:12; + UINT32 Reserved1 : 12; /// /// [Bits 31:12] PhysBase. SMRR physical Base Address. /// - UINT32 PhysBase:20; - UINT32 Reserved2:32; + UINT32 PhysBase : 20; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_CORE2_SMRR_PHYSBASE_REGISTER; - /** Unique. System Management Mode Physical Address Mask register (WO in SMM) Model-specific implementation of SMRR-like interface, read visible and write @@ -375,7 +369,7 @@ typedef union { @endcode @note MSR_CORE2_SMRR_PHYSMASK is defined as MSR_SMRR_PHYSMASK in SDM. **/ -#define MSR_CORE2_SMRR_PHYSMASK 0x000000A1 +#define MSR_CORE2_SMRR_PHYSMASK 0x000000A1 /** MSR information returned for MSR index #MSR_CORE2_SMRR_PHYSMASK @@ -385,28 +379,27 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:11; + UINT32 Reserved1 : 11; /// /// [Bit 11] Valid. Physical address base and range mask are valid. /// - UINT32 Valid:1; + UINT32 Valid : 1; /// /// [Bits 31:12] PhysMask. SMRR physical address range mask. /// - UINT32 PhysMask:20; - UINT32 Reserved2:32; + UINT32 PhysMask : 20; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_CORE2_SMRR_PHYSMASK_REGISTER; - /** Shared. Scalable Bus Speed(RO) This field indicates the intended scalable bus clock speed for processors based on Intel Core microarchitecture:. @@ -425,7 +418,7 @@ typedef union { @endcode @note MSR_CORE2_FSB_FREQ is defined as MSR_FSB_FREQ in SDM. **/ -#define MSR_CORE2_FSB_FREQ 0x000000CD +#define MSR_CORE2_FSB_FREQ 0x000000CD /** MSR information returned for MSR index #MSR_CORE2_FSB_FREQ @@ -451,18 +444,18 @@ typedef union { /// Bus Speed when encoding is 000B. 333.33 MHz should be utilized if /// performing calculation with System Bus Speed when encoding is 100B. /// - UINT32 ScalableBusSpeed:3; - UINT32 Reserved1:29; - UINT32 Reserved2:32; + UINT32 ScalableBusSpeed : 3; + UINT32 Reserved1 : 29; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_CORE2_FSB_FREQ_REGISTER; /** @@ -483,7 +476,7 @@ typedef union { @endcode @note MSR_CORE2_PERF_STATUS is defined as MSR_PERF_STATUS in SDM. **/ -#define MSR_CORE2_PERF_STATUS 0x00000198 +#define MSR_CORE2_PERF_STATUS 0x00000198 /** MSR information returned for MSR index #MSR_CORE2_PERF_STATUS @@ -496,35 +489,34 @@ typedef union { /// /// [Bits 15:0] Current Performance State Value. /// - UINT32 CurrentPerformanceStateValue:16; - UINT32 Reserved1:15; + UINT32 CurrentPerformanceStateValue : 16; + UINT32 Reserved1 : 15; /// /// [Bit 31] XE Operation (R/O). If set, XE operation is enabled. Default /// is cleared. /// - UINT32 XEOperation:1; - UINT32 Reserved2:8; + UINT32 XEOperation : 1; + UINT32 Reserved2 : 8; /// /// [Bits 44:40] Maximum Bus Ratio (R/O) Indicates maximum bus ratio /// configured for the processor. /// - UINT32 MaximumBusRatio:5; - UINT32 Reserved3:1; + UINT32 MaximumBusRatio : 5; + UINT32 Reserved3 : 1; /// /// [Bit 46] Non-Integer Bus Ratio (R/O) Indicates non-integer bus ratio /// is enabled. Applies processors based on Enhanced Intel Core /// microarchitecture. /// - UINT32 NonIntegerBusRatio:1; - UINT32 Reserved4:17; + UINT32 NonIntegerBusRatio : 1; + UINT32 Reserved4 : 17; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_CORE2_PERF_STATUS_REGISTER; - /** Unique. @@ -543,7 +535,7 @@ typedef union { @endcode @note MSR_CORE2_THERM2_CTL is defined as MSR_THERM2_CTL in SDM. **/ -#define MSR_CORE2_THERM2_CTL 0x0000019D +#define MSR_CORE2_THERM2_CTL 0x0000019D /** MSR information returned for MSR index #MSR_CORE2_THERM2_CTL @@ -553,7 +545,7 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:16; + UINT32 Reserved1 : 16; /// /// [Bit 16] TM_SELECT (R/W) Mode of automatic thermal monitor: 1. = /// Thermal Monitor 1 (thermally-initiated on-die modulation of the @@ -561,21 +553,20 @@ typedef union { /// frequency transitions) If bit 3 of the IA32_MISC_ENABLE register is /// cleared, TM_SELECT has no effect. Neither TM1 nor TM2 are enabled. /// - UINT32 TM_SELECT:1; - UINT32 Reserved2:15; - UINT32 Reserved3:32; + UINT32 TM_SELECT : 1; + UINT32 Reserved2 : 15; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_CORE2_THERM2_CTL_REGISTER; - /** Enable Misc. Processor Features (R/W) Allows a variety of processor functions to be enabled and disabled. @@ -595,7 +586,7 @@ typedef union { @endcode @note MSR_CORE2_IA32_MISC_ENABLE is defined as IA32_MISC_ENABLE in SDM. **/ -#define MSR_CORE2_IA32_MISC_ENABLE 0x000001A0 +#define MSR_CORE2_IA32_MISC_ENABLE 0x000001A0 /** MSR information returned for MSR index #MSR_CORE2_IA32_MISC_ENABLE @@ -608,42 +599,42 @@ typedef union { /// /// [Bit 0] Fast-Strings Enable See Table 2-2. /// - UINT32 FastStrings:1; - UINT32 Reserved1:2; + UINT32 FastStrings : 1; + UINT32 Reserved1 : 2; /// /// [Bit 3] Unique. Automatic Thermal Control Circuit Enable (R/W) See /// Table 2-2. /// - UINT32 AutomaticThermalControlCircuit:1; - UINT32 Reserved2:3; + UINT32 AutomaticThermalControlCircuit : 1; + UINT32 Reserved2 : 3; /// /// [Bit 7] Shared. Performance Monitoring Available (R) See Table 2-2. /// - UINT32 PerformanceMonitoring:1; - UINT32 Reserved3:1; + UINT32 PerformanceMonitoring : 1; + UINT32 Reserved3 : 1; /// /// [Bit 9] Hardware Prefetcher Disable (R/W) When set, disables the /// hardware prefetcher operation on streams of data. When clear /// (default), enables the prefetch queue. Disabling of the hardware /// prefetcher may impact processor performance. /// - UINT32 HardwarePrefetcherDisable:1; + UINT32 HardwarePrefetcherDisable : 1; /// /// [Bit 10] Shared. FERR# Multiplexing Enable (R/W) 1 = FERR# asserted by /// the processor to indicate a pending break event within the processor 0 /// = Indicates compatible FERR# signaling behavior This bit must be set /// to 1 to support XAPIC interrupt model usage. /// - UINT32 FERR:1; + UINT32 FERR : 1; /// /// [Bit 11] Shared. Branch Trace Storage Unavailable (RO) See Table 2-2. /// - UINT32 BTS:1; + UINT32 BTS : 1; /// /// [Bit 12] Shared. Processor Event Based Sampling Unavailable (RO) See /// Table 2-2. /// - UINT32 PEBS:1; + UINT32 PEBS : 1; /// /// [Bit 13] Shared. TM2 Enable (R/W) When this bit is set (1) and the /// thermal sensor indicates that the die temperature is at the @@ -658,18 +649,18 @@ typedef union { /// contents of the TM2 bit location. The processor is operating out of /// specification if both this bit and the TM1 bit are set to 0. /// - UINT32 TM2:1; - UINT32 Reserved4:2; + UINT32 TM2 : 1; + UINT32 Reserved4 : 2; /// /// [Bit 16] Shared. Enhanced Intel SpeedStep Technology Enable (R/W) See /// Table 2-2. /// - UINT32 EIST:1; - UINT32 Reserved5:1; + UINT32 EIST : 1; + UINT32 Reserved5 : 1; /// /// [Bit 18] Shared. ENABLE MONITOR FSM (R/W) See Table 2-2. /// - UINT32 MONITOR:1; + UINT32 MONITOR : 1; /// /// [Bit 19] Shared. Adjacent Cache Line Prefetch Disable (R/W) When set /// to 1, the processor fetches the cache line that contains data @@ -680,7 +671,7 @@ typedef union { /// validation and testing. BIOS may contain a setup option that controls /// the setting of this bit. /// - UINT32 AdjacentCacheLinePrefetchDisable:1; + UINT32 AdjacentCacheLinePrefetchDisable : 1; /// /// [Bit 20] Shared. Enhanced Intel SpeedStep Technology Select Lock /// (R/WO) When set, this bit causes the following bits to become @@ -689,23 +680,23 @@ typedef union { /// be set before an Enhanced Intel SpeedStep Technology transition is /// requested. This bit is cleared on reset. /// - UINT32 EISTLock:1; - UINT32 Reserved6:1; + UINT32 EISTLock : 1; + UINT32 Reserved6 : 1; /// /// [Bit 22] Shared. Limit CPUID Maxval (R/W) See Table 2-2. /// - UINT32 LimitCpuidMaxval:1; + UINT32 LimitCpuidMaxval : 1; /// /// [Bit 23] Shared. xTPR Message Disable (R/W) See Table 2-2. /// - UINT32 xTPR_Message_Disable:1; - UINT32 Reserved7:8; - UINT32 Reserved8:2; + UINT32 xTPR_Message_Disable : 1; + UINT32 Reserved7 : 8; + UINT32 Reserved8 : 2; /// /// [Bit 34] Unique. XD Bit Disable (R/W) See Table 2-2. /// - UINT32 XD:1; - UINT32 Reserved9:2; + UINT32 XD : 1; + UINT32 Reserved9 : 2; /// /// [Bit 37] Unique. DCU Prefetcher Disable (R/W) When set to 1, The DCU /// L1 data cache prefetcher is disabled. The default value after reset is @@ -715,7 +706,7 @@ typedef union { /// assumes the next line will be required. The next line is prefetched in /// to the L1 data cache from memory or L2. /// - UINT32 DCUPrefetcherDisable:1; + UINT32 DCUPrefetcherDisable : 1; /// /// [Bit 38] Shared. IDA Disable (R/W) When set to 1 on processors that /// support IDA, the Intel Dynamic Acceleration feature (IDA) is disabled @@ -726,7 +717,7 @@ typedef union { /// power-on default value is 1, IDA is available in the processor. If /// power-on default value is 0, IDA is not available. /// - UINT32 IDADisable:1; + UINT32 IDADisable : 1; /// /// [Bit 39] Unique. IP Prefetcher Disable (R/W) When set to 1, The IP /// prefetcher is disabled. The default value after reset is 0. BIOS may @@ -735,16 +726,15 @@ typedef union { /// to determine whether to prefetch the next expected data into the L1 /// cache from memory or L2. /// - UINT32 IPPrefetcherDisable:1; - UINT32 Reserved10:24; + UINT32 IPPrefetcherDisable : 1; + UINT32 Reserved10 : 24; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_CORE2_IA32_MISC_ENABLE_REGISTER; - /** Unique. Last Branch Record Stack TOS (R/W) Contains an index (bits 0-3) that points to the MSR containing the most recent branch record. See @@ -763,8 +753,7 @@ typedef union { @endcode @note MSR_CORE2_LASTBRANCH_TOS is defined as MSR_LASTBRANCH_TOS in SDM. **/ -#define MSR_CORE2_LASTBRANCH_TOS 0x000001C9 - +#define MSR_CORE2_LASTBRANCH_TOS 0x000001C9 /** Unique. Last Exception Record From Linear IP (R) Contains a pointer to the @@ -783,8 +772,7 @@ typedef union { @endcode @note MSR_CORE2_LER_FROM_LIP is defined as MSR_LER_FROM_LIP in SDM. **/ -#define MSR_CORE2_LER_FROM_LIP 0x000001DD - +#define MSR_CORE2_LER_FROM_LIP 0x000001DD /** Unique. Last Exception Record To Linear IP (R) This area contains a pointer @@ -804,8 +792,7 @@ typedef union { @endcode @note MSR_CORE2_LER_TO_LIP is defined as MSR_LER_TO_LIP in SDM. **/ -#define MSR_CORE2_LER_TO_LIP 0x000001DE - +#define MSR_CORE2_LER_TO_LIP 0x000001DE /** Unique. Fixed-Function Performance Counter Register n (R/W). @@ -826,12 +813,11 @@ typedef union { MSR_CORE2_PERF_FIXED_CTR2 is defined as MSR_PERF_FIXED_CTR2 in SDM. @{ **/ -#define MSR_CORE2_PERF_FIXED_CTR0 0x00000309 -#define MSR_CORE2_PERF_FIXED_CTR1 0x0000030A -#define MSR_CORE2_PERF_FIXED_CTR2 0x0000030B +#define MSR_CORE2_PERF_FIXED_CTR0 0x00000309 +#define MSR_CORE2_PERF_FIXED_CTR1 0x0000030A +#define MSR_CORE2_PERF_FIXED_CTR2 0x0000030B /// @} - /** Unique. RO. This applies to processors that do not support architectural perfmon version 2. @@ -851,7 +837,7 @@ typedef union { @endcode @note MSR_CORE2_PERF_CAPABILITIES is defined as MSR_PERF_CAPABILITIES in SDM. **/ -#define MSR_CORE2_PERF_CAPABILITIES 0x00000345 +#define MSR_CORE2_PERF_CAPABILITIES 0x00000345 /** MSR information returned for MSR index #MSR_CORE2_PERF_CAPABILITIES @@ -864,29 +850,28 @@ typedef union { /// /// [Bits 5:0] LBR Format. See Table 2-2. /// - UINT32 LBR_FMT:6; + UINT32 LBR_FMT : 6; /// /// [Bit 6] PEBS Record Format. /// - UINT32 PEBS_FMT:1; + UINT32 PEBS_FMT : 1; /// /// [Bit 7] PEBSSaveArchRegs. See Table 2-2. /// - UINT32 PEBS_ARCH_REG:1; - UINT32 Reserved1:24; - UINT32 Reserved2:32; + UINT32 PEBS_ARCH_REG : 1; + UINT32 Reserved1 : 24; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_CORE2_PERF_CAPABILITIES_REGISTER; - /** Unique. Fixed-Function-Counter Control Register (R/W). @@ -903,8 +888,7 @@ typedef union { @endcode @note MSR_CORE2_PERF_FIXED_CTR_CTRL is defined as MSR_PERF_FIXED_CTR_CTRL in SDM. **/ -#define MSR_CORE2_PERF_FIXED_CTR_CTRL 0x0000038D - +#define MSR_CORE2_PERF_FIXED_CTR_CTRL 0x0000038D /** Unique. See Section 18.6.2.2, "Global Counter Control Facilities.". @@ -922,8 +906,7 @@ typedef union { @endcode @note MSR_CORE2_PERF_GLOBAL_STATUS is defined as MSR_PERF_GLOBAL_STATUS in SDM. **/ -#define MSR_CORE2_PERF_GLOBAL_STATUS 0x0000038E - +#define MSR_CORE2_PERF_GLOBAL_STATUS 0x0000038E /** Unique. See Section 18.6.2.2, "Global Counter Control Facilities.". @@ -941,8 +924,7 @@ typedef union { @endcode @note MSR_CORE2_PERF_GLOBAL_CTRL is defined as MSR_PERF_GLOBAL_CTRL in SDM. **/ -#define MSR_CORE2_PERF_GLOBAL_CTRL 0x0000038F - +#define MSR_CORE2_PERF_GLOBAL_CTRL 0x0000038F /** Unique. See Section 18.6.2.2, "Global Counter Control Facilities.". @@ -960,8 +942,7 @@ typedef union { @endcode @note MSR_CORE2_PERF_GLOBAL_OVF_CTRL is defined as MSR_PERF_GLOBAL_OVF_CTRL in SDM. **/ -#define MSR_CORE2_PERF_GLOBAL_OVF_CTRL 0x00000390 - +#define MSR_CORE2_PERF_GLOBAL_OVF_CTRL 0x00000390 /** Unique. See Table 2-2. See Section 18.6.2.4, "Processor Event Based Sampling @@ -982,7 +963,7 @@ typedef union { @endcode @note MSR_CORE2_PEBS_ENABLE is defined as MSR_PEBS_ENABLE in SDM. **/ -#define MSR_CORE2_PEBS_ENABLE 0x000003F1 +#define MSR_CORE2_PEBS_ENABLE 0x000003F1 /** MSR information returned for MSR index #MSR_CORE2_PEBS_ENABLE @@ -995,21 +976,20 @@ typedef union { /// /// [Bit 0] Enable PEBS on IA32_PMC0. (R/W). /// - UINT32 Enable:1; - UINT32 Reserved1:31; - UINT32 Reserved2:32; + UINT32 Enable : 1; + UINT32 Reserved1 : 31; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_CORE2_PEBS_ENABLE_REGISTER; - /** Unique. GBUSQ Event Control/Counter Register (R/W) Apply to Intel Xeon processor 7400 series (processor signature 06_1D) only. See Section 17.2.2. @@ -1035,17 +1015,16 @@ typedef union { MSR_CORE2_EMON_L3_CTR_CTL7 is defined as MSR_EMON_L3_CTR_CTL7 in SDM. @{ **/ -#define MSR_CORE2_EMON_L3_CTR_CTL0 0x000107CC -#define MSR_CORE2_EMON_L3_CTR_CTL1 0x000107CD -#define MSR_CORE2_EMON_L3_CTR_CTL2 0x000107CE -#define MSR_CORE2_EMON_L3_CTR_CTL3 0x000107CF -#define MSR_CORE2_EMON_L3_CTR_CTL4 0x000107D0 -#define MSR_CORE2_EMON_L3_CTR_CTL5 0x000107D1 -#define MSR_CORE2_EMON_L3_CTR_CTL6 0x000107D2 -#define MSR_CORE2_EMON_L3_CTR_CTL7 0x000107D3 +#define MSR_CORE2_EMON_L3_CTR_CTL0 0x000107CC +#define MSR_CORE2_EMON_L3_CTR_CTL1 0x000107CD +#define MSR_CORE2_EMON_L3_CTR_CTL2 0x000107CE +#define MSR_CORE2_EMON_L3_CTR_CTL3 0x000107CF +#define MSR_CORE2_EMON_L3_CTR_CTL4 0x000107D0 +#define MSR_CORE2_EMON_L3_CTR_CTL5 0x000107D1 +#define MSR_CORE2_EMON_L3_CTR_CTL6 0x000107D2 +#define MSR_CORE2_EMON_L3_CTR_CTL7 0x000107D3 /// @} - /** Unique. L3/FSB Common Control Register (R/W) Apply to Intel Xeon processor 7400 series (processor signature 06_1D) only. See Section 17.2.2. @@ -1063,6 +1042,6 @@ typedef union { @endcode @note MSR_CORE2_EMON_L3_GL_CTL is defined as MSR_EMON_L3_GL_CTL in SDM. **/ -#define MSR_CORE2_EMON_L3_GL_CTL 0x000107D8 +#define MSR_CORE2_EMON_L3_GL_CTL 0x000107D8 #endif diff --git a/MdePkg/Include/Register/Intel/Msr/CoreMsr.h b/MdePkg/Include/Register/Intel/Msr/CoreMsr.h index 1e43bc1..71de198 100644 --- a/MdePkg/Include/Register/Intel/Msr/CoreMsr.h +++ b/MdePkg/Include/Register/Intel/Msr/CoreMsr.h @@ -52,8 +52,7 @@ @endcode @note MSR_CORE_P5_MC_ADDR is defined as P5_MC_ADDR in SDM. **/ -#define MSR_CORE_P5_MC_ADDR 0x00000000 - +#define MSR_CORE_P5_MC_ADDR 0x00000000 /** Unique. See Section 2.22, "MSRs in Pentium Processors," and see Table 2-2. @@ -71,8 +70,7 @@ @endcode @note MSR_CORE_P5_MC_TYPE is defined as P5_MC_TYPE in SDM. **/ -#define MSR_CORE_P5_MC_TYPE 0x00000001 - +#define MSR_CORE_P5_MC_TYPE 0x00000001 /** Shared. Processor Hard Power-On Configuration (R/W) Enables and disables @@ -93,7 +91,7 @@ @endcode @note MSR_CORE_EBL_CR_POWERON is defined as MSR_EBL_CR_POWERON in SDM. **/ -#define MSR_CORE_EBL_CR_POWERON 0x0000002A +#define MSR_CORE_EBL_CR_POWERON 0x0000002A /** MSR information returned for MSR index #MSR_CORE_EBL_CR_POWERON @@ -103,87 +101,86 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:1; + UINT32 Reserved1 : 1; /// /// [Bit 1] Data Error Checking Enable (R/W) 1 = Enabled; 0 = Disabled /// Note: Not all processor implements R/W. /// - UINT32 DataErrorCheckingEnable:1; + UINT32 DataErrorCheckingEnable : 1; /// /// [Bit 2] Response Error Checking Enable (R/W) 1 = Enabled; 0 = Disabled /// Note: Not all processor implements R/W. /// - UINT32 ResponseErrorCheckingEnable:1; + UINT32 ResponseErrorCheckingEnable : 1; /// /// [Bit 3] MCERR# Drive Enable (R/W) 1 = Enabled; 0 = Disabled Note: Not /// all processor implements R/W. /// - UINT32 MCERR_DriveEnable:1; + UINT32 MCERR_DriveEnable : 1; /// /// [Bit 4] Address Parity Enable (R/W) 1 = Enabled; 0 = Disabled Note: /// Not all processor implements R/W. /// - UINT32 AddressParityEnable:1; - UINT32 Reserved2:2; + UINT32 AddressParityEnable : 1; + UINT32 Reserved2 : 2; /// /// [Bit 7] BINIT# Driver Enable (R/W) 1 = Enabled; 0 = Disabled Note: Not /// all processor implements R/W. /// - UINT32 BINIT_DriverEnable:1; + UINT32 BINIT_DriverEnable : 1; /// /// [Bit 8] Output Tri-state Enabled (R/O) 1 = Enabled; 0 = Disabled. /// - UINT32 OutputTriStateEnable:1; + UINT32 OutputTriStateEnable : 1; /// /// [Bit 9] Execute BIST (R/O) 1 = Enabled; 0 = Disabled. /// - UINT32 ExecuteBIST:1; + UINT32 ExecuteBIST : 1; /// /// [Bit 10] MCERR# Observation Enabled (R/O) 1 = Enabled; 0 = Disabled. /// - UINT32 MCERR_ObservationEnabled:1; - UINT32 Reserved3:1; + UINT32 MCERR_ObservationEnabled : 1; + UINT32 Reserved3 : 1; /// /// [Bit 12] BINIT# Observation Enabled (R/O) 1 = Enabled; 0 = Disabled. /// - UINT32 BINIT_ObservationEnabled:1; - UINT32 Reserved4:1; + UINT32 BINIT_ObservationEnabled : 1; + UINT32 Reserved4 : 1; /// /// [Bit 14] 1 MByte Power on Reset Vector (R/O) 1 = 1 MByte; 0 = 4 GBytes. /// - UINT32 ResetVector:1; - UINT32 Reserved5:1; + UINT32 ResetVector : 1; + UINT32 Reserved5 : 1; /// /// [Bits 17:16] APIC Cluster ID (R/O). /// - UINT32 APICClusterID:2; + UINT32 APICClusterID : 2; /// /// [Bit 18] System Bus Frequency (R/O) 1. = 100 MHz 2. = Reserved. /// - UINT32 SystemBusFrequency:1; - UINT32 Reserved6:1; + UINT32 SystemBusFrequency : 1; + UINT32 Reserved6 : 1; /// /// [Bits 21:20] Symmetric Arbitration ID (R/O). /// - UINT32 SymmetricArbitrationID:2; + UINT32 SymmetricArbitrationID : 2; /// /// [Bits 26:22] Clock Frequency Ratio (R/O). /// - UINT32 ClockFrequencyRatio:5; - UINT32 Reserved7:5; - UINT32 Reserved8:32; + UINT32 ClockFrequencyRatio : 5; + UINT32 Reserved7 : 5; + UINT32 Reserved8 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_CORE_EBL_CR_POWERON_REGISTER; - /** Unique. Last Branch Record n (R/W) One of 8 last branch record registers on the last branch record stack: bits 31-0 hold the 'from' address and bits @@ -212,17 +209,16 @@ typedef union { MSR_CORE_LASTBRANCH_7 is defined as MSR_LASTBRANCH_7 in SDM. @{ **/ -#define MSR_CORE_LASTBRANCH_0 0x00000040 -#define MSR_CORE_LASTBRANCH_1 0x00000041 -#define MSR_CORE_LASTBRANCH_2 0x00000042 -#define MSR_CORE_LASTBRANCH_3 0x00000043 -#define MSR_CORE_LASTBRANCH_4 0x00000044 -#define MSR_CORE_LASTBRANCH_5 0x00000045 -#define MSR_CORE_LASTBRANCH_6 0x00000046 -#define MSR_CORE_LASTBRANCH_7 0x00000047 +#define MSR_CORE_LASTBRANCH_0 0x00000040 +#define MSR_CORE_LASTBRANCH_1 0x00000041 +#define MSR_CORE_LASTBRANCH_2 0x00000042 +#define MSR_CORE_LASTBRANCH_3 0x00000043 +#define MSR_CORE_LASTBRANCH_4 0x00000044 +#define MSR_CORE_LASTBRANCH_5 0x00000045 +#define MSR_CORE_LASTBRANCH_6 0x00000046 +#define MSR_CORE_LASTBRANCH_7 0x00000047 /// @} - /** Shared. Scalable Bus Speed (RO) This field indicates the scalable bus clock speed:. @@ -241,7 +237,7 @@ typedef union { @endcode @note MSR_CORE_FSB_FREQ is defined as MSR_FSB_FREQ in SDM. **/ -#define MSR_CORE_FSB_FREQ 0x000000CD +#define MSR_CORE_FSB_FREQ 0x000000CD /** MSR information returned for MSR index #MSR_CORE_FSB_FREQ @@ -261,21 +257,20 @@ typedef union { /// Speed when encoding is 101B. 166.67 MHz should be utilized if /// performing calculation with System Bus Speed when encoding is 001B. /// - UINT32 ScalableBusSpeed:3; - UINT32 Reserved1:29; - UINT32 Reserved2:32; + UINT32 ScalableBusSpeed : 3; + UINT32 Reserved1 : 29; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_CORE_FSB_FREQ_REGISTER; - /** Shared. @@ -294,7 +289,7 @@ typedef union { @endcode @note MSR_CORE_BBL_CR_CTL3 is defined as MSR_BBL_CR_CTL3 in SDM. **/ -#define MSR_CORE_BBL_CR_CTL3 0x0000011E +#define MSR_CORE_BBL_CR_CTL3 0x0000011E /** MSR information returned for MSR index #MSR_CORE_BBL_CR_CTL3 @@ -308,33 +303,32 @@ typedef union { /// [Bit 0] L2 Hardware Enabled (RO) 1 = If the L2 is hardware-enabled 0 = /// Indicates if the L2 is hardware-disabled. /// - UINT32 L2HardwareEnabled:1; - UINT32 Reserved1:7; + UINT32 L2HardwareEnabled : 1; + UINT32 Reserved1 : 7; /// /// [Bit 8] L2 Enabled (R/W) 1 = L2 cache has been initialized 0 = /// Disabled (default) Until this bit is set the processor will not /// respond to the WBINVD instruction or the assertion of the FLUSH# input. /// - UINT32 L2Enabled:1; - UINT32 Reserved2:14; + UINT32 L2Enabled : 1; + UINT32 Reserved2 : 14; /// /// [Bit 23] L2 Not Present (RO) 1. = L2 Present 2. = L2 Not Present. /// - UINT32 L2NotPresent:1; - UINT32 Reserved3:8; - UINT32 Reserved4:32; + UINT32 L2NotPresent : 1; + UINT32 Reserved3 : 8; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_CORE_BBL_CR_CTL3_REGISTER; - /** Unique. @@ -353,7 +347,7 @@ typedef union { @endcode @note MSR_CORE_THERM2_CTL is defined as MSR_THERM2_CTL in SDM. **/ -#define MSR_CORE_THERM2_CTL 0x0000019D +#define MSR_CORE_THERM2_CTL 0x0000019D /** MSR information returned for MSR index #MSR_CORE_THERM2_CTL @@ -363,7 +357,7 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:16; + UINT32 Reserved1 : 16; /// /// [Bit 16] TM_SELECT (R/W) Mode of automatic thermal monitor: 1. = /// Thermal Monitor 1 (thermally-initiated on-die modulation of the @@ -371,21 +365,20 @@ typedef union { /// frequency transitions) If bit 3 of the IA32_MISC_ENABLE register is /// cleared, TM_SELECT has no effect. Neither TM1 nor TM2 will be enabled. /// - UINT32 TM_SELECT:1; - UINT32 Reserved2:15; - UINT32 Reserved3:32; + UINT32 TM_SELECT : 1; + UINT32 Reserved2 : 15; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_CORE_THERM2_CTL_REGISTER; - /** Enable Miscellaneous Processor Features (R/W) Allows a variety of processor functions to be enabled and disabled. @@ -405,7 +398,7 @@ typedef union { @endcode @note MSR_CORE_IA32_MISC_ENABLE is defined as IA32_MISC_ENABLE in SDM. **/ -#define MSR_CORE_IA32_MISC_ENABLE 0x000001A0 +#define MSR_CORE_IA32_MISC_ENABLE 0x000001A0 /** MSR information returned for MSR index #MSR_CORE_IA32_MISC_ENABLE @@ -415,30 +408,30 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:3; + UINT32 Reserved1 : 3; /// /// [Bit 3] Unique. Automatic Thermal Control Circuit Enable (R/W) See /// Table 2-2. /// - UINT32 AutomaticThermalControlCircuit:1; - UINT32 Reserved2:3; + UINT32 AutomaticThermalControlCircuit : 1; + UINT32 Reserved2 : 3; /// /// [Bit 7] Shared. Performance Monitoring Available (R) See Table 2-2. /// - UINT32 PerformanceMonitoring:1; - UINT32 Reserved3:2; + UINT32 PerformanceMonitoring : 1; + UINT32 Reserved3 : 2; /// /// [Bit 10] Shared. FERR# Multiplexing Enable (R/W) 1 = FERR# asserted by /// the processor to indicate a pending break event within the processor 0 /// = Indicates compatible FERR# signaling behavior This bit must be set /// to 1 to support XAPIC interrupt model usage. /// - UINT32 FERR:1; + UINT32 FERR : 1; /// /// [Bit 11] Shared. Branch Trace Storage Unavailable (RO) See Table 2-2. /// - UINT32 BTS:1; - UINT32 Reserved4:1; + UINT32 BTS : 1; + UINT32 Reserved4 : 1; /// /// [Bit 13] Shared. TM2 Enable (R/W) When this bit is set (1) and the /// thermal sensor indicates that the die temperature is at the @@ -453,41 +446,40 @@ typedef union { /// out of spec if both this bit and the TM1 bit are set to disabled /// states. /// - UINT32 TM2:1; - UINT32 Reserved5:2; + UINT32 TM2 : 1; + UINT32 Reserved5 : 2; /// /// [Bit 16] Shared. Enhanced Intel SpeedStep Technology Enable (R/W) 1 = /// Enhanced Intel SpeedStep Technology enabled. /// - UINT32 EIST:1; - UINT32 Reserved6:1; + UINT32 EIST : 1; + UINT32 Reserved6 : 1; /// /// [Bit 18] Shared. ENABLE MONITOR FSM (R/W) See Table 2-2. /// - UINT32 MONITOR:1; - UINT32 Reserved7:1; - UINT32 Reserved8:2; + UINT32 MONITOR : 1; + UINT32 Reserved7 : 1; + UINT32 Reserved8 : 2; /// /// [Bit 22] Shared. Limit CPUID Maxval (R/W) See Table 2-2. Setting this /// bit may cause behavior in software that depends on the availability of /// CPUID leaves greater than 2. /// - UINT32 LimitCpuidMaxval:1; - UINT32 Reserved9:9; - UINT32 Reserved10:2; + UINT32 LimitCpuidMaxval : 1; + UINT32 Reserved9 : 9; + UINT32 Reserved10 : 2; /// /// [Bit 34] Shared. XD Bit Disable (R/W) See Table 2-2. /// - UINT32 XD:1; - UINT32 Reserved11:29; + UINT32 XD : 1; + UINT32 Reserved11 : 29; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_CORE_IA32_MISC_ENABLE_REGISTER; - /** Unique. Last Branch Record Stack TOS (R/W) Contains an index (bits 0-3) that points to the MSR containing the most recent branch record. See @@ -506,8 +498,7 @@ typedef union { @endcode @note MSR_CORE_LASTBRANCH_TOS is defined as MSR_LASTBRANCH_TOS in SDM. **/ -#define MSR_CORE_LASTBRANCH_TOS 0x000001C9 - +#define MSR_CORE_LASTBRANCH_TOS 0x000001C9 /** Unique. Last Exception Record From Linear IP (R) Contains a pointer to the @@ -526,8 +517,7 @@ typedef union { @endcode @note MSR_CORE_LER_FROM_LIP is defined as MSR_LER_FROM_LIP in SDM. **/ -#define MSR_CORE_LER_FROM_LIP 0x000001DD - +#define MSR_CORE_LER_FROM_LIP 0x000001DD /** Unique. Last Exception Record To Linear IP (R) This area contains a pointer @@ -547,7 +537,7 @@ typedef union { @endcode @note MSR_CORE_LER_TO_LIP is defined as MSR_LER_TO_LIP in SDM. **/ -#define MSR_CORE_LER_TO_LIP 0x000001DE +#define MSR_CORE_LER_TO_LIP 0x000001DE /** Unique. @@ -573,17 +563,16 @@ typedef union { MSR_CORE_MTRRPHYSMASK7 is defined as MTRRPHYSMASK7 in SDM. @{ **/ -#define MSR_CORE_MTRRPHYSBASE0 0x00000200 -#define MSR_CORE_MTRRPHYSBASE1 0x00000202 -#define MSR_CORE_MTRRPHYSBASE2 0x00000204 -#define MSR_CORE_MTRRPHYSBASE3 0x00000206 -#define MSR_CORE_MTRRPHYSBASE4 0x00000208 -#define MSR_CORE_MTRRPHYSBASE5 0x0000020A -#define MSR_CORE_MTRRPHYSMASK6 0x0000020D -#define MSR_CORE_MTRRPHYSMASK7 0x0000020F +#define MSR_CORE_MTRRPHYSBASE0 0x00000200 +#define MSR_CORE_MTRRPHYSBASE1 0x00000202 +#define MSR_CORE_MTRRPHYSBASE2 0x00000204 +#define MSR_CORE_MTRRPHYSBASE3 0x00000206 +#define MSR_CORE_MTRRPHYSBASE4 0x00000208 +#define MSR_CORE_MTRRPHYSBASE5 0x0000020A +#define MSR_CORE_MTRRPHYSMASK6 0x0000020D +#define MSR_CORE_MTRRPHYSMASK7 0x0000020F /// @} - /** Unique. @@ -608,17 +597,16 @@ typedef union { MSR_CORE_MTRRPHYSBASE7 is defined as MTRRPHYSBASE7 in SDM. @{ **/ -#define MSR_CORE_MTRRPHYSMASK0 0x00000201 -#define MSR_CORE_MTRRPHYSMASK1 0x00000203 -#define MSR_CORE_MTRRPHYSMASK2 0x00000205 -#define MSR_CORE_MTRRPHYSMASK3 0x00000207 -#define MSR_CORE_MTRRPHYSMASK4 0x00000209 -#define MSR_CORE_MTRRPHYSMASK5 0x0000020B -#define MSR_CORE_MTRRPHYSBASE6 0x0000020C -#define MSR_CORE_MTRRPHYSBASE7 0x0000020E +#define MSR_CORE_MTRRPHYSMASK0 0x00000201 +#define MSR_CORE_MTRRPHYSMASK1 0x00000203 +#define MSR_CORE_MTRRPHYSMASK2 0x00000205 +#define MSR_CORE_MTRRPHYSMASK3 0x00000207 +#define MSR_CORE_MTRRPHYSMASK4 0x00000209 +#define MSR_CORE_MTRRPHYSMASK5 0x0000020B +#define MSR_CORE_MTRRPHYSBASE6 0x0000020C +#define MSR_CORE_MTRRPHYSBASE7 0x0000020E /// @} - /** Unique. @@ -635,8 +623,7 @@ typedef union { @endcode @note MSR_CORE_MTRRFIX64K_00000 is defined as MTRRFIX64K_00000 in SDM. **/ -#define MSR_CORE_MTRRFIX64K_00000 0x00000250 - +#define MSR_CORE_MTRRFIX64K_00000 0x00000250 /** Unique. @@ -654,8 +641,7 @@ typedef union { @endcode @note MSR_CORE_MTRRFIX16K_80000 is defined as MTRRFIX16K_80000 in SDM. **/ -#define MSR_CORE_MTRRFIX16K_80000 0x00000258 - +#define MSR_CORE_MTRRFIX16K_80000 0x00000258 /** Unique. @@ -673,8 +659,7 @@ typedef union { @endcode @note MSR_CORE_MTRRFIX16K_A0000 is defined as MTRRFIX16K_A0000 in SDM. **/ -#define MSR_CORE_MTRRFIX16K_A0000 0x00000259 - +#define MSR_CORE_MTRRFIX16K_A0000 0x00000259 /** Unique. @@ -692,8 +677,7 @@ typedef union { @endcode @note MSR_CORE_MTRRFIX4K_C0000 is defined as MTRRFIX4K_C0000 in SDM. **/ -#define MSR_CORE_MTRRFIX4K_C0000 0x00000268 - +#define MSR_CORE_MTRRFIX4K_C0000 0x00000268 /** Unique. @@ -711,8 +695,7 @@ typedef union { @endcode @note MSR_CORE_MTRRFIX4K_C8000 is defined as MTRRFIX4K_C8000 in SDM. **/ -#define MSR_CORE_MTRRFIX4K_C8000 0x00000269 - +#define MSR_CORE_MTRRFIX4K_C8000 0x00000269 /** Unique. @@ -730,8 +713,7 @@ typedef union { @endcode @note MSR_CORE_MTRRFIX4K_D0000 is defined as MTRRFIX4K_D0000 in SDM. **/ -#define MSR_CORE_MTRRFIX4K_D0000 0x0000026A - +#define MSR_CORE_MTRRFIX4K_D0000 0x0000026A /** Unique. @@ -749,8 +731,7 @@ typedef union { @endcode @note MSR_CORE_MTRRFIX4K_D8000 is defined as MTRRFIX4K_D8000 in SDM. **/ -#define MSR_CORE_MTRRFIX4K_D8000 0x0000026B - +#define MSR_CORE_MTRRFIX4K_D8000 0x0000026B /** Unique. @@ -768,8 +749,7 @@ typedef union { @endcode @note MSR_CORE_MTRRFIX4K_E0000 is defined as MTRRFIX4K_E0000 in SDM. **/ -#define MSR_CORE_MTRRFIX4K_E0000 0x0000026C - +#define MSR_CORE_MTRRFIX4K_E0000 0x0000026C /** Unique. @@ -787,8 +767,7 @@ typedef union { @endcode @note MSR_CORE_MTRRFIX4K_E8000 is defined as MTRRFIX4K_E8000 in SDM. **/ -#define MSR_CORE_MTRRFIX4K_E8000 0x0000026D - +#define MSR_CORE_MTRRFIX4K_E8000 0x0000026D /** Unique. @@ -806,8 +785,7 @@ typedef union { @endcode @note MSR_CORE_MTRRFIX4K_F0000 is defined as MTRRFIX4K_F0000 in SDM. **/ -#define MSR_CORE_MTRRFIX4K_F0000 0x0000026E - +#define MSR_CORE_MTRRFIX4K_F0000 0x0000026E /** Unique. @@ -825,8 +803,7 @@ typedef union { @endcode @note MSR_CORE_MTRRFIX4K_F8000 is defined as MTRRFIX4K_F8000 in SDM. **/ -#define MSR_CORE_MTRRFIX4K_F8000 0x0000026F - +#define MSR_CORE_MTRRFIX4K_F8000 0x0000026F /** Unique. See Section 15.3.2.1, "IA32_MCi_CTL MSRs.". @@ -844,8 +821,7 @@ typedef union { @endcode @note MSR_CORE_MC4_CTL is defined as MSR_MC4_CTL in SDM. **/ -#define MSR_CORE_MC4_CTL 0x0000040C - +#define MSR_CORE_MC4_CTL 0x0000040C /** Unique. See Section 15.3.2.2, "IA32_MCi_STATUS MSRS.". @@ -863,8 +839,7 @@ typedef union { @endcode @note MSR_CORE_MC4_STATUS is defined as MSR_MC4_STATUS in SDM. **/ -#define MSR_CORE_MC4_STATUS 0x0000040D - +#define MSR_CORE_MC4_STATUS 0x0000040D /** Unique. See Section 15.3.2.3, "IA32_MCi_ADDR MSRs." The MSR_MC4_ADDR @@ -886,8 +861,7 @@ typedef union { @endcode @note MSR_CORE_MC4_ADDR is defined as MSR_MC4_ADDR in SDM. **/ -#define MSR_CORE_MC4_ADDR 0x0000040E - +#define MSR_CORE_MC4_ADDR 0x0000040E /** Unique. See Section 15.3.2.3, "IA32_MCi_ADDR MSRs." The MSR_MC3_ADDR @@ -909,8 +883,7 @@ typedef union { @endcode @note MSR_CORE_MC3_ADDR is defined as MSR_MC3_ADDR in SDM. **/ -#define MSR_CORE_MC3_ADDR 0x00000412 - +#define MSR_CORE_MC3_ADDR 0x00000412 /** Unique. @@ -928,8 +901,7 @@ typedef union { @endcode @note MSR_CORE_MC3_MISC is defined as MSR_MC3_MISC in SDM. **/ -#define MSR_CORE_MC3_MISC 0x00000413 - +#define MSR_CORE_MC3_MISC 0x00000413 /** Unique. @@ -947,8 +919,7 @@ typedef union { @endcode @note MSR_CORE_MC5_CTL is defined as MSR_MC5_CTL in SDM. **/ -#define MSR_CORE_MC5_CTL 0x00000414 - +#define MSR_CORE_MC5_CTL 0x00000414 /** Unique. @@ -966,8 +937,7 @@ typedef union { @endcode @note MSR_CORE_MC5_STATUS is defined as MSR_MC5_STATUS in SDM. **/ -#define MSR_CORE_MC5_STATUS 0x00000415 - +#define MSR_CORE_MC5_STATUS 0x00000415 /** Unique. @@ -985,8 +955,7 @@ typedef union { @endcode @note MSR_CORE_MC5_ADDR is defined as MSR_MC5_ADDR in SDM. **/ -#define MSR_CORE_MC5_ADDR 0x00000416 - +#define MSR_CORE_MC5_ADDR 0x00000416 /** Unique. @@ -1004,8 +973,7 @@ typedef union { @endcode @note MSR_CORE_MC5_MISC is defined as MSR_MC5_MISC in SDM. **/ -#define MSR_CORE_MC5_MISC 0x00000417 - +#define MSR_CORE_MC5_MISC 0x00000417 /** Unique. See Table 2-2. @@ -1025,7 +993,7 @@ typedef union { @endcode @note MSR_CORE_IA32_EFER is defined as IA32_EFER in SDM. **/ -#define MSR_CORE_IA32_EFER 0xC0000080 +#define MSR_CORE_IA32_EFER 0xC0000080 /** MSR information returned for MSR index #MSR_CORE_IA32_EFER @@ -1035,22 +1003,22 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:11; + UINT32 Reserved1 : 11; /// /// [Bit 11] Execute Disable Bit Enable. /// - UINT32 NXE:1; - UINT32 Reserved2:20; - UINT32 Reserved3:32; + UINT32 NXE : 1; + UINT32 Reserved2 : 20; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_CORE_IA32_EFER_REGISTER; #endif diff --git a/MdePkg/Include/Register/Intel/Msr/GoldmontMsr.h b/MdePkg/Include/Register/Intel/Msr/GoldmontMsr.h index d44172f..5a3f7b3 100644 --- a/MdePkg/Include/Register/Intel/Msr/GoldmontMsr.h +++ b/MdePkg/Include/Register/Intel/Msr/GoldmontMsr.h @@ -54,7 +54,7 @@ @endcode @note MSR_GOLDMONT_FEATURE_CONTROL is defined as IA32_FEATURE_CONTROL in SDM. **/ -#define MSR_GOLDMONT_FEATURE_CONTROL 0x0000003A +#define MSR_GOLDMONT_FEATURE_CONTROL 0x0000003A /** MSR information returned for MSR index #MSR_GOLDMONT_FEATURE_CONTROL @@ -67,43 +67,42 @@ typedef union { /// /// [Bit 0] Lock bit (R/WL) /// - UINT32 Lock:1; + UINT32 Lock : 1; /// /// [Bit 1] Enable VMX inside SMX operation (R/WL) /// - UINT32 EnableVmxInsideSmx:1; + UINT32 EnableVmxInsideSmx : 1; /// /// [Bit 2] Enable VMX outside SMX operation (R/WL) /// - UINT32 EnableVmxOutsideSmx:1; - UINT32 Reserved1:5; + UINT32 EnableVmxOutsideSmx : 1; + UINT32 Reserved1 : 5; /// /// [Bits 14:8] SENTER local function enables (R/WL) /// - UINT32 SenterLocalFunctionEnables:7; + UINT32 SenterLocalFunctionEnables : 7; /// /// [Bit 15] SENTER global functions enable (R/WL) /// - UINT32 SenterGlobalEnable:1; - UINT32 Reserved2:2; + UINT32 SenterGlobalEnable : 1; + UINT32 Reserved2 : 2; /// /// [Bit 18] SGX global functions enable (R/WL) /// - UINT32 SgxEnable:1; - UINT32 Reserved3:13; - UINT32 Reserved4:32; + UINT32 SgxEnable : 1; + UINT32 Reserved3 : 13; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_FEATURE_CONTROL_REGISTER; - /** Package. See http://biosbits.org. @@ -122,7 +121,7 @@ typedef union { @endcode @note MSR_GOLDMONT_PLATFORM_INFO is defined as MSR_PLATFORM_INFO in SDM. **/ -#define MSR_GOLDMONT_PLATFORM_INFO 0x000000CE +#define MSR_GOLDMONT_PLATFORM_INFO 0x000000CE /** MSR information returned for MSR index #MSR_GOLDMONT_PLATFORM_INFO @@ -132,51 +131,50 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:8; + UINT32 Reserved1 : 8; /// /// [Bits 15:8] Package. Maximum Non-Turbo Ratio (R/O) The is the ratio /// of the frequency that invariant TSC runs at. Frequency = ratio * 100 /// MHz. /// - UINT32 MaximumNonTurboRatio:8; - UINT32 Reserved2:12; + UINT32 MaximumNonTurboRatio : 8; + UINT32 Reserved2 : 12; /// /// [Bit 28] Package. Programmable Ratio Limit for Turbo Mode (R/O) When /// set to 1, indicates that Programmable Ratio Limits for Turbo mode is /// enabled, and when set to 0, indicates Programmable Ratio Limits for /// Turbo mode is disabled. /// - UINT32 RatioLimit:1; + UINT32 RatioLimit : 1; /// /// [Bit 29] Package. Programmable TDP Limit for Turbo Mode (R/O) When /// set to 1, indicates that TDP Limits for Turbo mode are programmable, /// and when set to 0, indicates TDP Limit for Turbo mode is not /// programmable. /// - UINT32 TDPLimit:1; + UINT32 TDPLimit : 1; /// /// [Bit 30] Package. Programmable TJ OFFSET (R/O) When set to 1, /// indicates that MSR_TEMPERATURE_TARGET.[27:24] is valid and writable to /// specify an temperature offset. /// - UINT32 TJOFFSET:1; - UINT32 Reserved3:1; - UINT32 Reserved4:8; + UINT32 TJOFFSET : 1; + UINT32 Reserved3 : 1; + UINT32 Reserved4 : 8; /// /// [Bits 47:40] Package. Maximum Efficiency Ratio (R/O) The is the /// minimum ratio (maximum efficiency) that the processor can operates, in /// units of 100MHz. /// - UINT32 MaximumEfficiencyRatio:8; - UINT32 Reserved5:16; + UINT32 MaximumEfficiencyRatio : 8; + UINT32 Reserved5 : 16; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_PLATFORM_INFO_REGISTER; - /** Core. C-State Configuration Control (R/W) Note: C-state values are processor specific C-state code names, unrelated to MWAIT extension C-state @@ -199,7 +197,7 @@ typedef union { @endcode @note MSR_GOLDMONT_PKG_CST_CONFIG_CONTROL is defined as MSR_PKG_CST_CONFIG_CONTROL in SDM. **/ -#define MSR_GOLDMONT_PKG_CST_CONFIG_CONTROL 0x000000E2 +#define MSR_GOLDMONT_PKG_CST_CONFIG_CONTROL 0x000000E2 /** MSR information returned for MSR index #MSR_GOLDMONT_PKG_CST_CONFIG_CONTROL @@ -217,34 +215,33 @@ typedef union { /// No limit 0001b: C1 0010b: C3 0011b: C6 0100b: C7 0101b: C7S 0110b: C8 /// 0111b: C9 1000b: C10. /// - UINT32 Limit:4; - UINT32 Reserved1:6; + UINT32 Limit : 4; + UINT32 Reserved1 : 6; /// /// [Bit 10] I/O MWAIT Redirection Enable (R/W) When set, will map /// IO_read instructions sent to IO register specified by /// MSR_PMG_IO_CAPTURE_BASE to MWAIT instructions. /// - UINT32 IO_MWAIT:1; - UINT32 Reserved2:4; + UINT32 IO_MWAIT : 1; + UINT32 Reserved2 : 4; /// /// [Bit 15] CFG Lock (R/WO) When set, lock bits 15:0 of this register /// until next reset. /// - UINT32 CFGLock:1; - UINT32 Reserved3:16; - UINT32 Reserved4:32; + UINT32 CFGLock : 1; + UINT32 Reserved3 : 16; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_PKG_CST_CONFIG_CONTROL_REGISTER; - /** Core. Enhanced SMM Capabilities (SMM-RO) Reports SMM capability Enhancement. Accessible only while in SMM. @@ -264,7 +261,7 @@ typedef union { @endcode @note MSR_GOLDMONT_SMM_MCA_CAP is defined as MSR_SMM_MCA_CAP in SDM. **/ -#define MSR_GOLDMONT_SMM_MCA_CAP 0x0000017D +#define MSR_GOLDMONT_SMM_MCA_CAP 0x0000017D /** MSR information returned for MSR index #MSR_GOLDMONT_SMM_MCA_CAP @@ -274,29 +271,28 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:32; - UINT32 Reserved2:26; + UINT32 Reserved1 : 32; + UINT32 Reserved2 : 26; /// /// [Bit 58] SMM_Code_Access_Chk (SMM-RO) If set to 1 indicates that the /// SMM code access restriction is supported and the /// MSR_SMM_FEATURE_CONTROL is supported. /// - UINT32 SMM_Code_Access_Chk:1; + UINT32 SMM_Code_Access_Chk : 1; /// /// [Bit 59] Long_Flow_Indication (SMM-RO) If set to 1 indicates that the /// SMM long flow indicator is supported and the MSR_SMM_DELAYED is /// supported. /// - UINT32 Long_Flow_Indication:1; - UINT32 Reserved3:4; + UINT32 Long_Flow_Indication : 1; + UINT32 Reserved3 : 4; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_SMM_MCA_CAP_REGISTER; - /** Enable Misc. Processor Features (R/W) Allows a variety of processor functions to be enabled and disabled. @@ -316,7 +312,7 @@ typedef union { @endcode @note MSR_GOLDMONT_IA32_MISC_ENABLE is defined as IA32_MISC_ENABLE in SDM. **/ -#define MSR_GOLDMONT_IA32_MISC_ENABLE 0x000001A0 +#define MSR_GOLDMONT_IA32_MISC_ENABLE 0x000001A0 /** MSR information returned for MSR index #MSR_GOLDMONT_IA32_MISC_ENABLE @@ -329,55 +325,55 @@ typedef union { /// /// [Bit 0] Core. Fast-Strings Enable See Table 2-2. /// - UINT32 FastStrings:1; - UINT32 Reserved1:2; + UINT32 FastStrings : 1; + UINT32 Reserved1 : 2; /// /// [Bit 3] Package. Automatic Thermal Control Circuit Enable (R/W) See /// Table 2-2. Default value is 1. /// - UINT32 AutomaticThermalControlCircuit:1; - UINT32 Reserved2:3; + UINT32 AutomaticThermalControlCircuit : 1; + UINT32 Reserved2 : 3; /// /// [Bit 7] Core. Performance Monitoring Available (R) See Table 2-2. /// - UINT32 PerformanceMonitoring:1; - UINT32 Reserved3:3; + UINT32 PerformanceMonitoring : 1; + UINT32 Reserved3 : 3; /// /// [Bit 11] Core. Branch Trace Storage Unavailable (RO) See Table 2-2. /// - UINT32 BTS:1; + UINT32 BTS : 1; /// /// [Bit 12] Core. Processor Event Based Sampling Unavailable (RO) See /// Table 2-2. /// - UINT32 PEBS:1; - UINT32 Reserved4:3; + UINT32 PEBS : 1; + UINT32 Reserved4 : 3; /// /// [Bit 16] Package. Enhanced Intel SpeedStep Technology Enable (R/W) See /// Table 2-2. /// - UINT32 EIST:1; - UINT32 Reserved5:1; + UINT32 EIST : 1; + UINT32 Reserved5 : 1; /// /// [Bit 18] Core. ENABLE MONITOR FSM (R/W) See Table 2-2. /// - UINT32 MONITOR:1; - UINT32 Reserved6:3; + UINT32 MONITOR : 1; + UINT32 Reserved6 : 3; /// /// [Bit 22] Core. Limit CPUID Maxval (R/W) See Table 2-2. /// - UINT32 LimitCpuidMaxval:1; + UINT32 LimitCpuidMaxval : 1; /// /// [Bit 23] Package. xTPR Message Disable (R/W) See Table 2-2. /// - UINT32 xTPR_Message_Disable:1; - UINT32 Reserved7:8; - UINT32 Reserved8:2; + UINT32 xTPR_Message_Disable : 1; + UINT32 Reserved7 : 8; + UINT32 Reserved8 : 2; /// /// [Bit 34] Core. XD Bit Disable (R/W) See Table 2-2. /// - UINT32 XD:1; - UINT32 Reserved9:3; + UINT32 XD : 1; + UINT32 Reserved9 : 3; /// /// [Bit 38] Package. Turbo Mode Disable (R/W) When set to 1 on processors /// that support Intel Turbo Boost Technology, the turbo mode feature is @@ -389,16 +385,15 @@ typedef union { /// in the processor. If power-on default value is 0, turbo mode is not /// available. /// - UINT32 TurboModeDisable:1; - UINT32 Reserved10:25; + UINT32 TurboModeDisable : 1; + UINT32 Reserved10 : 25; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_IA32_MISC_ENABLE_REGISTER; - /** Miscellaneous Feature Control (R/W). @@ -417,7 +412,7 @@ typedef union { @endcode @note MSR_GOLDMONT_MISC_FEATURE_CONTROL is defined as MSR_MISC_FEATURE_CONTROL in SDM. **/ -#define MSR_GOLDMONT_MISC_FEATURE_CONTROL 0x000001A4 +#define MSR_GOLDMONT_MISC_FEATURE_CONTROL 0x000001A4 /** MSR information returned for MSR index #MSR_GOLDMONT_MISC_FEATURE_CONTROL @@ -432,28 +427,27 @@ typedef union { /// L2 hardware prefetcher, which fetches additional lines of code or data /// into the L2 cache. /// - UINT32 L2HardwarePrefetcherDisable:1; - UINT32 Reserved1:1; + UINT32 L2HardwarePrefetcherDisable : 1; + UINT32 Reserved1 : 1; /// /// [Bit 2] Core. DCU Hardware Prefetcher Disable (R/W) If 1, disables /// the L1 data cache prefetcher, which fetches the next cache line into /// L1 data cache. /// - UINT32 DCUHardwarePrefetcherDisable:1; - UINT32 Reserved2:29; - UINT32 Reserved3:32; + UINT32 DCUHardwarePrefetcherDisable : 1; + UINT32 Reserved2 : 29; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_MISC_FEATURE_CONTROL_REGISTER; - /** Package. See http://biosbits.org. @@ -472,7 +466,7 @@ typedef union { @endcode @note MSR_GOLDMONT_MISC_PWR_MGMT is defined as MSR_MISC_PWR_MGMT in SDM. **/ -#define MSR_GOLDMONT_MISC_PWR_MGMT 0x000001AA +#define MSR_GOLDMONT_MISC_PWR_MGMT 0x000001AA /** MSR information returned for MSR index #MSR_GOLDMONT_MISC_PWR_MGMT @@ -488,27 +482,26 @@ typedef union { /// from processor cores; When 1, disables hardware coordination of /// Enhanced Intel Speedstep Technology requests. /// - UINT32 EISTHardwareCoordinationDisable:1; - UINT32 Reserved1:21; + UINT32 EISTHardwareCoordinationDisable : 1; + UINT32 Reserved1 : 21; /// /// [Bit 22] Thermal Interrupt Coordination Enable (R/W) If set, then /// thermal interrupt on one core is routed to all cores. /// - UINT32 ThermalInterruptCoordinationEnable:1; - UINT32 Reserved2:9; - UINT32 Reserved3:32; + UINT32 ThermalInterruptCoordinationEnable : 1; + UINT32 Reserved2 : 9; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_MISC_PWR_MGMT_REGISTER; - /** Package. Maximum Ratio Limit of Turbo Mode by Core Groups (RW) Specifies Maximum Ratio Limit for each Core Group. Max ratio for groups with more @@ -532,7 +525,7 @@ typedef union { @endcode @note MSR_GOLDMONT_TURBO_RATIO_LIMIT is defined as MSR_TURBO_RATIO_LIMIT in SDM. **/ -#define MSR_GOLDMONT_TURBO_RATIO_LIMIT 0x000001AD +#define MSR_GOLDMONT_TURBO_RATIO_LIMIT 0x000001AD /** MSR information returned for MSR index #MSR_GOLDMONT_TURBO_RATIO_LIMIT @@ -547,57 +540,56 @@ typedef union { /// Maximum turbo ratio limit when number of active cores is less or equal /// to Group 0 threshold. /// - UINT32 MaxRatioLimitGroup0:8; + UINT32 MaxRatioLimitGroup0 : 8; /// /// [Bits 15:8] Package. Maximum Ratio Limit for Active cores in Group 1 /// Maximum turbo ratio limit when number of active cores is less or equal /// to Group 1 threshold and greater than Group 0 threshold. /// - UINT32 MaxRatioLimitGroup1:8; + UINT32 MaxRatioLimitGroup1 : 8; /// /// [Bits 23:16] Package. Maximum Ratio Limit for Active cores in Group 2 /// Maximum turbo ratio limit when number of active cores is less or equal /// to Group 2 threshold and greater than Group 1 threshold. /// - UINT32 MaxRatioLimitGroup2:8; + UINT32 MaxRatioLimitGroup2 : 8; /// /// [Bits 31:24] Package. Maximum Ratio Limit for Active cores in Group 3 /// Maximum turbo ratio limit when number of active cores is less or equal /// to Group 3 threshold and greater than Group 2 threshold. /// - UINT32 MaxRatioLimitGroup3:8; + UINT32 MaxRatioLimitGroup3 : 8; /// /// [Bits 39:32] Package. Maximum Ratio Limit for Active cores in Group 4 /// Maximum turbo ratio limit when number of active cores is less or equal /// to Group 4 threshold and greater than Group 3 threshold. /// - UINT32 MaxRatioLimitGroup4:8; + UINT32 MaxRatioLimitGroup4 : 8; /// /// [Bits 47:40] Package. Maximum Ratio Limit for Active cores in Group 5 /// Maximum turbo ratio limit when number of active cores is less or equal /// to Group 5 threshold and greater than Group 4 threshold. /// - UINT32 MaxRatioLimitGroup5:8; + UINT32 MaxRatioLimitGroup5 : 8; /// /// [Bits 55:48] Package. Maximum Ratio Limit for Active cores in Group 6 /// Maximum turbo ratio limit when number of active cores is less or equal /// to Group 6 threshold and greater than Group 5 threshold. /// - UINT32 MaxRatioLimitGroup6:8; + UINT32 MaxRatioLimitGroup6 : 8; /// /// [Bits 63:56] Package. Maximum Ratio Limit for Active cores in Group 7 /// Maximum turbo ratio limit when number of active cores is less or equal /// to Group 7 threshold and greater than Group 6 threshold. /// - UINT32 MaxRatioLimitGroup7:8; + UINT32 MaxRatioLimitGroup7 : 8; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_TURBO_RATIO_LIMIT_REGISTER; - /** Package. Group Size of Active Cores for Turbo Mode Operation (RW) Writes of 0 threshold is ignored. @@ -617,7 +609,7 @@ typedef union { @endcode @note MSR_GOLDMONT_TURBO_GROUP_CORECNT is defined as MSR_TURBO_GROUP_CORECNT in SDM. **/ -#define MSR_GOLDMONT_TURBO_GROUP_CORECNT 0x000001AE +#define MSR_GOLDMONT_TURBO_GROUP_CORECNT 0x000001AE /** MSR information returned for MSR index #MSR_GOLDMONT_TURBO_GROUP_CORECNT @@ -631,58 +623,57 @@ typedef union { /// [Bits 7:0] Package. Group 0 Core Count Threshold Maximum number of /// active cores to operate under Group 0 Max Turbo Ratio limit. /// - UINT32 CoreCountThresholdGroup0:8; + UINT32 CoreCountThresholdGroup0 : 8; /// /// [Bits 15:8] Package. Group 1 Core Count Threshold Maximum number of /// active cores to operate under Group 1 Max Turbo Ratio limit. Must be /// greater than Group 0 Core Count. /// - UINT32 CoreCountThresholdGroup1:8; + UINT32 CoreCountThresholdGroup1 : 8; /// /// [Bits 23:16] Package. Group 2 Core Count Threshold Maximum number of /// active cores to operate under Group 2 Max Turbo Ratio limit. Must be /// greater than Group 1 Core Count. /// - UINT32 CoreCountThresholdGroup2:8; + UINT32 CoreCountThresholdGroup2 : 8; /// /// [Bits 31:24] Package. Group 3 Core Count Threshold Maximum number of /// active cores to operate under Group 3 Max Turbo Ratio limit. Must be /// greater than Group 2 Core Count. /// - UINT32 CoreCountThresholdGroup3:8; + UINT32 CoreCountThresholdGroup3 : 8; /// /// [Bits 39:32] Package. Group 4 Core Count Threshold Maximum number of /// active cores to operate under Group 4 Max Turbo Ratio limit. Must be /// greater than Group 3 Core Count. /// - UINT32 CoreCountThresholdGroup4:8; + UINT32 CoreCountThresholdGroup4 : 8; /// /// [Bits 47:40] Package. Group 5 Core Count Threshold Maximum number of /// active cores to operate under Group 5 Max Turbo Ratio limit. Must be /// greater than Group 4 Core Count. /// - UINT32 CoreCountThresholdGroup5:8; + UINT32 CoreCountThresholdGroup5 : 8; /// /// [Bits 55:48] Package. Group 6 Core Count Threshold Maximum number of /// active cores to operate under Group 6 Max Turbo Ratio limit. Must be /// greater than Group 5 Core Count. /// - UINT32 CoreCountThresholdGroup6:8; + UINT32 CoreCountThresholdGroup6 : 8; /// /// [Bits 63:56] Package. Group 7 Core Count Threshold Maximum number of /// active cores to operate under Group 7 Max Turbo Ratio limit. Must be /// greater than Group 6 Core Count and not less than the total number of /// processor cores in the package. E.g. specify 255. /// - UINT32 CoreCountThresholdGroup7:8; + UINT32 CoreCountThresholdGroup7 : 8; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_TURBO_GROUP_CORECNT_REGISTER; - /** Core. Last Branch Record Filtering Select Register (R/W) See Section 17.9.2, "Filtering of Last Branch Records.". @@ -702,7 +693,7 @@ typedef union { @endcode @note MSR_GOLDMONT_LBR_SELECT is defined as MSR_LBR_SELECT in SDM. **/ -#define MSR_GOLDMONT_LBR_SELECT 0x000001C8 +#define MSR_GOLDMONT_LBR_SELECT 0x000001C8 /** MSR information returned for MSR index #MSR_GOLDMONT_LBR_SELECT @@ -715,57 +706,56 @@ typedef union { /// /// [Bit 0] CPL_EQ_0. /// - UINT32 CPL_EQ_0:1; + UINT32 CPL_EQ_0 : 1; /// /// [Bit 1] CPL_NEQ_0. /// - UINT32 CPL_NEQ_0:1; + UINT32 CPL_NEQ_0 : 1; /// /// [Bit 2] JCC. /// - UINT32 JCC:1; + UINT32 JCC : 1; /// /// [Bit 3] NEAR_REL_CALL. /// - UINT32 NEAR_REL_CALL:1; + UINT32 NEAR_REL_CALL : 1; /// /// [Bit 4] NEAR_IND_CALL. /// - UINT32 NEAR_IND_CALL:1; + UINT32 NEAR_IND_CALL : 1; /// /// [Bit 5] NEAR_RET. /// - UINT32 NEAR_RET:1; + UINT32 NEAR_RET : 1; /// /// [Bit 6] NEAR_IND_JMP. /// - UINT32 NEAR_IND_JMP:1; + UINT32 NEAR_IND_JMP : 1; /// /// [Bit 7] NEAR_REL_JMP. /// - UINT32 NEAR_REL_JMP:1; + UINT32 NEAR_REL_JMP : 1; /// /// [Bit 8] FAR_BRANCH. /// - UINT32 FAR_BRANCH:1; + UINT32 FAR_BRANCH : 1; /// /// [Bit 9] EN_CALL_STACK. /// - UINT32 EN_CALL_STACK:1; - UINT32 Reserved1:22; - UINT32 Reserved2:32; + UINT32 EN_CALL_STACK : 1; + UINT32 Reserved1 : 22; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_LBR_SELECT_REGISTER; - /** Core. Last Branch Record Stack TOS (R/W) Contains an index (bits 0-4) that points to the MSR containing the most recent branch record. See @@ -784,8 +774,7 @@ typedef union { @endcode @note MSR_GOLDMONT_LASTBRANCH_TOS is defined as MSR_LASTBRANCH_TOS in SDM. **/ -#define MSR_GOLDMONT_LASTBRANCH_TOS 0x000001C9 - +#define MSR_GOLDMONT_LASTBRANCH_TOS 0x000001C9 /** Core. Power Control Register. See http://biosbits.org. @@ -805,7 +794,7 @@ typedef union { @endcode @note MSR_GOLDMONT_POWER_CTL is defined as MSR_POWER_CTL in SDM. **/ -#define MSR_GOLDMONT_POWER_CTL 0x000001FC +#define MSR_GOLDMONT_POWER_CTL 0x000001FC /** MSR information returned for MSR index #MSR_GOLDMONT_POWER_CTL @@ -815,27 +804,26 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:1; + UINT32 Reserved1 : 1; /// /// [Bit 1] Package. C1E Enable (R/W) When set to '1', will enable the /// CPU to switch to the Minimum Enhanced Intel SpeedStep Technology /// operating point when all execution cores enter MWAIT (C1). /// - UINT32 C1EEnable:1; - UINT32 Reserved2:30; - UINT32 Reserved3:32; + UINT32 C1EEnable : 1; + UINT32 Reserved2 : 30; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_POWER_CTL_REGISTER; - /** Package. Lower 64 Bit CR_SGXOWNEREPOCH (W) Writes do not update CR_SGXOWNEREPOCH if CPUID.(EAX=12H, ECX=0):EAX.SGX1 is 1 on any thread in @@ -854,14 +842,12 @@ typedef union { @endcode @note MSR_GOLDMONT_SGXOWNEREPOCH0 is defined as MSR_SGXOWNEREPOCH0 in SDM. **/ -#define MSR_GOLDMONT_SGXOWNEREPOCH0 0x00000300 - +#define MSR_GOLDMONT_SGXOWNEREPOCH0 0x00000300 // // Define MSR_GOLDMONT_SGXOWNER0 for compatibility due to name change in the SDM. // -#define MSR_GOLDMONT_SGXOWNER0 MSR_GOLDMONT_SGXOWNEREPOCH0 - +#define MSR_GOLDMONT_SGXOWNER0 MSR_GOLDMONT_SGXOWNEREPOCH0 /** Package. Upper 64 Bit OwnerEpoch Component of SGX Key (RO). Upper 64 bits of @@ -879,14 +865,12 @@ typedef union { @endcode @note MSR_GOLDMONT_SGXOWNEREPOCH1 is defined as MSR_SGXOWNEREPOCH1 in SDM. **/ -#define MSR_GOLDMONT_SGXOWNEREPOCH1 0x00000301 - +#define MSR_GOLDMONT_SGXOWNEREPOCH1 0x00000301 // // Define MSR_GOLDMONT_SGXOWNER1 for compatibility due to name change in the SDM. // -#define MSR_GOLDMONT_SGXOWNER1 MSR_GOLDMONT_SGXOWNEREPOCH1 - +#define MSR_GOLDMONT_SGXOWNER1 MSR_GOLDMONT_SGXOWNEREPOCH1 /** Core. See Table 2-2. See Section 18.2.4, "Architectural Performance @@ -907,7 +891,7 @@ typedef union { @endcode @note MSR_GOLDMONT_IA32_PERF_GLOBAL_STATUS_RESET is defined as IA32_PERF_GLOBAL_STATUS_RESET in SDM. **/ -#define MSR_GOLDMONT_IA32_PERF_GLOBAL_STATUS_RESET 0x00000390 +#define MSR_GOLDMONT_IA32_PERF_GLOBAL_STATUS_RESET 0x00000390 /** MSR information returned for MSR index @@ -921,70 +905,69 @@ typedef union { /// /// [Bit 0] Set 1 to clear Ovf_PMC0. /// - UINT32 Ovf_PMC0:1; + UINT32 Ovf_PMC0 : 1; /// /// [Bit 1] Set 1 to clear Ovf_PMC1. /// - UINT32 Ovf_PMC1:1; + UINT32 Ovf_PMC1 : 1; /// /// [Bit 2] Set 1 to clear Ovf_PMC2. /// - UINT32 Ovf_PMC2:1; + UINT32 Ovf_PMC2 : 1; /// /// [Bit 3] Set 1 to clear Ovf_PMC3. /// - UINT32 Ovf_PMC3:1; - UINT32 Reserved1:28; + UINT32 Ovf_PMC3 : 1; + UINT32 Reserved1 : 28; /// /// [Bit 32] Set 1 to clear Ovf_FixedCtr0. /// - UINT32 Ovf_FixedCtr0:1; + UINT32 Ovf_FixedCtr0 : 1; /// /// [Bit 33] Set 1 to clear Ovf_FixedCtr1. /// - UINT32 Ovf_FixedCtr1:1; + UINT32 Ovf_FixedCtr1 : 1; /// /// [Bit 34] Set 1 to clear Ovf_FixedCtr2. /// - UINT32 Ovf_FixedCtr2:1; - UINT32 Reserved2:20; + UINT32 Ovf_FixedCtr2 : 1; + UINT32 Reserved2 : 20; /// /// [Bit 55] Set 1 to clear Trace_ToPA_PMI. /// - UINT32 Trace_ToPA_PMI:1; - UINT32 Reserved3:2; + UINT32 Trace_ToPA_PMI : 1; + UINT32 Reserved3 : 2; /// /// [Bit 58] Set 1 to clear LBR_Frz. /// - UINT32 LBR_Frz:1; + UINT32 LBR_Frz : 1; /// /// [Bit 59] Set 1 to clear CTR_Frz. /// - UINT32 CTR_Frz:1; + UINT32 CTR_Frz : 1; /// /// [Bit 60] Set 1 to clear ASCI. /// - UINT32 ASCI:1; + UINT32 ASCI : 1; /// /// [Bit 61] Set 1 to clear Ovf_Uncore. /// - UINT32 Ovf_Uncore:1; + UINT32 Ovf_Uncore : 1; /// /// [Bit 62] Set 1 to clear Ovf_BufDSSAVE. /// - UINT32 Ovf_BufDSSAVE:1; + UINT32 Ovf_BufDSSAVE : 1; /// /// [Bit 63] Set 1 to clear CondChgd. /// - UINT32 CondChgd:1; + UINT32 CondChgd : 1; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_IA32_PERF_GLOBAL_STATUS_RESET_REGISTER; - /** Core. See Table 2-2. See Section 18.2.4, "Architectural Performance Monitoring Version 4.". @@ -1004,7 +987,7 @@ typedef union { @endcode @note MSR_GOLDMONT_IA32_PERF_GLOBAL_STATUS_SET is defined as IA32_PERF_GLOBAL_STATUS_SET in SDM. **/ -#define MSR_GOLDMONT_IA32_PERF_GLOBAL_STATUS_SET 0x00000391 +#define MSR_GOLDMONT_IA32_PERF_GLOBAL_STATUS_SET 0x00000391 /** MSR information returned for MSR index @@ -1018,67 +1001,66 @@ typedef union { /// /// [Bit 0] Set 1 to cause Ovf_PMC0 = 1. /// - UINT32 Ovf_PMC0:1; + UINT32 Ovf_PMC0 : 1; /// /// [Bit 1] Set 1 to cause Ovf_PMC1 = 1. /// - UINT32 Ovf_PMC1:1; + UINT32 Ovf_PMC1 : 1; /// /// [Bit 2] Set 1 to cause Ovf_PMC2 = 1. /// - UINT32 Ovf_PMC2:1; + UINT32 Ovf_PMC2 : 1; /// /// [Bit 3] Set 1 to cause Ovf_PMC3 = 1. /// - UINT32 Ovf_PMC3:1; - UINT32 Reserved1:28; + UINT32 Ovf_PMC3 : 1; + UINT32 Reserved1 : 28; /// /// [Bit 32] Set 1 to cause Ovf_FixedCtr0 = 1. /// - UINT32 Ovf_FixedCtr0:1; + UINT32 Ovf_FixedCtr0 : 1; /// /// [Bit 33] Set 1 to cause Ovf_FixedCtr1 = 1. /// - UINT32 Ovf_FixedCtr1:1; + UINT32 Ovf_FixedCtr1 : 1; /// /// [Bit 34] Set 1 to cause Ovf_FixedCtr2 = 1. /// - UINT32 Ovf_FixedCtr2:1; - UINT32 Reserved2:20; + UINT32 Ovf_FixedCtr2 : 1; + UINT32 Reserved2 : 20; /// /// [Bit 55] Set 1 to cause Trace_ToPA_PMI = 1. /// - UINT32 Trace_ToPA_PMI:1; - UINT32 Reserved3:2; + UINT32 Trace_ToPA_PMI : 1; + UINT32 Reserved3 : 2; /// /// [Bit 58] Set 1 to cause LBR_Frz = 1. /// - UINT32 LBR_Frz:1; + UINT32 LBR_Frz : 1; /// /// [Bit 59] Set 1 to cause CTR_Frz = 1. /// - UINT32 CTR_Frz:1; + UINT32 CTR_Frz : 1; /// /// [Bit 60] Set 1 to cause ASCI = 1. /// - UINT32 ASCI:1; + UINT32 ASCI : 1; /// /// [Bit 61] Set 1 to cause Ovf_Uncore. /// - UINT32 Ovf_Uncore:1; + UINT32 Ovf_Uncore : 1; /// /// [Bit 62] Set 1 to cause Ovf_BufDSSAVE. /// - UINT32 Ovf_BufDSSAVE:1; - UINT32 Reserved4:1; + UINT32 Ovf_BufDSSAVE : 1; + UINT32 Reserved4 : 1; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_IA32_PERF_GLOBAL_STATUS_SET_REGISTER; - /** Core. See Table 2-2. See Section 18.6.2.4, "Processor Event Based Sampling (PEBS).". @@ -1098,7 +1080,7 @@ typedef union { @endcode @note MSR_GOLDMONT_PEBS_ENABLE is defined as MSR_PEBS_ENABLE in SDM. **/ -#define MSR_GOLDMONT_PEBS_ENABLE 0x000003F1 +#define MSR_GOLDMONT_PEBS_ENABLE 0x000003F1 /** MSR information returned for MSR index #MSR_GOLDMONT_PEBS_ENABLE @@ -1112,21 +1094,20 @@ typedef union { /// [Bit 0] Enable PEBS trigger and recording for the programmed event /// (precise or otherwise) on IA32_PMC0. (R/W). /// - UINT32 Enable:1; - UINT32 Reserved1:31; - UINT32 Reserved2:32; + UINT32 Enable : 1; + UINT32 Reserved1 : 31; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_PEBS_ENABLE_REGISTER; - /** Package. Note: C-state values are processor specific C-state code names, unrelated to MWAIT extension C-state parameters or ACPI CStates. Package C3 @@ -1146,8 +1127,7 @@ typedef union { @endcode @note MSR_GOLDMONT_PKG_C3_RESIDENCY is defined as MSR_PKG_C3_RESIDENCY in SDM. **/ -#define MSR_GOLDMONT_PKG_C3_RESIDENCY 0x000003F8 - +#define MSR_GOLDMONT_PKG_C3_RESIDENCY 0x000003F8 /** Package. Note: C-state values are processor specific C-state code names, @@ -1168,8 +1148,7 @@ typedef union { @endcode @note MSR_GOLDMONT_PKG_C6_RESIDENCY is defined as MSR_PKG_C6_RESIDENCY in SDM. **/ -#define MSR_GOLDMONT_PKG_C6_RESIDENCY 0x000003F9 - +#define MSR_GOLDMONT_PKG_C6_RESIDENCY 0x000003F9 /** Core. Note: C-state values are processor specific C-state code names, @@ -1190,8 +1169,7 @@ typedef union { @endcode @note MSR_GOLDMONT_CORE_C3_RESIDENCY is defined as MSR_CORE_C3_RESIDENCY in SDM. **/ -#define MSR_GOLDMONT_CORE_C3_RESIDENCY 0x000003FC - +#define MSR_GOLDMONT_CORE_C3_RESIDENCY 0x000003FC /** Package. Enhanced SMM Feature Control (SMM-RW) Reports SMM capability @@ -1212,7 +1190,7 @@ typedef union { @endcode @note MSR_GOLDMONT_SMM_FEATURE_CONTROL is defined as MSR_SMM_FEATURE_CONTROL in SDM. **/ -#define MSR_GOLDMONT_SMM_FEATURE_CONTROL 0x000004E0 +#define MSR_GOLDMONT_SMM_FEATURE_CONTROL 0x000004E0 /** MSR information returned for MSR index #MSR_GOLDMONT_SMM_FEATURE_CONTROL @@ -1226,8 +1204,8 @@ typedef union { /// [Bit 0] Lock (SMM-RWO) When set to '1' locks this register from /// further changes. /// - UINT32 Lock:1; - UINT32 Reserved1:1; + UINT32 Lock : 1; + UINT32 Reserved1 : 1; /// /// [Bit 2] SMM_Code_Chk_En (SMM-RW) This control bit is available only if /// MSR_SMM_MCA_CAP[58] == 1. When set to '0' (default) none of the @@ -1236,21 +1214,20 @@ typedef union { /// the package that attempts to execute SMM code not within the ranges /// defined by the SMRR will assert an unrecoverable MCE. /// - UINT32 SMM_Code_Chk_En:1; - UINT32 Reserved2:29; - UINT32 Reserved3:32; + UINT32 SMM_Code_Chk_En : 1; + UINT32 Reserved2 : 29; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_SMM_FEATURE_CONTROL_REGISTER; - /** Package. SMM Delayed (SMM-RO) Reports the interruptible state of all logical processors in the package. Available only while in SMM and @@ -1271,8 +1248,7 @@ typedef union { @endcode @note MSR_GOLDMONT_SMM_DELAYED is defined as MSR_SMM_DELAYED in SDM. **/ -#define MSR_GOLDMONT_SMM_DELAYED 0x000004E2 - +#define MSR_GOLDMONT_SMM_DELAYED 0x000004E2 /** Package. SMM Blocked (SMM-RO) Reports the blocked state of all logical @@ -1293,8 +1269,7 @@ typedef union { @endcode @note MSR_GOLDMONT_SMM_BLOCKED is defined as MSR_SMM_BLOCKED in SDM. **/ -#define MSR_GOLDMONT_SMM_BLOCKED 0x000004E3 - +#define MSR_GOLDMONT_SMM_BLOCKED 0x000004E3 /** Core. Trace Control Register (R/W). @@ -1314,7 +1289,7 @@ typedef union { @endcode @note MSR_GOLDMONT_IA32_RTIT_CTL is defined as IA32_RTIT_CTL in SDM. **/ -#define MSR_IA32_RTIT_CTL 0x00000570 +#define MSR_IA32_RTIT_CTL 0x00000570 /** MSR information returned for MSR index #MSR_IA32_RTIT_CTL @@ -1327,77 +1302,76 @@ typedef union { /// /// [Bit 0] TraceEn. /// - UINT32 TraceEn:1; + UINT32 TraceEn : 1; /// /// [Bit 1] CYCEn. /// - UINT32 CYCEn:1; + UINT32 CYCEn : 1; /// /// [Bit 2] OS. /// - UINT32 OS:1; + UINT32 OS : 1; /// /// [Bit 3] User. /// - UINT32 User:1; - UINT32 Reserved1:3; + UINT32 User : 1; + UINT32 Reserved1 : 3; /// /// [Bit 7] CR3 filter. /// - UINT32 CR3:1; + UINT32 CR3 : 1; /// /// [Bit 8] ToPA. Writing 0 will #GP if also setting TraceEn. /// - UINT32 ToPA:1; + UINT32 ToPA : 1; /// /// [Bit 9] MTCEn. /// - UINT32 MTCEn:1; + UINT32 MTCEn : 1; /// /// [Bit 10] TSCEn. /// - UINT32 TSCEn:1; + UINT32 TSCEn : 1; /// /// [Bit 11] DisRETC. /// - UINT32 DisRETC:1; - UINT32 Reserved2:1; + UINT32 DisRETC : 1; + UINT32 Reserved2 : 1; /// /// [Bit 13] BranchEn. /// - UINT32 BranchEn:1; + UINT32 BranchEn : 1; /// /// [Bits 17:14] MTCFreq. /// - UINT32 MTCFreq:4; - UINT32 Reserved3:1; + UINT32 MTCFreq : 4; + UINT32 Reserved3 : 1; /// /// [Bits 22:19] CYCThresh. /// - UINT32 CYCThresh:4; - UINT32 Reserved4:1; + UINT32 CYCThresh : 4; + UINT32 Reserved4 : 1; /// /// [Bits 27:24] PSBFreq. /// - UINT32 PSBFreq:4; - UINT32 Reserved5:4; + UINT32 PSBFreq : 4; + UINT32 Reserved5 : 4; /// /// [Bits 35:32] ADDR0_CFG. /// - UINT32 ADDR0_CFG:4; + UINT32 ADDR0_CFG : 4; /// /// [Bits 39:36] ADDR1_CFG. /// - UINT32 ADDR1_CFG:4; - UINT32 Reserved6:24; + UINT32 ADDR1_CFG : 4; + UINT32 Reserved6 : 24; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_IA32_RTIT_CTL_REGISTER; - /** Package. Unit Multipliers used in RAPL Interfaces (R/O) See Section 14.9.1, "RAPL Interfaces.". @@ -1416,7 +1390,7 @@ typedef union { @endcode @note MSR_GOLDMONT_RAPL_POWER_UNIT is defined as MSR_RAPL_POWER_UNIT in SDM. **/ -#define MSR_GOLDMONT_RAPL_POWER_UNIT 0x00000606 +#define MSR_GOLDMONT_RAPL_POWER_UNIT 0x00000606 /** MSR information returned for MSR index #MSR_GOLDMONT_RAPL_POWER_UNIT @@ -1432,37 +1406,36 @@ typedef union { /// 3:0. Default value is 1000b, indicating power unit is in 3.9 /// milliWatts increment. /// - UINT32 PowerUnits:4; - UINT32 Reserved1:4; + UINT32 PowerUnits : 4; + UINT32 Reserved1 : 4; /// /// [Bits 12:8] Energy Status Units. Energy related information (in /// Joules) is in unit of, 1Joule/ (2^ESU); where ESU is an unsigned /// integer represented by bits 12:8. Default value is 01110b, indicating /// energy unit is in 61 microJoules. /// - UINT32 EnergyStatusUnits:5; - UINT32 Reserved2:3; + UINT32 EnergyStatusUnits : 5; + UINT32 Reserved2 : 3; /// /// [Bits 19:16] Time Unit. Time related information (in seconds) is in /// unit of, 1S/2^TU; where TU is an unsigned integer represented by bits /// 19:16. Default value is 1010b, indicating power unit is in 0.977 /// millisecond. /// - UINT32 TimeUnit:4; - UINT32 Reserved3:12; - UINT32 Reserved4:32; + UINT32 TimeUnit : 4; + UINT32 Reserved3 : 12; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_RAPL_POWER_UNIT_REGISTER; - /** Package. Package C3 Interrupt Response Limit (R/W) Note: C-state values are processor specific C-state code names, unrelated to MWAIT extension C-state @@ -1483,7 +1456,7 @@ typedef union { @endcode @note MSR_GOLDMONT_PKGC3_IRTL is defined as MSR_PKGC3_IRTL in SDM. **/ -#define MSR_GOLDMONT_PKGC3_IRTL 0x0000060A +#define MSR_GOLDMONT_PKGC3_IRTL 0x0000060A /** MSR information returned for MSR index #MSR_GOLDMONT_PKGC3_IRTL @@ -1498,33 +1471,32 @@ typedef union { /// that should be used to decide if the package should be put into a /// package C3 state. /// - UINT32 InterruptResponseTimeLimit:10; + UINT32 InterruptResponseTimeLimit : 10; /// /// [Bits 12:10] Time Unit (R/W) Specifies the encoding value of time unit /// of the interrupt response time limit. See Table 2-19 for supported /// time unit encodings. /// - UINT32 TimeUnit:3; - UINT32 Reserved1:2; + UINT32 TimeUnit : 3; + UINT32 Reserved1 : 2; /// /// [Bit 15] Valid (R/W) Indicates whether the values in bits 12:0 are /// valid and can be used by the processor for package C-sate management. /// - UINT32 Valid:1; - UINT32 Reserved2:16; - UINT32 Reserved3:32; + UINT32 Valid : 1; + UINT32 Reserved2 : 16; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_PKGC3_IRTL_REGISTER; - /** Package. Package C6/C7S Interrupt Response Limit 1 (R/W) This MSR defines the interrupt response time limit used by the processor to manage transition @@ -1547,7 +1519,7 @@ typedef union { @endcode @note MSR_GOLDMONT_PKGC_IRTL1 is defined as MSR_PKGC_IRTL1 in SDM. **/ -#define MSR_GOLDMONT_PKGC_IRTL1 0x0000060B +#define MSR_GOLDMONT_PKGC_IRTL1 0x0000060B /** MSR information returned for MSR index #MSR_GOLDMONT_PKGC_IRTL1 @@ -1562,33 +1534,32 @@ typedef union { /// that should be used to decide if the package should be put into a /// package C6 or C7S state. /// - UINT32 InterruptResponseTimeLimit:10; + UINT32 InterruptResponseTimeLimit : 10; /// /// [Bits 12:10] Time Unit (R/W) Specifies the encoding value of time unit /// of the interrupt response time limit. See Table 2-19 for supported /// time unit encodings. /// - UINT32 TimeUnit:3; - UINT32 Reserved1:2; + UINT32 TimeUnit : 3; + UINT32 Reserved1 : 2; /// /// [Bit 15] Valid (R/W) Indicates whether the values in bits 12:0 are /// valid and can be used by the processor for package C-sate management. /// - UINT32 Valid:1; - UINT32 Reserved2:16; - UINT32 Reserved3:32; + UINT32 Valid : 1; + UINT32 Reserved2 : 16; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_PKGC_IRTL1_REGISTER; - /** Package. Package C7 Interrupt Response Limit 2 (R/W) This MSR defines the interrupt response time limit used by the processor to manage transition to @@ -1610,7 +1581,7 @@ typedef union { @endcode @note MSR_GOLDMONT_PKGC_IRTL2 is defined as MSR_PKGC_IRTL2 in SDM. **/ -#define MSR_GOLDMONT_PKGC_IRTL2 0x0000060C +#define MSR_GOLDMONT_PKGC_IRTL2 0x0000060C /** MSR information returned for MSR index #MSR_GOLDMONT_PKGC_IRTL2 @@ -1625,33 +1596,32 @@ typedef union { /// that should be used to decide if the package should be put into a /// package C7 state. /// - UINT32 InterruptResponseTimeLimit:10; + UINT32 InterruptResponseTimeLimit : 10; /// /// [Bits 12:10] Time Unit (R/W) Specifies the encoding value of time unit /// of the interrupt response time limit. See Table 2-19 for supported /// time unit encodings. /// - UINT32 TimeUnit:3; - UINT32 Reserved1:2; + UINT32 TimeUnit : 3; + UINT32 Reserved1 : 2; /// /// [Bit 15] Valid (R/W) Indicates whether the values in bits 12:0 are /// valid and can be used by the processor for package C-sate management. /// - UINT32 Valid:1; - UINT32 Reserved2:16; - UINT32 Reserved3:32; + UINT32 Valid : 1; + UINT32 Reserved2 : 16; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_PKGC_IRTL2_REGISTER; - /** Package. Note: C-state values are processor specific C-state code names, unrelated to MWAIT extension C-state parameters or ACPI CStates. Package C2 @@ -1671,8 +1641,7 @@ typedef union { @endcode @note MSR_GOLDMONT_PKG_C2_RESIDENCY is defined as MSR_PKG_C2_RESIDENCY in SDM. **/ -#define MSR_GOLDMONT_PKG_C2_RESIDENCY 0x0000060D - +#define MSR_GOLDMONT_PKG_C2_RESIDENCY 0x0000060D /** Package. PKG RAPL Power Limit Control (R/W) See Section 14.9.3, "Package @@ -1691,8 +1660,7 @@ typedef union { @endcode @note MSR_GOLDMONT_PKG_POWER_LIMIT is defined as MSR_PKG_POWER_LIMIT in SDM. **/ -#define MSR_GOLDMONT_PKG_POWER_LIMIT 0x00000610 - +#define MSR_GOLDMONT_PKG_POWER_LIMIT 0x00000610 /** Package. PKG Energy Status (R/O) See Section 14.9.3, "Package RAPL Domain.". @@ -1709,8 +1677,7 @@ typedef union { @endcode @note MSR_GOLDMONT_PKG_ENERGY_STATUS is defined as MSR_PKG_ENERGY_STATUS in SDM. **/ -#define MSR_GOLDMONT_PKG_ENERGY_STATUS 0x00000611 - +#define MSR_GOLDMONT_PKG_ENERGY_STATUS 0x00000611 /** Package. PKG Perf Status (R/O) See Section 14.9.3, "Package RAPL Domain.". @@ -1727,8 +1694,7 @@ typedef union { @endcode @note MSR_GOLDMONT_PKG_PERF_STATUS is defined as MSR_PKG_PERF_STATUS in SDM. **/ -#define MSR_GOLDMONT_PKG_PERF_STATUS 0x00000613 - +#define MSR_GOLDMONT_PKG_PERF_STATUS 0x00000613 /** Package. PKG RAPL Parameters (R/W). @@ -1748,7 +1714,7 @@ typedef union { @endcode @note MSR_GOLDMONT_PKG_POWER_INFO is defined as MSR_PKG_POWER_INFO in SDM. **/ -#define MSR_GOLDMONT_PKG_POWER_INFO 0x00000614 +#define MSR_GOLDMONT_PKG_POWER_INFO 0x00000614 /** MSR information returned for MSR index #MSR_GOLDMONT_PKG_POWER_INFO @@ -1762,20 +1728,20 @@ typedef union { /// [Bits 14:0] Thermal Spec Power (R/W) See Section 14.9.3, "Package /// RAPL Domain.". /// - UINT32 ThermalSpecPower:15; - UINT32 Reserved1:1; + UINT32 ThermalSpecPower : 15; + UINT32 Reserved1 : 1; /// /// [Bits 30:16] Minimum Power (R/W) See Section 14.9.3, "Package RAPL /// Domain.". /// - UINT32 MinimumPower:15; - UINT32 Reserved2:1; + UINT32 MinimumPower : 15; + UINT32 Reserved2 : 1; /// /// [Bits 46:32] Maximum Power (R/W) See Section 14.9.3, "Package RAPL /// Domain.". /// - UINT32 MaximumPower:15; - UINT32 Reserved3:1; + UINT32 MaximumPower : 15; + UINT32 Reserved3 : 1; /// /// [Bits 54:48] Maximum Time Window (R/W) Specified by 2^Y * (1.0 + /// Z/4.0) * Time_Unit, where "Y" is the unsigned integer value @@ -1783,16 +1749,15 @@ typedef union { /// bits 54:53. "Time_Unit" is specified by the "Time Units" field of /// MSR_RAPL_POWER_UNIT. /// - UINT32 MaximumTimeWindow:7; - UINT32 Reserved4:9; + UINT32 MaximumTimeWindow : 7; + UINT32 Reserved4 : 9; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_PKG_POWER_INFO_REGISTER; - /** Package. DRAM RAPL Power Limit Control (R/W) See Section 14.9.5, "DRAM RAPL Domain.". @@ -1810,8 +1775,7 @@ typedef union { @endcode @note MSR_GOLDMONT_DRAM_POWER_LIMIT is defined as MSR_DRAM_POWER_LIMIT in SDM. **/ -#define MSR_GOLDMONT_DRAM_POWER_LIMIT 0x00000618 - +#define MSR_GOLDMONT_DRAM_POWER_LIMIT 0x00000618 /** Package. DRAM Energy Status (R/O) See Section 14.9.5, "DRAM RAPL Domain.". @@ -1828,8 +1792,7 @@ typedef union { @endcode @note MSR_GOLDMONT_DRAM_ENERGY_STATUS is defined as MSR_DRAM_ENERGY_STATUS in SDM. **/ -#define MSR_GOLDMONT_DRAM_ENERGY_STATUS 0x00000619 - +#define MSR_GOLDMONT_DRAM_ENERGY_STATUS 0x00000619 /** Package. DRAM Performance Throttling Status (R/O) See Section 14.9.5, "DRAM @@ -1847,8 +1810,7 @@ typedef union { @endcode @note MSR_GOLDMONT_DRAM_PERF_STATUS is defined as MSR_DRAM_PERF_STATUS in SDM. **/ -#define MSR_GOLDMONT_DRAM_PERF_STATUS 0x0000061B - +#define MSR_GOLDMONT_DRAM_PERF_STATUS 0x0000061B /** Package. DRAM RAPL Parameters (R/W) See Section 14.9.5, "DRAM RAPL Domain.". @@ -1866,8 +1828,7 @@ typedef union { @endcode @note MSR_GOLDMONT_DRAM_POWER_INFO is defined as MSR_DRAM_POWER_INFO in SDM. **/ -#define MSR_GOLDMONT_DRAM_POWER_INFO 0x0000061C - +#define MSR_GOLDMONT_DRAM_POWER_INFO 0x0000061C /** Package. Note: C-state values are processor specific C-state code names,. @@ -1887,8 +1848,7 @@ typedef union { @endcode @note MSR_GOLDMONT_PKG_C10_RESIDENCY is defined as MSR_PKG_C10_RESIDENCY in SDM. **/ -#define MSR_GOLDMONT_PKG_C10_RESIDENCY 0x00000632 - +#define MSR_GOLDMONT_PKG_C10_RESIDENCY 0x00000632 /** Package. PP0 Energy Status (R/O) See Section 14.9.4, "PP0/PP1 RAPL @@ -1906,8 +1866,7 @@ typedef union { @endcode @note MSR_GOLDMONT_PP0_ENERGY_STATUS is defined as MSR_PP0_ENERGY_STATUS in SDM. **/ -#define MSR_GOLDMONT_PP0_ENERGY_STATUS 0x00000639 - +#define MSR_GOLDMONT_PP0_ENERGY_STATUS 0x00000639 /** Package. PP1 Energy Status (R/O) See Section 14.9.4, "PP0/PP1 RAPL @@ -1925,8 +1884,7 @@ typedef union { @endcode @note MSR_GOLDMONT_PP1_ENERGY_STATUS is defined as MSR_PP1_ENERGY_STATUS in SDM. **/ -#define MSR_GOLDMONT_PP1_ENERGY_STATUS 0x00000641 - +#define MSR_GOLDMONT_PP1_ENERGY_STATUS 0x00000641 /** Package. ConfigTDP Control (R/W). @@ -1946,7 +1904,7 @@ typedef union { @endcode @note MSR_GOLDMONT_TURBO_ACTIVATION_RATIO is defined as MSR_TURBO_ACTIVATION_RATIO in SDM. **/ -#define MSR_GOLDMONT_TURBO_ACTIVATION_RATIO 0x0000064C +#define MSR_GOLDMONT_TURBO_ACTIVATION_RATIO 0x0000064C /** MSR information returned for MSR index #MSR_GOLDMONT_TURBO_ACTIVATION_RATIO @@ -1960,26 +1918,25 @@ typedef union { /// [Bits 7:0] MAX_NON_TURBO_RATIO (RW/L) System BIOS can program this /// field. /// - UINT32 MAX_NON_TURBO_RATIO:8; - UINT32 Reserved1:23; + UINT32 MAX_NON_TURBO_RATIO : 8; + UINT32 Reserved1 : 23; /// /// [Bit 31] TURBO_ACTIVATION_RATIO_Lock (RW/L) When this bit is set, the /// content of this register is locked until a reset. /// - UINT32 TURBO_ACTIVATION_RATIO_Lock:1; - UINT32 Reserved2:32; + UINT32 TURBO_ACTIVATION_RATIO_Lock : 1; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_TURBO_ACTIVATION_RATIO_REGISTER; - /** Package. Indicator of Frequency Clipping in Processor Cores (R/W) (frequency refers to processor core frequency). @@ -1999,7 +1956,7 @@ typedef union { @endcode @note MSR_GOLDMONT_CORE_PERF_LIMIT_REASONS is defined as MSR_CORE_PERF_LIMIT_REASONS in SDM. **/ -#define MSR_GOLDMONT_CORE_PERF_LIMIT_REASONS 0x0000064F +#define MSR_GOLDMONT_CORE_PERF_LIMIT_REASONS 0x0000064F /** MSR information returned for MSR index #MSR_GOLDMONT_CORE_PERF_LIMIT_REASONS @@ -2014,140 +1971,139 @@ typedef union { /// reduced below the operating system request due to assertion of /// external PROCHOT. /// - UINT32 PROCHOTStatus:1; + UINT32 PROCHOTStatus : 1; /// /// [Bit 1] Thermal Status (R0) When set, frequency is reduced below the /// operating system request due to a thermal event. /// - UINT32 ThermalStatus:1; + UINT32 ThermalStatus : 1; /// /// [Bit 2] Package-Level Power Limiting PL1 Status (R0) When set, /// frequency is reduced below the operating system request due to /// package-level power limiting PL1. /// - UINT32 PL1Status:1; + UINT32 PL1Status : 1; /// /// [Bit 3] Package-Level PL2 Power Limiting Status (R0) When set, /// frequency is reduced below the operating system request due to /// package-level power limiting PL2. /// - UINT32 PL2Status:1; - UINT32 Reserved1:5; + UINT32 PL2Status : 1; + UINT32 Reserved1 : 5; /// /// [Bit 9] Core Power Limiting Status (R0) When set, frequency is reduced /// below the operating system request due to domain-level power limiting. /// - UINT32 PowerLimitingStatus:1; + UINT32 PowerLimitingStatus : 1; /// /// [Bit 10] VR Therm Alert Status (R0) When set, frequency is reduced /// below the operating system request due to a thermal alert from the /// Voltage Regulator. /// - UINT32 VRThermAlertStatus:1; + UINT32 VRThermAlertStatus : 1; /// /// [Bit 11] Max Turbo Limit Status (R0) When set, frequency is reduced /// below the operating system request due to multi-core turbo limits. /// - UINT32 MaxTurboLimitStatus:1; + UINT32 MaxTurboLimitStatus : 1; /// /// [Bit 12] Electrical Design Point Status (R0) When set, frequency is /// reduced below the operating system request due to electrical design /// point constraints (e.g. maximum electrical current consumption). /// - UINT32 ElectricalDesignPointStatus:1; + UINT32 ElectricalDesignPointStatus : 1; /// /// [Bit 13] Turbo Transition Attenuation Status (R0) When set, frequency /// is reduced below the operating system request due to Turbo transition /// attenuation. This prevents performance degradation due to frequent /// operating ratio changes. /// - UINT32 TurboTransitionAttenuationStatus:1; + UINT32 TurboTransitionAttenuationStatus : 1; /// /// [Bit 14] Maximum Efficiency Frequency Status (R0) When set, frequency /// is reduced below the maximum efficiency frequency. /// - UINT32 MaximumEfficiencyFrequencyStatus:1; - UINT32 Reserved2:1; + UINT32 MaximumEfficiencyFrequencyStatus : 1; + UINT32 Reserved2 : 1; /// /// [Bit 16] PROCHOT Log When set, indicates that the PROCHOT Status bit /// has asserted since the log bit was last cleared. This log bit will /// remain set until cleared by software writing 0. /// - UINT32 PROCHOT:1; + UINT32 PROCHOT : 1; /// /// [Bit 17] Thermal Log When set, indicates that the Thermal Status bit /// has asserted since the log bit was last cleared. This log bit will /// remain set until cleared by software writing 0. /// - UINT32 ThermalLog:1; + UINT32 ThermalLog : 1; /// /// [Bit 18] Package-Level PL1 Power Limiting Log When set, indicates /// that the Package Level PL1 Power Limiting Status bit has asserted /// since the log bit was last cleared. This log bit will remain set until /// cleared by software writing 0. /// - UINT32 PL1Log:1; + UINT32 PL1Log : 1; /// /// [Bit 19] Package-Level PL2 Power Limiting Log When set, indicates that /// the Package Level PL2 Power Limiting Status bit has asserted since the /// log bit was last cleared. This log bit will remain set until cleared /// by software writing 0. /// - UINT32 PL2Log:1; - UINT32 Reserved3:5; + UINT32 PL2Log : 1; + UINT32 Reserved3 : 5; /// /// [Bit 25] Core Power Limiting Log When set, indicates that the Core /// Power Limiting Status bit has asserted since the log bit was last /// cleared. This log bit will remain set until cleared by software /// writing 0. /// - UINT32 CorePowerLimitingLog:1; + UINT32 CorePowerLimitingLog : 1; /// /// [Bit 26] VR Therm Alert Log When set, indicates that the VR Therm /// Alert Status bit has asserted since the log bit was last cleared. This /// log bit will remain set until cleared by software writing 0. /// - UINT32 VRThermAlertLog:1; + UINT32 VRThermAlertLog : 1; /// /// [Bit 27] Max Turbo Limit Log When set, indicates that the Max Turbo /// Limit Status bit has asserted since the log bit was last cleared. This /// log bit will remain set until cleared by software writing 0. /// - UINT32 MaxTurboLimitLog:1; + UINT32 MaxTurboLimitLog : 1; /// /// [Bit 28] Electrical Design Point Log When set, indicates that the EDP /// Status bit has asserted since the log bit was last cleared. This log /// bit will remain set until cleared by software writing 0. /// - UINT32 ElectricalDesignPointLog:1; + UINT32 ElectricalDesignPointLog : 1; /// /// [Bit 29] Turbo Transition Attenuation Log When set, indicates that the /// Turbo Transition Attenuation Status bit has asserted since the log bit /// was last cleared. This log bit will remain set until cleared by /// software writing 0. /// - UINT32 TurboTransitionAttenuationLog:1; + UINT32 TurboTransitionAttenuationLog : 1; /// /// [Bit 30] Maximum Efficiency Frequency Log When set, indicates that /// the Maximum Efficiency Frequency Status bit has asserted since the log /// bit was last cleared. This log bit will remain set until cleared by /// software writing 0. /// - UINT32 MaximumEfficiencyFrequencyLog:1; - UINT32 Reserved4:1; - UINT32 Reserved5:32; + UINT32 MaximumEfficiencyFrequencyLog : 1; + UINT32 Reserved4 : 1; + UINT32 Reserved5 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_CORE_PERF_LIMIT_REASONS_REGISTER; - /** Core. Last Branch Record n From IP (R/W) One of 32 pairs of last branch record registers on the last branch record stack. The From_IP part of the @@ -2202,38 +2158,38 @@ typedef union { MSR_GOLDMONT_LASTBRANCH_31_FROM_IP is defined as MSR_LASTBRANCH_31_FROM_IP in SDM. @{ **/ -#define MSR_GOLDMONT_LASTBRANCH_0_FROM_IP 0x00000680 -#define MSR_GOLDMONT_LASTBRANCH_1_FROM_IP 0x00000681 -#define MSR_GOLDMONT_LASTBRANCH_2_FROM_IP 0x00000682 -#define MSR_GOLDMONT_LASTBRANCH_3_FROM_IP 0x00000683 -#define MSR_GOLDMONT_LASTBRANCH_4_FROM_IP 0x00000684 -#define MSR_GOLDMONT_LASTBRANCH_5_FROM_IP 0x00000685 -#define MSR_GOLDMONT_LASTBRANCH_6_FROM_IP 0x00000686 -#define MSR_GOLDMONT_LASTBRANCH_7_FROM_IP 0x00000687 -#define MSR_GOLDMONT_LASTBRANCH_8_FROM_IP 0x00000688 -#define MSR_GOLDMONT_LASTBRANCH_9_FROM_IP 0x00000689 -#define MSR_GOLDMONT_LASTBRANCH_10_FROM_IP 0x0000068A -#define MSR_GOLDMONT_LASTBRANCH_11_FROM_IP 0x0000068B -#define MSR_GOLDMONT_LASTBRANCH_12_FROM_IP 0x0000068C -#define MSR_GOLDMONT_LASTBRANCH_13_FROM_IP 0x0000068D -#define MSR_GOLDMONT_LASTBRANCH_14_FROM_IP 0x0000068E -#define MSR_GOLDMONT_LASTBRANCH_15_FROM_IP 0x0000068F -#define MSR_GOLDMONT_LASTBRANCH_16_FROM_IP 0x00000690 -#define MSR_GOLDMONT_LASTBRANCH_17_FROM_IP 0x00000691 -#define MSR_GOLDMONT_LASTBRANCH_18_FROM_IP 0x00000692 -#define MSR_GOLDMONT_LASTBRANCH_19_FROM_IP 0x00000693 -#define MSR_GOLDMONT_LASTBRANCH_20_FROM_IP 0x00000694 -#define MSR_GOLDMONT_LASTBRANCH_21_FROM_IP 0x00000695 -#define MSR_GOLDMONT_LASTBRANCH_22_FROM_IP 0x00000696 -#define MSR_GOLDMONT_LASTBRANCH_23_FROM_IP 0x00000697 -#define MSR_GOLDMONT_LASTBRANCH_24_FROM_IP 0x00000698 -#define MSR_GOLDMONT_LASTBRANCH_25_FROM_IP 0x00000699 -#define MSR_GOLDMONT_LASTBRANCH_26_FROM_IP 0x0000069A -#define MSR_GOLDMONT_LASTBRANCH_27_FROM_IP 0x0000069B -#define MSR_GOLDMONT_LASTBRANCH_28_FROM_IP 0x0000069C -#define MSR_GOLDMONT_LASTBRANCH_29_FROM_IP 0x0000069D -#define MSR_GOLDMONT_LASTBRANCH_30_FROM_IP 0x0000069E -#define MSR_GOLDMONT_LASTBRANCH_31_FROM_IP 0x0000069F +#define MSR_GOLDMONT_LASTBRANCH_0_FROM_IP 0x00000680 +#define MSR_GOLDMONT_LASTBRANCH_1_FROM_IP 0x00000681 +#define MSR_GOLDMONT_LASTBRANCH_2_FROM_IP 0x00000682 +#define MSR_GOLDMONT_LASTBRANCH_3_FROM_IP 0x00000683 +#define MSR_GOLDMONT_LASTBRANCH_4_FROM_IP 0x00000684 +#define MSR_GOLDMONT_LASTBRANCH_5_FROM_IP 0x00000685 +#define MSR_GOLDMONT_LASTBRANCH_6_FROM_IP 0x00000686 +#define MSR_GOLDMONT_LASTBRANCH_7_FROM_IP 0x00000687 +#define MSR_GOLDMONT_LASTBRANCH_8_FROM_IP 0x00000688 +#define MSR_GOLDMONT_LASTBRANCH_9_FROM_IP 0x00000689 +#define MSR_GOLDMONT_LASTBRANCH_10_FROM_IP 0x0000068A +#define MSR_GOLDMONT_LASTBRANCH_11_FROM_IP 0x0000068B +#define MSR_GOLDMONT_LASTBRANCH_12_FROM_IP 0x0000068C +#define MSR_GOLDMONT_LASTBRANCH_13_FROM_IP 0x0000068D +#define MSR_GOLDMONT_LASTBRANCH_14_FROM_IP 0x0000068E +#define MSR_GOLDMONT_LASTBRANCH_15_FROM_IP 0x0000068F +#define MSR_GOLDMONT_LASTBRANCH_16_FROM_IP 0x00000690 +#define MSR_GOLDMONT_LASTBRANCH_17_FROM_IP 0x00000691 +#define MSR_GOLDMONT_LASTBRANCH_18_FROM_IP 0x00000692 +#define MSR_GOLDMONT_LASTBRANCH_19_FROM_IP 0x00000693 +#define MSR_GOLDMONT_LASTBRANCH_20_FROM_IP 0x00000694 +#define MSR_GOLDMONT_LASTBRANCH_21_FROM_IP 0x00000695 +#define MSR_GOLDMONT_LASTBRANCH_22_FROM_IP 0x00000696 +#define MSR_GOLDMONT_LASTBRANCH_23_FROM_IP 0x00000697 +#define MSR_GOLDMONT_LASTBRANCH_24_FROM_IP 0x00000698 +#define MSR_GOLDMONT_LASTBRANCH_25_FROM_IP 0x00000699 +#define MSR_GOLDMONT_LASTBRANCH_26_FROM_IP 0x0000069A +#define MSR_GOLDMONT_LASTBRANCH_27_FROM_IP 0x0000069B +#define MSR_GOLDMONT_LASTBRANCH_28_FROM_IP 0x0000069C +#define MSR_GOLDMONT_LASTBRANCH_29_FROM_IP 0x0000069D +#define MSR_GOLDMONT_LASTBRANCH_30_FROM_IP 0x0000069E +#define MSR_GOLDMONT_LASTBRANCH_31_FROM_IP 0x0000069F /// @} /** @@ -2248,31 +2204,30 @@ typedef union { /// /// [Bit 31:0] From Linear Address (R/W). /// - UINT32 FromLinearAddress:32; + UINT32 FromLinearAddress : 32; /// /// [Bit 47:32] From Linear Address (R/W). /// - UINT32 FromLinearAddressHi:16; + UINT32 FromLinearAddressHi : 16; /// /// [Bits 62:48] Signed extension of bits 47:0. /// - UINT32 SignedExtension:15; + UINT32 SignedExtension : 15; /// /// [Bit 63] Mispred. /// - UINT32 Mispred:1; + UINT32 Mispred : 1; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_LASTBRANCH_FROM_IP_REGISTER; - /** Core. Last Branch Record n To IP (R/W) One of 32 pairs of last branch record registers on the last branch record stack. The To_IP part of the stack @@ -2326,38 +2281,38 @@ typedef union { MSR_GOLDMONT_LASTBRANCH_31_TO_IP is defined as MSR_LASTBRANCH_31_TO_IP in SDM. @{ **/ -#define MSR_GOLDMONT_LASTBRANCH_0_TO_IP 0x000006C0 -#define MSR_GOLDMONT_LASTBRANCH_1_TO_IP 0x000006C1 -#define MSR_GOLDMONT_LASTBRANCH_2_TO_IP 0x000006C2 -#define MSR_GOLDMONT_LASTBRANCH_3_TO_IP 0x000006C3 -#define MSR_GOLDMONT_LASTBRANCH_4_TO_IP 0x000006C4 -#define MSR_GOLDMONT_LASTBRANCH_5_TO_IP 0x000006C5 -#define MSR_GOLDMONT_LASTBRANCH_6_TO_IP 0x000006C6 -#define MSR_GOLDMONT_LASTBRANCH_7_TO_IP 0x000006C7 -#define MSR_GOLDMONT_LASTBRANCH_8_TO_IP 0x000006C8 -#define MSR_GOLDMONT_LASTBRANCH_9_TO_IP 0x000006C9 -#define MSR_GOLDMONT_LASTBRANCH_10_TO_IP 0x000006CA -#define MSR_GOLDMONT_LASTBRANCH_11_TO_IP 0x000006CB -#define MSR_GOLDMONT_LASTBRANCH_12_TO_IP 0x000006CC -#define MSR_GOLDMONT_LASTBRANCH_13_TO_IP 0x000006CD -#define MSR_GOLDMONT_LASTBRANCH_14_TO_IP 0x000006CE -#define MSR_GOLDMONT_LASTBRANCH_15_TO_IP 0x000006CF -#define MSR_GOLDMONT_LASTBRANCH_16_TO_IP 0x000006D0 -#define MSR_GOLDMONT_LASTBRANCH_17_TO_IP 0x000006D1 -#define MSR_GOLDMONT_LASTBRANCH_18_TO_IP 0x000006D2 -#define MSR_GOLDMONT_LASTBRANCH_19_TO_IP 0x000006D3 -#define MSR_GOLDMONT_LASTBRANCH_20_TO_IP 0x000006D4 -#define MSR_GOLDMONT_LASTBRANCH_21_TO_IP 0x000006D5 -#define MSR_GOLDMONT_LASTBRANCH_22_TO_IP 0x000006D6 -#define MSR_GOLDMONT_LASTBRANCH_23_TO_IP 0x000006D7 -#define MSR_GOLDMONT_LASTBRANCH_24_TO_IP 0x000006D8 -#define MSR_GOLDMONT_LASTBRANCH_25_TO_IP 0x000006D9 -#define MSR_GOLDMONT_LASTBRANCH_26_TO_IP 0x000006DA -#define MSR_GOLDMONT_LASTBRANCH_27_TO_IP 0x000006DB -#define MSR_GOLDMONT_LASTBRANCH_28_TO_IP 0x000006DC -#define MSR_GOLDMONT_LASTBRANCH_29_TO_IP 0x000006DD -#define MSR_GOLDMONT_LASTBRANCH_30_TO_IP 0x000006DE -#define MSR_GOLDMONT_LASTBRANCH_31_TO_IP 0x000006DF +#define MSR_GOLDMONT_LASTBRANCH_0_TO_IP 0x000006C0 +#define MSR_GOLDMONT_LASTBRANCH_1_TO_IP 0x000006C1 +#define MSR_GOLDMONT_LASTBRANCH_2_TO_IP 0x000006C2 +#define MSR_GOLDMONT_LASTBRANCH_3_TO_IP 0x000006C3 +#define MSR_GOLDMONT_LASTBRANCH_4_TO_IP 0x000006C4 +#define MSR_GOLDMONT_LASTBRANCH_5_TO_IP 0x000006C5 +#define MSR_GOLDMONT_LASTBRANCH_6_TO_IP 0x000006C6 +#define MSR_GOLDMONT_LASTBRANCH_7_TO_IP 0x000006C7 +#define MSR_GOLDMONT_LASTBRANCH_8_TO_IP 0x000006C8 +#define MSR_GOLDMONT_LASTBRANCH_9_TO_IP 0x000006C9 +#define MSR_GOLDMONT_LASTBRANCH_10_TO_IP 0x000006CA +#define MSR_GOLDMONT_LASTBRANCH_11_TO_IP 0x000006CB +#define MSR_GOLDMONT_LASTBRANCH_12_TO_IP 0x000006CC +#define MSR_GOLDMONT_LASTBRANCH_13_TO_IP 0x000006CD +#define MSR_GOLDMONT_LASTBRANCH_14_TO_IP 0x000006CE +#define MSR_GOLDMONT_LASTBRANCH_15_TO_IP 0x000006CF +#define MSR_GOLDMONT_LASTBRANCH_16_TO_IP 0x000006D0 +#define MSR_GOLDMONT_LASTBRANCH_17_TO_IP 0x000006D1 +#define MSR_GOLDMONT_LASTBRANCH_18_TO_IP 0x000006D2 +#define MSR_GOLDMONT_LASTBRANCH_19_TO_IP 0x000006D3 +#define MSR_GOLDMONT_LASTBRANCH_20_TO_IP 0x000006D4 +#define MSR_GOLDMONT_LASTBRANCH_21_TO_IP 0x000006D5 +#define MSR_GOLDMONT_LASTBRANCH_22_TO_IP 0x000006D6 +#define MSR_GOLDMONT_LASTBRANCH_23_TO_IP 0x000006D7 +#define MSR_GOLDMONT_LASTBRANCH_24_TO_IP 0x000006D8 +#define MSR_GOLDMONT_LASTBRANCH_25_TO_IP 0x000006D9 +#define MSR_GOLDMONT_LASTBRANCH_26_TO_IP 0x000006DA +#define MSR_GOLDMONT_LASTBRANCH_27_TO_IP 0x000006DB +#define MSR_GOLDMONT_LASTBRANCH_28_TO_IP 0x000006DC +#define MSR_GOLDMONT_LASTBRANCH_29_TO_IP 0x000006DD +#define MSR_GOLDMONT_LASTBRANCH_30_TO_IP 0x000006DE +#define MSR_GOLDMONT_LASTBRANCH_31_TO_IP 0x000006DF /// @} /** @@ -2372,27 +2327,26 @@ typedef union { /// /// [Bit 31:0] Target Linear Address (R/W). /// - UINT32 TargetLinearAddress:32; + UINT32 TargetLinearAddress : 32; /// /// [Bit 47:32] Target Linear Address (R/W). /// - UINT32 TargetLinearAddressHi:16; + UINT32 TargetLinearAddressHi : 16; /// /// [Bits 63:48] Elapsed cycles from last update to the LBR. /// - UINT32 ElapsedCycles:16; + UINT32 ElapsedCycles : 16; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_LASTBRANCH_TO_IP_REGISTER; - /** Core. Resource Association Register (R/W). @@ -2411,7 +2365,7 @@ typedef union { @endcode @note MSR_GOLDMONT_IA32_PQR_ASSOC is defined as IA32_PQR_ASSOC in SDM. **/ -#define MSR_GOLDMONT_IA32_PQR_ASSOC 0x00000C8F +#define MSR_GOLDMONT_IA32_PQR_ASSOC 0x00000C8F /** MSR information returned for MSR index #MSR_GOLDMONT_IA32_PQR_ASSOC @@ -2421,20 +2375,19 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:32; + UINT32 Reserved1 : 32; /// /// [Bits 33:32] COS (R/W). /// - UINT32 COS:2; - UINT32 Reserved2:30; + UINT32 COS : 2; + UINT32 Reserved2 : 30; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_IA32_PQR_ASSOC_REGISTER; - /** Module. L2 Class Of Service Mask - COS n (R/W) if CPUID.(EAX=10H, ECX=1):EDX.COS_MAX[15:0] >=n. @@ -2457,9 +2410,9 @@ typedef union { MSR_GOLDMONT_IA32_L2_QOS_MASK_2 is defined as IA32_L2_QOS_MASK_2 in SDM. @{ **/ -#define MSR_GOLDMONT_IA32_L2_QOS_MASK_0 0x00000D10 -#define MSR_GOLDMONT_IA32_L2_QOS_MASK_1 0x00000D11 -#define MSR_GOLDMONT_IA32_L2_QOS_MASK_2 0x00000D12 +#define MSR_GOLDMONT_IA32_L2_QOS_MASK_0 0x00000D10 +#define MSR_GOLDMONT_IA32_L2_QOS_MASK_1 0x00000D11 +#define MSR_GOLDMONT_IA32_L2_QOS_MASK_2 0x00000D12 /// @} /** @@ -2474,21 +2427,20 @@ typedef union { /// /// [Bits 7:0] CBM: Bit vector of available L2 ways for COS 0 enforcement /// - UINT32 CBM:8; - UINT32 Reserved1:24; - UINT32 Reserved2:32; + UINT32 CBM : 8; + UINT32 Reserved1 : 24; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_IA32_L2_QOS_MASK_REGISTER; - /** Package. L2 Class Of Service Mask - COS 3 (R/W) if CPUID.(EAX=10H, ECX=1):EDX.COS_MAX[15:0] >=3. @@ -2508,7 +2460,7 @@ typedef union { @endcode @note MSR_GOLDMONT_IA32_L2_QOS_MASK_3 is defined as IA32_L2_QOS_MASK_3 in SDM. **/ -#define MSR_GOLDMONT_IA32_L2_QOS_MASK_3 0x00000D13 +#define MSR_GOLDMONT_IA32_L2_QOS_MASK_3 0x00000D13 /** MSR information returned for MSR index #MSR_GOLDMONT_IA32_L2_QOS_MASK_3. @@ -2521,19 +2473,18 @@ typedef union { /// /// [Bits 19:0] CBM: Bit vector of available L2 ways for COS 0 enforcement /// - UINT32 CBM:20; - UINT32 Reserved1:12; - UINT32 Reserved2:32; + UINT32 CBM : 20; + UINT32 Reserved1 : 12; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_IA32_L2_QOS_MASK_3_REGISTER; - #endif diff --git a/MdePkg/Include/Register/Intel/Msr/GoldmontPlusMsr.h b/MdePkg/Include/Register/Intel/Msr/GoldmontPlusMsr.h index c56d20d..112c5d5 100644 --- a/MdePkg/Include/Register/Intel/Msr/GoldmontPlusMsr.h +++ b/MdePkg/Include/Register/Intel/Msr/GoldmontPlusMsr.h @@ -54,7 +54,7 @@ AsmWriteMsr64 (MSR_GOLDMONT_PLUS_PEBS_ENABLE, Msr.Uint64); @endcode **/ -#define MSR_GOLDMONT_PLUS_PEBS_ENABLE 0x000003F1 +#define MSR_GOLDMONT_PLUS_PEBS_ENABLE 0x000003F1 /** MSR information returned for MSR index #MSR_GOLDMONT_PLUS_PEBS_ENABLE @@ -68,44 +68,43 @@ typedef union { /// [Bit 0] Enable PEBS trigger and recording for the programmed event /// (precise or otherwise) on IA32_PMC0. /// - UINT32 Fix_Me_1:1; + UINT32 Fix_Me_1 : 1; /// /// [Bit 1] Enable PEBS trigger and recording for the programmed event /// (precise or otherwise) on IA32_PMC1. /// - UINT32 Fix_Me_2:1; + UINT32 Fix_Me_2 : 1; /// /// [Bit 2] Enable PEBS trigger and recording for the programmed event /// (precise or otherwise) on IA32_PMC2. /// - UINT32 Fix_Me_3:1; + UINT32 Fix_Me_3 : 1; /// /// [Bit 3] Enable PEBS trigger and recording for the programmed event /// (precise or otherwise) on IA32_PMC3. /// - UINT32 Fix_Me_4:1; - UINT32 Reserved1:28; + UINT32 Fix_Me_4 : 1; + UINT32 Reserved1 : 28; /// /// [Bit 32] Enable PEBS trigger and recording for IA32_FIXED_CTR0. /// - UINT32 Fix_Me_5:1; + UINT32 Fix_Me_5 : 1; /// /// [Bit 33] Enable PEBS trigger and recording for IA32_FIXED_CTR1. /// - UINT32 Fix_Me_6:1; + UINT32 Fix_Me_6 : 1; /// /// [Bit 34] Enable PEBS trigger and recording for IA32_FIXED_CTR2. /// - UINT32 Fix_Me_7:1; - UINT32 Reserved2:29; + UINT32 Fix_Me_7 : 1; + UINT32 Reserved2 : 29; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_GOLDMONT_PLUS_PEBS_ENABLE_REGISTER; - /** Core. Last Branch Record N From IP (R/W) One of the three MSRs that make up the first entry of the 32-entry LBR stack. The From_IP part of the stack @@ -126,38 +125,38 @@ typedef union { AsmWriteMsr64 (MSR_GOLDMONT_PLUS_LASTBRANCH_N_FROM_IP, Msr); @endcode **/ -#define MSR_GOLDMONT_PLUS_LASTBRANCH_0_FROM_IP 0x00000680 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_1_FROM_IP 0x00000681 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_2_FROM_IP 0x00000682 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_3_FROM_IP 0x00000683 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_4_FROM_IP 0x00000684 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_5_FROM_IP 0x00000685 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_6_FROM_IP 0x00000686 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_7_FROM_IP 0x00000687 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_8_FROM_IP 0x00000688 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_9_FROM_IP 0x00000689 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_10_FROM_IP 0x0000068A -#define MSR_GOLDMONT_PLUS_LASTBRANCH_11_FROM_IP 0x0000068B -#define MSR_GOLDMONT_PLUS_LASTBRANCH_12_FROM_IP 0x0000068C -#define MSR_GOLDMONT_PLUS_LASTBRANCH_13_FROM_IP 0x0000068D -#define MSR_GOLDMONT_PLUS_LASTBRANCH_14_FROM_IP 0x0000068E -#define MSR_GOLDMONT_PLUS_LASTBRANCH_15_FROM_IP 0x0000068F -#define MSR_GOLDMONT_PLUS_LASTBRANCH_16_FROM_IP 0x00000690 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_17_FROM_IP 0x00000691 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_18_FROM_IP 0x00000692 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_19_FROM_IP 0x00000693 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_20_FROM_IP 0x00000694 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_21_FROM_IP 0x00000695 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_22_FROM_IP 0x00000696 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_23_FROM_IP 0x00000697 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_24_FROM_IP 0x00000698 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_25_FROM_IP 0x00000699 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_26_FROM_IP 0x0000069A -#define MSR_GOLDMONT_PLUS_LASTBRANCH_27_FROM_IP 0x0000069B -#define MSR_GOLDMONT_PLUS_LASTBRANCH_28_FROM_IP 0x0000069C -#define MSR_GOLDMONT_PLUS_LASTBRANCH_29_FROM_IP 0x0000069D -#define MSR_GOLDMONT_PLUS_LASTBRANCH_30_FROM_IP 0x0000069E -#define MSR_GOLDMONT_PLUS_LASTBRANCH_31_FROM_IP 0x0000069F +#define MSR_GOLDMONT_PLUS_LASTBRANCH_0_FROM_IP 0x00000680 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_1_FROM_IP 0x00000681 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_2_FROM_IP 0x00000682 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_3_FROM_IP 0x00000683 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_4_FROM_IP 0x00000684 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_5_FROM_IP 0x00000685 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_6_FROM_IP 0x00000686 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_7_FROM_IP 0x00000687 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_8_FROM_IP 0x00000688 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_9_FROM_IP 0x00000689 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_10_FROM_IP 0x0000068A +#define MSR_GOLDMONT_PLUS_LASTBRANCH_11_FROM_IP 0x0000068B +#define MSR_GOLDMONT_PLUS_LASTBRANCH_12_FROM_IP 0x0000068C +#define MSR_GOLDMONT_PLUS_LASTBRANCH_13_FROM_IP 0x0000068D +#define MSR_GOLDMONT_PLUS_LASTBRANCH_14_FROM_IP 0x0000068E +#define MSR_GOLDMONT_PLUS_LASTBRANCH_15_FROM_IP 0x0000068F +#define MSR_GOLDMONT_PLUS_LASTBRANCH_16_FROM_IP 0x00000690 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_17_FROM_IP 0x00000691 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_18_FROM_IP 0x00000692 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_19_FROM_IP 0x00000693 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_20_FROM_IP 0x00000694 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_21_FROM_IP 0x00000695 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_22_FROM_IP 0x00000696 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_23_FROM_IP 0x00000697 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_24_FROM_IP 0x00000698 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_25_FROM_IP 0x00000699 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_26_FROM_IP 0x0000069A +#define MSR_GOLDMONT_PLUS_LASTBRANCH_27_FROM_IP 0x0000069B +#define MSR_GOLDMONT_PLUS_LASTBRANCH_28_FROM_IP 0x0000069C +#define MSR_GOLDMONT_PLUS_LASTBRANCH_29_FROM_IP 0x0000069D +#define MSR_GOLDMONT_PLUS_LASTBRANCH_30_FROM_IP 0x0000069E +#define MSR_GOLDMONT_PLUS_LASTBRANCH_31_FROM_IP 0x0000069F /** Core. Last Branch Record N To IP (R/W) One of the three MSRs that make up @@ -178,39 +177,38 @@ typedef union { AsmWriteMsr64 (MSR_GOLDMONT_PLUS_LASTBRANCH_N_TO_IP, Msr); @endcode **/ -#define MSR_GOLDMONT_PLUS_LASTBRANCH_0_TO_IP 0x000006C0 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_1_TO_IP 0x000006C1 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_2_TO_IP 0x000006C2 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_3_TO_IP 0x000006C3 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_4_TO_IP 0x000006C4 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_5_TO_IP 0x000006C5 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_6_TO_IP 0x000006C6 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_7_TO_IP 0x000006C7 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_8_TO_IP 0x000006C8 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_9_TO_IP 0x000006C9 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_10_TO_IP 0x000006CA -#define MSR_GOLDMONT_PLUS_LASTBRANCH_11_TO_IP 0x000006CB -#define MSR_GOLDMONT_PLUS_LASTBRANCH_12_TO_IP 0x000006CC -#define MSR_GOLDMONT_PLUS_LASTBRANCH_13_TO_IP 0x000006CD -#define MSR_GOLDMONT_PLUS_LASTBRANCH_14_TO_IP 0x000006CE -#define MSR_GOLDMONT_PLUS_LASTBRANCH_15_TO_IP 0x000006CF -#define MSR_GOLDMONT_PLUS_LASTBRANCH_16_TO_IP 0x000006D0 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_17_TO_IP 0x000006D1 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_18_TO_IP 0x000006D2 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_19_TO_IP 0x000006D3 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_20_TO_IP 0x000006D4 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_21_TO_IP 0x000006D5 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_22_TO_IP 0x000006D6 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_23_TO_IP 0x000006D7 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_24_TO_IP 0x000006D8 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_25_TO_IP 0x000006D9 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_26_TO_IP 0x000006DA -#define MSR_GOLDMONT_PLUS_LASTBRANCH_27_TO_IP 0x000006DB -#define MSR_GOLDMONT_PLUS_LASTBRANCH_28_TO_IP 0x000006DC -#define MSR_GOLDMONT_PLUS_LASTBRANCH_29_TO_IP 0x000006DD -#define MSR_GOLDMONT_PLUS_LASTBRANCH_30_TO_IP 0x000006DE -#define MSR_GOLDMONT_PLUS_LASTBRANCH_31_TO_IP 0x000006DF - +#define MSR_GOLDMONT_PLUS_LASTBRANCH_0_TO_IP 0x000006C0 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_1_TO_IP 0x000006C1 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_2_TO_IP 0x000006C2 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_3_TO_IP 0x000006C3 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_4_TO_IP 0x000006C4 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_5_TO_IP 0x000006C5 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_6_TO_IP 0x000006C6 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_7_TO_IP 0x000006C7 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_8_TO_IP 0x000006C8 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_9_TO_IP 0x000006C9 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_10_TO_IP 0x000006CA +#define MSR_GOLDMONT_PLUS_LASTBRANCH_11_TO_IP 0x000006CB +#define MSR_GOLDMONT_PLUS_LASTBRANCH_12_TO_IP 0x000006CC +#define MSR_GOLDMONT_PLUS_LASTBRANCH_13_TO_IP 0x000006CD +#define MSR_GOLDMONT_PLUS_LASTBRANCH_14_TO_IP 0x000006CE +#define MSR_GOLDMONT_PLUS_LASTBRANCH_15_TO_IP 0x000006CF +#define MSR_GOLDMONT_PLUS_LASTBRANCH_16_TO_IP 0x000006D0 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_17_TO_IP 0x000006D1 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_18_TO_IP 0x000006D2 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_19_TO_IP 0x000006D3 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_20_TO_IP 0x000006D4 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_21_TO_IP 0x000006D5 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_22_TO_IP 0x000006D6 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_23_TO_IP 0x000006D7 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_24_TO_IP 0x000006D8 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_25_TO_IP 0x000006D9 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_26_TO_IP 0x000006DA +#define MSR_GOLDMONT_PLUS_LASTBRANCH_27_TO_IP 0x000006DB +#define MSR_GOLDMONT_PLUS_LASTBRANCH_28_TO_IP 0x000006DC +#define MSR_GOLDMONT_PLUS_LASTBRANCH_29_TO_IP 0x000006DD +#define MSR_GOLDMONT_PLUS_LASTBRANCH_30_TO_IP 0x000006DE +#define MSR_GOLDMONT_PLUS_LASTBRANCH_31_TO_IP 0x000006DF /** Core. Last Branch Record N Additional Information (R/W) One of the three @@ -230,37 +228,37 @@ typedef union { AsmWriteMsr64 (MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_N, Msr); @endcode **/ -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_0 0x00000DC0 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_1 0x00000DC1 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_2 0x00000DC2 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_3 0x00000DC3 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_4 0x00000DC4 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_5 0x00000DC5 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_6 0x00000DC6 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_7 0x00000DC7 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_8 0x00000DC8 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_9 0x00000DC9 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_10 0x00000DCA -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_11 0x00000DCB -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_12 0x00000DCC -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_13 0x00000DCD -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_14 0x00000DCE -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_15 0x00000DCF -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_16 0x00000DD0 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_17 0x00000DD1 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_18 0x00000DD2 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_19 0x00000DD3 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_20 0x00000DD4 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_21 0x00000DD5 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_22 0x00000DD6 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_23 0x00000DD7 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_24 0x00000DD8 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_25 0x00000DD9 -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_26 0x00000DDA -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_27 0x00000DDB -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_28 0x00000DDC -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_29 0x00000DDD -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_30 0x00000DDE -#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_31 0x00000DDF +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_0 0x00000DC0 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_1 0x00000DC1 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_2 0x00000DC2 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_3 0x00000DC3 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_4 0x00000DC4 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_5 0x00000DC5 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_6 0x00000DC6 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_7 0x00000DC7 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_8 0x00000DC8 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_9 0x00000DC9 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_10 0x00000DCA +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_11 0x00000DCB +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_12 0x00000DCC +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_13 0x00000DCD +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_14 0x00000DCE +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_15 0x00000DCF +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_16 0x00000DD0 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_17 0x00000DD1 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_18 0x00000DD2 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_19 0x00000DD3 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_20 0x00000DD4 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_21 0x00000DD5 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_22 0x00000DD6 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_23 0x00000DD7 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_24 0x00000DD8 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_25 0x00000DD9 +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_26 0x00000DDA +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_27 0x00000DDB +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_28 0x00000DDC +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_29 0x00000DDD +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_30 0x00000DDE +#define MSR_GOLDMONT_PLUS_LASTBRANCH_INFO_31 0x00000DDF #endif diff --git a/MdePkg/Include/Register/Intel/Msr/HaswellEMsr.h b/MdePkg/Include/Register/Intel/Msr/HaswellEMsr.h index 6c8e29d..2bcc20d 100644 --- a/MdePkg/Include/Register/Intel/Msr/HaswellEMsr.h +++ b/MdePkg/Include/Register/Intel/Msr/HaswellEMsr.h @@ -60,7 +60,7 @@ @endcode @note MSR_HASWELL_E_CORE_THREAD_COUNT is defined as MSR_CORE_THREAD_COUNT in SDM. **/ -#define MSR_HASWELL_E_CORE_THREAD_COUNT 0x00000035 +#define MSR_HASWELL_E_CORE_THREAD_COUNT 0x00000035 /** MSR information returned for MSR index #MSR_HASWELL_E_CORE_THREAD_COUNT @@ -75,26 +75,25 @@ typedef union { /// currently enabled (by either factory configuration or BIOS /// configuration) in the physical package. /// - UINT32 Core_Count:16; + UINT32 Core_Count : 16; /// /// [Bits 31:16] THREAD_COUNT (RO) The number of logical processors that /// are currently enabled (by either factory configuration or BIOS /// configuration) in the physical package. /// - UINT32 Thread_Count:16; - UINT32 Reserved:32; + UINT32 Thread_Count : 16; + UINT32 Reserved : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_E_CORE_THREAD_COUNT_REGISTER; - /** Thread. A Hardware Assigned ID for the Logical Processor (RO). @@ -112,7 +111,7 @@ typedef union { @endcode @note MSR_HASWELL_E_THREAD_ID_INFO is defined as MSR_THREAD_ID_INFO in SDM. **/ -#define MSR_HASWELL_E_THREAD_ID_INFO 0x00000053 +#define MSR_HASWELL_E_THREAD_ID_INFO 0x00000053 /** MSR information returned for MSR index #MSR_HASWELL_E_THREAD_ID_INFO @@ -128,21 +127,20 @@ typedef union { /// ID is not related to Initial APIC ID or x2APIC ID, it is unique within /// a physical package. /// - UINT32 Logical_Processor_ID:8; - UINT32 Reserved1:24; - UINT32 Reserved2:32; + UINT32 Logical_Processor_ID : 8; + UINT32 Reserved1 : 24; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_E_THREAD_ID_INFO_REGISTER; - /** Core. C-State Configuration Control (R/W) Note: C-state values are processor specific C-state code names, unrelated to MWAIT extension C-state parameters @@ -163,7 +161,7 @@ typedef union { @endcode @note MSR_HASWELL_E_PKG_CST_CONFIG_CONTROL is defined as MSR_PKG_CST_CONFIG_CONTROL in SDM. **/ -#define MSR_HASWELL_E_PKG_CST_CONFIG_CONTROL 0x000000E2 +#define MSR_HASWELL_E_PKG_CST_CONFIG_CONTROL 0x000000E2 /** MSR information returned for MSR index #MSR_HASWELL_E_PKG_CST_CONFIG_CONTROL @@ -182,56 +180,55 @@ typedef union { /// 011b: C6 (retention) 111b: No Package C state limits. All C states /// supported by the processor are available. /// - UINT32 Limit:3; - UINT32 Reserved1:7; + UINT32 Limit : 3; + UINT32 Reserved1 : 7; /// /// [Bit 10] I/O MWAIT Redirection Enable (R/W). /// - UINT32 IO_MWAIT:1; - UINT32 Reserved2:4; + UINT32 IO_MWAIT : 1; + UINT32 Reserved2 : 4; /// /// [Bit 15] CFG Lock (R/WO). /// - UINT32 CFGLock:1; - UINT32 Reserved3:9; + UINT32 CFGLock : 1; + UINT32 Reserved3 : 9; /// /// [Bit 25] C3 State Auto Demotion Enable (R/W). /// - UINT32 C3AutoDemotion:1; + UINT32 C3AutoDemotion : 1; /// /// [Bit 26] C1 State Auto Demotion Enable (R/W). /// - UINT32 C1AutoDemotion:1; + UINT32 C1AutoDemotion : 1; /// /// [Bit 27] Enable C3 Undemotion (R/W). /// - UINT32 C3Undemotion:1; + UINT32 C3Undemotion : 1; /// /// [Bit 28] Enable C1 Undemotion (R/W). /// - UINT32 C1Undemotion:1; + UINT32 C1Undemotion : 1; /// /// [Bit 29] Package C State Demotion Enable (R/W). /// - UINT32 CStateDemotion:1; + UINT32 CStateDemotion : 1; /// /// [Bit 30] Package C State UnDemotion Enable (R/W). /// - UINT32 CStateUndemotion:1; - UINT32 Reserved4:1; - UINT32 Reserved5:32; + UINT32 CStateUndemotion : 1; + UINT32 Reserved4 : 1; + UINT32 Reserved5 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_E_PKG_CST_CONFIG_CONTROL_REGISTER; - /** Thread. Global Machine Check Capability (R/O). @@ -249,7 +246,7 @@ typedef union { @endcode @note MSR_HASWELL_E_IA32_MCG_CAP is defined as IA32_MCG_CAP in SDM. **/ -#define MSR_HASWELL_E_IA32_MCG_CAP 0x00000179 +#define MSR_HASWELL_E_IA32_MCG_CAP 0x00000179 /** MSR information returned for MSR index #MSR_HASWELL_E_IA32_MCG_CAP @@ -262,54 +259,53 @@ typedef union { /// /// [Bits 7:0] Count. /// - UINT32 Count:8; + UINT32 Count : 8; /// /// [Bit 8] MCG_CTL_P. /// - UINT32 MCG_CTL_P:1; + UINT32 MCG_CTL_P : 1; /// /// [Bit 9] MCG_EXT_P. /// - UINT32 MCG_EXT_P:1; + UINT32 MCG_EXT_P : 1; /// /// [Bit 10] MCP_CMCI_P. /// - UINT32 MCP_CMCI_P:1; + UINT32 MCP_CMCI_P : 1; /// /// [Bit 11] MCG_TES_P. /// - UINT32 MCG_TES_P:1; - UINT32 Reserved1:4; + UINT32 MCG_TES_P : 1; + UINT32 Reserved1 : 4; /// /// [Bits 23:16] MCG_EXT_CNT. /// - UINT32 MCG_EXT_CNT:8; + UINT32 MCG_EXT_CNT : 8; /// /// [Bit 24] MCG_SER_P. /// - UINT32 MCG_SER_P:1; + UINT32 MCG_SER_P : 1; /// /// [Bit 25] MCG_EM_P. /// - UINT32 MCG_EM_P:1; + UINT32 MCG_EM_P : 1; /// /// [Bit 26] MCG_ELOG_P. /// - UINT32 MCG_ELOG_P:1; - UINT32 Reserved2:5; - UINT32 Reserved3:32; + UINT32 MCG_ELOG_P : 1; + UINT32 Reserved2 : 5; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_E_IA32_MCG_CAP_REGISTER; - /** THREAD. Enhanced SMM Capabilities (SMM-RO) Reports SMM capability Enhancement. Accessible only while in SMM. @@ -329,7 +325,7 @@ typedef union { @endcode @note MSR_HASWELL_E_SMM_MCA_CAP is defined as MSR_SMM_MCA_CAP in SDM. **/ -#define MSR_HASWELL_E_SMM_MCA_CAP 0x0000017D +#define MSR_HASWELL_E_SMM_MCA_CAP 0x0000017D /** MSR information returned for MSR index #MSR_HASWELL_E_SMM_MCA_CAP @@ -339,29 +335,28 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:32; - UINT32 Reserved2:26; + UINT32 Reserved1 : 32; + UINT32 Reserved2 : 26; /// /// [Bit 58] SMM_Code_Access_Chk (SMM-RO) If set to 1 indicates that the /// SMM code access restriction is supported and a host-space interface /// available to SMM handler. /// - UINT32 SMM_Code_Access_Chk:1; + UINT32 SMM_Code_Access_Chk : 1; /// /// [Bit 59] Long_Flow_Indication (SMM-RO) If set to 1 indicates that the /// SMM long flow indicator is supported and a host-space interface /// available to SMM handler. /// - UINT32 Long_Flow_Indication:1; - UINT32 Reserved3:4; + UINT32 Long_Flow_Indication : 1; + UINT32 Reserved3 : 4; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_E_SMM_MCA_CAP_REGISTER; - /** Package. MC Bank Error Configuration (R/W). @@ -380,7 +375,7 @@ typedef union { @endcode @note MSR_HASWELL_E_ERROR_CONTROL is defined as MSR_ERROR_CONTROL in SDM. **/ -#define MSR_HASWELL_E_ERROR_CONTROL 0x0000017F +#define MSR_HASWELL_E_ERROR_CONTROL 0x0000017F /** MSR information returned for MSR index #MSR_HASWELL_E_ERROR_CONTROL @@ -390,26 +385,25 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:1; + UINT32 Reserved1 : 1; /// /// [Bit 1] MemError Log Enable (R/W) When set, enables IMC status bank /// to log additional info in bits 36:32. /// - UINT32 MemErrorLogEnable:1; - UINT32 Reserved2:30; - UINT32 Reserved3:32; + UINT32 MemErrorLogEnable : 1; + UINT32 Reserved2 : 30; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_E_ERROR_CONTROL_REGISTER; - /** Package. Maximum Ratio Limit of Turbo Mode RO if MSR_PLATFORM_INFO.[28] = 0, RW if MSR_PLATFORM_INFO.[28] = 1. @@ -428,7 +422,7 @@ typedef union { @endcode @note MSR_HASWELL_E_TURBO_RATIO_LIMIT is defined as MSR_TURBO_RATIO_LIMIT in SDM. **/ -#define MSR_HASWELL_E_TURBO_RATIO_LIMIT 0x000001AD +#define MSR_HASWELL_E_TURBO_RATIO_LIMIT 0x000001AD /** MSR information returned for MSR index #MSR_HASWELL_E_TURBO_RATIO_LIMIT @@ -442,50 +436,49 @@ typedef union { /// [Bits 7:0] Package. Maximum Ratio Limit for 1C Maximum turbo ratio /// limit of 1 core active. /// - UINT32 Maximum1C:8; + UINT32 Maximum1C : 8; /// /// [Bits 15:8] Package. Maximum Ratio Limit for 2C Maximum turbo ratio /// limit of 2 core active. /// - UINT32 Maximum2C:8; + UINT32 Maximum2C : 8; /// /// [Bits 23:16] Package. Maximum Ratio Limit for 3C Maximum turbo ratio /// limit of 3 core active. /// - UINT32 Maximum3C:8; + UINT32 Maximum3C : 8; /// /// [Bits 31:24] Package. Maximum Ratio Limit for 4C Maximum turbo ratio /// limit of 4 core active. /// - UINT32 Maximum4C:8; + UINT32 Maximum4C : 8; /// /// [Bits 39:32] Package. Maximum Ratio Limit for 5C Maximum turbo ratio /// limit of 5 core active. /// - UINT32 Maximum5C:8; + UINT32 Maximum5C : 8; /// /// [Bits 47:40] Package. Maximum Ratio Limit for 6C Maximum turbo ratio /// limit of 6 core active. /// - UINT32 Maximum6C:8; + UINT32 Maximum6C : 8; /// /// [Bits 55:48] Package. Maximum Ratio Limit for 7C Maximum turbo ratio /// limit of 7 core active. /// - UINT32 Maximum7C:8; + UINT32 Maximum7C : 8; /// /// [Bits 63:56] Package. Maximum Ratio Limit for 8C Maximum turbo ratio /// limit of 8 core active. /// - UINT32 Maximum8C:8; + UINT32 Maximum8C : 8; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_E_TURBO_RATIO_LIMIT_REGISTER; - /** Package. Maximum Ratio Limit of Turbo Mode RO if MSR_PLATFORM_INFO.[28] = 0, RW if MSR_PLATFORM_INFO.[28] = 1. @@ -504,7 +497,7 @@ typedef union { @endcode @note MSR_HASWELL_E_TURBO_RATIO_LIMIT1 is defined as MSR_TURBO_RATIO_LIMIT1 in SDM. **/ -#define MSR_HASWELL_E_TURBO_RATIO_LIMIT1 0x000001AE +#define MSR_HASWELL_E_TURBO_RATIO_LIMIT1 0x000001AE /** MSR information returned for MSR index #MSR_HASWELL_E_TURBO_RATIO_LIMIT1 @@ -518,50 +511,49 @@ typedef union { /// [Bits 7:0] Package. Maximum Ratio Limit for 9C Maximum turbo ratio /// limit of 9 core active. /// - UINT32 Maximum9C:8; + UINT32 Maximum9C : 8; /// /// [Bits 15:8] Package. Maximum Ratio Limit for 10C Maximum turbo ratio /// limit of 10 core active. /// - UINT32 Maximum10C:8; + UINT32 Maximum10C : 8; /// /// [Bits 23:16] Package. Maximum Ratio Limit for 11C Maximum turbo ratio /// limit of 11 core active. /// - UINT32 Maximum11C:8; + UINT32 Maximum11C : 8; /// /// [Bits 31:24] Package. Maximum Ratio Limit for 12C Maximum turbo ratio /// limit of 12 core active. /// - UINT32 Maximum12C:8; + UINT32 Maximum12C : 8; /// /// [Bits 39:32] Package. Maximum Ratio Limit for 13C Maximum turbo ratio /// limit of 13 core active. /// - UINT32 Maximum13C:8; + UINT32 Maximum13C : 8; /// /// [Bits 47:40] Package. Maximum Ratio Limit for 14C Maximum turbo ratio /// limit of 14 core active. /// - UINT32 Maximum14C:8; + UINT32 Maximum14C : 8; /// /// [Bits 55:48] Package. Maximum Ratio Limit for 15C Maximum turbo ratio /// limit of 15 core active. /// - UINT32 Maximum15C:8; + UINT32 Maximum15C : 8; /// /// [Bits 63:56] Package. Maximum Ratio Limit for16C Maximum turbo ratio /// limit of 16 core active. /// - UINT32 Maximum16C:8; + UINT32 Maximum16C : 8; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_E_TURBO_RATIO_LIMIT1_REGISTER; - /** Package. Maximum Ratio Limit of Turbo Mode RO if MSR_PLATFORM_INFO.[28] = 0, RW if MSR_PLATFORM_INFO.[28] = 1. @@ -580,7 +572,7 @@ typedef union { @endcode @note MSR_HASWELL_E_TURBO_RATIO_LIMIT2 is defined as MSR_TURBO_RATIO_LIMIT2 in SDM. **/ -#define MSR_HASWELL_E_TURBO_RATIO_LIMIT2 0x000001AF +#define MSR_HASWELL_E_TURBO_RATIO_LIMIT2 0x000001AF /** MSR information returned for MSR index #MSR_HASWELL_E_TURBO_RATIO_LIMIT2 @@ -594,14 +586,14 @@ typedef union { /// [Bits 7:0] Package. Maximum Ratio Limit for 17C Maximum turbo ratio /// limit of 17 core active. /// - UINT32 Maximum17C:8; + UINT32 Maximum17C : 8; /// /// [Bits 15:8] Package. Maximum Ratio Limit for 18C Maximum turbo ratio /// limit of 18 core active. /// - UINT32 Maximum18C:8; - UINT32 Reserved1:16; - UINT32 Reserved2:31; + UINT32 Maximum18C : 8; + UINT32 Reserved1 : 16; + UINT32 Reserved2 : 31; /// /// [Bit 63] Package. Semaphore for Turbo Ratio Limit Configuration If 1, /// the processor uses override configuration specified in @@ -609,15 +601,14 @@ typedef union { /// MSR_TURBO_RATIO_LIMIT2. If 0, the processor uses factory-set /// configuration (Default). /// - UINT32 TurboRatioLimitConfigurationSemaphore:1; + UINT32 TurboRatioLimitConfigurationSemaphore : 1; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_E_TURBO_RATIO_LIMIT2_REGISTER; - /** Package. Unit Multipliers used in RAPL Interfaces (R/O). @@ -635,7 +626,7 @@ typedef union { @endcode @note MSR_HASWELL_E_RAPL_POWER_UNIT is defined as MSR_RAPL_POWER_UNIT in SDM. **/ -#define MSR_HASWELL_E_RAPL_POWER_UNIT 0x00000606 +#define MSR_HASWELL_E_RAPL_POWER_UNIT 0x00000606 /** MSR information returned for MSR index #MSR_HASWELL_E_RAPL_POWER_UNIT @@ -648,35 +639,34 @@ typedef union { /// /// [Bits 3:0] Package. Power Units See Section 14.9.1, "RAPL Interfaces.". /// - UINT32 PowerUnits:4; - UINT32 Reserved1:4; + UINT32 PowerUnits : 4; + UINT32 Reserved1 : 4; /// /// [Bits 12:8] Package. Energy Status Units Energy related information /// (in Joules) is based on the multiplier, 1/2^ESU; where ESU is an /// unsigned integer represented by bits 12:8. Default value is 0EH (or 61 /// micro-joules). /// - UINT32 EnergyStatusUnits:5; - UINT32 Reserved2:3; + UINT32 EnergyStatusUnits : 5; + UINT32 Reserved2 : 3; /// /// [Bits 19:16] Package. Time Units See Section 14.9.1, "RAPL /// Interfaces.". /// - UINT32 TimeUnits:4; - UINT32 Reserved3:12; - UINT32 Reserved4:32; + UINT32 TimeUnits : 4; + UINT32 Reserved3 : 12; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_E_RAPL_POWER_UNIT_REGISTER; - /** Package. DRAM RAPL Power Limit Control (R/W) See Section 14.9.5, "DRAM RAPL Domain.". @@ -694,8 +684,7 @@ typedef union { @endcode @note MSR_HASWELL_E_DRAM_POWER_LIMIT is defined as MSR_DRAM_POWER_LIMIT in SDM. **/ -#define MSR_HASWELL_E_DRAM_POWER_LIMIT 0x00000618 - +#define MSR_HASWELL_E_DRAM_POWER_LIMIT 0x00000618 /** Package. DRAM Energy Status (R/O) Energy Consumed by DRAM devices. @@ -714,7 +703,7 @@ typedef union { @endcode @note MSR_HASWELL_E_DRAM_ENERGY_STATUS is defined as MSR_DRAM_ENERGY_STATUS in SDM. **/ -#define MSR_HASWELL_E_DRAM_ENERGY_STATUS 0x00000619 +#define MSR_HASWELL_E_DRAM_ENERGY_STATUS 0x00000619 /** MSR information returned for MSR index #MSR_HASWELL_E_DRAM_ENERGY_STATUS @@ -728,20 +717,19 @@ typedef union { /// [Bits 31:0] Energy in 15.3 micro-joules. Requires BIOS configuration /// to enable DRAM RAPL mode 0 (Direct VR). /// - UINT32 Energy:32; - UINT32 Reserved:32; + UINT32 Energy : 32; + UINT32 Reserved : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_E_DRAM_ENERGY_STATUS_REGISTER; - /** Package. DRAM Performance Throttling Status (R/O) See Section 14.9.5, "DRAM RAPL Domain.". @@ -758,8 +746,7 @@ typedef union { @endcode @note MSR_HASWELL_E_DRAM_PERF_STATUS is defined as MSR_DRAM_PERF_STATUS in SDM. **/ -#define MSR_HASWELL_E_DRAM_PERF_STATUS 0x0000061B - +#define MSR_HASWELL_E_DRAM_PERF_STATUS 0x0000061B /** Package. DRAM RAPL Parameters (R/W) See Section 14.9.5, "DRAM RAPL Domain.". @@ -777,8 +764,7 @@ typedef union { @endcode @note MSR_HASWELL_E_DRAM_POWER_INFO is defined as MSR_DRAM_POWER_INFO in SDM. **/ -#define MSR_HASWELL_E_DRAM_POWER_INFO 0x0000061C - +#define MSR_HASWELL_E_DRAM_POWER_INFO 0x0000061C /** Package. Configuration of PCIE PLL Relative to BCLK(R/W). @@ -798,7 +784,7 @@ typedef union { @endcode @note MSR_HASWELL_E_PCIE_PLL_RATIO is defined as MSR_PCIE_PLL_RATIO in SDM. **/ -#define MSR_HASWELL_E_PCIE_PLL_RATIO 0x0000061E +#define MSR_HASWELL_E_PCIE_PLL_RATIO 0x0000061E /** MSR information returned for MSR index #MSR_HASWELL_E_PCIE_PLL_RATIO @@ -814,31 +800,30 @@ typedef union { /// 5:3 mapping for166MHz operation 11b: Use 5:2 mapping for250MHz /// operation. /// - UINT32 PCIERatio:2; + UINT32 PCIERatio : 2; /// /// [Bit 2] Package. LPLL Select (R/W) if 1, use configured setting of /// PCIE Ratio. /// - UINT32 LPLLSelect:1; + UINT32 LPLLSelect : 1; /// /// [Bit 3] Package. LONG RESET (R/W) if 1, wait additional time-out /// before re-locking Gen2/Gen3 PLLs. /// - UINT32 LONGRESET:1; - UINT32 Reserved1:28; - UINT32 Reserved2:32; + UINT32 LONGRESET : 1; + UINT32 Reserved1 : 28; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_E_PCIE_PLL_RATIO_REGISTER; - /** Package. Uncore Ratio Limit (R/W) Out of reset, the min_ratio and max_ratio fields represent the widest possible range of uncore frequencies. Writing to @@ -859,7 +844,7 @@ typedef union { AsmWriteMsr64 (MSR_HASWELL_E_MSRUNCORE_RATIO_LIMIT, Msr.Uint64); @endcode **/ -#define MSR_HASWELL_E_MSRUNCORE_RATIO_LIMIT 0x00000620 +#define MSR_HASWELL_E_MSRUNCORE_RATIO_LIMIT 0x00000620 /** MSR information returned for MSR index #MSR_HASWELL_E_MSRUNCORE_RATIO_LIMIT @@ -873,24 +858,24 @@ typedef union { /// [Bits 6:0] MAX_RATIO This field is used to limit the max ratio of the /// LLC/Ring. /// - UINT32 MAX_RATIO:7; - UINT32 Reserved1:1; + UINT32 MAX_RATIO : 7; + UINT32 Reserved1 : 1; /// /// [Bits 14:8] MIN_RATIO Writing to this field controls the minimum /// possible ratio of the LLC/Ring. /// - UINT32 MIN_RATIO:7; - UINT32 Reserved2:17; - UINT32 Reserved3:32; + UINT32 MIN_RATIO : 7; + UINT32 Reserved2 : 17; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_E_MSRUNCORE_RATIO_LIMIT_REGISTER; /** @@ -908,8 +893,7 @@ typedef union { @endcode @note MSR_HASWELL_E_PP0_ENERGY_STATUS is defined as MSR_PP0_ENERGY_STATUS in SDM. **/ -#define MSR_HASWELL_E_PP0_ENERGY_STATUS 0x00000639 - +#define MSR_HASWELL_E_PP0_ENERGY_STATUS 0x00000639 /** Package. Indicator of Frequency Clipping in Processor Cores (R/W) (frequency @@ -930,7 +914,7 @@ typedef union { @endcode @note MSR_HASWELL_E_CORE_PERF_LIMIT_REASONS is defined as MSR_CORE_PERF_LIMIT_REASONS in SDM. **/ -#define MSR_HASWELL_E_CORE_PERF_LIMIT_REASONS 0x00000690 +#define MSR_HASWELL_E_CORE_PERF_LIMIT_REASONS 0x00000690 /** MSR information returned for MSR index #MSR_HASWELL_E_CORE_PERF_LIMIT_REASONS @@ -945,152 +929,151 @@ typedef union { /// reduced below the operating system request due to assertion of /// external PROCHOT. /// - UINT32 PROCHOT_Status:1; + UINT32 PROCHOT_Status : 1; /// /// [Bit 1] Thermal Status (R0) When set, frequency is reduced below the /// operating system request due to a thermal event. /// - UINT32 ThermalStatus:1; + UINT32 ThermalStatus : 1; /// /// [Bit 2] Power Budget Management Status (R0) When set, frequency is /// reduced below the operating system request due to PBM limit. /// - UINT32 PowerBudgetManagementStatus:1; + UINT32 PowerBudgetManagementStatus : 1; /// /// [Bit 3] Platform Configuration Services Status (R0) When set, /// frequency is reduced below the operating system request due to PCS /// limit. /// - UINT32 PlatformConfigurationServicesStatus:1; - UINT32 Reserved1:1; + UINT32 PlatformConfigurationServicesStatus : 1; + UINT32 Reserved1 : 1; /// /// [Bit 5] Autonomous Utilization-Based Frequency Control Status (R0) /// When set, frequency is reduced below the operating system request /// because the processor has detected that utilization is low. /// - UINT32 AutonomousUtilizationBasedFrequencyControlStatus:1; + UINT32 AutonomousUtilizationBasedFrequencyControlStatus : 1; /// /// [Bit 6] VR Therm Alert Status (R0) When set, frequency is reduced /// below the operating system request due to a thermal alert from the /// Voltage Regulator. /// - UINT32 VRThermAlertStatus:1; - UINT32 Reserved2:1; + UINT32 VRThermAlertStatus : 1; + UINT32 Reserved2 : 1; /// /// [Bit 8] Electrical Design Point Status (R0) When set, frequency is /// reduced below the operating system request due to electrical design /// point constraints (e.g. maximum electrical current consumption). /// - UINT32 ElectricalDesignPointStatus:1; - UINT32 Reserved3:1; + UINT32 ElectricalDesignPointStatus : 1; + UINT32 Reserved3 : 1; /// /// [Bit 10] Multi-Core Turbo Status (R0) When set, frequency is reduced /// below the operating system request due to Multi-Core Turbo limits. /// - UINT32 MultiCoreTurboStatus:1; - UINT32 Reserved4:2; + UINT32 MultiCoreTurboStatus : 1; + UINT32 Reserved4 : 2; /// /// [Bit 13] Core Frequency P1 Status (R0) When set, frequency is reduced /// below max non-turbo P1. /// - UINT32 FrequencyP1Status:1; + UINT32 FrequencyP1Status : 1; /// /// [Bit 14] Core Max n-core Turbo Frequency Limiting Status (R0) When /// set, frequency is reduced below max n-core turbo frequency. /// - UINT32 TurboFrequencyLimitingStatus:1; + UINT32 TurboFrequencyLimitingStatus : 1; /// /// [Bit 15] Core Frequency Limiting Status (R0) When set, frequency is /// reduced below the operating system request. /// - UINT32 FrequencyLimitingStatus:1; + UINT32 FrequencyLimitingStatus : 1; /// /// [Bit 16] PROCHOT Log When set, indicates that the PROCHOT Status bit /// has asserted since the log bit was last cleared. This log bit will /// remain set until cleared by software writing 0. /// - UINT32 PROCHOT_Log:1; + UINT32 PROCHOT_Log : 1; /// /// [Bit 17] Thermal Log When set, indicates that the Thermal Status bit /// has asserted since the log bit was last cleared. This log bit will /// remain set until cleared by software writing 0. /// - UINT32 ThermalLog:1; + UINT32 ThermalLog : 1; /// /// [Bit 18] Power Budget Management Log When set, indicates that the PBM /// Status bit has asserted since the log bit was last cleared. This log /// bit will remain set until cleared by software writing 0. /// - UINT32 PowerBudgetManagementLog:1; + UINT32 PowerBudgetManagementLog : 1; /// /// [Bit 19] Platform Configuration Services Log When set, indicates that /// the PCS Status bit has asserted since the log bit was last cleared. /// This log bit will remain set until cleared by software writing 0. /// - UINT32 PlatformConfigurationServicesLog:1; - UINT32 Reserved5:1; + UINT32 PlatformConfigurationServicesLog : 1; + UINT32 Reserved5 : 1; /// /// [Bit 21] Autonomous Utilization-Based Frequency Control Log When set, /// indicates that the AUBFC Status bit has asserted since the log bit was /// last cleared. This log bit will remain set until cleared by software /// writing 0. /// - UINT32 AutonomousUtilizationBasedFrequencyControlLog:1; + UINT32 AutonomousUtilizationBasedFrequencyControlLog : 1; /// /// [Bit 22] VR Therm Alert Log When set, indicates that the VR Therm /// Alert Status bit has asserted since the log bit was last cleared. This /// log bit will remain set until cleared by software writing 0. /// - UINT32 VRThermAlertLog:1; - UINT32 Reserved6:1; + UINT32 VRThermAlertLog : 1; + UINT32 Reserved6 : 1; /// /// [Bit 24] Electrical Design Point Log When set, indicates that the EDP /// Status bit has asserted since the log bit was last cleared. This log /// bit will remain set until cleared by software writing 0. /// - UINT32 ElectricalDesignPointLog:1; - UINT32 Reserved7:1; + UINT32 ElectricalDesignPointLog : 1; + UINT32 Reserved7 : 1; /// /// [Bit 26] Multi-Core Turbo Log When set, indicates that the Multi-Core /// Turbo Status bit has asserted since the log bit was last cleared. This /// log bit will remain set until cleared by software writing 0. /// - UINT32 MultiCoreTurboLog:1; - UINT32 Reserved8:2; + UINT32 MultiCoreTurboLog : 1; + UINT32 Reserved8 : 2; /// /// [Bit 29] Core Frequency P1 Log When set, indicates that the Core /// Frequency P1 Status bit has asserted since the log bit was last /// cleared. This log bit will remain set until cleared by software /// writing 0. /// - UINT32 CoreFrequencyP1Log:1; + UINT32 CoreFrequencyP1Log : 1; /// /// [Bit 30] Core Max n-core Turbo Frequency Limiting Log When set, /// indicates that the Core Max n-core Turbo Frequency Limiting Status bit /// has asserted since the log bit was last cleared. This log bit will /// remain set until cleared by software writing 0. /// - UINT32 TurboFrequencyLimitingLog:1; + UINT32 TurboFrequencyLimitingLog : 1; /// /// [Bit 31] Core Frequency Limiting Log When set, indicates that the Core /// Frequency Limiting Status bit has asserted since the log bit was last /// cleared. This log bit will remain set until cleared by software /// writing 0. /// - UINT32 CoreFrequencyLimitingLog:1; - UINT32 Reserved9:32; + UINT32 CoreFrequencyLimitingLog : 1; + UINT32 Reserved9 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_E_CORE_PERF_LIMIT_REASONS_REGISTER; - /** THREAD. Monitoring Event Select Register (R/W). if CPUID.(EAX=07H, ECX=0):EBX.RDT-M[bit 12] = 1. @@ -1110,7 +1093,7 @@ typedef union { @endcode @note MSR_HASWELL_E_IA32_QM_EVTSEL is defined as IA32_QM_EVTSEL in SDM. **/ -#define MSR_HASWELL_E_IA32_QM_EVTSEL 0x00000C8D +#define MSR_HASWELL_E_IA32_QM_EVTSEL 0x00000C8D /** MSR information returned for MSR index #MSR_HASWELL_E_IA32_QM_EVTSEL @@ -1124,21 +1107,20 @@ typedef union { /// [Bits 7:0] EventID (RW) Event encoding: 0x0: no monitoring 0x1: L3 /// occupancy monitoring all other encoding reserved.. /// - UINT32 EventID:8; - UINT32 Reserved1:24; + UINT32 EventID : 8; + UINT32 Reserved1 : 24; /// /// [Bits 41:32] RMID (RW). /// - UINT32 RMID:10; - UINT32 Reserved2:22; + UINT32 RMID : 10; + UINT32 Reserved2 : 22; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_E_IA32_QM_EVTSEL_REGISTER; - /** THREAD. Resource Association Register (R/W).. @@ -1157,7 +1139,7 @@ typedef union { @endcode @note MSR_HASWELL_E_IA32_PQR_ASSOC is defined as IA32_PQR_ASSOC in SDM. **/ -#define MSR_HASWELL_E_IA32_PQR_ASSOC 0x00000C8F +#define MSR_HASWELL_E_IA32_PQR_ASSOC 0x00000C8F /** MSR information returned for MSR index #MSR_HASWELL_E_IA32_PQR_ASSOC @@ -1170,21 +1152,20 @@ typedef union { /// /// [Bits 9:0] RMID. /// - UINT32 RMID:10; - UINT32 Reserved1:22; - UINT32 Reserved2:32; + UINT32 RMID : 10; + UINT32 Reserved1 : 22; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_E_IA32_PQR_ASSOC_REGISTER; - /** Package. Uncore perfmon per-socket global control. @@ -1201,8 +1182,7 @@ typedef union { @endcode @note MSR_HASWELL_E_PMON_GLOBAL_CTL is defined as MSR_PMON_GLOBAL_CTL in SDM. **/ -#define MSR_HASWELL_E_PMON_GLOBAL_CTL 0x00000700 - +#define MSR_HASWELL_E_PMON_GLOBAL_CTL 0x00000700 /** Package. Uncore perfmon per-socket global status. @@ -1220,8 +1200,7 @@ typedef union { @endcode @note MSR_HASWELL_E_PMON_GLOBAL_STATUS is defined as MSR_PMON_GLOBAL_STATUS in SDM. **/ -#define MSR_HASWELL_E_PMON_GLOBAL_STATUS 0x00000701 - +#define MSR_HASWELL_E_PMON_GLOBAL_STATUS 0x00000701 /** Package. Uncore perfmon per-socket global configuration. @@ -1239,8 +1218,7 @@ typedef union { @endcode @note MSR_HASWELL_E_PMON_GLOBAL_CONFIG is defined as MSR_PMON_GLOBAL_CONFIG in SDM. **/ -#define MSR_HASWELL_E_PMON_GLOBAL_CONFIG 0x00000702 - +#define MSR_HASWELL_E_PMON_GLOBAL_CONFIG 0x00000702 /** Package. Uncore U-box UCLK fixed counter control. @@ -1258,8 +1236,7 @@ typedef union { @endcode @note MSR_HASWELL_E_U_PMON_UCLK_FIXED_CTL is defined as MSR_U_PMON_UCLK_FIXED_CTL in SDM. **/ -#define MSR_HASWELL_E_U_PMON_UCLK_FIXED_CTL 0x00000703 - +#define MSR_HASWELL_E_U_PMON_UCLK_FIXED_CTL 0x00000703 /** Package. Uncore U-box UCLK fixed counter. @@ -1277,8 +1254,7 @@ typedef union { @endcode @note MSR_HASWELL_E_U_PMON_UCLK_FIXED_CTR is defined as MSR_U_PMON_UCLK_FIXED_CTR in SDM. **/ -#define MSR_HASWELL_E_U_PMON_UCLK_FIXED_CTR 0x00000704 - +#define MSR_HASWELL_E_U_PMON_UCLK_FIXED_CTR 0x00000704 /** Package. Uncore U-box perfmon event select for U-box counter 0. @@ -1296,8 +1272,7 @@ typedef union { @endcode @note MSR_HASWELL_E_U_PMON_EVNTSEL0 is defined as MSR_U_PMON_EVNTSEL0 in SDM. **/ -#define MSR_HASWELL_E_U_PMON_EVNTSEL0 0x00000705 - +#define MSR_HASWELL_E_U_PMON_EVNTSEL0 0x00000705 /** Package. Uncore U-box perfmon event select for U-box counter 1. @@ -1315,8 +1290,7 @@ typedef union { @endcode @note MSR_HASWELL_E_U_PMON_EVNTSEL1 is defined as MSR_U_PMON_EVNTSEL1 in SDM. **/ -#define MSR_HASWELL_E_U_PMON_EVNTSEL1 0x00000706 - +#define MSR_HASWELL_E_U_PMON_EVNTSEL1 0x00000706 /** Package. Uncore U-box perfmon U-box wide status. @@ -1334,8 +1308,7 @@ typedef union { @endcode @note MSR_HASWELL_E_U_PMON_BOX_STATUS is defined as MSR_U_PMON_BOX_STATUS in SDM. **/ -#define MSR_HASWELL_E_U_PMON_BOX_STATUS 0x00000708 - +#define MSR_HASWELL_E_U_PMON_BOX_STATUS 0x00000708 /** Package. Uncore U-box perfmon counter 0. @@ -1353,8 +1326,7 @@ typedef union { @endcode @note MSR_HASWELL_E_U_PMON_CTR0 is defined as MSR_U_PMON_CTR0 in SDM. **/ -#define MSR_HASWELL_E_U_PMON_CTR0 0x00000709 - +#define MSR_HASWELL_E_U_PMON_CTR0 0x00000709 /** Package. Uncore U-box perfmon counter 1. @@ -1372,8 +1344,7 @@ typedef union { @endcode @note MSR_HASWELL_E_U_PMON_CTR1 is defined as MSR_U_PMON_CTR1 in SDM. **/ -#define MSR_HASWELL_E_U_PMON_CTR1 0x0000070A - +#define MSR_HASWELL_E_U_PMON_CTR1 0x0000070A /** Package. Uncore PCU perfmon for PCU-box-wide control. @@ -1391,8 +1362,7 @@ typedef union { @endcode @note MSR_HASWELL_E_PCU_PMON_BOX_CTL is defined as MSR_PCU_PMON_BOX_CTL in SDM. **/ -#define MSR_HASWELL_E_PCU_PMON_BOX_CTL 0x00000710 - +#define MSR_HASWELL_E_PCU_PMON_BOX_CTL 0x00000710 /** Package. Uncore PCU perfmon event select for PCU counter 0. @@ -1410,8 +1380,7 @@ typedef union { @endcode @note MSR_HASWELL_E_PCU_PMON_EVNTSEL0 is defined as MSR_PCU_PMON_EVNTSEL0 in SDM. **/ -#define MSR_HASWELL_E_PCU_PMON_EVNTSEL0 0x00000711 - +#define MSR_HASWELL_E_PCU_PMON_EVNTSEL0 0x00000711 /** Package. Uncore PCU perfmon event select for PCU counter 1. @@ -1429,8 +1398,7 @@ typedef union { @endcode @note MSR_HASWELL_E_PCU_PMON_EVNTSEL1 is defined as MSR_PCU_PMON_EVNTSEL1 in SDM. **/ -#define MSR_HASWELL_E_PCU_PMON_EVNTSEL1 0x00000712 - +#define MSR_HASWELL_E_PCU_PMON_EVNTSEL1 0x00000712 /** Package. Uncore PCU perfmon event select for PCU counter 2. @@ -1448,8 +1416,7 @@ typedef union { @endcode @note MSR_HASWELL_E_PCU_PMON_EVNTSEL2 is defined as MSR_PCU_PMON_EVNTSEL2 in SDM. **/ -#define MSR_HASWELL_E_PCU_PMON_EVNTSEL2 0x00000713 - +#define MSR_HASWELL_E_PCU_PMON_EVNTSEL2 0x00000713 /** Package. Uncore PCU perfmon event select for PCU counter 3. @@ -1467,8 +1434,7 @@ typedef union { @endcode @note MSR_HASWELL_E_PCU_PMON_EVNTSEL3 is defined as MSR_PCU_PMON_EVNTSEL3 in SDM. **/ -#define MSR_HASWELL_E_PCU_PMON_EVNTSEL3 0x00000714 - +#define MSR_HASWELL_E_PCU_PMON_EVNTSEL3 0x00000714 /** Package. Uncore PCU perfmon box-wide filter. @@ -1486,8 +1452,7 @@ typedef union { @endcode @note MSR_HASWELL_E_PCU_PMON_BOX_FILTER is defined as MSR_PCU_PMON_BOX_FILTER in SDM. **/ -#define MSR_HASWELL_E_PCU_PMON_BOX_FILTER 0x00000715 - +#define MSR_HASWELL_E_PCU_PMON_BOX_FILTER 0x00000715 /** Package. Uncore PCU perfmon box wide status. @@ -1505,8 +1470,7 @@ typedef union { @endcode @note MSR_HASWELL_E_PCU_PMON_BOX_STATUS is defined as MSR_PCU_PMON_BOX_STATUS in SDM. **/ -#define MSR_HASWELL_E_PCU_PMON_BOX_STATUS 0x00000716 - +#define MSR_HASWELL_E_PCU_PMON_BOX_STATUS 0x00000716 /** Package. Uncore PCU perfmon counter 0. @@ -1524,8 +1488,7 @@ typedef union { @endcode @note MSR_HASWELL_E_PCU_PMON_CTR0 is defined as MSR_PCU_PMON_CTR0 in SDM. **/ -#define MSR_HASWELL_E_PCU_PMON_CTR0 0x00000717 - +#define MSR_HASWELL_E_PCU_PMON_CTR0 0x00000717 /** Package. Uncore PCU perfmon counter 1. @@ -1543,8 +1506,7 @@ typedef union { @endcode @note MSR_HASWELL_E_PCU_PMON_CTR1 is defined as MSR_PCU_PMON_CTR1 in SDM. **/ -#define MSR_HASWELL_E_PCU_PMON_CTR1 0x00000718 - +#define MSR_HASWELL_E_PCU_PMON_CTR1 0x00000718 /** Package. Uncore PCU perfmon counter 2. @@ -1562,8 +1524,7 @@ typedef union { @endcode @note MSR_HASWELL_E_PCU_PMON_CTR2 is defined as MSR_PCU_PMON_CTR2 in SDM. **/ -#define MSR_HASWELL_E_PCU_PMON_CTR2 0x00000719 - +#define MSR_HASWELL_E_PCU_PMON_CTR2 0x00000719 /** Package. Uncore PCU perfmon counter 3. @@ -1581,8 +1542,7 @@ typedef union { @endcode @note MSR_HASWELL_E_PCU_PMON_CTR3 is defined as MSR_PCU_PMON_CTR3 in SDM. **/ -#define MSR_HASWELL_E_PCU_PMON_CTR3 0x0000071A - +#define MSR_HASWELL_E_PCU_PMON_CTR3 0x0000071A /** Package. Uncore SBo 0 perfmon for SBo 0 box-wide control. @@ -1600,8 +1560,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S0_PMON_BOX_CTL is defined as MSR_S0_PMON_BOX_CTL in SDM. **/ -#define MSR_HASWELL_E_S0_PMON_BOX_CTL 0x00000720 - +#define MSR_HASWELL_E_S0_PMON_BOX_CTL 0x00000720 /** Package. Uncore SBo 0 perfmon event select for SBo 0 counter 0. @@ -1619,8 +1578,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S0_PMON_EVNTSEL0 is defined as MSR_S0_PMON_EVNTSEL0 in SDM. **/ -#define MSR_HASWELL_E_S0_PMON_EVNTSEL0 0x00000721 - +#define MSR_HASWELL_E_S0_PMON_EVNTSEL0 0x00000721 /** Package. Uncore SBo 0 perfmon event select for SBo 0 counter 1. @@ -1638,8 +1596,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S0_PMON_EVNTSEL1 is defined as MSR_S0_PMON_EVNTSEL1 in SDM. **/ -#define MSR_HASWELL_E_S0_PMON_EVNTSEL1 0x00000722 - +#define MSR_HASWELL_E_S0_PMON_EVNTSEL1 0x00000722 /** Package. Uncore SBo 0 perfmon event select for SBo 0 counter 2. @@ -1657,8 +1614,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S0_PMON_EVNTSEL2 is defined as MSR_S0_PMON_EVNTSEL2 in SDM. **/ -#define MSR_HASWELL_E_S0_PMON_EVNTSEL2 0x00000723 - +#define MSR_HASWELL_E_S0_PMON_EVNTSEL2 0x00000723 /** Package. Uncore SBo 0 perfmon event select for SBo 0 counter 3. @@ -1676,8 +1632,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S0_PMON_EVNTSEL3 is defined as MSR_S0_PMON_EVNTSEL3 in SDM. **/ -#define MSR_HASWELL_E_S0_PMON_EVNTSEL3 0x00000724 - +#define MSR_HASWELL_E_S0_PMON_EVNTSEL3 0x00000724 /** Package. Uncore SBo 0 perfmon box-wide filter. @@ -1695,8 +1650,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S0_PMON_BOX_FILTER is defined as MSR_S0_PMON_BOX_FILTER in SDM. **/ -#define MSR_HASWELL_E_S0_PMON_BOX_FILTER 0x00000725 - +#define MSR_HASWELL_E_S0_PMON_BOX_FILTER 0x00000725 /** Package. Uncore SBo 0 perfmon counter 0. @@ -1714,8 +1668,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S0_PMON_CTR0 is defined as MSR_S0_PMON_CTR0 in SDM. **/ -#define MSR_HASWELL_E_S0_PMON_CTR0 0x00000726 - +#define MSR_HASWELL_E_S0_PMON_CTR0 0x00000726 /** Package. Uncore SBo 0 perfmon counter 1. @@ -1733,8 +1686,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S0_PMON_CTR1 is defined as MSR_S0_PMON_CTR1 in SDM. **/ -#define MSR_HASWELL_E_S0_PMON_CTR1 0x00000727 - +#define MSR_HASWELL_E_S0_PMON_CTR1 0x00000727 /** Package. Uncore SBo 0 perfmon counter 2. @@ -1752,8 +1704,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S0_PMON_CTR2 is defined as MSR_S0_PMON_CTR2 in SDM. **/ -#define MSR_HASWELL_E_S0_PMON_CTR2 0x00000728 - +#define MSR_HASWELL_E_S0_PMON_CTR2 0x00000728 /** Package. Uncore SBo 0 perfmon counter 3. @@ -1771,8 +1722,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S0_PMON_CTR3 is defined as MSR_S0_PMON_CTR3 in SDM. **/ -#define MSR_HASWELL_E_S0_PMON_CTR3 0x00000729 - +#define MSR_HASWELL_E_S0_PMON_CTR3 0x00000729 /** Package. Uncore SBo 1 perfmon for SBo 1 box-wide control. @@ -1790,8 +1740,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S1_PMON_BOX_CTL is defined as MSR_S1_PMON_BOX_CTL in SDM. **/ -#define MSR_HASWELL_E_S1_PMON_BOX_CTL 0x0000072A - +#define MSR_HASWELL_E_S1_PMON_BOX_CTL 0x0000072A /** Package. Uncore SBo 1 perfmon event select for SBo 1 counter 0. @@ -1809,8 +1758,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S1_PMON_EVNTSEL0 is defined as MSR_S1_PMON_EVNTSEL0 in SDM. **/ -#define MSR_HASWELL_E_S1_PMON_EVNTSEL0 0x0000072B - +#define MSR_HASWELL_E_S1_PMON_EVNTSEL0 0x0000072B /** Package. Uncore SBo 1 perfmon event select for SBo 1 counter 1. @@ -1828,8 +1776,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S1_PMON_EVNTSEL1 is defined as MSR_S1_PMON_EVNTSEL1 in SDM. **/ -#define MSR_HASWELL_E_S1_PMON_EVNTSEL1 0x0000072C - +#define MSR_HASWELL_E_S1_PMON_EVNTSEL1 0x0000072C /** Package. Uncore SBo 1 perfmon event select for SBo 1 counter 2. @@ -1847,8 +1794,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S1_PMON_EVNTSEL2 is defined as MSR_S1_PMON_EVNTSEL2 in SDM. **/ -#define MSR_HASWELL_E_S1_PMON_EVNTSEL2 0x0000072D - +#define MSR_HASWELL_E_S1_PMON_EVNTSEL2 0x0000072D /** Package. Uncore SBo 1 perfmon event select for SBo 1 counter 3. @@ -1866,8 +1812,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S1_PMON_EVNTSEL3 is defined as MSR_S1_PMON_EVNTSEL3 in SDM. **/ -#define MSR_HASWELL_E_S1_PMON_EVNTSEL3 0x0000072E - +#define MSR_HASWELL_E_S1_PMON_EVNTSEL3 0x0000072E /** Package. Uncore SBo 1 perfmon box-wide filter. @@ -1885,8 +1830,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S1_PMON_BOX_FILTER is defined as MSR_S1_PMON_BOX_FILTER in SDM. **/ -#define MSR_HASWELL_E_S1_PMON_BOX_FILTER 0x0000072F - +#define MSR_HASWELL_E_S1_PMON_BOX_FILTER 0x0000072F /** Package. Uncore SBo 1 perfmon counter 0. @@ -1904,8 +1848,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S1_PMON_CTR0 is defined as MSR_S1_PMON_CTR0 in SDM. **/ -#define MSR_HASWELL_E_S1_PMON_CTR0 0x00000730 - +#define MSR_HASWELL_E_S1_PMON_CTR0 0x00000730 /** Package. Uncore SBo 1 perfmon counter 1. @@ -1923,8 +1866,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S1_PMON_CTR1 is defined as MSR_S1_PMON_CTR1 in SDM. **/ -#define MSR_HASWELL_E_S1_PMON_CTR1 0x00000731 - +#define MSR_HASWELL_E_S1_PMON_CTR1 0x00000731 /** Package. Uncore SBo 1 perfmon counter 2. @@ -1942,8 +1884,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S1_PMON_CTR2 is defined as MSR_S1_PMON_CTR2 in SDM. **/ -#define MSR_HASWELL_E_S1_PMON_CTR2 0x00000732 - +#define MSR_HASWELL_E_S1_PMON_CTR2 0x00000732 /** Package. Uncore SBo 1 perfmon counter 3. @@ -1961,8 +1902,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S1_PMON_CTR3 is defined as MSR_S1_PMON_CTR3 in SDM. **/ -#define MSR_HASWELL_E_S1_PMON_CTR3 0x00000733 - +#define MSR_HASWELL_E_S1_PMON_CTR3 0x00000733 /** Package. Uncore SBo 2 perfmon for SBo 2 box-wide control. @@ -1980,8 +1920,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S2_PMON_BOX_CTL is defined as MSR_S2_PMON_BOX_CTL in SDM. **/ -#define MSR_HASWELL_E_S2_PMON_BOX_CTL 0x00000734 - +#define MSR_HASWELL_E_S2_PMON_BOX_CTL 0x00000734 /** Package. Uncore SBo 2 perfmon event select for SBo 2 counter 0. @@ -1999,8 +1938,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S2_PMON_EVNTSEL0 is defined as MSR_S2_PMON_EVNTSEL0 in SDM. **/ -#define MSR_HASWELL_E_S2_PMON_EVNTSEL0 0x00000735 - +#define MSR_HASWELL_E_S2_PMON_EVNTSEL0 0x00000735 /** Package. Uncore SBo 2 perfmon event select for SBo 2 counter 1. @@ -2018,8 +1956,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S2_PMON_EVNTSEL1 is defined as MSR_S2_PMON_EVNTSEL1 in SDM. **/ -#define MSR_HASWELL_E_S2_PMON_EVNTSEL1 0x00000736 - +#define MSR_HASWELL_E_S2_PMON_EVNTSEL1 0x00000736 /** Package. Uncore SBo 2 perfmon event select for SBo 2 counter 2. @@ -2037,8 +1974,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S2_PMON_EVNTSEL2 is defined as MSR_S2_PMON_EVNTSEL2 in SDM. **/ -#define MSR_HASWELL_E_S2_PMON_EVNTSEL2 0x00000737 - +#define MSR_HASWELL_E_S2_PMON_EVNTSEL2 0x00000737 /** Package. Uncore SBo 2 perfmon event select for SBo 2 counter 3. @@ -2056,8 +1992,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S2_PMON_EVNTSEL3 is defined as MSR_S2_PMON_EVNTSEL3 in SDM. **/ -#define MSR_HASWELL_E_S2_PMON_EVNTSEL3 0x00000738 - +#define MSR_HASWELL_E_S2_PMON_EVNTSEL3 0x00000738 /** Package. Uncore SBo 2 perfmon box-wide filter. @@ -2075,8 +2010,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S2_PMON_BOX_FILTER is defined as MSR_S2_PMON_BOX_FILTER in SDM. **/ -#define MSR_HASWELL_E_S2_PMON_BOX_FILTER 0x00000739 - +#define MSR_HASWELL_E_S2_PMON_BOX_FILTER 0x00000739 /** Package. Uncore SBo 2 perfmon counter 0. @@ -2094,8 +2028,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S2_PMON_CTR0 is defined as MSR_S2_PMON_CTR0 in SDM. **/ -#define MSR_HASWELL_E_S2_PMON_CTR0 0x0000073A - +#define MSR_HASWELL_E_S2_PMON_CTR0 0x0000073A /** Package. Uncore SBo 2 perfmon counter 1. @@ -2113,8 +2046,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S2_PMON_CTR1 is defined as MSR_S2_PMON_CTR1 in SDM. **/ -#define MSR_HASWELL_E_S2_PMON_CTR1 0x0000073B - +#define MSR_HASWELL_E_S2_PMON_CTR1 0x0000073B /** Package. Uncore SBo 2 perfmon counter 2. @@ -2132,8 +2064,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S2_PMON_CTR2 is defined as MSR_S2_PMON_CTR2 in SDM. **/ -#define MSR_HASWELL_E_S2_PMON_CTR2 0x0000073C - +#define MSR_HASWELL_E_S2_PMON_CTR2 0x0000073C /** Package. Uncore SBo 2 perfmon counter 3. @@ -2151,8 +2082,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S2_PMON_CTR3 is defined as MSR_S2_PMON_CTR3 in SDM. **/ -#define MSR_HASWELL_E_S2_PMON_CTR3 0x0000073D - +#define MSR_HASWELL_E_S2_PMON_CTR3 0x0000073D /** Package. Uncore SBo 3 perfmon for SBo 3 box-wide control. @@ -2170,8 +2100,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S3_PMON_BOX_CTL is defined as MSR_S3_PMON_BOX_CTL in SDM. **/ -#define MSR_HASWELL_E_S3_PMON_BOX_CTL 0x0000073E - +#define MSR_HASWELL_E_S3_PMON_BOX_CTL 0x0000073E /** Package. Uncore SBo 3 perfmon event select for SBo 3 counter 0. @@ -2189,8 +2118,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S3_PMON_EVNTSEL0 is defined as MSR_S3_PMON_EVNTSEL0 in SDM. **/ -#define MSR_HASWELL_E_S3_PMON_EVNTSEL0 0x0000073F - +#define MSR_HASWELL_E_S3_PMON_EVNTSEL0 0x0000073F /** Package. Uncore SBo 3 perfmon event select for SBo 3 counter 1. @@ -2208,8 +2136,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S3_PMON_EVNTSEL1 is defined as MSR_S3_PMON_EVNTSEL1 in SDM. **/ -#define MSR_HASWELL_E_S3_PMON_EVNTSEL1 0x00000740 - +#define MSR_HASWELL_E_S3_PMON_EVNTSEL1 0x00000740 /** Package. Uncore SBo 3 perfmon event select for SBo 3 counter 2. @@ -2227,8 +2154,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S3_PMON_EVNTSEL2 is defined as MSR_S3_PMON_EVNTSEL2 in SDM. **/ -#define MSR_HASWELL_E_S3_PMON_EVNTSEL2 0x00000741 - +#define MSR_HASWELL_E_S3_PMON_EVNTSEL2 0x00000741 /** Package. Uncore SBo 3 perfmon event select for SBo 3 counter 3. @@ -2246,8 +2172,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S3_PMON_EVNTSEL3 is defined as MSR_S3_PMON_EVNTSEL3 in SDM. **/ -#define MSR_HASWELL_E_S3_PMON_EVNTSEL3 0x00000742 - +#define MSR_HASWELL_E_S3_PMON_EVNTSEL3 0x00000742 /** Package. Uncore SBo 3 perfmon box-wide filter. @@ -2265,8 +2190,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S3_PMON_BOX_FILTER is defined as MSR_S3_PMON_BOX_FILTER in SDM. **/ -#define MSR_HASWELL_E_S3_PMON_BOX_FILTER 0x00000743 - +#define MSR_HASWELL_E_S3_PMON_BOX_FILTER 0x00000743 /** Package. Uncore SBo 3 perfmon counter 0. @@ -2284,8 +2208,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S3_PMON_CTR0 is defined as MSR_S3_PMON_CTR0 in SDM. **/ -#define MSR_HASWELL_E_S3_PMON_CTR0 0x00000744 - +#define MSR_HASWELL_E_S3_PMON_CTR0 0x00000744 /** Package. Uncore SBo 3 perfmon counter 1. @@ -2303,8 +2226,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S3_PMON_CTR1 is defined as MSR_S3_PMON_CTR1 in SDM. **/ -#define MSR_HASWELL_E_S3_PMON_CTR1 0x00000745 - +#define MSR_HASWELL_E_S3_PMON_CTR1 0x00000745 /** Package. Uncore SBo 3 perfmon counter 2. @@ -2322,8 +2244,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S3_PMON_CTR2 is defined as MSR_S3_PMON_CTR2 in SDM. **/ -#define MSR_HASWELL_E_S3_PMON_CTR2 0x00000746 - +#define MSR_HASWELL_E_S3_PMON_CTR2 0x00000746 /** Package. Uncore SBo 3 perfmon counter 3. @@ -2341,8 +2262,7 @@ typedef union { @endcode @note MSR_HASWELL_E_S3_PMON_CTR3 is defined as MSR_S3_PMON_CTR3 in SDM. **/ -#define MSR_HASWELL_E_S3_PMON_CTR3 0x00000747 - +#define MSR_HASWELL_E_S3_PMON_CTR3 0x00000747 /** Package. Uncore C-box 0 perfmon for box-wide control. @@ -2360,8 +2280,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C0_PMON_BOX_CTL is defined as MSR_C0_PMON_BOX_CTL in SDM. **/ -#define MSR_HASWELL_E_C0_PMON_BOX_CTL 0x00000E00 - +#define MSR_HASWELL_E_C0_PMON_BOX_CTL 0x00000E00 /** Package. Uncore C-box 0 perfmon event select for C-box 0 counter 0. @@ -2379,8 +2298,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C0_PMON_EVNTSEL0 is defined as MSR_C0_PMON_EVNTSEL0 in SDM. **/ -#define MSR_HASWELL_E_C0_PMON_EVNTSEL0 0x00000E01 - +#define MSR_HASWELL_E_C0_PMON_EVNTSEL0 0x00000E01 /** Package. Uncore C-box 0 perfmon event select for C-box 0 counter 1. @@ -2398,8 +2316,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C0_PMON_EVNTSEL1 is defined as MSR_C0_PMON_EVNTSEL1 in SDM. **/ -#define MSR_HASWELL_E_C0_PMON_EVNTSEL1 0x00000E02 - +#define MSR_HASWELL_E_C0_PMON_EVNTSEL1 0x00000E02 /** Package. Uncore C-box 0 perfmon event select for C-box 0 counter 2. @@ -2417,8 +2334,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C0_PMON_EVNTSEL2 is defined as MSR_C0_PMON_EVNTSEL2 in SDM. **/ -#define MSR_HASWELL_E_C0_PMON_EVNTSEL2 0x00000E03 - +#define MSR_HASWELL_E_C0_PMON_EVNTSEL2 0x00000E03 /** Package. Uncore C-box 0 perfmon event select for C-box 0 counter 3. @@ -2436,8 +2352,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C0_PMON_EVNTSEL3 is defined as MSR_C0_PMON_EVNTSEL3 in SDM. **/ -#define MSR_HASWELL_E_C0_PMON_EVNTSEL3 0x00000E04 - +#define MSR_HASWELL_E_C0_PMON_EVNTSEL3 0x00000E04 /** Package. Uncore C-box 0 perfmon box wide filter 0. @@ -2455,8 +2370,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C0_PMON_BOX_FILTER0 is defined as MSR_C0_PMON_BOX_FILTER0 in SDM. **/ -#define MSR_HASWELL_E_C0_PMON_BOX_FILTER0 0x00000E05 - +#define MSR_HASWELL_E_C0_PMON_BOX_FILTER0 0x00000E05 /** Package. Uncore C-box 0 perfmon box wide filter 1. @@ -2474,8 +2388,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C0_PMON_BOX_FILTER1 is defined as MSR_C0_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_HASWELL_E_C0_PMON_BOX_FILTER1 0x00000E06 - +#define MSR_HASWELL_E_C0_PMON_BOX_FILTER1 0x00000E06 /** Package. Uncore C-box 0 perfmon box wide status. @@ -2493,8 +2406,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C0_PMON_BOX_STATUS is defined as MSR_C0_PMON_BOX_STATUS in SDM. **/ -#define MSR_HASWELL_E_C0_PMON_BOX_STATUS 0x00000E07 - +#define MSR_HASWELL_E_C0_PMON_BOX_STATUS 0x00000E07 /** Package. Uncore C-box 0 perfmon counter 0. @@ -2512,8 +2424,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C0_PMON_CTR0 is defined as MSR_C0_PMON_CTR0 in SDM. **/ -#define MSR_HASWELL_E_C0_PMON_CTR0 0x00000E08 - +#define MSR_HASWELL_E_C0_PMON_CTR0 0x00000E08 /** Package. Uncore C-box 0 perfmon counter 1. @@ -2531,8 +2442,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C0_PMON_CTR1 is defined as MSR_C0_PMON_CTR1 in SDM. **/ -#define MSR_HASWELL_E_C0_PMON_CTR1 0x00000E09 - +#define MSR_HASWELL_E_C0_PMON_CTR1 0x00000E09 /** Package. Uncore C-box 0 perfmon counter 2. @@ -2550,8 +2460,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C0_PMON_CTR2 is defined as MSR_C0_PMON_CTR2 in SDM. **/ -#define MSR_HASWELL_E_C0_PMON_CTR2 0x00000E0A - +#define MSR_HASWELL_E_C0_PMON_CTR2 0x00000E0A /** Package. Uncore C-box 0 perfmon counter 3. @@ -2569,8 +2478,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C0_PMON_CTR3 is defined as MSR_C0_PMON_CTR3 in SDM. **/ -#define MSR_HASWELL_E_C0_PMON_CTR3 0x00000E0B - +#define MSR_HASWELL_E_C0_PMON_CTR3 0x00000E0B /** Package. Uncore C-box 1 perfmon for box-wide control. @@ -2588,8 +2496,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C1_PMON_BOX_CTL is defined as MSR_C1_PMON_BOX_CTL in SDM. **/ -#define MSR_HASWELL_E_C1_PMON_BOX_CTL 0x00000E10 - +#define MSR_HASWELL_E_C1_PMON_BOX_CTL 0x00000E10 /** Package. Uncore C-box 1 perfmon event select for C-box 1 counter 0. @@ -2607,8 +2514,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C1_PMON_EVNTSEL0 is defined as MSR_C1_PMON_EVNTSEL0 in SDM. **/ -#define MSR_HASWELL_E_C1_PMON_EVNTSEL0 0x00000E11 - +#define MSR_HASWELL_E_C1_PMON_EVNTSEL0 0x00000E11 /** Package. Uncore C-box 1 perfmon event select for C-box 1 counter 1. @@ -2626,8 +2532,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C1_PMON_EVNTSEL1 is defined as MSR_C1_PMON_EVNTSEL1 in SDM. **/ -#define MSR_HASWELL_E_C1_PMON_EVNTSEL1 0x00000E12 - +#define MSR_HASWELL_E_C1_PMON_EVNTSEL1 0x00000E12 /** Package. Uncore C-box 1 perfmon event select for C-box 1 counter 2. @@ -2645,8 +2550,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C1_PMON_EVNTSEL2 is defined as MSR_C1_PMON_EVNTSEL2 in SDM. **/ -#define MSR_HASWELL_E_C1_PMON_EVNTSEL2 0x00000E13 - +#define MSR_HASWELL_E_C1_PMON_EVNTSEL2 0x00000E13 /** Package. Uncore C-box 1 perfmon event select for C-box 1 counter 3. @@ -2664,8 +2568,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C1_PMON_EVNTSEL3 is defined as MSR_C1_PMON_EVNTSEL3 in SDM. **/ -#define MSR_HASWELL_E_C1_PMON_EVNTSEL3 0x00000E14 - +#define MSR_HASWELL_E_C1_PMON_EVNTSEL3 0x00000E14 /** Package. Uncore C-box 1 perfmon box wide filter 0. @@ -2683,8 +2586,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C1_PMON_BOX_FILTER0 is defined as MSR_C1_PMON_BOX_FILTER0 in SDM. **/ -#define MSR_HASWELL_E_C1_PMON_BOX_FILTER0 0x00000E15 - +#define MSR_HASWELL_E_C1_PMON_BOX_FILTER0 0x00000E15 /** Package. Uncore C-box 1 perfmon box wide filter1. @@ -2702,8 +2604,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C1_PMON_BOX_FILTER1 is defined as MSR_C1_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_HASWELL_E_C1_PMON_BOX_FILTER1 0x00000E16 - +#define MSR_HASWELL_E_C1_PMON_BOX_FILTER1 0x00000E16 /** Package. Uncore C-box 1 perfmon box wide status. @@ -2721,8 +2622,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C1_PMON_BOX_STATUS is defined as MSR_C1_PMON_BOX_STATUS in SDM. **/ -#define MSR_HASWELL_E_C1_PMON_BOX_STATUS 0x00000E17 - +#define MSR_HASWELL_E_C1_PMON_BOX_STATUS 0x00000E17 /** Package. Uncore C-box 1 perfmon counter 0. @@ -2740,8 +2640,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C1_PMON_CTR0 is defined as MSR_C1_PMON_CTR0 in SDM. **/ -#define MSR_HASWELL_E_C1_PMON_CTR0 0x00000E18 - +#define MSR_HASWELL_E_C1_PMON_CTR0 0x00000E18 /** Package. Uncore C-box 1 perfmon counter 1. @@ -2759,8 +2658,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C1_PMON_CTR1 is defined as MSR_C1_PMON_CTR1 in SDM. **/ -#define MSR_HASWELL_E_C1_PMON_CTR1 0x00000E19 - +#define MSR_HASWELL_E_C1_PMON_CTR1 0x00000E19 /** Package. Uncore C-box 1 perfmon counter 2. @@ -2778,8 +2676,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C1_PMON_CTR2 is defined as MSR_C1_PMON_CTR2 in SDM. **/ -#define MSR_HASWELL_E_C1_PMON_CTR2 0x00000E1A - +#define MSR_HASWELL_E_C1_PMON_CTR2 0x00000E1A /** Package. Uncore C-box 1 perfmon counter 3. @@ -2797,8 +2694,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C1_PMON_CTR3 is defined as MSR_C1_PMON_CTR3 in SDM. **/ -#define MSR_HASWELL_E_C1_PMON_CTR3 0x00000E1B - +#define MSR_HASWELL_E_C1_PMON_CTR3 0x00000E1B /** Package. Uncore C-box 2 perfmon for box-wide control. @@ -2816,8 +2712,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C2_PMON_BOX_CTL is defined as MSR_C2_PMON_BOX_CTL in SDM. **/ -#define MSR_HASWELL_E_C2_PMON_BOX_CTL 0x00000E20 - +#define MSR_HASWELL_E_C2_PMON_BOX_CTL 0x00000E20 /** Package. Uncore C-box 2 perfmon event select for C-box 2 counter 0. @@ -2835,8 +2730,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C2_PMON_EVNTSEL0 is defined as MSR_C2_PMON_EVNTSEL0 in SDM. **/ -#define MSR_HASWELL_E_C2_PMON_EVNTSEL0 0x00000E21 - +#define MSR_HASWELL_E_C2_PMON_EVNTSEL0 0x00000E21 /** Package. Uncore C-box 2 perfmon event select for C-box 2 counter 1. @@ -2854,8 +2748,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C2_PMON_EVNTSEL1 is defined as MSR_C2_PMON_EVNTSEL1 in SDM. **/ -#define MSR_HASWELL_E_C2_PMON_EVNTSEL1 0x00000E22 - +#define MSR_HASWELL_E_C2_PMON_EVNTSEL1 0x00000E22 /** Package. Uncore C-box 2 perfmon event select for C-box 2 counter 2. @@ -2873,8 +2766,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C2_PMON_EVNTSEL2 is defined as MSR_C2_PMON_EVNTSEL2 in SDM. **/ -#define MSR_HASWELL_E_C2_PMON_EVNTSEL2 0x00000E23 - +#define MSR_HASWELL_E_C2_PMON_EVNTSEL2 0x00000E23 /** Package. Uncore C-box 2 perfmon event select for C-box 2 counter 3. @@ -2892,8 +2784,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C2_PMON_EVNTSEL3 is defined as MSR_C2_PMON_EVNTSEL3 in SDM. **/ -#define MSR_HASWELL_E_C2_PMON_EVNTSEL3 0x00000E24 - +#define MSR_HASWELL_E_C2_PMON_EVNTSEL3 0x00000E24 /** Package. Uncore C-box 2 perfmon box wide filter 0. @@ -2911,8 +2802,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C2_PMON_BOX_FILTER0 is defined as MSR_C2_PMON_BOX_FILTER0 in SDM. **/ -#define MSR_HASWELL_E_C2_PMON_BOX_FILTER0 0x00000E25 - +#define MSR_HASWELL_E_C2_PMON_BOX_FILTER0 0x00000E25 /** Package. Uncore C-box 2 perfmon box wide filter1. @@ -2930,8 +2820,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C2_PMON_BOX_FILTER1 is defined as MSR_C2_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_HASWELL_E_C2_PMON_BOX_FILTER1 0x00000E26 - +#define MSR_HASWELL_E_C2_PMON_BOX_FILTER1 0x00000E26 /** Package. Uncore C-box 2 perfmon box wide status. @@ -2949,8 +2838,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C2_PMON_BOX_STATUS is defined as MSR_C2_PMON_BOX_STATUS in SDM. **/ -#define MSR_HASWELL_E_C2_PMON_BOX_STATUS 0x00000E27 - +#define MSR_HASWELL_E_C2_PMON_BOX_STATUS 0x00000E27 /** Package. Uncore C-box 2 perfmon counter 0. @@ -2968,8 +2856,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C2_PMON_CTR0 is defined as MSR_C2_PMON_CTR0 in SDM. **/ -#define MSR_HASWELL_E_C2_PMON_CTR0 0x00000E28 - +#define MSR_HASWELL_E_C2_PMON_CTR0 0x00000E28 /** Package. Uncore C-box 2 perfmon counter 1. @@ -2987,8 +2874,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C2_PMON_CTR1 is defined as MSR_C2_PMON_CTR1 in SDM. **/ -#define MSR_HASWELL_E_C2_PMON_CTR1 0x00000E29 - +#define MSR_HASWELL_E_C2_PMON_CTR1 0x00000E29 /** Package. Uncore C-box 2 perfmon counter 2. @@ -3006,8 +2892,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C2_PMON_CTR2 is defined as MSR_C2_PMON_CTR2 in SDM. **/ -#define MSR_HASWELL_E_C2_PMON_CTR2 0x00000E2A - +#define MSR_HASWELL_E_C2_PMON_CTR2 0x00000E2A /** Package. Uncore C-box 2 perfmon counter 3. @@ -3025,8 +2910,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C2_PMON_CTR3 is defined as MSR_C2_PMON_CTR3 in SDM. **/ -#define MSR_HASWELL_E_C2_PMON_CTR3 0x00000E2B - +#define MSR_HASWELL_E_C2_PMON_CTR3 0x00000E2B /** Package. Uncore C-box 3 perfmon for box-wide control. @@ -3044,8 +2928,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C3_PMON_BOX_CTL is defined as MSR_C3_PMON_BOX_CTL in SDM. **/ -#define MSR_HASWELL_E_C3_PMON_BOX_CTL 0x00000E30 - +#define MSR_HASWELL_E_C3_PMON_BOX_CTL 0x00000E30 /** Package. Uncore C-box 3 perfmon event select for C-box 3 counter 0. @@ -3063,8 +2946,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C3_PMON_EVNTSEL0 is defined as MSR_C3_PMON_EVNTSEL0 in SDM. **/ -#define MSR_HASWELL_E_C3_PMON_EVNTSEL0 0x00000E31 - +#define MSR_HASWELL_E_C3_PMON_EVNTSEL0 0x00000E31 /** Package. Uncore C-box 3 perfmon event select for C-box 3 counter 1. @@ -3082,8 +2964,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C3_PMON_EVNTSEL1 is defined as MSR_C3_PMON_EVNTSEL1 in SDM. **/ -#define MSR_HASWELL_E_C3_PMON_EVNTSEL1 0x00000E32 - +#define MSR_HASWELL_E_C3_PMON_EVNTSEL1 0x00000E32 /** Package. Uncore C-box 3 perfmon event select for C-box 3 counter 2. @@ -3101,8 +2982,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C3_PMON_EVNTSEL2 is defined as MSR_C3_PMON_EVNTSEL2 in SDM. **/ -#define MSR_HASWELL_E_C3_PMON_EVNTSEL2 0x00000E33 - +#define MSR_HASWELL_E_C3_PMON_EVNTSEL2 0x00000E33 /** Package. Uncore C-box 3 perfmon event select for C-box 3 counter 3. @@ -3120,8 +3000,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C3_PMON_EVNTSEL3 is defined as MSR_C3_PMON_EVNTSEL3 in SDM. **/ -#define MSR_HASWELL_E_C3_PMON_EVNTSEL3 0x00000E34 - +#define MSR_HASWELL_E_C3_PMON_EVNTSEL3 0x00000E34 /** Package. Uncore C-box 3 perfmon box wide filter 0. @@ -3139,8 +3018,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C3_PMON_BOX_FILTER0 is defined as MSR_C3_PMON_BOX_FILTER0 in SDM. **/ -#define MSR_HASWELL_E_C3_PMON_BOX_FILTER0 0x00000E35 - +#define MSR_HASWELL_E_C3_PMON_BOX_FILTER0 0x00000E35 /** Package. Uncore C-box 3 perfmon box wide filter1. @@ -3158,8 +3036,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C3_PMON_BOX_FILTER1 is defined as MSR_C3_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_HASWELL_E_C3_PMON_BOX_FILTER1 0x00000E36 - +#define MSR_HASWELL_E_C3_PMON_BOX_FILTER1 0x00000E36 /** Package. Uncore C-box 3 perfmon box wide status. @@ -3177,8 +3054,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C3_PMON_BOX_STATUS is defined as MSR_C3_PMON_BOX_STATUS in SDM. **/ -#define MSR_HASWELL_E_C3_PMON_BOX_STATUS 0x00000E37 - +#define MSR_HASWELL_E_C3_PMON_BOX_STATUS 0x00000E37 /** Package. Uncore C-box 3 perfmon counter 0. @@ -3196,8 +3072,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C3_PMON_CTR0 is defined as MSR_C3_PMON_CTR0 in SDM. **/ -#define MSR_HASWELL_E_C3_PMON_CTR0 0x00000E38 - +#define MSR_HASWELL_E_C3_PMON_CTR0 0x00000E38 /** Package. Uncore C-box 3 perfmon counter 1. @@ -3215,8 +3090,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C3_PMON_CTR1 is defined as MSR_C3_PMON_CTR1 in SDM. **/ -#define MSR_HASWELL_E_C3_PMON_CTR1 0x00000E39 - +#define MSR_HASWELL_E_C3_PMON_CTR1 0x00000E39 /** Package. Uncore C-box 3 perfmon counter 2. @@ -3234,8 +3108,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C3_PMON_CTR2 is defined as MSR_C3_PMON_CTR2 in SDM. **/ -#define MSR_HASWELL_E_C3_PMON_CTR2 0x00000E3A - +#define MSR_HASWELL_E_C3_PMON_CTR2 0x00000E3A /** Package. Uncore C-box 3 perfmon counter 3. @@ -3253,8 +3126,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C3_PMON_CTR3 is defined as MSR_C3_PMON_CTR3 in SDM. **/ -#define MSR_HASWELL_E_C3_PMON_CTR3 0x00000E3B - +#define MSR_HASWELL_E_C3_PMON_CTR3 0x00000E3B /** Package. Uncore C-box 4 perfmon for box-wide control. @@ -3272,8 +3144,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C4_PMON_BOX_CTL is defined as MSR_C4_PMON_BOX_CTL in SDM. **/ -#define MSR_HASWELL_E_C4_PMON_BOX_CTL 0x00000E40 - +#define MSR_HASWELL_E_C4_PMON_BOX_CTL 0x00000E40 /** Package. Uncore C-box 4 perfmon event select for C-box 4 counter 0. @@ -3291,8 +3162,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C4_PMON_EVNTSEL0 is defined as MSR_C4_PMON_EVNTSEL0 in SDM. **/ -#define MSR_HASWELL_E_C4_PMON_EVNTSEL0 0x00000E41 - +#define MSR_HASWELL_E_C4_PMON_EVNTSEL0 0x00000E41 /** Package. Uncore C-box 4 perfmon event select for C-box 4 counter 1. @@ -3310,8 +3180,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C4_PMON_EVNTSEL1 is defined as MSR_C4_PMON_EVNTSEL1 in SDM. **/ -#define MSR_HASWELL_E_C4_PMON_EVNTSEL1 0x00000E42 - +#define MSR_HASWELL_E_C4_PMON_EVNTSEL1 0x00000E42 /** Package. Uncore C-box 4 perfmon event select for C-box 4 counter 2. @@ -3329,8 +3198,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C4_PMON_EVNTSEL2 is defined as MSR_C4_PMON_EVNTSEL2 in SDM. **/ -#define MSR_HASWELL_E_C4_PMON_EVNTSEL2 0x00000E43 - +#define MSR_HASWELL_E_C4_PMON_EVNTSEL2 0x00000E43 /** Package. Uncore C-box 4 perfmon event select for C-box 4 counter 3. @@ -3348,8 +3216,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C4_PMON_EVNTSEL3 is defined as MSR_C4_PMON_EVNTSEL3 in SDM. **/ -#define MSR_HASWELL_E_C4_PMON_EVNTSEL3 0x00000E44 - +#define MSR_HASWELL_E_C4_PMON_EVNTSEL3 0x00000E44 /** Package. Uncore C-box 4 perfmon box wide filter 0. @@ -3367,8 +3234,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C4_PMON_BOX_FILTER0 is defined as MSR_C4_PMON_BOX_FILTER0 in SDM. **/ -#define MSR_HASWELL_E_C4_PMON_BOX_FILTER0 0x00000E45 - +#define MSR_HASWELL_E_C4_PMON_BOX_FILTER0 0x00000E45 /** Package. Uncore C-box 4 perfmon box wide filter1. @@ -3386,8 +3252,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C4_PMON_BOX_FILTER1 is defined as MSR_C4_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_HASWELL_E_C4_PMON_BOX_FILTER1 0x00000E46 - +#define MSR_HASWELL_E_C4_PMON_BOX_FILTER1 0x00000E46 /** Package. Uncore C-box 4 perfmon box wide status. @@ -3405,8 +3270,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C4_PMON_BOX_STATUS is defined as MSR_C4_PMON_BOX_STATUS in SDM. **/ -#define MSR_HASWELL_E_C4_PMON_BOX_STATUS 0x00000E47 - +#define MSR_HASWELL_E_C4_PMON_BOX_STATUS 0x00000E47 /** Package. Uncore C-box 4 perfmon counter 0. @@ -3424,8 +3288,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C4_PMON_CTR0 is defined as MSR_C4_PMON_CTR0 in SDM. **/ -#define MSR_HASWELL_E_C4_PMON_CTR0 0x00000E48 - +#define MSR_HASWELL_E_C4_PMON_CTR0 0x00000E48 /** Package. Uncore C-box 4 perfmon counter 1. @@ -3443,8 +3306,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C4_PMON_CTR1 is defined as MSR_C4_PMON_CTR1 in SDM. **/ -#define MSR_HASWELL_E_C4_PMON_CTR1 0x00000E49 - +#define MSR_HASWELL_E_C4_PMON_CTR1 0x00000E49 /** Package. Uncore C-box 4 perfmon counter 2. @@ -3462,8 +3324,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C4_PMON_CTR2 is defined as MSR_C4_PMON_CTR2 in SDM. **/ -#define MSR_HASWELL_E_C4_PMON_CTR2 0x00000E4A - +#define MSR_HASWELL_E_C4_PMON_CTR2 0x00000E4A /** Package. Uncore C-box 4 perfmon counter 3. @@ -3481,8 +3342,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C4_PMON_CTR3 is defined as MSR_C4_PMON_CTR3 in SDM. **/ -#define MSR_HASWELL_E_C4_PMON_CTR3 0x00000E4B - +#define MSR_HASWELL_E_C4_PMON_CTR3 0x00000E4B /** Package. Uncore C-box 5 perfmon for box-wide control. @@ -3500,8 +3360,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C5_PMON_BOX_CTL is defined as MSR_C5_PMON_BOX_CTL in SDM. **/ -#define MSR_HASWELL_E_C5_PMON_BOX_CTL 0x00000E50 - +#define MSR_HASWELL_E_C5_PMON_BOX_CTL 0x00000E50 /** Package. Uncore C-box 5 perfmon event select for C-box 5 counter 0. @@ -3519,8 +3378,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C5_PMON_EVNTSEL0 is defined as MSR_C5_PMON_EVNTSEL0 in SDM. **/ -#define MSR_HASWELL_E_C5_PMON_EVNTSEL0 0x00000E51 - +#define MSR_HASWELL_E_C5_PMON_EVNTSEL0 0x00000E51 /** Package. Uncore C-box 5 perfmon event select for C-box 5 counter 1. @@ -3538,8 +3396,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C5_PMON_EVNTSEL1 is defined as MSR_C5_PMON_EVNTSEL1 in SDM. **/ -#define MSR_HASWELL_E_C5_PMON_EVNTSEL1 0x00000E52 - +#define MSR_HASWELL_E_C5_PMON_EVNTSEL1 0x00000E52 /** Package. Uncore C-box 5 perfmon event select for C-box 5 counter 2. @@ -3557,8 +3414,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C5_PMON_EVNTSEL2 is defined as MSR_C5_PMON_EVNTSEL2 in SDM. **/ -#define MSR_HASWELL_E_C5_PMON_EVNTSEL2 0x00000E53 - +#define MSR_HASWELL_E_C5_PMON_EVNTSEL2 0x00000E53 /** Package. Uncore C-box 5 perfmon event select for C-box 5 counter 3. @@ -3576,8 +3432,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C5_PMON_EVNTSEL3 is defined as MSR_C5_PMON_EVNTSEL3 in SDM. **/ -#define MSR_HASWELL_E_C5_PMON_EVNTSEL3 0x00000E54 - +#define MSR_HASWELL_E_C5_PMON_EVNTSEL3 0x00000E54 /** Package. Uncore C-box 5 perfmon box wide filter 0. @@ -3595,8 +3450,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C5_PMON_BOX_FILTER0 is defined as MSR_C5_PMON_BOX_FILTER0 in SDM. **/ -#define MSR_HASWELL_E_C5_PMON_BOX_FILTER0 0x00000E55 - +#define MSR_HASWELL_E_C5_PMON_BOX_FILTER0 0x00000E55 /** Package. Uncore C-box 5 perfmon box wide filter1. @@ -3614,8 +3468,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C5_PMON_BOX_FILTER1 is defined as MSR_C5_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_HASWELL_E_C5_PMON_BOX_FILTER1 0x00000E56 - +#define MSR_HASWELL_E_C5_PMON_BOX_FILTER1 0x00000E56 /** Package. Uncore C-box 5 perfmon box wide status. @@ -3633,8 +3486,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C5_PMON_BOX_STATUS is defined as MSR_C5_PMON_BOX_STATUS in SDM. **/ -#define MSR_HASWELL_E_C5_PMON_BOX_STATUS 0x00000E57 - +#define MSR_HASWELL_E_C5_PMON_BOX_STATUS 0x00000E57 /** Package. Uncore C-box 5 perfmon counter 0. @@ -3652,8 +3504,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C5_PMON_CTR0 is defined as MSR_C5_PMON_CTR0 in SDM. **/ -#define MSR_HASWELL_E_C5_PMON_CTR0 0x00000E58 - +#define MSR_HASWELL_E_C5_PMON_CTR0 0x00000E58 /** Package. Uncore C-box 5 perfmon counter 1. @@ -3671,8 +3522,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C5_PMON_CTR1 is defined as MSR_C5_PMON_CTR1 in SDM. **/ -#define MSR_HASWELL_E_C5_PMON_CTR1 0x00000E59 - +#define MSR_HASWELL_E_C5_PMON_CTR1 0x00000E59 /** Package. Uncore C-box 5 perfmon counter 2. @@ -3690,8 +3540,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C5_PMON_CTR2 is defined as MSR_C5_PMON_CTR2 in SDM. **/ -#define MSR_HASWELL_E_C5_PMON_CTR2 0x00000E5A - +#define MSR_HASWELL_E_C5_PMON_CTR2 0x00000E5A /** Package. Uncore C-box 5 perfmon counter 3. @@ -3709,8 +3558,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C5_PMON_CTR3 is defined as MSR_C5_PMON_CTR3 in SDM. **/ -#define MSR_HASWELL_E_C5_PMON_CTR3 0x00000E5B - +#define MSR_HASWELL_E_C5_PMON_CTR3 0x00000E5B /** Package. Uncore C-box 6 perfmon for box-wide control. @@ -3728,8 +3576,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C6_PMON_BOX_CTL is defined as MSR_C6_PMON_BOX_CTL in SDM. **/ -#define MSR_HASWELL_E_C6_PMON_BOX_CTL 0x00000E60 - +#define MSR_HASWELL_E_C6_PMON_BOX_CTL 0x00000E60 /** Package. Uncore C-box 6 perfmon event select for C-box 6 counter 0. @@ -3747,8 +3594,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C6_PMON_EVNTSEL0 is defined as MSR_C6_PMON_EVNTSEL0 in SDM. **/ -#define MSR_HASWELL_E_C6_PMON_EVNTSEL0 0x00000E61 - +#define MSR_HASWELL_E_C6_PMON_EVNTSEL0 0x00000E61 /** Package. Uncore C-box 6 perfmon event select for C-box 6 counter 1. @@ -3766,8 +3612,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C6_PMON_EVNTSEL1 is defined as MSR_C6_PMON_EVNTSEL1 in SDM. **/ -#define MSR_HASWELL_E_C6_PMON_EVNTSEL1 0x00000E62 - +#define MSR_HASWELL_E_C6_PMON_EVNTSEL1 0x00000E62 /** Package. Uncore C-box 6 perfmon event select for C-box 6 counter 2. @@ -3785,8 +3630,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C6_PMON_EVNTSEL2 is defined as MSR_C6_PMON_EVNTSEL2 in SDM. **/ -#define MSR_HASWELL_E_C6_PMON_EVNTSEL2 0x00000E63 - +#define MSR_HASWELL_E_C6_PMON_EVNTSEL2 0x00000E63 /** Package. Uncore C-box 6 perfmon event select for C-box 6 counter 3. @@ -3804,8 +3648,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C6_PMON_EVNTSEL3 is defined as MSR_C6_PMON_EVNTSEL3 in SDM. **/ -#define MSR_HASWELL_E_C6_PMON_EVNTSEL3 0x00000E64 - +#define MSR_HASWELL_E_C6_PMON_EVNTSEL3 0x00000E64 /** Package. Uncore C-box 6 perfmon box wide filter 0. @@ -3823,8 +3666,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C6_PMON_BOX_FILTER0 is defined as MSR_C6_PMON_BOX_FILTER0 in SDM. **/ -#define MSR_HASWELL_E_C6_PMON_BOX_FILTER0 0x00000E65 - +#define MSR_HASWELL_E_C6_PMON_BOX_FILTER0 0x00000E65 /** Package. Uncore C-box 6 perfmon box wide filter1. @@ -3842,8 +3684,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C6_PMON_BOX_FILTER1 is defined as MSR_C6_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_HASWELL_E_C6_PMON_BOX_FILTER1 0x00000E66 - +#define MSR_HASWELL_E_C6_PMON_BOX_FILTER1 0x00000E66 /** Package. Uncore C-box 6 perfmon box wide status. @@ -3861,8 +3702,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C6_PMON_BOX_STATUS is defined as MSR_C6_PMON_BOX_STATUS in SDM. **/ -#define MSR_HASWELL_E_C6_PMON_BOX_STATUS 0x00000E67 - +#define MSR_HASWELL_E_C6_PMON_BOX_STATUS 0x00000E67 /** Package. Uncore C-box 6 perfmon counter 0. @@ -3880,8 +3720,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C6_PMON_CTR0 is defined as MSR_C6_PMON_CTR0 in SDM. **/ -#define MSR_HASWELL_E_C6_PMON_CTR0 0x00000E68 - +#define MSR_HASWELL_E_C6_PMON_CTR0 0x00000E68 /** Package. Uncore C-box 6 perfmon counter 1. @@ -3899,8 +3738,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C6_PMON_CTR1 is defined as MSR_C6_PMON_CTR1 in SDM. **/ -#define MSR_HASWELL_E_C6_PMON_CTR1 0x00000E69 - +#define MSR_HASWELL_E_C6_PMON_CTR1 0x00000E69 /** Package. Uncore C-box 6 perfmon counter 2. @@ -3918,8 +3756,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C6_PMON_CTR2 is defined as MSR_C6_PMON_CTR2 in SDM. **/ -#define MSR_HASWELL_E_C6_PMON_CTR2 0x00000E6A - +#define MSR_HASWELL_E_C6_PMON_CTR2 0x00000E6A /** Package. Uncore C-box 6 perfmon counter 3. @@ -3937,8 +3774,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C6_PMON_CTR3 is defined as MSR_C6_PMON_CTR3 in SDM. **/ -#define MSR_HASWELL_E_C6_PMON_CTR3 0x00000E6B - +#define MSR_HASWELL_E_C6_PMON_CTR3 0x00000E6B /** Package. Uncore C-box 7 perfmon for box-wide control. @@ -3956,8 +3792,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C7_PMON_BOX_CTL is defined as MSR_C7_PMON_BOX_CTL in SDM. **/ -#define MSR_HASWELL_E_C7_PMON_BOX_CTL 0x00000E70 - +#define MSR_HASWELL_E_C7_PMON_BOX_CTL 0x00000E70 /** Package. Uncore C-box 7 perfmon event select for C-box 7 counter 0. @@ -3975,8 +3810,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C7_PMON_EVNTSEL0 is defined as MSR_C7_PMON_EVNTSEL0 in SDM. **/ -#define MSR_HASWELL_E_C7_PMON_EVNTSEL0 0x00000E71 - +#define MSR_HASWELL_E_C7_PMON_EVNTSEL0 0x00000E71 /** Package. Uncore C-box 7 perfmon event select for C-box 7 counter 1. @@ -3994,8 +3828,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C7_PMON_EVNTSEL1 is defined as MSR_C7_PMON_EVNTSEL1 in SDM. **/ -#define MSR_HASWELL_E_C7_PMON_EVNTSEL1 0x00000E72 - +#define MSR_HASWELL_E_C7_PMON_EVNTSEL1 0x00000E72 /** Package. Uncore C-box 7 perfmon event select for C-box 7 counter 2. @@ -4013,8 +3846,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C7_PMON_EVNTSEL2 is defined as MSR_C7_PMON_EVNTSEL2 in SDM. **/ -#define MSR_HASWELL_E_C7_PMON_EVNTSEL2 0x00000E73 - +#define MSR_HASWELL_E_C7_PMON_EVNTSEL2 0x00000E73 /** Package. Uncore C-box 7 perfmon event select for C-box 7 counter 3. @@ -4032,8 +3864,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C7_PMON_EVNTSEL3 is defined as MSR_C7_PMON_EVNTSEL3 in SDM. **/ -#define MSR_HASWELL_E_C7_PMON_EVNTSEL3 0x00000E74 - +#define MSR_HASWELL_E_C7_PMON_EVNTSEL3 0x00000E74 /** Package. Uncore C-box 7 perfmon box wide filter 0. @@ -4051,8 +3882,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C7_PMON_BOX_FILTER0 is defined as MSR_C7_PMON_BOX_FILTER0 in SDM. **/ -#define MSR_HASWELL_E_C7_PMON_BOX_FILTER0 0x00000E75 - +#define MSR_HASWELL_E_C7_PMON_BOX_FILTER0 0x00000E75 /** Package. Uncore C-box 7 perfmon box wide filter1. @@ -4070,8 +3900,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C7_PMON_BOX_FILTER1 is defined as MSR_C7_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_HASWELL_E_C7_PMON_BOX_FILTER1 0x00000E76 - +#define MSR_HASWELL_E_C7_PMON_BOX_FILTER1 0x00000E76 /** Package. Uncore C-box 7 perfmon box wide status. @@ -4089,8 +3918,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C7_PMON_BOX_STATUS is defined as MSR_C7_PMON_BOX_STATUS in SDM. **/ -#define MSR_HASWELL_E_C7_PMON_BOX_STATUS 0x00000E77 - +#define MSR_HASWELL_E_C7_PMON_BOX_STATUS 0x00000E77 /** Package. Uncore C-box 7 perfmon counter 0. @@ -4108,8 +3936,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C7_PMON_CTR0 is defined as MSR_C7_PMON_CTR0 in SDM. **/ -#define MSR_HASWELL_E_C7_PMON_CTR0 0x00000E78 - +#define MSR_HASWELL_E_C7_PMON_CTR0 0x00000E78 /** Package. Uncore C-box 7 perfmon counter 1. @@ -4127,8 +3954,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C7_PMON_CTR1 is defined as MSR_C7_PMON_CTR1 in SDM. **/ -#define MSR_HASWELL_E_C7_PMON_CTR1 0x00000E79 - +#define MSR_HASWELL_E_C7_PMON_CTR1 0x00000E79 /** Package. Uncore C-box 7 perfmon counter 2. @@ -4146,8 +3972,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C7_PMON_CTR2 is defined as MSR_C7_PMON_CTR2 in SDM. **/ -#define MSR_HASWELL_E_C7_PMON_CTR2 0x00000E7A - +#define MSR_HASWELL_E_C7_PMON_CTR2 0x00000E7A /** Package. Uncore C-box 7 perfmon counter 3. @@ -4165,8 +3990,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C7_PMON_CTR3 is defined as MSR_C7_PMON_CTR3 in SDM. **/ -#define MSR_HASWELL_E_C7_PMON_CTR3 0x00000E7B - +#define MSR_HASWELL_E_C7_PMON_CTR3 0x00000E7B /** Package. Uncore C-box 8 perfmon local box wide control. @@ -4184,8 +4008,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C8_PMON_BOX_CTL is defined as MSR_C8_PMON_BOX_CTL in SDM. **/ -#define MSR_HASWELL_E_C8_PMON_BOX_CTL 0x00000E80 - +#define MSR_HASWELL_E_C8_PMON_BOX_CTL 0x00000E80 /** Package. Uncore C-box 8 perfmon event select for C-box 8 counter 0. @@ -4203,8 +4026,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C8_PMON_EVNTSEL0 is defined as MSR_C8_PMON_EVNTSEL0 in SDM. **/ -#define MSR_HASWELL_E_C8_PMON_EVNTSEL0 0x00000E81 - +#define MSR_HASWELL_E_C8_PMON_EVNTSEL0 0x00000E81 /** Package. Uncore C-box 8 perfmon event select for C-box 8 counter 1. @@ -4222,8 +4044,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C8_PMON_EVNTSEL1 is defined as MSR_C8_PMON_EVNTSEL1 in SDM. **/ -#define MSR_HASWELL_E_C8_PMON_EVNTSEL1 0x00000E82 - +#define MSR_HASWELL_E_C8_PMON_EVNTSEL1 0x00000E82 /** Package. Uncore C-box 8 perfmon event select for C-box 8 counter 2. @@ -4241,8 +4062,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C8_PMON_EVNTSEL2 is defined as MSR_C8_PMON_EVNTSEL2 in SDM. **/ -#define MSR_HASWELL_E_C8_PMON_EVNTSEL2 0x00000E83 - +#define MSR_HASWELL_E_C8_PMON_EVNTSEL2 0x00000E83 /** Package. Uncore C-box 8 perfmon event select for C-box 8 counter 3. @@ -4260,8 +4080,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C8_PMON_EVNTSEL3 is defined as MSR_C8_PMON_EVNTSEL3 in SDM. **/ -#define MSR_HASWELL_E_C8_PMON_EVNTSEL3 0x00000E84 - +#define MSR_HASWELL_E_C8_PMON_EVNTSEL3 0x00000E84 /** Package. Uncore C-box 8 perfmon box wide filter0. @@ -4279,8 +4098,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C8_PMON_BOX_FILTER0 is defined as MSR_C8_PMON_BOX_FILTER0 in SDM. **/ -#define MSR_HASWELL_E_C8_PMON_BOX_FILTER0 0x00000E85 - +#define MSR_HASWELL_E_C8_PMON_BOX_FILTER0 0x00000E85 /** Package. Uncore C-box 8 perfmon box wide filter1. @@ -4298,8 +4116,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C8_PMON_BOX_FILTER1 is defined as MSR_C8_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_HASWELL_E_C8_PMON_BOX_FILTER1 0x00000E86 - +#define MSR_HASWELL_E_C8_PMON_BOX_FILTER1 0x00000E86 /** Package. Uncore C-box 8 perfmon box wide status. @@ -4317,8 +4134,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C8_PMON_BOX_STATUS is defined as MSR_C8_PMON_BOX_STATUS in SDM. **/ -#define MSR_HASWELL_E_C8_PMON_BOX_STATUS 0x00000E87 - +#define MSR_HASWELL_E_C8_PMON_BOX_STATUS 0x00000E87 /** Package. Uncore C-box 8 perfmon counter 0. @@ -4336,8 +4152,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C8_PMON_CTR0 is defined as MSR_C8_PMON_CTR0 in SDM. **/ -#define MSR_HASWELL_E_C8_PMON_CTR0 0x00000E88 - +#define MSR_HASWELL_E_C8_PMON_CTR0 0x00000E88 /** Package. Uncore C-box 8 perfmon counter 1. @@ -4355,8 +4170,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C8_PMON_CTR1 is defined as MSR_C8_PMON_CTR1 in SDM. **/ -#define MSR_HASWELL_E_C8_PMON_CTR1 0x00000E89 - +#define MSR_HASWELL_E_C8_PMON_CTR1 0x00000E89 /** Package. Uncore C-box 8 perfmon counter 2. @@ -4374,8 +4188,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C8_PMON_CTR2 is defined as MSR_C8_PMON_CTR2 in SDM. **/ -#define MSR_HASWELL_E_C8_PMON_CTR2 0x00000E8A - +#define MSR_HASWELL_E_C8_PMON_CTR2 0x00000E8A /** Package. Uncore C-box 8 perfmon counter 3. @@ -4393,8 +4206,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C8_PMON_CTR3 is defined as MSR_C8_PMON_CTR3 in SDM. **/ -#define MSR_HASWELL_E_C8_PMON_CTR3 0x00000E8B - +#define MSR_HASWELL_E_C8_PMON_CTR3 0x00000E8B /** Package. Uncore C-box 9 perfmon local box wide control. @@ -4412,8 +4224,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C9_PMON_BOX_CTL is defined as MSR_C9_PMON_BOX_CTL in SDM. **/ -#define MSR_HASWELL_E_C9_PMON_BOX_CTL 0x00000E90 - +#define MSR_HASWELL_E_C9_PMON_BOX_CTL 0x00000E90 /** Package. Uncore C-box 9 perfmon event select for C-box 9 counter 0. @@ -4431,8 +4242,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C9_PMON_EVNTSEL0 is defined as MSR_C9_PMON_EVNTSEL0 in SDM. **/ -#define MSR_HASWELL_E_C9_PMON_EVNTSEL0 0x00000E91 - +#define MSR_HASWELL_E_C9_PMON_EVNTSEL0 0x00000E91 /** Package. Uncore C-box 9 perfmon event select for C-box 9 counter 1. @@ -4450,8 +4260,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C9_PMON_EVNTSEL1 is defined as MSR_C9_PMON_EVNTSEL1 in SDM. **/ -#define MSR_HASWELL_E_C9_PMON_EVNTSEL1 0x00000E92 - +#define MSR_HASWELL_E_C9_PMON_EVNTSEL1 0x00000E92 /** Package. Uncore C-box 9 perfmon event select for C-box 9 counter 2. @@ -4469,8 +4278,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C9_PMON_EVNTSEL2 is defined as MSR_C9_PMON_EVNTSEL2 in SDM. **/ -#define MSR_HASWELL_E_C9_PMON_EVNTSEL2 0x00000E93 - +#define MSR_HASWELL_E_C9_PMON_EVNTSEL2 0x00000E93 /** Package. Uncore C-box 9 perfmon event select for C-box 9 counter 3. @@ -4488,8 +4296,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C9_PMON_EVNTSEL3 is defined as MSR_C9_PMON_EVNTSEL3 in SDM. **/ -#define MSR_HASWELL_E_C9_PMON_EVNTSEL3 0x00000E94 - +#define MSR_HASWELL_E_C9_PMON_EVNTSEL3 0x00000E94 /** Package. Uncore C-box 9 perfmon box wide filter0. @@ -4507,8 +4314,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C9_PMON_BOX_FILTER0 is defined as MSR_C9_PMON_BOX_FILTER0 in SDM. **/ -#define MSR_HASWELL_E_C9_PMON_BOX_FILTER0 0x00000E95 - +#define MSR_HASWELL_E_C9_PMON_BOX_FILTER0 0x00000E95 /** Package. Uncore C-box 9 perfmon box wide filter1. @@ -4526,8 +4332,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C9_PMON_BOX_FILTER1 is defined as MSR_C9_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_HASWELL_E_C9_PMON_BOX_FILTER1 0x00000E96 - +#define MSR_HASWELL_E_C9_PMON_BOX_FILTER1 0x00000E96 /** Package. Uncore C-box 9 perfmon box wide status. @@ -4545,8 +4350,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C9_PMON_BOX_STATUS is defined as MSR_C9_PMON_BOX_STATUS in SDM. **/ -#define MSR_HASWELL_E_C9_PMON_BOX_STATUS 0x00000E97 - +#define MSR_HASWELL_E_C9_PMON_BOX_STATUS 0x00000E97 /** Package. Uncore C-box 9 perfmon counter 0. @@ -4564,8 +4368,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C9_PMON_CTR0 is defined as MSR_C9_PMON_CTR0 in SDM. **/ -#define MSR_HASWELL_E_C9_PMON_CTR0 0x00000E98 - +#define MSR_HASWELL_E_C9_PMON_CTR0 0x00000E98 /** Package. Uncore C-box 9 perfmon counter 1. @@ -4583,8 +4386,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C9_PMON_CTR1 is defined as MSR_C9_PMON_CTR1 in SDM. **/ -#define MSR_HASWELL_E_C9_PMON_CTR1 0x00000E99 - +#define MSR_HASWELL_E_C9_PMON_CTR1 0x00000E99 /** Package. Uncore C-box 9 perfmon counter 2. @@ -4602,8 +4404,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C9_PMON_CTR2 is defined as MSR_C9_PMON_CTR2 in SDM. **/ -#define MSR_HASWELL_E_C9_PMON_CTR2 0x00000E9A - +#define MSR_HASWELL_E_C9_PMON_CTR2 0x00000E9A /** Package. Uncore C-box 9 perfmon counter 3. @@ -4621,8 +4422,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C9_PMON_CTR3 is defined as MSR_C9_PMON_CTR3 in SDM. **/ -#define MSR_HASWELL_E_C9_PMON_CTR3 0x00000E9B - +#define MSR_HASWELL_E_C9_PMON_CTR3 0x00000E9B /** Package. Uncore C-box 10 perfmon local box wide control. @@ -4640,8 +4440,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C10_PMON_BOX_CTL is defined as MSR_C10_PMON_BOX_CTL in SDM. **/ -#define MSR_HASWELL_E_C10_PMON_BOX_CTL 0x00000EA0 - +#define MSR_HASWELL_E_C10_PMON_BOX_CTL 0x00000EA0 /** Package. Uncore C-box 10 perfmon event select for C-box 10 counter 0. @@ -4659,8 +4458,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C10_PMON_EVNTSEL0 is defined as MSR_C10_PMON_EVNTSEL0 in SDM. **/ -#define MSR_HASWELL_E_C10_PMON_EVNTSEL0 0x00000EA1 - +#define MSR_HASWELL_E_C10_PMON_EVNTSEL0 0x00000EA1 /** Package. Uncore C-box 10 perfmon event select for C-box 10 counter 1. @@ -4678,8 +4476,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C10_PMON_EVNTSEL1 is defined as MSR_C10_PMON_EVNTSEL1 in SDM. **/ -#define MSR_HASWELL_E_C10_PMON_EVNTSEL1 0x00000EA2 - +#define MSR_HASWELL_E_C10_PMON_EVNTSEL1 0x00000EA2 /** Package. Uncore C-box 10 perfmon event select for C-box 10 counter 2. @@ -4697,8 +4494,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C10_PMON_EVNTSEL2 is defined as MSR_C10_PMON_EVNTSEL2 in SDM. **/ -#define MSR_HASWELL_E_C10_PMON_EVNTSEL2 0x00000EA3 - +#define MSR_HASWELL_E_C10_PMON_EVNTSEL2 0x00000EA3 /** Package. Uncore C-box 10 perfmon event select for C-box 10 counter 3. @@ -4716,8 +4512,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C10_PMON_EVNTSEL3 is defined as MSR_C10_PMON_EVNTSEL3 in SDM. **/ -#define MSR_HASWELL_E_C10_PMON_EVNTSEL3 0x00000EA4 - +#define MSR_HASWELL_E_C10_PMON_EVNTSEL3 0x00000EA4 /** Package. Uncore C-box 10 perfmon box wide filter0. @@ -4735,8 +4530,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C10_PMON_BOX_FILTER0 is defined as MSR_C10_PMON_BOX_FILTER0 in SDM. **/ -#define MSR_HASWELL_E_C10_PMON_BOX_FILTER0 0x00000EA5 - +#define MSR_HASWELL_E_C10_PMON_BOX_FILTER0 0x00000EA5 /** Package. Uncore C-box 10 perfmon box wide filter1. @@ -4754,8 +4548,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C10_PMON_BOX_FILTER1 is defined as MSR_C10_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_HASWELL_E_C10_PMON_BOX_FILTER1 0x00000EA6 - +#define MSR_HASWELL_E_C10_PMON_BOX_FILTER1 0x00000EA6 /** Package. Uncore C-box 10 perfmon box wide status. @@ -4773,8 +4566,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C10_PMON_BOX_STATUS is defined as MSR_C10_PMON_BOX_STATUS in SDM. **/ -#define MSR_HASWELL_E_C10_PMON_BOX_STATUS 0x00000EA7 - +#define MSR_HASWELL_E_C10_PMON_BOX_STATUS 0x00000EA7 /** Package. Uncore C-box 10 perfmon counter 0. @@ -4792,8 +4584,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C10_PMON_CTR0 is defined as MSR_C10_PMON_CTR0 in SDM. **/ -#define MSR_HASWELL_E_C10_PMON_CTR0 0x00000EA8 - +#define MSR_HASWELL_E_C10_PMON_CTR0 0x00000EA8 /** Package. Uncore C-box 10 perfmon counter 1. @@ -4811,8 +4602,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C10_PMON_CTR1 is defined as MSR_C10_PMON_CTR1 in SDM. **/ -#define MSR_HASWELL_E_C10_PMON_CTR1 0x00000EA9 - +#define MSR_HASWELL_E_C10_PMON_CTR1 0x00000EA9 /** Package. Uncore C-box 10 perfmon counter 2. @@ -4830,8 +4620,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C10_PMON_CTR2 is defined as MSR_C10_PMON_CTR2 in SDM. **/ -#define MSR_HASWELL_E_C10_PMON_CTR2 0x00000EAA - +#define MSR_HASWELL_E_C10_PMON_CTR2 0x00000EAA /** Package. Uncore C-box 10 perfmon counter 3. @@ -4849,8 +4638,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C10_PMON_CTR3 is defined as MSR_C10_PMON_CTR3 in SDM. **/ -#define MSR_HASWELL_E_C10_PMON_CTR3 0x00000EAB - +#define MSR_HASWELL_E_C10_PMON_CTR3 0x00000EAB /** Package. Uncore C-box 11 perfmon local box wide control. @@ -4868,8 +4656,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C11_PMON_BOX_CTL is defined as MSR_C11_PMON_BOX_CTL in SDM. **/ -#define MSR_HASWELL_E_C11_PMON_BOX_CTL 0x00000EB0 - +#define MSR_HASWELL_E_C11_PMON_BOX_CTL 0x00000EB0 /** Package. Uncore C-box 11 perfmon event select for C-box 11 counter 0. @@ -4887,8 +4674,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C11_PMON_EVNTSEL0 is defined as MSR_C11_PMON_EVNTSEL0 in SDM. **/ -#define MSR_HASWELL_E_C11_PMON_EVNTSEL0 0x00000EB1 - +#define MSR_HASWELL_E_C11_PMON_EVNTSEL0 0x00000EB1 /** Package. Uncore C-box 11 perfmon event select for C-box 11 counter 1. @@ -4906,8 +4692,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C11_PMON_EVNTSEL1 is defined as MSR_C11_PMON_EVNTSEL1 in SDM. **/ -#define MSR_HASWELL_E_C11_PMON_EVNTSEL1 0x00000EB2 - +#define MSR_HASWELL_E_C11_PMON_EVNTSEL1 0x00000EB2 /** Package. Uncore C-box 11 perfmon event select for C-box 11 counter 2. @@ -4925,8 +4710,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C11_PMON_EVNTSEL2 is defined as MSR_C11_PMON_EVNTSEL2 in SDM. **/ -#define MSR_HASWELL_E_C11_PMON_EVNTSEL2 0x00000EB3 - +#define MSR_HASWELL_E_C11_PMON_EVNTSEL2 0x00000EB3 /** Package. Uncore C-box 11 perfmon event select for C-box 11 counter 3. @@ -4944,8 +4728,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C11_PMON_EVNTSEL3 is defined as MSR_C11_PMON_EVNTSEL3 in SDM. **/ -#define MSR_HASWELL_E_C11_PMON_EVNTSEL3 0x00000EB4 - +#define MSR_HASWELL_E_C11_PMON_EVNTSEL3 0x00000EB4 /** Package. Uncore C-box 11 perfmon box wide filter0. @@ -4963,8 +4746,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C11_PMON_BOX_FILTER0 is defined as MSR_C11_PMON_BOX_FILTER0 in SDM. **/ -#define MSR_HASWELL_E_C11_PMON_BOX_FILTER0 0x00000EB5 - +#define MSR_HASWELL_E_C11_PMON_BOX_FILTER0 0x00000EB5 /** Package. Uncore C-box 11 perfmon box wide filter1. @@ -4982,8 +4764,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C11_PMON_BOX_FILTER1 is defined as MSR_C11_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_HASWELL_E_C11_PMON_BOX_FILTER1 0x00000EB6 - +#define MSR_HASWELL_E_C11_PMON_BOX_FILTER1 0x00000EB6 /** Package. Uncore C-box 11 perfmon box wide status. @@ -5001,8 +4782,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C11_PMON_BOX_STATUS is defined as MSR_C11_PMON_BOX_STATUS in SDM. **/ -#define MSR_HASWELL_E_C11_PMON_BOX_STATUS 0x00000EB7 - +#define MSR_HASWELL_E_C11_PMON_BOX_STATUS 0x00000EB7 /** Package. Uncore C-box 11 perfmon counter 0. @@ -5020,8 +4800,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C11_PMON_CTR0 is defined as MSR_C11_PMON_CTR0 in SDM. **/ -#define MSR_HASWELL_E_C11_PMON_CTR0 0x00000EB8 - +#define MSR_HASWELL_E_C11_PMON_CTR0 0x00000EB8 /** Package. Uncore C-box 11 perfmon counter 1. @@ -5039,8 +4818,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C11_PMON_CTR1 is defined as MSR_C11_PMON_CTR1 in SDM. **/ -#define MSR_HASWELL_E_C11_PMON_CTR1 0x00000EB9 - +#define MSR_HASWELL_E_C11_PMON_CTR1 0x00000EB9 /** Package. Uncore C-box 11 perfmon counter 2. @@ -5058,8 +4836,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C11_PMON_CTR2 is defined as MSR_C11_PMON_CTR2 in SDM. **/ -#define MSR_HASWELL_E_C11_PMON_CTR2 0x00000EBA - +#define MSR_HASWELL_E_C11_PMON_CTR2 0x00000EBA /** Package. Uncore C-box 11 perfmon counter 3. @@ -5077,8 +4854,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C11_PMON_CTR3 is defined as MSR_C11_PMON_CTR3 in SDM. **/ -#define MSR_HASWELL_E_C11_PMON_CTR3 0x00000EBB - +#define MSR_HASWELL_E_C11_PMON_CTR3 0x00000EBB /** Package. Uncore C-box 12 perfmon local box wide control. @@ -5096,8 +4872,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C12_PMON_BOX_CTL is defined as MSR_C12_PMON_BOX_CTL in SDM. **/ -#define MSR_HASWELL_E_C12_PMON_BOX_CTL 0x00000EC0 - +#define MSR_HASWELL_E_C12_PMON_BOX_CTL 0x00000EC0 /** Package. Uncore C-box 12 perfmon event select for C-box 12 counter 0. @@ -5115,8 +4890,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C12_PMON_EVNTSEL0 is defined as MSR_C12_PMON_EVNTSEL0 in SDM. **/ -#define MSR_HASWELL_E_C12_PMON_EVNTSEL0 0x00000EC1 - +#define MSR_HASWELL_E_C12_PMON_EVNTSEL0 0x00000EC1 /** Package. Uncore C-box 12 perfmon event select for C-box 12 counter 1. @@ -5134,8 +4908,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C12_PMON_EVNTSEL1 is defined as MSR_C12_PMON_EVNTSEL1 in SDM. **/ -#define MSR_HASWELL_E_C12_PMON_EVNTSEL1 0x00000EC2 - +#define MSR_HASWELL_E_C12_PMON_EVNTSEL1 0x00000EC2 /** Package. Uncore C-box 12 perfmon event select for C-box 12 counter 2. @@ -5153,8 +4926,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C12_PMON_EVNTSEL2 is defined as MSR_C12_PMON_EVNTSEL2 in SDM. **/ -#define MSR_HASWELL_E_C12_PMON_EVNTSEL2 0x00000EC3 - +#define MSR_HASWELL_E_C12_PMON_EVNTSEL2 0x00000EC3 /** Package. Uncore C-box 12 perfmon event select for C-box 12 counter 3. @@ -5172,8 +4944,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C12_PMON_EVNTSEL3 is defined as MSR_C12_PMON_EVNTSEL3 in SDM. **/ -#define MSR_HASWELL_E_C12_PMON_EVNTSEL3 0x00000EC4 - +#define MSR_HASWELL_E_C12_PMON_EVNTSEL3 0x00000EC4 /** Package. Uncore C-box 12 perfmon box wide filter0. @@ -5191,8 +4962,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C12_PMON_BOX_FILTER0 is defined as MSR_C12_PMON_BOX_FILTER0 in SDM. **/ -#define MSR_HASWELL_E_C12_PMON_BOX_FILTER0 0x00000EC5 - +#define MSR_HASWELL_E_C12_PMON_BOX_FILTER0 0x00000EC5 /** Package. Uncore C-box 12 perfmon box wide filter1. @@ -5210,8 +4980,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C12_PMON_BOX_FILTER1 is defined as MSR_C12_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_HASWELL_E_C12_PMON_BOX_FILTER1 0x00000EC6 - +#define MSR_HASWELL_E_C12_PMON_BOX_FILTER1 0x00000EC6 /** Package. Uncore C-box 12 perfmon box wide status. @@ -5229,8 +4998,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C12_PMON_BOX_STATUS is defined as MSR_C12_PMON_BOX_STATUS in SDM. **/ -#define MSR_HASWELL_E_C12_PMON_BOX_STATUS 0x00000EC7 - +#define MSR_HASWELL_E_C12_PMON_BOX_STATUS 0x00000EC7 /** Package. Uncore C-box 12 perfmon counter 0. @@ -5248,8 +5016,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C12_PMON_CTR0 is defined as MSR_C12_PMON_CTR0 in SDM. **/ -#define MSR_HASWELL_E_C12_PMON_CTR0 0x00000EC8 - +#define MSR_HASWELL_E_C12_PMON_CTR0 0x00000EC8 /** Package. Uncore C-box 12 perfmon counter 1. @@ -5267,8 +5034,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C12_PMON_CTR1 is defined as MSR_C12_PMON_CTR1 in SDM. **/ -#define MSR_HASWELL_E_C12_PMON_CTR1 0x00000EC9 - +#define MSR_HASWELL_E_C12_PMON_CTR1 0x00000EC9 /** Package. Uncore C-box 12 perfmon counter 2. @@ -5286,8 +5052,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C12_PMON_CTR2 is defined as MSR_C12_PMON_CTR2 in SDM. **/ -#define MSR_HASWELL_E_C12_PMON_CTR2 0x00000ECA - +#define MSR_HASWELL_E_C12_PMON_CTR2 0x00000ECA /** Package. Uncore C-box 12 perfmon counter 3. @@ -5305,8 +5070,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C12_PMON_CTR3 is defined as MSR_C12_PMON_CTR3 in SDM. **/ -#define MSR_HASWELL_E_C12_PMON_CTR3 0x00000ECB - +#define MSR_HASWELL_E_C12_PMON_CTR3 0x00000ECB /** Package. Uncore C-box 13 perfmon local box wide control. @@ -5324,8 +5088,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C13_PMON_BOX_CTL is defined as MSR_C13_PMON_BOX_CTL in SDM. **/ -#define MSR_HASWELL_E_C13_PMON_BOX_CTL 0x00000ED0 - +#define MSR_HASWELL_E_C13_PMON_BOX_CTL 0x00000ED0 /** Package. Uncore C-box 13 perfmon event select for C-box 13 counter 0. @@ -5343,8 +5106,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C13_PMON_EVNTSEL0 is defined as MSR_C13_PMON_EVNTSEL0 in SDM. **/ -#define MSR_HASWELL_E_C13_PMON_EVNTSEL0 0x00000ED1 - +#define MSR_HASWELL_E_C13_PMON_EVNTSEL0 0x00000ED1 /** Package. Uncore C-box 13 perfmon event select for C-box 13 counter 1. @@ -5362,8 +5124,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C13_PMON_EVNTSEL1 is defined as MSR_C13_PMON_EVNTSEL1 in SDM. **/ -#define MSR_HASWELL_E_C13_PMON_EVNTSEL1 0x00000ED2 - +#define MSR_HASWELL_E_C13_PMON_EVNTSEL1 0x00000ED2 /** Package. Uncore C-box 13 perfmon event select for C-box 13 counter 2. @@ -5381,8 +5142,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C13_PMON_EVNTSEL2 is defined as MSR_C13_PMON_EVNTSEL2 in SDM. **/ -#define MSR_HASWELL_E_C13_PMON_EVNTSEL2 0x00000ED3 - +#define MSR_HASWELL_E_C13_PMON_EVNTSEL2 0x00000ED3 /** Package. Uncore C-box 13 perfmon event select for C-box 13 counter 3. @@ -5400,8 +5160,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C13_PMON_EVNTSEL3 is defined as MSR_C13_PMON_EVNTSEL3 in SDM. **/ -#define MSR_HASWELL_E_C13_PMON_EVNTSEL3 0x00000ED4 - +#define MSR_HASWELL_E_C13_PMON_EVNTSEL3 0x00000ED4 /** Package. Uncore C-box 13 perfmon box wide filter0. @@ -5419,8 +5178,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C13_PMON_BOX_FILTER0 is defined as MSR_C13_PMON_BOX_FILTER0 in SDM. **/ -#define MSR_HASWELL_E_C13_PMON_BOX_FILTER0 0x00000ED5 - +#define MSR_HASWELL_E_C13_PMON_BOX_FILTER0 0x00000ED5 /** Package. Uncore C-box 13 perfmon box wide filter1. @@ -5438,8 +5196,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C13_PMON_BOX_FILTER1 is defined as MSR_C13_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_HASWELL_E_C13_PMON_BOX_FILTER1 0x00000ED6 - +#define MSR_HASWELL_E_C13_PMON_BOX_FILTER1 0x00000ED6 /** Package. Uncore C-box 13 perfmon box wide status. @@ -5457,8 +5214,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C13_PMON_BOX_STATUS is defined as MSR_C13_PMON_BOX_STATUS in SDM. **/ -#define MSR_HASWELL_E_C13_PMON_BOX_STATUS 0x00000ED7 - +#define MSR_HASWELL_E_C13_PMON_BOX_STATUS 0x00000ED7 /** Package. Uncore C-box 13 perfmon counter 0. @@ -5476,8 +5232,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C13_PMON_CTR0 is defined as MSR_C13_PMON_CTR0 in SDM. **/ -#define MSR_HASWELL_E_C13_PMON_CTR0 0x00000ED8 - +#define MSR_HASWELL_E_C13_PMON_CTR0 0x00000ED8 /** Package. Uncore C-box 13 perfmon counter 1. @@ -5495,8 +5250,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C13_PMON_CTR1 is defined as MSR_C13_PMON_CTR1 in SDM. **/ -#define MSR_HASWELL_E_C13_PMON_CTR1 0x00000ED9 - +#define MSR_HASWELL_E_C13_PMON_CTR1 0x00000ED9 /** Package. Uncore C-box 13 perfmon counter 2. @@ -5514,8 +5268,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C13_PMON_CTR2 is defined as MSR_C13_PMON_CTR2 in SDM. **/ -#define MSR_HASWELL_E_C13_PMON_CTR2 0x00000EDA - +#define MSR_HASWELL_E_C13_PMON_CTR2 0x00000EDA /** Package. Uncore C-box 13 perfmon counter 3. @@ -5533,8 +5286,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C13_PMON_CTR3 is defined as MSR_C13_PMON_CTR3 in SDM. **/ -#define MSR_HASWELL_E_C13_PMON_CTR3 0x00000EDB - +#define MSR_HASWELL_E_C13_PMON_CTR3 0x00000EDB /** Package. Uncore C-box 14 perfmon local box wide control. @@ -5552,8 +5304,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C14_PMON_BOX_CTL is defined as MSR_C14_PMON_BOX_CTL in SDM. **/ -#define MSR_HASWELL_E_C14_PMON_BOX_CTL 0x00000EE0 - +#define MSR_HASWELL_E_C14_PMON_BOX_CTL 0x00000EE0 /** Package. Uncore C-box 14 perfmon event select for C-box 14 counter 0. @@ -5571,8 +5322,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C14_PMON_EVNTSEL0 is defined as MSR_C14_PMON_EVNTSEL0 in SDM. **/ -#define MSR_HASWELL_E_C14_PMON_EVNTSEL0 0x00000EE1 - +#define MSR_HASWELL_E_C14_PMON_EVNTSEL0 0x00000EE1 /** Package. Uncore C-box 14 perfmon event select for C-box 14 counter 1. @@ -5590,8 +5340,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C14_PMON_EVNTSEL1 is defined as MSR_C14_PMON_EVNTSEL1 in SDM. **/ -#define MSR_HASWELL_E_C14_PMON_EVNTSEL1 0x00000EE2 - +#define MSR_HASWELL_E_C14_PMON_EVNTSEL1 0x00000EE2 /** Package. Uncore C-box 14 perfmon event select for C-box 14 counter 2. @@ -5609,8 +5358,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C14_PMON_EVNTSEL2 is defined as MSR_C14_PMON_EVNTSEL2 in SDM. **/ -#define MSR_HASWELL_E_C14_PMON_EVNTSEL2 0x00000EE3 - +#define MSR_HASWELL_E_C14_PMON_EVNTSEL2 0x00000EE3 /** Package. Uncore C-box 14 perfmon event select for C-box 14 counter 3. @@ -5628,8 +5376,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C14_PMON_EVNTSEL3 is defined as MSR_C14_PMON_EVNTSEL3 in SDM. **/ -#define MSR_HASWELL_E_C14_PMON_EVNTSEL3 0x00000EE4 - +#define MSR_HASWELL_E_C14_PMON_EVNTSEL3 0x00000EE4 /** Package. Uncore C-box 14 perfmon box wide filter0. @@ -5647,8 +5394,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C14_PMON_BOX_FILTER is defined as MSR_C14_PMON_BOX_FILTER in SDM. **/ -#define MSR_HASWELL_E_C14_PMON_BOX_FILTER 0x00000EE5 - +#define MSR_HASWELL_E_C14_PMON_BOX_FILTER 0x00000EE5 /** Package. Uncore C-box 14 perfmon box wide filter1. @@ -5666,8 +5412,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C14_PMON_BOX_FILTER1 is defined as MSR_C14_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_HASWELL_E_C14_PMON_BOX_FILTER1 0x00000EE6 - +#define MSR_HASWELL_E_C14_PMON_BOX_FILTER1 0x00000EE6 /** Package. Uncore C-box 14 perfmon box wide status. @@ -5685,8 +5430,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C14_PMON_BOX_STATUS is defined as MSR_C14_PMON_BOX_STATUS in SDM. **/ -#define MSR_HASWELL_E_C14_PMON_BOX_STATUS 0x00000EE7 - +#define MSR_HASWELL_E_C14_PMON_BOX_STATUS 0x00000EE7 /** Package. Uncore C-box 14 perfmon counter 0. @@ -5704,8 +5448,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C14_PMON_CTR0 is defined as MSR_C14_PMON_CTR0 in SDM. **/ -#define MSR_HASWELL_E_C14_PMON_CTR0 0x00000EE8 - +#define MSR_HASWELL_E_C14_PMON_CTR0 0x00000EE8 /** Package. Uncore C-box 14 perfmon counter 1. @@ -5723,8 +5466,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C14_PMON_CTR1 is defined as MSR_C14_PMON_CTR1 in SDM. **/ -#define MSR_HASWELL_E_C14_PMON_CTR1 0x00000EE9 - +#define MSR_HASWELL_E_C14_PMON_CTR1 0x00000EE9 /** Package. Uncore C-box 14 perfmon counter 2. @@ -5742,8 +5484,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C14_PMON_CTR2 is defined as MSR_C14_PMON_CTR2 in SDM. **/ -#define MSR_HASWELL_E_C14_PMON_CTR2 0x00000EEA - +#define MSR_HASWELL_E_C14_PMON_CTR2 0x00000EEA /** Package. Uncore C-box 14 perfmon counter 3. @@ -5761,8 +5502,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C14_PMON_CTR3 is defined as MSR_C14_PMON_CTR3 in SDM. **/ -#define MSR_HASWELL_E_C14_PMON_CTR3 0x00000EEB - +#define MSR_HASWELL_E_C14_PMON_CTR3 0x00000EEB /** Package. Uncore C-box 15 perfmon local box wide control. @@ -5780,8 +5520,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C15_PMON_BOX_CTL is defined as MSR_C15_PMON_BOX_CTL in SDM. **/ -#define MSR_HASWELL_E_C15_PMON_BOX_CTL 0x00000EF0 - +#define MSR_HASWELL_E_C15_PMON_BOX_CTL 0x00000EF0 /** Package. Uncore C-box 15 perfmon event select for C-box 15 counter 0. @@ -5799,8 +5538,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C15_PMON_EVNTSEL0 is defined as MSR_C15_PMON_EVNTSEL0 in SDM. **/ -#define MSR_HASWELL_E_C15_PMON_EVNTSEL0 0x00000EF1 - +#define MSR_HASWELL_E_C15_PMON_EVNTSEL0 0x00000EF1 /** Package. Uncore C-box 15 perfmon event select for C-box 15 counter 1. @@ -5818,8 +5556,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C15_PMON_EVNTSEL1 is defined as MSR_C15_PMON_EVNTSEL1 in SDM. **/ -#define MSR_HASWELL_E_C15_PMON_EVNTSEL1 0x00000EF2 - +#define MSR_HASWELL_E_C15_PMON_EVNTSEL1 0x00000EF2 /** Package. Uncore C-box 15 perfmon event select for C-box 15 counter 2. @@ -5837,8 +5574,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C15_PMON_EVNTSEL2 is defined as MSR_C15_PMON_EVNTSEL2 in SDM. **/ -#define MSR_HASWELL_E_C15_PMON_EVNTSEL2 0x00000EF3 - +#define MSR_HASWELL_E_C15_PMON_EVNTSEL2 0x00000EF3 /** Package. Uncore C-box 15 perfmon event select for C-box 15 counter 3. @@ -5856,8 +5592,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C15_PMON_EVNTSEL3 is defined as MSR_C15_PMON_EVNTSEL3 in SDM. **/ -#define MSR_HASWELL_E_C15_PMON_EVNTSEL3 0x00000EF4 - +#define MSR_HASWELL_E_C15_PMON_EVNTSEL3 0x00000EF4 /** Package. Uncore C-box 15 perfmon box wide filter0. @@ -5875,8 +5610,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C15_PMON_BOX_FILTER0 is defined as MSR_C15_PMON_BOX_FILTER0 in SDM. **/ -#define MSR_HASWELL_E_C15_PMON_BOX_FILTER0 0x00000EF5 - +#define MSR_HASWELL_E_C15_PMON_BOX_FILTER0 0x00000EF5 /** Package. Uncore C-box 15 perfmon box wide filter1. @@ -5894,8 +5628,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C15_PMON_BOX_FILTER1 is defined as MSR_C15_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_HASWELL_E_C15_PMON_BOX_FILTER1 0x00000EF6 - +#define MSR_HASWELL_E_C15_PMON_BOX_FILTER1 0x00000EF6 /** Package. Uncore C-box 15 perfmon box wide status. @@ -5913,8 +5646,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C15_PMON_BOX_STATUS is defined as MSR_C15_PMON_BOX_STATUS in SDM. **/ -#define MSR_HASWELL_E_C15_PMON_BOX_STATUS 0x00000EF7 - +#define MSR_HASWELL_E_C15_PMON_BOX_STATUS 0x00000EF7 /** Package. Uncore C-box 15 perfmon counter 0. @@ -5932,8 +5664,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C15_PMON_CTR0 is defined as MSR_C15_PMON_CTR0 in SDM. **/ -#define MSR_HASWELL_E_C15_PMON_CTR0 0x00000EF8 - +#define MSR_HASWELL_E_C15_PMON_CTR0 0x00000EF8 /** Package. Uncore C-box 15 perfmon counter 1. @@ -5951,8 +5682,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C15_PMON_CTR1 is defined as MSR_C15_PMON_CTR1 in SDM. **/ -#define MSR_HASWELL_E_C15_PMON_CTR1 0x00000EF9 - +#define MSR_HASWELL_E_C15_PMON_CTR1 0x00000EF9 /** Package. Uncore C-box 15 perfmon counter 2. @@ -5970,8 +5700,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C15_PMON_CTR2 is defined as MSR_C15_PMON_CTR2 in SDM. **/ -#define MSR_HASWELL_E_C15_PMON_CTR2 0x00000EFA - +#define MSR_HASWELL_E_C15_PMON_CTR2 0x00000EFA /** Package. Uncore C-box 15 perfmon counter 3. @@ -5989,8 +5718,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C15_PMON_CTR3 is defined as MSR_C15_PMON_CTR3 in SDM. **/ -#define MSR_HASWELL_E_C15_PMON_CTR3 0x00000EFB - +#define MSR_HASWELL_E_C15_PMON_CTR3 0x00000EFB /** Package. Uncore C-box 16 perfmon for box-wide control. @@ -6008,8 +5736,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C16_PMON_BOX_CTL is defined as MSR_C16_PMON_BOX_CTL in SDM. **/ -#define MSR_HASWELL_E_C16_PMON_BOX_CTL 0x00000F00 - +#define MSR_HASWELL_E_C16_PMON_BOX_CTL 0x00000F00 /** Package. Uncore C-box 16 perfmon event select for C-box 16 counter 0. @@ -6027,8 +5754,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C16_PMON_EVNTSEL0 is defined as MSR_C16_PMON_EVNTSEL0 in SDM. **/ -#define MSR_HASWELL_E_C16_PMON_EVNTSEL0 0x00000F01 - +#define MSR_HASWELL_E_C16_PMON_EVNTSEL0 0x00000F01 /** Package. Uncore C-box 16 perfmon event select for C-box 16 counter 1. @@ -6046,8 +5772,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C16_PMON_EVNTSEL1 is defined as MSR_C16_PMON_EVNTSEL1 in SDM. **/ -#define MSR_HASWELL_E_C16_PMON_EVNTSEL1 0x00000F02 - +#define MSR_HASWELL_E_C16_PMON_EVNTSEL1 0x00000F02 /** Package. Uncore C-box 16 perfmon event select for C-box 16 counter 2. @@ -6065,8 +5790,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C16_PMON_EVNTSEL2 is defined as MSR_C16_PMON_EVNTSEL2 in SDM. **/ -#define MSR_HASWELL_E_C16_PMON_EVNTSEL2 0x00000F03 - +#define MSR_HASWELL_E_C16_PMON_EVNTSEL2 0x00000F03 /** Package. Uncore C-box 16 perfmon event select for C-box 16 counter 3. @@ -6084,8 +5808,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C16_PMON_EVNTSEL3 is defined as MSR_C16_PMON_EVNTSEL3 in SDM. **/ -#define MSR_HASWELL_E_C16_PMON_EVNTSEL3 0x00000F04 - +#define MSR_HASWELL_E_C16_PMON_EVNTSEL3 0x00000F04 /** Package. Uncore C-box 16 perfmon box wide filter 0. @@ -6103,8 +5826,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C16_PMON_BOX_FILTER0 is defined as MSR_C16_PMON_BOX_FILTER0 in SDM. **/ -#define MSR_HASWELL_E_C16_PMON_BOX_FILTER0 0x00000F05 - +#define MSR_HASWELL_E_C16_PMON_BOX_FILTER0 0x00000F05 /** Package. Uncore C-box 16 perfmon box wide filter 1. @@ -6122,8 +5844,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C16_PMON_BOX_FILTER1 is defined as MSR_C16_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_HASWELL_E_C16_PMON_BOX_FILTER1 0x00000F06 - +#define MSR_HASWELL_E_C16_PMON_BOX_FILTER1 0x00000F06 /** Package. Uncore C-box 16 perfmon box wide status. @@ -6141,8 +5862,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C16_PMON_BOX_STATUS is defined as MSR_C16_PMON_BOX_STATUS in SDM. **/ -#define MSR_HASWELL_E_C16_PMON_BOX_STATUS 0x00000F07 - +#define MSR_HASWELL_E_C16_PMON_BOX_STATUS 0x00000F07 /** Package. Uncore C-box 16 perfmon counter 0. @@ -6160,8 +5880,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C16_PMON_CTR0 is defined as MSR_C16_PMON_CTR0 in SDM. **/ -#define MSR_HASWELL_E_C16_PMON_CTR0 0x00000F08 - +#define MSR_HASWELL_E_C16_PMON_CTR0 0x00000F08 /** Package. Uncore C-box 16 perfmon counter 1. @@ -6179,8 +5898,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C16_PMON_CTR1 is defined as MSR_C16_PMON_CTR1 in SDM. **/ -#define MSR_HASWELL_E_C16_PMON_CTR1 0x00000F09 - +#define MSR_HASWELL_E_C16_PMON_CTR1 0x00000F09 /** Package. Uncore C-box 16 perfmon counter 2. @@ -6198,8 +5916,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C16_PMON_CTR2 is defined as MSR_C16_PMON_CTR2 in SDM. **/ -#define MSR_HASWELL_E_C16_PMON_CTR2 0x00000F0A - +#define MSR_HASWELL_E_C16_PMON_CTR2 0x00000F0A /** Package. Uncore C-box 16 perfmon counter 3. @@ -6217,8 +5934,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C16_PMON_CTR3 is defined as MSR_C16_PMON_CTR3 in SDM. **/ -#define MSR_HASWELL_E_C16_PMON_CTR3 0x00000E0B - +#define MSR_HASWELL_E_C16_PMON_CTR3 0x00000E0B /** Package. Uncore C-box 17 perfmon for box-wide control. @@ -6236,8 +5952,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C17_PMON_BOX_CTL is defined as MSR_C17_PMON_BOX_CTL in SDM. **/ -#define MSR_HASWELL_E_C17_PMON_BOX_CTL 0x00000F10 - +#define MSR_HASWELL_E_C17_PMON_BOX_CTL 0x00000F10 /** Package. Uncore C-box 17 perfmon event select for C-box 17 counter 0. @@ -6255,8 +5970,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C17_PMON_EVNTSEL0 is defined as MSR_C17_PMON_EVNTSEL0 in SDM. **/ -#define MSR_HASWELL_E_C17_PMON_EVNTSEL0 0x00000F11 - +#define MSR_HASWELL_E_C17_PMON_EVNTSEL0 0x00000F11 /** Package. Uncore C-box 17 perfmon event select for C-box 17 counter 1. @@ -6274,8 +5988,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C17_PMON_EVNTSEL1 is defined as MSR_C17_PMON_EVNTSEL1 in SDM. **/ -#define MSR_HASWELL_E_C17_PMON_EVNTSEL1 0x00000F12 - +#define MSR_HASWELL_E_C17_PMON_EVNTSEL1 0x00000F12 /** Package. Uncore C-box 17 perfmon event select for C-box 17 counter 2. @@ -6293,8 +6006,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C17_PMON_EVNTSEL2 is defined as MSR_C17_PMON_EVNTSEL2 in SDM. **/ -#define MSR_HASWELL_E_C17_PMON_EVNTSEL2 0x00000F13 - +#define MSR_HASWELL_E_C17_PMON_EVNTSEL2 0x00000F13 /** Package. Uncore C-box 17 perfmon event select for C-box 17 counter 3. @@ -6312,8 +6024,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C17_PMON_EVNTSEL3 is defined as MSR_C17_PMON_EVNTSEL3 in SDM. **/ -#define MSR_HASWELL_E_C17_PMON_EVNTSEL3 0x00000F14 - +#define MSR_HASWELL_E_C17_PMON_EVNTSEL3 0x00000F14 /** Package. Uncore C-box 17 perfmon box wide filter 0. @@ -6331,8 +6042,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C17_PMON_BOX_FILTER0 is defined as MSR_C17_PMON_BOX_FILTER0 in SDM. **/ -#define MSR_HASWELL_E_C17_PMON_BOX_FILTER0 0x00000F15 - +#define MSR_HASWELL_E_C17_PMON_BOX_FILTER0 0x00000F15 /** Package. Uncore C-box 17 perfmon box wide filter1. @@ -6350,7 +6060,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C17_PMON_BOX_FILTER1 is defined as MSR_C17_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_HASWELL_E_C17_PMON_BOX_FILTER1 0x00000F16 +#define MSR_HASWELL_E_C17_PMON_BOX_FILTER1 0x00000F16 /** Package. Uncore C-box 17 perfmon box wide status. @@ -6368,8 +6078,7 @@ typedef union { @endcode @note MSR_HASWELL_E_C17_PMON_BOX_STATUS is defined as MSR_C17_PMON_BOX_STATUS in SDM. **/ -#define MSR_HASWELL_E_C17_PMON_BOX_STATUS 0x00000F17 - +#define MSR_HASWELL_E_C17_PMON_BOX_STATUS 0x00000F17 /** Package. Uncore C-box 17 perfmon counter n. @@ -6391,10 +6100,10 @@ typedef union { MSR_HASWELL_E_C17_PMON_CTR3 is defined as MSR_C17_PMON_CTR3 in SDM. @{ **/ -#define MSR_HASWELL_E_C17_PMON_CTR0 0x00000F18 -#define MSR_HASWELL_E_C17_PMON_CTR1 0x00000F19 -#define MSR_HASWELL_E_C17_PMON_CTR2 0x00000F1A -#define MSR_HASWELL_E_C17_PMON_CTR3 0x00000F1B +#define MSR_HASWELL_E_C17_PMON_CTR0 0x00000F18 +#define MSR_HASWELL_E_C17_PMON_CTR1 0x00000F19 +#define MSR_HASWELL_E_C17_PMON_CTR2 0x00000F1A +#define MSR_HASWELL_E_C17_PMON_CTR3 0x00000F1B /// @} #endif diff --git a/MdePkg/Include/Register/Intel/Msr/HaswellMsr.h b/MdePkg/Include/Register/Intel/Msr/HaswellMsr.h index 704a707..c065646 100644 --- a/MdePkg/Include/Register/Intel/Msr/HaswellMsr.h +++ b/MdePkg/Include/Register/Intel/Msr/HaswellMsr.h @@ -56,7 +56,7 @@ @endcode @note MSR_HASWELL_PLATFORM_INFO is defined as MSR_PLATFORM_INFO in SDM. **/ -#define MSR_HASWELL_PLATFORM_INFO 0x000000CE +#define MSR_HASWELL_PLATFORM_INFO 0x000000CE /** MSR information returned for MSR index #MSR_HASWELL_PLATFORM_INFO @@ -66,62 +66,61 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:8; + UINT32 Reserved1 : 8; /// /// [Bits 15:8] Package. Maximum Non-Turbo Ratio (R/O) The is the ratio /// of the frequency that invariant TSC runs at. Frequency = ratio * 100 /// MHz. /// - UINT32 MaximumNonTurboRatio:8; - UINT32 Reserved2:12; + UINT32 MaximumNonTurboRatio : 8; + UINT32 Reserved2 : 12; /// /// [Bit 28] Package. Programmable Ratio Limit for Turbo Mode (R/O) When /// set to 1, indicates that Programmable Ratio Limits for Turbo mode is /// enabled, and when set to 0, indicates Programmable Ratio Limits for /// Turbo mode is disabled. /// - UINT32 RatioLimit:1; + UINT32 RatioLimit : 1; /// /// [Bit 29] Package. Programmable TDP Limit for Turbo Mode (R/O) When /// set to 1, indicates that TDP Limits for Turbo mode are programmable, /// and when set to 0, indicates TDP Limit for Turbo mode is not /// programmable. /// - UINT32 TDPLimit:1; - UINT32 Reserved3:2; + UINT32 TDPLimit : 1; + UINT32 Reserved3 : 2; /// /// [Bit 32] Package. Low Power Mode Support (LPM) (R/O) When set to 1, /// indicates that LPM is supported, and when set to 0, indicates LPM is /// not supported. /// - UINT32 LowPowerModeSupport:1; + UINT32 LowPowerModeSupport : 1; /// /// [Bits 34:33] Package. Number of ConfigTDP Levels (R/O) 00: Only Base /// TDP level available. 01: One additional TDP level available. 02: Two /// additional TDP level available. 11: Reserved. /// - UINT32 ConfigTDPLevels:2; - UINT32 Reserved4:5; + UINT32 ConfigTDPLevels : 2; + UINT32 Reserved4 : 5; /// /// [Bits 47:40] Package. Maximum Efficiency Ratio (R/O) The is the /// minimum ratio (maximum efficiency) that the processor can operates, in /// units of 100MHz. /// - UINT32 MaximumEfficiencyRatio:8; + UINT32 MaximumEfficiencyRatio : 8; /// /// [Bits 55:48] Package. Minimum Operating Ratio (R/O) Contains the /// minimum supported operating ratio in units of 100 MHz. /// - UINT32 MinimumOperatingRatio:8; - UINT32 Reserved5:8; + UINT32 MinimumOperatingRatio : 8; + UINT32 Reserved5 : 8; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_PLATFORM_INFO_REGISTER; - /** Thread. Performance Event Select for Counter n (R/W) Supports all fields described inTable 2-2 and the fields below. @@ -144,9 +143,9 @@ typedef union { MSR_HASWELL_IA32_PERFEVTSEL3 is defined as IA32_PERFEVTSEL3 in SDM. @{ **/ -#define MSR_HASWELL_IA32_PERFEVTSEL0 0x00000186 -#define MSR_HASWELL_IA32_PERFEVTSEL1 0x00000187 -#define MSR_HASWELL_IA32_PERFEVTSEL3 0x00000189 +#define MSR_HASWELL_IA32_PERFEVTSEL0 0x00000186 +#define MSR_HASWELL_IA32_PERFEVTSEL1 0x00000187 +#define MSR_HASWELL_IA32_PERFEVTSEL3 0x00000189 /// @} /** @@ -161,32 +160,32 @@ typedef union { /// /// [Bits 7:0] Event Select: Selects a performance event logic unit. /// - UINT32 EventSelect:8; + UINT32 EventSelect : 8; /// /// [Bits 15:8] UMask: Qualifies the microarchitectural condition to /// detect on the selected event logic. /// - UINT32 UMASK:8; + UINT32 UMASK : 8; /// /// [Bit 16] USR: Counts while in privilege level is not ring 0. /// - UINT32 USR:1; + UINT32 USR : 1; /// /// [Bit 17] OS: Counts while in privilege level is ring 0. /// - UINT32 OS:1; + UINT32 OS : 1; /// /// [Bit 18] Edge: Enables edge detection if set. /// - UINT32 E:1; + UINT32 E : 1; /// /// [Bit 19] PC: enables pin control. /// - UINT32 PC:1; + UINT32 PC : 1; /// /// [Bit 20] INT: enables interrupt on counter overflow. /// - UINT32 INT:1; + UINT32 INT : 1; /// /// [Bit 21] AnyThread: When set to 1, it enables counting the associated /// event conditions occurring across all logical processors sharing a @@ -194,37 +193,36 @@ typedef union { /// associated event conditions occurring in the logical processor which /// programmed the MSR. /// - UINT32 ANY:1; + UINT32 ANY : 1; /// /// [Bit 22] EN: enables the corresponding performance counter to commence /// counting when this bit is set. /// - UINT32 EN:1; + UINT32 EN : 1; /// /// [Bit 23] INV: invert the CMASK. /// - UINT32 INV:1; + UINT32 INV : 1; /// /// [Bits 31:24] CMASK: When CMASK is not zero, the corresponding /// performance counter increments each cycle if the event count is /// greater than or equal to the CMASK. /// - UINT32 CMASK:8; - UINT32 Reserved:32; + UINT32 CMASK : 8; + UINT32 Reserved : 32; /// /// [Bit 32] IN_TX: see Section 18.3.6.5.1 When IN_TX (bit 32) is set, /// AnyThread (bit 21) should be cleared to prevent incorrect results. /// - UINT32 IN_TX:1; - UINT32 Reserved2:31; + UINT32 IN_TX : 1; + UINT32 Reserved2 : 31; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_IA32_PERFEVTSEL_REGISTER; - /** Thread. Performance Event Select for Counter 2 (R/W) Supports all fields described inTable 2-2 and the fields below. @@ -244,7 +242,7 @@ typedef union { @endcode @note MSR_HASWELL_IA32_PERFEVTSEL2 is defined as IA32_PERFEVTSEL2 in SDM. **/ -#define MSR_HASWELL_IA32_PERFEVTSEL2 0x00000188 +#define MSR_HASWELL_IA32_PERFEVTSEL2 0x00000188 /** MSR information returned for MSR index #MSR_HASWELL_IA32_PERFEVTSEL2 @@ -257,32 +255,32 @@ typedef union { /// /// [Bits 7:0] Event Select: Selects a performance event logic unit. /// - UINT32 EventSelect:8; + UINT32 EventSelect : 8; /// /// [Bits 15:8] UMask: Qualifies the microarchitectural condition to /// detect on the selected event logic. /// - UINT32 UMASK:8; + UINT32 UMASK : 8; /// /// [Bit 16] USR: Counts while in privilege level is not ring 0. /// - UINT32 USR:1; + UINT32 USR : 1; /// /// [Bit 17] OS: Counts while in privilege level is ring 0. /// - UINT32 OS:1; + UINT32 OS : 1; /// /// [Bit 18] Edge: Enables edge detection if set. /// - UINT32 E:1; + UINT32 E : 1; /// /// [Bit 19] PC: enables pin control. /// - UINT32 PC:1; + UINT32 PC : 1; /// /// [Bit 20] INT: enables interrupt on counter overflow. /// - UINT32 INT:1; + UINT32 INT : 1; /// /// [Bit 21] AnyThread: When set to 1, it enables counting the associated /// event conditions occurring across all logical processors sharing a @@ -290,28 +288,28 @@ typedef union { /// associated event conditions occurring in the logical processor which /// programmed the MSR. /// - UINT32 ANY:1; + UINT32 ANY : 1; /// /// [Bit 22] EN: enables the corresponding performance counter to commence /// counting when this bit is set. /// - UINT32 EN:1; + UINT32 EN : 1; /// /// [Bit 23] INV: invert the CMASK. /// - UINT32 INV:1; + UINT32 INV : 1; /// /// [Bits 31:24] CMASK: When CMASK is not zero, the corresponding /// performance counter increments each cycle if the event count is /// greater than or equal to the CMASK. /// - UINT32 CMASK:8; - UINT32 Reserved:32; + UINT32 CMASK : 8; + UINT32 Reserved : 32; /// /// [Bit 32] IN_TX: see Section 18.3.6.5.1 When IN_TX (bit 32) is set, /// AnyThread (bit 21) should be cleared to prevent incorrect results. /// - UINT32 IN_TX:1; + UINT32 IN_TX : 1; /// /// [Bit 33] IN_TXCP: see Section 18.3.6.5.1 When IN_TXCP=1 & IN_TX=1 and /// in sampling, spurious PMI may occur and transactions may continuously @@ -321,16 +319,15 @@ typedef union { /// IN_TXCP and also always reset the counter even when no overflow /// condition was reported. /// - UINT32 IN_TXCP:1; - UINT32 Reserved2:30; + UINT32 IN_TXCP : 1; + UINT32 Reserved2 : 30; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_IA32_PERFEVTSEL2_REGISTER; - /** Thread. Last Branch Record Filtering Select Register (R/W). @@ -349,7 +346,7 @@ typedef union { @endcode @note MSR_HASWELL_LBR_SELECT is defined as MSR_LBR_SELECT in SDM. **/ -#define MSR_HASWELL_LBR_SELECT 0x000001C8 +#define MSR_HASWELL_LBR_SELECT 0x000001C8 /** MSR information returned for MSR index #MSR_HASWELL_LBR_SELECT @@ -362,57 +359,56 @@ typedef union { /// /// [Bit 0] CPL_EQ_0. /// - UINT32 CPL_EQ_0:1; + UINT32 CPL_EQ_0 : 1; /// /// [Bit 1] CPL_NEQ_0. /// - UINT32 CPL_NEQ_0:1; + UINT32 CPL_NEQ_0 : 1; /// /// [Bit 2] JCC. /// - UINT32 JCC:1; + UINT32 JCC : 1; /// /// [Bit 3] NEAR_REL_CALL. /// - UINT32 NEAR_REL_CALL:1; + UINT32 NEAR_REL_CALL : 1; /// /// [Bit 4] NEAR_IND_CALL. /// - UINT32 NEAR_IND_CALL:1; + UINT32 NEAR_IND_CALL : 1; /// /// [Bit 5] NEAR_RET. /// - UINT32 NEAR_RET:1; + UINT32 NEAR_RET : 1; /// /// [Bit 6] NEAR_IND_JMP. /// - UINT32 NEAR_IND_JMP:1; + UINT32 NEAR_IND_JMP : 1; /// /// [Bit 7] NEAR_REL_JMP. /// - UINT32 NEAR_REL_JMP:1; + UINT32 NEAR_REL_JMP : 1; /// /// [Bit 8] FAR_BRANCH. /// - UINT32 FAR_BRANCH:1; + UINT32 FAR_BRANCH : 1; /// /// [Bit 9] EN_CALL_STACK. /// - UINT32 EN_CALL_STACK:1; - UINT32 Reserved1:22; - UINT32 Reserved2:32; + UINT32 EN_CALL_STACK : 1; + UINT32 Reserved1 : 22; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_LBR_SELECT_REGISTER; - /** Package. Package C6/C7 Interrupt Response Limit 1 (R/W) This MSR defines the interrupt response time limit used by the processor to manage transition @@ -436,7 +432,7 @@ typedef union { @endcode @note MSR_HASWELL_PKGC_IRTL1 is defined as MSR_PKGC_IRTL1 in SDM. **/ -#define MSR_HASWELL_PKGC_IRTL1 0x0000060B +#define MSR_HASWELL_PKGC_IRTL1 0x0000060B /** MSR information returned for MSR index #MSR_HASWELL_PKGC_IRTL1 @@ -451,33 +447,32 @@ typedef union { /// that should be used to decide if the package should be put into a /// package C6 or C7 state. /// - UINT32 InterruptResponseTimeLimit:10; + UINT32 InterruptResponseTimeLimit : 10; /// /// [Bits 12:10] Time Unit (R/W) Specifies the encoding value of time unit /// of the interrupt response time limit. See Table 2-19 for supported /// time unit encodings. /// - UINT32 TimeUnit:3; - UINT32 Reserved1:2; + UINT32 TimeUnit : 3; + UINT32 Reserved1 : 2; /// /// [Bit 15] Valid (R/W) Indicates whether the values in bits 12:0 are /// valid and can be used by the processor for package C-sate management. /// - UINT32 Valid:1; - UINT32 Reserved2:16; - UINT32 Reserved3:32; + UINT32 Valid : 1; + UINT32 Reserved2 : 16; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_PKGC_IRTL1_REGISTER; - /** Package. Package C6/C7 Interrupt Response Limit 2 (R/W) This MSR defines the interrupt response time limit used by the processor to manage transition @@ -501,7 +496,7 @@ typedef union { @endcode @note MSR_HASWELL_PKGC_IRTL2 is defined as MSR_PKGC_IRTL2 in SDM. **/ -#define MSR_HASWELL_PKGC_IRTL2 0x0000060C +#define MSR_HASWELL_PKGC_IRTL2 0x0000060C /** MSR information returned for MSR index #MSR_HASWELL_PKGC_IRTL2 @@ -516,33 +511,32 @@ typedef union { /// that should be used to decide if the package should be put into a /// package C6 or C7 state. /// - UINT32 InterruptResponseTimeLimit:10; + UINT32 InterruptResponseTimeLimit : 10; /// /// [Bits 12:10] Time Unit (R/W) Specifies the encoding value of time unit /// of the interrupt response time limit. See Table 2-19 for supported /// time unit encodings. /// - UINT32 TimeUnit:3; - UINT32 Reserved1:2; + UINT32 TimeUnit : 3; + UINT32 Reserved1 : 2; /// /// [Bit 15] Valid (R/W) Indicates whether the values in bits 12:0 are /// valid and can be used by the processor for package C-sate management. /// - UINT32 Valid:1; - UINT32 Reserved2:16; - UINT32 Reserved3:32; + UINT32 Valid : 1; + UINT32 Reserved2 : 16; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_PKGC_IRTL2_REGISTER; - /** Package. PKG Perf Status (R/O) See Section 14.9.3, "Package RAPL Domain.". @@ -558,8 +552,7 @@ typedef union { @endcode @note MSR_HASWELL_PKG_PERF_STATUS is defined as MSR_PKG_PERF_STATUS in SDM. **/ -#define MSR_HASWELL_PKG_PERF_STATUS 0x00000613 - +#define MSR_HASWELL_PKG_PERF_STATUS 0x00000613 /** Package. DRAM Energy Status (R/O) See Section 14.9.5, "DRAM RAPL Domain.". @@ -576,8 +569,7 @@ typedef union { @endcode @note MSR_HASWELL_DRAM_ENERGY_STATUS is defined as MSR_DRAM_ENERGY_STATUS in SDM. **/ -#define MSR_HASWELL_DRAM_ENERGY_STATUS 0x00000619 - +#define MSR_HASWELL_DRAM_ENERGY_STATUS 0x00000619 /** Package. DRAM Performance Throttling Status (R/O) See Section 14.9.5, "DRAM @@ -595,8 +587,7 @@ typedef union { @endcode @note MSR_HASWELL_DRAM_PERF_STATUS is defined as MSR_DRAM_PERF_STATUS in SDM. **/ -#define MSR_HASWELL_DRAM_PERF_STATUS 0x0000061B - +#define MSR_HASWELL_DRAM_PERF_STATUS 0x0000061B /** Package. Base TDP Ratio (R/O). @@ -615,7 +606,7 @@ typedef union { @endcode @note MSR_HASWELL_CONFIG_TDP_NOMINAL is defined as MSR_CONFIG_TDP_NOMINAL in SDM. **/ -#define MSR_HASWELL_CONFIG_TDP_NOMINAL 0x00000648 +#define MSR_HASWELL_CONFIG_TDP_NOMINAL 0x00000648 /** MSR information returned for MSR index #MSR_HASWELL_CONFIG_TDP_NOMINAL @@ -629,21 +620,20 @@ typedef union { /// [Bits 7:0] Config_TDP_Base Base TDP level ratio to be used for this /// specific processor (in units of 100 MHz). /// - UINT32 Config_TDP_Base:8; - UINT32 Reserved1:24; - UINT32 Reserved2:32; + UINT32 Config_TDP_Base : 8; + UINT32 Reserved1 : 24; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_CONFIG_TDP_NOMINAL_REGISTER; - /** Package. ConfigTDP Level 1 ratio and power level (R/O). @@ -661,7 +651,7 @@ typedef union { @endcode @note MSR_HASWELL_CONFIG_TDP_LEVEL1 is defined as MSR_CONFIG_TDP_LEVEL1 in SDM. **/ -#define MSR_HASWELL_CONFIG_TDP_LEVEL1 0x00000649 +#define MSR_HASWELL_CONFIG_TDP_LEVEL1 0x00000649 /** MSR information returned for MSR index #MSR_HASWELL_CONFIG_TDP_LEVEL1 @@ -674,33 +664,32 @@ typedef union { /// /// [Bits 14:0] PKG_TDP_LVL1. Power setting for ConfigTDP Level 1. /// - UINT32 PKG_TDP_LVL1:15; - UINT32 Reserved1:1; + UINT32 PKG_TDP_LVL1 : 15; + UINT32 Reserved1 : 1; /// /// [Bits 23:16] Config_TDP_LVL1_Ratio. ConfigTDP level 1 ratio to be used /// for this specific processor. /// - UINT32 Config_TDP_LVL1_Ratio:8; - UINT32 Reserved2:8; + UINT32 Config_TDP_LVL1_Ratio : 8; + UINT32 Reserved2 : 8; /// /// [Bits 46:32] PKG_MAX_PWR_LVL1. Max Power setting allowed for ConfigTDP /// Level 1. /// - UINT32 PKG_MAX_PWR_LVL1:15; + UINT32 PKG_MAX_PWR_LVL1 : 15; /// /// [Bits 62:47] PKG_MIN_PWR_LVL1. MIN Power setting allowed for ConfigTDP /// Level 1. /// - UINT32 PKG_MIN_PWR_LVL1:16; - UINT32 Reserved3:1; + UINT32 PKG_MIN_PWR_LVL1 : 16; + UINT32 Reserved3 : 1; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_CONFIG_TDP_LEVEL1_REGISTER; - /** Package. ConfigTDP Level 2 ratio and power level (R/O). @@ -718,7 +707,7 @@ typedef union { @endcode @note MSR_HASWELL_CONFIG_TDP_LEVEL2 is defined as MSR_CONFIG_TDP_LEVEL2 in SDM. **/ -#define MSR_HASWELL_CONFIG_TDP_LEVEL2 0x0000064A +#define MSR_HASWELL_CONFIG_TDP_LEVEL2 0x0000064A /** MSR information returned for MSR index #MSR_HASWELL_CONFIG_TDP_LEVEL2 @@ -731,33 +720,32 @@ typedef union { /// /// [Bits 14:0] PKG_TDP_LVL2. Power setting for ConfigTDP Level 2. /// - UINT32 PKG_TDP_LVL2:15; - UINT32 Reserved1:1; + UINT32 PKG_TDP_LVL2 : 15; + UINT32 Reserved1 : 1; /// /// [Bits 23:16] Config_TDP_LVL2_Ratio. ConfigTDP level 2 ratio to be used /// for this specific processor. /// - UINT32 Config_TDP_LVL2_Ratio:8; - UINT32 Reserved2:8; + UINT32 Config_TDP_LVL2_Ratio : 8; + UINT32 Reserved2 : 8; /// /// [Bits 46:32] PKG_MAX_PWR_LVL2. Max Power setting allowed for ConfigTDP /// Level 2. /// - UINT32 PKG_MAX_PWR_LVL2:15; + UINT32 PKG_MAX_PWR_LVL2 : 15; /// /// [Bits 62:47] PKG_MIN_PWR_LVL2. MIN Power setting allowed for ConfigTDP /// Level 2. /// - UINT32 PKG_MIN_PWR_LVL2:16; - UINT32 Reserved3:1; + UINT32 PKG_MIN_PWR_LVL2 : 16; + UINT32 Reserved3 : 1; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_CONFIG_TDP_LEVEL2_REGISTER; - /** Package. ConfigTDP Control (R/W). @@ -776,7 +764,7 @@ typedef union { @endcode @note MSR_HASWELL_CONFIG_TDP_CONTROL is defined as MSR_CONFIG_TDP_CONTROL in SDM. **/ -#define MSR_HASWELL_CONFIG_TDP_CONTROL 0x0000064B +#define MSR_HASWELL_CONFIG_TDP_CONTROL 0x0000064B /** MSR information returned for MSR index #MSR_HASWELL_CONFIG_TDP_CONTROL @@ -789,26 +777,25 @@ typedef union { /// /// [Bits 1:0] TDP_LEVEL (RW/L) System BIOS can program this field. /// - UINT32 TDP_LEVEL:2; - UINT32 Reserved1:29; + UINT32 TDP_LEVEL : 2; + UINT32 Reserved1 : 29; /// /// [Bit 31] Config_TDP_Lock (RW/L) When this bit is set, the content of /// this register is locked until a reset. /// - UINT32 Config_TDP_Lock:1; - UINT32 Reserved2:32; + UINT32 Config_TDP_Lock : 1; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_CONFIG_TDP_CONTROL_REGISTER; - /** Package. ConfigTDP Control (R/W). @@ -827,7 +814,7 @@ typedef union { @endcode @note MSR_HASWELL_TURBO_ACTIVATION_RATIO is defined as MSR_TURBO_ACTIVATION_RATIO in SDM. **/ -#define MSR_HASWELL_TURBO_ACTIVATION_RATIO 0x0000064C +#define MSR_HASWELL_TURBO_ACTIVATION_RATIO 0x0000064C /** MSR information returned for MSR index #MSR_HASWELL_TURBO_ACTIVATION_RATIO @@ -841,26 +828,25 @@ typedef union { /// [Bits 7:0] MAX_NON_TURBO_RATIO (RW/L) System BIOS can program this /// field. /// - UINT32 MAX_NON_TURBO_RATIO:8; - UINT32 Reserved1:23; + UINT32 MAX_NON_TURBO_RATIO : 8; + UINT32 Reserved1 : 23; /// /// [Bit 31] TURBO_ACTIVATION_RATIO_Lock (RW/L) When this bit is set, the /// content of this register is locked until a reset. /// - UINT32 TURBO_ACTIVATION_RATIO_Lock:1; - UINT32 Reserved2:32; + UINT32 TURBO_ACTIVATION_RATIO_Lock : 1; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_TURBO_ACTIVATION_RATIO_REGISTER; - /** Core. C-State Configuration Control (R/W) Note: C-state values are processor specific C-state code names, unrelated to MWAIT extension C-state parameters @@ -881,7 +867,7 @@ typedef union { @endcode @note MSR_HASWELL_PKG_CST_CONFIG_CONTROL is defined as MSR_PKG_CST_CONFIG_CONTROL in SDM. **/ -#define MSR_HASWELL_PKG_CST_CONFIG_CONTROL 0x000000E2 +#define MSR_HASWELL_PKG_CST_CONFIG_CONTROL 0x000000E2 /** MSR information returned for MSR index #MSR_HASWELL_PKG_CST_CONFIG_CONTROL @@ -900,48 +886,47 @@ typedef union { /// 0100b: C7 0101b: C7s Package C states C7 are not available to /// processor with signature 06_3CH. /// - UINT32 Limit:4; - UINT32 Reserved1:6; + UINT32 Limit : 4; + UINT32 Reserved1 : 6; /// /// [Bit 10] I/O MWAIT Redirection Enable (R/W). /// - UINT32 IO_MWAIT:1; - UINT32 Reserved2:4; + UINT32 IO_MWAIT : 1; + UINT32 Reserved2 : 4; /// /// [Bit 15] CFG Lock (R/WO). /// - UINT32 CFGLock:1; - UINT32 Reserved3:9; + UINT32 CFGLock : 1; + UINT32 Reserved3 : 9; /// /// [Bit 25] C3 State Auto Demotion Enable (R/W). /// - UINT32 C3AutoDemotion:1; + UINT32 C3AutoDemotion : 1; /// /// [Bit 26] C1 State Auto Demotion Enable (R/W). /// - UINT32 C1AutoDemotion:1; + UINT32 C1AutoDemotion : 1; /// /// [Bit 27] Enable C3 Undemotion (R/W). /// - UINT32 C3Undemotion:1; + UINT32 C3Undemotion : 1; /// /// [Bit 28] Enable C1 Undemotion (R/W). /// - UINT32 C1Undemotion:1; - UINT32 Reserved4:3; - UINT32 Reserved5:32; + UINT32 C1Undemotion : 1; + UINT32 Reserved4 : 3; + UINT32 Reserved5 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_PKG_CST_CONFIG_CONTROL_REGISTER; - /** THREAD. Enhanced SMM Capabilities (SMM-RO) Reports SMM capability Enhancement. Accessible only while in SMM. @@ -961,7 +946,7 @@ typedef union { @endcode @note MSR_HASWELL_SMM_MCA_CAP is defined as MSR_SMM_MCA_CAP in SDM. **/ -#define MSR_HASWELL_SMM_MCA_CAP 0x0000017D +#define MSR_HASWELL_SMM_MCA_CAP 0x0000017D /** MSR information returned for MSR index #MSR_HASWELL_SMM_MCA_CAP @@ -971,29 +956,28 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:32; - UINT32 Reserved2:26; + UINT32 Reserved1 : 32; + UINT32 Reserved2 : 26; /// /// [Bit 58] SMM_Code_Access_Chk (SMM-RO) If set to 1 indicates that the /// SMM code access restriction is supported and the /// MSR_SMM_FEATURE_CONTROL is supported. /// - UINT32 SMM_Code_Access_Chk:1; + UINT32 SMM_Code_Access_Chk : 1; /// /// [Bit 59] Long_Flow_Indication (SMM-RO) If set to 1 indicates that the /// SMM long flow indicator is supported and the MSR_SMM_DELAYED is /// supported. /// - UINT32 Long_Flow_Indication:1; - UINT32 Reserved3:4; + UINT32 Long_Flow_Indication : 1; + UINT32 Reserved3 : 4; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_SMM_MCA_CAP_REGISTER; - /** Package. Maximum Ratio Limit of Turbo Mode RO if MSR_PLATFORM_INFO.[28] = 0, RW if MSR_PLATFORM_INFO.[28] = 1. @@ -1012,7 +996,7 @@ typedef union { @endcode @note MSR_HASWELL_TURBO_RATIO_LIMIT is defined as MSR_TURBO_RATIO_LIMIT in SDM. **/ -#define MSR_HASWELL_TURBO_RATIO_LIMIT 0x000001AD +#define MSR_HASWELL_TURBO_RATIO_LIMIT 0x000001AD /** MSR information returned for MSR index #MSR_HASWELL_TURBO_RATIO_LIMIT @@ -1026,35 +1010,34 @@ typedef union { /// [Bits 7:0] Package. Maximum Ratio Limit for 1C Maximum turbo ratio /// limit of 1 core active. /// - UINT32 Maximum1C:8; + UINT32 Maximum1C : 8; /// /// [Bits 15:8] Package. Maximum Ratio Limit for 2C Maximum turbo ratio /// limit of 2 core active. /// - UINT32 Maximum2C:8; + UINT32 Maximum2C : 8; /// /// [Bits 23:16] Package. Maximum Ratio Limit for 3C Maximum turbo ratio /// limit of 3 core active. /// - UINT32 Maximum3C:8; + UINT32 Maximum3C : 8; /// /// [Bits 31:24] Package. Maximum Ratio Limit for 4C Maximum turbo ratio /// limit of 4 core active. /// - UINT32 Maximum4C:8; - UINT32 Reserved:32; + UINT32 Maximum4C : 8; + UINT32 Reserved : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_TURBO_RATIO_LIMIT_REGISTER; - /** Package. Uncore PMU global control. @@ -1073,7 +1056,7 @@ typedef union { @endcode @note MSR_HASWELL_UNC_PERF_GLOBAL_CTRL is defined as MSR_UNC_PERF_GLOBAL_CTRL in SDM. **/ -#define MSR_HASWELL_UNC_PERF_GLOBAL_CTRL 0x00000391 +#define MSR_HASWELL_UNC_PERF_GLOBAL_CTRL 0x00000391 /** MSR information returned for MSR index #MSR_HASWELL_UNC_PERF_GLOBAL_CTRL @@ -1086,46 +1069,45 @@ typedef union { /// /// [Bit 0] Core 0 select. /// - UINT32 PMI_Sel_Core0:1; + UINT32 PMI_Sel_Core0 : 1; /// /// [Bit 1] Core 1 select. /// - UINT32 PMI_Sel_Core1:1; + UINT32 PMI_Sel_Core1 : 1; /// /// [Bit 2] Core 2 select. /// - UINT32 PMI_Sel_Core2:1; + UINT32 PMI_Sel_Core2 : 1; /// /// [Bit 3] Core 3 select. /// - UINT32 PMI_Sel_Core3:1; - UINT32 Reserved1:15; - UINT32 Reserved2:10; + UINT32 PMI_Sel_Core3 : 1; + UINT32 Reserved1 : 15; + UINT32 Reserved2 : 10; /// /// [Bit 29] Enable all uncore counters. /// - UINT32 EN:1; + UINT32 EN : 1; /// /// [Bit 30] Enable wake on PMI. /// - UINT32 WakePMI:1; + UINT32 WakePMI : 1; /// /// [Bit 31] Enable Freezing counter when overflow. /// - UINT32 FREEZE:1; - UINT32 Reserved3:32; + UINT32 FREEZE : 1; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_UNC_PERF_GLOBAL_CTRL_REGISTER; - /** Package. Uncore PMU main status. @@ -1144,7 +1126,7 @@ typedef union { @endcode @note MSR_HASWELL_UNC_PERF_GLOBAL_STATUS is defined as MSR_UNC_PERF_GLOBAL_STATUS in SDM. **/ -#define MSR_HASWELL_UNC_PERF_GLOBAL_STATUS 0x00000392 +#define MSR_HASWELL_UNC_PERF_GLOBAL_STATUS 0x00000392 /** MSR information returned for MSR index #MSR_HASWELL_UNC_PERF_GLOBAL_STATUS @@ -1157,30 +1139,29 @@ typedef union { /// /// [Bit 0] Fixed counter overflowed. /// - UINT32 Fixed:1; + UINT32 Fixed : 1; /// /// [Bit 1] An ARB counter overflowed. /// - UINT32 ARB:1; - UINT32 Reserved1:1; + UINT32 ARB : 1; + UINT32 Reserved1 : 1; /// /// [Bit 3] A CBox counter overflowed (on any slice). /// - UINT32 CBox:1; - UINT32 Reserved2:28; - UINT32 Reserved3:32; + UINT32 CBox : 1; + UINT32 Reserved2 : 28; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_UNC_PERF_GLOBAL_STATUS_REGISTER; - /** Package. Uncore fixed counter control (R/W). @@ -1199,7 +1180,7 @@ typedef union { @endcode @note MSR_HASWELL_UNC_PERF_FIXED_CTRL is defined as MSR_UNC_PERF_FIXED_CTRL in SDM. **/ -#define MSR_HASWELL_UNC_PERF_FIXED_CTRL 0x00000394 +#define MSR_HASWELL_UNC_PERF_FIXED_CTRL 0x00000394 /** MSR information returned for MSR index #MSR_HASWELL_UNC_PERF_FIXED_CTRL @@ -1209,30 +1190,29 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:20; + UINT32 Reserved1 : 20; /// /// [Bit 20] Enable overflow propagation. /// - UINT32 EnableOverflow:1; - UINT32 Reserved2:1; + UINT32 EnableOverflow : 1; + UINT32 Reserved2 : 1; /// /// [Bit 22] Enable counting. /// - UINT32 EnableCounting:1; - UINT32 Reserved3:9; - UINT32 Reserved4:32; + UINT32 EnableCounting : 1; + UINT32 Reserved3 : 9; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_UNC_PERF_FIXED_CTRL_REGISTER; - /** Package. Uncore fixed counter. @@ -1251,7 +1231,7 @@ typedef union { @endcode @note MSR_HASWELL_UNC_PERF_FIXED_CTR is defined as MSR_UNC_PERF_FIXED_CTR in SDM. **/ -#define MSR_HASWELL_UNC_PERF_FIXED_CTR 0x00000395 +#define MSR_HASWELL_UNC_PERF_FIXED_CTR 0x00000395 /** MSR information returned for MSR index #MSR_HASWELL_UNC_PERF_FIXED_CTR @@ -1264,20 +1244,19 @@ typedef union { /// /// [Bits 31:0] Current count. /// - UINT32 CurrentCount:32; + UINT32 CurrentCount : 32; /// /// [Bits 47:32] Current count. /// - UINT32 CurrentCountHi:16; - UINT32 Reserved:16; + UINT32 CurrentCountHi : 16; + UINT32 Reserved : 16; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_UNC_PERF_FIXED_CTR_REGISTER; - /** Package. Uncore C-Box configuration information (R/O). @@ -1295,7 +1274,7 @@ typedef union { @endcode @note MSR_HASWELL_UNC_CBO_CONFIG is defined as MSR_UNC_CBO_CONFIG in SDM. **/ -#define MSR_HASWELL_UNC_CBO_CONFIG 0x00000396 +#define MSR_HASWELL_UNC_CBO_CONFIG 0x00000396 /** MSR information returned for MSR index #MSR_HASWELL_UNC_CBO_CONFIG @@ -1308,21 +1287,20 @@ typedef union { /// /// [Bits 3:0] Encoded number of C-Box, derive value by "-1". /// - UINT32 CBox:4; - UINT32 Reserved1:28; - UINT32 Reserved2:32; + UINT32 CBox : 4; + UINT32 Reserved1 : 28; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_UNC_CBO_CONFIG_REGISTER; - /** Package. Uncore Arb unit, performance counter 0. @@ -1339,8 +1317,7 @@ typedef union { @endcode @note MSR_HASWELL_UNC_ARB_PERFCTR0 is defined as MSR_UNC_ARB_PERFCTR0 in SDM. **/ -#define MSR_HASWELL_UNC_ARB_PERFCTR0 0x000003B0 - +#define MSR_HASWELL_UNC_ARB_PERFCTR0 0x000003B0 /** Package. Uncore Arb unit, performance counter 1. @@ -1358,8 +1335,7 @@ typedef union { @endcode @note MSR_HASWELL_UNC_ARB_PERFCTR1 is defined as MSR_UNC_ARB_PERFCTR1 in SDM. **/ -#define MSR_HASWELL_UNC_ARB_PERFCTR1 0x000003B1 - +#define MSR_HASWELL_UNC_ARB_PERFCTR1 0x000003B1 /** Package. Uncore Arb unit, counter 0 event select MSR. @@ -1377,8 +1353,7 @@ typedef union { @endcode @note MSR_HASWELL_UNC_ARB_PERFEVTSEL0 is defined as MSR_UNC_ARB_PERFEVTSEL0 in SDM. **/ -#define MSR_HASWELL_UNC_ARB_PERFEVTSEL0 0x000003B2 - +#define MSR_HASWELL_UNC_ARB_PERFEVTSEL0 0x000003B2 /** Package. Uncore Arb unit, counter 1 event select MSR. @@ -1396,8 +1371,7 @@ typedef union { @endcode @note MSR_HASWELL_UNC_ARB_PERFEVTSEL1 is defined as MSR_UNC_ARB_PERFEVTSEL1 in SDM. **/ -#define MSR_HASWELL_UNC_ARB_PERFEVTSEL1 0x000003B3 - +#define MSR_HASWELL_UNC_ARB_PERFEVTSEL1 0x000003B3 /** Package. Enhanced SMM Feature Control (SMM-RW) Reports SMM capability @@ -1418,7 +1392,7 @@ typedef union { @endcode @note MSR_HASWELL_SMM_FEATURE_CONTROL is defined as MSR_SMM_FEATURE_CONTROL in SDM. **/ -#define MSR_HASWELL_SMM_FEATURE_CONTROL 0x000004E0 +#define MSR_HASWELL_SMM_FEATURE_CONTROL 0x000004E0 /** MSR information returned for MSR index #MSR_HASWELL_SMM_FEATURE_CONTROL @@ -1432,8 +1406,8 @@ typedef union { /// [Bit 0] Lock (SMM-RWO) When set to '1' locks this register from /// further changes. /// - UINT32 Lock:1; - UINT32 Reserved1:1; + UINT32 Lock : 1; + UINT32 Reserved1 : 1; /// /// [Bit 2] SMM_Code_Chk_En (SMM-RW) This control bit is available only if /// MSR_SMM_MCA_CAP[58] == 1. When set to '0' (default) none of the @@ -1442,21 +1416,20 @@ typedef union { /// the package that attempts to execute SMM code not within the ranges /// defined by the SMRR will assert an unrecoverable MCE. /// - UINT32 SMM_Code_Chk_En:1; - UINT32 Reserved2:29; - UINT32 Reserved3:32; + UINT32 SMM_Code_Chk_En : 1; + UINT32 Reserved2 : 29; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_SMM_FEATURE_CONTROL_REGISTER; - /** Package. SMM Delayed (SMM-RO) Reports the interruptible state of all logical processors in the package. Available only while in SMM and @@ -1492,8 +1465,7 @@ typedef union { @endcode @note MSR_HASWELL_SMM_DELAYED is defined as MSR_SMM_DELAYED in SDM. **/ -#define MSR_HASWELL_SMM_DELAYED 0x000004E2 - +#define MSR_HASWELL_SMM_DELAYED 0x000004E2 /** Package. SMM Blocked (SMM-RO) Reports the blocked state of all logical @@ -1526,8 +1498,7 @@ typedef union { @endcode @note MSR_HASWELL_SMM_BLOCKED is defined as MSR_SMM_BLOCKED in SDM. **/ -#define MSR_HASWELL_SMM_BLOCKED 0x000004E3 - +#define MSR_HASWELL_SMM_BLOCKED 0x000004E3 /** Package. Unit Multipliers used in RAPL Interfaces (R/O). @@ -1546,7 +1517,7 @@ typedef union { @endcode @note MSR_HASWELL_RAPL_POWER_UNIT is defined as MSR_RAPL_POWER_UNIT in SDM. **/ -#define MSR_HASWELL_RAPL_POWER_UNIT 0x00000606 +#define MSR_HASWELL_RAPL_POWER_UNIT 0x00000606 /** MSR information returned for MSR index #MSR_HASWELL_RAPL_POWER_UNIT @@ -1559,35 +1530,34 @@ typedef union { /// /// [Bits 3:0] Package. Power Units See Section 14.9.1, "RAPL Interfaces.". /// - UINT32 PowerUnits:4; - UINT32 Reserved1:4; + UINT32 PowerUnits : 4; + UINT32 Reserved1 : 4; /// /// [Bits 12:8] Package. Energy Status Units Energy related information /// (in Joules) is based on the multiplier, 1/2^ESU; where ESU is an /// unsigned integer represented by bits 12:8. Default value is 0EH (or 61 /// micro-joules). /// - UINT32 EnergyStatusUnits:5; - UINT32 Reserved2:3; + UINT32 EnergyStatusUnits : 5; + UINT32 Reserved2 : 3; /// /// [Bits 19:16] Package. Time Units See Section 14.9.1, "RAPL /// Interfaces.". /// - UINT32 TimeUnits:4; - UINT32 Reserved3:12; - UINT32 Reserved4:32; + UINT32 TimeUnits : 4; + UINT32 Reserved3 : 12; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_RAPL_POWER_UNIT_REGISTER; - /** Package. PP0 Energy Status (R/O) See Section 14.9.4, "PP0/PP1 RAPL Domains.". @@ -1604,8 +1574,7 @@ typedef union { @endcode @note MSR_HASWELL_PP0_ENERGY_STATUS is defined as MSR_PP0_ENERGY_STATUS in SDM. **/ -#define MSR_HASWELL_PP0_ENERGY_STATUS 0x00000639 - +#define MSR_HASWELL_PP0_ENERGY_STATUS 0x00000639 /** Package. PP1 RAPL Power Limit Control (R/W) See Section 14.9.4, "PP0/PP1 @@ -1624,8 +1593,7 @@ typedef union { @endcode @note MSR_HASWELL_PP1_POWER_LIMIT is defined as MSR_PP1_POWER_LIMIT in SDM. **/ -#define MSR_HASWELL_PP1_POWER_LIMIT 0x00000640 - +#define MSR_HASWELL_PP1_POWER_LIMIT 0x00000640 /** Package. PP1 Energy Status (R/O) See Section 14.9.4, "PP0/PP1 RAPL @@ -1643,8 +1611,7 @@ typedef union { @endcode @note MSR_HASWELL_PP1_ENERGY_STATUS is defined as MSR_PP1_ENERGY_STATUS in SDM. **/ -#define MSR_HASWELL_PP1_ENERGY_STATUS 0x00000641 - +#define MSR_HASWELL_PP1_ENERGY_STATUS 0x00000641 /** Package. PP1 Balance Policy (R/W) See Section 14.9.4, "PP0/PP1 RAPL @@ -1663,8 +1630,7 @@ typedef union { @endcode @note MSR_HASWELL_PP1_POLICY is defined as MSR_PP1_POLICY in SDM. **/ -#define MSR_HASWELL_PP1_POLICY 0x00000642 - +#define MSR_HASWELL_PP1_POLICY 0x00000642 /** Package. Indicator of Frequency Clipping in Processor Cores (R/W) (frequency @@ -1685,7 +1651,7 @@ typedef union { @endcode @note MSR_HASWELL_CORE_PERF_LIMIT_REASONS is defined as MSR_CORE_PERF_LIMIT_REASONS in SDM. **/ -#define MSR_HASWELL_CORE_PERF_LIMIT_REASONS 0x00000690 +#define MSR_HASWELL_CORE_PERF_LIMIT_REASONS 0x00000690 /** MSR information returned for MSR index #MSR_HASWELL_CORE_PERF_LIMIT_REASONS @@ -1700,155 +1666,154 @@ typedef union { /// reduced below the operating system request due to assertion of /// external PROCHOT. /// - UINT32 PROCHOT_Status:1; + UINT32 PROCHOT_Status : 1; /// /// [Bit 1] Thermal Status (R0) When set, frequency is reduced below the /// operating system request due to a thermal event. /// - UINT32 ThermalStatus:1; - UINT32 Reserved1:2; + UINT32 ThermalStatus : 1; + UINT32 Reserved1 : 2; /// /// [Bit 4] Graphics Driver Status (R0) When set, frequency is reduced /// below the operating system request due to Processor Graphics driver /// override. /// - UINT32 GraphicsDriverStatus:1; + UINT32 GraphicsDriverStatus : 1; /// /// [Bit 5] Autonomous Utilization-Based Frequency Control Status (R0) /// When set, frequency is reduced below the operating system request /// because the processor has detected that utilization is low. /// - UINT32 AutonomousUtilizationBasedFrequencyControlStatus:1; + UINT32 AutonomousUtilizationBasedFrequencyControlStatus : 1; /// /// [Bit 6] VR Therm Alert Status (R0) When set, frequency is reduced /// below the operating system request due to a thermal alert from the /// Voltage Regulator. /// - UINT32 VRThermAlertStatus:1; - UINT32 Reserved2:1; + UINT32 VRThermAlertStatus : 1; + UINT32 Reserved2 : 1; /// /// [Bit 8] Electrical Design Point Status (R0) When set, frequency is /// reduced below the operating system request due to electrical design /// point constraints (e.g. maximum electrical current consumption). /// - UINT32 ElectricalDesignPointStatus:1; + UINT32 ElectricalDesignPointStatus : 1; /// /// [Bit 9] Core Power Limiting Status (R0) When set, frequency is reduced /// below the operating system request due to domain-level power limiting. /// - UINT32 PLStatus:1; + UINT32 PLStatus : 1; /// /// [Bit 10] Package-Level Power Limiting PL1 Status (R0) When set, /// frequency is reduced below the operating system request due to /// package-level power limiting PL1. /// - UINT32 PL1Status:1; + UINT32 PL1Status : 1; /// /// [Bit 11] Package-Level PL2 Power Limiting Status (R0) When set, /// frequency is reduced below the operating system request due to /// package-level power limiting PL2. /// - UINT32 PL2Status:1; + UINT32 PL2Status : 1; /// /// [Bit 12] Max Turbo Limit Status (R0) When set, frequency is reduced /// below the operating system request due to multi-core turbo limits. /// - UINT32 MaxTurboLimitStatus:1; + UINT32 MaxTurboLimitStatus : 1; /// /// [Bit 13] Turbo Transition Attenuation Status (R0) When set, frequency /// is reduced below the operating system request due to Turbo transition /// attenuation. This prevents performance degradation due to frequent /// operating ratio changes. /// - UINT32 TurboTransitionAttenuationStatus:1; - UINT32 Reserved3:2; + UINT32 TurboTransitionAttenuationStatus : 1; + UINT32 Reserved3 : 2; /// /// [Bit 16] PROCHOT Log When set, indicates that the PROCHOT Status bit /// has asserted since the log bit was last cleared. This log bit will /// remain set until cleared by software writing 0. /// - UINT32 PROCHOT_Log:1; + UINT32 PROCHOT_Log : 1; /// /// [Bit 17] Thermal Log When set, indicates that the Thermal Status bit /// has asserted since the log bit was last cleared. This log bit will /// remain set until cleared by software writing 0. /// - UINT32 ThermalLog:1; - UINT32 Reserved4:2; + UINT32 ThermalLog : 1; + UINT32 Reserved4 : 2; /// /// [Bit 20] Graphics Driver Log When set, indicates that the Graphics /// Driver Status bit has asserted since the log bit was last cleared. /// This log bit will remain set until cleared by software writing 0. /// - UINT32 GraphicsDriverLog:1; + UINT32 GraphicsDriverLog : 1; /// /// [Bit 21] Autonomous Utilization-Based Frequency Control Log When set, /// indicates that the Autonomous Utilization-Based Frequency Control /// Status bit has asserted since the log bit was last cleared. This log /// bit will remain set until cleared by software writing 0. /// - UINT32 AutonomousUtilizationBasedFrequencyControlLog:1; + UINT32 AutonomousUtilizationBasedFrequencyControlLog : 1; /// /// [Bit 22] VR Therm Alert Log When set, indicates that the VR Therm /// Alert Status bit has asserted since the log bit was last cleared. This /// log bit will remain set until cleared by software writing 0. /// - UINT32 VRThermAlertLog:1; - UINT32 Reserved5:1; + UINT32 VRThermAlertLog : 1; + UINT32 Reserved5 : 1; /// /// [Bit 24] Electrical Design Point Log When set, indicates that the EDP /// Status bit has asserted since the log bit was last cleared. This log /// bit will remain set until cleared by software writing 0. /// - UINT32 ElectricalDesignPointLog:1; + UINT32 ElectricalDesignPointLog : 1; /// /// [Bit 25] Core Power Limiting Log When set, indicates that the Core /// Power Limiting Status bit has asserted since the log bit was last /// cleared. This log bit will remain set until cleared by software /// writing 0. /// - UINT32 PLLog:1; + UINT32 PLLog : 1; /// /// [Bit 26] Package-Level PL1 Power Limiting Log When set, indicates /// that the Package Level PL1 Power Limiting Status bit has asserted /// since the log bit was last cleared. This log bit will remain set until /// cleared by software writing 0. /// - UINT32 PL1Log:1; + UINT32 PL1Log : 1; /// /// [Bit 27] Package-Level PL2 Power Limiting Log When set, indicates that /// the Package Level PL2 Power Limiting Status bit has asserted since the /// log bit was last cleared. This log bit will remain set until cleared /// by software writing 0. /// - UINT32 PL2Log:1; + UINT32 PL2Log : 1; /// /// [Bit 28] Max Turbo Limit Log When set, indicates that the Max Turbo /// Limit Status bit has asserted since the log bit was last cleared. This /// log bit will remain set until cleared by software writing 0. /// - UINT32 MaxTurboLimitLog:1; + UINT32 MaxTurboLimitLog : 1; /// /// [Bit 29] Turbo Transition Attenuation Log When set, indicates that the /// Turbo Transition Attenuation Status bit has asserted since the log bit /// was last cleared. This log bit will remain set until cleared by /// software writing 0. /// - UINT32 TurboTransitionAttenuationLog:1; - UINT32 Reserved6:2; - UINT32 Reserved7:32; + UINT32 TurboTransitionAttenuationLog : 1; + UINT32 Reserved6 : 2; + UINT32 Reserved7 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_CORE_PERF_LIMIT_REASONS_REGISTER; - /** Package. Indicator of Frequency Clipping in the Processor Graphics (R/W) (frequency refers to processor graphics frequency). @@ -1883,144 +1848,143 @@ typedef union { /// [Bit 0] PROCHOT Status (R0) When set, frequency is reduced below the /// operating system request due to assertion of external PROCHOT. /// - UINT32 PROCHOT_Status:1; + UINT32 PROCHOT_Status : 1; /// /// [Bit 1] Thermal Status (R0) When set, frequency is reduced below the /// operating system request due to a thermal event. /// - UINT32 ThermalStatus:1; - UINT32 Reserved1:2; + UINT32 ThermalStatus : 1; + UINT32 Reserved1 : 2; /// /// [Bit 4] Graphics Driver Status (R0) When set, frequency is reduced /// below the operating system request due to Processor Graphics driver /// override. /// - UINT32 GraphicsDriverStatus:1; + UINT32 GraphicsDriverStatus : 1; /// /// [Bit 5] Autonomous Utilization-Based Frequency Control Status (R0) /// When set, frequency is reduced below the operating system request /// because the processor has detected that utilization is low. /// - UINT32 AutonomousUtilizationBasedFrequencyControlStatus:1; + UINT32 AutonomousUtilizationBasedFrequencyControlStatus : 1; /// /// [Bit 6] VR Therm Alert Status (R0) When set, frequency is reduced /// below the operating system request due to a thermal alert from the /// Voltage Regulator. /// - UINT32 VRThermAlertStatus:1; - UINT32 Reserved2:1; + UINT32 VRThermAlertStatus : 1; + UINT32 Reserved2 : 1; /// /// [Bit 8] Electrical Design Point Status (R0) When set, frequency is /// reduced below the operating system request due to electrical design /// point constraints (e.g. maximum electrical current consumption). /// - UINT32 ElectricalDesignPointStatus:1; + UINT32 ElectricalDesignPointStatus : 1; /// /// [Bit 9] Graphics Power Limiting Status (R0) When set, frequency is /// reduced below the operating system request due to domain-level power /// limiting. /// - UINT32 GraphicsPowerLimitingStatus:1; + UINT32 GraphicsPowerLimitingStatus : 1; /// /// [Bit 10] Package-Level Power Limiting PL1 Status (R0) When set, /// frequency is reduced below the operating system request due to /// package-level power limiting PL1. /// - UINT32 PL1STatus:1; + UINT32 PL1STatus : 1; /// /// [Bit 11] Package-Level PL2 Power Limiting Status (R0) When set, /// frequency is reduced below the operating system request due to /// package-level power limiting PL2. /// - UINT32 PL2Status:1; - UINT32 Reserved3:4; + UINT32 PL2Status : 1; + UINT32 Reserved3 : 4; /// /// [Bit 16] PROCHOT Log When set, indicates that the PROCHOT Status bit /// has asserted since the log bit was last cleared. This log bit will /// remain set until cleared by software writing 0. /// - UINT32 PROCHOT_Log:1; + UINT32 PROCHOT_Log : 1; /// /// [Bit 17] Thermal Log When set, indicates that the Thermal Status bit /// has asserted since the log bit was last cleared. This log bit will /// remain set until cleared by software writing 0. /// - UINT32 ThermalLog:1; - UINT32 Reserved4:2; + UINT32 ThermalLog : 1; + UINT32 Reserved4 : 2; /// /// [Bit 20] Graphics Driver Log When set, indicates that the Graphics /// Driver Status bit has asserted since the log bit was last cleared. /// This log bit will remain set until cleared by software writing 0. /// - UINT32 GraphicsDriverLog:1; + UINT32 GraphicsDriverLog : 1; /// /// [Bit 21] Autonomous Utilization-Based Frequency Control Log When set, /// indicates that the Autonomous Utilization-Based Frequency Control /// Status bit has asserted since the log bit was last cleared. This log /// bit will remain set until cleared by software writing 0. /// - UINT32 AutonomousUtilizationBasedFrequencyControlLog:1; + UINT32 AutonomousUtilizationBasedFrequencyControlLog : 1; /// /// [Bit 22] VR Therm Alert Log When set, indicates that the VR Therm /// Alert Status bit has asserted since the log bit was last cleared. This /// log bit will remain set until cleared by software writing 0. /// - UINT32 VRThermAlertLog:1; - UINT32 Reserved5:1; + UINT32 VRThermAlertLog : 1; + UINT32 Reserved5 : 1; /// /// [Bit 24] Electrical Design Point Log When set, indicates that the EDP /// Status bit has asserted since the log bit was last cleared. This log /// bit will remain set until cleared by software writing 0. /// - UINT32 ElectricalDesignPointLog:1; + UINT32 ElectricalDesignPointLog : 1; /// /// [Bit 25] Core Power Limiting Log When set, indicates that the Core /// Power Limiting Status bit has asserted since the log bit was last /// cleared. This log bit will remain set until cleared by software /// writing 0. /// - UINT32 CorePowerLimitingLog:1; + UINT32 CorePowerLimitingLog : 1; /// /// [Bit 26] Package-Level PL1 Power Limiting Log When set, indicates /// that the Package Level PL1 Power Limiting Status bit has asserted /// since the log bit was last cleared. This log bit will remain set until /// cleared by software writing 0. /// - UINT32 PL1Log:1; + UINT32 PL1Log : 1; /// /// [Bit 27] Package-Level PL2 Power Limiting Log When set, indicates that /// the Package Level PL2 Power Limiting Status bit has asserted since the /// log bit was last cleared. This log bit will remain set until cleared /// by software writing 0. /// - UINT32 PL2Log:1; + UINT32 PL2Log : 1; /// /// [Bit 28] Max Turbo Limit Log When set, indicates that the Max Turbo /// Limit Status bit has asserted since the log bit was last cleared. This /// log bit will remain set until cleared by software writing 0. /// - UINT32 MaxTurboLimitLog:1; + UINT32 MaxTurboLimitLog : 1; /// /// [Bit 29] Turbo Transition Attenuation Log When set, indicates that the /// Turbo Transition Attenuation Status bit has asserted since the log bit /// was last cleared. This log bit will remain set until cleared by /// software writing 0. /// - UINT32 TurboTransitionAttenuationLog:1; - UINT32 Reserved6:2; - UINT32 Reserved7:32; + UINT32 TurboTransitionAttenuationLog : 1; + UINT32 Reserved6 : 2; + UINT32 Reserved7 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_GRAPHICS_PERF_LIMIT_REASONS_REGISTER; - /** Package. Indicator of Frequency Clipping in the Ring Interconnect (R/W) (frequency refers to ring interconnect in the uncore). @@ -2040,7 +2004,7 @@ typedef union { @endcode @note MSR_HASWELL_RING_PERF_LIMIT_REASONS is defined as MSR_RING_PERF_LIMIT_REASONS in SDM. **/ -#define MSR_HASWELL_RING_PERF_LIMIT_REASONS 0x000006B1 +#define MSR_HASWELL_RING_PERF_LIMIT_REASONS 0x000006B1 /** MSR information returned for MSR index #MSR_HASWELL_RING_PERF_LIMIT_REASONS @@ -2054,127 +2018,126 @@ typedef union { /// [Bit 0] PROCHOT Status (R0) When set, frequency is reduced below the /// operating system request due to assertion of external PROCHOT. /// - UINT32 PROCHOT_Status:1; + UINT32 PROCHOT_Status : 1; /// /// [Bit 1] Thermal Status (R0) When set, frequency is reduced below the /// operating system request due to a thermal event. /// - UINT32 ThermalStatus:1; - UINT32 Reserved1:4; + UINT32 ThermalStatus : 1; + UINT32 Reserved1 : 4; /// /// [Bit 6] VR Therm Alert Status (R0) When set, frequency is reduced /// below the operating system request due to a thermal alert from the /// Voltage Regulator. /// - UINT32 VRThermAlertStatus:1; - UINT32 Reserved2:1; + UINT32 VRThermAlertStatus : 1; + UINT32 Reserved2 : 1; /// /// [Bit 8] Electrical Design Point Status (R0) When set, frequency is /// reduced below the operating system request due to electrical design /// point constraints (e.g. maximum electrical current consumption). /// - UINT32 ElectricalDesignPointStatus:1; - UINT32 Reserved3:1; + UINT32 ElectricalDesignPointStatus : 1; + UINT32 Reserved3 : 1; /// /// [Bit 10] Package-Level Power Limiting PL1 Status (R0) When set, /// frequency is reduced below the operating system request due to /// package-level power limiting PL1. /// - UINT32 PL1STatus:1; + UINT32 PL1STatus : 1; /// /// [Bit 11] Package-Level PL2 Power Limiting Status (R0) When set, /// frequency is reduced below the operating system request due to /// package-level power limiting PL2. /// - UINT32 PL2Status:1; - UINT32 Reserved4:4; + UINT32 PL2Status : 1; + UINT32 Reserved4 : 4; /// /// [Bit 16] PROCHOT Log When set, indicates that the PROCHOT Status bit /// has asserted since the log bit was last cleared. This log bit will /// remain set until cleared by software writing 0. /// - UINT32 PROCHOT_Log:1; + UINT32 PROCHOT_Log : 1; /// /// [Bit 17] Thermal Log When set, indicates that the Thermal Status bit /// has asserted since the log bit was last cleared. This log bit will /// remain set until cleared by software writing 0. /// - UINT32 ThermalLog:1; - UINT32 Reserved5:2; + UINT32 ThermalLog : 1; + UINT32 Reserved5 : 2; /// /// [Bit 20] Graphics Driver Log When set, indicates that the Graphics /// Driver Status bit has asserted since the log bit was last cleared. /// This log bit will remain set until cleared by software writing 0. /// - UINT32 GraphicsDriverLog:1; + UINT32 GraphicsDriverLog : 1; /// /// [Bit 21] Autonomous Utilization-Based Frequency Control Log When set, /// indicates that the Autonomous Utilization-Based Frequency Control /// Status bit has asserted since the log bit was last cleared. This log /// bit will remain set until cleared by software writing 0. /// - UINT32 AutonomousUtilizationBasedFrequencyControlLog:1; + UINT32 AutonomousUtilizationBasedFrequencyControlLog : 1; /// /// [Bit 22] VR Therm Alert Log When set, indicates that the VR Therm /// Alert Status bit has asserted since the log bit was last cleared. This /// log bit will remain set until cleared by software writing 0. /// - UINT32 VRThermAlertLog:1; - UINT32 Reserved6:1; + UINT32 VRThermAlertLog : 1; + UINT32 Reserved6 : 1; /// /// [Bit 24] Electrical Design Point Log When set, indicates that the EDP /// Status bit has asserted since the log bit was last cleared. This log /// bit will remain set until cleared by software writing 0. /// - UINT32 ElectricalDesignPointLog:1; + UINT32 ElectricalDesignPointLog : 1; /// /// [Bit 25] Core Power Limiting Log When set, indicates that the Core /// Power Limiting Status bit has asserted since the log bit was last /// cleared. This log bit will remain set until cleared by software /// writing 0. /// - UINT32 CorePowerLimitingLog:1; + UINT32 CorePowerLimitingLog : 1; /// /// [Bit 26] Package-Level PL1 Power Limiting Log When set, indicates /// that the Package Level PL1 Power Limiting Status bit has asserted /// since the log bit was last cleared. This log bit will remain set until /// cleared by software writing 0. /// - UINT32 PL1Log:1; + UINT32 PL1Log : 1; /// /// [Bit 27] Package-Level PL2 Power Limiting Log When set, indicates that /// the Package Level PL2 Power Limiting Status bit has asserted since the /// log bit was last cleared. This log bit will remain set until cleared /// by software writing 0. /// - UINT32 PL2Log:1; + UINT32 PL2Log : 1; /// /// [Bit 28] Max Turbo Limit Log When set, indicates that the Max Turbo /// Limit Status bit has asserted since the log bit was last cleared. This /// log bit will remain set until cleared by software writing 0. /// - UINT32 MaxTurboLimitLog:1; + UINT32 MaxTurboLimitLog : 1; /// /// [Bit 29] Turbo Transition Attenuation Log When set, indicates that the /// Turbo Transition Attenuation Status bit has asserted since the log bit /// was last cleared. This log bit will remain set until cleared by /// software writing 0. /// - UINT32 TurboTransitionAttenuationLog:1; - UINT32 Reserved7:2; - UINT32 Reserved8:32; + UINT32 TurboTransitionAttenuationLog : 1; + UINT32 Reserved7 : 2; + UINT32 Reserved8 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_RING_PERF_LIMIT_REASONS_REGISTER; - /** Package. Uncore C-Box 0, counter 0 event select MSR. @@ -2191,8 +2154,7 @@ typedef union { @endcode @note MSR_HASWELL_UNC_CBO_0_PERFEVTSEL0 is defined as MSR_UNC_CBO_0_PERFEVTSEL0 in SDM. **/ -#define MSR_HASWELL_UNC_CBO_0_PERFEVTSEL0 0x00000700 - +#define MSR_HASWELL_UNC_CBO_0_PERFEVTSEL0 0x00000700 /** Package. Uncore C-Box 0, counter 1 event select MSR. @@ -2210,8 +2172,7 @@ typedef union { @endcode @note MSR_HASWELL_UNC_CBO_0_PERFEVTSEL1 is defined as MSR_UNC_CBO_0_PERFEVTSEL1 in SDM. **/ -#define MSR_HASWELL_UNC_CBO_0_PERFEVTSEL1 0x00000701 - +#define MSR_HASWELL_UNC_CBO_0_PERFEVTSEL1 0x00000701 /** Package. Uncore C-Box 0, performance counter 0. @@ -2229,8 +2190,7 @@ typedef union { @endcode @note MSR_HASWELL_UNC_CBO_0_PERFCTR0 is defined as MSR_UNC_CBO_0_PERFCTR0 in SDM. **/ -#define MSR_HASWELL_UNC_CBO_0_PERFCTR0 0x00000706 - +#define MSR_HASWELL_UNC_CBO_0_PERFCTR0 0x00000706 /** Package. Uncore C-Box 0, performance counter 1. @@ -2248,8 +2208,7 @@ typedef union { @endcode @note MSR_HASWELL_UNC_CBO_0_PERFCTR1 is defined as MSR_UNC_CBO_0_PERFCTR1 in SDM. **/ -#define MSR_HASWELL_UNC_CBO_0_PERFCTR1 0x00000707 - +#define MSR_HASWELL_UNC_CBO_0_PERFCTR1 0x00000707 /** Package. Uncore C-Box 1, counter 0 event select MSR. @@ -2267,8 +2226,7 @@ typedef union { @endcode @note MSR_HASWELL_UNC_CBO_1_PERFEVTSEL0 is defined as MSR_UNC_CBO_1_PERFEVTSEL0 in SDM. **/ -#define MSR_HASWELL_UNC_CBO_1_PERFEVTSEL0 0x00000710 - +#define MSR_HASWELL_UNC_CBO_1_PERFEVTSEL0 0x00000710 /** Package. Uncore C-Box 1, counter 1 event select MSR. @@ -2286,8 +2244,7 @@ typedef union { @endcode @note MSR_HASWELL_UNC_CBO_1_PERFEVTSEL1 is defined as MSR_UNC_CBO_1_PERFEVTSEL1 in SDM. **/ -#define MSR_HASWELL_UNC_CBO_1_PERFEVTSEL1 0x00000711 - +#define MSR_HASWELL_UNC_CBO_1_PERFEVTSEL1 0x00000711 /** Package. Uncore C-Box 1, performance counter 0. @@ -2305,8 +2262,7 @@ typedef union { @endcode @note MSR_HASWELL_UNC_CBO_1_PERFCTR0 is defined as MSR_UNC_CBO_1_PERFCTR0 in SDM. **/ -#define MSR_HASWELL_UNC_CBO_1_PERFCTR0 0x00000716 - +#define MSR_HASWELL_UNC_CBO_1_PERFCTR0 0x00000716 /** Package. Uncore C-Box 1, performance counter 1. @@ -2324,8 +2280,7 @@ typedef union { @endcode @note MSR_HASWELL_UNC_CBO_1_PERFCTR1 is defined as MSR_UNC_CBO_1_PERFCTR1 in SDM. **/ -#define MSR_HASWELL_UNC_CBO_1_PERFCTR1 0x00000717 - +#define MSR_HASWELL_UNC_CBO_1_PERFCTR1 0x00000717 /** Package. Uncore C-Box 2, counter 0 event select MSR. @@ -2343,8 +2298,7 @@ typedef union { @endcode @note MSR_HASWELL_UNC_CBO_2_PERFEVTSEL0 is defined as MSR_UNC_CBO_2_PERFEVTSEL0 in SDM. **/ -#define MSR_HASWELL_UNC_CBO_2_PERFEVTSEL0 0x00000720 - +#define MSR_HASWELL_UNC_CBO_2_PERFEVTSEL0 0x00000720 /** Package. Uncore C-Box 2, counter 1 event select MSR. @@ -2362,8 +2316,7 @@ typedef union { @endcode @note MSR_HASWELL_UNC_CBO_2_PERFEVTSEL1 is defined as MSR_UNC_CBO_2_PERFEVTSEL1 in SDM. **/ -#define MSR_HASWELL_UNC_CBO_2_PERFEVTSEL1 0x00000721 - +#define MSR_HASWELL_UNC_CBO_2_PERFEVTSEL1 0x00000721 /** Package. Uncore C-Box 2, performance counter 0. @@ -2381,8 +2334,7 @@ typedef union { @endcode @note MSR_HASWELL_UNC_CBO_2_PERFCTR0 is defined as MSR_UNC_CBO_2_PERFCTR0 in SDM. **/ -#define MSR_HASWELL_UNC_CBO_2_PERFCTR0 0x00000726 - +#define MSR_HASWELL_UNC_CBO_2_PERFCTR0 0x00000726 /** Package. Uncore C-Box 2, performance counter 1. @@ -2400,8 +2352,7 @@ typedef union { @endcode @note MSR_HASWELL_UNC_CBO_2_PERFCTR1 is defined as MSR_UNC_CBO_2_PERFCTR1 in SDM. **/ -#define MSR_HASWELL_UNC_CBO_2_PERFCTR1 0x00000727 - +#define MSR_HASWELL_UNC_CBO_2_PERFCTR1 0x00000727 /** Package. Uncore C-Box 3, counter 0 event select MSR. @@ -2419,8 +2370,7 @@ typedef union { @endcode @note MSR_HASWELL_UNC_CBO_3_PERFEVTSEL0 is defined as MSR_UNC_CBO_3_PERFEVTSEL0 in SDM. **/ -#define MSR_HASWELL_UNC_CBO_3_PERFEVTSEL0 0x00000730 - +#define MSR_HASWELL_UNC_CBO_3_PERFEVTSEL0 0x00000730 /** Package. Uncore C-Box 3, counter 1 event select MSR. @@ -2438,8 +2388,7 @@ typedef union { @endcode @note MSR_HASWELL_UNC_CBO_3_PERFEVTSEL1 is defined as MSR_UNC_CBO_3_PERFEVTSEL1 in SDM. **/ -#define MSR_HASWELL_UNC_CBO_3_PERFEVTSEL1 0x00000731 - +#define MSR_HASWELL_UNC_CBO_3_PERFEVTSEL1 0x00000731 /** Package. Uncore C-Box 3, performance counter 0. @@ -2457,8 +2406,7 @@ typedef union { @endcode @note MSR_HASWELL_UNC_CBO_3_PERFCTR0 is defined as MSR_UNC_CBO_3_PERFCTR0 in SDM. **/ -#define MSR_HASWELL_UNC_CBO_3_PERFCTR0 0x00000736 - +#define MSR_HASWELL_UNC_CBO_3_PERFCTR0 0x00000736 /** Package. Uncore C-Box 3, performance counter 1. @@ -2476,8 +2424,7 @@ typedef union { @endcode @note MSR_HASWELL_UNC_CBO_3_PERFCTR1 is defined as MSR_UNC_CBO_3_PERFCTR1 in SDM. **/ -#define MSR_HASWELL_UNC_CBO_3_PERFCTR1 0x00000737 - +#define MSR_HASWELL_UNC_CBO_3_PERFCTR1 0x00000737 /** Package. Note: C-state values are processor specific C-state code names, @@ -2498,7 +2445,7 @@ typedef union { @endcode @note MSR_HASWELL_PKG_C8_RESIDENCY is defined as MSR_PKG_C8_RESIDENCY in SDM. **/ -#define MSR_HASWELL_PKG_C8_RESIDENCY 0x00000630 +#define MSR_HASWELL_PKG_C8_RESIDENCY 0x00000630 /** MSR information returned for MSR index #MSR_HASWELL_PKG_C8_RESIDENCY @@ -2513,22 +2460,21 @@ typedef union { /// that this package is in processor-specific C8 states. Count at the /// same frequency as the TSC. /// - UINT32 C8ResidencyCounter:32; + UINT32 C8ResidencyCounter : 32; /// /// [Bits 59:32] Package C8 Residency Counter. (R/O) Value since last /// reset that this package is in processor-specific C8 states. Count at /// the same frequency as the TSC. /// - UINT32 C8ResidencyCounterHi:28; - UINT32 Reserved:4; + UINT32 C8ResidencyCounterHi : 28; + UINT32 Reserved : 4; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_PKG_C8_RESIDENCY_REGISTER; - /** Package. Note: C-state values are processor specific C-state code names, unrelated to MWAIT extension C-state parameters or ACPI C-States. @@ -2548,7 +2494,7 @@ typedef union { @endcode @note MSR_HASWELL_PKG_C9_RESIDENCY is defined as MSR_PKG_C9_RESIDENCY in SDM. **/ -#define MSR_HASWELL_PKG_C9_RESIDENCY 0x00000631 +#define MSR_HASWELL_PKG_C9_RESIDENCY 0x00000631 /** MSR information returned for MSR index #MSR_HASWELL_PKG_C9_RESIDENCY @@ -2563,22 +2509,21 @@ typedef union { /// that this package is in processor-specific C9 states. Count at the /// same frequency as the TSC. /// - UINT32 C9ResidencyCounter:32; + UINT32 C9ResidencyCounter : 32; /// /// [Bits 59:32] Package C9 Residency Counter. (R/O) Value since last /// reset that this package is in processor-specific C9 states. Count at /// the same frequency as the TSC. /// - UINT32 C9ResidencyCounterHi:28; - UINT32 Reserved:4; + UINT32 C9ResidencyCounterHi : 28; + UINT32 Reserved : 4; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_PKG_C9_RESIDENCY_REGISTER; - /** Package. Note: C-state values are processor specific C-state code names, unrelated to MWAIT extension C-state parameters or ACPI C-States. @@ -2598,7 +2543,7 @@ typedef union { @endcode @note MSR_HASWELL_PKG_C10_RESIDENCY is defined as MSR_PKG_C10_RESIDENCY in SDM. **/ -#define MSR_HASWELL_PKG_C10_RESIDENCY 0x00000632 +#define MSR_HASWELL_PKG_C10_RESIDENCY 0x00000632 /** MSR information returned for MSR index #MSR_HASWELL_PKG_C10_RESIDENCY @@ -2613,19 +2558,19 @@ typedef union { /// reset that this package is in processor-specific C10 states. Count at /// the same frequency as the TSC. /// - UINT32 C10ResidencyCounter:32; + UINT32 C10ResidencyCounter : 32; /// /// [Bits 59:32] Package C10 Residency Counter. (R/O) Value since last /// reset that this package is in processor-specific C10 states. Count at /// the same frequency as the TSC. /// - UINT32 C10ResidencyCounterHi:28; - UINT32 Reserved:4; + UINT32 C10ResidencyCounterHi : 28; + UINT32 Reserved : 4; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_HASWELL_PKG_C10_RESIDENCY_REGISTER; #endif diff --git a/MdePkg/Include/Register/Intel/Msr/IvyBridgeMsr.h b/MdePkg/Include/Register/Intel/Msr/IvyBridgeMsr.h index bc8559d..00779d4 100644 --- a/MdePkg/Include/Register/Intel/Msr/IvyBridgeMsr.h +++ b/MdePkg/Include/Register/Intel/Msr/IvyBridgeMsr.h @@ -55,7 +55,7 @@ @endcode @note MSR_IVY_BRIDGE_PLATFORM_INFO is defined as MSR_PLATFORM_INFO in SDM. **/ -#define MSR_IVY_BRIDGE_PLATFORM_INFO 0x000000CE +#define MSR_IVY_BRIDGE_PLATFORM_INFO 0x000000CE /** MSR information returned for MSR index #MSR_IVY_BRIDGE_PLATFORM_INFO @@ -65,62 +65,61 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:8; + UINT32 Reserved1 : 8; /// /// [Bits 15:8] Package. Maximum Non-Turbo Ratio (R/O) The is the ratio /// of the frequency that invariant TSC runs at. Frequency = ratio * 100 /// MHz. /// - UINT32 MaximumNonTurboRatio:8; - UINT32 Reserved2:12; + UINT32 MaximumNonTurboRatio : 8; + UINT32 Reserved2 : 12; /// /// [Bit 28] Package. Programmable Ratio Limit for Turbo Mode (R/O) When /// set to 1, indicates that Programmable Ratio Limits for Turbo mode is /// enabled, and when set to 0, indicates Programmable Ratio Limits for /// Turbo mode is disabled. /// - UINT32 RatioLimit:1; + UINT32 RatioLimit : 1; /// /// [Bit 29] Package. Programmable TDP Limit for Turbo Mode (R/O) When /// set to 1, indicates that TDP Limits for Turbo mode are programmable, /// and when set to 0, indicates TDP Limit for Turbo mode is not /// programmable. /// - UINT32 TDPLimit:1; - UINT32 Reserved3:2; + UINT32 TDPLimit : 1; + UINT32 Reserved3 : 2; /// /// [Bit 32] Package. Low Power Mode Support (LPM) (R/O) When set to 1, /// indicates that LPM is supported, and when set to 0, indicates LPM is /// not supported. /// - UINT32 LowPowerModeSupport:1; + UINT32 LowPowerModeSupport : 1; /// /// [Bits 34:33] Package. Number of ConfigTDP Levels (R/O) 00: Only Base /// TDP level available. 01: One additional TDP level available. 02: Two /// additional TDP level available. 11: Reserved. /// - UINT32 ConfigTDPLevels:2; - UINT32 Reserved4:5; + UINT32 ConfigTDPLevels : 2; + UINT32 Reserved4 : 5; /// /// [Bits 47:40] Package. Maximum Efficiency Ratio (R/O) The is the /// minimum ratio (maximum efficiency) that the processor can operates, in /// units of 100MHz. /// - UINT32 MaximumEfficiencyRatio:8; + UINT32 MaximumEfficiencyRatio : 8; /// /// [Bits 55:48] Package. Minimum Operating Ratio (R/O) Contains the /// minimum supported operating ratio in units of 100 MHz. /// - UINT32 MinimumOperatingRatio:8; - UINT32 Reserved5:8; + UINT32 MinimumOperatingRatio : 8; + UINT32 Reserved5 : 8; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IVY_BRIDGE_PLATFORM_INFO_REGISTER; - /** Core. C-State Configuration Control (R/W) Note: C-state values are processor specific C-state code names, unrelated to MWAIT extension C-state @@ -141,7 +140,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_PKG_CST_CONFIG_CONTROL is defined as MSR_PKG_CST_CONFIG_CONTROL in SDM. **/ -#define MSR_IVY_BRIDGE_PKG_CST_CONFIG_CONTROL 0x000000E2 +#define MSR_IVY_BRIDGE_PKG_CST_CONFIG_CONTROL 0x000000E2 /** MSR information returned for MSR index #MSR_IVY_BRIDGE_PKG_CST_CONFIG_CONTROL @@ -160,57 +159,56 @@ typedef union { /// C6 retention 100b: C7 101b: C7s 111: No package C-state limit. Note: /// This field cannot be used to limit package C-state to C3. /// - UINT32 Limit:3; - UINT32 Reserved1:7; + UINT32 Limit : 3; + UINT32 Reserved1 : 7; /// /// [Bit 10] I/O MWAIT Redirection Enable (R/W) When set, will map /// IO_read instructions sent to IO register specified by /// MSR_PMG_IO_CAPTURE_BASE to MWAIT instructions. /// - UINT32 IO_MWAIT:1; - UINT32 Reserved2:4; + UINT32 IO_MWAIT : 1; + UINT32 Reserved2 : 4; /// /// [Bit 15] CFG Lock (R/WO) When set, lock bits 15:0 of this register /// until next reset. /// - UINT32 CFGLock:1; - UINT32 Reserved3:9; + UINT32 CFGLock : 1; + UINT32 Reserved3 : 9; /// /// [Bit 25] C3 state auto demotion enable (R/W) When set, the processor /// will conditionally demote C6/C7 requests to C3 based on uncore /// auto-demote information. /// - UINT32 C3AutoDemotion:1; + UINT32 C3AutoDemotion : 1; /// /// [Bit 26] C1 state auto demotion enable (R/W) When set, the processor /// will conditionally demote C3/C6/C7 requests to C1 based on uncore /// auto-demote information. /// - UINT32 C1AutoDemotion:1; + UINT32 C1AutoDemotion : 1; /// /// [Bit 27] Enable C3 undemotion (R/W) When set, enables undemotion from /// demoted C3. /// - UINT32 C3Undemotion:1; + UINT32 C3Undemotion : 1; /// /// [Bit 28] Enable C1 undemotion (R/W) When set, enables undemotion from /// demoted C1. /// - UINT32 C1Undemotion:1; - UINT32 Reserved4:3; - UINT32 Reserved5:32; + UINT32 C1Undemotion : 1; + UINT32 Reserved4 : 3; + UINT32 Reserved5 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IVY_BRIDGE_PKG_CST_CONFIG_CONTROL_REGISTER; - /** Package. PP0 Energy Status (R/O) See Section 14.9.4, "PP0/PP1 RAPL Domains.". @@ -227,8 +225,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_PP0_ENERGY_STATUS is defined as MSR_PP0_ENERGY_STATUS in SDM. **/ -#define MSR_IVY_BRIDGE_PP0_ENERGY_STATUS 0x00000639 - +#define MSR_IVY_BRIDGE_PP0_ENERGY_STATUS 0x00000639 /** Package. Base TDP Ratio (R/O). @@ -247,7 +244,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_CONFIG_TDP_NOMINAL is defined as MSR_CONFIG_TDP_NOMINAL in SDM. **/ -#define MSR_IVY_BRIDGE_CONFIG_TDP_NOMINAL 0x00000648 +#define MSR_IVY_BRIDGE_CONFIG_TDP_NOMINAL 0x00000648 /** MSR information returned for MSR index #MSR_IVY_BRIDGE_CONFIG_TDP_NOMINAL @@ -261,21 +258,20 @@ typedef union { /// [Bits 7:0] Config_TDP_Base Base TDP level ratio to be used for this /// specific processor (in units of 100 MHz). /// - UINT32 Config_TDP_Base:8; - UINT32 Reserved1:24; - UINT32 Reserved2:32; + UINT32 Config_TDP_Base : 8; + UINT32 Reserved1 : 24; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IVY_BRIDGE_CONFIG_TDP_NOMINAL_REGISTER; - /** Package. ConfigTDP Level 1 ratio and power level (R/O). @@ -293,7 +289,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_CONFIG_TDP_LEVEL1 is defined as MSR_CONFIG_TDP_LEVEL1 in SDM. **/ -#define MSR_IVY_BRIDGE_CONFIG_TDP_LEVEL1 0x00000649 +#define MSR_IVY_BRIDGE_CONFIG_TDP_LEVEL1 0x00000649 /** MSR information returned for MSR index #MSR_IVY_BRIDGE_CONFIG_TDP_LEVEL1 @@ -306,34 +302,33 @@ typedef union { /// /// [Bits 14:0] PKG_TDP_LVL1. Power setting for ConfigTDP Level 1. /// - UINT32 PKG_TDP_LVL1:15; - UINT32 Reserved1:1; + UINT32 PKG_TDP_LVL1 : 15; + UINT32 Reserved1 : 1; /// /// [Bits 23:16] Config_TDP_LVL1_Ratio. ConfigTDP level 1 ratio to be used /// for this specific processor. /// - UINT32 Config_TDP_LVL1_Ratio:8; - UINT32 Reserved2:8; + UINT32 Config_TDP_LVL1_Ratio : 8; + UINT32 Reserved2 : 8; /// /// [Bits 46:32] PKG_MAX_PWR_LVL1. Max Power setting allowed for ConfigTDP /// Level 1. /// - UINT32 PKG_MAX_PWR_LVL1:15; - UINT32 Reserved3:1; + UINT32 PKG_MAX_PWR_LVL1 : 15; + UINT32 Reserved3 : 1; /// /// [Bits 62:48] PKG_MIN_PWR_LVL1. MIN Power setting allowed for ConfigTDP /// Level 1. /// - UINT32 PKG_MIN_PWR_LVL1:15; - UINT32 Reserved4:1; + UINT32 PKG_MIN_PWR_LVL1 : 15; + UINT32 Reserved4 : 1; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IVY_BRIDGE_CONFIG_TDP_LEVEL1_REGISTER; - /** Package. ConfigTDP Level 2 ratio and power level (R/O). @@ -351,7 +346,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_CONFIG_TDP_LEVEL2 is defined as MSR_CONFIG_TDP_LEVEL2 in SDM. **/ -#define MSR_IVY_BRIDGE_CONFIG_TDP_LEVEL2 0x0000064A +#define MSR_IVY_BRIDGE_CONFIG_TDP_LEVEL2 0x0000064A /** MSR information returned for MSR index #MSR_IVY_BRIDGE_CONFIG_TDP_LEVEL2 @@ -364,34 +359,33 @@ typedef union { /// /// [Bits 14:0] PKG_TDP_LVL2. Power setting for ConfigTDP Level 2. /// - UINT32 PKG_TDP_LVL2:15; - UINT32 Reserved1:1; + UINT32 PKG_TDP_LVL2 : 15; + UINT32 Reserved1 : 1; /// /// [Bits 23:16] Config_TDP_LVL2_Ratio. ConfigTDP level 2 ratio to be used /// for this specific processor. /// - UINT32 Config_TDP_LVL2_Ratio:8; - UINT32 Reserved2:8; + UINT32 Config_TDP_LVL2_Ratio : 8; + UINT32 Reserved2 : 8; /// /// [Bits 46:32] PKG_MAX_PWR_LVL2. Max Power setting allowed for ConfigTDP /// Level 2. /// - UINT32 PKG_MAX_PWR_LVL2:15; - UINT32 Reserved3:1; + UINT32 PKG_MAX_PWR_LVL2 : 15; + UINT32 Reserved3 : 1; /// /// [Bits 62:48] PKG_MIN_PWR_LVL2. MIN Power setting allowed for ConfigTDP /// Level 2. /// - UINT32 PKG_MIN_PWR_LVL2:15; - UINT32 Reserved4:1; + UINT32 PKG_MIN_PWR_LVL2 : 15; + UINT32 Reserved4 : 1; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IVY_BRIDGE_CONFIG_TDP_LEVEL2_REGISTER; - /** Package. ConfigTDP Control (R/W). @@ -410,7 +404,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_CONFIG_TDP_CONTROL is defined as MSR_CONFIG_TDP_CONTROL in SDM. **/ -#define MSR_IVY_BRIDGE_CONFIG_TDP_CONTROL 0x0000064B +#define MSR_IVY_BRIDGE_CONFIG_TDP_CONTROL 0x0000064B /** MSR information returned for MSR index #MSR_IVY_BRIDGE_CONFIG_TDP_CONTROL @@ -423,26 +417,25 @@ typedef union { /// /// [Bits 1:0] TDP_LEVEL (RW/L) System BIOS can program this field. /// - UINT32 TDP_LEVEL:2; - UINT32 Reserved1:29; + UINT32 TDP_LEVEL : 2; + UINT32 Reserved1 : 29; /// /// [Bit 31] Config_TDP_Lock (RW/L) When this bit is set, the content of /// this register is locked until a reset. /// - UINT32 Config_TDP_Lock:1; - UINT32 Reserved2:32; + UINT32 Config_TDP_Lock : 1; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IVY_BRIDGE_CONFIG_TDP_CONTROL_REGISTER; - /** Package. ConfigTDP Control (R/W). @@ -461,7 +454,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_TURBO_ACTIVATION_RATIO is defined as MSR_TURBO_ACTIVATION_RATIO in SDM. **/ -#define MSR_IVY_BRIDGE_TURBO_ACTIVATION_RATIO 0x0000064C +#define MSR_IVY_BRIDGE_TURBO_ACTIVATION_RATIO 0x0000064C /** MSR information returned for MSR index #MSR_IVY_BRIDGE_TURBO_ACTIVATION_RATIO @@ -475,26 +468,25 @@ typedef union { /// [Bits 7:0] MAX_NON_TURBO_RATIO (RW/L) System BIOS can program this /// field. /// - UINT32 MAX_NON_TURBO_RATIO:8; - UINT32 Reserved1:23; + UINT32 MAX_NON_TURBO_RATIO : 8; + UINT32 Reserved1 : 23; /// /// [Bit 31] TURBO_ACTIVATION_RATIO_Lock (RW/L) When this bit is set, the /// content of this register is locked until a reset. /// - UINT32 TURBO_ACTIVATION_RATIO_Lock:1; - UINT32 Reserved2:32; + UINT32 TURBO_ACTIVATION_RATIO_Lock : 1; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IVY_BRIDGE_TURBO_ACTIVATION_RATIO_REGISTER; - /** Package. Protected Processor Inventory Number Enable Control (R/W). @@ -513,7 +505,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_PPIN_CTL is defined as MSR_PPIN_CTL in SDM. **/ -#define MSR_IVY_BRIDGE_PPIN_CTL 0x0000004E +#define MSR_IVY_BRIDGE_PPIN_CTL 0x0000004E /** MSR information returned for MSR index #MSR_IVY_BRIDGE_PPIN_CTL @@ -533,28 +525,27 @@ typedef union { /// '01b' to MSR_PPIN_CTL to disable further access to MSR_PPIN and /// prevent unauthorized modification to MSR_PPIN_CTL. /// - UINT32 LockOut:1; + UINT32 LockOut : 1; /// /// [Bit 1] Enable_PPIN (R/W) If 1, enables MSR_PPIN to be accessible /// using RDMSR. Once set, attempt to write 1 to MSR_PPIN_CTL[bit 0] will /// cause #GP. If 0, an attempt to read MSR_PPIN will cause #GP. Default /// is 0. /// - UINT32 Enable_PPIN:1; - UINT32 Reserved1:30; - UINT32 Reserved2:32; + UINT32 Enable_PPIN : 1; + UINT32 Reserved1 : 30; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IVY_BRIDGE_PPIN_CTL_REGISTER; - /** Package. Protected Processor Inventory Number (R/O). Protected Processor Inventory Number (R/O) A unique value within a given CPUID @@ -575,8 +566,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_PPIN is defined as MSR_PPIN in SDM. **/ -#define MSR_IVY_BRIDGE_PPIN 0x0000004F - +#define MSR_IVY_BRIDGE_PPIN 0x0000004F /** Package. See http://biosbits.org. @@ -596,7 +586,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_PLATFORM_INFO_1 is defined as MSR_PLATFORM_INFO_1 in SDM. **/ -#define MSR_IVY_BRIDGE_PLATFORM_INFO_1 0x000000CE +#define MSR_IVY_BRIDGE_PLATFORM_INFO_1 0x000000CE /** MSR information returned for MSR index #MSR_IVY_BRIDGE_PLATFORM_INFO_1 @@ -606,14 +596,14 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:8; + UINT32 Reserved1 : 8; /// /// [Bits 15:8] Package. Maximum Non-Turbo Ratio (R/O) The is the ratio /// of the frequency that invariant TSC runs at. Frequency = ratio * 100 /// MHz. /// - UINT32 MaximumNonTurboRatio:8; - UINT32 Reserved2:7; + UINT32 MaximumNonTurboRatio : 8; + UINT32 Reserved2 : 7; /// /// [Bit 23] Package. PPIN_CAP (R/O) When set to 1, indicates that /// Protected Processor Inventory Number (PPIN) capability can be enabled @@ -621,45 +611,44 @@ typedef union { /// set to 0, PPIN capability is not supported. An attempt to access /// MSR_PPIN_CTL or MSR_PPIN will cause #GP. /// - UINT32 PPIN_CAP:1; - UINT32 Reserved3:4; + UINT32 PPIN_CAP : 1; + UINT32 Reserved3 : 4; /// /// [Bit 28] Package. Programmable Ratio Limit for Turbo Mode (R/O) When /// set to 1, indicates that Programmable Ratio Limits for Turbo mode is /// enabled, and when set to 0, indicates Programmable Ratio Limits for /// Turbo mode is disabled. /// - UINT32 RatioLimit:1; + UINT32 RatioLimit : 1; /// /// [Bit 29] Package. Programmable TDP Limit for Turbo Mode (R/O) When /// set to 1, indicates that TDP Limits for Turbo mode are programmable, /// and when set to 0, indicates TDP Limit for Turbo mode is not /// programmable. /// - UINT32 TDPLimit:1; + UINT32 TDPLimit : 1; /// /// [Bit 30] Package. Programmable TJ OFFSET (R/O) When set to 1, /// indicates that MSR_TEMPERATURE_TARGET.[27:24] is valid and writable to /// specify an temperature offset. /// - UINT32 TJOFFSET:1; - UINT32 Reserved4:1; - UINT32 Reserved5:8; + UINT32 TJOFFSET : 1; + UINT32 Reserved4 : 1; + UINT32 Reserved5 : 8; /// /// [Bits 47:40] Package. Maximum Efficiency Ratio (R/O) The is the /// minimum ratio (maximum efficiency) that the processor can operates, in /// units of 100MHz. /// - UINT32 MaximumEfficiencyRatio:8; - UINT32 Reserved6:16; + UINT32 MaximumEfficiencyRatio : 8; + UINT32 Reserved6 : 16; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IVY_BRIDGE_PLATFORM_INFO_1_REGISTER; - /** Package. MC Bank Error Configuration (R/W). @@ -678,7 +667,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_ERROR_CONTROL is defined as MSR_ERROR_CONTROL in SDM. **/ -#define MSR_IVY_BRIDGE_ERROR_CONTROL 0x0000017F +#define MSR_IVY_BRIDGE_ERROR_CONTROL 0x0000017F /** MSR information returned for MSR index #MSR_IVY_BRIDGE_ERROR_CONTROL @@ -688,26 +677,25 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:1; + UINT32 Reserved1 : 1; /// /// [Bit 1] MemError Log Enable (R/W) When set, enables IMC status bank /// to log additional info in bits 36:32. /// - UINT32 MemErrorLogEnable:1; - UINT32 Reserved2:30; - UINT32 Reserved3:32; + UINT32 MemErrorLogEnable : 1; + UINT32 Reserved2 : 30; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IVY_BRIDGE_ERROR_CONTROL_REGISTER; - /** Package. @@ -726,7 +714,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_TEMPERATURE_TARGET is defined as MSR_TEMPERATURE_TARGET in SDM. **/ -#define MSR_IVY_BRIDGE_TEMPERATURE_TARGET 0x000001A2 +#define MSR_IVY_BRIDGE_TEMPERATURE_TARGET 0x000001A2 /** MSR information returned for MSR index #MSR_IVY_BRIDGE_TEMPERATURE_TARGET @@ -736,33 +724,32 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:16; + UINT32 Reserved1 : 16; /// /// [Bits 23:16] Temperature Target (RO) The minimum temperature at which /// PROCHOT# will be asserted. The value is degree C. /// - UINT32 TemperatureTarget:8; + UINT32 TemperatureTarget : 8; /// /// [Bits 27:24] TCC Activation Offset (R/W) Specifies a temperature /// offset in degrees C from the temperature target (bits 23:16). PROCHOT# /// will assert at the offset target temperature. Write is permitted only /// MSR_PLATFORM_INFO.[30] is set. /// - UINT32 TCCActivationOffset:4; - UINT32 Reserved2:4; - UINT32 Reserved3:32; + UINT32 TCCActivationOffset : 4; + UINT32 Reserved2 : 4; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IVY_BRIDGE_TEMPERATURE_TARGET_REGISTER; - /** Package. Maximum Ratio Limit of Turbo Mode RO if MSR_PLATFORM_INFO.[28] = 0, RW if MSR_PLATFORM_INFO.[28] = 1. @@ -781,7 +768,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_TURBO_RATIO_LIMIT1 is defined as MSR_TURBO_RATIO_LIMIT1 in SDM. **/ -#define MSR_IVY_BRIDGE_TURBO_RATIO_LIMIT1 0x000001AE +#define MSR_IVY_BRIDGE_TURBO_RATIO_LIMIT1 0x000001AE /** MSR information returned for MSR index #MSR_IVY_BRIDGE_TURBO_RATIO_LIMIT1 @@ -795,53 +782,52 @@ typedef union { /// [Bits 7:0] Package. Maximum Ratio Limit for 9C Maximum turbo ratio /// limit of 9 core active. /// - UINT32 Maximum9C:8; + UINT32 Maximum9C : 8; /// /// [Bits 15:8] Package. Maximum Ratio Limit for 10C Maximum turbo ratio /// limit of 10core active. /// - UINT32 Maximum10C:8; + UINT32 Maximum10C : 8; /// /// [Bits 23:16] Package. Maximum Ratio Limit for 11C Maximum turbo ratio /// limit of 11 core active. /// - UINT32 Maximum11C:8; + UINT32 Maximum11C : 8; /// /// [Bits 31:24] Package. Maximum Ratio Limit for 12C Maximum turbo ratio /// limit of 12 core active. /// - UINT32 Maximum12C:8; + UINT32 Maximum12C : 8; /// /// [Bits 39:32] Package. Maximum Ratio Limit for 13C Maximum turbo ratio /// limit of 13 core active. /// - UINT32 Maximum13C:8; + UINT32 Maximum13C : 8; /// /// [Bits 47:40] Package. Maximum Ratio Limit for 14C Maximum turbo ratio /// limit of 14 core active. /// - UINT32 Maximum14C:8; + UINT32 Maximum14C : 8; /// /// [Bits 55:48] Package. Maximum Ratio Limit for 15C Maximum turbo ratio /// limit of 15 core active. /// - UINT32 Maximum15C:8; - UINT32 Reserved:7; + UINT32 Maximum15C : 8; + UINT32 Reserved : 7; /// /// [Bit 63] Package. Semaphore for Turbo Ratio Limit Configuration If 1, /// the processor uses override configuration specified in /// MSR_TURBO_RATIO_LIMIT and MSR_TURBO_RATIO_LIMIT1. If 0, the processor /// uses factory-set configuration (Default). /// - UINT32 TurboRatioLimitConfigurationSemaphore:1; + UINT32 TurboRatioLimitConfigurationSemaphore : 1; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IVY_BRIDGE_TURBO_RATIO_LIMIT1_REGISTER; - /** Package. Misc MAC information of Integrated I/O. (R/O) see Section 15.3.2.4. @@ -859,7 +845,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_IA32_MC6_MISC is defined as IA32_MC6_MISC in SDM. **/ -#define MSR_IVY_BRIDGE_IA32_MC6_MISC 0x0000041B +#define MSR_IVY_BRIDGE_IA32_MC6_MISC 0x0000041B /** MSR information returned for MSR index #MSR_IVY_BRIDGE_IA32_MC6_MISC @@ -872,29 +858,28 @@ typedef union { /// /// [Bits 5:0] Recoverable Address LSB. /// - UINT32 RecoverableAddressLSB:6; + UINT32 RecoverableAddressLSB : 6; /// /// [Bits 8:6] Address Mode. /// - UINT32 AddressMode:3; - UINT32 Reserved1:7; + UINT32 AddressMode : 3; + UINT32 Reserved1 : 7; /// /// [Bits 31:16] PCI Express Requestor ID. /// - UINT32 PCIExpressRequestorID:16; + UINT32 PCIExpressRequestorID : 16; /// /// [Bits 39:32] PCI Express Segment Number. /// - UINT32 PCIExpressSegmentNumber:8; - UINT32 Reserved2:24; + UINT32 PCIExpressSegmentNumber : 8; + UINT32 Reserved2 : 24; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IVY_BRIDGE_IA32_MC6_MISC_REGISTER; - /** Package. See Section 15.3.2.1, "IA32_MCi_CTL MSRs." through Section 15.3.2.4, "IA32_MCi_MISC MSRs.". @@ -918,12 +903,11 @@ typedef union { MSR_IVY_BRIDGE_IA32_MC31_CTL is defined as IA32_MC31_CTL in SDM. @{ **/ -#define MSR_IVY_BRIDGE_IA32_MC29_CTL 0x00000474 -#define MSR_IVY_BRIDGE_IA32_MC30_CTL 0x00000478 -#define MSR_IVY_BRIDGE_IA32_MC31_CTL 0x0000047C +#define MSR_IVY_BRIDGE_IA32_MC29_CTL 0x00000474 +#define MSR_IVY_BRIDGE_IA32_MC30_CTL 0x00000478 +#define MSR_IVY_BRIDGE_IA32_MC31_CTL 0x0000047C /// @} - /** Package. See Section 15.3.2.1, "IA32_MCi_CTL MSRs." through Section 15.3.2.4, "IA32_MCi_MISC MSRs.". @@ -947,12 +931,11 @@ typedef union { MSR_IVY_BRIDGE_IA32_MC31_STATUS is defined as IA32_MC31_STATUS in SDM. @{ **/ -#define MSR_IVY_BRIDGE_IA32_MC29_STATUS 0x00000475 -#define MSR_IVY_BRIDGE_IA32_MC30_STATUS 0x00000479 -#define MSR_IVY_BRIDGE_IA32_MC31_STATUS 0x0000047D +#define MSR_IVY_BRIDGE_IA32_MC29_STATUS 0x00000475 +#define MSR_IVY_BRIDGE_IA32_MC30_STATUS 0x00000479 +#define MSR_IVY_BRIDGE_IA32_MC31_STATUS 0x0000047D /// @} - /** Package. See Section 15.3.2.1, "IA32_MCi_CTL MSRs." through Section 15.3.2.4, "IA32_MCi_MISC MSRs.". @@ -976,12 +959,11 @@ typedef union { MSR_IVY_BRIDGE_IA32_MC31_ADDR is defined as IA32_MC31_ADDR in SDM. @{ **/ -#define MSR_IVY_BRIDGE_IA32_MC29_ADDR 0x00000476 -#define MSR_IVY_BRIDGE_IA32_MC30_ADDR 0x0000047A -#define MSR_IVY_BRIDGE_IA32_MC31_ADDR 0x0000047E +#define MSR_IVY_BRIDGE_IA32_MC29_ADDR 0x00000476 +#define MSR_IVY_BRIDGE_IA32_MC30_ADDR 0x0000047A +#define MSR_IVY_BRIDGE_IA32_MC31_ADDR 0x0000047E /// @} - /** Package. See Section 15.3.2.1, "IA32_MCi_CTL MSRs." through Section 15.3.2.4, "IA32_MCi_MISC MSRs.". @@ -1005,12 +987,11 @@ typedef union { MSR_IVY_BRIDGE_IA32_MC31_MISC is defined as IA32_MC31_MISC in SDM. @{ **/ -#define MSR_IVY_BRIDGE_IA32_MC29_MISC 0x00000477 -#define MSR_IVY_BRIDGE_IA32_MC30_MISC 0x0000047B -#define MSR_IVY_BRIDGE_IA32_MC31_MISC 0x0000047F +#define MSR_IVY_BRIDGE_IA32_MC29_MISC 0x00000477 +#define MSR_IVY_BRIDGE_IA32_MC30_MISC 0x0000047B +#define MSR_IVY_BRIDGE_IA32_MC31_MISC 0x0000047F /// @} - /** Package. Package RAPL Perf Status (R/O). @@ -1026,8 +1007,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_PKG_PERF_STATUS is defined as MSR_PKG_PERF_STATUS in SDM. **/ -#define MSR_IVY_BRIDGE_PKG_PERF_STATUS 0x00000613 - +#define MSR_IVY_BRIDGE_PKG_PERF_STATUS 0x00000613 /** Package. DRAM RAPL Power Limit Control (R/W) See Section 14.9.5, "DRAM RAPL @@ -1046,8 +1026,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_DRAM_POWER_LIMIT is defined as MSR_DRAM_POWER_LIMIT in SDM. **/ -#define MSR_IVY_BRIDGE_DRAM_POWER_LIMIT 0x00000618 - +#define MSR_IVY_BRIDGE_DRAM_POWER_LIMIT 0x00000618 /** Package. DRAM Energy Status (R/O) See Section 14.9.5, "DRAM RAPL Domain.". @@ -1064,8 +1043,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_DRAM_ENERGY_STATUS is defined as MSR_DRAM_ENERGY_STATUS in SDM. **/ -#define MSR_IVY_BRIDGE_DRAM_ENERGY_STATUS 0x00000619 - +#define MSR_IVY_BRIDGE_DRAM_ENERGY_STATUS 0x00000619 /** Package. DRAM Performance Throttling Status (R/O) See Section 14.9.5, "DRAM @@ -1083,8 +1061,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_DRAM_PERF_STATUS is defined as MSR_DRAM_PERF_STATUS in SDM. **/ -#define MSR_IVY_BRIDGE_DRAM_PERF_STATUS 0x0000061B - +#define MSR_IVY_BRIDGE_DRAM_PERF_STATUS 0x0000061B /** Package. DRAM RAPL Parameters (R/W) See Section 14.9.5, "DRAM RAPL Domain.". @@ -1102,8 +1079,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_DRAM_POWER_INFO is defined as MSR_DRAM_POWER_INFO in SDM. **/ -#define MSR_IVY_BRIDGE_DRAM_POWER_INFO 0x0000061C - +#define MSR_IVY_BRIDGE_DRAM_POWER_INFO 0x0000061C /** Thread. See Section 18.3.1.1.1, "Processor Event Based Sampling (PEBS).". @@ -1123,7 +1099,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_PEBS_ENABLE is defined as MSR_PEBS_ENABLE in SDM. **/ -#define MSR_IVY_BRIDGE_PEBS_ENABLE 0x000003F1 +#define MSR_IVY_BRIDGE_PEBS_ENABLE 0x000003F1 /** MSR information returned for MSR index #MSR_IVY_BRIDGE_PEBS_ENABLE @@ -1136,45 +1112,44 @@ typedef union { /// /// [Bit 0] Enable PEBS on IA32_PMC0. (R/W). /// - UINT32 PEBS_EN_PMC0:1; + UINT32 PEBS_EN_PMC0 : 1; /// /// [Bit 1] Enable PEBS on IA32_PMC1. (R/W). /// - UINT32 PEBS_EN_PMC1:1; + UINT32 PEBS_EN_PMC1 : 1; /// /// [Bit 2] Enable PEBS on IA32_PMC2. (R/W). /// - UINT32 PEBS_EN_PMC2:1; + UINT32 PEBS_EN_PMC2 : 1; /// /// [Bit 3] Enable PEBS on IA32_PMC3. (R/W). /// - UINT32 PEBS_EN_PMC3:1; - UINT32 Reserved1:28; + UINT32 PEBS_EN_PMC3 : 1; + UINT32 Reserved1 : 28; /// /// [Bit 32] Enable Load Latency on IA32_PMC0. (R/W). /// - UINT32 LL_EN_PMC0:1; + UINT32 LL_EN_PMC0 : 1; /// /// [Bit 33] Enable Load Latency on IA32_PMC1. (R/W). /// - UINT32 LL_EN_PMC1:1; + UINT32 LL_EN_PMC1 : 1; /// /// [Bit 34] Enable Load Latency on IA32_PMC2. (R/W). /// - UINT32 LL_EN_PMC2:1; + UINT32 LL_EN_PMC2 : 1; /// /// [Bit 35] Enable Load Latency on IA32_PMC3. (R/W). /// - UINT32 LL_EN_PMC3:1; - UINT32 Reserved2:28; + UINT32 LL_EN_PMC3 : 1; + UINT32 Reserved2 : 28; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_IVY_BRIDGE_PEBS_ENABLE_REGISTER; - /** Package. Uncore perfmon per-socket global control. @@ -1191,8 +1166,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_PMON_GLOBAL_CTL is defined as MSR_PMON_GLOBAL_CTL in SDM. **/ -#define MSR_IVY_BRIDGE_PMON_GLOBAL_CTL 0x00000C00 - +#define MSR_IVY_BRIDGE_PMON_GLOBAL_CTL 0x00000C00 /** Package. Uncore perfmon per-socket global status. @@ -1210,8 +1184,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_PMON_GLOBAL_STATUS is defined as MSR_PMON_GLOBAL_STATUS in SDM. **/ -#define MSR_IVY_BRIDGE_PMON_GLOBAL_STATUS 0x00000C01 - +#define MSR_IVY_BRIDGE_PMON_GLOBAL_STATUS 0x00000C01 /** Package. Uncore perfmon per-socket global configuration. @@ -1229,8 +1202,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_PMON_GLOBAL_CONFIG is defined as MSR_PMON_GLOBAL_CONFIG in SDM. **/ -#define MSR_IVY_BRIDGE_PMON_GLOBAL_CONFIG 0x00000C06 - +#define MSR_IVY_BRIDGE_PMON_GLOBAL_CONFIG 0x00000C06 /** Package. Uncore U-box perfmon U-box wide status. @@ -1248,8 +1220,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_U_PMON_BOX_STATUS is defined as MSR_U_PMON_BOX_STATUS in SDM. **/ -#define MSR_IVY_BRIDGE_U_PMON_BOX_STATUS 0x00000C15 - +#define MSR_IVY_BRIDGE_U_PMON_BOX_STATUS 0x00000C15 /** Package. Uncore PCU perfmon box wide status. @@ -1267,8 +1238,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_PCU_PMON_BOX_STATUS is defined as MSR_PCU_PMON_BOX_STATUS in SDM. **/ -#define MSR_IVY_BRIDGE_PCU_PMON_BOX_STATUS 0x00000C35 - +#define MSR_IVY_BRIDGE_PCU_PMON_BOX_STATUS 0x00000C35 /** Package. Uncore C-box 0 perfmon box wide filter1. @@ -1286,8 +1256,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C0_PMON_BOX_FILTER1 is defined as MSR_C0_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_IVY_BRIDGE_C0_PMON_BOX_FILTER1 0x00000D1A - +#define MSR_IVY_BRIDGE_C0_PMON_BOX_FILTER1 0x00000D1A /** Package. Uncore C-box 1 perfmon box wide filter1. @@ -1305,8 +1274,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C1_PMON_BOX_FILTER1 is defined as MSR_C1_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_IVY_BRIDGE_C1_PMON_BOX_FILTER1 0x00000D3A - +#define MSR_IVY_BRIDGE_C1_PMON_BOX_FILTER1 0x00000D3A /** Package. Uncore C-box 2 perfmon box wide filter1. @@ -1324,8 +1292,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C2_PMON_BOX_FILTER1 is defined as MSR_C2_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_IVY_BRIDGE_C2_PMON_BOX_FILTER1 0x00000D5A - +#define MSR_IVY_BRIDGE_C2_PMON_BOX_FILTER1 0x00000D5A /** Package. Uncore C-box 3 perfmon box wide filter1. @@ -1343,8 +1310,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C3_PMON_BOX_FILTER1 is defined as MSR_C3_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_IVY_BRIDGE_C3_PMON_BOX_FILTER1 0x00000D7A - +#define MSR_IVY_BRIDGE_C3_PMON_BOX_FILTER1 0x00000D7A /** Package. Uncore C-box 4 perfmon box wide filter1. @@ -1362,8 +1328,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C4_PMON_BOX_FILTER1 is defined as MSR_C4_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_IVY_BRIDGE_C4_PMON_BOX_FILTER1 0x00000D9A - +#define MSR_IVY_BRIDGE_C4_PMON_BOX_FILTER1 0x00000D9A /** Package. Uncore C-box 5 perfmon box wide filter1. @@ -1381,8 +1346,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C5_PMON_BOX_FILTER1 is defined as MSR_C5_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_IVY_BRIDGE_C5_PMON_BOX_FILTER1 0x00000DBA - +#define MSR_IVY_BRIDGE_C5_PMON_BOX_FILTER1 0x00000DBA /** Package. Uncore C-box 6 perfmon box wide filter1. @@ -1400,8 +1364,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C6_PMON_BOX_FILTER1 is defined as MSR_C6_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_IVY_BRIDGE_C6_PMON_BOX_FILTER1 0x00000DDA - +#define MSR_IVY_BRIDGE_C6_PMON_BOX_FILTER1 0x00000DDA /** Package. Uncore C-box 7 perfmon box wide filter1. @@ -1419,8 +1382,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C7_PMON_BOX_FILTER1 is defined as MSR_C7_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_IVY_BRIDGE_C7_PMON_BOX_FILTER1 0x00000DFA - +#define MSR_IVY_BRIDGE_C7_PMON_BOX_FILTER1 0x00000DFA /** Package. Uncore C-box 8 perfmon local box wide control. @@ -1438,8 +1400,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C8_PMON_BOX_CTL is defined as MSR_C8_PMON_BOX_CTL in SDM. **/ -#define MSR_IVY_BRIDGE_C8_PMON_BOX_CTL 0x00000E04 - +#define MSR_IVY_BRIDGE_C8_PMON_BOX_CTL 0x00000E04 /** Package. Uncore C-box 8 perfmon event select for C-box 8 counter 0. @@ -1457,8 +1418,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C8_PMON_EVNTSEL0 is defined as MSR_C8_PMON_EVNTSEL0 in SDM. **/ -#define MSR_IVY_BRIDGE_C8_PMON_EVNTSEL0 0x00000E10 - +#define MSR_IVY_BRIDGE_C8_PMON_EVNTSEL0 0x00000E10 /** Package. Uncore C-box 8 perfmon event select for C-box 8 counter 1. @@ -1476,8 +1436,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C8_PMON_EVNTSEL1 is defined as MSR_C8_PMON_EVNTSEL1 in SDM. **/ -#define MSR_IVY_BRIDGE_C8_PMON_EVNTSEL1 0x00000E11 - +#define MSR_IVY_BRIDGE_C8_PMON_EVNTSEL1 0x00000E11 /** Package. Uncore C-box 8 perfmon event select for C-box 8 counter 2. @@ -1495,8 +1454,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C8_PMON_EVNTSEL2 is defined as MSR_C8_PMON_EVNTSEL2 in SDM. **/ -#define MSR_IVY_BRIDGE_C8_PMON_EVNTSEL2 0x00000E12 - +#define MSR_IVY_BRIDGE_C8_PMON_EVNTSEL2 0x00000E12 /** Package. Uncore C-box 8 perfmon event select for C-box 8 counter 3. @@ -1514,8 +1472,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C8_PMON_EVNTSEL3 is defined as MSR_C8_PMON_EVNTSEL3 in SDM. **/ -#define MSR_IVY_BRIDGE_C8_PMON_EVNTSEL3 0x00000E13 - +#define MSR_IVY_BRIDGE_C8_PMON_EVNTSEL3 0x00000E13 /** Package. Uncore C-box 8 perfmon box wide filter. @@ -1533,8 +1490,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C8_PMON_BOX_FILTER is defined as MSR_C8_PMON_BOX_FILTER in SDM. **/ -#define MSR_IVY_BRIDGE_C8_PMON_BOX_FILTER 0x00000E14 - +#define MSR_IVY_BRIDGE_C8_PMON_BOX_FILTER 0x00000E14 /** Package. Uncore C-box 8 perfmon counter 0. @@ -1552,8 +1508,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C8_PMON_CTR0 is defined as MSR_C8_PMON_CTR0 in SDM. **/ -#define MSR_IVY_BRIDGE_C8_PMON_CTR0 0x00000E16 - +#define MSR_IVY_BRIDGE_C8_PMON_CTR0 0x00000E16 /** Package. Uncore C-box 8 perfmon counter 1. @@ -1571,8 +1526,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C8_PMON_CTR1 is defined as MSR_C8_PMON_CTR1 in SDM. **/ -#define MSR_IVY_BRIDGE_C8_PMON_CTR1 0x00000E17 - +#define MSR_IVY_BRIDGE_C8_PMON_CTR1 0x00000E17 /** Package. Uncore C-box 8 perfmon counter 2. @@ -1590,8 +1544,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C8_PMON_CTR2 is defined as MSR_C8_PMON_CTR2 in SDM. **/ -#define MSR_IVY_BRIDGE_C8_PMON_CTR2 0x00000E18 - +#define MSR_IVY_BRIDGE_C8_PMON_CTR2 0x00000E18 /** Package. Uncore C-box 8 perfmon counter 3. @@ -1609,8 +1562,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C8_PMON_CTR3 is defined as MSR_C8_PMON_CTR3 in SDM. **/ -#define MSR_IVY_BRIDGE_C8_PMON_CTR3 0x00000E19 - +#define MSR_IVY_BRIDGE_C8_PMON_CTR3 0x00000E19 /** Package. Uncore C-box 8 perfmon box wide filter1. @@ -1628,8 +1580,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C8_PMON_BOX_FILTER1 is defined as MSR_C8_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_IVY_BRIDGE_C8_PMON_BOX_FILTER1 0x00000E1A - +#define MSR_IVY_BRIDGE_C8_PMON_BOX_FILTER1 0x00000E1A /** Package. Uncore C-box 9 perfmon local box wide control. @@ -1647,8 +1598,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C9_PMON_BOX_CTL is defined as MSR_C9_PMON_BOX_CTL in SDM. **/ -#define MSR_IVY_BRIDGE_C9_PMON_BOX_CTL 0x00000E24 - +#define MSR_IVY_BRIDGE_C9_PMON_BOX_CTL 0x00000E24 /** Package. Uncore C-box 9 perfmon event select for C-box 9 counter 0. @@ -1666,8 +1616,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C9_PMON_EVNTSEL0 is defined as MSR_C9_PMON_EVNTSEL0 in SDM. **/ -#define MSR_IVY_BRIDGE_C9_PMON_EVNTSEL0 0x00000E30 - +#define MSR_IVY_BRIDGE_C9_PMON_EVNTSEL0 0x00000E30 /** Package. Uncore C-box 9 perfmon event select for C-box 9 counter 1. @@ -1685,8 +1634,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C9_PMON_EVNTSEL1 is defined as MSR_C9_PMON_EVNTSEL1 in SDM. **/ -#define MSR_IVY_BRIDGE_C9_PMON_EVNTSEL1 0x00000E31 - +#define MSR_IVY_BRIDGE_C9_PMON_EVNTSEL1 0x00000E31 /** Package. Uncore C-box 9 perfmon event select for C-box 9 counter 2. @@ -1704,8 +1652,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C9_PMON_EVNTSEL2 is defined as MSR_C9_PMON_EVNTSEL2 in SDM. **/ -#define MSR_IVY_BRIDGE_C9_PMON_EVNTSEL2 0x00000E32 - +#define MSR_IVY_BRIDGE_C9_PMON_EVNTSEL2 0x00000E32 /** Package. Uncore C-box 9 perfmon event select for C-box 9 counter 3. @@ -1723,8 +1670,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C9_PMON_EVNTSEL3 is defined as MSR_C9_PMON_EVNTSEL3 in SDM. **/ -#define MSR_IVY_BRIDGE_C9_PMON_EVNTSEL3 0x00000E33 - +#define MSR_IVY_BRIDGE_C9_PMON_EVNTSEL3 0x00000E33 /** Package. Uncore C-box 9 perfmon box wide filter. @@ -1742,8 +1688,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C9_PMON_BOX_FILTER is defined as MSR_C9_PMON_BOX_FILTER in SDM. **/ -#define MSR_IVY_BRIDGE_C9_PMON_BOX_FILTER 0x00000E34 - +#define MSR_IVY_BRIDGE_C9_PMON_BOX_FILTER 0x00000E34 /** Package. Uncore C-box 9 perfmon counter 0. @@ -1761,8 +1706,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C9_PMON_CTR0 is defined as MSR_C9_PMON_CTR0 in SDM. **/ -#define MSR_IVY_BRIDGE_C9_PMON_CTR0 0x00000E36 - +#define MSR_IVY_BRIDGE_C9_PMON_CTR0 0x00000E36 /** Package. Uncore C-box 9 perfmon counter 1. @@ -1780,8 +1724,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C9_PMON_CTR1 is defined as MSR_C9_PMON_CTR1 in SDM. **/ -#define MSR_IVY_BRIDGE_C9_PMON_CTR1 0x00000E37 - +#define MSR_IVY_BRIDGE_C9_PMON_CTR1 0x00000E37 /** Package. Uncore C-box 9 perfmon counter 2. @@ -1799,8 +1742,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C9_PMON_CTR2 is defined as MSR_C9_PMON_CTR2 in SDM. **/ -#define MSR_IVY_BRIDGE_C9_PMON_CTR2 0x00000E38 - +#define MSR_IVY_BRIDGE_C9_PMON_CTR2 0x00000E38 /** Package. Uncore C-box 9 perfmon counter 3. @@ -1818,8 +1760,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C9_PMON_CTR3 is defined as MSR_C9_PMON_CTR3 in SDM. **/ -#define MSR_IVY_BRIDGE_C9_PMON_CTR3 0x00000E39 - +#define MSR_IVY_BRIDGE_C9_PMON_CTR3 0x00000E39 /** Package. Uncore C-box 9 perfmon box wide filter1. @@ -1837,8 +1778,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C9_PMON_BOX_FILTER1 is defined as MSR_C9_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_IVY_BRIDGE_C9_PMON_BOX_FILTER1 0x00000E3A - +#define MSR_IVY_BRIDGE_C9_PMON_BOX_FILTER1 0x00000E3A /** Package. Uncore C-box 10 perfmon local box wide control. @@ -1856,8 +1796,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C10_PMON_BOX_CTL is defined as MSR_C10_PMON_BOX_CTL in SDM. **/ -#define MSR_IVY_BRIDGE_C10_PMON_BOX_CTL 0x00000E44 - +#define MSR_IVY_BRIDGE_C10_PMON_BOX_CTL 0x00000E44 /** Package. Uncore C-box 10 perfmon event select for C-box 10 counter 0. @@ -1875,8 +1814,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C10_PMON_EVNTSEL0 is defined as MSR_C10_PMON_EVNTSEL0 in SDM. **/ -#define MSR_IVY_BRIDGE_C10_PMON_EVNTSEL0 0x00000E50 - +#define MSR_IVY_BRIDGE_C10_PMON_EVNTSEL0 0x00000E50 /** Package. Uncore C-box 10 perfmon event select for C-box 10 counter 1. @@ -1894,8 +1832,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C10_PMON_EVNTSEL1 is defined as MSR_C10_PMON_EVNTSEL1 in SDM. **/ -#define MSR_IVY_BRIDGE_C10_PMON_EVNTSEL1 0x00000E51 - +#define MSR_IVY_BRIDGE_C10_PMON_EVNTSEL1 0x00000E51 /** Package. Uncore C-box 10 perfmon event select for C-box 10 counter 2. @@ -1913,8 +1850,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C10_PMON_EVNTSEL2 is defined as MSR_C10_PMON_EVNTSEL2 in SDM. **/ -#define MSR_IVY_BRIDGE_C10_PMON_EVNTSEL2 0x00000E52 - +#define MSR_IVY_BRIDGE_C10_PMON_EVNTSEL2 0x00000E52 /** Package. Uncore C-box 10 perfmon event select for C-box 10 counter 3. @@ -1932,8 +1868,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C10_PMON_EVNTSEL3 is defined as MSR_C10_PMON_EVNTSEL3 in SDM. **/ -#define MSR_IVY_BRIDGE_C10_PMON_EVNTSEL3 0x00000E53 - +#define MSR_IVY_BRIDGE_C10_PMON_EVNTSEL3 0x00000E53 /** Package. Uncore C-box 10 perfmon box wide filter. @@ -1951,8 +1886,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C10_PMON_BOX_FILTER is defined as MSR_C10_PMON_BOX_FILTER in SDM. **/ -#define MSR_IVY_BRIDGE_C10_PMON_BOX_FILTER 0x00000E54 - +#define MSR_IVY_BRIDGE_C10_PMON_BOX_FILTER 0x00000E54 /** Package. Uncore C-box 10 perfmon counter 0. @@ -1970,8 +1904,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C10_PMON_CTR0 is defined as MSR_C10_PMON_CTR0 in SDM. **/ -#define MSR_IVY_BRIDGE_C10_PMON_CTR0 0x00000E56 - +#define MSR_IVY_BRIDGE_C10_PMON_CTR0 0x00000E56 /** Package. Uncore C-box 10 perfmon counter 1. @@ -1989,8 +1922,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C10_PMON_CTR1 is defined as MSR_C10_PMON_CTR1 in SDM. **/ -#define MSR_IVY_BRIDGE_C10_PMON_CTR1 0x00000E57 - +#define MSR_IVY_BRIDGE_C10_PMON_CTR1 0x00000E57 /** Package. Uncore C-box 10 perfmon counter 2. @@ -2008,8 +1940,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C10_PMON_CTR2 is defined as MSR_C10_PMON_CTR2 in SDM. **/ -#define MSR_IVY_BRIDGE_C10_PMON_CTR2 0x00000E58 - +#define MSR_IVY_BRIDGE_C10_PMON_CTR2 0x00000E58 /** Package. Uncore C-box 10 perfmon counter 3. @@ -2027,8 +1958,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C10_PMON_CTR3 is defined as MSR_C10_PMON_CTR3 in SDM. **/ -#define MSR_IVY_BRIDGE_C10_PMON_CTR3 0x00000E59 - +#define MSR_IVY_BRIDGE_C10_PMON_CTR3 0x00000E59 /** Package. Uncore C-box 10 perfmon box wide filter1. @@ -2046,8 +1976,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C10_PMON_BOX_FILTER1 is defined as MSR_C10_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_IVY_BRIDGE_C10_PMON_BOX_FILTER1 0x00000E5A - +#define MSR_IVY_BRIDGE_C10_PMON_BOX_FILTER1 0x00000E5A /** Package. Uncore C-box 11 perfmon local box wide control. @@ -2065,8 +1994,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C11_PMON_BOX_CTL is defined as MSR_C11_PMON_BOX_CTL in SDM. **/ -#define MSR_IVY_BRIDGE_C11_PMON_BOX_CTL 0x00000E64 - +#define MSR_IVY_BRIDGE_C11_PMON_BOX_CTL 0x00000E64 /** Package. Uncore C-box 11 perfmon event select for C-box 11 counter 0. @@ -2084,8 +2012,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C11_PMON_EVNTSEL0 is defined as MSR_C11_PMON_EVNTSEL0 in SDM. **/ -#define MSR_IVY_BRIDGE_C11_PMON_EVNTSEL0 0x00000E70 - +#define MSR_IVY_BRIDGE_C11_PMON_EVNTSEL0 0x00000E70 /** Package. Uncore C-box 11 perfmon event select for C-box 11 counter 1. @@ -2103,8 +2030,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C11_PMON_EVNTSEL1 is defined as MSR_C11_PMON_EVNTSEL1 in SDM. **/ -#define MSR_IVY_BRIDGE_C11_PMON_EVNTSEL1 0x00000E71 - +#define MSR_IVY_BRIDGE_C11_PMON_EVNTSEL1 0x00000E71 /** Package. Uncore C-box 11 perfmon event select for C-box 11 counter 2. @@ -2122,8 +2048,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C11_PMON_EVNTSEL2 is defined as MSR_C11_PMON_EVNTSEL2 in SDM. **/ -#define MSR_IVY_BRIDGE_C11_PMON_EVNTSEL2 0x00000E72 - +#define MSR_IVY_BRIDGE_C11_PMON_EVNTSEL2 0x00000E72 /** Package. Uncore C-box 11 perfmon event select for C-box 11 counter 3. @@ -2141,8 +2066,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C11_PMON_EVNTSEL3 is defined as MSR_C11_PMON_EVNTSEL3 in SDM. **/ -#define MSR_IVY_BRIDGE_C11_PMON_EVNTSEL3 0x00000E73 - +#define MSR_IVY_BRIDGE_C11_PMON_EVNTSEL3 0x00000E73 /** Package. Uncore C-box 11 perfmon box wide filter. @@ -2160,8 +2084,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C11_PMON_BOX_FILTER is defined as MSR_C11_PMON_BOX_FILTER in SDM. **/ -#define MSR_IVY_BRIDGE_C11_PMON_BOX_FILTER 0x00000E74 - +#define MSR_IVY_BRIDGE_C11_PMON_BOX_FILTER 0x00000E74 /** Package. Uncore C-box 11 perfmon counter 0. @@ -2179,8 +2102,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C11_PMON_CTR0 is defined as MSR_C11_PMON_CTR0 in SDM. **/ -#define MSR_IVY_BRIDGE_C11_PMON_CTR0 0x00000E76 - +#define MSR_IVY_BRIDGE_C11_PMON_CTR0 0x00000E76 /** Package. Uncore C-box 11 perfmon counter 1. @@ -2198,8 +2120,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C11_PMON_CTR1 is defined as MSR_C11_PMON_CTR1 in SDM. **/ -#define MSR_IVY_BRIDGE_C11_PMON_CTR1 0x00000E77 - +#define MSR_IVY_BRIDGE_C11_PMON_CTR1 0x00000E77 /** Package. Uncore C-box 11 perfmon counter 2. @@ -2217,8 +2138,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C11_PMON_CTR2 is defined as MSR_C11_PMON_CTR2 in SDM. **/ -#define MSR_IVY_BRIDGE_C11_PMON_CTR2 0x00000E78 - +#define MSR_IVY_BRIDGE_C11_PMON_CTR2 0x00000E78 /** Package. Uncore C-box 11 perfmon counter 3. @@ -2236,8 +2156,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C11_PMON_CTR3 is defined as MSR_C11_PMON_CTR3 in SDM. **/ -#define MSR_IVY_BRIDGE_C11_PMON_CTR3 0x00000E79 - +#define MSR_IVY_BRIDGE_C11_PMON_CTR3 0x00000E79 /** Package. Uncore C-box 11 perfmon box wide filter1. @@ -2255,8 +2174,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C11_PMON_BOX_FILTER1 is defined as MSR_C11_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_IVY_BRIDGE_C11_PMON_BOX_FILTER1 0x00000E7A - +#define MSR_IVY_BRIDGE_C11_PMON_BOX_FILTER1 0x00000E7A /** Package. Uncore C-box 12 perfmon local box wide control. @@ -2274,8 +2192,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C12_PMON_BOX_CTL is defined as MSR_C12_PMON_BOX_CTL in SDM. **/ -#define MSR_IVY_BRIDGE_C12_PMON_BOX_CTL 0x00000E84 - +#define MSR_IVY_BRIDGE_C12_PMON_BOX_CTL 0x00000E84 /** Package. Uncore C-box 12 perfmon event select for C-box 12 counter 0. @@ -2293,8 +2210,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C12_PMON_EVNTSEL0 is defined as MSR_C12_PMON_EVNTSEL0 in SDM. **/ -#define MSR_IVY_BRIDGE_C12_PMON_EVNTSEL0 0x00000E90 - +#define MSR_IVY_BRIDGE_C12_PMON_EVNTSEL0 0x00000E90 /** Package. Uncore C-box 12 perfmon event select for C-box 12 counter 1. @@ -2312,8 +2228,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C12_PMON_EVNTSEL1 is defined as MSR_C12_PMON_EVNTSEL1 in SDM. **/ -#define MSR_IVY_BRIDGE_C12_PMON_EVNTSEL1 0x00000E91 - +#define MSR_IVY_BRIDGE_C12_PMON_EVNTSEL1 0x00000E91 /** Package. Uncore C-box 12 perfmon event select for C-box 12 counter 2. @@ -2331,8 +2246,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C12_PMON_EVNTSEL2 is defined as MSR_C12_PMON_EVNTSEL2 in SDM. **/ -#define MSR_IVY_BRIDGE_C12_PMON_EVNTSEL2 0x00000E92 - +#define MSR_IVY_BRIDGE_C12_PMON_EVNTSEL2 0x00000E92 /** Package. Uncore C-box 12 perfmon event select for C-box 12 counter 3. @@ -2350,8 +2264,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C12_PMON_EVNTSEL3 is defined as MSR_C12_PMON_EVNTSEL3 in SDM. **/ -#define MSR_IVY_BRIDGE_C12_PMON_EVNTSEL3 0x00000E93 - +#define MSR_IVY_BRIDGE_C12_PMON_EVNTSEL3 0x00000E93 /** Package. Uncore C-box 12 perfmon box wide filter. @@ -2369,8 +2282,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C12_PMON_BOX_FILTER is defined as MSR_C12_PMON_BOX_FILTER in SDM. **/ -#define MSR_IVY_BRIDGE_C12_PMON_BOX_FILTER 0x00000E94 - +#define MSR_IVY_BRIDGE_C12_PMON_BOX_FILTER 0x00000E94 /** Package. Uncore C-box 12 perfmon counter 0. @@ -2388,8 +2300,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C12_PMON_CTR0 is defined as MSR_C12_PMON_CTR0 in SDM. **/ -#define MSR_IVY_BRIDGE_C12_PMON_CTR0 0x00000E96 - +#define MSR_IVY_BRIDGE_C12_PMON_CTR0 0x00000E96 /** Package. Uncore C-box 12 perfmon counter 1. @@ -2407,8 +2318,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C12_PMON_CTR1 is defined as MSR_C12_PMON_CTR1 in SDM. **/ -#define MSR_IVY_BRIDGE_C12_PMON_CTR1 0x00000E97 - +#define MSR_IVY_BRIDGE_C12_PMON_CTR1 0x00000E97 /** Package. Uncore C-box 12 perfmon counter 2. @@ -2426,8 +2336,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C12_PMON_CTR2 is defined as MSR_C12_PMON_CTR2 in SDM. **/ -#define MSR_IVY_BRIDGE_C12_PMON_CTR2 0x00000E98 - +#define MSR_IVY_BRIDGE_C12_PMON_CTR2 0x00000E98 /** Package. Uncore C-box 12 perfmon counter 3. @@ -2445,8 +2354,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C12_PMON_CTR3 is defined as MSR_C12_PMON_CTR3 in SDM. **/ -#define MSR_IVY_BRIDGE_C12_PMON_CTR3 0x00000E99 - +#define MSR_IVY_BRIDGE_C12_PMON_CTR3 0x00000E99 /** Package. Uncore C-box 12 perfmon box wide filter1. @@ -2464,8 +2372,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C12_PMON_BOX_FILTER1 is defined as MSR_C12_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_IVY_BRIDGE_C12_PMON_BOX_FILTER1 0x00000E9A - +#define MSR_IVY_BRIDGE_C12_PMON_BOX_FILTER1 0x00000E9A /** Package. Uncore C-box 13 perfmon local box wide control. @@ -2483,8 +2390,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C13_PMON_BOX_CTL is defined as MSR_C13_PMON_BOX_CTL in SDM. **/ -#define MSR_IVY_BRIDGE_C13_PMON_BOX_CTL 0x00000EA4 - +#define MSR_IVY_BRIDGE_C13_PMON_BOX_CTL 0x00000EA4 /** Package. Uncore C-box 13 perfmon event select for C-box 13 counter 0. @@ -2502,8 +2408,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C13_PMON_EVNTSEL0 is defined as MSR_C13_PMON_EVNTSEL0 in SDM. **/ -#define MSR_IVY_BRIDGE_C13_PMON_EVNTSEL0 0x00000EB0 - +#define MSR_IVY_BRIDGE_C13_PMON_EVNTSEL0 0x00000EB0 /** Package. Uncore C-box 13 perfmon event select for C-box 13 counter 1. @@ -2521,8 +2426,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C13_PMON_EVNTSEL1 is defined as MSR_C13_PMON_EVNTSEL1 in SDM. **/ -#define MSR_IVY_BRIDGE_C13_PMON_EVNTSEL1 0x00000EB1 - +#define MSR_IVY_BRIDGE_C13_PMON_EVNTSEL1 0x00000EB1 /** Package. Uncore C-box 13 perfmon event select for C-box 13 counter 2. @@ -2540,8 +2444,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C13_PMON_EVNTSEL2 is defined as MSR_C13_PMON_EVNTSEL2 in SDM. **/ -#define MSR_IVY_BRIDGE_C13_PMON_EVNTSEL2 0x00000EB2 - +#define MSR_IVY_BRIDGE_C13_PMON_EVNTSEL2 0x00000EB2 /** Package. Uncore C-box 13 perfmon event select for C-box 13 counter 3. @@ -2559,8 +2462,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C13_PMON_EVNTSEL3 is defined as MSR_C13_PMON_EVNTSEL3 in SDM. **/ -#define MSR_IVY_BRIDGE_C13_PMON_EVNTSEL3 0x00000EB3 - +#define MSR_IVY_BRIDGE_C13_PMON_EVNTSEL3 0x00000EB3 /** Package. Uncore C-box 13 perfmon box wide filter. @@ -2578,8 +2480,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C13_PMON_BOX_FILTER is defined as MSR_C13_PMON_BOX_FILTER in SDM. **/ -#define MSR_IVY_BRIDGE_C13_PMON_BOX_FILTER 0x00000EB4 - +#define MSR_IVY_BRIDGE_C13_PMON_BOX_FILTER 0x00000EB4 /** Package. Uncore C-box 13 perfmon counter 0. @@ -2597,8 +2498,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C13_PMON_CTR0 is defined as MSR_C13_PMON_CTR0 in SDM. **/ -#define MSR_IVY_BRIDGE_C13_PMON_CTR0 0x00000EB6 - +#define MSR_IVY_BRIDGE_C13_PMON_CTR0 0x00000EB6 /** Package. Uncore C-box 13 perfmon counter 1. @@ -2616,8 +2516,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C13_PMON_CTR1 is defined as MSR_C13_PMON_CTR1 in SDM. **/ -#define MSR_IVY_BRIDGE_C13_PMON_CTR1 0x00000EB7 - +#define MSR_IVY_BRIDGE_C13_PMON_CTR1 0x00000EB7 /** Package. Uncore C-box 13 perfmon counter 2. @@ -2635,8 +2534,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C13_PMON_CTR2 is defined as MSR_C13_PMON_CTR2 in SDM. **/ -#define MSR_IVY_BRIDGE_C13_PMON_CTR2 0x00000EB8 - +#define MSR_IVY_BRIDGE_C13_PMON_CTR2 0x00000EB8 /** Package. Uncore C-box 13 perfmon counter 3. @@ -2654,8 +2552,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C13_PMON_CTR3 is defined as MSR_C13_PMON_CTR3 in SDM. **/ -#define MSR_IVY_BRIDGE_C13_PMON_CTR3 0x00000EB9 - +#define MSR_IVY_BRIDGE_C13_PMON_CTR3 0x00000EB9 /** Package. Uncore C-box 13 perfmon box wide filter1. @@ -2673,8 +2570,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C13_PMON_BOX_FILTER1 is defined as MSR_C13_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_IVY_BRIDGE_C13_PMON_BOX_FILTER1 0x00000EBA - +#define MSR_IVY_BRIDGE_C13_PMON_BOX_FILTER1 0x00000EBA /** Package. Uncore C-box 14 perfmon local box wide control. @@ -2692,8 +2588,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C14_PMON_BOX_CTL is defined as MSR_C14_PMON_BOX_CTL in SDM. **/ -#define MSR_IVY_BRIDGE_C14_PMON_BOX_CTL 0x00000EC4 - +#define MSR_IVY_BRIDGE_C14_PMON_BOX_CTL 0x00000EC4 /** Package. Uncore C-box 14 perfmon event select for C-box 14 counter 0. @@ -2711,8 +2606,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C14_PMON_EVNTSEL0 is defined as MSR_C14_PMON_EVNTSEL0 in SDM. **/ -#define MSR_IVY_BRIDGE_C14_PMON_EVNTSEL0 0x00000ED0 - +#define MSR_IVY_BRIDGE_C14_PMON_EVNTSEL0 0x00000ED0 /** Package. Uncore C-box 14 perfmon event select for C-box 14 counter 1. @@ -2730,8 +2624,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C14_PMON_EVNTSEL1 is defined as MSR_C14_PMON_EVNTSEL1 in SDM. **/ -#define MSR_IVY_BRIDGE_C14_PMON_EVNTSEL1 0x00000ED1 - +#define MSR_IVY_BRIDGE_C14_PMON_EVNTSEL1 0x00000ED1 /** Package. Uncore C-box 14 perfmon event select for C-box 14 counter 2. @@ -2749,8 +2642,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C14_PMON_EVNTSEL2 is defined as MSR_C14_PMON_EVNTSEL2 in SDM. **/ -#define MSR_IVY_BRIDGE_C14_PMON_EVNTSEL2 0x00000ED2 - +#define MSR_IVY_BRIDGE_C14_PMON_EVNTSEL2 0x00000ED2 /** Package. Uncore C-box 14 perfmon event select for C-box 14 counter 3. @@ -2768,8 +2660,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C14_PMON_EVNTSEL3 is defined as MSR_C14_PMON_EVNTSEL3 in SDM. **/ -#define MSR_IVY_BRIDGE_C14_PMON_EVNTSEL3 0x00000ED3 - +#define MSR_IVY_BRIDGE_C14_PMON_EVNTSEL3 0x00000ED3 /** Package. Uncore C-box 14 perfmon box wide filter. @@ -2787,8 +2678,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C14_PMON_BOX_FILTER is defined as MSR_C14_PMON_BOX_FILTER in SDM. **/ -#define MSR_IVY_BRIDGE_C14_PMON_BOX_FILTER 0x00000ED4 - +#define MSR_IVY_BRIDGE_C14_PMON_BOX_FILTER 0x00000ED4 /** Package. Uncore C-box 14 perfmon counter 0. @@ -2806,8 +2696,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C14_PMON_CTR0 is defined as MSR_C14_PMON_CTR0 in SDM. **/ -#define MSR_IVY_BRIDGE_C14_PMON_CTR0 0x00000ED6 - +#define MSR_IVY_BRIDGE_C14_PMON_CTR0 0x00000ED6 /** Package. Uncore C-box 14 perfmon counter 1. @@ -2825,8 +2714,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C14_PMON_CTR1 is defined as MSR_C14_PMON_CTR1 in SDM. **/ -#define MSR_IVY_BRIDGE_C14_PMON_CTR1 0x00000ED7 - +#define MSR_IVY_BRIDGE_C14_PMON_CTR1 0x00000ED7 /** Package. Uncore C-box 14 perfmon counter 2. @@ -2844,8 +2732,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C14_PMON_CTR2 is defined as MSR_C14_PMON_CTR2 in SDM. **/ -#define MSR_IVY_BRIDGE_C14_PMON_CTR2 0x00000ED8 - +#define MSR_IVY_BRIDGE_C14_PMON_CTR2 0x00000ED8 /** Package. Uncore C-box 14 perfmon counter 3. @@ -2863,8 +2750,7 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C14_PMON_CTR3 is defined as MSR_C14_PMON_CTR3 in SDM. **/ -#define MSR_IVY_BRIDGE_C14_PMON_CTR3 0x00000ED9 - +#define MSR_IVY_BRIDGE_C14_PMON_CTR3 0x00000ED9 /** Package. Uncore C-box 14 perfmon box wide filter1. @@ -2882,6 +2768,6 @@ typedef union { @endcode @note MSR_IVY_BRIDGE_C14_PMON_BOX_FILTER1 is defined as MSR_C14_PMON_BOX_FILTER1 in SDM. **/ -#define MSR_IVY_BRIDGE_C14_PMON_BOX_FILTER1 0x00000EDA +#define MSR_IVY_BRIDGE_C14_PMON_BOX_FILTER1 0x00000EDA #endif diff --git a/MdePkg/Include/Register/Intel/Msr/NehalemMsr.h b/MdePkg/Include/Register/Intel/Msr/NehalemMsr.h index a21e8a5..60f3460 100644 --- a/MdePkg/Include/Register/Intel/Msr/NehalemMsr.h +++ b/MdePkg/Include/Register/Intel/Msr/NehalemMsr.h @@ -56,7 +56,7 @@ @endcode @note MSR_NEHALEM_PLATFORM_ID is defined as MSR_PLATFORM_ID in SDM. **/ -#define MSR_NEHALEM_PLATFORM_ID 0x00000017 +#define MSR_NEHALEM_PLATFORM_ID 0x00000017 /** MSR information returned for MSR index #MSR_NEHALEM_PLATFORM_ID @@ -66,21 +66,20 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:32; - UINT32 Reserved2:18; + UINT32 Reserved1 : 32; + UINT32 Reserved2 : 18; /// /// [Bits 52:50] See Table 2-2. /// - UINT32 PlatformId:3; - UINT32 Reserved3:11; + UINT32 PlatformId : 3; + UINT32 Reserved3 : 11; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_NEHALEM_PLATFORM_ID_REGISTER; - /** Thread. SMI Counter (R/O). @@ -98,7 +97,7 @@ typedef union { @endcode @note MSR_NEHALEM_SMI_COUNT is defined as MSR_SMI_COUNT in SDM. **/ -#define MSR_NEHALEM_SMI_COUNT 0x00000034 +#define MSR_NEHALEM_SMI_COUNT 0x00000034 /** MSR information returned for MSR index #MSR_NEHALEM_SMI_COUNT @@ -112,20 +111,19 @@ typedef union { /// [Bits 31:0] SMI Count (R/O) Running count of SMI events since last /// RESET. /// - UINT32 SMICount:32; - UINT32 Reserved:32; + UINT32 SMICount : 32; + UINT32 Reserved : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_NEHALEM_SMI_COUNT_REGISTER; - /** Package. see http://biosbits.org. @@ -144,7 +142,7 @@ typedef union { @endcode @note MSR_NEHALEM_PLATFORM_INFO is defined as MSR_PLATFORM_INFO in SDM. **/ -#define MSR_NEHALEM_PLATFORM_INFO 0x000000CE +#define MSR_NEHALEM_PLATFORM_INFO 0x000000CE /** MSR information returned for MSR index #MSR_NEHALEM_PLATFORM_INFO @@ -154,45 +152,44 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:8; + UINT32 Reserved1 : 8; /// /// [Bits 15:8] Package. Maximum Non-Turbo Ratio (R/O) The is the ratio /// of the frequency that invariant TSC runs at. The invariant TSC /// frequency can be computed by multiplying this ratio by 133.33 MHz. /// - UINT32 MaximumNonTurboRatio:8; - UINT32 Reserved2:12; + UINT32 MaximumNonTurboRatio : 8; + UINT32 Reserved2 : 12; /// /// [Bit 28] Package. Programmable Ratio Limit for Turbo Mode (R/O) When /// set to 1, indicates that Programmable Ratio Limits for Turbo mode is /// enabled, and when set to 0, indicates Programmable Ratio Limits for /// Turbo mode is disabled. /// - UINT32 RatioLimit:1; + UINT32 RatioLimit : 1; /// /// [Bit 29] Package. Programmable TDC-TDP Limit for Turbo Mode (R/O) /// When set to 1, indicates that TDC/TDP Limits for Turbo mode are /// programmable, and when set to 0, indicates TDC and TDP Limits for /// Turbo mode are not programmable. /// - UINT32 TDC_TDPLimit:1; - UINT32 Reserved3:2; - UINT32 Reserved4:8; + UINT32 TDC_TDPLimit : 1; + UINT32 Reserved3 : 2; + UINT32 Reserved4 : 8; /// /// [Bits 47:40] Package. Maximum Efficiency Ratio (R/O) The is the /// minimum ratio (maximum efficiency) that the processor can operates, in /// units of 133.33MHz. /// - UINT32 MaximumEfficiencyRatio:8; - UINT32 Reserved5:16; + UINT32 MaximumEfficiencyRatio : 8; + UINT32 Reserved5 : 16; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_NEHALEM_PLATFORM_INFO_REGISTER; - /** Core. C-State Configuration Control (R/W) Note: C-state values are processor specific C-state code names, unrelated to MWAIT extension C-state @@ -213,7 +210,7 @@ typedef union { @endcode @note MSR_NEHALEM_PKG_CST_CONFIG_CONTROL is defined as MSR_PKG_CST_CONFIG_CONTROL in SDM. **/ -#define MSR_NEHALEM_PKG_CST_CONFIG_CONTROL 0x000000E2 +#define MSR_NEHALEM_PKG_CST_CONFIG_CONTROL 0x000000E2 /** MSR information returned for MSR index #MSR_NEHALEM_PKG_CST_CONFIG_CONTROL @@ -233,70 +230,69 @@ typedef union { /// C-state limit. Note: This field cannot be used to limit package /// C-state to C3. /// - UINT32 Limit:3; - UINT32 Reserved1:7; + UINT32 Limit : 3; + UINT32 Reserved1 : 7; /// /// [Bit 10] I/O MWAIT Redirection Enable (R/W) When set, will map /// IO_read instructions sent to IO register specified by /// MSR_PMG_IO_CAPTURE_BASE to MWAIT instructions. /// - UINT32 IO_MWAIT:1; - UINT32 Reserved2:4; + UINT32 IO_MWAIT : 1; + UINT32 Reserved2 : 4; /// /// [Bit 15] CFG Lock (R/WO) When set, lock bits 15:0 of this register /// until next reset. /// - UINT32 CFGLock:1; - UINT32 Reserved3:8; + UINT32 CFGLock : 1; + UINT32 Reserved3 : 8; /// /// [Bit 24] Interrupt filtering enable (R/W) When set, processor cores /// in a deep C-State will wake only when the event message is destined /// for that core. When 0, all processor cores in a deep C-State will wake /// for an event message. /// - UINT32 InterruptFiltering:1; + UINT32 InterruptFiltering : 1; /// /// [Bit 25] C3 state auto demotion enable (R/W) When set, the processor /// will conditionally demote C6/C7 requests to C3 based on uncore /// auto-demote information. /// - UINT32 C3AutoDemotion:1; + UINT32 C3AutoDemotion : 1; /// /// [Bit 26] C1 state auto demotion enable (R/W) When set, the processor /// will conditionally demote C3/C6/C7 requests to C1 based on uncore /// auto-demote information. /// - UINT32 C1AutoDemotion:1; + UINT32 C1AutoDemotion : 1; /// /// [Bit 27] Enable C3 Undemotion (R/W). /// - UINT32 C3Undemotion:1; + UINT32 C3Undemotion : 1; /// /// [Bit 28] Enable C1 Undemotion (R/W). /// - UINT32 C1Undemotion:1; + UINT32 C1Undemotion : 1; /// /// [Bit 29] Package C State Demotion Enable (R/W). /// - UINT32 CStateDemotion:1; + UINT32 CStateDemotion : 1; /// /// [Bit 30] Package C State UnDemotion Enable (R/W). /// - UINT32 CStateUndemotion:1; - UINT32 Reserved4:1; - UINT32 Reserved5:32; + UINT32 CStateUndemotion : 1; + UINT32 Reserved4 : 1; + UINT32 Reserved5 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_NEHALEM_PKG_CST_CONFIG_CONTROL_REGISTER; - /** Core. Power Management IO Redirection in C-state (R/W) See http://biosbits.org. @@ -316,7 +312,7 @@ typedef union { @endcode @note MSR_NEHALEM_PMG_IO_CAPTURE_BASE is defined as MSR_PMG_IO_CAPTURE_BASE in SDM. **/ -#define MSR_NEHALEM_PMG_IO_CAPTURE_BASE 0x000000E4 +#define MSR_NEHALEM_PMG_IO_CAPTURE_BASE 0x000000E4 /** MSR information returned for MSR index #MSR_NEHALEM_PMG_IO_CAPTURE_BASE @@ -334,7 +330,7 @@ typedef union { /// address redirection is enabled, this is the IO port address reported /// to the OS/software. /// - UINT32 Lvl2Base:16; + UINT32 Lvl2Base : 16; /// /// [Bits 18:16] C-state Range (R/W) Specifies the encoding value of the /// maximum C-State code name to be included when IO read to MWAIT @@ -342,21 +338,20 @@ typedef union { /// is the max C-State to include 001b - C6 is the max C-State to include /// 010b - C7 is the max C-State to include. /// - UINT32 CStateRange:3; - UINT32 Reserved1:13; - UINT32 Reserved2:32; + UINT32 CStateRange : 3; + UINT32 Reserved1 : 13; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_NEHALEM_PMG_IO_CAPTURE_BASE_REGISTER; - /** Enable Misc. Processor Features (R/W) Allows a variety of processor functions to be enabled and disabled. @@ -376,7 +371,7 @@ typedef union { @endcode @note MSR_NEHALEM_IA32_MISC_ENABLE is defined as IA32_MISC_ENABLE in SDM. **/ -#define MSR_NEHALEM_IA32_MISC_ENABLE 0x000001A0 +#define MSR_NEHALEM_IA32_MISC_ENABLE 0x000001A0 /** MSR information returned for MSR index #MSR_NEHALEM_IA32_MISC_ENABLE @@ -389,55 +384,55 @@ typedef union { /// /// [Bit 0] Thread. Fast-Strings Enable See Table 2-2. /// - UINT32 FastStrings:1; - UINT32 Reserved1:2; + UINT32 FastStrings : 1; + UINT32 Reserved1 : 2; /// /// [Bit 3] Thread. Automatic Thermal Control Circuit Enable (R/W) See /// Table 2-2. Default value is 1. /// - UINT32 AutomaticThermalControlCircuit:1; - UINT32 Reserved2:3; + UINT32 AutomaticThermalControlCircuit : 1; + UINT32 Reserved2 : 3; /// /// [Bit 7] Thread. Performance Monitoring Available (R) See Table 2-2. /// - UINT32 PerformanceMonitoring:1; - UINT32 Reserved3:3; + UINT32 PerformanceMonitoring : 1; + UINT32 Reserved3 : 3; /// /// [Bit 11] Thread. Branch Trace Storage Unavailable (RO) See Table 2-2. /// - UINT32 BTS:1; + UINT32 BTS : 1; /// /// [Bit 12] Thread. Processor Event Based Sampling Unavailable (RO) See /// Table 2-2. /// - UINT32 PEBS:1; - UINT32 Reserved4:3; + UINT32 PEBS : 1; + UINT32 Reserved4 : 3; /// /// [Bit 16] Package. Enhanced Intel SpeedStep Technology Enable (R/W) See /// Table 2-2. /// - UINT32 EIST:1; - UINT32 Reserved5:1; + UINT32 EIST : 1; + UINT32 Reserved5 : 1; /// /// [Bit 18] Thread. ENABLE MONITOR FSM. (R/W) See Table 2-2. /// - UINT32 MONITOR:1; - UINT32 Reserved6:3; + UINT32 MONITOR : 1; + UINT32 Reserved6 : 3; /// /// [Bit 22] Thread. Limit CPUID Maxval (R/W) See Table 2-2. /// - UINT32 LimitCpuidMaxval:1; + UINT32 LimitCpuidMaxval : 1; /// /// [Bit 23] Thread. xTPR Message Disable (R/W) See Table 2-2. /// - UINT32 xTPR_Message_Disable:1; - UINT32 Reserved7:8; - UINT32 Reserved8:2; + UINT32 xTPR_Message_Disable : 1; + UINT32 Reserved7 : 8; + UINT32 Reserved8 : 2; /// /// [Bit 34] Thread. XD Bit Disable (R/W) See Table 2-2. /// - UINT32 XD:1; - UINT32 Reserved9:3; + UINT32 XD : 1; + UINT32 Reserved9 : 3; /// /// [Bit 38] Package. Turbo Mode Disable (R/W) When set to 1 on processors /// that support Intel Turbo Boost Technology, the turbo mode feature is @@ -449,16 +444,15 @@ typedef union { /// in the processor. If power-on default value is 0, turbo mode is not /// available. /// - UINT32 TurboModeDisable:1; - UINT32 Reserved10:25; + UINT32 TurboModeDisable : 1; + UINT32 Reserved10 : 25; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_NEHALEM_IA32_MISC_ENABLE_REGISTER; - /** Thread. @@ -477,7 +471,7 @@ typedef union { @endcode @note MSR_NEHALEM_TEMPERATURE_TARGET is defined as MSR_TEMPERATURE_TARGET in SDM. **/ -#define MSR_NEHALEM_TEMPERATURE_TARGET 0x000001A2 +#define MSR_NEHALEM_TEMPERATURE_TARGET 0x000001A2 /** MSR information returned for MSR index #MSR_NEHALEM_TEMPERATURE_TARGET @@ -487,26 +481,25 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:16; + UINT32 Reserved1 : 16; /// /// [Bits 23:16] Temperature Target (R) The minimum temperature at which /// PROCHOT# will be asserted. The value is degree C. /// - UINT32 TemperatureTarget:8; - UINT32 Reserved2:8; - UINT32 Reserved3:32; + UINT32 TemperatureTarget : 8; + UINT32 Reserved2 : 8; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_NEHALEM_TEMPERATURE_TARGET_REGISTER; - /** Miscellaneous Feature Control (R/W). @@ -525,7 +518,7 @@ typedef union { @endcode @note MSR_NEHALEM_MISC_FEATURE_CONTROL is defined as MSR_MISC_FEATURE_CONTROL in SDM. **/ -#define MSR_NEHALEM_MISC_FEATURE_CONTROL 0x000001A4 +#define MSR_NEHALEM_MISC_FEATURE_CONTROL 0x000001A4 /** MSR information returned for MSR index #MSR_NEHALEM_MISC_FEATURE_CONTROL @@ -540,40 +533,39 @@ typedef union { /// L2 hardware prefetcher, which fetches additional lines of code or data /// into the L2 cache. /// - UINT32 L2HardwarePrefetcherDisable:1; + UINT32 L2HardwarePrefetcherDisable : 1; /// /// [Bit 1] Core. L2 Adjacent Cache Line Prefetcher Disable (R/W) If 1, /// disables the adjacent cache line prefetcher, which fetches the cache /// line that comprises a cache line pair (128 bytes). /// - UINT32 L2AdjacentCacheLinePrefetcherDisable:1; + UINT32 L2AdjacentCacheLinePrefetcherDisable : 1; /// /// [Bit 2] Core. DCU Hardware Prefetcher Disable (R/W) If 1, disables /// the L1 data cache prefetcher, which fetches the next cache line into /// L1 data cache. /// - UINT32 DCUHardwarePrefetcherDisable:1; + UINT32 DCUHardwarePrefetcherDisable : 1; /// /// [Bit 3] Core. DCU IP Prefetcher Disable (R/W) If 1, disables the L1 /// data cache IP prefetcher, which uses sequential load history (based on /// instruction Pointer of previous loads) to determine whether to /// prefetch additional lines. /// - UINT32 DCUIPPrefetcherDisable:1; - UINT32 Reserved1:28; - UINT32 Reserved2:32; + UINT32 DCUIPPrefetcherDisable : 1; + UINT32 Reserved1 : 28; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_NEHALEM_MISC_FEATURE_CONTROL_REGISTER; - /** Thread. Offcore Response Event Select Register (R/W). @@ -590,8 +582,7 @@ typedef union { @endcode @note MSR_NEHALEM_OFFCORE_RSP_0 is defined as MSR_OFFCORE_RSP_0 in SDM. **/ -#define MSR_NEHALEM_OFFCORE_RSP_0 0x000001A6 - +#define MSR_NEHALEM_OFFCORE_RSP_0 0x000001A6 /** See http://biosbits.org. @@ -611,7 +602,7 @@ typedef union { @endcode @note MSR_NEHALEM_MISC_PWR_MGMT is defined as MSR_MISC_PWR_MGMT in SDM. **/ -#define MSR_NEHALEM_MISC_PWR_MGMT 0x000001AA +#define MSR_NEHALEM_MISC_PWR_MGMT 0x000001AA /** MSR information returned for MSR index #MSR_NEHALEM_MISC_PWR_MGMT @@ -627,28 +618,27 @@ typedef union { /// request from processor cores; When 1, disables hardware coordination /// of Enhanced Intel Speedstep Technology requests. /// - UINT32 EISTHardwareCoordinationDisable:1; + UINT32 EISTHardwareCoordinationDisable : 1; /// /// [Bit 1] Thread. Energy/Performance Bias Enable (R/W) This bit makes /// the IA32_ENERGY_PERF_BIAS register (MSR 1B0h) visible to software with /// Ring 0 privileges. This bit's status (1 or 0) is also reflected by /// CPUID.(EAX=06h):ECX[3]. /// - UINT32 EnergyPerformanceBiasEnable:1; - UINT32 Reserved1:30; - UINT32 Reserved2:32; + UINT32 EnergyPerformanceBiasEnable : 1; + UINT32 Reserved1 : 30; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_NEHALEM_MISC_PWR_MGMT_REGISTER; - /** See http://biosbits.org. @@ -667,7 +657,7 @@ typedef union { @endcode @note MSR_NEHALEM_TURBO_POWER_CURRENT_LIMIT is defined as MSR_TURBO_POWER_CURRENT_LIMIT in SDM. **/ -#define MSR_NEHALEM_TURBO_POWER_CURRENT_LIMIT 0x000001AC +#define MSR_NEHALEM_TURBO_POWER_CURRENT_LIMIT 0x000001AC /** MSR information returned for MSR index #MSR_NEHALEM_TURBO_POWER_CURRENT_LIMIT @@ -681,35 +671,34 @@ typedef union { /// [Bits 14:0] Package. TDP Limit (R/W) TDP limit in 1/8 Watt /// granularity. /// - UINT32 TDPLimit:15; + UINT32 TDPLimit : 15; /// /// [Bit 15] Package. TDP Limit Override Enable (R/W) A value = 0 /// indicates override is not active, and a value = 1 indicates active. /// - UINT32 TDPLimitOverrideEnable:1; + UINT32 TDPLimitOverrideEnable : 1; /// /// [Bits 30:16] Package. TDC Limit (R/W) TDC limit in 1/8 Amp /// granularity. /// - UINT32 TDCLimit:15; + UINT32 TDCLimit : 15; /// /// [Bit 31] Package. TDC Limit Override Enable (R/W) A value = 0 /// indicates override is not active, and a value = 1 indicates active. /// - UINT32 TDCLimitOverrideEnable:1; - UINT32 Reserved:32; + UINT32 TDCLimitOverrideEnable : 1; + UINT32 Reserved : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_NEHALEM_TURBO_POWER_CURRENT_LIMIT_REGISTER; - /** Package. Maximum Ratio Limit of Turbo Mode RO if MSR_PLATFORM_INFO.[28] = 0, RW if MSR_PLATFORM_INFO.[28] = 1. @@ -728,7 +717,7 @@ typedef union { @endcode @note MSR_NEHALEM_TURBO_RATIO_LIMIT is defined as MSR_TURBO_RATIO_LIMIT in SDM. **/ -#define MSR_NEHALEM_TURBO_RATIO_LIMIT 0x000001AD +#define MSR_NEHALEM_TURBO_RATIO_LIMIT 0x000001AD /** MSR information returned for MSR index #MSR_NEHALEM_TURBO_RATIO_LIMIT @@ -742,35 +731,34 @@ typedef union { /// [Bits 7:0] Package. Maximum Ratio Limit for 1C Maximum turbo ratio /// limit of 1 core active. /// - UINT32 Maximum1C:8; + UINT32 Maximum1C : 8; /// /// [Bits 15:8] Package. Maximum Ratio Limit for 2C Maximum turbo ratio /// limit of 2 core active. /// - UINT32 Maximum2C:8; + UINT32 Maximum2C : 8; /// /// [Bits 23:16] Package. Maximum Ratio Limit for 3C Maximum turbo ratio /// limit of 3 core active. /// - UINT32 Maximum3C:8; + UINT32 Maximum3C : 8; /// /// [Bits 31:24] Package. Maximum Ratio Limit for 4C Maximum turbo ratio /// limit of 4 core active. /// - UINT32 Maximum4C:8; - UINT32 Reserved:32; + UINT32 Maximum4C : 8; + UINT32 Reserved : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_NEHALEM_TURBO_RATIO_LIMIT_REGISTER; - /** Core. Last Branch Record Filtering Select Register (R/W) See Section 17.9.2, "Filtering of Last Branch Records.". @@ -790,7 +778,7 @@ typedef union { @endcode @note MSR_NEHALEM_LBR_SELECT is defined as MSR_LBR_SELECT in SDM. **/ -#define MSR_NEHALEM_LBR_SELECT 0x000001C8 +#define MSR_NEHALEM_LBR_SELECT 0x000001C8 /** MSR information returned for MSR index #MSR_NEHALEM_LBR_SELECT @@ -803,53 +791,52 @@ typedef union { /// /// [Bit 0] CPL_EQ_0. /// - UINT32 CPL_EQ_0:1; + UINT32 CPL_EQ_0 : 1; /// /// [Bit 1] CPL_NEQ_0. /// - UINT32 CPL_NEQ_0:1; + UINT32 CPL_NEQ_0 : 1; /// /// [Bit 2] JCC. /// - UINT32 JCC:1; + UINT32 JCC : 1; /// /// [Bit 3] NEAR_REL_CALL. /// - UINT32 NEAR_REL_CALL:1; + UINT32 NEAR_REL_CALL : 1; /// /// [Bit 4] NEAR_IND_CALL. /// - UINT32 NEAR_IND_CALL:1; + UINT32 NEAR_IND_CALL : 1; /// /// [Bit 5] NEAR_RET. /// - UINT32 NEAR_RET:1; + UINT32 NEAR_RET : 1; /// /// [Bit 6] NEAR_IND_JMP. /// - UINT32 NEAR_IND_JMP:1; + UINT32 NEAR_IND_JMP : 1; /// /// [Bit 7] NEAR_REL_JMP. /// - UINT32 NEAR_REL_JMP:1; + UINT32 NEAR_REL_JMP : 1; /// /// [Bit 8] FAR_BRANCH. /// - UINT32 FAR_BRANCH:1; - UINT32 Reserved1:23; - UINT32 Reserved2:32; + UINT32 FAR_BRANCH : 1; + UINT32 Reserved1 : 23; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_NEHALEM_LBR_SELECT_REGISTER; - /** Thread. Last Branch Record Stack TOS (R/W) Contains an index (bits 0-3) that points to the MSR containing the most recent branch record. See @@ -868,8 +855,7 @@ typedef union { @endcode @note MSR_NEHALEM_LASTBRANCH_TOS is defined as MSR_LASTBRANCH_TOS in SDM. **/ -#define MSR_NEHALEM_LASTBRANCH_TOS 0x000001C9 - +#define MSR_NEHALEM_LASTBRANCH_TOS 0x000001C9 /** Thread. Last Exception Record From Linear IP (R) Contains a pointer to the @@ -888,8 +874,7 @@ typedef union { @endcode @note MSR_NEHALEM_LER_FROM_LIP is defined as MSR_LER_FROM_LIP in SDM. **/ -#define MSR_NEHALEM_LER_FROM_LIP 0x000001DD - +#define MSR_NEHALEM_LER_FROM_LIP 0x000001DD /** Thread. Last Exception Record To Linear IP (R) This area contains a pointer @@ -909,8 +894,7 @@ typedef union { @endcode @note MSR_NEHALEM_LER_TO_LIP is defined as MSR_LER_TO_LIP in SDM. **/ -#define MSR_NEHALEM_LER_TO_LIP 0x000001DE - +#define MSR_NEHALEM_LER_TO_LIP 0x000001DE /** Core. Power Control Register. See http://biosbits.org. @@ -930,7 +914,7 @@ typedef union { @endcode @note MSR_NEHALEM_POWER_CTL is defined as MSR_POWER_CTL in SDM. **/ -#define MSR_NEHALEM_POWER_CTL 0x000001FC +#define MSR_NEHALEM_POWER_CTL 0x000001FC /** MSR information returned for MSR index #MSR_NEHALEM_POWER_CTL @@ -940,27 +924,26 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:1; + UINT32 Reserved1 : 1; /// /// [Bit 1] Package. C1E Enable (R/W) When set to '1', will enable the /// CPU to switch to the Minimum Enhanced Intel SpeedStep Technology /// operating point when all execution cores enter MWAIT (C1). /// - UINT32 C1EEnable:1; - UINT32 Reserved2:30; - UINT32 Reserved3:32; + UINT32 C1EEnable : 1; + UINT32 Reserved2 : 30; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_NEHALEM_POWER_CTL_REGISTER; - /** Thread. (RO). @@ -978,7 +961,7 @@ typedef union { @endcode @note MSR_NEHALEM_PERF_GLOBAL_STATUS is defined as MSR_PERF_GLOBAL_STATUS in SDM. **/ -#define MSR_NEHALEM_PERF_GLOBAL_STATUS 0x0000038E +#define MSR_NEHALEM_PERF_GLOBAL_STATUS 0x0000038E /** MSR information returned for MSR index #MSR_NEHALEM_PERF_GLOBAL_STATUS @@ -988,21 +971,20 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:32; - UINT32 Reserved2:29; + UINT32 Reserved1 : 32; + UINT32 Reserved2 : 29; /// /// [Bit 61] UNC_Ovf Uncore overflowed if 1. /// - UINT32 Ovf_Uncore:1; - UINT32 Reserved3:2; + UINT32 Ovf_Uncore : 1; + UINT32 Reserved3 : 2; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_NEHALEM_PERF_GLOBAL_STATUS_REGISTER; - /** Thread. (R/W). @@ -1021,7 +1003,7 @@ typedef union { @endcode @note MSR_NEHALEM_PERF_GLOBAL_OVF_CTRL is defined as MSR_PERF_GLOBAL_OVF_CTRL in SDM. **/ -#define MSR_NEHALEM_PERF_GLOBAL_OVF_CTRL 0x00000390 +#define MSR_NEHALEM_PERF_GLOBAL_OVF_CTRL 0x00000390 /** MSR information returned for MSR index #MSR_NEHALEM_PERF_GLOBAL_OVF_CTRL @@ -1031,21 +1013,20 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:32; - UINT32 Reserved2:29; + UINT32 Reserved1 : 32; + UINT32 Reserved2 : 29; /// /// [Bit 61] CLR_UNC_Ovf Set 1 to clear UNC_Ovf. /// - UINT32 Ovf_Uncore:1; - UINT32 Reserved3:2; + UINT32 Ovf_Uncore : 1; + UINT32 Reserved3 : 2; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_NEHALEM_PERF_GLOBAL_OVF_CTRL_REGISTER; - /** Thread. See Section 18.3.1.1.1, "Processor Event Based Sampling (PEBS).". @@ -1064,7 +1045,7 @@ typedef union { @endcode @note MSR_NEHALEM_PEBS_ENABLE is defined as MSR_PEBS_ENABLE in SDM. **/ -#define MSR_NEHALEM_PEBS_ENABLE 0x000003F1 +#define MSR_NEHALEM_PEBS_ENABLE 0x000003F1 /** MSR information returned for MSR index #MSR_NEHALEM_PEBS_ENABLE @@ -1077,45 +1058,44 @@ typedef union { /// /// [Bit 0] Enable PEBS on IA32_PMC0. (R/W). /// - UINT32 PEBS_EN_PMC0:1; + UINT32 PEBS_EN_PMC0 : 1; /// /// [Bit 1] Enable PEBS on IA32_PMC1. (R/W). /// - UINT32 PEBS_EN_PMC1:1; + UINT32 PEBS_EN_PMC1 : 1; /// /// [Bit 2] Enable PEBS on IA32_PMC2. (R/W). /// - UINT32 PEBS_EN_PMC2:1; + UINT32 PEBS_EN_PMC2 : 1; /// /// [Bit 3] Enable PEBS on IA32_PMC3. (R/W). /// - UINT32 PEBS_EN_PMC3:1; - UINT32 Reserved1:28; + UINT32 PEBS_EN_PMC3 : 1; + UINT32 Reserved1 : 28; /// /// [Bit 32] Enable Load Latency on IA32_PMC0. (R/W). /// - UINT32 LL_EN_PMC0:1; + UINT32 LL_EN_PMC0 : 1; /// /// [Bit 33] Enable Load Latency on IA32_PMC1. (R/W). /// - UINT32 LL_EN_PMC1:1; + UINT32 LL_EN_PMC1 : 1; /// /// [Bit 34] Enable Load Latency on IA32_PMC2. (R/W). /// - UINT32 LL_EN_PMC2:1; + UINT32 LL_EN_PMC2 : 1; /// /// [Bit 35] Enable Load Latency on IA32_PMC3. (R/W). /// - UINT32 LL_EN_PMC3:1; - UINT32 Reserved2:28; + UINT32 LL_EN_PMC3 : 1; + UINT32 Reserved2 : 28; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_NEHALEM_PEBS_ENABLE_REGISTER; - /** Thread. See Section 18.3.1.1.2, "Load Latency Performance Monitoring Facility.". @@ -1135,7 +1115,7 @@ typedef union { @endcode @note MSR_NEHALEM_PEBS_LD_LAT is defined as MSR_PEBS_LD_LAT in SDM. **/ -#define MSR_NEHALEM_PEBS_LD_LAT 0x000003F6 +#define MSR_NEHALEM_PEBS_LD_LAT 0x000003F6 /** MSR information returned for MSR index #MSR_NEHALEM_PEBS_LD_LAT @@ -1149,21 +1129,20 @@ typedef union { /// [Bits 15:0] Minimum threshold latency value of tagged load operation /// that will be counted. (R/W). /// - UINT32 MinimumThreshold:16; - UINT32 Reserved1:16; - UINT32 Reserved2:32; + UINT32 MinimumThreshold : 16; + UINT32 Reserved1 : 16; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_NEHALEM_PEBS_LD_LAT_REGISTER; - /** Package. Note: C-state values are processor specific C-state code names, unrelated to MWAIT extension C-state parameters or ACPI CStates. Package C3 @@ -1183,8 +1162,7 @@ typedef union { @endcode @note MSR_NEHALEM_PKG_C3_RESIDENCY is defined as MSR_PKG_C3_RESIDENCY in SDM. **/ -#define MSR_NEHALEM_PKG_C3_RESIDENCY 0x000003F8 - +#define MSR_NEHALEM_PKG_C3_RESIDENCY 0x000003F8 /** Package. Note: C-state values are processor specific C-state code names, @@ -1205,8 +1183,7 @@ typedef union { @endcode @note MSR_NEHALEM_PKG_C6_RESIDENCY is defined as MSR_PKG_C6_RESIDENCY in SDM. **/ -#define MSR_NEHALEM_PKG_C6_RESIDENCY 0x000003F9 - +#define MSR_NEHALEM_PKG_C6_RESIDENCY 0x000003F9 /** Package. Note: C-state values are processor specific C-state code names, @@ -1227,8 +1204,7 @@ typedef union { @endcode @note MSR_NEHALEM_PKG_C7_RESIDENCY is defined as MSR_PKG_C7_RESIDENCY in SDM. **/ -#define MSR_NEHALEM_PKG_C7_RESIDENCY 0x000003FA - +#define MSR_NEHALEM_PKG_C7_RESIDENCY 0x000003FA /** Core. Note: C-state values are processor specific C-state code names, @@ -1249,8 +1225,7 @@ typedef union { @endcode @note MSR_NEHALEM_CORE_C3_RESIDENCY is defined as MSR_CORE_C3_RESIDENCY in SDM. **/ -#define MSR_NEHALEM_CORE_C3_RESIDENCY 0x000003FC - +#define MSR_NEHALEM_CORE_C3_RESIDENCY 0x000003FC /** Core. Note: C-state values are processor specific C-state code names, @@ -1271,8 +1246,7 @@ typedef union { @endcode @note MSR_NEHALEM_CORE_C6_RESIDENCY is defined as MSR_CORE_C6_RESIDENCY in SDM. **/ -#define MSR_NEHALEM_CORE_C6_RESIDENCY 0x000003FD - +#define MSR_NEHALEM_CORE_C6_RESIDENCY 0x000003FD /** Thread. Last Branch Record n From IP (R/W) One of sixteen pairs of last @@ -1310,25 +1284,24 @@ typedef union { MSR_NEHALEM_LASTBRANCH_15_FROM_IP is defined as MSR_LASTBRANCH_15_FROM_IP in SDM. @{ **/ -#define MSR_NEHALEM_LASTBRANCH_0_FROM_IP 0x00000680 -#define MSR_NEHALEM_LASTBRANCH_1_FROM_IP 0x00000681 -#define MSR_NEHALEM_LASTBRANCH_2_FROM_IP 0x00000682 -#define MSR_NEHALEM_LASTBRANCH_3_FROM_IP 0x00000683 -#define MSR_NEHALEM_LASTBRANCH_4_FROM_IP 0x00000684 -#define MSR_NEHALEM_LASTBRANCH_5_FROM_IP 0x00000685 -#define MSR_NEHALEM_LASTBRANCH_6_FROM_IP 0x00000686 -#define MSR_NEHALEM_LASTBRANCH_7_FROM_IP 0x00000687 -#define MSR_NEHALEM_LASTBRANCH_8_FROM_IP 0x00000688 -#define MSR_NEHALEM_LASTBRANCH_9_FROM_IP 0x00000689 -#define MSR_NEHALEM_LASTBRANCH_10_FROM_IP 0x0000068A -#define MSR_NEHALEM_LASTBRANCH_11_FROM_IP 0x0000068B -#define MSR_NEHALEM_LASTBRANCH_12_FROM_IP 0x0000068C -#define MSR_NEHALEM_LASTBRANCH_13_FROM_IP 0x0000068D -#define MSR_NEHALEM_LASTBRANCH_14_FROM_IP 0x0000068E -#define MSR_NEHALEM_LASTBRANCH_15_FROM_IP 0x0000068F +#define MSR_NEHALEM_LASTBRANCH_0_FROM_IP 0x00000680 +#define MSR_NEHALEM_LASTBRANCH_1_FROM_IP 0x00000681 +#define MSR_NEHALEM_LASTBRANCH_2_FROM_IP 0x00000682 +#define MSR_NEHALEM_LASTBRANCH_3_FROM_IP 0x00000683 +#define MSR_NEHALEM_LASTBRANCH_4_FROM_IP 0x00000684 +#define MSR_NEHALEM_LASTBRANCH_5_FROM_IP 0x00000685 +#define MSR_NEHALEM_LASTBRANCH_6_FROM_IP 0x00000686 +#define MSR_NEHALEM_LASTBRANCH_7_FROM_IP 0x00000687 +#define MSR_NEHALEM_LASTBRANCH_8_FROM_IP 0x00000688 +#define MSR_NEHALEM_LASTBRANCH_9_FROM_IP 0x00000689 +#define MSR_NEHALEM_LASTBRANCH_10_FROM_IP 0x0000068A +#define MSR_NEHALEM_LASTBRANCH_11_FROM_IP 0x0000068B +#define MSR_NEHALEM_LASTBRANCH_12_FROM_IP 0x0000068C +#define MSR_NEHALEM_LASTBRANCH_13_FROM_IP 0x0000068D +#define MSR_NEHALEM_LASTBRANCH_14_FROM_IP 0x0000068E +#define MSR_NEHALEM_LASTBRANCH_15_FROM_IP 0x0000068F /// @} - /** Thread. Last Branch Record n To IP (R/W) One of sixteen pairs of last branch record registers on the last branch record stack. This part of the stack @@ -1363,25 +1336,24 @@ typedef union { MSR_NEHALEM_LASTBRANCH_15_TO_IP is defined as MSR_LASTBRANCH_15_TO_IP in SDM. @{ **/ -#define MSR_NEHALEM_LASTBRANCH_0_TO_IP 0x000006C0 -#define MSR_NEHALEM_LASTBRANCH_1_TO_IP 0x000006C1 -#define MSR_NEHALEM_LASTBRANCH_2_TO_IP 0x000006C2 -#define MSR_NEHALEM_LASTBRANCH_3_TO_IP 0x000006C3 -#define MSR_NEHALEM_LASTBRANCH_4_TO_IP 0x000006C4 -#define MSR_NEHALEM_LASTBRANCH_5_TO_IP 0x000006C5 -#define MSR_NEHALEM_LASTBRANCH_6_TO_IP 0x000006C6 -#define MSR_NEHALEM_LASTBRANCH_7_TO_IP 0x000006C7 -#define MSR_NEHALEM_LASTBRANCH_8_TO_IP 0x000006C8 -#define MSR_NEHALEM_LASTBRANCH_9_TO_IP 0x000006C9 -#define MSR_NEHALEM_LASTBRANCH_10_TO_IP 0x000006CA -#define MSR_NEHALEM_LASTBRANCH_11_TO_IP 0x000006CB -#define MSR_NEHALEM_LASTBRANCH_12_TO_IP 0x000006CC -#define MSR_NEHALEM_LASTBRANCH_13_TO_IP 0x000006CD -#define MSR_NEHALEM_LASTBRANCH_14_TO_IP 0x000006CE -#define MSR_NEHALEM_LASTBRANCH_15_TO_IP 0x000006CF +#define MSR_NEHALEM_LASTBRANCH_0_TO_IP 0x000006C0 +#define MSR_NEHALEM_LASTBRANCH_1_TO_IP 0x000006C1 +#define MSR_NEHALEM_LASTBRANCH_2_TO_IP 0x000006C2 +#define MSR_NEHALEM_LASTBRANCH_3_TO_IP 0x000006C3 +#define MSR_NEHALEM_LASTBRANCH_4_TO_IP 0x000006C4 +#define MSR_NEHALEM_LASTBRANCH_5_TO_IP 0x000006C5 +#define MSR_NEHALEM_LASTBRANCH_6_TO_IP 0x000006C6 +#define MSR_NEHALEM_LASTBRANCH_7_TO_IP 0x000006C7 +#define MSR_NEHALEM_LASTBRANCH_8_TO_IP 0x000006C8 +#define MSR_NEHALEM_LASTBRANCH_9_TO_IP 0x000006C9 +#define MSR_NEHALEM_LASTBRANCH_10_TO_IP 0x000006CA +#define MSR_NEHALEM_LASTBRANCH_11_TO_IP 0x000006CB +#define MSR_NEHALEM_LASTBRANCH_12_TO_IP 0x000006CC +#define MSR_NEHALEM_LASTBRANCH_13_TO_IP 0x000006CD +#define MSR_NEHALEM_LASTBRANCH_14_TO_IP 0x000006CE +#define MSR_NEHALEM_LASTBRANCH_15_TO_IP 0x000006CF /// @} - /** Package. @@ -1400,7 +1372,7 @@ typedef union { @endcode @note MSR_NEHALEM_GQ_SNOOP_MESF is defined as MSR_GQ_SNOOP_MESF in SDM. **/ -#define MSR_NEHALEM_GQ_SNOOP_MESF 0x00000301 +#define MSR_NEHALEM_GQ_SNOOP_MESF 0x00000301 /** MSR information returned for MSR index #MSR_NEHALEM_GQ_SNOOP_MESF @@ -1413,49 +1385,48 @@ typedef union { /// /// [Bit 0] From M to S (R/W). /// - UINT32 FromMtoS:1; + UINT32 FromMtoS : 1; /// /// [Bit 1] From E to S (R/W). /// - UINT32 FromEtoS:1; + UINT32 FromEtoS : 1; /// /// [Bit 2] From S to S (R/W). /// - UINT32 FromStoS:1; + UINT32 FromStoS : 1; /// /// [Bit 3] From F to S (R/W). /// - UINT32 FromFtoS:1; + UINT32 FromFtoS : 1; /// /// [Bit 4] From M to I (R/W). /// - UINT32 FromMtoI:1; + UINT32 FromMtoI : 1; /// /// [Bit 5] From E to I (R/W). /// - UINT32 FromEtoI:1; + UINT32 FromEtoI : 1; /// /// [Bit 6] From S to I (R/W). /// - UINT32 FromStoI:1; + UINT32 FromStoI : 1; /// /// [Bit 7] From F to I (R/W). /// - UINT32 FromFtoI:1; - UINT32 Reserved1:24; - UINT32 Reserved2:32; + UINT32 FromFtoI : 1; + UINT32 Reserved1 : 24; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_NEHALEM_GQ_SNOOP_MESF_REGISTER; - /** Package. See Section 18.3.1.2.1, "Uncore Performance Monitoring Management Facility.". @@ -1473,8 +1444,7 @@ typedef union { @endcode @note MSR_NEHALEM_UNCORE_PERF_GLOBAL_CTRL is defined as MSR_UNCORE_PERF_GLOBAL_CTRL in SDM. **/ -#define MSR_NEHALEM_UNCORE_PERF_GLOBAL_CTRL 0x00000391 - +#define MSR_NEHALEM_UNCORE_PERF_GLOBAL_CTRL 0x00000391 /** Package. See Section 18.3.1.2.1, "Uncore Performance Monitoring Management @@ -1493,8 +1463,7 @@ typedef union { @endcode @note MSR_NEHALEM_UNCORE_PERF_GLOBAL_STATUS is defined as MSR_UNCORE_PERF_GLOBAL_STATUS in SDM. **/ -#define MSR_NEHALEM_UNCORE_PERF_GLOBAL_STATUS 0x00000392 - +#define MSR_NEHALEM_UNCORE_PERF_GLOBAL_STATUS 0x00000392 /** Package. See Section 18.3.1.2.1, "Uncore Performance Monitoring Management @@ -1515,7 +1484,6 @@ typedef union { **/ #define MSR_NEHALEM_UNCORE_PERF_GLOBAL_OVF_CTRL 0x00000393 - /** Package. See Section 18.3.1.2.1, "Uncore Performance Monitoring Management Facility.". @@ -1533,8 +1501,7 @@ typedef union { @endcode @note MSR_NEHALEM_UNCORE_FIXED_CTR0 is defined as MSR_UNCORE_FIXED_CTR0 in SDM. **/ -#define MSR_NEHALEM_UNCORE_FIXED_CTR0 0x00000394 - +#define MSR_NEHALEM_UNCORE_FIXED_CTR0 0x00000394 /** Package. See Section 18.3.1.2.1, "Uncore Performance Monitoring Management @@ -1553,8 +1520,7 @@ typedef union { @endcode @note MSR_NEHALEM_UNCORE_FIXED_CTR_CTRL is defined as MSR_UNCORE_FIXED_CTR_CTRL in SDM. **/ -#define MSR_NEHALEM_UNCORE_FIXED_CTR_CTRL 0x00000395 - +#define MSR_NEHALEM_UNCORE_FIXED_CTR_CTRL 0x00000395 /** Package. See Section 18.3.1.2.3, "Uncore Address/Opcode Match MSR.". @@ -1572,8 +1538,7 @@ typedef union { @endcode @note MSR_NEHALEM_UNCORE_ADDR_OPCODE_MATCH is defined as MSR_UNCORE_ADDR_OPCODE_MATCH in SDM. **/ -#define MSR_NEHALEM_UNCORE_ADDR_OPCODE_MATCH 0x00000396 - +#define MSR_NEHALEM_UNCORE_ADDR_OPCODE_MATCH 0x00000396 /** Package. See Section 18.3.1.2.2, "Uncore Performance Event Configuration @@ -1600,14 +1565,14 @@ typedef union { MSR_NEHALEM_UNCORE_PMC7 is defined as MSR_UNCORE_PMC7 in SDM. @{ **/ -#define MSR_NEHALEM_UNCORE_PMC0 0x000003B0 -#define MSR_NEHALEM_UNCORE_PMC1 0x000003B1 -#define MSR_NEHALEM_UNCORE_PMC2 0x000003B2 -#define MSR_NEHALEM_UNCORE_PMC3 0x000003B3 -#define MSR_NEHALEM_UNCORE_PMC4 0x000003B4 -#define MSR_NEHALEM_UNCORE_PMC5 0x000003B5 -#define MSR_NEHALEM_UNCORE_PMC6 0x000003B6 -#define MSR_NEHALEM_UNCORE_PMC7 0x000003B7 +#define MSR_NEHALEM_UNCORE_PMC0 0x000003B0 +#define MSR_NEHALEM_UNCORE_PMC1 0x000003B1 +#define MSR_NEHALEM_UNCORE_PMC2 0x000003B2 +#define MSR_NEHALEM_UNCORE_PMC3 0x000003B3 +#define MSR_NEHALEM_UNCORE_PMC4 0x000003B4 +#define MSR_NEHALEM_UNCORE_PMC5 0x000003B5 +#define MSR_NEHALEM_UNCORE_PMC6 0x000003B6 +#define MSR_NEHALEM_UNCORE_PMC7 0x000003B7 /// @} /** @@ -1635,17 +1600,16 @@ typedef union { MSR_NEHALEM_UNCORE_PERFEVTSEL7 is defined as MSR_UNCORE_PERFEVTSEL7 in SDM. @{ **/ -#define MSR_NEHALEM_UNCORE_PERFEVTSEL0 0x000003C0 -#define MSR_NEHALEM_UNCORE_PERFEVTSEL1 0x000003C1 -#define MSR_NEHALEM_UNCORE_PERFEVTSEL2 0x000003C2 -#define MSR_NEHALEM_UNCORE_PERFEVTSEL3 0x000003C3 -#define MSR_NEHALEM_UNCORE_PERFEVTSEL4 0x000003C4 -#define MSR_NEHALEM_UNCORE_PERFEVTSEL5 0x000003C5 -#define MSR_NEHALEM_UNCORE_PERFEVTSEL6 0x000003C6 -#define MSR_NEHALEM_UNCORE_PERFEVTSEL7 0x000003C7 +#define MSR_NEHALEM_UNCORE_PERFEVTSEL0 0x000003C0 +#define MSR_NEHALEM_UNCORE_PERFEVTSEL1 0x000003C1 +#define MSR_NEHALEM_UNCORE_PERFEVTSEL2 0x000003C2 +#define MSR_NEHALEM_UNCORE_PERFEVTSEL3 0x000003C3 +#define MSR_NEHALEM_UNCORE_PERFEVTSEL4 0x000003C4 +#define MSR_NEHALEM_UNCORE_PERFEVTSEL5 0x000003C5 +#define MSR_NEHALEM_UNCORE_PERFEVTSEL6 0x000003C6 +#define MSR_NEHALEM_UNCORE_PERFEVTSEL7 0x000003C7 /// @} - /** Package. Uncore W-box perfmon fixed counter. @@ -1662,8 +1626,7 @@ typedef union { @endcode @note MSR_NEHALEM_W_PMON_FIXED_CTR is defined as MSR_W_PMON_FIXED_CTR in SDM. **/ -#define MSR_NEHALEM_W_PMON_FIXED_CTR 0x00000394 - +#define MSR_NEHALEM_W_PMON_FIXED_CTR 0x00000394 /** Package. Uncore U-box perfmon fixed counter control MSR. @@ -1681,8 +1644,7 @@ typedef union { @endcode @note MSR_NEHALEM_W_PMON_FIXED_CTR_CTL is defined as MSR_W_PMON_FIXED_CTR_CTL in SDM. **/ -#define MSR_NEHALEM_W_PMON_FIXED_CTR_CTL 0x00000395 - +#define MSR_NEHALEM_W_PMON_FIXED_CTR_CTL 0x00000395 /** Package. Uncore U-box perfmon global control MSR. @@ -1700,8 +1662,7 @@ typedef union { @endcode @note MSR_NEHALEM_U_PMON_GLOBAL_CTRL is defined as MSR_U_PMON_GLOBAL_CTRL in SDM. **/ -#define MSR_NEHALEM_U_PMON_GLOBAL_CTRL 0x00000C00 - +#define MSR_NEHALEM_U_PMON_GLOBAL_CTRL 0x00000C00 /** Package. Uncore U-box perfmon global status MSR. @@ -1719,8 +1680,7 @@ typedef union { @endcode @note MSR_NEHALEM_U_PMON_GLOBAL_STATUS is defined as MSR_U_PMON_GLOBAL_STATUS in SDM. **/ -#define MSR_NEHALEM_U_PMON_GLOBAL_STATUS 0x00000C01 - +#define MSR_NEHALEM_U_PMON_GLOBAL_STATUS 0x00000C01 /** Package. Uncore U-box perfmon global overflow control MSR. @@ -1738,8 +1698,7 @@ typedef union { @endcode @note MSR_NEHALEM_U_PMON_GLOBAL_OVF_CTRL is defined as MSR_U_PMON_GLOBAL_OVF_CTRL in SDM. **/ -#define MSR_NEHALEM_U_PMON_GLOBAL_OVF_CTRL 0x00000C02 - +#define MSR_NEHALEM_U_PMON_GLOBAL_OVF_CTRL 0x00000C02 /** Package. Uncore U-box perfmon event select MSR. @@ -1757,8 +1716,7 @@ typedef union { @endcode @note MSR_NEHALEM_U_PMON_EVNT_SEL is defined as MSR_U_PMON_EVNT_SEL in SDM. **/ -#define MSR_NEHALEM_U_PMON_EVNT_SEL 0x00000C10 - +#define MSR_NEHALEM_U_PMON_EVNT_SEL 0x00000C10 /** Package. Uncore U-box perfmon counter MSR. @@ -1776,8 +1734,7 @@ typedef union { @endcode @note MSR_NEHALEM_U_PMON_CTR is defined as MSR_U_PMON_CTR in SDM. **/ -#define MSR_NEHALEM_U_PMON_CTR 0x00000C11 - +#define MSR_NEHALEM_U_PMON_CTR 0x00000C11 /** Package. Uncore B-box 0 perfmon local box control MSR. @@ -1795,8 +1752,7 @@ typedef union { @endcode @note MSR_NEHALEM_B0_PMON_BOX_CTRL is defined as MSR_B0_PMON_BOX_CTRL in SDM. **/ -#define MSR_NEHALEM_B0_PMON_BOX_CTRL 0x00000C20 - +#define MSR_NEHALEM_B0_PMON_BOX_CTRL 0x00000C20 /** Package. Uncore B-box 0 perfmon local box status MSR. @@ -1814,8 +1770,7 @@ typedef union { @endcode @note MSR_NEHALEM_B0_PMON_BOX_STATUS is defined as MSR_B0_PMON_BOX_STATUS in SDM. **/ -#define MSR_NEHALEM_B0_PMON_BOX_STATUS 0x00000C21 - +#define MSR_NEHALEM_B0_PMON_BOX_STATUS 0x00000C21 /** Package. Uncore B-box 0 perfmon local box overflow control MSR. @@ -1833,8 +1788,7 @@ typedef union { @endcode @note MSR_NEHALEM_B0_PMON_BOX_OVF_CTRL is defined as MSR_B0_PMON_BOX_OVF_CTRL in SDM. **/ -#define MSR_NEHALEM_B0_PMON_BOX_OVF_CTRL 0x00000C22 - +#define MSR_NEHALEM_B0_PMON_BOX_OVF_CTRL 0x00000C22 /** Package. Uncore B-box 0 perfmon event select MSR. @@ -1852,8 +1806,7 @@ typedef union { @endcode @note MSR_NEHALEM_B0_PMON_EVNT_SEL0 is defined as MSR_B0_PMON_EVNT_SEL0 in SDM. **/ -#define MSR_NEHALEM_B0_PMON_EVNT_SEL0 0x00000C30 - +#define MSR_NEHALEM_B0_PMON_EVNT_SEL0 0x00000C30 /** Package. Uncore B-box 0 perfmon counter MSR. @@ -1871,8 +1824,7 @@ typedef union { @endcode @note MSR_NEHALEM_B0_PMON_CTR0 is defined as MSR_B0_PMON_CTR0 in SDM. **/ -#define MSR_NEHALEM_B0_PMON_CTR0 0x00000C31 - +#define MSR_NEHALEM_B0_PMON_CTR0 0x00000C31 /** Package. Uncore B-box 0 perfmon event select MSR. @@ -1890,8 +1842,7 @@ typedef union { @endcode @note MSR_NEHALEM_B0_PMON_EVNT_SEL1 is defined as MSR_B0_PMON_EVNT_SEL1 in SDM. **/ -#define MSR_NEHALEM_B0_PMON_EVNT_SEL1 0x00000C32 - +#define MSR_NEHALEM_B0_PMON_EVNT_SEL1 0x00000C32 /** Package. Uncore B-box 0 perfmon counter MSR. @@ -1909,8 +1860,7 @@ typedef union { @endcode @note MSR_NEHALEM_B0_PMON_CTR1 is defined as MSR_B0_PMON_CTR1 in SDM. **/ -#define MSR_NEHALEM_B0_PMON_CTR1 0x00000C33 - +#define MSR_NEHALEM_B0_PMON_CTR1 0x00000C33 /** Package. Uncore B-box 0 perfmon event select MSR. @@ -1928,8 +1878,7 @@ typedef union { @endcode @note MSR_NEHALEM_B0_PMON_EVNT_SEL2 is defined as MSR_B0_PMON_EVNT_SEL2 in SDM. **/ -#define MSR_NEHALEM_B0_PMON_EVNT_SEL2 0x00000C34 - +#define MSR_NEHALEM_B0_PMON_EVNT_SEL2 0x00000C34 /** Package. Uncore B-box 0 perfmon counter MSR. @@ -1947,8 +1896,7 @@ typedef union { @endcode @note MSR_NEHALEM_B0_PMON_CTR2 is defined as MSR_B0_PMON_CTR2 in SDM. **/ -#define MSR_NEHALEM_B0_PMON_CTR2 0x00000C35 - +#define MSR_NEHALEM_B0_PMON_CTR2 0x00000C35 /** Package. Uncore B-box 0 perfmon event select MSR. @@ -1966,8 +1914,7 @@ typedef union { @endcode @note MSR_NEHALEM_B0_PMON_EVNT_SEL3 is defined as MSR_B0_PMON_EVNT_SEL3 in SDM. **/ -#define MSR_NEHALEM_B0_PMON_EVNT_SEL3 0x00000C36 - +#define MSR_NEHALEM_B0_PMON_EVNT_SEL3 0x00000C36 /** Package. Uncore B-box 0 perfmon counter MSR. @@ -1985,8 +1932,7 @@ typedef union { @endcode @note MSR_NEHALEM_B0_PMON_CTR3 is defined as MSR_B0_PMON_CTR3 in SDM. **/ -#define MSR_NEHALEM_B0_PMON_CTR3 0x00000C37 - +#define MSR_NEHALEM_B0_PMON_CTR3 0x00000C37 /** Package. Uncore S-box 0 perfmon local box control MSR. @@ -2004,8 +1950,7 @@ typedef union { @endcode @note MSR_NEHALEM_S0_PMON_BOX_CTRL is defined as MSR_S0_PMON_BOX_CTRL in SDM. **/ -#define MSR_NEHALEM_S0_PMON_BOX_CTRL 0x00000C40 - +#define MSR_NEHALEM_S0_PMON_BOX_CTRL 0x00000C40 /** Package. Uncore S-box 0 perfmon local box status MSR. @@ -2023,8 +1968,7 @@ typedef union { @endcode @note MSR_NEHALEM_S0_PMON_BOX_STATUS is defined as MSR_S0_PMON_BOX_STATUS in SDM. **/ -#define MSR_NEHALEM_S0_PMON_BOX_STATUS 0x00000C41 - +#define MSR_NEHALEM_S0_PMON_BOX_STATUS 0x00000C41 /** Package. Uncore S-box 0 perfmon local box overflow control MSR. @@ -2042,8 +1986,7 @@ typedef union { @endcode @note MSR_NEHALEM_S0_PMON_BOX_OVF_CTRL is defined as MSR_S0_PMON_BOX_OVF_CTRL in SDM. **/ -#define MSR_NEHALEM_S0_PMON_BOX_OVF_CTRL 0x00000C42 - +#define MSR_NEHALEM_S0_PMON_BOX_OVF_CTRL 0x00000C42 /** Package. Uncore S-box 0 perfmon event select MSR. @@ -2061,8 +2004,7 @@ typedef union { @endcode @note MSR_NEHALEM_S0_PMON_EVNT_SEL0 is defined as MSR_S0_PMON_EVNT_SEL0 in SDM. **/ -#define MSR_NEHALEM_S0_PMON_EVNT_SEL0 0x00000C50 - +#define MSR_NEHALEM_S0_PMON_EVNT_SEL0 0x00000C50 /** Package. Uncore S-box 0 perfmon counter MSR. @@ -2080,8 +2022,7 @@ typedef union { @endcode @note MSR_NEHALEM_S0_PMON_CTR0 is defined as MSR_S0_PMON_CTR0 in SDM. **/ -#define MSR_NEHALEM_S0_PMON_CTR0 0x00000C51 - +#define MSR_NEHALEM_S0_PMON_CTR0 0x00000C51 /** Package. Uncore S-box 0 perfmon event select MSR. @@ -2099,8 +2040,7 @@ typedef union { @endcode @note MSR_NEHALEM_S0_PMON_EVNT_SEL1 is defined as MSR_S0_PMON_EVNT_SEL1 in SDM. **/ -#define MSR_NEHALEM_S0_PMON_EVNT_SEL1 0x00000C52 - +#define MSR_NEHALEM_S0_PMON_EVNT_SEL1 0x00000C52 /** Package. Uncore S-box 0 perfmon counter MSR. @@ -2118,8 +2058,7 @@ typedef union { @endcode @note MSR_NEHALEM_S0_PMON_CTR1 is defined as MSR_S0_PMON_CTR1 in SDM. **/ -#define MSR_NEHALEM_S0_PMON_CTR1 0x00000C53 - +#define MSR_NEHALEM_S0_PMON_CTR1 0x00000C53 /** Package. Uncore S-box 0 perfmon event select MSR. @@ -2137,8 +2076,7 @@ typedef union { @endcode @note MSR_NEHALEM_S0_PMON_EVNT_SEL2 is defined as MSR_S0_PMON_EVNT_SEL2 in SDM. **/ -#define MSR_NEHALEM_S0_PMON_EVNT_SEL2 0x00000C54 - +#define MSR_NEHALEM_S0_PMON_EVNT_SEL2 0x00000C54 /** Package. Uncore S-box 0 perfmon counter MSR. @@ -2156,8 +2094,7 @@ typedef union { @endcode @note MSR_NEHALEM_S0_PMON_CTR2 is defined as MSR_S0_PMON_CTR2 in SDM. **/ -#define MSR_NEHALEM_S0_PMON_CTR2 0x00000C55 - +#define MSR_NEHALEM_S0_PMON_CTR2 0x00000C55 /** Package. Uncore S-box 0 perfmon event select MSR. @@ -2175,8 +2112,7 @@ typedef union { @endcode @note MSR_NEHALEM_S0_PMON_EVNT_SEL3 is defined as MSR_S0_PMON_EVNT_SEL3 in SDM. **/ -#define MSR_NEHALEM_S0_PMON_EVNT_SEL3 0x00000C56 - +#define MSR_NEHALEM_S0_PMON_EVNT_SEL3 0x00000C56 /** Package. Uncore S-box 0 perfmon counter MSR. @@ -2194,8 +2130,7 @@ typedef union { @endcode @note MSR_NEHALEM_S0_PMON_CTR3 is defined as MSR_S0_PMON_CTR3 in SDM. **/ -#define MSR_NEHALEM_S0_PMON_CTR3 0x00000C57 - +#define MSR_NEHALEM_S0_PMON_CTR3 0x00000C57 /** Package. Uncore B-box 1 perfmon local box control MSR. @@ -2213,8 +2148,7 @@ typedef union { @endcode @note MSR_NEHALEM_B1_PMON_BOX_CTRL is defined as MSR_B1_PMON_BOX_CTRL in SDM. **/ -#define MSR_NEHALEM_B1_PMON_BOX_CTRL 0x00000C60 - +#define MSR_NEHALEM_B1_PMON_BOX_CTRL 0x00000C60 /** Package. Uncore B-box 1 perfmon local box status MSR. @@ -2232,8 +2166,7 @@ typedef union { @endcode @note MSR_NEHALEM_B1_PMON_BOX_STATUS is defined as MSR_B1_PMON_BOX_STATUS in SDM. **/ -#define MSR_NEHALEM_B1_PMON_BOX_STATUS 0x00000C61 - +#define MSR_NEHALEM_B1_PMON_BOX_STATUS 0x00000C61 /** Package. Uncore B-box 1 perfmon local box overflow control MSR. @@ -2251,8 +2184,7 @@ typedef union { @endcode @note MSR_NEHALEM_B1_PMON_BOX_OVF_CTRL is defined as MSR_B1_PMON_BOX_OVF_CTRL in SDM. **/ -#define MSR_NEHALEM_B1_PMON_BOX_OVF_CTRL 0x00000C62 - +#define MSR_NEHALEM_B1_PMON_BOX_OVF_CTRL 0x00000C62 /** Package. Uncore B-box 1 perfmon event select MSR. @@ -2270,8 +2202,7 @@ typedef union { @endcode @note MSR_NEHALEM_B1_PMON_EVNT_SEL0 is defined as MSR_B1_PMON_EVNT_SEL0 in SDM. **/ -#define MSR_NEHALEM_B1_PMON_EVNT_SEL0 0x00000C70 - +#define MSR_NEHALEM_B1_PMON_EVNT_SEL0 0x00000C70 /** Package. Uncore B-box 1 perfmon counter MSR. @@ -2289,8 +2220,7 @@ typedef union { @endcode @note MSR_NEHALEM_B1_PMON_CTR0 is defined as MSR_B1_PMON_CTR0 in SDM. **/ -#define MSR_NEHALEM_B1_PMON_CTR0 0x00000C71 - +#define MSR_NEHALEM_B1_PMON_CTR0 0x00000C71 /** Package. Uncore B-box 1 perfmon event select MSR. @@ -2308,8 +2238,7 @@ typedef union { @endcode @note MSR_NEHALEM_B1_PMON_EVNT_SEL1 is defined as MSR_B1_PMON_EVNT_SEL1 in SDM. **/ -#define MSR_NEHALEM_B1_PMON_EVNT_SEL1 0x00000C72 - +#define MSR_NEHALEM_B1_PMON_EVNT_SEL1 0x00000C72 /** Package. Uncore B-box 1 perfmon counter MSR. @@ -2327,8 +2256,7 @@ typedef union { @endcode @note MSR_NEHALEM_B1_PMON_CTR1 is defined as MSR_B1_PMON_CTR1 in SDM. **/ -#define MSR_NEHALEM_B1_PMON_CTR1 0x00000C73 - +#define MSR_NEHALEM_B1_PMON_CTR1 0x00000C73 /** Package. Uncore B-box 1 perfmon event select MSR. @@ -2346,8 +2274,7 @@ typedef union { @endcode @note MSR_NEHALEM_B1_PMON_EVNT_SEL2 is defined as MSR_B1_PMON_EVNT_SEL2 in SDM. **/ -#define MSR_NEHALEM_B1_PMON_EVNT_SEL2 0x00000C74 - +#define MSR_NEHALEM_B1_PMON_EVNT_SEL2 0x00000C74 /** Package. Uncore B-box 1 perfmon counter MSR. @@ -2365,8 +2292,7 @@ typedef union { @endcode @note MSR_NEHALEM_B1_PMON_CTR2 is defined as MSR_B1_PMON_CTR2 in SDM. **/ -#define MSR_NEHALEM_B1_PMON_CTR2 0x00000C75 - +#define MSR_NEHALEM_B1_PMON_CTR2 0x00000C75 /** Package. Uncore B-box 1vperfmon event select MSR. @@ -2384,8 +2310,7 @@ typedef union { @endcode @note MSR_NEHALEM_B1_PMON_EVNT_SEL3 is defined as MSR_B1_PMON_EVNT_SEL3 in SDM. **/ -#define MSR_NEHALEM_B1_PMON_EVNT_SEL3 0x00000C76 - +#define MSR_NEHALEM_B1_PMON_EVNT_SEL3 0x00000C76 /** Package. Uncore B-box 1 perfmon counter MSR. @@ -2403,8 +2328,7 @@ typedef union { @endcode @note MSR_NEHALEM_B1_PMON_CTR3 is defined as MSR_B1_PMON_CTR3 in SDM. **/ -#define MSR_NEHALEM_B1_PMON_CTR3 0x00000C77 - +#define MSR_NEHALEM_B1_PMON_CTR3 0x00000C77 /** Package. Uncore W-box perfmon local box control MSR. @@ -2422,8 +2346,7 @@ typedef union { @endcode @note MSR_NEHALEM_W_PMON_BOX_CTRL is defined as MSR_W_PMON_BOX_CTRL in SDM. **/ -#define MSR_NEHALEM_W_PMON_BOX_CTRL 0x00000C80 - +#define MSR_NEHALEM_W_PMON_BOX_CTRL 0x00000C80 /** Package. Uncore W-box perfmon local box status MSR. @@ -2441,8 +2364,7 @@ typedef union { @endcode @note MSR_NEHALEM_W_PMON_BOX_STATUS is defined as MSR_W_PMON_BOX_STATUS in SDM. **/ -#define MSR_NEHALEM_W_PMON_BOX_STATUS 0x00000C81 - +#define MSR_NEHALEM_W_PMON_BOX_STATUS 0x00000C81 /** Package. Uncore W-box perfmon local box overflow control MSR. @@ -2460,8 +2382,7 @@ typedef union { @endcode @note MSR_NEHALEM_W_PMON_BOX_OVF_CTRL is defined as MSR_W_PMON_BOX_OVF_CTRL in SDM. **/ -#define MSR_NEHALEM_W_PMON_BOX_OVF_CTRL 0x00000C82 - +#define MSR_NEHALEM_W_PMON_BOX_OVF_CTRL 0x00000C82 /** Package. Uncore W-box perfmon event select MSR. @@ -2479,8 +2400,7 @@ typedef union { @endcode @note MSR_NEHALEM_W_PMON_EVNT_SEL0 is defined as MSR_W_PMON_EVNT_SEL0 in SDM. **/ -#define MSR_NEHALEM_W_PMON_EVNT_SEL0 0x00000C90 - +#define MSR_NEHALEM_W_PMON_EVNT_SEL0 0x00000C90 /** Package. Uncore W-box perfmon counter MSR. @@ -2498,8 +2418,7 @@ typedef union { @endcode @note MSR_NEHALEM_W_PMON_CTR0 is defined as MSR_W_PMON_CTR0 in SDM. **/ -#define MSR_NEHALEM_W_PMON_CTR0 0x00000C91 - +#define MSR_NEHALEM_W_PMON_CTR0 0x00000C91 /** Package. Uncore W-box perfmon event select MSR. @@ -2517,8 +2436,7 @@ typedef union { @endcode @note MSR_NEHALEM_W_PMON_EVNT_SEL1 is defined as MSR_W_PMON_EVNT_SEL1 in SDM. **/ -#define MSR_NEHALEM_W_PMON_EVNT_SEL1 0x00000C92 - +#define MSR_NEHALEM_W_PMON_EVNT_SEL1 0x00000C92 /** Package. Uncore W-box perfmon counter MSR. @@ -2536,8 +2454,7 @@ typedef union { @endcode @note MSR_NEHALEM_W_PMON_CTR1 is defined as MSR_W_PMON_CTR1 in SDM. **/ -#define MSR_NEHALEM_W_PMON_CTR1 0x00000C93 - +#define MSR_NEHALEM_W_PMON_CTR1 0x00000C93 /** Package. Uncore W-box perfmon event select MSR. @@ -2555,8 +2472,7 @@ typedef union { @endcode @note MSR_NEHALEM_W_PMON_EVNT_SEL2 is defined as MSR_W_PMON_EVNT_SEL2 in SDM. **/ -#define MSR_NEHALEM_W_PMON_EVNT_SEL2 0x00000C94 - +#define MSR_NEHALEM_W_PMON_EVNT_SEL2 0x00000C94 /** Package. Uncore W-box perfmon counter MSR. @@ -2574,8 +2490,7 @@ typedef union { @endcode @note MSR_NEHALEM_W_PMON_CTR2 is defined as MSR_W_PMON_CTR2 in SDM. **/ -#define MSR_NEHALEM_W_PMON_CTR2 0x00000C95 - +#define MSR_NEHALEM_W_PMON_CTR2 0x00000C95 /** Package. Uncore W-box perfmon event select MSR. @@ -2593,8 +2508,7 @@ typedef union { @endcode @note MSR_NEHALEM_W_PMON_EVNT_SEL3 is defined as MSR_W_PMON_EVNT_SEL3 in SDM. **/ -#define MSR_NEHALEM_W_PMON_EVNT_SEL3 0x00000C96 - +#define MSR_NEHALEM_W_PMON_EVNT_SEL3 0x00000C96 /** Package. Uncore W-box perfmon counter MSR. @@ -2612,8 +2526,7 @@ typedef union { @endcode @note MSR_NEHALEM_W_PMON_CTR3 is defined as MSR_W_PMON_CTR3 in SDM. **/ -#define MSR_NEHALEM_W_PMON_CTR3 0x00000C97 - +#define MSR_NEHALEM_W_PMON_CTR3 0x00000C97 /** Package. Uncore M-box 0 perfmon local box control MSR. @@ -2631,8 +2544,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_BOX_CTRL is defined as MSR_M0_PMON_BOX_CTRL in SDM. **/ -#define MSR_NEHALEM_M0_PMON_BOX_CTRL 0x00000CA0 - +#define MSR_NEHALEM_M0_PMON_BOX_CTRL 0x00000CA0 /** Package. Uncore M-box 0 perfmon local box status MSR. @@ -2650,8 +2562,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_BOX_STATUS is defined as MSR_M0_PMON_BOX_STATUS in SDM. **/ -#define MSR_NEHALEM_M0_PMON_BOX_STATUS 0x00000CA1 - +#define MSR_NEHALEM_M0_PMON_BOX_STATUS 0x00000CA1 /** Package. Uncore M-box 0 perfmon local box overflow control MSR. @@ -2669,8 +2580,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_BOX_OVF_CTRL is defined as MSR_M0_PMON_BOX_OVF_CTRL in SDM. **/ -#define MSR_NEHALEM_M0_PMON_BOX_OVF_CTRL 0x00000CA2 - +#define MSR_NEHALEM_M0_PMON_BOX_OVF_CTRL 0x00000CA2 /** Package. Uncore M-box 0 perfmon time stamp unit select MSR. @@ -2688,8 +2598,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_TIMESTAMP is defined as MSR_M0_PMON_TIMESTAMP in SDM. **/ -#define MSR_NEHALEM_M0_PMON_TIMESTAMP 0x00000CA4 - +#define MSR_NEHALEM_M0_PMON_TIMESTAMP 0x00000CA4 /** Package. Uncore M-box 0 perfmon DSP unit select MSR. @@ -2707,8 +2616,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_DSP is defined as MSR_M0_PMON_DSP in SDM. **/ -#define MSR_NEHALEM_M0_PMON_DSP 0x00000CA5 - +#define MSR_NEHALEM_M0_PMON_DSP 0x00000CA5 /** Package. Uncore M-box 0 perfmon ISS unit select MSR. @@ -2726,8 +2634,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_ISS is defined as MSR_M0_PMON_ISS in SDM. **/ -#define MSR_NEHALEM_M0_PMON_ISS 0x00000CA6 - +#define MSR_NEHALEM_M0_PMON_ISS 0x00000CA6 /** Package. Uncore M-box 0 perfmon MAP unit select MSR. @@ -2745,8 +2652,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_MAP is defined as MSR_M0_PMON_MAP in SDM. **/ -#define MSR_NEHALEM_M0_PMON_MAP 0x00000CA7 - +#define MSR_NEHALEM_M0_PMON_MAP 0x00000CA7 /** Package. Uncore M-box 0 perfmon MIC THR select MSR. @@ -2764,8 +2670,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_MSC_THR is defined as MSR_M0_PMON_MSC_THR in SDM. **/ -#define MSR_NEHALEM_M0_PMON_MSC_THR 0x00000CA8 - +#define MSR_NEHALEM_M0_PMON_MSC_THR 0x00000CA8 /** Package. Uncore M-box 0 perfmon PGT unit select MSR. @@ -2783,8 +2688,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_PGT is defined as MSR_M0_PMON_PGT in SDM. **/ -#define MSR_NEHALEM_M0_PMON_PGT 0x00000CA9 - +#define MSR_NEHALEM_M0_PMON_PGT 0x00000CA9 /** Package. Uncore M-box 0 perfmon PLD unit select MSR. @@ -2802,8 +2706,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_PLD is defined as MSR_M0_PMON_PLD in SDM. **/ -#define MSR_NEHALEM_M0_PMON_PLD 0x00000CAA - +#define MSR_NEHALEM_M0_PMON_PLD 0x00000CAA /** Package. Uncore M-box 0 perfmon ZDP unit select MSR. @@ -2821,8 +2724,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_ZDP is defined as MSR_M0_PMON_ZDP in SDM. **/ -#define MSR_NEHALEM_M0_PMON_ZDP 0x00000CAB - +#define MSR_NEHALEM_M0_PMON_ZDP 0x00000CAB /** Package. Uncore M-box 0 perfmon event select MSR. @@ -2840,8 +2742,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_EVNT_SEL0 is defined as MSR_M0_PMON_EVNT_SEL0 in SDM. **/ -#define MSR_NEHALEM_M0_PMON_EVNT_SEL0 0x00000CB0 - +#define MSR_NEHALEM_M0_PMON_EVNT_SEL0 0x00000CB0 /** Package. Uncore M-box 0 perfmon counter MSR. @@ -2859,8 +2760,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_CTR0 is defined as MSR_M0_PMON_CTR0 in SDM. **/ -#define MSR_NEHALEM_M0_PMON_CTR0 0x00000CB1 - +#define MSR_NEHALEM_M0_PMON_CTR0 0x00000CB1 /** Package. Uncore M-box 0 perfmon event select MSR. @@ -2878,8 +2778,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_EVNT_SEL1 is defined as MSR_M0_PMON_EVNT_SEL1 in SDM. **/ -#define MSR_NEHALEM_M0_PMON_EVNT_SEL1 0x00000CB2 - +#define MSR_NEHALEM_M0_PMON_EVNT_SEL1 0x00000CB2 /** Package. Uncore M-box 0 perfmon counter MSR. @@ -2897,8 +2796,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_CTR1 is defined as MSR_M0_PMON_CTR1 in SDM. **/ -#define MSR_NEHALEM_M0_PMON_CTR1 0x00000CB3 - +#define MSR_NEHALEM_M0_PMON_CTR1 0x00000CB3 /** Package. Uncore M-box 0 perfmon event select MSR. @@ -2916,8 +2814,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_EVNT_SEL2 is defined as MSR_M0_PMON_EVNT_SEL2 in SDM. **/ -#define MSR_NEHALEM_M0_PMON_EVNT_SEL2 0x00000CB4 - +#define MSR_NEHALEM_M0_PMON_EVNT_SEL2 0x00000CB4 /** Package. Uncore M-box 0 perfmon counter MSR. @@ -2935,8 +2832,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_CTR2 is defined as MSR_M0_PMON_CTR2 in SDM. **/ -#define MSR_NEHALEM_M0_PMON_CTR2 0x00000CB5 - +#define MSR_NEHALEM_M0_PMON_CTR2 0x00000CB5 /** Package. Uncore M-box 0 perfmon event select MSR. @@ -2954,8 +2850,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_EVNT_SEL3 is defined as MSR_M0_PMON_EVNT_SEL3 in SDM. **/ -#define MSR_NEHALEM_M0_PMON_EVNT_SEL3 0x00000CB6 - +#define MSR_NEHALEM_M0_PMON_EVNT_SEL3 0x00000CB6 /** Package. Uncore M-box 0 perfmon counter MSR. @@ -2973,8 +2868,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_CTR3 is defined as MSR_M0_PMON_CTR3 in SDM. **/ -#define MSR_NEHALEM_M0_PMON_CTR3 0x00000CB7 - +#define MSR_NEHALEM_M0_PMON_CTR3 0x00000CB7 /** Package. Uncore M-box 0 perfmon event select MSR. @@ -2992,8 +2886,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_EVNT_SEL4 is defined as MSR_M0_PMON_EVNT_SEL4 in SDM. **/ -#define MSR_NEHALEM_M0_PMON_EVNT_SEL4 0x00000CB8 - +#define MSR_NEHALEM_M0_PMON_EVNT_SEL4 0x00000CB8 /** Package. Uncore M-box 0 perfmon counter MSR. @@ -3011,8 +2904,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_CTR4 is defined as MSR_M0_PMON_CTR4 in SDM. **/ -#define MSR_NEHALEM_M0_PMON_CTR4 0x00000CB9 - +#define MSR_NEHALEM_M0_PMON_CTR4 0x00000CB9 /** Package. Uncore M-box 0 perfmon event select MSR. @@ -3030,8 +2922,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_EVNT_SEL5 is defined as MSR_M0_PMON_EVNT_SEL5 in SDM. **/ -#define MSR_NEHALEM_M0_PMON_EVNT_SEL5 0x00000CBA - +#define MSR_NEHALEM_M0_PMON_EVNT_SEL5 0x00000CBA /** Package. Uncore M-box 0 perfmon counter MSR. @@ -3049,8 +2940,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_CTR5 is defined as MSR_M0_PMON_CTR5 in SDM. **/ -#define MSR_NEHALEM_M0_PMON_CTR5 0x00000CBB - +#define MSR_NEHALEM_M0_PMON_CTR5 0x00000CBB /** Package. Uncore S-box 1 perfmon local box control MSR. @@ -3068,8 +2958,7 @@ typedef union { @endcode @note MSR_NEHALEM_S1_PMON_BOX_CTRL is defined as MSR_S1_PMON_BOX_CTRL in SDM. **/ -#define MSR_NEHALEM_S1_PMON_BOX_CTRL 0x00000CC0 - +#define MSR_NEHALEM_S1_PMON_BOX_CTRL 0x00000CC0 /** Package. Uncore S-box 1 perfmon local box status MSR. @@ -3087,8 +2976,7 @@ typedef union { @endcode @note MSR_NEHALEM_S1_PMON_BOX_STATUS is defined as MSR_S1_PMON_BOX_STATUS in SDM. **/ -#define MSR_NEHALEM_S1_PMON_BOX_STATUS 0x00000CC1 - +#define MSR_NEHALEM_S1_PMON_BOX_STATUS 0x00000CC1 /** Package. Uncore S-box 1 perfmon local box overflow control MSR. @@ -3106,8 +2994,7 @@ typedef union { @endcode @note MSR_NEHALEM_S1_PMON_BOX_OVF_CTRL is defined as MSR_S1_PMON_BOX_OVF_CTRL in SDM. **/ -#define MSR_NEHALEM_S1_PMON_BOX_OVF_CTRL 0x00000CC2 - +#define MSR_NEHALEM_S1_PMON_BOX_OVF_CTRL 0x00000CC2 /** Package. Uncore S-box 1 perfmon event select MSR. @@ -3125,8 +3012,7 @@ typedef union { @endcode @note MSR_NEHALEM_S1_PMON_EVNT_SEL0 is defined as MSR_S1_PMON_EVNT_SEL0 in SDM. **/ -#define MSR_NEHALEM_S1_PMON_EVNT_SEL0 0x00000CD0 - +#define MSR_NEHALEM_S1_PMON_EVNT_SEL0 0x00000CD0 /** Package. Uncore S-box 1 perfmon counter MSR. @@ -3144,8 +3030,7 @@ typedef union { @endcode @note MSR_NEHALEM_S1_PMON_CTR0 is defined as MSR_S1_PMON_CTR0 in SDM. **/ -#define MSR_NEHALEM_S1_PMON_CTR0 0x00000CD1 - +#define MSR_NEHALEM_S1_PMON_CTR0 0x00000CD1 /** Package. Uncore S-box 1 perfmon event select MSR. @@ -3163,8 +3048,7 @@ typedef union { @endcode @note MSR_NEHALEM_S1_PMON_EVNT_SEL1 is defined as MSR_S1_PMON_EVNT_SEL1 in SDM. **/ -#define MSR_NEHALEM_S1_PMON_EVNT_SEL1 0x00000CD2 - +#define MSR_NEHALEM_S1_PMON_EVNT_SEL1 0x00000CD2 /** Package. Uncore S-box 1 perfmon counter MSR. @@ -3182,8 +3066,7 @@ typedef union { @endcode @note MSR_NEHALEM_S1_PMON_CTR1 is defined as MSR_S1_PMON_CTR1 in SDM. **/ -#define MSR_NEHALEM_S1_PMON_CTR1 0x00000CD3 - +#define MSR_NEHALEM_S1_PMON_CTR1 0x00000CD3 /** Package. Uncore S-box 1 perfmon event select MSR. @@ -3201,8 +3084,7 @@ typedef union { @endcode @note MSR_NEHALEM_S1_PMON_EVNT_SEL2 is defined as MSR_S1_PMON_EVNT_SEL2 in SDM. **/ -#define MSR_NEHALEM_S1_PMON_EVNT_SEL2 0x00000CD4 - +#define MSR_NEHALEM_S1_PMON_EVNT_SEL2 0x00000CD4 /** Package. Uncore S-box 1 perfmon counter MSR. @@ -3220,8 +3102,7 @@ typedef union { @endcode @note MSR_NEHALEM_S1_PMON_CTR2 is defined as MSR_S1_PMON_CTR2 in SDM. **/ -#define MSR_NEHALEM_S1_PMON_CTR2 0x00000CD5 - +#define MSR_NEHALEM_S1_PMON_CTR2 0x00000CD5 /** Package. Uncore S-box 1 perfmon event select MSR. @@ -3239,8 +3120,7 @@ typedef union { @endcode @note MSR_NEHALEM_S1_PMON_EVNT_SEL3 is defined as MSR_S1_PMON_EVNT_SEL3 in SDM. **/ -#define MSR_NEHALEM_S1_PMON_EVNT_SEL3 0x00000CD6 - +#define MSR_NEHALEM_S1_PMON_EVNT_SEL3 0x00000CD6 /** Package. Uncore S-box 1 perfmon counter MSR. @@ -3258,8 +3138,7 @@ typedef union { @endcode @note MSR_NEHALEM_S1_PMON_CTR3 is defined as MSR_S1_PMON_CTR3 in SDM. **/ -#define MSR_NEHALEM_S1_PMON_CTR3 0x00000CD7 - +#define MSR_NEHALEM_S1_PMON_CTR3 0x00000CD7 /** Package. Uncore M-box 1 perfmon local box control MSR. @@ -3277,8 +3156,7 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_BOX_CTRL is defined as MSR_M1_PMON_BOX_CTRL in SDM. **/ -#define MSR_NEHALEM_M1_PMON_BOX_CTRL 0x00000CE0 - +#define MSR_NEHALEM_M1_PMON_BOX_CTRL 0x00000CE0 /** Package. Uncore M-box 1 perfmon local box status MSR. @@ -3296,8 +3174,7 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_BOX_STATUS is defined as MSR_M1_PMON_BOX_STATUS in SDM. **/ -#define MSR_NEHALEM_M1_PMON_BOX_STATUS 0x00000CE1 - +#define MSR_NEHALEM_M1_PMON_BOX_STATUS 0x00000CE1 /** Package. Uncore M-box 1 perfmon local box overflow control MSR. @@ -3315,8 +3192,7 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_BOX_OVF_CTRL is defined as MSR_M1_PMON_BOX_OVF_CTRL in SDM. **/ -#define MSR_NEHALEM_M1_PMON_BOX_OVF_CTRL 0x00000CE2 - +#define MSR_NEHALEM_M1_PMON_BOX_OVF_CTRL 0x00000CE2 /** Package. Uncore M-box 1 perfmon time stamp unit select MSR. @@ -3334,8 +3210,7 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_TIMESTAMP is defined as MSR_M1_PMON_TIMESTAMP in SDM. **/ -#define MSR_NEHALEM_M1_PMON_TIMESTAMP 0x00000CE4 - +#define MSR_NEHALEM_M1_PMON_TIMESTAMP 0x00000CE4 /** Package. Uncore M-box 1 perfmon DSP unit select MSR. @@ -3353,8 +3228,7 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_DSP is defined as MSR_M1_PMON_DSP in SDM. **/ -#define MSR_NEHALEM_M1_PMON_DSP 0x00000CE5 - +#define MSR_NEHALEM_M1_PMON_DSP 0x00000CE5 /** Package. Uncore M-box 1 perfmon ISS unit select MSR. @@ -3372,8 +3246,7 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_ISS is defined as MSR_M1_PMON_ISS in SDM. **/ -#define MSR_NEHALEM_M1_PMON_ISS 0x00000CE6 - +#define MSR_NEHALEM_M1_PMON_ISS 0x00000CE6 /** Package. Uncore M-box 1 perfmon MAP unit select MSR. @@ -3391,8 +3264,7 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_MAP is defined as MSR_M1_PMON_MAP in SDM. **/ -#define MSR_NEHALEM_M1_PMON_MAP 0x00000CE7 - +#define MSR_NEHALEM_M1_PMON_MAP 0x00000CE7 /** Package. Uncore M-box 1 perfmon MIC THR select MSR. @@ -3410,8 +3282,7 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_MSC_THR is defined as MSR_M1_PMON_MSC_THR in SDM. **/ -#define MSR_NEHALEM_M1_PMON_MSC_THR 0x00000CE8 - +#define MSR_NEHALEM_M1_PMON_MSC_THR 0x00000CE8 /** Package. Uncore M-box 1 perfmon PGT unit select MSR. @@ -3429,8 +3300,7 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_PGT is defined as MSR_M1_PMON_PGT in SDM. **/ -#define MSR_NEHALEM_M1_PMON_PGT 0x00000CE9 - +#define MSR_NEHALEM_M1_PMON_PGT 0x00000CE9 /** Package. Uncore M-box 1 perfmon PLD unit select MSR. @@ -3448,8 +3318,7 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_PLD is defined as MSR_M1_PMON_PLD in SDM. **/ -#define MSR_NEHALEM_M1_PMON_PLD 0x00000CEA - +#define MSR_NEHALEM_M1_PMON_PLD 0x00000CEA /** Package. Uncore M-box 1 perfmon ZDP unit select MSR. @@ -3467,8 +3336,7 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_ZDP is defined as MSR_M1_PMON_ZDP in SDM. **/ -#define MSR_NEHALEM_M1_PMON_ZDP 0x00000CEB - +#define MSR_NEHALEM_M1_PMON_ZDP 0x00000CEB /** Package. Uncore M-box 1 perfmon event select MSR. @@ -3486,8 +3354,7 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_EVNT_SEL0 is defined as MSR_M1_PMON_EVNT_SEL0 in SDM. **/ -#define MSR_NEHALEM_M1_PMON_EVNT_SEL0 0x00000CF0 - +#define MSR_NEHALEM_M1_PMON_EVNT_SEL0 0x00000CF0 /** Package. Uncore M-box 1 perfmon counter MSR. @@ -3505,8 +3372,7 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_CTR0 is defined as MSR_M1_PMON_CTR0 in SDM. **/ -#define MSR_NEHALEM_M1_PMON_CTR0 0x00000CF1 - +#define MSR_NEHALEM_M1_PMON_CTR0 0x00000CF1 /** Package. Uncore M-box 1 perfmon event select MSR. @@ -3524,8 +3390,7 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_EVNT_SEL1 is defined as MSR_M1_PMON_EVNT_SEL1 in SDM. **/ -#define MSR_NEHALEM_M1_PMON_EVNT_SEL1 0x00000CF2 - +#define MSR_NEHALEM_M1_PMON_EVNT_SEL1 0x00000CF2 /** Package. Uncore M-box 1 perfmon counter MSR. @@ -3543,8 +3408,7 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_CTR1 is defined as MSR_M1_PMON_CTR1 in SDM. **/ -#define MSR_NEHALEM_M1_PMON_CTR1 0x00000CF3 - +#define MSR_NEHALEM_M1_PMON_CTR1 0x00000CF3 /** Package. Uncore M-box 1 perfmon event select MSR. @@ -3562,8 +3426,7 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_EVNT_SEL2 is defined as MSR_M1_PMON_EVNT_SEL2 in SDM. **/ -#define MSR_NEHALEM_M1_PMON_EVNT_SEL2 0x00000CF4 - +#define MSR_NEHALEM_M1_PMON_EVNT_SEL2 0x00000CF4 /** Package. Uncore M-box 1 perfmon counter MSR. @@ -3581,8 +3444,7 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_CTR2 is defined as MSR_M1_PMON_CTR2 in SDM. **/ -#define MSR_NEHALEM_M1_PMON_CTR2 0x00000CF5 - +#define MSR_NEHALEM_M1_PMON_CTR2 0x00000CF5 /** Package. Uncore M-box 1 perfmon event select MSR. @@ -3600,8 +3462,7 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_EVNT_SEL3 is defined as MSR_M1_PMON_EVNT_SEL3 in SDM. **/ -#define MSR_NEHALEM_M1_PMON_EVNT_SEL3 0x00000CF6 - +#define MSR_NEHALEM_M1_PMON_EVNT_SEL3 0x00000CF6 /** Package. Uncore M-box 1 perfmon counter MSR. @@ -3619,8 +3480,7 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_CTR3 is defined as MSR_M1_PMON_CTR3 in SDM. **/ -#define MSR_NEHALEM_M1_PMON_CTR3 0x00000CF7 - +#define MSR_NEHALEM_M1_PMON_CTR3 0x00000CF7 /** Package. Uncore M-box 1 perfmon event select MSR. @@ -3638,8 +3498,7 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_EVNT_SEL4 is defined as MSR_M1_PMON_EVNT_SEL4 in SDM. **/ -#define MSR_NEHALEM_M1_PMON_EVNT_SEL4 0x00000CF8 - +#define MSR_NEHALEM_M1_PMON_EVNT_SEL4 0x00000CF8 /** Package. Uncore M-box 1 perfmon counter MSR. @@ -3657,8 +3516,7 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_CTR4 is defined as MSR_M1_PMON_CTR4 in SDM. **/ -#define MSR_NEHALEM_M1_PMON_CTR4 0x00000CF9 - +#define MSR_NEHALEM_M1_PMON_CTR4 0x00000CF9 /** Package. Uncore M-box 1 perfmon event select MSR. @@ -3676,8 +3534,7 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_EVNT_SEL5 is defined as MSR_M1_PMON_EVNT_SEL5 in SDM. **/ -#define MSR_NEHALEM_M1_PMON_EVNT_SEL5 0x00000CFA - +#define MSR_NEHALEM_M1_PMON_EVNT_SEL5 0x00000CFA /** Package. Uncore M-box 1 perfmon counter MSR. @@ -3695,8 +3552,7 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_CTR5 is defined as MSR_M1_PMON_CTR5 in SDM. **/ -#define MSR_NEHALEM_M1_PMON_CTR5 0x00000CFB - +#define MSR_NEHALEM_M1_PMON_CTR5 0x00000CFB /** Package. Uncore C-box 0 perfmon local box control MSR. @@ -3714,8 +3570,7 @@ typedef union { @endcode @note MSR_NEHALEM_C0_PMON_BOX_CTRL is defined as MSR_C0_PMON_BOX_CTRL in SDM. **/ -#define MSR_NEHALEM_C0_PMON_BOX_CTRL 0x00000D00 - +#define MSR_NEHALEM_C0_PMON_BOX_CTRL 0x00000D00 /** Package. Uncore C-box 0 perfmon local box status MSR. @@ -3733,8 +3588,7 @@ typedef union { @endcode @note MSR_NEHALEM_C0_PMON_BOX_STATUS is defined as MSR_C0_PMON_BOX_STATUS in SDM. **/ -#define MSR_NEHALEM_C0_PMON_BOX_STATUS 0x00000D01 - +#define MSR_NEHALEM_C0_PMON_BOX_STATUS 0x00000D01 /** Package. Uncore C-box 0 perfmon local box overflow control MSR. @@ -3752,8 +3606,7 @@ typedef union { @endcode @note MSR_NEHALEM_C0_PMON_BOX_OVF_CTRL is defined as MSR_C0_PMON_BOX_OVF_CTRL in SDM. **/ -#define MSR_NEHALEM_C0_PMON_BOX_OVF_CTRL 0x00000D02 - +#define MSR_NEHALEM_C0_PMON_BOX_OVF_CTRL 0x00000D02 /** Package. Uncore C-box 0 perfmon event select MSR. @@ -3771,8 +3624,7 @@ typedef union { @endcode @note MSR_NEHALEM_C0_PMON_EVNT_SEL0 is defined as MSR_C0_PMON_EVNT_SEL0 in SDM. **/ -#define MSR_NEHALEM_C0_PMON_EVNT_SEL0 0x00000D10 - +#define MSR_NEHALEM_C0_PMON_EVNT_SEL0 0x00000D10 /** Package. Uncore C-box 0 perfmon counter MSR. @@ -3790,8 +3642,7 @@ typedef union { @endcode @note MSR_NEHALEM_C0_PMON_CTR0 is defined as MSR_C0_PMON_CTR0 in SDM. **/ -#define MSR_NEHALEM_C0_PMON_CTR0 0x00000D11 - +#define MSR_NEHALEM_C0_PMON_CTR0 0x00000D11 /** Package. Uncore C-box 0 perfmon event select MSR. @@ -3809,8 +3660,7 @@ typedef union { @endcode @note MSR_NEHALEM_C0_PMON_EVNT_SEL1 is defined as MSR_C0_PMON_EVNT_SEL1 in SDM. **/ -#define MSR_NEHALEM_C0_PMON_EVNT_SEL1 0x00000D12 - +#define MSR_NEHALEM_C0_PMON_EVNT_SEL1 0x00000D12 /** Package. Uncore C-box 0 perfmon counter MSR. @@ -3828,8 +3678,7 @@ typedef union { @endcode @note MSR_NEHALEM_C0_PMON_CTR1 is defined as MSR_C0_PMON_CTR1 in SDM. **/ -#define MSR_NEHALEM_C0_PMON_CTR1 0x00000D13 - +#define MSR_NEHALEM_C0_PMON_CTR1 0x00000D13 /** Package. Uncore C-box 0 perfmon event select MSR. @@ -3847,8 +3696,7 @@ typedef union { @endcode @note MSR_NEHALEM_C0_PMON_EVNT_SEL2 is defined as MSR_C0_PMON_EVNT_SEL2 in SDM. **/ -#define MSR_NEHALEM_C0_PMON_EVNT_SEL2 0x00000D14 - +#define MSR_NEHALEM_C0_PMON_EVNT_SEL2 0x00000D14 /** Package. Uncore C-box 0 perfmon counter MSR. @@ -3866,8 +3714,7 @@ typedef union { @endcode @note MSR_NEHALEM_C0_PMON_CTR2 is defined as MSR_C0_PMON_CTR2 in SDM. **/ -#define MSR_NEHALEM_C0_PMON_CTR2 0x00000D15 - +#define MSR_NEHALEM_C0_PMON_CTR2 0x00000D15 /** Package. Uncore C-box 0 perfmon event select MSR. @@ -3885,8 +3732,7 @@ typedef union { @endcode @note MSR_NEHALEM_C0_PMON_EVNT_SEL3 is defined as MSR_C0_PMON_EVNT_SEL3 in SDM. **/ -#define MSR_NEHALEM_C0_PMON_EVNT_SEL3 0x00000D16 - +#define MSR_NEHALEM_C0_PMON_EVNT_SEL3 0x00000D16 /** Package. Uncore C-box 0 perfmon counter MSR. @@ -3904,8 +3750,7 @@ typedef union { @endcode @note MSR_NEHALEM_C0_PMON_CTR3 is defined as MSR_C0_PMON_CTR3 in SDM. **/ -#define MSR_NEHALEM_C0_PMON_CTR3 0x00000D17 - +#define MSR_NEHALEM_C0_PMON_CTR3 0x00000D17 /** Package. Uncore C-box 0 perfmon event select MSR. @@ -3923,8 +3768,7 @@ typedef union { @endcode @note MSR_NEHALEM_C0_PMON_EVNT_SEL4 is defined as MSR_C0_PMON_EVNT_SEL4 in SDM. **/ -#define MSR_NEHALEM_C0_PMON_EVNT_SEL4 0x00000D18 - +#define MSR_NEHALEM_C0_PMON_EVNT_SEL4 0x00000D18 /** Package. Uncore C-box 0 perfmon counter MSR. @@ -3942,8 +3786,7 @@ typedef union { @endcode @note MSR_NEHALEM_C0_PMON_CTR4 is defined as MSR_C0_PMON_CTR4 in SDM. **/ -#define MSR_NEHALEM_C0_PMON_CTR4 0x00000D19 - +#define MSR_NEHALEM_C0_PMON_CTR4 0x00000D19 /** Package. Uncore C-box 0 perfmon event select MSR. @@ -3961,8 +3804,7 @@ typedef union { @endcode @note MSR_NEHALEM_C0_PMON_EVNT_SEL5 is defined as MSR_C0_PMON_EVNT_SEL5 in SDM. **/ -#define MSR_NEHALEM_C0_PMON_EVNT_SEL5 0x00000D1A - +#define MSR_NEHALEM_C0_PMON_EVNT_SEL5 0x00000D1A /** Package. Uncore C-box 0 perfmon counter MSR. @@ -3980,8 +3822,7 @@ typedef union { @endcode @note MSR_NEHALEM_C0_PMON_CTR5 is defined as MSR_C0_PMON_CTR5 in SDM. **/ -#define MSR_NEHALEM_C0_PMON_CTR5 0x00000D1B - +#define MSR_NEHALEM_C0_PMON_CTR5 0x00000D1B /** Package. Uncore C-box 4 perfmon local box control MSR. @@ -3999,8 +3840,7 @@ typedef union { @endcode @note MSR_NEHALEM_C4_PMON_BOX_CTRL is defined as MSR_C4_PMON_BOX_CTRL in SDM. **/ -#define MSR_NEHALEM_C4_PMON_BOX_CTRL 0x00000D20 - +#define MSR_NEHALEM_C4_PMON_BOX_CTRL 0x00000D20 /** Package. Uncore C-box 4 perfmon local box status MSR. @@ -4018,8 +3858,7 @@ typedef union { @endcode @note MSR_NEHALEM_C4_PMON_BOX_STATUS is defined as MSR_C4_PMON_BOX_STATUS in SDM. **/ -#define MSR_NEHALEM_C4_PMON_BOX_STATUS 0x00000D21 - +#define MSR_NEHALEM_C4_PMON_BOX_STATUS 0x00000D21 /** Package. Uncore C-box 4 perfmon local box overflow control MSR. @@ -4037,8 +3876,7 @@ typedef union { @endcode @note MSR_NEHALEM_C4_PMON_BOX_OVF_CTRL is defined as MSR_C4_PMON_BOX_OVF_CTRL in SDM. **/ -#define MSR_NEHALEM_C4_PMON_BOX_OVF_CTRL 0x00000D22 - +#define MSR_NEHALEM_C4_PMON_BOX_OVF_CTRL 0x00000D22 /** Package. Uncore C-box 4 perfmon event select MSR. @@ -4056,8 +3894,7 @@ typedef union { @endcode @note MSR_NEHALEM_C4_PMON_EVNT_SEL0 is defined as MSR_C4_PMON_EVNT_SEL0 in SDM. **/ -#define MSR_NEHALEM_C4_PMON_EVNT_SEL0 0x00000D30 - +#define MSR_NEHALEM_C4_PMON_EVNT_SEL0 0x00000D30 /** Package. Uncore C-box 4 perfmon counter MSR. @@ -4075,8 +3912,7 @@ typedef union { @endcode @note MSR_NEHALEM_C4_PMON_CTR0 is defined as MSR_C4_PMON_CTR0 in SDM. **/ -#define MSR_NEHALEM_C4_PMON_CTR0 0x00000D31 - +#define MSR_NEHALEM_C4_PMON_CTR0 0x00000D31 /** Package. Uncore C-box 4 perfmon event select MSR. @@ -4094,8 +3930,7 @@ typedef union { @endcode @note MSR_NEHALEM_C4_PMON_EVNT_SEL1 is defined as MSR_C4_PMON_EVNT_SEL1 in SDM. **/ -#define MSR_NEHALEM_C4_PMON_EVNT_SEL1 0x00000D32 - +#define MSR_NEHALEM_C4_PMON_EVNT_SEL1 0x00000D32 /** Package. Uncore C-box 4 perfmon counter MSR. @@ -4113,8 +3948,7 @@ typedef union { @endcode @note MSR_NEHALEM_C4_PMON_CTR1 is defined as MSR_C4_PMON_CTR1 in SDM. **/ -#define MSR_NEHALEM_C4_PMON_CTR1 0x00000D33 - +#define MSR_NEHALEM_C4_PMON_CTR1 0x00000D33 /** Package. Uncore C-box 4 perfmon event select MSR. @@ -4132,8 +3966,7 @@ typedef union { @endcode @note MSR_NEHALEM_C4_PMON_EVNT_SEL2 is defined as MSR_C4_PMON_EVNT_SEL2 in SDM. **/ -#define MSR_NEHALEM_C4_PMON_EVNT_SEL2 0x00000D34 - +#define MSR_NEHALEM_C4_PMON_EVNT_SEL2 0x00000D34 /** Package. Uncore C-box 4 perfmon counter MSR. @@ -4151,8 +3984,7 @@ typedef union { @endcode @note MSR_NEHALEM_C4_PMON_CTR2 is defined as MSR_C4_PMON_CTR2 in SDM. **/ -#define MSR_NEHALEM_C4_PMON_CTR2 0x00000D35 - +#define MSR_NEHALEM_C4_PMON_CTR2 0x00000D35 /** Package. Uncore C-box 4 perfmon event select MSR. @@ -4170,8 +4002,7 @@ typedef union { @endcode @note MSR_NEHALEM_C4_PMON_EVNT_SEL3 is defined as MSR_C4_PMON_EVNT_SEL3 in SDM. **/ -#define MSR_NEHALEM_C4_PMON_EVNT_SEL3 0x00000D36 - +#define MSR_NEHALEM_C4_PMON_EVNT_SEL3 0x00000D36 /** Package. Uncore C-box 4 perfmon counter MSR. @@ -4189,8 +4020,7 @@ typedef union { @endcode @note MSR_NEHALEM_C4_PMON_CTR3 is defined as MSR_C4_PMON_CTR3 in SDM. **/ -#define MSR_NEHALEM_C4_PMON_CTR3 0x00000D37 - +#define MSR_NEHALEM_C4_PMON_CTR3 0x00000D37 /** Package. Uncore C-box 4 perfmon event select MSR. @@ -4208,8 +4038,7 @@ typedef union { @endcode @note MSR_NEHALEM_C4_PMON_EVNT_SEL4 is defined as MSR_C4_PMON_EVNT_SEL4 in SDM. **/ -#define MSR_NEHALEM_C4_PMON_EVNT_SEL4 0x00000D38 - +#define MSR_NEHALEM_C4_PMON_EVNT_SEL4 0x00000D38 /** Package. Uncore C-box 4 perfmon counter MSR. @@ -4227,8 +4056,7 @@ typedef union { @endcode @note MSR_NEHALEM_C4_PMON_CTR4 is defined as MSR_C4_PMON_CTR4 in SDM. **/ -#define MSR_NEHALEM_C4_PMON_CTR4 0x00000D39 - +#define MSR_NEHALEM_C4_PMON_CTR4 0x00000D39 /** Package. Uncore C-box 4 perfmon event select MSR. @@ -4246,8 +4074,7 @@ typedef union { @endcode @note MSR_NEHALEM_C4_PMON_EVNT_SEL5 is defined as MSR_C4_PMON_EVNT_SEL5 in SDM. **/ -#define MSR_NEHALEM_C4_PMON_EVNT_SEL5 0x00000D3A - +#define MSR_NEHALEM_C4_PMON_EVNT_SEL5 0x00000D3A /** Package. Uncore C-box 4 perfmon counter MSR. @@ -4265,8 +4092,7 @@ typedef union { @endcode @note MSR_NEHALEM_C4_PMON_CTR5 is defined as MSR_C4_PMON_CTR5 in SDM. **/ -#define MSR_NEHALEM_C4_PMON_CTR5 0x00000D3B - +#define MSR_NEHALEM_C4_PMON_CTR5 0x00000D3B /** Package. Uncore C-box 2 perfmon local box control MSR. @@ -4284,8 +4110,7 @@ typedef union { @endcode @note MSR_NEHALEM_C2_PMON_BOX_CTRL is defined as MSR_C2_PMON_BOX_CTRL in SDM. **/ -#define MSR_NEHALEM_C2_PMON_BOX_CTRL 0x00000D40 - +#define MSR_NEHALEM_C2_PMON_BOX_CTRL 0x00000D40 /** Package. Uncore C-box 2 perfmon local box status MSR. @@ -4303,8 +4128,7 @@ typedef union { @endcode @note MSR_NEHALEM_C2_PMON_BOX_STATUS is defined as MSR_C2_PMON_BOX_STATUS in SDM. **/ -#define MSR_NEHALEM_C2_PMON_BOX_STATUS 0x00000D41 - +#define MSR_NEHALEM_C2_PMON_BOX_STATUS 0x00000D41 /** Package. Uncore C-box 2 perfmon local box overflow control MSR. @@ -4322,8 +4146,7 @@ typedef union { @endcode @note MSR_NEHALEM_C2_PMON_BOX_OVF_CTRL is defined as MSR_C2_PMON_BOX_OVF_CTRL in SDM. **/ -#define MSR_NEHALEM_C2_PMON_BOX_OVF_CTRL 0x00000D42 - +#define MSR_NEHALEM_C2_PMON_BOX_OVF_CTRL 0x00000D42 /** Package. Uncore C-box 2 perfmon event select MSR. @@ -4341,8 +4164,7 @@ typedef union { @endcode @note MSR_NEHALEM_C2_PMON_EVNT_SEL0 is defined as MSR_C2_PMON_EVNT_SEL0 in SDM. **/ -#define MSR_NEHALEM_C2_PMON_EVNT_SEL0 0x00000D50 - +#define MSR_NEHALEM_C2_PMON_EVNT_SEL0 0x00000D50 /** Package. Uncore C-box 2 perfmon counter MSR. @@ -4360,8 +4182,7 @@ typedef union { @endcode @note MSR_NEHALEM_C2_PMON_CTR0 is defined as MSR_C2_PMON_CTR0 in SDM. **/ -#define MSR_NEHALEM_C2_PMON_CTR0 0x00000D51 - +#define MSR_NEHALEM_C2_PMON_CTR0 0x00000D51 /** Package. Uncore C-box 2 perfmon event select MSR. @@ -4379,8 +4200,7 @@ typedef union { @endcode @note MSR_NEHALEM_C2_PMON_EVNT_SEL1 is defined as MSR_C2_PMON_EVNT_SEL1 in SDM. **/ -#define MSR_NEHALEM_C2_PMON_EVNT_SEL1 0x00000D52 - +#define MSR_NEHALEM_C2_PMON_EVNT_SEL1 0x00000D52 /** Package. Uncore C-box 2 perfmon counter MSR. @@ -4398,8 +4218,7 @@ typedef union { @endcode @note MSR_NEHALEM_C2_PMON_CTR1 is defined as MSR_C2_PMON_CTR1 in SDM. **/ -#define MSR_NEHALEM_C2_PMON_CTR1 0x00000D53 - +#define MSR_NEHALEM_C2_PMON_CTR1 0x00000D53 /** Package. Uncore C-box 2 perfmon event select MSR. @@ -4417,8 +4236,7 @@ typedef union { @endcode @note MSR_NEHALEM_C2_PMON_EVNT_SEL2 is defined as MSR_C2_PMON_EVNT_SEL2 in SDM. **/ -#define MSR_NEHALEM_C2_PMON_EVNT_SEL2 0x00000D54 - +#define MSR_NEHALEM_C2_PMON_EVNT_SEL2 0x00000D54 /** Package. Uncore C-box 2 perfmon counter MSR. @@ -4436,8 +4254,7 @@ typedef union { @endcode @note MSR_NEHALEM_C2_PMON_CTR2 is defined as MSR_C2_PMON_CTR2 in SDM. **/ -#define MSR_NEHALEM_C2_PMON_CTR2 0x00000D55 - +#define MSR_NEHALEM_C2_PMON_CTR2 0x00000D55 /** Package. Uncore C-box 2 perfmon event select MSR. @@ -4455,8 +4272,7 @@ typedef union { @endcode @note MSR_NEHALEM_C2_PMON_EVNT_SEL3 is defined as MSR_C2_PMON_EVNT_SEL3 in SDM. **/ -#define MSR_NEHALEM_C2_PMON_EVNT_SEL3 0x00000D56 - +#define MSR_NEHALEM_C2_PMON_EVNT_SEL3 0x00000D56 /** Package. Uncore C-box 2 perfmon counter MSR. @@ -4474,8 +4290,7 @@ typedef union { @endcode @note MSR_NEHALEM_C2_PMON_CTR3 is defined as MSR_C2_PMON_CTR3 in SDM. **/ -#define MSR_NEHALEM_C2_PMON_CTR3 0x00000D57 - +#define MSR_NEHALEM_C2_PMON_CTR3 0x00000D57 /** Package. Uncore C-box 2 perfmon event select MSR. @@ -4493,8 +4308,7 @@ typedef union { @endcode @note MSR_NEHALEM_C2_PMON_EVNT_SEL4 is defined as MSR_C2_PMON_EVNT_SEL4 in SDM. **/ -#define MSR_NEHALEM_C2_PMON_EVNT_SEL4 0x00000D58 - +#define MSR_NEHALEM_C2_PMON_EVNT_SEL4 0x00000D58 /** Package. Uncore C-box 2 perfmon counter MSR. @@ -4512,8 +4326,7 @@ typedef union { @endcode @note MSR_NEHALEM_C2_PMON_CTR4 is defined as MSR_C2_PMON_CTR4 in SDM. **/ -#define MSR_NEHALEM_C2_PMON_CTR4 0x00000D59 - +#define MSR_NEHALEM_C2_PMON_CTR4 0x00000D59 /** Package. Uncore C-box 2 perfmon event select MSR. @@ -4531,8 +4344,7 @@ typedef union { @endcode @note MSR_NEHALEM_C2_PMON_EVNT_SEL5 is defined as MSR_C2_PMON_EVNT_SEL5 in SDM. **/ -#define MSR_NEHALEM_C2_PMON_EVNT_SEL5 0x00000D5A - +#define MSR_NEHALEM_C2_PMON_EVNT_SEL5 0x00000D5A /** Package. Uncore C-box 2 perfmon counter MSR. @@ -4550,8 +4362,7 @@ typedef union { @endcode @note MSR_NEHALEM_C2_PMON_CTR5 is defined as MSR_C2_PMON_CTR5 in SDM. **/ -#define MSR_NEHALEM_C2_PMON_CTR5 0x00000D5B - +#define MSR_NEHALEM_C2_PMON_CTR5 0x00000D5B /** Package. Uncore C-box 6 perfmon local box control MSR. @@ -4569,8 +4380,7 @@ typedef union { @endcode @note MSR_NEHALEM_C6_PMON_BOX_CTRL is defined as MSR_C6_PMON_BOX_CTRL in SDM. **/ -#define MSR_NEHALEM_C6_PMON_BOX_CTRL 0x00000D60 - +#define MSR_NEHALEM_C6_PMON_BOX_CTRL 0x00000D60 /** Package. Uncore C-box 6 perfmon local box status MSR. @@ -4588,8 +4398,7 @@ typedef union { @endcode @note MSR_NEHALEM_C6_PMON_BOX_STATUS is defined as MSR_C6_PMON_BOX_STATUS in SDM. **/ -#define MSR_NEHALEM_C6_PMON_BOX_STATUS 0x00000D61 - +#define MSR_NEHALEM_C6_PMON_BOX_STATUS 0x00000D61 /** Package. Uncore C-box 6 perfmon local box overflow control MSR. @@ -4607,8 +4416,7 @@ typedef union { @endcode @note MSR_NEHALEM_C6_PMON_BOX_OVF_CTRL is defined as MSR_C6_PMON_BOX_OVF_CTRL in SDM. **/ -#define MSR_NEHALEM_C6_PMON_BOX_OVF_CTRL 0x00000D62 - +#define MSR_NEHALEM_C6_PMON_BOX_OVF_CTRL 0x00000D62 /** Package. Uncore C-box 6 perfmon event select MSR. @@ -4626,8 +4434,7 @@ typedef union { @endcode @note MSR_NEHALEM_C6_PMON_EVNT_SEL0 is defined as MSR_C6_PMON_EVNT_SEL0 in SDM. **/ -#define MSR_NEHALEM_C6_PMON_EVNT_SEL0 0x00000D70 - +#define MSR_NEHALEM_C6_PMON_EVNT_SEL0 0x00000D70 /** Package. Uncore C-box 6 perfmon counter MSR. @@ -4645,8 +4452,7 @@ typedef union { @endcode @note MSR_NEHALEM_C6_PMON_CTR0 is defined as MSR_C6_PMON_CTR0 in SDM. **/ -#define MSR_NEHALEM_C6_PMON_CTR0 0x00000D71 - +#define MSR_NEHALEM_C6_PMON_CTR0 0x00000D71 /** Package. Uncore C-box 6 perfmon event select MSR. @@ -4664,8 +4470,7 @@ typedef union { @endcode @note MSR_NEHALEM_C6_PMON_EVNT_SEL1 is defined as MSR_C6_PMON_EVNT_SEL1 in SDM. **/ -#define MSR_NEHALEM_C6_PMON_EVNT_SEL1 0x00000D72 - +#define MSR_NEHALEM_C6_PMON_EVNT_SEL1 0x00000D72 /** Package. Uncore C-box 6 perfmon counter MSR. @@ -4683,8 +4488,7 @@ typedef union { @endcode @note MSR_NEHALEM_C6_PMON_CTR1 is defined as MSR_C6_PMON_CTR1 in SDM. **/ -#define MSR_NEHALEM_C6_PMON_CTR1 0x00000D73 - +#define MSR_NEHALEM_C6_PMON_CTR1 0x00000D73 /** Package. Uncore C-box 6 perfmon event select MSR. @@ -4702,8 +4506,7 @@ typedef union { @endcode @note MSR_NEHALEM_C6_PMON_EVNT_SEL2 is defined as MSR_C6_PMON_EVNT_SEL2 in SDM. **/ -#define MSR_NEHALEM_C6_PMON_EVNT_SEL2 0x00000D74 - +#define MSR_NEHALEM_C6_PMON_EVNT_SEL2 0x00000D74 /** Package. Uncore C-box 6 perfmon counter MSR. @@ -4721,8 +4524,7 @@ typedef union { @endcode @note MSR_NEHALEM_C6_PMON_CTR2 is defined as MSR_C6_PMON_CTR2 in SDM. **/ -#define MSR_NEHALEM_C6_PMON_CTR2 0x00000D75 - +#define MSR_NEHALEM_C6_PMON_CTR2 0x00000D75 /** Package. Uncore C-box 6 perfmon event select MSR. @@ -4740,8 +4542,7 @@ typedef union { @endcode @note MSR_NEHALEM_C6_PMON_EVNT_SEL3 is defined as MSR_C6_PMON_EVNT_SEL3 in SDM. **/ -#define MSR_NEHALEM_C6_PMON_EVNT_SEL3 0x00000D76 - +#define MSR_NEHALEM_C6_PMON_EVNT_SEL3 0x00000D76 /** Package. Uncore C-box 6 perfmon counter MSR. @@ -4759,8 +4560,7 @@ typedef union { @endcode @note MSR_NEHALEM_C6_PMON_CTR3 is defined as MSR_C6_PMON_CTR3 in SDM. **/ -#define MSR_NEHALEM_C6_PMON_CTR3 0x00000D77 - +#define MSR_NEHALEM_C6_PMON_CTR3 0x00000D77 /** Package. Uncore C-box 6 perfmon event select MSR. @@ -4778,8 +4578,7 @@ typedef union { @endcode @note MSR_NEHALEM_C6_PMON_EVNT_SEL4 is defined as MSR_C6_PMON_EVNT_SEL4 in SDM. **/ -#define MSR_NEHALEM_C6_PMON_EVNT_SEL4 0x00000D78 - +#define MSR_NEHALEM_C6_PMON_EVNT_SEL4 0x00000D78 /** Package. Uncore C-box 6 perfmon counter MSR. @@ -4797,8 +4596,7 @@ typedef union { @endcode @note MSR_NEHALEM_C6_PMON_CTR4 is defined as MSR_C6_PMON_CTR4 in SDM. **/ -#define MSR_NEHALEM_C6_PMON_CTR4 0x00000D79 - +#define MSR_NEHALEM_C6_PMON_CTR4 0x00000D79 /** Package. Uncore C-box 6 perfmon event select MSR. @@ -4816,8 +4614,7 @@ typedef union { @endcode @note MSR_NEHALEM_C6_PMON_EVNT_SEL5 is defined as MSR_C6_PMON_EVNT_SEL5 in SDM. **/ -#define MSR_NEHALEM_C6_PMON_EVNT_SEL5 0x00000D7A - +#define MSR_NEHALEM_C6_PMON_EVNT_SEL5 0x00000D7A /** Package. Uncore C-box 6 perfmon counter MSR. @@ -4835,8 +4632,7 @@ typedef union { @endcode @note MSR_NEHALEM_C6_PMON_CTR5 is defined as MSR_C6_PMON_CTR5 in SDM. **/ -#define MSR_NEHALEM_C6_PMON_CTR5 0x00000D7B - +#define MSR_NEHALEM_C6_PMON_CTR5 0x00000D7B /** Package. Uncore C-box 1 perfmon local box control MSR. @@ -4854,8 +4650,7 @@ typedef union { @endcode @note MSR_NEHALEM_C1_PMON_BOX_CTRL is defined as MSR_C1_PMON_BOX_CTRL in SDM. **/ -#define MSR_NEHALEM_C1_PMON_BOX_CTRL 0x00000D80 - +#define MSR_NEHALEM_C1_PMON_BOX_CTRL 0x00000D80 /** Package. Uncore C-box 1 perfmon local box status MSR. @@ -4873,8 +4668,7 @@ typedef union { @endcode @note MSR_NEHALEM_C1_PMON_BOX_STATUS is defined as MSR_C1_PMON_BOX_STATUS in SDM. **/ -#define MSR_NEHALEM_C1_PMON_BOX_STATUS 0x00000D81 - +#define MSR_NEHALEM_C1_PMON_BOX_STATUS 0x00000D81 /** Package. Uncore C-box 1 perfmon local box overflow control MSR. @@ -4892,8 +4686,7 @@ typedef union { @endcode @note MSR_NEHALEM_C1_PMON_BOX_OVF_CTRL is defined as MSR_C1_PMON_BOX_OVF_CTRL in SDM. **/ -#define MSR_NEHALEM_C1_PMON_BOX_OVF_CTRL 0x00000D82 - +#define MSR_NEHALEM_C1_PMON_BOX_OVF_CTRL 0x00000D82 /** Package. Uncore C-box 1 perfmon event select MSR. @@ -4911,8 +4704,7 @@ typedef union { @endcode @note MSR_NEHALEM_C1_PMON_EVNT_SEL0 is defined as MSR_C1_PMON_EVNT_SEL0 in SDM. **/ -#define MSR_NEHALEM_C1_PMON_EVNT_SEL0 0x00000D90 - +#define MSR_NEHALEM_C1_PMON_EVNT_SEL0 0x00000D90 /** Package. Uncore C-box 1 perfmon counter MSR. @@ -4930,8 +4722,7 @@ typedef union { @endcode @note MSR_NEHALEM_C1_PMON_CTR0 is defined as MSR_C1_PMON_CTR0 in SDM. **/ -#define MSR_NEHALEM_C1_PMON_CTR0 0x00000D91 - +#define MSR_NEHALEM_C1_PMON_CTR0 0x00000D91 /** Package. Uncore C-box 1 perfmon event select MSR. @@ -4949,8 +4740,7 @@ typedef union { @endcode @note MSR_NEHALEM_C1_PMON_EVNT_SEL1 is defined as MSR_C1_PMON_EVNT_SEL1 in SDM. **/ -#define MSR_NEHALEM_C1_PMON_EVNT_SEL1 0x00000D92 - +#define MSR_NEHALEM_C1_PMON_EVNT_SEL1 0x00000D92 /** Package. Uncore C-box 1 perfmon counter MSR. @@ -4968,8 +4758,7 @@ typedef union { @endcode @note MSR_NEHALEM_C1_PMON_CTR1 is defined as MSR_C1_PMON_CTR1 in SDM. **/ -#define MSR_NEHALEM_C1_PMON_CTR1 0x00000D93 - +#define MSR_NEHALEM_C1_PMON_CTR1 0x00000D93 /** Package. Uncore C-box 1 perfmon event select MSR. @@ -4987,8 +4776,7 @@ typedef union { @endcode @note MSR_NEHALEM_C1_PMON_EVNT_SEL2 is defined as MSR_C1_PMON_EVNT_SEL2 in SDM. **/ -#define MSR_NEHALEM_C1_PMON_EVNT_SEL2 0x00000D94 - +#define MSR_NEHALEM_C1_PMON_EVNT_SEL2 0x00000D94 /** Package. Uncore C-box 1 perfmon counter MSR. @@ -5006,8 +4794,7 @@ typedef union { @endcode @note MSR_NEHALEM_C1_PMON_CTR2 is defined as MSR_C1_PMON_CTR2 in SDM. **/ -#define MSR_NEHALEM_C1_PMON_CTR2 0x00000D95 - +#define MSR_NEHALEM_C1_PMON_CTR2 0x00000D95 /** Package. Uncore C-box 1 perfmon event select MSR. @@ -5025,8 +4812,7 @@ typedef union { @endcode @note MSR_NEHALEM_C1_PMON_EVNT_SEL3 is defined as MSR_C1_PMON_EVNT_SEL3 in SDM. **/ -#define MSR_NEHALEM_C1_PMON_EVNT_SEL3 0x00000D96 - +#define MSR_NEHALEM_C1_PMON_EVNT_SEL3 0x00000D96 /** Package. Uncore C-box 1 perfmon counter MSR. @@ -5044,8 +4830,7 @@ typedef union { @endcode @note MSR_NEHALEM_C1_PMON_CTR3 is defined as MSR_C1_PMON_CTR3 in SDM. **/ -#define MSR_NEHALEM_C1_PMON_CTR3 0x00000D97 - +#define MSR_NEHALEM_C1_PMON_CTR3 0x00000D97 /** Package. Uncore C-box 1 perfmon event select MSR. @@ -5063,8 +4848,7 @@ typedef union { @endcode @note MSR_NEHALEM_C1_PMON_EVNT_SEL4 is defined as MSR_C1_PMON_EVNT_SEL4 in SDM. **/ -#define MSR_NEHALEM_C1_PMON_EVNT_SEL4 0x00000D98 - +#define MSR_NEHALEM_C1_PMON_EVNT_SEL4 0x00000D98 /** Package. Uncore C-box 1 perfmon counter MSR. @@ -5082,8 +4866,7 @@ typedef union { @endcode @note MSR_NEHALEM_C1_PMON_CTR4 is defined as MSR_C1_PMON_CTR4 in SDM. **/ -#define MSR_NEHALEM_C1_PMON_CTR4 0x00000D99 - +#define MSR_NEHALEM_C1_PMON_CTR4 0x00000D99 /** Package. Uncore C-box 1 perfmon event select MSR. @@ -5101,8 +4884,7 @@ typedef union { @endcode @note MSR_NEHALEM_C1_PMON_EVNT_SEL5 is defined as MSR_C1_PMON_EVNT_SEL5 in SDM. **/ -#define MSR_NEHALEM_C1_PMON_EVNT_SEL5 0x00000D9A - +#define MSR_NEHALEM_C1_PMON_EVNT_SEL5 0x00000D9A /** Package. Uncore C-box 1 perfmon counter MSR. @@ -5120,8 +4902,7 @@ typedef union { @endcode @note MSR_NEHALEM_C1_PMON_CTR5 is defined as MSR_C1_PMON_CTR5 in SDM. **/ -#define MSR_NEHALEM_C1_PMON_CTR5 0x00000D9B - +#define MSR_NEHALEM_C1_PMON_CTR5 0x00000D9B /** Package. Uncore C-box 5 perfmon local box control MSR. @@ -5139,8 +4920,7 @@ typedef union { @endcode @note MSR_NEHALEM_C5_PMON_BOX_CTRL is defined as MSR_C5_PMON_BOX_CTRL in SDM. **/ -#define MSR_NEHALEM_C5_PMON_BOX_CTRL 0x00000DA0 - +#define MSR_NEHALEM_C5_PMON_BOX_CTRL 0x00000DA0 /** Package. Uncore C-box 5 perfmon local box status MSR. @@ -5158,8 +4938,7 @@ typedef union { @endcode @note MSR_NEHALEM_C5_PMON_BOX_STATUS is defined as MSR_C5_PMON_BOX_STATUS in SDM. **/ -#define MSR_NEHALEM_C5_PMON_BOX_STATUS 0x00000DA1 - +#define MSR_NEHALEM_C5_PMON_BOX_STATUS 0x00000DA1 /** Package. Uncore C-box 5 perfmon local box overflow control MSR. @@ -5177,8 +4956,7 @@ typedef union { @endcode @note MSR_NEHALEM_C5_PMON_BOX_OVF_CTRL is defined as MSR_C5_PMON_BOX_OVF_CTRL in SDM. **/ -#define MSR_NEHALEM_C5_PMON_BOX_OVF_CTRL 0x00000DA2 - +#define MSR_NEHALEM_C5_PMON_BOX_OVF_CTRL 0x00000DA2 /** Package. Uncore C-box 5 perfmon event select MSR. @@ -5196,8 +4974,7 @@ typedef union { @endcode @note MSR_NEHALEM_C5_PMON_EVNT_SEL0 is defined as MSR_C5_PMON_EVNT_SEL0 in SDM. **/ -#define MSR_NEHALEM_C5_PMON_EVNT_SEL0 0x00000DB0 - +#define MSR_NEHALEM_C5_PMON_EVNT_SEL0 0x00000DB0 /** Package. Uncore C-box 5 perfmon counter MSR. @@ -5215,8 +4992,7 @@ typedef union { @endcode @note MSR_NEHALEM_C5_PMON_CTR0 is defined as MSR_C5_PMON_CTR0 in SDM. **/ -#define MSR_NEHALEM_C5_PMON_CTR0 0x00000DB1 - +#define MSR_NEHALEM_C5_PMON_CTR0 0x00000DB1 /** Package. Uncore C-box 5 perfmon event select MSR. @@ -5234,8 +5010,7 @@ typedef union { @endcode @note MSR_NEHALEM_C5_PMON_EVNT_SEL1 is defined as MSR_C5_PMON_EVNT_SEL1 in SDM. **/ -#define MSR_NEHALEM_C5_PMON_EVNT_SEL1 0x00000DB2 - +#define MSR_NEHALEM_C5_PMON_EVNT_SEL1 0x00000DB2 /** Package. Uncore C-box 5 perfmon counter MSR. @@ -5253,8 +5028,7 @@ typedef union { @endcode @note MSR_NEHALEM_C5_PMON_CTR1 is defined as MSR_C5_PMON_CTR1 in SDM. **/ -#define MSR_NEHALEM_C5_PMON_CTR1 0x00000DB3 - +#define MSR_NEHALEM_C5_PMON_CTR1 0x00000DB3 /** Package. Uncore C-box 5 perfmon event select MSR. @@ -5272,8 +5046,7 @@ typedef union { @endcode @note MSR_NEHALEM_C5_PMON_EVNT_SEL2 is defined as MSR_C5_PMON_EVNT_SEL2 in SDM. **/ -#define MSR_NEHALEM_C5_PMON_EVNT_SEL2 0x00000DB4 - +#define MSR_NEHALEM_C5_PMON_EVNT_SEL2 0x00000DB4 /** Package. Uncore C-box 5 perfmon counter MSR. @@ -5291,8 +5064,7 @@ typedef union { @endcode @note MSR_NEHALEM_C5_PMON_CTR2 is defined as MSR_C5_PMON_CTR2 in SDM. **/ -#define MSR_NEHALEM_C5_PMON_CTR2 0x00000DB5 - +#define MSR_NEHALEM_C5_PMON_CTR2 0x00000DB5 /** Package. Uncore C-box 5 perfmon event select MSR. @@ -5310,8 +5082,7 @@ typedef union { @endcode @note MSR_NEHALEM_C5_PMON_EVNT_SEL3 is defined as MSR_C5_PMON_EVNT_SEL3 in SDM. **/ -#define MSR_NEHALEM_C5_PMON_EVNT_SEL3 0x00000DB6 - +#define MSR_NEHALEM_C5_PMON_EVNT_SEL3 0x00000DB6 /** Package. Uncore C-box 5 perfmon counter MSR. @@ -5329,8 +5100,7 @@ typedef union { @endcode @note MSR_NEHALEM_C5_PMON_CTR3 is defined as MSR_C5_PMON_CTR3 in SDM. **/ -#define MSR_NEHALEM_C5_PMON_CTR3 0x00000DB7 - +#define MSR_NEHALEM_C5_PMON_CTR3 0x00000DB7 /** Package. Uncore C-box 5 perfmon event select MSR. @@ -5348,8 +5118,7 @@ typedef union { @endcode @note MSR_NEHALEM_C5_PMON_EVNT_SEL4 is defined as MSR_C5_PMON_EVNT_SEL4 in SDM. **/ -#define MSR_NEHALEM_C5_PMON_EVNT_SEL4 0x00000DB8 - +#define MSR_NEHALEM_C5_PMON_EVNT_SEL4 0x00000DB8 /** Package. Uncore C-box 5 perfmon counter MSR. @@ -5367,8 +5136,7 @@ typedef union { @endcode @note MSR_NEHALEM_C5_PMON_CTR4 is defined as MSR_C5_PMON_CTR4 in SDM. **/ -#define MSR_NEHALEM_C5_PMON_CTR4 0x00000DB9 - +#define MSR_NEHALEM_C5_PMON_CTR4 0x00000DB9 /** Package. Uncore C-box 5 perfmon event select MSR. @@ -5386,8 +5154,7 @@ typedef union { @endcode @note MSR_NEHALEM_C5_PMON_EVNT_SEL5 is defined as MSR_C5_PMON_EVNT_SEL5 in SDM. **/ -#define MSR_NEHALEM_C5_PMON_EVNT_SEL5 0x00000DBA - +#define MSR_NEHALEM_C5_PMON_EVNT_SEL5 0x00000DBA /** Package. Uncore C-box 5 perfmon counter MSR. @@ -5405,8 +5172,7 @@ typedef union { @endcode @note MSR_NEHALEM_C5_PMON_CTR5 is defined as MSR_C5_PMON_CTR5 in SDM. **/ -#define MSR_NEHALEM_C5_PMON_CTR5 0x00000DBB - +#define MSR_NEHALEM_C5_PMON_CTR5 0x00000DBB /** Package. Uncore C-box 3 perfmon local box control MSR. @@ -5424,8 +5190,7 @@ typedef union { @endcode @note MSR_NEHALEM_C3_PMON_BOX_CTRL is defined as MSR_C3_PMON_BOX_CTRL in SDM. **/ -#define MSR_NEHALEM_C3_PMON_BOX_CTRL 0x00000DC0 - +#define MSR_NEHALEM_C3_PMON_BOX_CTRL 0x00000DC0 /** Package. Uncore C-box 3 perfmon local box status MSR. @@ -5443,8 +5208,7 @@ typedef union { @endcode @note MSR_NEHALEM_C3_PMON_BOX_STATUS is defined as MSR_C3_PMON_BOX_STATUS in SDM. **/ -#define MSR_NEHALEM_C3_PMON_BOX_STATUS 0x00000DC1 - +#define MSR_NEHALEM_C3_PMON_BOX_STATUS 0x00000DC1 /** Package. Uncore C-box 3 perfmon local box overflow control MSR. @@ -5462,8 +5226,7 @@ typedef union { @endcode @note MSR_NEHALEM_C3_PMON_BOX_OVF_CTRL is defined as MSR_C3_PMON_BOX_OVF_CTRL in SDM. **/ -#define MSR_NEHALEM_C3_PMON_BOX_OVF_CTRL 0x00000DC2 - +#define MSR_NEHALEM_C3_PMON_BOX_OVF_CTRL 0x00000DC2 /** Package. Uncore C-box 3 perfmon event select MSR. @@ -5481,8 +5244,7 @@ typedef union { @endcode @note MSR_NEHALEM_C3_PMON_EVNT_SEL0 is defined as MSR_C3_PMON_EVNT_SEL0 in SDM. **/ -#define MSR_NEHALEM_C3_PMON_EVNT_SEL0 0x00000DD0 - +#define MSR_NEHALEM_C3_PMON_EVNT_SEL0 0x00000DD0 /** Package. Uncore C-box 3 perfmon counter MSR. @@ -5500,8 +5262,7 @@ typedef union { @endcode @note MSR_NEHALEM_C3_PMON_CTR0 is defined as MSR_C3_PMON_CTR0 in SDM. **/ -#define MSR_NEHALEM_C3_PMON_CTR0 0x00000DD1 - +#define MSR_NEHALEM_C3_PMON_CTR0 0x00000DD1 /** Package. Uncore C-box 3 perfmon event select MSR. @@ -5519,8 +5280,7 @@ typedef union { @endcode @note MSR_NEHALEM_C3_PMON_EVNT_SEL1 is defined as MSR_C3_PMON_EVNT_SEL1 in SDM. **/ -#define MSR_NEHALEM_C3_PMON_EVNT_SEL1 0x00000DD2 - +#define MSR_NEHALEM_C3_PMON_EVNT_SEL1 0x00000DD2 /** Package. Uncore C-box 3 perfmon counter MSR. @@ -5538,8 +5298,7 @@ typedef union { @endcode @note MSR_NEHALEM_C3_PMON_CTR1 is defined as MSR_C3_PMON_CTR1 in SDM. **/ -#define MSR_NEHALEM_C3_PMON_CTR1 0x00000DD3 - +#define MSR_NEHALEM_C3_PMON_CTR1 0x00000DD3 /** Package. Uncore C-box 3 perfmon event select MSR. @@ -5557,8 +5316,7 @@ typedef union { @endcode @note MSR_NEHALEM_C3_PMON_EVNT_SEL2 is defined as MSR_C3_PMON_EVNT_SEL2 in SDM. **/ -#define MSR_NEHALEM_C3_PMON_EVNT_SEL2 0x00000DD4 - +#define MSR_NEHALEM_C3_PMON_EVNT_SEL2 0x00000DD4 /** Package. Uncore C-box 3 perfmon counter MSR. @@ -5576,8 +5334,7 @@ typedef union { @endcode @note MSR_NEHALEM_C3_PMON_CTR2 is defined as MSR_C3_PMON_CTR2 in SDM. **/ -#define MSR_NEHALEM_C3_PMON_CTR2 0x00000DD5 - +#define MSR_NEHALEM_C3_PMON_CTR2 0x00000DD5 /** Package. Uncore C-box 3 perfmon event select MSR. @@ -5595,8 +5352,7 @@ typedef union { @endcode @note MSR_NEHALEM_C3_PMON_EVNT_SEL3 is defined as MSR_C3_PMON_EVNT_SEL3 in SDM. **/ -#define MSR_NEHALEM_C3_PMON_EVNT_SEL3 0x00000DD6 - +#define MSR_NEHALEM_C3_PMON_EVNT_SEL3 0x00000DD6 /** Package. Uncore C-box 3 perfmon counter MSR. @@ -5614,8 +5370,7 @@ typedef union { @endcode @note MSR_NEHALEM_C3_PMON_CTR3 is defined as MSR_C3_PMON_CTR3 in SDM. **/ -#define MSR_NEHALEM_C3_PMON_CTR3 0x00000DD7 - +#define MSR_NEHALEM_C3_PMON_CTR3 0x00000DD7 /** Package. Uncore C-box 3 perfmon event select MSR. @@ -5633,8 +5388,7 @@ typedef union { @endcode @note MSR_NEHALEM_C3_PMON_EVNT_SEL4 is defined as MSR_C3_PMON_EVNT_SEL4 in SDM. **/ -#define MSR_NEHALEM_C3_PMON_EVNT_SEL4 0x00000DD8 - +#define MSR_NEHALEM_C3_PMON_EVNT_SEL4 0x00000DD8 /** Package. Uncore C-box 3 perfmon counter MSR. @@ -5652,8 +5406,7 @@ typedef union { @endcode @note MSR_NEHALEM_C3_PMON_CTR4 is defined as MSR_C3_PMON_CTR4 in SDM. **/ -#define MSR_NEHALEM_C3_PMON_CTR4 0x00000DD9 - +#define MSR_NEHALEM_C3_PMON_CTR4 0x00000DD9 /** Package. Uncore C-box 3 perfmon event select MSR. @@ -5671,8 +5424,7 @@ typedef union { @endcode @note MSR_NEHALEM_C3_PMON_EVNT_SEL5 is defined as MSR_C3_PMON_EVNT_SEL5 in SDM. **/ -#define MSR_NEHALEM_C3_PMON_EVNT_SEL5 0x00000DDA - +#define MSR_NEHALEM_C3_PMON_EVNT_SEL5 0x00000DDA /** Package. Uncore C-box 3 perfmon counter MSR. @@ -5690,8 +5442,7 @@ typedef union { @endcode @note MSR_NEHALEM_C3_PMON_CTR5 is defined as MSR_C3_PMON_CTR5 in SDM. **/ -#define MSR_NEHALEM_C3_PMON_CTR5 0x00000DDB - +#define MSR_NEHALEM_C3_PMON_CTR5 0x00000DDB /** Package. Uncore C-box 7 perfmon local box control MSR. @@ -5709,8 +5460,7 @@ typedef union { @endcode @note MSR_NEHALEM_C7_PMON_BOX_CTRL is defined as MSR_C7_PMON_BOX_CTRL in SDM. **/ -#define MSR_NEHALEM_C7_PMON_BOX_CTRL 0x00000DE0 - +#define MSR_NEHALEM_C7_PMON_BOX_CTRL 0x00000DE0 /** Package. Uncore C-box 7 perfmon local box status MSR. @@ -5728,8 +5478,7 @@ typedef union { @endcode @note MSR_NEHALEM_C7_PMON_BOX_STATUS is defined as MSR_C7_PMON_BOX_STATUS in SDM. **/ -#define MSR_NEHALEM_C7_PMON_BOX_STATUS 0x00000DE1 - +#define MSR_NEHALEM_C7_PMON_BOX_STATUS 0x00000DE1 /** Package. Uncore C-box 7 perfmon local box overflow control MSR. @@ -5747,8 +5496,7 @@ typedef union { @endcode @note MSR_NEHALEM_C7_PMON_BOX_OVF_CTRL is defined as MSR_C7_PMON_BOX_OVF_CTRL in SDM. **/ -#define MSR_NEHALEM_C7_PMON_BOX_OVF_CTRL 0x00000DE2 - +#define MSR_NEHALEM_C7_PMON_BOX_OVF_CTRL 0x00000DE2 /** Package. Uncore C-box 7 perfmon event select MSR. @@ -5766,8 +5514,7 @@ typedef union { @endcode @note MSR_NEHALEM_C7_PMON_EVNT_SEL0 is defined as MSR_C7_PMON_EVNT_SEL0 in SDM. **/ -#define MSR_NEHALEM_C7_PMON_EVNT_SEL0 0x00000DF0 - +#define MSR_NEHALEM_C7_PMON_EVNT_SEL0 0x00000DF0 /** Package. Uncore C-box 7 perfmon counter MSR. @@ -5785,8 +5532,7 @@ typedef union { @endcode @note MSR_NEHALEM_C7_PMON_CTR0 is defined as MSR_C7_PMON_CTR0 in SDM. **/ -#define MSR_NEHALEM_C7_PMON_CTR0 0x00000DF1 - +#define MSR_NEHALEM_C7_PMON_CTR0 0x00000DF1 /** Package. Uncore C-box 7 perfmon event select MSR. @@ -5804,8 +5550,7 @@ typedef union { @endcode @note MSR_NEHALEM_C7_PMON_EVNT_SEL1 is defined as MSR_C7_PMON_EVNT_SEL1 in SDM. **/ -#define MSR_NEHALEM_C7_PMON_EVNT_SEL1 0x00000DF2 - +#define MSR_NEHALEM_C7_PMON_EVNT_SEL1 0x00000DF2 /** Package. Uncore C-box 7 perfmon counter MSR. @@ -5823,8 +5568,7 @@ typedef union { @endcode @note MSR_NEHALEM_C7_PMON_CTR1 is defined as MSR_C7_PMON_CTR1 in SDM. **/ -#define MSR_NEHALEM_C7_PMON_CTR1 0x00000DF3 - +#define MSR_NEHALEM_C7_PMON_CTR1 0x00000DF3 /** Package. Uncore C-box 7 perfmon event select MSR. @@ -5842,8 +5586,7 @@ typedef union { @endcode @note MSR_NEHALEM_C7_PMON_EVNT_SEL2 is defined as MSR_C7_PMON_EVNT_SEL2 in SDM. **/ -#define MSR_NEHALEM_C7_PMON_EVNT_SEL2 0x00000DF4 - +#define MSR_NEHALEM_C7_PMON_EVNT_SEL2 0x00000DF4 /** Package. Uncore C-box 7 perfmon counter MSR. @@ -5861,8 +5604,7 @@ typedef union { @endcode @note MSR_NEHALEM_C7_PMON_CTR2 is defined as MSR_C7_PMON_CTR2 in SDM. **/ -#define MSR_NEHALEM_C7_PMON_CTR2 0x00000DF5 - +#define MSR_NEHALEM_C7_PMON_CTR2 0x00000DF5 /** Package. Uncore C-box 7 perfmon event select MSR. @@ -5880,8 +5622,7 @@ typedef union { @endcode @note MSR_NEHALEM_C7_PMON_EVNT_SEL3 is defined as MSR_C7_PMON_EVNT_SEL3 in SDM. **/ -#define MSR_NEHALEM_C7_PMON_EVNT_SEL3 0x00000DF6 - +#define MSR_NEHALEM_C7_PMON_EVNT_SEL3 0x00000DF6 /** Package. Uncore C-box 7 perfmon counter MSR. @@ -5899,8 +5640,7 @@ typedef union { @endcode @note MSR_NEHALEM_C7_PMON_CTR3 is defined as MSR_C7_PMON_CTR3 in SDM. **/ -#define MSR_NEHALEM_C7_PMON_CTR3 0x00000DF7 - +#define MSR_NEHALEM_C7_PMON_CTR3 0x00000DF7 /** Package. Uncore C-box 7 perfmon event select MSR. @@ -5918,8 +5658,7 @@ typedef union { @endcode @note MSR_NEHALEM_C7_PMON_EVNT_SEL4 is defined as MSR_C7_PMON_EVNT_SEL4 in SDM. **/ -#define MSR_NEHALEM_C7_PMON_EVNT_SEL4 0x00000DF8 - +#define MSR_NEHALEM_C7_PMON_EVNT_SEL4 0x00000DF8 /** Package. Uncore C-box 7 perfmon counter MSR. @@ -5937,8 +5676,7 @@ typedef union { @endcode @note MSR_NEHALEM_C7_PMON_CTR4 is defined as MSR_C7_PMON_CTR4 in SDM. **/ -#define MSR_NEHALEM_C7_PMON_CTR4 0x00000DF9 - +#define MSR_NEHALEM_C7_PMON_CTR4 0x00000DF9 /** Package. Uncore C-box 7 perfmon event select MSR. @@ -5956,8 +5694,7 @@ typedef union { @endcode @note MSR_NEHALEM_C7_PMON_EVNT_SEL5 is defined as MSR_C7_PMON_EVNT_SEL5 in SDM. **/ -#define MSR_NEHALEM_C7_PMON_EVNT_SEL5 0x00000DFA - +#define MSR_NEHALEM_C7_PMON_EVNT_SEL5 0x00000DFA /** Package. Uncore C-box 7 perfmon counter MSR. @@ -5975,8 +5712,7 @@ typedef union { @endcode @note MSR_NEHALEM_C7_PMON_CTR5 is defined as MSR_C7_PMON_CTR5 in SDM. **/ -#define MSR_NEHALEM_C7_PMON_CTR5 0x00000DFB - +#define MSR_NEHALEM_C7_PMON_CTR5 0x00000DFB /** Package. Uncore R-box 0 perfmon local box control MSR. @@ -5994,8 +5730,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_BOX_CTRL is defined as MSR_R0_PMON_BOX_CTRL in SDM. **/ -#define MSR_NEHALEM_R0_PMON_BOX_CTRL 0x00000E00 - +#define MSR_NEHALEM_R0_PMON_BOX_CTRL 0x00000E00 /** Package. Uncore R-box 0 perfmon local box status MSR. @@ -6013,8 +5748,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_BOX_STATUS is defined as MSR_R0_PMON_BOX_STATUS in SDM. **/ -#define MSR_NEHALEM_R0_PMON_BOX_STATUS 0x00000E01 - +#define MSR_NEHALEM_R0_PMON_BOX_STATUS 0x00000E01 /** Package. Uncore R-box 0 perfmon local box overflow control MSR. @@ -6032,8 +5766,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_BOX_OVF_CTRL is defined as MSR_R0_PMON_BOX_OVF_CTRL in SDM. **/ -#define MSR_NEHALEM_R0_PMON_BOX_OVF_CTRL 0x00000E02 - +#define MSR_NEHALEM_R0_PMON_BOX_OVF_CTRL 0x00000E02 /** Package. Uncore R-box 0 perfmon IPERF0 unit Port 0 select MSR. @@ -6051,8 +5784,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_IPERF0_P0 is defined as MSR_R0_PMON_IPERF0_P0 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_IPERF0_P0 0x00000E04 - +#define MSR_NEHALEM_R0_PMON_IPERF0_P0 0x00000E04 /** Package. Uncore R-box 0 perfmon IPERF0 unit Port 1 select MSR. @@ -6070,8 +5802,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_IPERF0_P1 is defined as MSR_R0_PMON_IPERF0_P1 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_IPERF0_P1 0x00000E05 - +#define MSR_NEHALEM_R0_PMON_IPERF0_P1 0x00000E05 /** Package. Uncore R-box 0 perfmon IPERF0 unit Port 2 select MSR. @@ -6089,8 +5820,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_IPERF0_P2 is defined as MSR_R0_PMON_IPERF0_P2 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_IPERF0_P2 0x00000E06 - +#define MSR_NEHALEM_R0_PMON_IPERF0_P2 0x00000E06 /** Package. Uncore R-box 0 perfmon IPERF0 unit Port 3 select MSR. @@ -6108,8 +5838,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_IPERF0_P3 is defined as MSR_R0_PMON_IPERF0_P3 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_IPERF0_P3 0x00000E07 - +#define MSR_NEHALEM_R0_PMON_IPERF0_P3 0x00000E07 /** Package. Uncore R-box 0 perfmon IPERF0 unit Port 4 select MSR. @@ -6127,8 +5856,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_IPERF0_P4 is defined as MSR_R0_PMON_IPERF0_P4 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_IPERF0_P4 0x00000E08 - +#define MSR_NEHALEM_R0_PMON_IPERF0_P4 0x00000E08 /** Package. Uncore R-box 0 perfmon IPERF0 unit Port 5 select MSR. @@ -6146,8 +5874,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_IPERF0_P5 is defined as MSR_R0_PMON_IPERF0_P5 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_IPERF0_P5 0x00000E09 - +#define MSR_NEHALEM_R0_PMON_IPERF0_P5 0x00000E09 /** Package. Uncore R-box 0 perfmon IPERF0 unit Port 6 select MSR. @@ -6165,8 +5892,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_IPERF0_P6 is defined as MSR_R0_PMON_IPERF0_P6 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_IPERF0_P6 0x00000E0A - +#define MSR_NEHALEM_R0_PMON_IPERF0_P6 0x00000E0A /** Package. Uncore R-box 0 perfmon IPERF0 unit Port 7 select MSR. @@ -6184,8 +5910,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_IPERF0_P7 is defined as MSR_R0_PMON_IPERF0_P7 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_IPERF0_P7 0x00000E0B - +#define MSR_NEHALEM_R0_PMON_IPERF0_P7 0x00000E0B /** Package. Uncore R-box 0 perfmon QLX unit Port 0 select MSR. @@ -6203,8 +5928,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_QLX_P0 is defined as MSR_R0_PMON_QLX_P0 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_QLX_P0 0x00000E0C - +#define MSR_NEHALEM_R0_PMON_QLX_P0 0x00000E0C /** Package. Uncore R-box 0 perfmon QLX unit Port 1 select MSR. @@ -6222,8 +5946,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_QLX_P1 is defined as MSR_R0_PMON_QLX_P1 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_QLX_P1 0x00000E0D - +#define MSR_NEHALEM_R0_PMON_QLX_P1 0x00000E0D /** Package. Uncore R-box 0 perfmon QLX unit Port 2 select MSR. @@ -6241,8 +5964,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_QLX_P2 is defined as MSR_R0_PMON_QLX_P2 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_QLX_P2 0x00000E0E - +#define MSR_NEHALEM_R0_PMON_QLX_P2 0x00000E0E /** Package. Uncore R-box 0 perfmon QLX unit Port 3 select MSR. @@ -6260,8 +5982,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_QLX_P3 is defined as MSR_R0_PMON_QLX_P3 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_QLX_P3 0x00000E0F - +#define MSR_NEHALEM_R0_PMON_QLX_P3 0x00000E0F /** Package. Uncore R-box 0 perfmon event select MSR. @@ -6279,8 +6000,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_EVNT_SEL0 is defined as MSR_R0_PMON_EVNT_SEL0 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_EVNT_SEL0 0x00000E10 - +#define MSR_NEHALEM_R0_PMON_EVNT_SEL0 0x00000E10 /** Package. Uncore R-box 0 perfmon counter MSR. @@ -6298,8 +6018,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_CTR0 is defined as MSR_R0_PMON_CTR0 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_CTR0 0x00000E11 - +#define MSR_NEHALEM_R0_PMON_CTR0 0x00000E11 /** Package. Uncore R-box 0 perfmon event select MSR. @@ -6317,8 +6036,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_EVNT_SEL1 is defined as MSR_R0_PMON_EVNT_SEL1 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_EVNT_SEL1 0x00000E12 - +#define MSR_NEHALEM_R0_PMON_EVNT_SEL1 0x00000E12 /** Package. Uncore R-box 0 perfmon counter MSR. @@ -6336,8 +6054,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_CTR1 is defined as MSR_R0_PMON_CTR1 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_CTR1 0x00000E13 - +#define MSR_NEHALEM_R0_PMON_CTR1 0x00000E13 /** Package. Uncore R-box 0 perfmon event select MSR. @@ -6355,8 +6072,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_EVNT_SEL2 is defined as MSR_R0_PMON_EVNT_SEL2 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_EVNT_SEL2 0x00000E14 - +#define MSR_NEHALEM_R0_PMON_EVNT_SEL2 0x00000E14 /** Package. Uncore R-box 0 perfmon counter MSR. @@ -6374,8 +6090,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_CTR2 is defined as MSR_R0_PMON_CTR2 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_CTR2 0x00000E15 - +#define MSR_NEHALEM_R0_PMON_CTR2 0x00000E15 /** Package. Uncore R-box 0 perfmon event select MSR. @@ -6393,8 +6108,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_EVNT_SEL3 is defined as MSR_R0_PMON_EVNT_SEL3 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_EVNT_SEL3 0x00000E16 - +#define MSR_NEHALEM_R0_PMON_EVNT_SEL3 0x00000E16 /** Package. Uncore R-box 0 perfmon counter MSR. @@ -6412,8 +6126,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_CTR3 is defined as MSR_R0_PMON_CTR3 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_CTR3 0x00000E17 - +#define MSR_NEHALEM_R0_PMON_CTR3 0x00000E17 /** Package. Uncore R-box 0 perfmon event select MSR. @@ -6431,8 +6144,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_EVNT_SEL4 is defined as MSR_R0_PMON_EVNT_SEL4 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_EVNT_SEL4 0x00000E18 - +#define MSR_NEHALEM_R0_PMON_EVNT_SEL4 0x00000E18 /** Package. Uncore R-box 0 perfmon counter MSR. @@ -6450,8 +6162,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_CTR4 is defined as MSR_R0_PMON_CTR4 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_CTR4 0x00000E19 - +#define MSR_NEHALEM_R0_PMON_CTR4 0x00000E19 /** Package. Uncore R-box 0 perfmon event select MSR. @@ -6469,8 +6180,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_EVNT_SEL5 is defined as MSR_R0_PMON_EVNT_SEL5 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_EVNT_SEL5 0x00000E1A - +#define MSR_NEHALEM_R0_PMON_EVNT_SEL5 0x00000E1A /** Package. Uncore R-box 0 perfmon counter MSR. @@ -6488,8 +6198,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_CTR5 is defined as MSR_R0_PMON_CTR5 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_CTR5 0x00000E1B - +#define MSR_NEHALEM_R0_PMON_CTR5 0x00000E1B /** Package. Uncore R-box 0 perfmon event select MSR. @@ -6507,8 +6216,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_EVNT_SEL6 is defined as MSR_R0_PMON_EVNT_SEL6 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_EVNT_SEL6 0x00000E1C - +#define MSR_NEHALEM_R0_PMON_EVNT_SEL6 0x00000E1C /** Package. Uncore R-box 0 perfmon counter MSR. @@ -6526,8 +6234,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_CTR6 is defined as MSR_R0_PMON_CTR6 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_CTR6 0x00000E1D - +#define MSR_NEHALEM_R0_PMON_CTR6 0x00000E1D /** Package. Uncore R-box 0 perfmon event select MSR. @@ -6545,8 +6252,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_EVNT_SEL7 is defined as MSR_R0_PMON_EVNT_SEL7 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_EVNT_SEL7 0x00000E1E - +#define MSR_NEHALEM_R0_PMON_EVNT_SEL7 0x00000E1E /** Package. Uncore R-box 0 perfmon counter MSR. @@ -6564,8 +6270,7 @@ typedef union { @endcode @note MSR_NEHALEM_R0_PMON_CTR7 is defined as MSR_R0_PMON_CTR7 in SDM. **/ -#define MSR_NEHALEM_R0_PMON_CTR7 0x00000E1F - +#define MSR_NEHALEM_R0_PMON_CTR7 0x00000E1F /** Package. Uncore R-box 1 perfmon local box control MSR. @@ -6583,8 +6288,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_BOX_CTRL is defined as MSR_R1_PMON_BOX_CTRL in SDM. **/ -#define MSR_NEHALEM_R1_PMON_BOX_CTRL 0x00000E20 - +#define MSR_NEHALEM_R1_PMON_BOX_CTRL 0x00000E20 /** Package. Uncore R-box 1 perfmon local box status MSR. @@ -6602,8 +6306,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_BOX_STATUS is defined as MSR_R1_PMON_BOX_STATUS in SDM. **/ -#define MSR_NEHALEM_R1_PMON_BOX_STATUS 0x00000E21 - +#define MSR_NEHALEM_R1_PMON_BOX_STATUS 0x00000E21 /** Package. Uncore R-box 1 perfmon local box overflow control MSR. @@ -6621,8 +6324,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_BOX_OVF_CTRL is defined as MSR_R1_PMON_BOX_OVF_CTRL in SDM. **/ -#define MSR_NEHALEM_R1_PMON_BOX_OVF_CTRL 0x00000E22 - +#define MSR_NEHALEM_R1_PMON_BOX_OVF_CTRL 0x00000E22 /** Package. Uncore R-box 1 perfmon IPERF1 unit Port 8 select MSR. @@ -6640,8 +6342,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_IPERF1_P8 is defined as MSR_R1_PMON_IPERF1_P8 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_IPERF1_P8 0x00000E24 - +#define MSR_NEHALEM_R1_PMON_IPERF1_P8 0x00000E24 /** Package. Uncore R-box 1 perfmon IPERF1 unit Port 9 select MSR. @@ -6659,8 +6360,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_IPERF1_P9 is defined as MSR_R1_PMON_IPERF1_P9 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_IPERF1_P9 0x00000E25 - +#define MSR_NEHALEM_R1_PMON_IPERF1_P9 0x00000E25 /** Package. Uncore R-box 1 perfmon IPERF1 unit Port 10 select MSR. @@ -6678,8 +6378,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_IPERF1_P10 is defined as MSR_R1_PMON_IPERF1_P10 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_IPERF1_P10 0x00000E26 - +#define MSR_NEHALEM_R1_PMON_IPERF1_P10 0x00000E26 /** Package. Uncore R-box 1 perfmon IPERF1 unit Port 11 select MSR. @@ -6697,8 +6396,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_IPERF1_P11 is defined as MSR_R1_PMON_IPERF1_P11 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_IPERF1_P11 0x00000E27 - +#define MSR_NEHALEM_R1_PMON_IPERF1_P11 0x00000E27 /** Package. Uncore R-box 1 perfmon IPERF1 unit Port 12 select MSR. @@ -6716,8 +6414,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_IPERF1_P12 is defined as MSR_R1_PMON_IPERF1_P12 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_IPERF1_P12 0x00000E28 - +#define MSR_NEHALEM_R1_PMON_IPERF1_P12 0x00000E28 /** Package. Uncore R-box 1 perfmon IPERF1 unit Port 13 select MSR. @@ -6735,8 +6432,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_IPERF1_P13 is defined as MSR_R1_PMON_IPERF1_P13 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_IPERF1_P13 0x00000E29 - +#define MSR_NEHALEM_R1_PMON_IPERF1_P13 0x00000E29 /** Package. Uncore R-box 1 perfmon IPERF1 unit Port 14 select MSR. @@ -6754,8 +6450,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_IPERF1_P14 is defined as MSR_R1_PMON_IPERF1_P14 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_IPERF1_P14 0x00000E2A - +#define MSR_NEHALEM_R1_PMON_IPERF1_P14 0x00000E2A /** Package. Uncore R-box 1 perfmon IPERF1 unit Port 15 select MSR. @@ -6773,8 +6468,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_IPERF1_P15 is defined as MSR_R1_PMON_IPERF1_P15 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_IPERF1_P15 0x00000E2B - +#define MSR_NEHALEM_R1_PMON_IPERF1_P15 0x00000E2B /** Package. Uncore R-box 1 perfmon QLX unit Port 4 select MSR. @@ -6792,8 +6486,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_QLX_P4 is defined as MSR_R1_PMON_QLX_P4 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_QLX_P4 0x00000E2C - +#define MSR_NEHALEM_R1_PMON_QLX_P4 0x00000E2C /** Package. Uncore R-box 1 perfmon QLX unit Port 5 select MSR. @@ -6811,8 +6504,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_QLX_P5 is defined as MSR_R1_PMON_QLX_P5 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_QLX_P5 0x00000E2D - +#define MSR_NEHALEM_R1_PMON_QLX_P5 0x00000E2D /** Package. Uncore R-box 1 perfmon QLX unit Port 6 select MSR. @@ -6830,8 +6522,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_QLX_P6 is defined as MSR_R1_PMON_QLX_P6 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_QLX_P6 0x00000E2E - +#define MSR_NEHALEM_R1_PMON_QLX_P6 0x00000E2E /** Package. Uncore R-box 1 perfmon QLX unit Port 7 select MSR. @@ -6849,8 +6540,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_QLX_P7 is defined as MSR_R1_PMON_QLX_P7 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_QLX_P7 0x00000E2F - +#define MSR_NEHALEM_R1_PMON_QLX_P7 0x00000E2F /** Package. Uncore R-box 1 perfmon event select MSR. @@ -6868,8 +6558,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_EVNT_SEL8 is defined as MSR_R1_PMON_EVNT_SEL8 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_EVNT_SEL8 0x00000E30 - +#define MSR_NEHALEM_R1_PMON_EVNT_SEL8 0x00000E30 /** Package. Uncore R-box 1 perfmon counter MSR. @@ -6887,8 +6576,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_CTR8 is defined as MSR_R1_PMON_CTR8 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_CTR8 0x00000E31 - +#define MSR_NEHALEM_R1_PMON_CTR8 0x00000E31 /** Package. Uncore R-box 1 perfmon event select MSR. @@ -6906,8 +6594,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_EVNT_SEL9 is defined as MSR_R1_PMON_EVNT_SEL9 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_EVNT_SEL9 0x00000E32 - +#define MSR_NEHALEM_R1_PMON_EVNT_SEL9 0x00000E32 /** Package. Uncore R-box 1 perfmon counter MSR. @@ -6925,8 +6612,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_CTR9 is defined as MSR_R1_PMON_CTR9 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_CTR9 0x00000E33 - +#define MSR_NEHALEM_R1_PMON_CTR9 0x00000E33 /** Package. Uncore R-box 1 perfmon event select MSR. @@ -6944,8 +6630,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_EVNT_SEL10 is defined as MSR_R1_PMON_EVNT_SEL10 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_EVNT_SEL10 0x00000E34 - +#define MSR_NEHALEM_R1_PMON_EVNT_SEL10 0x00000E34 /** Package. Uncore R-box 1 perfmon counter MSR. @@ -6963,8 +6648,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_CTR10 is defined as MSR_R1_PMON_CTR10 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_CTR10 0x00000E35 - +#define MSR_NEHALEM_R1_PMON_CTR10 0x00000E35 /** Package. Uncore R-box 1 perfmon event select MSR. @@ -6982,8 +6666,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_EVNT_SEL11 is defined as MSR_R1_PMON_EVNT_SEL11 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_EVNT_SEL11 0x00000E36 - +#define MSR_NEHALEM_R1_PMON_EVNT_SEL11 0x00000E36 /** Package. Uncore R-box 1 perfmon counter MSR. @@ -7001,8 +6684,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_CTR11 is defined as MSR_R1_PMON_CTR11 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_CTR11 0x00000E37 - +#define MSR_NEHALEM_R1_PMON_CTR11 0x00000E37 /** Package. Uncore R-box 1 perfmon event select MSR. @@ -7020,8 +6702,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_EVNT_SEL12 is defined as MSR_R1_PMON_EVNT_SEL12 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_EVNT_SEL12 0x00000E38 - +#define MSR_NEHALEM_R1_PMON_EVNT_SEL12 0x00000E38 /** Package. Uncore R-box 1 perfmon counter MSR. @@ -7039,8 +6720,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_CTR12 is defined as MSR_R1_PMON_CTR12 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_CTR12 0x00000E39 - +#define MSR_NEHALEM_R1_PMON_CTR12 0x00000E39 /** Package. Uncore R-box 1 perfmon event select MSR. @@ -7058,8 +6738,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_EVNT_SEL13 is defined as MSR_R1_PMON_EVNT_SEL13 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_EVNT_SEL13 0x00000E3A - +#define MSR_NEHALEM_R1_PMON_EVNT_SEL13 0x00000E3A /** Package. Uncore R-box 1perfmon counter MSR. @@ -7077,8 +6756,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_CTR13 is defined as MSR_R1_PMON_CTR13 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_CTR13 0x00000E3B - +#define MSR_NEHALEM_R1_PMON_CTR13 0x00000E3B /** Package. Uncore R-box 1 perfmon event select MSR. @@ -7096,8 +6774,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_EVNT_SEL14 is defined as MSR_R1_PMON_EVNT_SEL14 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_EVNT_SEL14 0x00000E3C - +#define MSR_NEHALEM_R1_PMON_EVNT_SEL14 0x00000E3C /** Package. Uncore R-box 1 perfmon counter MSR. @@ -7115,8 +6792,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_CTR14 is defined as MSR_R1_PMON_CTR14 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_CTR14 0x00000E3D - +#define MSR_NEHALEM_R1_PMON_CTR14 0x00000E3D /** Package. Uncore R-box 1 perfmon event select MSR. @@ -7134,8 +6810,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_EVNT_SEL15 is defined as MSR_R1_PMON_EVNT_SEL15 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_EVNT_SEL15 0x00000E3E - +#define MSR_NEHALEM_R1_PMON_EVNT_SEL15 0x00000E3E /** Package. Uncore R-box 1 perfmon counter MSR. @@ -7153,8 +6828,7 @@ typedef union { @endcode @note MSR_NEHALEM_R1_PMON_CTR15 is defined as MSR_R1_PMON_CTR15 in SDM. **/ -#define MSR_NEHALEM_R1_PMON_CTR15 0x00000E3F - +#define MSR_NEHALEM_R1_PMON_CTR15 0x00000E3F /** Package. Uncore B-box 0 perfmon local box match MSR. @@ -7172,8 +6846,7 @@ typedef union { @endcode @note MSR_NEHALEM_B0_PMON_MATCH is defined as MSR_B0_PMON_MATCH in SDM. **/ -#define MSR_NEHALEM_B0_PMON_MATCH 0x00000E45 - +#define MSR_NEHALEM_B0_PMON_MATCH 0x00000E45 /** Package. Uncore B-box 0 perfmon local box mask MSR. @@ -7191,8 +6864,7 @@ typedef union { @endcode @note MSR_NEHALEM_B0_PMON_MASK is defined as MSR_B0_PMON_MASK in SDM. **/ -#define MSR_NEHALEM_B0_PMON_MASK 0x00000E46 - +#define MSR_NEHALEM_B0_PMON_MASK 0x00000E46 /** Package. Uncore S-box 0 perfmon local box match MSR. @@ -7210,8 +6882,7 @@ typedef union { @endcode @note MSR_NEHALEM_S0_PMON_MATCH is defined as MSR_S0_PMON_MATCH in SDM. **/ -#define MSR_NEHALEM_S0_PMON_MATCH 0x00000E49 - +#define MSR_NEHALEM_S0_PMON_MATCH 0x00000E49 /** Package. Uncore S-box 0 perfmon local box mask MSR. @@ -7229,8 +6900,7 @@ typedef union { @endcode @note MSR_NEHALEM_S0_PMON_MASK is defined as MSR_S0_PMON_MASK in SDM. **/ -#define MSR_NEHALEM_S0_PMON_MASK 0x00000E4A - +#define MSR_NEHALEM_S0_PMON_MASK 0x00000E4A /** Package. Uncore B-box 1 perfmon local box match MSR. @@ -7248,8 +6918,7 @@ typedef union { @endcode @note MSR_NEHALEM_B1_PMON_MATCH is defined as MSR_B1_PMON_MATCH in SDM. **/ -#define MSR_NEHALEM_B1_PMON_MATCH 0x00000E4D - +#define MSR_NEHALEM_B1_PMON_MATCH 0x00000E4D /** Package. Uncore B-box 1 perfmon local box mask MSR. @@ -7267,8 +6936,7 @@ typedef union { @endcode @note MSR_NEHALEM_B1_PMON_MASK is defined as MSR_B1_PMON_MASK in SDM. **/ -#define MSR_NEHALEM_B1_PMON_MASK 0x00000E4E - +#define MSR_NEHALEM_B1_PMON_MASK 0x00000E4E /** Package. Uncore M-box 0 perfmon local box address match/mask config MSR. @@ -7286,8 +6954,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_MM_CONFIG is defined as MSR_M0_PMON_MM_CONFIG in SDM. **/ -#define MSR_NEHALEM_M0_PMON_MM_CONFIG 0x00000E54 - +#define MSR_NEHALEM_M0_PMON_MM_CONFIG 0x00000E54 /** Package. Uncore M-box 0 perfmon local box address match MSR. @@ -7305,8 +6972,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_ADDR_MATCH is defined as MSR_M0_PMON_ADDR_MATCH in SDM. **/ -#define MSR_NEHALEM_M0_PMON_ADDR_MATCH 0x00000E55 - +#define MSR_NEHALEM_M0_PMON_ADDR_MATCH 0x00000E55 /** Package. Uncore M-box 0 perfmon local box address mask MSR. @@ -7324,8 +6990,7 @@ typedef union { @endcode @note MSR_NEHALEM_M0_PMON_ADDR_MASK is defined as MSR_M0_PMON_ADDR_MASK in SDM. **/ -#define MSR_NEHALEM_M0_PMON_ADDR_MASK 0x00000E56 - +#define MSR_NEHALEM_M0_PMON_ADDR_MASK 0x00000E56 /** Package. Uncore S-box 1 perfmon local box match MSR. @@ -7343,8 +7008,7 @@ typedef union { @endcode @note MSR_NEHALEM_S1_PMON_MATCH is defined as MSR_S1_PMON_MATCH in SDM. **/ -#define MSR_NEHALEM_S1_PMON_MATCH 0x00000E59 - +#define MSR_NEHALEM_S1_PMON_MATCH 0x00000E59 /** Package. Uncore S-box 1 perfmon local box mask MSR. @@ -7362,8 +7026,7 @@ typedef union { @endcode @note MSR_NEHALEM_S1_PMON_MASK is defined as MSR_S1_PMON_MASK in SDM. **/ -#define MSR_NEHALEM_S1_PMON_MASK 0x00000E5A - +#define MSR_NEHALEM_S1_PMON_MASK 0x00000E5A /** Package. Uncore M-box 1 perfmon local box address match/mask config MSR. @@ -7381,8 +7044,7 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_MM_CONFIG is defined as MSR_M1_PMON_MM_CONFIG in SDM. **/ -#define MSR_NEHALEM_M1_PMON_MM_CONFIG 0x00000E5C - +#define MSR_NEHALEM_M1_PMON_MM_CONFIG 0x00000E5C /** Package. Uncore M-box 1 perfmon local box address match MSR. @@ -7400,8 +7062,7 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_ADDR_MATCH is defined as MSR_M1_PMON_ADDR_MATCH in SDM. **/ -#define MSR_NEHALEM_M1_PMON_ADDR_MATCH 0x00000E5D - +#define MSR_NEHALEM_M1_PMON_ADDR_MATCH 0x00000E5D /** Package. Uncore M-box 1 perfmon local box address mask MSR. @@ -7419,6 +7080,6 @@ typedef union { @endcode @note MSR_NEHALEM_M1_PMON_ADDR_MASK is defined as MSR_M1_PMON_ADDR_MASK in SDM. **/ -#define MSR_NEHALEM_M1_PMON_ADDR_MASK 0x00000E5E +#define MSR_NEHALEM_M1_PMON_ADDR_MASK 0x00000E5E #endif diff --git a/MdePkg/Include/Register/Intel/Msr/P6Msr.h b/MdePkg/Include/Register/Intel/Msr/P6Msr.h index d4af277..ea363e9 100644 --- a/MdePkg/Include/Register/Intel/Msr/P6Msr.h +++ b/MdePkg/Include/Register/Intel/Msr/P6Msr.h @@ -57,8 +57,7 @@ @endcode @note MSR_P6_P5_MC_ADDR is defined as P5_MC_ADDR in SDM. **/ -#define MSR_P6_P5_MC_ADDR 0x00000000 - +#define MSR_P6_P5_MC_ADDR 0x00000000 /** See Section 2.22, "MSRs in Pentium Processors.". @@ -76,8 +75,7 @@ @endcode @note MSR_P6_P5_MC_TYPE is defined as P5_MC_TYPE in SDM. **/ -#define MSR_P6_P5_MC_TYPE 0x00000001 - +#define MSR_P6_P5_MC_TYPE 0x00000001 /** See Section 17.17, "Time-Stamp Counter.". @@ -95,8 +93,7 @@ @endcode @note MSR_P6_TSC is defined as TSC in SDM. **/ -#define MSR_P6_TSC 0x00000010 - +#define MSR_P6_TSC 0x00000010 /** Platform ID (R) The operating system can use this MSR to determine "slot" @@ -116,7 +113,7 @@ @endcode @note MSR_P6_IA32_PLATFORM_ID is defined as IA32_PLATFORM_ID in SDM. **/ -#define MSR_P6_IA32_PLATFORM_ID 0x00000017 +#define MSR_P6_IA32_PLATFORM_ID 0x00000017 /** MSR information returned for MSR index #MSR_P6_IA32_PLATFORM_ID @@ -126,8 +123,8 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:32; - UINT32 Reserved2:18; + UINT32 Reserved1 : 32; + UINT32 Reserved2 : 18; /// /// [Bits 52:50] Platform Id (R) Contains information concerning the /// intended platform for the processor. @@ -142,25 +139,24 @@ typedef union { /// 1 1 0 Processor Flag 6 /// 1 1 1 Processor Flag 7 /// - UINT32 PlatformId:3; + UINT32 PlatformId : 3; /// /// [Bits 56:53] L2 Cache Latency Read. /// - UINT32 L2CacheLatencyRead:4; - UINT32 Reserved3:3; + UINT32 L2CacheLatencyRead : 4; + UINT32 Reserved3 : 3; /// /// [Bit 60] Clock Frequency Ratio Read. /// - UINT32 ClockFrequencyRatioRead:1; - UINT32 Reserved4:3; + UINT32 ClockFrequencyRatioRead : 1; + UINT32 Reserved4 : 3; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_P6_IA32_PLATFORM_ID_REGISTER; - /** Section 10.4.4, "Local APIC Status and Location.". @@ -179,7 +175,7 @@ typedef union { @endcode @note MSR_P6_APIC_BASE is defined as APIC_BASE in SDM. **/ -#define MSR_P6_APIC_BASE 0x0000001B +#define MSR_P6_APIC_BASE 0x0000001B /** MSR information returned for MSR index #MSR_P6_APIC_BASE @@ -189,34 +185,33 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:8; + UINT32 Reserved1 : 8; /// /// [Bit 8] Boot Strap Processor indicator Bit 1 = BSP. /// - UINT32 BSP:1; - UINT32 Reserved2:2; + UINT32 BSP : 1; + UINT32 Reserved2 : 2; /// /// [Bit 11] APIC Global Enable Bit - Permanent till reset 1 = Enabled 0 = /// Disabled. /// - UINT32 EN:1; + UINT32 EN : 1; /// /// [Bits 31:12] APIC Base Address. /// - UINT32 ApicBase:20; - UINT32 Reserved3:32; + UINT32 ApicBase : 20; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_P6_APIC_BASE_REGISTER; - /** Processor Hard Power-On Configuration (R/W) Enables and disables processor features; (R) indicates current processor configuration. @@ -236,7 +231,7 @@ typedef union { @endcode @note MSR_P6_EBL_CR_POWERON is defined as EBL_CR_POWERON in SDM. **/ -#define MSR_P6_EBL_CR_POWERON 0x0000002A +#define MSR_P6_EBL_CR_POWERON 0x0000002A /** MSR information returned for MSR index #MSR_P6_EBL_CR_POWERON @@ -246,103 +241,102 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:1; + UINT32 Reserved1 : 1; /// /// [Bit 1] Data Error Checking Enable (R/W) 1 = Enabled 0 = Disabled. /// - UINT32 DataErrorCheckingEnable:1; + UINT32 DataErrorCheckingEnable : 1; /// /// [Bit 2] Response Error Checking Enable FRCERR Observation Enable (R/W) /// 1 = Enabled 0 = Disabled. /// - UINT32 ResponseErrorCheckingEnable:1; + UINT32 ResponseErrorCheckingEnable : 1; /// /// [Bit 3] AERR# Drive Enable (R/W) 1 = Enabled 0 = Disabled. /// - UINT32 AERR_DriveEnable:1; + UINT32 AERR_DriveEnable : 1; /// /// [Bit 4] BERR# Enable for Initiator Bus Requests (R/W) 1 = Enabled 0 = /// Disabled. /// - UINT32 BERR_Enable:1; - UINT32 Reserved2:1; + UINT32 BERR_Enable : 1; + UINT32 Reserved2 : 1; /// /// [Bit 6] BERR# Driver Enable for Initiator Internal Errors (R/W) 1 = /// Enabled 0 = Disabled. /// - UINT32 BERR_DriverEnable:1; + UINT32 BERR_DriverEnable : 1; /// /// [Bit 7] BINIT# Driver Enable (R/W) 1 = Enabled 0 = Disabled. /// - UINT32 BINIT_DriverEnable:1; + UINT32 BINIT_DriverEnable : 1; /// /// [Bit 8] Output Tri-state Enabled (R) 1 = Enabled 0 = Disabled. /// - UINT32 OutputTriStateEnable:1; + UINT32 OutputTriStateEnable : 1; /// /// [Bit 9] Execute BIST (R) 1 = Enabled 0 = Disabled. /// - UINT32 ExecuteBIST:1; + UINT32 ExecuteBIST : 1; /// /// [Bit 10] AERR# Observation Enabled (R) 1 = Enabled 0 = Disabled. /// - UINT32 AERR_ObservationEnabled:1; - UINT32 Reserved3:1; + UINT32 AERR_ObservationEnabled : 1; + UINT32 Reserved3 : 1; /// /// [Bit 12] BINIT# Observation Enabled (R) 1 = Enabled 0 = Disabled. /// - UINT32 BINIT_ObservationEnabled:1; + UINT32 BINIT_ObservationEnabled : 1; /// /// [Bit 13] In Order Queue Depth (R) 1 = 1 0 = 8. /// - UINT32 InOrderQueueDepth:1; + UINT32 InOrderQueueDepth : 1; /// /// [Bit 14] 1-MByte Power on Reset Vector (R) 1 = 1MByte 0 = 4GBytes. /// - UINT32 ResetVector:1; + UINT32 ResetVector : 1; /// /// [Bit 15] FRC Mode Enable (R) 1 = Enabled 0 = Disabled. /// - UINT32 FRCModeEnable:1; + UINT32 FRCModeEnable : 1; /// /// [Bits 17:16] APIC Cluster ID (R). /// - UINT32 APICClusterID:2; + UINT32 APICClusterID : 2; /// /// [Bits 19:18] System Bus Frequency (R) 00 = 66MHz 10 = 100Mhz 01 = /// 133MHz 11 = Reserved. /// - UINT32 SystemBusFrequency:2; + UINT32 SystemBusFrequency : 2; /// /// [Bits 21:20] Symmetric Arbitration ID (R). /// - UINT32 SymmetricArbitrationID:2; + UINT32 SymmetricArbitrationID : 2; /// /// [Bits 25:22] Clock Frequency Ratio (R). /// - UINT32 ClockFrequencyRatio:4; + UINT32 ClockFrequencyRatio : 4; /// /// [Bit 26] Low Power Mode Enable (R/W). /// - UINT32 LowPowerModeEnable:1; + UINT32 LowPowerModeEnable : 1; /// /// [Bit 27] Clock Frequency Ratio. /// - UINT32 ClockFrequencyRatio1:1; - UINT32 Reserved4:4; - UINT32 Reserved5:32; + UINT32 ClockFrequencyRatio1 : 1; + UINT32 Reserved4 : 4; + UINT32 Reserved5 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_P6_EBL_CR_POWERON_REGISTER; - /** Test Control Register. @@ -361,7 +355,7 @@ typedef union { @endcode @note MSR_P6_TEST_CTL is defined as TEST_CTL in SDM. **/ -#define MSR_P6_TEST_CTL 0x00000033 +#define MSR_P6_TEST_CTL 0x00000033 /** MSR information returned for MSR index #MSR_P6_TEST_CTL @@ -371,28 +365,27 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:30; + UINT32 Reserved1 : 30; /// /// [Bit 30] Streaming Buffer Disable. /// - UINT32 StreamingBufferDisable:1; + UINT32 StreamingBufferDisable : 1; /// /// [Bit 31] Disable LOCK# Assertion for split locked access. /// - UINT32 Disable_LOCK:1; - UINT32 Reserved2:32; + UINT32 Disable_LOCK : 1; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_P6_TEST_CTL_REGISTER; - /** BIOS Update Trigger Register. @@ -409,8 +402,7 @@ typedef union { @endcode @note MSR_P6_BIOS_UPDT_TRIG is defined as BIOS_UPDT_TRIG in SDM. **/ -#define MSR_P6_BIOS_UPDT_TRIG 0x00000079 - +#define MSR_P6_BIOS_UPDT_TRIG 0x00000079 /** Chunk n data register D[63:0]: used to write to and read from the L2. @@ -431,12 +423,11 @@ typedef union { MSR_P6_BBL_CR_D2 is defined as BBL_CR_D2 in SDM. @{ **/ -#define MSR_P6_BBL_CR_D0 0x00000088 -#define MSR_P6_BBL_CR_D1 0x00000089 -#define MSR_P6_BBL_CR_D2 0x0000008A +#define MSR_P6_BBL_CR_D0 0x00000088 +#define MSR_P6_BBL_CR_D1 0x00000089 +#define MSR_P6_BBL_CR_D2 0x0000008A /// @} - /** BIOS Update Signature Register or Chunk 3 data register D[63:0] Used to write to and read from the L2 depending on the usage model. @@ -454,8 +445,7 @@ typedef union { @endcode @note MSR_P6_BIOS_SIGN is defined as BIOS_SIGN in SDM. **/ -#define MSR_P6_BIOS_SIGN 0x0000008B - +#define MSR_P6_BIOS_SIGN 0x0000008B /** @@ -475,11 +465,10 @@ typedef union { MSR_P6_PERFCTR1 is defined as PERFCTR1 in SDM. @{ **/ -#define MSR_P6_PERFCTR0 0x000000C1 -#define MSR_P6_PERFCTR1 0x000000C2 +#define MSR_P6_PERFCTR0 0x000000C1 +#define MSR_P6_PERFCTR1 0x000000C2 /// @} - /** @@ -496,8 +485,7 @@ typedef union { @endcode @note MSR_P6_MTRRCAP is defined as MTRRCAP in SDM. **/ -#define MSR_P6_MTRRCAP 0x000000FE - +#define MSR_P6_MTRRCAP 0x000000FE /** Address register: used to send specified address (A31-A3) to L2 during cache @@ -518,7 +506,7 @@ typedef union { @endcode @note MSR_P6_BBL_CR_ADDR is defined as BBL_CR_ADDR in SDM. **/ -#define MSR_P6_BBL_CR_ADDR 0x00000116 +#define MSR_P6_BBL_CR_ADDR 0x00000116 /** MSR information returned for MSR index #MSR_P6_BBL_CR_ADDR @@ -528,24 +516,23 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:3; + UINT32 Reserved1 : 3; /// /// [Bits 31:3] Address bits /// - UINT32 Address:29; - UINT32 Reserved2:32; + UINT32 Address : 29; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_P6_BBL_CR_ADDR_REGISTER; - /** Data ECC register D[7:0]: used to write ECC and read ECC to/from L2. @@ -562,8 +549,7 @@ typedef union { @endcode @note MSR_P6_BBL_CR_DECC is defined as BBL_CR_DECC in SDM. **/ -#define MSR_P6_BBL_CR_DECC 0x00000118 - +#define MSR_P6_BBL_CR_DECC 0x00000118 /** Control register: used to program L2 commands to be issued via cache @@ -584,7 +570,7 @@ typedef union { @endcode @note MSR_P6_BBL_CR_CTL is defined as BBL_CR_CTL in SDM. **/ -#define MSR_P6_BBL_CR_CTL 0x00000119 +#define MSR_P6_BBL_CR_CTL 0x00000119 /** MSR information returned for MSR index #MSR_P6_BBL_CR_CTL @@ -605,56 +591,55 @@ typedef union { /// Tag Write w/ Data Write (TWW) /// Tag Write (TW). /// - UINT32 L2Command:5; + UINT32 L2Command : 5; /// /// [Bits 6:5] State to L2 /// - UINT32 StateToL2:2; - UINT32 Reserved:1; + UINT32 StateToL2 : 2; + UINT32 Reserved : 1; /// /// [Bits 9:8] Way to L2. /// - UINT32 WayToL2:2; + UINT32 WayToL2 : 2; /// /// [Bits 11:10] Way 0 - 00, Way 1 - 01, Way 2 - 10, Way 3 - 11. /// - UINT32 Way:2; + UINT32 Way : 2; /// /// [Bits 13:12] Modified - 11,Exclusive - 10, Shared - 01, Invalid - 00. /// - UINT32 MESI:2; + UINT32 MESI : 2; /// /// [Bits 15:14] State from L2. /// - UINT32 StateFromL2:2; - UINT32 Reserved2:1; + UINT32 StateFromL2 : 2; + UINT32 Reserved2 : 1; /// /// [Bit 17] L2 Hit. /// - UINT32 L2Hit:1; - UINT32 Reserved3:1; + UINT32 L2Hit : 1; + UINT32 Reserved3 : 1; /// /// [Bits 20:19] User supplied ECC. /// - UINT32 UserEcc:2; + UINT32 UserEcc : 2; /// /// [Bit 21] Processor number Disable = 1 Enable = 0 Reserved. /// - UINT32 ProcessorNumber:1; - UINT32 Reserved4:10; - UINT32 Reserved5:32; + UINT32 ProcessorNumber : 1; + UINT32 Reserved4 : 10; + UINT32 Reserved5 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_P6_BBL_CR_CTL_REGISTER; - /** Trigger register: used to initiate a cache configuration accesses access, Write only with Data = 0. @@ -672,8 +657,7 @@ typedef union { @endcode @note MSR_P6_BBL_CR_TRIG is defined as BBL_CR_TRIG in SDM. **/ -#define MSR_P6_BBL_CR_TRIG 0x0000011A - +#define MSR_P6_BBL_CR_TRIG 0x0000011A /** Busy register: indicates when a cache configuration accesses L2 command is @@ -692,8 +676,7 @@ typedef union { @endcode @note MSR_P6_BBL_CR_BUSY is defined as BBL_CR_BUSY in SDM. **/ -#define MSR_P6_BBL_CR_BUSY 0x0000011B - +#define MSR_P6_BBL_CR_BUSY 0x0000011B /** Control register 3: used to configure the L2 Cache. @@ -713,7 +696,7 @@ typedef union { @endcode @note MSR_P6_BBL_CR_CTL3 is defined as BBL_CR_CTL3 in SDM. **/ -#define MSR_P6_BBL_CR_CTL3 0x0000011E +#define MSR_P6_BBL_CR_CTL3 0x0000011E /** MSR information returned for MSR index #MSR_P6_BBL_CR_CTL3 @@ -726,74 +709,73 @@ typedef union { /// /// [Bit 0] L2 Configured (read/write ). /// - UINT32 L2Configured:1; + UINT32 L2Configured : 1; /// /// [Bits 4:1] L2 Cache Latency (read/write). /// - UINT32 L2CacheLatency:4; + UINT32 L2CacheLatency : 4; /// /// [Bit 5] ECC Check Enable (read/write). /// - UINT32 ECCCheckEnable:1; + UINT32 ECCCheckEnable : 1; /// /// [Bit 6] Address Parity Check Enable (read/write). /// - UINT32 AddressParityCheckEnable:1; + UINT32 AddressParityCheckEnable : 1; /// /// [Bit 7] CRTN Parity Check Enable (read/write). /// - UINT32 CRTNParityCheckEnable:1; + UINT32 CRTNParityCheckEnable : 1; /// /// [Bit 8] L2 Enabled (read/write). /// - UINT32 L2Enabled:1; + UINT32 L2Enabled : 1; /// /// [Bits 10:9] L2 Associativity (read only) Direct Mapped 2 Way 4 Way /// Reserved. /// - UINT32 L2Associativity:2; + UINT32 L2Associativity : 2; /// /// [Bits 12:11] Number of L2 banks (read only). /// - UINT32 L2Banks:2; + UINT32 L2Banks : 2; /// /// [Bits 17:13] Cache size per bank (read/write) 256KBytes 512KBytes /// 1MByte 2MByte 4MBytes. /// - UINT32 CacheSizePerBank:5; + UINT32 CacheSizePerBank : 5; /// /// [Bit 18] Cache State error checking enable (read/write). /// - UINT32 CacheStateErrorEnable:1; - UINT32 Reserved1:1; + UINT32 CacheStateErrorEnable : 1; + UINT32 Reserved1 : 1; /// /// [Bits 22:20] L2 Physical Address Range support 64GBytes 32GBytes /// 16GBytes 8GBytes 4GBytes 2GBytes 1GBytes 512MBytes. /// - UINT32 L2AddressRange:3; + UINT32 L2AddressRange : 3; /// /// [Bit 23] L2 Hardware Disable (read only). /// - UINT32 L2HardwareDisable:1; - UINT32 Reserved2:1; + UINT32 L2HardwareDisable : 1; + UINT32 Reserved2 : 1; /// /// [Bit 25] Cache bus fraction (read only). /// - UINT32 CacheBusFraction:1; - UINT32 Reserved3:6; - UINT32 Reserved4:32; + UINT32 CacheBusFraction : 1; + UINT32 Reserved3 : 6; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_P6_BBL_CR_CTL3_REGISTER; - /** CS register target for CPL 0 code. @@ -810,8 +792,7 @@ typedef union { @endcode @note MSR_P6_SYSENTER_CS_MSR is defined as SYSENTER_CS_MSR in SDM. **/ -#define MSR_P6_SYSENTER_CS_MSR 0x00000174 - +#define MSR_P6_SYSENTER_CS_MSR 0x00000174 /** Stack pointer for CPL 0 stack. @@ -829,8 +810,7 @@ typedef union { @endcode @note MSR_P6_SYSENTER_ESP_MSR is defined as SYSENTER_ESP_MSR in SDM. **/ -#define MSR_P6_SYSENTER_ESP_MSR 0x00000175 - +#define MSR_P6_SYSENTER_ESP_MSR 0x00000175 /** CPL 0 code entry point. @@ -848,8 +828,7 @@ typedef union { @endcode @note MSR_P6_SYSENTER_EIP_MSR is defined as SYSENTER_EIP_MSR in SDM. **/ -#define MSR_P6_SYSENTER_EIP_MSR 0x00000176 - +#define MSR_P6_SYSENTER_EIP_MSR 0x00000176 /** @@ -867,8 +846,7 @@ typedef union { @endcode @note MSR_P6_MCG_CAP is defined as MCG_CAP in SDM. **/ -#define MSR_P6_MCG_CAP 0x00000179 - +#define MSR_P6_MCG_CAP 0x00000179 /** @@ -886,8 +864,7 @@ typedef union { @endcode @note MSR_P6_MCG_STATUS is defined as MCG_STATUS in SDM. **/ -#define MSR_P6_MCG_STATUS 0x0000017A - +#define MSR_P6_MCG_STATUS 0x0000017A /** @@ -905,8 +882,7 @@ typedef union { @endcode @note MSR_P6_MCG_CTL is defined as MCG_CTL in SDM. **/ -#define MSR_P6_MCG_CTL 0x0000017B - +#define MSR_P6_MCG_CTL 0x0000017B /** @@ -928,8 +904,8 @@ typedef union { MSR_P6_PERFEVTSEL1 is defined as PERFEVTSEL1 in SDM. @{ **/ -#define MSR_P6_PERFEVTSEL0 0x00000186 -#define MSR_P6_PERFEVTSEL1 0x00000187 +#define MSR_P6_PERFEVTSEL0 0x00000186 +#define MSR_P6_PERFEVTSEL1 0x00000187 /// @} /** @@ -945,63 +921,62 @@ typedef union { /// [Bits 7:0] Event Select Refer to Performance Counter section for a /// list of event encodings. /// - UINT32 EventSelect:8; + UINT32 EventSelect : 8; /// /// [Bits 15:8] UMASK (Unit Mask) Unit mask register set to 0 to enable /// all count options. /// - UINT32 UMASK:8; + UINT32 UMASK : 8; /// /// [Bit 16] USER Controls the counting of events at Privilege levels of /// 1, 2, and 3. /// - UINT32 USR:1; + UINT32 USR : 1; /// /// [Bit 17] OS Controls the counting of events at Privilege level of 0. /// - UINT32 OS:1; + UINT32 OS : 1; /// /// [Bit 18] E Occurrence/Duration Mode Select 1 = Occurrence 0 = Duration. /// - UINT32 E:1; + UINT32 E : 1; /// /// [Bit 19] PC Enabled the signaling of performance counter overflow via /// BP0 pin. /// - UINT32 PC:1; + UINT32 PC : 1; /// /// [Bit 20] INT Enables the signaling of counter overflow via input to /// APIC 1 = Enable 0 = Disable. /// - UINT32 INT:1; - UINT32 Reserved1:1; + UINT32 INT : 1; + UINT32 Reserved1 : 1; /// /// [Bit 22] ENABLE Enables the counting of performance events in both /// counters 1 = Enable 0 = Disable. /// - UINT32 EN:1; + UINT32 EN : 1; /// /// [Bit 23] INV Inverts the result of the CMASK condition 1 = Inverted 0 /// = Non-Inverted. /// - UINT32 INV:1; + UINT32 INV : 1; /// /// [Bits 31:24] CMASK (Counter Mask). /// - UINT32 CMASK:8; - UINT32 Reserved2:32; + UINT32 CMASK : 8; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_P6_PERFEVTSEL_REGISTER; - /** @@ -1020,7 +995,7 @@ typedef union { @endcode @note MSR_P6_DEBUGCTLMSR is defined as DEBUGCTLMSR in SDM. **/ -#define MSR_P6_DEBUGCTLMSR 0x000001D9 +#define MSR_P6_DEBUGCTLMSR 0x000001D9 /** MSR information returned for MSR index #MSR_P6_DEBUGCTLMSR @@ -1033,45 +1008,44 @@ typedef union { /// /// [Bit 0] Enable/Disable Last Branch Records. /// - UINT32 LBR:1; + UINT32 LBR : 1; /// /// [Bit 1] Branch Trap Flag. /// - UINT32 BTF:1; + UINT32 BTF : 1; /// /// [Bit 2] Performance Monitoring/Break Point Pins. /// - UINT32 PB0:1; + UINT32 PB0 : 1; /// /// [Bit 3] Performance Monitoring/Break Point Pins. /// - UINT32 PB1:1; + UINT32 PB1 : 1; /// /// [Bit 4] Performance Monitoring/Break Point Pins. /// - UINT32 PB2:1; + UINT32 PB2 : 1; /// /// [Bit 5] Performance Monitoring/Break Point Pins. /// - UINT32 PB3:1; + UINT32 PB3 : 1; /// /// [Bit 6] Enable/Disable Execution Trace Messages. /// - UINT32 TR:1; - UINT32 Reserved1:25; - UINT32 Reserved2:32; + UINT32 TR : 1; + UINT32 Reserved1 : 25; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_P6_DEBUGCTLMSR_REGISTER; - /** @@ -1088,8 +1062,7 @@ typedef union { @endcode @note MSR_P6_LASTBRANCHFROMIP is defined as LASTBRANCHFROMIP in SDM. **/ -#define MSR_P6_LASTBRANCHFROMIP 0x000001DB - +#define MSR_P6_LASTBRANCHFROMIP 0x000001DB /** @@ -1107,8 +1080,7 @@ typedef union { @endcode @note MSR_P6_LASTBRANCHTOIP is defined as LASTBRANCHTOIP in SDM. **/ -#define MSR_P6_LASTBRANCHTOIP 0x000001DC - +#define MSR_P6_LASTBRANCHTOIP 0x000001DC /** @@ -1126,8 +1098,7 @@ typedef union { @endcode @note MSR_P6_LASTINTFROMIP is defined as LASTINTFROMIP in SDM. **/ -#define MSR_P6_LASTINTFROMIP 0x000001DD - +#define MSR_P6_LASTINTFROMIP 0x000001DD /** @@ -1145,7 +1116,7 @@ typedef union { @endcode @note MSR_P6_LASTINTTOIP is defined as LASTINTTOIP in SDM. **/ -#define MSR_P6_LASTINTTOIP 0x000001DE +#define MSR_P6_LASTINTTOIP 0x000001DE /** @@ -1171,17 +1142,16 @@ typedef union { MSR_P6_MTRRPHYSBASE7 is defined as MTRRPHYSBASE7 in SDM. @{ **/ -#define MSR_P6_MTRRPHYSBASE0 0x00000200 -#define MSR_P6_MTRRPHYSBASE1 0x00000202 -#define MSR_P6_MTRRPHYSBASE2 0x00000204 -#define MSR_P6_MTRRPHYSBASE3 0x00000206 -#define MSR_P6_MTRRPHYSBASE4 0x00000208 -#define MSR_P6_MTRRPHYSBASE5 0x0000020A -#define MSR_P6_MTRRPHYSBASE6 0x0000020C -#define MSR_P6_MTRRPHYSBASE7 0x0000020E +#define MSR_P6_MTRRPHYSBASE0 0x00000200 +#define MSR_P6_MTRRPHYSBASE1 0x00000202 +#define MSR_P6_MTRRPHYSBASE2 0x00000204 +#define MSR_P6_MTRRPHYSBASE3 0x00000206 +#define MSR_P6_MTRRPHYSBASE4 0x00000208 +#define MSR_P6_MTRRPHYSBASE5 0x0000020A +#define MSR_P6_MTRRPHYSBASE6 0x0000020C +#define MSR_P6_MTRRPHYSBASE7 0x0000020E /// @} - /** @@ -1206,17 +1176,16 @@ typedef union { MSR_P6_MTRRPHYSMASK7 is defined as MTRRPHYSMASK7 in SDM. @{ **/ -#define MSR_P6_MTRRPHYSMASK0 0x00000201 -#define MSR_P6_MTRRPHYSMASK1 0x00000203 -#define MSR_P6_MTRRPHYSMASK2 0x00000205 -#define MSR_P6_MTRRPHYSMASK3 0x00000207 -#define MSR_P6_MTRRPHYSMASK4 0x00000209 -#define MSR_P6_MTRRPHYSMASK5 0x0000020B -#define MSR_P6_MTRRPHYSMASK6 0x0000020D -#define MSR_P6_MTRRPHYSMASK7 0x0000020F +#define MSR_P6_MTRRPHYSMASK0 0x00000201 +#define MSR_P6_MTRRPHYSMASK1 0x00000203 +#define MSR_P6_MTRRPHYSMASK2 0x00000205 +#define MSR_P6_MTRRPHYSMASK3 0x00000207 +#define MSR_P6_MTRRPHYSMASK4 0x00000209 +#define MSR_P6_MTRRPHYSMASK5 0x0000020B +#define MSR_P6_MTRRPHYSMASK6 0x0000020D +#define MSR_P6_MTRRPHYSMASK7 0x0000020F /// @} - /** @@ -1233,8 +1202,7 @@ typedef union { @endcode @note MSR_P6_MTRRFIX64K_00000 is defined as MTRRFIX64K_00000 in SDM. **/ -#define MSR_P6_MTRRFIX64K_00000 0x00000250 - +#define MSR_P6_MTRRFIX64K_00000 0x00000250 /** @@ -1252,8 +1220,7 @@ typedef union { @endcode @note MSR_P6_MTRRFIX16K_80000 is defined as MTRRFIX16K_80000 in SDM. **/ -#define MSR_P6_MTRRFIX16K_80000 0x00000258 - +#define MSR_P6_MTRRFIX16K_80000 0x00000258 /** @@ -1271,8 +1238,7 @@ typedef union { @endcode @note MSR_P6_MTRRFIX16K_A0000 is defined as MTRRFIX16K_A0000 in SDM. **/ -#define MSR_P6_MTRRFIX16K_A0000 0x00000259 - +#define MSR_P6_MTRRFIX16K_A0000 0x00000259 /** @@ -1290,8 +1256,7 @@ typedef union { @endcode @note MSR_P6_MTRRFIX4K_C0000 is defined as MTRRFIX4K_C0000 in SDM. **/ -#define MSR_P6_MTRRFIX4K_C0000 0x00000268 - +#define MSR_P6_MTRRFIX4K_C0000 0x00000268 /** @@ -1309,8 +1274,7 @@ typedef union { @endcode @note MSR_P6_MTRRFIX4K_C8000 is defined as MTRRFIX4K_C8000 in SDM. **/ -#define MSR_P6_MTRRFIX4K_C8000 0x00000269 - +#define MSR_P6_MTRRFIX4K_C8000 0x00000269 /** @@ -1328,8 +1292,7 @@ typedef union { @endcode @note MSR_P6_MTRRFIX4K_D0000 is defined as MTRRFIX4K_D0000 in SDM. **/ -#define MSR_P6_MTRRFIX4K_D0000 0x0000026A - +#define MSR_P6_MTRRFIX4K_D0000 0x0000026A /** @@ -1347,8 +1310,7 @@ typedef union { @endcode @note MSR_P6_MTRRFIX4K_D8000 is defined as MTRRFIX4K_D8000 in SDM. **/ -#define MSR_P6_MTRRFIX4K_D8000 0x0000026B - +#define MSR_P6_MTRRFIX4K_D8000 0x0000026B /** @@ -1366,8 +1328,7 @@ typedef union { @endcode @note MSR_P6_MTRRFIX4K_E0000 is defined as MTRRFIX4K_E0000 in SDM. **/ -#define MSR_P6_MTRRFIX4K_E0000 0x0000026C - +#define MSR_P6_MTRRFIX4K_E0000 0x0000026C /** @@ -1385,8 +1346,7 @@ typedef union { @endcode @note MSR_P6_MTRRFIX4K_E8000 is defined as MTRRFIX4K_E8000 in SDM. **/ -#define MSR_P6_MTRRFIX4K_E8000 0x0000026D - +#define MSR_P6_MTRRFIX4K_E8000 0x0000026D /** @@ -1404,8 +1364,7 @@ typedef union { @endcode @note MSR_P6_MTRRFIX4K_F0000 is defined as MTRRFIX4K_F0000 in SDM. **/ -#define MSR_P6_MTRRFIX4K_F0000 0x0000026E - +#define MSR_P6_MTRRFIX4K_F0000 0x0000026E /** @@ -1423,8 +1382,7 @@ typedef union { @endcode @note MSR_P6_MTRRFIX4K_F8000 is defined as MTRRFIX4K_F8000 in SDM. **/ -#define MSR_P6_MTRRFIX4K_F8000 0x0000026F - +#define MSR_P6_MTRRFIX4K_F8000 0x0000026F /** @@ -1444,7 +1402,7 @@ typedef union { @endcode @note MSR_P6_MTRRDEFTYPE is defined as MTRRDEFTYPE in SDM. **/ -#define MSR_P6_MTRRDEFTYPE 0x000002FF +#define MSR_P6_MTRRDEFTYPE 0x000002FF /** MSR information returned for MSR index #MSR_P6_MTRRDEFTYPE @@ -1457,30 +1415,29 @@ typedef union { /// /// [Bits 2:0] Default memory type. /// - UINT32 Type:3; - UINT32 Reserved1:7; + UINT32 Type : 3; + UINT32 Reserved1 : 7; /// /// [Bit 10] Fixed MTRR enable. /// - UINT32 FE:1; + UINT32 FE : 1; /// /// [Bit 11] MTRR Enable. /// - UINT32 E:1; - UINT32 Reserved2:20; - UINT32 Reserved3:32; + UINT32 E : 1; + UINT32 Reserved2 : 20; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_P6_MTRRDEFTYPE_REGISTER; - /** @@ -1502,14 +1459,13 @@ typedef union { MSR_P6_MC4_CTL is defined as MC4_CTL in SDM. @{ **/ -#define MSR_P6_MC0_CTL 0x00000400 -#define MSR_P6_MC1_CTL 0x00000404 -#define MSR_P6_MC2_CTL 0x00000408 -#define MSR_P6_MC3_CTL 0x00000410 -#define MSR_P6_MC4_CTL 0x0000040C +#define MSR_P6_MC0_CTL 0x00000400 +#define MSR_P6_MC1_CTL 0x00000404 +#define MSR_P6_MC2_CTL 0x00000408 +#define MSR_P6_MC3_CTL 0x00000410 +#define MSR_P6_MC4_CTL 0x0000040C /// @} - /** Bit definitions for MSR_P6_MC4_STATUS are the same as MSR_P6_MC0_STATUS, @@ -1535,11 +1491,11 @@ typedef union { MSR_P6_MC4_STATUS is defined as MC4_STATUS in SDM. @{ **/ -#define MSR_P6_MC0_STATUS 0x00000401 -#define MSR_P6_MC1_STATUS 0x00000405 -#define MSR_P6_MC2_STATUS 0x00000409 -#define MSR_P6_MC3_STATUS 0x00000411 -#define MSR_P6_MC4_STATUS 0x0000040D +#define MSR_P6_MC0_STATUS 0x00000401 +#define MSR_P6_MC1_STATUS 0x00000405 +#define MSR_P6_MC2_STATUS 0x00000409 +#define MSR_P6_MC3_STATUS 0x00000411 +#define MSR_P6_MC4_STATUS 0x0000040D /// @} /** @@ -1554,49 +1510,48 @@ typedef union { /// /// [Bits 15:0] MC_STATUS_MCACOD. /// - UINT32 MC_STATUS_MCACOD:16; + UINT32 MC_STATUS_MCACOD : 16; /// /// [Bits 31:16] MC_STATUS_MSCOD. /// - UINT32 MC_STATUS_MSCOD:16; - UINT32 Reserved:25; + UINT32 MC_STATUS_MSCOD : 16; + UINT32 Reserved : 25; /// /// [Bit 57] MC_STATUS_DAM. /// - UINT32 MC_STATUS_DAM:1; + UINT32 MC_STATUS_DAM : 1; /// /// [Bit 58] MC_STATUS_ADDRV. /// - UINT32 MC_STATUS_ADDRV:1; + UINT32 MC_STATUS_ADDRV : 1; /// /// [Bit 59] MC_STATUS_MISCV. /// - UINT32 MC_STATUS_MISCV:1; + UINT32 MC_STATUS_MISCV : 1; /// /// [Bit 60] MC_STATUS_EN. (Note: For MC0_STATUS only, this bit is /// hardcoded to 1.). /// - UINT32 MC_STATUS_EN:1; + UINT32 MC_STATUS_EN : 1; /// /// [Bit 61] MC_STATUS_UC. /// - UINT32 MC_STATUS_UC:1; + UINT32 MC_STATUS_UC : 1; /// /// [Bit 62] MC_STATUS_O. /// - UINT32 MC_STATUS_O:1; + UINT32 MC_STATUS_O : 1; /// /// [Bit 63] MC_STATUS_V. /// - UINT32 MC_STATUS_V:1; + UINT32 MC_STATUS_V : 1; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_P6_MC_STATUS_REGISTER; - /** MSR_P6_MC4_ADDR is defined in MCA architecture but not implemented in P6 Family processors. @@ -1619,14 +1574,13 @@ typedef union { MSR_P6_MC4_ADDR is defined as MC4_ADDR in SDM. @{ **/ -#define MSR_P6_MC0_ADDR 0x00000402 -#define MSR_P6_MC1_ADDR 0x00000406 -#define MSR_P6_MC2_ADDR 0x0000040A -#define MSR_P6_MC3_ADDR 0x00000412 -#define MSR_P6_MC4_ADDR 0x0000040E +#define MSR_P6_MC0_ADDR 0x00000402 +#define MSR_P6_MC1_ADDR 0x00000406 +#define MSR_P6_MC2_ADDR 0x0000040A +#define MSR_P6_MC3_ADDR 0x00000412 +#define MSR_P6_MC4_ADDR 0x0000040E /// @} - /** Defined in MCA architecture but not implemented in the P6 family processors. @@ -1648,11 +1602,11 @@ typedef union { MSR_P6_MC4_MISC is defined as MC4_MISC in SDM. @{ **/ -#define MSR_P6_MC0_MISC 0x00000403 -#define MSR_P6_MC1_MISC 0x00000407 -#define MSR_P6_MC2_MISC 0x0000040B -#define MSR_P6_MC3_MISC 0x00000413 -#define MSR_P6_MC4_MISC 0x0000040F +#define MSR_P6_MC0_MISC 0x00000403 +#define MSR_P6_MC1_MISC 0x00000407 +#define MSR_P6_MC2_MISC 0x0000040B +#define MSR_P6_MC3_MISC 0x00000413 +#define MSR_P6_MC4_MISC 0x0000040F /// @} #endif diff --git a/MdePkg/Include/Register/Intel/Msr/Pentium4Msr.h b/MdePkg/Include/Register/Intel/Msr/Pentium4Msr.h index 579e4fb..709e525 100644 --- a/MdePkg/Include/Register/Intel/Msr/Pentium4Msr.h +++ b/MdePkg/Include/Register/Intel/Msr/Pentium4Msr.h @@ -50,8 +50,7 @@ @endcode @note MSR_PENTIUM_4_IA32_MONITOR_FILTER_LINE_SIZE is defined as IA32_MONITOR_FILTER_LINE_SIZE in SDM. **/ -#define MSR_PENTIUM_4_IA32_MONITOR_FILTER_LINE_SIZE 0x00000006 - +#define MSR_PENTIUM_4_IA32_MONITOR_FILTER_LINE_SIZE 0x00000006 /** 0, 1, 2, 3, 4, 6. Shared. Processor Hard Power-On Configuration (R/W) @@ -73,7 +72,7 @@ @endcode @note MSR_PENTIUM_4_EBC_HARD_POWERON is defined as MSR_EBC_HARD_POWERON in SDM. **/ -#define MSR_PENTIUM_4_EBC_HARD_POWERON 0x0000002A +#define MSR_PENTIUM_4_EBC_HARD_POWERON 0x0000002A /** MSR information returned for MSR index #MSR_PENTIUM_4_EBC_HARD_POWERON @@ -89,71 +88,70 @@ typedef union { /// The value in this bit is written on the deassertion of RESET#; the bit /// is set to 1 when the address bus signal is asserted. /// - UINT32 OutputTriStateEnabled:1; + UINT32 OutputTriStateEnabled : 1; /// /// [Bit 1] Execute BIST (R) Indicates whether the execution of the BIST /// is enabled (1) or disabled (0) as set by the strapping of INIT#. The /// value in this bit is written on the deassertion of RESET#; the bit is /// set to 1 when the address bus signal is asserted. /// - UINT32 ExecuteBIST:1; + UINT32 ExecuteBIST : 1; /// /// [Bit 2] In Order Queue Depth (R) Indicates whether the in order queue /// depth for the system bus is 1 (1) or up to 12 (0) as set by the /// strapping of A7#. The value in this bit is written on the deassertion /// of RESET#; the bit is set to 1 when the address bus signal is asserted. /// - UINT32 InOrderQueueDepth:1; + UINT32 InOrderQueueDepth : 1; /// /// [Bit 3] MCERR# Observation Disabled (R) Indicates whether MCERR# /// observation is enabled (0) or disabled (1) as determined by the /// strapping of A9#. The value in this bit is written on the deassertion /// of RESET#; the bit is set to 1 when the address bus signal is asserted. /// - UINT32 MCERR_ObservationDisabled:1; + UINT32 MCERR_ObservationDisabled : 1; /// /// [Bit 4] BINIT# Observation Enabled (R) Indicates whether BINIT# /// observation is enabled (0) or disabled (1) as determined by the /// strapping of A10#. The value in this bit is written on the deassertion /// of RESET#; the bit is set to 1 when the address bus signal is asserted. /// - UINT32 BINIT_ObservationEnabled:1; + UINT32 BINIT_ObservationEnabled : 1; /// /// [Bits 6:5] APIC Cluster ID (R) Contains the logical APIC cluster ID /// value as set by the strapping of A12# and A11#. The logical cluster ID /// value is written into the field on the deassertion of RESET#; the /// field is set to 1 when the address bus signal is asserted. /// - UINT32 APICClusterID:2; + UINT32 APICClusterID : 2; /// /// [Bit 7] Bus Park Disable (R) Indicates whether bus park is enabled /// (0) or disabled (1) as set by the strapping of A15#. The value in this /// bit is written on the deassertion of RESET#; the bit is set to 1 when /// the address bus signal is asserted. /// - UINT32 BusParkDisable:1; - UINT32 Reserved1:4; + UINT32 BusParkDisable : 1; + UINT32 Reserved1 : 4; /// /// [Bits 13:12] Agent ID (R) Contains the logical agent ID value as set /// by the strapping of BR[3:0]. The logical ID value is written into the /// field on the deassertion of RESET#; the field is set to 1 when the /// address bus signal is asserted. /// - UINT32 AgentID:2; - UINT32 Reserved2:18; - UINT32 Reserved3:32; + UINT32 AgentID : 2; + UINT32 Reserved2 : 18; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_PENTIUM_4_EBC_HARD_POWERON_REGISTER; - /** 0, 1, 2, 3, 4, 6. Shared. Processor Soft Power-On Configuration (R/W) Enables and disables processor features. @@ -173,7 +171,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_EBC_SOFT_POWERON is defined as MSR_EBC_SOFT_POWERON in SDM. **/ -#define MSR_PENTIUM_4_EBC_SOFT_POWERON 0x0000002B +#define MSR_PENTIUM_4_EBC_SOFT_POWERON 0x0000002B /** MSR information returned for MSR index #MSR_PENTIUM_4_EBC_SOFT_POWERON @@ -188,51 +186,50 @@ typedef union { /// driving of RCNT/SCNT on the request encoding. Set to enable (1); clear /// to disabled (0, default). /// - UINT32 RCNT_SCNT:1; + UINT32 RCNT_SCNT : 1; /// /// [Bit 1] Data Error Checking Disable (R/W) Set to disable system data /// bus parity checking; clear to enable parity checking. /// - UINT32 DataErrorCheckingDisable:1; + UINT32 DataErrorCheckingDisable : 1; /// /// [Bit 2] Response Error Checking Disable (R/W) Set to disable /// (default); clear to enable. /// - UINT32 ResponseErrorCheckingDisable:1; + UINT32 ResponseErrorCheckingDisable : 1; /// /// [Bit 3] Address/Request Error Checking Disable (R/W) Set to disable /// (default); clear to enable. /// - UINT32 AddressRequestErrorCheckingDisable:1; + UINT32 AddressRequestErrorCheckingDisable : 1; /// /// [Bit 4] Initiator MCERR# Disable (R/W) Set to disable MCERR# driving /// for initiator bus requests (default); clear to enable. /// - UINT32 InitiatorMCERR_Disable:1; + UINT32 InitiatorMCERR_Disable : 1; /// /// [Bit 5] Internal MCERR# Disable (R/W) Set to disable MCERR# driving /// for initiator internal errors (default); clear to enable. /// - UINT32 InternalMCERR_Disable:1; + UINT32 InternalMCERR_Disable : 1; /// /// [Bit 6] BINIT# Driver Disable (R/W) Set to disable BINIT# driver /// (default); clear to enable driver. /// - UINT32 BINIT_DriverDisable:1; - UINT32 Reserved1:25; - UINT32 Reserved2:32; + UINT32 BINIT_DriverDisable : 1; + UINT32 Reserved1 : 25; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_PENTIUM_4_EBC_SOFT_POWERON_REGISTER; - /** 2,3, 4, 6. Shared. Processor Frequency Configuration The bit field layout of this MSR varies according to the MODEL value in the CPUID version @@ -254,7 +251,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_EBC_FREQUENCY_ID is defined as MSR_EBC_FREQUENCY_ID in SDM. **/ -#define MSR_PENTIUM_4_EBC_FREQUENCY_ID 0x0000002C +#define MSR_PENTIUM_4_EBC_FREQUENCY_ID 0x0000002C /** MSR information returned for MSR index #MSR_PENTIUM_4_EBC_FREQUENCY_ID @@ -264,7 +261,7 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:16; + UINT32 Reserved1 : 16; /// /// [Bits 18:16] Scalable Bus Speed (R/W) Indicates the intended scalable /// bus speed: *EncodingScalable Bus Speed* @@ -285,27 +282,26 @@ typedef union { /// Speed when encoding is 100B and model encoding = 6. All other values /// are reserved. /// - UINT32 ScalableBusSpeed:3; - UINT32 Reserved2:5; + UINT32 ScalableBusSpeed : 3; + UINT32 Reserved2 : 5; /// /// [Bits 31:24] Core Clock Frequency to System Bus Frequency Ratio (R) /// The processor core clock frequency to system bus frequency ratio /// observed at the de-assertion of the reset pin. /// - UINT32 ClockRatio:8; - UINT32 Reserved3:32; + UINT32 ClockRatio : 8; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_PENTIUM_4_EBC_FREQUENCY_ID_REGISTER; - /** 0, 1. Shared. Processor Frequency Configuration (R) The bit field layout of this MSR varies according to the MODEL value of the CPUID version @@ -327,7 +323,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_EBC_FREQUENCY_ID_1 is defined as MSR_EBC_FREQUENCY_ID_1 in SDM. **/ -#define MSR_PENTIUM_4_EBC_FREQUENCY_ID_1 0x0000002C +#define MSR_PENTIUM_4_EBC_FREQUENCY_ID_1 0x0000002C /** MSR information returned for MSR index #MSR_PENTIUM_4_EBC_FREQUENCY_ID_1 @@ -337,28 +333,27 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:21; + UINT32 Reserved1 : 21; /// /// [Bits 23:21] Scalable Bus Speed (R/W) Indicates the intended scalable /// bus speed: *Encoding* *Scalable Bus Speed* /// /// 000B 100 MHz All others values reserved. /// - UINT32 ScalableBusSpeed:3; - UINT32 Reserved2:8; - UINT32 Reserved3:32; + UINT32 ScalableBusSpeed : 3; + UINT32 Reserved2 : 8; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_PENTIUM_4_EBC_FREQUENCY_ID_1_REGISTER; - /** 0, 1, 2, 3, 4, 6. Unique. Machine Check EAX/RAX Save State See Section 15.3.2.6, "IA32_MCG Extended Machine Check State MSRs.". Contains register @@ -378,8 +373,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_MCG_RAX is defined as MSR_MCG_RAX in SDM. **/ -#define MSR_PENTIUM_4_MCG_RAX 0x00000180 - +#define MSR_PENTIUM_4_MCG_RAX 0x00000180 /** 0, 1, 2, 3, 4, 6. Unique. Machine Check EBX/RBX Save State See Section @@ -400,8 +394,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_MCG_RBX is defined as MSR_MCG_RBX in SDM. **/ -#define MSR_PENTIUM_4_MCG_RBX 0x00000181 - +#define MSR_PENTIUM_4_MCG_RBX 0x00000181 /** 0, 1, 2, 3, 4, 6. Unique. Machine Check ECX/RCX Save State See Section @@ -422,8 +415,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_MCG_RCX is defined as MSR_MCG_RCX in SDM. **/ -#define MSR_PENTIUM_4_MCG_RCX 0x00000182 - +#define MSR_PENTIUM_4_MCG_RCX 0x00000182 /** 0, 1, 2, 3, 4, 6. Unique. Machine Check EDX/RDX Save State See Section @@ -444,8 +436,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_MCG_RDX is defined as MSR_MCG_RDX in SDM. **/ -#define MSR_PENTIUM_4_MCG_RDX 0x00000183 - +#define MSR_PENTIUM_4_MCG_RDX 0x00000183 /** 0, 1, 2, 3, 4, 6. Unique. Machine Check ESI/RSI Save State See Section @@ -466,8 +457,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_MCG_RSI is defined as MSR_MCG_RSI in SDM. **/ -#define MSR_PENTIUM_4_MCG_RSI 0x00000184 - +#define MSR_PENTIUM_4_MCG_RSI 0x00000184 /** 0, 1, 2, 3, 4, 6. Unique. Machine Check EDI/RDI Save State See Section @@ -488,8 +478,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_MCG_RDI is defined as MSR_MCG_RDI in SDM. **/ -#define MSR_PENTIUM_4_MCG_RDI 0x00000185 - +#define MSR_PENTIUM_4_MCG_RDI 0x00000185 /** 0, 1, 2, 3, 4, 6. Unique. Machine Check EBP/RBP Save State See Section @@ -510,8 +499,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_MCG_RBP is defined as MSR_MCG_RBP in SDM. **/ -#define MSR_PENTIUM_4_MCG_RBP 0x00000186 - +#define MSR_PENTIUM_4_MCG_RBP 0x00000186 /** 0, 1, 2, 3, 4, 6. Unique. Machine Check ESP/RSP Save State See Section @@ -532,8 +520,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_MCG_RSP is defined as MSR_MCG_RSP in SDM. **/ -#define MSR_PENTIUM_4_MCG_RSP 0x00000187 - +#define MSR_PENTIUM_4_MCG_RSP 0x00000187 /** 0, 1, 2, 3, 4, 6. Unique. Machine Check EFLAGS/RFLAG Save State See Section @@ -554,8 +541,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_MCG_RFLAGS is defined as MSR_MCG_RFLAGS in SDM. **/ -#define MSR_PENTIUM_4_MCG_RFLAGS 0x00000188 - +#define MSR_PENTIUM_4_MCG_RFLAGS 0x00000188 /** 0, 1, 2, 3, 4, 6. Unique. Machine Check EIP/RIP Save State See Section @@ -576,8 +562,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_MCG_RIP is defined as MSR_MCG_RIP in SDM. **/ -#define MSR_PENTIUM_4_MCG_RIP 0x00000189 - +#define MSR_PENTIUM_4_MCG_RIP 0x00000189 /** 0, 1, 2, 3, 4, 6. Unique. Machine Check Miscellaneous See Section 15.3.2.6, @@ -598,7 +583,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_MCG_MISC is defined as MSR_MCG_MISC in SDM. **/ -#define MSR_PENTIUM_4_MCG_MISC 0x0000018A +#define MSR_PENTIUM_4_MCG_MISC 0x0000018A /** MSR information returned for MSR index #MSR_PENTIUM_4_MCG_MISC @@ -615,21 +600,20 @@ typedef union { /// code. It is the responsibility of the user (BIOS or operating system) /// to clear this bit for normal operation. /// - UINT32 DS:1; - UINT32 Reserved1:31; - UINT32 Reserved2:32; + UINT32 DS : 1; + UINT32 Reserved1 : 31; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_PENTIUM_4_MCG_MISC_REGISTER; - /** 0, 1, 2, 3, 4, 6. Unique. Machine Check R8 See Section 15.3.2.6, "IA32_MCG Extended Machine Check State MSRs.". Registers R8-15 (and the associated @@ -650,8 +634,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_MCG_R8 is defined as MSR_MCG_R8 in SDM. **/ -#define MSR_PENTIUM_4_MCG_R8 0x00000190 - +#define MSR_PENTIUM_4_MCG_R8 0x00000190 /** 0, 1, 2, 3, 4, 6. Unique. Machine Check R9D/R9 See Section 15.3.2.6, @@ -673,8 +656,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_MCG_R9 is defined as MSR_MCG_R9 in SDM. **/ -#define MSR_PENTIUM_4_MCG_R9 0x00000191 - +#define MSR_PENTIUM_4_MCG_R9 0x00000191 /** 0, 1, 2, 3, 4, 6. Unique. Machine Check R10 See Section 15.3.2.6, "IA32_MCG @@ -696,8 +678,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_MCG_R10 is defined as MSR_MCG_R10 in SDM. **/ -#define MSR_PENTIUM_4_MCG_R10 0x00000192 - +#define MSR_PENTIUM_4_MCG_R10 0x00000192 /** 0, 1, 2, 3, 4, 6. Unique. Machine Check R11 See Section 15.3.2.6, "IA32_MCG @@ -719,8 +700,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_MCG_R11 is defined as MSR_MCG_R11 in SDM. **/ -#define MSR_PENTIUM_4_MCG_R11 0x00000193 - +#define MSR_PENTIUM_4_MCG_R11 0x00000193 /** 0, 1, 2, 3, 4, 6. Unique. Machine Check R12 See Section 15.3.2.6, "IA32_MCG @@ -742,8 +722,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_MCG_R12 is defined as MSR_MCG_R12 in SDM. **/ -#define MSR_PENTIUM_4_MCG_R12 0x00000194 - +#define MSR_PENTIUM_4_MCG_R12 0x00000194 /** 0, 1, 2, 3, 4, 6. Unique. Machine Check R13 See Section 15.3.2.6, "IA32_MCG @@ -765,8 +744,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_MCG_R13 is defined as MSR_MCG_R13 in SDM. **/ -#define MSR_PENTIUM_4_MCG_R13 0x00000195 - +#define MSR_PENTIUM_4_MCG_R13 0x00000195 /** 0, 1, 2, 3, 4, 6. Unique. Machine Check R14 See Section 15.3.2.6, "IA32_MCG @@ -788,8 +766,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_MCG_R14 is defined as MSR_MCG_R14 in SDM. **/ -#define MSR_PENTIUM_4_MCG_R14 0x00000196 - +#define MSR_PENTIUM_4_MCG_R14 0x00000196 /** 0, 1, 2, 3, 4, 6. Unique. Machine Check R15 See Section 15.3.2.6, "IA32_MCG @@ -811,8 +788,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_MCG_R15 is defined as MSR_MCG_R15 in SDM. **/ -#define MSR_PENTIUM_4_MCG_R15 0x00000197 - +#define MSR_PENTIUM_4_MCG_R15 0x00000197 /** Thermal Monitor 2 Control. 3,. Shared. For Family F, Model 3 processors: @@ -834,8 +810,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_THERM2_CTL is defined as MSR_THERM2_CTL in SDM. **/ -#define MSR_PENTIUM_4_THERM2_CTL 0x0000019D - +#define MSR_PENTIUM_4_THERM2_CTL 0x0000019D /** 0, 1, 2, 3, 4, 6. Shared. Enable Miscellaneous Processor Features (R/W). @@ -855,7 +830,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_IA32_MISC_ENABLE is defined as IA32_MISC_ENABLE in SDM. **/ -#define MSR_PENTIUM_4_IA32_MISC_ENABLE 0x000001A0 +#define MSR_PENTIUM_4_IA32_MISC_ENABLE 0x000001A0 /** MSR information returned for MSR index #MSR_PENTIUM_4_IA32_MISC_ENABLE @@ -868,17 +843,17 @@ typedef union { /// /// [Bit 0] Fast-Strings Enable. See Table 2-2. /// - UINT32 FastStrings:1; - UINT32 Reserved1:1; + UINT32 FastStrings : 1; + UINT32 Reserved1 : 1; /// /// [Bit 2] x87 FPU Fopcode Compatibility Mode Enable. /// - UINT32 FPU:1; + UINT32 FPU : 1; /// /// [Bit 3] Thermal Monitor 1 Enable See Section 14.7.2, "Thermal /// Monitor," and see Table 2-2. /// - UINT32 TM1:1; + UINT32 TM1 : 1; /// /// [Bit 4] Split-Lock Disable When set, the bit causes an #AC exception /// to be issued instead of a split-lock cycle. Operating systems that set @@ -887,8 +862,8 @@ typedef union { /// bus. /// This debug feature is specific to the Pentium 4 processor. /// - UINT32 SplitLockDisable:1; - UINT32 Reserved2:1; + UINT32 SplitLockDisable : 1; + UINT32 Reserved2 : 1; /// /// [Bit 6] Third-Level Cache Disable (R/W) When set, the third-level /// cache is disabled; when clear (default) the third-level cache is @@ -898,22 +873,22 @@ typedef union { /// control register CR0, the page-level cache controls, and/or the MTRRs. /// See Section 11.5.4, "Disabling and Enabling the L3 Cache.". /// - UINT32 ThirdLevelCacheDisable:1; + UINT32 ThirdLevelCacheDisable : 1; /// /// [Bit 7] Performance Monitoring Available (R) See Table 2-2. /// - UINT32 PerformanceMonitoring:1; + UINT32 PerformanceMonitoring : 1; /// /// [Bit 8] Suppress Lock Enable When set, assertion of LOCK on the bus is /// suppressed during a Split Lock access. When clear (default), LOCK is /// not suppressed. /// - UINT32 SuppressLockEnable:1; + UINT32 SuppressLockEnable : 1; /// /// [Bit 9] Prefetch Queue Disable When set, disables the prefetch queue. /// When clear (default), enables the prefetch queue. /// - UINT32 PrefetchQueueDisable:1; + UINT32 PrefetchQueueDisable : 1; /// /// [Bit 10] FERR# Interrupt Reporting Enable (R/W) When set, interrupt /// reporting through the FERR# pin is enabled; when clear, this interrupt @@ -926,19 +901,19 @@ typedef union { /// the normal operation of the FERR# pin (to indicate an unmasked /// floatingpoint error) when the STPCLK# pin is not asserted. /// - UINT32 FERR:1; + UINT32 FERR : 1; /// /// [Bit 11] Branch Trace Storage Unavailable (BTS_UNAVILABLE) (R) See /// Table 2-2. When set, the processor does not support branch trace /// storage (BTS); when clear, BTS is supported. /// - UINT32 BTS:1; + UINT32 BTS : 1; /// /// [Bit 12] PEBS_UNAVILABLE: Processor Event Based Sampling Unavailable /// (R) See Table 2-2. When set, the processor does not support processor /// event-based sampling (PEBS); when clear, PEBS is supported. /// - UINT32 PEBS:1; + UINT32 PEBS : 1; /// /// [Bit 13] 3. TM2 Enable (R/W) When this bit is set (1) and the thermal /// sensor indicates that the die temperature is at the predetermined @@ -952,12 +927,12 @@ typedef union { /// this bit location. The processor is operating out of spec if both this /// bit and the TM1 bit are set to disabled states. /// - UINT32 TM2:1; - UINT32 Reserved3:4; + UINT32 TM2 : 1; + UINT32 Reserved3 : 4; /// /// [Bit 18] 3, 4, 6. ENABLE MONITOR FSM (R/W) See Table 2-2. /// - UINT32 MONITOR:1; + UINT32 MONITOR : 1; /// /// [Bit 19] Adjacent Cache Line Prefetch Disable (R/W) When set to 1, /// the processor fetches the cache line of the 128-byte sector containing @@ -968,18 +943,18 @@ typedef union { /// in validation and testing. BIOS may contain a setup option that /// controls the setting of this bit. /// - UINT32 AdjacentCacheLinePrefetchDisable:1; - UINT32 Reserved4:2; + UINT32 AdjacentCacheLinePrefetchDisable : 1; + UINT32 Reserved4 : 2; /// /// [Bit 22] 3, 4, 6. Limit CPUID MAXVAL (R/W) See Table 2-2. Setting this /// can cause unexpected behavior to software that depends on the /// availability of CPUID leaves greater than 3. /// - UINT32 LimitCpuidMaxval:1; + UINT32 LimitCpuidMaxval : 1; /// /// [Bit 23] Shared. xTPR Message Disable (R/W) See Table 2-2. /// - UINT32 xTPR_Message_Disable:1; + UINT32 xTPR_Message_Disable : 1; /// /// [Bit 24] L1 Data Cache Context Mode (R/W) When set, the L1 data cache /// is placed in shared mode; when clear (default), the cache is placed in @@ -992,22 +967,21 @@ typedef union { /// the ability to switch modes is not supported. BIOS must not alter the /// contents of IA32_MISC_ENABLE[24]. /// - UINT32 L1DataCacheContextMode:1; - UINT32 Reserved5:7; - UINT32 Reserved6:2; + UINT32 L1DataCacheContextMode : 1; + UINT32 Reserved5 : 7; + UINT32 Reserved6 : 2; /// /// [Bit 34] Unique. XD Bit Disable (R/W) See Table 2-2. /// - UINT32 XD:1; - UINT32 Reserved7:29; + UINT32 XD : 1; + UINT32 Reserved7 : 29; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_PENTIUM_4_IA32_MISC_ENABLE_REGISTER; - /** 3, 4, 6. Shared. Platform Feature Requirements (R). @@ -1025,7 +999,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_PLATFORM_BRV is defined as MSR_PLATFORM_BRV in SDM. **/ -#define MSR_PENTIUM_4_PLATFORM_BRV 0x000001A1 +#define MSR_PENTIUM_4_PLATFORM_BRV 0x000001A1 /** MSR information returned for MSR index #MSR_PENTIUM_4_PLATFORM_BRV @@ -1035,27 +1009,26 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:18; + UINT32 Reserved1 : 18; /// /// [Bit 18] PLATFORM Requirements When set to 1, indicates the processor /// has specific platform requirements. The details of the platform /// requirements are listed in the respective data sheets of the processor. /// - UINT32 PLATFORM:1; - UINT32 Reserved2:13; - UINT32 Reserved3:32; + UINT32 PLATFORM : 1; + UINT32 Reserved2 : 13; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_PENTIUM_4_PLATFORM_BRV_REGISTER; - /** 0, 1, 2, 3, 4, 6. Unique. Last Exception Record From Linear IP (R) Contains a pointer to the last branch instruction that the processor executed prior @@ -1076,8 +1049,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_LER_FROM_LIP is defined as MSR_LER_FROM_LIP in SDM. **/ -#define MSR_PENTIUM_4_LER_FROM_LIP 0x000001D7 - +#define MSR_PENTIUM_4_LER_FROM_LIP 0x000001D7 /** 0, 1, 2, 3, 4, 6. Unique. Last Exception Record To Linear IP (R) This area @@ -1100,8 +1072,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_LER_TO_LIP is defined as MSR_LER_TO_LIP in SDM. **/ -#define MSR_PENTIUM_4_LER_TO_LIP 0x000001D8 - +#define MSR_PENTIUM_4_LER_TO_LIP 0x000001D8 /** 0, 1, 2, 3, 4, 6. Unique. Debug Control (R/W) Controls how several debug @@ -1121,8 +1092,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_DEBUGCTLA is defined as MSR_DEBUGCTLA in SDM. **/ -#define MSR_PENTIUM_4_DEBUGCTLA 0x000001D9 - +#define MSR_PENTIUM_4_DEBUGCTLA 0x000001D9 /** 0, 1, 2, 3, 4, 6. Unique. Last Branch Record Stack TOS (R/W) Contains an @@ -1144,8 +1114,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_LASTBRANCH_TOS is defined as MSR_LASTBRANCH_TOS in SDM. **/ -#define MSR_PENTIUM_4_LASTBRANCH_TOS 0x000001DA - +#define MSR_PENTIUM_4_LASTBRANCH_TOS 0x000001DA /** 0, 1, 2. Unique. Last Branch Record n (R/W) One of four last branch record @@ -1174,13 +1143,12 @@ typedef union { MSR_PENTIUM_4_LASTBRANCH_3 is defined as MSR_LASTBRANCH_3 in SDM. @{ **/ -#define MSR_PENTIUM_4_LASTBRANCH_0 0x000001DB -#define MSR_PENTIUM_4_LASTBRANCH_1 0x000001DC -#define MSR_PENTIUM_4_LASTBRANCH_2 0x000001DD -#define MSR_PENTIUM_4_LASTBRANCH_3 0x000001DE +#define MSR_PENTIUM_4_LASTBRANCH_0 0x000001DB +#define MSR_PENTIUM_4_LASTBRANCH_1 0x000001DC +#define MSR_PENTIUM_4_LASTBRANCH_2 0x000001DD +#define MSR_PENTIUM_4_LASTBRANCH_3 0x000001DE /// @} - /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.2, "Performance Counters.". @@ -1201,13 +1169,12 @@ typedef union { MSR_PENTIUM_4_BPU_COUNTER3 is defined as MSR_BPU_COUNTER3 in SDM. @{ **/ -#define MSR_PENTIUM_4_BPU_COUNTER0 0x00000300 -#define MSR_PENTIUM_4_BPU_COUNTER1 0x00000301 -#define MSR_PENTIUM_4_BPU_COUNTER2 0x00000302 -#define MSR_PENTIUM_4_BPU_COUNTER3 0x00000303 +#define MSR_PENTIUM_4_BPU_COUNTER0 0x00000300 +#define MSR_PENTIUM_4_BPU_COUNTER1 0x00000301 +#define MSR_PENTIUM_4_BPU_COUNTER2 0x00000302 +#define MSR_PENTIUM_4_BPU_COUNTER3 0x00000303 /// @} - /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.2, "Performance Counters.". @@ -1228,13 +1195,12 @@ typedef union { MSR_PENTIUM_4_MS_COUNTER3 is defined as MSR_MS_COUNTER3 in SDM. @{ **/ -#define MSR_PENTIUM_4_MS_COUNTER0 0x00000304 -#define MSR_PENTIUM_4_MS_COUNTER1 0x00000305 -#define MSR_PENTIUM_4_MS_COUNTER2 0x00000306 -#define MSR_PENTIUM_4_MS_COUNTER3 0x00000307 +#define MSR_PENTIUM_4_MS_COUNTER0 0x00000304 +#define MSR_PENTIUM_4_MS_COUNTER1 0x00000305 +#define MSR_PENTIUM_4_MS_COUNTER2 0x00000306 +#define MSR_PENTIUM_4_MS_COUNTER3 0x00000307 /// @} - /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.2, "Performance Counters.". @@ -1255,13 +1221,12 @@ typedef union { MSR_PENTIUM_4_FLAME_COUNTER3 is defined as MSR_FLAME_COUNTER3 in SDM. @{ **/ -#define MSR_PENTIUM_4_FLAME_COUNTER0 0x00000308 -#define MSR_PENTIUM_4_FLAME_COUNTER1 0x00000309 -#define MSR_PENTIUM_4_FLAME_COUNTER2 0x0000030A -#define MSR_PENTIUM_4_FLAME_COUNTER3 0x0000030B +#define MSR_PENTIUM_4_FLAME_COUNTER0 0x00000308 +#define MSR_PENTIUM_4_FLAME_COUNTER1 0x00000309 +#define MSR_PENTIUM_4_FLAME_COUNTER2 0x0000030A +#define MSR_PENTIUM_4_FLAME_COUNTER3 0x0000030B /// @} - /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.2, "Performance Counters.". @@ -1284,15 +1249,14 @@ typedef union { MSR_PENTIUM_4_IQ_COUNTER5 is defined as MSR_IQ_COUNTER5 in SDM. @{ **/ -#define MSR_PENTIUM_4_IQ_COUNTER0 0x0000030C -#define MSR_PENTIUM_4_IQ_COUNTER1 0x0000030D -#define MSR_PENTIUM_4_IQ_COUNTER2 0x0000030E -#define MSR_PENTIUM_4_IQ_COUNTER3 0x0000030F -#define MSR_PENTIUM_4_IQ_COUNTER4 0x00000310 -#define MSR_PENTIUM_4_IQ_COUNTER5 0x00000311 +#define MSR_PENTIUM_4_IQ_COUNTER0 0x0000030C +#define MSR_PENTIUM_4_IQ_COUNTER1 0x0000030D +#define MSR_PENTIUM_4_IQ_COUNTER2 0x0000030E +#define MSR_PENTIUM_4_IQ_COUNTER3 0x0000030F +#define MSR_PENTIUM_4_IQ_COUNTER4 0x00000310 +#define MSR_PENTIUM_4_IQ_COUNTER5 0x00000311 /// @} - /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.3, "CCCR MSRs.". @@ -1313,13 +1277,12 @@ typedef union { MSR_PENTIUM_4_BPU_CCCR3 is defined as MSR_BPU_CCCR3 in SDM. @{ **/ -#define MSR_PENTIUM_4_BPU_CCCR0 0x00000360 -#define MSR_PENTIUM_4_BPU_CCCR1 0x00000361 -#define MSR_PENTIUM_4_BPU_CCCR2 0x00000362 -#define MSR_PENTIUM_4_BPU_CCCR3 0x00000363 +#define MSR_PENTIUM_4_BPU_CCCR0 0x00000360 +#define MSR_PENTIUM_4_BPU_CCCR1 0x00000361 +#define MSR_PENTIUM_4_BPU_CCCR2 0x00000362 +#define MSR_PENTIUM_4_BPU_CCCR3 0x00000363 /// @} - /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.3, "CCCR MSRs.". @@ -1340,13 +1303,12 @@ typedef union { MSR_PENTIUM_4_MS_CCCR3 is defined as MSR_MS_CCCR3 in SDM. @{ **/ -#define MSR_PENTIUM_4_MS_CCCR0 0x00000364 -#define MSR_PENTIUM_4_MS_CCCR1 0x00000365 -#define MSR_PENTIUM_4_MS_CCCR2 0x00000366 -#define MSR_PENTIUM_4_MS_CCCR3 0x00000367 +#define MSR_PENTIUM_4_MS_CCCR0 0x00000364 +#define MSR_PENTIUM_4_MS_CCCR1 0x00000365 +#define MSR_PENTIUM_4_MS_CCCR2 0x00000366 +#define MSR_PENTIUM_4_MS_CCCR3 0x00000367 /// @} - /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.3, "CCCR MSRs.". @@ -1367,13 +1329,12 @@ typedef union { MSR_PENTIUM_4_FLAME_CCCR3 is defined as MSR_FLAME_CCCR3 in SDM. @{ **/ -#define MSR_PENTIUM_4_FLAME_CCCR0 0x00000368 -#define MSR_PENTIUM_4_FLAME_CCCR1 0x00000369 -#define MSR_PENTIUM_4_FLAME_CCCR2 0x0000036A -#define MSR_PENTIUM_4_FLAME_CCCR3 0x0000036B +#define MSR_PENTIUM_4_FLAME_CCCR0 0x00000368 +#define MSR_PENTIUM_4_FLAME_CCCR1 0x00000369 +#define MSR_PENTIUM_4_FLAME_CCCR2 0x0000036A +#define MSR_PENTIUM_4_FLAME_CCCR3 0x0000036B /// @} - /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.3, "CCCR MSRs.". @@ -1396,15 +1357,14 @@ typedef union { MSR_PENTIUM_4_IQ_CCCR5 is defined as MSR_IQ_CCCR5 in SDM. @{ **/ -#define MSR_PENTIUM_4_IQ_CCCR0 0x0000036C -#define MSR_PENTIUM_4_IQ_CCCR1 0x0000036D -#define MSR_PENTIUM_4_IQ_CCCR2 0x0000036E -#define MSR_PENTIUM_4_IQ_CCCR3 0x0000036F -#define MSR_PENTIUM_4_IQ_CCCR4 0x00000370 -#define MSR_PENTIUM_4_IQ_CCCR5 0x00000371 +#define MSR_PENTIUM_4_IQ_CCCR0 0x0000036C +#define MSR_PENTIUM_4_IQ_CCCR1 0x0000036D +#define MSR_PENTIUM_4_IQ_CCCR2 0x0000036E +#define MSR_PENTIUM_4_IQ_CCCR3 0x0000036F +#define MSR_PENTIUM_4_IQ_CCCR4 0x00000370 +#define MSR_PENTIUM_4_IQ_CCCR5 0x00000371 /// @} - /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1421,8 +1381,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_BSU_ESCR0 is defined as MSR_BSU_ESCR0 in SDM. **/ -#define MSR_PENTIUM_4_BSU_ESCR0 0x000003A0 - +#define MSR_PENTIUM_4_BSU_ESCR0 0x000003A0 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1440,8 +1399,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_BSU_ESCR1 is defined as MSR_BSU_ESCR1 in SDM. **/ -#define MSR_PENTIUM_4_BSU_ESCR1 0x000003A1 - +#define MSR_PENTIUM_4_BSU_ESCR1 0x000003A1 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1459,8 +1417,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_FSB_ESCR0 is defined as MSR_FSB_ESCR0 in SDM. **/ -#define MSR_PENTIUM_4_FSB_ESCR0 0x000003A2 - +#define MSR_PENTIUM_4_FSB_ESCR0 0x000003A2 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1478,8 +1435,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_FSB_ESCR1 is defined as MSR_FSB_ESCR1 in SDM. **/ -#define MSR_PENTIUM_4_FSB_ESCR1 0x000003A3 - +#define MSR_PENTIUM_4_FSB_ESCR1 0x000003A3 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1497,8 +1453,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_FIRM_ESCR0 is defined as MSR_FIRM_ESCR0 in SDM. **/ -#define MSR_PENTIUM_4_FIRM_ESCR0 0x000003A4 - +#define MSR_PENTIUM_4_FIRM_ESCR0 0x000003A4 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1516,8 +1471,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_FIRM_ESCR1 is defined as MSR_FIRM_ESCR1 in SDM. **/ -#define MSR_PENTIUM_4_FIRM_ESCR1 0x000003A5 - +#define MSR_PENTIUM_4_FIRM_ESCR1 0x000003A5 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1535,8 +1489,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_FLAME_ESCR0 is defined as MSR_FLAME_ESCR0 in SDM. **/ -#define MSR_PENTIUM_4_FLAME_ESCR0 0x000003A6 - +#define MSR_PENTIUM_4_FLAME_ESCR0 0x000003A6 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1554,8 +1507,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_FLAME_ESCR1 is defined as MSR_FLAME_ESCR1 in SDM. **/ -#define MSR_PENTIUM_4_FLAME_ESCR1 0x000003A7 - +#define MSR_PENTIUM_4_FLAME_ESCR1 0x000003A7 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1573,8 +1525,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_DAC_ESCR0 is defined as MSR_DAC_ESCR0 in SDM. **/ -#define MSR_PENTIUM_4_DAC_ESCR0 0x000003A8 - +#define MSR_PENTIUM_4_DAC_ESCR0 0x000003A8 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1592,8 +1543,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_DAC_ESCR1 is defined as MSR_DAC_ESCR1 in SDM. **/ -#define MSR_PENTIUM_4_DAC_ESCR1 0x000003A9 - +#define MSR_PENTIUM_4_DAC_ESCR1 0x000003A9 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1611,8 +1561,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_MOB_ESCR0 is defined as MSR_MOB_ESCR0 in SDM. **/ -#define MSR_PENTIUM_4_MOB_ESCR0 0x000003AA - +#define MSR_PENTIUM_4_MOB_ESCR0 0x000003AA /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1630,8 +1579,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_MOB_ESCR1 is defined as MSR_MOB_ESCR1 in SDM. **/ -#define MSR_PENTIUM_4_MOB_ESCR1 0x000003AB - +#define MSR_PENTIUM_4_MOB_ESCR1 0x000003AB /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1649,8 +1597,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_PMH_ESCR0 is defined as MSR_PMH_ESCR0 in SDM. **/ -#define MSR_PENTIUM_4_PMH_ESCR0 0x000003AC - +#define MSR_PENTIUM_4_PMH_ESCR0 0x000003AC /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1668,8 +1615,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_PMH_ESCR1 is defined as MSR_PMH_ESCR1 in SDM. **/ -#define MSR_PENTIUM_4_PMH_ESCR1 0x000003AD - +#define MSR_PENTIUM_4_PMH_ESCR1 0x000003AD /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1687,8 +1633,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_SAAT_ESCR0 is defined as MSR_SAAT_ESCR0 in SDM. **/ -#define MSR_PENTIUM_4_SAAT_ESCR0 0x000003AE - +#define MSR_PENTIUM_4_SAAT_ESCR0 0x000003AE /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1706,8 +1651,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_SAAT_ESCR1 is defined as MSR_SAAT_ESCR1 in SDM. **/ -#define MSR_PENTIUM_4_SAAT_ESCR1 0x000003AF - +#define MSR_PENTIUM_4_SAAT_ESCR1 0x000003AF /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1725,8 +1669,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_U2L_ESCR0 is defined as MSR_U2L_ESCR0 in SDM. **/ -#define MSR_PENTIUM_4_U2L_ESCR0 0x000003B0 - +#define MSR_PENTIUM_4_U2L_ESCR0 0x000003B0 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1744,8 +1687,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_U2L_ESCR1 is defined as MSR_U2L_ESCR1 in SDM. **/ -#define MSR_PENTIUM_4_U2L_ESCR1 0x000003B1 - +#define MSR_PENTIUM_4_U2L_ESCR1 0x000003B1 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1763,8 +1705,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_BPU_ESCR0 is defined as MSR_BPU_ESCR0 in SDM. **/ -#define MSR_PENTIUM_4_BPU_ESCR0 0x000003B2 - +#define MSR_PENTIUM_4_BPU_ESCR0 0x000003B2 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1782,8 +1723,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_BPU_ESCR1 is defined as MSR_BPU_ESCR1 in SDM. **/ -#define MSR_PENTIUM_4_BPU_ESCR1 0x000003B3 - +#define MSR_PENTIUM_4_BPU_ESCR1 0x000003B3 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1801,8 +1741,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_IS_ESCR0 is defined as MSR_IS_ESCR0 in SDM. **/ -#define MSR_PENTIUM_4_IS_ESCR0 0x000003B4 - +#define MSR_PENTIUM_4_IS_ESCR0 0x000003B4 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1820,8 +1759,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_IS_ESCR1 is defined as MSR_IS_ESCR1 in SDM. **/ -#define MSR_PENTIUM_4_IS_ESCR1 0x000003B5 - +#define MSR_PENTIUM_4_IS_ESCR1 0x000003B5 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1839,8 +1777,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_ITLB_ESCR0 is defined as MSR_ITLB_ESCR0 in SDM. **/ -#define MSR_PENTIUM_4_ITLB_ESCR0 0x000003B6 - +#define MSR_PENTIUM_4_ITLB_ESCR0 0x000003B6 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1858,8 +1795,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_ITLB_ESCR1 is defined as MSR_ITLB_ESCR1 in SDM. **/ -#define MSR_PENTIUM_4_ITLB_ESCR1 0x000003B7 - +#define MSR_PENTIUM_4_ITLB_ESCR1 0x000003B7 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1877,8 +1813,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_CRU_ESCR0 is defined as MSR_CRU_ESCR0 in SDM. **/ -#define MSR_PENTIUM_4_CRU_ESCR0 0x000003B8 - +#define MSR_PENTIUM_4_CRU_ESCR0 0x000003B8 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1896,8 +1831,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_CRU_ESCR1 is defined as MSR_CRU_ESCR1 in SDM. **/ -#define MSR_PENTIUM_4_CRU_ESCR1 0x000003B9 - +#define MSR_PENTIUM_4_CRU_ESCR1 0x000003B9 /** 0, 1, 2. Shared. See Section 18.6.3.1, "ESCR MSRs." This MSR is not @@ -1917,8 +1851,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_IQ_ESCR0 is defined as MSR_IQ_ESCR0 in SDM. **/ -#define MSR_PENTIUM_4_IQ_ESCR0 0x000003BA - +#define MSR_PENTIUM_4_IQ_ESCR0 0x000003BA /** 0, 1, 2. Shared. See Section 18.6.3.1, "ESCR MSRs." This MSR is not @@ -1938,8 +1871,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_IQ_ESCR1 is defined as MSR_IQ_ESCR1 in SDM. **/ -#define MSR_PENTIUM_4_IQ_ESCR1 0x000003BB - +#define MSR_PENTIUM_4_IQ_ESCR1 0x000003BB /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1957,8 +1889,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_RAT_ESCR0 is defined as MSR_RAT_ESCR0 in SDM. **/ -#define MSR_PENTIUM_4_RAT_ESCR0 0x000003BC - +#define MSR_PENTIUM_4_RAT_ESCR0 0x000003BC /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1976,8 +1907,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_RAT_ESCR1 is defined as MSR_RAT_ESCR1 in SDM. **/ -#define MSR_PENTIUM_4_RAT_ESCR1 0x000003BD - +#define MSR_PENTIUM_4_RAT_ESCR1 0x000003BD /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -1995,8 +1925,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_SSU_ESCR0 is defined as MSR_SSU_ESCR0 in SDM. **/ -#define MSR_PENTIUM_4_SSU_ESCR0 0x000003BE - +#define MSR_PENTIUM_4_SSU_ESCR0 0x000003BE /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -2014,8 +1943,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_MS_ESCR0 is defined as MSR_MS_ESCR0 in SDM. **/ -#define MSR_PENTIUM_4_MS_ESCR0 0x000003C0 - +#define MSR_PENTIUM_4_MS_ESCR0 0x000003C0 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -2033,8 +1961,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_MS_ESCR1 is defined as MSR_MS_ESCR1 in SDM. **/ -#define MSR_PENTIUM_4_MS_ESCR1 0x000003C1 - +#define MSR_PENTIUM_4_MS_ESCR1 0x000003C1 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -2052,8 +1979,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_TBPU_ESCR0 is defined as MSR_TBPU_ESCR0 in SDM. **/ -#define MSR_PENTIUM_4_TBPU_ESCR0 0x000003C2 - +#define MSR_PENTIUM_4_TBPU_ESCR0 0x000003C2 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -2071,8 +1997,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_TBPU_ESCR1 is defined as MSR_TBPU_ESCR1 in SDM. **/ -#define MSR_PENTIUM_4_TBPU_ESCR1 0x000003C3 - +#define MSR_PENTIUM_4_TBPU_ESCR1 0x000003C3 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -2090,8 +2015,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_TC_ESCR0 is defined as MSR_TC_ESCR0 in SDM. **/ -#define MSR_PENTIUM_4_TC_ESCR0 0x000003C4 - +#define MSR_PENTIUM_4_TC_ESCR0 0x000003C4 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -2109,8 +2033,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_TC_ESCR1 is defined as MSR_TC_ESCR1 in SDM. **/ -#define MSR_PENTIUM_4_TC_ESCR1 0x000003C5 - +#define MSR_PENTIUM_4_TC_ESCR1 0x000003C5 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -2128,8 +2051,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_IX_ESCR0 is defined as MSR_IX_ESCR0 in SDM. **/ -#define MSR_PENTIUM_4_IX_ESCR0 0x000003C8 - +#define MSR_PENTIUM_4_IX_ESCR0 0x000003C8 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -2147,8 +2069,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_IX_ESCR1 is defined as MSR_IX_ESCR1 in SDM. **/ -#define MSR_PENTIUM_4_IX_ESCR1 0x000003C9 - +#define MSR_PENTIUM_4_IX_ESCR1 0x000003C9 /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -2172,15 +2093,14 @@ typedef union { MSR_PENTIUM_4_CRU_ESCR5 is defined as MSR_CRU_ESCR5 in SDM. @{ **/ -#define MSR_PENTIUM_4_ALF_ESCR0 0x000003CA -#define MSR_PENTIUM_4_ALF_ESCR1 0x000003CB -#define MSR_PENTIUM_4_CRU_ESCR2 0x000003CC -#define MSR_PENTIUM_4_CRU_ESCR3 0x000003CD -#define MSR_PENTIUM_4_CRU_ESCR4 0x000003E0 -#define MSR_PENTIUM_4_CRU_ESCR5 0x000003E1 +#define MSR_PENTIUM_4_ALF_ESCR0 0x000003CA +#define MSR_PENTIUM_4_ALF_ESCR1 0x000003CB +#define MSR_PENTIUM_4_CRU_ESCR2 0x000003CC +#define MSR_PENTIUM_4_CRU_ESCR3 0x000003CD +#define MSR_PENTIUM_4_CRU_ESCR4 0x000003E0 +#define MSR_PENTIUM_4_CRU_ESCR5 0x000003E1 /// @} - /** 0, 1, 2, 3, 4, 6. Shared. See Section 18.6.3.1, "ESCR MSRs.". @@ -2197,8 +2117,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_TC_PRECISE_EVENT is defined as MSR_TC_PRECISE_EVENT in SDM. **/ -#define MSR_PENTIUM_4_TC_PRECISE_EVENT 0x000003F0 - +#define MSR_PENTIUM_4_TC_PRECISE_EVENT 0x000003F0 /** 0, 1, 2, 3, 4, 6. Shared. Processor Event Based Sampling (PEBS) (R/W) @@ -2219,7 +2138,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_PEBS_ENABLE is defined as MSR_PEBS_ENABLE in SDM. **/ -#define MSR_PENTIUM_4_PEBS_ENABLE 0x000003F1 +#define MSR_PENTIUM_4_PEBS_ENABLE 0x000003F1 /** MSR information returned for MSR index #MSR_PENTIUM_4_PEBS_ENABLE @@ -2232,12 +2151,12 @@ typedef union { /// /// [Bits 12:0] See Table 19-36. /// - UINT32 EventNum:13; - UINT32 Reserved1:11; + UINT32 EventNum : 13; + UINT32 Reserved1 : 11; /// /// [Bit 24] UOP Tag Enables replay tagging when set. /// - UINT32 UOP:1; + UINT32 UOP : 1; /// /// [Bit 25] ENABLE_PEBS_MY_THR (R/W) Enables PEBS for the target logical /// processor when set; disables PEBS when clear (default). See Section @@ -2245,7 +2164,7 @@ typedef union { /// logical processor. This bit is called ENABLE_PEBS in IA-32 processors /// that do not support Intel HyperThreading Technology. /// - UINT32 ENABLE_PEBS_MY_THR:1; + UINT32 ENABLE_PEBS_MY_THR : 1; /// /// [Bit 26] ENABLE_PEBS_OTH_THR (R/W) Enables PEBS for the target logical /// processor when set; disables PEBS when clear (default). See Section @@ -2253,21 +2172,20 @@ typedef union { /// logical processor. This bit is reserved for IA-32 processors that do /// not support Intel Hyper-Threading Technology. /// - UINT32 ENABLE_PEBS_OTH_THR:1; - UINT32 Reserved2:5; - UINT32 Reserved3:32; + UINT32 ENABLE_PEBS_OTH_THR : 1; + UINT32 Reserved2 : 5; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_PENTIUM_4_PEBS_ENABLE_REGISTER; - /** 0, 1, 2, 3, 4, 6. Shared. See Table 19-36. @@ -2284,8 +2202,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_PEBS_MATRIX_VERT is defined as MSR_PEBS_MATRIX_VERT in SDM. **/ -#define MSR_PENTIUM_4_PEBS_MATRIX_VERT 0x000003F2 - +#define MSR_PENTIUM_4_PEBS_MATRIX_VERT 0x000003F2 /** 3, 4, 6. Unique. Last Branch Record n (R/W) One of 16 pairs of last branch @@ -2327,25 +2244,24 @@ typedef union { MSR_PENTIUM_4_LASTBRANCH_15_FROM_IP is defined as MSR_LASTBRANCH_15_FROM_IP in SDM. @{ **/ -#define MSR_PENTIUM_4_LASTBRANCH_0_FROM_IP 0x00000680 -#define MSR_PENTIUM_4_LASTBRANCH_1_FROM_IP 0x00000681 -#define MSR_PENTIUM_4_LASTBRANCH_2_FROM_IP 0x00000682 -#define MSR_PENTIUM_4_LASTBRANCH_3_FROM_IP 0x00000683 -#define MSR_PENTIUM_4_LASTBRANCH_4_FROM_IP 0x00000684 -#define MSR_PENTIUM_4_LASTBRANCH_5_FROM_IP 0x00000685 -#define MSR_PENTIUM_4_LASTBRANCH_6_FROM_IP 0x00000686 -#define MSR_PENTIUM_4_LASTBRANCH_7_FROM_IP 0x00000687 -#define MSR_PENTIUM_4_LASTBRANCH_8_FROM_IP 0x00000688 -#define MSR_PENTIUM_4_LASTBRANCH_9_FROM_IP 0x00000689 -#define MSR_PENTIUM_4_LASTBRANCH_10_FROM_IP 0x0000068A -#define MSR_PENTIUM_4_LASTBRANCH_11_FROM_IP 0x0000068B -#define MSR_PENTIUM_4_LASTBRANCH_12_FROM_IP 0x0000068C -#define MSR_PENTIUM_4_LASTBRANCH_13_FROM_IP 0x0000068D -#define MSR_PENTIUM_4_LASTBRANCH_14_FROM_IP 0x0000068E -#define MSR_PENTIUM_4_LASTBRANCH_15_FROM_IP 0x0000068F +#define MSR_PENTIUM_4_LASTBRANCH_0_FROM_IP 0x00000680 +#define MSR_PENTIUM_4_LASTBRANCH_1_FROM_IP 0x00000681 +#define MSR_PENTIUM_4_LASTBRANCH_2_FROM_IP 0x00000682 +#define MSR_PENTIUM_4_LASTBRANCH_3_FROM_IP 0x00000683 +#define MSR_PENTIUM_4_LASTBRANCH_4_FROM_IP 0x00000684 +#define MSR_PENTIUM_4_LASTBRANCH_5_FROM_IP 0x00000685 +#define MSR_PENTIUM_4_LASTBRANCH_6_FROM_IP 0x00000686 +#define MSR_PENTIUM_4_LASTBRANCH_7_FROM_IP 0x00000687 +#define MSR_PENTIUM_4_LASTBRANCH_8_FROM_IP 0x00000688 +#define MSR_PENTIUM_4_LASTBRANCH_9_FROM_IP 0x00000689 +#define MSR_PENTIUM_4_LASTBRANCH_10_FROM_IP 0x0000068A +#define MSR_PENTIUM_4_LASTBRANCH_11_FROM_IP 0x0000068B +#define MSR_PENTIUM_4_LASTBRANCH_12_FROM_IP 0x0000068C +#define MSR_PENTIUM_4_LASTBRANCH_13_FROM_IP 0x0000068D +#define MSR_PENTIUM_4_LASTBRANCH_14_FROM_IP 0x0000068E +#define MSR_PENTIUM_4_LASTBRANCH_15_FROM_IP 0x0000068F /// @} - /** 3, 4, 6. Unique. Last Branch Record n (R/W) One of 16 pairs of last branch record registers on the last branch record stack (6C0H-6CFH). This part of @@ -2383,25 +2299,24 @@ typedef union { MSR_PENTIUM_4_LASTBRANCH_15_TO_IP is defined as MSR_LASTBRANCH_15_TO_IP in SDM. @{ **/ -#define MSR_PENTIUM_4_LASTBRANCH_0_TO_IP 0x000006C0 -#define MSR_PENTIUM_4_LASTBRANCH_1_TO_IP 0x000006C1 -#define MSR_PENTIUM_4_LASTBRANCH_2_TO_IP 0x000006C2 -#define MSR_PENTIUM_4_LASTBRANCH_3_TO_IP 0x000006C3 -#define MSR_PENTIUM_4_LASTBRANCH_4_TO_IP 0x000006C4 -#define MSR_PENTIUM_4_LASTBRANCH_5_TO_IP 0x000006C5 -#define MSR_PENTIUM_4_LASTBRANCH_6_TO_IP 0x000006C6 -#define MSR_PENTIUM_4_LASTBRANCH_7_TO_IP 0x000006C7 -#define MSR_PENTIUM_4_LASTBRANCH_8_TO_IP 0x000006C8 -#define MSR_PENTIUM_4_LASTBRANCH_9_TO_IP 0x000006C9 -#define MSR_PENTIUM_4_LASTBRANCH_10_TO_IP 0x000006CA -#define MSR_PENTIUM_4_LASTBRANCH_11_TO_IP 0x000006CB -#define MSR_PENTIUM_4_LASTBRANCH_12_TO_IP 0x000006CC -#define MSR_PENTIUM_4_LASTBRANCH_13_TO_IP 0x000006CD -#define MSR_PENTIUM_4_LASTBRANCH_14_TO_IP 0x000006CE -#define MSR_PENTIUM_4_LASTBRANCH_15_TO_IP 0x000006CF +#define MSR_PENTIUM_4_LASTBRANCH_0_TO_IP 0x000006C0 +#define MSR_PENTIUM_4_LASTBRANCH_1_TO_IP 0x000006C1 +#define MSR_PENTIUM_4_LASTBRANCH_2_TO_IP 0x000006C2 +#define MSR_PENTIUM_4_LASTBRANCH_3_TO_IP 0x000006C3 +#define MSR_PENTIUM_4_LASTBRANCH_4_TO_IP 0x000006C4 +#define MSR_PENTIUM_4_LASTBRANCH_5_TO_IP 0x000006C5 +#define MSR_PENTIUM_4_LASTBRANCH_6_TO_IP 0x000006C6 +#define MSR_PENTIUM_4_LASTBRANCH_7_TO_IP 0x000006C7 +#define MSR_PENTIUM_4_LASTBRANCH_8_TO_IP 0x000006C8 +#define MSR_PENTIUM_4_LASTBRANCH_9_TO_IP 0x000006C9 +#define MSR_PENTIUM_4_LASTBRANCH_10_TO_IP 0x000006CA +#define MSR_PENTIUM_4_LASTBRANCH_11_TO_IP 0x000006CB +#define MSR_PENTIUM_4_LASTBRANCH_12_TO_IP 0x000006CC +#define MSR_PENTIUM_4_LASTBRANCH_13_TO_IP 0x000006CD +#define MSR_PENTIUM_4_LASTBRANCH_14_TO_IP 0x000006CE +#define MSR_PENTIUM_4_LASTBRANCH_15_TO_IP 0x000006CF /// @} - /** 3, 4. Shared. IFSB BUSQ Event Control and Counter Register (R/W) See Section 18.6.6, "Performance Monitoring on 64bit Intel Xeon Processor MP with Up to @@ -2420,8 +2335,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_IFSB_BUSQ0 is defined as MSR_IFSB_BUSQ0 in SDM. **/ -#define MSR_PENTIUM_4_IFSB_BUSQ0 0x000107CC - +#define MSR_PENTIUM_4_IFSB_BUSQ0 0x000107CC /** 3, 4. Shared. IFSB BUSQ Event Control and Counter Register (R/W). @@ -2439,8 +2353,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_IFSB_BUSQ1 is defined as MSR_IFSB_BUSQ1 in SDM. **/ -#define MSR_PENTIUM_4_IFSB_BUSQ1 0x000107CD - +#define MSR_PENTIUM_4_IFSB_BUSQ1 0x000107CD /** 3, 4. Shared. IFSB SNPQ Event Control and Counter Register (R/W) See Section @@ -2460,8 +2373,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_IFSB_SNPQ0 is defined as MSR_IFSB_SNPQ0 in SDM. **/ -#define MSR_PENTIUM_4_IFSB_SNPQ0 0x000107CE - +#define MSR_PENTIUM_4_IFSB_SNPQ0 0x000107CE /** 3, 4. Shared. IFSB SNPQ Event Control and Counter Register (R/W). @@ -2479,8 +2391,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_IFSB_SNPQ1 is defined as MSR_IFSB_SNPQ1 in SDM. **/ -#define MSR_PENTIUM_4_IFSB_SNPQ1 0x000107CF - +#define MSR_PENTIUM_4_IFSB_SNPQ1 0x000107CF /** 3, 4. Shared. EFSB DRDY Event Control and Counter Register (R/W) See Section @@ -2500,8 +2411,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_EFSB_DRDY0 is defined as MSR_EFSB_DRDY0 in SDM. **/ -#define MSR_PENTIUM_4_EFSB_DRDY0 0x000107D0 - +#define MSR_PENTIUM_4_EFSB_DRDY0 0x000107D0 /** 3, 4. Shared. EFSB DRDY Event Control and Counter Register (R/W). @@ -2519,8 +2429,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_EFSB_DRDY1 is defined as MSR_EFSB_DRDY1 in SDM. **/ -#define MSR_PENTIUM_4_EFSB_DRDY1 0x000107D1 - +#define MSR_PENTIUM_4_EFSB_DRDY1 0x000107D1 /** 3, 4. Shared. IFSB Latency Event Control Register (R/W) See Section 18.6.6, @@ -2540,8 +2449,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_IFSB_CTL6 is defined as MSR_IFSB_CTL6 in SDM. **/ -#define MSR_PENTIUM_4_IFSB_CTL6 0x000107D2 - +#define MSR_PENTIUM_4_IFSB_CTL6 0x000107D2 /** 3, 4. Shared. IFSB Latency Event Counter Register (R/W) See Section 18.6.6, @@ -2561,8 +2469,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_IFSB_CNTR7 is defined as MSR_IFSB_CNTR7 in SDM. **/ -#define MSR_PENTIUM_4_IFSB_CNTR7 0x000107D3 - +#define MSR_PENTIUM_4_IFSB_CNTR7 0x000107D3 /** 6. Shared. GBUSQ Event Control and Counter Register (R/W) See Section @@ -2582,8 +2489,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_EMON_L3_CTR_CTL0 is defined as MSR_EMON_L3_CTR_CTL0 in SDM. **/ -#define MSR_PENTIUM_4_EMON_L3_CTR_CTL0 0x000107CC - +#define MSR_PENTIUM_4_EMON_L3_CTR_CTL0 0x000107CC /** 6. Shared. GBUSQ Event Control and Counter Register (R/W). @@ -2601,8 +2507,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_EMON_L3_CTR_CTL1 is defined as MSR_EMON_L3_CTR_CTL1 in SDM. **/ -#define MSR_PENTIUM_4_EMON_L3_CTR_CTL1 0x000107CD - +#define MSR_PENTIUM_4_EMON_L3_CTR_CTL1 0x000107CD /** 6. Shared. GSNPQ Event Control and Counter Register (R/W) See Section @@ -2622,8 +2527,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_EMON_L3_CTR_CTL2 is defined as MSR_EMON_L3_CTR_CTL2 in SDM. **/ -#define MSR_PENTIUM_4_EMON_L3_CTR_CTL2 0x000107CE - +#define MSR_PENTIUM_4_EMON_L3_CTR_CTL2 0x000107CE /** 6. Shared. GSNPQ Event Control and Counter Register (R/W). @@ -2641,8 +2545,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_EMON_L3_CTR_CTL3 is defined as MSR_EMON_L3_CTR_CTL3 in SDM. **/ -#define MSR_PENTIUM_4_EMON_L3_CTR_CTL3 0x000107CF - +#define MSR_PENTIUM_4_EMON_L3_CTR_CTL3 0x000107CF /** 6. Shared. FSB Event Control and Counter Register (R/W) See Section 18.6.6, @@ -2662,8 +2565,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_EMON_L3_CTR_CTL4 is defined as MSR_EMON_L3_CTR_CTL4 in SDM. **/ -#define MSR_PENTIUM_4_EMON_L3_CTR_CTL4 0x000107D0 - +#define MSR_PENTIUM_4_EMON_L3_CTR_CTL4 0x000107D0 /** 6. Shared. FSB Event Control and Counter Register (R/W). @@ -2681,8 +2583,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_EMON_L3_CTR_CTL5 is defined as MSR_EMON_L3_CTR_CTL5 in SDM. **/ -#define MSR_PENTIUM_4_EMON_L3_CTR_CTL5 0x000107D1 - +#define MSR_PENTIUM_4_EMON_L3_CTR_CTL5 0x000107D1 /** 6. Shared. FSB Event Control and Counter Register (R/W). @@ -2700,8 +2601,7 @@ typedef union { @endcode @note MSR_PENTIUM_4_EMON_L3_CTR_CTL6 is defined as MSR_EMON_L3_CTR_CTL6 in SDM. **/ -#define MSR_PENTIUM_4_EMON_L3_CTR_CTL6 0x000107D2 - +#define MSR_PENTIUM_4_EMON_L3_CTR_CTL6 0x000107D2 /** 6. Shared. FSB Event Control and Counter Register (R/W). @@ -2719,6 +2619,6 @@ typedef union { @endcode @note MSR_PENTIUM_4_EMON_L3_CTR_CTL7 is defined as MSR_EMON_L3_CTR_CTL7 in SDM. **/ -#define MSR_PENTIUM_4_EMON_L3_CTR_CTL7 0x000107D3 +#define MSR_PENTIUM_4_EMON_L3_CTR_CTL7 0x000107D3 #endif diff --git a/MdePkg/Include/Register/Intel/Msr/PentiumMMsr.h b/MdePkg/Include/Register/Intel/Msr/PentiumMMsr.h index 4a0e0ba..c63a32f 100644 --- a/MdePkg/Include/Register/Intel/Msr/PentiumMMsr.h +++ b/MdePkg/Include/Register/Intel/Msr/PentiumMMsr.h @@ -52,8 +52,7 @@ @endcode @note MSR_PENTIUM_M_P5_MC_ADDR is defined as P5_MC_ADDR in SDM. **/ -#define MSR_PENTIUM_M_P5_MC_ADDR 0x00000000 - +#define MSR_PENTIUM_M_P5_MC_ADDR 0x00000000 /** See Section 2.22, "MSRs in Pentium Processors.". @@ -71,8 +70,7 @@ @endcode @note MSR_PENTIUM_M_P5_MC_TYPE is defined as P5_MC_TYPE in SDM. **/ -#define MSR_PENTIUM_M_P5_MC_TYPE 0x00000001 - +#define MSR_PENTIUM_M_P5_MC_TYPE 0x00000001 /** Processor Hard Power-On Configuration (R/W) Enables and disables processor @@ -93,7 +91,7 @@ @endcode @note MSR_PENTIUM_M_EBL_CR_POWERON is defined as MSR_EBL_CR_POWERON in SDM. **/ -#define MSR_PENTIUM_M_EBL_CR_POWERON 0x0000002A +#define MSR_PENTIUM_M_EBL_CR_POWERON 0x0000002A /** MSR information returned for MSR index #MSR_PENTIUM_M_EBL_CR_POWERON @@ -103,93 +101,92 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:1; + UINT32 Reserved1 : 1; /// /// [Bit 1] Data Error Checking Enable (R) 0 = Disabled Always 0 on the /// Pentium M processor. /// - UINT32 DataErrorCheckingEnable:1; + UINT32 DataErrorCheckingEnable : 1; /// /// [Bit 2] Response Error Checking Enable (R) 0 = Disabled Always 0 on /// the Pentium M processor. /// - UINT32 ResponseErrorCheckingEnable:1; + UINT32 ResponseErrorCheckingEnable : 1; /// /// [Bit 3] MCERR# Drive Enable (R) 0 = Disabled Always 0 on the Pentium /// M processor. /// - UINT32 MCERR_DriveEnable:1; + UINT32 MCERR_DriveEnable : 1; /// /// [Bit 4] Address Parity Enable (R) 0 = Disabled Always 0 on the Pentium /// M processor. /// - UINT32 AddressParityEnable:1; - UINT32 Reserved2:2; + UINT32 AddressParityEnable : 1; + UINT32 Reserved2 : 2; /// /// [Bit 7] BINIT# Driver Enable (R) 1 = Enabled; 0 = Disabled Always 0 on /// the Pentium M processor. /// - UINT32 BINIT_DriverEnable:1; + UINT32 BINIT_DriverEnable : 1; /// /// [Bit 8] Output Tri-state Enabled (R/O) 1 = Enabled; 0 = Disabled. /// - UINT32 OutputTriStateEnable:1; + UINT32 OutputTriStateEnable : 1; /// /// [Bit 9] Execute BIST (R/O) 1 = Enabled; 0 = Disabled. /// - UINT32 ExecuteBIST:1; + UINT32 ExecuteBIST : 1; /// /// [Bit 10] MCERR# Observation Enabled (R/O) 1 = Enabled; 0 = Disabled /// Always 0 on the Pentium M processor. /// - UINT32 MCERR_ObservationEnabled:1; - UINT32 Reserved3:1; + UINT32 MCERR_ObservationEnabled : 1; + UINT32 Reserved3 : 1; /// /// [Bit 12] BINIT# Observation Enabled (R/O) 1 = Enabled; 0 = Disabled /// Always 0 on the Pentium M processor. /// - UINT32 BINIT_ObservationEnabled:1; - UINT32 Reserved4:1; + UINT32 BINIT_ObservationEnabled : 1; + UINT32 Reserved4 : 1; /// /// [Bit 14] 1 MByte Power on Reset Vector (R/O) 1 = 1 MByte; 0 = 4 GBytes /// Always 0 on the Pentium M processor. /// - UINT32 ResetVector:1; - UINT32 Reserved5:1; + UINT32 ResetVector : 1; + UINT32 Reserved5 : 1; /// /// [Bits 17:16] APIC Cluster ID (R/O) Always 00B on the Pentium M /// processor. /// - UINT32 APICClusterID:2; + UINT32 APICClusterID : 2; /// /// [Bit 18] System Bus Frequency (R/O) 1. = 100 MHz 2. = Reserved Always /// 0 on the Pentium M processor. /// - UINT32 SystemBusFrequency:1; - UINT32 Reserved6:1; + UINT32 SystemBusFrequency : 1; + UINT32 Reserved6 : 1; /// /// [Bits 21:20] Symmetric Arbitration ID (R/O) Always 00B on the Pentium /// M processor. /// - UINT32 SymmetricArbitrationID:2; + UINT32 SymmetricArbitrationID : 2; /// /// [Bits 26:22] Clock Frequency Ratio (R/O). /// - UINT32 ClockFrequencyRatio:5; - UINT32 Reserved7:5; - UINT32 Reserved8:32; + UINT32 ClockFrequencyRatio : 5; + UINT32 Reserved7 : 5; + UINT32 Reserved8 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_PENTIUM_M_EBL_CR_POWERON_REGISTER; - /** Last Branch Record n (R/W) One of 8 last branch record registers on the last branch record stack: bits 31-0 hold the 'from' address and bits 63-32 hold @@ -218,17 +215,16 @@ typedef union { MSR_PENTIUM_M_LASTBRANCH_7 is defined as MSR_LASTBRANCH_7 in SDM. @{ **/ -#define MSR_PENTIUM_M_LASTBRANCH_0 0x00000040 -#define MSR_PENTIUM_M_LASTBRANCH_1 0x00000041 -#define MSR_PENTIUM_M_LASTBRANCH_2 0x00000042 -#define MSR_PENTIUM_M_LASTBRANCH_3 0x00000043 -#define MSR_PENTIUM_M_LASTBRANCH_4 0x00000044 -#define MSR_PENTIUM_M_LASTBRANCH_5 0x00000045 -#define MSR_PENTIUM_M_LASTBRANCH_6 0x00000046 -#define MSR_PENTIUM_M_LASTBRANCH_7 0x00000047 +#define MSR_PENTIUM_M_LASTBRANCH_0 0x00000040 +#define MSR_PENTIUM_M_LASTBRANCH_1 0x00000041 +#define MSR_PENTIUM_M_LASTBRANCH_2 0x00000042 +#define MSR_PENTIUM_M_LASTBRANCH_3 0x00000043 +#define MSR_PENTIUM_M_LASTBRANCH_4 0x00000044 +#define MSR_PENTIUM_M_LASTBRANCH_5 0x00000045 +#define MSR_PENTIUM_M_LASTBRANCH_6 0x00000046 +#define MSR_PENTIUM_M_LASTBRANCH_7 0x00000047 /// @} - /** Reserved. @@ -245,8 +241,7 @@ typedef union { @endcode @note MSR_PENTIUM_M_BBL_CR_CTL is defined as MSR_BBL_CR_CTL in SDM. **/ -#define MSR_PENTIUM_M_BBL_CR_CTL 0x00000119 - +#define MSR_PENTIUM_M_BBL_CR_CTL 0x00000119 /** @@ -266,7 +261,7 @@ typedef union { @endcode @note MSR_PENTIUM_M_BBL_CR_CTL3 is defined as MSR_BBL_CR_CTL3 in SDM. **/ -#define MSR_PENTIUM_M_BBL_CR_CTL3 0x0000011E +#define MSR_PENTIUM_M_BBL_CR_CTL3 0x0000011E /** MSR information returned for MSR index #MSR_PENTIUM_M_BBL_CR_CTL3 @@ -280,41 +275,40 @@ typedef union { /// [Bit 0] L2 Hardware Enabled (RO) 1 = If the L2 is hardware-enabled 0 = /// Indicates if the L2 is hardware-disabled. /// - UINT32 L2HardwareEnabled:1; - UINT32 Reserved1:4; + UINT32 L2HardwareEnabled : 1; + UINT32 Reserved1 : 4; /// /// [Bit 5] ECC Check Enable (RO) This bit enables ECC checking on the /// cache data bus. ECC is always generated on write cycles. 1. = Disabled /// (default) 2. = Enabled For the Pentium M processor, ECC checking on /// the cache data bus is always enabled. /// - UINT32 ECCCheckEnable:1; - UINT32 Reserved2:2; + UINT32 ECCCheckEnable : 1; + UINT32 Reserved2 : 2; /// /// [Bit 8] L2 Enabled (R/W) 1 = L2 cache has been initialized 0 = /// Disabled (default) Until this bit is set the processor will not /// respond to the WBINVD instruction or the assertion of the FLUSH# input. /// - UINT32 L2Enabled:1; - UINT32 Reserved3:14; + UINT32 L2Enabled : 1; + UINT32 Reserved3 : 14; /// /// [Bit 23] L2 Not Present (RO) 1. = L2 Present 2. = L2 Not Present. /// - UINT32 L2NotPresent:1; - UINT32 Reserved4:8; - UINT32 Reserved5:32; + UINT32 L2NotPresent : 1; + UINT32 Reserved4 : 8; + UINT32 Reserved5 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_PENTIUM_M_BBL_CR_CTL3_REGISTER; - /** @@ -333,7 +327,7 @@ typedef union { @endcode @note MSR_PENTIUM_M_THERM2_CTL is defined as MSR_THERM2_CTL in SDM. **/ -#define MSR_PENTIUM_M_THERM2_CTL 0x0000019D +#define MSR_PENTIUM_M_THERM2_CTL 0x0000019D /** MSR information returned for MSR index #MSR_PENTIUM_M_THERM2_CTL @@ -343,7 +337,7 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:16; + UINT32 Reserved1 : 16; /// /// [Bit 16] TM_SELECT (R/W) Mode of automatic thermal monitor: 1. = /// Thermal Monitor 1 (thermally-initiated on-die modulation of the @@ -351,21 +345,20 @@ typedef union { /// frequency transitions) If bit 3 of the IA32_MISC_ENABLE register is /// cleared, TM_SELECT has no effect. Neither TM1 nor TM2 will be enabled. /// - UINT32 TM_SELECT:1; - UINT32 Reserved2:15; - UINT32 Reserved3:32; + UINT32 TM_SELECT : 1; + UINT32 Reserved2 : 15; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_PENTIUM_M_THERM2_CTL_REGISTER; - /** Enable Miscellaneous Processor Features (R/W) Allows a variety of processor functions to be enabled and disabled. @@ -385,7 +378,7 @@ typedef union { @endcode @note MSR_PENTIUM_M_IA32_MISC_ENABLE is defined as IA32_MISC_ENABLE in SDM. **/ -#define MSR_PENTIUM_M_IA32_MISC_ENABLE 0x000001A0 +#define MSR_PENTIUM_M_IA32_MISC_ENABLE 0x000001A0 /** MSR information returned for MSR index #MSR_PENTIUM_M_IA32_MISC_ENABLE @@ -395,7 +388,7 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:3; + UINT32 Reserved1 : 3; /// /// [Bit 3] Automatic Thermal Control Circuit Enable (R/W) 1 = Setting /// this bit enables the thermal control circuit (TCC) portion of the @@ -410,14 +403,14 @@ typedef union { /// this feature. The bit should not be confused with the on-demand /// thermal control circuit enable bit. /// - UINT32 AutomaticThermalControlCircuit:1; - UINT32 Reserved2:3; + UINT32 AutomaticThermalControlCircuit : 1; + UINT32 Reserved2 : 3; /// /// [Bit 7] Performance Monitoring Available (R) 1 = Performance /// monitoring enabled 0 = Performance monitoring disabled. /// - UINT32 PerformanceMonitoring:1; - UINT32 Reserved3:2; + UINT32 PerformanceMonitoring : 1; + UINT32 Reserved3 : 2; /// /// [Bit 10] FERR# Multiplexing Enable (R/W) 1 = FERR# asserted by the /// processor to indicate a pending break event within the processor 0 = @@ -426,48 +419,47 @@ typedef union { /// **Branch Trace Storage Unavailable (RO)** 1 = Processor doesn't /// support branch trace storage (BTS) 0 = BTS is supported /// - UINT32 FERR:1; + UINT32 FERR : 1; /// /// [Bit 11] Branch Trace Storage Unavailable (RO) /// 1 = Processor doesn't support branch trace storage (BTS) /// 0 = BTS is supported /// - UINT32 BTS:1; + UINT32 BTS : 1; /// /// [Bit 12] Processor Event Based Sampling Unavailable (RO) 1 = /// Processor does not support processor event based sampling (PEBS); 0 = /// PEBS is supported. The Pentium M processor does not support PEBS. /// - UINT32 PEBS:1; - UINT32 Reserved5:3; + UINT32 PEBS : 1; + UINT32 Reserved5 : 3; /// /// [Bit 16] Enhanced Intel SpeedStep Technology Enable (R/W) 1 = /// Enhanced Intel SpeedStep Technology enabled. On the Pentium M /// processor, this bit may be configured to be read-only. /// - UINT32 EIST:1; - UINT32 Reserved6:6; + UINT32 EIST : 1; + UINT32 Reserved6 : 6; /// /// [Bit 23] xTPR Message Disable (R/W) When set to 1, xTPR messages are /// disabled. xTPR messages are optional messages that allow the processor /// to inform the chipset of its priority. The default is processor /// specific. /// - UINT32 xTPR_Message_Disable:1; - UINT32 Reserved7:8; - UINT32 Reserved8:32; + UINT32 xTPR_Message_Disable : 1; + UINT32 Reserved7 : 8; + UINT32 Reserved8 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_PENTIUM_M_IA32_MISC_ENABLE_REGISTER; - /** Last Branch Record Stack TOS (R/W) Contains an index (bits 0-3) that points to the MSR containing the most recent branch record. See also: - @@ -487,8 +479,7 @@ typedef union { @endcode @note MSR_PENTIUM_M_LASTBRANCH_TOS is defined as MSR_LASTBRANCH_TOS in SDM. **/ -#define MSR_PENTIUM_M_LASTBRANCH_TOS 0x000001C9 - +#define MSR_PENTIUM_M_LASTBRANCH_TOS 0x000001C9 /** Debug Control (R/W) Controls how several debug features are used. Bit @@ -508,8 +499,7 @@ typedef union { @endcode @note MSR_PENTIUM_M_DEBUGCTLB is defined as MSR_DEBUGCTLB in SDM. **/ -#define MSR_PENTIUM_M_DEBUGCTLB 0x000001D9 - +#define MSR_PENTIUM_M_DEBUGCTLB 0x000001D9 /** Last Exception Record To Linear IP (R) This area contains a pointer to the @@ -531,8 +521,7 @@ typedef union { @endcode @note MSR_PENTIUM_M_LER_TO_LIP is defined as MSR_LER_TO_LIP in SDM. **/ -#define MSR_PENTIUM_M_LER_TO_LIP 0x000001DD - +#define MSR_PENTIUM_M_LER_TO_LIP 0x000001DD /** Last Exception Record From Linear IP (R) Contains a pointer to the last @@ -553,8 +542,7 @@ typedef union { @endcode @note MSR_PENTIUM_M_LER_FROM_LIP is defined as MSR_LER_FROM_LIP in SDM. **/ -#define MSR_PENTIUM_M_LER_FROM_LIP 0x000001DE - +#define MSR_PENTIUM_M_LER_FROM_LIP 0x000001DE /** See Section 15.3.2.1, "IA32_MCi_CTL MSRs.". @@ -572,8 +560,7 @@ typedef union { @endcode @note MSR_PENTIUM_M_MC4_CTL is defined as MSR_MC4_CTL in SDM. **/ -#define MSR_PENTIUM_M_MC4_CTL 0x0000040C - +#define MSR_PENTIUM_M_MC4_CTL 0x0000040C /** See Section 15.3.2.2, "IA32_MCi_STATUS MSRS.". @@ -591,8 +578,7 @@ typedef union { @endcode @note MSR_PENTIUM_M_MC4_STATUS is defined as MSR_MC4_STATUS in SDM. **/ -#define MSR_PENTIUM_M_MC4_STATUS 0x0000040D - +#define MSR_PENTIUM_M_MC4_STATUS 0x0000040D /** See Section 15.3.2.3, "IA32_MCi_ADDR MSRs." The MSR_MC4_ADDR register is @@ -613,8 +599,7 @@ typedef union { @endcode @note MSR_PENTIUM_M_MC4_ADDR is defined as MSR_MC4_ADDR in SDM. **/ -#define MSR_PENTIUM_M_MC4_ADDR 0x0000040E - +#define MSR_PENTIUM_M_MC4_ADDR 0x0000040E /** See Section 15.3.2.1, "IA32_MCi_CTL MSRs.". @@ -632,8 +617,7 @@ typedef union { @endcode @note MSR_PENTIUM_M_MC3_CTL is defined as MSR_MC3_CTL in SDM. **/ -#define MSR_PENTIUM_M_MC3_CTL 0x00000410 - +#define MSR_PENTIUM_M_MC3_CTL 0x00000410 /** See Section 15.3.2.2, "IA32_MCi_STATUS MSRS.". @@ -651,8 +635,7 @@ typedef union { @endcode @note MSR_PENTIUM_M_MC3_STATUS is defined as MSR_MC3_STATUS in SDM. **/ -#define MSR_PENTIUM_M_MC3_STATUS 0x00000411 - +#define MSR_PENTIUM_M_MC3_STATUS 0x00000411 /** See Section 15.3.2.3, "IA32_MCi_ADDR MSRs." The MSR_MC3_ADDR register is @@ -673,6 +656,6 @@ typedef union { @endcode @note MSR_PENTIUM_M_MC3_ADDR is defined as MSR_MC3_ADDR in SDM. **/ -#define MSR_PENTIUM_M_MC3_ADDR 0x00000412 +#define MSR_PENTIUM_M_MC3_ADDR 0x00000412 #endif diff --git a/MdePkg/Include/Register/Intel/Msr/PentiumMsr.h b/MdePkg/Include/Register/Intel/Msr/PentiumMsr.h index 5907432..ff8c9b3 100644 --- a/MdePkg/Include/Register/Intel/Msr/PentiumMsr.h +++ b/MdePkg/Include/Register/Intel/Msr/PentiumMsr.h @@ -54,8 +54,7 @@ @endcode @note MSR_PENTIUM_P5_MC_ADDR is defined as P5_MC_ADDR in SDM. **/ -#define MSR_PENTIUM_P5_MC_ADDR 0x00000000 - +#define MSR_PENTIUM_P5_MC_ADDR 0x00000000 /** See Section 15.10.2, "Pentium Processor Machine-Check Exception Handling.". @@ -73,8 +72,7 @@ @endcode @note MSR_PENTIUM_P5_MC_TYPE is defined as P5_MC_TYPE in SDM. **/ -#define MSR_PENTIUM_P5_MC_TYPE 0x00000001 - +#define MSR_PENTIUM_P5_MC_TYPE 0x00000001 /** See Section 17.17, "Time-Stamp Counter.". @@ -92,8 +90,7 @@ @endcode @note MSR_PENTIUM_TSC is defined as TSC in SDM. **/ -#define MSR_PENTIUM_TSC 0x00000010 - +#define MSR_PENTIUM_TSC 0x00000010 /** See Section 18.6.9.1, "Control and Event Select Register (CESR).". @@ -111,8 +108,7 @@ @endcode @note MSR_PENTIUM_CESR is defined as CESR in SDM. **/ -#define MSR_PENTIUM_CESR 0x00000011 - +#define MSR_PENTIUM_CESR 0x00000011 /** Section 18.6.9.3, "Events Counted.". @@ -132,8 +128,8 @@ MSR_PENTIUM_CTR1 is defined as CTR1 in SDM. @{ **/ -#define MSR_PENTIUM_CTR0 0x00000012 -#define MSR_PENTIUM_CTR1 0x00000013 +#define MSR_PENTIUM_CTR0 0x00000012 +#define MSR_PENTIUM_CTR1 0x00000013 /// @} #endif diff --git a/MdePkg/Include/Register/Intel/Msr/SandyBridgeMsr.h b/MdePkg/Include/Register/Intel/Msr/SandyBridgeMsr.h index 7118bf2..6dfc3a0 100644 --- a/MdePkg/Include/Register/Intel/Msr/SandyBridgeMsr.h +++ b/MdePkg/Include/Register/Intel/Msr/SandyBridgeMsr.h @@ -54,7 +54,7 @@ @endcode @note MSR_SANDY_BRIDGE_SMI_COUNT is defined as MSR_SMI_COUNT in SDM. **/ -#define MSR_SANDY_BRIDGE_SMI_COUNT 0x00000034 +#define MSR_SANDY_BRIDGE_SMI_COUNT 0x00000034 /** MSR information returned for MSR index #MSR_SANDY_BRIDGE_SMI_COUNT @@ -67,20 +67,19 @@ typedef union { /// /// [Bits 31:0] SMI Count (R/O) Count SMIs. /// - UINT32 SMICount:32; - UINT32 Reserved:32; + UINT32 SMICount : 32; + UINT32 Reserved : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_SMI_COUNT_REGISTER; - /** Package. Platform Information Contains power management and other model specific features enumeration. See http://biosbits.org. @@ -100,7 +99,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PLATFORM_INFO is defined as MSR_PLATFORM_INFO in SDM. **/ -#define MSR_SANDY_BRIDGE_PLATFORM_INFO 0x000000CE +#define MSR_SANDY_BRIDGE_PLATFORM_INFO 0x000000CE /** MSR information returned for MSR index #MSR_SANDY_BRIDGE_PLATFORM_INFO @@ -110,45 +109,44 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:8; + UINT32 Reserved1 : 8; /// /// [Bits 15:8] Package. Maximum Non-Turbo Ratio (R/O) The is the ratio /// of the frequency that invariant TSC runs at. Frequency = ratio * 100 /// MHz. /// - UINT32 MaximumNonTurboRatio:8; - UINT32 Reserved2:12; + UINT32 MaximumNonTurboRatio : 8; + UINT32 Reserved2 : 12; /// /// [Bit 28] Package. Programmable Ratio Limit for Turbo Mode (R/O) When /// set to 1, indicates that Programmable Ratio Limits for Turbo mode is /// enabled, and when set to 0, indicates Programmable Ratio Limits for /// Turbo mode is disabled. /// - UINT32 RatioLimit:1; + UINT32 RatioLimit : 1; /// /// [Bit 29] Package. Programmable TDP Limit for Turbo Mode (R/O) When /// set to 1, indicates that TDP Limits for Turbo mode are programmable, /// and when set to 0, indicates TDP Limit for Turbo mode is not /// programmable. /// - UINT32 TDPLimit:1; - UINT32 Reserved3:2; - UINT32 Reserved4:8; + UINT32 TDPLimit : 1; + UINT32 Reserved3 : 2; + UINT32 Reserved4 : 8; /// /// [Bits 47:40] Package. Maximum Efficiency Ratio (R/O) The is the /// minimum ratio (maximum efficiency) that the processor can operates, in /// units of 100MHz. /// - UINT32 MaximumEfficiencyRatio:8; - UINT32 Reserved5:16; + UINT32 MaximumEfficiencyRatio : 8; + UINT32 Reserved5 : 16; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_PLATFORM_INFO_REGISTER; - /** Core. C-State Configuration Control (R/W) Note: C-state values are processor specific C-state code names, unrelated to MWAIT extension C-state @@ -189,57 +187,56 @@ typedef union { /// C6 retention 100b: C7 101b: C7s 111: No package C-state limit. Note: /// This field cannot be used to limit package C-state to C3. /// - UINT32 Limit:3; - UINT32 Reserved1:7; + UINT32 Limit : 3; + UINT32 Reserved1 : 7; /// /// [Bit 10] I/O MWAIT Redirection Enable (R/W) When set, will map /// IO_read instructions sent to IO register specified by /// MSR_PMG_IO_CAPTURE_BASE to MWAIT instructions. /// - UINT32 IO_MWAIT:1; - UINT32 Reserved2:4; + UINT32 IO_MWAIT : 1; + UINT32 Reserved2 : 4; /// /// [Bit 15] CFG Lock (R/WO) When set, lock bits 15:0 of this register /// until next reset. /// - UINT32 CFGLock:1; - UINT32 Reserved3:9; + UINT32 CFGLock : 1; + UINT32 Reserved3 : 9; /// /// [Bit 25] C3 state auto demotion enable (R/W) When set, the processor /// will conditionally demote C6/C7 requests to C3 based on uncore /// auto-demote information. /// - UINT32 C3AutoDemotion:1; + UINT32 C3AutoDemotion : 1; /// /// [Bit 26] C1 state auto demotion enable (R/W) When set, the processor /// will conditionally demote C3/C6/C7 requests to C1 based on uncore /// auto-demote information. /// - UINT32 C1AutoDemotion:1; + UINT32 C1AutoDemotion : 1; /// /// [Bit 27] Enable C3 undemotion (R/W) When set, enables undemotion from /// demoted C3. /// - UINT32 C3Undemotion:1; + UINT32 C3Undemotion : 1; /// /// [Bit 28] Enable C1 undemotion (R/W) When set, enables undemotion from /// demoted C1. /// - UINT32 C1Undemotion:1; - UINT32 Reserved4:3; - UINT32 Reserved5:32; + UINT32 C1Undemotion : 1; + UINT32 Reserved4 : 3; + UINT32 Reserved5 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_PKG_CST_CONFIG_CONTROL_REGISTER; - /** Core. Power Management IO Redirection in C-state (R/W) See http://biosbits.org. @@ -259,7 +256,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PMG_IO_CAPTURE_BASE is defined as MSR_PMG_IO_CAPTURE_BASE in SDM. **/ -#define MSR_SANDY_BRIDGE_PMG_IO_CAPTURE_BASE 0x000000E4 +#define MSR_SANDY_BRIDGE_PMG_IO_CAPTURE_BASE 0x000000E4 /** MSR information returned for MSR index #MSR_SANDY_BRIDGE_PMG_IO_CAPTURE_BASE @@ -277,7 +274,7 @@ typedef union { /// address redirection is enabled, this is the IO port address reported /// to the OS/software. /// - UINT32 Lvl2Base:16; + UINT32 Lvl2Base : 16; /// /// [Bits 18:16] C-state Range (R/W) Specifies the encoding value of the /// maximum C-State code name to be included when IO read to MWAIT @@ -285,21 +282,20 @@ typedef union { /// is the max C-State to include 001b - C6 is the max C-State to include /// 010b - C7 is the max C-State to include. /// - UINT32 CStateRange:3; - UINT32 Reserved1:13; - UINT32 Reserved2:32; + UINT32 CStateRange : 3; + UINT32 Reserved1 : 13; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_PMG_IO_CAPTURE_BASE_REGISTER; - /** Core. AES Configuration (RW-L) Privileged post-BIOS agent must provide a #GP handler to handle unsuccessful read of this MSR. @@ -319,7 +315,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_FEATURE_CONFIG is defined as MSR_FEATURE_CONFIG in SDM. **/ -#define MSR_SANDY_BRIDGE_FEATURE_CONFIG 0x0000013C +#define MSR_SANDY_BRIDGE_FEATURE_CONFIG 0x0000013C /** MSR information returned for MSR index #MSR_SANDY_BRIDGE_FEATURE_CONFIG @@ -338,21 +334,20 @@ typedef union { /// 01b, AES instruction can be mis-configured if a privileged agent /// unintentionally writes 11b. /// - UINT32 AESConfiguration:2; - UINT32 Reserved1:30; - UINT32 Reserved2:32; + UINT32 AESConfiguration : 2; + UINT32 Reserved1 : 30; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_FEATURE_CONFIG_REGISTER; - /** Core. See Table 2-2. If CPUID.0AH:EAX[15:8] = 8. @@ -373,13 +368,12 @@ typedef union { MSR_SANDY_BRIDGE_IA32_PERFEVTSEL7 is defined as IA32_PERFEVTSEL7 in SDM. @{ **/ -#define MSR_SANDY_BRIDGE_IA32_PERFEVTSEL4 0x0000018A -#define MSR_SANDY_BRIDGE_IA32_PERFEVTSEL5 0x0000018B -#define MSR_SANDY_BRIDGE_IA32_PERFEVTSEL6 0x0000018C -#define MSR_SANDY_BRIDGE_IA32_PERFEVTSEL7 0x0000018D +#define MSR_SANDY_BRIDGE_IA32_PERFEVTSEL4 0x0000018A +#define MSR_SANDY_BRIDGE_IA32_PERFEVTSEL5 0x0000018B +#define MSR_SANDY_BRIDGE_IA32_PERFEVTSEL6 0x0000018C +#define MSR_SANDY_BRIDGE_IA32_PERFEVTSEL7 0x0000018D /// @} - /** Package. @@ -398,7 +392,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PERF_STATUS is defined as MSR_PERF_STATUS in SDM. **/ -#define MSR_SANDY_BRIDGE_PERF_STATUS 0x00000198 +#define MSR_SANDY_BRIDGE_PERF_STATUS 0x00000198 /** MSR information returned for MSR index #MSR_SANDY_BRIDGE_PERF_STATUS @@ -408,21 +402,20 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:32; + UINT32 Reserved1 : 32; /// /// [Bits 47:32] Core Voltage (R/O) P-state core voltage can be computed /// by MSR_PERF_STATUS[37:32] * (float) 1/(2^13). /// - UINT32 CoreVoltage:16; - UINT32 Reserved2:16; + UINT32 CoreVoltage : 16; + UINT32 Reserved2 : 16; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_PERF_STATUS_REGISTER; - /** Thread. Clock Modulation (R/W) See Table 2-2. IA32_CLOCK_MODULATION MSR was originally named IA32_THERM_CONTROL MSR. @@ -442,7 +435,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_IA32_CLOCK_MODULATION is defined as IA32_CLOCK_MODULATION in SDM. **/ -#define MSR_SANDY_BRIDGE_IA32_CLOCK_MODULATION 0x0000019A +#define MSR_SANDY_BRIDGE_IA32_CLOCK_MODULATION 0x0000019A /** MSR information returned for MSR index @@ -457,25 +450,24 @@ typedef union { /// [Bits 3:0] On demand Clock Modulation Duty Cycle (R/W) In 6.25% /// increment. /// - UINT32 OnDemandClockModulationDutyCycle:4; + UINT32 OnDemandClockModulationDutyCycle : 4; /// /// [Bit 4] On demand Clock Modulation Enable (R/W). /// - UINT32 OnDemandClockModulationEnable:1; - UINT32 Reserved1:27; - UINT32 Reserved2:32; + UINT32 OnDemandClockModulationEnable : 1; + UINT32 Reserved1 : 27; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_IA32_CLOCK_MODULATION_REGISTER; - /** Enable Misc. Processor Features (R/W) Allows a variety of processor functions to be enabled and disabled. @@ -495,7 +487,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_IA32_MISC_ENABLE is defined as IA32_MISC_ENABLE in SDM. **/ -#define MSR_SANDY_BRIDGE_IA32_MISC_ENABLE 0x000001A0 +#define MSR_SANDY_BRIDGE_IA32_MISC_ENABLE 0x000001A0 /** MSR information returned for MSR index #MSR_SANDY_BRIDGE_IA32_MISC_ENABLE @@ -508,49 +500,49 @@ typedef union { /// /// [Bit 0] Thread. Fast-Strings Enable See Table 2-2. /// - UINT32 FastStrings:1; - UINT32 Reserved1:6; + UINT32 FastStrings : 1; + UINT32 Reserved1 : 6; /// /// [Bit 7] Thread. Performance Monitoring Available (R) See Table 2-2. /// - UINT32 PerformanceMonitoring:1; - UINT32 Reserved2:3; + UINT32 PerformanceMonitoring : 1; + UINT32 Reserved2 : 3; /// /// [Bit 11] Thread. Branch Trace Storage Unavailable (RO) See Table 2-2. /// - UINT32 BTS:1; + UINT32 BTS : 1; /// /// [Bit 12] Thread. Processor Event Based Sampling Unavailable (RO) See /// Table 2-2. /// - UINT32 PEBS:1; - UINT32 Reserved3:3; + UINT32 PEBS : 1; + UINT32 Reserved3 : 3; /// /// [Bit 16] Package. Enhanced Intel SpeedStep Technology Enable (R/W) See /// Table 2-2. /// - UINT32 EIST:1; - UINT32 Reserved4:1; + UINT32 EIST : 1; + UINT32 Reserved4 : 1; /// /// [Bit 18] Thread. ENABLE MONITOR FSM (R/W) See Table 2-2. /// - UINT32 MONITOR:1; - UINT32 Reserved5:3; + UINT32 MONITOR : 1; + UINT32 Reserved5 : 3; /// /// [Bit 22] Thread. Limit CPUID Maxval (R/W) See Table 2-2. /// - UINT32 LimitCpuidMaxval:1; + UINT32 LimitCpuidMaxval : 1; /// /// [Bit 23] Thread. xTPR Message Disable (R/W) See Table 2-2. /// - UINT32 xTPR_Message_Disable:1; - UINT32 Reserved6:8; - UINT32 Reserved7:2; + UINT32 xTPR_Message_Disable : 1; + UINT32 Reserved6 : 8; + UINT32 Reserved7 : 2; /// /// [Bit 34] Thread. XD Bit Disable (R/W) See Table 2-2. /// - UINT32 XD:1; - UINT32 Reserved8:3; + UINT32 XD : 1; + UINT32 Reserved8 : 3; /// /// [Bit 38] Package. Turbo Mode Disable (R/W) When set to 1 on processors /// that support Intel Turbo Boost Technology, the turbo mode feature is @@ -562,16 +554,15 @@ typedef union { /// in the processor. If power-on default value is 0, turbo mode is not /// available. /// - UINT32 TurboModeDisable:1; - UINT32 Reserved9:25; + UINT32 TurboModeDisable : 1; + UINT32 Reserved9 : 25; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_IA32_MISC_ENABLE_REGISTER; - /** Unique. @@ -590,7 +581,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_TEMPERATURE_TARGET is defined as MSR_TEMPERATURE_TARGET in SDM. **/ -#define MSR_SANDY_BRIDGE_TEMPERATURE_TARGET 0x000001A2 +#define MSR_SANDY_BRIDGE_TEMPERATURE_TARGET 0x000001A2 /** MSR information returned for MSR index #MSR_SANDY_BRIDGE_TEMPERATURE_TARGET @@ -600,26 +591,25 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:16; + UINT32 Reserved1 : 16; /// /// [Bits 23:16] Temperature Target (R) The minimum temperature at which /// PROCHOT# will be asserted. The value is degree C. /// - UINT32 TemperatureTarget:8; - UINT32 Reserved2:8; - UINT32 Reserved3:32; + UINT32 TemperatureTarget : 8; + UINT32 Reserved2 : 8; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_TEMPERATURE_TARGET_REGISTER; - /** Miscellaneous Feature Control (R/W). @@ -638,7 +628,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_MISC_FEATURE_CONTROL is defined as MSR_MISC_FEATURE_CONTROL in SDM. **/ -#define MSR_SANDY_BRIDGE_MISC_FEATURE_CONTROL 0x000001A4 +#define MSR_SANDY_BRIDGE_MISC_FEATURE_CONTROL 0x000001A4 /** MSR information returned for MSR index #MSR_SANDY_BRIDGE_MISC_FEATURE_CONTROL @@ -653,40 +643,39 @@ typedef union { /// L2 hardware prefetcher, which fetches additional lines of code or data /// into the L2 cache. /// - UINT32 L2HardwarePrefetcherDisable:1; + UINT32 L2HardwarePrefetcherDisable : 1; /// /// [Bit 1] Core. L2 Adjacent Cache Line Prefetcher Disable (R/W) If 1, /// disables the adjacent cache line prefetcher, which fetches the cache /// line that comprises a cache line pair (128 bytes). /// - UINT32 L2AdjacentCacheLinePrefetcherDisable:1; + UINT32 L2AdjacentCacheLinePrefetcherDisable : 1; /// /// [Bit 2] Core. DCU Hardware Prefetcher Disable (R/W) If 1, disables /// the L1 data cache prefetcher, which fetches the next cache line into /// L1 data cache. /// - UINT32 DCUHardwarePrefetcherDisable:1; + UINT32 DCUHardwarePrefetcherDisable : 1; /// /// [Bit 3] Core. DCU IP Prefetcher Disable (R/W) If 1, disables the L1 /// data cache IP prefetcher, which uses sequential load history (based on /// instruction Pointer of previous loads) to determine whether to /// prefetch additional lines. /// - UINT32 DCUIPPrefetcherDisable:1; - UINT32 Reserved1:28; - UINT32 Reserved2:32; + UINT32 DCUIPPrefetcherDisable : 1; + UINT32 Reserved1 : 28; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_MISC_FEATURE_CONTROL_REGISTER; - /** Thread. Offcore Response Event Select Register (R/W). @@ -703,8 +692,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_OFFCORE_RSP_0 is defined as MSR_OFFCORE_RSP_0 in SDM. **/ -#define MSR_SANDY_BRIDGE_OFFCORE_RSP_0 0x000001A6 - +#define MSR_SANDY_BRIDGE_OFFCORE_RSP_0 0x000001A6 /** Thread. Offcore Response Event Select Register (R/W). @@ -722,8 +710,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_OFFCORE_RSP_1 is defined as MSR_OFFCORE_RSP_1 in SDM. **/ -#define MSR_SANDY_BRIDGE_OFFCORE_RSP_1 0x000001A7 - +#define MSR_SANDY_BRIDGE_OFFCORE_RSP_1 0x000001A7 /** See http://biosbits.org. @@ -741,8 +728,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_MISC_PWR_MGMT is defined as MSR_MISC_PWR_MGMT in SDM. **/ -#define MSR_SANDY_BRIDGE_MISC_PWR_MGMT 0x000001AA - +#define MSR_SANDY_BRIDGE_MISC_PWR_MGMT 0x000001AA /** Thread. Last Branch Record Filtering Select Register (R/W) See Section @@ -763,7 +749,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_LBR_SELECT is defined as MSR_LBR_SELECT in SDM. **/ -#define MSR_SANDY_BRIDGE_LBR_SELECT 0x000001C8 +#define MSR_SANDY_BRIDGE_LBR_SELECT 0x000001C8 /** MSR information returned for MSR index #MSR_SANDY_BRIDGE_LBR_SELECT @@ -776,53 +762,52 @@ typedef union { /// /// [Bit 0] CPL_EQ_0. /// - UINT32 CPL_EQ_0:1; + UINT32 CPL_EQ_0 : 1; /// /// [Bit 1] CPL_NEQ_0. /// - UINT32 CPL_NEQ_0:1; + UINT32 CPL_NEQ_0 : 1; /// /// [Bit 2] JCC. /// - UINT32 JCC:1; + UINT32 JCC : 1; /// /// [Bit 3] NEAR_REL_CALL. /// - UINT32 NEAR_REL_CALL:1; + UINT32 NEAR_REL_CALL : 1; /// /// [Bit 4] NEAR_IND_CALL. /// - UINT32 NEAR_IND_CALL:1; + UINT32 NEAR_IND_CALL : 1; /// /// [Bit 5] NEAR_RET. /// - UINT32 NEAR_RET:1; + UINT32 NEAR_RET : 1; /// /// [Bit 6] NEAR_IND_JMP. /// - UINT32 NEAR_IND_JMP:1; + UINT32 NEAR_IND_JMP : 1; /// /// [Bit 7] NEAR_REL_JMP. /// - UINT32 NEAR_REL_JMP:1; + UINT32 NEAR_REL_JMP : 1; /// /// [Bit 8] FAR_BRANCH. /// - UINT32 FAR_BRANCH:1; - UINT32 Reserved1:23; - UINT32 Reserved2:32; + UINT32 FAR_BRANCH : 1; + UINT32 Reserved1 : 23; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_LBR_SELECT_REGISTER; - /** Thread. Last Branch Record Stack TOS (R/W) Contains an index (bits 0-3) that points to the MSR containing the most recent branch record. See @@ -841,8 +826,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_LASTBRANCH_TOS is defined as MSR_LASTBRANCH_TOS in SDM. **/ -#define MSR_SANDY_BRIDGE_LASTBRANCH_TOS 0x000001C9 - +#define MSR_SANDY_BRIDGE_LASTBRANCH_TOS 0x000001C9 /** Thread. Last Exception Record From Linear IP (R) Contains a pointer to the @@ -861,8 +845,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_LER_FROM_LIP is defined as MSR_LER_FROM_LIP in SDM. **/ -#define MSR_SANDY_BRIDGE_LER_FROM_LIP 0x000001DD - +#define MSR_SANDY_BRIDGE_LER_FROM_LIP 0x000001DD /** Thread. Last Exception Record To Linear IP (R) This area contains a pointer @@ -882,8 +865,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_LER_TO_LIP is defined as MSR_LER_TO_LIP in SDM. **/ -#define MSR_SANDY_BRIDGE_LER_TO_LIP 0x000001DE - +#define MSR_SANDY_BRIDGE_LER_TO_LIP 0x000001DE /** Core. See http://biosbits.org. @@ -901,8 +883,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_POWER_CTL is defined as MSR_POWER_CTL in SDM. **/ -#define MSR_SANDY_BRIDGE_POWER_CTL 0x000001FC - +#define MSR_SANDY_BRIDGE_POWER_CTL 0x000001FC /** Package. Always 0 (CMCI not supported). @@ -920,8 +901,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_IA32_MC4_CTL2 is defined as IA32_MC4_CTL2 in SDM. **/ -#define MSR_SANDY_BRIDGE_IA32_MC4_CTL2 0x00000284 - +#define MSR_SANDY_BRIDGE_IA32_MC4_CTL2 0x00000284 /** See Table 2-2. See Section 18.6.2.2, "Global Counter Control Facilities.". @@ -941,7 +921,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_IA32_PERF_GLOBAL_STATUS is defined as IA32_PERF_GLOBAL_STATUS in SDM. **/ -#define MSR_SANDY_BRIDGE_IA32_PERF_GLOBAL_STATUS 0x0000038E +#define MSR_SANDY_BRIDGE_IA32_PERF_GLOBAL_STATUS 0x0000038E /** MSR information returned for MSR index @@ -955,69 +935,68 @@ typedef union { /// /// [Bit 0] Thread. Ovf_PMC0. /// - UINT32 Ovf_PMC0:1; + UINT32 Ovf_PMC0 : 1; /// /// [Bit 1] Thread. Ovf_PMC1. /// - UINT32 Ovf_PMC1:1; + UINT32 Ovf_PMC1 : 1; /// /// [Bit 2] Thread. Ovf_PMC2. /// - UINT32 Ovf_PMC2:1; + UINT32 Ovf_PMC2 : 1; /// /// [Bit 3] Thread. Ovf_PMC3. /// - UINT32 Ovf_PMC3:1; + UINT32 Ovf_PMC3 : 1; /// /// [Bit 4] Core. Ovf_PMC4 (if CPUID.0AH:EAX[15:8] > 4). /// - UINT32 Ovf_PMC4:1; + UINT32 Ovf_PMC4 : 1; /// /// [Bit 5] Core. Ovf_PMC5 (if CPUID.0AH:EAX[15:8] > 5). /// - UINT32 Ovf_PMC5:1; + UINT32 Ovf_PMC5 : 1; /// /// [Bit 6] Core. Ovf_PMC6 (if CPUID.0AH:EAX[15:8] > 6). /// - UINT32 Ovf_PMC6:1; + UINT32 Ovf_PMC6 : 1; /// /// [Bit 7] Core. Ovf_PMC7 (if CPUID.0AH:EAX[15:8] > 7). /// - UINT32 Ovf_PMC7:1; - UINT32 Reserved1:24; + UINT32 Ovf_PMC7 : 1; + UINT32 Reserved1 : 24; /// /// [Bit 32] Thread. Ovf_FixedCtr0. /// - UINT32 Ovf_FixedCtr0:1; + UINT32 Ovf_FixedCtr0 : 1; /// /// [Bit 33] Thread. Ovf_FixedCtr1. /// - UINT32 Ovf_FixedCtr1:1; + UINT32 Ovf_FixedCtr1 : 1; /// /// [Bit 34] Thread. Ovf_FixedCtr2. /// - UINT32 Ovf_FixedCtr2:1; - UINT32 Reserved2:26; + UINT32 Ovf_FixedCtr2 : 1; + UINT32 Reserved2 : 26; /// /// [Bit 61] Thread. Ovf_Uncore. /// - UINT32 Ovf_Uncore:1; + UINT32 Ovf_Uncore : 1; /// /// [Bit 62] Thread. Ovf_BufDSSAVE. /// - UINT32 Ovf_BufDSSAVE:1; + UINT32 Ovf_BufDSSAVE : 1; /// /// [Bit 63] Thread. CondChgd. /// - UINT32 CondChgd:1; + UINT32 CondChgd : 1; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_IA32_PERF_GLOBAL_STATUS_REGISTER; - /** Thread. See Table 2-2. See Section 18.6.2.2, "Global Counter Control Facilities.". @@ -1037,7 +1016,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_IA32_PERF_GLOBAL_CTRL is defined as IA32_PERF_GLOBAL_CTRL in SDM. **/ -#define MSR_SANDY_BRIDGE_IA32_PERF_GLOBAL_CTRL 0x0000038F +#define MSR_SANDY_BRIDGE_IA32_PERF_GLOBAL_CTRL 0x0000038F /** MSR information returned for MSR index @@ -1051,61 +1030,60 @@ typedef union { /// /// [Bit 0] Thread. Set 1 to enable PMC0 to count. /// - UINT32 PCM0_EN:1; + UINT32 PCM0_EN : 1; /// /// [Bit 1] Thread. Set 1 to enable PMC1 to count. /// - UINT32 PCM1_EN:1; + UINT32 PCM1_EN : 1; /// /// [Bit 2] Thread. Set 1 to enable PMC2 to count. /// - UINT32 PCM2_EN:1; + UINT32 PCM2_EN : 1; /// /// [Bit 3] Thread. Set 1 to enable PMC3 to count. /// - UINT32 PCM3_EN:1; + UINT32 PCM3_EN : 1; /// /// [Bit 4] Core. Set 1 to enable PMC4 to count (if CPUID.0AH:EAX[15:8] > /// 4). /// - UINT32 PCM4_EN:1; + UINT32 PCM4_EN : 1; /// /// [Bit 5] Core. Set 1 to enable PMC5 to count (if CPUID.0AH:EAX[15:8] > /// 5). /// - UINT32 PCM5_EN:1; + UINT32 PCM5_EN : 1; /// /// [Bit 6] Core. Set 1 to enable PMC6 to count (if CPUID.0AH:EAX[15:8] > /// 6). /// - UINT32 PCM6_EN:1; + UINT32 PCM6_EN : 1; /// /// [Bit 7] Core. Set 1 to enable PMC7 to count (if CPUID.0AH:EAX[15:8] > /// 7). /// - UINT32 PCM7_EN:1; - UINT32 Reserved1:24; + UINT32 PCM7_EN : 1; + UINT32 Reserved1 : 24; /// /// [Bit 32] Thread. Set 1 to enable FixedCtr0 to count. /// - UINT32 FIXED_CTR0:1; + UINT32 FIXED_CTR0 : 1; /// /// [Bit 33] Thread. Set 1 to enable FixedCtr1 to count. /// - UINT32 FIXED_CTR1:1; + UINT32 FIXED_CTR1 : 1; /// /// [Bit 34] Thread. Set 1 to enable FixedCtr2 to count. /// - UINT32 FIXED_CTR2:1; - UINT32 Reserved2:29; + UINT32 FIXED_CTR2 : 1; + UINT32 Reserved2 : 29; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_IA32_PERF_GLOBAL_CTRL_REGISTER; - /** See Table 2-2. See Section 18.6.2.2, "Global Counter Control Facilities.". @@ -1124,7 +1102,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_IA32_PERF_GLOBAL_OVF_CTRL is defined as IA32_PERF_GLOBAL_OVF_CTRL in SDM. **/ -#define MSR_SANDY_BRIDGE_IA32_PERF_GLOBAL_OVF_CTRL 0x00000390 +#define MSR_SANDY_BRIDGE_IA32_PERF_GLOBAL_OVF_CTRL 0x00000390 /** MSR information returned for MSR index @@ -1138,69 +1116,68 @@ typedef union { /// /// [Bit 0] Thread. Set 1 to clear Ovf_PMC0. /// - UINT32 Ovf_PMC0:1; + UINT32 Ovf_PMC0 : 1; /// /// [Bit 1] Thread. Set 1 to clear Ovf_PMC1. /// - UINT32 Ovf_PMC1:1; + UINT32 Ovf_PMC1 : 1; /// /// [Bit 2] Thread. Set 1 to clear Ovf_PMC2. /// - UINT32 Ovf_PMC2:1; + UINT32 Ovf_PMC2 : 1; /// /// [Bit 3] Thread. Set 1 to clear Ovf_PMC3. /// - UINT32 Ovf_PMC3:1; + UINT32 Ovf_PMC3 : 1; /// /// [Bit 4] Core. Set 1 to clear Ovf_PMC4 (if CPUID.0AH:EAX[15:8] > 4). /// - UINT32 Ovf_PMC4:1; + UINT32 Ovf_PMC4 : 1; /// /// [Bit 5] Core. Set 1 to clear Ovf_PMC5 (if CPUID.0AH:EAX[15:8] > 5). /// - UINT32 Ovf_PMC5:1; + UINT32 Ovf_PMC5 : 1; /// /// [Bit 6] Core. Set 1 to clear Ovf_PMC6 (if CPUID.0AH:EAX[15:8] > 6). /// - UINT32 Ovf_PMC6:1; + UINT32 Ovf_PMC6 : 1; /// /// [Bit 7] Core. Set 1 to clear Ovf_PMC7 (if CPUID.0AH:EAX[15:8] > 7). /// - UINT32 Ovf_PMC7:1; - UINT32 Reserved1:24; + UINT32 Ovf_PMC7 : 1; + UINT32 Reserved1 : 24; /// /// [Bit 32] Thread. Set 1 to clear Ovf_FixedCtr0. /// - UINT32 Ovf_FixedCtr0:1; + UINT32 Ovf_FixedCtr0 : 1; /// /// [Bit 33] Thread. Set 1 to clear Ovf_FixedCtr1. /// - UINT32 Ovf_FixedCtr1:1; + UINT32 Ovf_FixedCtr1 : 1; /// /// [Bit 34] Thread. Set 1 to clear Ovf_FixedCtr2. /// - UINT32 Ovf_FixedCtr2:1; - UINT32 Reserved2:26; + UINT32 Ovf_FixedCtr2 : 1; + UINT32 Reserved2 : 26; /// /// [Bit 61] Thread. Set 1 to clear Ovf_Uncore. /// - UINT32 Ovf_Uncore:1; + UINT32 Ovf_Uncore : 1; /// /// [Bit 62] Thread. Set 1 to clear Ovf_BufDSSAVE. /// - UINT32 Ovf_BufDSSAVE:1; + UINT32 Ovf_BufDSSAVE : 1; /// /// [Bit 63] Thread. Set 1 to clear CondChgd. /// - UINT32 CondChgd:1; + UINT32 CondChgd : 1; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_IA32_PERF_GLOBAL_OVF_CTRL_REGISTER; - /** Thread. See Section 18.3.1.1.1, "Processor Event Based Sampling (PEBS).". @@ -1219,7 +1196,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PEBS_ENABLE is defined as MSR_PEBS_ENABLE in SDM. **/ -#define MSR_SANDY_BRIDGE_PEBS_ENABLE 0x000003F1 +#define MSR_SANDY_BRIDGE_PEBS_ENABLE 0x000003F1 /** MSR information returned for MSR index #MSR_SANDY_BRIDGE_PEBS_ENABLE @@ -1232,49 +1209,48 @@ typedef union { /// /// [Bit 0] Enable PEBS on IA32_PMC0. (R/W). /// - UINT32 PEBS_EN_PMC0:1; + UINT32 PEBS_EN_PMC0 : 1; /// /// [Bit 1] Enable PEBS on IA32_PMC1. (R/W). /// - UINT32 PEBS_EN_PMC1:1; + UINT32 PEBS_EN_PMC1 : 1; /// /// [Bit 2] Enable PEBS on IA32_PMC2. (R/W). /// - UINT32 PEBS_EN_PMC2:1; + UINT32 PEBS_EN_PMC2 : 1; /// /// [Bit 3] Enable PEBS on IA32_PMC3. (R/W). /// - UINT32 PEBS_EN_PMC3:1; - UINT32 Reserved1:28; + UINT32 PEBS_EN_PMC3 : 1; + UINT32 Reserved1 : 28; /// /// [Bit 32] Enable Load Latency on IA32_PMC0. (R/W). /// - UINT32 LL_EN_PMC0:1; + UINT32 LL_EN_PMC0 : 1; /// /// [Bit 33] Enable Load Latency on IA32_PMC1. (R/W). /// - UINT32 LL_EN_PMC1:1; + UINT32 LL_EN_PMC1 : 1; /// /// [Bit 34] Enable Load Latency on IA32_PMC2. (R/W). /// - UINT32 LL_EN_PMC2:1; + UINT32 LL_EN_PMC2 : 1; /// /// [Bit 35] Enable Load Latency on IA32_PMC3. (R/W). /// - UINT32 LL_EN_PMC3:1; - UINT32 Reserved2:27; + UINT32 LL_EN_PMC3 : 1; + UINT32 Reserved2 : 27; /// /// [Bit 63] Enable Precise Store. (R/W). /// - UINT32 PS_EN:1; + UINT32 PS_EN : 1; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_PEBS_ENABLE_REGISTER; - /** Thread. See Section 18.3.1.1.2, "Load Latency Performance Monitoring Facility.". @@ -1294,7 +1270,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PEBS_LD_LAT is defined as MSR_PEBS_LD_LAT in SDM. **/ -#define MSR_SANDY_BRIDGE_PEBS_LD_LAT 0x000003F6 +#define MSR_SANDY_BRIDGE_PEBS_LD_LAT 0x000003F6 /** MSR information returned for MSR index #MSR_SANDY_BRIDGE_PEBS_LD_LAT @@ -1308,21 +1284,20 @@ typedef union { /// [Bits 15:0] Minimum threshold latency value of tagged load operation /// that will be counted. (R/W). /// - UINT32 MinimumThreshold:16; - UINT32 Reserved1:16; - UINT32 Reserved2:32; + UINT32 MinimumThreshold : 16; + UINT32 Reserved1 : 16; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_PEBS_LD_LAT_REGISTER; - /** Package. Note: C-state values are processor specific C-state code names, unrelated to MWAIT extension C-state parameters or ACPI CStates. Package C3 @@ -1342,8 +1317,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PKG_C3_RESIDENCY is defined as MSR_PKG_C3_RESIDENCY in SDM. **/ -#define MSR_SANDY_BRIDGE_PKG_C3_RESIDENCY 0x000003F8 - +#define MSR_SANDY_BRIDGE_PKG_C3_RESIDENCY 0x000003F8 /** Package. Note: C-state values are processor specific C-state code names, @@ -1364,8 +1338,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PKG_C6_RESIDENCY is defined as MSR_PKG_C6_RESIDENCY in SDM. **/ -#define MSR_SANDY_BRIDGE_PKG_C6_RESIDENCY 0x000003F9 - +#define MSR_SANDY_BRIDGE_PKG_C6_RESIDENCY 0x000003F9 /** Package. Note: C-state values are processor specific C-state code names, @@ -1386,8 +1359,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PKG_C7_RESIDENCY is defined as MSR_PKG_C7_RESIDENCY in SDM. **/ -#define MSR_SANDY_BRIDGE_PKG_C7_RESIDENCY 0x000003FA - +#define MSR_SANDY_BRIDGE_PKG_C7_RESIDENCY 0x000003FA /** Core. Note: C-state values are processor specific C-state code names, @@ -1408,8 +1380,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_CORE_C3_RESIDENCY is defined as MSR_CORE_C3_RESIDENCY in SDM. **/ -#define MSR_SANDY_BRIDGE_CORE_C3_RESIDENCY 0x000003FC - +#define MSR_SANDY_BRIDGE_CORE_C3_RESIDENCY 0x000003FC /** Core. Note: C-state values are processor specific C-state code names, @@ -1430,8 +1401,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_CORE_C6_RESIDENCY is defined as MSR_CORE_C6_RESIDENCY in SDM. **/ -#define MSR_SANDY_BRIDGE_CORE_C6_RESIDENCY 0x000003FD - +#define MSR_SANDY_BRIDGE_CORE_C6_RESIDENCY 0x000003FD /** Core. Note: C-state values are processor specific C-state code names, @@ -1452,8 +1422,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_CORE_C7_RESIDENCY is defined as MSR_CORE_C7_RESIDENCY in SDM. **/ -#define MSR_SANDY_BRIDGE_CORE_C7_RESIDENCY 0x000003FE - +#define MSR_SANDY_BRIDGE_CORE_C7_RESIDENCY 0x000003FE /** Core. See Section 15.3.2.1, "IA32_MCi_CTL MSRs.". @@ -1473,7 +1442,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_IA32_MC4_CTL is defined as IA32_MC4_CTL in SDM. **/ -#define MSR_SANDY_BRIDGE_IA32_MC4_CTL 0x00000410 +#define MSR_SANDY_BRIDGE_IA32_MC4_CTL 0x00000410 /** MSR information returned for MSR index #MSR_SANDY_BRIDGE_IA32_MC4_CTL @@ -1487,31 +1456,30 @@ typedef union { /// [Bit 0] PCU Hardware Error (R/W) When set, enables signaling of PCU /// hardware detected errors. /// - UINT32 PCUHardwareError:1; + UINT32 PCUHardwareError : 1; /// /// [Bit 1] PCU Controller Error (R/W) When set, enables signaling of PCU /// controller detected errors. /// - UINT32 PCUControllerError:1; + UINT32 PCUControllerError : 1; /// /// [Bit 2] PCU Firmware Error (R/W) When set, enables signaling of PCU /// firmware detected errors. /// - UINT32 PCUFirmwareError:1; - UINT32 Reserved1:29; - UINT32 Reserved2:32; + UINT32 PCUFirmwareError : 1; + UINT32 Reserved1 : 29; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_IA32_MC4_CTL_REGISTER; - /** Thread. Capability Reporting Register of EPT and VPID (R/O) See Table 2-2. @@ -1529,7 +1497,6 @@ typedef union { **/ #define MSR_SANDY_BRIDGE_IA32_VMX_EPT_VPID_ENUM 0x0000048C - /** Package. Unit Multipliers used in RAPL Interfaces (R/O) See Section 14.9.1, "RAPL Interfaces.". @@ -1546,8 +1513,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_RAPL_POWER_UNIT is defined as MSR_RAPL_POWER_UNIT in SDM. **/ -#define MSR_SANDY_BRIDGE_RAPL_POWER_UNIT 0x00000606 - +#define MSR_SANDY_BRIDGE_RAPL_POWER_UNIT 0x00000606 /** Package. Package C3 Interrupt Response Limit (R/W) Note: C-state values are @@ -1569,7 +1535,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PKGC3_IRTL is defined as MSR_PKGC3_IRTL in SDM. **/ -#define MSR_SANDY_BRIDGE_PKGC3_IRTL 0x0000060A +#define MSR_SANDY_BRIDGE_PKGC3_IRTL 0x0000060A /** MSR information returned for MSR index #MSR_SANDY_BRIDGE_PKGC3_IRTL @@ -1584,34 +1550,33 @@ typedef union { /// that should be used to decide if the package should be put into a /// package C3 state. /// - UINT32 TimeLimit:10; + UINT32 TimeLimit : 10; /// /// [Bits 12:10] Time Unit (R/W) Specifies the encoding value of time /// unit of the interrupt response time limit. The following time unit /// encodings are supported: 000b: 1 ns 001b: 32 ns 010b: 1024 ns 011b: /// 32768 ns 100b: 1048576 ns 101b: 33554432 ns. /// - UINT32 TimeUnit:3; - UINT32 Reserved1:2; + UINT32 TimeUnit : 3; + UINT32 Reserved1 : 2; /// /// [Bit 15] Valid (R/W) Indicates whether the values in bits 12:0 are /// valid and can be used by the processor for package C-sate management. /// - UINT32 Valid:1; - UINT32 Reserved2:16; - UINT32 Reserved3:32; + UINT32 Valid : 1; + UINT32 Reserved2 : 16; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_PKGC3_IRTL_REGISTER; - /** Package. Package C6 Interrupt Response Limit (R/W) This MSR defines the budget allocated for the package to exit from C6 to a C0 state, where @@ -1635,7 +1600,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PKGC6_IRTL is defined as MSR_PKGC6_IRTL in SDM. **/ -#define MSR_SANDY_BRIDGE_PKGC6_IRTL 0x0000060B +#define MSR_SANDY_BRIDGE_PKGC6_IRTL 0x0000060B /** MSR information returned for MSR index #MSR_SANDY_BRIDGE_PKGC6_IRTL @@ -1650,34 +1615,33 @@ typedef union { /// that should be used to decide if the package should be put into a /// package C6 state. /// - UINT32 TimeLimit:10; + UINT32 TimeLimit : 10; /// /// [Bits 12:10] Time Unit (R/W) Specifies the encoding value of time /// unit of the interrupt response time limit. The following time unit /// encodings are supported: 000b: 1 ns 001b: 32 ns 010b: 1024 ns 011b: /// 32768 ns 100b: 1048576 ns 101b: 33554432 ns. /// - UINT32 TimeUnit:3; - UINT32 Reserved1:2; + UINT32 TimeUnit : 3; + UINT32 Reserved1 : 2; /// /// [Bit 15] Valid (R/W) Indicates whether the values in bits 12:0 are /// valid and can be used by the processor for package C-sate management. /// - UINT32 Valid:1; - UINT32 Reserved2:16; - UINT32 Reserved3:32; + UINT32 Valid : 1; + UINT32 Reserved2 : 16; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_PKGC6_IRTL_REGISTER; - /** Package. Note: C-state values are processor specific C-state code names, unrelated to MWAIT extension C-state parameters or ACPI CStates. Package C2 @@ -1697,8 +1661,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PKG_C2_RESIDENCY is defined as MSR_PKG_C2_RESIDENCY in SDM. **/ -#define MSR_SANDY_BRIDGE_PKG_C2_RESIDENCY 0x0000060D - +#define MSR_SANDY_BRIDGE_PKG_C2_RESIDENCY 0x0000060D /** Package. PKG RAPL Power Limit Control (R/W) See Section 14.9.3, "Package @@ -1717,8 +1680,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PKG_POWER_LIMIT is defined as MSR_PKG_POWER_LIMIT in SDM. **/ -#define MSR_SANDY_BRIDGE_PKG_POWER_LIMIT 0x00000610 - +#define MSR_SANDY_BRIDGE_PKG_POWER_LIMIT 0x00000610 /** Package. PKG Energy Status (R/O) See Section 14.9.3, "Package RAPL Domain.". @@ -1735,8 +1697,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PKG_ENERGY_STATUS is defined as MSR_PKG_ENERGY_STATUS in SDM. **/ -#define MSR_SANDY_BRIDGE_PKG_ENERGY_STATUS 0x00000611 - +#define MSR_SANDY_BRIDGE_PKG_ENERGY_STATUS 0x00000611 /** Package. PKG RAPL Parameters (R/W) See Section 14.9.3, "Package RAPL @@ -1755,8 +1716,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PKG_POWER_INFO is defined as MSR_PKG_POWER_INFO in SDM. **/ -#define MSR_SANDY_BRIDGE_PKG_POWER_INFO 0x00000614 - +#define MSR_SANDY_BRIDGE_PKG_POWER_INFO 0x00000614 /** Package. PP0 RAPL Power Limit Control (R/W) See Section 14.9.4, "PP0/PP1 @@ -1775,8 +1735,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PP0_POWER_LIMIT is defined as MSR_PP0_POWER_LIMIT in SDM. **/ -#define MSR_SANDY_BRIDGE_PP0_POWER_LIMIT 0x00000638 - +#define MSR_SANDY_BRIDGE_PP0_POWER_LIMIT 0x00000638 /** Package. PP0 Energy Status (R/O) See Section 14.9.4, "PP0/PP1 RAPL @@ -1794,8 +1753,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PP0_ENERGY_STATUS is defined as MSR_PP0_ENERGY_STATUS in SDM. **/ -#define MSR_SANDY_BRIDGE_PP0_ENERGY_STATUS 0x00000639 - +#define MSR_SANDY_BRIDGE_PP0_ENERGY_STATUS 0x00000639 /** Thread. Last Branch Record n From IP (R/W) One of sixteen pairs of last @@ -1833,25 +1791,24 @@ typedef union { MSR_SANDY_BRIDGE_LASTBRANCH_15_FROM_IP is defined as MSR_LASTBRANCH_15_FROM_IP in SDM. @{ **/ -#define MSR_SANDY_BRIDGE_LASTBRANCH_0_FROM_IP 0x00000680 -#define MSR_SANDY_BRIDGE_LASTBRANCH_1_FROM_IP 0x00000681 -#define MSR_SANDY_BRIDGE_LASTBRANCH_2_FROM_IP 0x00000682 -#define MSR_SANDY_BRIDGE_LASTBRANCH_3_FROM_IP 0x00000683 -#define MSR_SANDY_BRIDGE_LASTBRANCH_4_FROM_IP 0x00000684 -#define MSR_SANDY_BRIDGE_LASTBRANCH_5_FROM_IP 0x00000685 -#define MSR_SANDY_BRIDGE_LASTBRANCH_6_FROM_IP 0x00000686 -#define MSR_SANDY_BRIDGE_LASTBRANCH_7_FROM_IP 0x00000687 -#define MSR_SANDY_BRIDGE_LASTBRANCH_8_FROM_IP 0x00000688 -#define MSR_SANDY_BRIDGE_LASTBRANCH_9_FROM_IP 0x00000689 -#define MSR_SANDY_BRIDGE_LASTBRANCH_10_FROM_IP 0x0000068A -#define MSR_SANDY_BRIDGE_LASTBRANCH_11_FROM_IP 0x0000068B -#define MSR_SANDY_BRIDGE_LASTBRANCH_12_FROM_IP 0x0000068C -#define MSR_SANDY_BRIDGE_LASTBRANCH_13_FROM_IP 0x0000068D -#define MSR_SANDY_BRIDGE_LASTBRANCH_14_FROM_IP 0x0000068E -#define MSR_SANDY_BRIDGE_LASTBRANCH_15_FROM_IP 0x0000068F +#define MSR_SANDY_BRIDGE_LASTBRANCH_0_FROM_IP 0x00000680 +#define MSR_SANDY_BRIDGE_LASTBRANCH_1_FROM_IP 0x00000681 +#define MSR_SANDY_BRIDGE_LASTBRANCH_2_FROM_IP 0x00000682 +#define MSR_SANDY_BRIDGE_LASTBRANCH_3_FROM_IP 0x00000683 +#define MSR_SANDY_BRIDGE_LASTBRANCH_4_FROM_IP 0x00000684 +#define MSR_SANDY_BRIDGE_LASTBRANCH_5_FROM_IP 0x00000685 +#define MSR_SANDY_BRIDGE_LASTBRANCH_6_FROM_IP 0x00000686 +#define MSR_SANDY_BRIDGE_LASTBRANCH_7_FROM_IP 0x00000687 +#define MSR_SANDY_BRIDGE_LASTBRANCH_8_FROM_IP 0x00000688 +#define MSR_SANDY_BRIDGE_LASTBRANCH_9_FROM_IP 0x00000689 +#define MSR_SANDY_BRIDGE_LASTBRANCH_10_FROM_IP 0x0000068A +#define MSR_SANDY_BRIDGE_LASTBRANCH_11_FROM_IP 0x0000068B +#define MSR_SANDY_BRIDGE_LASTBRANCH_12_FROM_IP 0x0000068C +#define MSR_SANDY_BRIDGE_LASTBRANCH_13_FROM_IP 0x0000068D +#define MSR_SANDY_BRIDGE_LASTBRANCH_14_FROM_IP 0x0000068E +#define MSR_SANDY_BRIDGE_LASTBRANCH_15_FROM_IP 0x0000068F /// @} - /** Thread. Last Branch Record n To IP (R/W) One of sixteen pairs of last branch record registers on the last branch record stack. This part of the stack @@ -1886,25 +1843,24 @@ typedef union { MSR_SANDY_BRIDGE_LASTBRANCH_15_TO_IP is defined as MSR_LASTBRANCH_15_TO_IP in SDM. @{ **/ -#define MSR_SANDY_BRIDGE_LASTBRANCH_0_TO_IP 0x000006C0 -#define MSR_SANDY_BRIDGE_LASTBRANCH_1_TO_IP 0x000006C1 -#define MSR_SANDY_BRIDGE_LASTBRANCH_2_TO_IP 0x000006C2 -#define MSR_SANDY_BRIDGE_LASTBRANCH_3_TO_IP 0x000006C3 -#define MSR_SANDY_BRIDGE_LASTBRANCH_4_TO_IP 0x000006C4 -#define MSR_SANDY_BRIDGE_LASTBRANCH_5_TO_IP 0x000006C5 -#define MSR_SANDY_BRIDGE_LASTBRANCH_6_TO_IP 0x000006C6 -#define MSR_SANDY_BRIDGE_LASTBRANCH_7_TO_IP 0x000006C7 -#define MSR_SANDY_BRIDGE_LASTBRANCH_8_TO_IP 0x000006C8 -#define MSR_SANDY_BRIDGE_LASTBRANCH_9_TO_IP 0x000006C9 -#define MSR_SANDY_BRIDGE_LASTBRANCH_10_TO_IP 0x000006CA -#define MSR_SANDY_BRIDGE_LASTBRANCH_11_TO_IP 0x000006CB -#define MSR_SANDY_BRIDGE_LASTBRANCH_12_TO_IP 0x000006CC -#define MSR_SANDY_BRIDGE_LASTBRANCH_13_TO_IP 0x000006CD -#define MSR_SANDY_BRIDGE_LASTBRANCH_14_TO_IP 0x000006CE -#define MSR_SANDY_BRIDGE_LASTBRANCH_15_TO_IP 0x000006CF +#define MSR_SANDY_BRIDGE_LASTBRANCH_0_TO_IP 0x000006C0 +#define MSR_SANDY_BRIDGE_LASTBRANCH_1_TO_IP 0x000006C1 +#define MSR_SANDY_BRIDGE_LASTBRANCH_2_TO_IP 0x000006C2 +#define MSR_SANDY_BRIDGE_LASTBRANCH_3_TO_IP 0x000006C3 +#define MSR_SANDY_BRIDGE_LASTBRANCH_4_TO_IP 0x000006C4 +#define MSR_SANDY_BRIDGE_LASTBRANCH_5_TO_IP 0x000006C5 +#define MSR_SANDY_BRIDGE_LASTBRANCH_6_TO_IP 0x000006C6 +#define MSR_SANDY_BRIDGE_LASTBRANCH_7_TO_IP 0x000006C7 +#define MSR_SANDY_BRIDGE_LASTBRANCH_8_TO_IP 0x000006C8 +#define MSR_SANDY_BRIDGE_LASTBRANCH_9_TO_IP 0x000006C9 +#define MSR_SANDY_BRIDGE_LASTBRANCH_10_TO_IP 0x000006CA +#define MSR_SANDY_BRIDGE_LASTBRANCH_11_TO_IP 0x000006CB +#define MSR_SANDY_BRIDGE_LASTBRANCH_12_TO_IP 0x000006CC +#define MSR_SANDY_BRIDGE_LASTBRANCH_13_TO_IP 0x000006CD +#define MSR_SANDY_BRIDGE_LASTBRANCH_14_TO_IP 0x000006CE +#define MSR_SANDY_BRIDGE_LASTBRANCH_15_TO_IP 0x000006CF /// @} - /** Package. Maximum Ratio Limit of Turbo Mode RO if MSR_PLATFORM_INFO.[28] = 0, RW if MSR_PLATFORM_INFO.[28] = 1. @@ -1923,7 +1879,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_TURBO_RATIO_LIMIT is defined as MSR_TURBO_RATIO_LIMIT in SDM. **/ -#define MSR_SANDY_BRIDGE_TURBO_RATIO_LIMIT 0x000001AD +#define MSR_SANDY_BRIDGE_TURBO_RATIO_LIMIT 0x000001AD /** MSR information returned for MSR index #MSR_SANDY_BRIDGE_TURBO_RATIO_LIMIT @@ -1937,50 +1893,49 @@ typedef union { /// [Bits 7:0] Package. Maximum Ratio Limit for 1C Maximum turbo ratio /// limit of 1 core active. /// - UINT32 Maximum1C:8; + UINT32 Maximum1C : 8; /// /// [Bits 15:8] Package. Maximum Ratio Limit for 2C Maximum turbo ratio /// limit of 2 core active. /// - UINT32 Maximum2C:8; + UINT32 Maximum2C : 8; /// /// [Bits 23:16] Package. Maximum Ratio Limit for 3C Maximum turbo ratio /// limit of 3 core active. /// - UINT32 Maximum3C:8; + UINT32 Maximum3C : 8; /// /// [Bits 31:24] Package. Maximum Ratio Limit for 4C Maximum turbo ratio /// limit of 4 core active. /// - UINT32 Maximum4C:8; + UINT32 Maximum4C : 8; /// /// [Bits 39:32] Package. Maximum Ratio Limit for 5C Maximum turbo ratio /// limit of 5 core active. /// - UINT32 Maximum5C:8; + UINT32 Maximum5C : 8; /// /// [Bits 47:40] Package. Maximum Ratio Limit for 6C Maximum turbo ratio /// limit of 6 core active. /// - UINT32 Maximum6C:8; + UINT32 Maximum6C : 8; /// /// [Bits 55:48] Package. Maximum Ratio Limit for 7C Maximum turbo ratio /// limit of 7 core active. /// - UINT32 Maximum7C:8; + UINT32 Maximum7C : 8; /// /// [Bits 63:56] Package. Maximum Ratio Limit for 8C Maximum turbo ratio /// limit of 8 core active. /// - UINT32 Maximum8C:8; + UINT32 Maximum8C : 8; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_TURBO_RATIO_LIMIT_REGISTER; - /** Package. Uncore PMU global control. @@ -1999,7 +1954,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_UNC_PERF_GLOBAL_CTRL is defined as MSR_UNC_PERF_GLOBAL_CTRL in SDM. **/ -#define MSR_SANDY_BRIDGE_UNC_PERF_GLOBAL_CTRL 0x00000391 +#define MSR_SANDY_BRIDGE_UNC_PERF_GLOBAL_CTRL 0x00000391 /** MSR information returned for MSR index #MSR_SANDY_BRIDGE_UNC_PERF_GLOBAL_CTRL @@ -2012,50 +1967,49 @@ typedef union { /// /// [Bit 0] Slice 0 select. /// - UINT32 PMI_Sel_Slice0:1; + UINT32 PMI_Sel_Slice0 : 1; /// /// [Bit 1] Slice 1 select. /// - UINT32 PMI_Sel_Slice1:1; + UINT32 PMI_Sel_Slice1 : 1; /// /// [Bit 2] Slice 2 select. /// - UINT32 PMI_Sel_Slice2:1; + UINT32 PMI_Sel_Slice2 : 1; /// /// [Bit 3] Slice 3 select. /// - UINT32 PMI_Sel_Slice3:1; + UINT32 PMI_Sel_Slice3 : 1; /// /// [Bit 4] Slice 4 select. /// - UINT32 PMI_Sel_Slice4:1; - UINT32 Reserved1:14; - UINT32 Reserved2:10; + UINT32 PMI_Sel_Slice4 : 1; + UINT32 Reserved1 : 14; + UINT32 Reserved2 : 10; /// /// [Bit 29] Enable all uncore counters. /// - UINT32 EN:1; + UINT32 EN : 1; /// /// [Bit 30] Enable wake on PMI. /// - UINT32 WakePMI:1; + UINT32 WakePMI : 1; /// /// [Bit 31] Enable Freezing counter when overflow. /// - UINT32 FREEZE:1; - UINT32 Reserved3:32; + UINT32 FREEZE : 1; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_UNC_PERF_GLOBAL_CTRL_REGISTER; - /** Package. Uncore PMU main status. @@ -2088,30 +2042,29 @@ typedef union { /// /// [Bit 0] Fixed counter overflowed. /// - UINT32 Fixed:1; + UINT32 Fixed : 1; /// /// [Bit 1] An ARB counter overflowed. /// - UINT32 ARB:1; - UINT32 Reserved1:1; + UINT32 ARB : 1; + UINT32 Reserved1 : 1; /// /// [Bit 3] A CBox counter overflowed (on any slice). /// - UINT32 CBox:1; - UINT32 Reserved2:28; - UINT32 Reserved3:32; + UINT32 CBox : 1; + UINT32 Reserved2 : 28; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_UNC_PERF_GLOBAL_STATUS_REGISTER; - /** Package. Uncore fixed counter control (R/W). @@ -2130,7 +2083,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_UNC_PERF_FIXED_CTRL is defined as MSR_UNC_PERF_FIXED_CTRL in SDM. **/ -#define MSR_SANDY_BRIDGE_UNC_PERF_FIXED_CTRL 0x00000394 +#define MSR_SANDY_BRIDGE_UNC_PERF_FIXED_CTRL 0x00000394 /** MSR information returned for MSR index #MSR_SANDY_BRIDGE_UNC_PERF_FIXED_CTRL @@ -2140,30 +2093,29 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:20; + UINT32 Reserved1 : 20; /// /// [Bit 20] Enable overflow propagation. /// - UINT32 EnableOverflow:1; - UINT32 Reserved2:1; + UINT32 EnableOverflow : 1; + UINT32 Reserved2 : 1; /// /// [Bit 22] Enable counting. /// - UINT32 EnableCounting:1; - UINT32 Reserved3:9; - UINT32 Reserved4:32; + UINT32 EnableCounting : 1; + UINT32 Reserved3 : 9; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_UNC_PERF_FIXED_CTRL_REGISTER; - /** Package. Uncore fixed counter. @@ -2182,7 +2134,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_UNC_PERF_FIXED_CTR is defined as MSR_UNC_PERF_FIXED_CTR in SDM. **/ -#define MSR_SANDY_BRIDGE_UNC_PERF_FIXED_CTR 0x00000395 +#define MSR_SANDY_BRIDGE_UNC_PERF_FIXED_CTR 0x00000395 /** MSR information returned for MSR index #MSR_SANDY_BRIDGE_UNC_PERF_FIXED_CTR @@ -2195,20 +2147,19 @@ typedef union { /// /// [Bits 31:0] Current count. /// - UINT32 CurrentCount:32; + UINT32 CurrentCount : 32; /// /// [Bits 47:32] Current count. /// - UINT32 CurrentCountHi:16; - UINT32 Reserved:16; + UINT32 CurrentCountHi : 16; + UINT32 Reserved : 16; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_UNC_PERF_FIXED_CTR_REGISTER; - /** Package. Uncore C-Box configuration information (R/O). @@ -2226,7 +2177,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_UNC_CBO_CONFIG is defined as MSR_UNC_CBO_CONFIG in SDM. **/ -#define MSR_SANDY_BRIDGE_UNC_CBO_CONFIG 0x00000396 +#define MSR_SANDY_BRIDGE_UNC_CBO_CONFIG 0x00000396 /** MSR information returned for MSR index #MSR_SANDY_BRIDGE_UNC_CBO_CONFIG @@ -2240,21 +2191,20 @@ typedef union { /// [Bits 3:0] Report the number of C-Box units with performance counters, /// including processor cores and processor graphics". /// - UINT32 CBox:4; - UINT32 Reserved1:28; - UINT32 Reserved2:32; + UINT32 CBox : 4; + UINT32 Reserved1 : 28; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_UNC_CBO_CONFIG_REGISTER; - /** Package. Uncore Arb unit, performance counter 0. @@ -2271,8 +2221,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_UNC_ARB_PERFCTR0 is defined as MSR_UNC_ARB_PERFCTR0 in SDM. **/ -#define MSR_SANDY_BRIDGE_UNC_ARB_PERFCTR0 0x000003B0 - +#define MSR_SANDY_BRIDGE_UNC_ARB_PERFCTR0 0x000003B0 /** Package. Uncore Arb unit, performance counter 1. @@ -2290,8 +2239,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_UNC_ARB_PERFCTR1 is defined as MSR_UNC_ARB_PERFCTR1 in SDM. **/ -#define MSR_SANDY_BRIDGE_UNC_ARB_PERFCTR1 0x000003B1 - +#define MSR_SANDY_BRIDGE_UNC_ARB_PERFCTR1 0x000003B1 /** Package. Uncore Arb unit, counter 0 event select MSR. @@ -2309,8 +2257,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_UNC_ARB_PERFEVTSEL0 is defined as MSR_UNC_ARB_PERFEVTSEL0 in SDM. **/ -#define MSR_SANDY_BRIDGE_UNC_ARB_PERFEVTSEL0 0x000003B2 - +#define MSR_SANDY_BRIDGE_UNC_ARB_PERFEVTSEL0 0x000003B2 /** Package. Uncore Arb unit, counter 1 event select MSR. @@ -2328,8 +2275,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_UNC_ARB_PERFEVTSEL1 is defined as MSR_UNC_ARB_PERFEVTSEL1 in SDM. **/ -#define MSR_SANDY_BRIDGE_UNC_ARB_PERFEVTSEL1 0x000003B3 - +#define MSR_SANDY_BRIDGE_UNC_ARB_PERFEVTSEL1 0x000003B3 /** Package. Package C7 Interrupt Response Limit (R/W) This MSR defines the @@ -2354,7 +2300,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PKGC7_IRTL is defined as MSR_PKGC7_IRTL in SDM. **/ -#define MSR_SANDY_BRIDGE_PKGC7_IRTL 0x0000060C +#define MSR_SANDY_BRIDGE_PKGC7_IRTL 0x0000060C /** MSR information returned for MSR index #MSR_SANDY_BRIDGE_PKGC7_IRTL @@ -2369,34 +2315,33 @@ typedef union { /// that should be used to decide if the package should be put into a /// package C7 state. /// - UINT32 TimeLimit:10; + UINT32 TimeLimit : 10; /// /// [Bits 12:10] Time Unit (R/W) Specifies the encoding value of time /// unit of the interrupt response time limit. The following time unit /// encodings are supported: 000b: 1 ns 001b: 32 ns 010b: 1024 ns 011b: /// 32768 ns 100b: 1048576 ns 101b: 33554432 ns. /// - UINT32 TimeUnit:3; - UINT32 Reserved1:2; + UINT32 TimeUnit : 3; + UINT32 Reserved1 : 2; /// /// [Bit 15] Valid (R/W) Indicates whether the values in bits 12:0 are /// valid and can be used by the processor for package C-sate management. /// - UINT32 Valid:1; - UINT32 Reserved2:16; - UINT32 Reserved3:32; + UINT32 Valid : 1; + UINT32 Reserved2 : 16; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_PKGC7_IRTL_REGISTER; - /** Package. PP0 Balance Policy (R/W) See Section 14.9.4, "PP0/PP1 RAPL Domains.". @@ -2414,8 +2359,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PP0_POLICY is defined as MSR_PP0_POLICY in SDM. **/ -#define MSR_SANDY_BRIDGE_PP0_POLICY 0x0000063A - +#define MSR_SANDY_BRIDGE_PP0_POLICY 0x0000063A /** Package. PP1 RAPL Power Limit Control (R/W) See Section 14.9.4, "PP0/PP1 @@ -2434,8 +2378,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PP1_POWER_LIMIT is defined as MSR_PP1_POWER_LIMIT in SDM. **/ -#define MSR_SANDY_BRIDGE_PP1_POWER_LIMIT 0x00000640 - +#define MSR_SANDY_BRIDGE_PP1_POWER_LIMIT 0x00000640 /** Package. PP1 Energy Status (R/O) See Section 14.9.4, "PP0/PP1 RAPL @@ -2453,8 +2396,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PP1_ENERGY_STATUS is defined as MSR_PP1_ENERGY_STATUS in SDM. **/ -#define MSR_SANDY_BRIDGE_PP1_ENERGY_STATUS 0x00000641 - +#define MSR_SANDY_BRIDGE_PP1_ENERGY_STATUS 0x00000641 /** Package. PP1 Balance Policy (R/W) See Section 14.9.4, "PP0/PP1 RAPL @@ -2473,8 +2415,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PP1_POLICY is defined as MSR_PP1_POLICY in SDM. **/ -#define MSR_SANDY_BRIDGE_PP1_POLICY 0x00000642 - +#define MSR_SANDY_BRIDGE_PP1_POLICY 0x00000642 /** Package. Uncore C-Box 0, counter n event select MSR. @@ -2496,13 +2437,12 @@ typedef union { MSR_SANDY_BRIDGE_UNC_CBO_0_PERFEVTSEL3 is defined as MSR_UNC_CBO_0_PERFEVTSEL3 in SDM. @{ **/ -#define MSR_SANDY_BRIDGE_UNC_CBO_0_PERFEVTSEL0 0x00000700 -#define MSR_SANDY_BRIDGE_UNC_CBO_0_PERFEVTSEL1 0x00000701 -#define MSR_SANDY_BRIDGE_UNC_CBO_0_PERFEVTSEL2 0x00000702 -#define MSR_SANDY_BRIDGE_UNC_CBO_0_PERFEVTSEL3 0x00000703 +#define MSR_SANDY_BRIDGE_UNC_CBO_0_PERFEVTSEL0 0x00000700 +#define MSR_SANDY_BRIDGE_UNC_CBO_0_PERFEVTSEL1 0x00000701 +#define MSR_SANDY_BRIDGE_UNC_CBO_0_PERFEVTSEL2 0x00000702 +#define MSR_SANDY_BRIDGE_UNC_CBO_0_PERFEVTSEL3 0x00000703 /// @} - /** Package. Uncore C-Box n, unit status for counter 0-3. @@ -2524,14 +2464,13 @@ typedef union { MSR_SANDY_BRIDGE_UNC_CBO_4_UNIT_STATUS is defined as MSR_UNC_CBO_4_UNIT_STATUS in SDM. @{ **/ -#define MSR_SANDY_BRIDGE_UNC_CBO_0_UNIT_STATUS 0x00000705 -#define MSR_SANDY_BRIDGE_UNC_CBO_1_UNIT_STATUS 0x00000715 -#define MSR_SANDY_BRIDGE_UNC_CBO_2_UNIT_STATUS 0x00000725 -#define MSR_SANDY_BRIDGE_UNC_CBO_3_UNIT_STATUS 0x00000735 -#define MSR_SANDY_BRIDGE_UNC_CBO_4_UNIT_STATUS 0x00000745 +#define MSR_SANDY_BRIDGE_UNC_CBO_0_UNIT_STATUS 0x00000705 +#define MSR_SANDY_BRIDGE_UNC_CBO_1_UNIT_STATUS 0x00000715 +#define MSR_SANDY_BRIDGE_UNC_CBO_2_UNIT_STATUS 0x00000725 +#define MSR_SANDY_BRIDGE_UNC_CBO_3_UNIT_STATUS 0x00000735 +#define MSR_SANDY_BRIDGE_UNC_CBO_4_UNIT_STATUS 0x00000745 /// @} - /** Package. Uncore C-Box 0, performance counter n. @@ -2552,13 +2491,12 @@ typedef union { MSR_SANDY_BRIDGE_UNC_CBO_0_PERFCTR3 is defined as MSR_UNC_CBO_0_PERFCTR3 in SDM. @{ **/ -#define MSR_SANDY_BRIDGE_UNC_CBO_0_PERFCTR0 0x00000706 -#define MSR_SANDY_BRIDGE_UNC_CBO_0_PERFCTR1 0x00000707 -#define MSR_SANDY_BRIDGE_UNC_CBO_0_PERFCTR2 0x00000708 -#define MSR_SANDY_BRIDGE_UNC_CBO_0_PERFCTR3 0x00000709 +#define MSR_SANDY_BRIDGE_UNC_CBO_0_PERFCTR0 0x00000706 +#define MSR_SANDY_BRIDGE_UNC_CBO_0_PERFCTR1 0x00000707 +#define MSR_SANDY_BRIDGE_UNC_CBO_0_PERFCTR2 0x00000708 +#define MSR_SANDY_BRIDGE_UNC_CBO_0_PERFCTR3 0x00000709 /// @} - /** Package. Uncore C-Box 1, counter n event select MSR. @@ -2579,13 +2517,12 @@ typedef union { MSR_SANDY_BRIDGE_UNC_CBO_1_PERFEVTSEL3 is defined as MSR_UNC_CBO_1_PERFEVTSEL3 in SDM. @{ **/ -#define MSR_SANDY_BRIDGE_UNC_CBO_1_PERFEVTSEL0 0x00000710 -#define MSR_SANDY_BRIDGE_UNC_CBO_1_PERFEVTSEL1 0x00000711 -#define MSR_SANDY_BRIDGE_UNC_CBO_1_PERFEVTSEL2 0x00000712 -#define MSR_SANDY_BRIDGE_UNC_CBO_1_PERFEVTSEL3 0x00000713 +#define MSR_SANDY_BRIDGE_UNC_CBO_1_PERFEVTSEL0 0x00000710 +#define MSR_SANDY_BRIDGE_UNC_CBO_1_PERFEVTSEL1 0x00000711 +#define MSR_SANDY_BRIDGE_UNC_CBO_1_PERFEVTSEL2 0x00000712 +#define MSR_SANDY_BRIDGE_UNC_CBO_1_PERFEVTSEL3 0x00000713 /// @} - /** Package. Uncore C-Box 1, performance counter n. @@ -2606,13 +2543,12 @@ typedef union { MSR_SANDY_BRIDGE_UNC_CBO_1_PERFCTR3 is defined as MSR_UNC_CBO_1_PERFCTR3 in SDM. @{ **/ -#define MSR_SANDY_BRIDGE_UNC_CBO_1_PERFCTR0 0x00000716 -#define MSR_SANDY_BRIDGE_UNC_CBO_1_PERFCTR1 0x00000717 -#define MSR_SANDY_BRIDGE_UNC_CBO_1_PERFCTR2 0x00000718 -#define MSR_SANDY_BRIDGE_UNC_CBO_1_PERFCTR3 0x00000719 +#define MSR_SANDY_BRIDGE_UNC_CBO_1_PERFCTR0 0x00000716 +#define MSR_SANDY_BRIDGE_UNC_CBO_1_PERFCTR1 0x00000717 +#define MSR_SANDY_BRIDGE_UNC_CBO_1_PERFCTR2 0x00000718 +#define MSR_SANDY_BRIDGE_UNC_CBO_1_PERFCTR3 0x00000719 /// @} - /** Package. Uncore C-Box 2, counter n event select MSR. @@ -2633,13 +2569,12 @@ typedef union { MSR_SANDY_BRIDGE_UNC_CBO_2_PERFEVTSEL3 is defined as MSR_UNC_CBO_2_PERFEVTSEL3 in SDM. @{ **/ -#define MSR_SANDY_BRIDGE_UNC_CBO_2_PERFEVTSEL0 0x00000720 -#define MSR_SANDY_BRIDGE_UNC_CBO_2_PERFEVTSEL1 0x00000721 -#define MSR_SANDY_BRIDGE_UNC_CBO_2_PERFEVTSEL2 0x00000722 -#define MSR_SANDY_BRIDGE_UNC_CBO_2_PERFEVTSEL3 0x00000723 +#define MSR_SANDY_BRIDGE_UNC_CBO_2_PERFEVTSEL0 0x00000720 +#define MSR_SANDY_BRIDGE_UNC_CBO_2_PERFEVTSEL1 0x00000721 +#define MSR_SANDY_BRIDGE_UNC_CBO_2_PERFEVTSEL2 0x00000722 +#define MSR_SANDY_BRIDGE_UNC_CBO_2_PERFEVTSEL3 0x00000723 /// @} - /** Package. Uncore C-Box 2, performance counter n. @@ -2660,13 +2595,12 @@ typedef union { MSR_SANDY_BRIDGE_UNC_CBO_2_PERFCTR3 is defined as MSR_UNC_CBO_2_PERFCTR3 in SDM. @{ **/ -#define MSR_SANDY_BRIDGE_UNC_CBO_2_PERFCTR0 0x00000726 -#define MSR_SANDY_BRIDGE_UNC_CBO_2_PERFCTR1 0x00000727 -#define MSR_SANDY_BRIDGE_UNC_CBO_2_PERFCTR2 0x00000728 -#define MSR_SANDY_BRIDGE_UNC_CBO_2_PERFCTR3 0x00000729 +#define MSR_SANDY_BRIDGE_UNC_CBO_2_PERFCTR0 0x00000726 +#define MSR_SANDY_BRIDGE_UNC_CBO_2_PERFCTR1 0x00000727 +#define MSR_SANDY_BRIDGE_UNC_CBO_2_PERFCTR2 0x00000728 +#define MSR_SANDY_BRIDGE_UNC_CBO_2_PERFCTR3 0x00000729 /// @} - /** Package. Uncore C-Box 3, counter n event select MSR. @@ -2687,13 +2621,12 @@ typedef union { MSR_SANDY_BRIDGE_UNC_CBO_3_PERFEVTSEL3 is defined as MSR_UNC_CBO_3_PERFEVTSEL3 in SDM. @{ **/ -#define MSR_SANDY_BRIDGE_UNC_CBO_3_PERFEVTSEL0 0x00000730 -#define MSR_SANDY_BRIDGE_UNC_CBO_3_PERFEVTSEL1 0x00000731 -#define MSR_SANDY_BRIDGE_UNC_CBO_3_PERFEVTSEL2 0x00000732 -#define MSR_SANDY_BRIDGE_UNC_CBO_3_PERFEVTSEL3 0x00000733 +#define MSR_SANDY_BRIDGE_UNC_CBO_3_PERFEVTSEL0 0x00000730 +#define MSR_SANDY_BRIDGE_UNC_CBO_3_PERFEVTSEL1 0x00000731 +#define MSR_SANDY_BRIDGE_UNC_CBO_3_PERFEVTSEL2 0x00000732 +#define MSR_SANDY_BRIDGE_UNC_CBO_3_PERFEVTSEL3 0x00000733 /// @} - /** Package. Uncore C-Box 3, performance counter n. @@ -2714,13 +2647,12 @@ typedef union { MSR_SANDY_BRIDGE_UNC_CBO_3_PERFCTR3 is defined as MSR_UNC_CBO_3_PERFCTR3 in SDM. @{ **/ -#define MSR_SANDY_BRIDGE_UNC_CBO_3_PERFCTR0 0x00000736 -#define MSR_SANDY_BRIDGE_UNC_CBO_3_PERFCTR1 0x00000737 -#define MSR_SANDY_BRIDGE_UNC_CBO_3_PERFCTR2 0x00000738 -#define MSR_SANDY_BRIDGE_UNC_CBO_3_PERFCTR3 0x00000739 +#define MSR_SANDY_BRIDGE_UNC_CBO_3_PERFCTR0 0x00000736 +#define MSR_SANDY_BRIDGE_UNC_CBO_3_PERFCTR1 0x00000737 +#define MSR_SANDY_BRIDGE_UNC_CBO_3_PERFCTR2 0x00000738 +#define MSR_SANDY_BRIDGE_UNC_CBO_3_PERFCTR3 0x00000739 /// @} - /** Package. Uncore C-Box 4, counter n event select MSR. @@ -2741,13 +2673,12 @@ typedef union { MSR_SANDY_BRIDGE_UNC_CBO_4_PERFEVTSEL3 is defined as MSR_UNC_CBO_4_PERFEVTSEL3 in SDM. @{ **/ -#define MSR_SANDY_BRIDGE_UNC_CBO_4_PERFEVTSEL0 0x00000740 -#define MSR_SANDY_BRIDGE_UNC_CBO_4_PERFEVTSEL1 0x00000741 -#define MSR_SANDY_BRIDGE_UNC_CBO_4_PERFEVTSEL2 0x00000742 -#define MSR_SANDY_BRIDGE_UNC_CBO_4_PERFEVTSEL3 0x00000743 +#define MSR_SANDY_BRIDGE_UNC_CBO_4_PERFEVTSEL0 0x00000740 +#define MSR_SANDY_BRIDGE_UNC_CBO_4_PERFEVTSEL1 0x00000741 +#define MSR_SANDY_BRIDGE_UNC_CBO_4_PERFEVTSEL2 0x00000742 +#define MSR_SANDY_BRIDGE_UNC_CBO_4_PERFEVTSEL3 0x00000743 /// @} - /** Package. Uncore C-Box 4, performance counter n. @@ -2768,13 +2699,12 @@ typedef union { MSR_SANDY_BRIDGE_UNC_CBO_4_PERFCTR3 is defined as MSR_UNC_CBO_4_PERFCTR3 in SDM. @{ **/ -#define MSR_SANDY_BRIDGE_UNC_CBO_4_PERFCTR0 0x00000746 -#define MSR_SANDY_BRIDGE_UNC_CBO_4_PERFCTR1 0x00000747 -#define MSR_SANDY_BRIDGE_UNC_CBO_4_PERFCTR2 0x00000748 -#define MSR_SANDY_BRIDGE_UNC_CBO_4_PERFCTR3 0x00000749 +#define MSR_SANDY_BRIDGE_UNC_CBO_4_PERFCTR0 0x00000746 +#define MSR_SANDY_BRIDGE_UNC_CBO_4_PERFCTR1 0x00000747 +#define MSR_SANDY_BRIDGE_UNC_CBO_4_PERFCTR2 0x00000748 +#define MSR_SANDY_BRIDGE_UNC_CBO_4_PERFCTR3 0x00000749 /// @} - /** Package. MC Bank Error Configuration (R/W). @@ -2793,7 +2723,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_ERROR_CONTROL is defined as MSR_ERROR_CONTROL in SDM. **/ -#define MSR_SANDY_BRIDGE_ERROR_CONTROL 0x0000017F +#define MSR_SANDY_BRIDGE_ERROR_CONTROL 0x0000017F /** MSR information returned for MSR index #MSR_SANDY_BRIDGE_ERROR_CONTROL @@ -2803,26 +2733,25 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:1; + UINT32 Reserved1 : 1; /// /// [Bit 1] MemError Log Enable (R/W) When set, enables IMC status bank /// to log additional info in bits 36:32. /// - UINT32 MemErrorLogEnable:1; - UINT32 Reserved2:30; - UINT32 Reserved3:32; + UINT32 MemErrorLogEnable : 1; + UINT32 Reserved2 : 30; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_ERROR_CONTROL_REGISTER; - /** Package. @@ -2841,7 +2770,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PEBS_NUM_ALT is defined as MSR_PEBS_NUM_ALT in SDM. **/ -#define MSR_SANDY_BRIDGE_PEBS_NUM_ALT 0x0000039C +#define MSR_SANDY_BRIDGE_PEBS_NUM_ALT 0x0000039C /** MSR information returned for MSR index #MSR_SANDY_BRIDGE_PEBS_NUM_ALT @@ -2856,21 +2785,20 @@ typedef union { /// counting logic for specific events requiring additional configuration, /// see Table 19-17. /// - UINT32 ENABLE_PEBS_NUM_ALT:1; - UINT32 Reserved1:31; - UINT32 Reserved2:32; + UINT32 ENABLE_PEBS_NUM_ALT : 1; + UINT32 Reserved1 : 31; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SANDY_BRIDGE_PEBS_NUM_ALT_REGISTER; - /** Package. Package RAPL Perf Status (R/O). @@ -2886,8 +2814,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PKG_PERF_STATUS is defined as MSR_PKG_PERF_STATUS in SDM. **/ -#define MSR_SANDY_BRIDGE_PKG_PERF_STATUS 0x00000613 - +#define MSR_SANDY_BRIDGE_PKG_PERF_STATUS 0x00000613 /** Package. DRAM RAPL Power Limit Control (R/W) See Section 14.9.5, "DRAM RAPL @@ -2906,8 +2833,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_DRAM_POWER_LIMIT is defined as MSR_DRAM_POWER_LIMIT in SDM. **/ -#define MSR_SANDY_BRIDGE_DRAM_POWER_LIMIT 0x00000618 - +#define MSR_SANDY_BRIDGE_DRAM_POWER_LIMIT 0x00000618 /** Package. DRAM Energy Status (R/O) See Section 14.9.5, "DRAM RAPL Domain.". @@ -2924,8 +2850,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_DRAM_ENERGY_STATUS is defined as MSR_DRAM_ENERGY_STATUS in SDM. **/ -#define MSR_SANDY_BRIDGE_DRAM_ENERGY_STATUS 0x00000619 - +#define MSR_SANDY_BRIDGE_DRAM_ENERGY_STATUS 0x00000619 /** Package. DRAM Performance Throttling Status (R/O) See Section 14.9.5, "DRAM @@ -2943,8 +2868,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_DRAM_PERF_STATUS is defined as MSR_DRAM_PERF_STATUS in SDM. **/ -#define MSR_SANDY_BRIDGE_DRAM_PERF_STATUS 0x0000061B - +#define MSR_SANDY_BRIDGE_DRAM_PERF_STATUS 0x0000061B /** Package. DRAM RAPL Parameters (R/W) See Section 14.9.5, "DRAM RAPL Domain.". @@ -2962,8 +2886,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_DRAM_POWER_INFO is defined as MSR_DRAM_POWER_INFO in SDM. **/ -#define MSR_SANDY_BRIDGE_DRAM_POWER_INFO 0x0000061C - +#define MSR_SANDY_BRIDGE_DRAM_POWER_INFO 0x0000061C /** Package. Uncore U-box UCLK fixed counter control. @@ -2981,8 +2904,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_U_PMON_UCLK_FIXED_CTL is defined as MSR_U_PMON_UCLK_FIXED_CTL in SDM. **/ -#define MSR_SANDY_BRIDGE_U_PMON_UCLK_FIXED_CTL 0x00000C08 - +#define MSR_SANDY_BRIDGE_U_PMON_UCLK_FIXED_CTL 0x00000C08 /** Package. Uncore U-box UCLK fixed counter. @@ -3000,8 +2922,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_U_PMON_UCLK_FIXED_CTR is defined as MSR_U_PMON_UCLK_FIXED_CTR in SDM. **/ -#define MSR_SANDY_BRIDGE_U_PMON_UCLK_FIXED_CTR 0x00000C09 - +#define MSR_SANDY_BRIDGE_U_PMON_UCLK_FIXED_CTR 0x00000C09 /** Package. Uncore U-box perfmon event select for U-box counter 0. @@ -3019,8 +2940,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_U_PMON_EVNTSEL0 is defined as MSR_U_PMON_EVNTSEL0 in SDM. **/ -#define MSR_SANDY_BRIDGE_U_PMON_EVNTSEL0 0x00000C10 - +#define MSR_SANDY_BRIDGE_U_PMON_EVNTSEL0 0x00000C10 /** Package. Uncore U-box perfmon event select for U-box counter 1. @@ -3038,8 +2958,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_U_PMON_EVNTSEL1 is defined as MSR_U_PMON_EVNTSEL1 in SDM. **/ -#define MSR_SANDY_BRIDGE_U_PMON_EVNTSEL1 0x00000C11 - +#define MSR_SANDY_BRIDGE_U_PMON_EVNTSEL1 0x00000C11 /** Package. Uncore U-box perfmon counter 0. @@ -3057,8 +2976,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_U_PMON_CTR0 is defined as MSR_U_PMON_CTR0 in SDM. **/ -#define MSR_SANDY_BRIDGE_U_PMON_CTR0 0x00000C16 - +#define MSR_SANDY_BRIDGE_U_PMON_CTR0 0x00000C16 /** Package. Uncore U-box perfmon counter 1. @@ -3076,8 +2994,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_U_PMON_CTR1 is defined as MSR_U_PMON_CTR1 in SDM. **/ -#define MSR_SANDY_BRIDGE_U_PMON_CTR1 0x00000C17 - +#define MSR_SANDY_BRIDGE_U_PMON_CTR1 0x00000C17 /** Package. Uncore PCU perfmon for PCU-box-wide control. @@ -3095,8 +3012,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PCU_PMON_BOX_CTL is defined as MSR_PCU_PMON_BOX_CTL in SDM. **/ -#define MSR_SANDY_BRIDGE_PCU_PMON_BOX_CTL 0x00000C24 - +#define MSR_SANDY_BRIDGE_PCU_PMON_BOX_CTL 0x00000C24 /** Package. Uncore PCU perfmon event select for PCU counter 0. @@ -3114,8 +3030,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PCU_PMON_EVNTSEL0 is defined as MSR_PCU_PMON_EVNTSEL0 in SDM. **/ -#define MSR_SANDY_BRIDGE_PCU_PMON_EVNTSEL0 0x00000C30 - +#define MSR_SANDY_BRIDGE_PCU_PMON_EVNTSEL0 0x00000C30 /** Package. Uncore PCU perfmon event select for PCU counter 1. @@ -3133,8 +3048,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PCU_PMON_EVNTSEL1 is defined as MSR_PCU_PMON_EVNTSEL1 in SDM. **/ -#define MSR_SANDY_BRIDGE_PCU_PMON_EVNTSEL1 0x00000C31 - +#define MSR_SANDY_BRIDGE_PCU_PMON_EVNTSEL1 0x00000C31 /** Package. Uncore PCU perfmon event select for PCU counter 2. @@ -3152,8 +3066,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PCU_PMON_EVNTSEL2 is defined as MSR_PCU_PMON_EVNTSEL2 in SDM. **/ -#define MSR_SANDY_BRIDGE_PCU_PMON_EVNTSEL2 0x00000C32 - +#define MSR_SANDY_BRIDGE_PCU_PMON_EVNTSEL2 0x00000C32 /** Package. Uncore PCU perfmon event select for PCU counter 3. @@ -3171,8 +3084,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PCU_PMON_EVNTSEL3 is defined as MSR_PCU_PMON_EVNTSEL3 in SDM. **/ -#define MSR_SANDY_BRIDGE_PCU_PMON_EVNTSEL3 0x00000C33 - +#define MSR_SANDY_BRIDGE_PCU_PMON_EVNTSEL3 0x00000C33 /** Package. Uncore PCU perfmon box-wide filter. @@ -3190,8 +3102,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PCU_PMON_BOX_FILTER is defined as MSR_PCU_PMON_BOX_FILTER in SDM. **/ -#define MSR_SANDY_BRIDGE_PCU_PMON_BOX_FILTER 0x00000C34 - +#define MSR_SANDY_BRIDGE_PCU_PMON_BOX_FILTER 0x00000C34 /** Package. Uncore PCU perfmon counter 0. @@ -3209,8 +3120,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PCU_PMON_CTR0 is defined as MSR_PCU_PMON_CTR0 in SDM. **/ -#define MSR_SANDY_BRIDGE_PCU_PMON_CTR0 0x00000C36 - +#define MSR_SANDY_BRIDGE_PCU_PMON_CTR0 0x00000C36 /** Package. Uncore PCU perfmon counter 1. @@ -3228,8 +3138,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PCU_PMON_CTR1 is defined as MSR_PCU_PMON_CTR1 in SDM. **/ -#define MSR_SANDY_BRIDGE_PCU_PMON_CTR1 0x00000C37 - +#define MSR_SANDY_BRIDGE_PCU_PMON_CTR1 0x00000C37 /** Package. Uncore PCU perfmon counter 2. @@ -3247,8 +3156,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PCU_PMON_CTR2 is defined as MSR_PCU_PMON_CTR2 in SDM. **/ -#define MSR_SANDY_BRIDGE_PCU_PMON_CTR2 0x00000C38 - +#define MSR_SANDY_BRIDGE_PCU_PMON_CTR2 0x00000C38 /** Package. Uncore PCU perfmon counter 3. @@ -3266,8 +3174,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_PCU_PMON_CTR3 is defined as MSR_PCU_PMON_CTR3 in SDM. **/ -#define MSR_SANDY_BRIDGE_PCU_PMON_CTR3 0x00000C39 - +#define MSR_SANDY_BRIDGE_PCU_PMON_CTR3 0x00000C39 /** Package. Uncore C-box 0 perfmon local box wide control. @@ -3285,8 +3192,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C0_PMON_BOX_CTL is defined as MSR_C0_PMON_BOX_CTL in SDM. **/ -#define MSR_SANDY_BRIDGE_C0_PMON_BOX_CTL 0x00000D04 - +#define MSR_SANDY_BRIDGE_C0_PMON_BOX_CTL 0x00000D04 /** Package. Uncore C-box 0 perfmon event select for C-box 0 counter 0. @@ -3304,8 +3210,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C0_PMON_EVNTSEL0 is defined as MSR_C0_PMON_EVNTSEL0 in SDM. **/ -#define MSR_SANDY_BRIDGE_C0_PMON_EVNTSEL0 0x00000D10 - +#define MSR_SANDY_BRIDGE_C0_PMON_EVNTSEL0 0x00000D10 /** Package. Uncore C-box 0 perfmon event select for C-box 0 counter 1. @@ -3323,8 +3228,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C0_PMON_EVNTSEL1 is defined as MSR_C0_PMON_EVNTSEL1 in SDM. **/ -#define MSR_SANDY_BRIDGE_C0_PMON_EVNTSEL1 0x00000D11 - +#define MSR_SANDY_BRIDGE_C0_PMON_EVNTSEL1 0x00000D11 /** Package. Uncore C-box 0 perfmon event select for C-box 0 counter 2. @@ -3342,8 +3246,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C0_PMON_EVNTSEL2 is defined as MSR_C0_PMON_EVNTSEL2 in SDM. **/ -#define MSR_SANDY_BRIDGE_C0_PMON_EVNTSEL2 0x00000D12 - +#define MSR_SANDY_BRIDGE_C0_PMON_EVNTSEL2 0x00000D12 /** Package. Uncore C-box 0 perfmon event select for C-box 0 counter 3. @@ -3361,8 +3264,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C0_PMON_EVNTSEL3 is defined as MSR_C0_PMON_EVNTSEL3 in SDM. **/ -#define MSR_SANDY_BRIDGE_C0_PMON_EVNTSEL3 0x00000D13 - +#define MSR_SANDY_BRIDGE_C0_PMON_EVNTSEL3 0x00000D13 /** Package. Uncore C-box 0 perfmon box wide filter. @@ -3380,8 +3282,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C0_PMON_BOX_FILTER is defined as MSR_C0_PMON_BOX_FILTER in SDM. **/ -#define MSR_SANDY_BRIDGE_C0_PMON_BOX_FILTER 0x00000D14 - +#define MSR_SANDY_BRIDGE_C0_PMON_BOX_FILTER 0x00000D14 /** Package. Uncore C-box 0 perfmon counter 0. @@ -3399,8 +3300,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C0_PMON_CTR0 is defined as MSR_C0_PMON_CTR0 in SDM. **/ -#define MSR_SANDY_BRIDGE_C0_PMON_CTR0 0x00000D16 - +#define MSR_SANDY_BRIDGE_C0_PMON_CTR0 0x00000D16 /** Package. Uncore C-box 0 perfmon counter 1. @@ -3418,8 +3318,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C0_PMON_CTR1 is defined as MSR_C0_PMON_CTR1 in SDM. **/ -#define MSR_SANDY_BRIDGE_C0_PMON_CTR1 0x00000D17 - +#define MSR_SANDY_BRIDGE_C0_PMON_CTR1 0x00000D17 /** Package. Uncore C-box 0 perfmon counter 2. @@ -3437,8 +3336,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C0_PMON_CTR2 is defined as MSR_C0_PMON_CTR2 in SDM. **/ -#define MSR_SANDY_BRIDGE_C0_PMON_CTR2 0x00000D18 - +#define MSR_SANDY_BRIDGE_C0_PMON_CTR2 0x00000D18 /** Package. Uncore C-box 0 perfmon counter 3. @@ -3456,8 +3354,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C0_PMON_CTR3 is defined as MSR_C0_PMON_CTR3 in SDM. **/ -#define MSR_SANDY_BRIDGE_C0_PMON_CTR3 0x00000D19 - +#define MSR_SANDY_BRIDGE_C0_PMON_CTR3 0x00000D19 /** Package. Uncore C-box 1 perfmon local box wide control. @@ -3475,8 +3372,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C1_PMON_BOX_CTL is defined as MSR_C1_PMON_BOX_CTL in SDM. **/ -#define MSR_SANDY_BRIDGE_C1_PMON_BOX_CTL 0x00000D24 - +#define MSR_SANDY_BRIDGE_C1_PMON_BOX_CTL 0x00000D24 /** Package. Uncore C-box 1 perfmon event select for C-box 1 counter 0. @@ -3494,8 +3390,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C1_PMON_EVNTSEL0 is defined as MSR_C1_PMON_EVNTSEL0 in SDM. **/ -#define MSR_SANDY_BRIDGE_C1_PMON_EVNTSEL0 0x00000D30 - +#define MSR_SANDY_BRIDGE_C1_PMON_EVNTSEL0 0x00000D30 /** Package. Uncore C-box 1 perfmon event select for C-box 1 counter 1. @@ -3513,8 +3408,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C1_PMON_EVNTSEL1 is defined as MSR_C1_PMON_EVNTSEL1 in SDM. **/ -#define MSR_SANDY_BRIDGE_C1_PMON_EVNTSEL1 0x00000D31 - +#define MSR_SANDY_BRIDGE_C1_PMON_EVNTSEL1 0x00000D31 /** Package. Uncore C-box 1 perfmon event select for C-box 1 counter 2. @@ -3532,8 +3426,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C1_PMON_EVNTSEL2 is defined as MSR_C1_PMON_EVNTSEL2 in SDM. **/ -#define MSR_SANDY_BRIDGE_C1_PMON_EVNTSEL2 0x00000D32 - +#define MSR_SANDY_BRIDGE_C1_PMON_EVNTSEL2 0x00000D32 /** Package. Uncore C-box 1 perfmon event select for C-box 1 counter 3. @@ -3551,8 +3444,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C1_PMON_EVNTSEL3 is defined as MSR_C1_PMON_EVNTSEL3 in SDM. **/ -#define MSR_SANDY_BRIDGE_C1_PMON_EVNTSEL3 0x00000D33 - +#define MSR_SANDY_BRIDGE_C1_PMON_EVNTSEL3 0x00000D33 /** Package. Uncore C-box 1 perfmon box wide filter. @@ -3570,8 +3462,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C1_PMON_BOX_FILTER is defined as MSR_C1_PMON_BOX_FILTER in SDM. **/ -#define MSR_SANDY_BRIDGE_C1_PMON_BOX_FILTER 0x00000D34 - +#define MSR_SANDY_BRIDGE_C1_PMON_BOX_FILTER 0x00000D34 /** Package. Uncore C-box 1 perfmon counter 0. @@ -3589,8 +3480,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C1_PMON_CTR0 is defined as MSR_C1_PMON_CTR0 in SDM. **/ -#define MSR_SANDY_BRIDGE_C1_PMON_CTR0 0x00000D36 - +#define MSR_SANDY_BRIDGE_C1_PMON_CTR0 0x00000D36 /** Package. Uncore C-box 1 perfmon counter 1. @@ -3608,8 +3498,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C1_PMON_CTR1 is defined as MSR_C1_PMON_CTR1 in SDM. **/ -#define MSR_SANDY_BRIDGE_C1_PMON_CTR1 0x00000D37 - +#define MSR_SANDY_BRIDGE_C1_PMON_CTR1 0x00000D37 /** Package. Uncore C-box 1 perfmon counter 2. @@ -3627,8 +3516,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C1_PMON_CTR2 is defined as MSR_C1_PMON_CTR2 in SDM. **/ -#define MSR_SANDY_BRIDGE_C1_PMON_CTR2 0x00000D38 - +#define MSR_SANDY_BRIDGE_C1_PMON_CTR2 0x00000D38 /** Package. Uncore C-box 1 perfmon counter 3. @@ -3646,8 +3534,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C1_PMON_CTR3 is defined as MSR_C1_PMON_CTR3 in SDM. **/ -#define MSR_SANDY_BRIDGE_C1_PMON_CTR3 0x00000D39 - +#define MSR_SANDY_BRIDGE_C1_PMON_CTR3 0x00000D39 /** Package. Uncore C-box 2 perfmon local box wide control. @@ -3665,8 +3552,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C2_PMON_BOX_CTL is defined as MSR_C2_PMON_BOX_CTL in SDM. **/ -#define MSR_SANDY_BRIDGE_C2_PMON_BOX_CTL 0x00000D44 - +#define MSR_SANDY_BRIDGE_C2_PMON_BOX_CTL 0x00000D44 /** Package. Uncore C-box 2 perfmon event select for C-box 2 counter 0. @@ -3684,8 +3570,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C2_PMON_EVNTSEL0 is defined as MSR_C2_PMON_EVNTSEL0 in SDM. **/ -#define MSR_SANDY_BRIDGE_C2_PMON_EVNTSEL0 0x00000D50 - +#define MSR_SANDY_BRIDGE_C2_PMON_EVNTSEL0 0x00000D50 /** Package. Uncore C-box 2 perfmon event select for C-box 2 counter 1. @@ -3703,8 +3588,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C2_PMON_EVNTSEL1 is defined as MSR_C2_PMON_EVNTSEL1 in SDM. **/ -#define MSR_SANDY_BRIDGE_C2_PMON_EVNTSEL1 0x00000D51 - +#define MSR_SANDY_BRIDGE_C2_PMON_EVNTSEL1 0x00000D51 /** Package. Uncore C-box 2 perfmon event select for C-box 2 counter 2. @@ -3722,8 +3606,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C2_PMON_EVNTSEL2 is defined as MSR_C2_PMON_EVNTSEL2 in SDM. **/ -#define MSR_SANDY_BRIDGE_C2_PMON_EVNTSEL2 0x00000D52 - +#define MSR_SANDY_BRIDGE_C2_PMON_EVNTSEL2 0x00000D52 /** Package. Uncore C-box 2 perfmon event select for C-box 2 counter 3. @@ -3741,8 +3624,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C2_PMON_EVNTSEL3 is defined as MSR_C2_PMON_EVNTSEL3 in SDM. **/ -#define MSR_SANDY_BRIDGE_C2_PMON_EVNTSEL3 0x00000D53 - +#define MSR_SANDY_BRIDGE_C2_PMON_EVNTSEL3 0x00000D53 /** Package. Uncore C-box 2 perfmon box wide filter. @@ -3760,8 +3642,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C2_PMON_BOX_FILTER is defined as MSR_C2_PMON_BOX_FILTER in SDM. **/ -#define MSR_SANDY_BRIDGE_C2_PMON_BOX_FILTER 0x00000D54 - +#define MSR_SANDY_BRIDGE_C2_PMON_BOX_FILTER 0x00000D54 /** Package. Uncore C-box 2 perfmon counter 0. @@ -3779,8 +3660,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C2_PMON_CTR0 is defined as MSR_C2_PMON_CTR0 in SDM. **/ -#define MSR_SANDY_BRIDGE_C2_PMON_CTR0 0x00000D56 - +#define MSR_SANDY_BRIDGE_C2_PMON_CTR0 0x00000D56 /** Package. Uncore C-box 2 perfmon counter 1. @@ -3798,8 +3678,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C2_PMON_CTR1 is defined as MSR_C2_PMON_CTR1 in SDM. **/ -#define MSR_SANDY_BRIDGE_C2_PMON_CTR1 0x00000D57 - +#define MSR_SANDY_BRIDGE_C2_PMON_CTR1 0x00000D57 /** Package. Uncore C-box 2 perfmon counter 2. @@ -3817,8 +3696,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C2_PMON_CTR2 is defined as MSR_C2_PMON_CTR2 in SDM. **/ -#define MSR_SANDY_BRIDGE_C2_PMON_CTR2 0x00000D58 - +#define MSR_SANDY_BRIDGE_C2_PMON_CTR2 0x00000D58 /** Package. Uncore C-box 2 perfmon counter 3. @@ -3836,8 +3714,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C2_PMON_CTR3 is defined as MSR_C2_PMON_CTR3 in SDM. **/ -#define MSR_SANDY_BRIDGE_C2_PMON_CTR3 0x00000D59 - +#define MSR_SANDY_BRIDGE_C2_PMON_CTR3 0x00000D59 /** Package. Uncore C-box 3 perfmon local box wide control. @@ -3855,8 +3732,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C3_PMON_BOX_CTL is defined as MSR_C3_PMON_BOX_CTL in SDM. **/ -#define MSR_SANDY_BRIDGE_C3_PMON_BOX_CTL 0x00000D64 - +#define MSR_SANDY_BRIDGE_C3_PMON_BOX_CTL 0x00000D64 /** Package. Uncore C-box 3 perfmon event select for C-box 3 counter 0. @@ -3874,8 +3750,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C3_PMON_EVNTSEL0 is defined as MSR_C3_PMON_EVNTSEL0 in SDM. **/ -#define MSR_SANDY_BRIDGE_C3_PMON_EVNTSEL0 0x00000D70 - +#define MSR_SANDY_BRIDGE_C3_PMON_EVNTSEL0 0x00000D70 /** Package. Uncore C-box 3 perfmon event select for C-box 3 counter 1. @@ -3893,8 +3768,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C3_PMON_EVNTSEL1 is defined as MSR_C3_PMON_EVNTSEL1 in SDM. **/ -#define MSR_SANDY_BRIDGE_C3_PMON_EVNTSEL1 0x00000D71 - +#define MSR_SANDY_BRIDGE_C3_PMON_EVNTSEL1 0x00000D71 /** Package. Uncore C-box 3 perfmon event select for C-box 3 counter 2. @@ -3912,8 +3786,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C3_PMON_EVNTSEL2 is defined as MSR_C3_PMON_EVNTSEL2 in SDM. **/ -#define MSR_SANDY_BRIDGE_C3_PMON_EVNTSEL2 0x00000D72 - +#define MSR_SANDY_BRIDGE_C3_PMON_EVNTSEL2 0x00000D72 /** Package. Uncore C-box 3 perfmon event select for C-box 3 counter 3. @@ -3931,8 +3804,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C3_PMON_EVNTSEL3 is defined as MSR_C3_PMON_EVNTSEL3 in SDM. **/ -#define MSR_SANDY_BRIDGE_C3_PMON_EVNTSEL3 0x00000D73 - +#define MSR_SANDY_BRIDGE_C3_PMON_EVNTSEL3 0x00000D73 /** Package. Uncore C-box 3 perfmon box wide filter. @@ -3950,8 +3822,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C3_PMON_BOX_FILTER is defined as MSR_C3_PMON_BOX_FILTER in SDM. **/ -#define MSR_SANDY_BRIDGE_C3_PMON_BOX_FILTER 0x00000D74 - +#define MSR_SANDY_BRIDGE_C3_PMON_BOX_FILTER 0x00000D74 /** Package. Uncore C-box 3 perfmon counter 0. @@ -3969,8 +3840,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C3_PMON_CTR0 is defined as MSR_C3_PMON_CTR0 in SDM. **/ -#define MSR_SANDY_BRIDGE_C3_PMON_CTR0 0x00000D76 - +#define MSR_SANDY_BRIDGE_C3_PMON_CTR0 0x00000D76 /** Package. Uncore C-box 3 perfmon counter 1. @@ -3988,8 +3858,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C3_PMON_CTR1 is defined as MSR_C3_PMON_CTR1 in SDM. **/ -#define MSR_SANDY_BRIDGE_C3_PMON_CTR1 0x00000D77 - +#define MSR_SANDY_BRIDGE_C3_PMON_CTR1 0x00000D77 /** Package. Uncore C-box 3 perfmon counter 2. @@ -4007,8 +3876,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C3_PMON_CTR2 is defined as MSR_C3_PMON_CTR2 in SDM. **/ -#define MSR_SANDY_BRIDGE_C3_PMON_CTR2 0x00000D78 - +#define MSR_SANDY_BRIDGE_C3_PMON_CTR2 0x00000D78 /** Package. Uncore C-box 3 perfmon counter 3. @@ -4026,8 +3894,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C3_PMON_CTR3 is defined as MSR_C3_PMON_CTR3 in SDM. **/ -#define MSR_SANDY_BRIDGE_C3_PMON_CTR3 0x00000D79 - +#define MSR_SANDY_BRIDGE_C3_PMON_CTR3 0x00000D79 /** Package. Uncore C-box 4 perfmon local box wide control. @@ -4045,8 +3912,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C4_PMON_BOX_CTL is defined as MSR_C4_PMON_BOX_CTL in SDM. **/ -#define MSR_SANDY_BRIDGE_C4_PMON_BOX_CTL 0x00000D84 - +#define MSR_SANDY_BRIDGE_C4_PMON_BOX_CTL 0x00000D84 /** Package. Uncore C-box 4 perfmon event select for C-box 4 counter 0. @@ -4064,8 +3930,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C4_PMON_EVNTSEL0 is defined as MSR_C4_PMON_EVNTSEL0 in SDM. **/ -#define MSR_SANDY_BRIDGE_C4_PMON_EVNTSEL0 0x00000D90 - +#define MSR_SANDY_BRIDGE_C4_PMON_EVNTSEL0 0x00000D90 /** Package. Uncore C-box 4 perfmon event select for C-box 4 counter 1. @@ -4083,8 +3948,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C4_PMON_EVNTSEL1 is defined as MSR_C4_PMON_EVNTSEL1 in SDM. **/ -#define MSR_SANDY_BRIDGE_C4_PMON_EVNTSEL1 0x00000D91 - +#define MSR_SANDY_BRIDGE_C4_PMON_EVNTSEL1 0x00000D91 /** Package. Uncore C-box 4 perfmon event select for C-box 4 counter 2. @@ -4102,8 +3966,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C4_PMON_EVNTSEL2 is defined as MSR_C4_PMON_EVNTSEL2 in SDM. **/ -#define MSR_SANDY_BRIDGE_C4_PMON_EVNTSEL2 0x00000D92 - +#define MSR_SANDY_BRIDGE_C4_PMON_EVNTSEL2 0x00000D92 /** Package. Uncore C-box 4 perfmon event select for C-box 4 counter 3. @@ -4121,8 +3984,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C4_PMON_EVNTSEL3 is defined as MSR_C4_PMON_EVNTSEL3 in SDM. **/ -#define MSR_SANDY_BRIDGE_C4_PMON_EVNTSEL3 0x00000D93 - +#define MSR_SANDY_BRIDGE_C4_PMON_EVNTSEL3 0x00000D93 /** Package. Uncore C-box 4 perfmon box wide filter. @@ -4140,8 +4002,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C4_PMON_BOX_FILTER is defined as MSR_C4_PMON_BOX_FILTER in SDM. **/ -#define MSR_SANDY_BRIDGE_C4_PMON_BOX_FILTER 0x00000D94 - +#define MSR_SANDY_BRIDGE_C4_PMON_BOX_FILTER 0x00000D94 /** Package. Uncore C-box 4 perfmon counter 0. @@ -4159,8 +4020,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C4_PMON_CTR0 is defined as MSR_C4_PMON_CTR0 in SDM. **/ -#define MSR_SANDY_BRIDGE_C4_PMON_CTR0 0x00000D96 - +#define MSR_SANDY_BRIDGE_C4_PMON_CTR0 0x00000D96 /** Package. Uncore C-box 4 perfmon counter 1. @@ -4178,8 +4038,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C4_PMON_CTR1 is defined as MSR_C4_PMON_CTR1 in SDM. **/ -#define MSR_SANDY_BRIDGE_C4_PMON_CTR1 0x00000D97 - +#define MSR_SANDY_BRIDGE_C4_PMON_CTR1 0x00000D97 /** Package. Uncore C-box 4 perfmon counter 2. @@ -4197,8 +4056,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C4_PMON_CTR2 is defined as MSR_C4_PMON_CTR2 in SDM. **/ -#define MSR_SANDY_BRIDGE_C4_PMON_CTR2 0x00000D98 - +#define MSR_SANDY_BRIDGE_C4_PMON_CTR2 0x00000D98 /** Package. Uncore C-box 4 perfmon counter 3. @@ -4216,8 +4074,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C4_PMON_CTR3 is defined as MSR_C4_PMON_CTR3 in SDM. **/ -#define MSR_SANDY_BRIDGE_C4_PMON_CTR3 0x00000D99 - +#define MSR_SANDY_BRIDGE_C4_PMON_CTR3 0x00000D99 /** Package. Uncore C-box 5 perfmon local box wide control. @@ -4235,8 +4092,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C5_PMON_BOX_CTL is defined as MSR_C5_PMON_BOX_CTL in SDM. **/ -#define MSR_SANDY_BRIDGE_C5_PMON_BOX_CTL 0x00000DA4 - +#define MSR_SANDY_BRIDGE_C5_PMON_BOX_CTL 0x00000DA4 /** Package. Uncore C-box 5 perfmon event select for C-box 5 counter 0. @@ -4254,8 +4110,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C5_PMON_EVNTSEL0 is defined as MSR_C5_PMON_EVNTSEL0 in SDM. **/ -#define MSR_SANDY_BRIDGE_C5_PMON_EVNTSEL0 0x00000DB0 - +#define MSR_SANDY_BRIDGE_C5_PMON_EVNTSEL0 0x00000DB0 /** Package. Uncore C-box 5 perfmon event select for C-box 5 counter 1. @@ -4273,8 +4128,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C5_PMON_EVNTSEL1 is defined as MSR_C5_PMON_EVNTSEL1 in SDM. **/ -#define MSR_SANDY_BRIDGE_C5_PMON_EVNTSEL1 0x00000DB1 - +#define MSR_SANDY_BRIDGE_C5_PMON_EVNTSEL1 0x00000DB1 /** Package. Uncore C-box 5 perfmon event select for C-box 5 counter 2. @@ -4292,8 +4146,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C5_PMON_EVNTSEL2 is defined as MSR_C5_PMON_EVNTSEL2 in SDM. **/ -#define MSR_SANDY_BRIDGE_C5_PMON_EVNTSEL2 0x00000DB2 - +#define MSR_SANDY_BRIDGE_C5_PMON_EVNTSEL2 0x00000DB2 /** Package. Uncore C-box 5 perfmon event select for C-box 5 counter 3. @@ -4311,8 +4164,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C5_PMON_EVNTSEL3 is defined as MSR_C5_PMON_EVNTSEL3 in SDM. **/ -#define MSR_SANDY_BRIDGE_C5_PMON_EVNTSEL3 0x00000DB3 - +#define MSR_SANDY_BRIDGE_C5_PMON_EVNTSEL3 0x00000DB3 /** Package. Uncore C-box 5 perfmon box wide filter. @@ -4330,8 +4182,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C5_PMON_BOX_FILTER is defined as MSR_C5_PMON_BOX_FILTER in SDM. **/ -#define MSR_SANDY_BRIDGE_C5_PMON_BOX_FILTER 0x00000DB4 - +#define MSR_SANDY_BRIDGE_C5_PMON_BOX_FILTER 0x00000DB4 /** Package. Uncore C-box 5 perfmon counter 0. @@ -4349,8 +4200,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C5_PMON_CTR0 is defined as MSR_C5_PMON_CTR0 in SDM. **/ -#define MSR_SANDY_BRIDGE_C5_PMON_CTR0 0x00000DB6 - +#define MSR_SANDY_BRIDGE_C5_PMON_CTR0 0x00000DB6 /** Package. Uncore C-box 5 perfmon counter 1. @@ -4368,8 +4218,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C5_PMON_CTR1 is defined as MSR_C5_PMON_CTR1 in SDM. **/ -#define MSR_SANDY_BRIDGE_C5_PMON_CTR1 0x00000DB7 - +#define MSR_SANDY_BRIDGE_C5_PMON_CTR1 0x00000DB7 /** Package. Uncore C-box 5 perfmon counter 2. @@ -4387,8 +4236,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C5_PMON_CTR2 is defined as MSR_C5_PMON_CTR2 in SDM. **/ -#define MSR_SANDY_BRIDGE_C5_PMON_CTR2 0x00000DB8 - +#define MSR_SANDY_BRIDGE_C5_PMON_CTR2 0x00000DB8 /** Package. Uncore C-box 5 perfmon counter 3. @@ -4406,8 +4254,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C5_PMON_CTR3 is defined as MSR_C5_PMON_CTR3 in SDM. **/ -#define MSR_SANDY_BRIDGE_C5_PMON_CTR3 0x00000DB9 - +#define MSR_SANDY_BRIDGE_C5_PMON_CTR3 0x00000DB9 /** Package. Uncore C-box 6 perfmon local box wide control. @@ -4425,8 +4272,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C6_PMON_BOX_CTL is defined as MSR_C6_PMON_BOX_CTL in SDM. **/ -#define MSR_SANDY_BRIDGE_C6_PMON_BOX_CTL 0x00000DC4 - +#define MSR_SANDY_BRIDGE_C6_PMON_BOX_CTL 0x00000DC4 /** Package. Uncore C-box 6 perfmon event select for C-box 6 counter 0. @@ -4444,8 +4290,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C6_PMON_EVNTSEL0 is defined as MSR_C6_PMON_EVNTSEL0 in SDM. **/ -#define MSR_SANDY_BRIDGE_C6_PMON_EVNTSEL0 0x00000DD0 - +#define MSR_SANDY_BRIDGE_C6_PMON_EVNTSEL0 0x00000DD0 /** Package. Uncore C-box 6 perfmon event select for C-box 6 counter 1. @@ -4463,8 +4308,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C6_PMON_EVNTSEL1 is defined as MSR_C6_PMON_EVNTSEL1 in SDM. **/ -#define MSR_SANDY_BRIDGE_C6_PMON_EVNTSEL1 0x00000DD1 - +#define MSR_SANDY_BRIDGE_C6_PMON_EVNTSEL1 0x00000DD1 /** Package. Uncore C-box 6 perfmon event select for C-box 6 counter 2. @@ -4482,8 +4326,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C6_PMON_EVNTSEL2 is defined as MSR_C6_PMON_EVNTSEL2 in SDM. **/ -#define MSR_SANDY_BRIDGE_C6_PMON_EVNTSEL2 0x00000DD2 - +#define MSR_SANDY_BRIDGE_C6_PMON_EVNTSEL2 0x00000DD2 /** Package. Uncore C-box 6 perfmon event select for C-box 6 counter 3. @@ -4501,8 +4344,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C6_PMON_EVNTSEL3 is defined as MSR_C6_PMON_EVNTSEL3 in SDM. **/ -#define MSR_SANDY_BRIDGE_C6_PMON_EVNTSEL3 0x00000DD3 - +#define MSR_SANDY_BRIDGE_C6_PMON_EVNTSEL3 0x00000DD3 /** Package. Uncore C-box 6 perfmon box wide filter. @@ -4520,8 +4362,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C6_PMON_BOX_FILTER is defined as MSR_C6_PMON_BOX_FILTER in SDM. **/ -#define MSR_SANDY_BRIDGE_C6_PMON_BOX_FILTER 0x00000DD4 - +#define MSR_SANDY_BRIDGE_C6_PMON_BOX_FILTER 0x00000DD4 /** Package. Uncore C-box 6 perfmon counter 0. @@ -4539,8 +4380,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C6_PMON_CTR0 is defined as MSR_C6_PMON_CTR0 in SDM. **/ -#define MSR_SANDY_BRIDGE_C6_PMON_CTR0 0x00000DD6 - +#define MSR_SANDY_BRIDGE_C6_PMON_CTR0 0x00000DD6 /** Package. Uncore C-box 6 perfmon counter 1. @@ -4558,8 +4398,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C6_PMON_CTR1 is defined as MSR_C6_PMON_CTR1 in SDM. **/ -#define MSR_SANDY_BRIDGE_C6_PMON_CTR1 0x00000DD7 - +#define MSR_SANDY_BRIDGE_C6_PMON_CTR1 0x00000DD7 /** Package. Uncore C-box 6 perfmon counter 2. @@ -4577,8 +4416,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C6_PMON_CTR2 is defined as MSR_C6_PMON_CTR2 in SDM. **/ -#define MSR_SANDY_BRIDGE_C6_PMON_CTR2 0x00000DD8 - +#define MSR_SANDY_BRIDGE_C6_PMON_CTR2 0x00000DD8 /** Package. Uncore C-box 6 perfmon counter 3. @@ -4596,8 +4434,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C6_PMON_CTR3 is defined as MSR_C6_PMON_CTR3 in SDM. **/ -#define MSR_SANDY_BRIDGE_C6_PMON_CTR3 0x00000DD9 - +#define MSR_SANDY_BRIDGE_C6_PMON_CTR3 0x00000DD9 /** Package. Uncore C-box 7 perfmon local box wide control. @@ -4615,8 +4452,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C7_PMON_BOX_CTL is defined as MSR_C7_PMON_BOX_CTL in SDM. **/ -#define MSR_SANDY_BRIDGE_C7_PMON_BOX_CTL 0x00000DE4 - +#define MSR_SANDY_BRIDGE_C7_PMON_BOX_CTL 0x00000DE4 /** Package. Uncore C-box 7 perfmon event select for C-box 7 counter 0. @@ -4634,8 +4470,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C7_PMON_EVNTSEL0 is defined as MSR_C7_PMON_EVNTSEL0 in SDM. **/ -#define MSR_SANDY_BRIDGE_C7_PMON_EVNTSEL0 0x00000DF0 - +#define MSR_SANDY_BRIDGE_C7_PMON_EVNTSEL0 0x00000DF0 /** Package. Uncore C-box 7 perfmon event select for C-box 7 counter 1. @@ -4653,8 +4488,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C7_PMON_EVNTSEL1 is defined as MSR_C7_PMON_EVNTSEL1 in SDM. **/ -#define MSR_SANDY_BRIDGE_C7_PMON_EVNTSEL1 0x00000DF1 - +#define MSR_SANDY_BRIDGE_C7_PMON_EVNTSEL1 0x00000DF1 /** Package. Uncore C-box 7 perfmon event select for C-box 7 counter 2. @@ -4672,8 +4506,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C7_PMON_EVNTSEL2 is defined as MSR_C7_PMON_EVNTSEL2 in SDM. **/ -#define MSR_SANDY_BRIDGE_C7_PMON_EVNTSEL2 0x00000DF2 - +#define MSR_SANDY_BRIDGE_C7_PMON_EVNTSEL2 0x00000DF2 /** Package. Uncore C-box 7 perfmon event select for C-box 7 counter 3. @@ -4691,8 +4524,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C7_PMON_EVNTSEL3 is defined as MSR_C7_PMON_EVNTSEL3 in SDM. **/ -#define MSR_SANDY_BRIDGE_C7_PMON_EVNTSEL3 0x00000DF3 - +#define MSR_SANDY_BRIDGE_C7_PMON_EVNTSEL3 0x00000DF3 /** Package. Uncore C-box 7 perfmon box wide filter. @@ -4710,8 +4542,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C7_PMON_BOX_FILTER is defined as MSR_C7_PMON_BOX_FILTER in SDM. **/ -#define MSR_SANDY_BRIDGE_C7_PMON_BOX_FILTER 0x00000DF4 - +#define MSR_SANDY_BRIDGE_C7_PMON_BOX_FILTER 0x00000DF4 /** Package. Uncore C-box 7 perfmon counter 0. @@ -4729,8 +4560,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C7_PMON_CTR0 is defined as MSR_C7_PMON_CTR0 in SDM. **/ -#define MSR_SANDY_BRIDGE_C7_PMON_CTR0 0x00000DF6 - +#define MSR_SANDY_BRIDGE_C7_PMON_CTR0 0x00000DF6 /** Package. Uncore C-box 7 perfmon counter 1. @@ -4748,8 +4578,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C7_PMON_CTR1 is defined as MSR_C7_PMON_CTR1 in SDM. **/ -#define MSR_SANDY_BRIDGE_C7_PMON_CTR1 0x00000DF7 - +#define MSR_SANDY_BRIDGE_C7_PMON_CTR1 0x00000DF7 /** Package. Uncore C-box 7 perfmon counter 2. @@ -4767,8 +4596,7 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C7_PMON_CTR2 is defined as MSR_C7_PMON_CTR2 in SDM. **/ -#define MSR_SANDY_BRIDGE_C7_PMON_CTR2 0x00000DF8 - +#define MSR_SANDY_BRIDGE_C7_PMON_CTR2 0x00000DF8 /** Package. Uncore C-box 7 perfmon counter 3. @@ -4786,6 +4614,6 @@ typedef union { @endcode @note MSR_SANDY_BRIDGE_C7_PMON_CTR3 is defined as MSR_C7_PMON_CTR3 in SDM. **/ -#define MSR_SANDY_BRIDGE_C7_PMON_CTR3 0x00000DF9 +#define MSR_SANDY_BRIDGE_C7_PMON_CTR3 0x00000DF9 #endif diff --git a/MdePkg/Include/Register/Intel/Msr/SilvermontMsr.h b/MdePkg/Include/Register/Intel/Msr/SilvermontMsr.h index cc0dc03..1880244 100644 --- a/MdePkg/Include/Register/Intel/Msr/SilvermontMsr.h +++ b/MdePkg/Include/Register/Intel/Msr/SilvermontMsr.h @@ -57,7 +57,7 @@ @endcode @note MSR_SILVERMONT_PLATFORM_ID is defined as MSR_PLATFORM_ID in SDM. **/ -#define MSR_SILVERMONT_PLATFORM_ID 0x00000017 +#define MSR_SILVERMONT_PLATFORM_ID 0x00000017 /** MSR information returned for MSR index #MSR_SILVERMONT_PLATFORM_ID @@ -67,26 +67,25 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:8; + UINT32 Reserved1 : 8; /// /// [Bits 12:8] Maximum Qualified Ratio (R) The maximum allowed bus ratio. /// - UINT32 MaximumQualifiedRatio:5; - UINT32 Reserved2:19; - UINT32 Reserved3:18; + UINT32 MaximumQualifiedRatio : 5; + UINT32 Reserved2 : 19; + UINT32 Reserved3 : 18; /// /// [Bits 52:50] See Table 2-2. /// - UINT32 PlatformId:3; - UINT32 Reserved4:11; + UINT32 PlatformId : 3; + UINT32 Reserved4 : 11; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SILVERMONT_PLATFORM_ID_REGISTER; - /** Module. Processor Hard Power-On Configuration (R/W) Writes ignored. @@ -105,7 +104,7 @@ typedef union { @endcode @note MSR_SILVERMONT_EBL_CR_POWERON is defined as MSR_EBL_CR_POWERON in SDM. **/ -#define MSR_SILVERMONT_EBL_CR_POWERON 0x0000002A +#define MSR_SILVERMONT_EBL_CR_POWERON 0x0000002A /** MSR information returned for MSR index #MSR_SILVERMONT_EBL_CR_POWERON @@ -115,20 +114,19 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:32; - UINT32 Reserved2:32; + UINT32 Reserved1 : 32; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SILVERMONT_EBL_CR_POWERON_REGISTER; - /** Core. SMI Counter (R/O). @@ -146,7 +144,7 @@ typedef union { @endcode @note MSR_SILVERMONT_SMI_COUNT is defined as MSR_SMI_COUNT in SDM. **/ -#define MSR_SILVERMONT_SMI_COUNT 0x00000034 +#define MSR_SILVERMONT_SMI_COUNT 0x00000034 /** MSR information returned for MSR index #MSR_SILVERMONT_SMI_COUNT @@ -160,20 +158,19 @@ typedef union { /// [Bits 31:0] SMI Count (R/O) Running count of SMI events since last /// RESET. /// - UINT32 SMICount:32; - UINT32 Reserved:32; + UINT32 SMICount : 32; + UINT32 Reserved : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SILVERMONT_SMI_COUNT_REGISTER; - /** Core. Control Features in Intel 64 Processor (R/W). See Table 2-2. @@ -194,7 +191,7 @@ typedef union { @endcode @note MSR_SILVERMONT_IA32_FEATURE_CONTROL is defined as IA32_FEATURE_CONTROL in SDM. **/ -#define MSR_SILVERMONT_IA32_FEATURE_CONTROL 0x0000003A +#define MSR_SILVERMONT_IA32_FEATURE_CONTROL 0x0000003A /** MSR information returned for MSR index #MSR_SILVERMONT_IA32_FEATURE_CONTROL @@ -207,26 +204,25 @@ typedef union { /// /// [Bit 0] Lock (R/WL). /// - UINT32 Lock:1; - UINT32 Reserved1:1; + UINT32 Lock : 1; + UINT32 Reserved1 : 1; /// /// [Bit 2] Enable VMX outside SMX operation (R/WL). /// - UINT32 EnableVmxOutsideSmx:1; - UINT32 Reserved2:29; - UINT32 Reserved3:32; + UINT32 EnableVmxOutsideSmx : 1; + UINT32 Reserved2 : 29; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SILVERMONT_IA32_FEATURE_CONTROL_REGISTER; - /** Core. Last Branch Record n From IP (R/W) One of eight pairs of last branch record registers on the last branch record stack. The From_IP part of the @@ -255,17 +251,16 @@ typedef union { MSR_SILVERMONT_LASTBRANCH_7_FROM_IP is defined as MSR_LASTBRANCH_7_FROM_IP in SDM. @{ **/ -#define MSR_SILVERMONT_LASTBRANCH_0_FROM_IP 0x00000040 -#define MSR_SILVERMONT_LASTBRANCH_1_FROM_IP 0x00000041 -#define MSR_SILVERMONT_LASTBRANCH_2_FROM_IP 0x00000042 -#define MSR_SILVERMONT_LASTBRANCH_3_FROM_IP 0x00000043 -#define MSR_SILVERMONT_LASTBRANCH_4_FROM_IP 0x00000044 -#define MSR_SILVERMONT_LASTBRANCH_5_FROM_IP 0x00000045 -#define MSR_SILVERMONT_LASTBRANCH_6_FROM_IP 0x00000046 -#define MSR_SILVERMONT_LASTBRANCH_7_FROM_IP 0x00000047 +#define MSR_SILVERMONT_LASTBRANCH_0_FROM_IP 0x00000040 +#define MSR_SILVERMONT_LASTBRANCH_1_FROM_IP 0x00000041 +#define MSR_SILVERMONT_LASTBRANCH_2_FROM_IP 0x00000042 +#define MSR_SILVERMONT_LASTBRANCH_3_FROM_IP 0x00000043 +#define MSR_SILVERMONT_LASTBRANCH_4_FROM_IP 0x00000044 +#define MSR_SILVERMONT_LASTBRANCH_5_FROM_IP 0x00000045 +#define MSR_SILVERMONT_LASTBRANCH_6_FROM_IP 0x00000046 +#define MSR_SILVERMONT_LASTBRANCH_7_FROM_IP 0x00000047 /// @} - /** Core. Last Branch Record n To IP (R/W) One of eight pairs of last branch record registers on the last branch record stack. The To_IP part of the @@ -292,17 +287,16 @@ typedef union { MSR_SILVERMONT_LASTBRANCH_7_TO_IP is defined as MSR_LASTBRANCH_7_TO_IP in SDM. @{ **/ -#define MSR_SILVERMONT_LASTBRANCH_0_TO_IP 0x00000060 -#define MSR_SILVERMONT_LASTBRANCH_1_TO_IP 0x00000061 -#define MSR_SILVERMONT_LASTBRANCH_2_TO_IP 0x00000062 -#define MSR_SILVERMONT_LASTBRANCH_3_TO_IP 0x00000063 -#define MSR_SILVERMONT_LASTBRANCH_4_TO_IP 0x00000064 -#define MSR_SILVERMONT_LASTBRANCH_5_TO_IP 0x00000065 -#define MSR_SILVERMONT_LASTBRANCH_6_TO_IP 0x00000066 -#define MSR_SILVERMONT_LASTBRANCH_7_TO_IP 0x00000067 +#define MSR_SILVERMONT_LASTBRANCH_0_TO_IP 0x00000060 +#define MSR_SILVERMONT_LASTBRANCH_1_TO_IP 0x00000061 +#define MSR_SILVERMONT_LASTBRANCH_2_TO_IP 0x00000062 +#define MSR_SILVERMONT_LASTBRANCH_3_TO_IP 0x00000063 +#define MSR_SILVERMONT_LASTBRANCH_4_TO_IP 0x00000064 +#define MSR_SILVERMONT_LASTBRANCH_5_TO_IP 0x00000065 +#define MSR_SILVERMONT_LASTBRANCH_6_TO_IP 0x00000066 +#define MSR_SILVERMONT_LASTBRANCH_7_TO_IP 0x00000067 /// @} - /** Module. Scalable Bus Speed(RO) This field indicates the intended scalable bus clock speed for processors based on Silvermont microarchitecture:. @@ -321,7 +315,7 @@ typedef union { @endcode @note MSR_SILVERMONT_FSB_FREQ is defined as MSR_FSB_FREQ in SDM. **/ -#define MSR_SILVERMONT_FSB_FREQ 0x000000CD +#define MSR_SILVERMONT_FSB_FREQ 0x000000CD /** MSR information returned for MSR index #MSR_SILVERMONT_FSB_FREQ @@ -354,21 +348,20 @@ typedef union { /// 0111B: 088.9 MHz /// 1000B: 087.5 MHz /// - UINT32 ScalableBusSpeed:4; - UINT32 Reserved1:28; - UINT32 Reserved2:32; + UINT32 ScalableBusSpeed : 4; + UINT32 Reserved1 : 28; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SILVERMONT_FSB_FREQ_REGISTER; - /** Package. Platform Information: Contains power management and other model specific features enumeration. See http://biosbits.org. @@ -387,7 +380,7 @@ typedef union { AsmWriteMsr64 (MSR_SILVERMONT_PLATFORM_INFO, Msr.Uint64); @endcode **/ -#define MSR_SILVERMONT_PLATFORM_INFO 0x000000CE +#define MSR_SILVERMONT_PLATFORM_INFO 0x000000CE /** MSR information returned for MSR index #MSR_SILVERMONT_PLATFORM_INFO @@ -397,24 +390,24 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:8; + UINT32 Reserved1 : 8; /// /// [Bits 15:8] Package. Maximum Non-Turbo Ratio (R/O) This is the ratio /// of the maximum frequency that does not require turbo. Frequency = /// ratio * Scalable Bus Frequency. /// - UINT32 MaximumNon_TurboRatio:8; - UINT32 Reserved2:16; - UINT32 Reserved3:32; + UINT32 MaximumNon_TurboRatio : 8; + UINT32 Reserved2 : 16; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SILVERMONT_PLATFORM_INFO_REGISTER; /** @@ -437,7 +430,7 @@ typedef union { @endcode @note MSR_SILVERMONT_PKG_CST_CONFIG_CONTROL is defined as MSR_PKG_CST_CONFIG_CONTROL in SDM. **/ -#define MSR_SILVERMONT_PKG_CST_CONFIG_CONTROL 0x000000E2 +#define MSR_SILVERMONT_PKG_CST_CONFIG_CONTROL 0x000000E2 /** MSR information returned for MSR index #MSR_SILVERMONT_PKG_CST_CONFIG_CONTROL @@ -455,34 +448,33 @@ typedef union { /// C0 (no package C-sate support) 001b: C1 (Behavior is the same as 000b) /// 100b: C4 110b: C6 111b: C7 (Silvermont only). /// - UINT32 Limit:3; - UINT32 Reserved1:7; + UINT32 Limit : 3; + UINT32 Reserved1 : 7; /// /// [Bit 10] I/O MWAIT Redirection Enable (R/W) When set, will map /// IO_read instructions sent to IO register specified by /// MSR_PMG_IO_CAPTURE_BASE to MWAIT instructions. /// - UINT32 IO_MWAIT:1; - UINT32 Reserved2:4; + UINT32 IO_MWAIT : 1; + UINT32 Reserved2 : 4; /// /// [Bit 15] CFG Lock (R/WO) When set, lock bits 15:0 of this register /// until next reset. /// - UINT32 CFGLock:1; - UINT32 Reserved3:16; - UINT32 Reserved4:32; + UINT32 CFGLock : 1; + UINT32 Reserved3 : 16; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SILVERMONT_PKG_CST_CONFIG_CONTROL_REGISTER; - /** Module. Power Management IO Redirection in C-state (R/W) See http://biosbits.org. @@ -502,7 +494,7 @@ typedef union { @endcode @note MSR_SILVERMONT_PMG_IO_CAPTURE_BASE is defined as MSR_PMG_IO_CAPTURE_BASE in SDM. **/ -#define MSR_SILVERMONT_PMG_IO_CAPTURE_BASE 0x000000E4 +#define MSR_SILVERMONT_PMG_IO_CAPTURE_BASE 0x000000E4 /** MSR information returned for MSR index #MSR_SILVERMONT_PMG_IO_CAPTURE_BASE @@ -520,7 +512,7 @@ typedef union { /// address redirection is enabled, this is the IO port address reported /// to the OS/software. /// - UINT32 Lvl2Base:16; + UINT32 Lvl2Base : 16; /// /// [Bits 18:16] C-state Range (R/W) Specifies the encoding value of the /// maximum C-State code name to be included when IO read to MWAIT @@ -528,21 +520,20 @@ typedef union { /// is the max C-State to include 110b - C6 is the max C-State to include /// 111b - C7 is the max C-State to include. /// - UINT32 CStateRange:3; - UINT32 Reserved1:13; - UINT32 Reserved2:32; + UINT32 CStateRange : 3; + UINT32 Reserved1 : 13; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SILVERMONT_PMG_IO_CAPTURE_BASE_REGISTER; - /** Module. @@ -561,7 +552,7 @@ typedef union { @endcode @note MSR_SILVERMONT_BBL_CR_CTL3 is defined as MSR_BBL_CR_CTL3 in SDM. **/ -#define MSR_SILVERMONT_BBL_CR_CTL3 0x0000011E +#define MSR_SILVERMONT_BBL_CR_CTL3 0x0000011E /** MSR information returned for MSR index #MSR_SILVERMONT_BBL_CR_CTL3 @@ -575,33 +566,32 @@ typedef union { /// [Bit 0] L2 Hardware Enabled (RO) 1 = If the L2 is hardware-enabled 0 = /// Indicates if the L2 is hardware-disabled. /// - UINT32 L2HardwareEnabled:1; - UINT32 Reserved1:7; + UINT32 L2HardwareEnabled : 1; + UINT32 Reserved1 : 7; /// /// [Bit 8] L2 Enabled. (R/W) 1 = L2 cache has been initialized 0 = /// Disabled (default) Until this bit is set the processor will not /// respond to the WBINVD instruction or the assertion of the FLUSH# input. /// - UINT32 L2Enabled:1; - UINT32 Reserved2:14; + UINT32 L2Enabled : 1; + UINT32 Reserved2 : 14; /// /// [Bit 23] L2 Not Present (RO) 1. = L2 Present 2. = L2 Not Present. /// - UINT32 L2NotPresent:1; - UINT32 Reserved3:8; - UINT32 Reserved4:32; + UINT32 L2NotPresent : 1; + UINT32 Reserved3 : 8; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SILVERMONT_BBL_CR_CTL3_REGISTER; - /** Core. AES Configuration (RW-L) Privileged post-BIOS agent must provide a #GP handler to handle unsuccessful read of this MSR. @@ -621,7 +611,7 @@ typedef union { @endcode @note MSR_SILVERMONT_FEATURE_CONFIG is defined as MSR_FEATURE_CONFIG in SDM. **/ -#define MSR_SILVERMONT_FEATURE_CONFIG 0x0000013C +#define MSR_SILVERMONT_FEATURE_CONFIG 0x0000013C /** MSR information returned for MSR index #MSR_SILVERMONT_FEATURE_CONFIG @@ -640,21 +630,20 @@ typedef union { /// 01b, AES instruction can be mis-configured if a privileged agent /// unintentionally writes 11b. /// - UINT32 AESConfiguration:2; - UINT32 Reserved1:30; - UINT32 Reserved2:32; + UINT32 AESConfiguration : 2; + UINT32 Reserved1 : 30; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SILVERMONT_FEATURE_CONFIG_REGISTER; - /** Enable Misc. Processor Features (R/W) Allows a variety of processor functions to be enabled and disabled. @@ -674,7 +663,7 @@ typedef union { @endcode @note MSR_SILVERMONT_IA32_MISC_ENABLE is defined as IA32_MISC_ENABLE in SDM. **/ -#define MSR_SILVERMONT_IA32_MISC_ENABLE 0x000001A0 +#define MSR_SILVERMONT_IA32_MISC_ENABLE 0x000001A0 /** MSR information returned for MSR index #MSR_SILVERMONT_IA32_MISC_ENABLE @@ -687,55 +676,55 @@ typedef union { /// /// [Bit 0] Core. Fast-Strings Enable See Table 2-2. /// - UINT32 FastStrings:1; - UINT32 Reserved1:2; + UINT32 FastStrings : 1; + UINT32 Reserved1 : 2; /// /// [Bit 3] Module. Automatic Thermal Control Circuit Enable (R/W) See /// Table 2-2. Default value is 0. /// - UINT32 AutomaticThermalControlCircuit:1; - UINT32 Reserved2:3; + UINT32 AutomaticThermalControlCircuit : 1; + UINT32 Reserved2 : 3; /// /// [Bit 7] Core. Performance Monitoring Available (R) See Table 2-2. /// - UINT32 PerformanceMonitoring:1; - UINT32 Reserved3:3; + UINT32 PerformanceMonitoring : 1; + UINT32 Reserved3 : 3; /// /// [Bit 11] Core. Branch Trace Storage Unavailable (RO) See Table 2-2. /// - UINT32 BTS:1; + UINT32 BTS : 1; /// /// [Bit 12] Core. Processor Event Based Sampling Unavailable (RO) See /// Table 2-2. /// - UINT32 PEBS:1; - UINT32 Reserved4:3; + UINT32 PEBS : 1; + UINT32 Reserved4 : 3; /// /// [Bit 16] Module. Enhanced Intel SpeedStep Technology Enable (R/W) See /// Table 2-2. /// - UINT32 EIST:1; - UINT32 Reserved5:1; + UINT32 EIST : 1; + UINT32 Reserved5 : 1; /// /// [Bit 18] Core. ENABLE MONITOR FSM (R/W) See Table 2-2. /// - UINT32 MONITOR:1; - UINT32 Reserved6:3; + UINT32 MONITOR : 1; + UINT32 Reserved6 : 3; /// /// [Bit 22] Core. Limit CPUID Maxval (R/W) See Table 2-2. /// - UINT32 LimitCpuidMaxval:1; + UINT32 LimitCpuidMaxval : 1; /// /// [Bit 23] Module. xTPR Message Disable (R/W) See Table 2-2. /// - UINT32 xTPR_Message_Disable:1; - UINT32 Reserved7:8; - UINT32 Reserved8:2; + UINT32 xTPR_Message_Disable : 1; + UINT32 Reserved7 : 8; + UINT32 Reserved8 : 2; /// /// [Bit 34] Core. XD Bit Disable (R/W) See Table 2-2. /// - UINT32 XD:1; - UINT32 Reserved9:3; + UINT32 XD : 1; + UINT32 Reserved9 : 3; /// /// [Bit 38] Module. Turbo Mode Disable (R/W) When set to 1 on processors /// that support Intel Turbo Boost Technology, the turbo mode feature is @@ -747,16 +736,15 @@ typedef union { /// in the processor. If power-on default value is 0, turbo mode is not /// available. /// - UINT32 TurboModeDisable:1; - UINT32 Reserved10:25; + UINT32 TurboModeDisable : 1; + UINT32 Reserved10 : 25; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SILVERMONT_IA32_MISC_ENABLE_REGISTER; - /** Package. @@ -775,7 +763,7 @@ typedef union { @endcode @note MSR_SILVERMONT_TEMPERATURE_TARGET is defined as MSR_TEMPERATURE_TARGET in SDM. **/ -#define MSR_SILVERMONT_TEMPERATURE_TARGET 0x000001A2 +#define MSR_SILVERMONT_TEMPERATURE_TARGET 0x000001A2 /** MSR information returned for MSR index #MSR_SILVERMONT_TEMPERATURE_TARGET @@ -785,34 +773,33 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:16; + UINT32 Reserved1 : 16; /// /// [Bits 23:16] Temperature Target (R) The default thermal throttling or /// PROCHOT# activation temperature in degree C, The effective temperature /// for thermal throttling or PROCHOT# activation is "Temperature Target" /// + "Target Offset". /// - UINT32 TemperatureTarget:8; + UINT32 TemperatureTarget : 8; /// /// [Bits 29:24] Target Offset (R/W) Specifies an offset in degrees C to /// adjust the throttling and PROCHOT# activation temperature from the /// default target specified in TEMPERATURE_TARGET (bits 23:16). /// - UINT32 TargetOffset:6; - UINT32 Reserved2:2; - UINT32 Reserved3:32; + UINT32 TargetOffset : 6; + UINT32 Reserved2 : 2; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SILVERMONT_TEMPERATURE_TARGET_REGISTER; - /** Miscellaneous Feature Control (R/W). @@ -831,7 +818,7 @@ typedef union { @endcode @note MSR_SILVERMONT_MISC_FEATURE_CONTROL is defined as MSR_MISC_FEATURE_CONTROL in SDM. **/ -#define MSR_SILVERMONT_MISC_FEATURE_CONTROL 0x000001A4 +#define MSR_SILVERMONT_MISC_FEATURE_CONTROL 0x000001A4 /** MSR information returned for MSR index #MSR_SILVERMONT_MISC_FEATURE_CONTROL @@ -846,28 +833,27 @@ typedef union { /// L2 hardware prefetcher, which fetches additional lines of code or data /// into the L2 cache. /// - UINT32 L2HardwarePrefetcherDisable:1; - UINT32 Reserved1:1; + UINT32 L2HardwarePrefetcherDisable : 1; + UINT32 Reserved1 : 1; /// /// [Bit 2] Core. DCU Hardware Prefetcher Disable (R/W) If 1, disables /// the L1 data cache prefetcher, which fetches the next cache line into /// L1 data cache. /// - UINT32 DCUHardwarePrefetcherDisable:1; - UINT32 Reserved2:29; - UINT32 Reserved3:32; + UINT32 DCUHardwarePrefetcherDisable : 1; + UINT32 Reserved2 : 29; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SILVERMONT_MISC_FEATURE_CONTROL_REGISTER; - /** Module. Offcore Response Event Select Register (R/W). @@ -884,8 +870,7 @@ typedef union { @endcode @note MSR_SILVERMONT_OFFCORE_RSP_0 is defined as MSR_OFFCORE_RSP_0 in SDM. **/ -#define MSR_SILVERMONT_OFFCORE_RSP_0 0x000001A6 - +#define MSR_SILVERMONT_OFFCORE_RSP_0 0x000001A6 /** Module. Offcore Response Event Select Register (R/W). @@ -903,8 +888,7 @@ typedef union { @endcode @note MSR_SILVERMONT_OFFCORE_RSP_1 is defined as MSR_OFFCORE_RSP_1 in SDM. **/ -#define MSR_SILVERMONT_OFFCORE_RSP_1 0x000001A7 - +#define MSR_SILVERMONT_OFFCORE_RSP_1 0x000001A7 /** Package. Maximum Ratio Limit of Turbo Mode (RW). @@ -924,7 +908,7 @@ typedef union { @endcode @note MSR_SILVERMONT_TURBO_RATIO_LIMIT is defined as MSR_TURBO_RATIO_LIMIT in SDM. **/ -#define MSR_SILVERMONT_TURBO_RATIO_LIMIT 0x000001AD +#define MSR_SILVERMONT_TURBO_RATIO_LIMIT 0x000001AD /** MSR information returned for MSR index #MSR_SILVERMONT_TURBO_RATIO_LIMIT @@ -938,50 +922,49 @@ typedef union { /// [Bits 7:0] Package. Maximum Ratio Limit for 1C Maximum turbo ratio /// limit of 1 core active. /// - UINT32 Maximum1C:8; + UINT32 Maximum1C : 8; /// /// [Bits 15:8] Package. Maximum Ratio Limit for 2C Maximum turbo ratio /// limit of 2 core active. /// - UINT32 Maximum2C:8; + UINT32 Maximum2C : 8; /// /// [Bits 23:16] Package. Maximum Ratio Limit for 3C Maximum turbo ratio /// limit of 3 core active. /// - UINT32 Maximum3C:8; + UINT32 Maximum3C : 8; /// /// [Bits 31:24] Package. Maximum Ratio Limit for 4C Maximum turbo ratio /// limit of 4 core active. /// - UINT32 Maximum4C:8; + UINT32 Maximum4C : 8; /// /// [Bits 39:32] Package. Maximum Ratio Limit for 5C Maximum turbo ratio /// limit of 5 core active. /// - UINT32 Maximum5C:8; + UINT32 Maximum5C : 8; /// /// [Bits 47:40] Package. Maximum Ratio Limit for 6C Maximum turbo ratio /// limit of 6 core active. /// - UINT32 Maximum6C:8; + UINT32 Maximum6C : 8; /// /// [Bits 55:48] Package. Maximum Ratio Limit for 7C Maximum turbo ratio /// limit of 7 core active. /// - UINT32 Maximum7C:8; + UINT32 Maximum7C : 8; /// /// [Bits 63:56] Package. Maximum Ratio Limit for 8C Maximum turbo ratio /// limit of 8 core active. /// - UINT32 Maximum8C:8; + UINT32 Maximum8C : 8; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SILVERMONT_TURBO_RATIO_LIMIT_REGISTER; - /** Core. Last Branch Record Filtering Select Register (R/W) See Section 17.9.2, "Filtering of Last Branch Records.". @@ -1001,7 +984,7 @@ typedef union { @endcode @note MSR_SILVERMONT_LBR_SELECT is defined as MSR_LBR_SELECT in SDM. **/ -#define MSR_SILVERMONT_LBR_SELECT 0x000001C8 +#define MSR_SILVERMONT_LBR_SELECT 0x000001C8 /** MSR information returned for MSR index #MSR_SILVERMONT_LBR_SELECT @@ -1014,53 +997,52 @@ typedef union { /// /// [Bit 0] CPL_EQ_0. /// - UINT32 CPL_EQ_0:1; + UINT32 CPL_EQ_0 : 1; /// /// [Bit 1] CPL_NEQ_0. /// - UINT32 CPL_NEQ_0:1; + UINT32 CPL_NEQ_0 : 1; /// /// [Bit 2] JCC. /// - UINT32 JCC:1; + UINT32 JCC : 1; /// /// [Bit 3] NEAR_REL_CALL. /// - UINT32 NEAR_REL_CALL:1; + UINT32 NEAR_REL_CALL : 1; /// /// [Bit 4] NEAR_IND_CALL. /// - UINT32 NEAR_IND_CALL:1; + UINT32 NEAR_IND_CALL : 1; /// /// [Bit 5] NEAR_RET. /// - UINT32 NEAR_RET:1; + UINT32 NEAR_RET : 1; /// /// [Bit 6] NEAR_IND_JMP. /// - UINT32 NEAR_IND_JMP:1; + UINT32 NEAR_IND_JMP : 1; /// /// [Bit 7] NEAR_REL_JMP. /// - UINT32 NEAR_REL_JMP:1; + UINT32 NEAR_REL_JMP : 1; /// /// [Bit 8] FAR_BRANCH. /// - UINT32 FAR_BRANCH:1; - UINT32 Reserved1:23; - UINT32 Reserved2:32; + UINT32 FAR_BRANCH : 1; + UINT32 Reserved1 : 23; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SILVERMONT_LBR_SELECT_REGISTER; - /** Core. Last Branch Record Stack TOS (R/W) Contains an index (bits 0-2) that points to the MSR containing the most recent branch record. See @@ -1079,8 +1061,7 @@ typedef union { @endcode @note MSR_SILVERMONT_LASTBRANCH_TOS is defined as MSR_LASTBRANCH_TOS in SDM. **/ -#define MSR_SILVERMONT_LASTBRANCH_TOS 0x000001C9 - +#define MSR_SILVERMONT_LASTBRANCH_TOS 0x000001C9 /** Core. Last Exception Record From Linear IP (R) Contains a pointer to the @@ -1099,8 +1080,7 @@ typedef union { @endcode @note MSR_SILVERMONT_LER_FROM_LIP is defined as MSR_LER_FROM_LIP in SDM. **/ -#define MSR_SILVERMONT_LER_FROM_LIP 0x000001DD - +#define MSR_SILVERMONT_LER_FROM_LIP 0x000001DD /** Core. Last Exception Record To Linear IP (R) This area contains a pointer @@ -1120,8 +1100,7 @@ typedef union { @endcode @note MSR_SILVERMONT_LER_TO_LIP is defined as MSR_LER_TO_LIP in SDM. **/ -#define MSR_SILVERMONT_LER_TO_LIP 0x000001DE - +#define MSR_SILVERMONT_LER_TO_LIP 0x000001DE /** Core. See Table 2-2. See Section 18.6.2.4, "Processor Event Based Sampling @@ -1142,7 +1121,7 @@ typedef union { @endcode @note MSR_SILVERMONT_PEBS_ENABLE is defined as MSR_PEBS_ENABLE in SDM. **/ -#define MSR_SILVERMONT_PEBS_ENABLE 0x000003F1 +#define MSR_SILVERMONT_PEBS_ENABLE 0x000003F1 /** MSR information returned for MSR index #MSR_SILVERMONT_PEBS_ENABLE @@ -1155,21 +1134,20 @@ typedef union { /// /// [Bit 0] Enable PEBS for precise event on IA32_PMC0. (R/W). /// - UINT32 PEBS:1; - UINT32 Reserved1:31; - UINT32 Reserved2:32; + UINT32 PEBS : 1; + UINT32 Reserved1 : 31; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SILVERMONT_PEBS_ENABLE_REGISTER; - /** Package. Note: C-state values are processor specific C-state code names, unrelated to MWAIT extension C-state parameters or ACPI CStates. Package C6 @@ -1189,8 +1167,7 @@ typedef union { @endcode @note MSR_SILVERMONT_PKG_C6_RESIDENCY is defined as MSR_PKG_C6_RESIDENCY in SDM. **/ -#define MSR_SILVERMONT_PKG_C6_RESIDENCY 0x000003FA - +#define MSR_SILVERMONT_PKG_C6_RESIDENCY 0x000003FA /** Core. Note: C-state values are processor specific C-state code names, @@ -1211,8 +1188,7 @@ typedef union { @endcode @note MSR_SILVERMONT_CORE_C6_RESIDENCY is defined as MSR_CORE_C6_RESIDENCY in SDM. **/ -#define MSR_SILVERMONT_CORE_C6_RESIDENCY 0x000003FD - +#define MSR_SILVERMONT_CORE_C6_RESIDENCY 0x000003FD /** Core. Capability Reporting Register of EPT and VPID (R/O) See Table 2-2. @@ -1229,8 +1205,7 @@ typedef union { @endcode @note MSR_SILVERMONT_IA32_VMX_EPT_VPID_ENUM is defined as IA32_VMX_EPT_VPID_ENUM in SDM. **/ -#define MSR_SILVERMONT_IA32_VMX_EPT_VPID_ENUM 0x0000048C - +#define MSR_SILVERMONT_IA32_VMX_EPT_VPID_ENUM 0x0000048C /** Core. Capability Reporting Register of VM-Function Controls (R/O) See Table @@ -1248,8 +1223,7 @@ typedef union { @endcode @note MSR_SILVERMONT_IA32_VMX_FMFUNC is defined as IA32_VMX_FMFUNC in SDM. **/ -#define MSR_SILVERMONT_IA32_VMX_FMFUNC 0x00000491 - +#define MSR_SILVERMONT_IA32_VMX_FMFUNC 0x00000491 /** Core. Note: C-state values are processor specific C-state code names, @@ -1270,8 +1244,7 @@ typedef union { @endcode @note MSR_SILVERMONT_CORE_C1_RESIDENCY is defined as MSR_CORE_C1_RESIDENCY in SDM. **/ -#define MSR_SILVERMONT_CORE_C1_RESIDENCY 0x00000660 - +#define MSR_SILVERMONT_CORE_C1_RESIDENCY 0x00000660 /** Package. Unit Multipliers used in RAPL Interfaces (R/O) See Section 14.9.1, @@ -1291,7 +1264,7 @@ typedef union { @endcode @note MSR_SILVERMONT_RAPL_POWER_UNIT is defined as MSR_RAPL_POWER_UNIT in SDM. **/ -#define MSR_SILVERMONT_RAPL_POWER_UNIT 0x00000606 +#define MSR_SILVERMONT_RAPL_POWER_UNIT 0x00000606 /** MSR information returned for MSR index #MSR_SILVERMONT_RAPL_POWER_UNIT @@ -1307,35 +1280,34 @@ typedef union { /// represented by bits 3:0. Default value is 0101b, indicating power unit /// is in 32 milliWatts increment. /// - UINT32 PowerUnits:4; - UINT32 Reserved1:4; + UINT32 PowerUnits : 4; + UINT32 Reserved1 : 4; /// /// [Bits 12:8] Energy Status Units. Energy related information (in /// microJoules) is based on the multiplier, 2^ESU; where ESU is an /// unsigned integer represented by bits 12:8. Default value is 00101b, /// indicating energy unit is in 32 microJoules increment. /// - UINT32 EnergyStatusUnits:5; - UINT32 Reserved2:3; + UINT32 EnergyStatusUnits : 5; + UINT32 Reserved2 : 3; /// /// [Bits 19:16] Time Unit. The value is 0000b, indicating time unit is in /// one second. /// - UINT32 TimeUnits:4; - UINT32 Reserved3:12; - UINT32 Reserved4:32; + UINT32 TimeUnits : 4; + UINT32 Reserved3 : 12; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SILVERMONT_RAPL_POWER_UNIT_REGISTER; - /** Package. PKG RAPL Power Limit Control (R/W). @@ -1354,7 +1326,7 @@ typedef union { @endcode @note MSR_SILVERMONT_PKG_POWER_LIMIT is defined as MSR_PKG_POWER_LIMIT in SDM. **/ -#define MSR_SILVERMONT_PKG_POWER_LIMIT 0x00000610 +#define MSR_SILVERMONT_PKG_POWER_LIMIT 0x00000610 /** MSR information returned for MSR index #MSR_SILVERMONT_PKG_POWER_LIMIT @@ -1368,36 +1340,35 @@ typedef union { /// [Bits 14:0] Package Power Limit #1 (R/W) See Section 14.9.3, "Package /// RAPL Domain." and MSR_RAPL_POWER_UNIT in Table 2-8. /// - UINT32 Limit:15; + UINT32 Limit : 15; /// /// [Bit 15] Enable Power Limit #1. (R/W) See Section 14.9.3, "Package /// RAPL Domain.". /// - UINT32 Enable:1; + UINT32 Enable : 1; /// /// [Bit 16] Package Clamping Limitation #1. (R/W) See Section 14.9.3, /// "Package RAPL Domain.". /// - UINT32 ClampingLimit:1; + UINT32 ClampingLimit : 1; /// /// [Bits 23:17] Time Window for Power Limit #1. (R/W) in unit of second. /// If 0 is specified in bits [23:17], defaults to 1 second window. /// - UINT32 Time:7; - UINT32 Reserved1:8; - UINT32 Reserved2:32; + UINT32 Time : 7; + UINT32 Reserved1 : 8; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SILVERMONT_PKG_POWER_LIMIT_REGISTER; - /** Package. PKG Energy Status (R/O) See Section 14.9.3, "Package RAPL Domain." and MSR_RAPL_POWER_UNIT in Table 2-8. @@ -1414,8 +1385,7 @@ typedef union { @endcode @note MSR_SILVERMONT_PKG_ENERGY_STATUS is defined as MSR_PKG_ENERGY_STATUS in SDM. **/ -#define MSR_SILVERMONT_PKG_ENERGY_STATUS 0x00000611 - +#define MSR_SILVERMONT_PKG_ENERGY_STATUS 0x00000611 /** Package. PP0 Energy Status (R/O) See Section 14.9.4, "PP0/PP1 RAPL Domains." @@ -1433,8 +1403,7 @@ typedef union { @endcode @note MSR_SILVERMONT_PP0_ENERGY_STATUS is defined as MSR_PP0_ENERGY_STATUS in SDM. **/ -#define MSR_SILVERMONT_PP0_ENERGY_STATUS 0x00000639 - +#define MSR_SILVERMONT_PP0_ENERGY_STATUS 0x00000639 /** Package. Core C6 demotion policy config MSR. Controls per-core C6 demotion @@ -1453,8 +1422,7 @@ typedef union { @endcode @note MSR_SILVERMONT_CC6_DEMOTION_POLICY_CONFIG is defined as MSR_CC6_DEMOTION_POLICY_CONFIG in SDM. **/ -#define MSR_SILVERMONT_CC6_DEMOTION_POLICY_CONFIG 0x00000668 - +#define MSR_SILVERMONT_CC6_DEMOTION_POLICY_CONFIG 0x00000668 /** Package. Module C6 demotion policy config MSR. Controls module (i.e. two @@ -1474,8 +1442,7 @@ typedef union { @endcode @note MSR_SILVERMONT_MC6_DEMOTION_POLICY_CONFIG is defined as MSR_MC6_DEMOTION_POLICY_CONFIG in SDM. **/ -#define MSR_SILVERMONT_MC6_DEMOTION_POLICY_CONFIG 0x00000669 - +#define MSR_SILVERMONT_MC6_DEMOTION_POLICY_CONFIG 0x00000669 /** Module. Module C6 Residency Counter (R/0) Note: C-state values are processor @@ -1495,8 +1462,7 @@ typedef union { @endcode @note MSR_SILVERMONT_MC6_RESIDENCY_COUNTER is defined as MSR_MC6_RESIDENCY_COUNTER in SDM. **/ -#define MSR_SILVERMONT_MC6_RESIDENCY_COUNTER 0x00000664 - +#define MSR_SILVERMONT_MC6_RESIDENCY_COUNTER 0x00000664 /** Package. PKG RAPL Parameter (R/0). @@ -1515,7 +1481,7 @@ typedef union { @endcode @note MSR_SILVERMONT_PKG_POWER_INFO is defined as MSR_PKG_POWER_INFO in SDM. **/ -#define MSR_SILVERMONT_PKG_POWER_INFO 0x0000066E +#define MSR_SILVERMONT_PKG_POWER_INFO 0x0000066E /** MSR information returned for MSR index #MSR_SILVERMONT_PKG_POWER_INFO @@ -1531,21 +1497,20 @@ typedef union { /// The unit of this field is specified by the "Power Units" field of /// MSR_RAPL_POWER_UNIT. /// - UINT32 ThermalSpecPower:15; - UINT32 Reserved1:17; - UINT32 Reserved2:32; + UINT32 ThermalSpecPower : 15; + UINT32 Reserved1 : 17; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SILVERMONT_PKG_POWER_INFO_REGISTER; - /** Package. PP0 RAPL Power Limit Control (R/W). @@ -1564,7 +1529,7 @@ typedef union { @endcode @note MSR_SILVERMONT_PP0_POWER_LIMIT is defined as MSR_PP0_POWER_LIMIT in SDM. **/ -#define MSR_SILVERMONT_PP0_POWER_LIMIT 0x00000638 +#define MSR_SILVERMONT_PP0_POWER_LIMIT 0x00000638 /** MSR information returned for MSR index #MSR_SILVERMONT_PP0_POWER_LIMIT @@ -1578,13 +1543,13 @@ typedef union { /// [Bits 14:0] PP0 Power Limit #1. (R/W) See Section 14.9.4, "PP0/PP1 /// RAPL Domains." and MSR_RAPL_POWER_UNIT in Table 35-8. /// - UINT32 Limit:15; + UINT32 Limit : 15; /// /// [Bit 15] Enable Power Limit #1. (R/W) See Section 14.9.4, "PP0/PP1 /// RAPL Domains.". /// - UINT32 Enable:1; - UINT32 Reserved1:1; + UINT32 Enable : 1; + UINT32 Reserved1 : 1; /// /// [Bits 23:17] Time Window for Power Limit #1. (R/W) Specifies the time /// duration over which the average power must remain below @@ -1595,18 +1560,18 @@ typedef union { /// second time duration. 0x8: 40 second time duration. 0x9: 45 second /// time duration. 0xA: 50 second time duration. 0xB-0x7F - reserved. /// - UINT32 Time:7; - UINT32 Reserved2:8; - UINT32 Reserved3:32; + UINT32 Time : 7; + UINT32 Reserved2 : 8; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SILVERMONT_PP0_POWER_LIMIT_REGISTER; #endif diff --git a/MdePkg/Include/Register/Intel/Msr/SkylakeMsr.h b/MdePkg/Include/Register/Intel/Msr/SkylakeMsr.h index 03cac77..7471476 100644 --- a/MdePkg/Include/Register/Intel/Msr/SkylakeMsr.h +++ b/MdePkg/Include/Register/Intel/Msr/SkylakeMsr.h @@ -59,7 +59,7 @@ @endcode @note MSR_SKYLAKE_TURBO_RATIO_LIMIT is defined as MSR_TURBO_RATIO_LIMIT in SDM. **/ -#define MSR_SKYLAKE_TURBO_RATIO_LIMIT 0x000001AD +#define MSR_SKYLAKE_TURBO_RATIO_LIMIT 0x000001AD /** MSR information returned for MSR index #MSR_SKYLAKE_TURBO_RATIO_LIMIT @@ -73,35 +73,34 @@ typedef union { /// [Bits 7:0] Package. Maximum Ratio Limit for 1C Maximum turbo ratio /// limit of 1 core active. /// - UINT32 Maximum1C:8; + UINT32 Maximum1C : 8; /// /// [Bits 15:8] Package. Maximum Ratio Limit for 2C Maximum turbo ratio /// limit of 2 core active. /// - UINT32 Maximum2C:8; + UINT32 Maximum2C : 8; /// /// [Bits 23:16] Package. Maximum Ratio Limit for 3C Maximum turbo ratio /// limit of 3 core active. /// - UINT32 Maximum3C:8; + UINT32 Maximum3C : 8; /// /// [Bits 31:24] Package. Maximum Ratio Limit for 4C Maximum turbo ratio /// limit of 4 core active. /// - UINT32 Maximum4C:8; - UINT32 Reserved:32; + UINT32 Maximum4C : 8; + UINT32 Reserved : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_TURBO_RATIO_LIMIT_REGISTER; - /** Thread. Last Branch Record Stack TOS (R/W) Contains an index (bits 0-4) that points to the MSR containing the most recent branch record. @@ -119,8 +118,7 @@ typedef union { @endcode @note MSR_SKYLAKE_LASTBRANCH_TOS is defined as MSR_LASTBRANCH_TOS in SDM. **/ -#define MSR_SKYLAKE_LASTBRANCH_TOS 0x000001C9 - +#define MSR_SKYLAKE_LASTBRANCH_TOS 0x000001C9 /** Core. Power Control Register See http://biosbits.org. @@ -139,7 +137,7 @@ typedef union { AsmWriteMsr64 (MSR_SKYLAKE_POWER_CTL, Msr.Uint64); @endcode **/ -#define MSR_SKYLAKE_POWER_CTL 0x000001FC +#define MSR_SKYLAKE_POWER_CTL 0x000001FC /** MSR information returned for MSR index #MSR_SKYLAKE_POWER_CTL @@ -149,14 +147,14 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:1; + UINT32 Reserved1 : 1; /// /// [Bit 1] Package. C1E Enable (R/W) When set to '1', will enable the CPU /// to switch to the Minimum Enhanced Intel SpeedStep Technology operating /// point when all execution cores enter MWAIT (C1). /// - UINT32 C1EEnable:1; - UINT32 Reserved2:17; + UINT32 C1EEnable : 1; + UINT32 Reserved2 : 17; /// /// [Bit 19] Disable Race to Halt Optimization (R/W) Setting this bit /// disables the Race to Halt optimization and avoids this optimization @@ -165,7 +163,7 @@ typedef union { /// optimization. Default value is 1 for processors that do not support /// Race to Halt optimization. /// - UINT32 Fix_Me_1:1; + UINT32 Fix_Me_1 : 1; /// /// [Bit 20] Disable Energy Efficiency Optimization (R/W) Setting this bit /// disables the P-States energy efficiency optimization. Default value is @@ -175,21 +173,20 @@ typedef union { /// mode (IA32_PM_ENABLE[HWP_ENABLE] == 1), has an effect between the OS /// desired or OS maximize to the OS minimize performance setting. /// - UINT32 DisableEnergyEfficiencyOptimization:1; - UINT32 Reserved3:11; - UINT32 Reserved4:32; + UINT32 DisableEnergyEfficiencyOptimization : 1; + UINT32 Reserved3 : 11; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_POWER_CTL_REGISTER; - /** Package. Lower 64 Bit CR_SGXOWNEREPOCH (W) Writes do not update CR_SGXOWNEREPOCH if CPUID.(EAX=12H, ECX=0):EAX.SGX1 is 1 on any thread in @@ -209,12 +206,13 @@ typedef union { @endcode @note MSR_SKYLAKE_SGXOWNEREPOCH0 is defined as MSR_SGXOWNER0 in SDM. **/ -#define MSR_SKYLAKE_SGXOWNEREPOCH0 0x00000300 +#define MSR_SKYLAKE_SGXOWNEREPOCH0 0x00000300 // // Define MSR_SKYLAKE_SGXOWNER0 for compatibility due to name change in the SDM. // -#define MSR_SKYLAKE_SGXOWNER0 MSR_SKYLAKE_SGXOWNEREPOCH0 +#define MSR_SKYLAKE_SGXOWNER0 MSR_SKYLAKE_SGXOWNEREPOCH0 + /** Package. Upper 64 Bit CR_SGXOWNEREPOCH (W) Writes do not update CR_SGXOWNEREPOCH if CPUID.(EAX=12H, ECX=0):EAX.SGX1 is 1 on any thread in @@ -234,13 +232,12 @@ typedef union { @endcode @note MSR_SKYLAKE_SGXOWNEREPOCH1 is defined as MSR_SGXOWNER1 in SDM. **/ -#define MSR_SKYLAKE_SGXOWNEREPOCH1 0x00000301 +#define MSR_SKYLAKE_SGXOWNEREPOCH1 0x00000301 // // Define MSR_SKYLAKE_SGXOWNER1 for compatibility due to name change in the SDM. // -#define MSR_SKYLAKE_SGXOWNER1 MSR_SKYLAKE_SGXOWNEREPOCH1 - +#define MSR_SKYLAKE_SGXOWNER1 MSR_SKYLAKE_SGXOWNEREPOCH1 /** See Table 2-2. See Section 18.2.4, "Architectural Performance Monitoring @@ -261,7 +258,7 @@ typedef union { @endcode @note MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS is defined as IA32_PERF_GLOBAL_STATUS in SDM. **/ -#define MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS 0x0000038E +#define MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS 0x0000038E /** MSR information returned for MSR index #MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS @@ -274,86 +271,85 @@ typedef union { /// /// [Bit 0] Thread. Ovf_PMC0. /// - UINT32 Ovf_PMC0:1; + UINT32 Ovf_PMC0 : 1; /// /// [Bit 1] Thread. Ovf_PMC1. /// - UINT32 Ovf_PMC1:1; + UINT32 Ovf_PMC1 : 1; /// /// [Bit 2] Thread. Ovf_PMC2. /// - UINT32 Ovf_PMC2:1; + UINT32 Ovf_PMC2 : 1; /// /// [Bit 3] Thread. Ovf_PMC3. /// - UINT32 Ovf_PMC3:1; + UINT32 Ovf_PMC3 : 1; /// /// [Bit 4] Thread. Ovf_PMC4 (if CPUID.0AH:EAX[15:8] > 4). /// - UINT32 Ovf_PMC4:1; + UINT32 Ovf_PMC4 : 1; /// /// [Bit 5] Thread. Ovf_PMC5 (if CPUID.0AH:EAX[15:8] > 5). /// - UINT32 Ovf_PMC5:1; + UINT32 Ovf_PMC5 : 1; /// /// [Bit 6] Thread. Ovf_PMC6 (if CPUID.0AH:EAX[15:8] > 6). /// - UINT32 Ovf_PMC6:1; + UINT32 Ovf_PMC6 : 1; /// /// [Bit 7] Thread. Ovf_PMC7 (if CPUID.0AH:EAX[15:8] > 7). /// - UINT32 Ovf_PMC7:1; - UINT32 Reserved1:24; + UINT32 Ovf_PMC7 : 1; + UINT32 Reserved1 : 24; /// /// [Bit 32] Thread. Ovf_FixedCtr0. /// - UINT32 Ovf_FixedCtr0:1; + UINT32 Ovf_FixedCtr0 : 1; /// /// [Bit 33] Thread. Ovf_FixedCtr1. /// - UINT32 Ovf_FixedCtr1:1; + UINT32 Ovf_FixedCtr1 : 1; /// /// [Bit 34] Thread. Ovf_FixedCtr2. /// - UINT32 Ovf_FixedCtr2:1; - UINT32 Reserved2:20; + UINT32 Ovf_FixedCtr2 : 1; + UINT32 Reserved2 : 20; /// /// [Bit 55] Thread. Trace_ToPA_PMI. /// - UINT32 Trace_ToPA_PMI:1; - UINT32 Reserved3:2; + UINT32 Trace_ToPA_PMI : 1; + UINT32 Reserved3 : 2; /// /// [Bit 58] Thread. LBR_Frz. /// - UINT32 LBR_Frz:1; + UINT32 LBR_Frz : 1; /// /// [Bit 59] Thread. CTR_Frz. /// - UINT32 CTR_Frz:1; + UINT32 CTR_Frz : 1; /// /// [Bit 60] Thread. ASCI. /// - UINT32 ASCI:1; + UINT32 ASCI : 1; /// /// [Bit 61] Thread. Ovf_Uncore. /// - UINT32 Ovf_Uncore:1; + UINT32 Ovf_Uncore : 1; /// /// [Bit 62] Thread. Ovf_BufDSSAVE. /// - UINT32 Ovf_BufDSSAVE:1; + UINT32 Ovf_BufDSSAVE : 1; /// /// [Bit 63] Thread. CondChgd. /// - UINT32 CondChgd:1; + UINT32 CondChgd : 1; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_REGISTER; - /** See Table 2-2. See Section 18.2.4, "Architectural Performance Monitoring Version 4.". @@ -373,7 +369,7 @@ typedef union { @endcode @note MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_RESET is defined as IA32_PERF_GLOBAL_STATUS_RESET in SDM. **/ -#define MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_RESET 0x00000390 +#define MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_RESET 0x00000390 /** MSR information returned for MSR index @@ -387,86 +383,85 @@ typedef union { /// /// [Bit 0] Thread. Set 1 to clear Ovf_PMC0. /// - UINT32 Ovf_PMC0:1; + UINT32 Ovf_PMC0 : 1; /// /// [Bit 1] Thread. Set 1 to clear Ovf_PMC1. /// - UINT32 Ovf_PMC1:1; + UINT32 Ovf_PMC1 : 1; /// /// [Bit 2] Thread. Set 1 to clear Ovf_PMC2. /// - UINT32 Ovf_PMC2:1; + UINT32 Ovf_PMC2 : 1; /// /// [Bit 3] Thread. Set 1 to clear Ovf_PMC3. /// - UINT32 Ovf_PMC3:1; + UINT32 Ovf_PMC3 : 1; /// /// [Bit 4] Thread. Set 1 to clear Ovf_PMC4 (if CPUID.0AH:EAX[15:8] > 4). /// - UINT32 Ovf_PMC4:1; + UINT32 Ovf_PMC4 : 1; /// /// [Bit 5] Thread. Set 1 to clear Ovf_PMC5 (if CPUID.0AH:EAX[15:8] > 5). /// - UINT32 Ovf_PMC5:1; + UINT32 Ovf_PMC5 : 1; /// /// [Bit 6] Thread. Set 1 to clear Ovf_PMC6 (if CPUID.0AH:EAX[15:8] > 6). /// - UINT32 Ovf_PMC6:1; + UINT32 Ovf_PMC6 : 1; /// /// [Bit 7] Thread. Set 1 to clear Ovf_PMC7 (if CPUID.0AH:EAX[15:8] > 7). /// - UINT32 Ovf_PMC7:1; - UINT32 Reserved1:24; + UINT32 Ovf_PMC7 : 1; + UINT32 Reserved1 : 24; /// /// [Bit 32] Thread. Set 1 to clear Ovf_FixedCtr0. /// - UINT32 Ovf_FixedCtr0:1; + UINT32 Ovf_FixedCtr0 : 1; /// /// [Bit 33] Thread. Set 1 to clear Ovf_FixedCtr1. /// - UINT32 Ovf_FixedCtr1:1; + UINT32 Ovf_FixedCtr1 : 1; /// /// [Bit 34] Thread. Set 1 to clear Ovf_FixedCtr2. /// - UINT32 Ovf_FixedCtr2:1; - UINT32 Reserved2:20; + UINT32 Ovf_FixedCtr2 : 1; + UINT32 Reserved2 : 20; /// /// [Bit 55] Thread. Set 1 to clear Trace_ToPA_PMI. /// - UINT32 Trace_ToPA_PMI:1; - UINT32 Reserved3:2; + UINT32 Trace_ToPA_PMI : 1; + UINT32 Reserved3 : 2; /// /// [Bit 58] Thread. Set 1 to clear LBR_Frz. /// - UINT32 LBR_Frz:1; + UINT32 LBR_Frz : 1; /// /// [Bit 59] Thread. Set 1 to clear CTR_Frz. /// - UINT32 CTR_Frz:1; + UINT32 CTR_Frz : 1; /// /// [Bit 60] Thread. Set 1 to clear ASCI. /// - UINT32 ASCI:1; + UINT32 ASCI : 1; /// /// [Bit 61] Thread. Set 1 to clear Ovf_Uncore. /// - UINT32 Ovf_Uncore:1; + UINT32 Ovf_Uncore : 1; /// /// [Bit 62] Thread. Set 1 to clear Ovf_BufDSSAVE. /// - UINT32 Ovf_BufDSSAVE:1; + UINT32 Ovf_BufDSSAVE : 1; /// /// [Bit 63] Thread. Set 1 to clear CondChgd. /// - UINT32 CondChgd:1; + UINT32 CondChgd : 1; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_RESET_REGISTER; - /** See Table 2-2. See Section 18.2.4, "Architectural Performance Monitoring Version 4.". @@ -500,83 +495,82 @@ typedef union { /// /// [Bit 0] Thread. Set 1 to cause Ovf_PMC0 = 1. /// - UINT32 Ovf_PMC0:1; + UINT32 Ovf_PMC0 : 1; /// /// [Bit 1] Thread. Set 1 to cause Ovf_PMC1 = 1. /// - UINT32 Ovf_PMC1:1; + UINT32 Ovf_PMC1 : 1; /// /// [Bit 2] Thread. Set 1 to cause Ovf_PMC2 = 1. /// - UINT32 Ovf_PMC2:1; + UINT32 Ovf_PMC2 : 1; /// /// [Bit 3] Thread. Set 1 to cause Ovf_PMC3 = 1. /// - UINT32 Ovf_PMC3:1; + UINT32 Ovf_PMC3 : 1; /// /// [Bit 4] Thread. Set 1 to cause Ovf_PMC4=1 (if CPUID.0AH:EAX[15:8] > 4). /// - UINT32 Ovf_PMC4:1; + UINT32 Ovf_PMC4 : 1; /// /// [Bit 5] Thread. Set 1 to cause Ovf_PMC5=1 (if CPUID.0AH:EAX[15:8] > 5). /// - UINT32 Ovf_PMC5:1; + UINT32 Ovf_PMC5 : 1; /// /// [Bit 6] Thread. Set 1 to cause Ovf_PMC6=1 (if CPUID.0AH:EAX[15:8] > 6). /// - UINT32 Ovf_PMC6:1; + UINT32 Ovf_PMC6 : 1; /// /// [Bit 7] Thread. Set 1 to cause Ovf_PMC7=1 (if CPUID.0AH:EAX[15:8] > 7). /// - UINT32 Ovf_PMC7:1; - UINT32 Reserved1:24; + UINT32 Ovf_PMC7 : 1; + UINT32 Reserved1 : 24; /// /// [Bit 32] Thread. Set 1 to cause Ovf_FixedCtr0 = 1. /// - UINT32 Ovf_FixedCtr0:1; + UINT32 Ovf_FixedCtr0 : 1; /// /// [Bit 33] Thread. Set 1 to cause Ovf_FixedCtr1 = 1. /// - UINT32 Ovf_FixedCtr1:1; + UINT32 Ovf_FixedCtr1 : 1; /// /// [Bit 34] Thread. Set 1 to cause Ovf_FixedCtr2 = 1. /// - UINT32 Ovf_FixedCtr2:1; - UINT32 Reserved2:20; + UINT32 Ovf_FixedCtr2 : 1; + UINT32 Reserved2 : 20; /// /// [Bit 55] Thread. Set 1 to cause Trace_ToPA_PMI = 1. /// - UINT32 Trace_ToPA_PMI:1; - UINT32 Reserved3:2; + UINT32 Trace_ToPA_PMI : 1; + UINT32 Reserved3 : 2; /// /// [Bit 58] Thread. Set 1 to cause LBR_Frz = 1. /// - UINT32 LBR_Frz:1; + UINT32 LBR_Frz : 1; /// /// [Bit 59] Thread. Set 1 to cause CTR_Frz = 1. /// - UINT32 CTR_Frz:1; + UINT32 CTR_Frz : 1; /// /// [Bit 60] Thread. Set 1 to cause ASCI = 1. /// - UINT32 ASCI:1; + UINT32 ASCI : 1; /// /// [Bit 61] Thread. Set 1 to cause Ovf_Uncore. /// - UINT32 Ovf_Uncore:1; + UINT32 Ovf_Uncore : 1; /// /// [Bit 62] Thread. Set 1 to cause Ovf_BufDSSAVE. /// - UINT32 Ovf_BufDSSAVE:1; - UINT32 Reserved4:1; + UINT32 Ovf_BufDSSAVE : 1; + UINT32 Reserved4 : 1; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_IA32_PERF_GLOBAL_STATUS_SET_REGISTER; - /** Thread. FrontEnd Precise Event Condition Select (R/W). @@ -595,7 +589,7 @@ typedef union { @endcode @note MSR_SKYLAKE_PEBS_FRONTEND is defined as MSR_PEBS_FRONTEND in SDM. **/ -#define MSR_SKYLAKE_PEBS_FRONTEND 0x000003F7 +#define MSR_SKYLAKE_PEBS_FRONTEND 0x000003F7 /** MSR information returned for MSR index #MSR_SKYLAKE_PEBS_FRONTEND @@ -608,35 +602,34 @@ typedef union { /// /// [Bits 2:0] Event Code Select. /// - UINT32 EventCodeSelect:3; - UINT32 Reserved1:1; + UINT32 EventCodeSelect : 3; + UINT32 Reserved1 : 1; /// /// [Bit 4] Event Code Select High. /// - UINT32 EventCodeSelectHigh:1; - UINT32 Reserved2:3; + UINT32 EventCodeSelectHigh : 1; + UINT32 Reserved2 : 3; /// /// [Bits 19:8] IDQ_Bubble_Length Specifier. /// - UINT32 IDQ_Bubble_Length:12; + UINT32 IDQ_Bubble_Length : 12; /// /// [Bits 22:20] IDQ_Bubble_Width Specifier. /// - UINT32 IDQ_Bubble_Width:3; - UINT32 Reserved3:9; - UINT32 Reserved4:32; + UINT32 IDQ_Bubble_Width : 3; + UINT32 Reserved3 : 9; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_PEBS_FRONTEND_REGISTER; - /** Package. PP0 Energy Status (R/O) See Section 14.9.4, "PP0/PP1 RAPL Domains.". @@ -653,8 +646,7 @@ typedef union { @endcode @note MSR_SKYLAKE_PP0_ENERGY_STATUS is defined as MSR_PP0_ENERGY_STATUS in SDM. **/ -#define MSR_SKYLAKE_PP0_ENERGY_STATUS 0x00000639 - +#define MSR_SKYLAKE_PP0_ENERGY_STATUS 0x00000639 /** Platform*. Platform Energy Counter. (R/O). This MSR is valid only if both @@ -675,7 +667,7 @@ typedef union { @endcode @note MSR_SKYLAKE_PLATFORM_ENERGY_COUNTER is defined as MSR_PLATFORM_ENERGY_COUNTER in SDM. **/ -#define MSR_SKYLAKE_PLATFORM_ENERGY_COUNTER 0x0000064D +#define MSR_SKYLAKE_PLATFORM_ENERGY_COUNTER 0x0000064D /** MSR information returned for MSR index #MSR_SKYLAKE_PLATFORM_ENERGY_COUNTER @@ -693,20 +685,19 @@ typedef union { /// delivery means. The energy units are specified in the /// MSR_RAPL_POWER_UNIT.Enery_Status_Unit. /// - UINT32 TotalEnergy:32; - UINT32 Reserved:32; + UINT32 TotalEnergy : 32; + UINT32 Reserved : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_PLATFORM_ENERGY_COUNTER_REGISTER; - /** Thread. Productive Performance Count. (R/O). Hardware's view of workload scalability. See Section 14.4.5.1. @@ -723,8 +714,7 @@ typedef union { @endcode @note MSR_SKYLAKE_PPERF is defined as MSR_PPERF in SDM. **/ -#define MSR_SKYLAKE_PPERF 0x0000064E - +#define MSR_SKYLAKE_PPERF 0x0000064E /** Package. Indicator of Frequency Clipping in Processor Cores (R/W) (frequency @@ -745,7 +735,7 @@ typedef union { @endcode @note MSR_SKYLAKE_CORE_PERF_LIMIT_REASONS is defined as MSR_CORE_PERF_LIMIT_REASONS in SDM. **/ -#define MSR_SKYLAKE_CORE_PERF_LIMIT_REASONS 0x0000064F +#define MSR_SKYLAKE_CORE_PERF_LIMIT_REASONS 0x0000064F /** MSR information returned for MSR index #MSR_SKYLAKE_CORE_PERF_LIMIT_REASONS @@ -759,154 +749,153 @@ typedef union { /// [Bit 0] PROCHOT Status (R0) When set, frequency is reduced below the /// operating system request due to assertion of external PROCHOT. /// - UINT32 PROCHOT_Status:1; + UINT32 PROCHOT_Status : 1; /// /// [Bit 1] Thermal Status (R0) When set, frequency is reduced below the /// operating system request due to a thermal event. /// - UINT32 ThermalStatus:1; - UINT32 Reserved1:2; + UINT32 ThermalStatus : 1; + UINT32 Reserved1 : 2; /// /// [Bit 4] Residency State Regulation Status (R0) When set, frequency is /// reduced below the operating system request due to residency state /// regulation limit. /// - UINT32 ResidencyStateRegulationStatus:1; + UINT32 ResidencyStateRegulationStatus : 1; /// /// [Bit 5] Running Average Thermal Limit Status (R0) When set, frequency /// is reduced below the operating system request due to Running Average /// Thermal Limit (RATL). /// - UINT32 RunningAverageThermalLimitStatus:1; + UINT32 RunningAverageThermalLimitStatus : 1; /// /// [Bit 6] VR Therm Alert Status (R0) When set, frequency is reduced /// below the operating system request due to a thermal alert from a /// processor Voltage Regulator (VR). /// - UINT32 VRThermAlertStatus:1; + UINT32 VRThermAlertStatus : 1; /// /// [Bit 7] VR Therm Design Current Status (R0) When set, frequency is /// reduced below the operating system request due to VR thermal design /// current limit. /// - UINT32 VRThermDesignCurrentStatus:1; + UINT32 VRThermDesignCurrentStatus : 1; /// /// [Bit 8] Other Status (R0) When set, frequency is reduced below the /// operating system request due to electrical or other constraints. /// - UINT32 OtherStatus:1; - UINT32 Reserved2:1; + UINT32 OtherStatus : 1; + UINT32 Reserved2 : 1; /// /// [Bit 10] Package/Platform-Level Power Limiting PL1 Status (R0) When /// set, frequency is reduced below the operating system request due to /// package/platform-level power limiting PL1. /// - UINT32 PL1Status:1; + UINT32 PL1Status : 1; /// /// [Bit 11] Package/Platform-Level PL2 Power Limiting Status (R0) When /// set, frequency is reduced below the operating system request due to /// package/platform-level power limiting PL2/PL3. /// - UINT32 PL2Status:1; + UINT32 PL2Status : 1; /// /// [Bit 12] Max Turbo Limit Status (R0) When set, frequency is reduced /// below the operating system request due to multi-core turbo limits. /// - UINT32 MaxTurboLimitStatus:1; + UINT32 MaxTurboLimitStatus : 1; /// /// [Bit 13] Turbo Transition Attenuation Status (R0) When set, frequency /// is reduced below the operating system request due to Turbo transition /// attenuation. This prevents performance degradation due to frequent /// operating ratio changes. /// - UINT32 TurboTransitionAttenuationStatus:1; - UINT32 Reserved3:2; + UINT32 TurboTransitionAttenuationStatus : 1; + UINT32 Reserved3 : 2; /// /// [Bit 16] PROCHOT Log When set, indicates that the PROCHOT Status bit /// has asserted since the log bit was last cleared. This log bit will /// remain set until cleared by software writing 0. /// - UINT32 PROCHOT_Log:1; + UINT32 PROCHOT_Log : 1; /// /// [Bit 17] Thermal Log When set, indicates that the Thermal Status bit /// has asserted since the log bit was last cleared. This log bit will /// remain set until cleared by software writing 0. /// - UINT32 ThermalLog:1; - UINT32 Reserved4:2; + UINT32 ThermalLog : 1; + UINT32 Reserved4 : 2; /// /// [Bit 20] Residency State Regulation Log When set, indicates that the /// Residency State Regulation Status bit has asserted since the log bit /// was last cleared. This log bit will remain set until cleared by /// software writing 0. /// - UINT32 ResidencyStateRegulationLog:1; + UINT32 ResidencyStateRegulationLog : 1; /// /// [Bit 21] Running Average Thermal Limit Log When set, indicates that /// the RATL Status bit has asserted since the log bit was last cleared. /// This log bit will remain set until cleared by software writing 0. /// - UINT32 RunningAverageThermalLimitLog:1; + UINT32 RunningAverageThermalLimitLog : 1; /// /// [Bit 22] VR Therm Alert Log When set, indicates that the VR Therm /// Alert Status bit has asserted since the log bit was last cleared. This /// log bit will remain set until cleared by software writing 0. /// - UINT32 VRThermAlertLog:1; + UINT32 VRThermAlertLog : 1; /// /// [Bit 23] VR Thermal Design Current Log When set, indicates that the /// VR TDC Status bit has asserted since the log bit was last cleared. /// This log bit will remain set until cleared by software writing 0. /// - UINT32 VRThermalDesignCurrentLog:1; + UINT32 VRThermalDesignCurrentLog : 1; /// /// [Bit 24] Other Log When set, indicates that the Other Status bit has /// asserted since the log bit was last cleared. This log bit will remain /// set until cleared by software writing 0. /// - UINT32 OtherLog:1; - UINT32 Reserved5:1; + UINT32 OtherLog : 1; + UINT32 Reserved5 : 1; /// /// [Bit 26] Package/Platform-Level PL1 Power Limiting Log When set, /// indicates that the Package or Platform Level PL1 Power Limiting Status /// bit has asserted since the log bit was last cleared. This log bit will /// remain set until cleared by software writing 0. /// - UINT32 PL1Log:1; + UINT32 PL1Log : 1; /// /// [Bit 27] Package/Platform-Level PL2 Power Limiting Log When set, /// indicates that the Package or Platform Level PL2/PL3 Power Limiting /// Status bit has asserted since the log bit was last cleared. This log /// bit will remain set until cleared by software writing 0. /// - UINT32 PL2Log:1; + UINT32 PL2Log : 1; /// /// [Bit 28] Max Turbo Limit Log When set, indicates that the Max Turbo /// Limit Status bit has asserted since the log bit was last cleared. This /// log bit will remain set until cleared by software writing 0. /// - UINT32 MaxTurboLimitLog:1; + UINT32 MaxTurboLimitLog : 1; /// /// [Bit 29] Turbo Transition Attenuation Log When set, indicates that the /// Turbo Transition Attenuation Status bit has asserted since the log bit /// was last cleared. This log bit will remain set until cleared by /// software writing 0. /// - UINT32 TurboTransitionAttenuationLog:1; - UINT32 Reserved6:2; - UINT32 Reserved7:32; + UINT32 TurboTransitionAttenuationLog : 1; + UINT32 Reserved6 : 2; + UINT32 Reserved7 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_CORE_PERF_LIMIT_REASONS_REGISTER; - /** Package. HDC Configuration (R/W).. @@ -925,7 +914,7 @@ typedef union { @endcode @note MSR_SKYLAKE_PKG_HDC_CONFIG is defined as MSR_PKG_HDC_CONFIG in SDM. **/ -#define MSR_SKYLAKE_PKG_HDC_CONFIG 0x00000652 +#define MSR_SKYLAKE_PKG_HDC_CONFIG 0x00000652 /** MSR information returned for MSR index #MSR_SKYLAKE_PKG_HDC_CONFIG @@ -939,21 +928,20 @@ typedef union { /// [Bits 2:0] PKG_Cx_Monitor. Configures Package Cx state threshold for /// MSR_PKG_HDC_DEEP_RESIDENCY. /// - UINT32 PKG_Cx_Monitor:3; - UINT32 Reserved1:29; - UINT32 Reserved2:32; + UINT32 PKG_Cx_Monitor : 3; + UINT32 Reserved1 : 29; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_PKG_HDC_CONFIG_REGISTER; - /** Core. Core HDC Idle Residency. (R/O). Core_Cx_Duty_Cycle_Cnt. @@ -969,8 +957,7 @@ typedef union { @endcode @note MSR_SKYLAKE_CORE_HDC_RESIDENCY is defined as MSR_CORE_HDC_RESIDENCY in SDM. **/ -#define MSR_SKYLAKE_CORE_HDC_RESIDENCY 0x00000653 - +#define MSR_SKYLAKE_CORE_HDC_RESIDENCY 0x00000653 /** Package. Accumulate the cycles the package was in C2 state and at least one @@ -988,8 +975,7 @@ typedef union { @endcode @note MSR_SKYLAKE_PKG_HDC_SHALLOW_RESIDENCY is defined as MSR_PKG_HDC_SHALLOW_RESIDENCY in SDM. **/ -#define MSR_SKYLAKE_PKG_HDC_SHALLOW_RESIDENCY 0x00000655 - +#define MSR_SKYLAKE_PKG_HDC_SHALLOW_RESIDENCY 0x00000655 /** Package. Package Cx HDC Idle Residency. (R/O). Pkg_Cx_Duty_Cycle_Cnt. @@ -1006,8 +992,7 @@ typedef union { @endcode @note MSR_SKYLAKE_PKG_HDC_DEEP_RESIDENCY is defined as MSR_PKG_HDC_DEEP_RESIDENCY in SDM. **/ -#define MSR_SKYLAKE_PKG_HDC_DEEP_RESIDENCY 0x00000656 - +#define MSR_SKYLAKE_PKG_HDC_DEEP_RESIDENCY 0x00000656 /** Package. Core-count Weighted C0 Residency. (R/O). Increment at the same rate @@ -1027,8 +1012,7 @@ typedef union { @endcode @note MSR_SKYLAKE_WEIGHTED_CORE_C0 is defined as MSR_WEIGHTED_CORE_C0 in SDM. **/ -#define MSR_SKYLAKE_WEIGHTED_CORE_C0 0x00000658 - +#define MSR_SKYLAKE_WEIGHTED_CORE_C0 0x00000658 /** Package. Any Core C0 Residency. (R/O). Increment at the same rate as the @@ -1047,8 +1031,7 @@ typedef union { @endcode @note MSR_SKYLAKE_ANY_CORE_C0 is defined as MSR_ANY_CORE_C0 in SDM. **/ -#define MSR_SKYLAKE_ANY_CORE_C0 0x00000659 - +#define MSR_SKYLAKE_ANY_CORE_C0 0x00000659 /** Package. Any Graphics Engine C0 Residency. (R/O). Increment at the same rate @@ -1067,8 +1050,7 @@ typedef union { @endcode @note MSR_SKYLAKE_ANY_GFXE_C0 is defined as MSR_ANY_GFXE_C0 in SDM. **/ -#define MSR_SKYLAKE_ANY_GFXE_C0 0x0000065A - +#define MSR_SKYLAKE_ANY_GFXE_C0 0x0000065A /** Package. Core and Graphics Engine Overlapped C0 Residency. (R/O). Increment @@ -1088,8 +1070,7 @@ typedef union { @endcode @note MSR_SKYLAKE_CORE_GFXE_OVERLAP_C0 is defined as MSR_CORE_GFXE_OVERLAP_C0 in SDM. **/ -#define MSR_SKYLAKE_CORE_GFXE_OVERLAP_C0 0x0000065B - +#define MSR_SKYLAKE_CORE_GFXE_OVERLAP_C0 0x0000065B /** Platform*. Platform Power Limit Control (R/W-L) Allows platform BIOS to @@ -1115,7 +1096,7 @@ typedef union { @endcode @note MSR_SKYLAKE_PLATFORM_POWER_LIMIT is defined as MSR_PLATFORM_POWER_LIMIT in SDM. **/ -#define MSR_SKYLAKE_PLATFORM_POWER_LIMIT 0x0000065C +#define MSR_SKYLAKE_PLATFORM_POWER_LIMIT 0x0000065C /** MSR information returned for MSR index #MSR_SKYLAKE_PLATFORM_POWER_LIMIT @@ -1132,21 +1113,21 @@ typedef union { /// Power (TDP) and varies with product skus. The unit is specified in /// MSR_RAPLPOWER_UNIT. /// - UINT32 PlatformPowerLimit1:15; + UINT32 PlatformPowerLimit1 : 15; /// /// [Bit 15] Enable Platform Power Limit #1. When set, enables the /// processor to apply control policy such that the platform power does /// not exceed Platform Power limit #1 over the time window specified by /// Power Limit #1 Time Window. /// - UINT32 EnablePlatformPowerLimit1:1; + UINT32 EnablePlatformPowerLimit1 : 1; /// /// [Bit 16] Platform Clamping Limitation #1. When set, allows the /// processor to go below the OS requested P states in order to maintain /// the power below specified Platform Power Limit #1 value. This bit is /// writeable only when CPUID (EAX=6):EAX[4] is set. /// - UINT32 PlatformClampingLimitation1:1; + UINT32 PlatformClampingLimitation1 : 1; /// /// [Bits 23:17] Time Window for Platform Power Limit #1. Specifies the /// duration of the time window over which Platform Power Limit 1 value @@ -1157,41 +1138,40 @@ typedef union { /// defined in MSR_PKG_POWER_INFO[PKG_MAX_WIN]. The default value is 0DH, /// The unit is specified in MSR_RAPLPOWER_UNIT[Time Unit]. /// - UINT32 Time:7; - UINT32 Reserved1:8; + UINT32 Time : 7; + UINT32 Reserved1 : 8; /// /// [Bits 46:32] Platform Power Limit #2. Average Power limit value which /// the platform must not exceed over the Short Duration time window /// chosen by the processor. The recommended default value is 1.25 times /// the Long Duration Power Limit (i.e. Platform Power Limit # 1). /// - UINT32 PlatformPowerLimit2:15; + UINT32 PlatformPowerLimit2 : 15; /// /// [Bit 47] Enable Platform Power Limit #2. When set, enables the /// processor to apply control policy such that the platform power does /// not exceed Platform Power limit #2 over the Short Duration time window. /// - UINT32 EnablePlatformPowerLimit2:1; + UINT32 EnablePlatformPowerLimit2 : 1; /// /// [Bit 48] Platform Clamping Limitation #2. When set, allows the /// processor to go below the OS requested P states in order to maintain /// the power below specified Platform Power Limit #2 value. /// - UINT32 PlatformClampingLimitation2:1; - UINT32 Reserved2:14; + UINT32 PlatformClampingLimitation2 : 1; + UINT32 Reserved2 : 14; /// /// [Bit 63] Lock. Setting this bit will lock all other bits of this MSR /// until system RESET. /// - UINT32 Lock:1; + UINT32 Lock : 1; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_PLATFORM_POWER_LIMIT_REGISTER; - /** Thread. Last Branch Record n From IP (R/W) One of 32 triplets of last branch record registers on the last branch record stack. This part of the @@ -1227,25 +1207,24 @@ typedef union { MSR_SKYLAKE_LASTBRANCH_31_FROM_IP is defined as MSR_LASTBRANCH_31_FROM_IP in SDM. @{ **/ -#define MSR_SKYLAKE_LASTBRANCH_16_FROM_IP 0x00000690 -#define MSR_SKYLAKE_LASTBRANCH_17_FROM_IP 0x00000691 -#define MSR_SKYLAKE_LASTBRANCH_18_FROM_IP 0x00000692 -#define MSR_SKYLAKE_LASTBRANCH_19_FROM_IP 0x00000693 -#define MSR_SKYLAKE_LASTBRANCH_20_FROM_IP 0x00000694 -#define MSR_SKYLAKE_LASTBRANCH_21_FROM_IP 0x00000695 -#define MSR_SKYLAKE_LASTBRANCH_22_FROM_IP 0x00000696 -#define MSR_SKYLAKE_LASTBRANCH_23_FROM_IP 0x00000697 -#define MSR_SKYLAKE_LASTBRANCH_24_FROM_IP 0x00000698 -#define MSR_SKYLAKE_LASTBRANCH_25_FROM_IP 0x00000699 -#define MSR_SKYLAKE_LASTBRANCH_26_FROM_IP 0x0000069A -#define MSR_SKYLAKE_LASTBRANCH_27_FROM_IP 0x0000069B -#define MSR_SKYLAKE_LASTBRANCH_28_FROM_IP 0x0000069C -#define MSR_SKYLAKE_LASTBRANCH_29_FROM_IP 0x0000069D -#define MSR_SKYLAKE_LASTBRANCH_30_FROM_IP 0x0000069E -#define MSR_SKYLAKE_LASTBRANCH_31_FROM_IP 0x0000069F +#define MSR_SKYLAKE_LASTBRANCH_16_FROM_IP 0x00000690 +#define MSR_SKYLAKE_LASTBRANCH_17_FROM_IP 0x00000691 +#define MSR_SKYLAKE_LASTBRANCH_18_FROM_IP 0x00000692 +#define MSR_SKYLAKE_LASTBRANCH_19_FROM_IP 0x00000693 +#define MSR_SKYLAKE_LASTBRANCH_20_FROM_IP 0x00000694 +#define MSR_SKYLAKE_LASTBRANCH_21_FROM_IP 0x00000695 +#define MSR_SKYLAKE_LASTBRANCH_22_FROM_IP 0x00000696 +#define MSR_SKYLAKE_LASTBRANCH_23_FROM_IP 0x00000697 +#define MSR_SKYLAKE_LASTBRANCH_24_FROM_IP 0x00000698 +#define MSR_SKYLAKE_LASTBRANCH_25_FROM_IP 0x00000699 +#define MSR_SKYLAKE_LASTBRANCH_26_FROM_IP 0x0000069A +#define MSR_SKYLAKE_LASTBRANCH_27_FROM_IP 0x0000069B +#define MSR_SKYLAKE_LASTBRANCH_28_FROM_IP 0x0000069C +#define MSR_SKYLAKE_LASTBRANCH_29_FROM_IP 0x0000069D +#define MSR_SKYLAKE_LASTBRANCH_30_FROM_IP 0x0000069E +#define MSR_SKYLAKE_LASTBRANCH_31_FROM_IP 0x0000069F /// @} - /** Package. Indicator of Frequency Clipping in the Processor Graphics (R/W) (frequency refers to processor graphics frequency). @@ -1280,126 +1259,125 @@ typedef union { /// [Bit 0] PROCHOT Status (R0) When set, frequency is reduced due to /// assertion of external PROCHOT. /// - UINT32 PROCHOT_Status:1; + UINT32 PROCHOT_Status : 1; /// /// [Bit 1] Thermal Status (R0) When set, frequency is reduced due to a /// thermal event. /// - UINT32 ThermalStatus:1; - UINT32 Reserved1:3; + UINT32 ThermalStatus : 1; + UINT32 Reserved1 : 3; /// /// [Bit 5] Running Average Thermal Limit Status (R0) When set, frequency /// is reduced due to running average thermal limit. /// - UINT32 RunningAverageThermalLimitStatus:1; + UINT32 RunningAverageThermalLimitStatus : 1; /// /// [Bit 6] VR Therm Alert Status (R0) When set, frequency is reduced due /// to a thermal alert from a processor Voltage Regulator. /// - UINT32 VRThermAlertStatus:1; + UINT32 VRThermAlertStatus : 1; /// /// [Bit 7] VR Thermal Design Current Status (R0) When set, frequency is /// reduced due to VR TDC limit. /// - UINT32 VRThermalDesignCurrentStatus:1; + UINT32 VRThermalDesignCurrentStatus : 1; /// /// [Bit 8] Other Status (R0) When set, frequency is reduced due to /// electrical or other constraints. /// - UINT32 OtherStatus:1; - UINT32 Reserved2:1; + UINT32 OtherStatus : 1; + UINT32 Reserved2 : 1; /// /// [Bit 10] Package/Platform-Level Power Limiting PL1 Status (R0) When /// set, frequency is reduced due to package/platform-level power limiting /// PL1. /// - UINT32 PL1Status:1; + UINT32 PL1Status : 1; /// /// [Bit 11] Package/Platform-Level PL2 Power Limiting Status (R0) When /// set, frequency is reduced due to package/platform-level power limiting /// PL2/PL3. /// - UINT32 PL2Status:1; + UINT32 PL2Status : 1; /// /// [Bit 12] Inefficient Operation Status (R0) When set, processor /// graphics frequency is operating below target frequency. /// - UINT32 InefficientOperationStatus:1; - UINT32 Reserved3:3; + UINT32 InefficientOperationStatus : 1; + UINT32 Reserved3 : 3; /// /// [Bit 16] PROCHOT Log When set, indicates that the PROCHOT Status bit /// has asserted since the log bit was last cleared. This log bit will /// remain set until cleared by software writing 0. /// - UINT32 PROCHOT_Log:1; + UINT32 PROCHOT_Log : 1; /// /// [Bit 17] Thermal Log When set, indicates that the Thermal Status bit /// has asserted since the log bit was last cleared. This log bit will /// remain set until cleared by software writing 0. /// - UINT32 ThermalLog:1; - UINT32 Reserved4:3; + UINT32 ThermalLog : 1; + UINT32 Reserved4 : 3; /// /// [Bit 21] Running Average Thermal Limit Log When set, indicates that /// the RATL Status bit has asserted since the log bit was last cleared. /// This log bit will remain set until cleared by software writing 0. /// - UINT32 RunningAverageThermalLimitLog:1; + UINT32 RunningAverageThermalLimitLog : 1; /// /// [Bit 22] VR Therm Alert Log When set, indicates that the VR Therm /// Alert Status bit has asserted since the log bit was last cleared. This /// log bit will remain set until cleared by software writing 0. /// - UINT32 VRThermAlertLog:1; + UINT32 VRThermAlertLog : 1; /// /// [Bit 23] VR Thermal Design Current Log When set, indicates that the /// VR Therm Alert Status bit has asserted since the log bit was last /// cleared. This log bit will remain set until cleared by software /// writing 0. /// - UINT32 VRThermalDesignCurrentLog:1; + UINT32 VRThermalDesignCurrentLog : 1; /// /// [Bit 24] Other Log When set, indicates that the OTHER Status bit has /// asserted since the log bit was last cleared. This log bit will remain /// set until cleared by software writing 0. /// - UINT32 OtherLog:1; - UINT32 Reserved5:1; + UINT32 OtherLog : 1; + UINT32 Reserved5 : 1; /// /// [Bit 26] Package/Platform-Level PL1 Power Limiting Log When set, /// indicates that the Package/Platform Level PL1 Power Limiting Status /// bit has asserted since the log bit was last cleared. This log bit will /// remain set until cleared by software writing 0. /// - UINT32 PL1Log:1; + UINT32 PL1Log : 1; /// /// [Bit 27] Package/Platform-Level PL2 Power Limiting Log When set, /// indicates that the Package/Platform Level PL2 Power Limiting Status /// bit has asserted since the log bit was last cleared. This log bit will /// remain set until cleared by software writing 0. /// - UINT32 PL2Log:1; + UINT32 PL2Log : 1; /// /// [Bit 28] Inefficient Operation Log When set, indicates that the /// Inefficient Operation Status bit has asserted since the log bit was /// last cleared. This log bit will remain set until cleared by software /// writing 0. /// - UINT32 InefficientOperationLog:1; - UINT32 Reserved6:3; - UINT32 Reserved7:32; + UINT32 InefficientOperationLog : 1; + UINT32 Reserved6 : 3; + UINT32 Reserved7 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_GRAPHICS_PERF_LIMIT_REASONS_REGISTER; - /** Package. Indicator of Frequency Clipping in the Ring Interconnect (R/W) (frequency refers to ring interconnect in the uncore). @@ -1419,7 +1397,7 @@ typedef union { @endcode @note MSR_SKYLAKE_RING_PERF_LIMIT_REASONS is defined as MSR_RING_PERF_LIMIT_REASONS in SDM. **/ -#define MSR_SKYLAKE_RING_PERF_LIMIT_REASONS 0x000006B1 +#define MSR_SKYLAKE_RING_PERF_LIMIT_REASONS 0x000006B1 /** MSR information returned for MSR index #MSR_SKYLAKE_RING_PERF_LIMIT_REASONS @@ -1433,114 +1411,113 @@ typedef union { /// [Bit 0] PROCHOT Status (R0) When set, frequency is reduced due to /// assertion of external PROCHOT. /// - UINT32 PROCHOT_Status:1; + UINT32 PROCHOT_Status : 1; /// /// [Bit 1] Thermal Status (R0) When set, frequency is reduced due to a /// thermal event. /// - UINT32 ThermalStatus:1; - UINT32 Reserved1:3; + UINT32 ThermalStatus : 1; + UINT32 Reserved1 : 3; /// /// [Bit 5] Running Average Thermal Limit Status (R0) When set, frequency /// is reduced due to running average thermal limit. /// - UINT32 RunningAverageThermalLimitStatus:1; + UINT32 RunningAverageThermalLimitStatus : 1; /// /// [Bit 6] VR Therm Alert Status (R0) When set, frequency is reduced due /// to a thermal alert from a processor Voltage Regulator. /// - UINT32 VRThermAlertStatus:1; + UINT32 VRThermAlertStatus : 1; /// /// [Bit 7] VR Thermal Design Current Status (R0) When set, frequency is /// reduced due to VR TDC limit. /// - UINT32 VRThermalDesignCurrentStatus:1; + UINT32 VRThermalDesignCurrentStatus : 1; /// /// [Bit 8] Other Status (R0) When set, frequency is reduced due to /// electrical or other constraints. /// - UINT32 OtherStatus:1; - UINT32 Reserved2:1; + UINT32 OtherStatus : 1; + UINT32 Reserved2 : 1; /// /// [Bit 10] Package/Platform-Level Power Limiting PL1 Status (R0) When /// set, frequency is reduced due to package/Platform-level power limiting /// PL1. /// - UINT32 PL1Status:1; + UINT32 PL1Status : 1; /// /// [Bit 11] Package/Platform-Level PL2 Power Limiting Status (R0) When /// set, frequency is reduced due to package/Platform-level power limiting /// PL2/PL3. /// - UINT32 PL2Status:1; - UINT32 Reserved3:4; + UINT32 PL2Status : 1; + UINT32 Reserved3 : 4; /// /// [Bit 16] PROCHOT Log When set, indicates that the PROCHOT Status bit /// has asserted since the log bit was last cleared. This log bit will /// remain set until cleared by software writing 0. /// - UINT32 PROCHOT_Log:1; + UINT32 PROCHOT_Log : 1; /// /// [Bit 17] Thermal Log When set, indicates that the Thermal Status bit /// has asserted since the log bit was last cleared. This log bit will /// remain set until cleared by software writing 0. /// - UINT32 ThermalLog:1; - UINT32 Reserved4:3; + UINT32 ThermalLog : 1; + UINT32 Reserved4 : 3; /// /// [Bit 21] Running Average Thermal Limit Log When set, indicates that /// the RATL Status bit has asserted since the log bit was last cleared. /// This log bit will remain set until cleared by software writing 0. /// - UINT32 RunningAverageThermalLimitLog:1; + UINT32 RunningAverageThermalLimitLog : 1; /// /// [Bit 22] VR Therm Alert Log When set, indicates that the VR Therm /// Alert Status bit has asserted since the log bit was last cleared. This /// log bit will remain set until cleared by software writing 0. /// - UINT32 VRThermAlertLog:1; + UINT32 VRThermAlertLog : 1; /// /// [Bit 23] VR Thermal Design Current Log When set, indicates that the /// VR Therm Alert Status bit has asserted since the log bit was last /// cleared. This log bit will remain set until cleared by software /// writing 0. /// - UINT32 VRThermalDesignCurrentLog:1; + UINT32 VRThermalDesignCurrentLog : 1; /// /// [Bit 24] Other Log When set, indicates that the OTHER Status bit has /// asserted since the log bit was last cleared. This log bit will remain /// set until cleared by software writing 0. /// - UINT32 OtherLog:1; - UINT32 Reserved5:1; + UINT32 OtherLog : 1; + UINT32 Reserved5 : 1; /// /// [Bit 26] Package/Platform-Level PL1 Power Limiting Log When set, /// indicates that the Package/Platform Level PL1 Power Limiting Status /// bit has asserted since the log bit was last cleared. This log bit will /// remain set until cleared by software writing 0. /// - UINT32 PL1Log:1; + UINT32 PL1Log : 1; /// /// [Bit 27] Package/Platform-Level PL2 Power Limiting Log When set, /// indicates that the Package/Platform Level PL2 Power Limiting Status /// bit has asserted since the log bit was last cleared. This log bit will /// remain set until cleared by software writing 0. /// - UINT32 PL2Log:1; - UINT32 Reserved6:4; - UINT32 Reserved7:32; + UINT32 PL2Log : 1; + UINT32 Reserved6 : 4; + UINT32 Reserved7 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_RING_PERF_LIMIT_REASONS_REGISTER; - /** Thread. Last Branch Record n To IP (R/W) One of 32 triplets of last branch record registers on the last branch record stack. This part of the stack @@ -1576,25 +1553,24 @@ typedef union { MSR_SKYLAKE_LASTBRANCH_31_TO_IP is defined as MSR_LASTBRANCH_31_TO_IP in SDM. @{ **/ -#define MSR_SKYLAKE_LASTBRANCH_16_TO_IP 0x000006D0 -#define MSR_SKYLAKE_LASTBRANCH_17_TO_IP 0x000006D1 -#define MSR_SKYLAKE_LASTBRANCH_18_TO_IP 0x000006D2 -#define MSR_SKYLAKE_LASTBRANCH_19_TO_IP 0x000006D3 -#define MSR_SKYLAKE_LASTBRANCH_20_TO_IP 0x000006D4 -#define MSR_SKYLAKE_LASTBRANCH_21_TO_IP 0x000006D5 -#define MSR_SKYLAKE_LASTBRANCH_22_TO_IP 0x000006D6 -#define MSR_SKYLAKE_LASTBRANCH_23_TO_IP 0x000006D7 -#define MSR_SKYLAKE_LASTBRANCH_24_TO_IP 0x000006D8 -#define MSR_SKYLAKE_LASTBRANCH_25_TO_IP 0x000006D9 -#define MSR_SKYLAKE_LASTBRANCH_26_TO_IP 0x000006DA -#define MSR_SKYLAKE_LASTBRANCH_27_TO_IP 0x000006DB -#define MSR_SKYLAKE_LASTBRANCH_28_TO_IP 0x000006DC -#define MSR_SKYLAKE_LASTBRANCH_29_TO_IP 0x000006DD -#define MSR_SKYLAKE_LASTBRANCH_30_TO_IP 0x000006DE -#define MSR_SKYLAKE_LASTBRANCH_31_TO_IP 0x000006DF +#define MSR_SKYLAKE_LASTBRANCH_16_TO_IP 0x000006D0 +#define MSR_SKYLAKE_LASTBRANCH_17_TO_IP 0x000006D1 +#define MSR_SKYLAKE_LASTBRANCH_18_TO_IP 0x000006D2 +#define MSR_SKYLAKE_LASTBRANCH_19_TO_IP 0x000006D3 +#define MSR_SKYLAKE_LASTBRANCH_20_TO_IP 0x000006D4 +#define MSR_SKYLAKE_LASTBRANCH_21_TO_IP 0x000006D5 +#define MSR_SKYLAKE_LASTBRANCH_22_TO_IP 0x000006D6 +#define MSR_SKYLAKE_LASTBRANCH_23_TO_IP 0x000006D7 +#define MSR_SKYLAKE_LASTBRANCH_24_TO_IP 0x000006D8 +#define MSR_SKYLAKE_LASTBRANCH_25_TO_IP 0x000006D9 +#define MSR_SKYLAKE_LASTBRANCH_26_TO_IP 0x000006DA +#define MSR_SKYLAKE_LASTBRANCH_27_TO_IP 0x000006DB +#define MSR_SKYLAKE_LASTBRANCH_28_TO_IP 0x000006DC +#define MSR_SKYLAKE_LASTBRANCH_29_TO_IP 0x000006DD +#define MSR_SKYLAKE_LASTBRANCH_30_TO_IP 0x000006DE +#define MSR_SKYLAKE_LASTBRANCH_31_TO_IP 0x000006DF /// @} - /** Thread. Last Branch Record n Additional Information (R/W) One of 32 triplet of last branch record registers on the last branch record stack. This part @@ -1647,41 +1623,40 @@ typedef union { MSR_SKYLAKE_LBR_INFO_31 is defined as MSR_LBR_INFO_31 in SDM. @{ **/ -#define MSR_SKYLAKE_LBR_INFO_0 0x00000DC0 -#define MSR_SKYLAKE_LBR_INFO_1 0x00000DC1 -#define MSR_SKYLAKE_LBR_INFO_2 0x00000DC2 -#define MSR_SKYLAKE_LBR_INFO_3 0x00000DC3 -#define MSR_SKYLAKE_LBR_INFO_4 0x00000DC4 -#define MSR_SKYLAKE_LBR_INFO_5 0x00000DC5 -#define MSR_SKYLAKE_LBR_INFO_6 0x00000DC6 -#define MSR_SKYLAKE_LBR_INFO_7 0x00000DC7 -#define MSR_SKYLAKE_LBR_INFO_8 0x00000DC8 -#define MSR_SKYLAKE_LBR_INFO_9 0x00000DC9 -#define MSR_SKYLAKE_LBR_INFO_10 0x00000DCA -#define MSR_SKYLAKE_LBR_INFO_11 0x00000DCB -#define MSR_SKYLAKE_LBR_INFO_12 0x00000DCC -#define MSR_SKYLAKE_LBR_INFO_13 0x00000DCD -#define MSR_SKYLAKE_LBR_INFO_14 0x00000DCE -#define MSR_SKYLAKE_LBR_INFO_15 0x00000DCF -#define MSR_SKYLAKE_LBR_INFO_16 0x00000DD0 -#define MSR_SKYLAKE_LBR_INFO_17 0x00000DD1 -#define MSR_SKYLAKE_LBR_INFO_18 0x00000DD2 -#define MSR_SKYLAKE_LBR_INFO_19 0x00000DD3 -#define MSR_SKYLAKE_LBR_INFO_20 0x00000DD4 -#define MSR_SKYLAKE_LBR_INFO_21 0x00000DD5 -#define MSR_SKYLAKE_LBR_INFO_22 0x00000DD6 -#define MSR_SKYLAKE_LBR_INFO_23 0x00000DD7 -#define MSR_SKYLAKE_LBR_INFO_24 0x00000DD8 -#define MSR_SKYLAKE_LBR_INFO_25 0x00000DD9 -#define MSR_SKYLAKE_LBR_INFO_26 0x00000DDA -#define MSR_SKYLAKE_LBR_INFO_27 0x00000DDB -#define MSR_SKYLAKE_LBR_INFO_28 0x00000DDC -#define MSR_SKYLAKE_LBR_INFO_29 0x00000DDD -#define MSR_SKYLAKE_LBR_INFO_30 0x00000DDE -#define MSR_SKYLAKE_LBR_INFO_31 0x00000DDF +#define MSR_SKYLAKE_LBR_INFO_0 0x00000DC0 +#define MSR_SKYLAKE_LBR_INFO_1 0x00000DC1 +#define MSR_SKYLAKE_LBR_INFO_2 0x00000DC2 +#define MSR_SKYLAKE_LBR_INFO_3 0x00000DC3 +#define MSR_SKYLAKE_LBR_INFO_4 0x00000DC4 +#define MSR_SKYLAKE_LBR_INFO_5 0x00000DC5 +#define MSR_SKYLAKE_LBR_INFO_6 0x00000DC6 +#define MSR_SKYLAKE_LBR_INFO_7 0x00000DC7 +#define MSR_SKYLAKE_LBR_INFO_8 0x00000DC8 +#define MSR_SKYLAKE_LBR_INFO_9 0x00000DC9 +#define MSR_SKYLAKE_LBR_INFO_10 0x00000DCA +#define MSR_SKYLAKE_LBR_INFO_11 0x00000DCB +#define MSR_SKYLAKE_LBR_INFO_12 0x00000DCC +#define MSR_SKYLAKE_LBR_INFO_13 0x00000DCD +#define MSR_SKYLAKE_LBR_INFO_14 0x00000DCE +#define MSR_SKYLAKE_LBR_INFO_15 0x00000DCF +#define MSR_SKYLAKE_LBR_INFO_16 0x00000DD0 +#define MSR_SKYLAKE_LBR_INFO_17 0x00000DD1 +#define MSR_SKYLAKE_LBR_INFO_18 0x00000DD2 +#define MSR_SKYLAKE_LBR_INFO_19 0x00000DD3 +#define MSR_SKYLAKE_LBR_INFO_20 0x00000DD4 +#define MSR_SKYLAKE_LBR_INFO_21 0x00000DD5 +#define MSR_SKYLAKE_LBR_INFO_22 0x00000DD6 +#define MSR_SKYLAKE_LBR_INFO_23 0x00000DD7 +#define MSR_SKYLAKE_LBR_INFO_24 0x00000DD8 +#define MSR_SKYLAKE_LBR_INFO_25 0x00000DD9 +#define MSR_SKYLAKE_LBR_INFO_26 0x00000DDA +#define MSR_SKYLAKE_LBR_INFO_27 0x00000DDB +#define MSR_SKYLAKE_LBR_INFO_28 0x00000DDC +#define MSR_SKYLAKE_LBR_INFO_29 0x00000DDD +#define MSR_SKYLAKE_LBR_INFO_30 0x00000DDE +#define MSR_SKYLAKE_LBR_INFO_31 0x00000DDF /// @} - /** Package. Uncore fixed counter control (R/W). @@ -1700,7 +1675,7 @@ typedef union { @endcode @note MSR_SKYLAKE_UNC_PERF_FIXED_CTRL is defined as MSR_UNC_PERF_FIXED_CTRL in SDM. **/ -#define MSR_SKYLAKE_UNC_PERF_FIXED_CTRL 0x00000394 +#define MSR_SKYLAKE_UNC_PERF_FIXED_CTRL 0x00000394 /** MSR information returned for MSR index #MSR_SKYLAKE_UNC_PERF_FIXED_CTRL @@ -1710,30 +1685,29 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:20; + UINT32 Reserved1 : 20; /// /// [Bit 20] Enable overflow propagation. /// - UINT32 EnableOverflow:1; - UINT32 Reserved2:1; + UINT32 EnableOverflow : 1; + UINT32 Reserved2 : 1; /// /// [Bit 22] Enable counting. /// - UINT32 EnableCounting:1; - UINT32 Reserved3:9; - UINT32 Reserved4:32; + UINT32 EnableCounting : 1; + UINT32 Reserved3 : 9; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_UNC_PERF_FIXED_CTRL_REGISTER; - /** Package. Uncore fixed counter. @@ -1752,7 +1726,7 @@ typedef union { @endcode @note MSR_SKYLAKE_UNC_PERF_FIXED_CTR is defined as MSR_UNC_PERF_FIXED_CTR in SDM. **/ -#define MSR_SKYLAKE_UNC_PERF_FIXED_CTR 0x00000395 +#define MSR_SKYLAKE_UNC_PERF_FIXED_CTR 0x00000395 /** MSR information returned for MSR index #MSR_SKYLAKE_UNC_PERF_FIXED_CTR @@ -1765,20 +1739,19 @@ typedef union { /// /// [Bits 31:0] Current count. /// - UINT32 CurrentCount:32; + UINT32 CurrentCount : 32; /// /// [Bits 43:32] Current count. /// - UINT32 CurrentCountHi:12; - UINT32 Reserved:20; + UINT32 CurrentCountHi : 12; + UINT32 Reserved : 20; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_UNC_PERF_FIXED_CTR_REGISTER; - /** Package. Uncore C-Box configuration information (R/O). @@ -1796,7 +1769,7 @@ typedef union { @endcode @note MSR_SKYLAKE_UNC_CBO_CONFIG is defined as MSR_UNC_CBO_CONFIG in SDM. **/ -#define MSR_SKYLAKE_UNC_CBO_CONFIG 0x00000396 +#define MSR_SKYLAKE_UNC_CBO_CONFIG 0x00000396 /** MSR information returned for MSR index #MSR_SKYLAKE_UNC_CBO_CONFIG @@ -1810,21 +1783,20 @@ typedef union { /// [Bits 3:0] Specifies the number of C-Box units with programmable /// counters (including processor cores and processor graphics),. /// - UINT32 CBox:4; - UINT32 Reserved1:28; - UINT32 Reserved2:32; + UINT32 CBox : 4; + UINT32 Reserved1 : 28; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_UNC_CBO_CONFIG_REGISTER; - /** Package. Uncore Arb unit, performance counter 0. @@ -1841,8 +1813,7 @@ typedef union { @endcode @note MSR_SKYLAKE_UNC_ARB_PERFCTR0 is defined as MSR_UNC_ARB_PERFCTR0 in SDM. **/ -#define MSR_SKYLAKE_UNC_ARB_PERFCTR0 0x000003B0 - +#define MSR_SKYLAKE_UNC_ARB_PERFCTR0 0x000003B0 /** Package. Uncore Arb unit, performance counter 1. @@ -1860,8 +1831,7 @@ typedef union { @endcode @note MSR_SKYLAKE_UNC_ARB_PERFCTR1 is defined as MSR_UNC_ARB_PERFCTR1 in SDM. **/ -#define MSR_SKYLAKE_UNC_ARB_PERFCTR1 0x000003B1 - +#define MSR_SKYLAKE_UNC_ARB_PERFCTR1 0x000003B1 /** Package. Uncore Arb unit, counter 0 event select MSR. @@ -1879,8 +1849,7 @@ typedef union { @endcode @note MSR_SKYLAKE_UNC_ARB_PERFEVTSEL0 is defined as MSR_UNC_ARB_PERFEVTSEL0 in SDM. **/ -#define MSR_SKYLAKE_UNC_ARB_PERFEVTSEL0 0x000003B2 - +#define MSR_SKYLAKE_UNC_ARB_PERFEVTSEL0 0x000003B2 /** Package. Uncore Arb unit, counter 1 event select MSR. @@ -1898,8 +1867,7 @@ typedef union { @endcode @note MSR_SKYLAKE_UNC_ARB_PERFEVTSEL1 is defined as MSR_SKYLAKE_UNC_ARB_PERFEVTSEL1 in SDM. **/ -#define MSR_SKYLAKE_UNC_ARB_PERFEVTSEL1 0x000003B3 - +#define MSR_SKYLAKE_UNC_ARB_PERFEVTSEL1 0x000003B3 /** Package. Uncore C-Box 0, counter 0 event select MSR. @@ -1917,8 +1885,7 @@ typedef union { @endcode @note MSR_SKYLAKE_UNC_CBO_0_PERFEVTSEL0 is defined as MSR_UNC_CBO_0_PERFEVTSEL0 in SDM. **/ -#define MSR_SKYLAKE_UNC_CBO_0_PERFEVTSEL0 0x00000700 - +#define MSR_SKYLAKE_UNC_CBO_0_PERFEVTSEL0 0x00000700 /** Package. Uncore C-Box 0, counter 1 event select MSR. @@ -1936,8 +1903,7 @@ typedef union { @endcode @note MSR_SKYLAKE_UNC_CBO_0_PERFEVTSEL1 is defined as MSR_UNC_CBO_0_PERFEVTSEL1 in SDM. **/ -#define MSR_SKYLAKE_UNC_CBO_0_PERFEVTSEL1 0x00000701 - +#define MSR_SKYLAKE_UNC_CBO_0_PERFEVTSEL1 0x00000701 /** Package. Uncore C-Box 0, performance counter 0. @@ -1955,8 +1921,7 @@ typedef union { @endcode @note MSR_SKYLAKE_UNC_CBO_0_PERFCTR0 is defined as MSR_UNC_CBO_0_PERFCTR0 in SDM. **/ -#define MSR_SKYLAKE_UNC_CBO_0_PERFCTR0 0x00000706 - +#define MSR_SKYLAKE_UNC_CBO_0_PERFCTR0 0x00000706 /** Package. Uncore C-Box 0, performance counter 1. @@ -1974,8 +1939,7 @@ typedef union { @endcode @note MSR_SKYLAKE_UNC_CBO_0_PERFCTR1 is defined as MSR_UNC_CBO_0_PERFCTR1 in SDM. **/ -#define MSR_SKYLAKE_UNC_CBO_0_PERFCTR1 0x00000707 - +#define MSR_SKYLAKE_UNC_CBO_0_PERFCTR1 0x00000707 /** Package. Uncore C-Box 1, counter 0 event select MSR. @@ -1993,8 +1957,7 @@ typedef union { @endcode @note MSR_SKYLAKE_UNC_CBO_1_PERFEVTSEL0 is defined as MSR_UNC_CBO_1_PERFEVTSEL0 in SDM. **/ -#define MSR_SKYLAKE_UNC_CBO_1_PERFEVTSEL0 0x00000710 - +#define MSR_SKYLAKE_UNC_CBO_1_PERFEVTSEL0 0x00000710 /** Package. Uncore C-Box 1, counter 1 event select MSR. @@ -2012,8 +1975,7 @@ typedef union { @endcode @note MSR_SKYLAKE_UNC_CBO_1_PERFEVTSEL1 is defined as MSR_UNC_CBO_1_PERFEVTSEL1 in SDM. **/ -#define MSR_SKYLAKE_UNC_CBO_1_PERFEVTSEL1 0x00000711 - +#define MSR_SKYLAKE_UNC_CBO_1_PERFEVTSEL1 0x00000711 /** Package. Uncore C-Box 1, performance counter 0. @@ -2031,8 +1993,7 @@ typedef union { @endcode @note MSR_SKYLAKE_UNC_CBO_1_PERFCTR0 is defined as MSR_UNC_CBO_1_PERFCTR0 in SDM. **/ -#define MSR_SKYLAKE_UNC_CBO_1_PERFCTR0 0x00000716 - +#define MSR_SKYLAKE_UNC_CBO_1_PERFCTR0 0x00000716 /** Package. Uncore C-Box 1, performance counter 1. @@ -2050,8 +2011,7 @@ typedef union { @endcode @note MSR_SKYLAKE_UNC_CBO_1_PERFCTR1 is defined as MSR_UNC_CBO_1_PERFCTR1 in SDM. **/ -#define MSR_SKYLAKE_UNC_CBO_1_PERFCTR1 0x00000717 - +#define MSR_SKYLAKE_UNC_CBO_1_PERFCTR1 0x00000717 /** Package. Uncore C-Box 2, counter 0 event select MSR. @@ -2069,8 +2029,7 @@ typedef union { @endcode @note MSR_SKYLAKE_UNC_CBO_2_PERFEVTSEL0 is defined as MSR_UNC_CBO_2_PERFEVTSEL0 in SDM. **/ -#define MSR_SKYLAKE_UNC_CBO_2_PERFEVTSEL0 0x00000720 - +#define MSR_SKYLAKE_UNC_CBO_2_PERFEVTSEL0 0x00000720 /** Package. Uncore C-Box 2, counter 1 event select MSR. @@ -2088,8 +2047,7 @@ typedef union { @endcode @note MSR_SKYLAKE_UNC_CBO_2_PERFEVTSEL1 is defined as MSR_UNC_CBO_2_PERFEVTSEL1 in SDM. **/ -#define MSR_SKYLAKE_UNC_CBO_2_PERFEVTSEL1 0x00000721 - +#define MSR_SKYLAKE_UNC_CBO_2_PERFEVTSEL1 0x00000721 /** Package. Uncore C-Box 2, performance counter 0. @@ -2107,8 +2065,7 @@ typedef union { @endcode @note MSR_SKYLAKE_UNC_CBO_2_PERFCTR0 is defined as MSR_UNC_CBO_2_PERFCTR0 in SDM. **/ -#define MSR_SKYLAKE_UNC_CBO_2_PERFCTR0 0x00000726 - +#define MSR_SKYLAKE_UNC_CBO_2_PERFCTR0 0x00000726 /** Package. Uncore C-Box 2, performance counter 1. @@ -2126,8 +2083,7 @@ typedef union { @endcode @note MSR_SKYLAKE_UNC_CBO_2_PERFCTR1 is defined as MSR_UNC_CBO_2_PERFCTR1 in SDM. **/ -#define MSR_SKYLAKE_UNC_CBO_2_PERFCTR1 0x00000727 - +#define MSR_SKYLAKE_UNC_CBO_2_PERFCTR1 0x00000727 /** Package. Uncore C-Box 3, counter 0 event select MSR. @@ -2145,8 +2101,7 @@ typedef union { @endcode @note MSR_SKYLAKE_UNC_CBO_3_PERFEVTSEL0 is defined as MSR_UNC_CBO_3_PERFEVTSEL0 in SDM. **/ -#define MSR_SKYLAKE_UNC_CBO_3_PERFEVTSEL0 0x00000730 - +#define MSR_SKYLAKE_UNC_CBO_3_PERFEVTSEL0 0x00000730 /** Package. Uncore C-Box 3, counter 1 event select MSR. @@ -2164,8 +2119,7 @@ typedef union { @endcode @note MSR_SKYLAKE_UNC_CBO_3_PERFEVTSEL1 is defined as MSR_UNC_CBO_3_PERFEVTSEL1 in SDM. **/ -#define MSR_SKYLAKE_UNC_CBO_3_PERFEVTSEL1 0x00000731 - +#define MSR_SKYLAKE_UNC_CBO_3_PERFEVTSEL1 0x00000731 /** Package. Uncore C-Box 3, performance counter 0. @@ -2183,8 +2137,7 @@ typedef union { @endcode @note MSR_SKYLAKE_UNC_CBO_3_PERFCTR0 is defined as MSR_UNC_CBO_3_PERFCTR0 in SDM. **/ -#define MSR_SKYLAKE_UNC_CBO_3_PERFCTR0 0x00000736 - +#define MSR_SKYLAKE_UNC_CBO_3_PERFCTR0 0x00000736 /** Package. Uncore C-Box 3, performance counter 1. @@ -2202,8 +2155,7 @@ typedef union { @endcode @note MSR_SKYLAKE_UNC_CBO_3_PERFCTR1 is defined as MSR_UNC_CBO_3_PERFCTR1 in SDM. **/ -#define MSR_SKYLAKE_UNC_CBO_3_PERFCTR1 0x00000737 - +#define MSR_SKYLAKE_UNC_CBO_3_PERFCTR1 0x00000737 /** Package. Uncore PMU global control. @@ -2223,7 +2175,7 @@ typedef union { @endcode @note MSR_SKYLAKE_UNC_PERF_GLOBAL_CTRL is defined as MSR_UNC_PERF_GLOBAL_CTRL in SDM. **/ -#define MSR_SKYLAKE_UNC_PERF_GLOBAL_CTRL 0x00000E01 +#define MSR_SKYLAKE_UNC_PERF_GLOBAL_CTRL 0x00000E01 /** MSR information returned for MSR index #MSR_SKYLAKE_UNC_PERF_GLOBAL_CTRL @@ -2236,50 +2188,49 @@ typedef union { /// /// [Bit 0] Slice 0 select. /// - UINT32 PMI_Sel_Slice0:1; + UINT32 PMI_Sel_Slice0 : 1; /// /// [Bit 1] Slice 1 select. /// - UINT32 PMI_Sel_Slice1:1; + UINT32 PMI_Sel_Slice1 : 1; /// /// [Bit 2] Slice 2 select. /// - UINT32 PMI_Sel_Slice2:1; + UINT32 PMI_Sel_Slice2 : 1; /// /// [Bit 3] Slice 3 select. /// - UINT32 PMI_Sel_Slice3:1; + UINT32 PMI_Sel_Slice3 : 1; /// /// [Bit 4] Slice 4select. /// - UINT32 PMI_Sel_Slice4:1; - UINT32 Reserved1:14; - UINT32 Reserved2:10; + UINT32 PMI_Sel_Slice4 : 1; + UINT32 Reserved1 : 14; + UINT32 Reserved2 : 10; /// /// [Bit 29] Enable all uncore counters. /// - UINT32 EN:1; + UINT32 EN : 1; /// /// [Bit 30] Enable wake on PMI. /// - UINT32 WakePMI:1; + UINT32 WakePMI : 1; /// /// [Bit 31] Enable Freezing counter when overflow. /// - UINT32 FREEZE:1; - UINT32 Reserved3:32; + UINT32 FREEZE : 1; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_UNC_PERF_GLOBAL_CTRL_REGISTER; - /** Package. Uncore PMU main status. @@ -2298,7 +2249,7 @@ typedef union { @endcode @note MSR_SKYLAKE_UNC_PERF_GLOBAL_STATUS is defined as MSR_UNC_PERF_GLOBAL_STATUS in SDM. **/ -#define MSR_SKYLAKE_UNC_PERF_GLOBAL_STATUS 0x00000E02 +#define MSR_SKYLAKE_UNC_PERF_GLOBAL_STATUS 0x00000E02 /** MSR information returned for MSR index #MSR_SKYLAKE_UNC_PERF_GLOBAL_STATUS @@ -2311,30 +2262,29 @@ typedef union { /// /// [Bit 0] Fixed counter overflowed. /// - UINT32 Fixed:1; + UINT32 Fixed : 1; /// /// [Bit 1] An ARB counter overflowed. /// - UINT32 ARB:1; - UINT32 Reserved1:1; + UINT32 ARB : 1; + UINT32 Reserved1 : 1; /// /// [Bit 3] A CBox counter overflowed (on any slice). /// - UINT32 CBox:1; - UINT32 Reserved2:28; - UINT32 Reserved3:32; + UINT32 CBox : 1; + UINT32 Reserved2 : 28; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_UNC_PERF_GLOBAL_STATUS_REGISTER; - /** Package. NPK Address Used by AET Messages (R/W). @@ -2352,7 +2302,7 @@ typedef union { AsmWriteMsr64 (MSR_SKYLAKE_TRACE_HUB_STH_ACPIBAR_BASE, Msr.Uint64); @endcode **/ -#define MSR_SKYLAKE_TRACE_HUB_STH_ACPIBAR_BASE 0x00000080 +#define MSR_SKYLAKE_TRACE_HUB_STH_ACPIBAR_BASE 0x00000080 /** MSR information returned for MSR index @@ -2368,24 +2318,23 @@ typedef union { /// bit has to be set in order for the AET packets to be directed to NPK /// MMIO. /// - UINT32 Fix_Me_1:1; - UINT32 Reserved:17; + UINT32 Fix_Me_1 : 1; + UINT32 Reserved : 17; /// /// [Bits 31:18] ACPIBAR_BASE_ADDRESS AET target address in NPK MMIO space. /// - UINT32 ACPIBAR_BASE_ADDRESS:14; + UINT32 ACPIBAR_BASE_ADDRESS : 14; /// /// [Bits 63:32] ACPIBAR_BASE_ADDRESS AET target address in NPK MMIO space. /// - UINT32 Fix_Me_2:32; + UINT32 Fix_Me_2 : 32; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_TRACE_HUB_STH_ACPIBAR_BASE_REGISTER; - /** Core. Processor Reserved Memory Range Register - Physical Base Control Register (R/W). @@ -2404,7 +2353,7 @@ typedef union { AsmWriteMsr64 (MSR_SKYLAKE_PRMRR_PHYS_BASE, Msr.Uint64); @endcode **/ -#define MSR_SKYLAKE_PRMRR_PHYS_BASE 0x000001F4 +#define MSR_SKYLAKE_PRMRR_PHYS_BASE 0x000001F4 /** MSR information returned for MSR index #MSR_SKYLAKE_PRMRR_PHYS_BASE @@ -2417,25 +2366,24 @@ typedef union { /// /// [Bits 2:0] MemType PRMRR BASE MemType. /// - UINT32 MemTypePRMRRBASEMemType:3; - UINT32 Reserved1:9; + UINT32 MemTypePRMRRBASEMemType : 3; + UINT32 Reserved1 : 9; /// /// [Bits 31:12] Base PRMRR Base Address. /// - UINT32 BasePRMRRBaseAddress:20; + UINT32 BasePRMRRBaseAddress : 20; /// /// [Bits 45:32] Base PRMRR Base Address. /// - UINT32 Fix_Me_1:14; - UINT32 Reserved2:18; + UINT32 Fix_Me_1 : 14; + UINT32 Reserved2 : 18; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_PRMRR_PHYS_BASE_REGISTER; - /** Core. Processor Reserved Memory Range Register - Physical Mask Control Register (R/W). @@ -2454,7 +2402,7 @@ typedef union { AsmWriteMsr64 (MSR_SKYLAKE_PRMRR_PHYS_MASK, Msr.Uint64); @endcode **/ -#define MSR_SKYLAKE_PRMRR_PHYS_MASK 0x000001F5 +#define MSR_SKYLAKE_PRMRR_PHYS_MASK 0x000001F5 /** MSR information returned for MSR index #MSR_SKYLAKE_PRMRR_PHYS_MASK @@ -2464,32 +2412,31 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:10; + UINT32 Reserved1 : 10; /// /// [Bit 10] Lock Lock bit for the PRMRR. /// - UINT32 Fix_Me_1:1; + UINT32 Fix_Me_1 : 1; /// /// [Bit 11] VLD Enable bit for the PRMRR. /// - UINT32 VLD:1; + UINT32 VLD : 1; /// /// [Bits 31:12] Mask PRMRR MASK bits. /// - UINT32 Fix_Me_2:20; + UINT32 Fix_Me_2 : 20; /// /// [Bits 45:32] Mask PRMRR MASK bits. /// - UINT32 Fix_Me_3:14; - UINT32 Reserved2:18; + UINT32 Fix_Me_3 : 14; + UINT32 Reserved2 : 18; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_PRMRR_PHYS_MASK_REGISTER; - /** Core. Valid PRMRR Configurations (R/W). @@ -2507,7 +2454,7 @@ typedef union { AsmWriteMsr64 (MSR_SKYLAKE_PRMRR_VALID_CONFIG, Msr.Uint64); @endcode **/ -#define MSR_SKYLAKE_PRMRR_VALID_CONFIG 0x000001FB +#define MSR_SKYLAKE_PRMRR_VALID_CONFIG 0x000001FB /** MSR information returned for MSR index #MSR_SKYLAKE_PRMRR_VALID_CONFIG @@ -2520,34 +2467,33 @@ typedef union { /// /// [Bit 0] 1M supported MEE size. /// - UINT32 Fix_Me_1:1; - UINT32 Reserved1:4; + UINT32 Fix_Me_1 : 1; + UINT32 Reserved1 : 4; /// /// [Bit 5] 32M supported MEE size. /// - UINT32 Fix_Me_2:1; + UINT32 Fix_Me_2 : 1; /// /// [Bit 6] 64M supported MEE size. /// - UINT32 Fix_Me_3:1; + UINT32 Fix_Me_3 : 1; /// /// [Bit 7] 128M supported MEE size. /// - UINT32 Fix_Me_4:1; - UINT32 Reserved2:24; - UINT32 Reserved3:32; + UINT32 Fix_Me_4 : 1; + UINT32 Reserved2 : 24; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_PRMRR_VALID_CONFIG_REGISTER; - /** Package. (R/W) The PRMRR range is used to protect Xucode memory from unauthorized reads and writes. Any IO access to this range is aborted. This @@ -2568,7 +2514,7 @@ typedef union { AsmWriteMsr64 (MSR_SKYLAKE_UNCORE_PRMRR_PHYS_BASE, Msr.Uint64); @endcode **/ -#define MSR_SKYLAKE_UNCORE_PRMRR_PHYS_BASE 0x000002F4 +#define MSR_SKYLAKE_UNCORE_PRMRR_PHYS_BASE 0x000002F4 /** MSR information returned for MSR index #MSR_SKYLAKE_UNCORE_PRMRR_PHYS_BASE @@ -2578,26 +2524,25 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:12; + UINT32 Reserved1 : 12; /// /// [Bits 31:12] Range Base This field corresponds to bits 38:12 of the /// base address memory range which is allocated to PRMRR memory. /// - UINT32 Fix_Me_1:20; + UINT32 Fix_Me_1 : 20; /// /// [Bits 38:32] Range Base This field corresponds to bits 38:12 of the /// base address memory range which is allocated to PRMRR memory. /// - UINT32 Fix_Me_2:7; - UINT32 Reserved2:25; + UINT32 Fix_Me_2 : 7; + UINT32 Reserved2 : 25; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_UNCORE_PRMRR_PHYS_BASE_REGISTER; - /** Package. (R/W) This register controls the size of the PRMRR range by indicating which address bits must match the PRMRR base register value. @@ -2616,7 +2561,7 @@ typedef union { AsmWriteMsr64 (MSR_SKYLAKE_UNCORE_PRMRR_PHYS_MASK, Msr.Uint64); @endcode **/ -#define MSR_SKYLAKE_UNCORE_PRMRR_PHYS_MASK 0x000002F5 +#define MSR_SKYLAKE_UNCORE_PRMRR_PHYS_MASK 0x000002F5 /** MSR information returned for MSR index #MSR_SKYLAKE_UNCORE_PRMRR_PHYS_MASK @@ -2626,28 +2571,28 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:10; + UINT32 Reserved1 : 10; /// /// [Bit 10] Lock Setting this bit locks all writeable settings in this /// register, including itself. /// - UINT32 Fix_Me_1:1; + UINT32 Fix_Me_1 : 1; /// /// [Bit 11] Range_En Indicates whether the PRMRR range is enabled and /// valid. /// - UINT32 Fix_Me_2:1; - UINT32 Reserved2:20; - UINT32 Reserved3:32; + UINT32 Fix_Me_2 : 1; + UINT32 Reserved2 : 20; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_UNCORE_PRMRR_PHYS_MASK_REGISTER; /** @@ -2668,7 +2613,7 @@ typedef union { AsmWriteMsr64 (MSR_SKYLAKE_RING_RATIO_LIMIT, Msr.Uint64); @endcode **/ -#define MSR_SKYLAKE_RING_RATIO_LIMIT 0x00000620 +#define MSR_SKYLAKE_RING_RATIO_LIMIT 0x00000620 /** MSR information returned for MSR index #MSR_SKYLAKE_RING_RATIO_LIMIT @@ -2682,27 +2627,26 @@ typedef union { /// [Bits 6:0] MAX_Ratio This field is used to limit the max ratio of the /// LLC/Ring. /// - UINT32 Fix_Me_1:7; - UINT32 Reserved1:1; + UINT32 Fix_Me_1 : 7; + UINT32 Reserved1 : 1; /// /// [Bits 14:8] MIN_Ratio Writing to this field controls the minimum /// possible ratio of the LLC/Ring. /// - UINT32 Fix_Me_2:7; - UINT32 Reserved2:17; - UINT32 Reserved3:32; + UINT32 Fix_Me_2 : 7; + UINT32 Reserved2 : 17; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_RING_RATIO_LIMIT_REGISTER; - /** Branch Monitoring Global Control (R/W). @@ -2720,7 +2664,7 @@ typedef union { AsmWriteMsr64 (MSR_SKYLAKE_BR_DETECT_CTRL, Msr.Uint64); @endcode **/ -#define MSR_SKYLAKE_BR_DETECT_CTRL 0x00000350 +#define MSR_SKYLAKE_BR_DETECT_CTRL 0x00000350 /** MSR information returned for MSR index #MSR_SKYLAKE_BR_DETECT_CTRL @@ -2733,59 +2677,59 @@ typedef union { /// /// [Bit 0] EnMonitoring Global enable for branch monitoring. /// - UINT32 EnMonitoring:1; + UINT32 EnMonitoring : 1; /// /// [Bit 1] EnExcept Enable branch monitoring event signaling on threshold /// trip. The branch monitoring event handler is signaled via the existing /// PMI signaling mechanism as programmed from the corresponding local /// APIC LVT entry. /// - UINT32 EnExcept:1; + UINT32 EnExcept : 1; /// /// [Bit 2] EnLBRFrz Enable LBR freeze on threshold trip. This will cause /// the LBR frozen bit 58 to be set in IA32_PERF_GLOBAL_STATUS when a /// triggering condition occurs and this bit is enabled. /// - UINT32 EnLBRFrz:1; + UINT32 EnLBRFrz : 1; /// /// [Bit 3] DisableInGuest When set to '1', branch monitoring, event /// triggering and LBR freeze actions are disabled when operating at VMX /// non-root operation. /// - UINT32 DisableInGuest:1; - UINT32 Reserved1:4; + UINT32 DisableInGuest : 1; + UINT32 Reserved1 : 4; /// /// [Bits 17:8] WindowSize Window size defined by WindowCntSel. Values 0 - /// 1023 are supported. Once the Window counter reaches the WindowSize /// count both the Window Counter and all Branch Monitoring Counters are /// cleared. /// - UINT32 WindowSize:10; - UINT32 Reserved2:6; + UINT32 WindowSize : 10; + UINT32 Reserved2 : 6; /// /// [Bits 25:24] WindowCntSel Window event count select: '00 = /// Instructions retired. '01 = Branch instructions retired '10 = Return /// instructions retired. '11 = Indirect branch instructions retired. /// - UINT32 WindowCntSel:2; + UINT32 WindowCntSel : 2; /// /// [Bit 26] CntAndMode When set to '1', the overall branch monitoring /// event triggering condition is true only if all enabled counters' /// threshold conditions are true. When '0', the threshold tripping /// condition is true if any enabled counters' threshold is true. /// - UINT32 CntAndMode:1; - UINT32 Reserved3:5; - UINT32 Reserved4:32; + UINT32 CntAndMode : 1; + UINT32 Reserved3 : 5; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_BR_DETECT_CTRL_REGISTER; /** @@ -2805,7 +2749,7 @@ typedef union { AsmWriteMsr64 (MSR_SKYLAKE_BR_DETECT_STATUS, Msr.Uint64); @endcode **/ -#define MSR_SKYLAKE_BR_DETECT_STATUS 0x00000351 +#define MSR_SKYLAKE_BR_DETECT_STATUS 0x00000351 /** MSR information returned for MSR index #MSR_SKYLAKE_BR_DETECT_STATUS @@ -2820,33 +2764,33 @@ typedef union { /// Monitoring event signaling is blocked until this bit is cleared by /// software. /// - UINT32 BranchMonitoringEventSignaled:1; + UINT32 BranchMonitoringEventSignaled : 1; /// /// [Bit 1] LBRsValid This status bit is set to '1' if the LBR state is /// considered valid for sampling by branch monitoring software. /// - UINT32 LBRsValid:1; - UINT32 Reserved1:6; + UINT32 LBRsValid : 1; + UINT32 Reserved1 : 6; /// /// [Bit 8] CntrHit0 Branch monitoring counter #0 threshold hit. This /// status bit is sticky and once set requires clearing by software. /// Counter operation continues independent of the state of the bit. /// - UINT32 CntrHit0:1; + UINT32 CntrHit0 : 1; /// /// [Bit 9] CntrHit1 Branch monitoring counter #1 threshold hit. This /// status bit is sticky and once set requires clearing by software. /// Counter operation continues independent of the state of the bit. /// - UINT32 CntrHit1:1; - UINT32 Reserved2:6; + UINT32 CntrHit1 : 1; + UINT32 Reserved2 : 6; /// /// [Bits 25:16] CountWindow The current value of the window counter. The /// count value is frozen on a valid branch monitoring triggering /// condition. This is a 10-bit unsigned value. /// - UINT32 CountWindow:10; - UINT32 Reserved3:6; + UINT32 CountWindow : 10; + UINT32 Reserved3 : 6; /// /// [Bits 39:32] Count0 The current value of counter 0 updated after each /// occurrence of the event being counted. The count value is frozen on a @@ -2856,7 +2800,7 @@ typedef union { /// maximum value 0xFF (256). RET-CALL event counter saturate at maximum /// value 0x7F (+127) and minimum value 0x80 (-128). /// - UINT32 Count0:8; + UINT32 Count0 : 8; /// /// [Bits 47:40] Count1 The current value of counter 1 updated after each /// occurrence of the event being counted. The count value is frozen on a @@ -2866,20 +2810,19 @@ typedef union { /// maximum value 0xFF (256). RET-CALL event counter saturate at maximum /// value 0x7F (+127) and minimum value 0x80 (-128). /// - UINT32 Count1:8; - UINT32 Reserved4:16; + UINT32 Count1 : 8; + UINT32 Reserved4 : 16; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_BR_DETECT_STATUS_REGISTER; - /** Package. Package C3 Residency Counter (R/O). Note: C-state values are processor specific C-state code names, unrelated to MWAIT extension C-state @@ -2896,8 +2839,7 @@ typedef union { Msr = AsmReadMsr64 (MSR_SKYLAKE_PKG_C3_RESIDENCY); @endcode **/ -#define MSR_SKYLAKE_PKG_C3_RESIDENCY 0x000003F8 - +#define MSR_SKYLAKE_PKG_C3_RESIDENCY 0x000003F8 /** Core. Core C1 Residency Counter (R/O). Value since last reset for the Core @@ -2920,8 +2862,7 @@ typedef union { Msr = AsmReadMsr64 (MSR_SKYLAKE_CORE_C1_RESIDENCY); @endcode **/ -#define MSR_SKYLAKE_CORE_C1_RESIDENCY 0x00000660 - +#define MSR_SKYLAKE_CORE_C1_RESIDENCY 0x00000660 /** Core. Core C3 Residency Counter (R/O). Will always return 0. @@ -2937,8 +2878,7 @@ typedef union { Msr = AsmReadMsr64 (MSR_SKYLAKE_CORE_C3_RESIDENCY); @endcode **/ -#define MSR_SKYLAKE_CORE_C3_RESIDENCY 0x00000662 - +#define MSR_SKYLAKE_CORE_C3_RESIDENCY 0x00000662 /** Package. Protected Processor Inventory Number Enable Control (R/W). @@ -2957,7 +2897,7 @@ typedef union { AsmWriteMsr64 (MSR_SKYLAKE_PPIN_CTL, Msr.Uint64); @endcode **/ -#define MSR_SKYLAKE_PPIN_CTL 0x0000004E +#define MSR_SKYLAKE_PPIN_CTL 0x0000004E /** MSR information returned for MSR index #MSR_SKYLAKE_PPIN_CTL @@ -2970,25 +2910,24 @@ typedef union { /// /// [Bit 0] LockOut (R/WO) See Table 2-25. /// - UINT32 LockOut:1; + UINT32 LockOut : 1; /// /// [Bit 1] Enable_PPIN (R/W) See Table 2-25. /// - UINT32 Enable_PPIN:1; - UINT32 Reserved1:30; - UINT32 Reserved2:32; + UINT32 Enable_PPIN : 1; + UINT32 Reserved1 : 30; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_PPIN_CTL_REGISTER; - /** Package. Protected Processor Inventory Number (R/O). Protected Processor Inventory Number (R/O) See Table 2-25. @@ -3004,8 +2943,7 @@ typedef union { Msr = AsmReadMsr64 (MSR_SKYLAKE_PPIN); @endcode **/ -#define MSR_SKYLAKE_PPIN 0x0000004F - +#define MSR_SKYLAKE_PPIN 0x0000004F /** Package. Platform Information Contains power management and other model @@ -3025,7 +2963,7 @@ typedef union { AsmWriteMsr64 (MSR_SKYLAKE_PLATFORM_INFO, Msr.Uint64); @endcode **/ -#define MSR_SKYLAKE_PLATFORM_INFO 0x000000CE +#define MSR_SKYLAKE_PLATFORM_INFO 0x000000CE /** MSR information returned for MSR index #MSR_SKYLAKE_PLATFORM_INFO @@ -3035,46 +2973,45 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:8; + UINT32 Reserved1 : 8; /// /// [Bits 15:8] Package. Maximum Non-Turbo Ratio (R/O) See Table 2-25. /// - UINT32 MaximumNon_TurboRatio:8; - UINT32 Reserved2:7; + UINT32 MaximumNon_TurboRatio : 8; + UINT32 Reserved2 : 7; /// /// [Bit 23] Package. PPIN_CAP (R/O) See Table 2-25. /// - UINT32 PPIN_CAP:1; - UINT32 Reserved3:4; + UINT32 PPIN_CAP : 1; + UINT32 Reserved3 : 4; /// /// [Bit 28] Package. Programmable Ratio Limit for Turbo Mode (R/O) See /// Table 2-25. /// - UINT32 ProgrammableRatioLimit:1; + UINT32 ProgrammableRatioLimit : 1; /// /// [Bit 29] Package. Programmable TDP Limit for Turbo Mode (R/O) See /// Table 2-25. /// - UINT32 ProgrammableTDPLimit:1; + UINT32 ProgrammableTDPLimit : 1; /// /// [Bit 30] Package. Programmable TJ OFFSET (R/O) See Table 2-25. /// - UINT32 ProgrammableTJOFFSET:1; - UINT32 Reserved4:1; - UINT32 Reserved5:8; + UINT32 ProgrammableTJOFFSET : 1; + UINT32 Reserved4 : 1; + UINT32 Reserved5 : 8; /// /// [Bits 47:40] Package. Maximum Efficiency Ratio (R/O) See Table 2-25. /// - UINT32 MaximumEfficiencyRatio:8; - UINT32 Reserved6:16; + UINT32 MaximumEfficiencyRatio : 8; + UINT32 Reserved6 : 16; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_PLATFORM_INFO_REGISTER; - /** Core. C-State Configuration Control (R/W) Note: C-state values are processor specific C-state code names, unrelated to MWAIT extension C-state parameters @@ -3094,7 +3031,7 @@ typedef union { AsmWriteMsr64 (MSR_SKYLAKE_PKG_CST_CONFIG_CONTROL, Msr.Uint64); @endcode **/ -#define MSR_SKYLAKE_PKG_CST_CONFIG_CONTROL 0x000000E2 +#define MSR_SKYLAKE_PKG_CST_CONFIG_CONTROL 0x000000E2 /** MSR information returned for MSR index #MSR_SKYLAKE_PKG_CST_CONFIG_CONTROL @@ -3113,61 +3050,60 @@ typedef union { /// 011b: C6 (retention) 111b: No Package C state limits. All C states /// supported by the processor are available. /// - UINT32 C_StateLimit:3; - UINT32 Reserved1:7; + UINT32 C_StateLimit : 3; + UINT32 Reserved1 : 7; /// /// [Bit 10] I/O MWAIT Redirection Enable (R/W). /// - UINT32 MWAITRedirectionEnable:1; - UINT32 Reserved2:4; + UINT32 MWAITRedirectionEnable : 1; + UINT32 Reserved2 : 4; /// /// [Bit 15] CFG Lock (R/WO). /// - UINT32 CFGLock:1; + UINT32 CFGLock : 1; /// /// [Bit 16] Automatic C-State Conversion Enable (R/W) If 1, the processor /// will convert HALT or MWAT(C1) to MWAIT(C6). /// - UINT32 AutomaticC_StateConversionEnable:1; - UINT32 Reserved3:8; + UINT32 AutomaticC_StateConversionEnable : 1; + UINT32 Reserved3 : 8; /// /// [Bit 25] C3 State Auto Demotion Enable (R/W). /// - UINT32 C3StateAutoDemotionEnable:1; + UINT32 C3StateAutoDemotionEnable : 1; /// /// [Bit 26] C1 State Auto Demotion Enable (R/W). /// - UINT32 C1StateAutoDemotionEnable:1; + UINT32 C1StateAutoDemotionEnable : 1; /// /// [Bit 27] Enable C3 Undemotion (R/W). /// - UINT32 EnableC3Undemotion:1; + UINT32 EnableC3Undemotion : 1; /// /// [Bit 28] Enable C1 Undemotion (R/W). /// - UINT32 EnableC1Undemotion:1; + UINT32 EnableC1Undemotion : 1; /// /// [Bit 29] Package C State Demotion Enable (R/W). /// - UINT32 CStateDemotionEnable:1; + UINT32 CStateDemotionEnable : 1; /// /// [Bit 30] Package C State UnDemotion Enable (R/W). /// - UINT32 CStateUnDemotionEnable:1; - UINT32 Reserved4:1; - UINT32 Reserved5:32; + UINT32 CStateUnDemotionEnable : 1; + UINT32 Reserved4 : 1; + UINT32 Reserved5 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_PKG_CST_CONFIG_CONTROL_REGISTER; - /** Thread. Global Machine Check Capability (R/O). @@ -3184,7 +3120,7 @@ typedef union { Msr.Uint64 = AsmReadMsr64 (MSR_SKYLAKE_IA32_MCG_CAP); @endcode **/ -#define MSR_SKYLAKE_IA32_MCG_CAP 0x00000179 +#define MSR_SKYLAKE_IA32_MCG_CAP 0x00000179 /** MSR information returned for MSR index #MSR_SKYLAKE_IA32_MCG_CAP @@ -3197,54 +3133,53 @@ typedef union { /// /// [Bits 7:0] Count. /// - UINT32 Count:8; + UINT32 Count : 8; /// /// [Bit 8] MCG_CTL_P. /// - UINT32 MCG_CTL_P:1; + UINT32 MCG_CTL_P : 1; /// /// [Bit 9] MCG_EXT_P. /// - UINT32 MCG_EXT_P:1; + UINT32 MCG_EXT_P : 1; /// /// [Bit 10] MCP_CMCI_P. /// - UINT32 MCP_CMCI_P:1; + UINT32 MCP_CMCI_P : 1; /// /// [Bit 11] MCG_TES_P. /// - UINT32 MCG_TES_P:1; - UINT32 Reserved1:4; + UINT32 MCG_TES_P : 1; + UINT32 Reserved1 : 4; /// /// [Bits 23:16] MCG_EXT_CNT. /// - UINT32 MCG_EXT_CNT:8; + UINT32 MCG_EXT_CNT : 8; /// /// [Bit 24] MCG_SER_P. /// - UINT32 MCG_SER_P:1; + UINT32 MCG_SER_P : 1; /// /// [Bit 25] MCG_EM_P. /// - UINT32 MCG_EM_P:1; + UINT32 MCG_EM_P : 1; /// /// [Bit 26] MCG_ELOG_P. /// - UINT32 MCG_ELOG_P:1; - UINT32 Reserved2:5; - UINT32 Reserved3:32; + UINT32 MCG_ELOG_P : 1; + UINT32 Reserved2 : 5; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_IA32_MCG_CAP_REGISTER; - /** THREAD. Enhanced SMM Capabilities (SMM-RO) Reports SMM capability Enhancement. Accessible only while in SMM. @@ -3263,7 +3198,7 @@ typedef union { AsmWriteMsr64 (MSR_SKYLAKE_SMM_MCA_CAP, Msr.Uint64); @endcode **/ -#define MSR_SKYLAKE_SMM_MCA_CAP 0x0000017D +#define MSR_SKYLAKE_SMM_MCA_CAP 0x0000017D /** MSR information returned for MSR index #MSR_SKYLAKE_SMM_MCA_CAP @@ -3273,29 +3208,28 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:32; - UINT32 Reserved2:26; + UINT32 Reserved1 : 32; + UINT32 Reserved2 : 26; /// /// [Bit 58] SMM_Code_Access_Chk (SMM-RO) If set to 1 indicates that the /// SMM code access restriction is supported and a host-space interface is /// available to SMM handler. /// - UINT32 SMM_Code_Access_Chk:1; + UINT32 SMM_Code_Access_Chk : 1; /// /// [Bit 59] Long_Flow_Indication (SMM-RO) If set to 1 indicates that the /// SMM long flow indicator is supported and a host-space interface is /// available to SMM handler. /// - UINT32 Long_Flow_Indication:1; - UINT32 Reserved3:4; + UINT32 Long_Flow_Indication : 1; + UINT32 Reserved3 : 4; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_SMM_MCA_CAP_REGISTER; - /** Package. Temperature Target. @@ -3313,7 +3247,7 @@ typedef union { AsmWriteMsr64 (MSR_SKYLAKE_TEMPERATURE_TARGET, Msr.Uint64); @endcode **/ -#define MSR_SKYLAKE_TEMPERATURE_TARGET 0x000001A2 +#define MSR_SKYLAKE_TEMPERATURE_TARGET 0x000001A2 /** MSR information returned for MSR index #MSR_SKYLAKE_TEMPERATURE_TARGET @@ -3323,26 +3257,26 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:16; + UINT32 Reserved1 : 16; /// /// [Bits 23:16] Temperature Target (RO) See Table 2-25. /// - UINT32 TemperatureTarget:8; + UINT32 TemperatureTarget : 8; /// /// [Bits 27:24] TCC Activation Offset (R/W) See Table 2-25. /// - UINT32 TCCActivationOffset:4; - UINT32 Reserved2:4; - UINT32 Reserved3:32; + UINT32 TCCActivationOffset : 4; + UINT32 Reserved2 : 4; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_TEMPERATURE_TARGET_REGISTER; /** @@ -3366,7 +3300,7 @@ typedef union { AsmWriteMsr64 (MSR_SKYLAKE_TURBO_RATIO_LIMIT_CORES, Msr.Uint64); @endcode **/ -#define MSR_SKYLAKE_TURBO_RATIO_LIMIT_CORES 0x000001AE +#define MSR_SKYLAKE_TURBO_RATIO_LIMIT_CORES 0x000001AE /** MSR information returned for MSR index #MSR_SKYLAKE_TURBO_RATIO_LIMIT_CORES @@ -3380,50 +3314,49 @@ typedef union { /// [Bits 7:0] NUMCORE_0 Defines the active core ranges for each frequency /// point. /// - UINT32 NUMCORE_0:8; + UINT32 NUMCORE_0 : 8; /// /// [Bits 15:8] NUMCORE_1 Defines the active core ranges for each /// frequency point. /// - UINT32 NUMCORE_1:8; + UINT32 NUMCORE_1 : 8; /// /// [Bits 23:16] NUMCORE_2 Defines the active core ranges for each /// frequency point. /// - UINT32 NUMCORE_2:8; + UINT32 NUMCORE_2 : 8; /// /// [Bits 31:24] NUMCORE_3 Defines the active core ranges for each /// frequency point. /// - UINT32 NUMCORE_3:8; + UINT32 NUMCORE_3 : 8; /// /// [Bits 39:32] NUMCORE_4 Defines the active core ranges for each /// frequency point. /// - UINT32 NUMCORE_4:8; + UINT32 NUMCORE_4 : 8; /// /// [Bits 47:40] NUMCORE_5 Defines the active core ranges for each /// frequency point. /// - UINT32 NUMCORE_5:8; + UINT32 NUMCORE_5 : 8; /// /// [Bits 55:48] NUMCORE_6 Defines the active core ranges for each /// frequency point. /// - UINT32 NUMCORE_6:8; + UINT32 NUMCORE_6 : 8; /// /// [Bits 63:56] NUMCORE_7 Defines the active core ranges for each /// frequency point. /// - UINT32 NUMCORE_7:8; + UINT32 NUMCORE_7 : 8; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_TURBO_RATIO_LIMIT_CORES_REGISTER; - /** Package. Unit Multipliers Used in RAPL Interfaces (R/O). @@ -3440,7 +3373,7 @@ typedef union { Msr.Uint64 = AsmReadMsr64 (MSR_SKYLAKE_RAPL_POWER_UNIT); @endcode **/ -#define MSR_SKYLAKE_RAPL_POWER_UNIT 0x00000606 +#define MSR_SKYLAKE_RAPL_POWER_UNIT 0x00000606 /** MSR information returned for MSR index #MSR_SKYLAKE_RAPL_POWER_UNIT @@ -3453,35 +3386,34 @@ typedef union { /// /// [Bits 3:0] Package. Power Units See Section 14.9.1, "RAPL Interfaces.". /// - UINT32 PowerUnits:4; - UINT32 Reserved1:4; + UINT32 PowerUnits : 4; + UINT32 Reserved1 : 4; /// /// [Bits 12:8] Package. Energy Status Units Energy related information /// (in Joules) is based on the multiplier, 1/2^ESU; where ESU is an /// unsigned integer represented by bits 12:8. Default value is 0EH (or 61 /// micro-joules). /// - UINT32 EnergyStatusUnits:5; - UINT32 Reserved2:3; + UINT32 EnergyStatusUnits : 5; + UINT32 Reserved2 : 3; /// /// [Bits 19:16] Package. Time Units See Section 14.9.1, "RAPL /// Interfaces.". /// - UINT32 TimeUnits:4; - UINT32 Reserved3:12; - UINT32 Reserved4:32; + UINT32 TimeUnits : 4; + UINT32 Reserved3 : 12; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_RAPL_POWER_UNIT_REGISTER; - /** Package. DRAM RAPL Power Limit Control (R/W) See Section 14.9.5, "DRAM RAPL Domain.". @@ -3498,8 +3430,7 @@ typedef union { AsmWriteMsr64 (MSR_SKYLAKE_DRAM_POWER_LIMIT, Msr); @endcode **/ -#define MSR_SKYLAKE_DRAM_POWER_LIMIT 0x00000618 - +#define MSR_SKYLAKE_DRAM_POWER_LIMIT 0x00000618 /** Package. DRAM Energy Status (R/O) Energy consumed by DRAM devices. @@ -3517,7 +3448,7 @@ typedef union { Msr.Uint64 = AsmReadMsr64 (MSR_SKYLAKE_DRAM_ENERGY_STATUS); @endcode **/ -#define MSR_SKYLAKE_DRAM_ENERGY_STATUS 0x00000619 +#define MSR_SKYLAKE_DRAM_ENERGY_STATUS 0x00000619 /** MSR information returned for MSR index #MSR_SKYLAKE_DRAM_ENERGY_STATUS @@ -3531,20 +3462,19 @@ typedef union { /// [Bits 31:0] Energy in 15.3 micro-joules. Requires BIOS configuration /// to enable DRAM RAPL mode 0 (Direct VR). /// - UINT32 Energy:32; - UINT32 Reserved:32; + UINT32 Energy : 32; + UINT32 Reserved : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_DRAM_ENERGY_STATUS_REGISTER; - /** Package. DRAM Performance Throttling Status (R/O) See Section 14.9.5, "DRAM RAPL Domain.". @@ -3560,8 +3490,7 @@ typedef union { Msr = AsmReadMsr64 (MSR_SKYLAKE_DRAM_PERF_STATUS); @endcode **/ -#define MSR_SKYLAKE_DRAM_PERF_STATUS 0x0000061B - +#define MSR_SKYLAKE_DRAM_PERF_STATUS 0x0000061B /** Package. DRAM RAPL Parameters (R/W) See Section 14.9.5, "DRAM RAPL Domain.". @@ -3578,8 +3507,7 @@ typedef union { AsmWriteMsr64 (MSR_SKYLAKE_DRAM_POWER_INFO, Msr); @endcode **/ -#define MSR_SKYLAKE_DRAM_POWER_INFO 0x0000061C - +#define MSR_SKYLAKE_DRAM_POWER_INFO 0x0000061C /** Package. Uncore Ratio Limit (R/W) Out of reset, the min_ratio and max_ratio @@ -3601,7 +3529,7 @@ typedef union { AsmWriteMsr64 (MSR_SKYLAKE_MSRUNCORE_RATIO_LIMIT, Msr.Uint64); @endcode **/ -#define MSR_SKYLAKE_MSRUNCORE_RATIO_LIMIT 0x00000620 +#define MSR_SKYLAKE_MSRUNCORE_RATIO_LIMIT 0x00000620 /** MSR information returned for MSR index #MSR_SKYLAKE_MSRUNCORE_RATIO_LIMIT @@ -3615,27 +3543,26 @@ typedef union { /// [Bits 6:0] MAX_RATIO This field is used to limit the max ratio of the /// LLC/Ring. /// - UINT32 MAX_RATIO:7; - UINT32 Reserved1:1; + UINT32 MAX_RATIO : 7; + UINT32 Reserved1 : 1; /// /// [Bits 14:8] MIN_RATIO Writing to this field controls the minimum /// possible ratio of the LLC/Ring. /// - UINT32 MIN_RATIO:7; - UINT32 Reserved2:17; - UINT32 Reserved3:32; + UINT32 MIN_RATIO : 7; + UINT32 Reserved2 : 17; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_MSRUNCORE_RATIO_LIMIT_REGISTER; - /** Package. Reserved (R/O) Reads return 0. @@ -3650,8 +3577,7 @@ typedef union { Msr = AsmReadMsr64 (MSR_SKYLAKE_PP0_ENERGY_STATUS); @endcode **/ -#define MSR_SKYLAKE_PP0_ENERGY_STATUS 0x00000639 - +#define MSR_SKYLAKE_PP0_ENERGY_STATUS 0x00000639 /** THREAD. Monitoring Event Select Register (R/W) If CPUID.(EAX=07H, @@ -3671,7 +3597,7 @@ typedef union { AsmWriteMsr64 (MSR_SKYLAKE_IA32_QM_EVTSEL, Msr.Uint64); @endcode **/ -#define MSR_SKYLAKE_IA32_QM_EVTSEL 0x00000C8D +#define MSR_SKYLAKE_IA32_QM_EVTSEL 0x00000C8D /** MSR information returned for MSR index #MSR_SKYLAKE_IA32_QM_EVTSEL @@ -3686,21 +3612,20 @@ typedef union { /// occupancy monitoring. 0x02: Total memory bandwidth monitoring. 0x03: /// Local memory bandwidth monitoring. All other encoding reserved. /// - UINT32 EventID:8; - UINT32 Reserved1:24; + UINT32 EventID : 8; + UINT32 Reserved1 : 24; /// /// [Bits 41:32] RMID (RW). /// - UINT32 RMID:10; - UINT32 Reserved2:22; + UINT32 RMID : 10; + UINT32 Reserved2 : 22; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_IA32_QM_EVTSEL_REGISTER; - /** THREAD. Resource Association Register (R/W). @@ -3718,7 +3643,7 @@ typedef union { AsmWriteMsr64 (MSR_SKYLAKE_IA32_PQR_ASSOC, Msr.Uint64); @endcode **/ -#define MSR_SKYLAKE_IA32_PQR_ASSOC 0x00000C8F +#define MSR_SKYLAKE_IA32_PQR_ASSOC 0x00000C8F /** MSR information returned for MSR index #MSR_SKYLAKE_IA32_PQR_ASSOC @@ -3731,21 +3656,20 @@ typedef union { /// /// [Bits 9:0] RMID. /// - UINT32 RMID:10; - UINT32 Reserved1:22; + UINT32 RMID : 10; + UINT32 Reserved1 : 22; /// /// [Bits 51:32] COS (R/W). /// - UINT32 COS:20; - UINT32 Reserved2:12; + UINT32 COS : 20; + UINT32 Reserved2 : 12; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_IA32_PQR_ASSOC_REGISTER; - /** Package. L3 Class Of Service Mask - COS N (R/W) If CPUID.(EAX=10H, ECX=1):EDX.COS_MAX[15:0] >=0. @@ -3764,22 +3688,22 @@ typedef union { AsmWriteMsr64 (MSR_SKYLAKE_IA32_L3_QOS_MASK_N, Msr.Uint64); @endcode **/ -#define MSR_SKYLAKE_IA32_L3_QOS_MASK_0 0x00000C90 -#define MSR_SKYLAKE_IA32_L3_QOS_MASK_1 0x00000C91 -#define MSR_SKYLAKE_IA32_L3_QOS_MASK_2 0x00000C92 -#define MSR_SKYLAKE_IA32_L3_QOS_MASK_3 0x00000C93 -#define MSR_SKYLAKE_IA32_L3_QOS_MASK_4 0x00000C94 -#define MSR_SKYLAKE_IA32_L3_QOS_MASK_5 0x00000C95 -#define MSR_SKYLAKE_IA32_L3_QOS_MASK_6 0x00000C96 -#define MSR_SKYLAKE_IA32_L3_QOS_MASK_7 0x00000C97 -#define MSR_SKYLAKE_IA32_L3_QOS_MASK_8 0x00000C98 -#define MSR_SKYLAKE_IA32_L3_QOS_MASK_9 0x00000C99 -#define MSR_SKYLAKE_IA32_L3_QOS_MASK_10 0x00000C9A -#define MSR_SKYLAKE_IA32_L3_QOS_MASK_11 0x00000C9B -#define MSR_SKYLAKE_IA32_L3_QOS_MASK_12 0x00000C9C -#define MSR_SKYLAKE_IA32_L3_QOS_MASK_13 0x00000C9D -#define MSR_SKYLAKE_IA32_L3_QOS_MASK_14 0x00000C9E -#define MSR_SKYLAKE_IA32_L3_QOS_MASK_15 0x00000C9F +#define MSR_SKYLAKE_IA32_L3_QOS_MASK_0 0x00000C90 +#define MSR_SKYLAKE_IA32_L3_QOS_MASK_1 0x00000C91 +#define MSR_SKYLAKE_IA32_L3_QOS_MASK_2 0x00000C92 +#define MSR_SKYLAKE_IA32_L3_QOS_MASK_3 0x00000C93 +#define MSR_SKYLAKE_IA32_L3_QOS_MASK_4 0x00000C94 +#define MSR_SKYLAKE_IA32_L3_QOS_MASK_5 0x00000C95 +#define MSR_SKYLAKE_IA32_L3_QOS_MASK_6 0x00000C96 +#define MSR_SKYLAKE_IA32_L3_QOS_MASK_7 0x00000C97 +#define MSR_SKYLAKE_IA32_L3_QOS_MASK_8 0x00000C98 +#define MSR_SKYLAKE_IA32_L3_QOS_MASK_9 0x00000C99 +#define MSR_SKYLAKE_IA32_L3_QOS_MASK_10 0x00000C9A +#define MSR_SKYLAKE_IA32_L3_QOS_MASK_11 0x00000C9B +#define MSR_SKYLAKE_IA32_L3_QOS_MASK_12 0x00000C9C +#define MSR_SKYLAKE_IA32_L3_QOS_MASK_13 0x00000C9D +#define MSR_SKYLAKE_IA32_L3_QOS_MASK_14 0x00000C9E +#define MSR_SKYLAKE_IA32_L3_QOS_MASK_15 0x00000C9F /** MSR information returned for MSR index #MSR_SKYLAKE_IA32_L3_QOS_MASK_N @@ -3792,19 +3716,18 @@ typedef union { /// /// [Bit 19:0] CBM: Bit vector of available L3 ways for COS N enforcement. /// - UINT32 CBM:20; - UINT32 Reserved2:12; - UINT32 Reserved3:32; + UINT32 CBM : 20; + UINT32 Reserved2 : 12; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_SKYLAKE_IA32_L3_QOS_MASK_REGISTER; - #endif diff --git a/MdePkg/Include/Register/Intel/Msr/Xeon5600Msr.h b/MdePkg/Include/Register/Intel/Msr/Xeon5600Msr.h index 01293ff..383e3ea 100644 --- a/MdePkg/Include/Register/Intel/Msr/Xeon5600Msr.h +++ b/MdePkg/Include/Register/Intel/Msr/Xeon5600Msr.h @@ -56,7 +56,7 @@ @endcode @note MSR_XEON_5600_FEATURE_CONFIG is defined as MSR_FEATURE_CONFIG in SDM. **/ -#define MSR_XEON_5600_FEATURE_CONFIG 0x0000013C +#define MSR_XEON_5600_FEATURE_CONFIG 0x0000013C /** MSR information returned for MSR index #MSR_XEON_5600_FEATURE_CONFIG @@ -75,21 +75,20 @@ typedef union { /// 01b, AES instruction can be mis-configured if a privileged agent /// unintentionally writes 11b. /// - UINT32 AESConfiguration:2; - UINT32 Reserved1:30; - UINT32 Reserved2:32; + UINT32 AESConfiguration : 2; + UINT32 Reserved1 : 30; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_5600_FEATURE_CONFIG_REGISTER; - /** Thread. Offcore Response Event Select Register (R/W). @@ -106,8 +105,7 @@ typedef union { @endcode @note MSR_XEON_5600_OFFCORE_RSP_1 is defined as MSR_OFFCORE_RSP_1 in SDM. **/ -#define MSR_XEON_5600_OFFCORE_RSP_1 0x000001A7 - +#define MSR_XEON_5600_OFFCORE_RSP_1 0x000001A7 /** Package. Maximum Ratio Limit of Turbo Mode RO if MSR_PLATFORM_INFO.[28] = 0, @@ -127,7 +125,7 @@ typedef union { @endcode @note MSR_XEON_5600_TURBO_RATIO_LIMIT is defined as MSR_TURBO_RATIO_LIMIT in SDM. **/ -#define MSR_XEON_5600_TURBO_RATIO_LIMIT 0x000001AD +#define MSR_XEON_5600_TURBO_RATIO_LIMIT 0x000001AD /** MSR information returned for MSR index #MSR_XEON_5600_TURBO_RATIO_LIMIT_REGISTER @@ -141,41 +139,40 @@ typedef union { /// [Bits 7:0] Package. Maximum Ratio Limit for 1C Maximum turbo ratio /// limit of 1 core active. /// - UINT32 Maximum1C:8; + UINT32 Maximum1C : 8; /// /// [Bits 15:8] Package. Maximum Ratio Limit for 2C Maximum turbo ratio /// limit of 2 core active. /// - UINT32 Maximum2C:8; + UINT32 Maximum2C : 8; /// /// [Bits 23:16] Package. Maximum Ratio Limit for 3C Maximum turbo ratio /// limit of 3 core active. /// - UINT32 Maximum3C:8; + UINT32 Maximum3C : 8; /// /// [Bits 31:24] Package. Maximum Ratio Limit for 4C Maximum turbo ratio /// limit of 4 core active. /// - UINT32 Maximum4C:8; + UINT32 Maximum4C : 8; /// /// [Bits 39:32] Package. Maximum Ratio Limit for 5C Maximum turbo ratio /// limit of 5 core active. /// - UINT32 Maximum5C:8; + UINT32 Maximum5C : 8; /// /// [Bits 47:40] Package. Maximum Ratio Limit for 6C Maximum turbo ratio /// limit of 6 core active. /// - UINT32 Maximum6C:8; - UINT32 Reserved:16; + UINT32 Maximum6C : 8; + UINT32 Reserved : 16; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_5600_TURBO_RATIO_LIMIT_REGISTER; - /** Package. See Table 2-2. @@ -192,6 +189,6 @@ typedef union { @endcode @note MSR_XEON_5600_IA32_ENERGY_PERF_BIAS is defined as IA32_ENERGY_PERF_BIAS in SDM. **/ -#define MSR_XEON_5600_IA32_ENERGY_PERF_BIAS 0x000001B0 +#define MSR_XEON_5600_IA32_ENERGY_PERF_BIAS 0x000001B0 #endif diff --git a/MdePkg/Include/Register/Intel/Msr/XeonDMsr.h b/MdePkg/Include/Register/Intel/Msr/XeonDMsr.h index f742aeb..0dd0d79 100644 --- a/MdePkg/Include/Register/Intel/Msr/XeonDMsr.h +++ b/MdePkg/Include/Register/Intel/Msr/XeonDMsr.h @@ -55,7 +55,7 @@ @endcode @note MSR_XEON_D_PPIN_CTL is defined as MSR_PPIN_CTL in SDM. **/ -#define MSR_XEON_D_PPIN_CTL 0x0000004E +#define MSR_XEON_D_PPIN_CTL 0x0000004E /** MSR information returned for MSR index #MSR_XEON_D_PPIN_CTL @@ -68,25 +68,24 @@ typedef union { /// /// [Bit 0] LockOut (R/WO) See Table 2-25. /// - UINT32 LockOut:1; + UINT32 LockOut : 1; /// /// [Bit 1] Enable_PPIN (R/W) See Table 2-25. /// - UINT32 Enable_PPIN:1; - UINT32 Reserved1:30; - UINT32 Reserved2:32; + UINT32 Enable_PPIN : 1; + UINT32 Reserved1 : 30; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_D_PPIN_CTL_REGISTER; - /** Package. Protected Processor Inventory Number (R/O). Protected Processor Inventory Number (R/O) See Table 2-25. @@ -103,8 +102,7 @@ typedef union { @endcode @note MSR_XEON_D_PPIN is defined as MSR_PPIN in SDM. **/ -#define MSR_XEON_D_PPIN 0x0000004F - +#define MSR_XEON_D_PPIN 0x0000004F /** Package. See http://biosbits.org. @@ -124,7 +122,7 @@ typedef union { @endcode @note MSR_XEON_D_PLATFORM_INFO is defined as MSR_PLATFORM_INFO in SDM. **/ -#define MSR_XEON_D_PLATFORM_INFO 0x000000CE +#define MSR_XEON_D_PLATFORM_INFO 0x000000CE /** MSR information returned for MSR index #MSR_XEON_D_PLATFORM_INFO @@ -134,46 +132,45 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:8; + UINT32 Reserved1 : 8; /// /// [Bits 15:8] Package. Maximum Non-Turbo Ratio (R/O) See Table 2-25. /// - UINT32 MaximumNonTurboRatio:8; - UINT32 Reserved2:7; + UINT32 MaximumNonTurboRatio : 8; + UINT32 Reserved2 : 7; /// /// [Bit 23] Package. PPIN_CAP (R/O) See Table 2-25. /// - UINT32 PPIN_CAP:1; - UINT32 Reserved3:4; + UINT32 PPIN_CAP : 1; + UINT32 Reserved3 : 4; /// /// [Bit 28] Package. Programmable Ratio Limit for Turbo Mode (R/O) See /// Table 2-25. /// - UINT32 RatioLimit:1; + UINT32 RatioLimit : 1; /// /// [Bit 29] Package. Programmable TDP Limit for Turbo Mode (R/O) See /// Table 2-25. /// - UINT32 TDPLimit:1; + UINT32 TDPLimit : 1; /// /// [Bit 30] Package. Programmable TJ OFFSET (R/O) See Table 2-25. /// - UINT32 TJOFFSET:1; - UINT32 Reserved4:1; - UINT32 Reserved5:8; + UINT32 TJOFFSET : 1; + UINT32 Reserved4 : 1; + UINT32 Reserved5 : 8; /// /// [Bits 47:40] Package. Maximum Efficiency Ratio (R/O) See Table 2-25. /// - UINT32 MaximumEfficiencyRatio:8; - UINT32 Reserved6:16; + UINT32 MaximumEfficiencyRatio : 8; + UINT32 Reserved6 : 16; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_D_PLATFORM_INFO_REGISTER; - /** Core. C-State Configuration Control (R/W) Note: C-state values are processor specific C-state code names, unrelated to MWAIT extension C-state parameters @@ -194,7 +191,7 @@ typedef union { @endcode @note MSR_XEON_D_PKG_CST_CONFIG_CONTROL is defined as MSR_PKG_CST_CONFIG_CONTROL in SDM. **/ -#define MSR_XEON_D_PKG_CST_CONFIG_CONTROL 0x000000E2 +#define MSR_XEON_D_PKG_CST_CONFIG_CONTROL 0x000000E2 /** MSR information returned for MSR index #MSR_XEON_D_PKG_CST_CONFIG_CONTROL @@ -213,61 +210,60 @@ typedef union { /// 011b: C6 (retention) 111b: No Package C state limits. All C states /// supported by the processor are available. /// - UINT32 Limit:3; - UINT32 Reserved1:7; + UINT32 Limit : 3; + UINT32 Reserved1 : 7; /// /// [Bit 10] I/O MWAIT Redirection Enable (R/W). /// - UINT32 IO_MWAIT:1; - UINT32 Reserved2:4; + UINT32 IO_MWAIT : 1; + UINT32 Reserved2 : 4; /// /// [Bit 15] CFG Lock (R/WO). /// - UINT32 CFGLock:1; + UINT32 CFGLock : 1; /// /// [Bit 16] Automatic C-State Conversion Enable (R/W) If 1, the processor /// will convert HALT or MWAT(C1) to MWAIT(C6). /// - UINT32 CStateConversion:1; - UINT32 Reserved3:8; + UINT32 CStateConversion : 1; + UINT32 Reserved3 : 8; /// /// [Bit 25] C3 State Auto Demotion Enable (R/W). /// - UINT32 C3AutoDemotion:1; + UINT32 C3AutoDemotion : 1; /// /// [Bit 26] C1 State Auto Demotion Enable (R/W). /// - UINT32 C1AutoDemotion:1; + UINT32 C1AutoDemotion : 1; /// /// [Bit 27] Enable C3 Undemotion (R/W). /// - UINT32 C3Undemotion:1; + UINT32 C3Undemotion : 1; /// /// [Bit 28] Enable C1 Undemotion (R/W). /// - UINT32 C1Undemotion:1; + UINT32 C1Undemotion : 1; /// /// [Bit 29] Package C State Demotion Enable (R/W). /// - UINT32 CStateDemotion:1; + UINT32 CStateDemotion : 1; /// /// [Bit 30] Package C State UnDemotion Enable (R/W). /// - UINT32 CStateUndemotion:1; - UINT32 Reserved4:1; - UINT32 Reserved5:32; + UINT32 CStateUndemotion : 1; + UINT32 Reserved4 : 1; + UINT32 Reserved5 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_D_PKG_CST_CONFIG_CONTROL_REGISTER; - /** Thread. Global Machine Check Capability (R/O). @@ -285,7 +281,7 @@ typedef union { @endcode @note MSR_XEON_D_IA32_MCG_CAP is defined as IA32_MCG_CAP in SDM. **/ -#define MSR_XEON_D_IA32_MCG_CAP 0x00000179 +#define MSR_XEON_D_IA32_MCG_CAP 0x00000179 /** MSR information returned for MSR index #MSR_XEON_D_IA32_MCG_CAP @@ -298,54 +294,53 @@ typedef union { /// /// [Bits 7:0] Count. /// - UINT32 Count:8; + UINT32 Count : 8; /// /// [Bit 8] MCG_CTL_P. /// - UINT32 MCG_CTL_P:1; + UINT32 MCG_CTL_P : 1; /// /// [Bit 9] MCG_EXT_P. /// - UINT32 MCG_EXT_P:1; + UINT32 MCG_EXT_P : 1; /// /// [Bit 10] MCP_CMCI_P. /// - UINT32 MCP_CMCI_P:1; + UINT32 MCP_CMCI_P : 1; /// /// [Bit 11] MCG_TES_P. /// - UINT32 MCG_TES_P:1; - UINT32 Reserved1:4; + UINT32 MCG_TES_P : 1; + UINT32 Reserved1 : 4; /// /// [Bits 23:16] MCG_EXT_CNT. /// - UINT32 MCG_EXT_CNT:8; + UINT32 MCG_EXT_CNT : 8; /// /// [Bit 24] MCG_SER_P. /// - UINT32 MCG_SER_P:1; + UINT32 MCG_SER_P : 1; /// /// [Bit 25] MCG_EM_P. /// - UINT32 MCG_EM_P:1; + UINT32 MCG_EM_P : 1; /// /// [Bit 26] MCG_ELOG_P. /// - UINT32 MCG_ELOG_P:1; - UINT32 Reserved2:5; - UINT32 Reserved3:32; + UINT32 MCG_ELOG_P : 1; + UINT32 Reserved2 : 5; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_D_IA32_MCG_CAP_REGISTER; - /** THREAD. Enhanced SMM Capabilities (SMM-RO) Reports SMM capability Enhancement. Accessible only while in SMM. @@ -365,7 +360,7 @@ typedef union { @endcode @note MSR_XEON_D_SMM_MCA_CAP is defined as MSR_SMM_MCA_CAP in SDM. **/ -#define MSR_XEON_D_SMM_MCA_CAP 0x0000017D +#define MSR_XEON_D_SMM_MCA_CAP 0x0000017D /** MSR information returned for MSR index #MSR_XEON_D_SMM_MCA_CAP @@ -375,29 +370,28 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:32; - UINT32 Reserved2:26; + UINT32 Reserved1 : 32; + UINT32 Reserved2 : 26; /// /// [Bit 58] SMM_Code_Access_Chk (SMM-RO) If set to 1 indicates that the /// SMM code access restriction is supported and a host-space interface /// available to SMM handler. /// - UINT32 SMM_Code_Access_Chk:1; + UINT32 SMM_Code_Access_Chk : 1; /// /// [Bit 59] Long_Flow_Indication (SMM-RO) If set to 1 indicates that the /// SMM long flow indicator is supported and a host-space interface /// available to SMM handler. /// - UINT32 Long_Flow_Indication:1; - UINT32 Reserved3:4; + UINT32 Long_Flow_Indication : 1; + UINT32 Reserved3 : 4; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_D_SMM_MCA_CAP_REGISTER; - /** Package. @@ -416,7 +410,7 @@ typedef union { @endcode @note MSR_XEON_D_TEMPERATURE_TARGET is defined as MSR_TEMPERATURE_TARGET in SDM. **/ -#define MSR_XEON_D_TEMPERATURE_TARGET 0x000001A2 +#define MSR_XEON_D_TEMPERATURE_TARGET 0x000001A2 /** MSR information returned for MSR index #MSR_XEON_D_TEMPERATURE_TARGET @@ -426,29 +420,28 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:16; + UINT32 Reserved1 : 16; /// /// [Bits 23:16] Temperature Target (RO) See Table 2-25. /// - UINT32 TemperatureTarget:8; + UINT32 TemperatureTarget : 8; /// /// [Bits 27:24] TCC Activation Offset (R/W) See Table 2-25. /// - UINT32 TCCActivationOffset:4; - UINT32 Reserved2:4; - UINT32 Reserved3:32; + UINT32 TCCActivationOffset : 4; + UINT32 Reserved2 : 4; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_D_TEMPERATURE_TARGET_REGISTER; - /** Package. Maximum Ratio Limit of Turbo Mode RO if MSR_PLATFORM_INFO.[28] = 0, RW if MSR_PLATFORM_INFO.[28] = 1. @@ -467,7 +460,7 @@ typedef union { @endcode @note MSR_XEON_D_TURBO_RATIO_LIMIT is defined as MSR_TURBO_RATIO_LIMIT in SDM. **/ -#define MSR_XEON_D_TURBO_RATIO_LIMIT 0x000001AD +#define MSR_XEON_D_TURBO_RATIO_LIMIT 0x000001AD /** MSR information returned for MSR index #MSR_XEON_D_TURBO_RATIO_LIMIT @@ -480,43 +473,42 @@ typedef union { /// /// [Bits 7:0] Package. Maximum Ratio Limit for 1C. /// - UINT32 Maximum1C:8; + UINT32 Maximum1C : 8; /// /// [Bits 15:8] Package. Maximum Ratio Limit for 2C. /// - UINT32 Maximum2C:8; + UINT32 Maximum2C : 8; /// /// [Bits 23:16] Package. Maximum Ratio Limit for 3C. /// - UINT32 Maximum3C:8; + UINT32 Maximum3C : 8; /// /// [Bits 31:24] Package. Maximum Ratio Limit for 4C. /// - UINT32 Maximum4C:8; + UINT32 Maximum4C : 8; /// /// [Bits 39:32] Package. Maximum Ratio Limit for 5C. /// - UINT32 Maximum5C:8; + UINT32 Maximum5C : 8; /// /// [Bits 47:40] Package. Maximum Ratio Limit for 6C. /// - UINT32 Maximum6C:8; + UINT32 Maximum6C : 8; /// /// [Bits 55:48] Package. Maximum Ratio Limit for 7C. /// - UINT32 Maximum7C:8; + UINT32 Maximum7C : 8; /// /// [Bits 63:56] Package. Maximum Ratio Limit for 8C. /// - UINT32 Maximum8C:8; + UINT32 Maximum8C : 8; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_D_TURBO_RATIO_LIMIT_REGISTER; - /** Package. Maximum Ratio Limit of Turbo Mode RO if MSR_PLATFORM_INFO.[28] = 0, RW if MSR_PLATFORM_INFO.[28] = 1. @@ -535,7 +527,7 @@ typedef union { @endcode @note MSR_XEON_D_TURBO_RATIO_LIMIT1 is defined as MSR_TURBO_RATIO_LIMIT1 in SDM. **/ -#define MSR_XEON_D_TURBO_RATIO_LIMIT1 0x000001AE +#define MSR_XEON_D_TURBO_RATIO_LIMIT1 0x000001AE /** MSR information returned for MSR index #MSR_XEON_D_TURBO_RATIO_LIMIT1 @@ -548,43 +540,42 @@ typedef union { /// /// [Bits 7:0] Package. Maximum Ratio Limit for 9C. /// - UINT32 Maximum9C:8; + UINT32 Maximum9C : 8; /// /// [Bits 15:8] Package. Maximum Ratio Limit for 10C. /// - UINT32 Maximum10C:8; + UINT32 Maximum10C : 8; /// /// [Bits 23:16] Package. Maximum Ratio Limit for 11C. /// - UINT32 Maximum11C:8; + UINT32 Maximum11C : 8; /// /// [Bits 31:24] Package. Maximum Ratio Limit for 12C. /// - UINT32 Maximum12C:8; + UINT32 Maximum12C : 8; /// /// [Bits 39:32] Package. Maximum Ratio Limit for 13C. /// - UINT32 Maximum13C:8; + UINT32 Maximum13C : 8; /// /// [Bits 47:40] Package. Maximum Ratio Limit for 14C. /// - UINT32 Maximum14C:8; + UINT32 Maximum14C : 8; /// /// [Bits 55:48] Package. Maximum Ratio Limit for 15C. /// - UINT32 Maximum15C:8; + UINT32 Maximum15C : 8; /// /// [Bits 63:56] Package. Maximum Ratio Limit for 16C. /// - UINT32 Maximum16C:8; + UINT32 Maximum16C : 8; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_D_TURBO_RATIO_LIMIT1_REGISTER; - /** Package. Unit Multipliers used in RAPL Interfaces (R/O). @@ -602,7 +593,7 @@ typedef union { @endcode @note MSR_XEON_D_RAPL_POWER_UNIT is defined as MSR_RAPL_POWER_UNIT in SDM. **/ -#define MSR_XEON_D_RAPL_POWER_UNIT 0x00000606 +#define MSR_XEON_D_RAPL_POWER_UNIT 0x00000606 /** MSR information returned for MSR index #MSR_XEON_D_RAPL_POWER_UNIT @@ -615,35 +606,34 @@ typedef union { /// /// [Bits 3:0] Package. Power Units See Section 14.9.1, "RAPL Interfaces.". /// - UINT32 PowerUnits:4; - UINT32 Reserved1:4; + UINT32 PowerUnits : 4; + UINT32 Reserved1 : 4; /// /// [Bits 12:8] Package. Energy Status Units Energy related information /// (in Joules) is based on the multiplier, 1/2^ESU; where ESU is an /// unsigned integer represented by bits 12:8. Default value is 0EH (or 61 /// micro-joules). /// - UINT32 EnergyStatusUnits:5; - UINT32 Reserved2:3; + UINT32 EnergyStatusUnits : 5; + UINT32 Reserved2 : 3; /// /// [Bits 19:16] Package. Time Units See Section 14.9.1, "RAPL /// Interfaces.". /// - UINT32 TimeUnits:4; - UINT32 Reserved3:12; - UINT32 Reserved4:32; + UINT32 TimeUnits : 4; + UINT32 Reserved3 : 12; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_D_RAPL_POWER_UNIT_REGISTER; - /** Package. DRAM RAPL Power Limit Control (R/W) See Section 14.9.5, "DRAM RAPL Domain.". @@ -661,8 +651,7 @@ typedef union { @endcode @note MSR_XEON_D_DRAM_POWER_LIMIT is defined as MSR_DRAM_POWER_LIMIT in SDM. **/ -#define MSR_XEON_D_DRAM_POWER_LIMIT 0x00000618 - +#define MSR_XEON_D_DRAM_POWER_LIMIT 0x00000618 /** Package. DRAM Energy Status (R/O) Energy consumed by DRAM devices. @@ -681,7 +670,7 @@ typedef union { @endcode @note MSR_XEON_D_DRAM_ENERGY_STATUS is defined as MSR_DRAM_ENERGY_STATUS in SDM. **/ -#define MSR_XEON_D_DRAM_ENERGY_STATUS 0x00000619 +#define MSR_XEON_D_DRAM_ENERGY_STATUS 0x00000619 /** MSR information returned for MSR index #MSR_XEON_D_DRAM_ENERGY_STATUS @@ -695,20 +684,19 @@ typedef union { /// [Bits 31:0] Energy in 15.3 micro-joules. Requires BIOS configuration /// to enable DRAM RAPL mode 0 (Direct VR). /// - UINT32 Energy:32; - UINT32 Reserved:32; + UINT32 Energy : 32; + UINT32 Reserved : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_D_DRAM_ENERGY_STATUS_REGISTER; - /** Package. DRAM Performance Throttling Status (R/O) See Section 14.9.5, "DRAM RAPL Domain.". @@ -725,8 +713,7 @@ typedef union { @endcode @note MSR_XEON_D_DRAM_PERF_STATUS is defined as MSR_DRAM_PERF_STATUS in SDM. **/ -#define MSR_XEON_D_DRAM_PERF_STATUS 0x0000061B - +#define MSR_XEON_D_DRAM_PERF_STATUS 0x0000061B /** Package. DRAM RAPL Parameters (R/W) See Section 14.9.5, "DRAM RAPL Domain.". @@ -744,8 +731,7 @@ typedef union { @endcode @note MSR_XEON_D_DRAM_POWER_INFO is defined as MSR_DRAM_POWER_INFO in SDM. **/ -#define MSR_XEON_D_DRAM_POWER_INFO 0x0000061C - +#define MSR_XEON_D_DRAM_POWER_INFO 0x0000061C /** Package. Uncore Ratio Limit (R/W) Out of reset, the min_ratio and max_ratio @@ -767,7 +753,7 @@ typedef union { AsmWriteMsr64 (MSR_XEON_D_MSRUNCORE_RATIO_LIMIT, Msr.Uint64); @endcode **/ -#define MSR_XEON_D_MSRUNCORE_RATIO_LIMIT 0x00000620 +#define MSR_XEON_D_MSRUNCORE_RATIO_LIMIT 0x00000620 /** MSR information returned for MSR index #MSR_XEON_D_MSRUNCORE_RATIO_LIMIT @@ -781,24 +767,24 @@ typedef union { /// [Bits 6:0] MAX_RATIO This field is used to limit the max ratio of the /// LLC/Ring. /// - UINT32 MAX_RATIO:7; - UINT32 Reserved1:1; + UINT32 MAX_RATIO : 7; + UINT32 Reserved1 : 1; /// /// [Bits 14:8] MIN_RATIO Writing to this field controls the minimum /// possible ratio of the LLC/Ring. /// - UINT32 MIN_RATIO:7; - UINT32 Reserved2:17; - UINT32 Reserved3:32; + UINT32 MIN_RATIO : 7; + UINT32 Reserved2 : 17; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_D_MSRUNCORE_RATIO_LIMIT_REGISTER; /** @@ -816,8 +802,7 @@ typedef union { @endcode @note MSR_XEON_D_PP0_ENERGY_STATUS is defined as MSR_PP0_ENERGY_STATUS in SDM. **/ -#define MSR_XEON_D_PP0_ENERGY_STATUS 0x00000639 - +#define MSR_XEON_D_PP0_ENERGY_STATUS 0x00000639 /** Package. Indicator of Frequency Clipping in Processor Cores (R/W) (frequency @@ -838,7 +823,7 @@ typedef union { @endcode @note MSR_XEON_D_CORE_PERF_LIMIT_REASONS is defined as MSR_CORE_PERF_LIMIT_REASONS in SDM. **/ -#define MSR_XEON_D_CORE_PERF_LIMIT_REASONS 0x00000690 +#define MSR_XEON_D_CORE_PERF_LIMIT_REASONS 0x00000690 /** MSR information returned for MSR index #MSR_XEON_D_CORE_PERF_LIMIT_REASONS @@ -853,152 +838,151 @@ typedef union { /// reduced below the operating system request due to assertion of /// external PROCHOT. /// - UINT32 PROCHOT_Status:1; + UINT32 PROCHOT_Status : 1; /// /// [Bit 1] Thermal Status (R0) When set, frequency is reduced below the /// operating system request due to a thermal event. /// - UINT32 ThermalStatus:1; + UINT32 ThermalStatus : 1; /// /// [Bit 2] Power Budget Management Status (R0) When set, frequency is /// reduced below the operating system request due to PBM limit. /// - UINT32 PowerBudgetManagementStatus:1; + UINT32 PowerBudgetManagementStatus : 1; /// /// [Bit 3] Platform Configuration Services Status (R0) When set, /// frequency is reduced below the operating system request due to PCS /// limit. /// - UINT32 PlatformConfigurationServicesStatus:1; - UINT32 Reserved1:1; + UINT32 PlatformConfigurationServicesStatus : 1; + UINT32 Reserved1 : 1; /// /// [Bit 5] Autonomous Utilization-Based Frequency Control Status (R0) /// When set, frequency is reduced below the operating system request /// because the processor has detected that utilization is low. /// - UINT32 AutonomousUtilizationBasedFrequencyControlStatus:1; + UINT32 AutonomousUtilizationBasedFrequencyControlStatus : 1; /// /// [Bit 6] VR Therm Alert Status (R0) When set, frequency is reduced /// below the operating system request due to a thermal alert from the /// Voltage Regulator. /// - UINT32 VRThermAlertStatus:1; - UINT32 Reserved2:1; + UINT32 VRThermAlertStatus : 1; + UINT32 Reserved2 : 1; /// /// [Bit 8] Electrical Design Point Status (R0) When set, frequency is /// reduced below the operating system request due to electrical design /// point constraints (e.g. maximum electrical current consumption). /// - UINT32 ElectricalDesignPointStatus:1; - UINT32 Reserved3:1; + UINT32 ElectricalDesignPointStatus : 1; + UINT32 Reserved3 : 1; /// /// [Bit 10] Multi-Core Turbo Status (R0) When set, frequency is reduced /// below the operating system request due to Multi-Core Turbo limits. /// - UINT32 MultiCoreTurboStatus:1; - UINT32 Reserved4:2; + UINT32 MultiCoreTurboStatus : 1; + UINT32 Reserved4 : 2; /// /// [Bit 13] Core Frequency P1 Status (R0) When set, frequency is reduced /// below max non-turbo P1. /// - UINT32 FrequencyP1Status:1; + UINT32 FrequencyP1Status : 1; /// /// [Bit 14] Core Max n-core Turbo Frequency Limiting Status (R0) When /// set, frequency is reduced below max n-core turbo frequency. /// - UINT32 TurboFrequencyLimitingStatus:1; + UINT32 TurboFrequencyLimitingStatus : 1; /// /// [Bit 15] Core Frequency Limiting Status (R0) When set, frequency is /// reduced below the operating system request. /// - UINT32 FrequencyLimitingStatus:1; + UINT32 FrequencyLimitingStatus : 1; /// /// [Bit 16] PROCHOT Log When set, indicates that the PROCHOT Status bit /// has asserted since the log bit was last cleared. This log bit will /// remain set until cleared by software writing 0. /// - UINT32 PROCHOT_Log:1; + UINT32 PROCHOT_Log : 1; /// /// [Bit 17] Thermal Log When set, indicates that the Thermal Status bit /// has asserted since the log bit was last cleared. This log bit will /// remain set until cleared by software writing 0. /// - UINT32 ThermalLog:1; + UINT32 ThermalLog : 1; /// /// [Bit 18] Power Budget Management Log When set, indicates that the PBM /// Status bit has asserted since the log bit was last cleared. This log /// bit will remain set until cleared by software writing 0. /// - UINT32 PowerBudgetManagementLog:1; + UINT32 PowerBudgetManagementLog : 1; /// /// [Bit 19] Platform Configuration Services Log When set, indicates that /// the PCS Status bit has asserted since the log bit was last cleared. /// This log bit will remain set until cleared by software writing 0. /// - UINT32 PlatformConfigurationServicesLog:1; - UINT32 Reserved5:1; + UINT32 PlatformConfigurationServicesLog : 1; + UINT32 Reserved5 : 1; /// /// [Bit 21] Autonomous Utilization-Based Frequency Control Log When set, /// indicates that the AUBFC Status bit has asserted since the log bit was /// last cleared. This log bit will remain set until cleared by software /// writing 0. /// - UINT32 AutonomousUtilizationBasedFrequencyControlLog:1; + UINT32 AutonomousUtilizationBasedFrequencyControlLog : 1; /// /// [Bit 22] VR Therm Alert Log When set, indicates that the VR Therm /// Alert Status bit has asserted since the log bit was last cleared. This /// log bit will remain set until cleared by software writing 0. /// - UINT32 VRThermAlertLog:1; - UINT32 Reserved6:1; + UINT32 VRThermAlertLog : 1; + UINT32 Reserved6 : 1; /// /// [Bit 24] Electrical Design Point Log When set, indicates that the EDP /// Status bit has asserted since the log bit was last cleared. This log /// bit will remain set until cleared by software writing 0. /// - UINT32 ElectricalDesignPointLog:1; - UINT32 Reserved7:1; + UINT32 ElectricalDesignPointLog : 1; + UINT32 Reserved7 : 1; /// /// [Bit 26] Multi-Core Turbo Log When set, indicates that the Multi-Core /// Turbo Status bit has asserted since the log bit was last cleared. This /// log bit will remain set until cleared by software writing 0. /// - UINT32 MultiCoreTurboLog:1; - UINT32 Reserved8:2; + UINT32 MultiCoreTurboLog : 1; + UINT32 Reserved8 : 2; /// /// [Bit 29] Core Frequency P1 Log When set, indicates that the Core /// Frequency P1 Status bit has asserted since the log bit was last /// cleared. This log bit will remain set until cleared by software /// writing 0. /// - UINT32 CoreFrequencyP1Log:1; + UINT32 CoreFrequencyP1Log : 1; /// /// [Bit 30] Core Max n-core Turbo Frequency Limiting Log When set, /// indicates that the Core Max n-core Turbo Frequency Limiting Status bit /// has asserted since the log bit was last cleared. This log bit will /// remain set until cleared by software writing 0. /// - UINT32 TurboFrequencyLimitingLog:1; + UINT32 TurboFrequencyLimitingLog : 1; /// /// [Bit 31] Core Frequency Limiting Log When set, indicates that the Core /// Frequency Limiting Status bit has asserted since the log bit was last /// cleared. This log bit will remain set until cleared by software /// writing 0. /// - UINT32 CoreFrequencyLimitingLog:1; - UINT32 Reserved9:32; + UINT32 CoreFrequencyLimitingLog : 1; + UINT32 Reserved9 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_D_CORE_PERF_LIMIT_REASONS_REGISTER; - /** THREAD. Monitoring Event Select Register (R/W) if CPUID.(EAX=07H, ECX=0):EBX.RDT-M[bit 12] = 1. @@ -1018,7 +1002,7 @@ typedef union { @endcode @note MSR_XEON_D_IA32_QM_EVTSEL is defined as IA32_QM_EVTSEL in SDM. **/ -#define MSR_XEON_D_IA32_QM_EVTSEL 0x00000C8D +#define MSR_XEON_D_IA32_QM_EVTSEL 0x00000C8D /** MSR information returned for MSR index #MSR_XEON_D_IA32_QM_EVTSEL @@ -1033,21 +1017,20 @@ typedef union { /// occupancy monitoring 0x02: Total memory bandwidth monitoring 0x03: /// Local memory bandwidth monitoring All other encoding reserved. /// - UINT32 EventID:8; - UINT32 Reserved1:24; + UINT32 EventID : 8; + UINT32 Reserved1 : 24; /// /// [Bits 41:32] RMID (RW). /// - UINT32 RMID:10; - UINT32 Reserved2:22; + UINT32 RMID : 10; + UINT32 Reserved2 : 22; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_D_IA32_QM_EVTSEL_REGISTER; - /** THREAD. Resource Association Register (R/W). @@ -1066,7 +1049,7 @@ typedef union { @endcode @note MSR_XEON_D_IA32_PQR_ASSOC is defined as IA32_PQR_ASSOC in SDM. **/ -#define MSR_XEON_D_IA32_PQR_ASSOC 0x00000C8F +#define MSR_XEON_D_IA32_PQR_ASSOC 0x00000C8F /** MSR information returned for MSR index #MSR_XEON_D_IA32_PQR_ASSOC @@ -1079,21 +1062,20 @@ typedef union { /// /// [Bits 9:0] RMID. /// - UINT32 RMID:10; - UINT32 Reserved1:22; + UINT32 RMID : 10; + UINT32 Reserved1 : 22; /// /// [Bits 51:32] COS (R/W). /// - UINT32 COS:20; - UINT32 Reserved2:12; + UINT32 COS : 20; + UINT32 Reserved2 : 12; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_D_IA32_PQR_ASSOC_REGISTER; - /** Package. L3 Class Of Service Mask - COS n (R/W) if CPUID.(EAX=10H, ECX=1):EDX.COS_MAX[15:0] >= n. @@ -1129,22 +1111,22 @@ typedef union { MSR_XEON_D_IA32_L3_QOS_MASK_15 is defined as IA32_L3_QOS_MASK_15 in SDM. @{ **/ -#define MSR_XEON_D_IA32_L3_QOS_MASK_0 0x00000C90 -#define MSR_XEON_D_IA32_L3_QOS_MASK_1 0x00000C91 -#define MSR_XEON_D_IA32_L3_QOS_MASK_2 0x00000C92 -#define MSR_XEON_D_IA32_L3_QOS_MASK_3 0x00000C93 -#define MSR_XEON_D_IA32_L3_QOS_MASK_4 0x00000C94 -#define MSR_XEON_D_IA32_L3_QOS_MASK_5 0x00000C95 -#define MSR_XEON_D_IA32_L3_QOS_MASK_6 0x00000C96 -#define MSR_XEON_D_IA32_L3_QOS_MASK_7 0x00000C97 -#define MSR_XEON_D_IA32_L3_QOS_MASK_8 0x00000C98 -#define MSR_XEON_D_IA32_L3_QOS_MASK_9 0x00000C99 -#define MSR_XEON_D_IA32_L3_QOS_MASK_10 0x00000C9A -#define MSR_XEON_D_IA32_L3_QOS_MASK_11 0x00000C9B -#define MSR_XEON_D_IA32_L3_QOS_MASK_12 0x00000C9C -#define MSR_XEON_D_IA32_L3_QOS_MASK_13 0x00000C9D -#define MSR_XEON_D_IA32_L3_QOS_MASK_14 0x00000C9E -#define MSR_XEON_D_IA32_L3_QOS_MASK_15 0x00000C9F +#define MSR_XEON_D_IA32_L3_QOS_MASK_0 0x00000C90 +#define MSR_XEON_D_IA32_L3_QOS_MASK_1 0x00000C91 +#define MSR_XEON_D_IA32_L3_QOS_MASK_2 0x00000C92 +#define MSR_XEON_D_IA32_L3_QOS_MASK_3 0x00000C93 +#define MSR_XEON_D_IA32_L3_QOS_MASK_4 0x00000C94 +#define MSR_XEON_D_IA32_L3_QOS_MASK_5 0x00000C95 +#define MSR_XEON_D_IA32_L3_QOS_MASK_6 0x00000C96 +#define MSR_XEON_D_IA32_L3_QOS_MASK_7 0x00000C97 +#define MSR_XEON_D_IA32_L3_QOS_MASK_8 0x00000C98 +#define MSR_XEON_D_IA32_L3_QOS_MASK_9 0x00000C99 +#define MSR_XEON_D_IA32_L3_QOS_MASK_10 0x00000C9A +#define MSR_XEON_D_IA32_L3_QOS_MASK_11 0x00000C9B +#define MSR_XEON_D_IA32_L3_QOS_MASK_12 0x00000C9C +#define MSR_XEON_D_IA32_L3_QOS_MASK_13 0x00000C9D +#define MSR_XEON_D_IA32_L3_QOS_MASK_14 0x00000C9E +#define MSR_XEON_D_IA32_L3_QOS_MASK_15 0x00000C9F /// @} /** @@ -1159,21 +1141,20 @@ typedef union { /// /// [Bits 19:0] CBM: Bit vector of available L3 ways for COS 0 enforcement. /// - UINT32 CBM:20; - UINT32 Reserved2:12; - UINT32 Reserved3:32; + UINT32 CBM : 20; + UINT32 Reserved2 : 12; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_D_IA32_L3_QOS_MASK_REGISTER; - /** Package. Config Ratio Limit of Turbo Mode RO if MSR_PLATFORM_INFO.[28] = 0, RW if MSR_PLATFORM_INFO.[28] = 1. @@ -1192,7 +1173,7 @@ typedef union { @endcode @note MSR_XEON_D_TURBO_RATIO_LIMIT3 is defined as MSR_TURBO_RATIO_LIMIT3 in SDM. **/ -#define MSR_XEON_D_TURBO_RATIO_LIMIT3 0x000001AC +#define MSR_XEON_D_TURBO_RATIO_LIMIT3 0x000001AC /** MSR information returned for MSR index #MSR_XEON_D_TURBO_RATIO_LIMIT3 @@ -1202,23 +1183,22 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:32; - UINT32 Reserved2:31; + UINT32 Reserved1 : 32; + UINT32 Reserved2 : 31; /// /// [Bit 63] Package. Semaphore for Turbo Ratio Limit Configuration If 1, /// the processor uses override configuration specified in /// MSR_TURBO_RATIO_LIMIT, MSR_TURBO_RATIO_LIMIT1. If 0, the processor /// uses factory-set configuration (Default). /// - UINT32 TurboRatioLimitConfigurationSemaphore:1; + UINT32 TurboRatioLimitConfigurationSemaphore : 1; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_D_TURBO_RATIO_LIMIT3_REGISTER; - /** Package. Cache Allocation Technology Configuration (R/W). @@ -1237,7 +1217,7 @@ typedef union { @endcode @note MSR_XEON_D_IA32_L3_QOS_CFG is defined as IA32_L3_QOS_CFG in SDM. **/ -#define MSR_XEON_D_IA32_L3_QOS_CFG 0x00000C81 +#define MSR_XEON_D_IA32_L3_QOS_CFG 0x00000C81 /** MSR information returned for MSR index #MSR_XEON_D_IA32_L3_QOS_CFG @@ -1250,18 +1230,18 @@ typedef union { /// /// [Bit 0] CAT Enable. Set 1 to enable Cache Allocation Technology. /// - UINT32 CAT:1; - UINT32 Reserved1:31; - UINT32 Reserved2:32; + UINT32 CAT : 1; + UINT32 Reserved1 : 31; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_D_IA32_L3_QOS_CFG_REGISTER; #endif diff --git a/MdePkg/Include/Register/Intel/Msr/XeonE7Msr.h b/MdePkg/Include/Register/Intel/Msr/XeonE7Msr.h index 6e8c61e..3a6b6b7 100644 --- a/MdePkg/Include/Register/Intel/Msr/XeonE7Msr.h +++ b/MdePkg/Include/Register/Intel/Msr/XeonE7Msr.h @@ -55,7 +55,7 @@ @endcode @note MSR_XEON_E7_FEATURE_CONFIG is defined as MSR_FEATURE_CONFIG in SDM. **/ -#define MSR_XEON_E7_FEATURE_CONFIG 0x0000013C +#define MSR_XEON_E7_FEATURE_CONFIG 0x0000013C /** MSR information returned for MSR index #MSR_XEON_E7_FEATURE_CONFIG @@ -74,21 +74,20 @@ typedef union { /// 01b, AES instruction can be mis-configured if a privileged agent /// unintentionally writes 11b. /// - UINT32 AESConfiguration:2; - UINT32 Reserved1:30; - UINT32 Reserved2:32; + UINT32 AESConfiguration : 2; + UINT32 Reserved1 : 30; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_E7_FEATURE_CONFIG_REGISTER; - /** Thread. Offcore Response Event Select Register (R/W). @@ -105,8 +104,7 @@ typedef union { @endcode @note MSR_XEON_E7_OFFCORE_RSP_1 is defined as MSR_OFFCORE_RSP_1 in SDM. **/ -#define MSR_XEON_E7_OFFCORE_RSP_1 0x000001A7 - +#define MSR_XEON_E7_OFFCORE_RSP_1 0x000001A7 /** Package. Reserved Attempt to read/write will cause #UD. @@ -124,8 +122,7 @@ typedef union { @endcode @note MSR_XEON_E7_TURBO_RATIO_LIMIT is defined as MSR_TURBO_RATIO_LIMIT in SDM. **/ -#define MSR_XEON_E7_TURBO_RATIO_LIMIT 0x000001AD - +#define MSR_XEON_E7_TURBO_RATIO_LIMIT 0x000001AD /** Package. Uncore C-box 8 perfmon local box control MSR. @@ -143,8 +140,7 @@ typedef union { @endcode @note MSR_XEON_E7_C8_PMON_BOX_CTRL is defined as MSR_C8_PMON_BOX_CTRL in SDM. **/ -#define MSR_XEON_E7_C8_PMON_BOX_CTRL 0x00000F40 - +#define MSR_XEON_E7_C8_PMON_BOX_CTRL 0x00000F40 /** Package. Uncore C-box 8 perfmon local box status MSR. @@ -162,8 +158,7 @@ typedef union { @endcode @note MSR_XEON_E7_C8_PMON_BOX_STATUS is defined as MSR_C8_PMON_BOX_STATUS in SDM. **/ -#define MSR_XEON_E7_C8_PMON_BOX_STATUS 0x00000F41 - +#define MSR_XEON_E7_C8_PMON_BOX_STATUS 0x00000F41 /** Package. Uncore C-box 8 perfmon local box overflow control MSR. @@ -181,8 +176,7 @@ typedef union { @endcode @note MSR_XEON_E7_C8_PMON_BOX_OVF_CTRL is defined as MSR_C8_PMON_BOX_OVF_CTRL in SDM. **/ -#define MSR_XEON_E7_C8_PMON_BOX_OVF_CTRL 0x00000F42 - +#define MSR_XEON_E7_C8_PMON_BOX_OVF_CTRL 0x00000F42 /** Package. Uncore C-box 8 perfmon event select MSR. @@ -206,15 +200,14 @@ typedef union { MSR_XEON_E7_C8_PMON_EVNT_SEL5 is defined as MSR_C8_PMON_EVNT_SEL5 in SDM. @{ **/ -#define MSR_XEON_E7_C8_PMON_EVNT_SEL0 0x00000F50 -#define MSR_XEON_E7_C8_PMON_EVNT_SEL1 0x00000F52 -#define MSR_XEON_E7_C8_PMON_EVNT_SEL2 0x00000F54 -#define MSR_XEON_E7_C8_PMON_EVNT_SEL3 0x00000F56 -#define MSR_XEON_E7_C8_PMON_EVNT_SEL4 0x00000F58 -#define MSR_XEON_E7_C8_PMON_EVNT_SEL5 0x00000F5A +#define MSR_XEON_E7_C8_PMON_EVNT_SEL0 0x00000F50 +#define MSR_XEON_E7_C8_PMON_EVNT_SEL1 0x00000F52 +#define MSR_XEON_E7_C8_PMON_EVNT_SEL2 0x00000F54 +#define MSR_XEON_E7_C8_PMON_EVNT_SEL3 0x00000F56 +#define MSR_XEON_E7_C8_PMON_EVNT_SEL4 0x00000F58 +#define MSR_XEON_E7_C8_PMON_EVNT_SEL5 0x00000F5A /// @} - /** Package. Uncore C-box 8 perfmon counter MSR. @@ -237,15 +230,14 @@ typedef union { MSR_XEON_E7_C8_PMON_CTR5 is defined as MSR_C8_PMON_CTR5 in SDM. @{ **/ -#define MSR_XEON_E7_C8_PMON_CTR0 0x00000F51 -#define MSR_XEON_E7_C8_PMON_CTR1 0x00000F53 -#define MSR_XEON_E7_C8_PMON_CTR2 0x00000F55 -#define MSR_XEON_E7_C8_PMON_CTR3 0x00000F57 -#define MSR_XEON_E7_C8_PMON_CTR4 0x00000F59 -#define MSR_XEON_E7_C8_PMON_CTR5 0x00000F5B +#define MSR_XEON_E7_C8_PMON_CTR0 0x00000F51 +#define MSR_XEON_E7_C8_PMON_CTR1 0x00000F53 +#define MSR_XEON_E7_C8_PMON_CTR2 0x00000F55 +#define MSR_XEON_E7_C8_PMON_CTR3 0x00000F57 +#define MSR_XEON_E7_C8_PMON_CTR4 0x00000F59 +#define MSR_XEON_E7_C8_PMON_CTR5 0x00000F5B /// @} - /** Package. Uncore C-box 9 perfmon local box control MSR. @@ -262,8 +254,7 @@ typedef union { @endcode @note MSR_XEON_E7_C9_PMON_BOX_CTRL is defined as MSR_C9_PMON_BOX_CTRL in SDM. **/ -#define MSR_XEON_E7_C9_PMON_BOX_CTRL 0x00000FC0 - +#define MSR_XEON_E7_C9_PMON_BOX_CTRL 0x00000FC0 /** Package. Uncore C-box 9 perfmon local box status MSR. @@ -281,8 +272,7 @@ typedef union { @endcode @note MSR_XEON_E7_C9_PMON_BOX_STATUS is defined as MSR_C9_PMON_BOX_STATUS in SDM. **/ -#define MSR_XEON_E7_C9_PMON_BOX_STATUS 0x00000FC1 - +#define MSR_XEON_E7_C9_PMON_BOX_STATUS 0x00000FC1 /** Package. Uncore C-box 9 perfmon local box overflow control MSR. @@ -300,8 +290,7 @@ typedef union { @endcode @note MSR_XEON_E7_C9_PMON_BOX_OVF_CTRL is defined as MSR_C9_PMON_BOX_OVF_CTRL in SDM. **/ -#define MSR_XEON_E7_C9_PMON_BOX_OVF_CTRL 0x00000FC2 - +#define MSR_XEON_E7_C9_PMON_BOX_OVF_CTRL 0x00000FC2 /** Package. Uncore C-box 9 perfmon event select MSR. @@ -325,15 +314,14 @@ typedef union { MSR_XEON_E7_C9_PMON_EVNT_SEL5 is defined as MSR_C9_PMON_EVNT_SEL5 in SDM. @{ **/ -#define MSR_XEON_E7_C9_PMON_EVNT_SEL0 0x00000FD0 -#define MSR_XEON_E7_C9_PMON_EVNT_SEL1 0x00000FD2 -#define MSR_XEON_E7_C9_PMON_EVNT_SEL2 0x00000FD4 -#define MSR_XEON_E7_C9_PMON_EVNT_SEL3 0x00000FD6 -#define MSR_XEON_E7_C9_PMON_EVNT_SEL4 0x00000FD8 -#define MSR_XEON_E7_C9_PMON_EVNT_SEL5 0x00000FDA +#define MSR_XEON_E7_C9_PMON_EVNT_SEL0 0x00000FD0 +#define MSR_XEON_E7_C9_PMON_EVNT_SEL1 0x00000FD2 +#define MSR_XEON_E7_C9_PMON_EVNT_SEL2 0x00000FD4 +#define MSR_XEON_E7_C9_PMON_EVNT_SEL3 0x00000FD6 +#define MSR_XEON_E7_C9_PMON_EVNT_SEL4 0x00000FD8 +#define MSR_XEON_E7_C9_PMON_EVNT_SEL5 0x00000FDA /// @} - /** Package. Uncore C-box 9 perfmon counter MSR. @@ -356,12 +344,12 @@ typedef union { MSR_XEON_E7_C9_PMON_CTR5 is defined as MSR_C9_PMON_CTR5 in SDM. @{ **/ -#define MSR_XEON_E7_C9_PMON_CTR0 0x00000FD1 -#define MSR_XEON_E7_C9_PMON_CTR1 0x00000FD3 -#define MSR_XEON_E7_C9_PMON_CTR2 0x00000FD5 -#define MSR_XEON_E7_C9_PMON_CTR3 0x00000FD7 -#define MSR_XEON_E7_C9_PMON_CTR4 0x00000FD9 -#define MSR_XEON_E7_C9_PMON_CTR5 0x00000FDB +#define MSR_XEON_E7_C9_PMON_CTR0 0x00000FD1 +#define MSR_XEON_E7_C9_PMON_CTR1 0x00000FD3 +#define MSR_XEON_E7_C9_PMON_CTR2 0x00000FD5 +#define MSR_XEON_E7_C9_PMON_CTR3 0x00000FD7 +#define MSR_XEON_E7_C9_PMON_CTR4 0x00000FD9 +#define MSR_XEON_E7_C9_PMON_CTR5 0x00000FDB /// @} #endif diff --git a/MdePkg/Include/Register/Intel/Msr/XeonPhiMsr.h b/MdePkg/Include/Register/Intel/Msr/XeonPhiMsr.h index b4dbb52..2a82f7b 100644 --- a/MdePkg/Include/Register/Intel/Msr/XeonPhiMsr.h +++ b/MdePkg/Include/Register/Intel/Msr/XeonPhiMsr.h @@ -54,7 +54,7 @@ @endcode @note MSR_XEON_PHI_SMI_COUNT is defined as MSR_SMI_COUNT in SDM. **/ -#define MSR_XEON_PHI_SMI_COUNT 0x00000034 +#define MSR_XEON_PHI_SMI_COUNT 0x00000034 /** MSR information returned for MSR index #MSR_XEON_PHI_SMI_COUNT @@ -67,17 +67,17 @@ typedef union { /// /// [Bits 31:0] SMI Count (R/O). /// - UINT32 SMICount:32; - UINT32 Reserved:32; + UINT32 SMICount : 32; + UINT32 Reserved : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_PHI_SMI_COUNT_REGISTER; /** @@ -97,7 +97,7 @@ typedef union { AsmWriteMsr64 (MSR_XEON_PHI_PPIN_CTL, Msr.Uint64); @endcode **/ -#define MSR_XEON_PHI_PPIN_CTL 0x0000004E +#define MSR_XEON_PHI_PPIN_CTL 0x0000004E /** MSR information returned for MSR index #MSR_XEON_PHI_PPIN_CTL @@ -117,28 +117,27 @@ typedef union { /// write '01b' to MSR_PPIN_CTL to disable further access to MSR_PPIN and /// prevent unauthorized modification to MSR_PPIN_CTL. /// - UINT32 LockOut:1; + UINT32 LockOut : 1; /// /// [Bit 1] Enable_PPIN (R/W) If 1, enables MSR_PPIN to be accessible /// using RDMSR. Once set, an attempt to write 1 to MSR_PPIN_CTL[bit 0] /// will cause #GP. If 0, an attempt to read MSR_PPIN will cause #GP. /// Default is 0. /// - UINT32 Enable_PPIN:1; - UINT32 Reserved1:30; - UINT32 Reserved2:32; + UINT32 Enable_PPIN : 1; + UINT32 Reserved1 : 30; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_PHI_PPIN_CTL_REGISTER; - /** Package. Protected Processor Inventory Number (R/O). Protected Processor Inventory Number (R/O) A unique value within a given CPUID @@ -158,7 +157,7 @@ typedef union { Msr = AsmReadMsr64 (MSR_XEON_PHI_PPIN); @endcode **/ -#define MSR_XEON_PHI_PPIN 0x0000004F +#define MSR_XEON_PHI_PPIN 0x0000004F /** Package. Platform Information Contains power management and other model @@ -179,7 +178,7 @@ typedef union { @endcode @note MSR_XEON_PHI_PLATFORM_INFO is defined as MSR_PLATFORM_INFO in SDM. **/ -#define MSR_XEON_PHI_PLATFORM_INFO 0x000000CE +#define MSR_XEON_PHI_PLATFORM_INFO 0x000000CE /** MSR information returned for MSR index #MSR_XEON_PHI_PLATFORM_INFO @@ -189,45 +188,44 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:8; + UINT32 Reserved1 : 8; /// /// [Bits 15:8] Package. Maximum Non-Turbo Ratio (R/O) The is the ratio /// of the frequency that invariant TSC runs at. Frequency = ratio * 100 /// MHz. /// - UINT32 MaximumNonTurboRatio:8; - UINT32 Reserved2:12; + UINT32 MaximumNonTurboRatio : 8; + UINT32 Reserved2 : 12; /// /// [Bit 28] Package. Programmable Ratio Limit for Turbo Mode (R/O) When /// set to 1, indicates that Programmable Ratio Limits for Turbo mode is /// enabled, and when set to 0, indicates Programmable Ratio Limits for /// Turbo mode is disabled. /// - UINT32 RatioLimit:1; + UINT32 RatioLimit : 1; /// /// [Bit 29] Package. Programmable TDP Limit for Turbo Mode (R/O) When /// set to 1, indicates that TDP Limits for Turbo mode are programmable, /// and when set to 0, indicates TDP Limit for Turbo mode is not /// programmable. /// - UINT32 TDPLimit:1; - UINT32 Reserved3:2; - UINT32 Reserved4:8; + UINT32 TDPLimit : 1; + UINT32 Reserved3 : 2; + UINT32 Reserved4 : 8; /// /// [Bits 47:40] Package. Maximum Efficiency Ratio (R/O) The is the /// minimum ratio (maximum efficiency) that the processor can operates, in /// units of 100MHz. /// - UINT32 MaximumEfficiencyRatio:8; - UINT32 Reserved5:16; + UINT32 MaximumEfficiencyRatio : 8; + UINT32 Reserved5 : 16; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_PHI_PLATFORM_INFO_REGISTER; - /** Module. C-State Configuration Control (R/W). @@ -246,7 +244,7 @@ typedef union { @endcode @note MSR_XEON_PHI_PKG_CST_CONFIG_CONTROL is defined as MSR_PKG_CST_CONFIG_CONTROL in SDM. **/ -#define MSR_XEON_PHI_PKG_CST_CONFIG_CONTROL 0x000000E2 +#define MSR_XEON_PHI_PKG_CST_CONFIG_CONTROL 0x000000E2 /** MSR information returned for MSR index #MSR_XEON_PHI_PKG_CST_CONFIG_CONTROL @@ -261,49 +259,48 @@ typedef union { /// name encodings are supported: 000b: C0/C1 001b: C2 010b: C6 No /// Retention 011b: C6 Retention 111b: No limit. /// - UINT32 Limit:3; - UINT32 Reserved1:7; + UINT32 Limit : 3; + UINT32 Reserved1 : 7; /// /// [Bit 10] I/O MWAIT Redirection Enable (R/W). /// - UINT32 IO_MWAIT:1; - UINT32 Reserved2:4; + UINT32 IO_MWAIT : 1; + UINT32 Reserved2 : 4; /// /// [Bit 15] CFG Lock (R/WO). /// - UINT32 CFGLock:1; - UINT32 Reserved5:10; + UINT32 CFGLock : 1; + UINT32 Reserved5 : 10; /// /// [Bit 26] C1 State Auto Demotion Enable (R/W) When set, the processor /// will conditionally demote C3/C6/C7 requests to C1 based on uncore /// auto-demote information. /// - UINT32 C1StateAutoDemotionEnable:1; - UINT32 Reserved6:1; + UINT32 C1StateAutoDemotionEnable : 1; + UINT32 Reserved6 : 1; /// /// [Bit 28] C1 State Auto Undemotion Enable (R/W) When set, enables /// Undemotion from Demoted C1. /// - UINT32 C1StateAutoUndemotionEnable:1; + UINT32 C1StateAutoUndemotionEnable : 1; /// /// [Bit 29] PKG C-State Auto Demotion Enable (R/W) When set, enables /// Package C state demotion. /// - UINT32 PKGC_StateAutoDemotionEnable:1; - UINT32 Reserved7:2; - UINT32 Reserved4:32; + UINT32 PKGC_StateAutoDemotionEnable : 1; + UINT32 Reserved7 : 2; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_PHI_PKG_CST_CONFIG_CONTROL_REGISTER; - /** Module. Power Management IO Redirection in C-state (R/W). @@ -322,7 +319,7 @@ typedef union { @endcode @note MSR_XEON_PHI_PMG_IO_CAPTURE_BASE is defined as MSR_PMG_IO_CAPTURE_BASE in SDM. **/ -#define MSR_XEON_PHI_PMG_IO_CAPTURE_BASE 0x000000E4 +#define MSR_XEON_PHI_PMG_IO_CAPTURE_BASE 0x000000E4 /** MSR information returned for MSR index #MSR_XEON_PHI_PMG_IO_CAPTURE_BASE @@ -335,27 +332,26 @@ typedef union { /// /// [Bits 15:0] LVL_2 Base Address (R/W). /// - UINT32 Lvl2Base:16; + UINT32 Lvl2Base : 16; /// /// [Bits 22:16] C-State Range (R/W) The IO-port block size in which /// IO-redirection will be executed (0-127). Should be programmed based on /// the number of LVLx registers existing in the chipset. /// - UINT32 CStateRange:7; - UINT32 Reserved3:9; - UINT32 Reserved2:32; + UINT32 CStateRange : 7; + UINT32 Reserved3 : 9; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_PHI_PMG_IO_CAPTURE_BASE_REGISTER; - /** Core. AES Configuration (RW-L) Privileged post-BIOS agent must provide a #GP handler to handle unsuccessful read of this MSR. @@ -375,7 +371,7 @@ typedef union { @endcode @note MSR_XEON_PHI_FEATURE_CONFIG is defined as MSR_FEATURE_CONFIG in SDM. **/ -#define MSR_XEON_PHI_FEATURE_CONFIG 0x0000013C +#define MSR_XEON_PHI_FEATURE_CONFIG 0x0000013C /** MSR information returned for MSR index #MSR_XEON_PHI_FEATURE_CONFIG @@ -394,21 +390,20 @@ typedef union { /// 01b, AES instruction can be mis-configured if a privileged agent /// unintentionally writes 11b. /// - UINT32 AESConfiguration:2; - UINT32 Reserved1:30; - UINT32 Reserved2:32; + UINT32 AESConfiguration : 2; + UINT32 Reserved1 : 30; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_PHI_FEATURE_CONFIG_REGISTER; - /** Thread. MISC_FEATURE_ENABLES. @@ -426,7 +421,7 @@ typedef union { AsmWriteMsr64 (MSR_XEON_PHI_MISC_FEATURE_ENABLES, Msr.Uint64); @endcode **/ -#define MSR_XEON_PHI_MISC_FEATURE_ENABLES 0x00000140 +#define MSR_XEON_PHI_MISC_FEATURE_ENABLES 0x00000140 /** MSR information returned for MSR index #MSR_XEON_PHI_MISC_FEATURE_ENABLES @@ -436,7 +431,7 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:1; + UINT32 Reserved1 : 1; /// /// [Bit 1] User Mode MONITOR and MWAIT (R/W) If set to 1, the MONITOR and /// MWAIT instructions do not cause invalid-opcode exceptions when @@ -445,18 +440,18 @@ typedef union { /// other than C0 or C1, the instruction operates as if EAX indicated the /// C-state C1. /// - UINT32 UserModeMonitorAndMwait:1; - UINT32 Reserved2:30; - UINT32 Reserved3:32; + UINT32 UserModeMonitorAndMwait : 1; + UINT32 Reserved2 : 30; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_PHI_MISC_FEATURE_ENABLES_REGISTER; /** @@ -478,7 +473,7 @@ typedef union { @endcode @note MSR_XEON_PHI_SMM_MCA_CAP is defined as MSR_SMM_MCA_CAP in SDM. **/ -#define MSR_XEON_PHI_SMM_MCA_CAP 0x0000017D +#define MSR_XEON_PHI_SMM_MCA_CAP 0x0000017D /** MSR information returned for MSR index #MSR_XEON_PHI_SMM_MCA_CAP @@ -493,38 +488,37 @@ typedef union { /// set, that bank supports Enhanced MCA (Default all 0; does not support /// EMCA). /// - UINT32 BankSupport:32; - UINT32 Reserved4:24; + UINT32 BankSupport : 32; + UINT32 Reserved4 : 24; /// /// [Bit 56] Targeted SMI (SMM-RO) Set if targeted SMI is supported. /// - UINT32 TargetedSMI:1; + UINT32 TargetedSMI : 1; /// /// [Bit 57] SMM_CPU_SVRSTR (SMM-RO) Set if SMM SRAM save/restore feature /// is supported. /// - UINT32 SMM_CPU_SVRSTR:1; + UINT32 SMM_CPU_SVRSTR : 1; /// /// [Bit 58] SMM_Code_Access_Chk (SMM-RO) If set to 1 indicates that the /// SMM code access restriction is supported and a host-space interface /// available to SMM handler. /// - UINT32 SMM_Code_Access_Chk:1; + UINT32 SMM_Code_Access_Chk : 1; /// /// [Bit 59] Long_Flow_Indication (SMM-RO) If set to 1 indicates that the /// SMM long flow indicator is supported and a host-space interface /// available to SMM handler. /// - UINT32 Long_Flow_Indication:1; - UINT32 Reserved3:4; + UINT32 Long_Flow_Indication : 1; + UINT32 Reserved3 : 4; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_PHI_SMM_MCA_CAP_REGISTER; - /** Thread. Enable Misc. Processor Features (R/W) Allows a variety of processor functions to be enabled and disabled. @@ -544,7 +538,7 @@ typedef union { @endcode @note MSR_XEON_PHI_IA32_MISC_ENABLE is defined as IA32_MISC_ENABLE in SDM. **/ -#define MSR_XEON_PHI_IA32_MISC_ENABLE 0x000001A0 +#define MSR_XEON_PHI_IA32_MISC_ENABLE 0x000001A0 /** MSR information returned for MSR index #MSR_XEON_PHI_IA32_MISC_ENABLE @@ -557,66 +551,65 @@ typedef union { /// /// [Bit 0] Fast-Strings Enable. /// - UINT32 FastStrings:1; - UINT32 Reserved1:2; + UINT32 FastStrings : 1; + UINT32 Reserved1 : 2; /// /// [Bit 3] Automatic Thermal Control Circuit Enable (R/W) Default value /// is 1. /// - UINT32 AutomaticThermalControlCircuit:1; - UINT32 Reserved2:3; + UINT32 AutomaticThermalControlCircuit : 1; + UINT32 Reserved2 : 3; /// /// [Bit 7] Performance Monitoring Available (R). /// - UINT32 PerformanceMonitoring:1; - UINT32 Reserved3:3; + UINT32 PerformanceMonitoring : 1; + UINT32 Reserved3 : 3; /// /// [Bit 11] Branch Trace Storage Unavailable (RO). /// - UINT32 BTS:1; + UINT32 BTS : 1; /// /// [Bit 12] Processor Event Based Sampling Unavailable (RO). /// - UINT32 PEBS:1; - UINT32 Reserved4:3; + UINT32 PEBS : 1; + UINT32 Reserved4 : 3; /// /// [Bit 16] Enhanced Intel SpeedStep Technology Enable (R/W). /// - UINT32 EIST:1; - UINT32 Reserved5:1; + UINT32 EIST : 1; + UINT32 Reserved5 : 1; /// /// [Bit 18] ENABLE MONITOR FSM (R/W). /// - UINT32 MONITOR:1; - UINT32 Reserved6:3; + UINT32 MONITOR : 1; + UINT32 Reserved6 : 3; /// /// [Bit 22] Limit CPUID Maxval (R/W). /// - UINT32 LimitCpuidMaxval:1; + UINT32 LimitCpuidMaxval : 1; /// /// [Bit 23] xTPR Message Disable (R/W). /// - UINT32 xTPR_Message_Disable:1; - UINT32 Reserved7:8; - UINT32 Reserved8:2; + UINT32 xTPR_Message_Disable : 1; + UINT32 Reserved7 : 8; + UINT32 Reserved8 : 2; /// /// [Bit 34] XD Bit Disable (R/W). /// - UINT32 XD:1; - UINT32 Reserved9:3; + UINT32 XD : 1; + UINT32 Reserved9 : 3; /// /// [Bit 38] Turbo Mode Disable (R/W). /// - UINT32 TurboModeDisable:1; - UINT32 Reserved10:25; + UINT32 TurboModeDisable : 1; + UINT32 Reserved10 : 25; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_PHI_IA32_MISC_ENABLE_REGISTER; - /** Package. @@ -635,7 +628,7 @@ typedef union { @endcode @note MSR_XEON_PHI_TEMPERATURE_TARGET is defined as MSR_TEMPERATURE_TARGET in SDM. **/ -#define MSR_XEON_PHI_TEMPERATURE_TARGET 0x000001A2 +#define MSR_XEON_PHI_TEMPERATURE_TARGET 0x000001A2 /** MSR information returned for MSR index #MSR_XEON_PHI_TEMPERATURE_TARGET @@ -645,29 +638,28 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved1:16; + UINT32 Reserved1 : 16; /// /// [Bits 23:16] Temperature Target (R). /// - UINT32 TemperatureTarget:8; + UINT32 TemperatureTarget : 8; /// /// [Bits 29:24] Target Offset (R/W). /// - UINT32 TargetOffset:6; - UINT32 Reserved2:2; - UINT32 Reserved3:32; + UINT32 TargetOffset : 6; + UINT32 Reserved2 : 2; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_PHI_TEMPERATURE_TARGET_REGISTER; - /** Miscellaneous Feature Control (R/W). @@ -686,7 +678,7 @@ typedef union { @endcode @note MSR_XEON_PHI_MISC_FEATURE_CONTROL is defined as MSR_MISC_FEATURE_CONTROL in SDM. **/ -#define MSR_XEON_PHI_MISC_FEATURE_CONTROL 0x000001A4 +#define MSR_XEON_PHI_MISC_FEATURE_CONTROL 0x000001A4 /** MSR information returned for MSR index #MSR_XEON_PHI_MISC_FEATURE_CONTROL @@ -700,26 +692,25 @@ typedef union { /// [Bit 0] Core. DCU Hardware Prefetcher Disable (R/W) If 1, disables the /// L1 data cache prefetcher. /// - UINT32 DCUHardwarePrefetcherDisable:1; + UINT32 DCUHardwarePrefetcherDisable : 1; /// /// [Bit 1] Core. L2 Hardware Prefetcher Disable (R/W) If 1, disables the /// L2 hardware prefetcher. /// - UINT32 L2HardwarePrefetcherDisable:1; - UINT32 Reserved1:30; - UINT32 Reserved2:32; + UINT32 L2HardwarePrefetcherDisable : 1; + UINT32 Reserved1 : 30; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_PHI_MISC_FEATURE_CONTROL_REGISTER; - /** Shared. Offcore Response Event Select Register (R/W). @@ -736,8 +727,7 @@ typedef union { @endcode @note MSR_XEON_PHI_OFFCORE_RSP_0 is defined as MSR_OFFCORE_RSP_0 in SDM. **/ -#define MSR_XEON_PHI_OFFCORE_RSP_0 0x000001A6 - +#define MSR_XEON_PHI_OFFCORE_RSP_0 0x000001A6 /** Shared. Offcore Response Event Select Register (R/W). @@ -755,8 +745,7 @@ typedef union { @endcode @note MSR_XEON_PHI_OFFCORE_RSP_1 is defined as MSR_OFFCORE_RSP_1 in SDM. **/ -#define MSR_XEON_PHI_OFFCORE_RSP_1 0x000001A7 - +#define MSR_XEON_PHI_OFFCORE_RSP_1 0x000001A7 /** Package. Maximum Ratio Limit of Turbo Mode for Groups of Cores (RW). @@ -776,7 +765,7 @@ typedef union { @endcode @note MSR_XEON_PHI_TURBO_RATIO_LIMIT is defined as MSR_TURBO_RATIO_LIMIT in SDM. **/ -#define MSR_XEON_PHI_TURBO_RATIO_LIMIT 0x000001AD +#define MSR_XEON_PHI_TURBO_RATIO_LIMIT 0x000001AD /** MSR information returned for MSR index #MSR_XEON_PHI_TURBO_RATIO_LIMIT @@ -786,105 +775,104 @@ typedef union { /// Individual bit fields /// struct { - UINT32 Reserved:1; + UINT32 Reserved : 1; /// /// [Bits 7:1] Package. Maximum Number of Cores in Group 0 Number active /// processor cores which operates under the maximum ratio limit for group /// 0. /// - UINT32 MaxCoresGroup0:7; + UINT32 MaxCoresGroup0 : 7; /// /// [Bits 15:8] Package. Maximum Ratio Limit for Group 0 Maximum turbo /// ratio limit when the number of active cores are not more than the /// group 0 maximum core count. /// - UINT32 MaxRatioLimitGroup0:8; + UINT32 MaxRatioLimitGroup0 : 8; /// /// [Bits 20:16] Package. Number of Incremental Cores Added to Group 1 /// Group 1, which includes the specified number of additional cores plus /// the cores in group 0, operates under the group 1 turbo max ratio limit /// = "group 0 Max ratio limit" - "group ratio delta for group 1". /// - UINT32 MaxIncrementalCoresGroup1:5; + UINT32 MaxIncrementalCoresGroup1 : 5; /// /// [Bits 23:21] Package. Group Ratio Delta for Group 1 An unsigned /// integer specifying the ratio decrement relative to the Max ratio limit /// to Group 0. /// - UINT32 DeltaRatioGroup1:3; + UINT32 DeltaRatioGroup1 : 3; /// /// [Bits 28:24] Package. Number of Incremental Cores Added to Group 2 /// Group 2, which includes the specified number of additional cores plus /// all the cores in group 1, operates under the group 2 turbo max ratio /// limit = "group 1 Max ratio limit" - "group ratio delta for group 2". /// - UINT32 MaxIncrementalCoresGroup2:5; + UINT32 MaxIncrementalCoresGroup2 : 5; /// /// [Bits 31:29] Package. Group Ratio Delta for Group 2 An unsigned /// integer specifying the ratio decrement relative to the Max ratio limit /// for Group 1. /// - UINT32 DeltaRatioGroup2:3; + UINT32 DeltaRatioGroup2 : 3; /// /// [Bits 36:32] Package. Number of Incremental Cores Added to Group 3 /// Group 3, which includes the specified number of additional cores plus /// all the cores in group 2, operates under the group 3 turbo max ratio /// limit = "group 2 Max ratio limit" - "group ratio delta for group 3". /// - UINT32 MaxIncrementalCoresGroup3:5; + UINT32 MaxIncrementalCoresGroup3 : 5; /// /// [Bits 39:37] Package. Group Ratio Delta for Group 3 An unsigned /// integer specifying the ratio decrement relative to the Max ratio limit /// for Group 2. /// - UINT32 DeltaRatioGroup3:3; + UINT32 DeltaRatioGroup3 : 3; /// /// [Bits 44:40] Package. Number of Incremental Cores Added to Group 4 /// Group 4, which includes the specified number of additional cores plus /// all the cores in group 3, operates under the group 4 turbo max ratio /// limit = "group 3 Max ratio limit" - "group ratio delta for group 4". /// - UINT32 MaxIncrementalCoresGroup4:5; + UINT32 MaxIncrementalCoresGroup4 : 5; /// /// [Bits 47:45] Package. Group Ratio Delta for Group 4 An unsigned /// integer specifying the ratio decrement relative to the Max ratio limit /// for Group 3. /// - UINT32 DeltaRatioGroup4:3; + UINT32 DeltaRatioGroup4 : 3; /// /// [Bits 52:48] Package. Number of Incremental Cores Added to Group 5 /// Group 5, which includes the specified number of additional cores plus /// all the cores in group 4, operates under the group 5 turbo max ratio /// limit = "group 4 Max ratio limit" - "group ratio delta for group 5". /// - UINT32 MaxIncrementalCoresGroup5:5; + UINT32 MaxIncrementalCoresGroup5 : 5; /// /// [Bits 55:53] Package. Group Ratio Delta for Group 5 An unsigned /// integer specifying the ratio decrement relative to the Max ratio limit /// for Group 4. /// - UINT32 DeltaRatioGroup5:3; + UINT32 DeltaRatioGroup5 : 3; /// /// [Bits 60:56] Package. Number of Incremental Cores Added to Group 6 /// Group 6, which includes the specified number of additional cores plus /// all the cores in group 5, operates under the group 6 turbo max ratio /// limit = "group 5 Max ratio limit" - "group ratio delta for group 6". /// - UINT32 MaxIncrementalCoresGroup6:5; + UINT32 MaxIncrementalCoresGroup6 : 5; /// /// [Bits 63:61] Package. Group Ratio Delta for Group 6 An unsigned /// integer specifying the ratio decrement relative to the Max ratio limit /// for Group 5. /// - UINT32 DeltaRatioGroup6:3; + UINT32 DeltaRatioGroup6 : 3; } Bits; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_PHI_TURBO_RATIO_LIMIT_REGISTER; - /** Thread. Last Branch Record Filtering Select Register (R/W). @@ -901,8 +889,7 @@ typedef union { @endcode @note MSR_XEON_PHI_LBR_SELECT is defined as MSR_LBR_SELECT in SDM. **/ -#define MSR_XEON_PHI_LBR_SELECT 0x000001C8 - +#define MSR_XEON_PHI_LBR_SELECT 0x000001C8 /** MSR information returned for MSR index #MSR_XEON_PHI_LBR_SELECT @@ -915,50 +902,50 @@ typedef union { /// /// [Bit 0] CPL_EQ_0. /// - UINT32 CPL_EQ_0:1; + UINT32 CPL_EQ_0 : 1; /// /// [Bit 1] CPL_NEQ_0. /// - UINT32 CPL_NEQ_0:1; + UINT32 CPL_NEQ_0 : 1; /// /// [Bit 2] JCC. /// - UINT32 JCC:1; + UINT32 JCC : 1; /// /// [Bit 3] NEAR_REL_CALL. /// - UINT32 NEAR_REL_CALL:1; + UINT32 NEAR_REL_CALL : 1; /// /// [Bit 4] NEAR_IND_CALL. /// - UINT32 NEAR_IND_CALL:1; + UINT32 NEAR_IND_CALL : 1; /// /// [Bit 5] NEAR_RET. /// - UINT32 NEAR_RET:1; + UINT32 NEAR_RET : 1; /// /// [Bit 6] NEAR_IND_JMP. /// - UINT32 NEAR_IND_JMP:1; + UINT32 NEAR_IND_JMP : 1; /// /// [Bit 7] NEAR_REL_JMP. /// - UINT32 NEAR_REL_JMP:1; + UINT32 NEAR_REL_JMP : 1; /// /// [Bit 8] FAR_BRANCH. /// - UINT32 FAR_BRANCH:1; - UINT32 Reserved1:23; - UINT32 Reserved2:32; + UINT32 FAR_BRANCH : 1; + UINT32 Reserved1 : 23; + UINT32 Reserved2 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_PHI_LBR_SELECT_REGISTER; /** @@ -977,8 +964,7 @@ typedef union { @endcode @note MSR_XEON_PHI_LASTBRANCH_TOS is defined as MSR_LASTBRANCH_TOS in SDM. **/ -#define MSR_XEON_PHI_LASTBRANCH_TOS 0x000001C9 - +#define MSR_XEON_PHI_LASTBRANCH_TOS 0x000001C9 /** Thread. Last Exception Record From Linear IP (R). @@ -995,8 +981,7 @@ typedef union { @endcode @note MSR_XEON_PHI_LER_FROM_LIP is defined as MSR_LER_FROM_LIP in SDM. **/ -#define MSR_XEON_PHI_LER_FROM_LIP 0x000001DD - +#define MSR_XEON_PHI_LER_FROM_LIP 0x000001DD /** Thread. Last Exception Record To Linear IP (R). @@ -1013,8 +998,7 @@ typedef union { @endcode @note MSR_XEON_PHI_LER_TO_LIP is defined as MSR_LER_TO_LIP in SDM. **/ -#define MSR_XEON_PHI_LER_TO_LIP 0x000001DE - +#define MSR_XEON_PHI_LER_TO_LIP 0x000001DE /** Thread. See Table 2-2. @@ -1032,8 +1016,7 @@ typedef union { @endcode @note MSR_XEON_PHI_PEBS_ENABLE is defined as MSR_PEBS_ENABLE in SDM. **/ -#define MSR_XEON_PHI_PEBS_ENABLE 0x000003F1 - +#define MSR_XEON_PHI_PEBS_ENABLE 0x000003F1 /** Package. Note: C-state values are processor specific C-state code names, @@ -1053,8 +1036,7 @@ typedef union { @endcode @note MSR_XEON_PHI_PKG_C3_RESIDENCY is defined as MSR_PKG_C3_RESIDENCY in SDM. **/ -#define MSR_XEON_PHI_PKG_C3_RESIDENCY 0x000003F8 - +#define MSR_XEON_PHI_PKG_C3_RESIDENCY 0x000003F8 /** Package. Package C6 Residency Counter. (R/O). @@ -1072,8 +1054,7 @@ typedef union { @endcode @note MSR_XEON_PHI_PKG_C6_RESIDENCY is defined as MSR_PKG_C6_RESIDENCY in SDM. **/ -#define MSR_XEON_PHI_PKG_C6_RESIDENCY 0x000003F9 - +#define MSR_XEON_PHI_PKG_C6_RESIDENCY 0x000003F9 /** Package. Package C7 Residency Counter. (R/O). @@ -1091,8 +1072,7 @@ typedef union { @endcode @note MSR_XEON_PHI_PKG_C7_RESIDENCY is defined as MSR_PKG_C7_RESIDENCY in SDM. **/ -#define MSR_XEON_PHI_PKG_C7_RESIDENCY 0x000003FA - +#define MSR_XEON_PHI_PKG_C7_RESIDENCY 0x000003FA /** Module. Note: C-state values are processor specific C-state code names, @@ -1112,8 +1092,7 @@ typedef union { @endcode @note MSR_XEON_PHI_MC0_RESIDENCY is defined as MSR_MC0_RESIDENCY in SDM. **/ -#define MSR_XEON_PHI_MC0_RESIDENCY 0x000003FC - +#define MSR_XEON_PHI_MC0_RESIDENCY 0x000003FC /** Module. Module C6 Residency Counter. (R/O). @@ -1131,8 +1110,7 @@ typedef union { @endcode @note MSR_XEON_PHI_MC6_RESIDENCY is defined as MSR_MC6_RESIDENCY in SDM. **/ -#define MSR_XEON_PHI_MC6_RESIDENCY 0x000003FD - +#define MSR_XEON_PHI_MC6_RESIDENCY 0x000003FD /** Core. Note: C-state values are processor specific C-state code names, @@ -1152,8 +1130,7 @@ typedef union { @endcode @note MSR_XEON_PHI_CORE_C6_RESIDENCY is defined as MSR_CORE_C6_RESIDENCY in SDM. **/ -#define MSR_XEON_PHI_CORE_C6_RESIDENCY 0x000003FF - +#define MSR_XEON_PHI_CORE_C6_RESIDENCY 0x000003FF /** Core. Capability Reporting Register of EPT and VPID (R/O) See Table 2-2. @@ -1170,8 +1147,7 @@ typedef union { @endcode @note MSR_XEON_PHI_IA32_VMX_EPT_VPID_ENUM is defined as IA32_VMX_EPT_VPID_ENUM in SDM. **/ -#define MSR_XEON_PHI_IA32_VMX_EPT_VPID_ENUM 0x0000048C - +#define MSR_XEON_PHI_IA32_VMX_EPT_VPID_ENUM 0x0000048C /** Core. Capability Reporting Register of VM-Function Controls (R/O) See Table @@ -1189,8 +1165,7 @@ typedef union { @endcode @note MSR_XEON_PHI_IA32_VMX_FMFUNC is defined as IA32_VMX_FMFUNC in SDM. **/ -#define MSR_XEON_PHI_IA32_VMX_FMFUNC 0x00000491 - +#define MSR_XEON_PHI_IA32_VMX_FMFUNC 0x00000491 /** Package. Unit Multipliers used in RAPL Interfaces (R/O). @@ -1209,7 +1184,7 @@ typedef union { @endcode @note MSR_XEON_PHI_RAPL_POWER_UNIT is defined as MSR_RAPL_POWER_UNIT in SDM. **/ -#define MSR_XEON_PHI_RAPL_POWER_UNIT 0x00000606 +#define MSR_XEON_PHI_RAPL_POWER_UNIT 0x00000606 /** MSR information returned for MSR index #MSR_XEON_PHI_RAPL_POWER_UNIT @@ -1222,35 +1197,34 @@ typedef union { /// /// [Bits 3:0] Package. Power Units See Section 14.9.1, "RAPL Interfaces.". /// - UINT32 PowerUnits:4; - UINT32 Reserved1:4; + UINT32 PowerUnits : 4; + UINT32 Reserved1 : 4; /// /// [Bits 12:8] Package. Energy Status Units Energy related information /// (in Joules) is based on the multiplier, 1/2^ESU; where ESU is an /// unsigned integer represented by bits 12:8. Default value is 0EH (or 61 /// micro-joules). /// - UINT32 EnergyStatusUnits:5; - UINT32 Reserved2:3; + UINT32 EnergyStatusUnits : 5; + UINT32 Reserved2 : 3; /// /// [Bits 19:16] Package. Time Units See Section 14.9.1, "RAPL /// Interfaces.". /// - UINT32 TimeUnits:4; - UINT32 Reserved3:12; - UINT32 Reserved4:32; + UINT32 TimeUnits : 4; + UINT32 Reserved3 : 12; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_PHI_RAPL_POWER_UNIT_REGISTER; - /** Package. Note: C-state values are processor specific C-state code names, unrelated to MWAIT extension C-state parameters or ACPI C-States. Package C2 @@ -1269,8 +1243,7 @@ typedef union { @endcode @note MSR_XEON_PHI_PKG_C2_RESIDENCY is defined as MSR_PKG_C2_RESIDENCY in SDM. **/ -#define MSR_XEON_PHI_PKG_C2_RESIDENCY 0x0000060D - +#define MSR_XEON_PHI_PKG_C2_RESIDENCY 0x0000060D /** Package. PKG RAPL Power Limit Control (R/W) See Section 14.9.3, "Package @@ -1289,8 +1262,7 @@ typedef union { @endcode @note MSR_XEON_PHI_PKG_POWER_LIMIT is defined as MSR_PKG_POWER_LIMIT in SDM. **/ -#define MSR_XEON_PHI_PKG_POWER_LIMIT 0x00000610 - +#define MSR_XEON_PHI_PKG_POWER_LIMIT 0x00000610 /** Package. PKG Energy Status (R/O) See Section 14.9.3, "Package RAPL Domain.". @@ -1307,8 +1279,7 @@ typedef union { @endcode @note MSR_XEON_PHI_PKG_ENERGY_STATUS is defined as MSR_PKG_ENERGY_STATUS in SDM. **/ -#define MSR_XEON_PHI_PKG_ENERGY_STATUS 0x00000611 - +#define MSR_XEON_PHI_PKG_ENERGY_STATUS 0x00000611 /** Package. PKG Perf Status (R/O) See Section 14.9.3, "Package RAPL Domain.". @@ -1325,8 +1296,7 @@ typedef union { @endcode @note MSR_XEON_PHI_PKG_PERF_STATUS is defined as MSR_PKG_PERF_STATUS in SDM. **/ -#define MSR_XEON_PHI_PKG_PERF_STATUS 0x00000613 - +#define MSR_XEON_PHI_PKG_PERF_STATUS 0x00000613 /** Package. PKG RAPL Parameters (R/W) See Section 14.9.3, "Package RAPL @@ -1345,8 +1315,7 @@ typedef union { @endcode @note MSR_XEON_PHI_PKG_POWER_INFO is defined as MSR_PKG_POWER_INFO in SDM. **/ -#define MSR_XEON_PHI_PKG_POWER_INFO 0x00000614 - +#define MSR_XEON_PHI_PKG_POWER_INFO 0x00000614 /** Package. DRAM RAPL Power Limit Control (R/W) See Section 14.9.5, "DRAM RAPL @@ -1365,8 +1334,7 @@ typedef union { @endcode @note MSR_XEON_PHI_DRAM_POWER_LIMIT is defined as MSR_DRAM_POWER_LIMIT in SDM. **/ -#define MSR_XEON_PHI_DRAM_POWER_LIMIT 0x00000618 - +#define MSR_XEON_PHI_DRAM_POWER_LIMIT 0x00000618 /** Package. DRAM Energy Status (R/O) See Section 14.9.5, "DRAM RAPL Domain.". @@ -1383,8 +1351,7 @@ typedef union { @endcode @note MSR_XEON_PHI_DRAM_ENERGY_STATUS is defined as MSR_DRAM_ENERGY_STATUS in SDM. **/ -#define MSR_XEON_PHI_DRAM_ENERGY_STATUS 0x00000619 - +#define MSR_XEON_PHI_DRAM_ENERGY_STATUS 0x00000619 /** Package. DRAM Performance Throttling Status (R/O) See Section 14.9.5, "DRAM @@ -1402,8 +1369,7 @@ typedef union { @endcode @note MSR_XEON_PHI_DRAM_PERF_STATUS is defined as MSR_DRAM_PERF_STATUS in SDM. **/ -#define MSR_XEON_PHI_DRAM_PERF_STATUS 0x0000061B - +#define MSR_XEON_PHI_DRAM_PERF_STATUS 0x0000061B /** Package. DRAM RAPL Parameters (R/W) See Section 14.9.5, "DRAM RAPL Domain.". @@ -1421,8 +1387,7 @@ typedef union { @endcode @note MSR_XEON_PHI_DRAM_POWER_INFO is defined as MSR_DRAM_POWER_INFO in SDM. **/ -#define MSR_XEON_PHI_DRAM_POWER_INFO 0x0000061C - +#define MSR_XEON_PHI_DRAM_POWER_INFO 0x0000061C /** Package. Uncore Ratio Limit (R/W) Out of reset, the min_ratio and max_ratio @@ -1444,7 +1409,7 @@ typedef union { AsmWriteMsr64 (MSR_XEON_PHI_MSRUNCORE_RATIO_LIMIT, Msr.Uint64); @endcode **/ -#define MSR_XEON_PHI_MSRUNCORE_RATIO_LIMIT 0x00000620 +#define MSR_XEON_PHI_MSRUNCORE_RATIO_LIMIT 0x00000620 /** MSR information returned for MSR index #MSR_XEON_PHI_MSRUNCORE_RATIO_LIMIT @@ -1458,27 +1423,26 @@ typedef union { /// [Bits 6:0] MAX_RATIO This field is used to limit the max ratio of the /// LLC/Ring. /// - UINT32 MAX_RATIO:7; - UINT32 Reserved1:1; + UINT32 MAX_RATIO : 7; + UINT32 Reserved1 : 1; /// /// [Bits 14:8] MIN_RATIO Writing to this field controls the minimum /// possible ratio of the LLC/Ring. /// - UINT32 MIN_RATIO:7; - UINT32 Reserved2:17; - UINT32 Reserved3:32; + UINT32 MIN_RATIO : 7; + UINT32 Reserved2 : 17; + UINT32 Reserved3 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_PHI_MSRUNCORE_RATIO_LIMIT_REGISTER; - /** Package. PP0 RAPL Power Limit Control (R/W) See Section 14.9.4, "PP0/PP1 RAPL Domains.". @@ -1496,8 +1460,7 @@ typedef union { @endcode @note MSR_XEON_PHI_PP0_POWER_LIMIT is defined as MSR_PP0_POWER_LIMIT in SDM. **/ -#define MSR_XEON_PHI_PP0_POWER_LIMIT 0x00000638 - +#define MSR_XEON_PHI_PP0_POWER_LIMIT 0x00000638 /** Package. PP0 Energy Status (R/O) See Section 14.9.4, "PP0/PP1 RAPL @@ -1515,8 +1478,7 @@ typedef union { @endcode @note MSR_XEON_PHI_PP0_ENERGY_STATUS is defined as MSR_PP0_ENERGY_STATUS in SDM. **/ -#define MSR_XEON_PHI_PP0_ENERGY_STATUS 0x00000639 - +#define MSR_XEON_PHI_PP0_ENERGY_STATUS 0x00000639 /** Package. Base TDP Ratio (R/O) See Table 2-24. @@ -1533,8 +1495,7 @@ typedef union { @endcode @note MSR_XEON_PHI_CONFIG_TDP_NOMINAL is defined as MSR_CONFIG_TDP_NOMINAL in SDM. **/ -#define MSR_XEON_PHI_CONFIG_TDP_NOMINAL 0x00000648 - +#define MSR_XEON_PHI_CONFIG_TDP_NOMINAL 0x00000648 /** Package. ConfigTDP Level 1 ratio and power level (R/O) See Table 2-24. @@ -1551,8 +1512,7 @@ typedef union { @endcode @note MSR_XEON_PHI_CONFIG_TDP_LEVEL1 is defined as MSR_CONFIG_TDP_LEVEL1 in SDM. **/ -#define MSR_XEON_PHI_CONFIG_TDP_LEVEL1 0x00000649 - +#define MSR_XEON_PHI_CONFIG_TDP_LEVEL1 0x00000649 /** Package. ConfigTDP Level 2 ratio and power level (R/O) See Table 2-24. @@ -1569,8 +1529,7 @@ typedef union { @endcode @note MSR_XEON_PHI_CONFIG_TDP_LEVEL2 is defined as MSR_CONFIG_TDP_LEVEL2 in SDM. **/ -#define MSR_XEON_PHI_CONFIG_TDP_LEVEL2 0x0000064A - +#define MSR_XEON_PHI_CONFIG_TDP_LEVEL2 0x0000064A /** Package. ConfigTDP Control (R/W) See Table 2-24. @@ -1588,8 +1547,7 @@ typedef union { @endcode @note MSR_XEON_PHI_CONFIG_TDP_CONTROL is defined as MSR_CONFIG_TDP_CONTROL in SDM. **/ -#define MSR_XEON_PHI_CONFIG_TDP_CONTROL 0x0000064B - +#define MSR_XEON_PHI_CONFIG_TDP_CONTROL 0x0000064B /** Package. ConfigTDP Control (R/W) See Table 2-24. @@ -1607,8 +1565,7 @@ typedef union { @endcode @note MSR_XEON_PHI_TURBO_ACTIVATION_RATIO is defined as MSR_TURBO_ACTIVATION_RATIO in SDM. **/ -#define MSR_XEON_PHI_TURBO_ACTIVATION_RATIO 0x0000064C - +#define MSR_XEON_PHI_TURBO_ACTIVATION_RATIO 0x0000064C /** Package. Indicator of Frequency Clipping in Processor Cores (R/W) (frequency @@ -1629,7 +1586,7 @@ typedef union { @endcode @note MSR_XEON_PHI_CORE_PERF_LIMIT_REASONS is defined as MSR_CORE_PERF_LIMIT_REASONS in SDM. **/ -#define MSR_XEON_PHI_CORE_PERF_LIMIT_REASONS 0x00000690 +#define MSR_XEON_PHI_CORE_PERF_LIMIT_REASONS 0x00000690 /** MSR information returned for MSR index #MSR_XEON_PHI_CORE_PERF_LIMIT_REASONS @@ -1642,32 +1599,32 @@ typedef union { /// /// [Bit 0] PROCHOT Status (R0). /// - UINT32 PROCHOT_Status:1; + UINT32 PROCHOT_Status : 1; /// /// [Bit 1] Thermal Status (R0). /// - UINT32 ThermalStatus:1; - UINT32 Reserved1:4; + UINT32 ThermalStatus : 1; + UINT32 Reserved1 : 4; /// /// [Bit 6] VR Therm Alert Status (R0). /// - UINT32 VRThermAlertStatus:1; - UINT32 Reserved2:1; + UINT32 VRThermAlertStatus : 1; + UINT32 Reserved2 : 1; /// /// [Bit 8] Electrical Design Point Status (R0). /// - UINT32 ElectricalDesignPointStatus:1; - UINT32 Reserved3:23; - UINT32 Reserved4:32; + UINT32 ElectricalDesignPointStatus : 1; + UINT32 Reserved3 : 23; + UINT32 Reserved4 : 32; } Bits; /// /// All bit fields as a 32-bit value /// - UINT32 Uint32; + UINT32 Uint32; /// /// All bit fields as a 64-bit value /// - UINT64 Uint64; + UINT64 Uint64; } MSR_XEON_PHI_CORE_PERF_LIMIT_REASONS_REGISTER; #endif diff --git a/MdePkg/Include/Register/Intel/SmramSaveStateMap.h b/MdePkg/Include/Register/Intel/SmramSaveStateMap.h index 81aa6c3..36035b9 100644 --- a/MdePkg/Include/Register/Intel/SmramSaveStateMap.h +++ b/MdePkg/Include/Register/Intel/SmramSaveStateMap.h @@ -18,12 +18,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// Default SMBASE address /// -#define SMM_DEFAULT_SMBASE 0x30000 +#define SMM_DEFAULT_SMBASE 0x30000 /// /// Offset of SMM handler from SMBASE /// -#define SMM_HANDLER_OFFSET 0x8000 +#define SMM_HANDLER_OFFSET 0x8000 /// /// Offset of SMRAM Save State Map from SMBASE @@ -36,109 +36,109 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// 32-bit SMRAM Save State Map /// typedef struct { - UINT8 Reserved[0x200]; // 7c00h - // Padded an extra 0x200 bytes so 32-bit and 64-bit - // SMRAM Save State Maps are the same size - UINT8 Reserved1[0xf8]; // 7e00h - UINT32 SMBASE; // 7ef8h - UINT32 SMMRevId; // 7efch - UINT16 IORestart; // 7f00h - UINT16 AutoHALTRestart; // 7f02h - UINT8 Reserved2[0x9C]; // 7f08h - UINT32 IOMemAddr; // 7fa0h - UINT32 IOMisc; // 7fa4h - UINT32 _ES; // 7fa8h - UINT32 _CS; // 7fach - UINT32 _SS; // 7fb0h - UINT32 _DS; // 7fb4h - UINT32 _FS; // 7fb8h - UINT32 _GS; // 7fbch - UINT32 Reserved3; // 7fc0h - UINT32 _TR; // 7fc4h - UINT32 _DR7; // 7fc8h - UINT32 _DR6; // 7fcch - UINT32 _EAX; // 7fd0h - UINT32 _ECX; // 7fd4h - UINT32 _EDX; // 7fd8h - UINT32 _EBX; // 7fdch - UINT32 _ESP; // 7fe0h - UINT32 _EBP; // 7fe4h - UINT32 _ESI; // 7fe8h - UINT32 _EDI; // 7fech - UINT32 _EIP; // 7ff0h - UINT32 _EFLAGS; // 7ff4h - UINT32 _CR3; // 7ff8h - UINT32 _CR0; // 7ffch + UINT8 Reserved[0x200]; // 7c00h + // Padded an extra 0x200 bytes so 32-bit and 64-bit + // SMRAM Save State Maps are the same size + UINT8 Reserved1[0xf8]; // 7e00h + UINT32 SMBASE; // 7ef8h + UINT32 SMMRevId; // 7efch + UINT16 IORestart; // 7f00h + UINT16 AutoHALTRestart; // 7f02h + UINT8 Reserved2[0x9C]; // 7f08h + UINT32 IOMemAddr; // 7fa0h + UINT32 IOMisc; // 7fa4h + UINT32 _ES; // 7fa8h + UINT32 _CS; // 7fach + UINT32 _SS; // 7fb0h + UINT32 _DS; // 7fb4h + UINT32 _FS; // 7fb8h + UINT32 _GS; // 7fbch + UINT32 Reserved3; // 7fc0h + UINT32 _TR; // 7fc4h + UINT32 _DR7; // 7fc8h + UINT32 _DR6; // 7fcch + UINT32 _EAX; // 7fd0h + UINT32 _ECX; // 7fd4h + UINT32 _EDX; // 7fd8h + UINT32 _EBX; // 7fdch + UINT32 _ESP; // 7fe0h + UINT32 _EBP; // 7fe4h + UINT32 _ESI; // 7fe8h + UINT32 _EDI; // 7fech + UINT32 _EIP; // 7ff0h + UINT32 _EFLAGS; // 7ff4h + UINT32 _CR3; // 7ff8h + UINT32 _CR0; // 7ffch } SMRAM_SAVE_STATE_MAP32; /// /// 64-bit SMRAM Save State Map /// typedef struct { - UINT8 Reserved1[0x1d0]; // 7c00h - UINT32 GdtBaseHiDword; // 7dd0h - UINT32 LdtBaseHiDword; // 7dd4h - UINT32 IdtBaseHiDword; // 7dd8h - UINT8 Reserved2[0xc]; // 7ddch - UINT64 IO_EIP; // 7de8h - UINT8 Reserved3[0x50]; // 7df0h - UINT32 _CR4; // 7e40h - UINT8 Reserved4[0x48]; // 7e44h - UINT32 GdtBaseLoDword; // 7e8ch - UINT32 Reserved5; // 7e90h - UINT32 IdtBaseLoDword; // 7e94h - UINT32 Reserved6; // 7e98h - UINT32 LdtBaseLoDword; // 7e9ch - UINT8 Reserved7[0x38]; // 7ea0h - UINT64 EptVmxControl; // 7ed8h - UINT32 EnEptVmxControl; // 7ee0h - UINT8 Reserved8[0x14]; // 7ee4h - UINT32 SMBASE; // 7ef8h - UINT32 SMMRevId; // 7efch - UINT16 IORestart; // 7f00h - UINT16 AutoHALTRestart; // 7f02h - UINT8 Reserved9[0x18]; // 7f04h - UINT64 _R15; // 7f1ch - UINT64 _R14; - UINT64 _R13; - UINT64 _R12; - UINT64 _R11; - UINT64 _R10; - UINT64 _R9; - UINT64 _R8; - UINT64 _RAX; // 7f5ch - UINT64 _RCX; - UINT64 _RDX; - UINT64 _RBX; - UINT64 _RSP; - UINT64 _RBP; - UINT64 _RSI; - UINT64 _RDI; - UINT64 IOMemAddr; // 7f9ch - UINT32 IOMisc; // 7fa4h - UINT32 _ES; // 7fa8h - UINT32 _CS; - UINT32 _SS; - UINT32 _DS; - UINT32 _FS; - UINT32 _GS; - UINT32 _LDTR; // 7fc0h - UINT32 _TR; - UINT64 _DR7; // 7fc8h - UINT64 _DR6; - UINT64 _RIP; // 7fd8h - UINT64 IA32_EFER; // 7fe0h - UINT64 _RFLAGS; // 7fe8h - UINT64 _CR3; // 7ff0h - UINT64 _CR0; // 7ff8h + UINT8 Reserved1[0x1d0]; // 7c00h + UINT32 GdtBaseHiDword; // 7dd0h + UINT32 LdtBaseHiDword; // 7dd4h + UINT32 IdtBaseHiDword; // 7dd8h + UINT8 Reserved2[0xc]; // 7ddch + UINT64 IO_EIP; // 7de8h + UINT8 Reserved3[0x50]; // 7df0h + UINT32 _CR4; // 7e40h + UINT8 Reserved4[0x48]; // 7e44h + UINT32 GdtBaseLoDword; // 7e8ch + UINT32 Reserved5; // 7e90h + UINT32 IdtBaseLoDword; // 7e94h + UINT32 Reserved6; // 7e98h + UINT32 LdtBaseLoDword; // 7e9ch + UINT8 Reserved7[0x38]; // 7ea0h + UINT64 EptVmxControl; // 7ed8h + UINT32 EnEptVmxControl; // 7ee0h + UINT8 Reserved8[0x14]; // 7ee4h + UINT32 SMBASE; // 7ef8h + UINT32 SMMRevId; // 7efch + UINT16 IORestart; // 7f00h + UINT16 AutoHALTRestart; // 7f02h + UINT8 Reserved9[0x18]; // 7f04h + UINT64 _R15; // 7f1ch + UINT64 _R14; + UINT64 _R13; + UINT64 _R12; + UINT64 _R11; + UINT64 _R10; + UINT64 _R9; + UINT64 _R8; + UINT64 _RAX; // 7f5ch + UINT64 _RCX; + UINT64 _RDX; + UINT64 _RBX; + UINT64 _RSP; + UINT64 _RBP; + UINT64 _RSI; + UINT64 _RDI; + UINT64 IOMemAddr; // 7f9ch + UINT32 IOMisc; // 7fa4h + UINT32 _ES; // 7fa8h + UINT32 _CS; + UINT32 _SS; + UINT32 _DS; + UINT32 _FS; + UINT32 _GS; + UINT32 _LDTR; // 7fc0h + UINT32 _TR; + UINT64 _DR7; // 7fc8h + UINT64 _DR6; + UINT64 _RIP; // 7fd8h + UINT64 IA32_EFER; // 7fe0h + UINT64 _RFLAGS; // 7fe8h + UINT64 _CR3; // 7ff0h + UINT64 _CR0; // 7ff8h } SMRAM_SAVE_STATE_MAP64; /// /// Union of 32-bit and 64-bit SMRAM Save State Maps /// typedef union { - SMRAM_SAVE_STATE_MAP32 x86; - SMRAM_SAVE_STATE_MAP64 x64; + SMRAM_SAVE_STATE_MAP32 x86; + SMRAM_SAVE_STATE_MAP64 x64; } SMRAM_SAVE_STATE_MAP; /// @@ -149,34 +149,34 @@ typedef union { /// /// SMRAM Save State Map IOMisc I/O Length Values /// -#define SMM_IO_LENGTH_BYTE 0x01 -#define SMM_IO_LENGTH_WORD 0x02 -#define SMM_IO_LENGTH_DWORD 0x04 +#define SMM_IO_LENGTH_BYTE 0x01 +#define SMM_IO_LENGTH_WORD 0x02 +#define SMM_IO_LENGTH_DWORD 0x04 /// /// SMRAM Save State Map IOMisc I/O Instruction Type Values /// -#define SMM_IO_TYPE_IN_IMMEDIATE 0x9 -#define SMM_IO_TYPE_IN_DX 0x1 -#define SMM_IO_TYPE_OUT_IMMEDIATE 0x8 -#define SMM_IO_TYPE_OUT_DX 0x0 -#define SMM_IO_TYPE_INS 0x3 -#define SMM_IO_TYPE_OUTS 0x2 -#define SMM_IO_TYPE_REP_INS 0x7 -#define SMM_IO_TYPE_REP_OUTS 0x6 +#define SMM_IO_TYPE_IN_IMMEDIATE 0x9 +#define SMM_IO_TYPE_IN_DX 0x1 +#define SMM_IO_TYPE_OUT_IMMEDIATE 0x8 +#define SMM_IO_TYPE_OUT_DX 0x0 +#define SMM_IO_TYPE_INS 0x3 +#define SMM_IO_TYPE_OUTS 0x2 +#define SMM_IO_TYPE_REP_INS 0x7 +#define SMM_IO_TYPE_REP_OUTS 0x6 /// /// SMRAM Save State Map IOMisc structure /// typedef union { struct { - UINT32 SmiFlag:1; - UINT32 Length:3; - UINT32 Type:4; - UINT32 Reserved1:8; - UINT32 Port:16; + UINT32 SmiFlag : 1; + UINT32 Length : 3; + UINT32 Type : 4; + UINT32 Reserved1 : 8; + UINT32 Port : 16; } Bits; - UINT32 Uint32; + UINT32 Uint32; } SMRAM_SAVE_STATE_IOMISC; #pragma pack () diff --git a/MdePkg/Include/Register/Intel/StmApi.h b/MdePkg/Include/Register/Intel/StmApi.h index 63f215c..9d42bcd 100644 --- a/MdePkg/Include/Register/Intel/StmApi.h +++ b/MdePkg/Include/Register/Intel/StmApi.h @@ -23,38 +23,37 @@ **/ typedef struct { - UINT32 Intel64ModeSupported :1; ///> bitfield - UINT32 EptSupported :1; ///> bitfield - UINT32 Reserved :30; ///> must be 0 + UINT32 Intel64ModeSupported : 1; /// > bitfield + UINT32 EptSupported : 1; /// > bitfield + UINT32 Reserved : 30; /// > must be 0 } STM_FEAT; #define STM_SPEC_VERSION_MAJOR 1 #define STM_SPEC_VERSION_MINOR 0 typedef struct { - UINT8 StmSpecVerMajor; - UINT8 StmSpecVerMinor; + UINT8 StmSpecVerMajor; + UINT8 StmSpecVerMinor; /// /// Must be zero /// - UINT16 Reserved; - UINT32 StaticImageSize; - UINT32 PerProcDynamicMemorySize; - UINT32 AdditionalDynamicMemorySize; - STM_FEAT StmFeatures; - UINT32 NumberOfRevIDs; - UINT32 StmSmmRevID[1]; + UINT16 Reserved; + UINT32 StaticImageSize; + UINT32 PerProcDynamicMemorySize; + UINT32 AdditionalDynamicMemorySize; + STM_FEAT StmFeatures; + UINT32 NumberOfRevIDs; + UINT32 StmSmmRevID[1]; /// /// The total STM_HEADER should be 4K. /// } SOFTWARE_STM_HEADER; typedef struct { - MSEG_HEADER HwStmHdr; - SOFTWARE_STM_HEADER SwStmHdr; + MSEG_HEADER HwStmHdr; + SOFTWARE_STM_HEADER SwStmHdr; } STM_HEADER; - /** VMCALL API Numbers API number convention: BIOS facing VMCALL interfaces have bit 16 clear @@ -93,16 +92,16 @@ typedef struct { @note All other registers unmodified. **/ -#define STM_API_MAP_ADDRESS_RANGE 0x00000001 +#define STM_API_MAP_ADDRESS_RANGE 0x00000001 /** STM Map Address Range Descriptor for #STM_API_MAP_ADDRESS_RANGE VMCALL **/ typedef struct { - UINT64 PhysicalAddress; - UINT64 VirtualAddress; - UINT32 PageCount; - UINT32 PatCacheType; + UINT64 PhysicalAddress; + UINT64 VirtualAddress; + UINT32 PageCount; + UINT32 PatCacheType; } STM_MAP_ADDRESS_RANGE_DESCRIPTOR; /** @@ -145,17 +144,16 @@ typedef struct { @note All other registers unmodified. **/ -#define STM_API_UNMAP_ADDRESS_RANGE 0x00000002 +#define STM_API_UNMAP_ADDRESS_RANGE 0x00000002 /** STM Unmap Address Range Descriptor for #STM_API_UNMAP_ADDRESS_RANGE VMCALL **/ typedef struct { - UINT64 VirtualAddress; - UINT32 Length; + UINT64 VirtualAddress; + UINT32 Length; } STM_UNMAP_ADDRESS_RANGE_DESCRIPTOR; - /** Since the normal OS environment runs with a different set of page tables than the SMM guest, virtual mappings will certainly be different. In order to do a @@ -218,24 +216,24 @@ typedef struct { @note All other registers unmodified. **/ -#define STM_API_ADDRESS_LOOKUP 0x00000003 +#define STM_API_ADDRESS_LOOKUP 0x00000003 /** STM Lookup Address Range Descriptor for #STM_API_ADDRESS_LOOKUP VMCALL **/ typedef struct { - UINT64 InterruptedGuestVirtualAddress; - UINT32 Length; - UINT64 InterruptedCr3; - UINT64 InterruptedEptp; - UINT32 MapToSmmGuest:2; - UINT32 InterruptedCr4Pae:1; - UINT32 InterruptedCr4Pse:1; - UINT32 InterruptedIa32eMode:1; - UINT32 Reserved1:27; - UINT32 Reserved2; - UINT64 PhysicalAddress; - UINT64 SmmGuestVirtualAddress; + UINT64 InterruptedGuestVirtualAddress; + UINT32 Length; + UINT64 InterruptedCr3; + UINT64 InterruptedEptp; + UINT32 MapToSmmGuest : 2; + UINT32 InterruptedCr4Pae : 1; + UINT32 InterruptedCr4Pse : 1; + UINT32 InterruptedIa32eMode : 1; + UINT32 Reserved1 : 27; + UINT32 Reserved2; + UINT64 PhysicalAddress; + UINT64 SmmGuestVirtualAddress; } STM_ADDRESS_LOOKUP_DESCRIPTOR; /** @@ -247,7 +245,6 @@ typedef struct { #define STM_ADDRESS_LOOKUP_DESCRIPTOR_VIRTUAL_ADDRESS_SPECIFIED 3 /// @} - /** When returning from a protection exception (see section 6.2), the SMM guest can instruct the STM to take one of two paths. It can either request a value @@ -279,8 +276,7 @@ typedef struct { Values 0x10..0xFFFFFFFF are reserved, do not use. **/ -#define STM_API_RETURN_FROM_PROTECTION_EXCEPTION 0x00000004 - +#define STM_API_RETURN_FROM_PROTECTION_EXCEPTION 0x00000004 /** VMCALL API Numbers @@ -336,7 +332,7 @@ typedef struct { @note All other registers unmodified. **/ -#define STM_API_START (BIT16 | 1) +#define STM_API_START (BIT16 | 1) /** Bit values for EDX input parameter to #STM_API_START VMCALL @@ -345,7 +341,6 @@ typedef struct { #define STM_CONFIG_SMI_UNBLOCKING_BY_VMX_OFF BIT0 /// @} - /** The StopStmVMCALL() is invoked by the MLE to teardown an active STM. This is normally done as part of a full teardown of the SMX environment when the @@ -367,8 +362,7 @@ typedef struct { @note All other registers unmodified. **/ -#define STM_API_STOP (BIT16 | 2) - +#define STM_API_STOP (BIT16 | 2) /** The ProtectResourceVMCALL() is invoked by the MLE root to request protection @@ -419,8 +413,7 @@ typedef struct { @note All other registers unmodified. **/ -#define STM_API_PROTECT_RESOURCE (BIT16 | 3) - +#define STM_API_PROTECT_RESOURCE (BIT16 | 3) /** The UnProtectResourceVMCALL() is invoked by the MLE root to request that the @@ -457,8 +450,7 @@ typedef struct { @note All other registers unmodified. **/ -#define STM_API_UNPROTECT_RESOURCE (BIT16 | 4) - +#define STM_API_UNPROTECT_RESOURCE (BIT16 | 4) /** The GetBiosResourcesVMCALL() is invoked by the MLE root to request the list @@ -493,8 +485,7 @@ typedef struct { @note All other registers unmodified. **/ -#define STM_API_GET_BIOS_RESOURCES (BIT16 | 5) - +#define STM_API_GET_BIOS_RESOURCES (BIT16 | 5) /** The ManageVmcsDatabaseVMCALL() is invoked by the MLE root to add or remove an @@ -527,7 +518,7 @@ typedef struct { @note All other registers unmodified. **/ -#define STM_API_MANAGE_VMCS_DATABASE (BIT16 | 6) +#define STM_API_MANAGE_VMCS_DATABASE (BIT16 | 6) /** STM VMCS Database Request for #STM_API_MANAGE_VMCS_DATABASE VMCALL @@ -536,15 +527,15 @@ typedef struct { /// /// bits 11:0 are reserved and must be 0 /// - UINT64 VmcsPhysPointer; - UINT32 DomainType :4; - UINT32 XStatePolicy :2; - UINT32 DegradationPolicy :4; + UINT64 VmcsPhysPointer; + UINT32 DomainType : 4; + UINT32 XStatePolicy : 2; + UINT32 DegradationPolicy : 4; /// /// Must be 0 /// - UINT32 Reserved1 :22; - UINT32 AddOrRemove; + UINT32 Reserved1 : 22; + UINT32 AddOrRemove; } STM_VMCS_DATABASE_REQUEST; /** @@ -578,7 +569,6 @@ typedef struct { #define STM_VMCS_DATABASE_REQUEST_REMOVE 0 /// @} - /** InitializeProtectionVMCALL() prepares the STM for setup of the initial protection profile which is subsequently communicated via one or more @@ -613,7 +603,7 @@ typedef struct { @note All other registers unmodified. **/ -#define STM_API_INITIALIZE_PROTECTION (BIT16 | 7) +#define STM_API_INITIALIZE_PROTECTION (BIT16 | 7) /** Byte granular support bits returned in EBX from #STM_API_INITIALIZE_PROTECTION @@ -624,7 +614,6 @@ typedef struct { #define STM_RSC_MSR BIT3 /// @} - /** The ManageEventLogVMCALL() is invoked by the MLE root to control the logging feature. It consists of several sub-functions to facilitate establishment of @@ -646,20 +635,20 @@ typedef struct { @note All other registers unmodified. **/ -#define STM_API_MANAGE_EVENT_LOG (BIT16 | 8) +#define STM_API_MANAGE_EVENT_LOG (BIT16 | 8) /// /// STM Event Log Management Request for #STM_API_MANAGE_EVENT_LOG VMCALL /// typedef struct { - UINT32 SubFunctionIndex; + UINT32 SubFunctionIndex; union { struct { - UINT32 PageCount; + UINT32 PageCount; // // number of elements is PageCount // - UINT64 Pages[]; + UINT64 Pages[]; } LogBuffer; // // bitmap of EVENT_TYPE @@ -685,13 +674,13 @@ typedef struct { Log Entry Header **/ typedef struct { - UINT32 EventSerialNumber; - UINT16 Type; - UINT16 Lock :1; - UINT16 Valid :1; - UINT16 ReadByMle :1; - UINT16 Wrapped :1; - UINT16 Reserved :12; + UINT32 EventSerialNumber; + UINT16 Type; + UINT16 Lock : 1; + UINT16 Valid : 1; + UINT16 ReadByMle : 1; + UINT16 Wrapped : 1; + UINT16 Reserved : 12; } LOG_ENTRY_HEADER; /** @@ -722,63 +711,63 @@ typedef enum { } EVENT_TYPE; typedef struct { - UINT32 Reserved; + UINT32 Reserved; } ENTRY_EVT_LOG_STARTED; typedef struct { - UINT32 Reserved; + UINT32 Reserved; } ENTRY_EVT_LOG_STOPPED; typedef struct { - UINT32 VmcallApiNumber; + UINT32 VmcallApiNumber; } ENTRY_EVT_LOG_INVALID_PARAM; typedef struct { - STM_RSC Resource; + STM_RSC Resource; } ENTRY_EVT_LOG_HANDLED_PROTECTION_EXCEPTION; typedef struct { - STM_RSC Resource; + STM_RSC Resource; } ENTRY_EVT_BIOS_ACCESS_UNCLAIMED_RSC; typedef struct { - STM_RSC Resource; + STM_RSC Resource; } ENTRY_EVT_MLE_RSC_PROT_GRANTED; typedef struct { - STM_RSC Resource; + STM_RSC Resource; } ENTRY_EVT_MLE_RSC_PROT_DENIED; typedef struct { - STM_RSC Resource; + STM_RSC Resource; } ENTRY_EVT_MLE_RSC_UNPROT; typedef struct { - STM_RSC Resource; + STM_RSC Resource; } ENTRY_EVT_MLE_RSC_UNPROT_ERROR; typedef struct { - UINT64 VmcsPhysPointer; - UINT8 ExpectedDomainType; - UINT8 DegradedDomainType; + UINT64 VmcsPhysPointer; + UINT8 ExpectedDomainType; + UINT8 DegradedDomainType; } ENTRY_EVT_MLE_DOMAIN_TYPE_DEGRADED; typedef union { - ENTRY_EVT_LOG_STARTED Started; - ENTRY_EVT_LOG_STOPPED Stopped; - ENTRY_EVT_LOG_INVALID_PARAM InvalidParam; - ENTRY_EVT_LOG_HANDLED_PROTECTION_EXCEPTION HandledProtectionException; - ENTRY_EVT_BIOS_ACCESS_UNCLAIMED_RSC BiosUnclaimedRsc; - ENTRY_EVT_MLE_RSC_PROT_GRANTED MleRscProtGranted; - ENTRY_EVT_MLE_RSC_PROT_DENIED MleRscProtDenied; - ENTRY_EVT_MLE_RSC_UNPROT MleRscUnprot; - ENTRY_EVT_MLE_RSC_UNPROT_ERROR MleRscUnprotError; - ENTRY_EVT_MLE_DOMAIN_TYPE_DEGRADED MleDomainTypeDegraded; + ENTRY_EVT_LOG_STARTED Started; + ENTRY_EVT_LOG_STOPPED Stopped; + ENTRY_EVT_LOG_INVALID_PARAM InvalidParam; + ENTRY_EVT_LOG_HANDLED_PROTECTION_EXCEPTION HandledProtectionException; + ENTRY_EVT_BIOS_ACCESS_UNCLAIMED_RSC BiosUnclaimedRsc; + ENTRY_EVT_MLE_RSC_PROT_GRANTED MleRscProtGranted; + ENTRY_EVT_MLE_RSC_PROT_DENIED MleRscProtDenied; + ENTRY_EVT_MLE_RSC_UNPROT MleRscUnprot; + ENTRY_EVT_MLE_RSC_UNPROT_ERROR MleRscUnprotError; + ENTRY_EVT_MLE_DOMAIN_TYPE_DEGRADED MleDomainTypeDegraded; } LOG_ENTRY_DATA; typedef struct { - LOG_ENTRY_HEADER Hdr; - LOG_ENTRY_DATA Data; + LOG_ENTRY_HEADER Hdr; + LOG_ENTRY_DATA Data; } STM_LOG_ENTRY; /** @@ -786,73 +775,72 @@ typedef struct { **/ #define STM_LOG_ENTRY_SIZE 256 - /** STM Protection Exception Stack Frame Structures **/ typedef struct { - UINT32 Rdi; - UINT32 Rsi; - UINT32 Rbp; - UINT32 Rdx; - UINT32 Rcx; - UINT32 Rbx; - UINT32 Rax; - UINT32 Cr3; - UINT32 Cr2; - UINT32 Cr0; - UINT32 VmcsExitInstructionInfo; - UINT32 VmcsExitInstructionLength; - UINT64 VmcsExitQualification; + UINT32 Rdi; + UINT32 Rsi; + UINT32 Rbp; + UINT32 Rdx; + UINT32 Rcx; + UINT32 Rbx; + UINT32 Rax; + UINT32 Cr3; + UINT32 Cr2; + UINT32 Cr0; + UINT32 VmcsExitInstructionInfo; + UINT32 VmcsExitInstructionLength; + UINT64 VmcsExitQualification; /// /// An TXT_SMM_PROTECTION_EXCEPTION_TYPE num value /// - UINT32 ErrorCode; - UINT32 Rip; - UINT32 Cs; - UINT32 Rflags; - UINT32 Rsp; - UINT32 Ss; + UINT32 ErrorCode; + UINT32 Rip; + UINT32 Cs; + UINT32 Rflags; + UINT32 Rsp; + UINT32 Ss; } STM_PROTECTION_EXCEPTION_STACK_FRAME_IA32; typedef struct { - UINT64 R15; - UINT64 R14; - UINT64 R13; - UINT64 R12; - UINT64 R11; - UINT64 R10; - UINT64 R9; - UINT64 R8; - UINT64 Rdi; - UINT64 Rsi; - UINT64 Rbp; - UINT64 Rdx; - UINT64 Rcx; - UINT64 Rbx; - UINT64 Rax; - UINT64 Cr8; - UINT64 Cr3; - UINT64 Cr2; - UINT64 Cr0; - UINT64 VmcsExitInstructionInfo; - UINT64 VmcsExitInstructionLength; - UINT64 VmcsExitQualification; + UINT64 R15; + UINT64 R14; + UINT64 R13; + UINT64 R12; + UINT64 R11; + UINT64 R10; + UINT64 R9; + UINT64 R8; + UINT64 Rdi; + UINT64 Rsi; + UINT64 Rbp; + UINT64 Rdx; + UINT64 Rcx; + UINT64 Rbx; + UINT64 Rax; + UINT64 Cr8; + UINT64 Cr3; + UINT64 Cr2; + UINT64 Cr0; + UINT64 VmcsExitInstructionInfo; + UINT64 VmcsExitInstructionLength; + UINT64 VmcsExitQualification; /// /// An TXT_SMM_PROTECTION_EXCEPTION_TYPE num value /// - UINT64 ErrorCode; - UINT64 Rip; - UINT64 Cs; - UINT64 Rflags; - UINT64 Rsp; - UINT64 Ss; + UINT64 ErrorCode; + UINT64 Rip; + UINT64 Cs; + UINT64 Rflags; + UINT64 Rsp; + UINT64 Ss; } STM_PROTECTION_EXCEPTION_STACK_FRAME_X64; typedef union { - STM_PROTECTION_EXCEPTION_STACK_FRAME_IA32 *Ia32StackFrame; - STM_PROTECTION_EXCEPTION_STACK_FRAME_X64 *X64StackFrame; + STM_PROTECTION_EXCEPTION_STACK_FRAME_IA32 *Ia32StackFrame; + STM_PROTECTION_EXCEPTION_STACK_FRAME_X64 *X64StackFrame; } STM_PROTECTION_EXCEPTION_STACK_FRAME; /** @@ -873,37 +861,37 @@ typedef enum { **/ typedef struct { - UINT64 SpeRip; - UINT64 SpeRsp; - UINT16 SpeSs; - UINT16 PageViolationException:1; - UINT16 MsrViolationException:1; - UINT16 RegisterViolationException:1; - UINT16 IoViolationException:1; - UINT16 PciViolationException:1; - UINT16 Reserved1:11; - UINT32 Reserved2; + UINT64 SpeRip; + UINT64 SpeRsp; + UINT16 SpeSs; + UINT16 PageViolationException : 1; + UINT16 MsrViolationException : 1; + UINT16 RegisterViolationException : 1; + UINT16 IoViolationException : 1; + UINT16 PciViolationException : 1; + UINT16 Reserved1 : 11; + UINT32 Reserved2; } STM_PROTECTION_EXCEPTION_HANDLER; typedef struct { - UINT8 ExecutionDisableOutsideSmrr:1; - UINT8 Intel64Mode:1; - UINT8 Cr4Pae : 1; - UINT8 Cr4Pse : 1; - UINT8 Reserved1 : 4; + UINT8 ExecutionDisableOutsideSmrr : 1; + UINT8 Intel64Mode : 1; + UINT8 Cr4Pae : 1; + UINT8 Cr4Pse : 1; + UINT8 Reserved1 : 4; } STM_SMM_ENTRY_STATE; typedef struct { - UINT8 SmramToVmcsRestoreRequired : 1; ///> BIOS restore hint - UINT8 ReinitializeVmcsRequired : 1; ///> BIOS request - UINT8 Reserved2 : 6; + UINT8 SmramToVmcsRestoreRequired : 1; /// > BIOS restore hint + UINT8 ReinitializeVmcsRequired : 1; /// > BIOS request + UINT8 Reserved2 : 6; } STM_SMM_RESUME_STATE; typedef struct { - UINT8 DomainType : 4; ///> STM input to BIOS on each SMI - UINT8 XStatePolicy : 2; ///> STM input to BIOS on each SMI - UINT8 EptEnabled : 1; - UINT8 Reserved3 : 1; + UINT8 DomainType : 4; /// > STM input to BIOS on each SMI + UINT8 XStatePolicy : 2; /// > STM input to BIOS on each SMI + UINT8 EptEnabled : 1; + UINT8 Reserved3 : 1; } STM_SMM_STATE; #define TXT_SMM_PSD_OFFSET 0xfb00 @@ -912,35 +900,35 @@ typedef struct { #define TXT_PROCESSOR_SMM_DESCRIPTOR_VERSION_MINOR 0 typedef struct { - UINT64 Signature; - UINT16 Size; - UINT8 SmmDescriptorVerMajor; - UINT8 SmmDescriptorVerMinor; - UINT32 LocalApicId; - STM_SMM_ENTRY_STATE SmmEntryState; - STM_SMM_RESUME_STATE SmmResumeState; - STM_SMM_STATE StmSmmState; - UINT8 Reserved4; - UINT16 SmmCs; - UINT16 SmmDs; - UINT16 SmmSs; - UINT16 SmmOtherSegment; - UINT16 SmmTr; - UINT16 Reserved5; - UINT64 SmmCr3; - UINT64 SmmStmSetupRip; - UINT64 SmmStmTeardownRip; - UINT64 SmmSmiHandlerRip; - UINT64 SmmSmiHandlerRsp; - UINT64 SmmGdtPtr; - UINT32 SmmGdtSize; - UINT32 RequiredStmSmmRevId; - STM_PROTECTION_EXCEPTION_HANDLER StmProtectionExceptionHandler; - UINT64 Reserved6; - UINT64 BiosHwResourceRequirementsPtr; + UINT64 Signature; + UINT16 Size; + UINT8 SmmDescriptorVerMajor; + UINT8 SmmDescriptorVerMinor; + UINT32 LocalApicId; + STM_SMM_ENTRY_STATE SmmEntryState; + STM_SMM_RESUME_STATE SmmResumeState; + STM_SMM_STATE StmSmmState; + UINT8 Reserved4; + UINT16 SmmCs; + UINT16 SmmDs; + UINT16 SmmSs; + UINT16 SmmOtherSegment; + UINT16 SmmTr; + UINT16 Reserved5; + UINT64 SmmCr3; + UINT64 SmmStmSetupRip; + UINT64 SmmStmTeardownRip; + UINT64 SmmSmiHandlerRip; + UINT64 SmmSmiHandlerRsp; + UINT64 SmmGdtPtr; + UINT32 SmmGdtSize; + UINT32 RequiredStmSmmRevId; + STM_PROTECTION_EXCEPTION_HANDLER StmProtectionExceptionHandler; + UINT64 Reserved6; + UINT64 BiosHwResourceRequirementsPtr; // extend area - UINT64 AcpiRsdp; - UINT8 PhysicalAddressBits; + UINT64 AcpiRsdp; + UINT8 PhysicalAddressBits; } TXT_PROCESSOR_SMM_DESCRIPTOR; #pragma pack () diff --git a/MdePkg/Include/Register/Intel/StmResourceDescriptor.h b/MdePkg/Include/Register/Intel/StmResourceDescriptor.h index 3e42670..8f29a7c 100644 --- a/MdePkg/Include/Register/Intel/StmResourceDescriptor.h +++ b/MdePkg/Include/Register/Intel/StmResourceDescriptor.h @@ -18,11 +18,11 @@ STM Resource Descriptor Header **/ typedef struct { - UINT32 RscType; - UINT16 Length; - UINT16 ReturnStatus:1; - UINT16 Reserved:14; - UINT16 IgnoreResource:1; + UINT32 RscType; + UINT16 Length; + UINT16 ReturnStatus : 1; + UINT16 Reserved : 14; + UINT16 IgnoreResource : 1; } STM_RSC_DESC_HEADER; /** @@ -45,20 +45,20 @@ typedef struct { STM Resource End Descriptor **/ typedef struct { - STM_RSC_DESC_HEADER Hdr; - UINT64 ResourceListContinuation; + STM_RSC_DESC_HEADER Hdr; + UINT64 ResourceListContinuation; } STM_RSC_END; /** STM Resource Memory Descriptor **/ typedef struct { - STM_RSC_DESC_HEADER Hdr; - UINT64 Base; - UINT64 Length; - UINT32 RWXAttributes:3; - UINT32 Reserved:29; - UINT32 Reserved_2; + STM_RSC_DESC_HEADER Hdr; + UINT64 Base; + UINT64 Length; + UINT32 RWXAttributes : 3; + UINT32 Reserved : 29; + UINT32 Reserved_2; } STM_RSC_MEM_DESC; /** @@ -74,22 +74,22 @@ typedef struct { STM Resource I/O Descriptor **/ typedef struct { - STM_RSC_DESC_HEADER Hdr; - UINT16 Base; - UINT16 Length; - UINT32 Reserved; + STM_RSC_DESC_HEADER Hdr; + UINT16 Base; + UINT16 Length; + UINT32 Reserved; } STM_RSC_IO_DESC; /** STM Resource MMIO Descriptor **/ typedef struct { - STM_RSC_DESC_HEADER Hdr; - UINT64 Base; - UINT64 Length; - UINT32 RWXAttributes:3; - UINT32 Reserved:29; - UINT32 Reserved_2; + STM_RSC_DESC_HEADER Hdr; + UINT64 Base; + UINT64 Length; + UINT32 RWXAttributes : 3; + UINT32 Reserved : 29; + UINT32 Reserved_2; } STM_RSC_MMIO_DESC; /** @@ -105,12 +105,12 @@ typedef struct { STM Resource MSR Descriptor **/ typedef struct { - STM_RSC_DESC_HEADER Hdr; - UINT32 MsrIndex; - UINT32 KernelModeProcessing:1; - UINT32 Reserved:31; - UINT64 ReadMask; - UINT64 WriteMask; + STM_RSC_DESC_HEADER Hdr; + UINT32 MsrIndex; + UINT32 KernelModeProcessing : 1; + UINT32 Reserved : 31; + UINT64 ReadMask; + UINT64 WriteMask; } STM_RSC_MSR_DESC; /** @@ -121,32 +121,32 @@ typedef struct { /// /// Must be 1, indicating Hardware Device Path /// - UINT8 Type; + UINT8 Type; /// /// Must be 1, indicating PCI /// - UINT8 Subtype; + UINT8 Subtype; /// /// sizeof(STM_PCI_DEVICE_PATH_NODE) which is 6 /// - UINT16 Length; - UINT8 PciFunction; - UINT8 PciDevice; + UINT16 Length; + UINT8 PciFunction; + UINT8 PciDevice; } STM_PCI_DEVICE_PATH_NODE; /** STM Resource PCI Configuration Descriptor **/ typedef struct { - STM_RSC_DESC_HEADER Hdr; - UINT16 RWAttributes:2; - UINT16 Reserved:14; - UINT16 Base; - UINT16 Length; - UINT8 OriginatingBusNumber; - UINT8 LastNodeIndex; - STM_PCI_DEVICE_PATH_NODE PciDevicePath[1]; -//STM_PCI_DEVICE_PATH_NODE PciDevicePath[LastNodeIndex + 1]; + STM_RSC_DESC_HEADER Hdr; + UINT16 RWAttributes : 2; + UINT16 Reserved : 14; + UINT16 Base; + UINT16 Length; + UINT8 OriginatingBusNumber; + UINT8 LastNodeIndex; + STM_PCI_DEVICE_PATH_NODE PciDevicePath[1]; + // STM_PCI_DEVICE_PATH_NODE PciDevicePath[LastNodeIndex + 1]; } STM_RSC_PCI_CFG_DESC; /** @@ -161,32 +161,32 @@ typedef struct { STM Resource Trapped I/O Descriptor **/ typedef struct { - STM_RSC_DESC_HEADER Hdr; - UINT16 Base; - UINT16 Length; - UINT16 In:1; - UINT16 Out:1; - UINT16 Api:1; - UINT16 Reserved1:13; - UINT16 Reserved2; + STM_RSC_DESC_HEADER Hdr; + UINT16 Base; + UINT16 Length; + UINT16 In : 1; + UINT16 Out : 1; + UINT16 Api : 1; + UINT16 Reserved1 : 13; + UINT16 Reserved2; } STM_RSC_TRAPPED_IO_DESC; /** STM Resource All Descriptor **/ typedef struct { - STM_RSC_DESC_HEADER Hdr; + STM_RSC_DESC_HEADER Hdr; } STM_RSC_ALL_RESOURCES_DESC; /** STM Register Violation Descriptor **/ typedef struct { - STM_RSC_DESC_HEADER Hdr; - UINT32 RegisterType; - UINT32 Reserved; - UINT64 ReadMask; - UINT64 WriteMask; + STM_RSC_DESC_HEADER Hdr; + UINT32 RegisterType; + UINT32 Reserved; + UINT64 ReadMask; + UINT64 WriteMask; } STM_REGISTER_VIOLATION_DESC; /** @@ -205,16 +205,16 @@ typedef enum { Union of all STM resource types **/ typedef union { - STM_RSC_DESC_HEADER Header; - STM_RSC_END End; - STM_RSC_MEM_DESC Mem; - STM_RSC_IO_DESC Io; - STM_RSC_MMIO_DESC Mmio; - STM_RSC_MSR_DESC Msr; - STM_RSC_PCI_CFG_DESC PciCfg; - STM_RSC_TRAPPED_IO_DESC TrappedIo; - STM_RSC_ALL_RESOURCES_DESC All; - STM_REGISTER_VIOLATION_DESC RegisterViolation; + STM_RSC_DESC_HEADER Header; + STM_RSC_END End; + STM_RSC_MEM_DESC Mem; + STM_RSC_IO_DESC Io; + STM_RSC_MMIO_DESC Mmio; + STM_RSC_MSR_DESC Msr; + STM_RSC_PCI_CFG_DESC PciCfg; + STM_RSC_TRAPPED_IO_DESC TrappedIo; + STM_RSC_ALL_RESOURCES_DESC All; + STM_REGISTER_VIOLATION_DESC RegisterViolation; } STM_RSC; #pragma pack () diff --git a/MdePkg/Include/Register/Intel/StmStatusCode.h b/MdePkg/Include/Register/Intel/StmStatusCode.h index 2460c12..547a005 100644 --- a/MdePkg/Include/Register/Intel/StmStatusCode.h +++ b/MdePkg/Include/Register/Intel/StmStatusCode.h @@ -15,7 +15,7 @@ /** STM Status Codes **/ -typedef UINT32 STM_STATUS; +typedef UINT32 STM_STATUS; /** Success code have BIT31 clear. diff --git a/MdePkg/Include/RiscV64/ProcessorBind.h b/MdePkg/Include/RiscV64/ProcessorBind.h index 2b11f04..1d42d92 100644 --- a/MdePkg/Include/RiscV64/ProcessorBind.h +++ b/MdePkg/Include/RiscV64/ProcessorBind.h @@ -18,66 +18,66 @@ // // Make sure we are using the correct packing rules per EFI specification // -#if !defined(__GNUC__) -#pragma pack() +#if !defined (__GNUC__) + #pragma pack() #endif /// /// 8-byte unsigned value /// -typedef unsigned long long UINT64 __attribute__ ((aligned (8))); +typedef unsigned long long UINT64 __attribute__ ((aligned (8))); /// /// 8-byte signed value /// -typedef long long INT64 __attribute__ ((aligned (8))); +typedef long long INT64 __attribute__ ((aligned (8))); /// /// 4-byte unsigned value /// -typedef unsigned int UINT32 __attribute__ ((aligned (4))); +typedef unsigned int UINT32 __attribute__ ((aligned (4))); /// /// 4-byte signed value /// -typedef int INT32 __attribute__ ((aligned (4))); +typedef int INT32 __attribute__ ((aligned (4))); /// /// 2-byte unsigned value /// -typedef unsigned short UINT16 __attribute__ ((aligned (2))); +typedef unsigned short UINT16 __attribute__ ((aligned (2))); /// /// 2-byte Character. Unless otherwise specified all strings are stored in the /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards. /// -typedef unsigned short CHAR16 __attribute__ ((aligned (2))); +typedef unsigned short CHAR16 __attribute__ ((aligned (2))); /// /// 2-byte signed value /// -typedef short INT16 __attribute__ ((aligned (2))); +typedef short INT16 __attribute__ ((aligned (2))); /// /// Logical Boolean. 1-byte value containing 0 for FALSE or a 1 for TRUE. Other /// values are undefined. /// -typedef unsigned char BOOLEAN; +typedef unsigned char BOOLEAN; /// /// 1-byte unsigned value /// -typedef unsigned char UINT8; +typedef unsigned char UINT8; /// /// 1-byte Character /// -typedef char CHAR8; +typedef char CHAR8; /// /// 1-byte signed value /// -typedef signed char INT8; +typedef signed char INT8; /// /// Unsigned value of native width. (4 bytes on supported 32-bit processor instructions, /// 8 bytes on supported 64-bit processor instructions) /// -typedef UINT64 UINTN __attribute__ ((aligned (8))); +typedef UINT64 UINTN __attribute__ ((aligned (8))); /// /// Signed value of native width. (4 bytes on supported 32-bit processor instructions, /// 8 bytes on supported 64-bit processor instructions) /// -typedef INT64 INTN __attribute__ ((aligned (8))); +typedef INT64 INTN __attribute__ ((aligned (8))); // // Processor specific defines @@ -86,7 +86,7 @@ typedef INT64 INTN __attribute__ ((aligned (8))); /// /// A value of native width with the highest bit set. /// -#define MAX_BIT 0x8000000000000000ULL +#define MAX_BIT 0x8000000000000000ULL /// /// A value of native width with the two highest bits set. /// @@ -95,12 +95,12 @@ typedef INT64 INTN __attribute__ ((aligned (8))); /// /// Maximum legal RV64 address /// -#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFFULL +#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFFULL /// /// Maximum usable address at boot time (48 bits using 4 KB pages in Supervisor mode) /// -#define MAX_ALLOC_ADDRESS 0xFFFFFFFFFFFFULL +#define MAX_ALLOC_ADDRESS 0xFFFFFFFFFFFFULL /// /// Maximum legal RISC-V INTN and UINTN values. @@ -111,13 +111,13 @@ typedef INT64 INTN __attribute__ ((aligned (8))); /// /// The stack alignment required for RISC-V /// -#define CPU_STACK_ALIGNMENT 16 +#define CPU_STACK_ALIGNMENT 16 /// /// Page allocation granularity for RISC-V /// -#define DEFAULT_PAGE_ALLOCATION_GRANULARITY (0x1000) -#define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x1000) +#define DEFAULT_PAGE_ALLOCATION_GRANULARITY (0x1000) +#define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x1000) // // Modifier to ensure that all protocol member functions and EFI intrinsics @@ -125,33 +125,33 @@ typedef INT64 INTN __attribute__ ((aligned (8))); // EFI intrinsics are required to modify their member functions with EFIAPI. // #ifdef EFIAPI - /// - /// If EFIAPI is already defined, then we use that definition. - /// -#elif defined(__GNUC__) - /// - /// Define the standard calling convention regardless of optimization level - /// The GCC support assumes a GCC compiler that supports the EFI ABI. The EFI - /// ABI is much closer to the x64 Microsoft* ABI than standard x64 (x86-64) - /// GCC ABI. Thus a standard x64 (x86-64) GCC compiler can not be used for - /// x64. Warning the assembly code in the MDE x64 does not follow the correct - /// ABI for the standard x64 (x86-64) GCC. - /// - #define EFIAPI +/// +/// If EFIAPI is already defined, then we use that definition. +/// +#elif defined (__GNUC__) +/// +/// Define the standard calling convention regardless of optimization level +/// The GCC support assumes a GCC compiler that supports the EFI ABI. The EFI +/// ABI is much closer to the x64 Microsoft* ABI than standard x64 (x86-64) +/// GCC ABI. Thus a standard x64 (x86-64) GCC compiler can not be used for +/// x64. Warning the assembly code in the MDE x64 does not follow the correct +/// ABI for the standard x64 (x86-64) GCC. +/// +#define EFIAPI #else - /// - /// The default for a non Microsoft* or GCC compiler is to assume the EFI ABI - /// is the standard. - /// - #define EFIAPI +/// +/// The default for a non Microsoft* or GCC compiler is to assume the EFI ABI +/// is the standard. +/// +#define EFIAPI #endif -#if defined(__GNUC__) - /// - /// For GNU assembly code, .global or .globl can declare global symbols. - /// Define this macro to unify the usage. - /// - #define ASM_GLOBAL .globl +#if defined (__GNUC__) +/// +/// For GNU assembly code, .global or .globl can declare global symbols. +/// Define this macro to unify the usage. +/// +#define ASM_GLOBAL .globl #endif /** @@ -164,7 +164,7 @@ typedef INT64 INTN __attribute__ ((aligned (8))); @return The pointer to the first instruction of a function given a function pointer. **/ -#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer) +#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer) #ifndef __USER_LABEL_PREFIX__ #define __USER_LABEL_PREFIX__ diff --git a/MdePkg/Include/Uefi.h b/MdePkg/Include/Uefi.h index f049f2a..82e0b38 100644 --- a/MdePkg/Include/Uefi.h +++ b/MdePkg/Include/Uefi.h @@ -18,4 +18,3 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #endif - diff --git a/MdePkg/Include/Uefi/UefiAcpiDataTable.h b/MdePkg/Include/Uefi/UefiAcpiDataTable.h index 56c2f9d..d8eb61c 100644 --- a/MdePkg/Include/Uefi/UefiAcpiDataTable.h +++ b/MdePkg/Include/Uefi/UefiAcpiDataTable.h @@ -13,11 +13,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #pragma pack(1) typedef struct { - EFI_ACPI_DESCRIPTION_HEADER Header; - GUID Identifier; - UINT16 DataOffset; + EFI_ACPI_DESCRIPTION_HEADER Header; + GUID Identifier; + UINT16 DataOffset; } EFI_ACPI_DATA_TABLE; #pragma pack() #endif - diff --git a/MdePkg/Include/Uefi/UefiBaseType.h b/MdePkg/Include/Uefi/UefiBaseType.h index 45e2aa6..4a34ce8 100644 --- a/MdePkg/Include/Uefi/UefiBaseType.h +++ b/MdePkg/Include/Uefi/UefiBaseType.h @@ -21,37 +21,37 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// 128-bit buffer containing a unique identifier value. /// -typedef GUID EFI_GUID; +typedef GUID EFI_GUID; /// /// Function return status for EFI API. /// -typedef RETURN_STATUS EFI_STATUS; +typedef RETURN_STATUS EFI_STATUS; /// /// A collection of related interfaces. /// -typedef VOID *EFI_HANDLE; +typedef VOID *EFI_HANDLE; /// /// Handle to an event structure. /// -typedef VOID *EFI_EVENT; +typedef VOID *EFI_EVENT; /// /// Task priority level. /// -typedef UINTN EFI_TPL; +typedef UINTN EFI_TPL; /// /// Logical block address. /// -typedef UINT64 EFI_LBA; +typedef UINT64 EFI_LBA; /// /// 64-bit physical memory address. /// -typedef UINT64 EFI_PHYSICAL_ADDRESS; +typedef UINT64 EFI_PHYSICAL_ADDRESS; /// /// 64-bit virtual memory address. /// -typedef UINT64 EFI_VIRTUAL_ADDRESS; +typedef UINT64 EFI_VIRTUAL_ADDRESS; /// /// EFI Time Abstraction: @@ -65,20 +65,19 @@ typedef UINT64 EFI_VIRTUAL_ADDRESS; /// TimeZone: -1440 to 1440 or 2047 /// typedef struct { - UINT16 Year; - UINT8 Month; - UINT8 Day; - UINT8 Hour; - UINT8 Minute; - UINT8 Second; - UINT8 Pad1; - UINT32 Nanosecond; - INT16 TimeZone; - UINT8 Daylight; - UINT8 Pad2; + UINT16 Year; + UINT8 Month; + UINT8 Day; + UINT8 Hour; + UINT8 Minute; + UINT8 Second; + UINT8 Pad1; + UINT32 Nanosecond; + INT16 TimeZone; + UINT8 Daylight; + UINT8 Pad2; } EFI_TIME; - /// /// 4-byte buffer. An IPv4 internet protocol address. /// @@ -93,7 +92,7 @@ typedef IPv6_ADDRESS EFI_IPv6_ADDRESS; /// 32-byte buffer containing a network Media Access Control address. /// typedef struct { - UINT8 Addr[32]; + UINT8 Addr[32]; } EFI_MAC_ADDRESS; /// @@ -101,12 +100,11 @@ typedef struct { /// An IPv4 or IPv6 internet protocol address. /// typedef union { - UINT32 Addr[4]; - EFI_IPv4_ADDRESS v4; - EFI_IPv6_ADDRESS v6; + UINT32 Addr[4]; + EFI_IPv4_ADDRESS v4; + EFI_IPv6_ADDRESS v6; } EFI_IP_ADDRESS; - /// /// Enumeration of EFI_STATUS. ///@{ @@ -144,20 +142,20 @@ typedef union { #define EFI_COMPROMISED_DATA RETURN_COMPROMISED_DATA #define EFI_HTTP_ERROR RETURN_HTTP_ERROR -#define EFI_WARN_UNKNOWN_GLYPH RETURN_WARN_UNKNOWN_GLYPH -#define EFI_WARN_DELETE_FAILURE RETURN_WARN_DELETE_FAILURE -#define EFI_WARN_WRITE_FAILURE RETURN_WARN_WRITE_FAILURE -#define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL -#define EFI_WARN_STALE_DATA RETURN_WARN_STALE_DATA -#define EFI_WARN_FILE_SYSTEM RETURN_WARN_FILE_SYSTEM +#define EFI_WARN_UNKNOWN_GLYPH RETURN_WARN_UNKNOWN_GLYPH +#define EFI_WARN_DELETE_FAILURE RETURN_WARN_DELETE_FAILURE +#define EFI_WARN_WRITE_FAILURE RETURN_WARN_WRITE_FAILURE +#define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL +#define EFI_WARN_STALE_DATA RETURN_WARN_STALE_DATA +#define EFI_WARN_FILE_SYSTEM RETURN_WARN_FILE_SYSTEM ///@} /// /// Define macro to encode the status code. /// -#define EFIERR(_a) ENCODE_ERROR(_a) +#define EFIERR(_a) ENCODE_ERROR(_a) -#define EFI_ERROR(A) RETURN_ERROR(A) +#define EFI_ERROR(A) RETURN_ERROR(A) /// /// ICMP error definitions @@ -171,9 +169,9 @@ typedef union { /// /// Tcp connection status definitions ///@{ -#define EFI_CONNECTION_FIN EFIERR(104) -#define EFI_CONNECTION_RESET EFIERR(105) -#define EFI_CONNECTION_REFUSED EFIERR(106) +#define EFI_CONNECTION_FIN EFIERR(104) +#define EFI_CONNECTION_RESET EFIERR(105) +#define EFI_CONNECTION_REFUSED EFIERR(106) ///@} // @@ -181,9 +179,9 @@ typedef union { // 4KB. This should in no way be confused with the page size of the processor. // An EFI_PAGE is just the quanta of memory in EFI. // -#define EFI_PAGE_SIZE SIZE_4KB -#define EFI_PAGE_MASK 0xFFF -#define EFI_PAGE_SHIFT 12 +#define EFI_PAGE_SIZE SIZE_4KB +#define EFI_PAGE_MASK 0xFFF +#define EFI_PAGE_SHIFT 12 /** Macro that converts a size, in bytes, to a number of EFI_PAGESs. @@ -214,22 +212,22 @@ typedef union { /// /// PE32+ Machine type for IA32 UEFI images. /// -#define EFI_IMAGE_MACHINE_IA32 0x014C +#define EFI_IMAGE_MACHINE_IA32 0x014C /// /// PE32+ Machine type for IA64 UEFI images. /// -#define EFI_IMAGE_MACHINE_IA64 0x0200 +#define EFI_IMAGE_MACHINE_IA64 0x0200 /// /// PE32+ Machine type for EBC UEFI images. /// -#define EFI_IMAGE_MACHINE_EBC 0x0EBC +#define EFI_IMAGE_MACHINE_EBC 0x0EBC /// /// PE32+ Machine type for X64 UEFI images. /// -#define EFI_IMAGE_MACHINE_X64 0x8664 +#define EFI_IMAGE_MACHINE_X64 0x8664 /// /// PE32+ Machine type for ARM mixed ARM and Thumb/Thumb2 images. @@ -248,64 +246,64 @@ typedef union { #define EFI_IMAGE_MACHINE_RISCV64 0x5064 #define EFI_IMAGE_MACHINE_RISCV128 0x5128 -#if !defined(EFI_IMAGE_MACHINE_TYPE_VALUE) && !defined(EFI_IMAGE_MACHINE_CROSS_TYPE_VALUE) -#if defined (MDE_CPU_IA32) +#if !defined (EFI_IMAGE_MACHINE_TYPE_VALUE) && !defined (EFI_IMAGE_MACHINE_CROSS_TYPE_VALUE) + #if defined (MDE_CPU_IA32) #define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \ ((Machine) == EFI_IMAGE_MACHINE_IA32) -#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_X64) +#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_X64) -#elif defined (MDE_CPU_X64) + #elif defined (MDE_CPU_X64) #define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \ ((Machine) == EFI_IMAGE_MACHINE_X64) -#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_IA32) +#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_IA32) -#elif defined (MDE_CPU_ARM) + #elif defined (MDE_CPU_ARM) -#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_ARMTHUMB_MIXED) +#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_ARMTHUMB_MIXED) -#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) +#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) -#elif defined (MDE_CPU_AARCH64) + #elif defined (MDE_CPU_AARCH64) #define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \ ((Machine) == EFI_IMAGE_MACHINE_AARCH64) -#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) +#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) -#elif defined (MDE_CPU_RISCV64) + #elif defined (MDE_CPU_RISCV64) #define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \ ((Machine) == EFI_IMAGE_MACHINE_RISCV64) -#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) +#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) -#elif defined (MDE_CPU_EBC) + #elif defined (MDE_CPU_EBC) /// /// This is just to make sure you can cross compile with the EBC compiler. /// It does not make sense to have a PE loader coded in EBC. /// -#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_EBC) +#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_EBC) -#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) +#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) + #else + #error Unknown Processor Type + #endif #else -#error Unknown Processor Type -#endif -#else -#if defined (EFI_IMAGE_MACHINE_TYPE_VALUE) -#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_TYPE_VALUE) -#else -#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) (FALSE) -#endif -#if defined (EFI_IMAGE_MACHINE_CROSS_TYPE_VALUE) -#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_CROSS_TYPE_VALUE) -#else -#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) -#endif + #if defined (EFI_IMAGE_MACHINE_TYPE_VALUE) +#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_TYPE_VALUE) + #else +#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) (FALSE) + #endif + #if defined (EFI_IMAGE_MACHINE_CROSS_TYPE_VALUE) +#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_CROSS_TYPE_VALUE) + #else +#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) + #endif #endif #endif diff --git a/MdePkg/Include/Uefi/UefiGpt.h b/MdePkg/Include/Uefi/UefiGpt.h index af7fb2f..c295d55 100644 --- a/MdePkg/Include/Uefi/UefiGpt.h +++ b/MdePkg/Include/Uefi/UefiGpt.h @@ -13,15 +13,15 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// The primary GUID Partition Table Header must be /// located in LBA 1 (i.e., the second logical block). /// -#define PRIMARY_PART_HEADER_LBA 1 +#define PRIMARY_PART_HEADER_LBA 1 /// /// EFI Partition Table Signature: "EFI PART". /// -#define EFI_PTAB_HEADER_ID SIGNATURE_64 ('E','F','I',' ','P','A','R','T') +#define EFI_PTAB_HEADER_ID SIGNATURE_64 ('E','F','I',' ','P','A','R','T') /// /// Minimum bytes reserve for EFI entry array buffer. /// -#define EFI_GPT_PART_ENTRY_MIN_SIZE 16384 +#define EFI_GPT_PART_ENTRY_MIN_SIZE 16384 #pragma pack(1) @@ -33,51 +33,51 @@ typedef struct { /// The table header for the GPT partition Table. /// This header contains EFI_PTAB_HEADER_ID. /// - EFI_TABLE_HEADER Header; + EFI_TABLE_HEADER Header; /// /// The LBA that contains this data structure. /// - EFI_LBA MyLBA; + EFI_LBA MyLBA; /// /// LBA address of the alternate GUID Partition Table Header. /// - EFI_LBA AlternateLBA; + EFI_LBA AlternateLBA; /// /// The first usable logical block that may be used /// by a partition described by a GUID Partition Entry. /// - EFI_LBA FirstUsableLBA; + EFI_LBA FirstUsableLBA; /// /// The last usable logical block that may be used /// by a partition described by a GUID Partition Entry. /// - EFI_LBA LastUsableLBA; + EFI_LBA LastUsableLBA; /// /// GUID that can be used to uniquely identify the disk. /// - EFI_GUID DiskGUID; + EFI_GUID DiskGUID; /// /// The starting LBA of the GUID Partition Entry array. /// - EFI_LBA PartitionEntryLBA; + EFI_LBA PartitionEntryLBA; /// /// The number of Partition Entries in the GUID Partition Entry array. /// - UINT32 NumberOfPartitionEntries; + UINT32 NumberOfPartitionEntries; /// /// The size, in bytes, of each the GUID Partition /// Entry structures in the GUID Partition Entry /// array. This field shall be set to a value of 128 x 2^n where n is /// an integer greater than or equal to zero (e.g., 128, 256, 512, etc.). /// - UINT32 SizeOfPartitionEntry; + UINT32 SizeOfPartitionEntry; /// /// The CRC32 of the GUID Partition Entry array. /// Starts at PartitionEntryLBA and is /// computed over a byte length of /// NumberOfPartitionEntries * SizeOfPartitionEntry. /// - UINT32 PartitionEntryArrayCRC32; + UINT32 PartitionEntryArrayCRC32; } EFI_PARTITION_TABLE_HEADER; /// @@ -88,21 +88,21 @@ typedef struct { /// Unique ID that defines the purpose and type of this Partition. A value of /// zero defines that this partition entry is not being used. /// - EFI_GUID PartitionTypeGUID; + EFI_GUID PartitionTypeGUID; /// /// GUID that is unique for every partition entry. Every partition ever /// created will have a unique GUID. /// This GUID must be assigned when the GUID Partition Entry is created. /// - EFI_GUID UniquePartitionGUID; + EFI_GUID UniquePartitionGUID; /// /// Starting LBA of the partition defined by this entry /// - EFI_LBA StartingLBA; + EFI_LBA StartingLBA; /// /// Ending LBA of the partition defined by this entry. /// - EFI_LBA EndingLBA; + EFI_LBA EndingLBA; /// /// Attribute bits, all bits reserved by UEFI /// Bit 0: If this bit is set, the partition is required for the platform to function. The owner/creator of the @@ -135,5 +135,3 @@ typedef struct { #pragma pack() #endif - - diff --git a/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h b/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h index 40fcdb7..3be9a0d 100644 --- a/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h +++ b/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h @@ -20,8 +20,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// The following types are currently defined: /// -typedef VOID* EFI_HII_HANDLE; -typedef CHAR16* EFI_STRING; +typedef VOID *EFI_HII_HANDLE; +typedef CHAR16 *EFI_STRING; typedef UINT16 EFI_IMAGE_ID; typedef UINT16 EFI_QUESTION_ID; typedef UINT16 EFI_STRING_ID; @@ -29,11 +29,9 @@ typedef UINT16 EFI_FORM_ID; typedef UINT16 EFI_VARSTORE_ID; typedef UINT16 EFI_ANIMATION_ID; -typedef UINT16 EFI_DEFAULT_ID; - -typedef UINT32 EFI_HII_FONT_STYLE; - +typedef UINT16 EFI_DEFAULT_ID; +typedef UINT32 EFI_HII_FONT_STYLE; #pragma pack(1) @@ -46,35 +44,35 @@ typedef UINT32 EFI_HII_FONT_STYLE; /// The header found at the start of each package list. /// typedef struct { - EFI_GUID PackageListGuid; - UINT32 PackageLength; + EFI_GUID PackageListGuid; + UINT32 PackageLength; } EFI_HII_PACKAGE_LIST_HEADER; /// /// The header found at the start of each package. /// typedef struct { - UINT32 Length:24; - UINT32 Type:8; + UINT32 Length : 24; + UINT32 Type : 8; // UINT8 Data[...]; } EFI_HII_PACKAGE_HEADER; // // Value of HII package type // -#define EFI_HII_PACKAGE_TYPE_ALL 0x00 -#define EFI_HII_PACKAGE_TYPE_GUID 0x01 -#define EFI_HII_PACKAGE_FORMS 0x02 -#define EFI_HII_PACKAGE_STRINGS 0x04 -#define EFI_HII_PACKAGE_FONTS 0x05 -#define EFI_HII_PACKAGE_IMAGES 0x06 -#define EFI_HII_PACKAGE_SIMPLE_FONTS 0x07 -#define EFI_HII_PACKAGE_DEVICE_PATH 0x08 -#define EFI_HII_PACKAGE_KEYBOARD_LAYOUT 0x09 -#define EFI_HII_PACKAGE_ANIMATIONS 0x0A -#define EFI_HII_PACKAGE_END 0xDF -#define EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN 0xE0 -#define EFI_HII_PACKAGE_TYPE_SYSTEM_END 0xFF +#define EFI_HII_PACKAGE_TYPE_ALL 0x00 +#define EFI_HII_PACKAGE_TYPE_GUID 0x01 +#define EFI_HII_PACKAGE_FORMS 0x02 +#define EFI_HII_PACKAGE_STRINGS 0x04 +#define EFI_HII_PACKAGE_FONTS 0x05 +#define EFI_HII_PACKAGE_IMAGES 0x06 +#define EFI_HII_PACKAGE_SIMPLE_FONTS 0x07 +#define EFI_HII_PACKAGE_DEVICE_PATH 0x08 +#define EFI_HII_PACKAGE_KEYBOARD_LAYOUT 0x09 +#define EFI_HII_PACKAGE_ANIMATIONS 0x0A +#define EFI_HII_PACKAGE_END 0xDF +#define EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN 0xE0 +#define EFI_HII_PACKAGE_TYPE_SYSTEM_END 0xFF // // Definitions for Simplified Font Package @@ -83,10 +81,10 @@ typedef struct { /// /// Contents of EFI_NARROW_GLYPH.Attributes. ///@{ -#define EFI_GLYPH_NON_SPACING 0x01 -#define EFI_GLYPH_WIDE 0x02 -#define EFI_GLYPH_HEIGHT 19 -#define EFI_GLYPH_WIDTH 8 +#define EFI_GLYPH_NON_SPACING 0x01 +#define EFI_GLYPH_WIDE 0x02 +#define EFI_GLYPH_HEIGHT 19 +#define EFI_GLYPH_WIDTH 8 ///@} /// @@ -97,17 +95,17 @@ typedef struct { /// The Unicode representation of the glyph. The term weight is the /// technical term for a character code. /// - CHAR16 UnicodeWeight; + CHAR16 UnicodeWeight; /// /// The data element containing the glyph definitions. /// - UINT8 Attributes; + UINT8 Attributes; /// /// The column major glyph representation of the character. Bits /// with values of one indicate that the corresponding pixel is to be /// on when normally displayed; those with zero are off. /// - UINT8 GlyphCol1[EFI_GLYPH_HEIGHT]; + UINT8 GlyphCol1[EFI_GLYPH_HEIGHT]; } EFI_NARROW_GLYPH; /// @@ -119,29 +117,29 @@ typedef struct { /// The Unicode representation of the glyph. The term weight is the /// technical term for a character code. /// - CHAR16 UnicodeWeight; + CHAR16 UnicodeWeight; /// /// The data element containing the glyph definitions. /// - UINT8 Attributes; + UINT8 Attributes; /// /// The column major glyph representation of the character. Bits /// with values of one indicate that the corresponding pixel is to be /// on when normally displayed; those with zero are off. /// - UINT8 GlyphCol1[EFI_GLYPH_HEIGHT]; + UINT8 GlyphCol1[EFI_GLYPH_HEIGHT]; /// /// The column major glyph representation of the character. Bits /// with values of one indicate that the corresponding pixel is to be /// on when normally displayed; those with zero are off. /// - UINT8 GlyphCol2[EFI_GLYPH_HEIGHT]; + UINT8 GlyphCol2[EFI_GLYPH_HEIGHT]; /// /// Ensures that sizeof (EFI_WIDE_GLYPH) is twice the /// sizeof (EFI_NARROW_GLYPH). The contents of Pad must /// be zero. /// - UINT8 Pad[3]; + UINT8 Pad[3]; } EFI_WIDE_GLYPH; /// @@ -149,9 +147,9 @@ typedef struct { /// followed by a series of glyph structures. /// typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR { - EFI_HII_PACKAGE_HEADER Header; - UINT16 NumberOfNarrowGlyphs; - UINT16 NumberOfWideGlyphs; + EFI_HII_PACKAGE_HEADER Header; + UINT16 NumberOfNarrowGlyphs; + UINT16 NumberOfWideGlyphs; // EFI_NARROW_GLYPH NarrowGlyphs[]; // EFI_WIDE_GLYPH WideGlyphs[]; } EFI_HII_SIMPLE_FONT_PACKAGE_HDR; @@ -164,21 +162,21 @@ typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR { // // Value for font style // -#define EFI_HII_FONT_STYLE_NORMAL 0x00000000 -#define EFI_HII_FONT_STYLE_BOLD 0x00000001 -#define EFI_HII_FONT_STYLE_ITALIC 0x00000002 -#define EFI_HII_FONT_STYLE_EMBOSS 0x00010000 -#define EFI_HII_FONT_STYLE_OUTLINE 0x00020000 -#define EFI_HII_FONT_STYLE_SHADOW 0x00040000 -#define EFI_HII_FONT_STYLE_UNDERLINE 0x00080000 -#define EFI_HII_FONT_STYLE_DBL_UNDER 0x00100000 +#define EFI_HII_FONT_STYLE_NORMAL 0x00000000 +#define EFI_HII_FONT_STYLE_BOLD 0x00000001 +#define EFI_HII_FONT_STYLE_ITALIC 0x00000002 +#define EFI_HII_FONT_STYLE_EMBOSS 0x00010000 +#define EFI_HII_FONT_STYLE_OUTLINE 0x00020000 +#define EFI_HII_FONT_STYLE_SHADOW 0x00040000 +#define EFI_HII_FONT_STYLE_UNDERLINE 0x00080000 +#define EFI_HII_FONT_STYLE_DBL_UNDER 0x00100000 typedef struct _EFI_HII_GLYPH_INFO { - UINT16 Width; - UINT16 Height; - INT16 OffsetX; - INT16 OffsetY; - INT16 AdvanceX; + UINT16 Width; + UINT16 Height; + INT16 OffsetX; + INT16 OffsetY; + INT16 AdvanceX; } EFI_HII_GLYPH_INFO; /// @@ -188,33 +186,33 @@ typedef struct _EFI_HII_GLYPH_INFO { /// information, the glyph bitmaps and the character map. /// typedef struct _EFI_HII_FONT_PACKAGE_HDR { - EFI_HII_PACKAGE_HEADER Header; - UINT32 HdrSize; - UINT32 GlyphBlockOffset; - EFI_HII_GLYPH_INFO Cell; - EFI_HII_FONT_STYLE FontStyle; - CHAR16 FontFamily[1]; + EFI_HII_PACKAGE_HEADER Header; + UINT32 HdrSize; + UINT32 GlyphBlockOffset; + EFI_HII_GLYPH_INFO Cell; + EFI_HII_FONT_STYLE FontStyle; + CHAR16 FontFamily[1]; } EFI_HII_FONT_PACKAGE_HDR; // // Value of different glyph info block types // -#define EFI_HII_GIBT_END 0x00 -#define EFI_HII_GIBT_GLYPH 0x10 -#define EFI_HII_GIBT_GLYPHS 0x11 -#define EFI_HII_GIBT_GLYPH_DEFAULT 0x12 -#define EFI_HII_GIBT_GLYPHS_DEFAULT 0x13 -#define EFI_HII_GIBT_GLYPH_VARIABILITY 0x14 -#define EFI_HII_GIBT_DUPLICATE 0x20 -#define EFI_HII_GIBT_SKIP2 0x21 -#define EFI_HII_GIBT_SKIP1 0x22 -#define EFI_HII_GIBT_DEFAULTS 0x23 -#define EFI_HII_GIBT_EXT1 0x30 -#define EFI_HII_GIBT_EXT2 0x31 -#define EFI_HII_GIBT_EXT4 0x32 +#define EFI_HII_GIBT_END 0x00 +#define EFI_HII_GIBT_GLYPH 0x10 +#define EFI_HII_GIBT_GLYPHS 0x11 +#define EFI_HII_GIBT_GLYPH_DEFAULT 0x12 +#define EFI_HII_GIBT_GLYPHS_DEFAULT 0x13 +#define EFI_HII_GIBT_GLYPH_VARIABILITY 0x14 +#define EFI_HII_GIBT_DUPLICATE 0x20 +#define EFI_HII_GIBT_SKIP2 0x21 +#define EFI_HII_GIBT_SKIP1 0x22 +#define EFI_HII_GIBT_DEFAULTS 0x23 +#define EFI_HII_GIBT_EXT1 0x30 +#define EFI_HII_GIBT_EXT2 0x31 +#define EFI_HII_GIBT_EXT4 0x32 typedef struct _EFI_HII_GLYPH_BLOCK { - UINT8 BlockType; + UINT8 BlockType; } EFI_HII_GLYPH_BLOCK; // @@ -281,7 +279,7 @@ typedef struct _EFI_HII_GIBT_VARIABILITY_BLOCK { EFI_HII_GLYPH_BLOCK Header; EFI_HII_GLYPH_INFO Cell; UINT8 GlyphPackInBits; - UINT8 BitmapData [1]; + UINT8 BitmapData[1]; } EFI_HII_GIBT_VARIABILITY_BLOCK; typedef struct _EFI_HII_GIBT_SKIP1_BLOCK { @@ -304,7 +302,7 @@ typedef struct _EFI_HII_GIBT_SKIP2_BLOCK { /// associated with the package list. /// typedef struct _EFI_HII_DEVICE_PATH_PACKAGE_HDR { - EFI_HII_PACKAGE_HEADER Header; + EFI_HII_PACKAGE_HEADER Header; // EFI_DEVICE_PATH_PROTOCOL DevicePath[]; } EFI_HII_DEVICE_PATH_PACKAGE_HDR; @@ -317,8 +315,8 @@ typedef struct _EFI_HII_DEVICE_PATH_PACKAGE_HDR { /// The GUID package is used to carry data where the format is defined by a GUID. /// typedef struct _EFI_HII_GUID_PACKAGE_HDR { - EFI_HII_PACKAGE_HEADER Header; - EFI_GUID Guid; + EFI_HII_PACKAGE_HEADER Header; + EFI_GUID Guid; // Data per GUID definition may follow } EFI_HII_GUID_PACKAGE_HDR; @@ -327,45 +325,45 @@ typedef struct _EFI_HII_GUID_PACKAGE_HDR { // Section 27.3.6 // -#define UEFI_CONFIG_LANG "x-UEFI" -#define UEFI_CONFIG_LANG_2 "x-i-UEFI" +#define UEFI_CONFIG_LANG "x-UEFI" +#define UEFI_CONFIG_LANG_2 "x-i-UEFI" /// /// The fixed header consists of a standard record header and then the string identifiers /// contained in this section and the offsets of the string and language information. /// typedef struct _EFI_HII_STRING_PACKAGE_HDR { - EFI_HII_PACKAGE_HEADER Header; - UINT32 HdrSize; - UINT32 StringInfoOffset; - CHAR16 LanguageWindow[16]; - EFI_STRING_ID LanguageName; - CHAR8 Language[1]; + EFI_HII_PACKAGE_HEADER Header; + UINT32 HdrSize; + UINT32 StringInfoOffset; + CHAR16 LanguageWindow[16]; + EFI_STRING_ID LanguageName; + CHAR8 Language[1]; } EFI_HII_STRING_PACKAGE_HDR; typedef struct { - UINT8 BlockType; + UINT8 BlockType; } EFI_HII_STRING_BLOCK; // // Value of different string information block types // -#define EFI_HII_SIBT_END 0x00 -#define EFI_HII_SIBT_STRING_SCSU 0x10 -#define EFI_HII_SIBT_STRING_SCSU_FONT 0x11 -#define EFI_HII_SIBT_STRINGS_SCSU 0x12 -#define EFI_HII_SIBT_STRINGS_SCSU_FONT 0x13 -#define EFI_HII_SIBT_STRING_UCS2 0x14 -#define EFI_HII_SIBT_STRING_UCS2_FONT 0x15 -#define EFI_HII_SIBT_STRINGS_UCS2 0x16 -#define EFI_HII_SIBT_STRINGS_UCS2_FONT 0x17 -#define EFI_HII_SIBT_DUPLICATE 0x20 -#define EFI_HII_SIBT_SKIP2 0x21 -#define EFI_HII_SIBT_SKIP1 0x22 -#define EFI_HII_SIBT_EXT1 0x30 -#define EFI_HII_SIBT_EXT2 0x31 -#define EFI_HII_SIBT_EXT4 0x32 -#define EFI_HII_SIBT_FONT 0x40 +#define EFI_HII_SIBT_END 0x00 +#define EFI_HII_SIBT_STRING_SCSU 0x10 +#define EFI_HII_SIBT_STRING_SCSU_FONT 0x11 +#define EFI_HII_SIBT_STRINGS_SCSU 0x12 +#define EFI_HII_SIBT_STRINGS_SCSU_FONT 0x13 +#define EFI_HII_SIBT_STRING_UCS2 0x14 +#define EFI_HII_SIBT_STRING_UCS2_FONT 0x15 +#define EFI_HII_SIBT_STRINGS_UCS2 0x16 +#define EFI_HII_SIBT_STRINGS_UCS2_FONT 0x17 +#define EFI_HII_SIBT_DUPLICATE 0x20 +#define EFI_HII_SIBT_SKIP2 0x21 +#define EFI_HII_SIBT_SKIP1 0x22 +#define EFI_HII_SIBT_EXT1 0x30 +#define EFI_HII_SIBT_EXT2 0x31 +#define EFI_HII_SIBT_EXT4 0x32 +#define EFI_HII_SIBT_FONT 0x40 // // Definition of different string information block types @@ -399,11 +397,11 @@ typedef struct _EFI_HII_SIBT_EXT4_BLOCK { } EFI_HII_SIBT_EXT4_BLOCK; typedef struct _EFI_HII_SIBT_FONT_BLOCK { - EFI_HII_SIBT_EXT2_BLOCK Header; - UINT8 FontId; - UINT16 FontSize; - EFI_HII_FONT_STYLE FontStyle; - CHAR16 FontName[1]; + EFI_HII_SIBT_EXT2_BLOCK Header; + UINT8 FontId; + UINT16 FontSize; + EFI_HII_FONT_STYLE FontStyle; + CHAR16 FontName[1]; } EFI_HII_SIBT_FONT_BLOCK; typedef struct _EFI_HII_SIBT_SKIP1_BLOCK { @@ -470,163 +468,163 @@ typedef struct _EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK { // typedef struct _EFI_HII_IMAGE_PACKAGE_HDR { - EFI_HII_PACKAGE_HEADER Header; - UINT32 ImageInfoOffset; - UINT32 PaletteInfoOffset; + EFI_HII_PACKAGE_HEADER Header; + UINT32 ImageInfoOffset; + UINT32 PaletteInfoOffset; } EFI_HII_IMAGE_PACKAGE_HDR; typedef struct _EFI_HII_IMAGE_BLOCK { - UINT8 BlockType; + UINT8 BlockType; } EFI_HII_IMAGE_BLOCK; // // Value of different image information block types // -#define EFI_HII_IIBT_END 0x00 -#define EFI_HII_IIBT_IMAGE_1BIT 0x10 -#define EFI_HII_IIBT_IMAGE_1BIT_TRANS 0x11 -#define EFI_HII_IIBT_IMAGE_4BIT 0x12 -#define EFI_HII_IIBT_IMAGE_4BIT_TRANS 0x13 -#define EFI_HII_IIBT_IMAGE_8BIT 0x14 -#define EFI_HII_IIBT_IMAGE_8BIT_TRANS 0x15 -#define EFI_HII_IIBT_IMAGE_24BIT 0x16 -#define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17 -#define EFI_HII_IIBT_IMAGE_JPEG 0x18 -#define EFI_HII_IIBT_IMAGE_PNG 0x19 -#define EFI_HII_IIBT_DUPLICATE 0x20 -#define EFI_HII_IIBT_SKIP2 0x21 -#define EFI_HII_IIBT_SKIP1 0x22 -#define EFI_HII_IIBT_EXT1 0x30 -#define EFI_HII_IIBT_EXT2 0x31 -#define EFI_HII_IIBT_EXT4 0x32 +#define EFI_HII_IIBT_END 0x00 +#define EFI_HII_IIBT_IMAGE_1BIT 0x10 +#define EFI_HII_IIBT_IMAGE_1BIT_TRANS 0x11 +#define EFI_HII_IIBT_IMAGE_4BIT 0x12 +#define EFI_HII_IIBT_IMAGE_4BIT_TRANS 0x13 +#define EFI_HII_IIBT_IMAGE_8BIT 0x14 +#define EFI_HII_IIBT_IMAGE_8BIT_TRANS 0x15 +#define EFI_HII_IIBT_IMAGE_24BIT 0x16 +#define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17 +#define EFI_HII_IIBT_IMAGE_JPEG 0x18 +#define EFI_HII_IIBT_IMAGE_PNG 0x19 +#define EFI_HII_IIBT_DUPLICATE 0x20 +#define EFI_HII_IIBT_SKIP2 0x21 +#define EFI_HII_IIBT_SKIP1 0x22 +#define EFI_HII_IIBT_EXT1 0x30 +#define EFI_HII_IIBT_EXT2 0x31 +#define EFI_HII_IIBT_EXT4 0x32 // // Definition of different image information block types // typedef struct _EFI_HII_IIBT_END_BLOCK { - EFI_HII_IMAGE_BLOCK Header; + EFI_HII_IMAGE_BLOCK Header; } EFI_HII_IIBT_END_BLOCK; typedef struct _EFI_HII_IIBT_EXT1_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT8 BlockType2; - UINT8 Length; + EFI_HII_IMAGE_BLOCK Header; + UINT8 BlockType2; + UINT8 Length; } EFI_HII_IIBT_EXT1_BLOCK; typedef struct _EFI_HII_IIBT_EXT2_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT8 BlockType2; - UINT16 Length; + EFI_HII_IMAGE_BLOCK Header; + UINT8 BlockType2; + UINT16 Length; } EFI_HII_IIBT_EXT2_BLOCK; typedef struct _EFI_HII_IIBT_EXT4_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT8 BlockType2; - UINT32 Length; + EFI_HII_IMAGE_BLOCK Header; + UINT8 BlockType2; + UINT32 Length; } EFI_HII_IIBT_EXT4_BLOCK; typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BASE { - UINT16 Width; - UINT16 Height; - UINT8 Data[1]; + UINT16 Width; + UINT16 Height; + UINT8 Data[1]; } EFI_HII_IIBT_IMAGE_1BIT_BASE; typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT8 PaletteIndex; - EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap; + EFI_HII_IMAGE_BLOCK Header; + UINT8 PaletteIndex; + EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap; } EFI_HII_IIBT_IMAGE_1BIT_BLOCK; typedef struct _EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT8 PaletteIndex; - EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap; + EFI_HII_IMAGE_BLOCK Header; + UINT8 PaletteIndex; + EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap; } EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK; typedef struct _EFI_HII_RGB_PIXEL { - UINT8 b; - UINT8 g; - UINT8 r; + UINT8 b; + UINT8 g; + UINT8 r; } EFI_HII_RGB_PIXEL; typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BASE { - UINT16 Width; - UINT16 Height; - EFI_HII_RGB_PIXEL Bitmap[1]; + UINT16 Width; + UINT16 Height; + EFI_HII_RGB_PIXEL Bitmap[1]; } EFI_HII_IIBT_IMAGE_24BIT_BASE; typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap; + EFI_HII_IMAGE_BLOCK Header; + EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap; } EFI_HII_IIBT_IMAGE_24BIT_BLOCK; typedef struct _EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap; + EFI_HII_IMAGE_BLOCK Header; + EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap; } EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK; typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BASE { - UINT16 Width; - UINT16 Height; - UINT8 Data[1]; + UINT16 Width; + UINT16 Height; + UINT8 Data[1]; } EFI_HII_IIBT_IMAGE_4BIT_BASE; typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT8 PaletteIndex; - EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap; + EFI_HII_IMAGE_BLOCK Header; + UINT8 PaletteIndex; + EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap; } EFI_HII_IIBT_IMAGE_4BIT_BLOCK; typedef struct _EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT8 PaletteIndex; - EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap; + EFI_HII_IMAGE_BLOCK Header; + UINT8 PaletteIndex; + EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap; } EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK; typedef struct _EFI_HII_IIBT_IMAGE_8BIT_BASE { - UINT16 Width; - UINT16 Height; - UINT8 Data[1]; + UINT16 Width; + UINT16 Height; + UINT8 Data[1]; } EFI_HII_IIBT_IMAGE_8BIT_BASE; typedef struct _EFI_HII_IIBT_IMAGE_8BIT_PALETTE_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT8 PaletteIndex; - EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap; + EFI_HII_IMAGE_BLOCK Header; + UINT8 PaletteIndex; + EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap; } EFI_HII_IIBT_IMAGE_8BIT_BLOCK; typedef struct _EFI_HII_IIBT_IMAGE_8BIT_TRANS_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT8 PaletteIndex; - EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap; + EFI_HII_IMAGE_BLOCK Header; + UINT8 PaletteIndex; + EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap; } EFI_HII_IIBT_IMAGE_8BIT_TRAN_BLOCK; typedef struct _EFI_HII_IIBT_DUPLICATE_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - EFI_IMAGE_ID ImageId; + EFI_HII_IMAGE_BLOCK Header; + EFI_IMAGE_ID ImageId; } EFI_HII_IIBT_DUPLICATE_BLOCK; typedef struct _EFI_HII_IIBT_JPEG_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT32 Size; - UINT8 Data[1]; + EFI_HII_IMAGE_BLOCK Header; + UINT32 Size; + UINT8 Data[1]; } EFI_HII_IIBT_JPEG_BLOCK; typedef struct _EFI_HII_IIBT_PNG_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT32 Size; - UINT8 Data[1]; + EFI_HII_IMAGE_BLOCK Header; + UINT32 Size; + UINT8 Data[1]; } EFI_HII_IIBT_PNG_BLOCK; typedef struct _EFI_HII_IIBT_SKIP1_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT8 SkipCount; + EFI_HII_IMAGE_BLOCK Header; + UINT8 SkipCount; } EFI_HII_IIBT_SKIP1_BLOCK; typedef struct _EFI_HII_IIBT_SKIP2_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT16 SkipCount; + EFI_HII_IMAGE_BLOCK Header; + UINT16 SkipCount; } EFI_HII_IIBT_SKIP2_BLOCK; // @@ -634,12 +632,12 @@ typedef struct _EFI_HII_IIBT_SKIP2_BLOCK { // typedef struct _EFI_HII_IMAGE_PALETTE_INFO_HEADER { - UINT16 PaletteCount; + UINT16 PaletteCount; } EFI_HII_IMAGE_PALETTE_INFO_HEADER; typedef struct _EFI_HII_IMAGE_PALETTE_INFO { - UINT16 PaletteSize; - EFI_HII_RGB_PIXEL PaletteValue[1]; + UINT16 PaletteSize; + EFI_HII_RGB_PIXEL PaletteValue[1]; } EFI_HII_IMAGE_PALETTE_INFO; // @@ -651,146 +649,146 @@ typedef struct _EFI_HII_IMAGE_PALETTE_INFO { /// The Form package is used to carry form-based encoding data. /// typedef struct _EFI_HII_FORM_PACKAGE_HDR { - EFI_HII_PACKAGE_HEADER Header; + EFI_HII_PACKAGE_HEADER Header; // EFI_IFR_OP_HEADER OpCodeHeader; // More op-codes follow } EFI_HII_FORM_PACKAGE_HDR; typedef struct { - UINT8 Hour; - UINT8 Minute; - UINT8 Second; + UINT8 Hour; + UINT8 Minute; + UINT8 Second; } EFI_HII_TIME; typedef struct { - UINT16 Year; - UINT8 Month; - UINT8 Day; + UINT16 Year; + UINT8 Month; + UINT8 Day; } EFI_HII_DATE; typedef struct { - EFI_QUESTION_ID QuestionId; - EFI_FORM_ID FormId; - EFI_GUID FormSetGuid; - EFI_STRING_ID DevicePath; + EFI_QUESTION_ID QuestionId; + EFI_FORM_ID FormId; + EFI_GUID FormSetGuid; + EFI_STRING_ID DevicePath; } EFI_HII_REF; typedef union { - UINT8 u8; - UINT16 u16; - UINT32 u32; - UINT64 u64; - BOOLEAN b; - EFI_HII_TIME time; - EFI_HII_DATE date; - EFI_STRING_ID string; ///< EFI_IFR_TYPE_STRING, EFI_IFR_TYPE_ACTION - EFI_HII_REF ref; ///< EFI_IFR_TYPE_REF + UINT8 u8; + UINT16 u16; + UINT32 u32; + UINT64 u64; + BOOLEAN b; + EFI_HII_TIME time; + EFI_HII_DATE date; + EFI_STRING_ID string; ///< EFI_IFR_TYPE_STRING, EFI_IFR_TYPE_ACTION + EFI_HII_REF ref; ///< EFI_IFR_TYPE_REF // UINT8 buffer[]; ///< EFI_IFR_TYPE_BUFFER } EFI_IFR_TYPE_VALUE; // // IFR Opcodes // -#define EFI_IFR_FORM_OP 0x01 -#define EFI_IFR_SUBTITLE_OP 0x02 -#define EFI_IFR_TEXT_OP 0x03 -#define EFI_IFR_IMAGE_OP 0x04 -#define EFI_IFR_ONE_OF_OP 0x05 -#define EFI_IFR_CHECKBOX_OP 0x06 -#define EFI_IFR_NUMERIC_OP 0x07 -#define EFI_IFR_PASSWORD_OP 0x08 -#define EFI_IFR_ONE_OF_OPTION_OP 0x09 -#define EFI_IFR_SUPPRESS_IF_OP 0x0A -#define EFI_IFR_LOCKED_OP 0x0B -#define EFI_IFR_ACTION_OP 0x0C -#define EFI_IFR_RESET_BUTTON_OP 0x0D -#define EFI_IFR_FORM_SET_OP 0x0E -#define EFI_IFR_REF_OP 0x0F -#define EFI_IFR_NO_SUBMIT_IF_OP 0x10 -#define EFI_IFR_INCONSISTENT_IF_OP 0x11 -#define EFI_IFR_EQ_ID_VAL_OP 0x12 -#define EFI_IFR_EQ_ID_ID_OP 0x13 -#define EFI_IFR_EQ_ID_VAL_LIST_OP 0x14 -#define EFI_IFR_AND_OP 0x15 -#define EFI_IFR_OR_OP 0x16 -#define EFI_IFR_NOT_OP 0x17 -#define EFI_IFR_RULE_OP 0x18 -#define EFI_IFR_GRAY_OUT_IF_OP 0x19 -#define EFI_IFR_DATE_OP 0x1A -#define EFI_IFR_TIME_OP 0x1B -#define EFI_IFR_STRING_OP 0x1C -#define EFI_IFR_REFRESH_OP 0x1D -#define EFI_IFR_DISABLE_IF_OP 0x1E -#define EFI_IFR_ANIMATION_OP 0x1F -#define EFI_IFR_TO_LOWER_OP 0x20 -#define EFI_IFR_TO_UPPER_OP 0x21 -#define EFI_IFR_MAP_OP 0x22 -#define EFI_IFR_ORDERED_LIST_OP 0x23 -#define EFI_IFR_VARSTORE_OP 0x24 -#define EFI_IFR_VARSTORE_NAME_VALUE_OP 0x25 -#define EFI_IFR_VARSTORE_EFI_OP 0x26 -#define EFI_IFR_VARSTORE_DEVICE_OP 0x27 -#define EFI_IFR_VERSION_OP 0x28 -#define EFI_IFR_END_OP 0x29 -#define EFI_IFR_MATCH_OP 0x2A -#define EFI_IFR_GET_OP 0x2B -#define EFI_IFR_SET_OP 0x2C -#define EFI_IFR_READ_OP 0x2D -#define EFI_IFR_WRITE_OP 0x2E -#define EFI_IFR_EQUAL_OP 0x2F -#define EFI_IFR_NOT_EQUAL_OP 0x30 -#define EFI_IFR_GREATER_THAN_OP 0x31 -#define EFI_IFR_GREATER_EQUAL_OP 0x32 -#define EFI_IFR_LESS_THAN_OP 0x33 -#define EFI_IFR_LESS_EQUAL_OP 0x34 -#define EFI_IFR_BITWISE_AND_OP 0x35 -#define EFI_IFR_BITWISE_OR_OP 0x36 -#define EFI_IFR_BITWISE_NOT_OP 0x37 -#define EFI_IFR_SHIFT_LEFT_OP 0x38 -#define EFI_IFR_SHIFT_RIGHT_OP 0x39 -#define EFI_IFR_ADD_OP 0x3A -#define EFI_IFR_SUBTRACT_OP 0x3B -#define EFI_IFR_MULTIPLY_OP 0x3C -#define EFI_IFR_DIVIDE_OP 0x3D -#define EFI_IFR_MODULO_OP 0x3E -#define EFI_IFR_RULE_REF_OP 0x3F -#define EFI_IFR_QUESTION_REF1_OP 0x40 -#define EFI_IFR_QUESTION_REF2_OP 0x41 -#define EFI_IFR_UINT8_OP 0x42 -#define EFI_IFR_UINT16_OP 0x43 -#define EFI_IFR_UINT32_OP 0x44 -#define EFI_IFR_UINT64_OP 0x45 -#define EFI_IFR_TRUE_OP 0x46 -#define EFI_IFR_FALSE_OP 0x47 -#define EFI_IFR_TO_UINT_OP 0x48 -#define EFI_IFR_TO_STRING_OP 0x49 -#define EFI_IFR_TO_BOOLEAN_OP 0x4A -#define EFI_IFR_MID_OP 0x4B -#define EFI_IFR_FIND_OP 0x4C -#define EFI_IFR_TOKEN_OP 0x4D -#define EFI_IFR_STRING_REF1_OP 0x4E -#define EFI_IFR_STRING_REF2_OP 0x4F -#define EFI_IFR_CONDITIONAL_OP 0x50 -#define EFI_IFR_QUESTION_REF3_OP 0x51 -#define EFI_IFR_ZERO_OP 0x52 -#define EFI_IFR_ONE_OP 0x53 -#define EFI_IFR_ONES_OP 0x54 -#define EFI_IFR_UNDEFINED_OP 0x55 -#define EFI_IFR_LENGTH_OP 0x56 -#define EFI_IFR_DUP_OP 0x57 -#define EFI_IFR_THIS_OP 0x58 -#define EFI_IFR_SPAN_OP 0x59 -#define EFI_IFR_VALUE_OP 0x5A -#define EFI_IFR_DEFAULT_OP 0x5B -#define EFI_IFR_DEFAULTSTORE_OP 0x5C -#define EFI_IFR_FORM_MAP_OP 0x5D -#define EFI_IFR_CATENATE_OP 0x5E -#define EFI_IFR_GUID_OP 0x5F -#define EFI_IFR_SECURITY_OP 0x60 -#define EFI_IFR_MODAL_TAG_OP 0x61 -#define EFI_IFR_REFRESH_ID_OP 0x62 -#define EFI_IFR_WARNING_IF_OP 0x63 -#define EFI_IFR_MATCH2_OP 0x64 +#define EFI_IFR_FORM_OP 0x01 +#define EFI_IFR_SUBTITLE_OP 0x02 +#define EFI_IFR_TEXT_OP 0x03 +#define EFI_IFR_IMAGE_OP 0x04 +#define EFI_IFR_ONE_OF_OP 0x05 +#define EFI_IFR_CHECKBOX_OP 0x06 +#define EFI_IFR_NUMERIC_OP 0x07 +#define EFI_IFR_PASSWORD_OP 0x08 +#define EFI_IFR_ONE_OF_OPTION_OP 0x09 +#define EFI_IFR_SUPPRESS_IF_OP 0x0A +#define EFI_IFR_LOCKED_OP 0x0B +#define EFI_IFR_ACTION_OP 0x0C +#define EFI_IFR_RESET_BUTTON_OP 0x0D +#define EFI_IFR_FORM_SET_OP 0x0E +#define EFI_IFR_REF_OP 0x0F +#define EFI_IFR_NO_SUBMIT_IF_OP 0x10 +#define EFI_IFR_INCONSISTENT_IF_OP 0x11 +#define EFI_IFR_EQ_ID_VAL_OP 0x12 +#define EFI_IFR_EQ_ID_ID_OP 0x13 +#define EFI_IFR_EQ_ID_VAL_LIST_OP 0x14 +#define EFI_IFR_AND_OP 0x15 +#define EFI_IFR_OR_OP 0x16 +#define EFI_IFR_NOT_OP 0x17 +#define EFI_IFR_RULE_OP 0x18 +#define EFI_IFR_GRAY_OUT_IF_OP 0x19 +#define EFI_IFR_DATE_OP 0x1A +#define EFI_IFR_TIME_OP 0x1B +#define EFI_IFR_STRING_OP 0x1C +#define EFI_IFR_REFRESH_OP 0x1D +#define EFI_IFR_DISABLE_IF_OP 0x1E +#define EFI_IFR_ANIMATION_OP 0x1F +#define EFI_IFR_TO_LOWER_OP 0x20 +#define EFI_IFR_TO_UPPER_OP 0x21 +#define EFI_IFR_MAP_OP 0x22 +#define EFI_IFR_ORDERED_LIST_OP 0x23 +#define EFI_IFR_VARSTORE_OP 0x24 +#define EFI_IFR_VARSTORE_NAME_VALUE_OP 0x25 +#define EFI_IFR_VARSTORE_EFI_OP 0x26 +#define EFI_IFR_VARSTORE_DEVICE_OP 0x27 +#define EFI_IFR_VERSION_OP 0x28 +#define EFI_IFR_END_OP 0x29 +#define EFI_IFR_MATCH_OP 0x2A +#define EFI_IFR_GET_OP 0x2B +#define EFI_IFR_SET_OP 0x2C +#define EFI_IFR_READ_OP 0x2D +#define EFI_IFR_WRITE_OP 0x2E +#define EFI_IFR_EQUAL_OP 0x2F +#define EFI_IFR_NOT_EQUAL_OP 0x30 +#define EFI_IFR_GREATER_THAN_OP 0x31 +#define EFI_IFR_GREATER_EQUAL_OP 0x32 +#define EFI_IFR_LESS_THAN_OP 0x33 +#define EFI_IFR_LESS_EQUAL_OP 0x34 +#define EFI_IFR_BITWISE_AND_OP 0x35 +#define EFI_IFR_BITWISE_OR_OP 0x36 +#define EFI_IFR_BITWISE_NOT_OP 0x37 +#define EFI_IFR_SHIFT_LEFT_OP 0x38 +#define EFI_IFR_SHIFT_RIGHT_OP 0x39 +#define EFI_IFR_ADD_OP 0x3A +#define EFI_IFR_SUBTRACT_OP 0x3B +#define EFI_IFR_MULTIPLY_OP 0x3C +#define EFI_IFR_DIVIDE_OP 0x3D +#define EFI_IFR_MODULO_OP 0x3E +#define EFI_IFR_RULE_REF_OP 0x3F +#define EFI_IFR_QUESTION_REF1_OP 0x40 +#define EFI_IFR_QUESTION_REF2_OP 0x41 +#define EFI_IFR_UINT8_OP 0x42 +#define EFI_IFR_UINT16_OP 0x43 +#define EFI_IFR_UINT32_OP 0x44 +#define EFI_IFR_UINT64_OP 0x45 +#define EFI_IFR_TRUE_OP 0x46 +#define EFI_IFR_FALSE_OP 0x47 +#define EFI_IFR_TO_UINT_OP 0x48 +#define EFI_IFR_TO_STRING_OP 0x49 +#define EFI_IFR_TO_BOOLEAN_OP 0x4A +#define EFI_IFR_MID_OP 0x4B +#define EFI_IFR_FIND_OP 0x4C +#define EFI_IFR_TOKEN_OP 0x4D +#define EFI_IFR_STRING_REF1_OP 0x4E +#define EFI_IFR_STRING_REF2_OP 0x4F +#define EFI_IFR_CONDITIONAL_OP 0x50 +#define EFI_IFR_QUESTION_REF3_OP 0x51 +#define EFI_IFR_ZERO_OP 0x52 +#define EFI_IFR_ONE_OP 0x53 +#define EFI_IFR_ONES_OP 0x54 +#define EFI_IFR_UNDEFINED_OP 0x55 +#define EFI_IFR_LENGTH_OP 0x56 +#define EFI_IFR_DUP_OP 0x57 +#define EFI_IFR_THIS_OP 0x58 +#define EFI_IFR_SPAN_OP 0x59 +#define EFI_IFR_VALUE_OP 0x5A +#define EFI_IFR_DEFAULT_OP 0x5B +#define EFI_IFR_DEFAULTSTORE_OP 0x5C +#define EFI_IFR_FORM_MAP_OP 0x5D +#define EFI_IFR_CATENATE_OP 0x5E +#define EFI_IFR_GUID_OP 0x5F +#define EFI_IFR_SECURITY_OP 0x60 +#define EFI_IFR_MODAL_TAG_OP 0x61 +#define EFI_IFR_REFRESH_ID_OP 0x62 +#define EFI_IFR_WARNING_IF_OP 0x63 +#define EFI_IFR_MATCH2_OP 0x64 // // Definitions of IFR Standard Headers @@ -798,530 +796,530 @@ typedef union { // typedef struct _EFI_IFR_OP_HEADER { - UINT8 OpCode; - UINT8 Length:7; - UINT8 Scope:1; + UINT8 OpCode; + UINT8 Length : 7; + UINT8 Scope : 1; } EFI_IFR_OP_HEADER; typedef struct _EFI_IFR_STATEMENT_HEADER { - EFI_STRING_ID Prompt; - EFI_STRING_ID Help; + EFI_STRING_ID Prompt; + EFI_STRING_ID Help; } EFI_IFR_STATEMENT_HEADER; typedef struct _EFI_IFR_QUESTION_HEADER { - EFI_IFR_STATEMENT_HEADER Header; - EFI_QUESTION_ID QuestionId; - EFI_VARSTORE_ID VarStoreId; + EFI_IFR_STATEMENT_HEADER Header; + EFI_QUESTION_ID QuestionId; + EFI_VARSTORE_ID VarStoreId; union { - EFI_STRING_ID VarName; - UINT16 VarOffset; + EFI_STRING_ID VarName; + UINT16 VarOffset; } VarStoreInfo; - UINT8 Flags; + UINT8 Flags; } EFI_IFR_QUESTION_HEADER; // // Flag values of EFI_IFR_QUESTION_HEADER // -#define EFI_IFR_FLAG_READ_ONLY 0x01 -#define EFI_IFR_FLAG_CALLBACK 0x04 -#define EFI_IFR_FLAG_RESET_REQUIRED 0x10 -#define EFI_IFR_FLAG_REST_STYLE 0x20 -#define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40 -#define EFI_IFR_FLAG_OPTIONS_ONLY 0x80 +#define EFI_IFR_FLAG_READ_ONLY 0x01 +#define EFI_IFR_FLAG_CALLBACK 0x04 +#define EFI_IFR_FLAG_RESET_REQUIRED 0x10 +#define EFI_IFR_FLAG_REST_STYLE 0x20 +#define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40 +#define EFI_IFR_FLAG_OPTIONS_ONLY 0x80 // // Definition for Opcode Reference // Section 27.3.8.3 // typedef struct _EFI_IFR_DEFAULTSTORE { - EFI_IFR_OP_HEADER Header; - EFI_STRING_ID DefaultName; - UINT16 DefaultId; + EFI_IFR_OP_HEADER Header; + EFI_STRING_ID DefaultName; + UINT16 DefaultId; } EFI_IFR_DEFAULTSTORE; // // Default Identifier of default store // -#define EFI_HII_DEFAULT_CLASS_STANDARD 0x0000 -#define EFI_HII_DEFAULT_CLASS_MANUFACTURING 0x0001 -#define EFI_HII_DEFAULT_CLASS_SAFE 0x0002 -#define EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN 0x4000 -#define EFI_HII_DEFAULT_CLASS_PLATFORM_END 0x7fff -#define EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN 0x8000 -#define EFI_HII_DEFAULT_CLASS_HARDWARE_END 0xbfff -#define EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN 0xc000 -#define EFI_HII_DEFAULT_CLASS_FIRMWARE_END 0xffff +#define EFI_HII_DEFAULT_CLASS_STANDARD 0x0000 +#define EFI_HII_DEFAULT_CLASS_MANUFACTURING 0x0001 +#define EFI_HII_DEFAULT_CLASS_SAFE 0x0002 +#define EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN 0x4000 +#define EFI_HII_DEFAULT_CLASS_PLATFORM_END 0x7fff +#define EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN 0x8000 +#define EFI_HII_DEFAULT_CLASS_HARDWARE_END 0xbfff +#define EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN 0xc000 +#define EFI_HII_DEFAULT_CLASS_FIRMWARE_END 0xffff typedef struct _EFI_IFR_VARSTORE { - EFI_IFR_OP_HEADER Header; - EFI_GUID Guid; - EFI_VARSTORE_ID VarStoreId; - UINT16 Size; - UINT8 Name[1]; + EFI_IFR_OP_HEADER Header; + EFI_GUID Guid; + EFI_VARSTORE_ID VarStoreId; + UINT16 Size; + UINT8 Name[1]; } EFI_IFR_VARSTORE; typedef struct _EFI_IFR_VARSTORE_EFI { - EFI_IFR_OP_HEADER Header; - EFI_VARSTORE_ID VarStoreId; - EFI_GUID Guid; - UINT32 Attributes; - UINT16 Size; - UINT8 Name[1]; + EFI_IFR_OP_HEADER Header; + EFI_VARSTORE_ID VarStoreId; + EFI_GUID Guid; + UINT32 Attributes; + UINT16 Size; + UINT8 Name[1]; } EFI_IFR_VARSTORE_EFI; typedef struct _EFI_IFR_VARSTORE_NAME_VALUE { - EFI_IFR_OP_HEADER Header; - EFI_VARSTORE_ID VarStoreId; - EFI_GUID Guid; + EFI_IFR_OP_HEADER Header; + EFI_VARSTORE_ID VarStoreId; + EFI_GUID Guid; } EFI_IFR_VARSTORE_NAME_VALUE; typedef struct _EFI_IFR_FORM_SET { - EFI_IFR_OP_HEADER Header; - EFI_GUID Guid; - EFI_STRING_ID FormSetTitle; - EFI_STRING_ID Help; - UINT8 Flags; + EFI_IFR_OP_HEADER Header; + EFI_GUID Guid; + EFI_STRING_ID FormSetTitle; + EFI_STRING_ID Help; + UINT8 Flags; // EFI_GUID ClassGuid[]; } EFI_IFR_FORM_SET; typedef struct _EFI_IFR_END { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_END; typedef struct _EFI_IFR_FORM { - EFI_IFR_OP_HEADER Header; - UINT16 FormId; - EFI_STRING_ID FormTitle; + EFI_IFR_OP_HEADER Header; + UINT16 FormId; + EFI_STRING_ID FormTitle; } EFI_IFR_FORM; typedef struct _EFI_IFR_IMAGE { - EFI_IFR_OP_HEADER Header; - EFI_IMAGE_ID Id; + EFI_IFR_OP_HEADER Header; + EFI_IMAGE_ID Id; } EFI_IFR_IMAGE; typedef struct _EFI_IFR_MODAL_TAG { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_MODAL_TAG; typedef struct _EFI_IFR_LOCKED { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_LOCKED; typedef struct _EFI_IFR_RULE { - EFI_IFR_OP_HEADER Header; - UINT8 RuleId; + EFI_IFR_OP_HEADER Header; + UINT8 RuleId; } EFI_IFR_RULE; typedef struct _EFI_IFR_DEFAULT { - EFI_IFR_OP_HEADER Header; - UINT16 DefaultId; - UINT8 Type; - EFI_IFR_TYPE_VALUE Value; + EFI_IFR_OP_HEADER Header; + UINT16 DefaultId; + UINT8 Type; + EFI_IFR_TYPE_VALUE Value; } EFI_IFR_DEFAULT; typedef struct _EFI_IFR_DEFAULT_2 { - EFI_IFR_OP_HEADER Header; - UINT16 DefaultId; - UINT8 Type; + EFI_IFR_OP_HEADER Header; + UINT16 DefaultId; + UINT8 Type; } EFI_IFR_DEFAULT_2; typedef struct _EFI_IFR_VALUE { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_VALUE; typedef struct _EFI_IFR_SUBTITLE { - EFI_IFR_OP_HEADER Header; - EFI_IFR_STATEMENT_HEADER Statement; - UINT8 Flags; + EFI_IFR_OP_HEADER Header; + EFI_IFR_STATEMENT_HEADER Statement; + UINT8 Flags; } EFI_IFR_SUBTITLE; -#define EFI_IFR_FLAGS_HORIZONTAL 0x01 +#define EFI_IFR_FLAGS_HORIZONTAL 0x01 typedef struct _EFI_IFR_CHECKBOX { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - UINT8 Flags; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + UINT8 Flags; } EFI_IFR_CHECKBOX; -#define EFI_IFR_CHECKBOX_DEFAULT 0x01 -#define EFI_IFR_CHECKBOX_DEFAULT_MFG 0x02 +#define EFI_IFR_CHECKBOX_DEFAULT 0x01 +#define EFI_IFR_CHECKBOX_DEFAULT_MFG 0x02 typedef struct _EFI_IFR_TEXT { - EFI_IFR_OP_HEADER Header; - EFI_IFR_STATEMENT_HEADER Statement; - EFI_STRING_ID TextTwo; + EFI_IFR_OP_HEADER Header; + EFI_IFR_STATEMENT_HEADER Statement; + EFI_STRING_ID TextTwo; } EFI_IFR_TEXT; typedef struct _EFI_IFR_REF { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - EFI_FORM_ID FormId; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + EFI_FORM_ID FormId; } EFI_IFR_REF; typedef struct _EFI_IFR_REF2 { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - EFI_FORM_ID FormId; - EFI_QUESTION_ID QuestionId; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + EFI_FORM_ID FormId; + EFI_QUESTION_ID QuestionId; } EFI_IFR_REF2; typedef struct _EFI_IFR_REF3 { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - EFI_FORM_ID FormId; - EFI_QUESTION_ID QuestionId; - EFI_GUID FormSetId; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + EFI_FORM_ID FormId; + EFI_QUESTION_ID QuestionId; + EFI_GUID FormSetId; } EFI_IFR_REF3; typedef struct _EFI_IFR_REF4 { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - EFI_FORM_ID FormId; - EFI_QUESTION_ID QuestionId; - EFI_GUID FormSetId; - EFI_STRING_ID DevicePath; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + EFI_FORM_ID FormId; + EFI_QUESTION_ID QuestionId; + EFI_GUID FormSetId; + EFI_STRING_ID DevicePath; } EFI_IFR_REF4; typedef struct _EFI_IFR_REF5 { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; } EFI_IFR_REF5; typedef struct _EFI_IFR_RESET_BUTTON { - EFI_IFR_OP_HEADER Header; - EFI_IFR_STATEMENT_HEADER Statement; - EFI_DEFAULT_ID DefaultId; + EFI_IFR_OP_HEADER Header; + EFI_IFR_STATEMENT_HEADER Statement; + EFI_DEFAULT_ID DefaultId; } EFI_IFR_RESET_BUTTON; typedef struct _EFI_IFR_ACTION { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - EFI_STRING_ID QuestionConfig; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + EFI_STRING_ID QuestionConfig; } EFI_IFR_ACTION; typedef struct _EFI_IFR_ACTION_1 { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; } EFI_IFR_ACTION_1; typedef struct _EFI_IFR_DATE { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - UINT8 Flags; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + UINT8 Flags; } EFI_IFR_DATE; // // Flags that describe the behavior of the question. // -#define EFI_QF_DATE_YEAR_SUPPRESS 0x01 -#define EFI_QF_DATE_MONTH_SUPPRESS 0x02 -#define EFI_QF_DATE_DAY_SUPPRESS 0x04 +#define EFI_QF_DATE_YEAR_SUPPRESS 0x01 +#define EFI_QF_DATE_MONTH_SUPPRESS 0x02 +#define EFI_QF_DATE_DAY_SUPPRESS 0x04 -#define EFI_QF_DATE_STORAGE 0x30 -#define QF_DATE_STORAGE_NORMAL 0x00 -#define QF_DATE_STORAGE_TIME 0x10 -#define QF_DATE_STORAGE_WAKEUP 0x20 +#define EFI_QF_DATE_STORAGE 0x30 +#define QF_DATE_STORAGE_NORMAL 0x00 +#define QF_DATE_STORAGE_TIME 0x10 +#define QF_DATE_STORAGE_WAKEUP 0x20 typedef union { struct { - UINT8 MinValue; - UINT8 MaxValue; - UINT8 Step; + UINT8 MinValue; + UINT8 MaxValue; + UINT8 Step; } u8; struct { - UINT16 MinValue; - UINT16 MaxValue; - UINT16 Step; + UINT16 MinValue; + UINT16 MaxValue; + UINT16 Step; } u16; struct { - UINT32 MinValue; - UINT32 MaxValue; - UINT32 Step; + UINT32 MinValue; + UINT32 MaxValue; + UINT32 Step; } u32; struct { - UINT64 MinValue; - UINT64 MaxValue; - UINT64 Step; + UINT64 MinValue; + UINT64 MaxValue; + UINT64 Step; } u64; } MINMAXSTEP_DATA; typedef struct _EFI_IFR_NUMERIC { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - UINT8 Flags; - MINMAXSTEP_DATA data; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + UINT8 Flags; + MINMAXSTEP_DATA data; } EFI_IFR_NUMERIC; // // Flags related to the numeric question // -#define EFI_IFR_NUMERIC_SIZE 0x03 -#define EFI_IFR_NUMERIC_SIZE_1 0x00 -#define EFI_IFR_NUMERIC_SIZE_2 0x01 -#define EFI_IFR_NUMERIC_SIZE_4 0x02 -#define EFI_IFR_NUMERIC_SIZE_8 0x03 +#define EFI_IFR_NUMERIC_SIZE 0x03 +#define EFI_IFR_NUMERIC_SIZE_1 0x00 +#define EFI_IFR_NUMERIC_SIZE_2 0x01 +#define EFI_IFR_NUMERIC_SIZE_4 0x02 +#define EFI_IFR_NUMERIC_SIZE_8 0x03 -#define EFI_IFR_DISPLAY 0x30 -#define EFI_IFR_DISPLAY_INT_DEC 0x00 -#define EFI_IFR_DISPLAY_UINT_DEC 0x10 -#define EFI_IFR_DISPLAY_UINT_HEX 0x20 +#define EFI_IFR_DISPLAY 0x30 +#define EFI_IFR_DISPLAY_INT_DEC 0x00 +#define EFI_IFR_DISPLAY_UINT_DEC 0x10 +#define EFI_IFR_DISPLAY_UINT_HEX 0x20 typedef struct _EFI_IFR_ONE_OF { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - UINT8 Flags; - MINMAXSTEP_DATA data; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + UINT8 Flags; + MINMAXSTEP_DATA data; } EFI_IFR_ONE_OF; typedef struct _EFI_IFR_STRING { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - UINT8 MinSize; - UINT8 MaxSize; - UINT8 Flags; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + UINT8 MinSize; + UINT8 MaxSize; + UINT8 Flags; } EFI_IFR_STRING; -#define EFI_IFR_STRING_MULTI_LINE 0x01 +#define EFI_IFR_STRING_MULTI_LINE 0x01 typedef struct _EFI_IFR_PASSWORD { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - UINT16 MinSize; - UINT16 MaxSize; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + UINT16 MinSize; + UINT16 MaxSize; } EFI_IFR_PASSWORD; typedef struct _EFI_IFR_ORDERED_LIST { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - UINT8 MaxContainers; - UINT8 Flags; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + UINT8 MaxContainers; + UINT8 Flags; } EFI_IFR_ORDERED_LIST; -#define EFI_IFR_UNIQUE_SET 0x01 -#define EFI_IFR_NO_EMPTY_SET 0x02 +#define EFI_IFR_UNIQUE_SET 0x01 +#define EFI_IFR_NO_EMPTY_SET 0x02 typedef struct _EFI_IFR_TIME { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - UINT8 Flags; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + UINT8 Flags; } EFI_IFR_TIME; // // A bit-mask that determines which unique settings are active for this opcode. // -#define QF_TIME_HOUR_SUPPRESS 0x01 -#define QF_TIME_MINUTE_SUPPRESS 0x02 -#define QF_TIME_SECOND_SUPPRESS 0x04 +#define QF_TIME_HOUR_SUPPRESS 0x01 +#define QF_TIME_MINUTE_SUPPRESS 0x02 +#define QF_TIME_SECOND_SUPPRESS 0x04 -#define QF_TIME_STORAGE 0x30 -#define QF_TIME_STORAGE_NORMAL 0x00 -#define QF_TIME_STORAGE_TIME 0x10 -#define QF_TIME_STORAGE_WAKEUP 0x20 +#define QF_TIME_STORAGE 0x30 +#define QF_TIME_STORAGE_NORMAL 0x00 +#define QF_TIME_STORAGE_TIME 0x10 +#define QF_TIME_STORAGE_WAKEUP 0x20 typedef struct _EFI_IFR_DISABLE_IF { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_DISABLE_IF; typedef struct _EFI_IFR_SUPPRESS_IF { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_SUPPRESS_IF; typedef struct _EFI_IFR_GRAY_OUT_IF { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_GRAY_OUT_IF; typedef struct _EFI_IFR_INCONSISTENT_IF { - EFI_IFR_OP_HEADER Header; - EFI_STRING_ID Error; + EFI_IFR_OP_HEADER Header; + EFI_STRING_ID Error; } EFI_IFR_INCONSISTENT_IF; typedef struct _EFI_IFR_NO_SUBMIT_IF { - EFI_IFR_OP_HEADER Header; - EFI_STRING_ID Error; + EFI_IFR_OP_HEADER Header; + EFI_STRING_ID Error; } EFI_IFR_NO_SUBMIT_IF; typedef struct _EFI_IFR_WARNING_IF { - EFI_IFR_OP_HEADER Header; - EFI_STRING_ID Warning; - UINT8 TimeOut; + EFI_IFR_OP_HEADER Header; + EFI_STRING_ID Warning; + UINT8 TimeOut; } EFI_IFR_WARNING_IF; typedef struct _EFI_IFR_REFRESH { - EFI_IFR_OP_HEADER Header; - UINT8 RefreshInterval; + EFI_IFR_OP_HEADER Header; + UINT8 RefreshInterval; } EFI_IFR_REFRESH; typedef struct _EFI_IFR_VARSTORE_DEVICE { - EFI_IFR_OP_HEADER Header; - EFI_STRING_ID DevicePath; + EFI_IFR_OP_HEADER Header; + EFI_STRING_ID DevicePath; } EFI_IFR_VARSTORE_DEVICE; typedef struct _EFI_IFR_ONE_OF_OPTION { - EFI_IFR_OP_HEADER Header; - EFI_STRING_ID Option; - UINT8 Flags; - UINT8 Type; - EFI_IFR_TYPE_VALUE Value; + EFI_IFR_OP_HEADER Header; + EFI_STRING_ID Option; + UINT8 Flags; + UINT8 Type; + EFI_IFR_TYPE_VALUE Value; } EFI_IFR_ONE_OF_OPTION; // // Types of the option's value. // -#define EFI_IFR_TYPE_NUM_SIZE_8 0x00 -#define EFI_IFR_TYPE_NUM_SIZE_16 0x01 -#define EFI_IFR_TYPE_NUM_SIZE_32 0x02 -#define EFI_IFR_TYPE_NUM_SIZE_64 0x03 -#define EFI_IFR_TYPE_BOOLEAN 0x04 -#define EFI_IFR_TYPE_TIME 0x05 -#define EFI_IFR_TYPE_DATE 0x06 -#define EFI_IFR_TYPE_STRING 0x07 -#define EFI_IFR_TYPE_OTHER 0x08 -#define EFI_IFR_TYPE_UNDEFINED 0x09 -#define EFI_IFR_TYPE_ACTION 0x0A -#define EFI_IFR_TYPE_BUFFER 0x0B -#define EFI_IFR_TYPE_REF 0x0C - -#define EFI_IFR_OPTION_DEFAULT 0x10 -#define EFI_IFR_OPTION_DEFAULT_MFG 0x20 +#define EFI_IFR_TYPE_NUM_SIZE_8 0x00 +#define EFI_IFR_TYPE_NUM_SIZE_16 0x01 +#define EFI_IFR_TYPE_NUM_SIZE_32 0x02 +#define EFI_IFR_TYPE_NUM_SIZE_64 0x03 +#define EFI_IFR_TYPE_BOOLEAN 0x04 +#define EFI_IFR_TYPE_TIME 0x05 +#define EFI_IFR_TYPE_DATE 0x06 +#define EFI_IFR_TYPE_STRING 0x07 +#define EFI_IFR_TYPE_OTHER 0x08 +#define EFI_IFR_TYPE_UNDEFINED 0x09 +#define EFI_IFR_TYPE_ACTION 0x0A +#define EFI_IFR_TYPE_BUFFER 0x0B +#define EFI_IFR_TYPE_REF 0x0C + +#define EFI_IFR_OPTION_DEFAULT 0x10 +#define EFI_IFR_OPTION_DEFAULT_MFG 0x20 typedef struct _EFI_IFR_GUID { - EFI_IFR_OP_HEADER Header; - EFI_GUID Guid; - //Optional Data Follows + EFI_IFR_OP_HEADER Header; + EFI_GUID Guid; + // Optional Data Follows } EFI_IFR_GUID; typedef struct _EFI_IFR_REFRESH_ID { - EFI_IFR_OP_HEADER Header; - EFI_GUID RefreshEventGroupId; + EFI_IFR_OP_HEADER Header; + EFI_GUID RefreshEventGroupId; } EFI_IFR_REFRESH_ID; typedef struct _EFI_IFR_DUP { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_DUP; typedef struct _EFI_IFR_EQ_ID_ID { - EFI_IFR_OP_HEADER Header; - EFI_QUESTION_ID QuestionId1; - EFI_QUESTION_ID QuestionId2; + EFI_IFR_OP_HEADER Header; + EFI_QUESTION_ID QuestionId1; + EFI_QUESTION_ID QuestionId2; } EFI_IFR_EQ_ID_ID; typedef struct _EFI_IFR_EQ_ID_VAL { - EFI_IFR_OP_HEADER Header; - EFI_QUESTION_ID QuestionId; - UINT16 Value; + EFI_IFR_OP_HEADER Header; + EFI_QUESTION_ID QuestionId; + UINT16 Value; } EFI_IFR_EQ_ID_VAL; typedef struct _EFI_IFR_EQ_ID_VAL_LIST { - EFI_IFR_OP_HEADER Header; - EFI_QUESTION_ID QuestionId; - UINT16 ListLength; - UINT16 ValueList[1]; + EFI_IFR_OP_HEADER Header; + EFI_QUESTION_ID QuestionId; + UINT16 ListLength; + UINT16 ValueList[1]; } EFI_IFR_EQ_ID_VAL_LIST; typedef struct _EFI_IFR_UINT8 { - EFI_IFR_OP_HEADER Header; - UINT8 Value; + EFI_IFR_OP_HEADER Header; + UINT8 Value; } EFI_IFR_UINT8; typedef struct _EFI_IFR_UINT16 { - EFI_IFR_OP_HEADER Header; - UINT16 Value; + EFI_IFR_OP_HEADER Header; + UINT16 Value; } EFI_IFR_UINT16; typedef struct _EFI_IFR_UINT32 { - EFI_IFR_OP_HEADER Header; - UINT32 Value; + EFI_IFR_OP_HEADER Header; + UINT32 Value; } EFI_IFR_UINT32; typedef struct _EFI_IFR_UINT64 { - EFI_IFR_OP_HEADER Header; - UINT64 Value; + EFI_IFR_OP_HEADER Header; + UINT64 Value; } EFI_IFR_UINT64; typedef struct _EFI_IFR_QUESTION_REF1 { - EFI_IFR_OP_HEADER Header; - EFI_QUESTION_ID QuestionId; + EFI_IFR_OP_HEADER Header; + EFI_QUESTION_ID QuestionId; } EFI_IFR_QUESTION_REF1; typedef struct _EFI_IFR_QUESTION_REF2 { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_QUESTION_REF2; typedef struct _EFI_IFR_QUESTION_REF3 { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_QUESTION_REF3; typedef struct _EFI_IFR_QUESTION_REF3_2 { - EFI_IFR_OP_HEADER Header; - EFI_STRING_ID DevicePath; + EFI_IFR_OP_HEADER Header; + EFI_STRING_ID DevicePath; } EFI_IFR_QUESTION_REF3_2; typedef struct _EFI_IFR_QUESTION_REF3_3 { - EFI_IFR_OP_HEADER Header; - EFI_STRING_ID DevicePath; - EFI_GUID Guid; + EFI_IFR_OP_HEADER Header; + EFI_STRING_ID DevicePath; + EFI_GUID Guid; } EFI_IFR_QUESTION_REF3_3; typedef struct _EFI_IFR_RULE_REF { - EFI_IFR_OP_HEADER Header; - UINT8 RuleId; + EFI_IFR_OP_HEADER Header; + UINT8 RuleId; } EFI_IFR_RULE_REF; typedef struct _EFI_IFR_STRING_REF1 { - EFI_IFR_OP_HEADER Header; - EFI_STRING_ID StringId; + EFI_IFR_OP_HEADER Header; + EFI_STRING_ID StringId; } EFI_IFR_STRING_REF1; typedef struct _EFI_IFR_STRING_REF2 { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_STRING_REF2; typedef struct _EFI_IFR_THIS { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_THIS; typedef struct _EFI_IFR_TRUE { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_TRUE; typedef struct _EFI_IFR_FALSE { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_FALSE; typedef struct _EFI_IFR_ONE { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_ONE; typedef struct _EFI_IFR_ONES { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_ONES; typedef struct _EFI_IFR_ZERO { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_ZERO; typedef struct _EFI_IFR_UNDEFINED { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_UNDEFINED; typedef struct _EFI_IFR_VERSION { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_VERSION; typedef struct _EFI_IFR_LENGTH { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_LENGTH; typedef struct _EFI_IFR_NOT { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_NOT; typedef struct _EFI_IFR_BITWISE_NOT { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_BITWISE_NOT; typedef struct _EFI_IFR_TO_BOOLEAN { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_TO_BOOLEAN; /// @@ -1332,10 +1330,10 @@ typedef struct _EFI_IFR_TO_BOOLEAN { /// 2 = hexadecimal (lower-case alpha). /// 3 = hexadecimal (upper-case alpha). ///@{ -#define EFI_IFR_STRING_UNSIGNED_DEC 0 -#define EFI_IFR_STRING_SIGNED_DEC 1 -#define EFI_IFR_STRING_LOWERCASE_HEX 2 -#define EFI_IFR_STRING_UPPERCASE_HEX 3 +#define EFI_IFR_STRING_UNSIGNED_DEC 0 +#define EFI_IFR_STRING_SIGNED_DEC 1 +#define EFI_IFR_STRING_LOWERCASE_HEX 2 +#define EFI_IFR_STRING_UPPERCASE_HEX 3 ///@} /// @@ -1343,110 +1341,110 @@ typedef struct _EFI_IFR_TO_BOOLEAN { /// 0 = ASCII. /// 8 = Unicode. ///@{ -#define EFI_IFR_STRING_ASCII 0 -#define EFI_IFR_STRING_UNICODE 8 +#define EFI_IFR_STRING_ASCII 0 +#define EFI_IFR_STRING_UNICODE 8 ///@} typedef struct _EFI_IFR_TO_STRING { - EFI_IFR_OP_HEADER Header; - UINT8 Format; + EFI_IFR_OP_HEADER Header; + UINT8 Format; } EFI_IFR_TO_STRING; typedef struct _EFI_IFR_TO_UINT { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_TO_UINT; typedef struct _EFI_IFR_TO_UPPER { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_TO_UPPER; typedef struct _EFI_IFR_TO_LOWER { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_TO_LOWER; typedef struct _EFI_IFR_ADD { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_ADD; typedef struct _EFI_IFR_AND { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_AND; typedef struct _EFI_IFR_BITWISE_AND { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_BITWISE_AND; typedef struct _EFI_IFR_BITWISE_OR { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_BITWISE_OR; typedef struct _EFI_IFR_CATENATE { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_CATENATE; typedef struct _EFI_IFR_DIVIDE { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_DIVIDE; typedef struct _EFI_IFR_EQUAL { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_EQUAL; typedef struct _EFI_IFR_GREATER_EQUAL { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_GREATER_EQUAL; typedef struct _EFI_IFR_GREATER_THAN { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_GREATER_THAN; typedef struct _EFI_IFR_LESS_EQUAL { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_LESS_EQUAL; typedef struct _EFI_IFR_LESS_THAN { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_LESS_THAN; typedef struct _EFI_IFR_MATCH { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_MATCH; typedef struct _EFI_IFR_MATCH2 { - EFI_IFR_OP_HEADER Header; - EFI_GUID SyntaxType; + EFI_IFR_OP_HEADER Header; + EFI_GUID SyntaxType; } EFI_IFR_MATCH2; typedef struct _EFI_IFR_MULTIPLY { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_MULTIPLY; typedef struct _EFI_IFR_MODULO { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_MODULO; typedef struct _EFI_IFR_NOT_EQUAL { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_NOT_EQUAL; typedef struct _EFI_IFR_OR { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_OR; typedef struct _EFI_IFR_SHIFT_LEFT { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_SHIFT_LEFT; typedef struct _EFI_IFR_SHIFT_RIGHT { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_SHIFT_RIGHT; typedef struct _EFI_IFR_SUBTRACT { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_SUBTRACT; typedef struct _EFI_IFR_CONDITIONAL { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_CONDITIONAL; // @@ -1456,39 +1454,39 @@ typedef struct _EFI_IFR_CONDITIONAL { #define EFI_IFR_FF_CASE_INSENSITIVE 0x01 typedef struct _EFI_IFR_FIND { - EFI_IFR_OP_HEADER Header; - UINT8 Format; + EFI_IFR_OP_HEADER Header; + UINT8 Format; } EFI_IFR_FIND; typedef struct _EFI_IFR_MID { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_MID; typedef struct _EFI_IFR_TOKEN { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_TOKEN; // // Flags specifying whether to find the first matching string // or the first non-matching string. // -#define EFI_IFR_FLAGS_FIRST_MATCHING 0x00 -#define EFI_IFR_FLAGS_FIRST_NON_MATCHING 0x01 +#define EFI_IFR_FLAGS_FIRST_MATCHING 0x00 +#define EFI_IFR_FLAGS_FIRST_NON_MATCHING 0x01 typedef struct _EFI_IFR_SPAN { - EFI_IFR_OP_HEADER Header; - UINT8 Flags; + EFI_IFR_OP_HEADER Header; + UINT8 Flags; } EFI_IFR_SPAN; typedef struct _EFI_IFR_SECURITY { /// /// Standard opcode header, where Header.Op = EFI_IFR_SECURITY_OP. /// - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; /// /// Security permission level. /// - EFI_GUID Permissions; + EFI_GUID Permissions; } EFI_IFR_SECURITY; typedef struct _EFI_IFR_FORM_MAP_METHOD { @@ -1496,12 +1494,12 @@ typedef struct _EFI_IFR_FORM_MAP_METHOD { /// The string identifier which provides the human-readable name of /// the configuration method for this standards map form. /// - EFI_STRING_ID MethodTitle; + EFI_STRING_ID MethodTitle; /// /// Identifier which uniquely specifies the configuration methods /// associated with this standards map form. /// - EFI_GUID MethodIdentifier; + EFI_GUID MethodIdentifier; } EFI_IFR_FORM_MAP_METHOD; typedef struct _EFI_IFR_FORM_MAP { @@ -1509,11 +1507,11 @@ typedef struct _EFI_IFR_FORM_MAP { /// The sequence that defines the type of opcode as well as the length /// of the opcode being defined. Header.OpCode = EFI_IFR_FORM_MAP_OP. /// - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; /// /// The unique identifier for this particular form. /// - EFI_FORM_ID FormId; + EFI_FORM_ID FormId; /// /// One or more configuration method's name and unique identifier. /// @@ -1525,12 +1523,12 @@ typedef struct _EFI_IFR_SET { /// The sequence that defines the type of opcode as well as the length /// of the opcode being defined. Header.OpCode = EFI_IFR_SET_OP. /// - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; /// /// Specifies the identifier of a previously declared variable store to /// use when storing the question's value. /// - EFI_VARSTORE_ID VarStoreId; + EFI_VARSTORE_ID VarStoreId; union { /// /// A 16-bit Buffer Storage offset. @@ -1544,7 +1542,7 @@ typedef struct _EFI_IFR_SET { /// /// Specifies the type used for storage. /// - UINT8 VarStoreType; + UINT8 VarStoreType; } EFI_IFR_SET; typedef struct _EFI_IFR_GET { @@ -1552,12 +1550,12 @@ typedef struct _EFI_IFR_GET { /// The sequence that defines the type of opcode as well as the length /// of the opcode being defined. Header.OpCode = EFI_IFR_GET_OP. /// - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; /// /// Specifies the identifier of a previously declared variable store to /// use when retrieving the value. /// - EFI_VARSTORE_ID VarStoreId; + EFI_VARSTORE_ID VarStoreId; union { /// /// A 16-bit Buffer Storage offset. @@ -1571,19 +1569,19 @@ typedef struct _EFI_IFR_GET { /// /// Specifies the type used for storage. /// - UINT8 VarStoreType; + UINT8 VarStoreType; } EFI_IFR_GET; typedef struct _EFI_IFR_READ { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_READ; typedef struct _EFI_IFR_WRITE { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_WRITE; typedef struct _EFI_IFR_MAP { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_MAP; // // Definitions for Keyboard Package @@ -1705,37 +1703,37 @@ typedef struct { /// /// Used to describe a physical key on a keyboard. /// - EFI_KEY Key; + EFI_KEY Key; /// /// Unicode character code for the Key. /// - CHAR16 Unicode; + CHAR16 Unicode; /// /// Unicode character code for the key with the shift key being held down. /// - CHAR16 ShiftedUnicode; + CHAR16 ShiftedUnicode; /// /// Unicode character code for the key with the Alt-GR being held down. /// - CHAR16 AltGrUnicode; + CHAR16 AltGrUnicode; /// /// Unicode character code for the key with the Alt-GR and shift keys being held down. /// - CHAR16 ShiftedAltGrUnicode; + CHAR16 ShiftedAltGrUnicode; /// /// Modifier keys are defined to allow for special functionality that is not necessarily /// accomplished by a printable character. Many of these modifier keys are flags to toggle /// certain state bits on and off inside of a keyboard driver. /// - UINT16 Modifier; - UINT16 AffectedAttribute; + UINT16 Modifier; + UINT16 AffectedAttribute; } EFI_KEY_DESCRIPTOR; /// /// A key which is affected by all the standard shift modifiers. /// Most keys would be expected to have this bit active. /// -#define EFI_AFFECTED_BY_STANDARD_SHIFT 0x0001 +#define EFI_AFFECTED_BY_STANDARD_SHIFT 0x0001 /// /// This key is affected by the caps lock so that if a keyboard driver @@ -1743,65 +1741,65 @@ typedef struct { /// versus an "a" character. Having this bit turned on would tell /// the keyboard driver to use the appropriate shifted state or not. /// -#define EFI_AFFECTED_BY_CAPS_LOCK 0x0002 +#define EFI_AFFECTED_BY_CAPS_LOCK 0x0002 /// /// Similar to the case of CAPS lock, if this bit is active, the key /// is affected by the num lock being turned on. /// -#define EFI_AFFECTED_BY_NUM_LOCK 0x0004 +#define EFI_AFFECTED_BY_NUM_LOCK 0x0004 typedef struct { - UINT16 LayoutLength; - EFI_GUID Guid; - UINT32 LayoutDescriptorStringOffset; - UINT8 DescriptorCount; + UINT16 LayoutLength; + EFI_GUID Guid; + UINT32 LayoutDescriptorStringOffset; + UINT8 DescriptorCount; // EFI_KEY_DESCRIPTOR Descriptors[]; } EFI_HII_KEYBOARD_LAYOUT; typedef struct { - EFI_HII_PACKAGE_HEADER Header; - UINT16 LayoutCount; + EFI_HII_PACKAGE_HEADER Header; + UINT16 LayoutCount; // EFI_HII_KEYBOARD_LAYOUT Layout[]; } EFI_HII_KEYBOARD_PACKAGE_HDR; // // Modifier values // -#define EFI_NULL_MODIFIER 0x0000 -#define EFI_LEFT_CONTROL_MODIFIER 0x0001 -#define EFI_RIGHT_CONTROL_MODIFIER 0x0002 -#define EFI_LEFT_ALT_MODIFIER 0x0003 -#define EFI_RIGHT_ALT_MODIFIER 0x0004 -#define EFI_ALT_GR_MODIFIER 0x0005 -#define EFI_INSERT_MODIFIER 0x0006 -#define EFI_DELETE_MODIFIER 0x0007 -#define EFI_PAGE_DOWN_MODIFIER 0x0008 -#define EFI_PAGE_UP_MODIFIER 0x0009 -#define EFI_HOME_MODIFIER 0x000A -#define EFI_END_MODIFIER 0x000B -#define EFI_LEFT_SHIFT_MODIFIER 0x000C -#define EFI_RIGHT_SHIFT_MODIFIER 0x000D -#define EFI_CAPS_LOCK_MODIFIER 0x000E -#define EFI_NUM_LOCK_MODIFIER 0x000F -#define EFI_LEFT_ARROW_MODIFIER 0x0010 -#define EFI_RIGHT_ARROW_MODIFIER 0x0011 -#define EFI_DOWN_ARROW_MODIFIER 0x0012 -#define EFI_UP_ARROW_MODIFIER 0x0013 -#define EFI_NS_KEY_MODIFIER 0x0014 -#define EFI_NS_KEY_DEPENDENCY_MODIFIER 0x0015 -#define EFI_FUNCTION_KEY_ONE_MODIFIER 0x0016 -#define EFI_FUNCTION_KEY_TWO_MODIFIER 0x0017 -#define EFI_FUNCTION_KEY_THREE_MODIFIER 0x0018 -#define EFI_FUNCTION_KEY_FOUR_MODIFIER 0x0019 -#define EFI_FUNCTION_KEY_FIVE_MODIFIER 0x001A -#define EFI_FUNCTION_KEY_SIX_MODIFIER 0x001B -#define EFI_FUNCTION_KEY_SEVEN_MODIFIER 0x001C -#define EFI_FUNCTION_KEY_EIGHT_MODIFIER 0x001D -#define EFI_FUNCTION_KEY_NINE_MODIFIER 0x001E -#define EFI_FUNCTION_KEY_TEN_MODIFIER 0x001F -#define EFI_FUNCTION_KEY_ELEVEN_MODIFIER 0x0020 -#define EFI_FUNCTION_KEY_TWELVE_MODIFIER 0x0021 +#define EFI_NULL_MODIFIER 0x0000 +#define EFI_LEFT_CONTROL_MODIFIER 0x0001 +#define EFI_RIGHT_CONTROL_MODIFIER 0x0002 +#define EFI_LEFT_ALT_MODIFIER 0x0003 +#define EFI_RIGHT_ALT_MODIFIER 0x0004 +#define EFI_ALT_GR_MODIFIER 0x0005 +#define EFI_INSERT_MODIFIER 0x0006 +#define EFI_DELETE_MODIFIER 0x0007 +#define EFI_PAGE_DOWN_MODIFIER 0x0008 +#define EFI_PAGE_UP_MODIFIER 0x0009 +#define EFI_HOME_MODIFIER 0x000A +#define EFI_END_MODIFIER 0x000B +#define EFI_LEFT_SHIFT_MODIFIER 0x000C +#define EFI_RIGHT_SHIFT_MODIFIER 0x000D +#define EFI_CAPS_LOCK_MODIFIER 0x000E +#define EFI_NUM_LOCK_MODIFIER 0x000F +#define EFI_LEFT_ARROW_MODIFIER 0x0010 +#define EFI_RIGHT_ARROW_MODIFIER 0x0011 +#define EFI_DOWN_ARROW_MODIFIER 0x0012 +#define EFI_UP_ARROW_MODIFIER 0x0013 +#define EFI_NS_KEY_MODIFIER 0x0014 +#define EFI_NS_KEY_DEPENDENCY_MODIFIER 0x0015 +#define EFI_FUNCTION_KEY_ONE_MODIFIER 0x0016 +#define EFI_FUNCTION_KEY_TWO_MODIFIER 0x0017 +#define EFI_FUNCTION_KEY_THREE_MODIFIER 0x0018 +#define EFI_FUNCTION_KEY_FOUR_MODIFIER 0x0019 +#define EFI_FUNCTION_KEY_FIVE_MODIFIER 0x001A +#define EFI_FUNCTION_KEY_SIX_MODIFIER 0x001B +#define EFI_FUNCTION_KEY_SEVEN_MODIFIER 0x001C +#define EFI_FUNCTION_KEY_EIGHT_MODIFIER 0x001D +#define EFI_FUNCTION_KEY_NINE_MODIFIER 0x001E +#define EFI_FUNCTION_KEY_TEN_MODIFIER 0x001F +#define EFI_FUNCTION_KEY_ELEVEN_MODIFIER 0x0020 +#define EFI_FUNCTION_KEY_TWELVE_MODIFIER 0x0021 // // Keys that have multiple control functions based on modifier @@ -1810,15 +1808,15 @@ typedef struct { // is still a nonprinting character, but might have an alternate // control function like SYSREQUEST // -#define EFI_PRINT_MODIFIER 0x0022 -#define EFI_SYS_REQUEST_MODIFIER 0x0023 -#define EFI_SCROLL_LOCK_MODIFIER 0x0024 -#define EFI_PAUSE_MODIFIER 0x0025 -#define EFI_BREAK_MODIFIER 0x0026 +#define EFI_PRINT_MODIFIER 0x0022 +#define EFI_SYS_REQUEST_MODIFIER 0x0023 +#define EFI_SCROLL_LOCK_MODIFIER 0x0024 +#define EFI_PAUSE_MODIFIER 0x0025 +#define EFI_BREAK_MODIFIER 0x0026 -#define EFI_LEFT_LOGO_MODIFIER 0x0027 -#define EFI_RIGHT_LOGO_MODIFIER 0x0028 -#define EFI_MENU_MODIFIER 0x0029 +#define EFI_LEFT_LOGO_MODIFIER 0x0027 +#define EFI_RIGHT_LOGO_MODIFIER 0x0028 +#define EFI_MENU_MODIFIER 0x0029 /// /// Animation IFR opcode @@ -1828,11 +1826,11 @@ typedef struct _EFI_IFR_ANIMATION { /// Standard opcode header, where Header.OpCode is /// EFI_IFR_ANIMATION_OP. /// - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; /// /// Animation identifier in the HII database. /// - EFI_ANIMATION_ID Id; + EFI_ANIMATION_ID Id; } EFI_IFR_ANIMATION; /// @@ -1842,12 +1840,12 @@ typedef struct _EFI_HII_ANIMATION_PACKAGE_HDR { /// /// Standard package header, where Header.Type = EFI_HII_PACKAGE_ANIMATIONS. /// - EFI_HII_PACKAGE_HEADER Header; + EFI_HII_PACKAGE_HEADER Header; /// /// Offset, relative to this header, of the animation information. If /// this is zero, then there are no animation sequences in the package. /// - UINT32 AnimationInfoOffset; + UINT32 AnimationInfoOffset; } EFI_HII_ANIMATION_PACKAGE_HDR; /// @@ -1855,26 +1853,26 @@ typedef struct _EFI_HII_ANIMATION_PACKAGE_HDR { /// with each block prefixed by a single byte header EFI_HII_ANIMATION_BLOCK. /// typedef struct _EFI_HII_ANIMATION_BLOCK { - UINT8 BlockType; - //UINT8 BlockBody[]; + UINT8 BlockType; + // UINT8 BlockBody[]; } EFI_HII_ANIMATION_BLOCK; /// /// Animation block types. /// -#define EFI_HII_AIBT_END 0x00 -#define EFI_HII_AIBT_OVERLAY_IMAGES 0x10 -#define EFI_HII_AIBT_CLEAR_IMAGES 0x11 -#define EFI_HII_AIBT_RESTORE_SCRN 0x12 -#define EFI_HII_AIBT_OVERLAY_IMAGES_LOOP 0x18 -#define EFI_HII_AIBT_CLEAR_IMAGES_LOOP 0x19 -#define EFI_HII_AIBT_RESTORE_SCRN_LOOP 0x1A -#define EFI_HII_AIBT_DUPLICATE 0x20 -#define EFI_HII_AIBT_SKIP2 0x21 -#define EFI_HII_AIBT_SKIP1 0x22 -#define EFI_HII_AIBT_EXT1 0x30 -#define EFI_HII_AIBT_EXT2 0x31 -#define EFI_HII_AIBT_EXT4 0x32 +#define EFI_HII_AIBT_END 0x00 +#define EFI_HII_AIBT_OVERLAY_IMAGES 0x10 +#define EFI_HII_AIBT_CLEAR_IMAGES 0x11 +#define EFI_HII_AIBT_RESTORE_SCRN 0x12 +#define EFI_HII_AIBT_OVERLAY_IMAGES_LOOP 0x18 +#define EFI_HII_AIBT_CLEAR_IMAGES_LOOP 0x19 +#define EFI_HII_AIBT_RESTORE_SCRN_LOOP 0x1A +#define EFI_HII_AIBT_DUPLICATE 0x20 +#define EFI_HII_AIBT_SKIP2 0x21 +#define EFI_HII_AIBT_SKIP1 0x22 +#define EFI_HII_AIBT_EXT1 0x30 +#define EFI_HII_AIBT_EXT2 0x31 +#define EFI_HII_AIBT_EXT4 0x32 /// /// Extended block headers used for variable sized animation records @@ -1885,45 +1883,45 @@ typedef struct _EFI_HII_AIBT_EXT1_BLOCK { /// /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT1. /// - EFI_HII_ANIMATION_BLOCK Header; + EFI_HII_ANIMATION_BLOCK Header; /// /// The block type. /// - UINT8 BlockType2; + UINT8 BlockType2; /// /// Size of the animation block, in bytes, including the animation block header. /// - UINT8 Length; + UINT8 Length; } EFI_HII_AIBT_EXT1_BLOCK; typedef struct _EFI_HII_AIBT_EXT2_BLOCK { /// /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT2. /// - EFI_HII_ANIMATION_BLOCK Header; + EFI_HII_ANIMATION_BLOCK Header; /// /// The block type /// - UINT8 BlockType2; + UINT8 BlockType2; /// /// Size of the animation block, in bytes, including the animation block header. /// - UINT16 Length; + UINT16 Length; } EFI_HII_AIBT_EXT2_BLOCK; typedef struct _EFI_HII_AIBT_EXT4_BLOCK { /// /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT4. /// - EFI_HII_ANIMATION_BLOCK Header; + EFI_HII_ANIMATION_BLOCK Header; /// /// The block type /// - UINT8 BlockType2; + UINT8 BlockType2; /// /// Size of the animation block, in bytes, including the animation block header. /// - UINT32 Length; + UINT32 Length; } EFI_HII_AIBT_EXT4_BLOCK; typedef struct _EFI_HII_ANIMATION_CELL { @@ -1931,23 +1929,23 @@ typedef struct _EFI_HII_ANIMATION_CELL { /// The X offset from the upper left hand corner of the logical /// window to position the indexed image. /// - UINT16 OffsetX; + UINT16 OffsetX; /// /// The Y offset from the upper left hand corner of the logical /// window to position the indexed image. /// - UINT16 OffsetY; + UINT16 OffsetY; /// /// The image to display at the specified offset from the upper left /// hand corner of the logical window. /// - EFI_IMAGE_ID ImageId; + EFI_IMAGE_ID ImageId; /// /// The number of milliseconds to delay after displaying the indexed /// image and before continuing on to the next linked image. If value /// is zero, no delay. /// - UINT16 Delay; + UINT16 Delay; } EFI_HII_ANIMATION_CELL; /// @@ -1963,24 +1961,24 @@ typedef struct _EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK { /// image that can be displayed alone. If the value is zero, no image /// is displayed. /// - EFI_IMAGE_ID DftImageId; + EFI_IMAGE_ID DftImageId; /// /// The overall width of the set of images (logical window width). /// - UINT16 Width; + UINT16 Width; /// /// The overall height of the set of images (logical window height). /// - UINT16 Height; + UINT16 Height; /// /// The number of EFI_HII_ANIMATION_CELL contained in the /// animation sequence. /// - UINT16 CellCount; + UINT16 CellCount; /// /// An array of CellCount animation cells. /// - EFI_HII_ANIMATION_CELL AnimationCell[1]; + EFI_HII_ANIMATION_CELL AnimationCell[1]; } EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK; /// @@ -1997,29 +1995,29 @@ typedef struct _EFI_HII_AIBT_CLEAR_IMAGES_BLOCK { /// image that can be displayed alone. If the value is zero, no image /// is displayed. /// - EFI_IMAGE_ID DftImageId; + EFI_IMAGE_ID DftImageId; /// /// The overall width of the set of images (logical window width). /// - UINT16 Width; + UINT16 Width; /// /// The overall height of the set of images (logical window height). /// - UINT16 Height; + UINT16 Height; /// /// The number of EFI_HII_ANIMATION_CELL contained in the /// animation sequence. /// - UINT16 CellCount; + UINT16 CellCount; /// /// The color to clear the logical window to before displaying the /// indexed image. /// - EFI_HII_RGB_PIXEL BackgndColor; + EFI_HII_RGB_PIXEL BackgndColor; /// /// An array of CellCount animation cells. /// - EFI_HII_ANIMATION_CELL AnimationCell[1]; + EFI_HII_ANIMATION_CELL AnimationCell[1]; } EFI_HII_AIBT_CLEAR_IMAGES_BLOCK; /// @@ -2036,45 +2034,45 @@ typedef struct _EFI_HII_AIBT_RESTORE_SCRN_BLOCK { /// image that can be displayed alone. If the value is zero, no image /// is displayed. /// - EFI_IMAGE_ID DftImageId; + EFI_IMAGE_ID DftImageId; /// /// The overall width of the set of images (logical window width). /// - UINT16 Width; + UINT16 Width; /// /// The overall height of the set of images (logical window height). /// - UINT16 Height; + UINT16 Height; /// /// The number of EFI_HII_ANIMATION_CELL contained in the /// animation sequence. /// - UINT16 CellCount; + UINT16 CellCount; /// /// An array of CellCount animation cells. /// - EFI_HII_ANIMATION_CELL AnimationCell[1]; + EFI_HII_ANIMATION_CELL AnimationCell[1]; } EFI_HII_AIBT_RESTORE_SCRN_BLOCK; /// /// An animation block to describe an animation sequence that continuously cycles, /// and where one image is simply displayed over the previous image. /// -typedef EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK EFI_HII_AIBT_OVERLAY_IMAGES_LOOP_BLOCK; +typedef EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK EFI_HII_AIBT_OVERLAY_IMAGES_LOOP_BLOCK; /// /// An animation block to describe an animation sequence that continuously cycles, /// and where the logical window is cleared to the specified color before /// the next image is displayed. /// -typedef EFI_HII_AIBT_CLEAR_IMAGES_BLOCK EFI_HII_AIBT_CLEAR_IMAGES_LOOP_BLOCK; +typedef EFI_HII_AIBT_CLEAR_IMAGES_BLOCK EFI_HII_AIBT_CLEAR_IMAGES_LOOP_BLOCK; /// /// An animation block to describe an animation sequence that continuously cycles, /// and where the screen is restored to the original state before /// the next image is displayed. /// -typedef EFI_HII_AIBT_RESTORE_SCRN_BLOCK EFI_HII_AIBT_RESTORE_SCRN_LOOP_BLOCK; +typedef EFI_HII_AIBT_RESTORE_SCRN_BLOCK EFI_HII_AIBT_RESTORE_SCRN_LOOP_BLOCK; /// /// Assigns a new character value to a previously defined animation sequence. @@ -2084,7 +2082,7 @@ typedef struct _EFI_HII_AIBT_DUPLICATE_BLOCK { /// The previously defined animation ID with the exact same /// animation information. /// - EFI_ANIMATION_ID AnimationId; + EFI_ANIMATION_ID AnimationId; } EFI_HII_AIBT_DUPLICATE_BLOCK; /// @@ -2094,7 +2092,7 @@ typedef struct _EFI_HII_AIBT_SKIP1_BLOCK { /// /// The unsigned 8-bit value to add to AnimationIdCurrent. /// - UINT8 SkipCount; + UINT8 SkipCount; } EFI_HII_AIBT_SKIP1_BLOCK; /// @@ -2104,13 +2102,11 @@ typedef struct _EFI_HII_AIBT_SKIP2_BLOCK { /// /// The unsigned 16-bit value to add to AnimationIdCurrent. /// - UINT16 SkipCount; + UINT16 SkipCount; } EFI_HII_AIBT_SKIP2_BLOCK; #pragma pack() - - /// /// References to string tokens must use this macro to enable scanning for /// token usages. @@ -2119,12 +2115,12 @@ typedef struct _EFI_HII_AIBT_SKIP2_BLOCK { /// STRING_TOKEN is not defined in UEFI specification. But it is placed /// here for the easy access by C files and VFR source files. /// -#define STRING_TOKEN(t) t +#define STRING_TOKEN(t) t /// /// IMAGE_TOKEN is not defined in UEFI specification. But it is placed /// here for the easy access by C files and VFR source files. /// -#define IMAGE_TOKEN(t) t +#define IMAGE_TOKEN(t) t #endif diff --git a/MdePkg/Include/Uefi/UefiMultiPhase.h b/MdePkg/Include/Uefi/UefiMultiPhase.h index 50e4d70..22bae43 100644 --- a/MdePkg/Include/Uefi/UefiMultiPhase.h +++ b/MdePkg/Include/Uefi/UefiMultiPhase.h @@ -12,26 +12,26 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// Attributes of variable. /// -#define EFI_VARIABLE_NON_VOLATILE 0x00000001 -#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002 -#define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004 +#define EFI_VARIABLE_NON_VOLATILE 0x00000001 +#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002 +#define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004 /// /// This attribute is identified by the mnemonic 'HR' /// elsewhere in this specification. /// -#define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x00000008 +#define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x00000008 /// /// Attributes of Authenticated Variable /// -#define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x00000020 -#define EFI_VARIABLE_APPEND_WRITE 0x00000040 +#define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x00000020 +#define EFI_VARIABLE_APPEND_WRITE 0x00000040 /// /// NOTE: EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS is deprecated and should be considered reserved. /// -#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x00000010 +#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x00000010 #ifndef VFRCOMPILE -#include + #include /// /// Enumeration of memory types introduced in UEFI. /// @@ -148,27 +148,27 @@ typedef struct { /// Unique signatures have been generated for the EFI System Table, /// the EFI Boot Services Table, and the EFI Runtime Services Table. /// - UINT64 Signature; + UINT64 Signature; /// /// The revision of the EFI Specification to which this table /// conforms. The upper 16 bits of this field contain the major /// revision value, and the lower 16 bits contain the minor revision /// value. The minor revision values are limited to the range of 00..99. /// - UINT32 Revision; + UINT32 Revision; /// /// The size, in bytes, of the entire table including the EFI_TABLE_HEADER. /// - UINT32 HeaderSize; + UINT32 HeaderSize; /// /// The 32-bit CRC for the entire table. This value is computed by /// setting this field to 0, and computing the 32-bit CRC for HeaderSize bytes. /// - UINT32 CRC32; + UINT32 CRC32; /// /// Reserved field that must be set to 0. /// - UINT32 Reserved; + UINT32 Reserved; } EFI_TABLE_HEADER; /// @@ -193,7 +193,7 @@ typedef struct { /// replay. Incremented during each /// "Write" access. /// - UINT64 MonotonicCount; + UINT64 MonotonicCount; /// /// Provides the authorization for the variable /// access. It is a signature across the @@ -202,7 +202,7 @@ typedef struct { /// associated with a public key that has been /// provisioned via the key exchange. /// - WIN_CERTIFICATE_UEFI_GUID AuthInfo; + WIN_CERTIFICATE_UEFI_GUID AuthInfo; } EFI_VARIABLE_AUTHENTICATION; /// @@ -218,12 +218,12 @@ typedef struct { /// For the TimeStamp value, components Pad1, Nanosecond, TimeZone, Daylight and /// Pad2 shall be set to 0. This means that the time shall always be expressed in GMT. /// - EFI_TIME TimeStamp; + EFI_TIME TimeStamp; /// /// Only a CertType of EFI_CERT_TYPE_PKCS7_GUID is accepted. /// - WIN_CERTIFICATE_UEFI_GUID AuthInfo; - } EFI_VARIABLE_AUTHENTICATION_2; + WIN_CERTIFICATE_UEFI_GUID AuthInfo; +} EFI_VARIABLE_AUTHENTICATION_2; #endif // VFRCOMPILE #endif diff --git a/MdePkg/Include/Uefi/UefiPxe.h b/MdePkg/Include/Uefi/UefiPxe.h index 6b63c0e..3dc3c63 100644 --- a/MdePkg/Include/Uefi/UefiPxe.h +++ b/MdePkg/Include/Uefi/UefiPxe.h @@ -26,15 +26,15 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// UNDI ROM ID and devive ID signature. /// -#define PXE_BUSTYPE_PXE PXE_BUSTYPE ('!', 'P', 'X', 'E') +#define PXE_BUSTYPE_PXE PXE_BUSTYPE ('!', 'P', 'X', 'E') /// /// BUS ROM ID signatures. /// -#define PXE_BUSTYPE_PCI PXE_BUSTYPE ('P', 'C', 'I', 'R') -#define PXE_BUSTYPE_PC_CARD PXE_BUSTYPE ('P', 'C', 'C', 'R') -#define PXE_BUSTYPE_USB PXE_BUSTYPE ('U', 'S', 'B', 'R') -#define PXE_BUSTYPE_1394 PXE_BUSTYPE ('1', '3', '9', '4') +#define PXE_BUSTYPE_PCI PXE_BUSTYPE ('P', 'C', 'I', 'R') +#define PXE_BUSTYPE_PC_CARD PXE_BUSTYPE ('P', 'C', 'C', 'R') +#define PXE_BUSTYPE_USB PXE_BUSTYPE ('U', 'S', 'B', 'R') +#define PXE_BUSTYPE_1394 PXE_BUSTYPE ('1', '3', '9', '4') #define PXE_SWAP_UINT16(n) ((((PXE_UINT16) (n) & 0x00FF) << 8) | (((PXE_UINT16) (n) & 0xFF00) >> 8)) @@ -54,31 +54,30 @@ SPDX-License-Identifier: BSD-2-Clause-Patent (((PXE_UINT64)(n) & 0x00FF000000000000ULL) >> 40) | \ (((PXE_UINT64)(n) & 0xFF00000000000000ULL) >> 56)) - #define PXE_CPBSIZE_NOT_USED 0 ///< zero #define PXE_DBSIZE_NOT_USED 0 ///< zero #define PXE_CPBADDR_NOT_USED (PXE_UINT64) 0 ///< zero #define PXE_DBADDR_NOT_USED (PXE_UINT64) 0 ///< zero #define PXE_CONST CONST -#define PXE_VOLATILE volatile +#define PXE_VOLATILE volatile -typedef VOID PXE_VOID; -typedef UINT8 PXE_UINT8; -typedef UINT16 PXE_UINT16; -typedef UINT32 PXE_UINT32; -typedef UINTN PXE_UINTN; +typedef VOID PXE_VOID; +typedef UINT8 PXE_UINT8; +typedef UINT16 PXE_UINT16; +typedef UINT32 PXE_UINT32; +typedef UINTN PXE_UINTN; /// /// Typedef unsigned long PXE_UINT64. /// -typedef UINT64 PXE_UINT64; +typedef UINT64 PXE_UINT64; typedef PXE_UINT8 PXE_BOOL; -#define PXE_FALSE 0 ///< zero -#define PXE_TRUE (!PXE_FALSE) +#define PXE_FALSE 0 ///< zero +#define PXE_TRUE (!PXE_FALSE) -typedef PXE_UINT16 PXE_OPCODE; +typedef PXE_UINT16 PXE_OPCODE; /// /// Return UNDI operational state. @@ -93,7 +92,7 @@ typedef PXE_UINT16 PXE_OPCODE; /// /// Change UNDI operational state from Started to Stopped. /// -#define PXE_OPCODE_STOP 0x0002 +#define PXE_OPCODE_STOP 0x0002 /// /// Get UNDI initialization information. @@ -108,7 +107,7 @@ typedef PXE_UINT16 PXE_OPCODE; /// /// Changed UNDI operational state from Started to Initialized. /// -#define PXE_OPCODE_INITIALIZE 0x0005 +#define PXE_OPCODE_INITIALIZE 0x0005 /// /// Re-initialize the NIC H/W. @@ -118,7 +117,7 @@ typedef PXE_UINT16 PXE_OPCODE; /// /// Change the UNDI operational state from Initialized to Started. /// -#define PXE_OPCODE_SHUTDOWN 0x0007 +#define PXE_OPCODE_SHUTDOWN 0x0007 /// /// Read & change state of external interrupt enables. @@ -138,7 +137,7 @@ typedef PXE_UINT16 PXE_OPCODE; /// /// Read traffic statistics. /// -#define PXE_OPCODE_STATISTICS 0x000B +#define PXE_OPCODE_STATISTICS 0x000B /// /// Convert multicast IP address to multicast MAC address. @@ -148,12 +147,12 @@ typedef PXE_UINT16 PXE_OPCODE; /// /// Read or change non-volatile storage on the NIC. /// -#define PXE_OPCODE_NVDATA 0x000D +#define PXE_OPCODE_NVDATA 0x000D /// /// Get & clear interrupt status. /// -#define PXE_OPCODE_GET_STATUS 0x000E +#define PXE_OPCODE_GET_STATUS 0x000E /// /// Fill media header in packet for transmit. @@ -163,7 +162,7 @@ typedef PXE_UINT16 PXE_OPCODE; /// /// Transmit packet(s). /// -#define PXE_OPCODE_TRANSMIT 0x0010 +#define PXE_OPCODE_TRANSMIT 0x0010 /// /// Receive packet. @@ -173,9 +172,9 @@ typedef PXE_UINT16 PXE_OPCODE; /// /// Last valid PXE UNDI OpCode number. /// -#define PXE_OPCODE_LAST_VALID 0x0011 +#define PXE_OPCODE_LAST_VALID 0x0011 -typedef PXE_UINT16 PXE_OPFLAGS; +typedef PXE_UINT16 PXE_OPFLAGS; #define PXE_OPFLAGS_NOT_USED 0x0000 @@ -231,16 +230,16 @@ typedef PXE_UINT16 PXE_OPFLAGS; /// Select whether to enable or disable external interrupt signals. /// Setting both enable and disable will return PXE_STATCODE_INVALID_OPFLAGS. /// -#define PXE_OPFLAGS_INTERRUPT_OPMASK 0xC000 -#define PXE_OPFLAGS_INTERRUPT_ENABLE 0x8000 -#define PXE_OPFLAGS_INTERRUPT_DISABLE 0x4000 -#define PXE_OPFLAGS_INTERRUPT_READ 0x0000 +#define PXE_OPFLAGS_INTERRUPT_OPMASK 0xC000 +#define PXE_OPFLAGS_INTERRUPT_ENABLE 0x8000 +#define PXE_OPFLAGS_INTERRUPT_DISABLE 0x4000 +#define PXE_OPFLAGS_INTERRUPT_READ 0x0000 /// /// Enable receive interrupts. An external interrupt will be generated /// after a complete non-error packet has been received. /// -#define PXE_OPFLAGS_INTERRUPT_RECEIVE 0x0001 +#define PXE_OPFLAGS_INTERRUPT_RECEIVE 0x0001 /// /// Enable transmit interrupts. An external interrupt will be generated @@ -252,7 +251,7 @@ typedef PXE_UINT16 PXE_OPFLAGS; /// Enable command interrupts. An external interrupt will be generated /// when command execution stops. /// -#define PXE_OPFLAGS_INTERRUPT_COMMAND 0x0004 +#define PXE_OPFLAGS_INTERRUPT_COMMAND 0x0004 /// /// Generate software interrupt. Setting this bit generates an external @@ -276,7 +275,7 @@ typedef PXE_UINT16 PXE_OPFLAGS; /// To reset the contents of the multicast MAC address filter list, /// set this OpFlag: /// -#define PXE_OPFLAGS_RECEIVE_FILTER_RESET_MCAST_LIST 0x2000 +#define PXE_OPFLAGS_RECEIVE_FILTER_RESET_MCAST_LIST 0x2000 /// /// Enable unicast packet receiving. Packets sent to the current station @@ -295,7 +294,7 @@ typedef PXE_UINT16 PXE_OPFLAGS; /// of the multicast MAC addresses in the multicast MAC address filter /// list will be received. If the filter list is empty, no multicast /// -#define PXE_OPFLAGS_RECEIVE_FILTER_FILTERED_MULTICAST 0x0004 +#define PXE_OPFLAGS_RECEIVE_FILTER_FILTERED_MULTICAST 0x0004 /// /// Enable promiscuous packet receiving. All packets will be received. @@ -337,9 +336,9 @@ typedef PXE_UINT16 PXE_OPFLAGS; /// /// Select the type of non-volatile data operation. /// -#define PXE_OPFLAGS_NVDATA_OPMASK 0x0001 -#define PXE_OPFLAGS_NVDATA_READ 0x0000 -#define PXE_OPFLAGS_NVDATA_WRITE 0x0001 +#define PXE_OPFLAGS_NVDATA_OPMASK 0x0001 +#define PXE_OPFLAGS_NVDATA_READ 0x0000 +#define PXE_OPFLAGS_NVDATA_WRITE 0x0001 /// /// UNDI Get Status. @@ -360,12 +359,12 @@ typedef PXE_UINT16 PXE_OPFLAGS; /// buffers. Do not plan on getting one buffer per interrupt. Some /// NICs and UNDIs may transmit multiple buffers per interrupt. /// -#define PXE_OPFLAGS_GET_TRANSMITTED_BUFFERS 0x0002 +#define PXE_OPFLAGS_GET_TRANSMITTED_BUFFERS 0x0002 /// /// Return current media status. /// -#define PXE_OPFLAGS_GET_MEDIA_STATUS 0x0004 +#define PXE_OPFLAGS_GET_MEDIA_STATUS 0x0004 /// /// UNDI Fill Header. @@ -386,9 +385,9 @@ typedef PXE_UINT16 PXE_OPFLAGS; #define PXE_OPFLAGS_TRANSMIT_BLOCK 0x0001 #define PXE_OPFLAGS_TRANSMIT_DONT_BLOCK 0x0000 -#define PXE_OPFLAGS_TRANSMIT_OPMASK 0x0002 -#define PXE_OPFLAGS_TRANSMIT_FRAGMENTED 0x0002 -#define PXE_OPFLAGS_TRANSMIT_WHOLE 0x0000 +#define PXE_OPFLAGS_TRANSMIT_OPMASK 0x0002 +#define PXE_OPFLAGS_TRANSMIT_FRAGMENTED 0x0002 +#define PXE_OPFLAGS_TRANSMIT_WHOLE 0x0000 /// /// UNDI Receive. @@ -399,7 +398,7 @@ typedef PXE_UINT16 PXE_OPFLAGS; /// /// PXE STATFLAGS. /// -typedef PXE_UINT16 PXE_STATFLAGS; +typedef PXE_UINT16 PXE_STATFLAGS; #define PXE_STATFLAGS_INITIALIZE 0x0000 @@ -419,10 +418,10 @@ typedef PXE_UINT16 PXE_STATFLAGS; /// /// UNDI Get State. /// -#define PXE_STATFLAGS_GET_STATE_MASK 0x0003 -#define PXE_STATFLAGS_GET_STATE_INITIALIZED 0x0002 -#define PXE_STATFLAGS_GET_STATE_STARTED 0x0001 -#define PXE_STATFLAGS_GET_STATE_STOPPED 0x0000 +#define PXE_STATFLAGS_GET_STATE_MASK 0x0003 +#define PXE_STATFLAGS_GET_STATE_INITIALIZED 0x0002 +#define PXE_STATFLAGS_GET_STATE_STARTED 0x0001 +#define PXE_STATFLAGS_GET_STATE_STOPPED 0x0000 /// /// UNDI Start. @@ -462,7 +461,7 @@ typedef PXE_UINT16 PXE_STATFLAGS; /// /// If set, receive interrupts are enabled. /// -#define PXE_STATFLAGS_INTERRUPT_RECEIVE 0x0001 +#define PXE_STATFLAGS_INTERRUPT_RECEIVE 0x0001 /// /// If set, transmit interrupts are enabled. @@ -472,7 +471,7 @@ typedef PXE_UINT16 PXE_STATFLAGS; /// /// If set, command interrupts are enabled. /// -#define PXE_STATFLAGS_INTERRUPT_COMMAND 0x0004 +#define PXE_STATFLAGS_INTERRUPT_COMMAND 0x0004 /// /// UNDI Receive Filters. @@ -492,7 +491,7 @@ typedef PXE_UINT16 PXE_STATFLAGS; /// If set, multicast packets that match up with the multicast address /// filter list will be received. /// -#define PXE_STATFLAGS_RECEIVE_FILTER_FILTERED_MULTICAST 0x0004 +#define PXE_STATFLAGS_RECEIVE_FILTER_FILTERED_MULTICAST 0x0004 /// /// If set, all packets will be received. @@ -534,8 +533,8 @@ typedef PXE_UINT16 PXE_STATFLAGS; /// /// Use to determine if an interrupt has occurred. /// -#define PXE_STATFLAGS_GET_STATUS_INTERRUPT_MASK 0x000F -#define PXE_STATFLAGS_GET_STATUS_NO_INTERRUPTS 0x0000 +#define PXE_STATFLAGS_GET_STATUS_INTERRUPT_MASK 0x000F +#define PXE_STATFLAGS_GET_STATUS_NO_INTERRUPTS 0x0000 /// /// If set, at least one receive interrupt occurred. @@ -545,7 +544,7 @@ typedef PXE_UINT16 PXE_STATFLAGS; /// /// If set, at least one transmit interrupt occurred. /// -#define PXE_STATFLAGS_GET_STATUS_TRANSMIT 0x0002 +#define PXE_STATFLAGS_GET_STATUS_TRANSMIT 0x0002 /// /// If set, at least one command interrupt occurred. @@ -555,7 +554,7 @@ typedef PXE_UINT16 PXE_STATFLAGS; /// /// If set, at least one software interrupt occurred. /// -#define PXE_STATFLAGS_GET_STATUS_SOFTWARE 0x0008 +#define PXE_STATFLAGS_GET_STATUS_SOFTWARE 0x0008 /// /// This flag is set if the transmitted buffer queue is empty. This flag @@ -587,20 +586,20 @@ typedef PXE_UINT16 PXE_STATFLAGS; /// /// UNDI Receive -///. +/// . /// /// No additional StatFlags. /// -typedef PXE_UINT16 PXE_STATCODE; +typedef PXE_UINT16 PXE_STATCODE; -#define PXE_STATCODE_INITIALIZE 0x0000 +#define PXE_STATCODE_INITIALIZE 0x0000 /// /// Common StatCodes returned by all UNDI commands, UNDI protocol functions /// and BC protocol functions. /// -#define PXE_STATCODE_SUCCESS 0x0000 +#define PXE_STATCODE_SUCCESS 0x0000 #define PXE_STATCODE_INVALID_CDB 0x0001 #define PXE_STATCODE_INVALID_CPB 0x0002 @@ -622,20 +621,20 @@ typedef PXE_UINT16 PXE_STATCODE; #define PXE_STATCODE_NOT_ENOUGH_MEMORY 0x0012 #define PXE_STATCODE_NO_DATA 0x0013 -typedef PXE_UINT16 PXE_IFNUM; +typedef PXE_UINT16 PXE_IFNUM; /// /// This interface number must be passed to the S/W UNDI Start command. /// -#define PXE_IFNUM_START 0x0000 +#define PXE_IFNUM_START 0x0000 /// /// This interface number is returned by the S/W UNDI Get State and /// Start commands if information in the CDB, CPB or DB is invalid. /// -#define PXE_IFNUM_INVALID 0x0000 +#define PXE_IFNUM_INVALID 0x0000 -typedef PXE_UINT16 PXE_CONTROL; +typedef PXE_UINT16 PXE_CONTROL; /// /// Setting this flag directs the UNDI to queue this command for later @@ -644,7 +643,7 @@ typedef PXE_UINT16 PXE_CONTROL; /// is returned. If the queue is full, a PXE_STATCODE_CDB_QUEUE_FULL /// error is returned. /// -#define PXE_CONTROL_QUEUE_IF_BUSY 0x0002 +#define PXE_CONTROL_QUEUE_IF_BUSY 0x0002 /// /// These two bit values are used to determine if there are more UNDI @@ -656,26 +655,26 @@ typedef PXE_UINT16 PXE_CONTROL; #define PXE_CONTROL_LINK 0x0001 #define PXE_CONTROL_LAST_CDB_IN_LIST 0x0000 -typedef PXE_UINT8 PXE_FRAME_TYPE; +typedef PXE_UINT8 PXE_FRAME_TYPE; -#define PXE_FRAME_TYPE_NONE 0x00 -#define PXE_FRAME_TYPE_UNICAST 0x01 -#define PXE_FRAME_TYPE_BROADCAST 0x02 -#define PXE_FRAME_TYPE_FILTERED_MULTICAST 0x03 -#define PXE_FRAME_TYPE_PROMISCUOUS 0x04 -#define PXE_FRAME_TYPE_PROMISCUOUS_MULTICAST 0x05 +#define PXE_FRAME_TYPE_NONE 0x00 +#define PXE_FRAME_TYPE_UNICAST 0x01 +#define PXE_FRAME_TYPE_BROADCAST 0x02 +#define PXE_FRAME_TYPE_FILTERED_MULTICAST 0x03 +#define PXE_FRAME_TYPE_PROMISCUOUS 0x04 +#define PXE_FRAME_TYPE_PROMISCUOUS_MULTICAST 0x05 -#define PXE_FRAME_TYPE_MULTICAST PXE_FRAME_TYPE_FILTERED_MULTICAST +#define PXE_FRAME_TYPE_MULTICAST PXE_FRAME_TYPE_FILTERED_MULTICAST -typedef PXE_UINT32 PXE_IPV4; +typedef PXE_UINT32 PXE_IPV4; -typedef PXE_UINT32 PXE_IPV6[4]; +typedef PXE_UINT32 PXE_IPV6[4]; #define PXE_MAC_LENGTH 32 -typedef PXE_UINT8 PXE_MAC_ADDR[PXE_MAC_LENGTH]; +typedef PXE_UINT8 PXE_MAC_ADDR[PXE_MAC_LENGTH]; -typedef PXE_UINT8 PXE_IFTYPE; -typedef UINT16 PXE_MEDIA_PROTOCOL; +typedef PXE_UINT8 PXE_IFTYPE; +typedef UINT16 PXE_MEDIA_PROTOCOL; /// /// This information is from the ARP section of RFC 1700. @@ -709,16 +708,16 @@ typedef UINT16 PXE_MEDIA_PROTOCOL; #define PXE_IFTYPE_FIBRE_CHANNEL 0x12 typedef struct s_pxe_hw_undi { - PXE_UINT32 Signature; ///< PXE_ROMID_SIGNATURE. - PXE_UINT8 Len; ///< sizeof(PXE_HW_UNDI). - PXE_UINT8 Fudge; ///< makes 8-bit cksum equal zero. - PXE_UINT8 Rev; ///< PXE_ROMID_REV. - PXE_UINT8 IFcnt; ///< physical connector count lower byte. - PXE_UINT8 MajorVer; ///< PXE_ROMID_MAJORVER. - PXE_UINT8 MinorVer; ///< PXE_ROMID_MINORVER. - PXE_UINT8 IFcntExt; ///< physical connector count upper byte. - PXE_UINT8 reserved; ///< zero, not used. - PXE_UINT32 Implementation; ///< implementation flags. + PXE_UINT32 Signature; ///< PXE_ROMID_SIGNATURE. + PXE_UINT8 Len; ///< sizeof(PXE_HW_UNDI). + PXE_UINT8 Fudge; ///< makes 8-bit cksum equal zero. + PXE_UINT8 Rev; ///< PXE_ROMID_REV. + PXE_UINT8 IFcnt; ///< physical connector count lower byte. + PXE_UINT8 MajorVer; ///< PXE_ROMID_MAJORVER. + PXE_UINT8 MinorVer; ///< PXE_ROMID_MINORVER. + PXE_UINT8 IFcntExt; ///< physical connector count upper byte. + PXE_UINT8 reserved; ///< zero, not used. + PXE_UINT32 Implementation; ///< implementation flags. ///< reserved ///< vendor use. ///< UINT32 Status; ///< status port. ///< UINT32 Command; ///< command port. @@ -742,32 +741,32 @@ typedef struct s_pxe_hw_undi { /// /// If set, last command failed. /// -#define PXE_HWSTAT_COMMAND_FAILED 0x20000000 +#define PXE_HWSTAT_COMMAND_FAILED 0x20000000 /// /// If set, identifies enabled receive filters. /// -#define PXE_HWSTAT_PROMISCUOUS_MULTICAST_RX_ENABLED 0x00001000 -#define PXE_HWSTAT_PROMISCUOUS_RX_ENABLED 0x00000800 -#define PXE_HWSTAT_BROADCAST_RX_ENABLED 0x00000400 -#define PXE_HWSTAT_MULTICAST_RX_ENABLED 0x00000200 -#define PXE_HWSTAT_UNICAST_RX_ENABLED 0x00000100 +#define PXE_HWSTAT_PROMISCUOUS_MULTICAST_RX_ENABLED 0x00001000 +#define PXE_HWSTAT_PROMISCUOUS_RX_ENABLED 0x00000800 +#define PXE_HWSTAT_BROADCAST_RX_ENABLED 0x00000400 +#define PXE_HWSTAT_MULTICAST_RX_ENABLED 0x00000200 +#define PXE_HWSTAT_UNICAST_RX_ENABLED 0x00000100 /// /// If set, identifies enabled external interrupts. /// -#define PXE_HWSTAT_SOFTWARE_INT_ENABLED 0x00000080 -#define PXE_HWSTAT_TX_COMPLETE_INT_ENABLED 0x00000040 -#define PXE_HWSTAT_PACKET_RX_INT_ENABLED 0x00000020 -#define PXE_HWSTAT_CMD_COMPLETE_INT_ENABLED 0x00000010 +#define PXE_HWSTAT_SOFTWARE_INT_ENABLED 0x00000080 +#define PXE_HWSTAT_TX_COMPLETE_INT_ENABLED 0x00000040 +#define PXE_HWSTAT_PACKET_RX_INT_ENABLED 0x00000020 +#define PXE_HWSTAT_CMD_COMPLETE_INT_ENABLED 0x00000010 /// /// If set, identifies pending interrupts. /// -#define PXE_HWSTAT_SOFTWARE_INT_PENDING 0x00000008 -#define PXE_HWSTAT_TX_COMPLETE_INT_PENDING 0x00000004 -#define PXE_HWSTAT_PACKET_RX_INT_PENDING 0x00000002 -#define PXE_HWSTAT_CMD_COMPLETE_INT_PENDING 0x00000001 +#define PXE_HWSTAT_SOFTWARE_INT_PENDING 0x00000008 +#define PXE_HWSTAT_TX_COMPLETE_INT_PENDING 0x00000004 +#define PXE_HWSTAT_PACKET_RX_INT_PENDING 0x00000002 +#define PXE_HWSTAT_CMD_COMPLETE_INT_PENDING 0x00000001 /// /// Command port definitions. @@ -783,19 +782,19 @@ typedef struct s_pxe_hw_undi { /// /// Use these to enable/disable receive filters. /// -#define PXE_HWCMD_PROMISCUOUS_MULTICAST_RX_ENABLE 0x00001000 -#define PXE_HWCMD_PROMISCUOUS_RX_ENABLE 0x00000800 -#define PXE_HWCMD_BROADCAST_RX_ENABLE 0x00000400 -#define PXE_HWCMD_MULTICAST_RX_ENABLE 0x00000200 -#define PXE_HWCMD_UNICAST_RX_ENABLE 0x00000100 +#define PXE_HWCMD_PROMISCUOUS_MULTICAST_RX_ENABLE 0x00001000 +#define PXE_HWCMD_PROMISCUOUS_RX_ENABLE 0x00000800 +#define PXE_HWCMD_BROADCAST_RX_ENABLE 0x00000400 +#define PXE_HWCMD_MULTICAST_RX_ENABLE 0x00000200 +#define PXE_HWCMD_UNICAST_RX_ENABLE 0x00000100 /// /// Use these to enable/disable external interrupts. /// -#define PXE_HWCMD_SOFTWARE_INT_ENABLE 0x00000080 -#define PXE_HWCMD_TX_COMPLETE_INT_ENABLE 0x00000040 -#define PXE_HWCMD_PACKET_RX_INT_ENABLE 0x00000020 -#define PXE_HWCMD_CMD_COMPLETE_INT_ENABLE 0x00000010 +#define PXE_HWCMD_SOFTWARE_INT_ENABLE 0x00000080 +#define PXE_HWCMD_TX_COMPLETE_INT_ENABLE 0x00000040 +#define PXE_HWCMD_PACKET_RX_INT_ENABLE 0x00000020 +#define PXE_HWCMD_CMD_COMPLETE_INT_ENABLE 0x00000010 /// /// Use these to clear pending external interrupts. @@ -806,44 +805,44 @@ typedef struct s_pxe_hw_undi { #define PXE_HWCMD_CLEAR_CMD_COMPLETE_INT 0x00000001 typedef struct s_pxe_sw_undi { - PXE_UINT32 Signature; ///< PXE_ROMID_SIGNATURE. - PXE_UINT8 Len; ///< sizeof(PXE_SW_UNDI). - PXE_UINT8 Fudge; ///< makes 8-bit cksum zero. - PXE_UINT8 Rev; ///< PXE_ROMID_REV. - PXE_UINT8 IFcnt; ///< physical connector count lower byte. - PXE_UINT8 MajorVer; ///< PXE_ROMID_MAJORVER. - PXE_UINT8 MinorVer; ///< PXE_ROMID_MINORVER. - PXE_UINT8 IFcntExt; ///< physical connector count upper byte. - PXE_UINT8 reserved1; ///< zero, not used. - PXE_UINT32 Implementation; ///< Implementation flags. - PXE_UINT64 EntryPoint; ///< API entry point. - PXE_UINT8 reserved2[3]; ///< zero, not used. - PXE_UINT8 BusCnt; ///< number of bustypes supported. - PXE_UINT32 BusType[1]; ///< list of supported bustypes. + PXE_UINT32 Signature; ///< PXE_ROMID_SIGNATURE. + PXE_UINT8 Len; ///< sizeof(PXE_SW_UNDI). + PXE_UINT8 Fudge; ///< makes 8-bit cksum zero. + PXE_UINT8 Rev; ///< PXE_ROMID_REV. + PXE_UINT8 IFcnt; ///< physical connector count lower byte. + PXE_UINT8 MajorVer; ///< PXE_ROMID_MAJORVER. + PXE_UINT8 MinorVer; ///< PXE_ROMID_MINORVER. + PXE_UINT8 IFcntExt; ///< physical connector count upper byte. + PXE_UINT8 reserved1; ///< zero, not used. + PXE_UINT32 Implementation; ///< Implementation flags. + PXE_UINT64 EntryPoint; ///< API entry point. + PXE_UINT8 reserved2[3]; ///< zero, not used. + PXE_UINT8 BusCnt; ///< number of bustypes supported. + PXE_UINT32 BusType[1]; ///< list of supported bustypes. } PXE_SW_UNDI; typedef union u_pxe_undi { - PXE_HW_UNDI hw; - PXE_SW_UNDI sw; + PXE_HW_UNDI hw; + PXE_SW_UNDI sw; } PXE_UNDI; /// /// Signature of !PXE structure. /// -#define PXE_ROMID_SIGNATURE PXE_BUSTYPE ('!', 'P', 'X', 'E') +#define PXE_ROMID_SIGNATURE PXE_BUSTYPE ('!', 'P', 'X', 'E') /// /// !PXE structure format revision -///. -#define PXE_ROMID_REV 0x02 +/// . +#define PXE_ROMID_REV 0x02 /// /// UNDI command interface revision. These are the values that get sent /// in option 94 (Client Network Interface Identifier) in the DHCP Discover /// and PXE Boot Server Request packets. /// -#define PXE_ROMID_MAJORVER 0x03 -#define PXE_ROMID_MINORVER 0x01 +#define PXE_ROMID_MAJORVER 0x03 +#define PXE_ROMID_MINORVER 0x01 /// /// Implementation flags. @@ -872,21 +871,21 @@ typedef union u_pxe_undi { #define PXE_ROMID_IMP_CMD_COMPLETE_INT_SUPPORTED 0x00000001 typedef struct s_pxe_cdb { - PXE_OPCODE OpCode; - PXE_OPFLAGS OpFlags; - PXE_UINT16 CPBsize; - PXE_UINT16 DBsize; - PXE_UINT64 CPBaddr; - PXE_UINT64 DBaddr; - PXE_STATCODE StatCode; - PXE_STATFLAGS StatFlags; - PXE_UINT16 IFnum; - PXE_CONTROL Control; + PXE_OPCODE OpCode; + PXE_OPFLAGS OpFlags; + PXE_UINT16 CPBsize; + PXE_UINT16 DBsize; + PXE_UINT64 CPBaddr; + PXE_UINT64 DBaddr; + PXE_STATCODE StatCode; + PXE_STATFLAGS StatFlags; + PXE_UINT16 IFnum; + PXE_CONTROL Control; } PXE_CDB; typedef union u_pxe_ip_addr { - PXE_IPV6 IPv6; - PXE_IPV4 IPv4; + PXE_IPV6 IPv6; + PXE_IPV4 IPv4; } PXE_IP_ADDR; typedef union pxe_device { @@ -901,26 +900,24 @@ typedef union pxe_device { /// See S/W UNDI ROMID structure definition for PCI and /// PCC BusType definitions. /// - PXE_UINT32 BusType; + PXE_UINT32 BusType; /// /// Bus, device & function numbers that locate this device. /// - PXE_UINT16 Bus; - PXE_UINT8 Device; - PXE_UINT8 Function; - } - PCI, PCC; - + PXE_UINT16 Bus; + PXE_UINT8 Device; + PXE_UINT8 Function; + } PCI, PCC; } PXE_DEVICE; /// /// cpb and db definitions /// -#define MAX_PCI_CONFIG_LEN 64 ///< # of dwords. -#define MAX_EEPROM_LEN 128 ///< # of dwords. -#define MAX_XMIT_BUFFERS 32 ///< recycling Q length for xmit_done. -#define MAX_MCAST_ADDRESS_CNT 8 +#define MAX_PCI_CONFIG_LEN 64 ///< # of dwords. +#define MAX_EEPROM_LEN 128 ///< # of dwords. +#define MAX_XMIT_BUFFERS 32 ///< recycling Q length for xmit_done. +#define MAX_MCAST_ADDRESS_CNT 8 typedef struct s_pxe_cpb_start_30 { /// @@ -933,7 +930,7 @@ typedef struct s_pxe_cpb_start_30 { /// /// This field cannot be set to zero. /// - UINT64 Delay; + UINT64 Delay; /// /// PXE_VOID Block(UINT32 enable); @@ -949,7 +946,7 @@ typedef struct s_pxe_cpb_start_30 { /// /// This field cannot be set to zero. /// - UINT64 Block; + UINT64 Block; /// /// PXE_VOID Virt2Phys(UINT64 virtual, UINT64 physical_ptr); @@ -963,7 +960,7 @@ typedef struct s_pxe_cpb_start_30 { /// This field can be set to zero if virtual and physical addresses /// are equal. /// - UINT64 Virt2Phys; + UINT64 Virt2Phys; /// /// PXE_VOID Mem_IO(UINT8 read_write, UINT8 len, UINT64 port, /// UINT64 buf_addr); @@ -974,7 +971,7 @@ typedef struct s_pxe_cpb_start_30 { /// /// This field can not be set to zero. /// - UINT64 Mem_IO; + UINT64 Mem_IO; } PXE_CPB_START_30; typedef struct s_pxe_cpb_start_31 { @@ -988,7 +985,7 @@ typedef struct s_pxe_cpb_start_31 { /// /// This field cannot be set to zero. /// - UINT64 Delay; + UINT64 Delay; /// /// PXE_VOID Block(UINT64 unq_id, UINT32 enable); @@ -1004,7 +1001,7 @@ typedef struct s_pxe_cpb_start_31 { /// /// This field cannot be set to zero. /// - UINT64 Block; + UINT64 Block; /// /// PXE_VOID Virt2Phys(UINT64 UnqId, UINT64 virtual, UINT64 physical_ptr); @@ -1018,7 +1015,7 @@ typedef struct s_pxe_cpb_start_31 { /// This field can be set to zero if virtual and physical addresses /// are equal. /// - UINT64 Virt2Phys; + UINT64 Virt2Phys; /// /// PXE_VOID Mem_IO(UINT64 UnqId, UINT8 read_write, UINT8 len, UINT64 port, /// UINT64 buf_addr); @@ -1029,7 +1026,7 @@ typedef struct s_pxe_cpb_start_31 { /// /// This field can not be set to zero. /// - UINT64 Mem_IO; + UINT64 Mem_IO; /// /// PXE_VOID Map_Mem(UINT64 unq_id, UINT64 virtual_addr, UINT32 size, /// UINT32 Direction, UINT64 mapped_addr); @@ -1046,7 +1043,7 @@ typedef struct s_pxe_cpb_start_31 { /// /// This field can be set to zero if there is no mapping service available. /// - UINT64 Map_Mem; + UINT64 Map_Mem; /// /// PXE_VOID UnMap_Mem(UINT64 unq_id, UINT64 virtual_addr, UINT32 size, @@ -1057,7 +1054,7 @@ typedef struct s_pxe_cpb_start_31 { /// /// This field can be set to zero if there is no unmapping service available. /// - UINT64 UnMap_Mem; + UINT64 UnMap_Mem; /// /// PXE_VOID Sync_Mem(UINT64 unq_id, UINT64 virtual, @@ -1069,7 +1066,7 @@ typedef struct s_pxe_cpb_start_31 { /// /// This field can be set to zero if there is no service available. /// - UINT64 Sync_Mem; + UINT64 Sync_Mem; /// /// protocol driver can provide anything for this Unique_ID, UNDI remembers @@ -1077,19 +1074,19 @@ typedef struct s_pxe_cpb_start_31 { /// the ifnum and gives it back as a parameter to all the call-back routines /// when calling for that interface! /// - UINT64 Unique_ID; + UINT64 Unique_ID; } PXE_CPB_START_31; -#define TO_AND_FROM_DEVICE 0 -#define FROM_DEVICE 1 -#define TO_DEVICE 2 +#define TO_AND_FROM_DEVICE 0 +#define FROM_DEVICE 1 +#define TO_DEVICE 2 -#define PXE_DELAY_MILLISECOND 1000 -#define PXE_DELAY_SECOND 1000000 -#define PXE_IO_READ 0 -#define PXE_IO_WRITE 1 -#define PXE_MEM_READ 2 -#define PXE_MEM_WRITE 4 +#define PXE_DELAY_MILLISECOND 1000 +#define PXE_DELAY_SECOND 1000000 +#define PXE_IO_READ 0 +#define PXE_IO_WRITE 1 +#define PXE_MEM_READ 2 +#define PXE_MEM_WRITE 4 typedef struct s_pxe_db_get_init_info { /// @@ -1100,47 +1097,47 @@ typedef struct s_pxe_db_get_init_info { /// If MemoryRequired is zero, the UNDI does not need and will not /// use system memory to receive and transmit packets. /// - PXE_UINT32 MemoryRequired; + PXE_UINT32 MemoryRequired; /// /// Maximum frame data length for Tx/Rx excluding the media header. /// - PXE_UINT32 FrameDataLen; + PXE_UINT32 FrameDataLen; /// /// Supported link speeds are in units of mega bits. Common ethernet /// values are 10, 100 and 1000. Unused LinkSpeeds[] entries are zero /// filled. /// - PXE_UINT32 LinkSpeeds[4]; + PXE_UINT32 LinkSpeeds[4]; /// /// Number of non-volatile storage items. /// - PXE_UINT32 NvCount; + PXE_UINT32 NvCount; /// /// Width of non-volatile storage item in bytes. 0, 1, 2 or 4 /// - PXE_UINT16 NvWidth; + PXE_UINT16 NvWidth; /// /// Media header length. This is the typical media header length for /// this UNDI. This information is needed when allocating receive /// and transmit buffers. /// - PXE_UINT16 MediaHeaderLen; + PXE_UINT16 MediaHeaderLen; /// /// Number of bytes in the NIC hardware (MAC) address. /// - PXE_UINT16 HWaddrLen; + PXE_UINT16 HWaddrLen; /// /// Maximum number of multicast MAC addresses in the multicast /// MAC address filter list. /// - PXE_UINT16 MCastFilterCnt; + PXE_UINT16 MCastFilterCnt; /// /// Default number and size of transmit and receive buffers that will @@ -1149,63 +1146,63 @@ typedef struct s_pxe_db_get_init_info { /// command. If MemoryRequired is zero, this allocation will come out of /// memory on the NIC. /// - PXE_UINT16 TxBufCnt; - PXE_UINT16 TxBufSize; - PXE_UINT16 RxBufCnt; - PXE_UINT16 RxBufSize; + PXE_UINT16 TxBufCnt; + PXE_UINT16 TxBufSize; + PXE_UINT16 RxBufCnt; + PXE_UINT16 RxBufSize; /// /// Hardware interface types defined in the Assigned Numbers RFC /// and used in DHCP and ARP packets. /// See the PXE_IFTYPE typedef and PXE_IFTYPE_xxx macros. /// - PXE_UINT8 IFtype; + PXE_UINT8 IFtype; /// /// Supported duplex. See PXE_DUPLEX_xxxxx #defines below. /// - PXE_UINT8 SupportedDuplexModes; + PXE_UINT8 SupportedDuplexModes; /// /// Supported loopback options. See PXE_LOOPBACK_xxxxx #defines below. /// - PXE_UINT8 SupportedLoopBackModes; + PXE_UINT8 SupportedLoopBackModes; } PXE_DB_GET_INIT_INFO; -#define PXE_MAX_TXRX_UNIT_ETHER 1500 +#define PXE_MAX_TXRX_UNIT_ETHER 1500 -#define PXE_HWADDR_LEN_ETHER 0x0006 -#define PXE_MAC_HEADER_LEN_ETHER 0x000E +#define PXE_HWADDR_LEN_ETHER 0x0006 +#define PXE_MAC_HEADER_LEN_ETHER 0x000E #define PXE_DUPLEX_ENABLE_FULL_SUPPORTED 1 #define PXE_DUPLEX_FORCE_FULL_SUPPORTED 2 -#define PXE_LOOPBACK_INTERNAL_SUPPORTED 1 -#define PXE_LOOPBACK_EXTERNAL_SUPPORTED 2 +#define PXE_LOOPBACK_INTERNAL_SUPPORTED 1 +#define PXE_LOOPBACK_EXTERNAL_SUPPORTED 2 typedef struct s_pxe_pci_config_info { /// /// This is the flag field for the PXE_DB_GET_CONFIG_INFO union. /// For PCI bus devices, this field is set to PXE_BUSTYPE_PCI. /// - UINT32 BusType; + UINT32 BusType; /// /// This identifies the PCI network device that this UNDI interface. /// is bound to. /// - UINT16 Bus; - UINT8 Device; - UINT8 Function; + UINT16 Bus; + UINT8 Device; + UINT8 Function; /// /// This is a copy of the PCI configuration space for this /// network device. /// union { - UINT8 Byte[256]; - UINT16 Word[128]; - UINT32 Dword[64]; + UINT8 Byte[256]; + UINT16 Word[128]; + UINT32 Dword[64]; } Config; } PXE_PCI_CONFIG_INFO; @@ -1214,30 +1211,30 @@ typedef struct s_pxe_pcc_config_info { /// This is the flag field for the PXE_DB_GET_CONFIG_INFO union. /// For PCC bus devices, this field is set to PXE_BUSTYPE_PCC. /// - PXE_UINT32 BusType; + PXE_UINT32 BusType; /// /// This identifies the PCC network device that this UNDI interface /// is bound to. /// - PXE_UINT16 Bus; - PXE_UINT8 Device; - PXE_UINT8 Function; + PXE_UINT16 Bus; + PXE_UINT8 Device; + PXE_UINT8 Function; /// /// This is a copy of the PCC configuration space for this /// network device. /// union { - PXE_UINT8 Byte[256]; - PXE_UINT16 Word[128]; - PXE_UINT32 Dword[64]; + PXE_UINT8 Byte[256]; + PXE_UINT16 Word[128]; + PXE_UINT32 Dword[64]; } Config; } PXE_PCC_CONFIG_INFO; typedef union u_pxe_db_get_config_info { - PXE_PCI_CONFIG_INFO pci; - PXE_PCC_CONFIG_INFO pcc; + PXE_PCI_CONFIG_INFO pci; + PXE_PCC_CONFIG_INFO pcc; } PXE_DB_GET_CONFIG_INFO; typedef struct s_pxe_cpb_initialize { @@ -1246,20 +1243,20 @@ typedef struct s_pxe_cpb_initialize { /// be in contiguous physical memory and cannot be swapped out. The UNDI /// will be using this for transmit and receive buffering. /// - PXE_UINT64 MemoryAddr; + PXE_UINT64 MemoryAddr; /// /// MemoryLength must be greater than or equal to MemoryRequired /// returned by the Get Init Info command. /// - PXE_UINT32 MemoryLength; + PXE_UINT32 MemoryLength; /// /// Desired link speed in Mbit/sec. Common ethernet values are 10, 100 /// and 1000. Setting a value of zero will auto-detect and/or use the /// default link speed (operation depends on UNDI/NIC functionality). /// - PXE_UINT32 LinkSpeed; + PXE_UINT32 LinkSpeed; /// /// Suggested number and size of receive and transmit buffers to @@ -1271,29 +1268,29 @@ typedef struct s_pxe_cpb_initialize { /// If these fields are set to zero, the UNDI will allocate buffer /// counts and sizes as it sees fit. /// - PXE_UINT16 TxBufCnt; - PXE_UINT16 TxBufSize; - PXE_UINT16 RxBufCnt; - PXE_UINT16 RxBufSize; + PXE_UINT16 TxBufCnt; + PXE_UINT16 TxBufSize; + PXE_UINT16 RxBufCnt; + PXE_UINT16 RxBufSize; /// /// The following configuration parameters are optional and must be zero /// to use the default values. /// - PXE_UINT8 DuplexMode; + PXE_UINT8 DuplexMode; - PXE_UINT8 LoopBackMode; + PXE_UINT8 LoopBackMode; } PXE_CPB_INITIALIZE; -#define PXE_DUPLEX_DEFAULT 0x00 -#define PXE_FORCE_FULL_DUPLEX 0x01 -#define PXE_ENABLE_FULL_DUPLEX 0x02 -#define PXE_FORCE_HALF_DUPLEX 0x04 -#define PXE_DISABLE_FULL_DUPLEX 0x08 +#define PXE_DUPLEX_DEFAULT 0x00 +#define PXE_FORCE_FULL_DUPLEX 0x01 +#define PXE_ENABLE_FULL_DUPLEX 0x02 +#define PXE_FORCE_HALF_DUPLEX 0x04 +#define PXE_DISABLE_FULL_DUPLEX 0x08 -#define LOOPBACK_NORMAL 0 -#define LOOPBACK_INTERNAL 1 -#define LOOPBACK_EXTERNAL 2 +#define LOOPBACK_NORMAL 0 +#define LOOPBACK_INTERNAL 1 +#define LOOPBACK_EXTERNAL 2 typedef struct s_pxe_db_initialize { /// @@ -1304,16 +1301,16 @@ typedef struct s_pxe_db_initialize { /// Memory used by the UNDI and network device is allocated from the /// lowest memory buffer address. /// - PXE_UINT32 MemoryUsed; + PXE_UINT32 MemoryUsed; /// /// Actual number and size of receive and transmit buffers that were /// allocated. /// - PXE_UINT16 TxBufCnt; - PXE_UINT16 TxBufSize; - PXE_UINT16 RxBufCnt; - PXE_UINT16 RxBufSize; + PXE_UINT16 TxBufCnt; + PXE_UINT16 TxBufSize; + PXE_UINT16 RxBufCnt; + PXE_UINT16 RxBufSize; } PXE_DB_INITIALIZE; typedef struct s_pxe_cpb_receive_filters { @@ -1321,14 +1318,14 @@ typedef struct s_pxe_cpb_receive_filters { /// List of multicast MAC addresses. This list, if present, will /// replace the existing multicast MAC address filter list. /// - PXE_MAC_ADDR MCastList[MAX_MCAST_ADDRESS_CNT]; + PXE_MAC_ADDR MCastList[MAX_MCAST_ADDRESS_CNT]; } PXE_CPB_RECEIVE_FILTERS; typedef struct s_pxe_db_receive_filters { /// /// Filtered multicast MAC address list. /// - PXE_MAC_ADDR MCastList[MAX_MCAST_ADDRESS_CNT]; + PXE_MAC_ADDR MCastList[MAX_MCAST_ADDRESS_CNT]; } PXE_DB_RECEIVE_FILTERS; typedef struct s_pxe_cpb_station_address { @@ -1336,24 +1333,24 @@ typedef struct s_pxe_cpb_station_address { /// If supplied and supported, the current station MAC address /// will be changed. /// - PXE_MAC_ADDR StationAddr; + PXE_MAC_ADDR StationAddr; } PXE_CPB_STATION_ADDRESS; typedef struct s_pxe_dpb_station_address { /// /// Current station MAC address. /// - PXE_MAC_ADDR StationAddr; + PXE_MAC_ADDR StationAddr; /// /// Station broadcast MAC address. /// - PXE_MAC_ADDR BroadcastAddr; + PXE_MAC_ADDR BroadcastAddr; /// /// Permanent station MAC address. /// - PXE_MAC_ADDR PermanentAddr; + PXE_MAC_ADDR PermanentAddr; } PXE_DB_STATION_ADDRESS; typedef struct s_pxe_db_statistics { @@ -1366,12 +1363,12 @@ typedef struct s_pxe_db_statistics { /// If bit 0x21 is set, Data[0x21] is collected. /// Etc. /// - PXE_UINT64 Supported; + PXE_UINT64 Supported; /// /// Statistic data. /// - PXE_UINT64 Data[64]; + PXE_UINT64 Data[64]; } PXE_DB_STATISTICS; /// @@ -1383,7 +1380,7 @@ typedef struct s_pxe_db_statistics { /// /// Number of valid frames received and copied into receive buffers. /// -#define PXE_STATISTICS_RX_GOOD_FRAMES 0x01 +#define PXE_STATISTICS_RX_GOOD_FRAMES 0x01 /// /// Number of frames below the minimum length for the media. @@ -1395,7 +1392,7 @@ typedef struct s_pxe_db_statistics { /// Number of frames longer than the maxminum length for the /// media. This would be >1500 for ethernet. /// -#define PXE_STATISTICS_RX_OVERSIZE_FRAMES 0x03 +#define PXE_STATISTICS_RX_OVERSIZE_FRAMES 0x03 /// /// Valid frames that were dropped because receive buffers were full. @@ -1426,7 +1423,7 @@ typedef struct s_pxe_db_statistics { /// Total number of bytes received. Includes frames with errors /// and dropped frames. /// -#define PXE_STATISTICS_RX_TOTAL_BYTES 0x09 +#define PXE_STATISTICS_RX_TOTAL_BYTES 0x09 /// /// Transmit statistics. @@ -1445,45 +1442,45 @@ typedef struct s_pxe_db_statistics { /// /// Number of collisions detection on this subnet. /// -#define PXE_STATISTICS_COLLISIONS 0x14 +#define PXE_STATISTICS_COLLISIONS 0x14 /// /// Number of frames destined for unsupported protocol. /// -#define PXE_STATISTICS_UNSUPPORTED_PROTOCOL 0x15 +#define PXE_STATISTICS_UNSUPPORTED_PROTOCOL 0x15 /// /// Number of valid frames received that were duplicated. /// -#define PXE_STATISTICS_RX_DUPLICATED_FRAMES 0x16 +#define PXE_STATISTICS_RX_DUPLICATED_FRAMES 0x16 /// /// Number of encrypted frames received that failed to decrypt. /// -#define PXE_STATISTICS_RX_DECRYPT_ERROR_FRAMES 0x17 +#define PXE_STATISTICS_RX_DECRYPT_ERROR_FRAMES 0x17 /// /// Number of frames that failed to transmit after exceeding the retry limit. /// -#define PXE_STATISTICS_TX_ERROR_FRAMES 0x18 +#define PXE_STATISTICS_TX_ERROR_FRAMES 0x18 /// /// Number of frames transmitted successfully after more than one attempt. /// -#define PXE_STATISTICS_TX_RETRY_FRAMES 0x19 +#define PXE_STATISTICS_TX_RETRY_FRAMES 0x19 typedef struct s_pxe_cpb_mcast_ip_to_mac { /// /// Multicast IP address to be converted to multicast MAC address. /// - PXE_IP_ADDR IP; + PXE_IP_ADDR IP; } PXE_CPB_MCAST_IP_TO_MAC; typedef struct s_pxe_db_mcast_ip_to_mac { /// /// Multicast MAC address. /// - PXE_MAC_ADDR MAC; + PXE_MAC_ADDR MAC; } PXE_DB_MCAST_IP_TO_MAC; typedef struct s_pxe_cpb_nvdata_sparse { @@ -1494,15 +1491,15 @@ typedef struct s_pxe_cpb_nvdata_sparse { /// /// Non-volatile storage address to be changed. /// - PXE_UINT32 Addr; + PXE_UINT32 Addr; /// /// Data item to write into above storage address. /// union { - PXE_UINT8 Byte; - PXE_UINT16 Word; - PXE_UINT32 Dword; + PXE_UINT8 Byte; + PXE_UINT16 Word; + PXE_UINT32 Dword; } Data; } Item[MAX_EEPROM_LEN]; } PXE_CPB_NVDATA_SPARSE; @@ -1515,17 +1512,17 @@ typedef union u_pxe_cpb_nvdata_bulk { /// /// Array of byte-wide data items. /// - PXE_UINT8 Byte[MAX_EEPROM_LEN << 2]; + PXE_UINT8 Byte[MAX_EEPROM_LEN << 2]; /// /// Array of word-wide data items. /// - PXE_UINT16 Word[MAX_EEPROM_LEN << 1]; + PXE_UINT16 Word[MAX_EEPROM_LEN << 1]; /// /// Array of dword-wide data items. /// - PXE_UINT32 Dword[MAX_EEPROM_LEN]; + PXE_UINT32 Dword[MAX_EEPROM_LEN]; } PXE_CPB_NVDATA_BULK; typedef struct s_pxe_db_nvdata { @@ -1536,17 +1533,17 @@ typedef struct s_pxe_db_nvdata { /// /// Array of byte-wide data items. /// - PXE_UINT8 Byte[MAX_EEPROM_LEN << 2]; + PXE_UINT8 Byte[MAX_EEPROM_LEN << 2]; /// /// Array of word-wide data items. /// - PXE_UINT16 Word[MAX_EEPROM_LEN << 1]; + PXE_UINT16 Word[MAX_EEPROM_LEN << 1]; /// /// Array of dword-wide data items. /// - PXE_UINT32 Dword[MAX_EEPROM_LEN]; + PXE_UINT32 Dword[MAX_EEPROM_LEN]; } Data; } PXE_DB_NVDATA; @@ -1555,17 +1552,17 @@ typedef struct s_pxe_db_get_status { /// Length of next receive frame (header + data). If this is zero, /// there is no next receive frame available. /// - PXE_UINT32 RxFrameLen; + PXE_UINT32 RxFrameLen; /// /// Reserved, set to zero. /// - PXE_UINT32 reserved; + PXE_UINT32 reserved; /// /// Addresses of transmitted buffers that need to be recycled. /// - PXE_UINT64 TxBuffer[MAX_XMIT_BUFFERS]; + PXE_UINT64 TxBuffer[MAX_XMIT_BUFFERS]; } PXE_DB_GET_STATUS; typedef struct s_pxe_cpb_fill_header { @@ -1573,71 +1570,71 @@ typedef struct s_pxe_cpb_fill_header { /// Source and destination MAC addresses. These will be copied into /// the media header without doing byte swapping. /// - PXE_MAC_ADDR SrcAddr; - PXE_MAC_ADDR DestAddr; + PXE_MAC_ADDR SrcAddr; + PXE_MAC_ADDR DestAddr; /// /// Address of first byte of media header. The first byte of packet data /// follows the last byte of the media header. /// - PXE_UINT64 MediaHeader; + PXE_UINT64 MediaHeader; /// /// Length of packet data in bytes (not including the media header). /// - PXE_UINT32 PacketLen; + PXE_UINT32 PacketLen; /// /// Protocol type. This will be copied into the media header without /// doing byte swapping. Protocol type numbers can be obtained from /// the Assigned Numbers RFC 1700. /// - PXE_UINT16 Protocol; + PXE_UINT16 Protocol; /// /// Length of the media header in bytes. /// - PXE_UINT16 MediaHeaderLen; + PXE_UINT16 MediaHeaderLen; } PXE_CPB_FILL_HEADER; -#define PXE_PROTOCOL_ETHERNET_IP 0x0800 -#define PXE_PROTOCOL_ETHERNET_ARP 0x0806 -#define MAX_XMIT_FRAGMENTS 16 +#define PXE_PROTOCOL_ETHERNET_IP 0x0800 +#define PXE_PROTOCOL_ETHERNET_ARP 0x0806 +#define MAX_XMIT_FRAGMENTS 16 typedef struct s_pxe_cpb_fill_header_fragmented { /// /// Source and destination MAC addresses. These will be copied into /// the media header without doing byte swapping. /// - PXE_MAC_ADDR SrcAddr; - PXE_MAC_ADDR DestAddr; + PXE_MAC_ADDR SrcAddr; + PXE_MAC_ADDR DestAddr; /// /// Length of packet data in bytes (not including the media header). /// - PXE_UINT32 PacketLen; + PXE_UINT32 PacketLen; /// /// Protocol type. This will be copied into the media header without /// doing byte swapping. Protocol type numbers can be obtained from /// the Assigned Numbers RFC 1700. /// - PXE_MEDIA_PROTOCOL Protocol; + PXE_MEDIA_PROTOCOL Protocol; /// /// Length of the media header in bytes. /// - PXE_UINT16 MediaHeaderLen; + PXE_UINT16 MediaHeaderLen; /// /// Number of packet fragment descriptors. /// - PXE_UINT16 FragCnt; + PXE_UINT16 FragCnt; /// /// Reserved, must be set to zero. /// - PXE_UINT16 reserved; + PXE_UINT16 reserved; /// /// Array of packet fragment descriptors. The first byte of the media @@ -1647,60 +1644,59 @@ typedef struct s_pxe_cpb_fill_header_fragmented { /// /// Address of this packet fragment. /// - PXE_UINT64 FragAddr; + PXE_UINT64 FragAddr; /// /// Length of this packet fragment. /// - PXE_UINT32 FragLen; + PXE_UINT32 FragLen; /// /// Reserved, must be set to zero. /// - PXE_UINT32 reserved; + PXE_UINT32 reserved; } FragDesc[MAX_XMIT_FRAGMENTS]; -} -PXE_CPB_FILL_HEADER_FRAGMENTED; +} PXE_CPB_FILL_HEADER_FRAGMENTED; typedef struct s_pxe_cpb_transmit { /// /// Address of first byte of frame buffer. This is also the first byte /// of the media header. /// - PXE_UINT64 FrameAddr; + PXE_UINT64 FrameAddr; /// /// Length of the data portion of the frame buffer in bytes. Do not /// include the length of the media header. /// - PXE_UINT32 DataLen; + PXE_UINT32 DataLen; /// /// Length of the media header in bytes. /// - PXE_UINT16 MediaheaderLen; + PXE_UINT16 MediaheaderLen; /// /// Reserved, must be zero. /// - PXE_UINT16 reserved; + PXE_UINT16 reserved; } PXE_CPB_TRANSMIT; typedef struct s_pxe_cpb_transmit_fragments { /// /// Length of packet data in bytes (not including the media header). /// - PXE_UINT32 FrameLen; + PXE_UINT32 FrameLen; /// /// Length of the media header in bytes. /// - PXE_UINT16 MediaheaderLen; + PXE_UINT16 MediaheaderLen; /// /// Number of packet fragment descriptors. /// - PXE_UINT16 FragCnt; + PXE_UINT16 FragCnt; /// /// Array of frame fragment descriptors. The first byte of the first @@ -1710,75 +1706,73 @@ typedef struct s_pxe_cpb_transmit_fragments { /// /// Address of this frame fragment. /// - PXE_UINT64 FragAddr; + PXE_UINT64 FragAddr; /// /// Length of this frame fragment. /// - PXE_UINT32 FragLen; + PXE_UINT32 FragLen; /// /// Reserved, must be set to zero. /// - PXE_UINT32 reserved; + PXE_UINT32 reserved; } FragDesc[MAX_XMIT_FRAGMENTS]; -} -PXE_CPB_TRANSMIT_FRAGMENTS; +} PXE_CPB_TRANSMIT_FRAGMENTS; typedef struct s_pxe_cpb_receive { /// /// Address of first byte of receive buffer. This is also the first byte /// of the frame header. /// - PXE_UINT64 BufferAddr; + PXE_UINT64 BufferAddr; /// /// Length of receive buffer. This must be large enough to hold the /// received frame (media header + data). If the length of smaller than /// the received frame, data will be lost. /// - PXE_UINT32 BufferLen; + PXE_UINT32 BufferLen; /// /// Reserved, must be set to zero. /// - PXE_UINT32 reserved; + PXE_UINT32 reserved; } PXE_CPB_RECEIVE; typedef struct s_pxe_db_receive { /// /// Source and destination MAC addresses from media header. /// - PXE_MAC_ADDR SrcAddr; - PXE_MAC_ADDR DestAddr; + PXE_MAC_ADDR SrcAddr; + PXE_MAC_ADDR DestAddr; /// /// Length of received frame. May be larger than receive buffer size. /// The receive buffer will not be overwritten. This is how to tell /// if data was lost because the receive buffer was too small. /// - PXE_UINT32 FrameLen; + PXE_UINT32 FrameLen; /// /// Protocol type from media header. /// - PXE_MEDIA_PROTOCOL Protocol; + PXE_MEDIA_PROTOCOL Protocol; /// /// Length of media header in received frame. /// - PXE_UINT16 MediaHeaderLen; + PXE_UINT16 MediaHeaderLen; /// /// Type of receive frame. /// - PXE_FRAME_TYPE Type; + PXE_FRAME_TYPE Type; /// /// Reserved, must be zero. /// - PXE_UINT8 reserved[7]; - + PXE_UINT8 reserved[7]; } PXE_DB_RECEIVE; #pragma pack() diff --git a/MdePkg/Include/Uefi/UefiSpec.h b/MdePkg/Include/Uefi/UefiSpec.h index 243a690..2b38b10 100644 --- a/MdePkg/Include/Uefi/UefiSpec.h +++ b/MdePkg/Include/Uefi/UefiSpec.h @@ -59,31 +59,31 @@ typedef enum { // // Memory cacheability attributes // -#define EFI_MEMORY_UC 0x0000000000000001ULL -#define EFI_MEMORY_WC 0x0000000000000002ULL -#define EFI_MEMORY_WT 0x0000000000000004ULL -#define EFI_MEMORY_WB 0x0000000000000008ULL -#define EFI_MEMORY_UCE 0x0000000000000010ULL +#define EFI_MEMORY_UC 0x0000000000000001ULL +#define EFI_MEMORY_WC 0x0000000000000002ULL +#define EFI_MEMORY_WT 0x0000000000000004ULL +#define EFI_MEMORY_WB 0x0000000000000008ULL +#define EFI_MEMORY_UCE 0x0000000000000010ULL // // Physical memory protection attributes // // Note: UEFI spec 2.5 and following: use EFI_MEMORY_RO as write-protected physical memory // protection attribute. Also, EFI_MEMORY_WP means cacheability attribute. // -#define EFI_MEMORY_WP 0x0000000000001000ULL -#define EFI_MEMORY_RP 0x0000000000002000ULL -#define EFI_MEMORY_XP 0x0000000000004000ULL -#define EFI_MEMORY_RO 0x0000000000020000ULL +#define EFI_MEMORY_WP 0x0000000000001000ULL +#define EFI_MEMORY_RP 0x0000000000002000ULL +#define EFI_MEMORY_XP 0x0000000000004000ULL +#define EFI_MEMORY_RO 0x0000000000020000ULL // // Physical memory persistence attribute. // The memory region supports byte-addressable non-volatility. // -#define EFI_MEMORY_NV 0x0000000000008000ULL +#define EFI_MEMORY_NV 0x0000000000008000ULL // // The memory region provides higher reliability relative to other memory in the system. // If all memory has the same reliability, then this bit is not used. // -#define EFI_MEMORY_MORE_RELIABLE 0x0000000000010000ULL +#define EFI_MEMORY_MORE_RELIABLE 0x0000000000010000ULL // // Note: UEFI spec 2.8 and following: @@ -93,7 +93,7 @@ typedef enum { // The SPM attribute serves as a hint to the OS to avoid allocating this // memory for core OS data or code that can not be relocated. // -#define EFI_MEMORY_SP 0x0000000000040000ULL +#define EFI_MEMORY_SP 0x0000000000040000ULL // // If this flag is set, the memory region is capable of being // protected with the CPU's memory cryptographic @@ -102,24 +102,24 @@ typedef enum { // cryptographic capabilities or the CPU does not support CPU // memory cryptographic capabilities. // -#define EFI_MEMORY_CPU_CRYPTO 0x0000000000080000ULL +#define EFI_MEMORY_CPU_CRYPTO 0x0000000000080000ULL // // Runtime memory attribute // -#define EFI_MEMORY_RUNTIME 0x8000000000000000ULL +#define EFI_MEMORY_RUNTIME 0x8000000000000000ULL // // Attributes bitmasks, grouped by type // -#define EFI_CACHE_ATTRIBUTE_MASK (EFI_MEMORY_UC | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB | EFI_MEMORY_UCE | EFI_MEMORY_WP) -#define EFI_MEMORY_ACCESS_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | EFI_MEMORY_RO) -#define EFI_MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_ACCESS_MASK | EFI_MEMORY_SP | EFI_MEMORY_CPU_CRYPTO) +#define EFI_CACHE_ATTRIBUTE_MASK (EFI_MEMORY_UC | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB | EFI_MEMORY_UCE | EFI_MEMORY_WP) +#define EFI_MEMORY_ACCESS_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | EFI_MEMORY_RO) +#define EFI_MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_ACCESS_MASK | EFI_MEMORY_SP | EFI_MEMORY_CPU_CRYPTO) /// /// Memory descriptor version number. /// -#define EFI_MEMORY_DESCRIPTOR_VERSION 1 +#define EFI_MEMORY_DESCRIPTOR_VERSION 1 /// /// Definition of an EFI memory descriptor. @@ -130,32 +130,32 @@ typedef struct { /// Type EFI_MEMORY_TYPE is defined in the /// AllocatePages() function description. /// - UINT32 Type; + UINT32 Type; /// /// Physical address of the first byte in the memory region. PhysicalStart must be /// aligned on a 4 KiB boundary, and must not be above 0xfffffffffffff000. Type /// EFI_PHYSICAL_ADDRESS is defined in the AllocatePages() function description /// - EFI_PHYSICAL_ADDRESS PhysicalStart; + EFI_PHYSICAL_ADDRESS PhysicalStart; /// /// Virtual address of the first byte in the memory region. /// VirtualStart must be aligned on a 4 KiB boundary, /// and must not be above 0xfffffffffffff000. /// - EFI_VIRTUAL_ADDRESS VirtualStart; + EFI_VIRTUAL_ADDRESS VirtualStart; /// /// NumberOfPagesNumber of 4 KiB pages in the memory region. /// NumberOfPages must not be 0, and must not be any value /// that would represent a memory page with a start address, /// either physical or virtual, above 0xfffffffffffff000. /// - UINT64 NumberOfPages; + UINT64 NumberOfPages; /// /// Attributes of the memory region that describe the bit mask of capabilities /// for that memory region, and not necessarily the current settings for that /// memory region. /// - UINT64 Attribute; + UINT64 Attribute; } EFI_MEMORY_DESCRIPTOR; /** @@ -381,12 +381,10 @@ EFI_STATUS IN EFI_HANDLE ChildHandle OPTIONAL ); - - // // ConvertPointer DebugDisposition type. // -#define EFI_OPTIONAL_PTR 0x00000001 +#define EFI_OPTIONAL_PTR 0x00000001 /** Determines the new virtual address that is to be used on subsequent memory accesses. @@ -410,27 +408,25 @@ EFI_STATUS IN OUT VOID **Address ); - // // These types can be ORed together as needed - for example, // EVT_TIMER might be Ored with EVT_NOTIFY_WAIT or // EVT_NOTIFY_SIGNAL. // -#define EVT_TIMER 0x80000000 -#define EVT_RUNTIME 0x40000000 -#define EVT_NOTIFY_WAIT 0x00000100 -#define EVT_NOTIFY_SIGNAL 0x00000200 +#define EVT_TIMER 0x80000000 +#define EVT_RUNTIME 0x40000000 +#define EVT_NOTIFY_WAIT 0x00000100 +#define EVT_NOTIFY_SIGNAL 0x00000200 -#define EVT_SIGNAL_EXIT_BOOT_SERVICES 0x00000201 -#define EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202 +#define EVT_SIGNAL_EXIT_BOOT_SERVICES 0x00000201 +#define EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202 // // The event's NotifyContext pointer points to a runtime memory // address. // The event is deprecated in UEFI2.0 and later specifications. // -#define EVT_RUNTIME_CONTEXT 0x20000000 - +#define EVT_RUNTIME_CONTEXT 0x20000000 /** Invoke a notification event @@ -611,15 +607,13 @@ EFI_STATUS IN EFI_EVENT Event ); - // // Task priority level // -#define TPL_APPLICATION 4 -#define TPL_CALLBACK 8 -#define TPL_NOTIFY 16 -#define TPL_HIGH_LEVEL 31 - +#define TPL_APPLICATION 4 +#define TPL_CALLBACK 8 +#define TPL_NOTIFY 16 +#define TPL_HIGH_LEVEL 31 /** Raises a task's priority level and returns its previous level. @@ -759,7 +753,6 @@ EFI_STATUS IN VOID *Data ); - /// /// This provides the capabilities of the /// real time clock device as exposed through the EFI interfaces. @@ -771,14 +764,14 @@ typedef struct { /// value would be 1 Hz, or 1, to indicate that the device only reports /// the time to the resolution of 1 second. /// - UINT32 Resolution; + UINT32 Resolution; /// /// Provides the timekeeping accuracy of the real-time clock in an /// error rate of 1E-6 parts per million. For a clock with an accuracy /// of 50 parts per million, the value in this field would be /// 50,000,000. /// - UINT32 Accuracy; + UINT32 Accuracy; /// /// A TRUE indicates that a time set operation clears the device's /// time below the Resolution reporting level. A FALSE @@ -786,7 +779,7 @@ typedef struct { /// device is not cleared when the time is set. Normal PC-AT CMOS /// RTC devices set this value to FALSE. /// - BOOLEAN SetsToZero; + BOOLEAN SetsToZero; } EFI_TIME_CAPABILITIES; /** @@ -1299,12 +1292,12 @@ EFI_STATUS OUT VOID **Interface ); -#define EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL 0x00000001 -#define EFI_OPEN_PROTOCOL_GET_PROTOCOL 0x00000002 -#define EFI_OPEN_PROTOCOL_TEST_PROTOCOL 0x00000004 -#define EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER 0x00000008 -#define EFI_OPEN_PROTOCOL_BY_DRIVER 0x00000010 -#define EFI_OPEN_PROTOCOL_EXCLUSIVE 0x00000020 +#define EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL 0x00000001 +#define EFI_OPEN_PROTOCOL_GET_PROTOCOL 0x00000002 +#define EFI_OPEN_PROTOCOL_TEST_PROTOCOL 0x00000004 +#define EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER 0x00000008 +#define EFI_OPEN_PROTOCOL_BY_DRIVER 0x00000010 +#define EFI_OPEN_PROTOCOL_EXCLUSIVE 0x00000020 /** Queries a handle to determine if it supports a specified protocol. If the protocol is supported by the @@ -1344,7 +1337,6 @@ EFI_STATUS IN UINT32 Attributes ); - /** Closes a protocol on a handle that was opened using OpenProtocol(). @@ -1379,10 +1371,10 @@ EFI_STATUS /// EFI Oprn Protocol Information Entry /// typedef struct { - EFI_HANDLE AgentHandle; - EFI_HANDLE ControllerHandle; - UINT32 Attributes; - UINT32 OpenCount; + EFI_HANDLE AgentHandle; + EFI_HANDLE ControllerHandle; + UINT32 Attributes; + UINT32 OpenCount; } EFI_OPEN_PROTOCOL_INFORMATION_ENTRY; /** @@ -1617,20 +1609,20 @@ typedef struct { /// /// Length in bytes of the data pointed to by DataBlock/ContinuationPointer. /// - UINT64 Length; + UINT64 Length; union { /// /// Physical address of the data block. This member of the union is /// used if Length is not equal to zero. /// - EFI_PHYSICAL_ADDRESS DataBlock; + EFI_PHYSICAL_ADDRESS DataBlock; /// /// Physical address of another block of /// EFI_CAPSULE_BLOCK_DESCRIPTOR structures. This /// member of the union is used if Length is equal to zero. If /// ContinuationPointer is zero this entry represents the end of the list. /// - EFI_PHYSICAL_ADDRESS ContinuationPointer; + EFI_PHYSICAL_ADDRESS ContinuationPointer; } Union; } EFI_CAPSULE_BLOCK_DESCRIPTOR; @@ -1641,23 +1633,23 @@ typedef struct { /// /// A GUID that defines the contents of a capsule. /// - EFI_GUID CapsuleGuid; + EFI_GUID CapsuleGuid; /// /// The size of the capsule header. This may be larger than the size of /// the EFI_CAPSULE_HEADER since CapsuleGuid may imply /// extended header entries /// - UINT32 HeaderSize; + UINT32 HeaderSize; /// /// Bit-mapped list describing the capsule attributes. The Flag values /// of 0x0000 - 0xFFFF are defined by CapsuleGuid. Flag values /// of 0x10000 - 0xFFFFFFFF are defined by this specification /// - UINT32 Flags; + UINT32 Flags; /// /// Size in bytes of the capsule. /// - UINT32 CapsuleImageSize; + UINT32 CapsuleImageSize; } EFI_CAPSULE_HEADER; /// @@ -1669,16 +1661,16 @@ typedef struct { /// /// the size of the array of capsules. /// - UINT32 CapsuleArrayNumber; + UINT32 CapsuleArrayNumber; /// /// Point to an array of capsules that contain the same CapsuleGuid value. /// - VOID* CapsulePtr[1]; + VOID *CapsulePtr[1]; } EFI_CAPSULE_TABLE; -#define CAPSULE_FLAGS_PERSIST_ACROSS_RESET 0x00010000 -#define CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE 0x00020000 -#define CAPSULE_FLAGS_INITIATE_RESET 0x00040000 +#define CAPSULE_FLAGS_PERSIST_ACROSS_RESET 0x00010000 +#define CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE 0x00020000 +#define CAPSULE_FLAGS_INITIATE_RESET 0x00040000 /** Passes capsules to the firmware with both virtual and physical mapping. Depending on the intended @@ -1821,50 +1813,49 @@ typedef struct { /// /// The table header for the EFI Runtime Services Table. /// - EFI_TABLE_HEADER Hdr; + EFI_TABLE_HEADER Hdr; // // Time Services // - EFI_GET_TIME GetTime; - EFI_SET_TIME SetTime; - EFI_GET_WAKEUP_TIME GetWakeupTime; - EFI_SET_WAKEUP_TIME SetWakeupTime; + EFI_GET_TIME GetTime; + EFI_SET_TIME SetTime; + EFI_GET_WAKEUP_TIME GetWakeupTime; + EFI_SET_WAKEUP_TIME SetWakeupTime; // // Virtual Memory Services // - EFI_SET_VIRTUAL_ADDRESS_MAP SetVirtualAddressMap; - EFI_CONVERT_POINTER ConvertPointer; + EFI_SET_VIRTUAL_ADDRESS_MAP SetVirtualAddressMap; + EFI_CONVERT_POINTER ConvertPointer; // // Variable Services // - EFI_GET_VARIABLE GetVariable; - EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName; - EFI_SET_VARIABLE SetVariable; + EFI_GET_VARIABLE GetVariable; + EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName; + EFI_SET_VARIABLE SetVariable; // // Miscellaneous Services // - EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount; - EFI_RESET_SYSTEM ResetSystem; + EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount; + EFI_RESET_SYSTEM ResetSystem; // // UEFI 2.0 Capsule Services // - EFI_UPDATE_CAPSULE UpdateCapsule; - EFI_QUERY_CAPSULE_CAPABILITIES QueryCapsuleCapabilities; + EFI_UPDATE_CAPSULE UpdateCapsule; + EFI_QUERY_CAPSULE_CAPABILITIES QueryCapsuleCapabilities; // // Miscellaneous UEFI 2.0 Service // - EFI_QUERY_VARIABLE_INFO QueryVariableInfo; + EFI_QUERY_VARIABLE_INFO QueryVariableInfo; } EFI_RUNTIME_SERVICES; - -#define EFI_BOOT_SERVICES_SIGNATURE SIGNATURE_64 ('B','O','O','T','S','E','R','V') -#define EFI_BOOT_SERVICES_REVISION EFI_SPECIFICATION_VERSION +#define EFI_BOOT_SERVICES_SIGNATURE SIGNATURE_64 ('B','O','O','T','S','E','R','V') +#define EFI_BOOT_SERVICES_REVISION EFI_SPECIFICATION_VERSION /// /// EFI Boot Services Table. @@ -1873,95 +1864,95 @@ typedef struct { /// /// The table header for the EFI Boot Services Table. /// - EFI_TABLE_HEADER Hdr; + EFI_TABLE_HEADER Hdr; // // Task Priority Services // - EFI_RAISE_TPL RaiseTPL; - EFI_RESTORE_TPL RestoreTPL; + EFI_RAISE_TPL RaiseTPL; + EFI_RESTORE_TPL RestoreTPL; // // Memory Services // - EFI_ALLOCATE_PAGES AllocatePages; - EFI_FREE_PAGES FreePages; - EFI_GET_MEMORY_MAP GetMemoryMap; - EFI_ALLOCATE_POOL AllocatePool; - EFI_FREE_POOL FreePool; + EFI_ALLOCATE_PAGES AllocatePages; + EFI_FREE_PAGES FreePages; + EFI_GET_MEMORY_MAP GetMemoryMap; + EFI_ALLOCATE_POOL AllocatePool; + EFI_FREE_POOL FreePool; // // Event & Timer Services // - EFI_CREATE_EVENT CreateEvent; - EFI_SET_TIMER SetTimer; - EFI_WAIT_FOR_EVENT WaitForEvent; - EFI_SIGNAL_EVENT SignalEvent; - EFI_CLOSE_EVENT CloseEvent; - EFI_CHECK_EVENT CheckEvent; + EFI_CREATE_EVENT CreateEvent; + EFI_SET_TIMER SetTimer; + EFI_WAIT_FOR_EVENT WaitForEvent; + EFI_SIGNAL_EVENT SignalEvent; + EFI_CLOSE_EVENT CloseEvent; + EFI_CHECK_EVENT CheckEvent; // // Protocol Handler Services // - EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface; - EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface; - EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface; - EFI_HANDLE_PROTOCOL HandleProtocol; - VOID *Reserved; - EFI_REGISTER_PROTOCOL_NOTIFY RegisterProtocolNotify; - EFI_LOCATE_HANDLE LocateHandle; - EFI_LOCATE_DEVICE_PATH LocateDevicePath; - EFI_INSTALL_CONFIGURATION_TABLE InstallConfigurationTable; + EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface; + EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface; + EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface; + EFI_HANDLE_PROTOCOL HandleProtocol; + VOID *Reserved; + EFI_REGISTER_PROTOCOL_NOTIFY RegisterProtocolNotify; + EFI_LOCATE_HANDLE LocateHandle; + EFI_LOCATE_DEVICE_PATH LocateDevicePath; + EFI_INSTALL_CONFIGURATION_TABLE InstallConfigurationTable; // // Image Services // - EFI_IMAGE_LOAD LoadImage; - EFI_IMAGE_START StartImage; - EFI_EXIT Exit; - EFI_IMAGE_UNLOAD UnloadImage; - EFI_EXIT_BOOT_SERVICES ExitBootServices; + EFI_IMAGE_LOAD LoadImage; + EFI_IMAGE_START StartImage; + EFI_EXIT Exit; + EFI_IMAGE_UNLOAD UnloadImage; + EFI_EXIT_BOOT_SERVICES ExitBootServices; // // Miscellaneous Services // - EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount; - EFI_STALL Stall; - EFI_SET_WATCHDOG_TIMER SetWatchdogTimer; + EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount; + EFI_STALL Stall; + EFI_SET_WATCHDOG_TIMER SetWatchdogTimer; // // DriverSupport Services // - EFI_CONNECT_CONTROLLER ConnectController; - EFI_DISCONNECT_CONTROLLER DisconnectController; + EFI_CONNECT_CONTROLLER ConnectController; + EFI_DISCONNECT_CONTROLLER DisconnectController; // // Open and Close Protocol Services // - EFI_OPEN_PROTOCOL OpenProtocol; - EFI_CLOSE_PROTOCOL CloseProtocol; - EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation; + EFI_OPEN_PROTOCOL OpenProtocol; + EFI_CLOSE_PROTOCOL CloseProtocol; + EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation; // // Library Services // - EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle; - EFI_LOCATE_HANDLE_BUFFER LocateHandleBuffer; - EFI_LOCATE_PROTOCOL LocateProtocol; - EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES InstallMultipleProtocolInterfaces; - EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES UninstallMultipleProtocolInterfaces; + EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle; + EFI_LOCATE_HANDLE_BUFFER LocateHandleBuffer; + EFI_LOCATE_PROTOCOL LocateProtocol; + EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES InstallMultipleProtocolInterfaces; + EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES UninstallMultipleProtocolInterfaces; // // 32-bit CRC Services // - EFI_CALCULATE_CRC32 CalculateCrc32; + EFI_CALCULATE_CRC32 CalculateCrc32; // // Miscellaneous Services // - EFI_COPY_MEM CopyMem; - EFI_SET_MEM SetMem; - EFI_CREATE_EVENT_EX CreateEventEx; + EFI_COPY_MEM CopyMem; + EFI_SET_MEM SetMem; + EFI_CREATE_EVENT_EX CreateEventEx; } EFI_BOOT_SERVICES; /// @@ -1972,11 +1963,11 @@ typedef struct { /// /// The 128-bit GUID value that uniquely identifies the system configuration table. /// - EFI_GUID VendorGuid; + EFI_GUID VendorGuid; /// /// A pointer to the table associated with VendorGuid. /// - VOID *VendorTable; + VOID *VendorTable; } EFI_CONFIGURATION_TABLE; /// @@ -1986,63 +1977,63 @@ typedef struct { /// /// The table header for the EFI System Table. /// - EFI_TABLE_HEADER Hdr; + EFI_TABLE_HEADER Hdr; /// /// A pointer to a null terminated string that identifies the vendor /// that produces the system firmware for the platform. /// - CHAR16 *FirmwareVendor; + CHAR16 *FirmwareVendor; /// /// A firmware vendor specific value that identifies the revision /// of the system firmware for the platform. /// - UINT32 FirmwareRevision; + UINT32 FirmwareRevision; /// /// The handle for the active console input device. This handle must support /// EFI_SIMPLE_TEXT_INPUT_PROTOCOL and EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL. /// - EFI_HANDLE ConsoleInHandle; + EFI_HANDLE ConsoleInHandle; /// /// A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL interface that is /// associated with ConsoleInHandle. /// - EFI_SIMPLE_TEXT_INPUT_PROTOCOL *ConIn; + EFI_SIMPLE_TEXT_INPUT_PROTOCOL *ConIn; /// /// The handle for the active console output device. /// - EFI_HANDLE ConsoleOutHandle; + EFI_HANDLE ConsoleOutHandle; /// /// A pointer to the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL interface /// that is associated with ConsoleOutHandle. /// - EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *ConOut; + EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *ConOut; /// /// The handle for the active standard error console device. /// This handle must support the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL. /// - EFI_HANDLE StandardErrorHandle; + EFI_HANDLE StandardErrorHandle; /// /// A pointer to the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL interface /// that is associated with StandardErrorHandle. /// - EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *StdErr; + EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *StdErr; /// /// A pointer to the EFI Runtime Services Table. /// - EFI_RUNTIME_SERVICES *RuntimeServices; + EFI_RUNTIME_SERVICES *RuntimeServices; /// /// A pointer to the EFI Boot Services Table. /// - EFI_BOOT_SERVICES *BootServices; + EFI_BOOT_SERVICES *BootServices; /// /// The number of system configuration tables in the buffer ConfigurationTable. /// - UINTN NumberOfTableEntries; + UINTN NumberOfTableEntries; /// /// A pointer to the system configuration tables. /// The number of entries in the table is NumberOfTableEntries. /// - EFI_CONFIGURATION_TABLE *ConfigurationTable; + EFI_CONFIGURATION_TABLE *ConfigurationTable; } EFI_SYSTEM_TABLE; /** @@ -2077,13 +2068,13 @@ typedef struct _EFI_LOAD_OPTION { /// The attributes for this load option entry. All unused bits must be zero /// and are reserved by the UEFI specification for future growth. /// - UINT32 Attributes; + UINT32 Attributes; /// /// Length in bytes of the FilePathList. OptionalData starts at offset /// sizeof(UINT32) + sizeof(UINT16) + StrSize(Description) + FilePathListLength /// of the EFI_LOAD_OPTION descriptor. /// - UINT16 FilePathListLength; + UINT16 FilePathListLength; /// /// The user readable description for the load option. /// This field ends with a Null character. @@ -2115,18 +2106,18 @@ typedef struct _EFI_LOAD_OPTION { // // EFI Load Options Attributes // -#define LOAD_OPTION_ACTIVE 0x00000001 -#define LOAD_OPTION_FORCE_RECONNECT 0x00000002 -#define LOAD_OPTION_HIDDEN 0x00000008 -#define LOAD_OPTION_CATEGORY 0x00001F00 +#define LOAD_OPTION_ACTIVE 0x00000001 +#define LOAD_OPTION_FORCE_RECONNECT 0x00000002 +#define LOAD_OPTION_HIDDEN 0x00000008 +#define LOAD_OPTION_CATEGORY 0x00001F00 -#define LOAD_OPTION_CATEGORY_BOOT 0x00000000 -#define LOAD_OPTION_CATEGORY_APP 0x00000100 +#define LOAD_OPTION_CATEGORY_BOOT 0x00000000 +#define LOAD_OPTION_CATEGORY_APP 0x00000100 -#define EFI_BOOT_OPTION_SUPPORT_KEY 0x00000001 -#define EFI_BOOT_OPTION_SUPPORT_APP 0x00000002 -#define EFI_BOOT_OPTION_SUPPORT_SYSPREP 0x00000010 -#define EFI_BOOT_OPTION_SUPPORT_COUNT 0x00000300 +#define EFI_BOOT_OPTION_SUPPORT_KEY 0x00000001 +#define EFI_BOOT_OPTION_SUPPORT_APP 0x00000002 +#define EFI_BOOT_OPTION_SUPPORT_SYSPREP 0x00000010 +#define EFI_BOOT_OPTION_SUPPORT_COUNT 0x00000300 /// /// EFI Boot Key Data @@ -2136,40 +2127,40 @@ typedef union { /// /// Indicates the revision of the EFI_KEY_OPTION structure. This revision level should be 0. /// - UINT32 Revision : 8; + UINT32 Revision : 8; /// /// Either the left or right Shift keys must be pressed (1) or must not be pressed (0). /// - UINT32 ShiftPressed : 1; + UINT32 ShiftPressed : 1; /// /// Either the left or right Control keys must be pressed (1) or must not be pressed (0). /// - UINT32 ControlPressed : 1; + UINT32 ControlPressed : 1; /// /// Either the left or right Alt keys must be pressed (1) or must not be pressed (0). /// - UINT32 AltPressed : 1; + UINT32 AltPressed : 1; /// /// Either the left or right Logo keys must be pressed (1) or must not be pressed (0). /// - UINT32 LogoPressed : 1; + UINT32 LogoPressed : 1; /// /// The Menu key must be pressed (1) or must not be pressed (0). /// - UINT32 MenuPressed : 1; + UINT32 MenuPressed : 1; /// /// The SysReq key must be pressed (1) or must not be pressed (0). /// - UINT32 SysReqPressed : 1; - UINT32 Reserved : 16; + UINT32 SysReqPressed : 1; + UINT32 Reserved : 16; /// /// Specifies the actual number of entries in EFI_KEY_OPTION.Keys, from 0-3. If /// zero, then only the shift state is considered. If more than one, then the boot option will /// only be launched if all of the specified keys are pressed with the same shift state. /// - UINT32 InputKeyCount : 2; + UINT32 InputKeyCount : 2; } Options; - UINT32 PackedValue; + UINT32 PackedValue; } EFI_BOOT_KEY_DATA; /// @@ -2180,58 +2171,58 @@ typedef struct { /// /// Specifies options about how the key will be processed. /// - EFI_BOOT_KEY_DATA KeyData; + EFI_BOOT_KEY_DATA KeyData; /// /// The CRC-32 which should match the CRC-32 of the entire EFI_LOAD_OPTION to /// which BootOption refers. If the CRC-32s do not match this value, then this key /// option is ignored. /// - UINT32 BootOptionCrc; + UINT32 BootOptionCrc; /// /// The Boot#### option which will be invoked if this key is pressed and the boot option /// is active (LOAD_OPTION_ACTIVE is set). /// - UINT16 BootOption; + UINT16 BootOption; /// /// The key codes to compare against those returned by the /// EFI_SIMPLE_TEXT_INPUT and EFI_SIMPLE_TEXT_INPUT_EX protocols. /// The number of key codes (0-3) is specified by the EFI_KEY_CODE_COUNT field in KeyOptions. /// - //EFI_INPUT_KEY Keys[]; + // EFI_INPUT_KEY Keys[]; } EFI_KEY_OPTION; #pragma pack() // // EFI File location to boot from on removable media devices // -#define EFI_REMOVABLE_MEDIA_FILE_NAME_IA32 L"\\EFI\\BOOT\\BOOTIA32.EFI" -#define EFI_REMOVABLE_MEDIA_FILE_NAME_IA64 L"\\EFI\\BOOT\\BOOTIA64.EFI" -#define EFI_REMOVABLE_MEDIA_FILE_NAME_X64 L"\\EFI\\BOOT\\BOOTX64.EFI" -#define EFI_REMOVABLE_MEDIA_FILE_NAME_ARM L"\\EFI\\BOOT\\BOOTARM.EFI" -#define EFI_REMOVABLE_MEDIA_FILE_NAME_AARCH64 L"\\EFI\\BOOT\\BOOTAA64.EFI" -#define EFI_REMOVABLE_MEDIA_FILE_NAME_RISCV64 L"\\EFI\\BOOT\\BOOTRISCV64.EFI" - -#if !defined(EFI_REMOVABLE_MEDIA_FILE_NAME) -#if defined (MDE_CPU_IA32) - #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_IA32 -#elif defined (MDE_CPU_X64) - #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_X64 -#elif defined (MDE_CPU_EBC) -#elif defined (MDE_CPU_ARM) - #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_ARM -#elif defined (MDE_CPU_AARCH64) - #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_AARCH64 -#elif defined (MDE_CPU_RISCV64) - #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_RISCV64 -#else - #error Unknown Processor Type -#endif +#define EFI_REMOVABLE_MEDIA_FILE_NAME_IA32 L"\\EFI\\BOOT\\BOOTIA32.EFI" +#define EFI_REMOVABLE_MEDIA_FILE_NAME_IA64 L"\\EFI\\BOOT\\BOOTIA64.EFI" +#define EFI_REMOVABLE_MEDIA_FILE_NAME_X64 L"\\EFI\\BOOT\\BOOTX64.EFI" +#define EFI_REMOVABLE_MEDIA_FILE_NAME_ARM L"\\EFI\\BOOT\\BOOTARM.EFI" +#define EFI_REMOVABLE_MEDIA_FILE_NAME_AARCH64 L"\\EFI\\BOOT\\BOOTAA64.EFI" +#define EFI_REMOVABLE_MEDIA_FILE_NAME_RISCV64 L"\\EFI\\BOOT\\BOOTRISCV64.EFI" + +#if !defined (EFI_REMOVABLE_MEDIA_FILE_NAME) + #if defined (MDE_CPU_IA32) +#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_IA32 + #elif defined (MDE_CPU_X64) +#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_X64 + #elif defined (MDE_CPU_EBC) + #elif defined (MDE_CPU_ARM) +#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_ARM + #elif defined (MDE_CPU_AARCH64) +#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_AARCH64 + #elif defined (MDE_CPU_RISCV64) +#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_RISCV64 + #else + #error Unknown Processor Type + #endif #endif // // The directory within the active EFI System Partition defined for delivery of capsule to firmware // -#define EFI_CAPSULE_FILE_DIRECTORY L"\\EFI\\UpdateCapsule\\" +#define EFI_CAPSULE_FILE_DIRECTORY L"\\EFI\\UpdateCapsule\\" #include #include diff --git a/MdePkg/Include/X64/ProcessorBind.h b/MdePkg/Include/X64/ProcessorBind.h index 5d14316..f0a4d00 100644 --- a/MdePkg/Include/X64/ProcessorBind.h +++ b/MdePkg/Include/X64/ProcessorBind.h @@ -17,11 +17,11 @@ // // Make sure we are using the correct packing rules per EFI specification // -#if !defined(__GNUC__) -#pragma pack() +#if !defined (__GNUC__) + #pragma pack() #endif -#if defined(__GNUC__) && defined(__pic__) && !defined(USING_LTO) && !defined(__APPLE__) +#if defined (__GNUC__) && defined (__pic__) && !defined (USING_LTO) && !defined (__APPLE__) // // Mark all symbol declarations and references as hidden, meaning they will // not be subject to symbol preemption. This allows the compiler to refer to @@ -32,38 +32,37 @@ // references can be resolved locally, and so there is no need to set the // pragma in that case (and doing so will cause other issues). // -#pragma GCC visibility push (hidden) + #pragma GCC visibility push (hidden) #endif -#if defined(__INTEL_COMPILER) +#if defined (__INTEL_COMPILER) // // Disable ICC's remark #869: "Parameter" was never referenced warning. // This is legal ANSI C code so we disable the remark that is turned on with -Wall // -#pragma warning ( disable : 869 ) + #pragma warning ( disable : 869 ) // // Disable ICC's remark #1418: external function definition with no prior declaration. // This is legal ANSI C code so we disable the remark that is turned on with /W4 // -#pragma warning ( disable : 1418 ) + #pragma warning ( disable : 1418 ) // // Disable ICC's remark #1419: external declaration in primary source file // This is legal ANSI C code so we disable the remark that is turned on with /W4 // -#pragma warning ( disable : 1419 ) + #pragma warning ( disable : 1419 ) // // Disable ICC's remark #593: "Variable" was set but never used. // This is legal ANSI C code so we disable the remark that is turned on with /W4 // -#pragma warning ( disable : 593 ) + #pragma warning ( disable : 593 ) #endif - -#if defined(_MSC_EXTENSIONS) +#if defined (_MSC_EXTENSIONS) // // Disable warning that make it impossible to compile at /W4 @@ -73,35 +72,35 @@ // // Disabling bitfield type checking warnings. // -#pragma warning ( disable : 4214 ) + #pragma warning ( disable : 4214 ) // // Disabling the unreferenced formal parameter warnings. // -#pragma warning ( disable : 4100 ) + #pragma warning ( disable : 4100 ) // // Disable slightly different base types warning as CHAR8 * can not be set // to a constant string. // -#pragma warning ( disable : 4057 ) + #pragma warning ( disable : 4057 ) // // ASSERT(FALSE) or while (TRUE) are legal constructs so suppress this warning // -#pragma warning ( disable : 4127 ) + #pragma warning ( disable : 4127 ) // // This warning is caused by functions defined but not used. For precompiled header only. // -#pragma warning ( disable : 4505 ) + #pragma warning ( disable : 4505 ) // // This warning is caused by empty (after preprocessing) source file. For precompiled header only. // -#pragma warning ( disable : 4206 ) + #pragma warning ( disable : 4206 ) -#if defined(_MSC_VER) && _MSC_VER >= 1800 + #if defined (_MSC_VER) && _MSC_VER >= 1800 // // Disable these warnings for VS2013. @@ -111,130 +110,128 @@ // This warning is for potentially uninitialized local variable, and it may cause false // positive issues in VS2013 and VS2015 build // -#pragma warning ( disable : 4701 ) + #pragma warning ( disable : 4701 ) // // This warning is for potentially uninitialized local pointer variable, and it may cause // false positive issues in VS2013 and VS2015 build // -#pragma warning ( disable : 4703 ) + #pragma warning ( disable : 4703 ) -#endif + #endif #endif +#if defined (_MSC_EXTENSIONS) +// +// use Microsoft C compiler dependent integer width types +// -#if defined(_MSC_EXTENSIONS) - // - // use Microsoft C compiler dependent integer width types - // - - /// - /// 8-byte unsigned value - /// - typedef unsigned __int64 UINT64; - /// - /// 8-byte signed value - /// - typedef __int64 INT64; - /// - /// 4-byte unsigned value - /// - typedef unsigned __int32 UINT32; - /// - /// 4-byte signed value - /// - typedef __int32 INT32; - /// - /// 2-byte unsigned value - /// - typedef unsigned short UINT16; - /// - /// 2-byte Character. Unless otherwise specified all strings are stored in the - /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards. - /// - typedef unsigned short CHAR16; - /// - /// 2-byte signed value - /// - typedef short INT16; - /// - /// Logical Boolean. 1-byte value containing 0 for FALSE or a 1 for TRUE. Other - /// values are undefined. - /// - typedef unsigned char BOOLEAN; - /// - /// 1-byte unsigned value - /// - typedef unsigned char UINT8; - /// - /// 1-byte Character - /// - typedef char CHAR8; - /// - /// 1-byte signed value - /// - typedef signed char INT8; +/// +/// 8-byte unsigned value +/// +typedef unsigned __int64 UINT64; +/// +/// 8-byte signed value +/// +typedef __int64 INT64; +/// +/// 4-byte unsigned value +/// +typedef unsigned __int32 UINT32; +/// +/// 4-byte signed value +/// +typedef __int32 INT32; +/// +/// 2-byte unsigned value +/// +typedef unsigned short UINT16; +/// +/// 2-byte Character. Unless otherwise specified all strings are stored in the +/// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards. +/// +typedef unsigned short CHAR16; +/// +/// 2-byte signed value +/// +typedef short INT16; +/// +/// Logical Boolean. 1-byte value containing 0 for FALSE or a 1 for TRUE. Other +/// values are undefined. +/// +typedef unsigned char BOOLEAN; +/// +/// 1-byte unsigned value +/// +typedef unsigned char UINT8; +/// +/// 1-byte Character +/// +typedef char CHAR8; +/// +/// 1-byte signed value +/// +typedef signed char INT8; #else - /// - /// 8-byte unsigned value - /// - typedef unsigned long long UINT64; - /// - /// 8-byte signed value - /// - typedef long long INT64; - /// - /// 4-byte unsigned value - /// - typedef unsigned int UINT32; - /// - /// 4-byte signed value - /// - typedef int INT32; - /// - /// 2-byte unsigned value - /// - typedef unsigned short UINT16; - /// - /// 2-byte Character. Unless otherwise specified all strings are stored in the - /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards. - /// - typedef unsigned short CHAR16; - /// - /// 2-byte signed value - /// - typedef short INT16; - /// - /// Logical Boolean. 1-byte value containing 0 for FALSE or a 1 for TRUE. Other - /// values are undefined. - /// - typedef unsigned char BOOLEAN; - /// - /// 1-byte unsigned value - /// - typedef unsigned char UINT8; - /// - /// 1-byte Character - /// - typedef char CHAR8; - /// - /// 1-byte signed value - /// - typedef signed char INT8; +/// +/// 8-byte unsigned value +/// +typedef unsigned long long UINT64; +/// +/// 8-byte signed value +/// +typedef long long INT64; +/// +/// 4-byte unsigned value +/// +typedef unsigned int UINT32; +/// +/// 4-byte signed value +/// +typedef int INT32; +/// +/// 2-byte unsigned value +/// +typedef unsigned short UINT16; +/// +/// 2-byte Character. Unless otherwise specified all strings are stored in the +/// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards. +/// +typedef unsigned short CHAR16; +/// +/// 2-byte signed value +/// +typedef short INT16; +/// +/// Logical Boolean. 1-byte value containing 0 for FALSE or a 1 for TRUE. Other +/// values are undefined. +/// +typedef unsigned char BOOLEAN; +/// +/// 1-byte unsigned value +/// +typedef unsigned char UINT8; +/// +/// 1-byte Character +/// +typedef char CHAR8; +/// +/// 1-byte signed value +/// +typedef signed char INT8; #endif /// /// Unsigned value of native width. (4 bytes on supported 32-bit processor instructions, /// 8 bytes on supported 64-bit processor instructions) /// -typedef UINT64 UINTN; +typedef UINT64 UINTN; /// /// Signed value of native width. (4 bytes on supported 32-bit processor instructions, /// 8 bytes on supported 64-bit processor instructions) /// -typedef INT64 INTN; - +typedef INT64 INTN; // // Processor specific defines @@ -243,7 +240,7 @@ typedef INT64 INTN; /// /// A value of native width with the highest bit set. /// -#define MAX_BIT 0x8000000000000000ULL +#define MAX_BIT 0x8000000000000000ULL /// /// A value of native width with the two highest bits set. /// @@ -252,12 +249,12 @@ typedef INT64 INTN; /// /// Maximum legal x64 address /// -#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFFULL +#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFFULL /// /// Maximum usable address at boot time /// -#define MAX_ALLOC_ADDRESS MAX_ADDRESS +#define MAX_ALLOC_ADDRESS MAX_ADDRESS /// /// Maximum legal x64 INTN and UINTN values. @@ -268,18 +265,18 @@ typedef INT64 INTN; /// /// Minimum legal x64 INTN value. /// -#define MIN_INTN (((INTN)-9223372036854775807LL) - 1) +#define MIN_INTN (((INTN)-9223372036854775807LL) - 1) /// /// The stack alignment required for x64 /// -#define CPU_STACK_ALIGNMENT 16 +#define CPU_STACK_ALIGNMENT 16 /// /// Page allocation granularity for x64 /// -#define DEFAULT_PAGE_ALLOCATION_GRANULARITY (0x1000) -#define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x1000) +#define DEFAULT_PAGE_ALLOCATION_GRANULARITY (0x1000) +#define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x1000) // // Modifier to ensure that all protocol member functions and EFI intrinsics @@ -287,38 +284,38 @@ typedef INT64 INTN; // EFI intrinsics are required to modify their member functions with EFIAPI. // #ifdef EFIAPI - /// - /// If EFIAPI is already defined, then we use that definition. - /// -#elif defined(_MSC_EXTENSIONS) - /// - /// Microsoft* compiler specific method for EFIAPI calling convention. - /// - #define EFIAPI __cdecl -#elif defined(__GNUC__) - /// - /// Define the standard calling convention regardless of optimization level. - /// The GCC support assumes a GCC compiler that supports the EFI ABI. The EFI - /// ABI is much closer to the x64 Microsoft* ABI than standard x64 (x86-64) - /// GCC ABI. Thus a standard x64 (x86-64) GCC compiler can not be used for - /// x64. Warning the assembly code in the MDE x64 does not follow the correct - /// ABI for the standard x64 (x86-64) GCC. - /// - #define EFIAPI +/// +/// If EFIAPI is already defined, then we use that definition. +/// +#elif defined (_MSC_EXTENSIONS) +/// +/// Microsoft* compiler specific method for EFIAPI calling convention. +/// +#define EFIAPI __cdecl +#elif defined (__GNUC__) +/// +/// Define the standard calling convention regardless of optimization level. +/// The GCC support assumes a GCC compiler that supports the EFI ABI. The EFI +/// ABI is much closer to the x64 Microsoft* ABI than standard x64 (x86-64) +/// GCC ABI. Thus a standard x64 (x86-64) GCC compiler can not be used for +/// x64. Warning the assembly code in the MDE x64 does not follow the correct +/// ABI for the standard x64 (x86-64) GCC. +/// +#define EFIAPI #else - /// - /// The default for a non Microsoft* or GCC compiler is to assume the EFI ABI - /// is the standard. - /// - #define EFIAPI +/// +/// The default for a non Microsoft* or GCC compiler is to assume the EFI ABI +/// is the standard. +/// +#define EFIAPI #endif -#if defined(__GNUC__) || defined(__clang__) - /// - /// For GNU assembly code, .global or .globl can declare global symbols. - /// Define this macro to unify the usage. - /// - #define ASM_GLOBAL .globl +#if defined (__GNUC__) || defined (__clang__) +/// +/// For GNU assembly code, .global or .globl can declare global symbols. +/// Define this macro to unify the usage. +/// +#define ASM_GLOBAL .globl #endif /** @@ -331,11 +328,10 @@ typedef INT64 INTN; @return The pointer to the first instruction of a function given a function pointer. **/ -#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer) +#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer) #ifndef __USER_LABEL_PREFIX__ #define __USER_LABEL_PREFIX__ #endif #endif - diff --git a/MdePkg/Library/BaseCacheMaintenanceLib/ArmCache.c b/MdePkg/Library/BaseCacheMaintenanceLib/ArmCache.c index fd324c6..390539b 100644 --- a/MdePkg/Library/BaseCacheMaintenanceLib/ArmCache.c +++ b/MdePkg/Library/BaseCacheMaintenanceLib/ArmCache.c @@ -28,7 +28,7 @@ InvalidateInstructionCache ( VOID ) { - ASSERT(FALSE); + ASSERT (FALSE); } /** @@ -59,12 +59,12 @@ InvalidateInstructionCache ( VOID * EFIAPI InvalidateInstructionCacheRange ( - IN VOID *Address, - IN UINTN Length + IN VOID *Address, + IN UINTN Length ) { ASSERT (Length <= MAX_ADDRESS - (UINTN)Address + 1); - ASSERT(FALSE); + ASSERT (FALSE); return Address; } @@ -84,7 +84,7 @@ WriteBackInvalidateDataCache ( VOID ) { - ASSERT(FALSE); + ASSERT (FALSE); } /** @@ -116,12 +116,12 @@ WriteBackInvalidateDataCache ( VOID * EFIAPI WriteBackInvalidateDataCacheRange ( - IN VOID *Address, - IN UINTN Length + IN VOID *Address, + IN UINTN Length ) { ASSERT (Length <= MAX_ADDRESS - (UINTN)Address + 1); - ASSERT(FALSE); + ASSERT (FALSE); return Address; } @@ -141,7 +141,7 @@ WriteBackDataCache ( VOID ) { - ASSERT(FALSE); + ASSERT (FALSE); } /** @@ -172,12 +172,12 @@ WriteBackDataCache ( VOID * EFIAPI WriteBackDataCacheRange ( - IN VOID *Address, - IN UINTN Length + IN VOID *Address, + IN UINTN Length ) { ASSERT (Length <= MAX_ADDRESS - (UINTN)Address + 1); - ASSERT(FALSE); + ASSERT (FALSE); return Address; } @@ -198,7 +198,7 @@ InvalidateDataCache ( VOID ) { - ASSERT(FALSE); + ASSERT (FALSE); } /** @@ -231,11 +231,11 @@ InvalidateDataCache ( VOID * EFIAPI InvalidateDataCacheRange ( - IN VOID *Address, - IN UINTN Length + IN VOID *Address, + IN UINTN Length ) { ASSERT (Length <= MAX_ADDRESS - (UINTN)Address + 1); - ASSERT(FALSE); + ASSERT (FALSE); return Address; } diff --git a/MdePkg/Library/BaseCacheMaintenanceLib/EbcCache.c b/MdePkg/Library/BaseCacheMaintenanceLib/EbcCache.c index f4b9d9d..ab0eee8 100644 --- a/MdePkg/Library/BaseCacheMaintenanceLib/EbcCache.c +++ b/MdePkg/Library/BaseCacheMaintenanceLib/EbcCache.c @@ -50,8 +50,8 @@ InvalidateInstructionCache ( VOID * EFIAPI InvalidateInstructionCacheRange ( - IN VOID *Address, - IN UINTN Length + IN VOID *Address, + IN UINTN Length ) { ASSERT (Length <= MAX_ADDRESS - (UINTN)Address + 1); @@ -105,8 +105,8 @@ WriteBackInvalidateDataCache ( VOID * EFIAPI WriteBackInvalidateDataCacheRange ( - IN VOID *Address, - IN UINTN Length + IN VOID *Address, + IN UINTN Length ) { ASSERT (Length <= MAX_ADDRESS - (UINTN)Address + 1); @@ -159,8 +159,8 @@ WriteBackDataCache ( VOID * EFIAPI WriteBackDataCacheRange ( - IN VOID *Address, - IN UINTN Length + IN VOID *Address, + IN UINTN Length ) { ASSERT (Length <= MAX_ADDRESS - (UINTN)Address + 1); @@ -216,8 +216,8 @@ InvalidateDataCache ( VOID * EFIAPI InvalidateDataCacheRange ( - IN VOID *Address, - IN UINTN Length + IN VOID *Address, + IN UINTN Length ) { ASSERT (Length <= MAX_ADDRESS - (UINTN)Address + 1); diff --git a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c b/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c index 21a695c..67a3387 100644 --- a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c +++ b/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c @@ -72,11 +72,11 @@ InvalidateInstructionCache ( VOID * EFIAPI InvalidateInstructionCacheRange ( - IN VOID *Address, - IN UINTN Length + IN VOID *Address, + IN UINTN Length ) { - DEBUG((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", __FUNCTION__)); return Address; } @@ -96,7 +96,7 @@ WriteBackInvalidateDataCache ( VOID ) { - DEBUG((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", __FUNCTION__)); } /** @@ -128,11 +128,11 @@ WriteBackInvalidateDataCache ( VOID * EFIAPI WriteBackInvalidateDataCacheRange ( - IN VOID *Address, - IN UINTN Length + IN VOID *Address, + IN UINTN Length ) { - DEBUG((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", __FUNCTION__)); return Address; } @@ -152,7 +152,7 @@ WriteBackDataCache ( VOID ) { - DEBUG((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", __FUNCTION__)); } /** @@ -183,11 +183,11 @@ WriteBackDataCache ( VOID * EFIAPI WriteBackDataCacheRange ( - IN VOID *Address, - IN UINTN Length + IN VOID *Address, + IN UINTN Length ) { - DEBUG((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", __FUNCTION__)); return Address; } @@ -241,10 +241,10 @@ InvalidateDataCache ( VOID * EFIAPI InvalidateDataCacheRange ( - IN VOID *Address, - IN UINTN Length + IN VOID *Address, + IN UINTN Length ) { - DEBUG((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", __FUNCTION__)); return Address; } diff --git a/MdePkg/Library/BaseCacheMaintenanceLib/X86Cache.c b/MdePkg/Library/BaseCacheMaintenanceLib/X86Cache.c index 7a6a617..7846d4b 100644 --- a/MdePkg/Library/BaseCacheMaintenanceLib/X86Cache.c +++ b/MdePkg/Library/BaseCacheMaintenanceLib/X86Cache.c @@ -52,8 +52,8 @@ InvalidateInstructionCache ( VOID * EFIAPI InvalidateInstructionCacheRange ( - IN VOID *Address, - IN UINTN Length + IN VOID *Address, + IN UINTN Length ) { if (Length == 0) { @@ -112,15 +112,15 @@ WriteBackInvalidateDataCache ( VOID * EFIAPI WriteBackInvalidateDataCacheRange ( - IN VOID *Address, - IN UINTN Length + IN VOID *Address, + IN UINTN Length ) { - UINT32 RegEbx; - UINT32 RegEdx; - UINTN CacheLineSize; - UINTN Start; - UINTN End; + UINT32 RegEbx; + UINT32 RegEdx; + UINTN CacheLineSize; + UINTN Start; + UINTN End; if (Length == 0) { return Address; @@ -147,12 +147,13 @@ WriteBackInvalidateDataCacheRange ( // // Calculate the cache line alignment // - End = (Start + Length + (CacheLineSize - 1)) & ~(CacheLineSize - 1); + End = (Start + Length + (CacheLineSize - 1)) & ~(CacheLineSize - 1); Start &= ~((UINTN)CacheLineSize - 1); do { - Start = (UINTN)AsmFlushCacheLine ((VOID*)Start) + CacheLineSize; + Start = (UINTN)AsmFlushCacheLine ((VOID *)Start) + CacheLineSize; } while (Start != End); + return Address; } @@ -203,8 +204,8 @@ WriteBackDataCache ( VOID * EFIAPI WriteBackDataCacheRange ( - IN VOID *Address, - IN UINTN Length + IN VOID *Address, + IN UINTN Length ) { return WriteBackInvalidateDataCacheRange (Address, Length); @@ -260,8 +261,8 @@ InvalidateDataCache ( VOID * EFIAPI InvalidateDataCacheRange ( - IN VOID *Address, - IN UINTN Length + IN VOID *Address, + IN UINTN Length ) { // diff --git a/MdePkg/Library/BaseCacheMaintenanceLibNull/BaseCacheMaintenanceLibNull.c b/MdePkg/Library/BaseCacheMaintenanceLibNull/BaseCacheMaintenanceLibNull.c index fd5b9d4..d8b28f7 100644 --- a/MdePkg/Library/BaseCacheMaintenanceLibNull/BaseCacheMaintenanceLibNull.c +++ b/MdePkg/Library/BaseCacheMaintenanceLibNull/BaseCacheMaintenanceLibNull.c @@ -50,8 +50,8 @@ InvalidateInstructionCache ( VOID * EFIAPI InvalidateInstructionCacheRange ( - IN VOID *Address, - IN UINTN Length + IN VOID *Address, + IN UINTN Length ) { ASSERT (Length <= MAX_ADDRESS - (UINTN)Address + 1); @@ -105,8 +105,8 @@ WriteBackInvalidateDataCache ( VOID * EFIAPI WriteBackInvalidateDataCacheRange ( - IN VOID *Address, - IN UINTN Length + IN VOID *Address, + IN UINTN Length ) { ASSERT (Length <= MAX_ADDRESS - (UINTN)Address + 1); @@ -159,8 +159,8 @@ WriteBackDataCache ( VOID * EFIAPI WriteBackDataCacheRange ( - IN VOID *Address, - IN UINTN Length + IN VOID *Address, + IN UINTN Length ) { ASSERT (Length <= MAX_ADDRESS - (UINTN)Address + 1); @@ -216,8 +216,8 @@ InvalidateDataCache ( VOID * EFIAPI InvalidateDataCacheRange ( - IN VOID *Address, - IN UINTN Length + IN VOID *Address, + IN UINTN Length ) { ASSERT (Length <= MAX_ADDRESS - (UINTN)Address + 1); diff --git a/MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlb.c b/MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlb.c index 89341c2..549f4eb 100644 --- a/MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlb.c +++ b/MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlb.c @@ -6,8 +6,6 @@ **/ - - /** Flushes all the Translation Lookaside Buffers(TLB) entries in a CPU. @@ -25,4 +23,3 @@ CpuFlushTlb ( mov cr3, eax } } - diff --git a/MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlbGcc.c b/MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlbGcc.c index 15d4149..ee44f2e 100644 --- a/MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlbGcc.c +++ b/MdePkg/Library/BaseCpuLib/Ia32/CpuFlushTlbGcc.c @@ -23,4 +23,3 @@ CpuFlushTlb ( { AsmWriteCr3 (AsmReadCr3 ()); } - diff --git a/MdePkg/Library/BaseCpuLib/Ia32/CpuSleep.c b/MdePkg/Library/BaseCpuLib/Ia32/CpuSleep.c index 0fcaf22..dc26325 100644 --- a/MdePkg/Library/BaseCpuLib/Ia32/CpuSleep.c +++ b/MdePkg/Library/BaseCpuLib/Ia32/CpuSleep.c @@ -6,7 +6,6 @@ **/ - /** Places the CPU in a sleep state until an interrupt is received. @@ -25,4 +24,3 @@ CpuSleep ( hlt } } - diff --git a/MdePkg/Library/BaseCpuLib/Ia32/CpuSleepGcc.c b/MdePkg/Library/BaseCpuLib/Ia32/CpuSleepGcc.c index ad5b150..bb9b634 100644 --- a/MdePkg/Library/BaseCpuLib/Ia32/CpuSleepGcc.c +++ b/MdePkg/Library/BaseCpuLib/Ia32/CpuSleepGcc.c @@ -7,7 +7,6 @@ **/ - /** Places the CPU in a sleep state until an interrupt is received. @@ -24,4 +23,3 @@ CpuSleep ( { __asm__ __volatile__ ("hlt"::: "memory"); } - diff --git a/MdePkg/Library/BaseDebugLibNull/DebugLib.c b/MdePkg/Library/BaseDebugLibNull/DebugLib.c index 20c175e..e01a095 100644 --- a/MdePkg/Library/BaseDebugLibNull/DebugLib.c +++ b/MdePkg/Library/BaseDebugLibNull/DebugLib.c @@ -34,7 +34,6 @@ DebugPrint ( { } - /** Prints a debug message to the debug output device if the specified error level is enabled. @@ -53,14 +52,13 @@ DebugPrint ( VOID EFIAPI DebugVPrint ( - IN UINTN ErrorLevel, - IN CONST CHAR8 *Format, - IN VA_LIST VaListMarker + IN UINTN ErrorLevel, + IN CONST CHAR8 *Format, + IN VA_LIST VaListMarker ) { } - /** Prints a debug message to the debug output device if the specified error level is enabled. @@ -81,14 +79,13 @@ DebugVPrint ( VOID EFIAPI DebugBPrint ( - IN UINTN ErrorLevel, - IN CONST CHAR8 *Format, - IN BASE_LIST BaseListMarker + IN UINTN ErrorLevel, + IN CONST CHAR8 *Format, + IN BASE_LIST BaseListMarker ) { } - /** Prints an assert message containing a filename, line number, and description. This may be followed by a breakpoint or a dead loop. @@ -120,7 +117,6 @@ DebugAssert ( { } - /** Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer. @@ -146,7 +142,6 @@ DebugClearMemory ( return Buffer; } - /** Returns TRUE if ASSERT() macros are enabled. @@ -166,7 +161,6 @@ DebugAssertEnabled ( return FALSE; } - /** Returns TRUE if DEBUG() macros are enabled. @@ -186,7 +180,6 @@ DebugPrintEnabled ( return FALSE; } - /** Returns TRUE if DEBUG_CODE() macros are enabled. @@ -206,7 +199,6 @@ DebugCodeEnabled ( return FALSE; } - /** Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled. @@ -238,9 +230,8 @@ DebugClearMemoryEnabled ( BOOLEAN EFIAPI DebugPrintLevelEnabled ( - IN CONST UINTN ErrorLevel + IN CONST UINTN ErrorLevel ) { return FALSE; } - diff --git a/MdePkg/Library/BaseDebugLibSerialPort/DebugLib.c b/MdePkg/Library/BaseDebugLibSerialPort/DebugLib.c index aeeab85..bd56869 100644 --- a/MdePkg/Library/BaseDebugLibSerialPort/DebugLib.c +++ b/MdePkg/Library/BaseDebugLibSerialPort/DebugLib.c @@ -30,7 +30,7 @@ // VA_LIST can not initialize to NULL for all compiler, so we use this to // indicate a null VA_LIST // -VA_LIST mVaListNull; +VA_LIST mVaListNull; /** The constructor function initialize the Serial Port Library @@ -77,7 +77,6 @@ DebugPrint ( VA_END (Marker); } - /** Prints a debug message to the debug output device if the specified error level is enabled base on Null-terminated format string and a @@ -97,13 +96,13 @@ DebugPrint ( **/ VOID DebugPrintMarker ( - IN UINTN ErrorLevel, - IN CONST CHAR8 *Format, - IN VA_LIST VaListMarker, - IN BASE_LIST BaseListMarker + IN UINTN ErrorLevel, + IN CONST CHAR8 *Format, + IN VA_LIST VaListMarker, + IN BASE_LIST BaseListMarker ) { - CHAR8 Buffer[MAX_DEBUG_MESSAGE_LENGTH]; + CHAR8 Buffer[MAX_DEBUG_MESSAGE_LENGTH]; // // If Format is NULL, then ASSERT(). @@ -132,7 +131,6 @@ DebugPrintMarker ( SerialPortWrite ((UINT8 *)Buffer, AsciiStrLen (Buffer)); } - /** Prints a debug message to the debug output device if the specified error level is enabled. @@ -151,15 +149,14 @@ DebugPrintMarker ( VOID EFIAPI DebugVPrint ( - IN UINTN ErrorLevel, - IN CONST CHAR8 *Format, - IN VA_LIST VaListMarker + IN UINTN ErrorLevel, + IN CONST CHAR8 *Format, + IN VA_LIST VaListMarker ) { DebugPrintMarker (ErrorLevel, Format, VaListMarker, NULL); } - /** Prints a debug message to the debug output device if the specified error level is enabled. @@ -180,15 +177,14 @@ DebugVPrint ( VOID EFIAPI DebugBPrint ( - IN UINTN ErrorLevel, - IN CONST CHAR8 *Format, - IN BASE_LIST BaseListMarker + IN UINTN ErrorLevel, + IN CONST CHAR8 *Format, + IN BASE_LIST BaseListMarker ) { DebugPrintMarker (ErrorLevel, Format, mVaListNull, BaseListMarker); } - /** Prints an assert message containing a filename, line number, and description. This may be followed by a breakpoint or a dead loop. @@ -233,14 +229,13 @@ DebugAssert ( // // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings // - if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) { + if ((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) { CpuBreakpoint (); - } else if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) { + } else if ((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) { CpuDeadLoop (); } } - /** Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer. @@ -271,10 +266,9 @@ DebugClearMemory ( // // SetMem() checks for the the ASSERT() condition on Length and returns Buffer // - return SetMem (Buffer, Length, PcdGet8(PcdDebugClearMemoryValue)); + return SetMem (Buffer, Length, PcdGet8 (PcdDebugClearMemoryValue)); } - /** Returns TRUE if ASSERT() macros are enabled. @@ -291,10 +285,9 @@ DebugAssertEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0); } - /** Returns TRUE if DEBUG() macros are enabled. @@ -311,10 +304,9 @@ DebugPrintEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0); } - /** Returns TRUE if DEBUG_CODE() macros are enabled. @@ -331,10 +323,9 @@ DebugCodeEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0); } - /** Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled. @@ -351,7 +342,7 @@ DebugClearMemoryEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0); } /** @@ -366,9 +357,8 @@ DebugClearMemoryEnabled ( BOOLEAN EFIAPI DebugPrintLevelEnabled ( - IN CONST UINTN ErrorLevel + IN CONST UINTN ErrorLevel ) { - return (BOOLEAN) ((ErrorLevel & PcdGet32(PcdFixedDebugPrintErrorLevel)) != 0); + return (BOOLEAN)((ErrorLevel & PcdGet32 (PcdFixedDebugPrintErrorLevel)) != 0); } - diff --git a/MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.c b/MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.c index b7059ec..e6f479b 100644 --- a/MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.c +++ b/MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.c @@ -13,14 +13,14 @@ #include #include -#define EXTRACT_HANDLER_INFO_SIGNATURE SIGNATURE_32 ('E', 'G', 'S', 'I') +#define EXTRACT_HANDLER_INFO_SIGNATURE SIGNATURE_32 ('E', 'G', 'S', 'I') typedef struct { - UINT32 Signature; - UINT32 NumberOfExtractHandler; - GUID *ExtractHandlerGuidTable; - EXTRACT_GUIDED_SECTION_DECODE_HANDLER *ExtractDecodeHandlerTable; - EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER *ExtractGetInfoHandlerTable; + UINT32 Signature; + UINT32 NumberOfExtractHandler; + GUID *ExtractHandlerGuidTable; + EXTRACT_GUIDED_SECTION_DECODE_HANDLER *ExtractDecodeHandlerTable; + EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER *ExtractGetInfoHandlerTable; } EXTRACT_GUIDED_SECTION_HANDLER_INFO; /** @@ -35,15 +35,15 @@ typedef struct { **/ RETURN_STATUS GetExtractGuidedSectionHandlerInfo ( - IN OUT EXTRACT_GUIDED_SECTION_HANDLER_INFO **InfoPointer + IN OUT EXTRACT_GUIDED_SECTION_HANDLER_INFO **InfoPointer ) { - EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo; + EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo; // // Set the available memory address to handler info. // - HandlerInfo = (EXTRACT_GUIDED_SECTION_HANDLER_INFO*)(VOID*)(UINTN) PcdGet64 (PcdGuidedExtractHandlerTableAddress); + HandlerInfo = (EXTRACT_GUIDED_SECTION_HANDLER_INFO *)(VOID *)(UINTN)PcdGet64 (PcdGuidedExtractHandlerTableAddress); if (HandlerInfo == NULL) { *InfoPointer = NULL; return EFI_OUT_OF_RESOURCES; @@ -75,17 +75,17 @@ GetExtractGuidedSectionHandlerInfo ( // // Init HandlerInfo structure // - HandlerInfo->NumberOfExtractHandler = 0; - HandlerInfo->ExtractHandlerGuidTable = (GUID *) (HandlerInfo + 1); - HandlerInfo->ExtractDecodeHandlerTable = (EXTRACT_GUIDED_SECTION_DECODE_HANDLER *) ( - (UINT8 *)HandlerInfo->ExtractHandlerGuidTable + - PcdGet32 (PcdMaximumGuidedExtractHandler) * sizeof (GUID) - ); - HandlerInfo->ExtractGetInfoHandlerTable = (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER *) ( - (UINT8 *)HandlerInfo->ExtractDecodeHandlerTable + - PcdGet32 (PcdMaximumGuidedExtractHandler) * - sizeof (EXTRACT_GUIDED_SECTION_DECODE_HANDLER) - ); + HandlerInfo->NumberOfExtractHandler = 0; + HandlerInfo->ExtractHandlerGuidTable = (GUID *)(HandlerInfo + 1); + HandlerInfo->ExtractDecodeHandlerTable = (EXTRACT_GUIDED_SECTION_DECODE_HANDLER *)( + (UINT8 *)HandlerInfo->ExtractHandlerGuidTable + + PcdGet32 (PcdMaximumGuidedExtractHandler) * sizeof (GUID) + ); + HandlerInfo->ExtractGetInfoHandlerTable = (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER *)( + (UINT8 *)HandlerInfo->ExtractDecodeHandlerTable + + PcdGet32 (PcdMaximumGuidedExtractHandler) * + sizeof (EXTRACT_GUIDED_SECTION_DECODE_HANDLER) + ); *InfoPointer = HandlerInfo; return RETURN_SUCCESS; } @@ -110,8 +110,8 @@ ExtractGuidedSectionGetGuidList ( OUT GUID **ExtractHandlerGuidTable ) { - RETURN_STATUS Status; - EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo; + RETURN_STATUS Status; + EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo; ASSERT (ExtractHandlerGuidTable != NULL); @@ -164,9 +164,9 @@ ExtractGuidedSectionRegisterHandlers ( IN EXTRACT_GUIDED_SECTION_DECODE_HANDLER DecodeHandler ) { - UINT32 Index; - RETURN_STATUS Status; - EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo; + UINT32 Index; + RETURN_STATUS Status; + EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo; // // Check input parameter @@ -187,13 +187,13 @@ ExtractGuidedSectionRegisterHandlers ( // Search the match registered GetInfo handler for the input guided section. // ASSERT (HandlerInfo != NULL); - for (Index = 0; Index < HandlerInfo->NumberOfExtractHandler; Index ++) { + for (Index = 0; Index < HandlerInfo->NumberOfExtractHandler; Index++) { if (CompareGuid (HandlerInfo->ExtractHandlerGuidTable + Index, SectionGuid)) { // // If the guided handler has been registered before, only update its handler. // - HandlerInfo->ExtractDecodeHandlerTable [Index] = DecodeHandler; - HandlerInfo->ExtractGetInfoHandlerTable [Index] = GetInfoHandler; + HandlerInfo->ExtractDecodeHandlerTable[Index] = DecodeHandler; + HandlerInfo->ExtractGetInfoHandlerTable[Index] = GetInfoHandler; return RETURN_SUCCESS; } } @@ -209,8 +209,8 @@ ExtractGuidedSectionRegisterHandlers ( // Register new Handler and guid value. // CopyGuid (HandlerInfo->ExtractHandlerGuidTable + HandlerInfo->NumberOfExtractHandler, SectionGuid); - HandlerInfo->ExtractDecodeHandlerTable [HandlerInfo->NumberOfExtractHandler] = DecodeHandler; - HandlerInfo->ExtractGetInfoHandlerTable [HandlerInfo->NumberOfExtractHandler++] = GetInfoHandler; + HandlerInfo->ExtractDecodeHandlerTable[HandlerInfo->NumberOfExtractHandler] = DecodeHandler; + HandlerInfo->ExtractGetInfoHandlerTable[HandlerInfo->NumberOfExtractHandler++] = GetInfoHandler; return RETURN_SUCCESS; } @@ -258,10 +258,10 @@ ExtractGuidedSectionGetInfo ( OUT UINT16 *SectionAttribute ) { - UINT32 Index; - RETURN_STATUS Status; - EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo; - EFI_GUID *SectionDefinitionGuid; + UINT32 Index; + RETURN_STATUS Status; + EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo; + EFI_GUID *SectionDefinitionGuid; // // Check input parameter @@ -280,26 +280,26 @@ ExtractGuidedSectionGetInfo ( } if (IS_SECTION2 (InputSection)) { - SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION2 *) InputSection)->SectionDefinitionGuid); + SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION2 *)InputSection)->SectionDefinitionGuid); } else { - SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid); + SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION *)InputSection)->SectionDefinitionGuid); } // // Search the match registered GetInfo handler for the input guided section. // ASSERT (HandlerInfo != NULL); - for (Index = 0; Index < HandlerInfo->NumberOfExtractHandler; Index ++) { + for (Index = 0; Index < HandlerInfo->NumberOfExtractHandler; Index++) { if (CompareGuid (HandlerInfo->ExtractHandlerGuidTable + Index, SectionDefinitionGuid)) { // // Call the match handler to get information for the input section data. // - return HandlerInfo->ExtractGetInfoHandlerTable [Index] ( - InputSection, - OutputBufferSize, - ScratchBufferSize, - SectionAttribute - ); + return HandlerInfo->ExtractGetInfoHandlerTable[Index]( + InputSection, + OutputBufferSize, + ScratchBufferSize, + SectionAttribute + ); } } @@ -353,10 +353,10 @@ ExtractGuidedSectionDecode ( OUT UINT32 *AuthenticationStatus ) { - UINT32 Index; - RETURN_STATUS Status; - EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo; - EFI_GUID *SectionDefinitionGuid; + UINT32 Index; + RETURN_STATUS Status; + EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo; + EFI_GUID *SectionDefinitionGuid; // // Check input parameter @@ -374,26 +374,26 @@ ExtractGuidedSectionDecode ( } if (IS_SECTION2 (InputSection)) { - SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION2 *) InputSection)->SectionDefinitionGuid); + SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION2 *)InputSection)->SectionDefinitionGuid); } else { - SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid); + SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION *)InputSection)->SectionDefinitionGuid); } // // Search the match registered Extract handler for the input guided section. // ASSERT (HandlerInfo != NULL); - for (Index = 0; Index < HandlerInfo->NumberOfExtractHandler; Index ++) { + for (Index = 0; Index < HandlerInfo->NumberOfExtractHandler; Index++) { if (CompareGuid (HandlerInfo->ExtractHandlerGuidTable + Index, SectionDefinitionGuid)) { // // Call the match handler to extract raw data for the input guided section. // - return HandlerInfo->ExtractDecodeHandlerTable [Index] ( - InputSection, - OutputBuffer, - ScratchBuffer, - AuthenticationStatus - ); + return HandlerInfo->ExtractDecodeHandlerTable[Index]( + InputSection, + OutputBuffer, + ScratchBuffer, + AuthenticationStatus + ); } } @@ -438,9 +438,9 @@ ExtractGuidedSectionGetHandlers ( OUT EXTRACT_GUIDED_SECTION_DECODE_HANDLER *DecodeHandler OPTIONAL ) { - UINT32 Index; - RETURN_STATUS Status; - EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo; + UINT32 Index; + RETURN_STATUS Status; + EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo; // // Check input parameter @@ -459,20 +459,22 @@ ExtractGuidedSectionGetHandlers ( // Search the match registered GetInfo handler for the input guided section. // ASSERT (HandlerInfo != NULL); - for (Index = 0; Index < HandlerInfo->NumberOfExtractHandler; Index ++) { + for (Index = 0; Index < HandlerInfo->NumberOfExtractHandler; Index++) { if (CompareGuid (HandlerInfo->ExtractHandlerGuidTable + Index, SectionGuid)) { - // // If the guided handler has been registered before, then return the registered handlers. // if (GetInfoHandler != NULL) { *GetInfoHandler = HandlerInfo->ExtractGetInfoHandlerTable[Index]; } + if (DecodeHandler != NULL) { *DecodeHandler = HandlerInfo->ExtractDecodeHandlerTable[Index]; } + return RETURN_SUCCESS; } } + return RETURN_NOT_FOUND; } diff --git a/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicInternal.h b/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicInternal.h index 79b2eb3..3225d3b 100644 --- a/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicInternal.h +++ b/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsicInternal.h @@ -10,8 +10,6 @@ #ifndef __BASEIOLIB_INTRINSIC_INTERNAL_H_ #define __BASEIOLIB_INTRINSIC_INTERNAL_H_ - - #include #include diff --git a/MdePkg/Library/BaseIoLibIntrinsic/IoHighLevel.c b/MdePkg/Library/BaseIoLibIntrinsic/IoHighLevel.c index 559f569..f01e4b5 100644 --- a/MdePkg/Library/BaseIoLibIntrinsic/IoHighLevel.c +++ b/MdePkg/Library/BaseIoLibIntrinsic/IoHighLevel.c @@ -38,11 +38,11 @@ UINT8 EFIAPI IoOr8 ( - IN UINTN Port, - IN UINT8 OrData + IN UINTN Port, + IN UINT8 OrData ) { - return IoWrite8 (Port, (UINT8) (IoRead8 (Port) | OrData)); + return IoWrite8 (Port, (UINT8)(IoRead8 (Port) | OrData)); } /** @@ -66,11 +66,11 @@ IoOr8 ( UINT8 EFIAPI IoAnd8 ( - IN UINTN Port, - IN UINT8 AndData + IN UINTN Port, + IN UINT8 AndData ) { - return IoWrite8 (Port, (UINT8) (IoRead8 (Port) & AndData)); + return IoWrite8 (Port, (UINT8)(IoRead8 (Port) & AndData)); } /** @@ -96,12 +96,12 @@ IoAnd8 ( UINT8 EFIAPI IoAndThenOr8 ( - IN UINTN Port, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Port, + IN UINT8 AndData, + IN UINT8 OrData ) { - return IoWrite8 (Port, (UINT8) ((IoRead8 (Port) & AndData) | OrData)); + return IoWrite8 (Port, (UINT8)((IoRead8 (Port) & AndData) | OrData)); } /** @@ -127,9 +127,9 @@ IoAndThenOr8 ( UINT8 EFIAPI IoBitFieldRead8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead8 (IoRead8 (Port), StartBit, EndBit); @@ -161,10 +161,10 @@ IoBitFieldRead8 ( UINT8 EFIAPI IoBitFieldWrite8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) { return IoWrite8 ( @@ -202,10 +202,10 @@ IoBitFieldWrite8 ( UINT8 EFIAPI IoBitFieldOr8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) { return IoWrite8 ( @@ -243,10 +243,10 @@ IoBitFieldOr8 ( UINT8 EFIAPI IoBitFieldAnd8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ) { return IoWrite8 ( @@ -288,11 +288,11 @@ IoBitFieldAnd8 ( UINT8 EFIAPI IoBitFieldAndThenOr8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) { return IoWrite8 ( @@ -323,11 +323,11 @@ IoBitFieldAndThenOr8 ( UINT16 EFIAPI IoOr16 ( - IN UINTN Port, - IN UINT16 OrData + IN UINTN Port, + IN UINT16 OrData ) { - return IoWrite16 (Port, (UINT16) (IoRead16 (Port) | OrData)); + return IoWrite16 (Port, (UINT16)(IoRead16 (Port) | OrData)); } /** @@ -352,11 +352,11 @@ IoOr16 ( UINT16 EFIAPI IoAnd16 ( - IN UINTN Port, - IN UINT16 AndData + IN UINTN Port, + IN UINT16 AndData ) { - return IoWrite16 (Port, (UINT16) (IoRead16 (Port) & AndData)); + return IoWrite16 (Port, (UINT16)(IoRead16 (Port) & AndData)); } /** @@ -383,12 +383,12 @@ IoAnd16 ( UINT16 EFIAPI IoAndThenOr16 ( - IN UINTN Port, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Port, + IN UINT16 AndData, + IN UINT16 OrData ) { - return IoWrite16 (Port, (UINT16) ((IoRead16 (Port) & AndData) | OrData)); + return IoWrite16 (Port, (UINT16)((IoRead16 (Port) & AndData) | OrData)); } /** @@ -415,9 +415,9 @@ IoAndThenOr16 ( UINT16 EFIAPI IoBitFieldRead16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead16 (IoRead16 (Port), StartBit, EndBit); @@ -451,10 +451,10 @@ IoBitFieldRead16 ( UINT16 EFIAPI IoBitFieldWrite16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ) { return IoWrite16 ( @@ -493,10 +493,10 @@ IoBitFieldWrite16 ( UINT16 EFIAPI IoBitFieldOr16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ) { return IoWrite16 ( @@ -535,10 +535,10 @@ IoBitFieldOr16 ( UINT16 EFIAPI IoBitFieldAnd16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ) { return IoWrite16 ( @@ -581,11 +581,11 @@ IoBitFieldAnd16 ( UINT16 EFIAPI IoBitFieldAndThenOr16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ) { return IoWrite16 ( @@ -616,8 +616,8 @@ IoBitFieldAndThenOr16 ( UINT32 EFIAPI IoOr32 ( - IN UINTN Port, - IN UINT32 OrData + IN UINTN Port, + IN UINT32 OrData ) { return IoWrite32 (Port, IoRead32 (Port) | OrData); @@ -645,8 +645,8 @@ IoOr32 ( UINT32 EFIAPI IoAnd32 ( - IN UINTN Port, - IN UINT32 AndData + IN UINTN Port, + IN UINT32 AndData ) { return IoWrite32 (Port, IoRead32 (Port) & AndData); @@ -676,9 +676,9 @@ IoAnd32 ( UINT32 EFIAPI IoAndThenOr32 ( - IN UINTN Port, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Port, + IN UINT32 AndData, + IN UINT32 OrData ) { return IoWrite32 (Port, (IoRead32 (Port) & AndData) | OrData); @@ -708,9 +708,9 @@ IoAndThenOr32 ( UINT32 EFIAPI IoBitFieldRead32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead32 (IoRead32 (Port), StartBit, EndBit); @@ -744,10 +744,10 @@ IoBitFieldRead32 ( UINT32 EFIAPI IoBitFieldWrite32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { return IoWrite32 ( @@ -786,10 +786,10 @@ IoBitFieldWrite32 ( UINT32 EFIAPI IoBitFieldOr32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { return IoWrite32 ( @@ -828,10 +828,10 @@ IoBitFieldOr32 ( UINT32 EFIAPI IoBitFieldAnd32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { return IoWrite32 ( @@ -874,11 +874,11 @@ IoBitFieldAnd32 ( UINT32 EFIAPI IoBitFieldAndThenOr32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { return IoWrite32 ( @@ -909,8 +909,8 @@ IoBitFieldAndThenOr32 ( UINT64 EFIAPI IoOr64 ( - IN UINTN Port, - IN UINT64 OrData + IN UINTN Port, + IN UINT64 OrData ) { return IoWrite64 (Port, IoRead64 (Port) | OrData); @@ -938,8 +938,8 @@ IoOr64 ( UINT64 EFIAPI IoAnd64 ( - IN UINTN Port, - IN UINT64 AndData + IN UINTN Port, + IN UINT64 AndData ) { return IoWrite64 (Port, IoRead64 (Port) & AndData); @@ -969,9 +969,9 @@ IoAnd64 ( UINT64 EFIAPI IoAndThenOr64 ( - IN UINTN Port, - IN UINT64 AndData, - IN UINT64 OrData + IN UINTN Port, + IN UINT64 AndData, + IN UINT64 OrData ) { return IoWrite64 (Port, (IoRead64 (Port) & AndData) | OrData); @@ -1001,9 +1001,9 @@ IoAndThenOr64 ( UINT64 EFIAPI IoBitFieldRead64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead64 (IoRead64 (Port), StartBit, EndBit); @@ -1037,10 +1037,10 @@ IoBitFieldRead64 ( UINT64 EFIAPI IoBitFieldWrite64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 Value + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 Value ) { return IoWrite64 ( @@ -1079,10 +1079,10 @@ IoBitFieldWrite64 ( UINT64 EFIAPI IoBitFieldOr64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 OrData ) { return IoWrite64 ( @@ -1121,10 +1121,10 @@ IoBitFieldOr64 ( UINT64 EFIAPI IoBitFieldAnd64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData ) { return IoWrite64 ( @@ -1167,11 +1167,11 @@ IoBitFieldAnd64 ( UINT64 EFIAPI IoBitFieldAndThenOr64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData, - IN UINT64 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData, + IN UINT64 OrData ) { return IoWrite64 ( @@ -1201,11 +1201,11 @@ IoBitFieldAndThenOr64 ( UINT8 EFIAPI MmioOr8 ( - IN UINTN Address, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 OrData ) { - return MmioWrite8 (Address, (UINT8) (MmioRead8 (Address) | OrData)); + return MmioWrite8 (Address, (UINT8)(MmioRead8 (Address) | OrData)); } /** @@ -1229,11 +1229,11 @@ MmioOr8 ( UINT8 EFIAPI MmioAnd8 ( - IN UINTN Address, - IN UINT8 AndData + IN UINTN Address, + IN UINT8 AndData ) { - return MmioWrite8 (Address, (UINT8) (MmioRead8 (Address) & AndData)); + return MmioWrite8 (Address, (UINT8)(MmioRead8 (Address) & AndData)); } /** @@ -1260,12 +1260,12 @@ MmioAnd8 ( UINT8 EFIAPI MmioAndThenOr8 ( - IN UINTN Address, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 AndData, + IN UINT8 OrData ) { - return MmioWrite8 (Address, (UINT8) ((MmioRead8 (Address) & AndData) | OrData)); + return MmioWrite8 (Address, (UINT8)((MmioRead8 (Address) & AndData) | OrData)); } /** @@ -1291,9 +1291,9 @@ MmioAndThenOr8 ( UINT8 EFIAPI MmioBitFieldRead8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead8 (MmioRead8 (Address), StartBit, EndBit); @@ -1325,10 +1325,10 @@ MmioBitFieldRead8 ( UINT8 EFIAPI MmioBitFieldWrite8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) { return MmioWrite8 ( @@ -1367,10 +1367,10 @@ MmioBitFieldWrite8 ( UINT8 EFIAPI MmioBitFieldOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) { return MmioWrite8 ( @@ -1409,10 +1409,10 @@ MmioBitFieldOr8 ( UINT8 EFIAPI MmioBitFieldAnd8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ) { return MmioWrite8 ( @@ -1454,11 +1454,11 @@ MmioBitFieldAnd8 ( UINT8 EFIAPI MmioBitFieldAndThenOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) { return MmioWrite8 ( @@ -1489,11 +1489,11 @@ MmioBitFieldAndThenOr8 ( UINT16 EFIAPI MmioOr16 ( - IN UINTN Address, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 OrData ) { - return MmioWrite16 (Address, (UINT16) (MmioRead16 (Address) | OrData)); + return MmioWrite16 (Address, (UINT16)(MmioRead16 (Address) | OrData)); } /** @@ -1518,11 +1518,11 @@ MmioOr16 ( UINT16 EFIAPI MmioAnd16 ( - IN UINTN Address, - IN UINT16 AndData + IN UINTN Address, + IN UINT16 AndData ) { - return MmioWrite16 (Address, (UINT16) (MmioRead16 (Address) & AndData)); + return MmioWrite16 (Address, (UINT16)(MmioRead16 (Address) & AndData)); } /** @@ -1549,12 +1549,12 @@ MmioAnd16 ( UINT16 EFIAPI MmioAndThenOr16 ( - IN UINTN Address, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 AndData, + IN UINT16 OrData ) { - return MmioWrite16 (Address, (UINT16) ((MmioRead16 (Address) & AndData) | OrData)); + return MmioWrite16 (Address, (UINT16)((MmioRead16 (Address) & AndData) | OrData)); } /** @@ -1581,9 +1581,9 @@ MmioAndThenOr16 ( UINT16 EFIAPI MmioBitFieldRead16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead16 (MmioRead16 (Address), StartBit, EndBit); @@ -1616,10 +1616,10 @@ MmioBitFieldRead16 ( UINT16 EFIAPI MmioBitFieldWrite16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ) { return MmioWrite16 ( @@ -1659,10 +1659,10 @@ MmioBitFieldWrite16 ( UINT16 EFIAPI MmioBitFieldOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ) { return MmioWrite16 ( @@ -1702,10 +1702,10 @@ MmioBitFieldOr16 ( UINT16 EFIAPI MmioBitFieldAnd16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ) { return MmioWrite16 ( @@ -1748,11 +1748,11 @@ MmioBitFieldAnd16 ( UINT16 EFIAPI MmioBitFieldAndThenOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ) { return MmioWrite16 ( @@ -1783,8 +1783,8 @@ MmioBitFieldAndThenOr16 ( UINT32 EFIAPI MmioOr32 ( - IN UINTN Address, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 OrData ) { return MmioWrite32 (Address, MmioRead32 (Address) | OrData); @@ -1812,8 +1812,8 @@ MmioOr32 ( UINT32 EFIAPI MmioAnd32 ( - IN UINTN Address, - IN UINT32 AndData + IN UINTN Address, + IN UINT32 AndData ) { return MmioWrite32 (Address, MmioRead32 (Address) & AndData); @@ -1843,9 +1843,9 @@ MmioAnd32 ( UINT32 EFIAPI MmioAndThenOr32 ( - IN UINTN Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 AndData, + IN UINT32 OrData ) { return MmioWrite32 (Address, (MmioRead32 (Address) & AndData) | OrData); @@ -1875,9 +1875,9 @@ MmioAndThenOr32 ( UINT32 EFIAPI MmioBitFieldRead32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead32 (MmioRead32 (Address), StartBit, EndBit); @@ -1910,10 +1910,10 @@ MmioBitFieldRead32 ( UINT32 EFIAPI MmioBitFieldWrite32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { return MmioWrite32 ( @@ -1953,10 +1953,10 @@ MmioBitFieldWrite32 ( UINT32 EFIAPI MmioBitFieldOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { return MmioWrite32 ( @@ -1996,10 +1996,10 @@ MmioBitFieldOr32 ( UINT32 EFIAPI MmioBitFieldAnd32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { return MmioWrite32 ( @@ -2042,11 +2042,11 @@ MmioBitFieldAnd32 ( UINT32 EFIAPI MmioBitFieldAndThenOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { return MmioWrite32 ( @@ -2077,8 +2077,8 @@ MmioBitFieldAndThenOr32 ( UINT64 EFIAPI MmioOr64 ( - IN UINTN Address, - IN UINT64 OrData + IN UINTN Address, + IN UINT64 OrData ) { return MmioWrite64 (Address, MmioRead64 (Address) | OrData); @@ -2106,8 +2106,8 @@ MmioOr64 ( UINT64 EFIAPI MmioAnd64 ( - IN UINTN Address, - IN UINT64 AndData + IN UINTN Address, + IN UINT64 AndData ) { return MmioWrite64 (Address, MmioRead64 (Address) & AndData); @@ -2137,9 +2137,9 @@ MmioAnd64 ( UINT64 EFIAPI MmioAndThenOr64 ( - IN UINTN Address, - IN UINT64 AndData, - IN UINT64 OrData + IN UINTN Address, + IN UINT64 AndData, + IN UINT64 OrData ) { return MmioWrite64 (Address, (MmioRead64 (Address) & AndData) | OrData); @@ -2169,9 +2169,9 @@ MmioAndThenOr64 ( UINT64 EFIAPI MmioBitFieldRead64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead64 (MmioRead64 (Address), StartBit, EndBit); @@ -2204,10 +2204,10 @@ MmioBitFieldRead64 ( UINT64 EFIAPI MmioBitFieldWrite64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 Value ) { return MmioWrite64 ( @@ -2247,10 +2247,10 @@ MmioBitFieldWrite64 ( UINT64 EFIAPI MmioBitFieldOr64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 OrData ) { return MmioWrite64 ( @@ -2290,10 +2290,10 @@ MmioBitFieldOr64 ( UINT64 EFIAPI MmioBitFieldAnd64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData ) { return MmioWrite64 ( @@ -2336,11 +2336,11 @@ MmioBitFieldAnd64 ( UINT64 EFIAPI MmioBitFieldAndThenOr64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData, - IN UINT64 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData, + IN UINT64 OrData ) { return MmioWrite64 ( diff --git a/MdePkg/Library/BaseIoLibIntrinsic/IoLib.c b/MdePkg/Library/BaseIoLibIntrinsic/IoLib.c index d0d7044..9d42e21 100644 --- a/MdePkg/Library/BaseIoLibIntrinsic/IoLib.c +++ b/MdePkg/Library/BaseIoLibIntrinsic/IoLib.c @@ -26,7 +26,7 @@ UINT64 EFIAPI IoRead64 ( - IN UINTN Port + IN UINTN Port ) { ASSERT (FALSE); @@ -52,15 +52,14 @@ IoRead64 ( UINT64 EFIAPI IoWrite64 ( - IN UINTN Port, - IN UINT64 Value + IN UINTN Port, + IN UINT64 Value ) { ASSERT (FALSE); return 0; } - /** Reads an 8-bit MMIO register. @@ -78,18 +77,19 @@ IoWrite64 ( UINT8 EFIAPI MmioRead8 ( - IN UINTN Address + IN UINTN Address ) { - UINT8 Value; - BOOLEAN Flag; + UINT8 Value; + BOOLEAN Flag; Flag = FilterBeforeMmIoRead (FilterWidth8, Address, &Value); if (Flag) { MemoryFence (); - Value = *(volatile UINT8*)Address; + Value = *(volatile UINT8 *)Address; MemoryFence (); } + FilterAfterMmIoRead (FilterWidth8, Address, &Value); return Value; @@ -113,18 +113,19 @@ MmioRead8 ( UINT8 EFIAPI MmioWrite8 ( - IN UINTN Address, - IN UINT8 Value + IN UINTN Address, + IN UINT8 Value ) { - BOOLEAN Flag; + BOOLEAN Flag; Flag = FilterBeforeMmIoWrite (FilterWidth8, Address, &Value); if (Flag) { MemoryFence (); - *(volatile UINT8*)Address = Value; + *(volatile UINT8 *)Address = Value; MemoryFence (); } + FilterAfterMmIoWrite (FilterWidth8, Address, &Value); return Value; @@ -148,19 +149,20 @@ MmioWrite8 ( UINT16 EFIAPI MmioRead16 ( - IN UINTN Address + IN UINTN Address ) { - UINT16 Value; - BOOLEAN Flag; + UINT16 Value; + BOOLEAN Flag; ASSERT ((Address & 1) == 0); Flag = FilterBeforeMmIoRead (FilterWidth16, Address, &Value); if (Flag) { MemoryFence (); - Value = *(volatile UINT16*)Address; + Value = *(volatile UINT16 *)Address; MemoryFence (); } + FilterAfterMmIoRead (FilterWidth16, Address, &Value); return Value; @@ -185,20 +187,21 @@ MmioRead16 ( UINT16 EFIAPI MmioWrite16 ( - IN UINTN Address, - IN UINT16 Value + IN UINTN Address, + IN UINT16 Value ) { - BOOLEAN Flag; + BOOLEAN Flag; ASSERT ((Address & 1) == 0); Flag = FilterBeforeMmIoWrite (FilterWidth16, Address, &Value); if (Flag) { MemoryFence (); - *(volatile UINT16*)Address = Value; + *(volatile UINT16 *)Address = Value; MemoryFence (); } + FilterAfterMmIoWrite (FilterWidth16, Address, &Value); return Value; @@ -222,20 +225,21 @@ MmioWrite16 ( UINT32 EFIAPI MmioRead32 ( - IN UINTN Address + IN UINTN Address ) { - UINT32 Value; - BOOLEAN Flag; + UINT32 Value; + BOOLEAN Flag; ASSERT ((Address & 3) == 0); Flag = FilterBeforeMmIoRead (FilterWidth32, Address, &Value); if (Flag) { MemoryFence (); - Value = *(volatile UINT32*)Address; + Value = *(volatile UINT32 *)Address; MemoryFence (); } + FilterAfterMmIoRead (FilterWidth32, Address, &Value); return Value; @@ -260,20 +264,21 @@ MmioRead32 ( UINT32 EFIAPI MmioWrite32 ( - IN UINTN Address, - IN UINT32 Value + IN UINTN Address, + IN UINT32 Value ) { - BOOLEAN Flag; + BOOLEAN Flag; ASSERT ((Address & 3) == 0); Flag = FilterBeforeMmIoWrite (FilterWidth32, Address, &Value); if (Flag) { MemoryFence (); - *(volatile UINT32*)Address = Value; + *(volatile UINT32 *)Address = Value; MemoryFence (); } + FilterAfterMmIoWrite (FilterWidth32, Address, &Value); return Value; @@ -297,20 +302,21 @@ MmioWrite32 ( UINT64 EFIAPI MmioRead64 ( - IN UINTN Address + IN UINTN Address ) { - UINT64 Value; - BOOLEAN Flag; + UINT64 Value; + BOOLEAN Flag; ASSERT ((Address & 7) == 0); Flag = FilterBeforeMmIoRead (FilterWidth64, Address, &Value); if (Flag) { MemoryFence (); - Value = *(volatile UINT64*)Address; + Value = *(volatile UINT64 *)Address; MemoryFence (); } + FilterAfterMmIoRead (FilterWidth64, Address, &Value); return Value; @@ -333,22 +339,22 @@ MmioRead64 ( UINT64 EFIAPI MmioWrite64 ( - IN UINTN Address, - IN UINT64 Value + IN UINTN Address, + IN UINT64 Value ) { - BOOLEAN Flag; + BOOLEAN Flag; ASSERT ((Address & 7) == 0); Flag = FilterBeforeMmIoWrite (FilterWidth64, Address, &Value); if (Flag) { MemoryFence (); - *(volatile UINT64*)Address = Value; + *(volatile UINT64 *)Address = Value; MemoryFence (); } + FilterAfterMmIoWrite (FilterWidth64, Address, &Value); return Value; } - diff --git a/MdePkg/Library/BaseIoLibIntrinsic/IoLibArmVirt.c b/MdePkg/Library/BaseIoLibIntrinsic/IoLibArmVirt.c index 6140840..6360586 100644 --- a/MdePkg/Library/BaseIoLibIntrinsic/IoLibArmVirt.c +++ b/MdePkg/Library/BaseIoLibIntrinsic/IoLibArmVirt.c @@ -27,7 +27,7 @@ UINT8 EFIAPI MmioRead8Internal ( - IN UINTN Address + IN UINTN Address ); /** @@ -44,8 +44,8 @@ MmioRead8Internal ( VOID EFIAPI MmioWrite8Internal ( - IN UINTN Address, - IN UINT8 Value + IN UINTN Address, + IN UINT8 Value ); /** @@ -63,7 +63,7 @@ MmioWrite8Internal ( UINT16 EFIAPI MmioRead16Internal ( - IN UINTN Address + IN UINTN Address ); /** @@ -80,8 +80,8 @@ MmioRead16Internal ( VOID EFIAPI MmioWrite16Internal ( - IN UINTN Address, - IN UINT16 Value + IN UINTN Address, + IN UINT16 Value ); /** @@ -99,7 +99,7 @@ MmioWrite16Internal ( UINT32 EFIAPI MmioRead32Internal ( - IN UINTN Address + IN UINTN Address ); /** @@ -116,8 +116,8 @@ MmioRead32Internal ( VOID EFIAPI MmioWrite32Internal ( - IN UINTN Address, - IN UINT32 Value + IN UINTN Address, + IN UINT32 Value ); /** @@ -135,7 +135,7 @@ MmioWrite32Internal ( UINT64 EFIAPI MmioRead64Internal ( - IN UINTN Address + IN UINTN Address ); /** @@ -152,8 +152,8 @@ MmioRead64Internal ( VOID EFIAPI MmioWrite64Internal ( - IN UINTN Address, - IN UINT64 Value + IN UINTN Address, + IN UINT64 Value ); /** @@ -173,7 +173,7 @@ MmioWrite64Internal ( UINT8 EFIAPI IoRead8 ( - IN UINTN Port + IN UINTN Port ) { ASSERT (FALSE); @@ -198,8 +198,8 @@ IoRead8 ( UINT8 EFIAPI IoWrite8 ( - IN UINTN Port, - IN UINT8 Value + IN UINTN Port, + IN UINT8 Value ) { ASSERT (FALSE); @@ -223,7 +223,7 @@ IoWrite8 ( UINT16 EFIAPI IoRead16 ( - IN UINTN Port + IN UINTN Port ) { ASSERT (FALSE); @@ -248,8 +248,8 @@ IoRead16 ( UINT16 EFIAPI IoWrite16 ( - IN UINTN Port, - IN UINT16 Value + IN UINTN Port, + IN UINT16 Value ) { ASSERT (FALSE); @@ -273,7 +273,7 @@ IoWrite16 ( UINT32 EFIAPI IoRead32 ( - IN UINTN Port + IN UINTN Port ) { ASSERT (FALSE); @@ -298,8 +298,8 @@ IoRead32 ( UINT32 EFIAPI IoWrite32 ( - IN UINTN Port, - IN UINT32 Value + IN UINTN Port, + IN UINT32 Value ) { ASSERT (FALSE); @@ -324,7 +324,7 @@ IoWrite32 ( UINT64 EFIAPI IoRead64 ( - IN UINTN Port + IN UINTN Port ) { ASSERT (FALSE); @@ -350,8 +350,8 @@ IoRead64 ( UINT64 EFIAPI IoWrite64 ( - IN UINTN Port, - IN UINT64 Value + IN UINTN Port, + IN UINT64 Value ) { ASSERT (FALSE); @@ -378,9 +378,9 @@ IoWrite64 ( VOID EFIAPI IoReadFifo8 ( - IN UINTN Port, - IN UINTN Count, - OUT VOID *Buffer + IN UINTN Port, + IN UINTN Count, + OUT VOID *Buffer ) { ASSERT (FALSE); @@ -406,9 +406,9 @@ IoReadFifo8 ( VOID EFIAPI IoWriteFifo8 ( - IN UINTN Port, - IN UINTN Count, - IN VOID *Buffer + IN UINTN Port, + IN UINTN Count, + IN VOID *Buffer ) { ASSERT (FALSE); @@ -434,9 +434,9 @@ IoWriteFifo8 ( VOID EFIAPI IoReadFifo16 ( - IN UINTN Port, - IN UINTN Count, - OUT VOID *Buffer + IN UINTN Port, + IN UINTN Count, + OUT VOID *Buffer ) { ASSERT (FALSE); @@ -462,9 +462,9 @@ IoReadFifo16 ( VOID EFIAPI IoWriteFifo16 ( - IN UINTN Port, - IN UINTN Count, - IN VOID *Buffer + IN UINTN Port, + IN UINTN Count, + IN VOID *Buffer ) { ASSERT (FALSE); @@ -490,9 +490,9 @@ IoWriteFifo16 ( VOID EFIAPI IoReadFifo32 ( - IN UINTN Port, - IN UINTN Count, - OUT VOID *Buffer + IN UINTN Port, + IN UINTN Count, + OUT VOID *Buffer ) { ASSERT (FALSE); @@ -518,9 +518,9 @@ IoReadFifo32 ( VOID EFIAPI IoWriteFifo32 ( - IN UINTN Port, - IN UINTN Count, - IN VOID *Buffer + IN UINTN Port, + IN UINTN Count, + IN VOID *Buffer ) { ASSERT (FALSE); @@ -543,16 +543,17 @@ IoWriteFifo32 ( UINT8 EFIAPI MmioRead8 ( - IN UINTN Address + IN UINTN Address ) { - UINT8 Value; - BOOLEAN Flag; + UINT8 Value; + BOOLEAN Flag; Flag = FilterBeforeMmIoRead (FilterWidth8, Address, &Value); if (Flag) { Value = MmioRead8Internal (Address); } + FilterAfterMmIoRead (FilterWidth8, Address, &Value); return Value; @@ -574,16 +575,17 @@ MmioRead8 ( UINT8 EFIAPI MmioWrite8 ( - IN UINTN Address, - IN UINT8 Value + IN UINTN Address, + IN UINT8 Value ) { - BOOLEAN Flag; + BOOLEAN Flag; Flag = FilterBeforeMmIoWrite (FilterWidth8, Address, &Value); if (Flag) { MmioWrite8Internal (Address, Value); } + FilterAfterMmIoWrite (FilterWidth8, Address, &Value); return Value; @@ -606,11 +608,11 @@ MmioWrite8 ( UINT16 EFIAPI MmioRead16 ( - IN UINTN Address + IN UINTN Address ) { - BOOLEAN Flag; - UINT16 Value; + BOOLEAN Flag; + UINT16 Value; ASSERT ((Address & 1) == 0); @@ -618,6 +620,7 @@ MmioRead16 ( if (Flag) { Value = MmioRead16Internal (Address); } + FilterAfterMmIoRead (FilterWidth16, Address, &Value); return Value; @@ -639,11 +642,11 @@ MmioRead16 ( UINT16 EFIAPI MmioWrite16 ( - IN UINTN Address, - IN UINT16 Value + IN UINTN Address, + IN UINT16 Value ) { - BOOLEAN Flag; + BOOLEAN Flag; ASSERT ((Address & 1) == 0); @@ -651,6 +654,7 @@ MmioWrite16 ( if (Flag) { MmioWrite16Internal (Address, Value); } + FilterAfterMmIoWrite (FilterWidth16, Address, &Value); return Value; @@ -673,11 +677,11 @@ MmioWrite16 ( UINT32 EFIAPI MmioRead32 ( - IN UINTN Address + IN UINTN Address ) { - BOOLEAN Flag; - UINT32 Value; + BOOLEAN Flag; + UINT32 Value; ASSERT ((Address & 3) == 0); @@ -685,6 +689,7 @@ MmioRead32 ( if (Flag) { Value = MmioRead32Internal (Address); } + FilterAfterMmIoRead (FilterWidth32, Address, &Value); return Value; @@ -706,11 +711,11 @@ MmioRead32 ( UINT32 EFIAPI MmioWrite32 ( - IN UINTN Address, - IN UINT32 Value + IN UINTN Address, + IN UINT32 Value ) { - BOOLEAN Flag; + BOOLEAN Flag; ASSERT ((Address & 3) == 0); @@ -718,6 +723,7 @@ MmioWrite32 ( if (Flag) { MmioWrite32Internal (Address, Value); } + FilterAfterMmIoWrite (FilterWidth32, Address, &Value); return Value; @@ -740,11 +746,11 @@ MmioWrite32 ( UINT64 EFIAPI MmioRead64 ( - IN UINTN Address + IN UINTN Address ) { - BOOLEAN Flag; - UINT64 Value; + BOOLEAN Flag; + UINT64 Value; ASSERT ((Address & 7) == 0); @@ -752,6 +758,7 @@ MmioRead64 ( if (Flag) { Value = MmioRead64Internal (Address); } + FilterAfterMmIoRead (FilterWidth64, Address, &Value); return Value; @@ -773,11 +780,11 @@ MmioRead64 ( UINT64 EFIAPI MmioWrite64 ( - IN UINTN Address, - IN UINT64 Value + IN UINTN Address, + IN UINT64 Value ) { - BOOLEAN Flag; + BOOLEAN Flag; ASSERT ((Address & 7) == 0); @@ -785,6 +792,7 @@ MmioWrite64 ( if (Flag) { MmioWrite64Internal (Address, Value); } + FilterAfterMmIoWrite (FilterWidth64, Address, &Value); return Value; diff --git a/MdePkg/Library/BaseIoLibIntrinsic/IoLibEbc.c b/MdePkg/Library/BaseIoLibIntrinsic/IoLibEbc.c index 98c774f..aa25f81 100644 --- a/MdePkg/Library/BaseIoLibIntrinsic/IoLibEbc.c +++ b/MdePkg/Library/BaseIoLibIntrinsic/IoLibEbc.c @@ -29,7 +29,7 @@ UINT8 EFIAPI IoRead8 ( - IN UINTN Port + IN UINTN Port ) { ASSERT (FALSE); @@ -54,8 +54,8 @@ IoRead8 ( UINT8 EFIAPI IoWrite8 ( - IN UINTN Port, - IN UINT8 Value + IN UINTN Port, + IN UINT8 Value ) { ASSERT (FALSE); @@ -80,7 +80,7 @@ IoWrite8 ( UINT16 EFIAPI IoRead16 ( - IN UINTN Port + IN UINTN Port ) { ASSERT (FALSE); @@ -106,8 +106,8 @@ IoRead16 ( UINT16 EFIAPI IoWrite16 ( - IN UINTN Port, - IN UINT16 Value + IN UINTN Port, + IN UINT16 Value ) { ASSERT (FALSE); @@ -132,7 +132,7 @@ IoWrite16 ( UINT32 EFIAPI IoRead32 ( - IN UINTN Port + IN UINTN Port ) { ASSERT (FALSE); @@ -158,8 +158,8 @@ IoRead32 ( UINT32 EFIAPI IoWrite32 ( - IN UINTN Port, - IN UINT32 Value + IN UINTN Port, + IN UINT32 Value ) { ASSERT (FALSE); @@ -186,9 +186,9 @@ IoWrite32 ( VOID EFIAPI IoReadFifo8 ( - IN UINTN Port, - IN UINTN Count, - OUT VOID *Buffer + IN UINTN Port, + IN UINTN Count, + OUT VOID *Buffer ) { ASSERT (FALSE); @@ -214,9 +214,9 @@ IoReadFifo8 ( VOID EFIAPI IoWriteFifo8 ( - IN UINTN Port, - IN UINTN Count, - IN VOID *Buffer + IN UINTN Port, + IN UINTN Count, + IN VOID *Buffer ) { ASSERT (FALSE); @@ -242,9 +242,9 @@ IoWriteFifo8 ( VOID EFIAPI IoReadFifo16 ( - IN UINTN Port, - IN UINTN Count, - OUT VOID *Buffer + IN UINTN Port, + IN UINTN Count, + OUT VOID *Buffer ) { ASSERT (FALSE); @@ -270,9 +270,9 @@ IoReadFifo16 ( VOID EFIAPI IoWriteFifo16 ( - IN UINTN Port, - IN UINTN Count, - IN VOID *Buffer + IN UINTN Port, + IN UINTN Count, + IN VOID *Buffer ) { ASSERT (FALSE); @@ -298,9 +298,9 @@ IoWriteFifo16 ( VOID EFIAPI IoReadFifo32 ( - IN UINTN Port, - IN UINTN Count, - OUT VOID *Buffer + IN UINTN Port, + IN UINTN Count, + OUT VOID *Buffer ) { ASSERT (FALSE); @@ -326,11 +326,10 @@ IoReadFifo32 ( VOID EFIAPI IoWriteFifo32 ( - IN UINTN Port, - IN UINTN Count, - IN VOID *Buffer + IN UINTN Port, + IN UINTN Count, + IN VOID *Buffer ) { ASSERT (FALSE); } - diff --git a/MdePkg/Library/BaseIoLibIntrinsic/IoLibGcc.c b/MdePkg/Library/BaseIoLibIntrinsic/IoLibGcc.c index ecf9ed6..5c79128 100644 --- a/MdePkg/Library/BaseIoLibIntrinsic/IoLibGcc.c +++ b/MdePkg/Library/BaseIoLibIntrinsic/IoLibGcc.c @@ -15,7 +15,6 @@ **/ - #include "BaseIoLibIntrinsicInternal.h" /** @@ -35,16 +34,17 @@ UINT8 EFIAPI IoRead8 ( - IN UINTN Port + IN UINTN Port ) { - UINT8 Data; - BOOLEAN Flag; + UINT8 Data; + BOOLEAN Flag; Flag = FilterBeforeIoRead (FilterWidth8, Port, &Data); if (Flag) { __asm__ __volatile__ ("inb %w1,%b0" : "=a" (Data) : "d" ((UINT16)Port)); } + FilterAfterIoRead (FilterWidth8, Port, &Data); return Data; @@ -68,19 +68,20 @@ IoRead8 ( UINT8 EFIAPI IoWrite8 ( - IN UINTN Port, - IN UINT8 Value + IN UINTN Port, + IN UINT8 Value ) { - BOOLEAN Flag; + BOOLEAN Flag; Flag = FilterBeforeIoWrite (FilterWidth8, Port, &Value); if (Flag) { __asm__ __volatile__ ("outb %b0,%w1" : : "a" (Value), "d" ((UINT16)Port)); } + FilterAfterIoWrite (FilterWidth8, Port, &Value); - return Value;; + return Value; } /** @@ -101,7 +102,7 @@ IoWrite8 ( UINT16 EFIAPI IoRead16 ( - IN UINTN Port + IN UINTN Port ) { UINT16 Data; @@ -111,8 +112,9 @@ IoRead16 ( Flag = FilterBeforeIoRead (FilterWidth16, Port, &Data); if (Flag) { - __asm__ __volatile__ ("inw %w1,%w0" : "=a" (Data) : "d" ((UINT16)Port)); + __asm__ __volatile__ ("inw %w1,%w0" : "=a" (Data) : "d" ((UINT16)Port)); } + FilterAfterIoRead (FilterWidth16, Port, &Data); return Data; @@ -137,12 +139,11 @@ IoRead16 ( UINT16 EFIAPI IoWrite16 ( - IN UINTN Port, - IN UINT16 Value + IN UINTN Port, + IN UINT16 Value ) { - - BOOLEAN Flag; + BOOLEAN Flag; ASSERT ((Port & 1) == 0); @@ -150,9 +151,10 @@ IoWrite16 ( if (Flag) { __asm__ __volatile__ ("outw %w0,%w1" : : "a" (Value), "d" ((UINT16)Port)); } + FilterAfterIoWrite (FilterWidth16, Port, &Value); - return Value;; + return Value; } /** @@ -173,7 +175,7 @@ IoWrite16 ( UINT32 EFIAPI IoRead32 ( - IN UINTN Port + IN UINTN Port ) { UINT32 Data; @@ -185,6 +187,7 @@ IoRead32 ( if (Flag) { __asm__ __volatile__ ("inl %w1,%0" : "=a" (Data) : "d" ((UINT16)Port)); } + FilterAfterIoRead (FilterWidth32, Port, &Data); return Data; @@ -209,8 +212,8 @@ IoRead32 ( UINT32 EFIAPI IoWrite32 ( - IN UINTN Port, - IN UINT32 Value + IN UINTN Port, + IN UINT32 Value ) { BOOLEAN Flag; @@ -221,8 +224,8 @@ IoWrite32 ( if (Flag) { __asm__ __volatile__ ("outl %0,%w1" : : "a" (Value), "d" ((UINT16)Port)); } + FilterAfterIoWrite (FilterWidth32, Port, &Value); return Value; } - diff --git a/MdePkg/Library/BaseIoLibIntrinsic/IoLibMmioBuffer.c b/MdePkg/Library/BaseIoLibIntrinsic/IoLibMmioBuffer.c index 6059bab..ecee7f2 100644 --- a/MdePkg/Library/BaseIoLibIntrinsic/IoLibMmioBuffer.c +++ b/MdePkg/Library/BaseIoLibIntrinsic/IoLibMmioBuffer.c @@ -29,15 +29,15 @@ UINT8 * EFIAPI MmioReadBuffer8 ( - IN UINTN StartAddress, - IN UINTN Length, - OUT UINT8 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT8 *Buffer ) { - UINT8 *ReturnBuffer; + UINT8 *ReturnBuffer; ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ReturnBuffer = Buffer; @@ -73,27 +73,27 @@ MmioReadBuffer8 ( UINT16 * EFIAPI MmioReadBuffer16 ( - IN UINTN StartAddress, - IN UINTN Length, - OUT UINT16 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT16 *Buffer ) { - UINT16 *ReturnBuffer; + UINT16 *ReturnBuffer; ASSERT ((StartAddress & (sizeof (UINT16) - 1)) == 0); ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (UINT16) - 1)) == 0); - ASSERT (((UINTN) Buffer & (sizeof (UINT16) - 1)) == 0); + ASSERT (((UINTN)Buffer & (sizeof (UINT16) - 1)) == 0); ReturnBuffer = Buffer; while (Length != 0) { - *(Buffer++) = MmioRead16 (StartAddress); + *(Buffer++) = MmioRead16 (StartAddress); StartAddress += sizeof (UINT16); - Length -= sizeof (UINT16); + Length -= sizeof (UINT16); } return ReturnBuffer; @@ -124,27 +124,27 @@ MmioReadBuffer16 ( UINT32 * EFIAPI MmioReadBuffer32 ( - IN UINTN StartAddress, - IN UINTN Length, - OUT UINT32 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT32 *Buffer ) { - UINT32 *ReturnBuffer; + UINT32 *ReturnBuffer; ASSERT ((StartAddress & (sizeof (UINT32) - 1)) == 0); ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (UINT32) - 1)) == 0); - ASSERT (((UINTN) Buffer & (sizeof (UINT32) - 1)) == 0); + ASSERT (((UINTN)Buffer & (sizeof (UINT32) - 1)) == 0); ReturnBuffer = Buffer; while (Length != 0) { - *(Buffer++) = MmioRead32 (StartAddress); + *(Buffer++) = MmioRead32 (StartAddress); StartAddress += sizeof (UINT32); - Length -= sizeof (UINT32); + Length -= sizeof (UINT32); } return ReturnBuffer; @@ -175,33 +175,32 @@ MmioReadBuffer32 ( UINT64 * EFIAPI MmioReadBuffer64 ( - IN UINTN StartAddress, - IN UINTN Length, - OUT UINT64 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT64 *Buffer ) { - UINT64 *ReturnBuffer; + UINT64 *ReturnBuffer; ASSERT ((StartAddress & (sizeof (UINT64) - 1)) == 0); ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (UINT64) - 1)) == 0); - ASSERT (((UINTN) Buffer & (sizeof (UINT64) - 1)) == 0); + ASSERT (((UINTN)Buffer & (sizeof (UINT64) - 1)) == 0); ReturnBuffer = Buffer; while (Length != 0) { - *(Buffer++) = MmioRead64 (StartAddress); + *(Buffer++) = MmioRead64 (StartAddress); StartAddress += sizeof (UINT64); - Length -= sizeof (UINT64); + Length -= sizeof (UINT64); } return ReturnBuffer; } - /** Copy data from system memory to the MMIO region by using 8-bit access. @@ -223,24 +222,23 @@ MmioReadBuffer64 ( UINT8 * EFIAPI MmioWriteBuffer8 ( - IN UINTN StartAddress, - IN UINTN Length, - IN CONST UINT8 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT8 *Buffer ) { - VOID* ReturnBuffer; + VOID *ReturnBuffer; ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); - ReturnBuffer = (UINT8 *) Buffer; + ReturnBuffer = (UINT8 *)Buffer; while (Length-- != 0) { - MmioWrite8 (StartAddress++, *(Buffer++)); + MmioWrite8 (StartAddress++, *(Buffer++)); } return ReturnBuffer; - } /** @@ -269,34 +267,33 @@ MmioWriteBuffer8 ( UINT16 * EFIAPI MmioWriteBuffer16 ( - IN UINTN StartAddress, - IN UINTN Length, - IN CONST UINT16 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT16 *Buffer ) { - UINT16 *ReturnBuffer; + UINT16 *ReturnBuffer; ASSERT ((StartAddress & (sizeof (UINT16) - 1)) == 0); ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (UINT16) - 1)) == 0); - ASSERT (((UINTN) Buffer & (sizeof (UINT16) - 1)) == 0); + ASSERT (((UINTN)Buffer & (sizeof (UINT16) - 1)) == 0); - ReturnBuffer = (UINT16 *) Buffer; + ReturnBuffer = (UINT16 *)Buffer; while (Length != 0) { MmioWrite16 (StartAddress, *(Buffer++)); StartAddress += sizeof (UINT16); - Length -= sizeof (UINT16); + Length -= sizeof (UINT16); } return ReturnBuffer; } - /** Copy data from system memory to the MMIO region by using 32-bit access. @@ -323,28 +320,28 @@ MmioWriteBuffer16 ( UINT32 * EFIAPI MmioWriteBuffer32 ( - IN UINTN StartAddress, - IN UINTN Length, - IN CONST UINT32 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT32 *Buffer ) { - UINT32 *ReturnBuffer; + UINT32 *ReturnBuffer; ASSERT ((StartAddress & (sizeof (UINT32) - 1)) == 0); ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (UINT32) - 1)) == 0); - ASSERT (((UINTN) Buffer & (sizeof (UINT32) - 1)) == 0); + ASSERT (((UINTN)Buffer & (sizeof (UINT32) - 1)) == 0); - ReturnBuffer = (UINT32 *) Buffer; + ReturnBuffer = (UINT32 *)Buffer; while (Length != 0) { MmioWrite32 (StartAddress, *(Buffer++)); StartAddress += sizeof (UINT32); - Length -= sizeof (UINT32); + Length -= sizeof (UINT32); } return ReturnBuffer; @@ -376,30 +373,29 @@ MmioWriteBuffer32 ( UINT64 * EFIAPI MmioWriteBuffer64 ( - IN UINTN StartAddress, - IN UINTN Length, - IN CONST UINT64 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT64 *Buffer ) { - UINT64 *ReturnBuffer; + UINT64 *ReturnBuffer; ASSERT ((StartAddress & (sizeof (UINT64) - 1)) == 0); ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (UINT64) - 1)) == 0); - ASSERT (((UINTN) Buffer & (sizeof (UINT64) - 1)) == 0); + ASSERT (((UINTN)Buffer & (sizeof (UINT64) - 1)) == 0); - ReturnBuffer = (UINT64 *) Buffer; + ReturnBuffer = (UINT64 *)Buffer; while (Length != 0) { MmioWrite64 (StartAddress, *(Buffer++)); StartAddress += sizeof (UINT64); - Length -= sizeof (UINT64); + Length -= sizeof (UINT64); } return ReturnBuffer; } - diff --git a/MdePkg/Library/BaseIoLibIntrinsic/IoLibMsc.c b/MdePkg/Library/BaseIoLibIntrinsic/IoLibMsc.c index d2bc5f5..9f225a6 100644 --- a/MdePkg/Library/BaseIoLibIntrinsic/IoLibMsc.c +++ b/MdePkg/Library/BaseIoLibIntrinsic/IoLibMsc.c @@ -13,21 +13,49 @@ **/ - - #include "BaseIoLibIntrinsicInternal.h" // // Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics. // -int _inp (unsigned short port); -unsigned short _inpw (unsigned short port); -unsigned long _inpd (unsigned short port); -int _outp (unsigned short port, int databyte ); -unsigned short _outpw (unsigned short port, unsigned short dataword ); -unsigned long _outpd (unsigned short port, unsigned long dataword ); -void _ReadWriteBarrier (void); +int +_inp ( + unsigned short port + ); + +unsigned short +_inpw ( + unsigned short port + ); + +unsigned long +_inpd ( + unsigned short port + ); + +int +_outp ( + unsigned short port, + int databyte + ); + +unsigned short +_outpw ( + unsigned short port, + unsigned short dataword + ); + +unsigned long +_outpd ( + unsigned short port, + unsigned long dataword + ); + +void +_ReadWriteBarrier ( + void + ); #pragma intrinsic(_inp) #pragma intrinsic(_inpw) @@ -62,11 +90,11 @@ void _ReadWriteBarrier (void); UINT8 EFIAPI IoRead8 ( - IN UINTN Port + IN UINTN Port ) { - UINT8 Value; - BOOLEAN Flag; + UINT8 Value; + BOOLEAN Flag; Flag = FilterBeforeIoRead (FilterWidth8, Port, &Value); if (Flag) { @@ -74,6 +102,7 @@ IoRead8 ( Value = (UINT8)_inp ((UINT16)Port); _ReadWriteBarrier (); } + FilterAfterIoRead (FilterWidth8, Port, &Value); return Value; @@ -97,18 +126,19 @@ IoRead8 ( UINT8 EFIAPI IoWrite8 ( - IN UINTN Port, - IN UINT8 Value + IN UINTN Port, + IN UINT8 Value ) { - BOOLEAN Flag; + BOOLEAN Flag; - Flag = FilterBeforeIoWrite(FilterWidth8, Port, &Value); + Flag = FilterBeforeIoWrite (FilterWidth8, Port, &Value); if (Flag) { _ReadWriteBarrier (); (UINT8)_outp ((UINT16)Port, Value); _ReadWriteBarrier (); } + FilterAfterIoWrite (FilterWidth8, Port, &Value); return Value; @@ -132,11 +162,11 @@ IoWrite8 ( UINT16 EFIAPI IoRead16 ( - IN UINTN Port + IN UINTN Port ) { - UINT16 Value; - BOOLEAN Flag; + UINT16 Value; + BOOLEAN Flag; ASSERT ((Port & 1) == 0); @@ -146,6 +176,7 @@ IoRead16 ( Value = _inpw ((UINT16)Port); _ReadWriteBarrier (); } + FilterBeforeIoRead (FilterWidth16, Port, &Value); return Value; @@ -170,20 +201,21 @@ IoRead16 ( UINT16 EFIAPI IoWrite16 ( - IN UINTN Port, - IN UINT16 Value + IN UINTN Port, + IN UINT16 Value ) { - BOOLEAN Flag; + BOOLEAN Flag; ASSERT ((Port & 1) == 0); - Flag = FilterBeforeIoWrite(FilterWidth16, Port, &Value); + Flag = FilterBeforeIoWrite (FilterWidth16, Port, &Value); if (Flag) { _ReadWriteBarrier (); _outpw ((UINT16)Port, Value); _ReadWriteBarrier (); } + FilterAfterIoWrite (FilterWidth16, Port, &Value); return Value; @@ -207,20 +239,21 @@ IoWrite16 ( UINT32 EFIAPI IoRead32 ( - IN UINTN Port + IN UINTN Port ) { - UINT32 Value; - BOOLEAN Flag; + UINT32 Value; + BOOLEAN Flag; ASSERT ((Port & 3) == 0); - Flag = FilterBeforeIoRead(FilterWidth32, Port, &Value); + Flag = FilterBeforeIoRead (FilterWidth32, Port, &Value); if (Flag) { _ReadWriteBarrier (); Value = _inpd ((UINT16)Port); _ReadWriteBarrier (); } + FilterAfterIoRead (FilterWidth32, Port, &Value); return Value; @@ -245,20 +278,21 @@ IoRead32 ( UINT32 EFIAPI IoWrite32 ( - IN UINTN Port, - IN UINT32 Value + IN UINTN Port, + IN UINT32 Value ) { - BOOLEAN Flag; + BOOLEAN Flag; ASSERT ((Port & 3) == 0); - Flag = FilterBeforeIoWrite(FilterWidth32, Port, &Value); + Flag = FilterBeforeIoWrite (FilterWidth32, Port, &Value); if (Flag) { _ReadWriteBarrier (); _outpd ((UINT16)Port, Value); _ReadWriteBarrier (); } + FilterAfterIoWrite (FilterWidth32, Port, &Value); return Value; diff --git a/MdePkg/Library/BaseIoLibIntrinsic/IoLibNoIo.c b/MdePkg/Library/BaseIoLibIntrinsic/IoLibNoIo.c index 291cd86..c71f45b 100644 --- a/MdePkg/Library/BaseIoLibIntrinsic/IoLibNoIo.c +++ b/MdePkg/Library/BaseIoLibIntrinsic/IoLibNoIo.c @@ -11,7 +11,6 @@ **/ - // // Include common header file for this module. // @@ -34,7 +33,7 @@ UINT8 EFIAPI IoRead8 ( - IN UINTN Port + IN UINTN Port ) { ASSERT (FALSE); @@ -59,8 +58,8 @@ IoRead8 ( UINT8 EFIAPI IoWrite8 ( - IN UINTN Port, - IN UINT8 Value + IN UINTN Port, + IN UINT8 Value ) { ASSERT (FALSE); @@ -84,7 +83,7 @@ IoWrite8 ( UINT16 EFIAPI IoRead16 ( - IN UINTN Port + IN UINTN Port ) { ASSERT (FALSE); @@ -109,8 +108,8 @@ IoRead16 ( UINT16 EFIAPI IoWrite16 ( - IN UINTN Port, - IN UINT16 Value + IN UINTN Port, + IN UINT16 Value ) { ASSERT (FALSE); @@ -134,7 +133,7 @@ IoWrite16 ( UINT32 EFIAPI IoRead32 ( - IN UINTN Port + IN UINTN Port ) { ASSERT (FALSE); @@ -159,8 +158,8 @@ IoRead32 ( UINT32 EFIAPI IoWrite32 ( - IN UINTN Port, - IN UINT32 Value + IN UINTN Port, + IN UINT32 Value ) { ASSERT (FALSE); @@ -185,7 +184,7 @@ IoWrite32 ( UINT64 EFIAPI IoRead64 ( - IN UINTN Port + IN UINTN Port ) { ASSERT (FALSE); @@ -211,8 +210,8 @@ IoRead64 ( UINT64 EFIAPI IoWrite64 ( - IN UINTN Port, - IN UINT64 Value + IN UINTN Port, + IN UINT64 Value ) { ASSERT (FALSE); @@ -239,9 +238,9 @@ IoWrite64 ( VOID EFIAPI IoReadFifo8 ( - IN UINTN Port, - IN UINTN Count, - OUT VOID *Buffer + IN UINTN Port, + IN UINTN Count, + OUT VOID *Buffer ) { ASSERT (FALSE); @@ -267,9 +266,9 @@ IoReadFifo8 ( VOID EFIAPI IoWriteFifo8 ( - IN UINTN Port, - IN UINTN Count, - IN VOID *Buffer + IN UINTN Port, + IN UINTN Count, + IN VOID *Buffer ) { ASSERT (FALSE); @@ -295,9 +294,9 @@ IoWriteFifo8 ( VOID EFIAPI IoReadFifo16 ( - IN UINTN Port, - IN UINTN Count, - OUT VOID *Buffer + IN UINTN Port, + IN UINTN Count, + OUT VOID *Buffer ) { ASSERT (FALSE); @@ -323,9 +322,9 @@ IoReadFifo16 ( VOID EFIAPI IoWriteFifo16 ( - IN UINTN Port, - IN UINTN Count, - IN VOID *Buffer + IN UINTN Port, + IN UINTN Count, + IN VOID *Buffer ) { ASSERT (FALSE); @@ -351,9 +350,9 @@ IoWriteFifo16 ( VOID EFIAPI IoReadFifo32 ( - IN UINTN Port, - IN UINTN Count, - OUT VOID *Buffer + IN UINTN Port, + IN UINTN Count, + OUT VOID *Buffer ) { ASSERT (FALSE); @@ -379,9 +378,9 @@ IoReadFifo32 ( VOID EFIAPI IoWriteFifo32 ( - IN UINTN Port, - IN UINTN Count, - IN VOID *Buffer + IN UINTN Port, + IN UINTN Count, + IN VOID *Buffer ) { ASSERT (FALSE); @@ -404,16 +403,17 @@ IoWriteFifo32 ( UINT8 EFIAPI MmioRead8 ( - IN UINTN Address + IN UINTN Address ) { - UINT8 Value; - BOOLEAN Flag; + UINT8 Value; + BOOLEAN Flag; Flag = FilterBeforeMmIoRead (FilterWidth8, Address, &Value); if (Flag) { - Value = *(volatile UINT8*)Address; + Value = *(volatile UINT8 *)Address; } + FilterAfterMmIoRead (FilterWidth8, Address, &Value); return Value; @@ -435,16 +435,17 @@ MmioRead8 ( UINT8 EFIAPI MmioWrite8 ( - IN UINTN Address, - IN UINT8 Value + IN UINTN Address, + IN UINT8 Value ) { - BOOLEAN Flag; + BOOLEAN Flag; Flag = FilterBeforeMmIoWrite (FilterWidth8, Address, &Value); if (Flag) { - *(volatile UINT8*)Address = Value; + *(volatile UINT8 *)Address = Value; } + FilterAfterMmIoWrite (FilterWidth8, Address, &Value); return Value; @@ -467,18 +468,19 @@ MmioWrite8 ( UINT16 EFIAPI MmioRead16 ( - IN UINTN Address + IN UINTN Address ) { - UINT16 Value; - BOOLEAN Flag; + UINT16 Value; + BOOLEAN Flag; ASSERT ((Address & 1) == 0); Flag = FilterBeforeMmIoRead (FilterWidth16, Address, &Value); if (Flag) { - Value = *(volatile UINT16*)Address; + Value = *(volatile UINT16 *)Address; } + FilterAfterMmIoRead (FilterWidth16, Address, &Value); return Value; @@ -500,18 +502,19 @@ MmioRead16 ( UINT16 EFIAPI MmioWrite16 ( - IN UINTN Address, - IN UINT16 Value + IN UINTN Address, + IN UINT16 Value ) { - BOOLEAN Flag; + BOOLEAN Flag; ASSERT ((Address & 1) == 0); Flag = FilterBeforeMmIoWrite (FilterWidth16, Address, &Value); if (Flag) { - *(volatile UINT16*)Address = Value; + *(volatile UINT16 *)Address = Value; } + FilterAfterMmIoWrite (FilterWidth16, Address, &Value); return Value; @@ -534,18 +537,19 @@ MmioWrite16 ( UINT32 EFIAPI MmioRead32 ( - IN UINTN Address + IN UINTN Address ) { - UINT32 Value; - BOOLEAN Flag; + UINT32 Value; + BOOLEAN Flag; ASSERT ((Address & 3) == 0); Flag = FilterBeforeMmIoRead (FilterWidth32, Address, &Value); if (Flag) { - Value = *(volatile UINT32*)Address; + Value = *(volatile UINT32 *)Address; } + FilterAfterMmIoRead (FilterWidth32, Address, &Value); return Value; @@ -567,18 +571,19 @@ MmioRead32 ( UINT32 EFIAPI MmioWrite32 ( - IN UINTN Address, - IN UINT32 Value + IN UINTN Address, + IN UINT32 Value ) { - BOOLEAN Flag; + BOOLEAN Flag; ASSERT ((Address & 3) == 0); Flag = FilterBeforeMmIoWrite (FilterWidth32, Address, &Value); if (Flag) { - *(volatile UINT32*)Address = Value; + *(volatile UINT32 *)Address = Value; } + FilterAfterMmIoWrite (FilterWidth32, Address, &Value); return Value; @@ -601,18 +606,19 @@ MmioWrite32 ( UINT64 EFIAPI MmioRead64 ( - IN UINTN Address + IN UINTN Address ) { - UINT64 Value; - BOOLEAN Flag; + UINT64 Value; + BOOLEAN Flag; ASSERT ((Address & 7) == 0); Flag = FilterBeforeMmIoRead (FilterWidth64, Address, &Value); if (Flag) { - Value = *(volatile UINT64*)Address; + Value = *(volatile UINT64 *)Address; } + FilterAfterMmIoRead (FilterWidth64, Address, &Value); return Value; @@ -634,20 +640,20 @@ MmioRead64 ( UINT64 EFIAPI MmioWrite64 ( - IN UINTN Address, - IN UINT64 Value + IN UINTN Address, + IN UINT64 Value ) { - BOOLEAN Flag; + BOOLEAN Flag; ASSERT ((Address & 7) == 0); Flag = FilterBeforeMmIoWrite (FilterWidth64, Address, &Value); if (Flag) { - *(volatile UINT64*)Address = Value; + *(volatile UINT64 *)Address = Value; } + FilterAfterMmIoWrite (FilterWidth64, Address, &Value); return Value; } - diff --git a/MdePkg/Library/BaseLib/ARShiftU64.c b/MdePkg/Library/BaseLib/ARShiftU64.c index 9928854..ce1dfe9 100644 --- a/MdePkg/Library/BaseLib/ARShiftU64.c +++ b/MdePkg/Library/BaseLib/ARShiftU64.c @@ -26,8 +26,8 @@ UINT64 EFIAPI ARShiftU64 ( - IN UINT64 Operand, - IN UINTN Count + IN UINT64 Operand, + IN UINTN Count ) { ASSERT (Count < 64); diff --git a/MdePkg/Library/BaseLib/Arm/InternalSwitchStack.c b/MdePkg/Library/BaseLib/Arm/InternalSwitchStack.c index 034ee04..258e397 100644 --- a/MdePkg/Library/BaseLib/Arm/InternalSwitchStack.c +++ b/MdePkg/Library/BaseLib/Arm/InternalSwitchStack.c @@ -33,7 +33,6 @@ InternalSwitchStackAsm ( IN VOID *NewStack ); - /** Transfers control to a function starting with a new stack. diff --git a/MdePkg/Library/BaseLib/Arm/Unaligned.c b/MdePkg/Library/BaseLib/Arm/Unaligned.c index e9934e7..73b7a78 100644 --- a/MdePkg/Library/BaseLib/Arm/Unaligned.c +++ b/MdePkg/Library/BaseLib/Arm/Unaligned.c @@ -27,16 +27,16 @@ UINT16 EFIAPI ReadUnaligned16 ( - IN CONST UINT16 *Buffer + IN CONST UINT16 *Buffer ) { - volatile UINT8 LowerByte; - volatile UINT8 HigherByte; + volatile UINT8 LowerByte; + volatile UINT8 HigherByte; ASSERT (Buffer != NULL); - LowerByte = ((UINT8*)Buffer)[0]; - HigherByte = ((UINT8*)Buffer)[1]; + LowerByte = ((UINT8 *)Buffer)[0]; + HigherByte = ((UINT8 *)Buffer)[1]; return (UINT16)(LowerByte | (HigherByte << 8)); } @@ -59,14 +59,14 @@ ReadUnaligned16 ( UINT16 EFIAPI WriteUnaligned16 ( - OUT UINT16 *Buffer, - IN UINT16 Value + OUT UINT16 *Buffer, + IN UINT16 Value ) { ASSERT (Buffer != NULL); - ((volatile UINT8*)Buffer)[0] = (UINT8)Value; - ((volatile UINT8*)Buffer)[1] = (UINT8)(Value >> 8); + ((volatile UINT8 *)Buffer)[0] = (UINT8)Value; + ((volatile UINT8 *)Buffer)[1] = (UINT8)(Value >> 8); return Value; } @@ -87,15 +87,15 @@ WriteUnaligned16 ( UINT32 EFIAPI ReadUnaligned24 ( - IN CONST UINT32 *Buffer + IN CONST UINT32 *Buffer ) { ASSERT (Buffer != NULL); return (UINT32)( - ReadUnaligned16 ((UINT16*)Buffer) | - (((UINT8*)Buffer)[2] << 16) - ); + ReadUnaligned16 ((UINT16 *)Buffer) | + (((UINT8 *)Buffer)[2] << 16) + ); } /** @@ -116,14 +116,14 @@ ReadUnaligned24 ( UINT32 EFIAPI WriteUnaligned24 ( - OUT UINT32 *Buffer, - IN UINT32 Value + OUT UINT32 *Buffer, + IN UINT32 Value ) { ASSERT (Buffer != NULL); - WriteUnaligned16 ((UINT16*)Buffer, (UINT16)Value); - *(UINT8*)((UINT16*)Buffer + 1) = (UINT8)(Value >> 16); + WriteUnaligned16 ((UINT16 *)Buffer, (UINT16)Value); + *(UINT8 *)((UINT16 *)Buffer + 1) = (UINT8)(Value >> 16); return Value; } @@ -143,7 +143,7 @@ WriteUnaligned24 ( UINT32 EFIAPI ReadUnaligned32 ( - IN CONST UINT32 *Buffer + IN CONST UINT32 *Buffer ) { UINT16 LowerBytes; @@ -151,10 +151,10 @@ ReadUnaligned32 ( ASSERT (Buffer != NULL); - LowerBytes = ReadUnaligned16 ((UINT16*) Buffer); - HigherBytes = ReadUnaligned16 ((UINT16*) Buffer + 1); + LowerBytes = ReadUnaligned16 ((UINT16 *)Buffer); + HigherBytes = ReadUnaligned16 ((UINT16 *)Buffer + 1); - return (UINT32) (LowerBytes | (HigherBytes << 16)); + return (UINT32)(LowerBytes | (HigherBytes << 16)); } /** @@ -175,14 +175,14 @@ ReadUnaligned32 ( UINT32 EFIAPI WriteUnaligned32 ( - OUT UINT32 *Buffer, - IN UINT32 Value + OUT UINT32 *Buffer, + IN UINT32 Value ) { ASSERT (Buffer != NULL); - WriteUnaligned16 ((UINT16*)Buffer, (UINT16)Value); - WriteUnaligned16 ((UINT16*)Buffer + 1, (UINT16)(Value >> 16)); + WriteUnaligned16 ((UINT16 *)Buffer, (UINT16)Value); + WriteUnaligned16 ((UINT16 *)Buffer + 1, (UINT16)(Value >> 16)); return Value; } @@ -202,7 +202,7 @@ WriteUnaligned32 ( UINT64 EFIAPI ReadUnaligned64 ( - IN CONST UINT64 *Buffer + IN CONST UINT64 *Buffer ) { UINT32 LowerBytes; @@ -210,10 +210,10 @@ ReadUnaligned64 ( ASSERT (Buffer != NULL); - LowerBytes = ReadUnaligned32 ((UINT32*) Buffer); - HigherBytes = ReadUnaligned32 ((UINT32*) Buffer + 1); + LowerBytes = ReadUnaligned32 ((UINT32 *)Buffer); + HigherBytes = ReadUnaligned32 ((UINT32 *)Buffer + 1); - return (UINT64) (LowerBytes | LShiftU64 (HigherBytes, 32)); + return (UINT64)(LowerBytes | LShiftU64 (HigherBytes, 32)); } /** @@ -234,13 +234,13 @@ ReadUnaligned64 ( UINT64 EFIAPI WriteUnaligned64 ( - OUT UINT64 *Buffer, - IN UINT64 Value + OUT UINT64 *Buffer, + IN UINT64 Value ) { ASSERT (Buffer != NULL); - WriteUnaligned32 ((UINT32*)Buffer, (UINT32)Value); - WriteUnaligned32 ((UINT32*)Buffer + 1, (UINT32)RShiftU64 (Value, 32)); + WriteUnaligned32 ((UINT32 *)Buffer, (UINT32)Value); + WriteUnaligned32 ((UINT32 *)Buffer + 1, (UINT32)RShiftU64 (Value, 32)); return Value; } diff --git a/MdePkg/Library/BaseLib/BaseLibInternals.h b/MdePkg/Library/BaseLib/BaseLibInternals.h index 13ac982..d61e604 100644 --- a/MdePkg/Library/BaseLib/BaseLibInternals.h +++ b/MdePkg/Library/BaseLib/BaseLibInternals.h @@ -35,8 +35,8 @@ UINT64 EFIAPI InternalMathLShiftU64 ( - IN UINT64 Operand, - IN UINTN Count + IN UINT64 Operand, + IN UINTN Count ); /** @@ -55,8 +55,8 @@ InternalMathLShiftU64 ( UINT64 EFIAPI InternalMathRShiftU64 ( - IN UINT64 Operand, - IN UINTN Count + IN UINT64 Operand, + IN UINTN Count ); /** @@ -75,8 +75,8 @@ InternalMathRShiftU64 ( UINT64 EFIAPI InternalMathARShiftU64 ( - IN UINT64 Operand, - IN UINTN Count + IN UINT64 Operand, + IN UINTN Count ); /** @@ -96,8 +96,8 @@ InternalMathARShiftU64 ( UINT64 EFIAPI InternalMathLRotU64 ( - IN UINT64 Operand, - IN UINTN Count + IN UINT64 Operand, + IN UINTN Count ); /** @@ -117,8 +117,8 @@ InternalMathLRotU64 ( UINT64 EFIAPI InternalMathRRotU64 ( - IN UINT64 Operand, - IN UINTN Count + IN UINT64 Operand, + IN UINTN Count ); /** @@ -136,7 +136,7 @@ InternalMathRRotU64 ( UINT64 EFIAPI InternalMathSwapBytes64 ( - IN UINT64 Operand + IN UINT64 Operand ); /** @@ -156,8 +156,8 @@ InternalMathSwapBytes64 ( UINT64 EFIAPI InternalMathMultU64x32 ( - IN UINT64 Multiplicand, - IN UINT32 Multiplier + IN UINT64 Multiplicand, + IN UINT32 Multiplier ); /** @@ -177,8 +177,8 @@ InternalMathMultU64x32 ( UINT64 EFIAPI InternalMathMultU64x64 ( - IN UINT64 Multiplicand, - IN UINT64 Multiplier + IN UINT64 Multiplicand, + IN UINT64 Multiplier ); /** @@ -198,8 +198,8 @@ InternalMathMultU64x64 ( UINT64 EFIAPI InternalMathDivU64x32 ( - IN UINT64 Dividend, - IN UINT32 Divisor + IN UINT64 Dividend, + IN UINT32 Divisor ); /** @@ -219,8 +219,8 @@ InternalMathDivU64x32 ( UINT32 EFIAPI InternalMathModU64x32 ( - IN UINT64 Dividend, - IN UINT32 Divisor + IN UINT64 Dividend, + IN UINT32 Divisor ); /** @@ -243,9 +243,9 @@ InternalMathModU64x32 ( UINT64 EFIAPI InternalMathDivRemU64x32 ( - IN UINT64 Dividend, - IN UINT32 Divisor, - OUT UINT32 *Remainder OPTIONAL + IN UINT64 Dividend, + IN UINT32 Divisor, + OUT UINT32 *Remainder OPTIONAL ); /** @@ -268,9 +268,9 @@ InternalMathDivRemU64x32 ( UINT64 EFIAPI InternalMathDivRemU64x64 ( - IN UINT64 Dividend, - IN UINT64 Divisor, - OUT UINT64 *Remainder OPTIONAL + IN UINT64 Dividend, + IN UINT64 Divisor, + OUT UINT64 *Remainder OPTIONAL ); /** @@ -293,9 +293,9 @@ InternalMathDivRemU64x64 ( INT64 EFIAPI InternalMathDivRemS64x64 ( - IN INT64 Dividend, - IN INT64 Divisor, - OUT INT64 *Remainder OPTIONAL + IN INT64 Dividend, + IN INT64 Divisor, + OUT INT64 *Remainder OPTIONAL ); /** @@ -332,7 +332,6 @@ InternalSwitchStack ( IN VA_LIST Marker ); - /** Worker function that returns a bit field from Operand. @@ -348,12 +347,11 @@ InternalSwitchStack ( UINTN EFIAPI BitFieldReadUint ( - IN UINTN Operand, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Operand, + IN UINTN StartBit, + IN UINTN EndBit ); - /** Worker function that reads a bit field from Operand, performs a bitwise OR, and returns the result. @@ -373,13 +371,12 @@ BitFieldReadUint ( UINTN EFIAPI BitFieldOrUint ( - IN UINTN Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINTN OrData + IN UINTN Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINTN OrData ); - /** Worker function that reads a bit field from Operand, performs a bitwise AND, and returns the result. @@ -399,13 +396,12 @@ BitFieldOrUint ( UINTN EFIAPI BitFieldAndUint ( - IN UINTN Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINTN AndData + IN UINTN Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINTN AndData ); - /** Worker function that checks ASSERT condition for JumpBuffer @@ -423,7 +419,6 @@ InternalAssertJumpBuffer ( IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer ); - /** Restores the CPU context that was saved with SetJump(). @@ -442,7 +437,6 @@ InternalLongJump ( IN UINTN Value ); - /** Check if a Unicode character is a decimal character. @@ -459,10 +453,9 @@ InternalLongJump ( BOOLEAN EFIAPI InternalIsDecimalDigitCharacter ( - IN CHAR16 Char + IN CHAR16 Char ); - /** Convert a Unicode character to numerical value. @@ -479,10 +472,9 @@ InternalIsDecimalDigitCharacter ( UINTN EFIAPI InternalHexCharToUintn ( - IN CHAR16 Char + IN CHAR16 Char ); - /** Check if a Unicode character is a hexadecimal character. @@ -500,10 +492,9 @@ InternalHexCharToUintn ( BOOLEAN EFIAPI InternalIsHexaDecimalDigitCharacter ( - IN CHAR16 Char + IN CHAR16 Char ); - /** Check if a ASCII character is a decimal character. @@ -520,10 +511,9 @@ InternalIsHexaDecimalDigitCharacter ( BOOLEAN EFIAPI InternalAsciiIsDecimalDigitCharacter ( - IN CHAR8 Char + IN CHAR8 Char ); - /** Check if a ASCII character is a hexadecimal character. @@ -541,10 +531,9 @@ InternalAsciiIsDecimalDigitCharacter ( BOOLEAN EFIAPI InternalAsciiIsHexaDecimalDigitCharacter ( - IN CHAR8 Char + IN CHAR8 Char ); - /** Convert a ASCII character to numerical value. @@ -561,10 +550,9 @@ InternalAsciiIsHexaDecimalDigitCharacter ( UINTN EFIAPI InternalAsciiHexCharToUintn ( - IN CHAR8 Char + IN CHAR8 Char ); - // // Ia32 and x64 specific functions // @@ -582,7 +570,7 @@ InternalAsciiHexCharToUintn ( VOID EFIAPI InternalX86ReadGdtr ( - OUT IA32_DESCRIPTOR *Gdtr + OUT IA32_DESCRIPTOR *Gdtr ); /** @@ -597,7 +585,7 @@ InternalX86ReadGdtr ( VOID EFIAPI InternalX86WriteGdtr ( - IN CONST IA32_DESCRIPTOR *Gdtr + IN CONST IA32_DESCRIPTOR *Gdtr ); /** @@ -612,7 +600,7 @@ InternalX86WriteGdtr ( VOID EFIAPI InternalX86ReadIdtr ( - OUT IA32_DESCRIPTOR *Idtr + OUT IA32_DESCRIPTOR *Idtr ); /** @@ -627,7 +615,7 @@ InternalX86ReadIdtr ( VOID EFIAPI InternalX86WriteIdtr ( - IN CONST IA32_DESCRIPTOR *Idtr + IN CONST IA32_DESCRIPTOR *Idtr ); /** @@ -643,7 +631,7 @@ InternalX86WriteIdtr ( VOID EFIAPI InternalX86FxSave ( - OUT IA32_FX_BUFFER *Buffer + OUT IA32_FX_BUFFER *Buffer ); /** @@ -659,7 +647,7 @@ InternalX86FxSave ( VOID EFIAPI InternalX86FxRestore ( - IN CONST IA32_FX_BUFFER *Buffer + IN CONST IA32_FX_BUFFER *Buffer ); /** @@ -773,11 +761,11 @@ InternalX86DisablePaging32 ( VOID EFIAPI InternalX86EnablePaging64 ( - IN UINT16 Cs, - IN UINT64 EntryPoint, - IN UINT64 Context1 OPTIONAL, - IN UINT64 Context2 OPTIONAL, - IN UINT64 NewStack + IN UINT16 Cs, + IN UINT64 EntryPoint, + IN UINT64 Context1 OPTIONAL, + IN UINT64 Context2 OPTIONAL, + IN UINT64 NewStack ); /** @@ -809,11 +797,11 @@ InternalX86EnablePaging64 ( VOID EFIAPI InternalX86DisablePaging64 ( - IN UINT16 Cs, - IN UINT32 EntryPoint, - IN UINT32 Context1 OPTIONAL, - IN UINT32 Context2 OPTIONAL, - IN UINT32 NewStack + IN UINT16 Cs, + IN UINT32 EntryPoint, + IN UINT32 Context1 OPTIONAL, + IN UINT32 Context2 OPTIONAL, + IN UINT32 NewStack ); /** @@ -828,7 +816,7 @@ InternalX86DisablePaging64 ( BOOLEAN EFIAPI InternalX86RdRand16 ( - OUT UINT16 *Rand + OUT UINT16 *Rand ); /** @@ -843,7 +831,7 @@ InternalX86RdRand16 ( BOOLEAN EFIAPI InternalX86RdRand32 ( - OUT UINT32 *Rand + OUT UINT32 *Rand ); /** @@ -859,7 +847,7 @@ InternalX86RdRand32 ( BOOLEAN EFIAPI InternalX86RdRand64 ( - OUT UINT64 *Rand + OUT UINT64 *Rand ); #else diff --git a/MdePkg/Library/BaseLib/BitField.c b/MdePkg/Library/BaseLib/BitField.c index 0f48a03..862af53 100644 --- a/MdePkg/Library/BaseLib/BitField.c +++ b/MdePkg/Library/BaseLib/BitField.c @@ -23,9 +23,9 @@ UINTN EFIAPI InternalBaseLibBitFieldReadUint ( - IN UINTN Operand, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Operand, + IN UINTN StartBit, + IN UINTN EndBit ) { // @@ -56,10 +56,10 @@ InternalBaseLibBitFieldReadUint ( UINTN EFIAPI InternalBaseLibBitFieldOrUint ( - IN UINTN Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINTN OrData + IN UINTN Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINTN OrData ) { // @@ -74,7 +74,7 @@ InternalBaseLibBitFieldOrUint ( // ~((UINTN)-2 << EndBit) is a mask in which bit[0] thru bit[EndBit] // are 1's while bit[EndBit + 1] thru the most significant bit are 0's. // - return Operand | ((OrData << StartBit) & ~((UINTN) -2 << EndBit)); + return Operand | ((OrData << StartBit) & ~((UINTN)-2 << EndBit)); } /** @@ -98,10 +98,10 @@ InternalBaseLibBitFieldOrUint ( UINTN EFIAPI InternalBaseLibBitFieldAndUint ( - IN UINTN Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINTN AndData + IN UINTN Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINTN AndData ) { // @@ -141,9 +141,9 @@ InternalBaseLibBitFieldAndUint ( UINT8 EFIAPI BitFieldRead8 ( - IN UINT8 Operand, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT8 Operand, + IN UINTN StartBit, + IN UINTN EndBit ) { ASSERT (EndBit < 8); @@ -177,10 +177,10 @@ BitFieldRead8 ( UINT8 EFIAPI BitFieldWrite8 ( - IN UINT8 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINT8 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) { ASSERT (EndBit < 8); @@ -215,10 +215,10 @@ BitFieldWrite8 ( UINT8 EFIAPI BitFieldOr8 ( - IN UINT8 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINT8 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) { ASSERT (EndBit < 8); @@ -253,10 +253,10 @@ BitFieldOr8 ( UINT8 EFIAPI BitFieldAnd8 ( - IN UINT8 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINT8 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ) { ASSERT (EndBit < 8); @@ -294,11 +294,11 @@ BitFieldAnd8 ( UINT8 EFIAPI BitFieldAndThenOr8 ( - IN UINT8 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINT8 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) { ASSERT (EndBit < 8); @@ -333,9 +333,9 @@ BitFieldAndThenOr8 ( UINT16 EFIAPI BitFieldRead16 ( - IN UINT16 Operand, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT16 Operand, + IN UINTN StartBit, + IN UINTN EndBit ) { ASSERT (EndBit < 16); @@ -369,10 +369,10 @@ BitFieldRead16 ( UINT16 EFIAPI BitFieldWrite16 ( - IN UINT16 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINT16 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ) { ASSERT (EndBit < 16); @@ -407,10 +407,10 @@ BitFieldWrite16 ( UINT16 EFIAPI BitFieldOr16 ( - IN UINT16 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINT16 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ) { ASSERT (EndBit < 16); @@ -445,10 +445,10 @@ BitFieldOr16 ( UINT16 EFIAPI BitFieldAnd16 ( - IN UINT16 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINT16 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ) { ASSERT (EndBit < 16); @@ -486,11 +486,11 @@ BitFieldAnd16 ( UINT16 EFIAPI BitFieldAndThenOr16 ( - IN UINT16 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINT16 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ) { ASSERT (EndBit < 16); @@ -525,9 +525,9 @@ BitFieldAndThenOr16 ( UINT32 EFIAPI BitFieldRead32 ( - IN UINT32 Operand, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT32 Operand, + IN UINTN StartBit, + IN UINTN EndBit ) { ASSERT (EndBit < 32); @@ -561,10 +561,10 @@ BitFieldRead32 ( UINT32 EFIAPI BitFieldWrite32 ( - IN UINT32 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINT32 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { ASSERT (EndBit < 32); @@ -599,10 +599,10 @@ BitFieldWrite32 ( UINT32 EFIAPI BitFieldOr32 ( - IN UINT32 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINT32 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { ASSERT (EndBit < 32); @@ -637,10 +637,10 @@ BitFieldOr32 ( UINT32 EFIAPI BitFieldAnd32 ( - IN UINT32 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINT32 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { ASSERT (EndBit < 32); @@ -678,11 +678,11 @@ BitFieldAnd32 ( UINT32 EFIAPI BitFieldAndThenOr32 ( - IN UINT32 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINT32 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { ASSERT (EndBit < 32); @@ -717,9 +717,9 @@ BitFieldAndThenOr32 ( UINT64 EFIAPI BitFieldRead64 ( - IN UINT64 Operand, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT64 Operand, + IN UINTN StartBit, + IN UINTN EndBit ) { ASSERT (EndBit < 64); @@ -753,10 +753,10 @@ BitFieldRead64 ( UINT64 EFIAPI BitFieldWrite64 ( - IN UINT64 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 Value + IN UINT64 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 Value ) { ASSERT (EndBit < 64); @@ -791,10 +791,10 @@ BitFieldWrite64 ( UINT64 EFIAPI BitFieldOr64 ( - IN UINT64 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 OrData + IN UINT64 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 OrData ) { UINT64 Value1; @@ -811,7 +811,7 @@ BitFieldOr64 ( ASSERT (RShiftU64 (OrData, EndBit - StartBit) == (RShiftU64 (OrData, EndBit - StartBit) & 1)); Value1 = LShiftU64 (OrData, StartBit); - Value2 = LShiftU64 ((UINT64) - 2, EndBit); + Value2 = LShiftU64 ((UINT64)-2, EndBit); return Operand | (Value1 & ~Value2); } @@ -843,10 +843,10 @@ BitFieldOr64 ( UINT64 EFIAPI BitFieldAnd64 ( - IN UINT64 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData + IN UINT64 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData ) { UINT64 Value1; @@ -898,11 +898,11 @@ BitFieldAnd64 ( UINT64 EFIAPI BitFieldAndThenOr64 ( - IN UINT64 Operand, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData, - IN UINT64 OrData + IN UINT64 Operand, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData, + IN UINT64 OrData ) { ASSERT (EndBit < 64); @@ -938,25 +938,25 @@ BitFieldAndThenOr64 ( UINT8 EFIAPI BitFieldCountOnes32 ( - IN UINT32 Operand, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT32 Operand, + IN UINTN StartBit, + IN UINTN EndBit ) { - UINT32 Count; + UINT32 Count; ASSERT (EndBit < 32); ASSERT (StartBit <= EndBit); - Count = BitFieldRead32 (Operand, StartBit, EndBit); + Count = BitFieldRead32 (Operand, StartBit, EndBit); Count -= ((Count >> 1) & 0x55555555); - Count = (Count & 0x33333333) + ((Count >> 2) & 0x33333333); + Count = (Count & 0x33333333) + ((Count >> 2) & 0x33333333); Count += Count >> 4; Count &= 0x0F0F0F0F; Count += Count >> 8; Count += Count >> 16; - return (UINT8) Count & 0x3F; + return (UINT8)Count & 0x3F; } /** @@ -982,21 +982,20 @@ BitFieldCountOnes32 ( UINT8 EFIAPI BitFieldCountOnes64 ( - IN UINT64 Operand, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT64 Operand, + IN UINTN StartBit, + IN UINTN EndBit ) { - UINT64 BitField; - UINT8 Count; + UINT64 BitField; + UINT8 Count; ASSERT (EndBit < 64); ASSERT (StartBit <= EndBit); BitField = BitFieldRead64 (Operand, StartBit, EndBit); - Count = BitFieldCountOnes32 ((UINT32) BitField, 0, 31); - Count += BitFieldCountOnes32 ((UINT32) RShiftU64(BitField, 32), 0, 31); + Count = BitFieldCountOnes32 ((UINT32)BitField, 0, 31); + Count += BitFieldCountOnes32 ((UINT32)RShiftU64 (BitField, 32), 0, 31); return Count; } - diff --git a/MdePkg/Library/BaseLib/CheckSum.c b/MdePkg/Library/BaseLib/CheckSum.c index d91a7a0..28dee5a 100644 --- a/MdePkg/Library/BaseLib/CheckSum.c +++ b/MdePkg/Library/BaseLib/CheckSum.c @@ -30,24 +30,23 @@ UINT8 EFIAPI CalculateSum8 ( - IN CONST UINT8 *Buffer, - IN UINTN Length + IN CONST UINT8 *Buffer, + IN UINTN Length ) { - UINT8 Sum; - UINTN Count; + UINT8 Sum; + UINTN Count; ASSERT (Buffer != NULL); - ASSERT (Length <= (MAX_ADDRESS - ((UINTN) Buffer) + 1)); + ASSERT (Length <= (MAX_ADDRESS - ((UINTN)Buffer) + 1)); for (Sum = 0, Count = 0; Count < Length; Count++) { - Sum = (UINT8) (Sum + *(Buffer + Count)); + Sum = (UINT8)(Sum + *(Buffer + Count)); } return Sum; } - /** Returns the two's complement checksum of all elements in a buffer of 8-bit values. @@ -69,18 +68,18 @@ CalculateSum8 ( UINT8 EFIAPI CalculateCheckSum8 ( - IN CONST UINT8 *Buffer, - IN UINTN Length + IN CONST UINT8 *Buffer, + IN UINTN Length ) { - UINT8 CheckSum; + UINT8 CheckSum; CheckSum = CalculateSum8 (Buffer, Length); // // Return the checksum based on 2's complement. // - return (UINT8) (0x100 - CheckSum); + return (UINT8)(0x100 - CheckSum); } /** @@ -105,28 +104,27 @@ CalculateCheckSum8 ( UINT16 EFIAPI CalculateSum16 ( - IN CONST UINT16 *Buffer, - IN UINTN Length + IN CONST UINT16 *Buffer, + IN UINTN Length ) { - UINT16 Sum; - UINTN Count; - UINTN Total; + UINT16 Sum; + UINTN Count; + UINTN Total; ASSERT (Buffer != NULL); - ASSERT (((UINTN) Buffer & 0x1) == 0); + ASSERT (((UINTN)Buffer & 0x1) == 0); ASSERT ((Length & 0x1) == 0); - ASSERT (Length <= (MAX_ADDRESS - ((UINTN) Buffer) + 1)); + ASSERT (Length <= (MAX_ADDRESS - ((UINTN)Buffer) + 1)); Total = Length / sizeof (*Buffer); for (Sum = 0, Count = 0; Count < Total; Count++) { - Sum = (UINT16) (Sum + *(Buffer + Count)); + Sum = (UINT16)(Sum + *(Buffer + Count)); } return Sum; } - /** Returns the two's complement checksum of all elements in a buffer of 16-bit values. @@ -150,21 +148,20 @@ CalculateSum16 ( UINT16 EFIAPI CalculateCheckSum16 ( - IN CONST UINT16 *Buffer, - IN UINTN Length + IN CONST UINT16 *Buffer, + IN UINTN Length ) { - UINT16 CheckSum; + UINT16 CheckSum; CheckSum = CalculateSum16 (Buffer, Length); // // Return the checksum based on 2's complement. // - return (UINT16) (0x10000 - CheckSum); + return (UINT16)(0x10000 - CheckSum); } - /** Returns the sum of all elements in a buffer of 32-bit values. During calculation, the carry bits are dropped. @@ -187,18 +184,18 @@ CalculateCheckSum16 ( UINT32 EFIAPI CalculateSum32 ( - IN CONST UINT32 *Buffer, - IN UINTN Length + IN CONST UINT32 *Buffer, + IN UINTN Length ) { - UINT32 Sum; - UINTN Count; - UINTN Total; + UINT32 Sum; + UINTN Count; + UINTN Total; ASSERT (Buffer != NULL); - ASSERT (((UINTN) Buffer & 0x3) == 0); + ASSERT (((UINTN)Buffer & 0x3) == 0); ASSERT ((Length & 0x3) == 0); - ASSERT (Length <= (MAX_ADDRESS - ((UINTN) Buffer) + 1)); + ASSERT (Length <= (MAX_ADDRESS - ((UINTN)Buffer) + 1)); Total = Length / sizeof (*Buffer); for (Sum = 0, Count = 0; Count < Total; Count++) { @@ -208,7 +205,6 @@ CalculateSum32 ( return Sum; } - /** Returns the two's complement checksum of all elements in a buffer of 32-bit values. @@ -232,21 +228,20 @@ CalculateSum32 ( UINT32 EFIAPI CalculateCheckSum32 ( - IN CONST UINT32 *Buffer, - IN UINTN Length + IN CONST UINT32 *Buffer, + IN UINTN Length ) { - UINT32 CheckSum; + UINT32 CheckSum; CheckSum = CalculateSum32 (Buffer, Length); // // Return the checksum based on 2's complement. // - return (UINT32) ((UINT32)(-1) - CheckSum + 1); + return (UINT32)((UINT32)(-1) - CheckSum + 1); } - /** Returns the sum of all elements in a buffer of 64-bit values. During calculation, the carry bits are dropped. @@ -269,18 +264,18 @@ CalculateCheckSum32 ( UINT64 EFIAPI CalculateSum64 ( - IN CONST UINT64 *Buffer, - IN UINTN Length + IN CONST UINT64 *Buffer, + IN UINTN Length ) { - UINT64 Sum; - UINTN Count; - UINTN Total; + UINT64 Sum; + UINTN Count; + UINTN Total; ASSERT (Buffer != NULL); - ASSERT (((UINTN) Buffer & 0x7) == 0); + ASSERT (((UINTN)Buffer & 0x7) == 0); ASSERT ((Length & 0x7) == 0); - ASSERT (Length <= (MAX_ADDRESS - ((UINTN) Buffer) + 1)); + ASSERT (Length <= (MAX_ADDRESS - ((UINTN)Buffer) + 1)); Total = Length / sizeof (*Buffer); for (Sum = 0, Count = 0; Count < Total; Count++) { @@ -290,7 +285,6 @@ CalculateSum64 ( return Sum; } - /** Returns the two's complement checksum of all elements in a buffer of 64-bit values. @@ -314,18 +308,18 @@ CalculateSum64 ( UINT64 EFIAPI CalculateCheckSum64 ( - IN CONST UINT64 *Buffer, - IN UINTN Length + IN CONST UINT64 *Buffer, + IN UINTN Length ) { - UINT64 CheckSum; + UINT64 CheckSum; CheckSum = CalculateSum64 (Buffer, Length); // // Return the checksum based on 2's complement. // - return (UINT64) ((UINT64)(-1) - CheckSum + 1); + return (UINT64)((UINT64)(-1) - CheckSum + 1); } GLOBAL_REMOVE_IF_UNREFERENCED CONST UINT32 mCrcTable[256] = { @@ -602,9 +596,9 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST UINT32 mCrcTable[256] = { **/ UINT32 EFIAPI -CalculateCrc32( - IN VOID *Buffer, - IN UINTN Length +CalculateCrc32 ( + IN VOID *Buffer, + IN UINTN Length ) { UINTN Index; @@ -612,14 +606,14 @@ CalculateCrc32( UINT8 *Ptr; ASSERT (Buffer != NULL); - ASSERT (Length <= (MAX_ADDRESS - ((UINTN) Buffer) + 1)); + ASSERT (Length <= (MAX_ADDRESS - ((UINTN)Buffer) + 1)); // // Compute CRC // Crc = 0xffffffff; for (Index = 0, Ptr = Buffer; Index < Length; Index++, Ptr++) { - Crc = (Crc >> 8) ^ mCrcTable[(UINT8) Crc ^ *Ptr]; + Crc = (Crc >> 8) ^ mCrcTable[(UINT8)Crc ^ *Ptr]; } return Crc ^ 0xffffffff; diff --git a/MdePkg/Library/BaseLib/ChkStkGcc.c b/MdePkg/Library/BaseLib/ChkStkGcc.c index 7f07ba2..9c74e36 100644 --- a/MdePkg/Library/BaseLib/ChkStkGcc.c +++ b/MdePkg/Library/BaseLib/ChkStkGcc.c @@ -12,7 +12,7 @@ Hack function for passing GCC build. **/ VOID -__chkstk() +__chkstk ( + ) { } - diff --git a/MdePkg/Library/BaseLib/Cpu.c b/MdePkg/Library/BaseLib/Cpu.c index 689246f..e3daf38 100644 --- a/MdePkg/Library/BaseLib/Cpu.c +++ b/MdePkg/Library/BaseLib/Cpu.c @@ -8,7 +8,6 @@ #include "BaseLibInternals.h" - /** Disables CPU interrupts and returns the interrupt state prior to the disable operation. @@ -23,7 +22,7 @@ SaveAndDisableInterrupts ( VOID ) { - BOOLEAN InterruptState; + BOOLEAN InterruptState; InterruptState = GetInterruptState (); DisableInterrupts (); @@ -47,7 +46,7 @@ SaveAndDisableInterrupts ( BOOLEAN EFIAPI SetInterruptState ( - IN BOOLEAN InterruptState + IN BOOLEAN InterruptState ) { if (InterruptState) { @@ -55,5 +54,6 @@ SetInterruptState ( } else { DisableInterrupts (); } + return InterruptState; } diff --git a/MdePkg/Library/BaseLib/CpuDeadLoop.c b/MdePkg/Library/BaseLib/CpuDeadLoop.c index 3cd3043..b3b7548 100644 --- a/MdePkg/Library/BaseLib/CpuDeadLoop.c +++ b/MdePkg/Library/BaseLib/CpuDeadLoop.c @@ -6,8 +6,6 @@ **/ - - #include #include @@ -29,6 +27,6 @@ CpuDeadLoop ( volatile UINTN Index; for (Index = 0; Index == 0;) { - CpuPause(); + CpuPause (); } } diff --git a/MdePkg/Library/BaseLib/DivS64x64Remainder.c b/MdePkg/Library/BaseLib/DivS64x64Remainder.c index bdf25b8..9d6ec95 100644 --- a/MdePkg/Library/BaseLib/DivS64x64Remainder.c +++ b/MdePkg/Library/BaseLib/DivS64x64Remainder.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** @@ -37,9 +34,9 @@ INT64 EFIAPI DivS64x64Remainder ( - IN INT64 Dividend, - IN INT64 Divisor, - OUT INT64 *Remainder OPTIONAL + IN INT64 Dividend, + IN INT64 Divisor, + OUT INT64 *Remainder OPTIONAL ) { ASSERT (Divisor != 0); diff --git a/MdePkg/Library/BaseLib/DivU64x32.c b/MdePkg/Library/BaseLib/DivU64x32.c index fa377ec..e505a50 100644 --- a/MdePkg/Library/BaseLib/DivU64x32.c +++ b/MdePkg/Library/BaseLib/DivU64x32.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** @@ -30,8 +27,8 @@ UINT64 EFIAPI DivU64x32 ( - IN UINT64 Dividend, - IN UINT32 Divisor + IN UINT64 Dividend, + IN UINT32 Divisor ) { ASSERT (Divisor != 0); diff --git a/MdePkg/Library/BaseLib/DivU64x32Remainder.c b/MdePkg/Library/BaseLib/DivU64x32Remainder.c index df9d331..6f86ed7 100644 --- a/MdePkg/Library/BaseLib/DivU64x32Remainder.c +++ b/MdePkg/Library/BaseLib/DivU64x32Remainder.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** @@ -33,9 +30,9 @@ UINT64 EFIAPI DivU64x32Remainder ( - IN UINT64 Dividend, - IN UINT32 Divisor, - OUT UINT32 *Remainder OPTIONAL + IN UINT64 Dividend, + IN UINT32 Divisor, + OUT UINT32 *Remainder OPTIONAL ) { ASSERT (Divisor != 0); diff --git a/MdePkg/Library/BaseLib/DivU64x64Remainder.c b/MdePkg/Library/BaseLib/DivU64x64Remainder.c index 94dc2b1..e068e97 100644 --- a/MdePkg/Library/BaseLib/DivU64x64Remainder.c +++ b/MdePkg/Library/BaseLib/DivU64x64Remainder.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** @@ -33,9 +30,9 @@ UINT64 EFIAPI DivU64x64Remainder ( - IN UINT64 Dividend, - IN UINT64 Divisor, - OUT UINT64 *Remainder OPTIONAL + IN UINT64 Dividend, + IN UINT64 Divisor, + OUT UINT64 *Remainder OPTIONAL ) { ASSERT (Divisor != 0); diff --git a/MdePkg/Library/BaseLib/Ebc/CpuBreakpoint.c b/MdePkg/Library/BaseLib/Ebc/CpuBreakpoint.c index d0debec..ec7df5e 100644 --- a/MdePkg/Library/BaseLib/Ebc/CpuBreakpoint.c +++ b/MdePkg/Library/BaseLib/Ebc/CpuBreakpoint.c @@ -11,7 +11,7 @@ extern UINT64 _break ( - CHAR8 BreakCode + CHAR8 BreakCode ); /** @@ -120,4 +120,3 @@ CpuPause ( ) { } - diff --git a/MdePkg/Library/BaseLib/Ebc/SpeculationBarrier.c b/MdePkg/Library/BaseLib/Ebc/SpeculationBarrier.c index d4067a4..e3e7579 100644 --- a/MdePkg/Library/BaseLib/Ebc/SpeculationBarrier.c +++ b/MdePkg/Library/BaseLib/Ebc/SpeculationBarrier.c @@ -7,7 +7,6 @@ **/ - /** Uses as a barrier to stop speculative execution. diff --git a/MdePkg/Library/BaseLib/FilePaths.c b/MdePkg/Library/BaseLib/FilePaths.c index c2c561a..4380807 100644 --- a/MdePkg/Library/BaseLib/FilePaths.c +++ b/MdePkg/Library/BaseLib/FilePaths.c @@ -19,29 +19,33 @@ **/ BOOLEAN EFIAPI -PathRemoveLastItem( - IN OUT CHAR16 *Path +PathRemoveLastItem ( + IN OUT CHAR16 *Path ) { - CHAR16 *Walker; - CHAR16 *LastSlash; + CHAR16 *Walker; + CHAR16 *LastSlash; + // // get directory name from path... ('chop' off extra) // for ( Walker = Path, LastSlash = NULL - ; Walker != NULL && *Walker != CHAR_NULL - ; Walker++ - ){ - if (*Walker == L'\\' && *(Walker + 1) != CHAR_NULL) { + ; Walker != NULL && *Walker != CHAR_NULL + ; Walker++ + ) + { + if ((*Walker == L'\\') && (*(Walker + 1) != CHAR_NULL)) { LastSlash = Walker+1; - } else if (*Walker == L':' && *(Walker + 1) != L'\\' && *(Walker + 1) != CHAR_NULL) { + } else if ((*Walker == L':') && (*(Walker + 1) != L'\\') && (*(Walker + 1) != CHAR_NULL)) { LastSlash = Walker+1; } } + if (LastSlash != NULL) { *LastSlash = CHAR_NULL; return (TRUE); } + return (FALSE); } @@ -59,11 +63,11 @@ PathRemoveLastItem( @return Returns Path, otherwise returns NULL to indicate that an error has occurred. **/ -CHAR16* +CHAR16 * EFIAPI -PathCleanUpDirectories( - IN CHAR16 *Path -) +PathCleanUpDirectories ( + IN CHAR16 *Path + ) { CHAR16 *TempString; @@ -93,6 +97,7 @@ PathCleanUpDirectories( while ((TempString = StrStr (Path, L"\\.\\")) != NULL) { CopyMem (TempString, TempString + 2, StrSize (TempString + 2)); } + if ((StrLen (Path) >= 2) && (StrCmp (Path + StrLen (Path) - 2, L"\\.") == 0)) { Path[StrLen (Path) - 1] = CHAR_NULL; } @@ -100,11 +105,12 @@ PathCleanUpDirectories( // // Remove all the "\..". E.g.: fs0:\abc\..\def\.. // - while (((TempString = StrStr(Path, L"\\..")) != NULL) && + while (((TempString = StrStr (Path, L"\\..")) != NULL) && ((*(TempString + 3) == L'\\') || (*(TempString + 3) == CHAR_NULL)) - ) { + ) + { *(TempString + 1) = CHAR_NULL; - PathRemoveLastItem(Path); + PathRemoveLastItem (Path); if (*(TempString + 3) != CHAR_NULL) { CopyMem (Path + StrLen (Path), TempString + 4, StrSize (TempString + 4)); } @@ -112,4 +118,3 @@ PathCleanUpDirectories( return Path; } - diff --git a/MdePkg/Library/BaseLib/GetPowerOfTwo32.c b/MdePkg/Library/BaseLib/GetPowerOfTwo32.c index 76f5e3c..8a86d39 100644 --- a/MdePkg/Library/BaseLib/GetPowerOfTwo32.c +++ b/MdePkg/Library/BaseLib/GetPowerOfTwo32.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** @@ -27,7 +24,7 @@ UINT32 EFIAPI GetPowerOfTwo32 ( - IN UINT32 Operand + IN UINT32 Operand ) { if (0 == Operand) { diff --git a/MdePkg/Library/BaseLib/GetPowerOfTwo64.c b/MdePkg/Library/BaseLib/GetPowerOfTwo64.c index 5033076..09a2c8a 100644 --- a/MdePkg/Library/BaseLib/GetPowerOfTwo64.c +++ b/MdePkg/Library/BaseLib/GetPowerOfTwo64.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** @@ -27,12 +24,12 @@ UINT64 EFIAPI GetPowerOfTwo64 ( - IN UINT64 Operand + IN UINT64 Operand ) { if (Operand == 0) { return 0; } - return LShiftU64 (1, (UINTN) HighBitSet64 (Operand)); + return LShiftU64 (1, (UINTN)HighBitSet64 (Operand)); } diff --git a/MdePkg/Library/BaseLib/HighBitSet32.c b/MdePkg/Library/BaseLib/HighBitSet32.c index b3c9ed1..520511b 100644 --- a/MdePkg/Library/BaseLib/HighBitSet32.c +++ b/MdePkg/Library/BaseLib/HighBitSet32.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** @@ -28,14 +25,17 @@ INTN EFIAPI HighBitSet32 ( - IN UINT32 Operand + IN UINT32 Operand ) { - INTN BitIndex; + INTN BitIndex; if (Operand == 0) { - return - 1; + return -1; } - for (BitIndex = 31; (INT32)Operand > 0; BitIndex--, Operand <<= 1); + + for (BitIndex = 31; (INT32)Operand > 0; BitIndex--, Operand <<= 1) { + } + return BitIndex; } diff --git a/MdePkg/Library/BaseLib/HighBitSet64.c b/MdePkg/Library/BaseLib/HighBitSet64.c index 4f06dfc..ca64d88 100644 --- a/MdePkg/Library/BaseLib/HighBitSet64.c +++ b/MdePkg/Library/BaseLib/HighBitSet64.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** @@ -28,7 +25,7 @@ INTN EFIAPI HighBitSet64 ( - IN UINT64 Operand + IN UINT64 Operand ) { if (Operand == (UINT32)Operand) { @@ -42,7 +39,7 @@ HighBitSet64 ( // Operand is really a 64-bit integer // if (sizeof (UINTN) == sizeof (UINT32)) { - return HighBitSet32 (((UINT32*)&Operand)[1]) + 32; + return HighBitSet32 (((UINT32 *)&Operand)[1]) + 32; } else { return HighBitSet32 ((UINT32)RShiftU64 (Operand, 32)) + 32; } diff --git a/MdePkg/Library/BaseLib/Ia32/ARShiftU64.c b/MdePkg/Library/BaseLib/Ia32/ARShiftU64.c index 8361083..251fa0e 100644 --- a/MdePkg/Library/BaseLib/Ia32/ARShiftU64.c +++ b/MdePkg/Library/BaseLib/Ia32/ARShiftU64.c @@ -6,9 +6,6 @@ **/ - - - /** Shifts a 64-bit integer right between 0 and 63 bits. The high bits are filled with original integer's bit 63. The shifted value is returned. @@ -25,8 +22,8 @@ UINT64 EFIAPI InternalMathARShiftU64 ( - IN UINT64 Operand, - IN UINTN Count + IN UINT64 Operand, + IN UINTN Count ) { _asm { @@ -42,4 +39,3 @@ L0: sar edx, cl } } - diff --git a/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.c b/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.c index a59da0c..8c03934 100644 --- a/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.c +++ b/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.c @@ -6,14 +6,14 @@ **/ - - - /** Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics. **/ -void __debugbreak (VOID); +void +__debugbreak ( + VOID + ); #pragma intrinsic(__debugbreak) @@ -32,4 +32,3 @@ CpuBreakpoint ( { __debugbreak (); } - diff --git a/MdePkg/Library/BaseLib/Ia32/CpuId.c b/MdePkg/Library/BaseLib/Ia32/CpuId.c index c38b278..e1a7e8e 100644 --- a/MdePkg/Library/BaseLib/Ia32/CpuId.c +++ b/MdePkg/Library/BaseLib/Ia32/CpuId.c @@ -34,11 +34,11 @@ UINT32 EFIAPI AsmCpuid ( - IN UINT32 Index, - OUT UINT32 *RegisterEax OPTIONAL, - OUT UINT32 *RegisterEbx OPTIONAL, - OUT UINT32 *RegisterEcx OPTIONAL, - OUT UINT32 *RegisterEdx OPTIONAL + IN UINT32 Index, + OUT UINT32 *RegisterEax OPTIONAL, + OUT UINT32 *RegisterEbx OPTIONAL, + OUT UINT32 *RegisterEcx OPTIONAL, + OUT UINT32 *RegisterEdx OPTIONAL ) { _asm { diff --git a/MdePkg/Library/BaseLib/Ia32/CpuIdEx.c b/MdePkg/Library/BaseLib/Ia32/CpuIdEx.c index 7cd42ee..6eeb778 100644 --- a/MdePkg/Library/BaseLib/Ia32/CpuIdEx.c +++ b/MdePkg/Library/BaseLib/Ia32/CpuIdEx.c @@ -41,12 +41,12 @@ UINT32 EFIAPI AsmCpuidEx ( - IN UINT32 Index, - IN UINT32 SubIndex, - OUT UINT32 *RegisterEax OPTIONAL, - OUT UINT32 *RegisterEbx OPTIONAL, - OUT UINT32 *RegisterEcx OPTIONAL, - OUT UINT32 *RegisterEdx OPTIONAL + IN UINT32 Index, + IN UINT32 SubIndex, + OUT UINT32 *RegisterEax OPTIONAL, + OUT UINT32 *RegisterEbx OPTIONAL, + OUT UINT32 *RegisterEcx OPTIONAL, + OUT UINT32 *RegisterEdx OPTIONAL ) { _asm { diff --git a/MdePkg/Library/BaseLib/Ia32/CpuPause.c b/MdePkg/Library/BaseLib/Ia32/CpuPause.c index 12dc896..356b8ef 100644 --- a/MdePkg/Library/BaseLib/Ia32/CpuPause.c +++ b/MdePkg/Library/BaseLib/Ia32/CpuPause.c @@ -6,9 +6,6 @@ **/ - - - /** Requests CPU to pause for a short period of time. @@ -26,4 +23,3 @@ CpuPause ( pause } } - diff --git a/MdePkg/Library/BaseLib/Ia32/DisableCache.c b/MdePkg/Library/BaseLib/Ia32/DisableCache.c index 6a8be4e..d1aca0e 100644 --- a/MdePkg/Library/BaseLib/Ia32/DisableCache.c +++ b/MdePkg/Library/BaseLib/Ia32/DisableCache.c @@ -27,4 +27,3 @@ AsmDisableCache ( wbinvd } } - diff --git a/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.c b/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.c index 4141ef7..d59d552 100644 --- a/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.c +++ b/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.c @@ -6,9 +6,6 @@ **/ - - - /** Disables CPU interrupts. @@ -23,4 +20,3 @@ DisableInterrupts ( cli } } - diff --git a/MdePkg/Library/BaseLib/Ia32/DisablePaging32.c b/MdePkg/Library/BaseLib/Ia32/DisablePaging32.c index 9bebd6d..0e263c4 100644 --- a/MdePkg/Library/BaseLib/Ia32/DisablePaging32.c +++ b/MdePkg/Library/BaseLib/Ia32/DisablePaging32.c @@ -38,7 +38,7 @@ function after paging is disabled. **/ -__declspec (naked) +__declspec(naked) VOID EFIAPI InternalX86DisablePaging32 ( diff --git a/MdePkg/Library/BaseLib/Ia32/DivS64x64Remainder.c b/MdePkg/Library/BaseLib/Ia32/DivS64x64Remainder.c index 4e64964..4604208 100644 --- a/MdePkg/Library/BaseLib/Ia32/DivS64x64Remainder.c +++ b/MdePkg/Library/BaseLib/Ia32/DivS64x64Remainder.c @@ -28,20 +28,21 @@ INT64 EFIAPI InternalMathDivRemS64x64 ( - IN INT64 Dividend, - IN INT64 Divisor, - OUT INT64 *Remainder OPTIONAL + IN INT64 Dividend, + IN INT64 Divisor, + OUT INT64 *Remainder OPTIONAL ) { - INT64 Quot; + INT64 Quot; Quot = InternalMathDivRemU64x64 ( - (UINT64) (Dividend >= 0 ? Dividend : -Dividend), - (UINT64) (Divisor >= 0 ? Divisor : -Divisor), - (UINT64 *) Remainder + (UINT64)(Dividend >= 0 ? Dividend : -Dividend), + (UINT64)(Divisor >= 0 ? Divisor : -Divisor), + (UINT64 *)Remainder ); - if (Remainder != NULL && Dividend < 0) { + if ((Remainder != NULL) && (Dividend < 0)) { *Remainder = -*Remainder; } + return (Dividend ^ Divisor) >= 0 ? Quot : -Quot; } diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32.c b/MdePkg/Library/BaseLib/Ia32/DivU64x32.c index 538f77a..c46abba 100644 --- a/MdePkg/Library/BaseLib/Ia32/DivU64x32.c +++ b/MdePkg/Library/BaseLib/Ia32/DivU64x32.c @@ -6,9 +6,6 @@ **/ - - - /** Divides a 64-bit unsigned integer by a 32-bit unsigned integer and generates a 64-bit unsigned result. @@ -26,8 +23,8 @@ UINT64 EFIAPI InternalMathDivU64x32 ( - IN UINT64 Dividend, - IN UINT32 Divisor + IN UINT64 Dividend, + IN UINT32 Divisor ) { _asm { @@ -41,4 +38,3 @@ InternalMathDivU64x32 ( pop edx ; restore high-order dword of the quotient } } - diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.c b/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.c index 035d434..a32d627 100644 --- a/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.c +++ b/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.c @@ -26,9 +26,9 @@ UINT64 EFIAPI InternalMathDivRemU64x32 ( - IN UINT64 Dividend, - IN UINT32 Divisor, - OUT UINT32 *Remainder + IN UINT64 Dividend, + IN UINT32 Divisor, + OUT UINT32 *Remainder ) { _asm { @@ -46,4 +46,3 @@ RemainderNull: pop edx } } - diff --git a/MdePkg/Library/BaseLib/Ia32/EnableCache.c b/MdePkg/Library/BaseLib/Ia32/EnableCache.c index 4f5c6e9..3b354af 100644 --- a/MdePkg/Library/BaseLib/Ia32/EnableCache.c +++ b/MdePkg/Library/BaseLib/Ia32/EnableCache.c @@ -27,4 +27,3 @@ AsmEnableCache ( mov cr0, eax } } - diff --git a/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.c b/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.c index 7ec6214..88b9171 100644 --- a/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.c +++ b/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.c @@ -6,9 +6,6 @@ **/ - - - /** Enables CPU interrupts for the smallest window required to capture any pending interrupts. @@ -27,4 +24,3 @@ EnableDisableInterrupts ( cli } } - diff --git a/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.c b/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.c index bc03144..570c39d 100644 --- a/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.c +++ b/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.c @@ -6,9 +6,6 @@ **/ - - - /** Enables CPU interrupts. @@ -23,4 +20,3 @@ EnableInterrupts ( sti } } - diff --git a/MdePkg/Library/BaseLib/Ia32/EnablePaging32.c b/MdePkg/Library/BaseLib/Ia32/EnablePaging32.c index 7280c12..3c3e347 100644 --- a/MdePkg/Library/BaseLib/Ia32/EnablePaging32.c +++ b/MdePkg/Library/BaseLib/Ia32/EnablePaging32.c @@ -41,7 +41,7 @@ function after paging is enabled. **/ -__declspec (naked) +__declspec(naked) VOID EFIAPI InternalX86EnablePaging32 ( diff --git a/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.c b/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.c index 8fbda06..d646688 100644 --- a/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.c +++ b/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.c @@ -6,9 +6,6 @@ **/ - - - /** Flushes a cache line from all the instruction and data caches within the coherency domain of the CPU. @@ -27,7 +24,7 @@ VOID * EFIAPI AsmFlushCacheLine ( - IN VOID *LinearAddress + IN VOID *LinearAddress ) { // @@ -49,4 +46,3 @@ Done: return LinearAddress; } - diff --git a/MdePkg/Library/BaseLib/Ia32/FxRestore.c b/MdePkg/Library/BaseLib/Ia32/FxRestore.c index ddd1e49..5ebb281 100644 --- a/MdePkg/Library/BaseLib/Ia32/FxRestore.c +++ b/MdePkg/Library/BaseLib/Ia32/FxRestore.c @@ -6,10 +6,8 @@ **/ - #include "BaseLibInternals.h" - /** Restores the current floating point/SSE/SSE2 context from a buffer. @@ -23,7 +21,7 @@ VOID EFIAPI InternalX86FxRestore ( - IN CONST IA32_FX_BUFFER *Buffer + IN CONST IA32_FX_BUFFER *Buffer ) { _asm { @@ -31,4 +29,3 @@ InternalX86FxRestore ( fxrstor [eax] } } - diff --git a/MdePkg/Library/BaseLib/Ia32/FxSave.c b/MdePkg/Library/BaseLib/Ia32/FxSave.c index a8c8882..fc489c5 100644 --- a/MdePkg/Library/BaseLib/Ia32/FxSave.c +++ b/MdePkg/Library/BaseLib/Ia32/FxSave.c @@ -6,10 +6,8 @@ **/ - #include "BaseLibInternals.h" - /** Save the current floating point/SSE/SSE2 context to a buffer. @@ -23,7 +21,7 @@ VOID EFIAPI InternalX86FxSave ( - OUT IA32_FX_BUFFER *Buffer + OUT IA32_FX_BUFFER *Buffer ) { _asm { @@ -31,4 +29,3 @@ InternalX86FxSave ( fxsave [eax] } } - diff --git a/MdePkg/Library/BaseLib/Ia32/GccInline.c b/MdePkg/Library/BaseLib/Ia32/GccInline.c index 6ed9381..dab20c8 100644 --- a/MdePkg/Library/BaseLib/Ia32/GccInline.c +++ b/MdePkg/Library/BaseLib/Ia32/GccInline.c @@ -7,7 +7,6 @@ **/ - #include "BaseLibInternals.h" /** @@ -77,13 +76,13 @@ AsmReadEflags ( VOID ) { - UINTN Eflags; + UINTN Eflags; __asm__ __volatile__ ( "pushfl \n\t" "popl %0 " : "=r" (Eflags) - ); + ); return Eflags; } @@ -101,17 +100,16 @@ AsmReadEflags ( VOID EFIAPI InternalX86FxSave ( - OUT IA32_FX_BUFFER *Buffer + OUT IA32_FX_BUFFER *Buffer ) { __asm__ __volatile__ ( "fxsave %0" : : "m" (*Buffer) // %0 - ); + ); } - /** Restores the current floating point/SSE/SSE2 context from a buffer. @@ -125,17 +123,16 @@ InternalX86FxSave ( VOID EFIAPI InternalX86FxRestore ( - IN CONST IA32_FX_BUFFER *Buffer + IN CONST IA32_FX_BUFFER *Buffer ) { __asm__ __volatile__ ( "fxrstor %0" : : "m" (*Buffer) // %0 - ); + ); } - /** Reads the current value of 64-bit MMX Register #0 (MM0). @@ -160,12 +157,11 @@ AsmReadMm0 ( "pop %%eax \n\t" "pop %%edx \n\t" : "=A" (Data) // %0 - ); + ); return Data; } - /** Reads the current value of 64-bit MMX Register #1 (MM1). @@ -190,12 +186,11 @@ AsmReadMm1 ( "pop %%eax \n\t" "pop %%edx \n\t" : "=A" (Data) // %0 - ); + ); return Data; } - /** Reads the current value of 64-bit MMX Register #2 (MM2). @@ -220,12 +215,11 @@ AsmReadMm2 ( "pop %%eax \n\t" "pop %%edx \n\t" : "=A" (Data) // %0 - ); + ); return Data; } - /** Reads the current value of 64-bit MMX Register #3 (MM3). @@ -250,12 +244,11 @@ AsmReadMm3 ( "pop %%eax \n\t" "pop %%edx \n\t" : "=A" (Data) // %0 - ); + ); return Data; } - /** Reads the current value of 64-bit MMX Register #4 (MM4). @@ -280,12 +273,11 @@ AsmReadMm4 ( "pop %%eax \n\t" "pop %%edx \n\t" : "=A" (Data) // %0 - ); + ); return Data; } - /** Reads the current value of 64-bit MMX Register #5 (MM5). @@ -310,12 +302,11 @@ AsmReadMm5 ( "pop %%eax \n\t" "pop %%edx \n\t" : "=A" (Data) // %0 - ); + ); return Data; } - /** Reads the current value of 64-bit MMX Register #6 (MM6). @@ -340,12 +331,11 @@ AsmReadMm6 ( "pop %%eax \n\t" "pop %%edx \n\t" : "=A" (Data) // %0 - ); + ); return Data; } - /** Reads the current value of 64-bit MMX Register #7 (MM7). @@ -370,12 +360,11 @@ AsmReadMm7 ( "pop %%eax \n\t" "pop %%edx \n\t" : "=A" (Data) // %0 - ); + ); return Data; } - /** Writes the current value of 64-bit MMX Register #0 (MM0). @@ -388,17 +377,16 @@ AsmReadMm7 ( VOID EFIAPI AsmWriteMm0 ( - IN UINT64 Value + IN UINT64 Value ) { __asm__ __volatile__ ( "movq %0, %%mm0" // %0 : : "m" (Value) - ); + ); } - /** Writes the current value of 64-bit MMX Register #1 (MM1). @@ -411,17 +399,16 @@ AsmWriteMm0 ( VOID EFIAPI AsmWriteMm1 ( - IN UINT64 Value + IN UINT64 Value ) { __asm__ __volatile__ ( "movq %0, %%mm1" // %0 : : "m" (Value) - ); + ); } - /** Writes the current value of 64-bit MMX Register #2 (MM2). @@ -434,17 +421,16 @@ AsmWriteMm1 ( VOID EFIAPI AsmWriteMm2 ( - IN UINT64 Value + IN UINT64 Value ) { __asm__ __volatile__ ( "movq %0, %%mm2" // %0 : : "m" (Value) - ); + ); } - /** Writes the current value of 64-bit MMX Register #3 (MM3). @@ -457,17 +443,16 @@ AsmWriteMm2 ( VOID EFIAPI AsmWriteMm3 ( - IN UINT64 Value + IN UINT64 Value ) { __asm__ __volatile__ ( "movq %0, %%mm3" // %0 : : "m" (Value) - ); + ); } - /** Writes the current value of 64-bit MMX Register #4 (MM4). @@ -480,17 +465,16 @@ AsmWriteMm3 ( VOID EFIAPI AsmWriteMm4 ( - IN UINT64 Value + IN UINT64 Value ) { __asm__ __volatile__ ( "movq %0, %%mm4" // %0 : : "m" (Value) - ); + ); } - /** Writes the current value of 64-bit MMX Register #5 (MM5). @@ -503,17 +487,16 @@ AsmWriteMm4 ( VOID EFIAPI AsmWriteMm5 ( - IN UINT64 Value + IN UINT64 Value ) { __asm__ __volatile__ ( "movq %0, %%mm5" // %0 : : "m" (Value) - ); + ); } - /** Writes the current value of 64-bit MMX Register #6 (MM6). @@ -526,17 +509,16 @@ AsmWriteMm5 ( VOID EFIAPI AsmWriteMm6 ( - IN UINT64 Value + IN UINT64 Value ) { __asm__ __volatile__ ( "movq %0, %%mm6" // %0 : : "m" (Value) - ); + ); } - /** Writes the current value of 64-bit MMX Register #7 (MM7). @@ -549,17 +531,16 @@ AsmWriteMm6 ( VOID EFIAPI AsmWriteMm7 ( - IN UINT64 Value + IN UINT64 Value ) { __asm__ __volatile__ ( "movq %0, %%mm7" // %0 : : "m" (Value) - ); + ); } - /** Reads the current value of Time Stamp Counter (TSC). @@ -580,7 +561,7 @@ AsmReadTsc ( __asm__ __volatile__ ( "rdtsc" : "=A" (Data) - ); + ); return Data; } diff --git a/MdePkg/Library/BaseLib/Ia32/GccInlinePriv.c b/MdePkg/Library/BaseLib/Ia32/GccInlinePriv.c index b8b5b85..df22a21 100644 --- a/MdePkg/Library/BaseLib/Ia32/GccInlinePriv.c +++ b/MdePkg/Library/BaseLib/Ia32/GccInlinePriv.c @@ -8,7 +8,6 @@ **/ - #include "BaseLibInternals.h" #include @@ -27,7 +26,6 @@ EnableInterrupts ( __asm__ __volatile__ ("sti"::: "memory"); } - /** Disables CPU interrupts. @@ -60,11 +58,11 @@ DisableInterrupts ( UINT64 EFIAPI AsmReadMsr64 ( - IN UINT32 Index + IN UINT32 Index ) { - UINT64 Data; - BOOLEAN Flag; + UINT64 Data; + BOOLEAN Flag; Flag = FilterBeforeMsrRead (Index, &Data); if (Flag) { @@ -72,8 +70,9 @@ AsmReadMsr64 ( "rdmsr" : "=A" (Data) // %0 : "c" (Index) // %1 - ); + ); } + FilterAfterMsrRead (Index, &Data); return Data; @@ -99,8 +98,8 @@ AsmReadMsr64 ( UINT64 EFIAPI AsmWriteMsr64 ( - IN UINT32 Index, - IN UINT64 Value + IN UINT32 Index, + IN UINT64 Value ) { BOOLEAN Flag; @@ -112,8 +111,9 @@ AsmWriteMsr64 ( : : "c" (Index), "A" (Value) - ); + ); } + FilterAfterMsrWrite (Index, &Value); return Value; @@ -135,17 +135,16 @@ AsmReadCr0 ( VOID ) { - UINTN Data; + UINTN Data; __asm__ __volatile__ ( "movl %%cr0,%0" : "=a" (Data) - ); + ); return Data; } - /** Reads the current value of the Control Register 2 (CR2). @@ -162,12 +161,12 @@ AsmReadCr2 ( VOID ) { - UINTN Data; + UINTN Data; __asm__ __volatile__ ( "movl %%cr2, %0" : "=r" (Data) - ); + ); return Data; } @@ -188,17 +187,16 @@ AsmReadCr3 ( VOID ) { - UINTN Data; + UINTN Data; __asm__ __volatile__ ( "movl %%cr3, %0" : "=r" (Data) - ); + ); return Data; } - /** Reads the current value of the Control Register 4 (CR4). @@ -215,17 +213,16 @@ AsmReadCr4 ( VOID ) { - UINTN Data; + UINTN Data; __asm__ __volatile__ ( "movl %%cr4, %0" : "=a" (Data) - ); + ); return Data; } - /** Writes a value to Control Register 0 (CR0). @@ -247,11 +244,10 @@ AsmWriteCr0 ( "movl %0, %%cr0" : : "r" (Cr0) - ); + ); return Cr0; } - /** Writes a value to Control Register 2 (CR2). @@ -273,11 +269,10 @@ AsmWriteCr2 ( "movl %0, %%cr2" : : "r" (Cr2) - ); + ); return Cr2; } - /** Writes a value to Control Register 3 (CR3). @@ -299,11 +294,10 @@ AsmWriteCr3 ( "movl %0, %%cr3" : : "r" (Cr3) - ); + ); return Cr3; } - /** Writes a value to Control Register 4 (CR4). @@ -325,11 +319,10 @@ AsmWriteCr4 ( "movl %0, %%cr4" : : "r" (Cr4) - ); + ); return Cr4; } - /** Reads the current value of Debug Register 0 (DR0). @@ -346,17 +339,16 @@ AsmReadDr0 ( VOID ) { - UINTN Data; + UINTN Data; __asm__ __volatile__ ( "movl %%dr0, %0" : "=r" (Data) - ); + ); return Data; } - /** Reads the current value of Debug Register 1 (DR1). @@ -373,17 +365,16 @@ AsmReadDr1 ( VOID ) { - UINTN Data; + UINTN Data; __asm__ __volatile__ ( "movl %%dr1, %0" : "=r" (Data) - ); + ); return Data; } - /** Reads the current value of Debug Register 2 (DR2). @@ -400,17 +391,16 @@ AsmReadDr2 ( VOID ) { - UINTN Data; + UINTN Data; __asm__ __volatile__ ( "movl %%dr2, %0" : "=r" (Data) - ); + ); return Data; } - /** Reads the current value of Debug Register 3 (DR3). @@ -427,17 +417,16 @@ AsmReadDr3 ( VOID ) { - UINTN Data; + UINTN Data; __asm__ __volatile__ ( "movl %%dr3, %0" : "=r" (Data) - ); + ); return Data; } - /** Reads the current value of Debug Register 4 (DR4). @@ -454,17 +443,16 @@ AsmReadDr4 ( VOID ) { - UINTN Data; + UINTN Data; __asm__ __volatile__ ( "movl %%dr4, %0" : "=r" (Data) - ); + ); return Data; } - /** Reads the current value of Debug Register 5 (DR5). @@ -481,17 +469,16 @@ AsmReadDr5 ( VOID ) { - UINTN Data; + UINTN Data; __asm__ __volatile__ ( "movl %%dr5, %0" : "=r" (Data) - ); + ); return Data; } - /** Reads the current value of Debug Register 6 (DR6). @@ -508,17 +495,16 @@ AsmReadDr6 ( VOID ) { - UINTN Data; + UINTN Data; __asm__ __volatile__ ( "movl %%dr6, %0" : "=r" (Data) - ); + ); return Data; } - /** Reads the current value of Debug Register 7 (DR7). @@ -535,17 +521,16 @@ AsmReadDr7 ( VOID ) { - UINTN Data; + UINTN Data; __asm__ __volatile__ ( "movl %%dr7, %0" : "=r" (Data) - ); + ); return Data; } - /** Writes a value to Debug Register 0 (DR0). @@ -567,11 +552,10 @@ AsmWriteDr0 ( "movl %0, %%dr0" : : "r" (Dr0) - ); + ); return Dr0; } - /** Writes a value to Debug Register 1 (DR1). @@ -593,11 +577,10 @@ AsmWriteDr1 ( "movl %0, %%dr1" : : "r" (Dr1) - ); + ); return Dr1; } - /** Writes a value to Debug Register 2 (DR2). @@ -619,11 +602,10 @@ AsmWriteDr2 ( "movl %0, %%dr2" : : "r" (Dr2) - ); + ); return Dr2; } - /** Writes a value to Debug Register 3 (DR3). @@ -645,11 +627,10 @@ AsmWriteDr3 ( "movl %0, %%dr3" : : "r" (Dr3) - ); + ); return Dr3; } - /** Writes a value to Debug Register 4 (DR4). @@ -671,11 +652,10 @@ AsmWriteDr4 ( "movl %0, %%dr4" : : "r" (Dr4) - ); + ); return Dr4; } - /** Writes a value to Debug Register 5 (DR5). @@ -697,11 +677,10 @@ AsmWriteDr5 ( "movl %0, %%dr5" : : "r" (Dr5) - ); + ); return Dr5; } - /** Writes a value to Debug Register 6 (DR6). @@ -723,11 +702,10 @@ AsmWriteDr6 ( "movl %0, %%dr6" : : "r" (Dr6) - ); + ); return Dr6; } - /** Writes a value to Debug Register 7 (DR7). @@ -749,11 +727,10 @@ AsmWriteDr7 ( "movl %0, %%dr7" : : "r" (Dr7) - ); + ); return Dr7; } - /** Reads the current value of Code Segment Register (CS). @@ -774,12 +751,11 @@ AsmReadCs ( __asm__ __volatile__ ( "mov %%cs, %0" :"=a" (Data) - ); + ); return Data; } - /** Reads the current value of Data Segment Register (DS). @@ -800,12 +776,11 @@ AsmReadDs ( __asm__ __volatile__ ( "mov %%ds, %0" :"=a" (Data) - ); + ); return Data; } - /** Reads the current value of Extra Segment Register (ES). @@ -826,12 +801,11 @@ AsmReadEs ( __asm__ __volatile__ ( "mov %%es, %0" :"=a" (Data) - ); + ); return Data; } - /** Reads the current value of FS Data Segment Register (FS). @@ -852,12 +826,11 @@ AsmReadFs ( __asm__ __volatile__ ( "mov %%fs, %0" :"=a" (Data) - ); + ); return Data; } - /** Reads the current value of GS Data Segment Register (GS). @@ -878,12 +851,11 @@ AsmReadGs ( __asm__ __volatile__ ( "mov %%gs, %0" :"=a" (Data) - ); + ); return Data; } - /** Reads the current value of Stack Segment Register (SS). @@ -904,12 +876,11 @@ AsmReadSs ( __asm__ __volatile__ ( "mov %%ss, %0" :"=a" (Data) - ); + ); return Data; } - /** Reads the current value of Task Register (TR). @@ -930,12 +901,11 @@ AsmReadTr ( __asm__ __volatile__ ( "str %0" : "=a" (Data) - ); + ); return Data; } - /** Reads the current Global Descriptor Table Register(GDTR) descriptor. @@ -948,16 +918,15 @@ AsmReadTr ( VOID EFIAPI InternalX86ReadGdtr ( - OUT IA32_DESCRIPTOR *Gdtr + OUT IA32_DESCRIPTOR *Gdtr ) { __asm__ __volatile__ ( "sgdt %0" : "=m" (*Gdtr) - ); + ); } - /** Writes the current Global Descriptor Table Register (GDTR) descriptor. @@ -970,18 +939,16 @@ InternalX86ReadGdtr ( VOID EFIAPI InternalX86WriteGdtr ( - IN CONST IA32_DESCRIPTOR *Gdtr + IN CONST IA32_DESCRIPTOR *Gdtr ) { __asm__ __volatile__ ( "lgdt %0" : : "m" (*Gdtr) - ); - + ); } - /** Reads the current Interrupt Descriptor Table Register(GDTR) descriptor. @@ -994,16 +961,15 @@ InternalX86WriteGdtr ( VOID EFIAPI InternalX86ReadIdtr ( - OUT IA32_DESCRIPTOR *Idtr + OUT IA32_DESCRIPTOR *Idtr ) { __asm__ __volatile__ ( "sidt %0" : "=m" (*Idtr) - ); + ); } - /** Writes the current Interrupt Descriptor Table Register(GDTR) descriptor. @@ -1016,17 +982,16 @@ InternalX86ReadIdtr ( VOID EFIAPI InternalX86WriteIdtr ( - IN CONST IA32_DESCRIPTOR *Idtr + IN CONST IA32_DESCRIPTOR *Idtr ) { __asm__ __volatile__ ( "lidt %0" : : "m" (*Idtr) - ); + ); } - /** Reads the current Local Descriptor Table Register(LDTR) selector. @@ -1047,12 +1012,11 @@ AsmReadLdtr ( __asm__ __volatile__ ( "sldt %0" : "=g" (Data) // %0 - ); + ); return Data; } - /** Writes the current Local Descriptor Table Register (GDTR) selector. @@ -1065,14 +1029,14 @@ AsmReadLdtr ( VOID EFIAPI AsmWriteLdtr ( - IN UINT16 Ldtr + IN UINT16 Ldtr ) { __asm__ __volatile__ ( "lldtw %0" : : "g" (Ldtr) // %0 - ); + ); } /** @@ -1089,7 +1053,7 @@ AsmWriteLdtr ( UINT64 EFIAPI AsmReadPmc ( - IN UINT32 Index + IN UINT32 Index ) { UINT64 Data; @@ -1098,7 +1062,7 @@ AsmReadPmc ( "rdpmc" : "=A" (Data) : "c" (Index) - ); + ); return Data; } @@ -1133,10 +1097,8 @@ AsmInvd ( ) { __asm__ __volatile__ ("invd":::"memory"); - } - /** Flushes a cache line from all the instruction and data caches within the coherency domain of the CPU. @@ -1155,7 +1117,7 @@ AsmInvd ( VOID * EFIAPI AsmFlushCacheLine ( - IN VOID *LinearAddress + IN VOID *LinearAddress ) { UINT32 RegEdx; @@ -1170,13 +1132,12 @@ AsmFlushCacheLine ( return LinearAddress; } - __asm__ __volatile__ ( "clflush (%0)" : "+a" (LinearAddress) : : "memory" - ); + ); return LinearAddress; } diff --git a/MdePkg/Library/BaseLib/Ia32/InternalSwitchStack.c b/MdePkg/Library/BaseLib/Ia32/InternalSwitchStack.c index 14647f2..9d586c3 100644 --- a/MdePkg/Library/BaseLib/Ia32/InternalSwitchStack.c +++ b/MdePkg/Library/BaseLib/Ia32/InternalSwitchStack.c @@ -44,11 +44,11 @@ InternalSwitchStack ( { BASE_LIBRARY_JUMP_BUFFER JumpBuffer; - JumpBuffer.Eip = (UINTN)EntryPoint; - JumpBuffer.Esp = (UINTN)NewStack - sizeof (VOID*); - JumpBuffer.Esp -= sizeof (Context1) + sizeof (Context2); - ((VOID**)JumpBuffer.Esp)[1] = Context1; - ((VOID**)JumpBuffer.Esp)[2] = Context2; + JumpBuffer.Eip = (UINTN)EntryPoint; + JumpBuffer.Esp = (UINTN)NewStack - sizeof (VOID *); + JumpBuffer.Esp -= sizeof (Context1) + sizeof (Context2); + ((VOID **)JumpBuffer.Esp)[1] = Context1; + ((VOID **)JumpBuffer.Esp)[2] = Context2; LongJump (&JumpBuffer, (UINTN)-1); } diff --git a/MdePkg/Library/BaseLib/Ia32/Invd.c b/MdePkg/Library/BaseLib/Ia32/Invd.c index 9870cf9..3c526b5 100644 --- a/MdePkg/Library/BaseLib/Ia32/Invd.c +++ b/MdePkg/Library/BaseLib/Ia32/Invd.c @@ -6,9 +6,6 @@ **/ - - - /** Executes a INVD instruction. @@ -26,4 +23,3 @@ AsmInvd ( invd } } - diff --git a/MdePkg/Library/BaseLib/Ia32/LRotU64.c b/MdePkg/Library/BaseLib/Ia32/LRotU64.c index 87d370c..496b9de 100644 --- a/MdePkg/Library/BaseLib/Ia32/LRotU64.c +++ b/MdePkg/Library/BaseLib/Ia32/LRotU64.c @@ -6,9 +6,6 @@ **/ - - - /** Rotates a 64-bit integer left between 0 and 63 bits, filling the low bits with the high bits that were rotated. @@ -26,8 +23,8 @@ UINT64 EFIAPI InternalMathLRotU64 ( - IN UINT64 Operand, - IN UINTN Count + IN UINT64 Operand, + IN UINTN Count ) { _asm { @@ -43,7 +40,6 @@ InternalMathLRotU64 ( mov ecx, eax mov eax, edx mov edx, ecx -L0: + L0 : } } - diff --git a/MdePkg/Library/BaseLib/Ia32/LShiftU64.c b/MdePkg/Library/BaseLib/Ia32/LShiftU64.c index 1604e7e..c8ee0df 100644 --- a/MdePkg/Library/BaseLib/Ia32/LShiftU64.c +++ b/MdePkg/Library/BaseLib/Ia32/LShiftU64.c @@ -6,9 +6,6 @@ **/ - - - /** Shifts a 64-bit integer left between 0 and 63 bits. The low bits are filled with zeros. The shifted value is returned. @@ -25,8 +22,8 @@ UINT64 EFIAPI InternalMathLShiftU64 ( - IN UINT64 Operand, - IN UINTN Count + IN UINT64 Operand, + IN UINTN Count ) { _asm { @@ -42,4 +39,3 @@ L0: shl eax, cl } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ModU64x32.c b/MdePkg/Library/BaseLib/Ia32/ModU64x32.c index 26a19cb..d5f84e2 100644 --- a/MdePkg/Library/BaseLib/Ia32/ModU64x32.c +++ b/MdePkg/Library/BaseLib/Ia32/ModU64x32.c @@ -6,9 +6,6 @@ **/ - - - /** Divides a 64-bit unsigned integer by a 32-bit unsigned integer and generates a 32-bit unsigned remainder. @@ -26,8 +23,8 @@ UINT32 EFIAPI InternalMathModU64x32 ( - IN UINT64 Dividend, - IN UINT32 Divisor + IN UINT64 Dividend, + IN UINT32 Divisor ) { _asm { diff --git a/MdePkg/Library/BaseLib/Ia32/Monitor.c b/MdePkg/Library/BaseLib/Ia32/Monitor.c index 966b128..630bf0c 100644 --- a/MdePkg/Library/BaseLib/Ia32/Monitor.c +++ b/MdePkg/Library/BaseLib/Ia32/Monitor.c @@ -25,9 +25,9 @@ UINTN EFIAPI AsmMonitor ( - IN UINTN RegisterEax, - IN UINTN RegisterEcx, - IN UINTN RegisterEdx + IN UINTN RegisterEax, + IN UINTN RegisterEcx, + IN UINTN RegisterEdx ) { _asm { @@ -39,4 +39,3 @@ AsmMonitor ( _emit 0xc8 } } - diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x32.c b/MdePkg/Library/BaseLib/Ia32/MultU64x32.c index a728684..e382eff 100644 --- a/MdePkg/Library/BaseLib/Ia32/MultU64x32.c +++ b/MdePkg/Library/BaseLib/Ia32/MultU64x32.c @@ -6,9 +6,6 @@ **/ - - - /** Multiples a 64-bit unsigned integer by a 32-bit unsigned integer and generates a 64-bit unsigned result. @@ -26,8 +23,8 @@ UINT64 EFIAPI InternalMathMultU64x32 ( - IN UINT64 Multiplicand, - IN UINT32 Multiplier + IN UINT64 Multiplicand, + IN UINT32 Multiplier ) { _asm { @@ -38,4 +35,3 @@ InternalMathMultU64x32 ( add edx, ecx } } - diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x64.c b/MdePkg/Library/BaseLib/Ia32/MultU64x64.c index 806cbd5..d5aff3f 100644 --- a/MdePkg/Library/BaseLib/Ia32/MultU64x64.c +++ b/MdePkg/Library/BaseLib/Ia32/MultU64x64.c @@ -6,9 +6,6 @@ **/ - - - /** Multiplies a 64-bit unsigned integer by a 64-bit unsigned integer and generates a 64-bit unsigned result. @@ -26,8 +23,8 @@ UINT64 EFIAPI InternalMathMultU64x64 ( - IN UINT64 Multiplicand, - IN UINT64 Multiplier + IN UINT64 Multiplicand, + IN UINT64 Multiplier ) { _asm { @@ -42,4 +39,3 @@ InternalMathMultU64x64 ( add edx, ebx } } - diff --git a/MdePkg/Library/BaseLib/Ia32/Mwait.c b/MdePkg/Library/BaseLib/Ia32/Mwait.c index 08c666f..143082a 100644 --- a/MdePkg/Library/BaseLib/Ia32/Mwait.c +++ b/MdePkg/Library/BaseLib/Ia32/Mwait.c @@ -23,8 +23,8 @@ UINTN EFIAPI AsmMwait ( - IN UINTN RegisterEax, - IN UINTN RegisterEcx + IN UINTN RegisterEax, + IN UINTN RegisterEcx ) { _asm { @@ -35,4 +35,3 @@ AsmMwait ( _emit 0xC9 } } - diff --git a/MdePkg/Library/BaseLib/Ia32/Non-existing.c b/MdePkg/Library/BaseLib/Ia32/Non-existing.c index 3854d90..7765f58 100644 --- a/MdePkg/Library/BaseLib/Ia32/Non-existing.c +++ b/MdePkg/Library/BaseLib/Ia32/Non-existing.c @@ -37,11 +37,11 @@ VOID EFIAPI InternalX86DisablePaging64 ( - IN UINT16 CodeSelector, - IN UINT32 EntryPoint, - IN UINT32 Context1 OPTIONAL, - IN UINT32 Context2 OPTIONAL, - IN UINT32 NewStack + IN UINT16 CodeSelector, + IN UINT32 EntryPoint, + IN UINT32 Context1 OPTIONAL, + IN UINT32 Context2 OPTIONAL, + IN UINT32 NewStack ) { // diff --git a/MdePkg/Library/BaseLib/Ia32/RRotU64.c b/MdePkg/Library/BaseLib/Ia32/RRotU64.c index 82711a5..89477c2 100644 --- a/MdePkg/Library/BaseLib/Ia32/RRotU64.c +++ b/MdePkg/Library/BaseLib/Ia32/RRotU64.c @@ -6,9 +6,6 @@ **/ - - - /** Rotates a 64-bit integer right between 0 and 63 bits, filling the high bits with the high low bits that were rotated. @@ -26,8 +23,8 @@ UINT64 EFIAPI InternalMathRRotU64 ( - IN UINT64 Operand, - IN UINTN Count + IN UINT64 Operand, + IN UINTN Count ) { _asm { @@ -46,4 +43,3 @@ InternalMathRRotU64 ( L0: } } - diff --git a/MdePkg/Library/BaseLib/Ia32/RShiftU64.c b/MdePkg/Library/BaseLib/Ia32/RShiftU64.c index 35d8437..5aa7a85 100644 --- a/MdePkg/Library/BaseLib/Ia32/RShiftU64.c +++ b/MdePkg/Library/BaseLib/Ia32/RShiftU64.c @@ -6,9 +6,6 @@ **/ - - - /** Shifts a 64-bit integer right between 0 and 63 bits. This high bits are filled with zeros. The shifted value is returned. @@ -25,8 +22,8 @@ UINT64 EFIAPI InternalMathRShiftU64 ( - IN UINT64 Operand, - IN UINTN Count + IN UINT64 Operand, + IN UINTN Count ) { _asm { @@ -42,4 +39,3 @@ L0: shr edx, cl } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr0.c b/MdePkg/Library/BaseLib/Ia32/ReadCr0.c index 4a37c7b..7395218 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadCr0.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadCr0.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of the Control Register 0 (CR0). diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr2.c b/MdePkg/Library/BaseLib/Ia32/ReadCr2.c index feab380..2de1c50 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadCr2.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadCr2.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of the Control Register 2 (CR2). @@ -29,4 +26,3 @@ AsmReadCr2 ( mov eax, cr2 } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr3.c b/MdePkg/Library/BaseLib/Ia32/ReadCr3.c index b00e324..144b780 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadCr3.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadCr3.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of the Control Register 3 (CR3). @@ -29,4 +26,3 @@ AsmReadCr3 ( mov eax, cr3 } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr4.c b/MdePkg/Library/BaseLib/Ia32/ReadCr4.c index f948f82..c061661 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadCr4.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadCr4.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of the Control Register 4 (CR4). @@ -31,4 +28,3 @@ AsmReadCr4 ( _emit 0xE0 } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCs.c b/MdePkg/Library/BaseLib/Ia32/ReadCs.c index 02f23f5..3a603f1 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadCs.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadCs.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of Code Segment Register (CS). @@ -29,4 +26,3 @@ AsmReadCs ( mov ax, cs } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr0.c b/MdePkg/Library/BaseLib/Ia32/ReadDr0.c index 5418f92..80bb9b7 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr0.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr0.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of Debug Register 0 (DR0). @@ -29,4 +26,3 @@ AsmReadDr0 ( mov eax, dr0 } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr1.c b/MdePkg/Library/BaseLib/Ia32/ReadDr1.c index d72adaad..9ca51ce 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr1.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr1.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of Debug Register 1 (DR1). @@ -29,4 +26,3 @@ AsmReadDr1 ( mov eax, dr1 } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr2.c b/MdePkg/Library/BaseLib/Ia32/ReadDr2.c index fde7997..1e8007d 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr2.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr2.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of Debug Register 2 (DR2). @@ -29,4 +26,3 @@ AsmReadDr2 ( mov eax, dr2 } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr3.c b/MdePkg/Library/BaseLib/Ia32/ReadDr3.c index 9b899e7..3a2d741 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr3.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr3.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of Debug Register 3 (DR3). @@ -29,4 +26,3 @@ AsmReadDr3 ( mov eax, dr3 } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr4.c b/MdePkg/Library/BaseLib/Ia32/ReadDr4.c index 52293d3..5d7e543 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr4.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr4.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of Debug Register 4 (DR4). @@ -31,4 +28,3 @@ AsmReadDr4 ( _emit 0xe0 } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr5.c b/MdePkg/Library/BaseLib/Ia32/ReadDr5.c index ecf6dc2..2418d22 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr5.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr5.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of Debug Register 5 (DR5). @@ -31,4 +28,3 @@ AsmReadDr5 ( _emit 0xe8 } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr6.c b/MdePkg/Library/BaseLib/Ia32/ReadDr6.c index 2b08297..4316682 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr6.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr6.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of Debug Register 6 (DR6). @@ -29,4 +26,3 @@ AsmReadDr6 ( mov eax, dr6 } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr7.c b/MdePkg/Library/BaseLib/Ia32/ReadDr7.c index 8be8048..670c695 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDr7.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr7.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of Debug Register 7 (DR7). @@ -29,4 +26,3 @@ AsmReadDr7 ( mov eax, dr7 } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDs.c b/MdePkg/Library/BaseLib/Ia32/ReadDs.c index 3cdada3..d293bcf 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadDs.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadDs.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of Data Segment Register (DS). @@ -29,4 +26,3 @@ AsmReadDs ( mov ax, ds } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadEflags.c b/MdePkg/Library/BaseLib/Ia32/ReadEflags.c index 1cea323..af33755 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadEflags.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadEflags.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of the EFLAGS register. @@ -30,4 +27,3 @@ AsmReadEflags ( pop eax } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadEs.c b/MdePkg/Library/BaseLib/Ia32/ReadEs.c index 30953fd..22c10be 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadEs.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadEs.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of ES Data Segment Register (ES). @@ -29,4 +26,3 @@ AsmReadEs ( mov ax, es } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadFs.c b/MdePkg/Library/BaseLib/Ia32/ReadFs.c index 51fb020..500058d 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadFs.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadFs.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of FS Data Segment Register (FS). @@ -29,4 +26,3 @@ AsmReadFs ( mov ax, fs } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadGdtr.c b/MdePkg/Library/BaseLib/Ia32/ReadGdtr.c index 5b01300..8f6d612 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadGdtr.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadGdtr.c @@ -6,10 +6,8 @@ **/ - #include "BaseLibInternals.h" - /** Reads the current Global Descriptor Table Register(GDTR) descriptor. @@ -30,4 +28,3 @@ InternalX86ReadGdtr ( sgdt fword ptr [eax] } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadGs.c b/MdePkg/Library/BaseLib/Ia32/ReadGs.c index 6209a31..6449447 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadGs.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadGs.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of GS Data Segment Register (GS). @@ -29,4 +26,3 @@ AsmReadGs ( mov ax, gs } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadIdtr.c b/MdePkg/Library/BaseLib/Ia32/ReadIdtr.c index 93f4453..4a717bb 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadIdtr.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadIdtr.c @@ -6,10 +6,8 @@ **/ - #include "BaseLibInternals.h" - /** Reads the current Interrupt Descriptor Table Register(GDTR) descriptor. @@ -22,7 +20,7 @@ VOID EFIAPI InternalX86ReadIdtr ( - OUT IA32_DESCRIPTOR *Idtr + OUT IA32_DESCRIPTOR *Idtr ) { _asm { diff --git a/MdePkg/Library/BaseLib/Ia32/ReadLdtr.c b/MdePkg/Library/BaseLib/Ia32/ReadLdtr.c index 407676a..31978ff 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadLdtr.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadLdtr.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current Local Descriptor Table Register(LDTR) selector. @@ -28,4 +25,3 @@ AsmReadLdtr ( sldt ax } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm0.c b/MdePkg/Library/BaseLib/Ia32/ReadMm0.c index 00dfe05..f54452a 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm0.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm0.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of 64-bit MMX Register #0 (MM0). @@ -33,4 +30,3 @@ AsmReadMm0 ( emms } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm1.c b/MdePkg/Library/BaseLib/Ia32/ReadMm1.c index 0ed311e..027cccc 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm1.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm1.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of 64-bit MMX Register #1 (MM1). @@ -33,4 +30,3 @@ AsmReadMm1 ( emms } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm2.c b/MdePkg/Library/BaseLib/Ia32/ReadMm2.c index bd830c5..25c8caa 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm2.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm2.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of 64-bit MMX Register #2 (MM2). @@ -33,4 +30,3 @@ AsmReadMm2 ( emms } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm3.c b/MdePkg/Library/BaseLib/Ia32/ReadMm3.c index c896708..33aef90 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm3.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm3.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of 64-bit MMX Register #3 (MM3). @@ -33,4 +30,3 @@ AsmReadMm3 ( emms } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm4.c b/MdePkg/Library/BaseLib/Ia32/ReadMm4.c index 9e2794c..c5a646f 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm4.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm4.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of 64-bit MMX Register #4 (MM4). @@ -33,4 +30,3 @@ AsmReadMm4 ( emms } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm5.c b/MdePkg/Library/BaseLib/Ia32/ReadMm5.c index 93cad05..70b97b8 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm5.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm5.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of 64-bit MMX Register #5 (MM5). @@ -33,4 +30,3 @@ AsmReadMm5 ( emms } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm6.c b/MdePkg/Library/BaseLib/Ia32/ReadMm6.c index d2c5591..6b3055c 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm6.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm6.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of 64-bit MMX Register #6 (MM6). @@ -33,4 +30,3 @@ AsmReadMm6 ( emms } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm7.c b/MdePkg/Library/BaseLib/Ia32/ReadMm7.c index 68cf039..9ee911a 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMm7.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMm7.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of 64-bit MMX Register #7 (MM7). @@ -33,4 +30,3 @@ AsmReadMm7 ( emms } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMsr64.c b/MdePkg/Library/BaseLib/Ia32/ReadMsr64.c index afe3aa5..837595c 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadMsr64.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadMsr64.c @@ -6,7 +6,6 @@ **/ - #include /** @@ -54,13 +53,14 @@ AsmReadMsr64 ( IN UINT32 Index ) { - UINT64 Value; - BOOLEAN Flag; + UINT64 Value; + BOOLEAN Flag; Flag = FilterBeforeMsrRead (Index, &Value); if (Flag) { Value = AsmReadMsr64Internal (Index); } + FilterAfterMsrRead (Index, &Value); return Value; diff --git a/MdePkg/Library/BaseLib/Ia32/ReadPmc.c b/MdePkg/Library/BaseLib/Ia32/ReadPmc.c index cc09ed7..0137fe8 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadPmc.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadPmc.c @@ -20,7 +20,7 @@ UINT64 EFIAPI AsmReadPmc ( - IN UINT32 Index + IN UINT32 Index ) { _asm { @@ -28,4 +28,3 @@ AsmReadPmc ( rdpmc } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadSs.c b/MdePkg/Library/BaseLib/Ia32/ReadSs.c index 9d7a641..e5e2311 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadSs.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadSs.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of Stack Segment Register (SS). @@ -29,4 +26,3 @@ AsmReadSs ( mov ax, ss } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadTr.c b/MdePkg/Library/BaseLib/Ia32/ReadTr.c index b52f8f3..bfb5e6b 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadTr.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadTr.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of Task Register (TR). @@ -28,4 +25,3 @@ AsmReadTr ( str ax } } - diff --git a/MdePkg/Library/BaseLib/Ia32/ReadTsc.c b/MdePkg/Library/BaseLib/Ia32/ReadTsc.c index a67b57a..4109b96 100644 --- a/MdePkg/Library/BaseLib/Ia32/ReadTsc.c +++ b/MdePkg/Library/BaseLib/Ia32/ReadTsc.c @@ -6,9 +6,6 @@ **/ - - - /** Reads the current value of Time Stamp Counter (TSC). @@ -28,4 +25,3 @@ AsmReadTsc ( rdtsc } } - diff --git a/MdePkg/Library/BaseLib/Ia32/SwapBytes64.c b/MdePkg/Library/BaseLib/Ia32/SwapBytes64.c index 67587f1..42d4f66 100644 --- a/MdePkg/Library/BaseLib/Ia32/SwapBytes64.c +++ b/MdePkg/Library/BaseLib/Ia32/SwapBytes64.c @@ -6,9 +6,6 @@ **/ - - - /** Switches the endianess of a 64-bit integer. @@ -24,7 +21,7 @@ UINT64 EFIAPI InternalMathSwapBytes64 ( - IN UINT64 Operand + IN UINT64 Operand ) { _asm { @@ -34,4 +31,3 @@ InternalMathSwapBytes64 ( bswap edx } } - diff --git a/MdePkg/Library/BaseLib/Ia32/Wbinvd.c b/MdePkg/Library/BaseLib/Ia32/Wbinvd.c index 87bd71f..f41cb4e 100644 --- a/MdePkg/Library/BaseLib/Ia32/Wbinvd.c +++ b/MdePkg/Library/BaseLib/Ia32/Wbinvd.c @@ -6,9 +6,6 @@ **/ - - - /** Executes a WBINVD instruction. @@ -26,4 +23,3 @@ AsmWbinvd ( wbinvd } } - diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr0.c b/MdePkg/Library/BaseLib/Ia32/WriteCr0.c index 46e49a6..e20f769 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteCr0.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteCr0.c @@ -28,4 +28,3 @@ AsmWriteCr0 ( mov cr0, eax } } - diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr2.c b/MdePkg/Library/BaseLib/Ia32/WriteCr2.c index f437bfc..4571ec9 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteCr2.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteCr2.c @@ -28,4 +28,3 @@ AsmWriteCr2 ( mov cr2, eax } } - diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr3.c b/MdePkg/Library/BaseLib/Ia32/WriteCr3.c index 48cb8ad..29d0ae2 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteCr3.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteCr3.c @@ -28,4 +28,3 @@ AsmWriteCr3 ( mov cr3, eax } } - diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr4.c b/MdePkg/Library/BaseLib/Ia32/WriteCr4.c index 01f059f..f152464 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteCr4.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteCr4.c @@ -30,4 +30,3 @@ AsmWriteCr4 ( _emit 0xE0 } } - diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr0.c b/MdePkg/Library/BaseLib/Ia32/WriteDr0.c index 80bb238..027e1b4 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr0.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr0.c @@ -20,7 +20,7 @@ UINTN EFIAPI AsmWriteDr0 ( - IN UINTN Value + IN UINTN Value ) { _asm { @@ -28,4 +28,3 @@ AsmWriteDr0 ( mov dr0, eax } } - diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr1.c b/MdePkg/Library/BaseLib/Ia32/WriteDr1.c index f1c8f32..302c349 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr1.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr1.c @@ -20,7 +20,7 @@ UINTN EFIAPI AsmWriteDr1 ( - IN UINTN Value + IN UINTN Value ) { _asm { @@ -28,4 +28,3 @@ AsmWriteDr1 ( mov dr1, eax } } - diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr2.c b/MdePkg/Library/BaseLib/Ia32/WriteDr2.c index 6e1e7f2..20b6224 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr2.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr2.c @@ -20,7 +20,7 @@ UINTN EFIAPI AsmWriteDr2 ( - IN UINTN Value + IN UINTN Value ) { _asm { @@ -28,4 +28,3 @@ AsmWriteDr2 ( mov dr2, eax } } - diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr3.c b/MdePkg/Library/BaseLib/Ia32/WriteDr3.c index 7cb1d37..6eafe40 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr3.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr3.c @@ -20,7 +20,7 @@ UINTN EFIAPI AsmWriteDr3 ( - IN UINTN Value + IN UINTN Value ) { _asm { @@ -28,4 +28,3 @@ AsmWriteDr3 ( mov dr3, eax } } - diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr4.c b/MdePkg/Library/BaseLib/Ia32/WriteDr4.c index 778017f..32815b2 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr4.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr4.c @@ -20,7 +20,7 @@ UINTN EFIAPI AsmWriteDr4 ( - IN UINTN Value + IN UINTN Value ) { _asm { @@ -30,4 +30,3 @@ AsmWriteDr4 ( _emit 0xe0 } } - diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr5.c b/MdePkg/Library/BaseLib/Ia32/WriteDr5.c index 2159813..4a0c384 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr5.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr5.c @@ -20,7 +20,7 @@ UINTN EFIAPI AsmWriteDr5 ( - IN UINTN Value + IN UINTN Value ) { _asm { @@ -30,4 +30,3 @@ AsmWriteDr5 ( _emit 0xe8 } } - diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr6.c b/MdePkg/Library/BaseLib/Ia32/WriteDr6.c index c03d716..7cfc4bb 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr6.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr6.c @@ -20,7 +20,7 @@ UINTN EFIAPI AsmWriteDr6 ( - IN UINTN Value + IN UINTN Value ) { _asm { @@ -28,4 +28,3 @@ AsmWriteDr6 ( mov dr6, eax } } - diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr7.c b/MdePkg/Library/BaseLib/Ia32/WriteDr7.c index c4821e4..78b0b72 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteDr7.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr7.c @@ -20,7 +20,7 @@ UINTN EFIAPI AsmWriteDr7 ( - IN UINTN Value + IN UINTN Value ) { _asm { @@ -28,4 +28,3 @@ AsmWriteDr7 ( mov dr7, eax } } - diff --git a/MdePkg/Library/BaseLib/Ia32/WriteGdtr.c b/MdePkg/Library/BaseLib/Ia32/WriteGdtr.c index 37ceae7..a542665 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteGdtr.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteGdtr.c @@ -6,10 +6,8 @@ **/ - #include "BaseLibInternals.h" - /** Writes the current Global Descriptor Table Register (GDTR) descriptor. @@ -22,7 +20,7 @@ VOID EFIAPI InternalX86WriteGdtr ( - IN CONST IA32_DESCRIPTOR *Gdtr + IN CONST IA32_DESCRIPTOR *Gdtr ) { _asm { @@ -30,4 +28,3 @@ InternalX86WriteGdtr ( lgdt fword ptr [eax] } } - diff --git a/MdePkg/Library/BaseLib/Ia32/WriteIdtr.c b/MdePkg/Library/BaseLib/Ia32/WriteIdtr.c index 49ef22b..aaa29b3 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteIdtr.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteIdtr.c @@ -6,7 +6,6 @@ **/ - #include "BaseLibInternals.h" /** @@ -21,7 +20,7 @@ VOID EFIAPI InternalX86WriteIdtr ( - IN CONST IA32_DESCRIPTOR *Idtr + IN CONST IA32_DESCRIPTOR *Idtr ) { _asm { @@ -32,4 +31,3 @@ InternalX86WriteIdtr ( popfd } } - diff --git a/MdePkg/Library/BaseLib/Ia32/WriteLdtr.c b/MdePkg/Library/BaseLib/Ia32/WriteLdtr.c index 8e12f78..d45f0fe 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteLdtr.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteLdtr.c @@ -6,9 +6,6 @@ **/ - - - /** Writes the current Local Descriptor Table Register (GDTR) selector. @@ -21,7 +18,7 @@ VOID EFIAPI AsmWriteLdtr ( - IN UINT16 Ldtr + IN UINT16 Ldtr ) { _asm { @@ -30,4 +27,3 @@ AsmWriteLdtr ( lldt ax } } - diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm0.c b/MdePkg/Library/BaseLib/Ia32/WriteMm0.c index ea26009..7807c35 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm0.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm0.c @@ -6,9 +6,6 @@ **/ - - - /** Writes the current value of 64-bit MMX Register #0 (MM0). @@ -21,7 +18,7 @@ VOID EFIAPI AsmWriteMm0 ( - IN UINT64 Value + IN UINT64 Value ) { _asm { @@ -29,4 +26,3 @@ AsmWriteMm0 ( emms } } - diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm1.c b/MdePkg/Library/BaseLib/Ia32/WriteMm1.c index b8da473..378aac2 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm1.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm1.c @@ -6,9 +6,6 @@ **/ - - - /** Writes the current value of 64-bit MMX Register #1 (MM1). @@ -21,7 +18,7 @@ VOID EFIAPI AsmWriteMm1 ( - IN UINT64 Value + IN UINT64 Value ) { _asm { @@ -29,4 +26,3 @@ AsmWriteMm1 ( emms } } - diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm2.c b/MdePkg/Library/BaseLib/Ia32/WriteMm2.c index 6b77aed..ebab66f 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm2.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm2.c @@ -6,9 +6,6 @@ **/ - - - /** Writes the current value of 64-bit MMX Register #2 (MM2). @@ -21,7 +18,7 @@ VOID EFIAPI AsmWriteMm2 ( - IN UINT64 Value + IN UINT64 Value ) { _asm { @@ -29,4 +26,3 @@ AsmWriteMm2 ( emms } } - diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm3.c b/MdePkg/Library/BaseLib/Ia32/WriteMm3.c index 4fc7d70..645a14f 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm3.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm3.c @@ -6,9 +6,6 @@ **/ - - - /** Writes the current value of 64-bit MMX Register #3 (MM3). @@ -21,7 +18,7 @@ VOID EFIAPI AsmWriteMm3 ( - IN UINT64 Value + IN UINT64 Value ) { _asm { @@ -29,4 +26,3 @@ AsmWriteMm3 ( emms } } - diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm4.c b/MdePkg/Library/BaseLib/Ia32/WriteMm4.c index 2fce554..8a4728e 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm4.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm4.c @@ -6,9 +6,6 @@ **/ - - - /** Writes the current value of 64-bit MMX Register #4 (MM4). @@ -21,7 +18,7 @@ VOID EFIAPI AsmWriteMm4 ( - IN UINT64 Value + IN UINT64 Value ) { _asm { diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm5.c b/MdePkg/Library/BaseLib/Ia32/WriteMm5.c index a0ec714..1c4adc0 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm5.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm5.c @@ -6,9 +6,6 @@ **/ - - - /** Writes the current value of 64-bit MMX Register #5 (MM5). @@ -21,7 +18,7 @@ VOID EFIAPI AsmWriteMm5 ( - IN UINT64 Value + IN UINT64 Value ) { _asm { diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm6.c b/MdePkg/Library/BaseLib/Ia32/WriteMm6.c index c3b57b4..8023fc0 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm6.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm6.c @@ -6,9 +6,6 @@ **/ - - - /** Writes the current value of 64-bit MMX Register #6 (MM6). @@ -21,7 +18,7 @@ VOID EFIAPI AsmWriteMm6 ( - IN UINT64 Value + IN UINT64 Value ) { _asm { @@ -29,4 +26,3 @@ AsmWriteMm6 ( emms } } - diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm7.c b/MdePkg/Library/BaseLib/Ia32/WriteMm7.c index e1e8932..0b0fc44 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMm7.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMm7.c @@ -6,9 +6,6 @@ **/ - - - /** Writes the current value of 64-bit MMX Register #7 (MM7). @@ -21,7 +18,7 @@ VOID EFIAPI AsmWriteMm7 ( - IN UINT64 Value + IN UINT64 Value ) { _asm { @@ -29,4 +26,3 @@ AsmWriteMm7 ( emms } } - diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMsr64.c b/MdePkg/Library/BaseLib/Ia32/WriteMsr64.c index ba0cf3f..e8e4921 100644 --- a/MdePkg/Library/BaseLib/Ia32/WriteMsr64.c +++ b/MdePkg/Library/BaseLib/Ia32/WriteMsr64.c @@ -6,7 +6,6 @@ **/ - #include /** @@ -33,7 +32,7 @@ AsmWriteMsr64 ( IN UINT64 Value ) { - BOOLEAN Flag; + BOOLEAN Flag; Flag = FilterBeforeMsrWrite (Index, &Value); if (Flag) { @@ -44,8 +43,8 @@ AsmWriteMsr64 ( wrmsr } } + FilterAfterMsrWrite (Index, &Value); return Value; } - diff --git a/MdePkg/Library/BaseLib/LRotU32.c b/MdePkg/Library/BaseLib/LRotU32.c index 4e671a3..e9f4790 100644 --- a/MdePkg/Library/BaseLib/LRotU32.c +++ b/MdePkg/Library/BaseLib/LRotU32.c @@ -27,8 +27,8 @@ UINT32 EFIAPI LRotU32 ( - IN UINT32 Operand, - IN UINTN Count + IN UINT32 Operand, + IN UINTN Count ) { ASSERT (Count < 32); diff --git a/MdePkg/Library/BaseLib/LRotU64.c b/MdePkg/Library/BaseLib/LRotU64.c index 48f35dc..aa6a9a2 100644 --- a/MdePkg/Library/BaseLib/LRotU64.c +++ b/MdePkg/Library/BaseLib/LRotU64.c @@ -27,8 +27,8 @@ UINT64 EFIAPI LRotU64 ( - IN UINT64 Operand, - IN UINTN Count + IN UINT64 Operand, + IN UINTN Count ) { ASSERT (Count < 64); diff --git a/MdePkg/Library/BaseLib/LShiftU64.c b/MdePkg/Library/BaseLib/LShiftU64.c index 7b41a3e..ce613c6 100644 --- a/MdePkg/Library/BaseLib/LShiftU64.c +++ b/MdePkg/Library/BaseLib/LShiftU64.c @@ -26,8 +26,8 @@ UINT64 EFIAPI LShiftU64 ( - IN UINT64 Operand, - IN UINTN Count + IN UINT64 Operand, + IN UINTN Count ) { ASSERT (Count < 64); diff --git a/MdePkg/Library/BaseLib/LinkedList.c b/MdePkg/Library/BaseLib/LinkedList.c index 5648c18..3aa20ef 100644 --- a/MdePkg/Library/BaseLib/LinkedList.c +++ b/MdePkg/Library/BaseLib/LinkedList.c @@ -28,7 +28,7 @@ **/ #if !defined (MDEPKG_NDEBUG) - #define ASSERT_VERIFY_NODE_IN_VALID_LIST(FirstEntry, SecondEntry, InList) \ +#define ASSERT_VERIFY_NODE_IN_VALID_LIST(FirstEntry, SecondEntry, InList) \ do { \ if (FeaturePcdGet (PcdVerifyNodeInList)) { \ ASSERT (InList == IsNodeInList ((FirstEntry), (SecondEntry))); \ @@ -37,7 +37,7 @@ } \ } while (FALSE) #else - #define ASSERT_VERIFY_NODE_IN_VALID_LIST(FirstEntry, SecondEntry, InList) +#define ASSERT_VERIFY_NODE_IN_VALID_LIST(FirstEntry, SecondEntry, InList) #endif /** @@ -119,8 +119,8 @@ InternalBaseLibIsListValid ( BOOLEAN EFIAPI IsNodeInList ( - IN CONST LIST_ENTRY *FirstEntry, - IN CONST LIST_ENTRY *SecondEntry + IN CONST LIST_ENTRY *FirstEntry, + IN CONST LIST_ENTRY *SecondEntry ) { UINTN Count; @@ -180,14 +180,14 @@ IsNodeInList ( LIST_ENTRY * EFIAPI InitializeListHead ( - IN OUT LIST_ENTRY *ListHead + IN OUT LIST_ENTRY *ListHead ) { ASSERT (ListHead != NULL); ListHead->ForwardLink = ListHead; - ListHead->BackLink = ListHead; + ListHead->BackLink = ListHead; return ListHead; } @@ -216,8 +216,8 @@ InitializeListHead ( LIST_ENTRY * EFIAPI InsertHeadList ( - IN OUT LIST_ENTRY *ListHead, - IN OUT LIST_ENTRY *Entry + IN OUT LIST_ENTRY *ListHead, + IN OUT LIST_ENTRY *Entry ) { // @@ -225,10 +225,10 @@ InsertHeadList ( // ASSERT_VERIFY_NODE_IN_VALID_LIST (ListHead, Entry, FALSE); - Entry->ForwardLink = ListHead->ForwardLink; - Entry->BackLink = ListHead; + Entry->ForwardLink = ListHead->ForwardLink; + Entry->BackLink = ListHead; Entry->ForwardLink->BackLink = Entry; - ListHead->ForwardLink = Entry; + ListHead->ForwardLink = Entry; return ListHead; } @@ -257,8 +257,8 @@ InsertHeadList ( LIST_ENTRY * EFIAPI InsertTailList ( - IN OUT LIST_ENTRY *ListHead, - IN OUT LIST_ENTRY *Entry + IN OUT LIST_ENTRY *ListHead, + IN OUT LIST_ENTRY *Entry ) { // @@ -266,10 +266,10 @@ InsertTailList ( // ASSERT_VERIFY_NODE_IN_VALID_LIST (ListHead, Entry, FALSE); - Entry->ForwardLink = ListHead; - Entry->BackLink = ListHead->BackLink; + Entry->ForwardLink = ListHead; + Entry->BackLink = ListHead->BackLink; Entry->BackLink->ForwardLink = Entry; - ListHead->BackLink = Entry; + ListHead->BackLink = Entry; return ListHead; } @@ -296,7 +296,7 @@ InsertTailList ( LIST_ENTRY * EFIAPI GetFirstNode ( - IN CONST LIST_ENTRY *List + IN CONST LIST_ENTRY *List ) { // @@ -331,8 +331,8 @@ GetFirstNode ( LIST_ENTRY * EFIAPI GetNextNode ( - IN CONST LIST_ENTRY *List, - IN CONST LIST_ENTRY *Node + IN CONST LIST_ENTRY *List, + IN CONST LIST_ENTRY *Node ) { // @@ -367,8 +367,8 @@ GetNextNode ( LIST_ENTRY * EFIAPI GetPreviousNode ( - IN CONST LIST_ENTRY *List, - IN CONST LIST_ENTRY *Node + IN CONST LIST_ENTRY *List, + IN CONST LIST_ENTRY *Node ) { // @@ -401,7 +401,7 @@ GetPreviousNode ( BOOLEAN EFIAPI IsListEmpty ( - IN CONST LIST_ENTRY *ListHead + IN CONST LIST_ENTRY *ListHead ) { // @@ -441,8 +441,8 @@ IsListEmpty ( BOOLEAN EFIAPI IsNull ( - IN CONST LIST_ENTRY *List, - IN CONST LIST_ENTRY *Node + IN CONST LIST_ENTRY *List, + IN CONST LIST_ENTRY *Node ) { // @@ -479,8 +479,8 @@ IsNull ( BOOLEAN EFIAPI IsNodeAtEnd ( - IN CONST LIST_ENTRY *List, - IN CONST LIST_ENTRY *Node + IN CONST LIST_ENTRY *List, + IN CONST LIST_ENTRY *Node ) { // @@ -520,11 +520,11 @@ IsNodeAtEnd ( LIST_ENTRY * EFIAPI SwapListEntries ( - IN OUT LIST_ENTRY *FirstEntry, - IN OUT LIST_ENTRY *SecondEntry + IN OUT LIST_ENTRY *FirstEntry, + IN OUT LIST_ENTRY *SecondEntry ) { - LIST_ENTRY *Ptr; + LIST_ENTRY *Ptr; if (FirstEntry == SecondEntry) { return SecondEntry; @@ -588,7 +588,7 @@ SwapListEntries ( LIST_ENTRY * EFIAPI RemoveEntryList ( - IN CONST LIST_ENTRY *Entry + IN CONST LIST_ENTRY *Entry ) { ASSERT (!IsListEmpty (Entry)); diff --git a/MdePkg/Library/BaseLib/LongJump.c b/MdePkg/Library/BaseLib/LongJump.c index 1d88e41..a34f89e 100644 --- a/MdePkg/Library/BaseLib/LongJump.c +++ b/MdePkg/Library/BaseLib/LongJump.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** diff --git a/MdePkg/Library/BaseLib/LowBitSet32.c b/MdePkg/Library/BaseLib/LowBitSet32.c index 8383c79..5271431 100644 --- a/MdePkg/Library/BaseLib/LowBitSet32.c +++ b/MdePkg/Library/BaseLib/LowBitSet32.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** @@ -27,15 +24,17 @@ INTN EFIAPI LowBitSet32 ( - IN UINT32 Operand + IN UINT32 Operand ) { - INTN BitIndex; + INTN BitIndex; if (Operand == 0) { return -1; } - for (BitIndex = 0; 0 == (Operand & 1); BitIndex++, Operand >>= 1); + for (BitIndex = 0; 0 == (Operand & 1); BitIndex++, Operand >>= 1) { + } + return BitIndex; } diff --git a/MdePkg/Library/BaseLib/LowBitSet64.c b/MdePkg/Library/BaseLib/LowBitSet64.c index 349ed52..c1bc16c 100644 --- a/MdePkg/Library/BaseLib/LowBitSet64.c +++ b/MdePkg/Library/BaseLib/LowBitSet64.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** @@ -28,10 +25,10 @@ INTN EFIAPI LowBitSet64 ( - IN UINT64 Operand + IN UINT64 Operand ) { - INTN BitIndex; + INTN BitIndex; if (Operand == 0) { return -1; @@ -39,6 +36,9 @@ LowBitSet64 ( for (BitIndex = 0; (Operand & 1) == 0; - BitIndex++, Operand = RShiftU64 (Operand, 1)); + BitIndex++, Operand = RShiftU64 (Operand, 1)) + { + } + return BitIndex; } diff --git a/MdePkg/Library/BaseLib/Math64.c b/MdePkg/Library/BaseLib/Math64.c index 154b97a..5756d0f 100644 --- a/MdePkg/Library/BaseLib/Math64.c +++ b/MdePkg/Library/BaseLib/Math64.c @@ -25,8 +25,8 @@ UINT64 EFIAPI InternalMathLShiftU64 ( - IN UINT64 Operand, - IN UINTN Count + IN UINT64 Operand, + IN UINTN Count ) { return Operand << Count; @@ -48,8 +48,8 @@ InternalMathLShiftU64 ( UINT64 EFIAPI InternalMathRShiftU64 ( - IN UINT64 Operand, - IN UINTN Count + IN UINT64 Operand, + IN UINTN Count ) { return Operand >> Count; @@ -71,8 +71,8 @@ InternalMathRShiftU64 ( UINT64 EFIAPI InternalMathARShiftU64 ( - IN UINT64 Operand, - IN UINTN Count + IN UINT64 Operand, + IN UINTN Count ) { INTN TestValue; @@ -95,7 +95,6 @@ InternalMathARShiftU64 ( ((INTN)Operand < 0 ? ~((UINTN)-1 >> Count) : 0); } - /** Rotates a 64-bit integer left between 0 and 63 bits, filling the low bits with the high bits that were rotated. @@ -113,8 +112,8 @@ InternalMathARShiftU64 ( UINT64 EFIAPI InternalMathLRotU64 ( - IN UINT64 Operand, - IN UINTN Count + IN UINT64 Operand, + IN UINTN Count ) { return (Operand << Count) | (Operand >> (64 - Count)); @@ -137,8 +136,8 @@ InternalMathLRotU64 ( UINT64 EFIAPI InternalMathRRotU64 ( - IN UINT64 Operand, - IN UINTN Count + IN UINT64 Operand, + IN UINTN Count ) { return (Operand >> Count) | (Operand << (64 - Count)); @@ -159,14 +158,14 @@ InternalMathRRotU64 ( UINT64 EFIAPI InternalMathSwapBytes64 ( - IN UINT64 Operand + IN UINT64 Operand ) { UINT64 LowerBytes; UINT64 HigherBytes; - LowerBytes = (UINT64) SwapBytes32 ((UINT32) Operand); - HigherBytes = (UINT64) SwapBytes32 ((UINT32) (Operand >> 32)); + LowerBytes = (UINT64)SwapBytes32 ((UINT32)Operand); + HigherBytes = (UINT64)SwapBytes32 ((UINT32)(Operand >> 32)); return (LowerBytes << 32 | HigherBytes); } @@ -188,14 +187,13 @@ InternalMathSwapBytes64 ( UINT64 EFIAPI InternalMathMultU64x32 ( - IN UINT64 Multiplicand, - IN UINT32 Multiplier + IN UINT64 Multiplicand, + IN UINT32 Multiplier ) { return Multiplicand * Multiplier; } - /** Multiplies a 64-bit unsigned integer by a 64-bit unsigned integer and generates a 64-bit unsigned result. @@ -213,8 +211,8 @@ InternalMathMultU64x32 ( UINT64 EFIAPI InternalMathMultU64x64 ( - IN UINT64 Multiplicand, - IN UINT64 Multiplier + IN UINT64 Multiplicand, + IN UINT64 Multiplier ) { return Multiplicand * Multiplier; @@ -237,8 +235,8 @@ InternalMathMultU64x64 ( UINT64 EFIAPI InternalMathDivU64x32 ( - IN UINT64 Dividend, - IN UINT32 Divisor + IN UINT64 Dividend, + IN UINT32 Divisor ) { return Dividend / Divisor; @@ -261,8 +259,8 @@ InternalMathDivU64x32 ( UINT32 EFIAPI InternalMathModU64x32 ( - IN UINT64 Dividend, - IN UINT32 Divisor + IN UINT64 Dividend, + IN UINT32 Divisor ) { return (UINT32)(Dividend % Divisor); @@ -288,14 +286,15 @@ InternalMathModU64x32 ( UINT64 EFIAPI InternalMathDivRemU64x32 ( - IN UINT64 Dividend, - IN UINT32 Divisor, - OUT UINT32 *Remainder OPTIONAL + IN UINT64 Dividend, + IN UINT32 Divisor, + OUT UINT32 *Remainder OPTIONAL ) { if (Remainder != NULL) { *Remainder = (UINT32)(Dividend % Divisor); } + return Dividend / Divisor; } @@ -319,14 +318,15 @@ InternalMathDivRemU64x32 ( UINT64 EFIAPI InternalMathDivRemU64x64 ( - IN UINT64 Dividend, - IN UINT64 Divisor, - OUT UINT64 *Remainder OPTIONAL + IN UINT64 Dividend, + IN UINT64 Divisor, + OUT UINT64 *Remainder OPTIONAL ) { if (Remainder != NULL) { *Remainder = Dividend % Divisor; } + return Dividend / Divisor; } @@ -350,13 +350,14 @@ InternalMathDivRemU64x64 ( INT64 EFIAPI InternalMathDivRemS64x64 ( - IN INT64 Dividend, - IN INT64 Divisor, - OUT INT64 *Remainder OPTIONAL + IN INT64 Dividend, + IN INT64 Divisor, + OUT INT64 *Remainder OPTIONAL ) { if (Remainder != NULL) { *Remainder = Dividend % Divisor; } + return Dividend / Divisor; } diff --git a/MdePkg/Library/BaseLib/ModU64x32.c b/MdePkg/Library/BaseLib/ModU64x32.c index ee99ab3..bfdbf8b 100644 --- a/MdePkg/Library/BaseLib/ModU64x32.c +++ b/MdePkg/Library/BaseLib/ModU64x32.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** @@ -30,8 +27,8 @@ UINT32 EFIAPI ModU64x32 ( - IN UINT64 Dividend, - IN UINT32 Divisor + IN UINT64 Dividend, + IN UINT32 Divisor ) { ASSERT (Divisor != 0); diff --git a/MdePkg/Library/BaseLib/MultS64x64.c b/MdePkg/Library/BaseLib/MultS64x64.c index b5c745f..e9db474 100644 --- a/MdePkg/Library/BaseLib/MultS64x64.c +++ b/MdePkg/Library/BaseLib/MultS64x64.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** @@ -28,9 +25,9 @@ INT64 EFIAPI MultS64x64 ( - IN INT64 Multiplicand, - IN INT64 Multiplier + IN INT64 Multiplicand, + IN INT64 Multiplier ) { - return (INT64)MultU64x64 ((UINT64) Multiplicand, (UINT64) Multiplier); + return (INT64)MultU64x64 ((UINT64)Multiplicand, (UINT64)Multiplier); } diff --git a/MdePkg/Library/BaseLib/MultU64x32.c b/MdePkg/Library/BaseLib/MultU64x32.c index 2bbff51..f4c65f8 100644 --- a/MdePkg/Library/BaseLib/MultU64x32.c +++ b/MdePkg/Library/BaseLib/MultU64x32.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** @@ -28,11 +25,11 @@ UINT64 EFIAPI MultU64x32 ( - IN UINT64 Multiplicand, - IN UINT32 Multiplier + IN UINT64 Multiplicand, + IN UINT32 Multiplier ) { - UINT64 Result; + UINT64 Result; Result = InternalMathMultU64x32 (Multiplicand, Multiplier); diff --git a/MdePkg/Library/BaseLib/MultU64x64.c b/MdePkg/Library/BaseLib/MultU64x64.c index e1ee9f1..90dea81 100644 --- a/MdePkg/Library/BaseLib/MultU64x64.c +++ b/MdePkg/Library/BaseLib/MultU64x64.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** @@ -28,11 +25,11 @@ UINT64 EFIAPI MultU64x64 ( - IN UINT64 Multiplicand, - IN UINT64 Multiplier + IN UINT64 Multiplicand, + IN UINT64 Multiplier ) { - UINT64 Result; + UINT64 Result; Result = InternalMathMultU64x64 (Multiplicand, Multiplier); diff --git a/MdePkg/Library/BaseLib/QuickSort.c b/MdePkg/Library/BaseLib/QuickSort.c index a825c07..d9f0e9a 100644 --- a/MdePkg/Library/BaseLib/QuickSort.c +++ b/MdePkg/Library/BaseLib/QuickSort.c @@ -34,16 +34,16 @@ VOID EFIAPI QuickSort ( - IN OUT VOID *BufferToSort, - IN CONST UINTN Count, - IN CONST UINTN ElementSize, - IN BASE_SORT_COMPARE CompareFunction, - OUT VOID *BufferOneElement + IN OUT VOID *BufferToSort, + IN CONST UINTN Count, + IN CONST UINTN ElementSize, + IN BASE_SORT_COMPARE CompareFunction, + OUT VOID *BufferOneElement ) { - VOID *Pivot; - UINTN LoopCount; - UINTN NextSwapLocation; + VOID *Pivot; + UINTN LoopCount; + UINTN NextSwapLocation; ASSERT (BufferToSort != NULL); ASSERT (CompareFunction != NULL); @@ -59,7 +59,7 @@ QuickSort ( // // pick a pivot (we choose last element) // - Pivot = ((UINT8*) BufferToSort + ((Count - 1) * ElementSize)); + Pivot = ((UINT8 *)BufferToSort + ((Count - 1) * ElementSize)); // // Now get the pivot such that all on "left" are below it @@ -69,13 +69,13 @@ QuickSort ( // // if the element is less than or equal to the pivot // - if (CompareFunction ((VOID*) ((UINT8*) BufferToSort + ((LoopCount) * ElementSize)), Pivot) <= 0){ + if (CompareFunction ((VOID *)((UINT8 *)BufferToSort + ((LoopCount) * ElementSize)), Pivot) <= 0) { // // swap // - CopyMem (BufferOneElement, (UINT8*) BufferToSort + (NextSwapLocation * ElementSize), ElementSize); - CopyMem ((UINT8*) BufferToSort + (NextSwapLocation * ElementSize), (UINT8*) BufferToSort + ((LoopCount) * ElementSize), ElementSize); - CopyMem ((UINT8*) BufferToSort + ((LoopCount)*ElementSize), BufferOneElement, ElementSize); + CopyMem (BufferOneElement, (UINT8 *)BufferToSort + (NextSwapLocation * ElementSize), ElementSize); + CopyMem ((UINT8 *)BufferToSort + (NextSwapLocation * ElementSize), (UINT8 *)BufferToSort + ((LoopCount) * ElementSize), ElementSize); + CopyMem ((UINT8 *)BufferToSort + ((LoopCount)*ElementSize), BufferOneElement, ElementSize); // // increment NextSwapLocation @@ -83,12 +83,13 @@ QuickSort ( NextSwapLocation++; } } + // // swap pivot to it's final position (NextSwapLocation) // CopyMem (BufferOneElement, Pivot, ElementSize); - CopyMem (Pivot, (UINT8*) BufferToSort + (NextSwapLocation * ElementSize), ElementSize); - CopyMem ((UINT8*) BufferToSort + (NextSwapLocation * ElementSize), BufferOneElement, ElementSize); + CopyMem (Pivot, (UINT8 *)BufferToSort + (NextSwapLocation * ElementSize), ElementSize); + CopyMem ((UINT8 *)BufferToSort + (NextSwapLocation * ElementSize), BufferOneElement, ElementSize); // // Now recurse on 2 partial lists. neither of these will have the 'pivot' element diff --git a/MdePkg/Library/BaseLib/RRotU32.c b/MdePkg/Library/BaseLib/RRotU32.c index 3956fad..909168f 100644 --- a/MdePkg/Library/BaseLib/RRotU32.c +++ b/MdePkg/Library/BaseLib/RRotU32.c @@ -27,8 +27,8 @@ UINT32 EFIAPI RRotU32 ( - IN UINT32 Operand, - IN UINTN Count + IN UINT32 Operand, + IN UINTN Count ) { ASSERT (Count < 32); diff --git a/MdePkg/Library/BaseLib/RRotU64.c b/MdePkg/Library/BaseLib/RRotU64.c index e07ffd6..f75c735 100644 --- a/MdePkg/Library/BaseLib/RRotU64.c +++ b/MdePkg/Library/BaseLib/RRotU64.c @@ -27,8 +27,8 @@ UINT64 EFIAPI RRotU64 ( - IN UINT64 Operand, - IN UINTN Count + IN UINT64 Operand, + IN UINTN Count ) { ASSERT (Count < 64); diff --git a/MdePkg/Library/BaseLib/RShiftU64.c b/MdePkg/Library/BaseLib/RShiftU64.c index 20f94f7..2ae24b3 100644 --- a/MdePkg/Library/BaseLib/RShiftU64.c +++ b/MdePkg/Library/BaseLib/RShiftU64.c @@ -26,8 +26,8 @@ UINT64 EFIAPI RShiftU64 ( - IN UINT64 Operand, - IN UINTN Count + IN UINT64 Operand, + IN UINTN Count ) { ASSERT (Count < 64); diff --git a/MdePkg/Library/BaseLib/RiscV64/CpuBreakpoint.c b/MdePkg/Library/BaseLib/RiscV64/CpuBreakpoint.c index 88d0877..6274cbc 100644 --- a/MdePkg/Library/BaseLib/RiscV64/CpuBreakpoint.c +++ b/MdePkg/Library/BaseLib/RiscV64/CpuBreakpoint.c @@ -8,7 +8,10 @@ #include "BaseLibInternals.h" -extern VOID RiscVCpuBreakpoint (VOID); +extern VOID +RiscVCpuBreakpoint ( + VOID + ); /** Generates a breakpoint on the CPU. diff --git a/MdePkg/Library/BaseLib/RiscV64/CpuPause.c b/MdePkg/Library/BaseLib/RiscV64/CpuPause.c index 9931bad..687d68e 100644 --- a/MdePkg/Library/BaseLib/RiscV64/CpuPause.c +++ b/MdePkg/Library/BaseLib/RiscV64/CpuPause.c @@ -8,8 +8,10 @@ #include "BaseLibInternals.h" -extern VOID RiscVCpuPause (VOID); - +extern VOID +RiscVCpuPause ( + VOID + ); /** Requests CPU to pause for a short period of time. @@ -26,4 +28,3 @@ CpuPause ( { RiscVCpuPause (); } - diff --git a/MdePkg/Library/BaseLib/RiscV64/DisableInterrupts.c b/MdePkg/Library/BaseLib/RiscV64/DisableInterrupts.c index 867086c..47aab90 100644 --- a/MdePkg/Library/BaseLib/RiscV64/DisableInterrupts.c +++ b/MdePkg/Library/BaseLib/RiscV64/DisableInterrupts.c @@ -7,7 +7,10 @@ **/ #include "BaseLibInternals.h" -extern VOID RiscVDisableSupervisorModeInterrupts (VOID); +extern VOID +RiscVDisableSupervisorModeInterrupts ( + VOID + ); /** Disables CPU interrupts. @@ -21,4 +24,3 @@ DisableInterrupts ( { RiscVDisableSupervisorModeInterrupts (); } - diff --git a/MdePkg/Library/BaseLib/RiscV64/EnableInterrupts.c b/MdePkg/Library/BaseLib/RiscV64/EnableInterrupts.c index 22ef730..7514d31 100644 --- a/MdePkg/Library/BaseLib/RiscV64/EnableInterrupts.c +++ b/MdePkg/Library/BaseLib/RiscV64/EnableInterrupts.c @@ -8,7 +8,10 @@ #include "BaseLibInternals.h" -extern VOID RiscVEnableSupervisorModeInterrupt (VOID); +extern VOID +RiscVEnableSupervisorModeInterrupt ( + VOID + ); /** Enables CPU interrupts. @@ -22,4 +25,3 @@ EnableInterrupts ( { RiscVEnableSupervisorModeInterrupt (); } - diff --git a/MdePkg/Library/BaseLib/RiscV64/GetInterruptState.c b/MdePkg/Library/BaseLib/RiscV64/GetInterruptState.c index 292f1ec..1aa863d 100644 --- a/MdePkg/Library/BaseLib/RiscV64/GetInterruptState.c +++ b/MdePkg/Library/BaseLib/RiscV64/GetInterruptState.c @@ -8,7 +8,10 @@ #include "BaseLibInternals.h" -extern UINT32 RiscVGetSupervisorModeInterrupts (VOID); +extern UINT32 +RiscVGetSupervisorModeInterrupts ( + VOID + ); /** Retrieves the current CPU interrupt state. @@ -26,10 +29,8 @@ GetInterruptState ( VOID ) { - unsigned long RetValue; + unsigned long RetValue; RetValue = RiscVGetSupervisorModeInterrupts (); - return RetValue? TRUE: FALSE; + return RetValue ? TRUE : FALSE; } - - diff --git a/MdePkg/Library/BaseLib/RiscV64/InternalSwitchStack.c b/MdePkg/Library/BaseLib/RiscV64/InternalSwitchStack.c index ed84cdf..cf646e4 100644 --- a/MdePkg/Library/BaseLib/RiscV64/InternalSwitchStack.c +++ b/MdePkg/Library/BaseLib/RiscV64/InternalSwitchStack.c @@ -44,12 +44,18 @@ InternalSwitchStack ( { BASE_LIBRARY_JUMP_BUFFER JumpBuffer; - DEBUG ((DEBUG_INFO, "RISC-V InternalSwitchStack Entry:%x Context1:%x Context2:%x NewStack%x\n", \ - EntryPoint, Context1, Context2, NewStack)); + DEBUG (( + DEBUG_INFO, + "RISC-V InternalSwitchStack Entry:%x Context1:%x Context2:%x NewStack%x\n", \ + EntryPoint, + Context1, + Context2, + NewStack + )); JumpBuffer.RA = (UINTN)EntryPoint; JumpBuffer.SP = (UINTN)NewStack - sizeof (VOID *); JumpBuffer.S0 = (UINT64)(UINTN)Context1; JumpBuffer.S1 = (UINT64)(UINTN)Context2; LongJump (&JumpBuffer, (UINTN)-1); - ASSERT(FALSE); + ASSERT (FALSE); } diff --git a/MdePkg/Library/BaseLib/SafeString.c b/MdePkg/Library/BaseLib/SafeString.c index 149a9c0..f338a32 100644 --- a/MdePkg/Library/BaseLib/SafeString.c +++ b/MdePkg/Library/BaseLib/SafeString.c @@ -35,16 +35,18 @@ **/ BOOLEAN InternalSafeStringIsOverlap ( - IN VOID *Base1, - IN UINTN Size1, - IN VOID *Base2, - IN UINTN Size2 + IN VOID *Base1, + IN UINTN Size1, + IN VOID *Base2, + IN UINTN Size2 ) { if ((((UINTN)Base1 >= (UINTN)Base2) && ((UINTN)Base1 < (UINTN)Base2 + Size2)) || - (((UINTN)Base2 >= (UINTN)Base1) && ((UINTN)Base2 < (UINTN)Base1 + Size1))) { + (((UINTN)Base2 >= (UINTN)Base1) && ((UINTN)Base2 < (UINTN)Base1 + Size1))) + { return TRUE; } + return FALSE; } @@ -69,7 +71,7 @@ InternalSafeStringNoStrOverlap ( IN UINTN Size2 ) { - return !InternalSafeStringIsOverlap (Str1, Size1 * sizeof(CHAR16), Str2, Size2 * sizeof(CHAR16)); + return !InternalSafeStringIsOverlap (Str1, Size1 * sizeof (CHAR16), Str2, Size2 * sizeof (CHAR16)); } /** @@ -87,10 +89,10 @@ InternalSafeStringNoStrOverlap ( **/ BOOLEAN InternalSafeStringNoAsciiStrOverlap ( - IN CHAR8 *Str1, - IN UINTN Size1, - IN CHAR8 *Str2, - IN UINTN Size2 + IN CHAR8 *Str1, + IN UINTN Size1, + IN CHAR8 *Str2, + IN UINTN Size2 ) { return !InternalSafeStringIsOverlap (Str1, Size1, Str2, Size2); @@ -115,13 +117,13 @@ InternalSafeStringNoAsciiStrOverlap ( UINTN EFIAPI StrnLenS ( - IN CONST CHAR16 *String, - IN UINTN MaxSize + IN CONST CHAR16 *String, + IN UINTN MaxSize ) { - UINTN Length; + UINTN Length; - ASSERT (((UINTN) String & BIT0) == 0); + ASSERT (((UINTN)String & BIT0) == 0); // // If String is a null pointer or MaxSize is 0, then the StrnLenS function returns zero. @@ -141,8 +143,10 @@ StrnLenS ( if (Length >= MaxSize - 1) { return MaxSize; } + Length++; } + return Length; } @@ -170,8 +174,8 @@ StrnLenS ( UINTN EFIAPI StrnSizeS ( - IN CONST CHAR16 *String, - IN UINTN MaxSize + IN CONST CHAR16 *String, + IN UINTN MaxSize ) { // @@ -220,15 +224,15 @@ StrnSizeS ( RETURN_STATUS EFIAPI StrCpyS ( - OUT CHAR16 *Destination, - IN UINTN DestMax, - IN CONST CHAR16 *Source + OUT CHAR16 *Destination, + IN UINTN DestMax, + IN CONST CHAR16 *Source ) { - UINTN SourceLen; + UINTN SourceLen; - ASSERT (((UINTN) Destination & BIT0) == 0); - ASSERT (((UINTN) Source & BIT0) == 0); + ASSERT (((UINTN)Destination & BIT0) == 0); + ASSERT (((UINTN)Source & BIT0) == 0); // // 1. Neither Destination nor Source shall be a null pointer. @@ -266,6 +270,7 @@ StrCpyS ( while (*Source != 0) { *(Destination++) = *(Source++); } + *Destination = 0; return RETURN_SUCCESS; @@ -303,16 +308,16 @@ StrCpyS ( RETURN_STATUS EFIAPI StrnCpyS ( - OUT CHAR16 *Destination, - IN UINTN DestMax, - IN CONST CHAR16 *Source, - IN UINTN Length + OUT CHAR16 *Destination, + IN UINTN DestMax, + IN CONST CHAR16 *Source, + IN UINTN Length ) { - UINTN SourceLen; + UINTN SourceLen; - ASSERT (((UINTN) Destination & BIT0) == 0); - ASSERT (((UINTN) Source & BIT0) == 0); + ASSERT (((UINTN)Destination & BIT0) == 0); + ASSERT (((UINTN)Source & BIT0) == 0); // // 1. Neither Destination nor Source shall be a null pointer. @@ -347,6 +352,7 @@ StrnCpyS ( if (SourceLen > Length) { SourceLen = Length; } + SAFE_STRING_CONSTRAINT_CHECK (InternalSafeStringNoStrOverlap (Destination, DestMax, (CHAR16 *)Source, SourceLen + 1), RETURN_ACCESS_DENIED); // @@ -359,6 +365,7 @@ StrnCpyS ( *(Destination++) = *(Source++); SourceLen--; } + *Destination = 0; return RETURN_SUCCESS; @@ -396,17 +403,17 @@ StrnCpyS ( RETURN_STATUS EFIAPI StrCatS ( - IN OUT CHAR16 *Destination, - IN UINTN DestMax, - IN CONST CHAR16 *Source + IN OUT CHAR16 *Destination, + IN UINTN DestMax, + IN CONST CHAR16 *Source ) { - UINTN DestLen; - UINTN CopyLen; - UINTN SourceLen; + UINTN DestLen; + UINTN CopyLen; + UINTN SourceLen; - ASSERT (((UINTN) Destination & BIT0) == 0); - ASSERT (((UINTN) Source & BIT0) == 0); + ASSERT (((UINTN)Destination & BIT0) == 0); + ASSERT (((UINTN)Source & BIT0) == 0); // // Let CopyLen denote the value DestMax - StrnLenS(Destination, DestMax) upon entry to StrCatS. @@ -457,6 +464,7 @@ StrCatS ( while (*Source != 0) { *(Destination++) = *(Source++); } + *Destination = 0; return RETURN_SUCCESS; @@ -497,18 +505,18 @@ StrCatS ( RETURN_STATUS EFIAPI StrnCatS ( - IN OUT CHAR16 *Destination, - IN UINTN DestMax, - IN CONST CHAR16 *Source, - IN UINTN Length + IN OUT CHAR16 *Destination, + IN UINTN DestMax, + IN CONST CHAR16 *Source, + IN UINTN Length ) { - UINTN DestLen; - UINTN CopyLen; - UINTN SourceLen; + UINTN DestLen; + UINTN CopyLen; + UINTN SourceLen; - ASSERT (((UINTN) Destination & BIT0) == 0); - ASSERT (((UINTN) Source & BIT0) == 0); + ASSERT (((UINTN)Destination & BIT0) == 0); + ASSERT (((UINTN)Source & BIT0) == 0); // // Let CopyLen denote the value DestMax - StrnLenS(Destination, DestMax) upon entry to StrnCatS. @@ -554,6 +562,7 @@ StrnCatS ( if (SourceLen > Length) { SourceLen = Length; } + SAFE_STRING_CONSTRAINT_CHECK (InternalSafeStringNoStrOverlap (Destination, DestMax, (CHAR16 *)Source, SourceLen + 1), RETURN_ACCESS_DENIED); // @@ -568,6 +577,7 @@ StrnCatS ( *(Destination++) = *(Source++); SourceLen--; } + *Destination = 0; return RETURN_SUCCESS; @@ -619,12 +629,12 @@ StrnCatS ( RETURN_STATUS EFIAPI StrDecimalToUintnS ( - IN CONST CHAR16 *String, - OUT CHAR16 **EndPointer OPTIONAL, - OUT UINTN *Data + IN CONST CHAR16 *String, + OUT CHAR16 **EndPointer OPTIONAL, + OUT UINTN *Data ) { - ASSERT (((UINTN) String & BIT0) == 0); + ASSERT (((UINTN)String & BIT0) == 0); // // 1. Neither String nor Data shall be a null pointer. @@ -640,7 +650,7 @@ StrDecimalToUintnS ( } if (EndPointer != NULL) { - *EndPointer = (CHAR16 *) String; + *EndPointer = (CHAR16 *)String; } // @@ -668,8 +678,9 @@ StrDecimalToUintnS ( if (*Data > ((MAX_UINTN - (*String - L'0')) / 10)) { *Data = MAX_UINTN; if (EndPointer != NULL) { - *EndPointer = (CHAR16 *) String; + *EndPointer = (CHAR16 *)String; } + return RETURN_UNSUPPORTED; } @@ -678,8 +689,9 @@ StrDecimalToUintnS ( } if (EndPointer != NULL) { - *EndPointer = (CHAR16 *) String; + *EndPointer = (CHAR16 *)String; } + return RETURN_SUCCESS; } @@ -729,12 +741,12 @@ StrDecimalToUintnS ( RETURN_STATUS EFIAPI StrDecimalToUint64S ( - IN CONST CHAR16 *String, - OUT CHAR16 **EndPointer OPTIONAL, - OUT UINT64 *Data + IN CONST CHAR16 *String, + OUT CHAR16 **EndPointer OPTIONAL, + OUT UINT64 *Data ) { - ASSERT (((UINTN) String & BIT0) == 0); + ASSERT (((UINTN)String & BIT0) == 0); // // 1. Neither String nor Data shall be a null pointer. @@ -750,7 +762,7 @@ StrDecimalToUint64S ( } if (EndPointer != NULL) { - *EndPointer = (CHAR16 *) String; + *EndPointer = (CHAR16 *)String; } // @@ -778,8 +790,9 @@ StrDecimalToUint64S ( if (*Data > DivU64x32 (MAX_UINT64 - (*String - L'0'), 10)) { *Data = MAX_UINT64; if (EndPointer != NULL) { - *EndPointer = (CHAR16 *) String; + *EndPointer = (CHAR16 *)String; } + return RETURN_UNSUPPORTED; } @@ -788,8 +801,9 @@ StrDecimalToUint64S ( } if (EndPointer != NULL) { - *EndPointer = (CHAR16 *) String; + *EndPointer = (CHAR16 *)String; } + return RETURN_SUCCESS; } @@ -844,12 +858,12 @@ StrDecimalToUint64S ( RETURN_STATUS EFIAPI StrHexToUintnS ( - IN CONST CHAR16 *String, - OUT CHAR16 **EndPointer OPTIONAL, - OUT UINTN *Data + IN CONST CHAR16 *String, + OUT CHAR16 **EndPointer OPTIONAL, + OUT UINTN *Data ) { - ASSERT (((UINTN) String & BIT0) == 0); + ASSERT (((UINTN)String & BIT0) == 0); // // 1. Neither String nor Data shall be a null pointer. @@ -865,7 +879,7 @@ StrHexToUintnS ( } if (EndPointer != NULL) { - *EndPointer = (CHAR16 *) String; + *EndPointer = (CHAR16 *)String; } // @@ -887,6 +901,7 @@ StrHexToUintnS ( *Data = 0; return RETURN_SUCCESS; } + // // Skip the 'X' // @@ -904,8 +919,9 @@ StrHexToUintnS ( if (*Data > ((MAX_UINTN - InternalHexCharToUintn (*String)) >> 4)) { *Data = MAX_UINTN; if (EndPointer != NULL) { - *EndPointer = (CHAR16 *) String; + *EndPointer = (CHAR16 *)String; } + return RETURN_UNSUPPORTED; } @@ -914,8 +930,9 @@ StrHexToUintnS ( } if (EndPointer != NULL) { - *EndPointer = (CHAR16 *) String; + *EndPointer = (CHAR16 *)String; } + return RETURN_SUCCESS; } @@ -970,12 +987,12 @@ StrHexToUintnS ( RETURN_STATUS EFIAPI StrHexToUint64S ( - IN CONST CHAR16 *String, - OUT CHAR16 **EndPointer OPTIONAL, - OUT UINT64 *Data + IN CONST CHAR16 *String, + OUT CHAR16 **EndPointer OPTIONAL, + OUT UINT64 *Data ) { - ASSERT (((UINTN) String & BIT0) == 0); + ASSERT (((UINTN)String & BIT0) == 0); // // 1. Neither String nor Data shall be a null pointer. @@ -991,7 +1008,7 @@ StrHexToUint64S ( } if (EndPointer != NULL) { - *EndPointer = (CHAR16 *) String; + *EndPointer = (CHAR16 *)String; } // @@ -1013,6 +1030,7 @@ StrHexToUint64S ( *Data = 0; return RETURN_SUCCESS; } + // // Skip the 'X' // @@ -1030,8 +1048,9 @@ StrHexToUint64S ( if (*Data > RShiftU64 (MAX_UINT64 - InternalHexCharToUintn (*String), 4)) { *Data = MAX_UINT64; if (EndPointer != NULL) { - *EndPointer = (CHAR16 *) String; + *EndPointer = (CHAR16 *)String; } + return RETURN_UNSUPPORTED; } @@ -1040,8 +1059,9 @@ StrHexToUint64S ( } if (EndPointer != NULL) { - *EndPointer = (CHAR16 *) String; + *EndPointer = (CHAR16 *)String; } + return RETURN_SUCCESS; } @@ -1098,27 +1118,27 @@ StrHexToUint64S ( RETURN_STATUS EFIAPI StrToIpv6Address ( - IN CONST CHAR16 *String, - OUT CHAR16 **EndPointer OPTIONAL, - OUT IPv6_ADDRESS *Address, - OUT UINT8 *PrefixLength OPTIONAL + IN CONST CHAR16 *String, + OUT CHAR16 **EndPointer OPTIONAL, + OUT IPv6_ADDRESS *Address, + OUT UINT8 *PrefixLength OPTIONAL ) { - RETURN_STATUS Status; - UINTN AddressIndex; - UINTN Uintn; - IPv6_ADDRESS LocalAddress; - UINT8 LocalPrefixLength; - CONST CHAR16 *Pointer; - CHAR16 *End; - UINTN CompressStart; - BOOLEAN ExpectPrefix; + RETURN_STATUS Status; + UINTN AddressIndex; + UINTN Uintn; + IPv6_ADDRESS LocalAddress; + UINT8 LocalPrefixLength; + CONST CHAR16 *Pointer; + CHAR16 *End; + UINTN CompressStart; + BOOLEAN ExpectPrefix; LocalPrefixLength = MAX_UINT8; CompressStart = ARRAY_SIZE (Address->Addr); ExpectPrefix = FALSE; - ASSERT (((UINTN) String & BIT0) == 0); + ASSERT (((UINTN)String & BIT0) == 0); // // 1. None of String or Guid shall be a null pointer. @@ -1146,7 +1166,7 @@ StrToIpv6Address ( return RETURN_UNSUPPORTED; } - if (CompressStart != ARRAY_SIZE (Address->Addr) || AddressIndex == ARRAY_SIZE (Address->Addr)) { + if ((CompressStart != ARRAY_SIZE (Address->Addr)) || (AddressIndex == ARRAY_SIZE (Address->Addr))) { // // "::" can only appear once. // "::" can only appear when address is not full length. @@ -1166,6 +1186,7 @@ StrToIpv6Address ( // return RETURN_UNSUPPORTED; } + Pointer++; } } @@ -1188,33 +1209,35 @@ StrToIpv6Address ( // Get X. // Status = StrHexToUintnS (Pointer, &End, &Uintn); - if (RETURN_ERROR (Status) || End - Pointer > 4) { + if (RETURN_ERROR (Status) || (End - Pointer > 4)) { // // Number of hexadecimal digit characters is no more than 4. // return RETURN_UNSUPPORTED; } + Pointer = End; // // Uintn won't exceed MAX_UINT16 if number of hexadecimal digit characters is no more than 4. // ASSERT (AddressIndex + 1 < ARRAY_SIZE (Address->Addr)); - LocalAddress.Addr[AddressIndex] = (UINT8) ((UINT16) Uintn >> 8); - LocalAddress.Addr[AddressIndex + 1] = (UINT8) Uintn; - AddressIndex += 2; + LocalAddress.Addr[AddressIndex] = (UINT8)((UINT16)Uintn >> 8); + LocalAddress.Addr[AddressIndex + 1] = (UINT8)Uintn; + AddressIndex += 2; } else { // // Get P, then exit the loop. // Status = StrDecimalToUintnS (Pointer, &End, &Uintn); - if (RETURN_ERROR (Status) || End == Pointer || Uintn > 128) { + if (RETURN_ERROR (Status) || (End == Pointer) || (Uintn > 128)) { // // Prefix length should not exceed 128. // return RETURN_UNSUPPORTED; } - LocalPrefixLength = (UINT8) Uintn; - Pointer = End; + + LocalPrefixLength = (UINT8)Uintn; + Pointer = End; break; } } @@ -1237,18 +1260,21 @@ StrToIpv6Address ( // break; } + Pointer++; } - if ((AddressIndex == ARRAY_SIZE (Address->Addr) && CompressStart != ARRAY_SIZE (Address->Addr)) || - (AddressIndex != ARRAY_SIZE (Address->Addr) && CompressStart == ARRAY_SIZE (Address->Addr)) - ) { + if (((AddressIndex == ARRAY_SIZE (Address->Addr)) && (CompressStart != ARRAY_SIZE (Address->Addr))) || + ((AddressIndex != ARRAY_SIZE (Address->Addr)) && (CompressStart == ARRAY_SIZE (Address->Addr))) + ) + { // // Full length of address shall not have compressing zeros. // Non-full length of address shall have compressing zeros. // return RETURN_UNSUPPORTED; } + CopyMem (&Address->Addr[0], &LocalAddress.Addr[0], CompressStart); ZeroMem (&Address->Addr[CompressStart], ARRAY_SIZE (Address->Addr) - AddressIndex); if (AddressIndex > CompressStart) { @@ -1262,8 +1288,9 @@ StrToIpv6Address ( if (PrefixLength != NULL) { *PrefixLength = LocalPrefixLength; } + if (EndPointer != NULL) { - *EndPointer = (CHAR16 *) Pointer; + *EndPointer = (CHAR16 *)Pointer; } return RETURN_SUCCESS; @@ -1313,22 +1340,22 @@ StrToIpv6Address ( RETURN_STATUS EFIAPI StrToIpv4Address ( - IN CONST CHAR16 *String, - OUT CHAR16 **EndPointer OPTIONAL, - OUT IPv4_ADDRESS *Address, - OUT UINT8 *PrefixLength OPTIONAL + IN CONST CHAR16 *String, + OUT CHAR16 **EndPointer OPTIONAL, + OUT IPv4_ADDRESS *Address, + OUT UINT8 *PrefixLength OPTIONAL ) { - RETURN_STATUS Status; - UINTN AddressIndex; - UINTN Uintn; - IPv4_ADDRESS LocalAddress; - UINT8 LocalPrefixLength; - CHAR16 *Pointer; + RETURN_STATUS Status; + UINTN AddressIndex; + UINTN Uintn; + IPv4_ADDRESS LocalAddress; + UINT8 LocalPrefixLength; + CHAR16 *Pointer; LocalPrefixLength = MAX_UINT8; - ASSERT (((UINTN) String & BIT0) == 0); + ASSERT (((UINTN)String & BIT0) == 0); // // 1. None of String or Guid shall be a null pointer. @@ -1336,7 +1363,7 @@ StrToIpv4Address ( SAFE_STRING_CONSTRAINT_CHECK ((String != NULL), RETURN_INVALID_PARAMETER); SAFE_STRING_CONSTRAINT_CHECK ((Address != NULL), RETURN_INVALID_PARAMETER); - for (Pointer = (CHAR16 *) String, AddressIndex = 0; AddressIndex < ARRAY_SIZE (Address->Addr) + 1;) { + for (Pointer = (CHAR16 *)String, AddressIndex = 0; AddressIndex < ARRAY_SIZE (Address->Addr) + 1;) { if (!InternalIsDecimalDigitCharacter (*Pointer)) { // // D or P contains invalid characters. @@ -1347,10 +1374,11 @@ StrToIpv4Address ( // // Get D or P. // - Status = StrDecimalToUintnS ((CONST CHAR16 *) Pointer, &Pointer, &Uintn); + Status = StrDecimalToUintnS ((CONST CHAR16 *)Pointer, &Pointer, &Uintn); if (RETURN_ERROR (Status)) { return RETURN_UNSUPPORTED; } + if (AddressIndex == ARRAY_SIZE (Address->Addr)) { // // It's P. @@ -1358,7 +1386,8 @@ StrToIpv4Address ( if (Uintn > 32) { return RETURN_UNSUPPORTED; } - LocalPrefixLength = (UINT8) Uintn; + + LocalPrefixLength = (UINT8)Uintn; } else { // // It's D. @@ -1366,7 +1395,8 @@ StrToIpv4Address ( if (Uintn > MAX_UINT8) { return RETURN_UNSUPPORTED; } - LocalAddress.Addr[AddressIndex] = (UINT8) Uintn; + + LocalAddress.Addr[AddressIndex] = (UINT8)Uintn; AddressIndex++; } @@ -1406,6 +1436,7 @@ StrToIpv4Address ( if (PrefixLength != NULL) { *PrefixLength = LocalPrefixLength; } + if (EndPointer != NULL) { *EndPointer = Pointer; } @@ -1458,14 +1489,14 @@ StrToIpv4Address ( RETURN_STATUS EFIAPI StrToGuid ( - IN CONST CHAR16 *String, - OUT GUID *Guid + IN CONST CHAR16 *String, + OUT GUID *Guid ) { - RETURN_STATUS Status; - GUID LocalGuid; + RETURN_STATUS Status; + GUID LocalGuid; - ASSERT (((UINTN) String & BIT0) == 0); + ASSERT (((UINTN)String & BIT0) == 0); // // 1. None of String or Guid shall be a null pointer. @@ -1476,49 +1507,53 @@ StrToGuid ( // // Get aabbccdd in big-endian. // - Status = StrHexToBytes (String, 2 * sizeof (LocalGuid.Data1), (UINT8 *) &LocalGuid.Data1, sizeof (LocalGuid.Data1)); - if (RETURN_ERROR (Status) || String[2 * sizeof (LocalGuid.Data1)] != L'-') { + Status = StrHexToBytes (String, 2 * sizeof (LocalGuid.Data1), (UINT8 *)&LocalGuid.Data1, sizeof (LocalGuid.Data1)); + if (RETURN_ERROR (Status) || (String[2 * sizeof (LocalGuid.Data1)] != L'-')) { return RETURN_UNSUPPORTED; } + // // Convert big-endian to little-endian. // LocalGuid.Data1 = SwapBytes32 (LocalGuid.Data1); - String += 2 * sizeof (LocalGuid.Data1) + 1; + String += 2 * sizeof (LocalGuid.Data1) + 1; // // Get eeff in big-endian. // - Status = StrHexToBytes (String, 2 * sizeof (LocalGuid.Data2), (UINT8 *) &LocalGuid.Data2, sizeof (LocalGuid.Data2)); - if (RETURN_ERROR (Status) || String[2 * sizeof (LocalGuid.Data2)] != L'-') { + Status = StrHexToBytes (String, 2 * sizeof (LocalGuid.Data2), (UINT8 *)&LocalGuid.Data2, sizeof (LocalGuid.Data2)); + if (RETURN_ERROR (Status) || (String[2 * sizeof (LocalGuid.Data2)] != L'-')) { return RETURN_UNSUPPORTED; } + // // Convert big-endian to little-endian. // LocalGuid.Data2 = SwapBytes16 (LocalGuid.Data2); - String += 2 * sizeof (LocalGuid.Data2) + 1; + String += 2 * sizeof (LocalGuid.Data2) + 1; // // Get gghh in big-endian. // - Status = StrHexToBytes (String, 2 * sizeof (LocalGuid.Data3), (UINT8 *) &LocalGuid.Data3, sizeof (LocalGuid.Data3)); - if (RETURN_ERROR (Status) || String[2 * sizeof (LocalGuid.Data3)] != L'-') { + Status = StrHexToBytes (String, 2 * sizeof (LocalGuid.Data3), (UINT8 *)&LocalGuid.Data3, sizeof (LocalGuid.Data3)); + if (RETURN_ERROR (Status) || (String[2 * sizeof (LocalGuid.Data3)] != L'-')) { return RETURN_UNSUPPORTED; } + // // Convert big-endian to little-endian. // LocalGuid.Data3 = SwapBytes16 (LocalGuid.Data3); - String += 2 * sizeof (LocalGuid.Data3) + 1; + String += 2 * sizeof (LocalGuid.Data3) + 1; // // Get iijj. // Status = StrHexToBytes (String, 2 * 2, &LocalGuid.Data4[0], 2); - if (RETURN_ERROR (Status) || String[2 * 2] != L'-') { + if (RETURN_ERROR (Status) || (String[2 * 2] != L'-')) { return RETURN_UNSUPPORTED; } + String += 2 * 2 + 1; // @@ -1569,15 +1604,15 @@ StrToGuid ( RETURN_STATUS EFIAPI StrHexToBytes ( - IN CONST CHAR16 *String, - IN UINTN Length, - OUT UINT8 *Buffer, - IN UINTN MaxBufferSize + IN CONST CHAR16 *String, + IN UINTN Length, + OUT UINT8 *Buffer, + IN UINTN MaxBufferSize ) { - UINTN Index; + UINTN Index; - ASSERT (((UINTN) String & BIT0) == 0); + ASSERT (((UINTN)String & BIT0) == 0); // // 1. None of String or Buffer shall be a null pointer. @@ -1610,6 +1645,7 @@ StrHexToBytes ( break; } } + if (Index != Length) { return RETURN_UNSUPPORTED; } @@ -1617,18 +1653,18 @@ StrHexToBytes ( // // Convert the hex string to bytes. // - for(Index = 0; Index < Length; Index++) { - + for (Index = 0; Index < Length; Index++) { // // For even characters, write the upper nibble for each buffer byte, // and for even characters, the lower nibble. // if ((Index & BIT0) == 0) { - Buffer[Index / 2] = (UINT8) InternalHexCharToUintn (String[Index]) << 4; + Buffer[Index / 2] = (UINT8)InternalHexCharToUintn (String[Index]) << 4; } else { - Buffer[Index / 2] |= (UINT8) InternalHexCharToUintn (String[Index]); + Buffer[Index / 2] |= (UINT8)InternalHexCharToUintn (String[Index]); } } + return RETURN_SUCCESS; } @@ -1649,11 +1685,11 @@ StrHexToBytes ( UINTN EFIAPI AsciiStrnLenS ( - IN CONST CHAR8 *String, - IN UINTN MaxSize + IN CONST CHAR8 *String, + IN UINTN MaxSize ) { - UINTN Length; + UINTN Length; // // If String is a null pointer or MaxSize is 0, then the AsciiStrnLenS function returns zero. @@ -1673,8 +1709,10 @@ AsciiStrnLenS ( if (Length >= MaxSize - 1) { return MaxSize; } + Length++; } + return Length; } @@ -1700,8 +1738,8 @@ AsciiStrnLenS ( UINTN EFIAPI AsciiStrnSizeS ( - IN CONST CHAR8 *String, - IN UINTN MaxSize + IN CONST CHAR8 *String, + IN UINTN MaxSize ) { // @@ -1753,7 +1791,7 @@ AsciiStrCpyS ( IN CONST CHAR8 *Source ) { - UINTN SourceLen; + UINTN SourceLen; // // 1. Neither Destination nor Source shall be a null pointer. @@ -1791,6 +1829,7 @@ AsciiStrCpyS ( while (*Source != 0) { *(Destination++) = *(Source++); } + *Destination = 0; return RETURN_SUCCESS; @@ -1831,7 +1870,7 @@ AsciiStrnCpyS ( IN UINTN Length ) { - UINTN SourceLen; + UINTN SourceLen; // // 1. Neither Destination nor Source shall be a null pointer. @@ -1866,6 +1905,7 @@ AsciiStrnCpyS ( if (SourceLen > Length) { SourceLen = Length; } + SAFE_STRING_CONSTRAINT_CHECK (InternalSafeStringNoAsciiStrOverlap (Destination, DestMax, (CHAR8 *)Source, SourceLen + 1), RETURN_ACCESS_DENIED); // @@ -1878,6 +1918,7 @@ AsciiStrnCpyS ( *(Destination++) = *(Source++); SourceLen--; } + *Destination = 0; return RETURN_SUCCESS; @@ -1917,9 +1958,9 @@ AsciiStrCatS ( IN CONST CHAR8 *Source ) { - UINTN DestLen; - UINTN CopyLen; - UINTN SourceLen; + UINTN DestLen; + UINTN CopyLen; + UINTN SourceLen; // // Let CopyLen denote the value DestMax - AsciiStrnLenS(Destination, DestMax) upon entry to AsciiStrCatS. @@ -1970,6 +2011,7 @@ AsciiStrCatS ( while (*Source != 0) { *(Destination++) = *(Source++); } + *Destination = 0; return RETURN_SUCCESS; @@ -2013,9 +2055,9 @@ AsciiStrnCatS ( IN UINTN Length ) { - UINTN DestLen; - UINTN CopyLen; - UINTN SourceLen; + UINTN DestLen; + UINTN CopyLen; + UINTN SourceLen; // // Let CopyLen denote the value DestMax - AsciiStrnLenS(Destination, DestMax) upon entry to AsciiStrnCatS. @@ -2061,6 +2103,7 @@ AsciiStrnCatS ( if (SourceLen > Length) { SourceLen = Length; } + SAFE_STRING_CONSTRAINT_CHECK (InternalSafeStringNoAsciiStrOverlap (Destination, DestMax, (CHAR8 *)Source, SourceLen + 1), RETURN_ACCESS_DENIED); // @@ -2075,6 +2118,7 @@ AsciiStrnCatS ( *(Destination++) = *(Source++); SourceLen--; } + *Destination = 0; return RETURN_SUCCESS; @@ -2124,9 +2168,9 @@ AsciiStrnCatS ( RETURN_STATUS EFIAPI AsciiStrDecimalToUintnS ( - IN CONST CHAR8 *String, - OUT CHAR8 **EndPointer OPTIONAL, - OUT UINTN *Data + IN CONST CHAR8 *String, + OUT CHAR8 **EndPointer OPTIONAL, + OUT UINTN *Data ) { // @@ -2143,7 +2187,7 @@ AsciiStrDecimalToUintnS ( } if (EndPointer != NULL) { - *EndPointer = (CHAR8 *) String; + *EndPointer = (CHAR8 *)String; } // @@ -2171,8 +2215,9 @@ AsciiStrDecimalToUintnS ( if (*Data > ((MAX_UINTN - (*String - '0')) / 10)) { *Data = MAX_UINTN; if (EndPointer != NULL) { - *EndPointer = (CHAR8 *) String; + *EndPointer = (CHAR8 *)String; } + return RETURN_UNSUPPORTED; } @@ -2181,8 +2226,9 @@ AsciiStrDecimalToUintnS ( } if (EndPointer != NULL) { - *EndPointer = (CHAR8 *) String; + *EndPointer = (CHAR8 *)String; } + return RETURN_SUCCESS; } @@ -2230,9 +2276,9 @@ AsciiStrDecimalToUintnS ( RETURN_STATUS EFIAPI AsciiStrDecimalToUint64S ( - IN CONST CHAR8 *String, - OUT CHAR8 **EndPointer OPTIONAL, - OUT UINT64 *Data + IN CONST CHAR8 *String, + OUT CHAR8 **EndPointer OPTIONAL, + OUT UINT64 *Data ) { // @@ -2249,7 +2295,7 @@ AsciiStrDecimalToUint64S ( } if (EndPointer != NULL) { - *EndPointer = (CHAR8 *) String; + *EndPointer = (CHAR8 *)String; } // @@ -2277,8 +2323,9 @@ AsciiStrDecimalToUint64S ( if (*Data > DivU64x32 (MAX_UINT64 - (*String - '0'), 10)) { *Data = MAX_UINT64; if (EndPointer != NULL) { - *EndPointer = (CHAR8 *) String; + *EndPointer = (CHAR8 *)String; } + return RETURN_UNSUPPORTED; } @@ -2287,8 +2334,9 @@ AsciiStrDecimalToUint64S ( } if (EndPointer != NULL) { - *EndPointer = (CHAR8 *) String; + *EndPointer = (CHAR8 *)String; } + return RETURN_SUCCESS; } @@ -2340,9 +2388,9 @@ AsciiStrDecimalToUint64S ( RETURN_STATUS EFIAPI AsciiStrHexToUintnS ( - IN CONST CHAR8 *String, - OUT CHAR8 **EndPointer OPTIONAL, - OUT UINTN *Data + IN CONST CHAR8 *String, + OUT CHAR8 **EndPointer OPTIONAL, + OUT UINTN *Data ) { // @@ -2359,7 +2407,7 @@ AsciiStrHexToUintnS ( } if (EndPointer != NULL) { - *EndPointer = (CHAR8 *) String; + *EndPointer = (CHAR8 *)String; } // @@ -2381,6 +2429,7 @@ AsciiStrHexToUintnS ( *Data = 0; return RETURN_SUCCESS; } + // // Skip the 'X' // @@ -2398,8 +2447,9 @@ AsciiStrHexToUintnS ( if (*Data > ((MAX_UINTN - InternalAsciiHexCharToUintn (*String)) >> 4)) { *Data = MAX_UINTN; if (EndPointer != NULL) { - *EndPointer = (CHAR8 *) String; + *EndPointer = (CHAR8 *)String; } + return RETURN_UNSUPPORTED; } @@ -2408,8 +2458,9 @@ AsciiStrHexToUintnS ( } if (EndPointer != NULL) { - *EndPointer = (CHAR8 *) String; + *EndPointer = (CHAR8 *)String; } + return RETURN_SUCCESS; } @@ -2461,9 +2512,9 @@ AsciiStrHexToUintnS ( RETURN_STATUS EFIAPI AsciiStrHexToUint64S ( - IN CONST CHAR8 *String, - OUT CHAR8 **EndPointer OPTIONAL, - OUT UINT64 *Data + IN CONST CHAR8 *String, + OUT CHAR8 **EndPointer OPTIONAL, + OUT UINT64 *Data ) { // @@ -2480,7 +2531,7 @@ AsciiStrHexToUint64S ( } if (EndPointer != NULL) { - *EndPointer = (CHAR8 *) String; + *EndPointer = (CHAR8 *)String; } // @@ -2502,6 +2553,7 @@ AsciiStrHexToUint64S ( *Data = 0; return RETURN_SUCCESS; } + // // Skip the 'X' // @@ -2519,8 +2571,9 @@ AsciiStrHexToUint64S ( if (*Data > RShiftU64 (MAX_UINT64 - InternalAsciiHexCharToUintn (*String), 4)) { *Data = MAX_UINT64; if (EndPointer != NULL) { - *EndPointer = (CHAR8 *) String; + *EndPointer = (CHAR8 *)String; } + return RETURN_UNSUPPORTED; } @@ -2529,8 +2582,9 @@ AsciiStrHexToUint64S ( } if (EndPointer != NULL) { - *EndPointer = (CHAR8 *) String; + *EndPointer = (CHAR8 *)String; } + return RETURN_SUCCESS; } @@ -2577,14 +2631,14 @@ AsciiStrHexToUint64S ( RETURN_STATUS EFIAPI UnicodeStrToAsciiStrS ( - IN CONST CHAR16 *Source, - OUT CHAR8 *Destination, - IN UINTN DestMax + IN CONST CHAR16 *Source, + OUT CHAR8 *Destination, + IN UINTN DestMax ) { - UINTN SourceLen; + UINTN SourceLen; - ASSERT (((UINTN) Source & BIT0) == 0); + ASSERT (((UINTN)Source & BIT0) == 0); // // 1. Neither Destination nor Source shall be a null pointer. @@ -2598,6 +2652,7 @@ UnicodeStrToAsciiStrS ( if (ASCII_RSIZE_MAX != 0) { SAFE_STRING_CONSTRAINT_CHECK ((DestMax <= ASCII_RSIZE_MAX), RETURN_INVALID_PARAMETER); } + if (RSIZE_MAX != 0) { SAFE_STRING_CONSTRAINT_CHECK ((DestMax <= RSIZE_MAX), RETURN_INVALID_PARAMETER); } @@ -2616,7 +2671,7 @@ UnicodeStrToAsciiStrS ( // // 5. Copying shall not take place between objects that overlap. // - SAFE_STRING_CONSTRAINT_CHECK (!InternalSafeStringIsOverlap (Destination, DestMax, (VOID *)Source, (SourceLen + 1) * sizeof(CHAR16)), RETURN_ACCESS_DENIED); + SAFE_STRING_CONSTRAINT_CHECK (!InternalSafeStringIsOverlap (Destination, DestMax, (VOID *)Source, (SourceLen + 1) * sizeof (CHAR16)), RETURN_ACCESS_DENIED); // // convert string @@ -2627,8 +2682,9 @@ UnicodeStrToAsciiStrS ( // non-zero value in the upper 8 bits, then ASSERT(). // ASSERT (*Source < 0x100); - *(Destination++) = (CHAR8) *(Source++); + *(Destination++) = (CHAR8)*(Source++); } + *Destination = '\0'; return RETURN_SUCCESS; @@ -2682,16 +2738,16 @@ UnicodeStrToAsciiStrS ( RETURN_STATUS EFIAPI UnicodeStrnToAsciiStrS ( - IN CONST CHAR16 *Source, - IN UINTN Length, - OUT CHAR8 *Destination, - IN UINTN DestMax, - OUT UINTN *DestinationLength + IN CONST CHAR16 *Source, + IN UINTN Length, + OUT CHAR8 *Destination, + IN UINTN DestMax, + OUT UINTN *DestinationLength ) { - UINTN SourceLen; + UINTN SourceLen; - ASSERT (((UINTN) Source & BIT0) == 0); + ASSERT (((UINTN)Source & BIT0) == 0); // // 1. None of Destination, Source or DestinationLength shall be a null @@ -2709,6 +2765,7 @@ UnicodeStrnToAsciiStrS ( SAFE_STRING_CONSTRAINT_CHECK ((Length <= ASCII_RSIZE_MAX), RETURN_INVALID_PARAMETER); SAFE_STRING_CONSTRAINT_CHECK ((DestMax <= ASCII_RSIZE_MAX), RETURN_INVALID_PARAMETER); } + if (RSIZE_MAX != 0) { SAFE_STRING_CONSTRAINT_CHECK ((Length <= RSIZE_MAX), RETURN_INVALID_PARAMETER); SAFE_STRING_CONSTRAINT_CHECK ((DestMax <= RSIZE_MAX), RETURN_INVALID_PARAMETER); @@ -2734,7 +2791,8 @@ UnicodeStrnToAsciiStrS ( if (SourceLen > Length) { SourceLen = Length; } - SAFE_STRING_CONSTRAINT_CHECK (!InternalSafeStringIsOverlap (Destination, DestMax, (VOID *)Source, (SourceLen + 1) * sizeof(CHAR16)), RETURN_ACCESS_DENIED); + + SAFE_STRING_CONSTRAINT_CHECK (!InternalSafeStringIsOverlap (Destination, DestMax, (VOID *)Source, (SourceLen + 1) * sizeof (CHAR16)), RETURN_ACCESS_DENIED); *DestinationLength = 0; @@ -2747,10 +2805,11 @@ UnicodeStrnToAsciiStrS ( // 8 bits, then ASSERT(). // ASSERT (*Source < 0x100); - *(Destination++) = (CHAR8) *(Source++); + *(Destination++) = (CHAR8)*(Source++); SourceLen--; (*DestinationLength)++; } + *Destination = 0; return RETURN_SUCCESS; @@ -2795,14 +2854,14 @@ UnicodeStrnToAsciiStrS ( RETURN_STATUS EFIAPI AsciiStrToUnicodeStrS ( - IN CONST CHAR8 *Source, - OUT CHAR16 *Destination, - IN UINTN DestMax + IN CONST CHAR8 *Source, + OUT CHAR16 *Destination, + IN UINTN DestMax ) { - UINTN SourceLen; + UINTN SourceLen; - ASSERT (((UINTN) Destination & BIT0) == 0); + ASSERT (((UINTN)Destination & BIT0) == 0); // // 1. Neither Destination nor Source shall be a null pointer. @@ -2816,6 +2875,7 @@ AsciiStrToUnicodeStrS ( if (RSIZE_MAX != 0) { SAFE_STRING_CONSTRAINT_CHECK ((DestMax <= RSIZE_MAX), RETURN_INVALID_PARAMETER); } + if (ASCII_RSIZE_MAX != 0) { SAFE_STRING_CONSTRAINT_CHECK ((DestMax <= ASCII_RSIZE_MAX), RETURN_INVALID_PARAMETER); } @@ -2834,7 +2894,7 @@ AsciiStrToUnicodeStrS ( // // 5. Copying shall not take place between objects that overlap. // - SAFE_STRING_CONSTRAINT_CHECK (!InternalSafeStringIsOverlap (Destination, DestMax * sizeof(CHAR16), (VOID *)Source, SourceLen + 1), RETURN_ACCESS_DENIED); + SAFE_STRING_CONSTRAINT_CHECK (!InternalSafeStringIsOverlap (Destination, DestMax * sizeof (CHAR16), (VOID *)Source, SourceLen + 1), RETURN_ACCESS_DENIED); // // Convert string @@ -2842,6 +2902,7 @@ AsciiStrToUnicodeStrS ( while (*Source != '\0') { *(Destination++) = (CHAR16)(UINT8)*(Source++); } + *Destination = '\0'; return RETURN_SUCCESS; @@ -2892,16 +2953,16 @@ AsciiStrToUnicodeStrS ( RETURN_STATUS EFIAPI AsciiStrnToUnicodeStrS ( - IN CONST CHAR8 *Source, - IN UINTN Length, - OUT CHAR16 *Destination, - IN UINTN DestMax, - OUT UINTN *DestinationLength + IN CONST CHAR8 *Source, + IN UINTN Length, + OUT CHAR16 *Destination, + IN UINTN DestMax, + OUT UINTN *DestinationLength ) { - UINTN SourceLen; + UINTN SourceLen; - ASSERT (((UINTN) Destination & BIT0) == 0); + ASSERT (((UINTN)Destination & BIT0) == 0); // // 1. None of Destination, Source or DestinationLength shall be a null @@ -2919,6 +2980,7 @@ AsciiStrnToUnicodeStrS ( SAFE_STRING_CONSTRAINT_CHECK ((Length <= RSIZE_MAX), RETURN_INVALID_PARAMETER); SAFE_STRING_CONSTRAINT_CHECK ((DestMax <= RSIZE_MAX), RETURN_INVALID_PARAMETER); } + if (ASCII_RSIZE_MAX != 0) { SAFE_STRING_CONSTRAINT_CHECK ((Length <= ASCII_RSIZE_MAX), RETURN_INVALID_PARAMETER); SAFE_STRING_CONSTRAINT_CHECK ((DestMax <= ASCII_RSIZE_MAX), RETURN_INVALID_PARAMETER); @@ -2944,7 +3006,8 @@ AsciiStrnToUnicodeStrS ( if (SourceLen > Length) { SourceLen = Length; } - SAFE_STRING_CONSTRAINT_CHECK (!InternalSafeStringIsOverlap (Destination, DestMax * sizeof(CHAR16), (VOID *)Source, SourceLen + 1), RETURN_ACCESS_DENIED); + + SAFE_STRING_CONSTRAINT_CHECK (!InternalSafeStringIsOverlap (Destination, DestMax * sizeof (CHAR16), (VOID *)Source, SourceLen + 1), RETURN_ACCESS_DENIED); *DestinationLength = 0; @@ -2956,6 +3019,7 @@ AsciiStrnToUnicodeStrS ( SourceLen--; (*DestinationLength)++; } + *Destination = 0; return RETURN_SUCCESS; @@ -3012,21 +3076,21 @@ AsciiStrnToUnicodeStrS ( RETURN_STATUS EFIAPI AsciiStrToIpv6Address ( - IN CONST CHAR8 *String, - OUT CHAR8 **EndPointer OPTIONAL, - OUT IPv6_ADDRESS *Address, - OUT UINT8 *PrefixLength OPTIONAL + IN CONST CHAR8 *String, + OUT CHAR8 **EndPointer OPTIONAL, + OUT IPv6_ADDRESS *Address, + OUT UINT8 *PrefixLength OPTIONAL ) { - RETURN_STATUS Status; - UINTN AddressIndex; - UINTN Uintn; - IPv6_ADDRESS LocalAddress; - UINT8 LocalPrefixLength; - CONST CHAR8 *Pointer; - CHAR8 *End; - UINTN CompressStart; - BOOLEAN ExpectPrefix; + RETURN_STATUS Status; + UINTN AddressIndex; + UINTN Uintn; + IPv6_ADDRESS LocalAddress; + UINT8 LocalPrefixLength; + CONST CHAR8 *Pointer; + CHAR8 *End; + UINTN CompressStart; + BOOLEAN ExpectPrefix; LocalPrefixLength = MAX_UINT8; CompressStart = ARRAY_SIZE (Address->Addr); @@ -3058,7 +3122,7 @@ AsciiStrToIpv6Address ( return RETURN_UNSUPPORTED; } - if (CompressStart != ARRAY_SIZE (Address->Addr) || AddressIndex == ARRAY_SIZE (Address->Addr)) { + if ((CompressStart != ARRAY_SIZE (Address->Addr)) || (AddressIndex == ARRAY_SIZE (Address->Addr))) { // // "::" can only appear once. // "::" can only appear when address is not full length. @@ -3078,6 +3142,7 @@ AsciiStrToIpv6Address ( // return RETURN_UNSUPPORTED; } + Pointer++; } } @@ -3100,33 +3165,35 @@ AsciiStrToIpv6Address ( // Get X. // Status = AsciiStrHexToUintnS (Pointer, &End, &Uintn); - if (RETURN_ERROR (Status) || End - Pointer > 4) { + if (RETURN_ERROR (Status) || (End - Pointer > 4)) { // // Number of hexadecimal digit characters is no more than 4. // return RETURN_UNSUPPORTED; } + Pointer = End; // // Uintn won't exceed MAX_UINT16 if number of hexadecimal digit characters is no more than 4. // ASSERT (AddressIndex + 1 < ARRAY_SIZE (Address->Addr)); - LocalAddress.Addr[AddressIndex] = (UINT8) ((UINT16) Uintn >> 8); - LocalAddress.Addr[AddressIndex + 1] = (UINT8) Uintn; - AddressIndex += 2; + LocalAddress.Addr[AddressIndex] = (UINT8)((UINT16)Uintn >> 8); + LocalAddress.Addr[AddressIndex + 1] = (UINT8)Uintn; + AddressIndex += 2; } else { // // Get P, then exit the loop. // Status = AsciiStrDecimalToUintnS (Pointer, &End, &Uintn); - if (RETURN_ERROR (Status) || End == Pointer || Uintn > 128) { + if (RETURN_ERROR (Status) || (End == Pointer) || (Uintn > 128)) { // // Prefix length should not exceed 128. // return RETURN_UNSUPPORTED; } - LocalPrefixLength = (UINT8) Uintn; - Pointer = End; + + LocalPrefixLength = (UINT8)Uintn; + Pointer = End; break; } } @@ -3149,18 +3216,21 @@ AsciiStrToIpv6Address ( // break; } + Pointer++; } - if ((AddressIndex == ARRAY_SIZE (Address->Addr) && CompressStart != ARRAY_SIZE (Address->Addr)) || - (AddressIndex != ARRAY_SIZE (Address->Addr) && CompressStart == ARRAY_SIZE (Address->Addr)) - ) { + if (((AddressIndex == ARRAY_SIZE (Address->Addr)) && (CompressStart != ARRAY_SIZE (Address->Addr))) || + ((AddressIndex != ARRAY_SIZE (Address->Addr)) && (CompressStart == ARRAY_SIZE (Address->Addr))) + ) + { // // Full length of address shall not have compressing zeros. // Non-full length of address shall have compressing zeros. // return RETURN_UNSUPPORTED; } + CopyMem (&Address->Addr[0], &LocalAddress.Addr[0], CompressStart); ZeroMem (&Address->Addr[CompressStart], ARRAY_SIZE (Address->Addr) - AddressIndex); if (AddressIndex > CompressStart) { @@ -3169,14 +3239,14 @@ AsciiStrToIpv6Address ( &LocalAddress.Addr[CompressStart], AddressIndex - CompressStart ); - } if (PrefixLength != NULL) { *PrefixLength = LocalPrefixLength; } + if (EndPointer != NULL) { - *EndPointer = (CHAR8 *) Pointer; + *EndPointer = (CHAR8 *)Pointer; } return RETURN_SUCCESS; @@ -3224,18 +3294,18 @@ AsciiStrToIpv6Address ( RETURN_STATUS EFIAPI AsciiStrToIpv4Address ( - IN CONST CHAR8 *String, - OUT CHAR8 **EndPointer OPTIONAL, - OUT IPv4_ADDRESS *Address, - OUT UINT8 *PrefixLength OPTIONAL + IN CONST CHAR8 *String, + OUT CHAR8 **EndPointer OPTIONAL, + OUT IPv4_ADDRESS *Address, + OUT UINT8 *PrefixLength OPTIONAL ) { - RETURN_STATUS Status; - UINTN AddressIndex; - UINTN Uintn; - IPv4_ADDRESS LocalAddress; - UINT8 LocalPrefixLength; - CHAR8 *Pointer; + RETURN_STATUS Status; + UINTN AddressIndex; + UINTN Uintn; + IPv4_ADDRESS LocalAddress; + UINT8 LocalPrefixLength; + CHAR8 *Pointer; LocalPrefixLength = MAX_UINT8; @@ -3245,7 +3315,7 @@ AsciiStrToIpv4Address ( SAFE_STRING_CONSTRAINT_CHECK ((String != NULL), RETURN_INVALID_PARAMETER); SAFE_STRING_CONSTRAINT_CHECK ((Address != NULL), RETURN_INVALID_PARAMETER); - for (Pointer = (CHAR8 *) String, AddressIndex = 0; AddressIndex < ARRAY_SIZE (Address->Addr) + 1;) { + for (Pointer = (CHAR8 *)String, AddressIndex = 0; AddressIndex < ARRAY_SIZE (Address->Addr) + 1;) { if (!InternalAsciiIsDecimalDigitCharacter (*Pointer)) { // // D or P contains invalid characters. @@ -3256,10 +3326,11 @@ AsciiStrToIpv4Address ( // // Get D or P. // - Status = AsciiStrDecimalToUintnS ((CONST CHAR8 *) Pointer, &Pointer, &Uintn); + Status = AsciiStrDecimalToUintnS ((CONST CHAR8 *)Pointer, &Pointer, &Uintn); if (RETURN_ERROR (Status)) { return RETURN_UNSUPPORTED; } + if (AddressIndex == ARRAY_SIZE (Address->Addr)) { // // It's P. @@ -3267,7 +3338,8 @@ AsciiStrToIpv4Address ( if (Uintn > 32) { return RETURN_UNSUPPORTED; } - LocalPrefixLength = (UINT8) Uintn; + + LocalPrefixLength = (UINT8)Uintn; } else { // // It's D. @@ -3275,7 +3347,8 @@ AsciiStrToIpv4Address ( if (Uintn > MAX_UINT8) { return RETURN_UNSUPPORTED; } - LocalAddress.Addr[AddressIndex] = (UINT8) Uintn; + + LocalAddress.Addr[AddressIndex] = (UINT8)Uintn; AddressIndex++; } @@ -3315,6 +3388,7 @@ AsciiStrToIpv4Address ( if (PrefixLength != NULL) { *PrefixLength = LocalPrefixLength; } + if (EndPointer != NULL) { *EndPointer = Pointer; } @@ -3365,12 +3439,12 @@ AsciiStrToIpv4Address ( RETURN_STATUS EFIAPI AsciiStrToGuid ( - IN CONST CHAR8 *String, - OUT GUID *Guid + IN CONST CHAR8 *String, + OUT GUID *Guid ) { - RETURN_STATUS Status; - GUID LocalGuid; + RETURN_STATUS Status; + GUID LocalGuid; // // None of String or Guid shall be a null pointer. @@ -3381,49 +3455,53 @@ AsciiStrToGuid ( // // Get aabbccdd in big-endian. // - Status = AsciiStrHexToBytes (String, 2 * sizeof (LocalGuid.Data1), (UINT8 *) &LocalGuid.Data1, sizeof (LocalGuid.Data1)); - if (RETURN_ERROR (Status) || String[2 * sizeof (LocalGuid.Data1)] != '-') { + Status = AsciiStrHexToBytes (String, 2 * sizeof (LocalGuid.Data1), (UINT8 *)&LocalGuid.Data1, sizeof (LocalGuid.Data1)); + if (RETURN_ERROR (Status) || (String[2 * sizeof (LocalGuid.Data1)] != '-')) { return RETURN_UNSUPPORTED; } + // // Convert big-endian to little-endian. // LocalGuid.Data1 = SwapBytes32 (LocalGuid.Data1); - String += 2 * sizeof (LocalGuid.Data1) + 1; + String += 2 * sizeof (LocalGuid.Data1) + 1; // // Get eeff in big-endian. // - Status = AsciiStrHexToBytes (String, 2 * sizeof (LocalGuid.Data2), (UINT8 *) &LocalGuid.Data2, sizeof (LocalGuid.Data2)); - if (RETURN_ERROR (Status) || String[2 * sizeof (LocalGuid.Data2)] != '-') { + Status = AsciiStrHexToBytes (String, 2 * sizeof (LocalGuid.Data2), (UINT8 *)&LocalGuid.Data2, sizeof (LocalGuid.Data2)); + if (RETURN_ERROR (Status) || (String[2 * sizeof (LocalGuid.Data2)] != '-')) { return RETURN_UNSUPPORTED; } + // // Convert big-endian to little-endian. // LocalGuid.Data2 = SwapBytes16 (LocalGuid.Data2); - String += 2 * sizeof (LocalGuid.Data2) + 1; + String += 2 * sizeof (LocalGuid.Data2) + 1; // // Get gghh in big-endian. // - Status = AsciiStrHexToBytes (String, 2 * sizeof (LocalGuid.Data3), (UINT8 *) &LocalGuid.Data3, sizeof (LocalGuid.Data3)); - if (RETURN_ERROR (Status) || String[2 * sizeof (LocalGuid.Data3)] != '-') { + Status = AsciiStrHexToBytes (String, 2 * sizeof (LocalGuid.Data3), (UINT8 *)&LocalGuid.Data3, sizeof (LocalGuid.Data3)); + if (RETURN_ERROR (Status) || (String[2 * sizeof (LocalGuid.Data3)] != '-')) { return RETURN_UNSUPPORTED; } + // // Convert big-endian to little-endian. // LocalGuid.Data3 = SwapBytes16 (LocalGuid.Data3); - String += 2 * sizeof (LocalGuid.Data3) + 1; + String += 2 * sizeof (LocalGuid.Data3) + 1; // // Get iijj. // Status = AsciiStrHexToBytes (String, 2 * 2, &LocalGuid.Data4[0], 2); - if (RETURN_ERROR (Status) || String[2 * 2] != '-') { + if (RETURN_ERROR (Status) || (String[2 * 2] != '-')) { return RETURN_UNSUPPORTED; } + String += 2 * 2 + 1; // @@ -3472,13 +3550,13 @@ AsciiStrToGuid ( RETURN_STATUS EFIAPI AsciiStrHexToBytes ( - IN CONST CHAR8 *String, - IN UINTN Length, - OUT UINT8 *Buffer, - IN UINTN MaxBufferSize + IN CONST CHAR8 *String, + IN UINTN Length, + OUT UINT8 *Buffer, + IN UINTN MaxBufferSize ) { - UINTN Index; + UINTN Index; // // 1. None of String or Buffer shall be a null pointer. @@ -3511,6 +3589,7 @@ AsciiStrHexToBytes ( break; } } + if (Index != Length) { return RETURN_UNSUPPORTED; } @@ -3518,17 +3597,17 @@ AsciiStrHexToBytes ( // // Convert the hex string to bytes. // - for(Index = 0; Index < Length; Index++) { - + for (Index = 0; Index < Length; Index++) { // // For even characters, write the upper nibble for each buffer byte, // and for even characters, the lower nibble. // if ((Index & BIT0) == 0) { - Buffer[Index / 2] = (UINT8) InternalAsciiHexCharToUintn (String[Index]) << 4; + Buffer[Index / 2] = (UINT8)InternalAsciiHexCharToUintn (String[Index]) << 4; } else { - Buffer[Index / 2] |= (UINT8) InternalAsciiHexCharToUintn (String[Index]); + Buffer[Index / 2] |= (UINT8)InternalAsciiHexCharToUintn (String[Index]); } } + return RETURN_SUCCESS; } diff --git a/MdePkg/Library/BaseLib/SetJump.c b/MdePkg/Library/BaseLib/SetJump.c index 516f92f..22345e9 100644 --- a/MdePkg/Library/BaseLib/SetJump.c +++ b/MdePkg/Library/BaseLib/SetJump.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** diff --git a/MdePkg/Library/BaseLib/String.c b/MdePkg/Library/BaseLib/String.c index f4854f3..98e6d31 100644 --- a/MdePkg/Library/BaseLib/String.c +++ b/MdePkg/Library/BaseLib/String.c @@ -8,7 +8,6 @@ #include "BaseLibInternals.h" - /** Returns the length of a Null-terminated Unicode string. @@ -29,13 +28,13 @@ UINTN EFIAPI StrLen ( - IN CONST CHAR16 *String + IN CONST CHAR16 *String ) { - UINTN Length; + UINTN Length; ASSERT (String != NULL); - ASSERT (((UINTN) String & BIT0) == 0); + ASSERT (((UINTN)String & BIT0) == 0); for (Length = 0; *String != L'\0'; String++, Length++) { // @@ -46,6 +45,7 @@ StrLen ( ASSERT (Length < PcdGet32 (PcdMaximumUnicodeStringLength)); } } + return Length; } @@ -70,7 +70,7 @@ StrLen ( UINTN EFIAPI StrSize ( - IN CONST CHAR16 *String + IN CONST CHAR16 *String ) { return (StrLen (String) + 1) * sizeof (*String); @@ -107,8 +107,8 @@ StrSize ( INTN EFIAPI StrCmp ( - IN CONST CHAR16 *FirstString, - IN CONST CHAR16 *SecondString + IN CONST CHAR16 *FirstString, + IN CONST CHAR16 *SecondString ) { // @@ -121,6 +121,7 @@ StrCmp ( FirstString++; SecondString++; } + return *FirstString - *SecondString; } @@ -159,9 +160,9 @@ StrCmp ( INTN EFIAPI StrnCmp ( - IN CONST CHAR16 *FirstString, - IN CONST CHAR16 *SecondString, - IN UINTN Length + IN CONST CHAR16 *FirstString, + IN CONST CHAR16 *SecondString, + IN UINTN Length ) { if (Length == 0) { @@ -182,7 +183,8 @@ StrnCmp ( while ((*FirstString != L'\0') && (*SecondString != L'\0') && (*FirstString == *SecondString) && - (Length > 1)) { + (Length > 1)) + { FirstString++; SecondString++; Length--; @@ -191,7 +193,6 @@ StrnCmp ( return *FirstString - *SecondString; } - /** Returns the first occurrence of a Null-terminated Unicode sub-string in a Null-terminated Unicode string. @@ -221,12 +222,12 @@ StrnCmp ( CHAR16 * EFIAPI StrStr ( - IN CONST CHAR16 *String, - IN CONST CHAR16 *SearchString + IN CONST CHAR16 *String, + IN CONST CHAR16 *SearchString ) { - CONST CHAR16 *FirstMatch; - CONST CHAR16 *SearchStringTmp; + CONST CHAR16 *FirstMatch; + CONST CHAR16 *SearchStringTmp; // // ASSERT both strings are less long than PcdMaximumUnicodeStringLength. @@ -236,21 +237,22 @@ StrStr ( ASSERT (StrSize (SearchString) != 0); if (*SearchString == L'\0') { - return (CHAR16 *) String; + return (CHAR16 *)String; } while (*String != L'\0') { SearchStringTmp = SearchString; - FirstMatch = String; + FirstMatch = String; - while ((*String == *SearchStringTmp) - && (*String != L'\0')) { + while ( (*String == *SearchStringTmp) + && (*String != L'\0')) + { String++; SearchStringTmp++; } if (*SearchStringTmp == L'\0') { - return (CHAR16 *) FirstMatch; + return (CHAR16 *)FirstMatch; } if (*String == L'\0') { @@ -279,10 +281,10 @@ StrStr ( BOOLEAN EFIAPI InternalIsDecimalDigitCharacter ( - IN CHAR16 Char + IN CHAR16 Char ) { - return (BOOLEAN) (Char >= L'0' && Char <= L'9'); + return (BOOLEAN)(Char >= L'0' && Char <= L'9'); } /** @@ -303,11 +305,11 @@ InternalIsDecimalDigitCharacter ( CHAR16 EFIAPI CharToUpper ( - IN CHAR16 Char + IN CHAR16 Char ) { - if (Char >= L'a' && Char <= L'z') { - return (CHAR16) (Char - (L'a' - L'A')); + if ((Char >= L'a') && (Char <= L'z')) { + return (CHAR16)(Char - (L'a' - L'A')); } return Char; @@ -329,7 +331,7 @@ CharToUpper ( UINTN EFIAPI InternalHexCharToUintn ( - IN CHAR16 Char + IN CHAR16 Char ) { if (InternalIsDecimalDigitCharacter (Char)) { @@ -356,13 +358,12 @@ InternalHexCharToUintn ( BOOLEAN EFIAPI InternalIsHexaDecimalDigitCharacter ( - IN CHAR16 Char + IN CHAR16 Char ) { - - return (BOOLEAN) (InternalIsDecimalDigitCharacter (Char) || - (Char >= L'A' && Char <= L'F') || - (Char >= L'a' && Char <= L'f')); + return (BOOLEAN)(InternalIsDecimalDigitCharacter (Char) || + (Char >= L'A' && Char <= L'F') || + (Char >= L'a' && Char <= L'f')); } /** @@ -402,16 +403,15 @@ InternalIsHexaDecimalDigitCharacter ( UINTN EFIAPI StrDecimalToUintn ( - IN CONST CHAR16 *String + IN CONST CHAR16 *String ) { - UINTN Result; + UINTN Result; - StrDecimalToUintnS (String, (CHAR16 **) NULL, &Result); + StrDecimalToUintnS (String, (CHAR16 **)NULL, &Result); return Result; } - /** Convert a Null-terminated Unicode decimal string to a value of type UINT64. @@ -449,12 +449,12 @@ StrDecimalToUintn ( UINT64 EFIAPI StrDecimalToUint64 ( - IN CONST CHAR16 *String + IN CONST CHAR16 *String ) { - UINT64 Result; + UINT64 Result; - StrDecimalToUint64S (String, (CHAR16 **) NULL, &Result); + StrDecimalToUint64S (String, (CHAR16 **)NULL, &Result); return Result; } @@ -496,16 +496,15 @@ StrDecimalToUint64 ( UINTN EFIAPI StrHexToUintn ( - IN CONST CHAR16 *String + IN CONST CHAR16 *String ) { - UINTN Result; + UINTN Result; - StrHexToUintnS (String, (CHAR16 **) NULL, &Result); + StrHexToUintnS (String, (CHAR16 **)NULL, &Result); return Result; } - /** Convert a Null-terminated Unicode hexadecimal string to a value of type UINT64. @@ -544,12 +543,12 @@ StrHexToUintn ( UINT64 EFIAPI StrHexToUint64 ( - IN CONST CHAR16 *String + IN CONST CHAR16 *String ) { - UINT64 Result; + UINT64 Result; - StrHexToUint64S (String, (CHAR16 **) NULL, &Result); + StrHexToUint64S (String, (CHAR16 **)NULL, &Result); return Result; } @@ -569,10 +568,10 @@ StrHexToUint64 ( BOOLEAN EFIAPI InternalAsciiIsDecimalDigitCharacter ( - IN CHAR8 Char + IN CHAR8 Char ) { - return (BOOLEAN) (Char >= '0' && Char <= '9'); + return (BOOLEAN)(Char >= '0' && Char <= '9'); } /** @@ -592,16 +591,14 @@ InternalAsciiIsDecimalDigitCharacter ( BOOLEAN EFIAPI InternalAsciiIsHexaDecimalDigitCharacter ( - IN CHAR8 Char + IN CHAR8 Char ) { - - return (BOOLEAN) (InternalAsciiIsDecimalDigitCharacter (Char) || - (Char >= 'A' && Char <= 'F') || - (Char >= 'a' && Char <= 'f')); + return (BOOLEAN)(InternalAsciiIsDecimalDigitCharacter (Char) || + (Char >= 'A' && Char <= 'F') || + (Char >= 'a' && Char <= 'f')); } - /** Returns the length of a Null-terminated ASCII string. @@ -622,10 +619,10 @@ InternalAsciiIsHexaDecimalDigitCharacter ( UINTN EFIAPI AsciiStrLen ( - IN CONST CHAR8 *String + IN CONST CHAR8 *String ) { - UINTN Length; + UINTN Length; ASSERT (String != NULL); @@ -638,6 +635,7 @@ AsciiStrLen ( ASSERT (Length < PcdGet32 (PcdMaximumAsciiStringLength)); } } + return Length; } @@ -661,7 +659,7 @@ AsciiStrLen ( UINTN EFIAPI AsciiStrSize ( - IN CONST CHAR8 *String + IN CONST CHAR8 *String ) { return (AsciiStrLen (String) + 1) * sizeof (*String); @@ -696,8 +694,8 @@ AsciiStrSize ( INTN EFIAPI AsciiStrCmp ( - IN CONST CHAR8 *FirstString, - IN CONST CHAR8 *SecondString + IN CONST CHAR8 *FirstString, + IN CONST CHAR8 *SecondString ) { // @@ -730,10 +728,10 @@ AsciiStrCmp ( CHAR8 EFIAPI AsciiCharToUpper ( - IN CHAR8 Chr + IN CHAR8 Chr ) { - return (UINT8) ((Chr >= 'a' && Chr <= 'z') ? Chr - ('a' - 'A') : Chr); + return (UINT8)((Chr >= 'a' && Chr <= 'z') ? Chr - ('a' - 'A') : Chr); } /** @@ -752,7 +750,7 @@ AsciiCharToUpper ( UINTN EFIAPI InternalAsciiHexCharToUintn ( - IN CHAR8 Char + IN CHAR8 Char ) { if (InternalIsDecimalDigitCharacter (Char)) { @@ -762,7 +760,6 @@ InternalAsciiHexCharToUintn ( return (10 + AsciiCharToUpper (Char) - 'A'); } - /** Performs a case insensitive comparison of two Null-terminated ASCII strings, and returns the difference between the first mismatched ASCII characters. @@ -795,8 +792,8 @@ InternalAsciiHexCharToUintn ( INTN EFIAPI AsciiStriCmp ( - IN CONST CHAR8 *FirstString, - IN CONST CHAR8 *SecondString + IN CONST CHAR8 *FirstString, + IN CONST CHAR8 *SecondString ) { CHAR8 UpperFirstString; @@ -853,9 +850,9 @@ AsciiStriCmp ( INTN EFIAPI AsciiStrnCmp ( - IN CONST CHAR8 *FirstString, - IN CONST CHAR8 *SecondString, - IN UINTN Length + IN CONST CHAR8 *FirstString, + IN CONST CHAR8 *SecondString, + IN UINTN Length ) { if (Length == 0) { @@ -875,15 +872,16 @@ AsciiStrnCmp ( while ((*FirstString != '\0') && (*SecondString != '\0') && (*FirstString == *SecondString) && - (Length > 1)) { + (Length > 1)) + { FirstString++; SecondString++; Length--; } + return *FirstString - *SecondString; } - /** Returns the first occurrence of a Null-terminated ASCII sub-string in a Null-terminated ASCII string. @@ -911,12 +909,12 @@ AsciiStrnCmp ( CHAR8 * EFIAPI AsciiStrStr ( - IN CONST CHAR8 *String, - IN CONST CHAR8 *SearchString + IN CONST CHAR8 *String, + IN CONST CHAR8 *SearchString ) { - CONST CHAR8 *FirstMatch; - CONST CHAR8 *SearchStringTmp; + CONST CHAR8 *FirstMatch; + CONST CHAR8 *SearchStringTmp; // // ASSERT both strings are less long than PcdMaximumAsciiStringLength @@ -925,21 +923,22 @@ AsciiStrStr ( ASSERT (AsciiStrSize (SearchString) != 0); if (*SearchString == '\0') { - return (CHAR8 *) String; + return (CHAR8 *)String; } while (*String != '\0') { SearchStringTmp = SearchString; - FirstMatch = String; + FirstMatch = String; - while ((*String == *SearchStringTmp) - && (*String != '\0')) { + while ( (*String == *SearchStringTmp) + && (*String != '\0')) + { String++; SearchStringTmp++; } if (*SearchStringTmp == '\0') { - return (CHAR8 *) FirstMatch; + return (CHAR8 *)FirstMatch; } if (*String == '\0') { @@ -985,16 +984,15 @@ AsciiStrStr ( UINTN EFIAPI AsciiStrDecimalToUintn ( - IN CONST CHAR8 *String + IN CONST CHAR8 *String ) { - UINTN Result; + UINTN Result; - AsciiStrDecimalToUintnS (String, (CHAR8 **) NULL, &Result); + AsciiStrDecimalToUintnS (String, (CHAR8 **)NULL, &Result); return Result; } - /** Convert a Null-terminated ASCII decimal string to a value of type UINT64. @@ -1028,12 +1026,12 @@ AsciiStrDecimalToUintn ( UINT64 EFIAPI AsciiStrDecimalToUint64 ( - IN CONST CHAR8 *String + IN CONST CHAR8 *String ) { - UINT64 Result; + UINT64 Result; - AsciiStrDecimalToUint64S (String, (CHAR8 **) NULL, &Result); + AsciiStrDecimalToUint64S (String, (CHAR8 **)NULL, &Result); return Result; } @@ -1074,16 +1072,15 @@ AsciiStrDecimalToUint64 ( UINTN EFIAPI AsciiStrHexToUintn ( - IN CONST CHAR8 *String + IN CONST CHAR8 *String ) { - UINTN Result; + UINTN Result; - AsciiStrHexToUintnS (String, (CHAR8 **) NULL, &Result); + AsciiStrHexToUintnS (String, (CHAR8 **)NULL, &Result); return Result; } - /** Convert a Null-terminated ASCII hexadecimal string to a value of type UINT64. @@ -1121,17 +1118,16 @@ AsciiStrHexToUintn ( UINT64 EFIAPI AsciiStrHexToUint64 ( - IN CONST CHAR8 *String + IN CONST CHAR8 *String ) { - UINT64 Result; + UINT64 Result; - AsciiStrHexToUint64S (String, (CHAR8 **) NULL, &Result); + AsciiStrHexToUint64S (String, (CHAR8 **)NULL, &Result); return Result; } - -STATIC CHAR8 EncodingTable[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" +STATIC CHAR8 EncodingTable[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "0123456789+/"; @@ -1158,14 +1154,13 @@ RETURN_STATUS EFIAPI Base64Encode ( IN CONST UINT8 *Source, - IN UINTN SourceLength, + IN UINTN SourceLength, OUT CHAR8 *Destination OPTIONAL, IN OUT UINTN *DestinationSize ) { - - UINTN RequiredSize; - UINTN Left; + UINTN RequiredSize; + UINTN Left; // // Check pointers, and SourceLength is valid @@ -1182,15 +1177,16 @@ Base64Encode ( *DestinationSize = 1; return RETURN_BUFFER_TOO_SMALL; } + *DestinationSize = 1; - *Destination = '\0'; + *Destination = '\0'; return RETURN_SUCCESS; } // // Check if SourceLength or DestinationSize is valid // - if ((SourceLength >= (MAX_ADDRESS - (UINTN)Source)) || (*DestinationSize >= (MAX_ADDRESS - (UINTN)Destination))){ + if ((SourceLength >= (MAX_ADDRESS - (UINTN)Source)) || (*DestinationSize >= (MAX_ADDRESS - (UINTN)Destination))) { return RETURN_INVALID_PARAMETER; } @@ -1198,7 +1194,7 @@ Base64Encode ( // 4 ascii per 3 bytes + NULL // RequiredSize = ((SourceLength + 2) / 3) * 4 + 1; - if ((Destination == NULL) || *DestinationSize < RequiredSize) { + if ((Destination == NULL) || (*DestinationSize < RequiredSize)) { *DestinationSize = RequiredSize; return RETURN_BUFFER_TOO_SMALL; } @@ -1209,13 +1205,12 @@ Base64Encode ( // Encode 24 bits (three bytes) into 4 ascii characters // while (Left >= 3) { - - *Destination++ = EncodingTable[( Source[0] & 0xfc) >> 2 ]; + *Destination++ = EncodingTable[(Source[0] & 0xfc) >> 2]; *Destination++ = EncodingTable[((Source[0] & 0x03) << 4) + ((Source[1] & 0xf0) >> 4)]; *Destination++ = EncodingTable[((Source[1] & 0x0f) << 2) + ((Source[2] & 0xc0) >> 6)]; - *Destination++ = EncodingTable[( Source[2] & 0x3f)]; - Left -= 3; - Source += 3; + *Destination++ = EncodingTable[(Source[2] & 0x3f)]; + Left -= 3; + Source += 3; } // @@ -1233,7 +1228,7 @@ Base64Encode ( // // One more data byte, two pad characters // - *Destination++ = EncodingTable[( Source[0] & 0xfc) >> 2]; + *Destination++ = EncodingTable[(Source[0] & 0xfc) >> 2]; *Destination++ = EncodingTable[((Source[0] & 0x03) << 4)]; *Destination++ = '='; *Destination++ = '='; @@ -1243,12 +1238,13 @@ Base64Encode ( // // Two more data bytes, and one pad character // - *Destination++ = EncodingTable[( Source[0] & 0xfc) >> 2]; + *Destination++ = EncodingTable[(Source[0] & 0xfc) >> 2]; *Destination++ = EncodingTable[((Source[0] & 0x03) << 4) + ((Source[1] & 0xf0) >> 4)]; *Destination++ = EncodingTable[((Source[1] & 0x0f) << 2)]; *Destination++ = '='; break; - } + } + // // Add terminating NULL // @@ -1341,20 +1337,20 @@ Base64Encode ( RETURN_STATUS EFIAPI Base64Decode ( - IN CONST CHAR8 *Source OPTIONAL, - IN UINTN SourceSize, - OUT UINT8 *Destination OPTIONAL, - IN OUT UINTN *DestinationSize + IN CONST CHAR8 *Source OPTIONAL, + IN UINTN SourceSize, + OUT UINT8 *Destination OPTIONAL, + IN OUT UINTN *DestinationSize ) { - BOOLEAN PaddingMode; - UINTN SixBitGroupsConsumed; - UINT32 Accumulator; - UINTN OriginalDestinationSize; - UINTN SourceIndex; - CHAR8 SourceChar; - UINT32 Base64Value; - UINT8 DestinationOctet; + BOOLEAN PaddingMode; + UINTN SixBitGroupsConsumed; + UINT32 Accumulator; + UINTN OriginalDestinationSize; + UINTN SourceIndex; + CHAR8 SourceChar; + UINT32 Base64Value; + UINT8 DestinationOctet; if (DestinationSize == NULL) { return RETURN_INVALID_PARAMETER; @@ -1397,7 +1393,7 @@ Base64Decode ( // // Check for overlap. // - if (Source != NULL && Destination != NULL) { + if ((Source != NULL) && (Destination != NULL)) { // // Both arrays have been provided, and we know from earlier that each array // is valid in itself. @@ -1436,8 +1432,9 @@ Base64Decode ( // // Whitespace is ignored at all positions (regardless of padding mode). // - if (SourceChar == '\t' || SourceChar == '\n' || SourceChar == '\v' || - SourceChar == '\f' || SourceChar == '\r' || SourceChar == ' ') { + if ((SourceChar == '\t') || (SourceChar == '\n') || (SourceChar == '\v') || + (SourceChar == '\f') || (SourceChar == '\r') || (SourceChar == ' ')) + { continue; } @@ -1451,10 +1448,11 @@ Base64Decode ( // "=" padding characters. // if (PaddingMode) { - if (SourceChar == '=' && SixBitGroupsConsumed == 3) { + if ((SourceChar == '=') && (SixBitGroupsConsumed == 3)) { SixBitGroupsConsumed = 0; continue; } + return RETURN_INVALID_PARAMETER; } @@ -1462,11 +1460,11 @@ Base64Decode ( // When not in padding mode, decode Base64Value based on RFC4648, "Table 1: // The Base 64 Alphabet". // - if ('A' <= SourceChar && SourceChar <= 'Z') { + if (('A' <= SourceChar) && (SourceChar <= 'Z')) { Base64Value = SourceChar - 'A'; - } else if ('a' <= SourceChar && SourceChar <= 'z') { + } else if (('a' <= SourceChar) && (SourceChar <= 'z')) { Base64Value = 26 + (SourceChar - 'a'); - } else if ('0' <= SourceChar && SourceChar <= '9') { + } else if (('0' <= SourceChar) && (SourceChar <= '9')) { Base64Value = 52 + (SourceChar - '0'); } else if (SourceChar == '+') { Base64Value = 62; @@ -1530,38 +1528,38 @@ Base64Decode ( Accumulator = (Accumulator << 6) | Base64Value; SixBitGroupsConsumed++; switch (SixBitGroupsConsumed) { - case 1: - // - // No octet to spill after consuming the first 6-bit group of the - // quantum; advance to the next source character. - // - continue; - case 2: - // - // 12 bits accumulated (6 pending + 6 new); prepare for spilling an - // octet. 4 bits remain pending. - // - DestinationOctet = (UINT8)(Accumulator >> 4); - Accumulator &= 0xF; - break; - case 3: - // - // 10 bits accumulated (4 pending + 6 new); prepare for spilling an - // octet. 2 bits remain pending. - // - DestinationOctet = (UINT8)(Accumulator >> 2); - Accumulator &= 0x3; - break; - default: - ASSERT (SixBitGroupsConsumed == 4); - // - // 8 bits accumulated (2 pending + 6 new); prepare for spilling an octet. - // The quantum is complete, 0 bits remain pending. - // - DestinationOctet = (UINT8)Accumulator; - Accumulator = 0; - SixBitGroupsConsumed = 0; - break; + case 1: + // + // No octet to spill after consuming the first 6-bit group of the + // quantum; advance to the next source character. + // + continue; + case 2: + // + // 12 bits accumulated (6 pending + 6 new); prepare for spilling an + // octet. 4 bits remain pending. + // + DestinationOctet = (UINT8)(Accumulator >> 4); + Accumulator &= 0xF; + break; + case 3: + // + // 10 bits accumulated (4 pending + 6 new); prepare for spilling an + // octet. 2 bits remain pending. + // + DestinationOctet = (UINT8)(Accumulator >> 2); + Accumulator &= 0x3; + break; + default: + ASSERT (SixBitGroupsConsumed == 4); + // + // 8 bits accumulated (2 pending + 6 new); prepare for spilling an octet. + // The quantum is complete, 0 bits remain pending. + // + DestinationOctet = (UINT8)Accumulator; + Accumulator = 0; + SixBitGroupsConsumed = 0; + break; } // @@ -1572,6 +1570,7 @@ Base64Decode ( ASSERT (Destination != NULL); Destination[*DestinationSize] = DestinationOctet; } + (*DestinationSize)++; // @@ -1592,6 +1591,7 @@ Base64Decode ( if (*DestinationSize <= OriginalDestinationSize) { return RETURN_SUCCESS; } + return RETURN_BUFFER_TOO_SMALL; } @@ -1611,11 +1611,11 @@ Base64Decode ( UINT8 EFIAPI DecimalToBcd8 ( - IN UINT8 Value + IN UINT8 Value ) { ASSERT (Value < 100); - return (UINT8) (((Value / 10) << 4) | (Value % 10)); + return (UINT8)(((Value / 10) << 4) | (Value % 10)); } /** @@ -1635,10 +1635,10 @@ DecimalToBcd8 ( UINT8 EFIAPI BcdToDecimal8 ( - IN UINT8 Value + IN UINT8 Value ) { ASSERT (Value < 0xa0); ASSERT ((Value & 0xf) < 0xa); - return (UINT8) ((Value >> 4) * 10 + (Value & 0xf)); + return (UINT8)((Value >> 4) * 10 + (Value & 0xf)); } diff --git a/MdePkg/Library/BaseLib/SwapBytes16.c b/MdePkg/Library/BaseLib/SwapBytes16.c index 52e7f71..12d452f 100644 --- a/MdePkg/Library/BaseLib/SwapBytes16.c +++ b/MdePkg/Library/BaseLib/SwapBytes16.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** @@ -26,8 +23,8 @@ UINT16 EFIAPI SwapBytes16 ( - IN UINT16 Value + IN UINT16 Value ) { - return (UINT16) ((Value<< 8) | (Value>> 8)); + return (UINT16)((Value<< 8) | (Value>> 8)); } diff --git a/MdePkg/Library/BaseLib/SwapBytes32.c b/MdePkg/Library/BaseLib/SwapBytes32.c index 5109ad5..206a846 100644 --- a/MdePkg/Library/BaseLib/SwapBytes32.c +++ b/MdePkg/Library/BaseLib/SwapBytes32.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** @@ -26,14 +23,14 @@ UINT32 EFIAPI SwapBytes32 ( - IN UINT32 Value + IN UINT32 Value ) { UINT32 LowerBytes; UINT32 HigherBytes; - LowerBytes = (UINT32) SwapBytes16 ((UINT16) Value); - HigherBytes = (UINT32) SwapBytes16 ((UINT16) (Value >> 16)); + LowerBytes = (UINT32)SwapBytes16 ((UINT16)Value); + HigherBytes = (UINT32)SwapBytes16 ((UINT16)(Value >> 16)); return (LowerBytes << 16 | HigherBytes); } diff --git a/MdePkg/Library/BaseLib/SwapBytes64.c b/MdePkg/Library/BaseLib/SwapBytes64.c index 500f76d..85102c4 100644 --- a/MdePkg/Library/BaseLib/SwapBytes64.c +++ b/MdePkg/Library/BaseLib/SwapBytes64.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** @@ -26,7 +23,7 @@ UINT64 EFIAPI SwapBytes64 ( - IN UINT64 Value + IN UINT64 Value ) { return InternalMathSwapBytes64 (Value); diff --git a/MdePkg/Library/BaseLib/SwitchStack.c b/MdePkg/Library/BaseLib/SwitchStack.c index 3eb39d4..954e863 100644 --- a/MdePkg/Library/BaseLib/SwitchStack.c +++ b/MdePkg/Library/BaseLib/SwitchStack.c @@ -47,7 +47,7 @@ SwitchStack ( ... ) { - VA_LIST Marker; + VA_LIST Marker; ASSERT (EntryPoint != NULL); ASSERT (NewStack != NULL); diff --git a/MdePkg/Library/BaseLib/Unaligned.c b/MdePkg/Library/BaseLib/Unaligned.c index a419cb8..74d76e8 100644 --- a/MdePkg/Library/BaseLib/Unaligned.c +++ b/MdePkg/Library/BaseLib/Unaligned.c @@ -6,10 +6,8 @@ **/ - #include "BaseLibInternals.h" - /** Reads a 16-bit value from memory that may be unaligned. @@ -26,7 +24,7 @@ UINT16 EFIAPI ReadUnaligned16 ( - IN CONST UINT16 *Buffer + IN CONST UINT16 *Buffer ) { ASSERT (Buffer != NULL); @@ -52,8 +50,8 @@ ReadUnaligned16 ( UINT16 EFIAPI WriteUnaligned16 ( - OUT UINT16 *Buffer, - IN UINT16 Value + OUT UINT16 *Buffer, + IN UINT16 Value ) { ASSERT (Buffer != NULL); @@ -77,7 +75,7 @@ WriteUnaligned16 ( UINT32 EFIAPI ReadUnaligned24 ( - IN CONST UINT32 *Buffer + IN CONST UINT32 *Buffer ) { ASSERT (Buffer != NULL); @@ -103,8 +101,8 @@ ReadUnaligned24 ( UINT32 EFIAPI WriteUnaligned24 ( - OUT UINT32 *Buffer, - IN UINT32 Value + OUT UINT32 *Buffer, + IN UINT32 Value ) { ASSERT (Buffer != NULL); @@ -129,7 +127,7 @@ WriteUnaligned24 ( UINT32 EFIAPI ReadUnaligned32 ( - IN CONST UINT32 *Buffer + IN CONST UINT32 *Buffer ) { ASSERT (Buffer != NULL); @@ -155,8 +153,8 @@ ReadUnaligned32 ( UINT32 EFIAPI WriteUnaligned32 ( - OUT UINT32 *Buffer, - IN UINT32 Value + OUT UINT32 *Buffer, + IN UINT32 Value ) { ASSERT (Buffer != NULL); @@ -180,7 +178,7 @@ WriteUnaligned32 ( UINT64 EFIAPI ReadUnaligned64 ( - IN CONST UINT64 *Buffer + IN CONST UINT64 *Buffer ) { ASSERT (Buffer != NULL); @@ -206,8 +204,8 @@ ReadUnaligned64 ( UINT64 EFIAPI WriteUnaligned64 ( - OUT UINT64 *Buffer, - IN UINT64 Value + OUT UINT64 *Buffer, + IN UINT64 Value ) { ASSERT (Buffer != NULL); diff --git a/MdePkg/Library/BaseLib/UnitTestHost.c b/MdePkg/Library/BaseLib/UnitTestHost.c index 79eec7c..b883140 100644 --- a/MdePkg/Library/BaseLib/UnitTestHost.c +++ b/MdePkg/Library/BaseLib/UnitTestHost.c @@ -11,7 +11,7 @@ /// /// Module global variable for simple system emulation of interrupt state /// -STATIC BOOLEAN mUnitTestHostBaseLibInterruptState; +STATIC BOOLEAN mUnitTestHostBaseLibInterruptState; /** Enables CPU interrupts. diff --git a/MdePkg/Library/BaseLib/X64/CpuBreakpoint.c b/MdePkg/Library/BaseLib/X64/CpuBreakpoint.c index c626ef8..8c03934 100644 --- a/MdePkg/Library/BaseLib/X64/CpuBreakpoint.c +++ b/MdePkg/Library/BaseLib/X64/CpuBreakpoint.c @@ -6,12 +6,14 @@ **/ - /** Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics. **/ -void __debugbreak (VOID); +void +__debugbreak ( + VOID + ); #pragma intrinsic(__debugbreak) @@ -30,4 +32,3 @@ CpuBreakpoint ( { __debugbreak (); } - diff --git a/MdePkg/Library/BaseLib/X64/GccInline.c b/MdePkg/Library/BaseLib/X64/GccInline.c index 40a208f..c21eb06 100644 --- a/MdePkg/Library/BaseLib/X64/GccInline.c +++ b/MdePkg/Library/BaseLib/X64/GccInline.c @@ -7,12 +7,8 @@ **/ - #include "BaseLibInternals.h" - - - /** Used to serialize load and store operations. @@ -32,7 +28,6 @@ MemoryFence ( __asm__ __volatile__ ("":::"memory"); } - /** Requests CPU to pause for a short period of time. @@ -49,7 +44,6 @@ CpuPause ( __asm__ __volatile__ ("pause"); } - /** Generates a breakpoint on the CPU. @@ -66,7 +60,6 @@ CpuBreakpoint ( __asm__ __volatile__ ("int $3"); } - /** Reads the current value of the EFLAGS register. @@ -83,13 +76,13 @@ AsmReadEflags ( VOID ) { - UINTN Eflags; + UINTN Eflags; __asm__ __volatile__ ( "pushfq \n\t" "pop %0 " : "=r" (Eflags) // %0 - ); + ); return Eflags; } @@ -107,17 +100,16 @@ AsmReadEflags ( VOID EFIAPI InternalX86FxSave ( - OUT IA32_FX_BUFFER *Buffer + OUT IA32_FX_BUFFER *Buffer ) { __asm__ __volatile__ ( "fxsave %0" : : "m" (*Buffer) // %0 - ); + ); } - /** Restores the current floating point/SSE/SSE2 context from a buffer. @@ -131,17 +123,16 @@ InternalX86FxSave ( VOID EFIAPI InternalX86FxRestore ( - IN CONST IA32_FX_BUFFER *Buffer + IN CONST IA32_FX_BUFFER *Buffer ) { __asm__ __volatile__ ( "fxrstor %0" : : "m" (*Buffer) // %0 - ); + ); } - /** Reads the current value of 64-bit MMX Register #0 (MM0). @@ -162,12 +153,11 @@ AsmReadMm0 ( __asm__ __volatile__ ( "movd %%mm0, %0 \n\t" : "=r" (Data) // %0 - ); + ); return Data; } - /** Reads the current value of 64-bit MMX Register #1 (MM1). @@ -188,12 +178,11 @@ AsmReadMm1 ( __asm__ __volatile__ ( "movd %%mm1, %0 \n\t" : "=r" (Data) // %0 - ); + ); return Data; } - /** Reads the current value of 64-bit MMX Register #2 (MM2). @@ -214,12 +203,11 @@ AsmReadMm2 ( __asm__ __volatile__ ( "movd %%mm2, %0 \n\t" : "=r" (Data) // %0 - ); + ); return Data; } - /** Reads the current value of 64-bit MMX Register #3 (MM3). @@ -240,12 +228,11 @@ AsmReadMm3 ( __asm__ __volatile__ ( "movd %%mm3, %0 \n\t" : "=r" (Data) // %0 - ); + ); return Data; } - /** Reads the current value of 64-bit MMX Register #4 (MM4). @@ -266,12 +253,11 @@ AsmReadMm4 ( __asm__ __volatile__ ( "movd %%mm4, %0 \n\t" : "=r" (Data) // %0 - ); + ); return Data; } - /** Reads the current value of 64-bit MMX Register #5 (MM5). @@ -292,12 +278,11 @@ AsmReadMm5 ( __asm__ __volatile__ ( "movd %%mm5, %0 \n\t" : "=r" (Data) // %0 - ); + ); return Data; } - /** Reads the current value of 64-bit MMX Register #6 (MM6). @@ -318,12 +303,11 @@ AsmReadMm6 ( __asm__ __volatile__ ( "movd %%mm6, %0 \n\t" : "=r" (Data) // %0 - ); + ); return Data; } - /** Reads the current value of 64-bit MMX Register #7 (MM7). @@ -344,12 +328,11 @@ AsmReadMm7 ( __asm__ __volatile__ ( "movd %%mm7, %0 \n\t" : "=r" (Data) // %0 - ); + ); return Data; } - /** Writes the current value of 64-bit MMX Register #0 (MM0). @@ -362,17 +345,16 @@ AsmReadMm7 ( VOID EFIAPI AsmWriteMm0 ( - IN UINT64 Value + IN UINT64 Value ) { __asm__ __volatile__ ( "movd %0, %%mm0" // %0 : : "m" (Value) - ); + ); } - /** Writes the current value of 64-bit MMX Register #1 (MM1). @@ -385,17 +367,16 @@ AsmWriteMm0 ( VOID EFIAPI AsmWriteMm1 ( - IN UINT64 Value + IN UINT64 Value ) { __asm__ __volatile__ ( "movd %0, %%mm1" // %0 : : "m" (Value) - ); + ); } - /** Writes the current value of 64-bit MMX Register #2 (MM2). @@ -408,17 +389,16 @@ AsmWriteMm1 ( VOID EFIAPI AsmWriteMm2 ( - IN UINT64 Value + IN UINT64 Value ) { __asm__ __volatile__ ( "movd %0, %%mm2" // %0 : : "m" (Value) - ); + ); } - /** Writes the current value of 64-bit MMX Register #3 (MM3). @@ -431,17 +411,16 @@ AsmWriteMm2 ( VOID EFIAPI AsmWriteMm3 ( - IN UINT64 Value + IN UINT64 Value ) { __asm__ __volatile__ ( "movd %0, %%mm3" // %0 : : "m" (Value) - ); + ); } - /** Writes the current value of 64-bit MMX Register #4 (MM4). @@ -454,17 +433,16 @@ AsmWriteMm3 ( VOID EFIAPI AsmWriteMm4 ( - IN UINT64 Value + IN UINT64 Value ) { __asm__ __volatile__ ( "movd %0, %%mm4" // %0 : : "m" (Value) - ); + ); } - /** Writes the current value of 64-bit MMX Register #5 (MM5). @@ -477,17 +455,16 @@ AsmWriteMm4 ( VOID EFIAPI AsmWriteMm5 ( - IN UINT64 Value + IN UINT64 Value ) { __asm__ __volatile__ ( "movd %0, %%mm5" // %0 : : "m" (Value) - ); + ); } - /** Writes the current value of 64-bit MMX Register #6 (MM6). @@ -500,17 +477,16 @@ AsmWriteMm5 ( VOID EFIAPI AsmWriteMm6 ( - IN UINT64 Value + IN UINT64 Value ) { __asm__ __volatile__ ( "movd %0, %%mm6" // %0 : : "m" (Value) - ); + ); } - /** Writes the current value of 64-bit MMX Register #7 (MM7). @@ -523,17 +499,16 @@ AsmWriteMm6 ( VOID EFIAPI AsmWriteMm7 ( - IN UINT64 Value + IN UINT64 Value ) { __asm__ __volatile__ ( "movd %0, %%mm7" // %0 : : "m" (Value) - ); + ); } - /** Reads the current value of Time Stamp Counter (TSC). @@ -556,7 +531,7 @@ AsmReadTsc ( "rdtsc" : "=a" (LowData), "=d" (HiData) - ); + ); return (((UINT64)HiData) << 32) | LowData; } diff --git a/MdePkg/Library/BaseLib/X64/GccInlinePriv.c b/MdePkg/Library/BaseLib/X64/GccInlinePriv.c index c3feb9f..f63e03e 100644 --- a/MdePkg/Library/BaseLib/X64/GccInlinePriv.c +++ b/MdePkg/Library/BaseLib/X64/GccInlinePriv.c @@ -8,7 +8,6 @@ **/ - #include "BaseLibInternals.h" #include @@ -27,7 +26,6 @@ EnableInterrupts ( __asm__ __volatile__ ("sti"::: "memory"); } - /** Disables CPU interrupts. @@ -60,13 +58,13 @@ DisableInterrupts ( UINT64 EFIAPI AsmReadMsr64 ( - IN UINT32 Index + IN UINT32 Index ) { - UINT32 LowData; - UINT32 HighData; - UINT64 Value; - BOOLEAN Flag; + UINT32 LowData; + UINT32 HighData; + UINT64 Value; + BOOLEAN Flag; Flag = FilterBeforeMsrRead (Index, &Value); if (Flag) { @@ -75,9 +73,10 @@ AsmReadMsr64 ( : "=a" (LowData), // %0 "=d" (HighData) // %1 : "c" (Index) // %2 - ); + ); Value = (((UINT64)HighData) << 32) | LowData; } + FilterAfterMsrRead (Index, &Value); return Value; @@ -103,13 +102,13 @@ AsmReadMsr64 ( UINT64 EFIAPI AsmWriteMsr64 ( - IN UINT32 Index, - IN UINT64 Value + IN UINT32 Index, + IN UINT64 Value ) { - UINT32 LowData; - UINT32 HighData; - BOOLEAN Flag; + UINT32 LowData; + UINT32 HighData; + BOOLEAN Flag; Flag = FilterBeforeMsrWrite (Index, &Value); if (Flag) { @@ -121,8 +120,9 @@ AsmWriteMsr64 ( : "c" (Index), "a" (LowData), "d" (HighData) - ); + ); } + FilterAfterMsrWrite (Index, &Value); return Value; @@ -144,17 +144,16 @@ AsmReadCr0 ( VOID ) { - UINTN Data; + UINTN Data; __asm__ __volatile__ ( "mov %%cr0,%0" : "=r" (Data) // %0 - ); + ); return Data; } - /** Reads the current value of the Control Register 2 (CR2). @@ -171,12 +170,12 @@ AsmReadCr2 ( VOID ) { - UINTN Data; + UINTN Data; __asm__ __volatile__ ( "mov %%cr2, %0" : "=r" (Data) // %0 - ); + ); return Data; } @@ -197,17 +196,16 @@ AsmReadCr3 ( VOID ) { - UINTN Data; + UINTN Data; __asm__ __volatile__ ( "mov %%cr3, %0" : "=r" (Data) // %0 - ); + ); return Data; } - /** Reads the current value of the Control Register 4 (CR4). @@ -224,17 +222,16 @@ AsmReadCr4 ( VOID ) { - UINTN Data; + UINTN Data; __asm__ __volatile__ ( "mov %%cr4, %0" : "=r" (Data) // %0 - ); + ); return Data; } - /** Writes a value to Control Register 0 (CR0). @@ -256,11 +253,10 @@ AsmWriteCr0 ( "mov %0, %%cr0" : : "r" (Cr0) - ); + ); return Cr0; } - /** Writes a value to Control Register 2 (CR2). @@ -282,11 +278,10 @@ AsmWriteCr2 ( "mov %0, %%cr2" : : "r" (Cr2) - ); + ); return Cr2; } - /** Writes a value to Control Register 3 (CR3). @@ -308,11 +303,10 @@ AsmWriteCr3 ( "mov %0, %%cr3" : : "r" (Cr3) - ); + ); return Cr3; } - /** Writes a value to Control Register 4 (CR4). @@ -334,11 +328,10 @@ AsmWriteCr4 ( "mov %0, %%cr4" : : "r" (Cr4) - ); + ); return Cr4; } - /** Reads the current value of Debug Register 0 (DR0). @@ -355,17 +348,16 @@ AsmReadDr0 ( VOID ) { - UINTN Data; + UINTN Data; __asm__ __volatile__ ( "mov %%dr0, %0" : "=r" (Data) - ); + ); return Data; } - /** Reads the current value of Debug Register 1 (DR1). @@ -382,17 +374,16 @@ AsmReadDr1 ( VOID ) { - UINTN Data; + UINTN Data; __asm__ __volatile__ ( "mov %%dr1, %0" : "=r" (Data) - ); + ); return Data; } - /** Reads the current value of Debug Register 2 (DR2). @@ -409,17 +400,16 @@ AsmReadDr2 ( VOID ) { - UINTN Data; + UINTN Data; __asm__ __volatile__ ( "mov %%dr2, %0" : "=r" (Data) - ); + ); return Data; } - /** Reads the current value of Debug Register 3 (DR3). @@ -436,17 +426,16 @@ AsmReadDr3 ( VOID ) { - UINTN Data; + UINTN Data; __asm__ __volatile__ ( "mov %%dr3, %0" : "=r" (Data) - ); + ); return Data; } - /** Reads the current value of Debug Register 4 (DR4). @@ -463,17 +452,16 @@ AsmReadDr4 ( VOID ) { - UINTN Data; + UINTN Data; __asm__ __volatile__ ( "mov %%dr4, %0" : "=r" (Data) - ); + ); return Data; } - /** Reads the current value of Debug Register 5 (DR5). @@ -490,17 +478,16 @@ AsmReadDr5 ( VOID ) { - UINTN Data; + UINTN Data; __asm__ __volatile__ ( "mov %%dr5, %0" : "=r" (Data) - ); + ); return Data; } - /** Reads the current value of Debug Register 6 (DR6). @@ -517,17 +504,16 @@ AsmReadDr6 ( VOID ) { - UINTN Data; + UINTN Data; __asm__ __volatile__ ( "mov %%dr6, %0" : "=r" (Data) - ); + ); return Data; } - /** Reads the current value of Debug Register 7 (DR7). @@ -544,17 +530,16 @@ AsmReadDr7 ( VOID ) { - UINTN Data; + UINTN Data; __asm__ __volatile__ ( "mov %%dr7, %0" : "=r" (Data) - ); + ); return Data; } - /** Writes a value to Debug Register 0 (DR0). @@ -576,11 +561,10 @@ AsmWriteDr0 ( "mov %0, %%dr0" : : "r" (Dr0) - ); + ); return Dr0; } - /** Writes a value to Debug Register 1 (DR1). @@ -602,11 +586,10 @@ AsmWriteDr1 ( "mov %0, %%dr1" : : "r" (Dr1) - ); + ); return Dr1; } - /** Writes a value to Debug Register 2 (DR2). @@ -628,11 +611,10 @@ AsmWriteDr2 ( "mov %0, %%dr2" : : "r" (Dr2) - ); + ); return Dr2; } - /** Writes a value to Debug Register 3 (DR3). @@ -654,11 +636,10 @@ AsmWriteDr3 ( "mov %0, %%dr3" : : "r" (Dr3) - ); + ); return Dr3; } - /** Writes a value to Debug Register 4 (DR4). @@ -680,11 +661,10 @@ AsmWriteDr4 ( "mov %0, %%dr4" : : "r" (Dr4) - ); + ); return Dr4; } - /** Writes a value to Debug Register 5 (DR5). @@ -706,11 +686,10 @@ AsmWriteDr5 ( "mov %0, %%dr5" : : "r" (Dr5) - ); + ); return Dr5; } - /** Writes a value to Debug Register 6 (DR6). @@ -732,11 +711,10 @@ AsmWriteDr6 ( "mov %0, %%dr6" : : "r" (Dr6) - ); + ); return Dr6; } - /** Writes a value to Debug Register 7 (DR7). @@ -758,11 +736,10 @@ AsmWriteDr7 ( "mov %0, %%dr7" : : "r" (Dr7) - ); + ); return Dr7; } - /** Reads the current value of Code Segment Register (CS). @@ -783,12 +760,11 @@ AsmReadCs ( __asm__ __volatile__ ( "mov %%cs, %0" :"=a" (Data) - ); + ); return Data; } - /** Reads the current value of Data Segment Register (DS). @@ -809,12 +785,11 @@ AsmReadDs ( __asm__ __volatile__ ( "mov %%ds, %0" :"=a" (Data) - ); + ); return Data; } - /** Reads the current value of Extra Segment Register (ES). @@ -835,12 +810,11 @@ AsmReadEs ( __asm__ __volatile__ ( "mov %%es, %0" :"=a" (Data) - ); + ); return Data; } - /** Reads the current value of FS Data Segment Register (FS). @@ -861,12 +835,11 @@ AsmReadFs ( __asm__ __volatile__ ( "mov %%fs, %0" :"=a" (Data) - ); + ); return Data; } - /** Reads the current value of GS Data Segment Register (GS). @@ -887,12 +860,11 @@ AsmReadGs ( __asm__ __volatile__ ( "mov %%gs, %0" :"=a" (Data) - ); + ); return Data; } - /** Reads the current value of Stack Segment Register (SS). @@ -913,12 +885,11 @@ AsmReadSs ( __asm__ __volatile__ ( "mov %%ss, %0" :"=a" (Data) - ); + ); return Data; } - /** Reads the current value of Task Register (TR). @@ -939,12 +910,11 @@ AsmReadTr ( __asm__ __volatile__ ( "str %0" : "=r" (Data) - ); + ); return Data; } - /** Reads the current Global Descriptor Table Register(GDTR) descriptor. @@ -957,16 +927,15 @@ AsmReadTr ( VOID EFIAPI InternalX86ReadGdtr ( - OUT IA32_DESCRIPTOR *Gdtr + OUT IA32_DESCRIPTOR *Gdtr ) { __asm__ __volatile__ ( "sgdt %0" : "=m" (*Gdtr) - ); + ); } - /** Writes the current Global Descriptor Table Register (GDTR) descriptor. @@ -979,18 +948,16 @@ InternalX86ReadGdtr ( VOID EFIAPI InternalX86WriteGdtr ( - IN CONST IA32_DESCRIPTOR *Gdtr + IN CONST IA32_DESCRIPTOR *Gdtr ) { __asm__ __volatile__ ( "lgdt %0" : : "m" (*Gdtr) - ); - + ); } - /** Reads the current Interrupt Descriptor Table Register(GDTR) descriptor. @@ -1003,16 +970,15 @@ InternalX86WriteGdtr ( VOID EFIAPI InternalX86ReadIdtr ( - OUT IA32_DESCRIPTOR *Idtr + OUT IA32_DESCRIPTOR *Idtr ) { __asm__ __volatile__ ( "sidt %0" : "=m" (*Idtr) - ); + ); } - /** Writes the current Interrupt Descriptor Table Register(GDTR) descriptor. @@ -1025,17 +991,16 @@ InternalX86ReadIdtr ( VOID EFIAPI InternalX86WriteIdtr ( - IN CONST IA32_DESCRIPTOR *Idtr + IN CONST IA32_DESCRIPTOR *Idtr ) { __asm__ __volatile__ ( "lidt %0" : : "m" (*Idtr) - ); + ); } - /** Reads the current Local Descriptor Table Register(LDTR) selector. @@ -1056,12 +1021,11 @@ AsmReadLdtr ( __asm__ __volatile__ ( "sldt %0" : "=g" (Data) // %0 - ); + ); return Data; } - /** Writes the current Local Descriptor Table Register (GDTR) selector. @@ -1074,14 +1038,14 @@ AsmReadLdtr ( VOID EFIAPI AsmWriteLdtr ( - IN UINT16 Ldtr + IN UINT16 Ldtr ) { __asm__ __volatile__ ( "lldtw %0" : : "g" (Ldtr) // %0 - ); + ); } /** @@ -1098,7 +1062,7 @@ AsmWriteLdtr ( UINT64 EFIAPI AsmReadPmc ( - IN UINT32 Index + IN UINT32 Index ) { UINT32 LowData; @@ -1109,7 +1073,7 @@ AsmReadPmc ( : "=a" (LowData), "=d" (HiData) : "c" (Index) - ); + ); return (((UINT64)HiData) << 32) | LowData; } @@ -1133,9 +1097,9 @@ AsmReadPmc ( UINTN EFIAPI AsmMonitor ( - IN UINTN Eax, - IN UINTN Ecx, - IN UINTN Edx + IN UINTN Eax, + IN UINTN Ecx, + IN UINTN Edx ) { __asm__ __volatile__ ( @@ -1144,7 +1108,7 @@ AsmMonitor ( : "a" (Eax), "c" (Ecx), "d" (Edx) - ); + ); return Eax; } @@ -1166,8 +1130,8 @@ AsmMonitor ( UINTN EFIAPI AsmMwait ( - IN UINTN Eax, - IN UINTN Ecx + IN UINTN Eax, + IN UINTN Ecx ) { __asm__ __volatile__ ( @@ -1175,7 +1139,7 @@ AsmMwait ( : : "a" (Eax), "c" (Ecx) - ); + ); return Eax; } @@ -1210,10 +1174,8 @@ AsmInvd ( ) { __asm__ __volatile__ ("invd":::"memory"); - } - /** Flushes a cache line from all the instruction and data caches within the coherency domain of the CPU. @@ -1232,7 +1194,7 @@ AsmInvd ( VOID * EFIAPI AsmFlushCacheLine ( - IN VOID *LinearAddress + IN VOID *LinearAddress ) { __asm__ __volatile__ ( @@ -1240,7 +1202,7 @@ AsmFlushCacheLine ( : : "r" (LinearAddress) : "memory" - ); + ); - return LinearAddress; + return LinearAddress; } diff --git a/MdePkg/Library/BaseLib/X64/Non-existing.c b/MdePkg/Library/BaseLib/X64/Non-existing.c index 8f1eb4a..a8c7226 100644 --- a/MdePkg/Library/BaseLib/X64/Non-existing.c +++ b/MdePkg/Library/BaseLib/X64/Non-existing.c @@ -102,7 +102,6 @@ InternalX86DisablePaging32 ( ASSERT (FALSE); } - /** Enables the 64-bit paging mode on the CPU. @@ -133,11 +132,11 @@ InternalX86DisablePaging32 ( VOID EFIAPI InternalX86EnablePaging64 ( - IN UINT16 Cs, - IN UINT64 EntryPoint, - IN UINT64 Context1 OPTIONAL, - IN UINT64 Context2 OPTIONAL, - IN UINT64 NewStack + IN UINT16 Cs, + IN UINT64 EntryPoint, + IN UINT64 Context1 OPTIONAL, + IN UINT64 Context2 OPTIONAL, + IN UINT64 NewStack ) { // diff --git a/MdePkg/Library/BaseLib/X64/ReadMsr64.c b/MdePkg/Library/BaseLib/X64/ReadMsr64.c index 36a3494..546bdc9 100644 --- a/MdePkg/Library/BaseLib/X64/ReadMsr64.c +++ b/MdePkg/Library/BaseLib/X64/ReadMsr64.c @@ -12,7 +12,10 @@ #include -unsigned __int64 __readmsr (int register); +unsigned __int64 +__readmsr ( + int register + ); #pragma intrinsic(__readmsr) @@ -30,15 +33,15 @@ AsmReadMsr64 ( IN UINT32 Index ) { - UINT64 Value; - BOOLEAN Flag; + UINT64 Value; + BOOLEAN Flag; Flag = FilterBeforeMsrRead (Index, &Value); if (Flag) { Value = __readmsr (Index); } + FilterAfterMsrRead (Index, &Value); return Value; } - diff --git a/MdePkg/Library/BaseLib/X64/WriteMsr64.c b/MdePkg/Library/BaseLib/X64/WriteMsr64.c index bb03083..1e48b71 100644 --- a/MdePkg/Library/BaseLib/X64/WriteMsr64.c +++ b/MdePkg/Library/BaseLib/X64/WriteMsr64.c @@ -12,7 +12,11 @@ #include -void __writemsr (unsigned long Register, unsigned __int64 Value); +void +__writemsr ( + unsigned long Register, + unsigned __int64 Value + ); #pragma intrinsic(__writemsr) @@ -32,14 +36,14 @@ AsmWriteMsr64 ( IN UINT64 Value ) { - BOOLEAN Flag; + BOOLEAN Flag; Flag = FilterBeforeMsrWrite (Index, &Value); if (Flag) { __writemsr (Index, Value); } + FilterAfterMsrWrite (Index, &Value); return Value; } - diff --git a/MdePkg/Library/BaseLib/X86DisablePaging32.c b/MdePkg/Library/BaseLib/X86DisablePaging32.c index 7a6cb84..a82a502 100644 --- a/MdePkg/Library/BaseLib/X86DisablePaging32.c +++ b/MdePkg/Library/BaseLib/X86DisablePaging32.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** diff --git a/MdePkg/Library/BaseLib/X86DisablePaging64.c b/MdePkg/Library/BaseLib/X86DisablePaging64.c index 2879185..59173a2 100644 --- a/MdePkg/Library/BaseLib/X86DisablePaging64.c +++ b/MdePkg/Library/BaseLib/X86DisablePaging64.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** @@ -44,11 +41,11 @@ VOID EFIAPI AsmDisablePaging64 ( - IN UINT16 Cs, - IN UINT32 EntryPoint, - IN UINT32 Context1 OPTIONAL, - IN UINT32 Context2 OPTIONAL, - IN UINT32 NewStack + IN UINT16 Cs, + IN UINT32 EntryPoint, + IN UINT32 Context1 OPTIONAL, + IN UINT32 Context2 OPTIONAL, + IN UINT32 NewStack ) { ASSERT (EntryPoint != 0); diff --git a/MdePkg/Library/BaseLib/X86EnablePaging32.c b/MdePkg/Library/BaseLib/X86EnablePaging32.c index 2f0c407..c331cc9 100644 --- a/MdePkg/Library/BaseLib/X86EnablePaging32.c +++ b/MdePkg/Library/BaseLib/X86EnablePaging32.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** diff --git a/MdePkg/Library/BaseLib/X86EnablePaging64.c b/MdePkg/Library/BaseLib/X86EnablePaging64.c index a09d079..533ca7d 100644 --- a/MdePkg/Library/BaseLib/X86EnablePaging64.c +++ b/MdePkg/Library/BaseLib/X86EnablePaging64.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** @@ -46,11 +43,11 @@ VOID EFIAPI AsmEnablePaging64 ( - IN UINT16 Cs, - IN UINT64 EntryPoint, - IN UINT64 Context1 OPTIONAL, - IN UINT64 Context2 OPTIONAL, - IN UINT64 NewStack + IN UINT16 Cs, + IN UINT64 EntryPoint, + IN UINT64 Context1 OPTIONAL, + IN UINT64 Context2 OPTIONAL, + IN UINT64 NewStack ) { ASSERT (EntryPoint != 0); diff --git a/MdePkg/Library/BaseLib/X86FxRestore.c b/MdePkg/Library/BaseLib/X86FxRestore.c index c4fa668..b236f6d 100644 --- a/MdePkg/Library/BaseLib/X86FxRestore.c +++ b/MdePkg/Library/BaseLib/X86FxRestore.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** @@ -28,7 +25,7 @@ VOID EFIAPI AsmFxRestore ( - IN CONST IA32_FX_BUFFER *Buffer + IN CONST IA32_FX_BUFFER *Buffer ) { ASSERT (Buffer != NULL); @@ -37,7 +34,7 @@ AsmFxRestore ( // // Check the flag recorded by AsmFxSave() // - ASSERT (0xAA5555AA == *(UINT32 *) (&Buffer->Buffer[sizeof (Buffer->Buffer) - 4])); + ASSERT (0xAA5555AA == *(UINT32 *)(&Buffer->Buffer[sizeof (Buffer->Buffer) - 4])); InternalX86FxRestore (Buffer); } diff --git a/MdePkg/Library/BaseLib/X86FxSave.c b/MdePkg/Library/BaseLib/X86FxSave.c index 2621a08..a335d40 100644 --- a/MdePkg/Library/BaseLib/X86FxSave.c +++ b/MdePkg/Library/BaseLib/X86FxSave.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** @@ -27,7 +24,7 @@ VOID EFIAPI AsmFxSave ( - OUT IA32_FX_BUFFER *Buffer + OUT IA32_FX_BUFFER *Buffer ) { ASSERT (Buffer != NULL); @@ -38,5 +35,5 @@ AsmFxSave ( // // Mark one flag at end of Buffer, it will be check by AsmFxRestor() // - *(UINT32 *) (&Buffer->Buffer[sizeof (Buffer->Buffer) - 4]) = 0xAA5555AA; + *(UINT32 *)(&Buffer->Buffer[sizeof (Buffer->Buffer) - 4]) = 0xAA5555AA; } diff --git a/MdePkg/Library/BaseLib/X86GetInterruptState.c b/MdePkg/Library/BaseLib/X86GetInterruptState.c index 4363a7f..6e0cfba 100644 --- a/MdePkg/Library/BaseLib/X86GetInterruptState.c +++ b/MdePkg/Library/BaseLib/X86GetInterruptState.c @@ -6,10 +6,8 @@ **/ - #include "BaseLibInternals.h" - /** Retrieves the current CPU interrupt state. @@ -26,10 +24,8 @@ GetInterruptState ( VOID ) { - IA32_EFLAGS32 EFlags; + IA32_EFLAGS32 EFlags; EFlags.UintN = AsmReadEflags (); return (BOOLEAN)(1 == EFlags.Bits.IF); } - - diff --git a/MdePkg/Library/BaseLib/X86MemoryFence.c b/MdePkg/Library/BaseLib/X86MemoryFence.c index 399b36b..774d003 100644 --- a/MdePkg/Library/BaseLib/X86MemoryFence.c +++ b/MdePkg/Library/BaseLib/X86MemoryFence.c @@ -6,9 +6,6 @@ **/ - - - /** Used to serialize load and store operations. diff --git a/MdePkg/Library/BaseLib/X86Msr.c b/MdePkg/Library/BaseLib/X86Msr.c index ea51ca9..1995cb8 100644 --- a/MdePkg/Library/BaseLib/X86Msr.c +++ b/MdePkg/Library/BaseLib/X86Msr.c @@ -6,10 +6,8 @@ **/ - #include "BaseLibInternals.h" - /** Returns the lower 32-bits of a Machine Specific Register(MSR). @@ -27,7 +25,7 @@ UINT32 EFIAPI AsmReadMsr32 ( - IN UINT32 Index + IN UINT32 Index ) { return (UINT32)AsmReadMsr64 (Index); @@ -53,8 +51,8 @@ AsmReadMsr32 ( UINT32 EFIAPI AsmWriteMsr32 ( - IN UINT32 Index, - IN UINT32 Value + IN UINT32 Index, + IN UINT32 Value ) { return (UINT32)AsmWriteMsr64 (Index, Value); @@ -82,8 +80,8 @@ AsmWriteMsr32 ( UINT32 EFIAPI AsmMsrOr32 ( - IN UINT32 Index, - IN UINT32 OrData + IN UINT32 Index, + IN UINT32 OrData ) { return (UINT32)AsmMsrOr64 (Index, OrData); @@ -111,8 +109,8 @@ AsmMsrOr32 ( UINT32 EFIAPI AsmMsrAnd32 ( - IN UINT32 Index, - IN UINT32 AndData + IN UINT32 Index, + IN UINT32 AndData ) { return (UINT32)AsmMsrAnd64 (Index, AndData); @@ -143,9 +141,9 @@ AsmMsrAnd32 ( UINT32 EFIAPI AsmMsrAndThenOr32 ( - IN UINT32 Index, - IN UINT32 AndData, - IN UINT32 OrData + IN UINT32 Index, + IN UINT32 AndData, + IN UINT32 OrData ) { return (UINT32)AsmMsrAndThenOr64 (Index, AndData, OrData); @@ -176,9 +174,9 @@ AsmMsrAndThenOr32 ( UINT32 EFIAPI AsmMsrBitFieldRead32 ( - IN UINT32 Index, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT32 Index, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead32 (AsmReadMsr32 (Index), StartBit, EndBit); @@ -212,10 +210,10 @@ AsmMsrBitFieldRead32 ( UINT32 EFIAPI AsmMsrBitFieldWrite32 ( - IN UINT32 Index, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINT32 Index, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { ASSERT (EndBit < sizeof (Value) * 8); @@ -253,10 +251,10 @@ AsmMsrBitFieldWrite32 ( UINT32 EFIAPI AsmMsrBitFieldOr32 ( - IN UINT32 Index, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINT32 Index, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { ASSERT (EndBit < sizeof (OrData) * 8); @@ -294,10 +292,10 @@ AsmMsrBitFieldOr32 ( UINT32 EFIAPI AsmMsrBitFieldAnd32 ( - IN UINT32 Index, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINT32 Index, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { ASSERT (EndBit < sizeof (AndData) * 8); @@ -339,11 +337,11 @@ AsmMsrBitFieldAnd32 ( UINT32 EFIAPI AsmMsrBitFieldAndThenOr32 ( - IN UINT32 Index, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINT32 Index, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { ASSERT (EndBit < sizeof (AndData) * 8); @@ -378,8 +376,8 @@ AsmMsrBitFieldAndThenOr32 ( UINT64 EFIAPI AsmMsrOr64 ( - IN UINT32 Index, - IN UINT64 OrData + IN UINT32 Index, + IN UINT64 OrData ) { return AsmWriteMsr64 (Index, AsmReadMsr64 (Index) | OrData); @@ -406,8 +404,8 @@ AsmMsrOr64 ( UINT64 EFIAPI AsmMsrAnd64 ( - IN UINT32 Index, - IN UINT64 AndData + IN UINT32 Index, + IN UINT64 AndData ) { return AsmWriteMsr64 (Index, AsmReadMsr64 (Index) & AndData); @@ -437,9 +435,9 @@ AsmMsrAnd64 ( UINT64 EFIAPI AsmMsrAndThenOr64 ( - IN UINT32 Index, - IN UINT64 AndData, - IN UINT64 OrData + IN UINT32 Index, + IN UINT64 AndData, + IN UINT64 OrData ) { return AsmWriteMsr64 (Index, (AsmReadMsr64 (Index) & AndData) | OrData); @@ -470,9 +468,9 @@ AsmMsrAndThenOr64 ( UINT64 EFIAPI AsmMsrBitFieldRead64 ( - IN UINT32 Index, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT32 Index, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead64 (AsmReadMsr64 (Index), StartBit, EndBit); @@ -505,10 +503,10 @@ AsmMsrBitFieldRead64 ( UINT64 EFIAPI AsmMsrBitFieldWrite64 ( - IN UINT32 Index, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 Value + IN UINT32 Index, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 Value ) { return AsmWriteMsr64 ( @@ -547,10 +545,10 @@ AsmMsrBitFieldWrite64 ( UINT64 EFIAPI AsmMsrBitFieldOr64 ( - IN UINT32 Index, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 OrData + IN UINT32 Index, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 OrData ) { return AsmWriteMsr64 ( @@ -589,10 +587,10 @@ AsmMsrBitFieldOr64 ( UINT64 EFIAPI AsmMsrBitFieldAnd64 ( - IN UINT32 Index, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData + IN UINT32 Index, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData ) { return AsmWriteMsr64 ( @@ -634,11 +632,11 @@ AsmMsrBitFieldAnd64 ( UINT64 EFIAPI AsmMsrBitFieldAndThenOr64 ( - IN UINT32 Index, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData, - IN UINT64 OrData + IN UINT32 Index, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData, + IN UINT64 OrData ) { return AsmWriteMsr64 ( diff --git a/MdePkg/Library/BaseLib/X86PatchInstruction.c b/MdePkg/Library/BaseLib/X86PatchInstruction.c index fc70a35..116a501 100644 --- a/MdePkg/Library/BaseLib/X86PatchInstruction.c +++ b/MdePkg/Library/BaseLib/X86PatchInstruction.c @@ -46,9 +46,9 @@ VOID EFIAPI PatchInstructionX86 ( - OUT X86_ASSEMBLY_PATCH_LABEL *InstructionEnd, - IN UINT64 PatchValue, - IN UINTN ValueSize + OUT X86_ASSEMBLY_PATCH_LABEL *InstructionEnd, + IN UINT64 PatchValue, + IN UINTN ValueSize ) { // @@ -58,26 +58,26 @@ PatchInstructionX86 ( ASSERT ((UINTN)InstructionEnd > ValueSize); switch (ValueSize) { - case 1: - ASSERT (PatchValue <= MAX_UINT8); - *((UINT8 *)(UINTN)InstructionEnd - 1) = (UINT8)PatchValue; - break; - - case 2: - ASSERT (PatchValue <= MAX_UINT16); - WriteUnaligned16 ((UINT16 *)(UINTN)InstructionEnd - 1, (UINT16)PatchValue); - break; - - case 4: - ASSERT (PatchValue <= MAX_UINT32); - WriteUnaligned32 ((UINT32 *)(UINTN)InstructionEnd - 1, (UINT32)PatchValue); - break; - - case 8: - WriteUnaligned64 ((UINT64 *)(UINTN)InstructionEnd - 1, PatchValue); - break; - - default: - ASSERT (FALSE); + case 1: + ASSERT (PatchValue <= MAX_UINT8); + *((UINT8 *)(UINTN)InstructionEnd - 1) = (UINT8)PatchValue; + break; + + case 2: + ASSERT (PatchValue <= MAX_UINT16); + WriteUnaligned16 ((UINT16 *)(UINTN)InstructionEnd - 1, (UINT16)PatchValue); + break; + + case 4: + ASSERT (PatchValue <= MAX_UINT32); + WriteUnaligned32 ((UINT32 *)(UINTN)InstructionEnd - 1, (UINT32)PatchValue); + break; + + case 8: + WriteUnaligned64 ((UINT64 *)(UINTN)InstructionEnd - 1, PatchValue); + break; + + default: + ASSERT (FALSE); } } diff --git a/MdePkg/Library/BaseLib/X86RdRand.c b/MdePkg/Library/BaseLib/X86RdRand.c index dcbd969..a78e8b1 100644 --- a/MdePkg/Library/BaseLib/X86RdRand.c +++ b/MdePkg/Library/BaseLib/X86RdRand.c @@ -23,7 +23,7 @@ BOOLEAN EFIAPI AsmRdRand16 ( - OUT UINT16 *Rand + OUT UINT16 *Rand ) { ASSERT (Rand != NULL); @@ -44,7 +44,7 @@ AsmRdRand16 ( BOOLEAN EFIAPI AsmRdRand32 ( - OUT UINT32 *Rand + OUT UINT32 *Rand ) { ASSERT (Rand != NULL); @@ -65,7 +65,7 @@ AsmRdRand32 ( BOOLEAN EFIAPI AsmRdRand64 ( - OUT UINT64 *Rand + OUT UINT64 *Rand ) { ASSERT (Rand != NULL); diff --git a/MdePkg/Library/BaseLib/X86ReadGdtr.c b/MdePkg/Library/BaseLib/X86ReadGdtr.c index ca7c5de..1989cd0 100644 --- a/MdePkg/Library/BaseLib/X86ReadGdtr.c +++ b/MdePkg/Library/BaseLib/X86ReadGdtr.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** @@ -25,7 +22,7 @@ VOID EFIAPI AsmReadGdtr ( - OUT IA32_DESCRIPTOR *Gdtr + OUT IA32_DESCRIPTOR *Gdtr ) { ASSERT (Gdtr != NULL); diff --git a/MdePkg/Library/BaseLib/X86ReadIdtr.c b/MdePkg/Library/BaseLib/X86ReadIdtr.c index f9133f9..1b61ba2 100644 --- a/MdePkg/Library/BaseLib/X86ReadIdtr.c +++ b/MdePkg/Library/BaseLib/X86ReadIdtr.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** @@ -25,7 +22,7 @@ VOID EFIAPI AsmReadIdtr ( - OUT IA32_DESCRIPTOR *Idtr + OUT IA32_DESCRIPTOR *Idtr ) { ASSERT (Idtr != NULL); diff --git a/MdePkg/Library/BaseLib/X86Thunk.c b/MdePkg/Library/BaseLib/X86Thunk.c index 5c8a039..9940dca 100644 --- a/MdePkg/Library/BaseLib/X86Thunk.c +++ b/MdePkg/Library/BaseLib/X86Thunk.c @@ -6,15 +6,14 @@ **/ - #include "BaseLibInternals.h" -extern CONST UINT8 m16Start; -extern CONST UINT16 m16Size; -extern CONST UINT16 mThunk16Attr; -extern CONST UINT16 m16Gdt; -extern CONST UINT16 m16GdtrBase; -extern CONST UINT16 mTransition; +extern CONST UINT8 m16Start; +extern CONST UINT16 m16Size; +extern CONST UINT16 mThunk16Attr; +extern CONST UINT16 m16Gdt; +extern CONST UINT16 m16GdtrBase; +extern CONST UINT16 mTransition; /** Invokes 16-bit code in big real mode and returns the updated register set. @@ -33,8 +32,8 @@ extern CONST UINT16 mTransition; IA32_REGISTER_SET * EFIAPI InternalAsmThunk16 ( - IN IA32_REGISTER_SET *RegisterSet, - IN OUT VOID *Transition + IN IA32_REGISTER_SET *RegisterSet, + IN OUT VOID *Transition ); /** @@ -61,8 +60,8 @@ InternalAsmThunk16 ( VOID EFIAPI AsmGetThunk16Properties ( - OUT UINT32 *RealModeBufferSize, - OUT UINT32 *ExtraStackSize + OUT UINT32 *RealModeBufferSize, + OUT UINT32 *ExtraStackSize ) { ASSERT (RealModeBufferSize != NULL); @@ -93,10 +92,10 @@ AsmGetThunk16Properties ( VOID EFIAPI AsmPrepareThunk16 ( - IN OUT THUNK_CONTEXT *ThunkContext + IN OUT THUNK_CONTEXT *ThunkContext ) { - IA32_SEGMENT_DESCRIPTOR *RealModeGdt; + IA32_SEGMENT_DESCRIPTOR *RealModeGdt; ASSERT (ThunkContext != NULL); ASSERT ((UINTN)ThunkContext->RealModeBuffer < 0x100000); @@ -113,8 +112,8 @@ AsmPrepareThunk16 ( // RealModeGdt[2]: Data Segment // RealModeGdt[3]: Call Gate // - RealModeGdt = (IA32_SEGMENT_DESCRIPTOR*)( - (UINTN)ThunkContext->RealModeBuffer + m16Gdt); + RealModeGdt = (IA32_SEGMENT_DESCRIPTOR *)( + (UINTN)ThunkContext->RealModeBuffer + m16Gdt); // // Update Code & Data Segment Descriptor @@ -127,7 +126,7 @@ AsmPrepareThunk16 ( // // Update transition code entry point offset // - *(UINT32*)((UINTN)ThunkContext->RealModeBuffer + mTransition) += + *(UINT32 *)((UINTN)ThunkContext->RealModeBuffer + mTransition) += (UINT32)(UINTN)ThunkContext->RealModeBuffer & 0xf; // @@ -138,20 +137,20 @@ AsmPrepareThunk16 ( // Set segment limits to 64KB // RealModeGdt[1].Bits.LimitHigh = 0; - RealModeGdt[1].Bits.G = 0; + RealModeGdt[1].Bits.G = 0; RealModeGdt[2].Bits.LimitHigh = 0; - RealModeGdt[2].Bits.G = 0; + RealModeGdt[2].Bits.G = 0; } // // Update GDTBASE for this thunk context // - *(VOID**)((UINTN)ThunkContext->RealModeBuffer + m16GdtrBase) = RealModeGdt; + *(VOID **)((UINTN)ThunkContext->RealModeBuffer + m16GdtrBase) = RealModeGdt; // // Update Thunk Attributes // - *(UINT32*)((UINTN)ThunkContext->RealModeBuffer + mThunk16Attr) = + *(UINT32 *)((UINTN)ThunkContext->RealModeBuffer + mThunk16Attr) = ThunkContext->ThunkAttributes; } @@ -211,17 +210,19 @@ AsmPrepareThunk16 ( VOID EFIAPI AsmThunk16 ( - IN OUT THUNK_CONTEXT *ThunkContext + IN OUT THUNK_CONTEXT *ThunkContext ) { - IA32_REGISTER_SET *UpdatedRegs; + IA32_REGISTER_SET *UpdatedRegs; ASSERT (ThunkContext != NULL); ASSERT ((UINTN)ThunkContext->RealModeBuffer < 0x100000); ASSERT (ThunkContext->RealModeBufferSize >= m16Size); ASSERT ((UINTN)ThunkContext->RealModeBuffer + m16Size <= 0x100000); - ASSERT (((ThunkContext->ThunkAttributes & (THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 | THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL)) != \ - (THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 | THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL))); + ASSERT ( + ((ThunkContext->ThunkAttributes & (THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 | THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL)) != \ + (THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15 | THUNK_ATTRIBUTE_DISABLE_A20_MASK_KBD_CTRL)) + ); UpdatedRegs = InternalAsmThunk16 ( ThunkContext->RealModeState, @@ -254,7 +255,7 @@ AsmThunk16 ( VOID EFIAPI AsmPrepareAndThunk16 ( - IN OUT THUNK_CONTEXT *ThunkContext + IN OUT THUNK_CONTEXT *ThunkContext ) { AsmPrepareThunk16 (ThunkContext); diff --git a/MdePkg/Library/BaseLib/X86UnitTestHost.c b/MdePkg/Library/BaseLib/X86UnitTestHost.c index 3730e2f..8ba4f54 100644 --- a/MdePkg/Library/BaseLib/X86UnitTestHost.c +++ b/MdePkg/Library/BaseLib/X86UnitTestHost.c @@ -59,25 +59,29 @@ STATIC IA32_DESCRIPTOR mUnitTestHostBaseLibIdtr; UINT32 EFIAPI UnitTestHostBaseLibAsmCpuid ( - IN UINT32 Index, - OUT UINT32 *Eax OPTIONAL, - OUT UINT32 *Ebx OPTIONAL, - OUT UINT32 *Ecx OPTIONAL, - OUT UINT32 *Edx OPTIONAL + IN UINT32 Index, + OUT UINT32 *Eax OPTIONAL, + OUT UINT32 *Ebx OPTIONAL, + OUT UINT32 *Ecx OPTIONAL, + OUT UINT32 *Edx OPTIONAL ) { if (Eax != NULL) { *Eax = 0; } + if (Ebx != NULL) { *Ebx = 0; } + if (Ecx != NULL) { *Ecx = 0; } + if (Edx != NULL) { *Edx = 0; } + return Index; } @@ -116,26 +120,30 @@ UnitTestHostBaseLibAsmCpuid ( UINT32 EFIAPI UnitTestHostBaseLibAsmCpuidEx ( - IN UINT32 Index, - IN UINT32 SubIndex, - OUT UINT32 *Eax OPTIONAL, - OUT UINT32 *Ebx OPTIONAL, - OUT UINT32 *Ecx OPTIONAL, - OUT UINT32 *Edx OPTIONAL + IN UINT32 Index, + IN UINT32 SubIndex, + OUT UINT32 *Eax OPTIONAL, + OUT UINT32 *Ebx OPTIONAL, + OUT UINT32 *Ecx OPTIONAL, + OUT UINT32 *Edx OPTIONAL ) { if (Eax != NULL) { *Eax = 0; } + if (Ebx != NULL) { *Ebx = 0; } + if (Ecx != NULL) { *Ecx = 0; } + if (Edx != NULL) { *Edx = 0; } + return Index; } @@ -186,15 +194,17 @@ UnitTestHostBaseLibAsmEnableCache ( UINT64 EFIAPI UnitTestHostBaseLibAsmReadMsr64 ( - IN UINT32 Index + IN UINT32 Index ) { if (Index < 0x1000) { return mUnitTestHostBaseLibMsr[0][Index]; } - if (Index >= 0xC0000000 && Index < 0xC0001000) { + + if ((Index >= 0xC0000000) && (Index < 0xC0001000)) { return mUnitTestHostBaseLibMsr[1][Index]; } + return 0; } @@ -218,16 +228,18 @@ UnitTestHostBaseLibAsmReadMsr64 ( UINT64 EFIAPI UnitTestHostBaseLibAsmWriteMsr64 ( - IN UINT32 Index, - IN UINT64 Value + IN UINT32 Index, + IN UINT64 Value ) { if (Index < 0x1000) { mUnitTestHostBaseLibMsr[0][Index] = Value; } - if (Index >= 0xC0000000 && Index < 0xC0001000) { + + if ((Index >= 0xC0000000) && (Index < 0xC0001000)) { mUnitTestHostBaseLibMsr[1][Index - 0xC00000000] = Value; } + return Value; } @@ -851,7 +863,7 @@ UnitTestHostBaseLibAsmReadTr ( VOID EFIAPI UnitTestHostBaseLibAsmReadGdtr ( - OUT IA32_DESCRIPTOR *Gdtr + OUT IA32_DESCRIPTOR *Gdtr ) { Gdtr = &mUnitTestHostBaseLibGdtr; @@ -871,7 +883,7 @@ UnitTestHostBaseLibAsmReadGdtr ( VOID EFIAPI UnitTestHostBaseLibAsmWriteGdtr ( - IN CONST IA32_DESCRIPTOR *Gdtr + IN CONST IA32_DESCRIPTOR *Gdtr ) { CopyMem (&mUnitTestHostBaseLibGdtr, Gdtr, sizeof (IA32_DESCRIPTOR)); @@ -891,7 +903,7 @@ UnitTestHostBaseLibAsmWriteGdtr ( VOID EFIAPI UnitTestHostBaseLibAsmReadIdtr ( - OUT IA32_DESCRIPTOR *Idtr + OUT IA32_DESCRIPTOR *Idtr ) { Idtr = &mUnitTestHostBaseLibIdtr; @@ -911,7 +923,7 @@ UnitTestHostBaseLibAsmReadIdtr ( VOID EFIAPI UnitTestHostBaseLibAsmWriteIdtr ( - IN CONST IA32_DESCRIPTOR *Idtr + IN CONST IA32_DESCRIPTOR *Idtr ) { CopyMem (&mUnitTestHostBaseLibIdtr, Idtr, sizeof (IA32_DESCRIPTOR)); @@ -947,7 +959,7 @@ UnitTestHostBaseLibAsmReadLdtr ( VOID EFIAPI UnitTestHostBaseLibAsmWriteLdtr ( - IN UINT16 Ldtr + IN UINT16 Ldtr ) { mUnitTestHostBaseLibSegment[UNIT_TEST_HOST_BASE_LIB_SEGMENT_LDTR] = Ldtr; @@ -967,7 +979,7 @@ UnitTestHostBaseLibAsmWriteLdtr ( UINT64 EFIAPI UnitTestHostBaseLibAsmReadPmc ( - IN UINT32 Index + IN UINT32 Index ) { return 0; @@ -992,9 +1004,9 @@ UnitTestHostBaseLibAsmReadPmc ( UINTN EFIAPI UnitTestHostBaseLibAsmMonitor ( - IN UINTN Eax, - IN UINTN Ecx, - IN UINTN Edx + IN UINTN Eax, + IN UINTN Ecx, + IN UINTN Edx ) { return Eax; @@ -1017,8 +1029,8 @@ UnitTestHostBaseLibAsmMonitor ( UINTN EFIAPI UnitTestHostBaseLibAsmMwait ( - IN UINTN Eax, - IN UINTN Ecx + IN UINTN Eax, + IN UINTN Ecx ) { return Eax; @@ -1072,7 +1084,7 @@ UnitTestHostBaseLibAsmInvd ( VOID * EFIAPI UnitTestHostBaseLibAsmFlushCacheLine ( - IN VOID *LinearAddress + IN VOID *LinearAddress ) { return LinearAddress; @@ -1208,11 +1220,11 @@ UnitTestHostBaseLibAsmDisablePaging32 ( VOID EFIAPI UnitTestHostBaseLibAsmEnablePaging64 ( - IN UINT16 Cs, - IN UINT64 EntryPoint, - IN UINT64 Context1 OPTIONAL, - IN UINT64 Context2 OPTIONAL, - IN UINT64 NewStack + IN UINT16 Cs, + IN UINT64 EntryPoint, + IN UINT64 Context1 OPTIONAL, + IN UINT64 Context2 OPTIONAL, + IN UINT64 NewStack ) { SWITCH_STACK_ENTRY_POINT NewEntryPoint; @@ -1254,11 +1266,11 @@ UnitTestHostBaseLibAsmEnablePaging64 ( VOID EFIAPI UnitTestHostBaseLibAsmDisablePaging64 ( - IN UINT16 Cs, - IN UINT32 EntryPoint, - IN UINT32 Context1 OPTIONAL, - IN UINT32 Context2 OPTIONAL, - IN UINT32 NewStack + IN UINT16 Cs, + IN UINT32 EntryPoint, + IN UINT32 Context1 OPTIONAL, + IN UINT32 Context2 OPTIONAL, + IN UINT32 NewStack ) { SWITCH_STACK_ENTRY_POINT NewEntryPoint; @@ -1291,8 +1303,8 @@ UnitTestHostBaseLibAsmDisablePaging64 ( VOID EFIAPI UnitTestHostBaseLibAsmGetThunk16Properties ( - OUT UINT32 *RealModeBufferSize, - OUT UINT32 *ExtraStackSize + OUT UINT32 *RealModeBufferSize, + OUT UINT32 *ExtraStackSize ) { *RealModeBufferSize = 0; @@ -1316,7 +1328,7 @@ UnitTestHostBaseLibAsmGetThunk16Properties ( VOID EFIAPI UnitTestHostBaseLibAsmPrepareThunk16 ( - IN OUT THUNK_CONTEXT *ThunkContext + IN OUT THUNK_CONTEXT *ThunkContext ) { } @@ -1377,7 +1389,7 @@ UnitTestHostBaseLibAsmPrepareThunk16 ( VOID EFIAPI UnitTestHostBaseLibAsmThunk16 ( - IN OUT THUNK_CONTEXT *ThunkContext + IN OUT THUNK_CONTEXT *ThunkContext ) { } @@ -1405,7 +1417,7 @@ UnitTestHostBaseLibAsmThunk16 ( VOID EFIAPI UnitTestHostBaseLibAsmPrepareAndThunk16 ( - IN OUT THUNK_CONTEXT *ThunkContext + IN OUT THUNK_CONTEXT *ThunkContext ) { } @@ -1418,7 +1430,7 @@ UnitTestHostBaseLibAsmPrepareAndThunk16 ( VOID EFIAPI UnitTestHostBaseLibAsmWriteTr ( - IN UINT16 Selector + IN UINT16 Selector ) { mUnitTestHostBaseLibSegment[UNIT_TEST_HOST_BASE_LIB_SEGMENT_TR] = Selector; @@ -1476,9 +1488,9 @@ UnitTestHostBaseLibAsmLfence ( VOID EFIAPI UnitTestHostBaseLibPatchInstructionX86 ( - OUT X86_ASSEMBLY_PATCH_LABEL *InstructionEnd, - IN UINT64 PatchValue, - IN UINTN ValueSize + OUT X86_ASSEMBLY_PATCH_LABEL *InstructionEnd, + IN UINT64 PatchValue, + IN UINTN ValueSize ) { } @@ -1511,11 +1523,11 @@ UnitTestHostBaseLibPatchInstructionX86 ( UINT32 EFIAPI AsmCpuid ( - IN UINT32 Index, - OUT UINT32 *Eax OPTIONAL, - OUT UINT32 *Ebx OPTIONAL, - OUT UINT32 *Ecx OPTIONAL, - OUT UINT32 *Edx OPTIONAL + IN UINT32 Index, + OUT UINT32 *Eax OPTIONAL, + OUT UINT32 *Ebx OPTIONAL, + OUT UINT32 *Ecx OPTIONAL, + OUT UINT32 *Edx OPTIONAL ) { return gUnitTestHostBaseLib.X86->AsmCpuid (Index, Eax, Ebx, Ecx, Edx); @@ -1556,12 +1568,12 @@ AsmCpuid ( UINT32 EFIAPI AsmCpuidEx ( - IN UINT32 Index, - IN UINT32 SubIndex, - OUT UINT32 *Eax OPTIONAL, - OUT UINT32 *Ebx OPTIONAL, - OUT UINT32 *Ecx OPTIONAL, - OUT UINT32 *Edx OPTIONAL + IN UINT32 Index, + IN UINT32 SubIndex, + OUT UINT32 *Eax OPTIONAL, + OUT UINT32 *Ebx OPTIONAL, + OUT UINT32 *Ecx OPTIONAL, + OUT UINT32 *Edx OPTIONAL ) { return gUnitTestHostBaseLib.X86->AsmCpuidEx (Index, SubIndex, Eax, Ebx, Ecx, Edx); @@ -1616,7 +1628,7 @@ AsmEnableCache ( UINT64 EFIAPI AsmReadMsr64 ( - IN UINT32 Index + IN UINT32 Index ) { return gUnitTestHostBaseLib.X86->AsmReadMsr64 (Index); @@ -1642,8 +1654,8 @@ AsmReadMsr64 ( UINT64 EFIAPI AsmWriteMsr64 ( - IN UINT32 Index, - IN UINT64 Value + IN UINT32 Index, + IN UINT64 Value ) { return gUnitTestHostBaseLib.X86->AsmWriteMsr64 (Index, Value); @@ -2257,7 +2269,7 @@ AsmReadTr ( VOID EFIAPI AsmReadGdtr ( - OUT IA32_DESCRIPTOR *Gdtr + OUT IA32_DESCRIPTOR *Gdtr ) { gUnitTestHostBaseLib.X86->AsmReadGdtr (Gdtr); @@ -2277,7 +2289,7 @@ AsmReadGdtr ( VOID EFIAPI AsmWriteGdtr ( - IN CONST IA32_DESCRIPTOR *Gdtr + IN CONST IA32_DESCRIPTOR *Gdtr ) { gUnitTestHostBaseLib.X86->AsmWriteGdtr (Gdtr); @@ -2297,7 +2309,7 @@ AsmWriteGdtr ( VOID EFIAPI AsmReadIdtr ( - OUT IA32_DESCRIPTOR *Idtr + OUT IA32_DESCRIPTOR *Idtr ) { gUnitTestHostBaseLib.X86->AsmReadIdtr (Idtr); @@ -2317,7 +2329,7 @@ AsmReadIdtr ( VOID EFIAPI AsmWriteIdtr ( - IN CONST IA32_DESCRIPTOR *Idtr + IN CONST IA32_DESCRIPTOR *Idtr ) { gUnitTestHostBaseLib.X86->AsmWriteIdtr (Idtr); @@ -2353,7 +2365,7 @@ AsmReadLdtr ( VOID EFIAPI AsmWriteLdtr ( - IN UINT16 Ldtr + IN UINT16 Ldtr ) { gUnitTestHostBaseLib.X86->AsmWriteLdtr (Ldtr); @@ -2373,7 +2385,7 @@ AsmWriteLdtr ( UINT64 EFIAPI AsmReadPmc ( - IN UINT32 Index + IN UINT32 Index ) { return gUnitTestHostBaseLib.X86->AsmReadPmc (Index); @@ -2398,9 +2410,9 @@ AsmReadPmc ( UINTN EFIAPI AsmMonitor ( - IN UINTN Eax, - IN UINTN Ecx, - IN UINTN Edx + IN UINTN Eax, + IN UINTN Ecx, + IN UINTN Edx ) { return gUnitTestHostBaseLib.X86->AsmMonitor (Eax, Ecx, Edx); @@ -2423,8 +2435,8 @@ AsmMonitor ( UINTN EFIAPI AsmMwait ( - IN UINTN Eax, - IN UINTN Ecx + IN UINTN Eax, + IN UINTN Ecx ) { return gUnitTestHostBaseLib.X86->AsmMwait (Eax, Ecx); @@ -2480,7 +2492,7 @@ AsmInvd ( VOID * EFIAPI AsmFlushCacheLine ( - IN VOID *LinearAddress + IN VOID *LinearAddress ) { return gUnitTestHostBaseLib.X86->AsmFlushCacheLine (LinearAddress); @@ -2616,11 +2628,11 @@ AsmDisablePaging32 ( VOID EFIAPI AsmEnablePaging64 ( - IN UINT16 Cs, - IN UINT64 EntryPoint, - IN UINT64 Context1 OPTIONAL, - IN UINT64 Context2 OPTIONAL, - IN UINT64 NewStack + IN UINT16 Cs, + IN UINT64 EntryPoint, + IN UINT64 Context1 OPTIONAL, + IN UINT64 Context2 OPTIONAL, + IN UINT64 NewStack ) { gUnitTestHostBaseLib.X86->AsmEnablePaging64 (Cs, EntryPoint, Context1, Context2, NewStack); @@ -2659,11 +2671,11 @@ AsmEnablePaging64 ( VOID EFIAPI AsmDisablePaging64 ( - IN UINT16 Cs, - IN UINT32 EntryPoint, - IN UINT32 Context1 OPTIONAL, - IN UINT32 Context2 OPTIONAL, - IN UINT32 NewStack + IN UINT16 Cs, + IN UINT32 EntryPoint, + IN UINT32 Context1 OPTIONAL, + IN UINT32 Context2 OPTIONAL, + IN UINT32 NewStack ) { gUnitTestHostBaseLib.X86->AsmDisablePaging64 (Cs, EntryPoint, Context1, Context2, NewStack); @@ -2693,8 +2705,8 @@ AsmDisablePaging64 ( VOID EFIAPI AsmGetThunk16Properties ( - OUT UINT32 *RealModeBufferSize, - OUT UINT32 *ExtraStackSize + OUT UINT32 *RealModeBufferSize, + OUT UINT32 *ExtraStackSize ) { gUnitTestHostBaseLib.X86->AsmGetThunk16Properties (RealModeBufferSize, ExtraStackSize); @@ -2717,7 +2729,7 @@ AsmGetThunk16Properties ( VOID EFIAPI AsmPrepareThunk16 ( - IN OUT THUNK_CONTEXT *ThunkContext + IN OUT THUNK_CONTEXT *ThunkContext ) { gUnitTestHostBaseLib.X86->AsmPrepareThunk16 (ThunkContext); @@ -2779,7 +2791,7 @@ AsmPrepareThunk16 ( VOID EFIAPI AsmThunk16 ( - IN OUT THUNK_CONTEXT *ThunkContext + IN OUT THUNK_CONTEXT *ThunkContext ) { gUnitTestHostBaseLib.X86->AsmThunk16 (ThunkContext); @@ -2808,7 +2820,7 @@ AsmThunk16 ( VOID EFIAPI AsmPrepareAndThunk16 ( - IN OUT THUNK_CONTEXT *ThunkContext + IN OUT THUNK_CONTEXT *ThunkContext ) { gUnitTestHostBaseLib.X86->AsmPrepareAndThunk16 (ThunkContext); @@ -2822,7 +2834,7 @@ AsmPrepareAndThunk16 ( VOID EFIAPI AsmWriteTr ( - IN UINT16 Selector + IN UINT16 Selector ) { gUnitTestHostBaseLib.X86->AsmWriteTr (Selector); @@ -2881,9 +2893,9 @@ AsmLfence ( VOID EFIAPI PatchInstructionX86 ( - OUT X86_ASSEMBLY_PATCH_LABEL *InstructionEnd, - IN UINT64 PatchValue, - IN UINTN ValueSize + OUT X86_ASSEMBLY_PATCH_LABEL *InstructionEnd, + IN UINT64 PatchValue, + IN UINTN ValueSize ) { gUnitTestHostBaseLib.X86->PatchInstructionX86 (InstructionEnd, PatchValue, ValueSize); diff --git a/MdePkg/Library/BaseLib/X86WriteGdtr.c b/MdePkg/Library/BaseLib/X86WriteGdtr.c index 1a570e3..07ebb21 100644 --- a/MdePkg/Library/BaseLib/X86WriteGdtr.c +++ b/MdePkg/Library/BaseLib/X86WriteGdtr.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** @@ -25,7 +22,7 @@ VOID EFIAPI AsmWriteGdtr ( - IN CONST IA32_DESCRIPTOR *Gdtr + IN CONST IA32_DESCRIPTOR *Gdtr ) { ASSERT (Gdtr != NULL); diff --git a/MdePkg/Library/BaseLib/X86WriteIdtr.c b/MdePkg/Library/BaseLib/X86WriteIdtr.c index 9ea979b..af8f8b3 100644 --- a/MdePkg/Library/BaseLib/X86WriteIdtr.c +++ b/MdePkg/Library/BaseLib/X86WriteIdtr.c @@ -6,9 +6,6 @@ **/ - - - #include "BaseLibInternals.h" /** @@ -25,7 +22,7 @@ VOID EFIAPI AsmWriteIdtr ( - IN CONST IA32_DESCRIPTOR *Idtr + IN CONST IA32_DESCRIPTOR *Idtr ) { ASSERT (Idtr != NULL); diff --git a/MdePkg/Library/BaseMemoryLib/CompareMemWrapper.c b/MdePkg/Library/BaseMemoryLib/CompareMemWrapper.c index 57d82f0..0ca0edb 100644 --- a/MdePkg/Library/BaseMemoryLib/CompareMemWrapper.c +++ b/MdePkg/Library/BaseMemoryLib/CompareMemWrapper.c @@ -48,9 +48,10 @@ CompareMem ( IN UINTN Length ) { - if (Length == 0 || DestinationBuffer == SourceBuffer) { + if ((Length == 0) || (DestinationBuffer == SourceBuffer)) { return 0; } + ASSERT (DestinationBuffer != NULL); ASSERT (SourceBuffer != NULL); ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer)); diff --git a/MdePkg/Library/BaseMemoryLib/CopyMem.c b/MdePkg/Library/BaseMemoryLib/CopyMem.c index 55e8616..929f700 100644 --- a/MdePkg/Library/BaseMemoryLib/CopyMem.c +++ b/MdePkg/Library/BaseMemoryLib/CopyMem.c @@ -11,9 +11,6 @@ **/ - - - #include "MemLibInternals.h" /** @@ -29,9 +26,9 @@ VOID * EFIAPI InternalMemCopyMem ( - OUT VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length + OUT VOID *DestinationBuffer, + IN CONST VOID *SourceBuffer, + IN UINTN Length ) { // @@ -39,32 +36,32 @@ InternalMemCopyMem ( // volatile to prevent the optimizer from replacing this function with // the intrinsic memcpy() // - volatile UINT8 *Destination8; - CONST UINT8 *Source8; - volatile UINT32 *Destination32; - CONST UINT32 *Source32; - volatile UINT64 *Destination64; - CONST UINT64 *Source64; - UINTN Alignment; + volatile UINT8 *Destination8; + CONST UINT8 *Source8; + volatile UINT32 *Destination32; + CONST UINT32 *Source32; + volatile UINT64 *Destination64; + CONST UINT64 *Source64; + UINTN Alignment; if ((((UINTN)DestinationBuffer & 0x7) == 0) && (((UINTN)SourceBuffer & 0x7) == 0) && (Length >= 8)) { if (SourceBuffer > DestinationBuffer) { - Destination64 = (UINT64*)DestinationBuffer; - Source64 = (CONST UINT64*)SourceBuffer; + Destination64 = (UINT64 *)DestinationBuffer; + Source64 = (CONST UINT64 *)SourceBuffer; while (Length >= 8) { *(Destination64++) = *(Source64++); - Length -= 8; + Length -= 8; } // Finish if there are still some bytes to copy - Destination8 = (UINT8*)Destination64; - Source8 = (CONST UINT8*)Source64; + Destination8 = (UINT8 *)Destination64; + Source8 = (CONST UINT8 *)Source64; while (Length-- != 0) { *(Destination8++) = *(Source8++); } } else if (SourceBuffer < DestinationBuffer) { - Destination64 = (UINT64*)((UINTN)DestinationBuffer + Length); - Source64 = (CONST UINT64*)((UINTN)SourceBuffer + Length); + Destination64 = (UINT64 *)((UINTN)DestinationBuffer + Length); + Source64 = (CONST UINT64 *)((UINTN)SourceBuffer + Length); // Destination64 and Source64 were aligned on a 64-bit boundary // but if length is not a multiple of 8 bytes then they won't be @@ -72,40 +69,41 @@ InternalMemCopyMem ( Alignment = Length & 0x7; if (Alignment != 0) { - Destination8 = (UINT8*)Destination64; - Source8 = (CONST UINT8*)Source64; + Destination8 = (UINT8 *)Destination64; + Source8 = (CONST UINT8 *)Source64; while (Alignment-- != 0) { *(--Destination8) = *(--Source8); --Length; } - Destination64 = (UINT64*)Destination8; - Source64 = (CONST UINT64*)Source8; + + Destination64 = (UINT64 *)Destination8; + Source64 = (CONST UINT64 *)Source8; } while (Length > 0) { *(--Destination64) = *(--Source64); - Length -= 8; + Length -= 8; } } } else if ((((UINTN)DestinationBuffer & 0x3) == 0) && (((UINTN)SourceBuffer & 0x3) == 0) && (Length >= 4)) { if (SourceBuffer > DestinationBuffer) { - Destination32 = (UINT32*)DestinationBuffer; - Source32 = (CONST UINT32*)SourceBuffer; + Destination32 = (UINT32 *)DestinationBuffer; + Source32 = (CONST UINT32 *)SourceBuffer; while (Length >= 4) { *(Destination32++) = *(Source32++); - Length -= 4; + Length -= 4; } // Finish if there are still some bytes to copy - Destination8 = (UINT8*)Destination32; - Source8 = (CONST UINT8*)Source32; + Destination8 = (UINT8 *)Destination32; + Source8 = (CONST UINT8 *)Source32; while (Length-- != 0) { *(Destination8++) = *(Source8++); } } else if (SourceBuffer < DestinationBuffer) { - Destination32 = (UINT32*)((UINTN)DestinationBuffer + Length); - Source32 = (CONST UINT32*)((UINTN)SourceBuffer + Length); + Destination32 = (UINT32 *)((UINTN)DestinationBuffer + Length); + Source32 = (CONST UINT32 *)((UINTN)SourceBuffer + Length); // Destination32 and Source32 were aligned on a 32-bit boundary // but if length is not a multiple of 4 bytes then they won't be @@ -113,36 +111,38 @@ InternalMemCopyMem ( Alignment = Length & 0x3; if (Alignment != 0) { - Destination8 = (UINT8*)Destination32; - Source8 = (CONST UINT8*)Source32; + Destination8 = (UINT8 *)Destination32; + Source8 = (CONST UINT8 *)Source32; while (Alignment-- != 0) { *(--Destination8) = *(--Source8); --Length; } - Destination32 = (UINT32*)Destination8; - Source32 = (CONST UINT32*)Source8; + + Destination32 = (UINT32 *)Destination8; + Source32 = (CONST UINT32 *)Source8; } while (Length > 0) { *(--Destination32) = *(--Source32); - Length -= 4; + Length -= 4; } } } else { if (SourceBuffer > DestinationBuffer) { - Destination8 = (UINT8*)DestinationBuffer; - Source8 = (CONST UINT8*)SourceBuffer; + Destination8 = (UINT8 *)DestinationBuffer; + Source8 = (CONST UINT8 *)SourceBuffer; while (Length-- != 0) { *(Destination8++) = *(Source8++); } } else if (SourceBuffer < DestinationBuffer) { - Destination8 = (UINT8*)DestinationBuffer + (Length - 1); - Source8 = (CONST UINT8*)SourceBuffer + (Length - 1); + Destination8 = (UINT8 *)DestinationBuffer + (Length - 1); + Source8 = (CONST UINT8 *)SourceBuffer + (Length - 1); while (Length-- != 0) { *(Destination8--) = *(Source8--); } } } + return DestinationBuffer; } diff --git a/MdePkg/Library/BaseMemoryLib/CopyMemWrapper.c b/MdePkg/Library/BaseMemoryLib/CopyMemWrapper.c index 1ac5f33..c4ef379 100644 --- a/MdePkg/Library/BaseMemoryLib/CopyMemWrapper.c +++ b/MdePkg/Library/BaseMemoryLib/CopyMemWrapper.c @@ -47,11 +47,13 @@ CopyMem ( if (Length == 0) { return DestinationBuffer; } + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer)); ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)SourceBuffer)); if (DestinationBuffer == SourceBuffer) { return DestinationBuffer; } + return InternalMemCopyMem (DestinationBuffer, SourceBuffer, Length); } diff --git a/MdePkg/Library/BaseMemoryLib/MemLibGeneric.c b/MdePkg/Library/BaseMemoryLib/MemLibGeneric.c index 6a261ae..086eb29 100644 --- a/MdePkg/Library/BaseMemoryLib/MemLibGeneric.c +++ b/MdePkg/Library/BaseMemoryLib/MemLibGeneric.c @@ -26,14 +26,15 @@ VOID * EFIAPI InternalMemSetMem16 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT16 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT16 Value ) { - for (; Length != 0; Length--) { - ((UINT16*)Buffer)[Length - 1] = Value; + for ( ; Length != 0; Length--) { + ((UINT16 *)Buffer)[Length - 1] = Value; } + return Buffer; } @@ -50,14 +51,15 @@ InternalMemSetMem16 ( VOID * EFIAPI InternalMemSetMem32 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT32 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT32 Value ) { - for (; Length != 0; Length--) { - ((UINT32*)Buffer)[Length - 1] = Value; + for ( ; Length != 0; Length--) { + ((UINT32 *)Buffer)[Length - 1] = Value; } + return Buffer; } @@ -74,14 +76,15 @@ InternalMemSetMem32 ( VOID * EFIAPI InternalMemSetMem64 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT64 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT64 Value ) { - for (; Length != 0; Length--) { - ((UINT64*)Buffer)[Length - 1] = Value; + for ( ; Length != 0; Length--) { + ((UINT64 *)Buffer)[Length - 1] = Value; } + return Buffer; } @@ -97,8 +100,8 @@ InternalMemSetMem64 ( VOID * EFIAPI InternalMemZeroMem ( - OUT VOID *Buffer, - IN UINTN Length + OUT VOID *Buffer, + IN UINTN Length ) { return InternalMemSetMem (Buffer, Length, 0); @@ -120,17 +123,19 @@ InternalMemZeroMem ( INTN EFIAPI InternalMemCompareMem ( - IN CONST VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length + IN CONST VOID *DestinationBuffer, + IN CONST VOID *SourceBuffer, + IN UINTN Length ) { while ((--Length != 0) && - (*(INT8*)DestinationBuffer == *(INT8*)SourceBuffer)) { - DestinationBuffer = (INT8*)DestinationBuffer + 1; - SourceBuffer = (INT8*)SourceBuffer + 1; + (*(INT8 *)DestinationBuffer == *(INT8 *)SourceBuffer)) + { + DestinationBuffer = (INT8 *)DestinationBuffer + 1; + SourceBuffer = (INT8 *)SourceBuffer + 1; } - return (INTN)*(UINT8*)DestinationBuffer - (INTN)*(UINT8*)SourceBuffer; + + return (INTN)*(UINT8 *)DestinationBuffer - (INTN)*(UINT8 *)SourceBuffer; } /** @@ -147,20 +152,22 @@ InternalMemCompareMem ( CONST VOID * EFIAPI InternalMemScanMem8 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT8 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT8 Value ) { - CONST UINT8 *Pointer; + CONST UINT8 *Pointer; - Pointer = (CONST UINT8*)Buffer; + Pointer = (CONST UINT8 *)Buffer; do { if (*Pointer == Value) { return Pointer; } + ++Pointer; } while (--Length != 0); + return NULL; } @@ -178,20 +185,22 @@ InternalMemScanMem8 ( CONST VOID * EFIAPI InternalMemScanMem16 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT16 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT16 Value ) { - CONST UINT16 *Pointer; + CONST UINT16 *Pointer; - Pointer = (CONST UINT16*)Buffer; + Pointer = (CONST UINT16 *)Buffer; do { if (*Pointer == Value) { return Pointer; } + ++Pointer; } while (--Length != 0); + return NULL; } @@ -209,20 +218,22 @@ InternalMemScanMem16 ( CONST VOID * EFIAPI InternalMemScanMem32 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT32 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT32 Value ) { - CONST UINT32 *Pointer; + CONST UINT32 *Pointer; - Pointer = (CONST UINT32*)Buffer; + Pointer = (CONST UINT32 *)Buffer; do { if (*Pointer == Value) { return Pointer; } + ++Pointer; } while (--Length != 0); + return NULL; } @@ -240,20 +251,22 @@ InternalMemScanMem32 ( CONST VOID * EFIAPI InternalMemScanMem64 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT64 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT64 Value ) { - CONST UINT64 *Pointer; + CONST UINT64 *Pointer; - Pointer = (CONST UINT64*)Buffer; + Pointer = (CONST UINT64 *)Buffer; do { if (*Pointer == Value) { return Pointer; } + ++Pointer; } while (--Length != 0); + return NULL; } @@ -274,8 +287,8 @@ InternalMemIsZeroBuffer ( IN UINTN Length ) { - CONST UINT8 *BufferData; - UINTN Index; + CONST UINT8 *BufferData; + UINTN Index; BufferData = Buffer; for (Index = 0; Index < Length; Index++) { @@ -283,5 +296,6 @@ InternalMemIsZeroBuffer ( return FALSE; } } + return TRUE; } diff --git a/MdePkg/Library/BaseMemoryLib/MemLibGuid.c b/MdePkg/Library/BaseMemoryLib/MemLibGuid.c index e2976dd..b645ca2 100644 --- a/MdePkg/Library/BaseMemoryLib/MemLibGuid.c +++ b/MdePkg/Library/BaseMemoryLib/MemLibGuid.c @@ -42,12 +42,12 @@ CopyGuid ( ) { WriteUnaligned64 ( - (UINT64*)DestinationGuid, - ReadUnaligned64 ((CONST UINT64*)SourceGuid) + (UINT64 *)DestinationGuid, + ReadUnaligned64 ((CONST UINT64 *)SourceGuid) ); WriteUnaligned64 ( - (UINT64*)DestinationGuid + 1, - ReadUnaligned64 ((CONST UINT64*)SourceGuid + 1) + (UINT64 *)DestinationGuid + 1, + ReadUnaligned64 ((CONST UINT64 *)SourceGuid + 1) ); return DestinationGuid; } @@ -80,12 +80,12 @@ CompareGuid ( UINT64 HighPartOfGuid1; UINT64 HighPartOfGuid2; - LowPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1); - LowPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2); - HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1 + 1); - HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2 + 1); + LowPartOfGuid1 = ReadUnaligned64 ((CONST UINT64 *)Guid1); + LowPartOfGuid2 = ReadUnaligned64 ((CONST UINT64 *)Guid2); + HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64 *)Guid1 + 1); + HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64 *)Guid2 + 1); - return (BOOLEAN) (LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2); + return (BOOLEAN)(LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2); } /** @@ -118,20 +118,22 @@ ScanGuid ( IN CONST GUID *Guid ) { - CONST GUID *GuidPtr; + CONST GUID *GuidPtr; ASSERT (((UINTN)Buffer & (sizeof (Guid->Data1) - 1)) == 0); ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1)); ASSERT ((Length & (sizeof (*GuidPtr) - 1)) == 0); - GuidPtr = (GUID*)Buffer; + GuidPtr = (GUID *)Buffer; Buffer = GuidPtr + Length / sizeof (*GuidPtr); - while (GuidPtr < (CONST GUID*)Buffer) { + while (GuidPtr < (CONST GUID *)Buffer) { if (CompareGuid (GuidPtr, Guid)) { - return (VOID*)GuidPtr; + return (VOID *)GuidPtr; } + GuidPtr++; } + return NULL; } @@ -158,8 +160,8 @@ IsZeroGuid ( UINT64 LowPartOfGuid; UINT64 HighPartOfGuid; - LowPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid); - HighPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid + 1); + LowPartOfGuid = ReadUnaligned64 ((CONST UINT64 *)Guid); + HighPartOfGuid = ReadUnaligned64 ((CONST UINT64 *)Guid + 1); - return (BOOLEAN) (LowPartOfGuid == 0 && HighPartOfGuid == 0); + return (BOOLEAN)(LowPartOfGuid == 0 && HighPartOfGuid == 0); } diff --git a/MdePkg/Library/BaseMemoryLib/MemLibInternals.h b/MdePkg/Library/BaseMemoryLib/MemLibInternals.h index 9d3730a..a39c37c 100644 --- a/MdePkg/Library/BaseMemoryLib/MemLibInternals.h +++ b/MdePkg/Library/BaseMemoryLib/MemLibInternals.h @@ -35,9 +35,9 @@ VOID * EFIAPI InternalMemCopyMem ( - OUT VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length + OUT VOID *DestinationBuffer, + IN CONST VOID *SourceBuffer, + IN UINTN Length ); /** @@ -53,9 +53,9 @@ InternalMemCopyMem ( VOID * EFIAPI InternalMemSetMem ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT8 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT8 Value ); /** @@ -71,9 +71,9 @@ InternalMemSetMem ( VOID * EFIAPI InternalMemSetMem16 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT16 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT16 Value ); /** @@ -89,9 +89,9 @@ InternalMemSetMem16 ( VOID * EFIAPI InternalMemSetMem32 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT32 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT32 Value ); /** @@ -107,9 +107,9 @@ InternalMemSetMem32 ( VOID * EFIAPI InternalMemSetMem64 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT64 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT64 Value ); /** @@ -124,8 +124,8 @@ InternalMemSetMem64 ( VOID * EFIAPI InternalMemZeroMem ( - OUT VOID *Buffer, - IN UINTN Length + OUT VOID *Buffer, + IN UINTN Length ); /** @@ -144,9 +144,9 @@ InternalMemZeroMem ( INTN EFIAPI InternalMemCompareMem ( - IN CONST VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length + IN CONST VOID *DestinationBuffer, + IN CONST VOID *SourceBuffer, + IN UINTN Length ); /** @@ -163,9 +163,9 @@ InternalMemCompareMem ( CONST VOID * EFIAPI InternalMemScanMem8 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT8 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT8 Value ); /** @@ -182,9 +182,9 @@ InternalMemScanMem8 ( CONST VOID * EFIAPI InternalMemScanMem16 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT16 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT16 Value ); /** @@ -201,9 +201,9 @@ InternalMemScanMem16 ( CONST VOID * EFIAPI InternalMemScanMem32 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT32 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT32 Value ); /** @@ -220,9 +220,9 @@ InternalMemScanMem32 ( CONST VOID * EFIAPI InternalMemScanMem64 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT64 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT64 Value ); /** diff --git a/MdePkg/Library/BaseMemoryLib/ScanMem16Wrapper.c b/MdePkg/Library/BaseMemoryLib/ScanMem16Wrapper.c index 8201313..7eeb1a4 100644 --- a/MdePkg/Library/BaseMemoryLib/ScanMem16Wrapper.c +++ b/MdePkg/Library/BaseMemoryLib/ScanMem16Wrapper.c @@ -57,5 +57,5 @@ ScanMem16 ( ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (Value) - 1)) == 0); - return (VOID*)InternalMemScanMem16 (Buffer, Length / sizeof (Value), Value); + return (VOID *)InternalMemScanMem16 (Buffer, Length / sizeof (Value), Value); } diff --git a/MdePkg/Library/BaseMemoryLib/ScanMem32Wrapper.c b/MdePkg/Library/BaseMemoryLib/ScanMem32Wrapper.c index 22c0c79..bdcee0e 100644 --- a/MdePkg/Library/BaseMemoryLib/ScanMem32Wrapper.c +++ b/MdePkg/Library/BaseMemoryLib/ScanMem32Wrapper.c @@ -56,5 +56,5 @@ ScanMem32 ( ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (Value) - 1)) == 0); - return (VOID*)InternalMemScanMem32 (Buffer, Length / sizeof (Value), Value); + return (VOID *)InternalMemScanMem32 (Buffer, Length / sizeof (Value), Value); } diff --git a/MdePkg/Library/BaseMemoryLib/ScanMem64Wrapper.c b/MdePkg/Library/BaseMemoryLib/ScanMem64Wrapper.c index a617d87..eb75390 100644 --- a/MdePkg/Library/BaseMemoryLib/ScanMem64Wrapper.c +++ b/MdePkg/Library/BaseMemoryLib/ScanMem64Wrapper.c @@ -57,5 +57,5 @@ ScanMem64 ( ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (Value) - 1)) == 0); - return (VOID*)InternalMemScanMem64 (Buffer, Length / sizeof (Value), Value); + return (VOID *)InternalMemScanMem64 (Buffer, Length / sizeof (Value), Value); } diff --git a/MdePkg/Library/BaseMemoryLib/ScanMem8Wrapper.c b/MdePkg/Library/BaseMemoryLib/ScanMem8Wrapper.c index fb2c5a4..f54e533 100644 --- a/MdePkg/Library/BaseMemoryLib/ScanMem8Wrapper.c +++ b/MdePkg/Library/BaseMemoryLib/ScanMem8Wrapper.c @@ -49,10 +49,11 @@ ScanMem8 ( if (Length == 0) { return NULL; } + ASSERT (Buffer != NULL); ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); - return (VOID*)InternalMemScanMem8 (Buffer, Length, Value); + return (VOID *)InternalMemScanMem8 (Buffer, Length, Value); } /** @@ -90,4 +91,3 @@ ScanMemN ( return ScanMem32 (Buffer, Length, (UINT32)Value); } } - diff --git a/MdePkg/Library/BaseMemoryLib/SetMem.c b/MdePkg/Library/BaseMemoryLib/SetMem.c index d42abb1..c079d75 100644 --- a/MdePkg/Library/BaseMemoryLib/SetMem.c +++ b/MdePkg/Library/BaseMemoryLib/SetMem.c @@ -12,9 +12,6 @@ **/ - - - #include "MemLibInternals.h" /** @@ -30,9 +27,9 @@ VOID * EFIAPI InternalMemSetMem ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT8 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT8 Value ) { // @@ -40,42 +37,44 @@ InternalMemSetMem ( // volatile to prevent the optimizer from replacing this function with // the intrinsic memset() // - volatile UINT8 *Pointer8; - volatile UINT32 *Pointer32; - volatile UINT64 *Pointer64; - UINT32 Value32; - UINT64 Value64; + volatile UINT8 *Pointer8; + volatile UINT32 *Pointer32; + volatile UINT64 *Pointer64; + UINT32 Value32; + UINT64 Value64; if ((((UINTN)Buffer & 0x7) == 0) && (Length >= 8)) { // Generate the 64bit value Value32 = (Value << 24) | (Value << 16) | (Value << 8) | Value; Value64 = LShiftU64 (Value32, 32) | Value32; - Pointer64 = (UINT64*)Buffer; + Pointer64 = (UINT64 *)Buffer; while (Length >= 8) { *(Pointer64++) = Value64; - Length -= 8; + Length -= 8; } // Finish with bytes if needed - Pointer8 = (UINT8*)Pointer64; + Pointer8 = (UINT8 *)Pointer64; } else if ((((UINTN)Buffer & 0x3) == 0) && (Length >= 4)) { // Generate the 32bit value Value32 = (Value << 24) | (Value << 16) | (Value << 8) | Value; - Pointer32 = (UINT32*)Buffer; + Pointer32 = (UINT32 *)Buffer; while (Length >= 4) { *(Pointer32++) = Value32; - Length -= 4; + Length -= 4; } // Finish with bytes if needed - Pointer8 = (UINT8*)Pointer32; + Pointer8 = (UINT8 *)Pointer32; } else { - Pointer8 = (UINT8*)Buffer; + Pointer8 = (UINT8 *)Buffer; } + while (Length-- > 0) { *(Pointer8++) = Value; } + return Buffer; } diff --git a/MdePkg/Library/BaseMemoryLibMmx/CompareMemWrapper.c b/MdePkg/Library/BaseMemoryLibMmx/CompareMemWrapper.c index 6c539a6..5b65a1d 100644 --- a/MdePkg/Library/BaseMemoryLibMmx/CompareMemWrapper.c +++ b/MdePkg/Library/BaseMemoryLibMmx/CompareMemWrapper.c @@ -48,9 +48,10 @@ CompareMem ( IN UINTN Length ) { - if (Length == 0 || DestinationBuffer == SourceBuffer) { + if ((Length == 0) || (DestinationBuffer == SourceBuffer)) { return 0; } + ASSERT (DestinationBuffer != NULL); ASSERT (SourceBuffer != NULL); ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer)); diff --git a/MdePkg/Library/BaseMemoryLibMmx/CopyMemWrapper.c b/MdePkg/Library/BaseMemoryLibMmx/CopyMemWrapper.c index 438abf4..dc48904 100644 --- a/MdePkg/Library/BaseMemoryLibMmx/CopyMemWrapper.c +++ b/MdePkg/Library/BaseMemoryLibMmx/CopyMemWrapper.c @@ -47,11 +47,13 @@ CopyMem ( if (Length == 0) { return DestinationBuffer; } + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer)); ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)SourceBuffer)); if (DestinationBuffer == SourceBuffer) { return DestinationBuffer; } + return InternalMemCopyMem (DestinationBuffer, SourceBuffer, Length); } diff --git a/MdePkg/Library/BaseMemoryLibMmx/MemLibGuid.c b/MdePkg/Library/BaseMemoryLibMmx/MemLibGuid.c index 319487d..9ded5ca 100644 --- a/MdePkg/Library/BaseMemoryLibMmx/MemLibGuid.c +++ b/MdePkg/Library/BaseMemoryLibMmx/MemLibGuid.c @@ -42,12 +42,12 @@ CopyGuid ( ) { WriteUnaligned64 ( - (UINT64*)DestinationGuid, - ReadUnaligned64 ((CONST UINT64*)SourceGuid) + (UINT64 *)DestinationGuid, + ReadUnaligned64 ((CONST UINT64 *)SourceGuid) ); WriteUnaligned64 ( - (UINT64*)DestinationGuid + 1, - ReadUnaligned64 ((CONST UINT64*)SourceGuid + 1) + (UINT64 *)DestinationGuid + 1, + ReadUnaligned64 ((CONST UINT64 *)SourceGuid + 1) ); return DestinationGuid; } @@ -80,12 +80,12 @@ CompareGuid ( UINT64 HighPartOfGuid1; UINT64 HighPartOfGuid2; - LowPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1); - LowPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2); - HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1 + 1); - HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2 + 1); + LowPartOfGuid1 = ReadUnaligned64 ((CONST UINT64 *)Guid1); + LowPartOfGuid2 = ReadUnaligned64 ((CONST UINT64 *)Guid2); + HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64 *)Guid1 + 1); + HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64 *)Guid2 + 1); - return (BOOLEAN) (LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2); + return (BOOLEAN)(LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2); } /** @@ -118,20 +118,22 @@ ScanGuid ( IN CONST GUID *Guid ) { - CONST GUID *GuidPtr; + CONST GUID *GuidPtr; ASSERT (((UINTN)Buffer & (sizeof (Guid->Data1) - 1)) == 0); ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1)); ASSERT ((Length & (sizeof (*GuidPtr) - 1)) == 0); - GuidPtr = (GUID*)Buffer; + GuidPtr = (GUID *)Buffer; Buffer = GuidPtr + Length / sizeof (*GuidPtr); - while (GuidPtr < (CONST GUID*)Buffer) { + while (GuidPtr < (CONST GUID *)Buffer) { if (CompareGuid (GuidPtr, Guid)) { - return (VOID*)GuidPtr; + return (VOID *)GuidPtr; } + GuidPtr++; } + return NULL; } @@ -158,8 +160,8 @@ IsZeroGuid ( UINT64 LowPartOfGuid; UINT64 HighPartOfGuid; - LowPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid); - HighPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid + 1); + LowPartOfGuid = ReadUnaligned64 ((CONST UINT64 *)Guid); + HighPartOfGuid = ReadUnaligned64 ((CONST UINT64 *)Guid + 1); - return (BOOLEAN) (LowPartOfGuid == 0 && HighPartOfGuid == 0); + return (BOOLEAN)(LowPartOfGuid == 0 && HighPartOfGuid == 0); } diff --git a/MdePkg/Library/BaseMemoryLibMmx/MemLibInternals.h b/MdePkg/Library/BaseMemoryLibMmx/MemLibInternals.h index ae3dbaa..30745dd 100644 --- a/MdePkg/Library/BaseMemoryLibMmx/MemLibInternals.h +++ b/MdePkg/Library/BaseMemoryLibMmx/MemLibInternals.h @@ -35,9 +35,9 @@ VOID * EFIAPI InternalMemCopyMem ( - OUT VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length + OUT VOID *DestinationBuffer, + IN CONST VOID *SourceBuffer, + IN UINTN Length ); /** @@ -53,9 +53,9 @@ InternalMemCopyMem ( VOID * EFIAPI InternalMemSetMem ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT8 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT8 Value ); /** @@ -71,9 +71,9 @@ InternalMemSetMem ( VOID * EFIAPI InternalMemSetMem16 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT16 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT16 Value ); /** @@ -89,9 +89,9 @@ InternalMemSetMem16 ( VOID * EFIAPI InternalMemSetMem32 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT32 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT32 Value ); /** @@ -107,9 +107,9 @@ InternalMemSetMem32 ( VOID * EFIAPI InternalMemSetMem64 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT64 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT64 Value ); /** @@ -124,8 +124,8 @@ InternalMemSetMem64 ( VOID * EFIAPI InternalMemZeroMem ( - OUT VOID *Buffer, - IN UINTN Length + OUT VOID *Buffer, + IN UINTN Length ); /** @@ -144,9 +144,9 @@ InternalMemZeroMem ( INTN EFIAPI InternalMemCompareMem ( - IN CONST VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length + IN CONST VOID *DestinationBuffer, + IN CONST VOID *SourceBuffer, + IN UINTN Length ); /** @@ -163,9 +163,9 @@ InternalMemCompareMem ( CONST VOID * EFIAPI InternalMemScanMem8 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT8 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT8 Value ); /** @@ -182,9 +182,9 @@ InternalMemScanMem8 ( CONST VOID * EFIAPI InternalMemScanMem16 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT16 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT16 Value ); /** @@ -201,9 +201,9 @@ InternalMemScanMem16 ( CONST VOID * EFIAPI InternalMemScanMem32 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT32 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT32 Value ); /** @@ -220,9 +220,9 @@ InternalMemScanMem32 ( CONST VOID * EFIAPI InternalMemScanMem64 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT64 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT64 Value ); /** diff --git a/MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c index 8201313..7eeb1a4 100644 --- a/MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibMmx/ScanMem16Wrapper.c @@ -57,5 +57,5 @@ ScanMem16 ( ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (Value) - 1)) == 0); - return (VOID*)InternalMemScanMem16 (Buffer, Length / sizeof (Value), Value); + return (VOID *)InternalMemScanMem16 (Buffer, Length / sizeof (Value), Value); } diff --git a/MdePkg/Library/BaseMemoryLibMmx/ScanMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibMmx/ScanMem32Wrapper.c index 7b66ccd..9916265 100644 --- a/MdePkg/Library/BaseMemoryLibMmx/ScanMem32Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibMmx/ScanMem32Wrapper.c @@ -56,5 +56,5 @@ ScanMem32 ( ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (Value) - 1)) == 0); - return (VOID*)InternalMemScanMem32 (Buffer, Length / sizeof (Value), Value); + return (VOID *)InternalMemScanMem32 (Buffer, Length / sizeof (Value), Value); } diff --git a/MdePkg/Library/BaseMemoryLibMmx/ScanMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibMmx/ScanMem64Wrapper.c index a617d87..eb75390 100644 --- a/MdePkg/Library/BaseMemoryLibMmx/ScanMem64Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibMmx/ScanMem64Wrapper.c @@ -57,5 +57,5 @@ ScanMem64 ( ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (Value) - 1)) == 0); - return (VOID*)InternalMemScanMem64 (Buffer, Length / sizeof (Value), Value); + return (VOID *)InternalMemScanMem64 (Buffer, Length / sizeof (Value), Value); } diff --git a/MdePkg/Library/BaseMemoryLibMmx/ScanMem8Wrapper.c b/MdePkg/Library/BaseMemoryLibMmx/ScanMem8Wrapper.c index f2bf7d6..aa0de64 100644 --- a/MdePkg/Library/BaseMemoryLibMmx/ScanMem8Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibMmx/ScanMem8Wrapper.c @@ -49,10 +49,11 @@ ScanMem8 ( if (Length == 0) { return NULL; } + ASSERT (Buffer != NULL); ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); - return (VOID*)InternalMemScanMem8 (Buffer, Length, Value); + return (VOID *)InternalMemScanMem8 (Buffer, Length, Value); } /** @@ -90,4 +91,3 @@ ScanMemN ( return ScanMem32 (Buffer, Length, (UINT32)Value); } } - diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/MemLibGuid.c b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/MemLibGuid.c index f27b95c..32d30cb 100644 --- a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/MemLibGuid.c +++ b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/MemLibGuid.c @@ -116,20 +116,22 @@ ScanGuid ( IN CONST GUID *Guid ) { - CONST GUID *GuidPtr; + CONST GUID *GuidPtr; ASSERT (((UINTN)Buffer & (sizeof (Guid->Data1) - 1)) == 0); ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1)); ASSERT ((Length & (sizeof (*GuidPtr) - 1)) == 0); - GuidPtr = (GUID*)Buffer; + GuidPtr = (GUID *)Buffer; Buffer = GuidPtr + Length / sizeof (*GuidPtr); - while (GuidPtr < (CONST GUID*)Buffer) { + while (GuidPtr < (CONST GUID *)Buffer) { if (InternalMemCompareGuid (GuidPtr, Guid)) { - return (VOID*)GuidPtr; + return (VOID *)GuidPtr; } + GuidPtr++; } + return NULL; } diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMemGeneric.c b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMemGeneric.c index e0b4f27..173782e 100644 --- a/MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMemGeneric.c +++ b/MdePkg/Library/BaseMemoryLibOptDxe/Arm/ScanMemGeneric.c @@ -27,20 +27,22 @@ CONST VOID * EFIAPI InternalMemScanMem16 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT16 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT16 Value ) { - CONST UINT16 *Pointer; + CONST UINT16 *Pointer; - Pointer = (CONST UINT16*)Buffer; + Pointer = (CONST UINT16 *)Buffer; do { if (*Pointer == Value) { return Pointer; } + ++Pointer; } while (--Length != 0); + return NULL; } @@ -58,20 +60,22 @@ InternalMemScanMem16 ( CONST VOID * EFIAPI InternalMemScanMem32 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT32 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT32 Value ) { - CONST UINT32 *Pointer; + CONST UINT32 *Pointer; - Pointer = (CONST UINT32*)Buffer; + Pointer = (CONST UINT32 *)Buffer; do { if (*Pointer == Value) { return Pointer; } + ++Pointer; } while (--Length != 0); + return NULL; } @@ -89,20 +93,22 @@ InternalMemScanMem32 ( CONST VOID * EFIAPI InternalMemScanMem64 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT64 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT64 Value ) { - CONST UINT64 *Pointer; + CONST UINT64 *Pointer; - Pointer = (CONST UINT64*)Buffer; + Pointer = (CONST UINT64 *)Buffer; do { if (*Pointer == Value) { return Pointer; } + ++Pointer; } while (--Length != 0); + return NULL; } @@ -123,8 +129,8 @@ InternalMemIsZeroBuffer ( IN UINTN Length ) { - CONST UINT8 *BufferData; - UINTN Index; + CONST UINT8 *BufferData; + UINTN Index; BufferData = Buffer; for (Index = 0; Index < Length; Index++) { @@ -132,5 +138,6 @@ InternalMemIsZeroBuffer ( return FALSE; } } + return TRUE; } diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/CompareMemWrapper.c b/MdePkg/Library/BaseMemoryLibOptDxe/CompareMemWrapper.c index 6c539a6..5b65a1d 100644 --- a/MdePkg/Library/BaseMemoryLibOptDxe/CompareMemWrapper.c +++ b/MdePkg/Library/BaseMemoryLibOptDxe/CompareMemWrapper.c @@ -48,9 +48,10 @@ CompareMem ( IN UINTN Length ) { - if (Length == 0 || DestinationBuffer == SourceBuffer) { + if ((Length == 0) || (DestinationBuffer == SourceBuffer)) { return 0; } + ASSERT (DestinationBuffer != NULL); ASSERT (SourceBuffer != NULL); ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer)); diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/CopyMemWrapper.c b/MdePkg/Library/BaseMemoryLibOptDxe/CopyMemWrapper.c index 438abf4..dc48904 100644 --- a/MdePkg/Library/BaseMemoryLibOptDxe/CopyMemWrapper.c +++ b/MdePkg/Library/BaseMemoryLibOptDxe/CopyMemWrapper.c @@ -47,11 +47,13 @@ CopyMem ( if (Length == 0) { return DestinationBuffer; } + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer)); ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)SourceBuffer)); if (DestinationBuffer == SourceBuffer) { return DestinationBuffer; } + return InternalMemCopyMem (DestinationBuffer, SourceBuffer, Length); } diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/MemLibGuid.c b/MdePkg/Library/BaseMemoryLibOptDxe/MemLibGuid.c index 319487d..9ded5ca 100644 --- a/MdePkg/Library/BaseMemoryLibOptDxe/MemLibGuid.c +++ b/MdePkg/Library/BaseMemoryLibOptDxe/MemLibGuid.c @@ -42,12 +42,12 @@ CopyGuid ( ) { WriteUnaligned64 ( - (UINT64*)DestinationGuid, - ReadUnaligned64 ((CONST UINT64*)SourceGuid) + (UINT64 *)DestinationGuid, + ReadUnaligned64 ((CONST UINT64 *)SourceGuid) ); WriteUnaligned64 ( - (UINT64*)DestinationGuid + 1, - ReadUnaligned64 ((CONST UINT64*)SourceGuid + 1) + (UINT64 *)DestinationGuid + 1, + ReadUnaligned64 ((CONST UINT64 *)SourceGuid + 1) ); return DestinationGuid; } @@ -80,12 +80,12 @@ CompareGuid ( UINT64 HighPartOfGuid1; UINT64 HighPartOfGuid2; - LowPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1); - LowPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2); - HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1 + 1); - HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2 + 1); + LowPartOfGuid1 = ReadUnaligned64 ((CONST UINT64 *)Guid1); + LowPartOfGuid2 = ReadUnaligned64 ((CONST UINT64 *)Guid2); + HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64 *)Guid1 + 1); + HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64 *)Guid2 + 1); - return (BOOLEAN) (LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2); + return (BOOLEAN)(LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2); } /** @@ -118,20 +118,22 @@ ScanGuid ( IN CONST GUID *Guid ) { - CONST GUID *GuidPtr; + CONST GUID *GuidPtr; ASSERT (((UINTN)Buffer & (sizeof (Guid->Data1) - 1)) == 0); ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1)); ASSERT ((Length & (sizeof (*GuidPtr) - 1)) == 0); - GuidPtr = (GUID*)Buffer; + GuidPtr = (GUID *)Buffer; Buffer = GuidPtr + Length / sizeof (*GuidPtr); - while (GuidPtr < (CONST GUID*)Buffer) { + while (GuidPtr < (CONST GUID *)Buffer) { if (CompareGuid (GuidPtr, Guid)) { - return (VOID*)GuidPtr; + return (VOID *)GuidPtr; } + GuidPtr++; } + return NULL; } @@ -158,8 +160,8 @@ IsZeroGuid ( UINT64 LowPartOfGuid; UINT64 HighPartOfGuid; - LowPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid); - HighPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid + 1); + LowPartOfGuid = ReadUnaligned64 ((CONST UINT64 *)Guid); + HighPartOfGuid = ReadUnaligned64 ((CONST UINT64 *)Guid + 1); - return (BOOLEAN) (LowPartOfGuid == 0 && HighPartOfGuid == 0); + return (BOOLEAN)(LowPartOfGuid == 0 && HighPartOfGuid == 0); } diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/MemLibInternals.h b/MdePkg/Library/BaseMemoryLibOptDxe/MemLibInternals.h index bbd8b63..0c8424c 100644 --- a/MdePkg/Library/BaseMemoryLibOptDxe/MemLibInternals.h +++ b/MdePkg/Library/BaseMemoryLibOptDxe/MemLibInternals.h @@ -35,9 +35,9 @@ VOID * EFIAPI InternalMemCopyMem ( - OUT VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length + OUT VOID *DestinationBuffer, + IN CONST VOID *SourceBuffer, + IN UINTN Length ); /** @@ -53,9 +53,9 @@ InternalMemCopyMem ( VOID * EFIAPI InternalMemSetMem ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT8 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT8 Value ); /** @@ -71,9 +71,9 @@ InternalMemSetMem ( VOID * EFIAPI InternalMemSetMem16 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT16 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT16 Value ); /** @@ -89,9 +89,9 @@ InternalMemSetMem16 ( VOID * EFIAPI InternalMemSetMem32 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT32 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT32 Value ); /** @@ -107,9 +107,9 @@ InternalMemSetMem32 ( VOID * EFIAPI InternalMemSetMem64 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT64 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT64 Value ); /** @@ -124,8 +124,8 @@ InternalMemSetMem64 ( VOID * EFIAPI InternalMemZeroMem ( - OUT VOID *Buffer, - IN UINTN Length + OUT VOID *Buffer, + IN UINTN Length ); /** @@ -144,9 +144,9 @@ InternalMemZeroMem ( INTN EFIAPI InternalMemCompareMem ( - IN CONST VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length + IN CONST VOID *DestinationBuffer, + IN CONST VOID *SourceBuffer, + IN UINTN Length ); /** @@ -163,9 +163,9 @@ InternalMemCompareMem ( CONST VOID * EFIAPI InternalMemScanMem8 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT8 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT8 Value ); /** @@ -182,9 +182,9 @@ InternalMemScanMem8 ( CONST VOID * EFIAPI InternalMemScanMem16 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT16 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT16 Value ); /** @@ -201,9 +201,9 @@ InternalMemScanMem16 ( CONST VOID * EFIAPI InternalMemScanMem32 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT32 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT32 Value ); /** @@ -220,9 +220,9 @@ InternalMemScanMem32 ( CONST VOID * EFIAPI InternalMemScanMem64 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT64 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT64 Value ); /** diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem16Wrapper.c index 8201313..7eeb1a4 100644 --- a/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem16Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem16Wrapper.c @@ -57,5 +57,5 @@ ScanMem16 ( ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (Value) - 1)) == 0); - return (VOID*)InternalMemScanMem16 (Buffer, Length / sizeof (Value), Value); + return (VOID *)InternalMemScanMem16 (Buffer, Length / sizeof (Value), Value); } diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem32Wrapper.c index 22c0c79..bdcee0e 100644 --- a/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem32Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem32Wrapper.c @@ -56,5 +56,5 @@ ScanMem32 ( ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (Value) - 1)) == 0); - return (VOID*)InternalMemScanMem32 (Buffer, Length / sizeof (Value), Value); + return (VOID *)InternalMemScanMem32 (Buffer, Length / sizeof (Value), Value); } diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem64Wrapper.c index a617d87..eb75390 100644 --- a/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem64Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem64Wrapper.c @@ -57,5 +57,5 @@ ScanMem64 ( ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (Value) - 1)) == 0); - return (VOID*)InternalMemScanMem64 (Buffer, Length / sizeof (Value), Value); + return (VOID *)InternalMemScanMem64 (Buffer, Length / sizeof (Value), Value); } diff --git a/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem8Wrapper.c b/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem8Wrapper.c index 6df99e2..c4b58cd 100644 --- a/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem8Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibOptDxe/ScanMem8Wrapper.c @@ -49,10 +49,11 @@ ScanMem8 ( if (Length == 0) { return NULL; } + ASSERT (Buffer != NULL); ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); - return (VOID*)InternalMemScanMem8 (Buffer, Length, Value); + return (VOID *)InternalMemScanMem8 (Buffer, Length, Value); } /** @@ -91,4 +92,3 @@ ScanMemN ( return ScanMem32 (Buffer, Length, (UINT32)Value); } } - diff --git a/MdePkg/Library/BaseMemoryLibOptPei/CompareMemWrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/CompareMemWrapper.c index 6c539a6..5b65a1d 100644 --- a/MdePkg/Library/BaseMemoryLibOptPei/CompareMemWrapper.c +++ b/MdePkg/Library/BaseMemoryLibOptPei/CompareMemWrapper.c @@ -48,9 +48,10 @@ CompareMem ( IN UINTN Length ) { - if (Length == 0 || DestinationBuffer == SourceBuffer) { + if ((Length == 0) || (DestinationBuffer == SourceBuffer)) { return 0; } + ASSERT (DestinationBuffer != NULL); ASSERT (SourceBuffer != NULL); ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer)); diff --git a/MdePkg/Library/BaseMemoryLibOptPei/CopyMemWrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/CopyMemWrapper.c index 438abf4..dc48904 100644 --- a/MdePkg/Library/BaseMemoryLibOptPei/CopyMemWrapper.c +++ b/MdePkg/Library/BaseMemoryLibOptPei/CopyMemWrapper.c @@ -47,11 +47,13 @@ CopyMem ( if (Length == 0) { return DestinationBuffer; } + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer)); ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)SourceBuffer)); if (DestinationBuffer == SourceBuffer) { return DestinationBuffer; } + return InternalMemCopyMem (DestinationBuffer, SourceBuffer, Length); } diff --git a/MdePkg/Library/BaseMemoryLibOptPei/MemLibGuid.c b/MdePkg/Library/BaseMemoryLibOptPei/MemLibGuid.c index 319487d..9ded5ca 100644 --- a/MdePkg/Library/BaseMemoryLibOptPei/MemLibGuid.c +++ b/MdePkg/Library/BaseMemoryLibOptPei/MemLibGuid.c @@ -42,12 +42,12 @@ CopyGuid ( ) { WriteUnaligned64 ( - (UINT64*)DestinationGuid, - ReadUnaligned64 ((CONST UINT64*)SourceGuid) + (UINT64 *)DestinationGuid, + ReadUnaligned64 ((CONST UINT64 *)SourceGuid) ); WriteUnaligned64 ( - (UINT64*)DestinationGuid + 1, - ReadUnaligned64 ((CONST UINT64*)SourceGuid + 1) + (UINT64 *)DestinationGuid + 1, + ReadUnaligned64 ((CONST UINT64 *)SourceGuid + 1) ); return DestinationGuid; } @@ -80,12 +80,12 @@ CompareGuid ( UINT64 HighPartOfGuid1; UINT64 HighPartOfGuid2; - LowPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1); - LowPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2); - HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1 + 1); - HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2 + 1); + LowPartOfGuid1 = ReadUnaligned64 ((CONST UINT64 *)Guid1); + LowPartOfGuid2 = ReadUnaligned64 ((CONST UINT64 *)Guid2); + HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64 *)Guid1 + 1); + HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64 *)Guid2 + 1); - return (BOOLEAN) (LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2); + return (BOOLEAN)(LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2); } /** @@ -118,20 +118,22 @@ ScanGuid ( IN CONST GUID *Guid ) { - CONST GUID *GuidPtr; + CONST GUID *GuidPtr; ASSERT (((UINTN)Buffer & (sizeof (Guid->Data1) - 1)) == 0); ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1)); ASSERT ((Length & (sizeof (*GuidPtr) - 1)) == 0); - GuidPtr = (GUID*)Buffer; + GuidPtr = (GUID *)Buffer; Buffer = GuidPtr + Length / sizeof (*GuidPtr); - while (GuidPtr < (CONST GUID*)Buffer) { + while (GuidPtr < (CONST GUID *)Buffer) { if (CompareGuid (GuidPtr, Guid)) { - return (VOID*)GuidPtr; + return (VOID *)GuidPtr; } + GuidPtr++; } + return NULL; } @@ -158,8 +160,8 @@ IsZeroGuid ( UINT64 LowPartOfGuid; UINT64 HighPartOfGuid; - LowPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid); - HighPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid + 1); + LowPartOfGuid = ReadUnaligned64 ((CONST UINT64 *)Guid); + HighPartOfGuid = ReadUnaligned64 ((CONST UINT64 *)Guid + 1); - return (BOOLEAN) (LowPartOfGuid == 0 && HighPartOfGuid == 0); + return (BOOLEAN)(LowPartOfGuid == 0 && HighPartOfGuid == 0); } diff --git a/MdePkg/Library/BaseMemoryLibOptPei/MemLibInternals.h b/MdePkg/Library/BaseMemoryLibOptPei/MemLibInternals.h index 68cd316..3ecbae9 100644 --- a/MdePkg/Library/BaseMemoryLibOptPei/MemLibInternals.h +++ b/MdePkg/Library/BaseMemoryLibOptPei/MemLibInternals.h @@ -35,9 +35,9 @@ VOID * EFIAPI InternalMemCopyMem ( - OUT VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length + OUT VOID *DestinationBuffer, + IN CONST VOID *SourceBuffer, + IN UINTN Length ); /** @@ -53,9 +53,9 @@ InternalMemCopyMem ( VOID * EFIAPI InternalMemSetMem ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT8 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT8 Value ); /** @@ -71,9 +71,9 @@ InternalMemSetMem ( VOID * EFIAPI InternalMemSetMem16 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT16 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT16 Value ); /** @@ -89,9 +89,9 @@ InternalMemSetMem16 ( VOID * EFIAPI InternalMemSetMem32 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT32 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT32 Value ); /** @@ -107,9 +107,9 @@ InternalMemSetMem32 ( VOID * EFIAPI InternalMemSetMem64 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT64 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT64 Value ); /** @@ -124,8 +124,8 @@ InternalMemSetMem64 ( VOID * EFIAPI InternalMemZeroMem ( - OUT VOID *Buffer, - IN UINTN Length + OUT VOID *Buffer, + IN UINTN Length ); /** @@ -144,9 +144,9 @@ InternalMemZeroMem ( INTN EFIAPI InternalMemCompareMem ( - IN CONST VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length + IN CONST VOID *DestinationBuffer, + IN CONST VOID *SourceBuffer, + IN UINTN Length ); /** @@ -163,9 +163,9 @@ InternalMemCompareMem ( CONST VOID * EFIAPI InternalMemScanMem8 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT8 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT8 Value ); /** @@ -182,9 +182,9 @@ InternalMemScanMem8 ( CONST VOID * EFIAPI InternalMemScanMem16 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT16 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT16 Value ); /** @@ -201,9 +201,9 @@ InternalMemScanMem16 ( CONST VOID * EFIAPI InternalMemScanMem32 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT32 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT32 Value ); /** @@ -220,9 +220,9 @@ InternalMemScanMem32 ( CONST VOID * EFIAPI InternalMemScanMem64 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT64 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT64 Value ); /** diff --git a/MdePkg/Library/BaseMemoryLibOptPei/ScanMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/ScanMem16Wrapper.c index 8201313..7eeb1a4 100644 --- a/MdePkg/Library/BaseMemoryLibOptPei/ScanMem16Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibOptPei/ScanMem16Wrapper.c @@ -57,5 +57,5 @@ ScanMem16 ( ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (Value) - 1)) == 0); - return (VOID*)InternalMemScanMem16 (Buffer, Length / sizeof (Value), Value); + return (VOID *)InternalMemScanMem16 (Buffer, Length / sizeof (Value), Value); } diff --git a/MdePkg/Library/BaseMemoryLibOptPei/ScanMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/ScanMem32Wrapper.c index 22c0c79..bdcee0e 100644 --- a/MdePkg/Library/BaseMemoryLibOptPei/ScanMem32Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibOptPei/ScanMem32Wrapper.c @@ -56,5 +56,5 @@ ScanMem32 ( ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (Value) - 1)) == 0); - return (VOID*)InternalMemScanMem32 (Buffer, Length / sizeof (Value), Value); + return (VOID *)InternalMemScanMem32 (Buffer, Length / sizeof (Value), Value); } diff --git a/MdePkg/Library/BaseMemoryLibOptPei/ScanMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/ScanMem64Wrapper.c index a617d87..eb75390 100644 --- a/MdePkg/Library/BaseMemoryLibOptPei/ScanMem64Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibOptPei/ScanMem64Wrapper.c @@ -57,5 +57,5 @@ ScanMem64 ( ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (Value) - 1)) == 0); - return (VOID*)InternalMemScanMem64 (Buffer, Length / sizeof (Value), Value); + return (VOID *)InternalMemScanMem64 (Buffer, Length / sizeof (Value), Value); } diff --git a/MdePkg/Library/BaseMemoryLibOptPei/ScanMem8Wrapper.c b/MdePkg/Library/BaseMemoryLibOptPei/ScanMem8Wrapper.c index f2bf7d6..aa0de64 100644 --- a/MdePkg/Library/BaseMemoryLibOptPei/ScanMem8Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibOptPei/ScanMem8Wrapper.c @@ -49,10 +49,11 @@ ScanMem8 ( if (Length == 0) { return NULL; } + ASSERT (Buffer != NULL); ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); - return (VOID*)InternalMemScanMem8 (Buffer, Length, Value); + return (VOID *)InternalMemScanMem8 (Buffer, Length, Value); } /** @@ -90,4 +91,3 @@ ScanMemN ( return ScanMem32 (Buffer, Length, (UINT32)Value); } } - diff --git a/MdePkg/Library/BaseMemoryLibRepStr/CompareMemWrapper.c b/MdePkg/Library/BaseMemoryLibRepStr/CompareMemWrapper.c index 6c539a6..5b65a1d 100644 --- a/MdePkg/Library/BaseMemoryLibRepStr/CompareMemWrapper.c +++ b/MdePkg/Library/BaseMemoryLibRepStr/CompareMemWrapper.c @@ -48,9 +48,10 @@ CompareMem ( IN UINTN Length ) { - if (Length == 0 || DestinationBuffer == SourceBuffer) { + if ((Length == 0) || (DestinationBuffer == SourceBuffer)) { return 0; } + ASSERT (DestinationBuffer != NULL); ASSERT (SourceBuffer != NULL); ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer)); diff --git a/MdePkg/Library/BaseMemoryLibRepStr/CopyMemWrapper.c b/MdePkg/Library/BaseMemoryLibRepStr/CopyMemWrapper.c index 438abf4..dc48904 100644 --- a/MdePkg/Library/BaseMemoryLibRepStr/CopyMemWrapper.c +++ b/MdePkg/Library/BaseMemoryLibRepStr/CopyMemWrapper.c @@ -47,11 +47,13 @@ CopyMem ( if (Length == 0) { return DestinationBuffer; } + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer)); ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)SourceBuffer)); if (DestinationBuffer == SourceBuffer) { return DestinationBuffer; } + return InternalMemCopyMem (DestinationBuffer, SourceBuffer, Length); } diff --git a/MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c b/MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c index 319487d..9ded5ca 100644 --- a/MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c +++ b/MdePkg/Library/BaseMemoryLibRepStr/MemLibGuid.c @@ -42,12 +42,12 @@ CopyGuid ( ) { WriteUnaligned64 ( - (UINT64*)DestinationGuid, - ReadUnaligned64 ((CONST UINT64*)SourceGuid) + (UINT64 *)DestinationGuid, + ReadUnaligned64 ((CONST UINT64 *)SourceGuid) ); WriteUnaligned64 ( - (UINT64*)DestinationGuid + 1, - ReadUnaligned64 ((CONST UINT64*)SourceGuid + 1) + (UINT64 *)DestinationGuid + 1, + ReadUnaligned64 ((CONST UINT64 *)SourceGuid + 1) ); return DestinationGuid; } @@ -80,12 +80,12 @@ CompareGuid ( UINT64 HighPartOfGuid1; UINT64 HighPartOfGuid2; - LowPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1); - LowPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2); - HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1 + 1); - HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2 + 1); + LowPartOfGuid1 = ReadUnaligned64 ((CONST UINT64 *)Guid1); + LowPartOfGuid2 = ReadUnaligned64 ((CONST UINT64 *)Guid2); + HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64 *)Guid1 + 1); + HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64 *)Guid2 + 1); - return (BOOLEAN) (LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2); + return (BOOLEAN)(LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2); } /** @@ -118,20 +118,22 @@ ScanGuid ( IN CONST GUID *Guid ) { - CONST GUID *GuidPtr; + CONST GUID *GuidPtr; ASSERT (((UINTN)Buffer & (sizeof (Guid->Data1) - 1)) == 0); ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1)); ASSERT ((Length & (sizeof (*GuidPtr) - 1)) == 0); - GuidPtr = (GUID*)Buffer; + GuidPtr = (GUID *)Buffer; Buffer = GuidPtr + Length / sizeof (*GuidPtr); - while (GuidPtr < (CONST GUID*)Buffer) { + while (GuidPtr < (CONST GUID *)Buffer) { if (CompareGuid (GuidPtr, Guid)) { - return (VOID*)GuidPtr; + return (VOID *)GuidPtr; } + GuidPtr++; } + return NULL; } @@ -158,8 +160,8 @@ IsZeroGuid ( UINT64 LowPartOfGuid; UINT64 HighPartOfGuid; - LowPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid); - HighPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid + 1); + LowPartOfGuid = ReadUnaligned64 ((CONST UINT64 *)Guid); + HighPartOfGuid = ReadUnaligned64 ((CONST UINT64 *)Guid + 1); - return (BOOLEAN) (LowPartOfGuid == 0 && HighPartOfGuid == 0); + return (BOOLEAN)(LowPartOfGuid == 0 && HighPartOfGuid == 0); } diff --git a/MdePkg/Library/BaseMemoryLibRepStr/MemLibInternals.h b/MdePkg/Library/BaseMemoryLibRepStr/MemLibInternals.h index 5be42bc..f9784aa 100644 --- a/MdePkg/Library/BaseMemoryLibRepStr/MemLibInternals.h +++ b/MdePkg/Library/BaseMemoryLibRepStr/MemLibInternals.h @@ -35,9 +35,9 @@ VOID * EFIAPI InternalMemCopyMem ( - OUT VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length + OUT VOID *DestinationBuffer, + IN CONST VOID *SourceBuffer, + IN UINTN Length ); /** @@ -53,9 +53,9 @@ InternalMemCopyMem ( VOID * EFIAPI InternalMemSetMem ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT8 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT8 Value ); /** @@ -71,9 +71,9 @@ InternalMemSetMem ( VOID * EFIAPI InternalMemSetMem16 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT16 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT16 Value ); /** @@ -89,9 +89,9 @@ InternalMemSetMem16 ( VOID * EFIAPI InternalMemSetMem32 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT32 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT32 Value ); /** @@ -107,9 +107,9 @@ InternalMemSetMem32 ( VOID * EFIAPI InternalMemSetMem64 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT64 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT64 Value ); /** @@ -124,8 +124,8 @@ InternalMemSetMem64 ( VOID * EFIAPI InternalMemZeroMem ( - OUT VOID *Buffer, - IN UINTN Length + OUT VOID *Buffer, + IN UINTN Length ); /** @@ -144,9 +144,9 @@ InternalMemZeroMem ( INTN EFIAPI InternalMemCompareMem ( - IN CONST VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length + IN CONST VOID *DestinationBuffer, + IN CONST VOID *SourceBuffer, + IN UINTN Length ); /** @@ -163,9 +163,9 @@ InternalMemCompareMem ( CONST VOID * EFIAPI InternalMemScanMem8 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT8 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT8 Value ); /** @@ -182,9 +182,9 @@ InternalMemScanMem8 ( CONST VOID * EFIAPI InternalMemScanMem16 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT16 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT16 Value ); /** @@ -201,9 +201,9 @@ InternalMemScanMem16 ( CONST VOID * EFIAPI InternalMemScanMem32 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT32 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT32 Value ); /** @@ -220,9 +220,9 @@ InternalMemScanMem32 ( CONST VOID * EFIAPI InternalMemScanMem64 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT64 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT64 Value ); /** diff --git a/MdePkg/Library/BaseMemoryLibRepStr/ScanMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibRepStr/ScanMem16Wrapper.c index 8201313..7eeb1a4 100644 --- a/MdePkg/Library/BaseMemoryLibRepStr/ScanMem16Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibRepStr/ScanMem16Wrapper.c @@ -57,5 +57,5 @@ ScanMem16 ( ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (Value) - 1)) == 0); - return (VOID*)InternalMemScanMem16 (Buffer, Length / sizeof (Value), Value); + return (VOID *)InternalMemScanMem16 (Buffer, Length / sizeof (Value), Value); } diff --git a/MdePkg/Library/BaseMemoryLibRepStr/ScanMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibRepStr/ScanMem32Wrapper.c index 22c0c79..bdcee0e 100644 --- a/MdePkg/Library/BaseMemoryLibRepStr/ScanMem32Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibRepStr/ScanMem32Wrapper.c @@ -56,5 +56,5 @@ ScanMem32 ( ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (Value) - 1)) == 0); - return (VOID*)InternalMemScanMem32 (Buffer, Length / sizeof (Value), Value); + return (VOID *)InternalMemScanMem32 (Buffer, Length / sizeof (Value), Value); } diff --git a/MdePkg/Library/BaseMemoryLibRepStr/ScanMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibRepStr/ScanMem64Wrapper.c index a617d87..eb75390 100644 --- a/MdePkg/Library/BaseMemoryLibRepStr/ScanMem64Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibRepStr/ScanMem64Wrapper.c @@ -57,5 +57,5 @@ ScanMem64 ( ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (Value) - 1)) == 0); - return (VOID*)InternalMemScanMem64 (Buffer, Length / sizeof (Value), Value); + return (VOID *)InternalMemScanMem64 (Buffer, Length / sizeof (Value), Value); } diff --git a/MdePkg/Library/BaseMemoryLibRepStr/ScanMem8Wrapper.c b/MdePkg/Library/BaseMemoryLibRepStr/ScanMem8Wrapper.c index f2bf7d6..aa0de64 100644 --- a/MdePkg/Library/BaseMemoryLibRepStr/ScanMem8Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibRepStr/ScanMem8Wrapper.c @@ -49,10 +49,11 @@ ScanMem8 ( if (Length == 0) { return NULL; } + ASSERT (Buffer != NULL); ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); - return (VOID*)InternalMemScanMem8 (Buffer, Length, Value); + return (VOID *)InternalMemScanMem8 (Buffer, Length, Value); } /** @@ -90,4 +91,3 @@ ScanMemN ( return ScanMem32 (Buffer, Length, (UINT32)Value); } } - diff --git a/MdePkg/Library/BaseMemoryLibSse2/CompareMemWrapper.c b/MdePkg/Library/BaseMemoryLibSse2/CompareMemWrapper.c index 6c539a6..5b65a1d 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/CompareMemWrapper.c +++ b/MdePkg/Library/BaseMemoryLibSse2/CompareMemWrapper.c @@ -48,9 +48,10 @@ CompareMem ( IN UINTN Length ) { - if (Length == 0 || DestinationBuffer == SourceBuffer) { + if ((Length == 0) || (DestinationBuffer == SourceBuffer)) { return 0; } + ASSERT (DestinationBuffer != NULL); ASSERT (SourceBuffer != NULL); ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer)); diff --git a/MdePkg/Library/BaseMemoryLibSse2/CopyMemWrapper.c b/MdePkg/Library/BaseMemoryLibSse2/CopyMemWrapper.c index 438abf4..dc48904 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/CopyMemWrapper.c +++ b/MdePkg/Library/BaseMemoryLibSse2/CopyMemWrapper.c @@ -47,11 +47,13 @@ CopyMem ( if (Length == 0) { return DestinationBuffer; } + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer)); ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)SourceBuffer)); if (DestinationBuffer == SourceBuffer) { return DestinationBuffer; } + return InternalMemCopyMem (DestinationBuffer, SourceBuffer, Length); } diff --git a/MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c b/MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c index 319487d..9ded5ca 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c +++ b/MdePkg/Library/BaseMemoryLibSse2/MemLibGuid.c @@ -42,12 +42,12 @@ CopyGuid ( ) { WriteUnaligned64 ( - (UINT64*)DestinationGuid, - ReadUnaligned64 ((CONST UINT64*)SourceGuid) + (UINT64 *)DestinationGuid, + ReadUnaligned64 ((CONST UINT64 *)SourceGuid) ); WriteUnaligned64 ( - (UINT64*)DestinationGuid + 1, - ReadUnaligned64 ((CONST UINT64*)SourceGuid + 1) + (UINT64 *)DestinationGuid + 1, + ReadUnaligned64 ((CONST UINT64 *)SourceGuid + 1) ); return DestinationGuid; } @@ -80,12 +80,12 @@ CompareGuid ( UINT64 HighPartOfGuid1; UINT64 HighPartOfGuid2; - LowPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1); - LowPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2); - HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1 + 1); - HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2 + 1); + LowPartOfGuid1 = ReadUnaligned64 ((CONST UINT64 *)Guid1); + LowPartOfGuid2 = ReadUnaligned64 ((CONST UINT64 *)Guid2); + HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64 *)Guid1 + 1); + HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64 *)Guid2 + 1); - return (BOOLEAN) (LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2); + return (BOOLEAN)(LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2); } /** @@ -118,20 +118,22 @@ ScanGuid ( IN CONST GUID *Guid ) { - CONST GUID *GuidPtr; + CONST GUID *GuidPtr; ASSERT (((UINTN)Buffer & (sizeof (Guid->Data1) - 1)) == 0); ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1)); ASSERT ((Length & (sizeof (*GuidPtr) - 1)) == 0); - GuidPtr = (GUID*)Buffer; + GuidPtr = (GUID *)Buffer; Buffer = GuidPtr + Length / sizeof (*GuidPtr); - while (GuidPtr < (CONST GUID*)Buffer) { + while (GuidPtr < (CONST GUID *)Buffer) { if (CompareGuid (GuidPtr, Guid)) { - return (VOID*)GuidPtr; + return (VOID *)GuidPtr; } + GuidPtr++; } + return NULL; } @@ -158,8 +160,8 @@ IsZeroGuid ( UINT64 LowPartOfGuid; UINT64 HighPartOfGuid; - LowPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid); - HighPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid + 1); + LowPartOfGuid = ReadUnaligned64 ((CONST UINT64 *)Guid); + HighPartOfGuid = ReadUnaligned64 ((CONST UINT64 *)Guid + 1); - return (BOOLEAN) (LowPartOfGuid == 0 && HighPartOfGuid == 0); + return (BOOLEAN)(LowPartOfGuid == 0 && HighPartOfGuid == 0); } diff --git a/MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h b/MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h index ce376af..20131d1 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h +++ b/MdePkg/Library/BaseMemoryLibSse2/MemLibInternals.h @@ -35,9 +35,9 @@ VOID * EFIAPI InternalMemCopyMem ( - OUT VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length + OUT VOID *DestinationBuffer, + IN CONST VOID *SourceBuffer, + IN UINTN Length ); /** @@ -53,9 +53,9 @@ InternalMemCopyMem ( VOID * EFIAPI InternalMemSetMem ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT8 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT8 Value ); /** @@ -71,9 +71,9 @@ InternalMemSetMem ( VOID * EFIAPI InternalMemSetMem16 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT16 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT16 Value ); /** @@ -89,9 +89,9 @@ InternalMemSetMem16 ( VOID * EFIAPI InternalMemSetMem32 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT32 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT32 Value ); /** @@ -107,9 +107,9 @@ InternalMemSetMem32 ( VOID * EFIAPI InternalMemSetMem64 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT64 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT64 Value ); /** @@ -124,8 +124,8 @@ InternalMemSetMem64 ( VOID * EFIAPI InternalMemZeroMem ( - OUT VOID *Buffer, - IN UINTN Length + OUT VOID *Buffer, + IN UINTN Length ); /** @@ -144,9 +144,9 @@ InternalMemZeroMem ( INTN EFIAPI InternalMemCompareMem ( - IN CONST VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length + IN CONST VOID *DestinationBuffer, + IN CONST VOID *SourceBuffer, + IN UINTN Length ); /** @@ -163,9 +163,9 @@ InternalMemCompareMem ( CONST VOID * EFIAPI InternalMemScanMem8 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT8 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT8 Value ); /** @@ -182,9 +182,9 @@ InternalMemScanMem8 ( CONST VOID * EFIAPI InternalMemScanMem16 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT16 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT16 Value ); /** @@ -201,9 +201,9 @@ InternalMemScanMem16 ( CONST VOID * EFIAPI InternalMemScanMem32 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT32 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT32 Value ); /** @@ -220,9 +220,9 @@ InternalMemScanMem32 ( CONST VOID * EFIAPI InternalMemScanMem64 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT64 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT64 Value ); /** diff --git a/MdePkg/Library/BaseMemoryLibSse2/ScanMem16Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/ScanMem16Wrapper.c index 8201313..7eeb1a4 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/ScanMem16Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibSse2/ScanMem16Wrapper.c @@ -57,5 +57,5 @@ ScanMem16 ( ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (Value) - 1)) == 0); - return (VOID*)InternalMemScanMem16 (Buffer, Length / sizeof (Value), Value); + return (VOID *)InternalMemScanMem16 (Buffer, Length / sizeof (Value), Value); } diff --git a/MdePkg/Library/BaseMemoryLibSse2/ScanMem32Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/ScanMem32Wrapper.c index 22c0c79..bdcee0e 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/ScanMem32Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibSse2/ScanMem32Wrapper.c @@ -56,5 +56,5 @@ ScanMem32 ( ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (Value) - 1)) == 0); - return (VOID*)InternalMemScanMem32 (Buffer, Length / sizeof (Value), Value); + return (VOID *)InternalMemScanMem32 (Buffer, Length / sizeof (Value), Value); } diff --git a/MdePkg/Library/BaseMemoryLibSse2/ScanMem64Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/ScanMem64Wrapper.c index a617d87..eb75390 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/ScanMem64Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibSse2/ScanMem64Wrapper.c @@ -57,5 +57,5 @@ ScanMem64 ( ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (Value) - 1)) == 0); - return (VOID*)InternalMemScanMem64 (Buffer, Length / sizeof (Value), Value); + return (VOID *)InternalMemScanMem64 (Buffer, Length / sizeof (Value), Value); } diff --git a/MdePkg/Library/BaseMemoryLibSse2/ScanMem8Wrapper.c b/MdePkg/Library/BaseMemoryLibSse2/ScanMem8Wrapper.c index f2bf7d6..aa0de64 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/ScanMem8Wrapper.c +++ b/MdePkg/Library/BaseMemoryLibSse2/ScanMem8Wrapper.c @@ -49,10 +49,11 @@ ScanMem8 ( if (Length == 0) { return NULL; } + ASSERT (Buffer != NULL); ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); - return (VOID*)InternalMemScanMem8 (Buffer, Length, Value); + return (VOID *)InternalMemScanMem8 (Buffer, Length, Value); } /** @@ -90,4 +91,3 @@ ScanMemN ( return ScanMem32 (Buffer, Length, (UINT32)Value); } } - diff --git a/MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.c b/MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.c index 650a761..f47301d 100644 --- a/MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.c +++ b/MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.c @@ -30,26 +30,25 @@ typedef enum { // header. Beside completing the types, we introduce typedefs here that reflect // the implementation closely. // -typedef ORDERED_COLLECTION RED_BLACK_TREE; -typedef ORDERED_COLLECTION_ENTRY RED_BLACK_TREE_NODE; -typedef ORDERED_COLLECTION_USER_COMPARE RED_BLACK_TREE_USER_COMPARE; -typedef ORDERED_COLLECTION_KEY_COMPARE RED_BLACK_TREE_KEY_COMPARE; +typedef ORDERED_COLLECTION RED_BLACK_TREE; +typedef ORDERED_COLLECTION_ENTRY RED_BLACK_TREE_NODE; +typedef ORDERED_COLLECTION_USER_COMPARE RED_BLACK_TREE_USER_COMPARE; +typedef ORDERED_COLLECTION_KEY_COMPARE RED_BLACK_TREE_KEY_COMPARE; struct ORDERED_COLLECTION { - RED_BLACK_TREE_NODE *Root; - RED_BLACK_TREE_USER_COMPARE UserStructCompare; - RED_BLACK_TREE_KEY_COMPARE KeyCompare; + RED_BLACK_TREE_NODE *Root; + RED_BLACK_TREE_USER_COMPARE UserStructCompare; + RED_BLACK_TREE_KEY_COMPARE KeyCompare; }; struct ORDERED_COLLECTION_ENTRY { - VOID *UserStruct; - RED_BLACK_TREE_NODE *Parent; - RED_BLACK_TREE_NODE *Left; - RED_BLACK_TREE_NODE *Right; - RED_BLACK_TREE_COLOR Color; + VOID *UserStruct; + RED_BLACK_TREE_NODE *Parent; + RED_BLACK_TREE_NODE *Left; + RED_BLACK_TREE_NODE *Right; + RED_BLACK_TREE_COLOR Color; }; - /** Retrieve the user structure linked by the specified tree node. @@ -64,7 +63,7 @@ struct ORDERED_COLLECTION_ENTRY { VOID * EFIAPI OrderedCollectionUserStruct ( - IN CONST RED_BLACK_TREE_NODE *Node + IN CONST RED_BLACK_TREE_NODE *Node ) { return Node->UserStruct; @@ -83,10 +82,9 @@ OrderedCollectionUserStruct ( **/ VOID RedBlackTreeValidate ( - IN CONST RED_BLACK_TREE *Tree + IN CONST RED_BLACK_TREE *Tree ); - /** Allocate and initialize the RED_BLACK_TREE structure. @@ -109,11 +107,11 @@ RedBlackTreeValidate ( RED_BLACK_TREE * EFIAPI OrderedCollectionInit ( - IN RED_BLACK_TREE_USER_COMPARE UserStructCompare, - IN RED_BLACK_TREE_KEY_COMPARE KeyCompare + IN RED_BLACK_TREE_USER_COMPARE UserStructCompare, + IN RED_BLACK_TREE_KEY_COMPARE KeyCompare ) { - RED_BLACK_TREE *Tree; + RED_BLACK_TREE *Tree; Tree = AllocatePool (sizeof *Tree); if (Tree == NULL) { @@ -127,10 +125,10 @@ OrderedCollectionInit ( if (FeaturePcdGet (PcdValidateOrderedCollection)) { RedBlackTreeValidate (Tree); } + return Tree; } - /** Check whether the tree is empty (has no nodes). @@ -145,13 +143,12 @@ OrderedCollectionInit ( BOOLEAN EFIAPI OrderedCollectionIsEmpty ( - IN CONST RED_BLACK_TREE *Tree + IN CONST RED_BLACK_TREE *Tree ) { return (BOOLEAN)(Tree->Root == NULL); } - /** Uninitialize and release an empty RED_BLACK_TREE structure. @@ -167,14 +164,13 @@ OrderedCollectionIsEmpty ( VOID EFIAPI OrderedCollectionUninit ( - IN RED_BLACK_TREE *Tree + IN RED_BLACK_TREE *Tree ) { ASSERT (OrderedCollectionIsEmpty (Tree)); FreePool (Tree); } - /** Look up the tree node that links the user structure that matches the specified standalone key. @@ -195,26 +191,27 @@ OrderedCollectionUninit ( RED_BLACK_TREE_NODE * EFIAPI OrderedCollectionFind ( - IN CONST RED_BLACK_TREE *Tree, - IN CONST VOID *StandaloneKey + IN CONST RED_BLACK_TREE *Tree, + IN CONST VOID *StandaloneKey ) { - RED_BLACK_TREE_NODE *Node; + RED_BLACK_TREE_NODE *Node; Node = Tree->Root; while (Node != NULL) { - INTN Result; + INTN Result; Result = Tree->KeyCompare (StandaloneKey, Node->UserStruct); if (Result == 0) { break; } + Node = (Result < 0) ? Node->Left : Node->Right; } + return Node; } - /** Find the tree node of the minimum user structure stored in the tree. @@ -231,22 +228,23 @@ OrderedCollectionFind ( RED_BLACK_TREE_NODE * EFIAPI OrderedCollectionMin ( - IN CONST RED_BLACK_TREE *Tree + IN CONST RED_BLACK_TREE *Tree ) { - RED_BLACK_TREE_NODE *Node; + RED_BLACK_TREE_NODE *Node; Node = Tree->Root; if (Node == NULL) { return NULL; } + while (Node->Left != NULL) { Node = Node->Left; } + return Node; } - /** Find the tree node of the maximum user structure stored in the tree. @@ -263,22 +261,23 @@ OrderedCollectionMin ( RED_BLACK_TREE_NODE * EFIAPI OrderedCollectionMax ( - IN CONST RED_BLACK_TREE *Tree + IN CONST RED_BLACK_TREE *Tree ) { - RED_BLACK_TREE_NODE *Node; + RED_BLACK_TREE_NODE *Node; Node = Tree->Root; if (Node == NULL) { return NULL; } + while (Node->Right != NULL) { Node = Node->Right; } + return Node; } - /** Get the tree node of the least user structure that is greater than the one linked by Node. @@ -296,11 +295,11 @@ OrderedCollectionMax ( RED_BLACK_TREE_NODE * EFIAPI OrderedCollectionNext ( - IN CONST RED_BLACK_TREE_NODE *Node + IN CONST RED_BLACK_TREE_NODE *Node ) { - RED_BLACK_TREE_NODE *Walk; - CONST RED_BLACK_TREE_NODE *Child; + RED_BLACK_TREE_NODE *Walk; + CONST RED_BLACK_TREE_NODE *Child; if (Node == NULL) { return NULL; @@ -315,6 +314,7 @@ OrderedCollectionNext ( while (Walk->Left != NULL) { Walk = Walk->Left; } + return Walk; } @@ -323,15 +323,15 @@ OrderedCollectionNext ( // ascending to the left). // Child = Node; - Walk = Child->Parent; + Walk = Child->Parent; while (Walk != NULL && Child == Walk->Right) { Child = Walk; - Walk = Child->Parent; + Walk = Child->Parent; } + return Walk; } - /** Get the tree node of the greatest user structure that is less than the one linked by Node. @@ -349,11 +349,11 @@ OrderedCollectionNext ( RED_BLACK_TREE_NODE * EFIAPI OrderedCollectionPrev ( - IN CONST RED_BLACK_TREE_NODE *Node + IN CONST RED_BLACK_TREE_NODE *Node ) { - RED_BLACK_TREE_NODE *Walk; - CONST RED_BLACK_TREE_NODE *Child; + RED_BLACK_TREE_NODE *Walk; + CONST RED_BLACK_TREE_NODE *Child; if (Node == NULL) { return NULL; @@ -368,6 +368,7 @@ OrderedCollectionPrev ( while (Walk->Right != NULL) { Walk = Walk->Right; } + return Walk; } @@ -376,15 +377,15 @@ OrderedCollectionPrev ( // ascending to the right). // Child = Node; - Walk = Child->Parent; + Walk = Child->Parent; while (Walk != NULL && Child == Walk->Left) { Child = Walk; - Walk = Child->Parent; + Walk = Child->Parent; } + return Walk; } - /** Rotate tree nodes around Pivot to the right. @@ -419,13 +420,13 @@ OrderedCollectionPrev ( **/ VOID RedBlackTreeRotateRight ( - IN OUT RED_BLACK_TREE_NODE *Pivot, - OUT RED_BLACK_TREE_NODE **NewRoot + IN OUT RED_BLACK_TREE_NODE *Pivot, + OUT RED_BLACK_TREE_NODE **NewRoot ) { - RED_BLACK_TREE_NODE *Parent; - RED_BLACK_TREE_NODE *LeftChild; - RED_BLACK_TREE_NODE *LeftRightChild; + RED_BLACK_TREE_NODE *Parent; + RED_BLACK_TREE_NODE *LeftChild; + RED_BLACK_TREE_NODE *LeftRightChild; Parent = Pivot->Parent; LeftChild = Pivot->Left; @@ -435,6 +436,7 @@ RedBlackTreeRotateRight ( if (LeftRightChild != NULL) { LeftRightChild->Parent = Pivot; } + LeftChild->Parent = Parent; if (Parent == NULL) { *NewRoot = LeftChild; @@ -445,11 +447,11 @@ RedBlackTreeRotateRight ( Parent->Right = LeftChild; } } + LeftChild->Right = Pivot; - Pivot->Parent = LeftChild; + Pivot->Parent = LeftChild; } - /** Rotate tree nodes around Pivot to the left. @@ -484,13 +486,13 @@ RedBlackTreeRotateRight ( **/ VOID RedBlackTreeRotateLeft ( - IN OUT RED_BLACK_TREE_NODE *Pivot, - OUT RED_BLACK_TREE_NODE **NewRoot + IN OUT RED_BLACK_TREE_NODE *Pivot, + OUT RED_BLACK_TREE_NODE **NewRoot ) { - RED_BLACK_TREE_NODE *Parent; - RED_BLACK_TREE_NODE *RightChild; - RED_BLACK_TREE_NODE *RightLeftChild; + RED_BLACK_TREE_NODE *Parent; + RED_BLACK_TREE_NODE *RightChild; + RED_BLACK_TREE_NODE *RightLeftChild; Parent = Pivot->Parent; RightChild = Pivot->Right; @@ -500,6 +502,7 @@ RedBlackTreeRotateLeft ( if (RightLeftChild != NULL) { RightLeftChild->Parent = Pivot; } + RightChild->Parent = Parent; if (Parent == NULL) { *NewRoot = RightChild; @@ -510,11 +513,11 @@ RedBlackTreeRotateLeft ( Parent->Right = RightChild; } } + RightChild->Left = Pivot; - Pivot->Parent = RightChild; + Pivot->Parent = RightChild; } - /** Insert (link) a user structure into the tree. @@ -579,18 +582,18 @@ RedBlackTreeRotateLeft ( RETURN_STATUS EFIAPI OrderedCollectionInsert ( - IN OUT RED_BLACK_TREE *Tree, - OUT RED_BLACK_TREE_NODE **Node OPTIONAL, - IN VOID *UserStruct + IN OUT RED_BLACK_TREE *Tree, + OUT RED_BLACK_TREE_NODE **Node OPTIONAL, + IN VOID *UserStruct ) { - RED_BLACK_TREE_NODE *Tmp; - RED_BLACK_TREE_NODE *Parent; - INTN Result; - RETURN_STATUS Status; - RED_BLACK_TREE_NODE *NewRoot; + RED_BLACK_TREE_NODE *Tmp; + RED_BLACK_TREE_NODE *Parent; + INTN Result; + RETURN_STATUS Status; + RED_BLACK_TREE_NODE *NewRoot; - Tmp = Tree->Root; + Tmp = Tree->Root; Parent = NULL; Result = 0; @@ -603,14 +606,16 @@ OrderedCollectionInsert ( if (Result == 0) { break; } + Parent = Tmp; - Tmp = (Result < 0) ? Tmp->Left : Tmp->Right; + Tmp = (Result < 0) ? Tmp->Left : Tmp->Right; } if (Tmp != NULL) { if (Node != NULL) { *Node = Tmp; } + Status = RETURN_ALREADY_STARTED; goto Done; } @@ -623,6 +628,7 @@ OrderedCollectionInsert ( Status = RETURN_OUT_OF_RESOURCES; goto Done; } + if (Node != NULL) { *Node = Tmp; } @@ -637,19 +643,21 @@ OrderedCollectionInsert ( // If there's no parent, the new node is the root node in the tree. // Tmp->Parent = Parent; - Tmp->Left = NULL; - Tmp->Right = NULL; + Tmp->Left = NULL; + Tmp->Right = NULL; if (Parent == NULL) { Tree->Root = Tmp; Tmp->Color = RedBlackTreeBlack; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; goto Done; } + if (Result < 0) { Parent->Left = Tmp; } else { Parent->Right = Tmp; } + Tmp->Color = RedBlackTreeRed; // @@ -674,8 +682,8 @@ OrderedCollectionInsert ( NewRoot = Tree->Root; while (Tmp != NewRoot && Parent->Color == RedBlackTreeRed) { - RED_BLACK_TREE_NODE *GrandParent; - RED_BLACK_TREE_NODE *Uncle; + RED_BLACK_TREE_NODE *GrandParent; + RED_BLACK_TREE_NODE *Uncle; // // Tmp is not the root node. Tmp is red. Tmp's parent is red. (Breaking @@ -691,7 +699,7 @@ OrderedCollectionInsert ( if (Parent == GrandParent->Left) { Uncle = GrandParent->Right; - if (Uncle != NULL && Uncle->Color == RedBlackTreeRed) { + if ((Uncle != NULL) && (Uncle->Color == RedBlackTreeRed)) { // // GrandParent (black) // / \_ @@ -700,8 +708,8 @@ OrderedCollectionInsert ( // Tmp (red) // - Parent->Color = RedBlackTreeBlack; - Uncle->Color = RedBlackTreeBlack; + Parent->Color = RedBlackTreeBlack; + Uncle->Color = RedBlackTreeBlack; GrandParent->Color = RedBlackTreeRed; // @@ -720,7 +728,7 @@ OrderedCollectionInsert ( // and we will have broken property #5, by coloring the root red. We'll // restore property #5 after the loop, without breaking any others. // - Tmp = GrandParent; + Tmp = GrandParent; Parent = Tmp->Parent; } else { // @@ -759,7 +767,7 @@ OrderedCollectionInsert ( ASSERT (GrandParent == Parent->Parent); } - Parent->Color = RedBlackTreeBlack; + Parent->Color = RedBlackTreeBlack; GrandParent->Color = RedBlackTreeRed; // @@ -794,12 +802,12 @@ OrderedCollectionInsert ( // Symmetrical to the other branch. // Uncle = GrandParent->Left; - if (Uncle != NULL && Uncle->Color == RedBlackTreeRed) { - Parent->Color = RedBlackTreeBlack; - Uncle->Color = RedBlackTreeBlack; + if ((Uncle != NULL) && (Uncle->Color == RedBlackTreeRed)) { + Parent->Color = RedBlackTreeBlack; + Uncle->Color = RedBlackTreeBlack; GrandParent->Color = RedBlackTreeRed; - Tmp = GrandParent; - Parent = Tmp->Parent; + Tmp = GrandParent; + Parent = Tmp->Parent; } else { if (Tmp == Parent->Left) { Tmp = Parent; @@ -807,7 +815,8 @@ OrderedCollectionInsert ( Parent = Tmp->Parent; ASSERT (GrandParent == Parent->Parent); } - Parent->Color = RedBlackTreeBlack; + + Parent->Color = RedBlackTreeBlack; GrandParent->Color = RedBlackTreeRed; RedBlackTreeRotateLeft (GrandParent, &NewRoot); } @@ -815,17 +824,17 @@ OrderedCollectionInsert ( } NewRoot->Color = RedBlackTreeBlack; - Tree->Root = NewRoot; - Status = RETURN_SUCCESS; + Tree->Root = NewRoot; + Status = RETURN_SUCCESS; Done: if (FeaturePcdGet (PcdValidateOrderedCollection)) { RedBlackTreeValidate (Tree); } + return Status; } - /** Check if a node is black, allowing for leaf nodes (see property #2). @@ -837,13 +846,12 @@ Done: **/ BOOLEAN NodeIsNullOrBlack ( - IN CONST RED_BLACK_TREE_NODE *Node + IN CONST RED_BLACK_TREE_NODE *Node ) { return (BOOLEAN)(Node == NULL || Node->Color == RedBlackTreeBlack); } - /** Delete a node from the tree, unlinking the associated user structure. @@ -912,18 +920,18 @@ NodeIsNullOrBlack ( VOID EFIAPI OrderedCollectionDelete ( - IN OUT RED_BLACK_TREE *Tree, - IN RED_BLACK_TREE_NODE *Node, - OUT VOID **UserStruct OPTIONAL + IN OUT RED_BLACK_TREE *Tree, + IN RED_BLACK_TREE_NODE *Node, + OUT VOID **UserStruct OPTIONAL ) { - RED_BLACK_TREE_NODE *NewRoot; - RED_BLACK_TREE_NODE *OrigLeftChild; - RED_BLACK_TREE_NODE *OrigRightChild; - RED_BLACK_TREE_NODE *OrigParent; - RED_BLACK_TREE_NODE *Child; - RED_BLACK_TREE_NODE *Parent; - RED_BLACK_TREE_COLOR ColorOfUnlinked; + RED_BLACK_TREE_NODE *NewRoot; + RED_BLACK_TREE_NODE *OrigLeftChild; + RED_BLACK_TREE_NODE *OrigRightChild; + RED_BLACK_TREE_NODE *OrigParent; + RED_BLACK_TREE_NODE *Child; + RED_BLACK_TREE_NODE *Parent; + RED_BLACK_TREE_COLOR ColorOfUnlinked; NewRoot = Tree->Root; OrigLeftChild = Node->Left, @@ -941,20 +949,21 @@ OrderedCollectionDelete ( // - Parent will point to the *position* of the original parent of the node // that we will have unlinked. // - if (OrigLeftChild == NULL || OrigRightChild == NULL) { + if ((OrigLeftChild == NULL) || (OrigRightChild == NULL)) { // // Node has at most one child. We can connect that child (if any) with // Node's parent (if any), unlinking Node. This will preserve ordering // because the subtree rooted in Node's child (if any) remains on the same // side of Node's parent (if any) that Node was before. // - Parent = OrigParent; - Child = (OrigLeftChild != NULL) ? OrigLeftChild : OrigRightChild; + Parent = OrigParent; + Child = (OrigLeftChild != NULL) ? OrigLeftChild : OrigRightChild; ColorOfUnlinked = Node->Color; if (Child != NULL) { Child->Parent = Parent; } + if (OrigParent == NULL) { NewRoot = Child; } else { @@ -978,7 +987,7 @@ OrderedCollectionDelete ( // of Node's parent as Node itself. The relinking doesn't change this // relation. // - RED_BLACK_TREE_NODE *ToRelink; + RED_BLACK_TREE_NODE *ToRelink; ToRelink = OrigRightChild; if (ToRelink->Left == NULL) { @@ -994,7 +1003,7 @@ OrderedCollectionDelete ( // F <--- Child // Parent = OrigRightChild; - Child = OrigRightChild->Right; + Child = OrigRightChild->Right; } else { do { ToRelink = ToRelink->Left; @@ -1013,7 +1022,7 @@ OrderedCollectionDelete ( // \_ // D <--- Child Parent = ToRelink->Parent; - Child = ToRelink->Right; + Child = ToRelink->Right; // // Unlink Node's successor (ie. ToRelink): @@ -1046,7 +1055,7 @@ OrderedCollectionDelete ( // // // - ToRelink->Right = OrigRightChild; + ToRelink->Right = OrigRightChild; OrigRightChild->Parent = ToRelink; } @@ -1066,7 +1075,7 @@ OrderedCollectionDelete ( // | D <--- Child // Child // - ToRelink->Left = OrigLeftChild; + ToRelink->Left = OrigLeftChild; OrigLeftChild->Parent = ToRelink; // @@ -1129,9 +1138,9 @@ OrderedCollectionDelete ( // Rotations in the loop preserve property #4. // while (Child != NewRoot && NodeIsNullOrBlack (Child)) { - RED_BLACK_TREE_NODE *Sibling; - RED_BLACK_TREE_NODE *LeftNephew; - RED_BLACK_TREE_NODE *RightNephew; + RED_BLACK_TREE_NODE *Sibling; + RED_BLACK_TREE_NODE *LeftNephew; + RED_BLACK_TREE_NODE *RightNephew; if (Child == Parent->Left) { Sibling = Parent->Right; @@ -1163,7 +1172,7 @@ OrderedCollectionDelete ( // b:C b:E Child,2b:A Sibling,b:C // Sibling->Color = RedBlackTreeBlack; - Parent->Color = RedBlackTreeRed; + Parent->Color = RedBlackTreeRed; RedBlackTreeRotateLeft (Parent, &NewRoot); Sibling = Parent->Right; // @@ -1177,10 +1186,11 @@ OrderedCollectionDelete ( // node.) // ASSERT (Sibling->Color == RedBlackTreeBlack); - LeftNephew = Sibling->Left; + LeftNephew = Sibling->Left; RightNephew = Sibling->Right; if (NodeIsNullOrBlack (LeftNephew) && - NodeIsNullOrBlack (RightNephew)) { + NodeIsNullOrBlack (RightNephew)) + { // // In this case we can "steal" one black value from Child and Sibling // each, and pass it to Parent. "Stealing" means that Sibling (black @@ -1200,8 +1210,8 @@ OrderedCollectionDelete ( // LeftNephew,b:C RightNephew,b:E b:C b:E // Sibling->Color = RedBlackTreeRed; - Child = Parent; - Parent = Parent->Parent; + Child = Parent; + Parent = Parent->Parent; // // Continue ascending. // @@ -1230,14 +1240,15 @@ OrderedCollectionDelete ( // b:C b:E b:E b:G // LeftNephew->Color = RedBlackTreeBlack; - Sibling->Color = RedBlackTreeRed; + Sibling->Color = RedBlackTreeRed; RedBlackTreeRotateRight (Sibling, &NewRoot); - Sibling = Parent->Right; + Sibling = Parent->Right; RightNephew = Sibling->Right; // // These operations ensure that... // } + // // ... RightNephew is definitely red here, plus Sibling is (still) // black and non-NULL. @@ -1272,8 +1283,8 @@ OrderedCollectionDelete ( // y:C RightNephew,r:E b:A y:C // // - Sibling->Color = Parent->Color; - Parent->Color = RedBlackTreeBlack; + Sibling->Color = Parent->Color; + Parent->Color = RedBlackTreeBlack; RightNephew->Color = RedBlackTreeBlack; RedBlackTreeRotateLeft (Parent, &NewRoot); Child = NewRoot; @@ -1289,7 +1300,7 @@ OrderedCollectionDelete ( ASSERT (Sibling != NULL); if (Sibling->Color == RedBlackTreeRed) { Sibling->Color = RedBlackTreeBlack; - Parent->Color = RedBlackTreeRed; + Parent->Color = RedBlackTreeRed; RedBlackTreeRotateRight (Parent, &NewRoot); Sibling = Parent->Left; ASSERT (Sibling != NULL); @@ -1297,26 +1308,28 @@ OrderedCollectionDelete ( ASSERT (Sibling->Color == RedBlackTreeBlack); RightNephew = Sibling->Right; - LeftNephew = Sibling->Left; + LeftNephew = Sibling->Left; if (NodeIsNullOrBlack (RightNephew) && - NodeIsNullOrBlack (LeftNephew)) { + NodeIsNullOrBlack (LeftNephew)) + { Sibling->Color = RedBlackTreeRed; - Child = Parent; - Parent = Parent->Parent; + Child = Parent; + Parent = Parent->Parent; } else { if (NodeIsNullOrBlack (LeftNephew)) { RightNephew->Color = RedBlackTreeBlack; - Sibling->Color = RedBlackTreeRed; + Sibling->Color = RedBlackTreeRed; RedBlackTreeRotateLeft (Sibling, &NewRoot); - Sibling = Parent->Left; + Sibling = Parent->Left; LeftNephew = Sibling->Left; } + ASSERT (LeftNephew != NULL); ASSERT (LeftNephew->Color == RedBlackTreeRed); ASSERT (Sibling != NULL); ASSERT (Sibling->Color == RedBlackTreeBlack); - Sibling->Color = Parent->Color; - Parent->Color = RedBlackTreeBlack; + Sibling->Color = Parent->Color; + Parent->Color = RedBlackTreeBlack; LeftNephew->Color = RedBlackTreeBlack; RedBlackTreeRotateRight (Parent, &NewRoot); Child = NewRoot; @@ -1336,7 +1349,6 @@ OrderedCollectionDelete ( } } - /** Recursively check the red-black tree properties #1 to #4 on a node. @@ -1346,11 +1358,11 @@ OrderedCollectionDelete ( **/ UINT32 RedBlackTreeRecursiveCheck ( - IN CONST RED_BLACK_TREE_NODE *Node + IN CONST RED_BLACK_TREE_NODE *Node ) { - UINT32 LeftHeight; - UINT32 RightHeight; + UINT32 LeftHeight; + UINT32 RightHeight; // // property #2 @@ -1375,14 +1387,13 @@ RedBlackTreeRecursiveCheck ( // // property #4 // - LeftHeight = RedBlackTreeRecursiveCheck (Node->Left); + LeftHeight = RedBlackTreeRecursiveCheck (Node->Left); RightHeight = RedBlackTreeRecursiveCheck (Node->Right); ASSERT (LeftHeight == RightHeight); return (Node->Color == RedBlackTreeBlack) + LeftHeight; } - /** A slow function that asserts that the tree is a valid red-black tree, and that it orders user structures correctly. @@ -1396,14 +1407,14 @@ RedBlackTreeRecursiveCheck ( **/ VOID RedBlackTreeValidate ( - IN CONST RED_BLACK_TREE *Tree + IN CONST RED_BLACK_TREE *Tree ) { - UINT32 BlackHeight; - UINT32 ForwardCount; - UINT32 BackwardCount; - CONST RED_BLACK_TREE_NODE *Last; - CONST RED_BLACK_TREE_NODE *Node; + UINT32 BlackHeight; + UINT32 ForwardCount; + UINT32 BackwardCount; + CONST RED_BLACK_TREE_NODE *Last; + CONST RED_BLACK_TREE_NODE *Node; DEBUG ((DEBUG_VERBOSE, "%a: Tree=%p\n", __FUNCTION__, Tree)); @@ -1420,10 +1431,11 @@ RedBlackTreeValidate ( // // forward ordering // - Last = OrderedCollectionMin (Tree); + Last = OrderedCollectionMin (Tree); ForwardCount = (Last != NULL); for (Node = OrderedCollectionNext (Last); Node != NULL; - Node = OrderedCollectionNext (Last)) { + Node = OrderedCollectionNext (Last)) + { ASSERT (Tree->UserStructCompare (Last->UserStruct, Node->UserStruct) < 0); Last = Node; ++ForwardCount; @@ -1432,10 +1444,11 @@ RedBlackTreeValidate ( // // backward ordering // - Last = OrderedCollectionMax (Tree); + Last = OrderedCollectionMax (Tree); BackwardCount = (Last != NULL); for (Node = OrderedCollectionPrev (Last); Node != NULL; - Node = OrderedCollectionPrev (Last)) { + Node = OrderedCollectionPrev (Last)) + { ASSERT (Tree->UserStructCompare (Last->UserStruct, Node->UserStruct) > 0); Last = Node; ++BackwardCount; @@ -1443,6 +1456,12 @@ RedBlackTreeValidate ( ASSERT (ForwardCount == BackwardCount); - DEBUG ((DEBUG_VERBOSE, "%a: Tree=%p BlackHeight=%Ld Count=%Ld\n", - __FUNCTION__, Tree, (INT64)BlackHeight, (INT64)ForwardCount)); + DEBUG (( + DEBUG_VERBOSE, + "%a: Tree=%p BlackHeight=%Ld Count=%Ld\n", + __FUNCTION__, + Tree, + (INT64)BlackHeight, + (INT64)ForwardCount + )); } diff --git a/MdePkg/Library/BasePcdLibNull/PcdLib.c b/MdePkg/Library/BasePcdLibNull/PcdLib.c index 7cb3714..a214371 100644 --- a/MdePkg/Library/BasePcdLibNull/PcdLib.c +++ b/MdePkg/Library/BasePcdLibNull/PcdLib.c @@ -12,7 +12,6 @@ #include #include - /** This function provides a means by which SKU support can be established in the PCD infrastructure. @@ -27,7 +26,7 @@ UINTN EFIAPI LibPcdSetSku ( - IN UINTN SkuId + IN UINTN SkuId ) { ASSERT (FALSE); @@ -48,7 +47,7 @@ LibPcdSetSku ( UINT8 EFIAPI LibPcdGet8 ( - IN UINTN TokenNumber + IN UINTN TokenNumber ) { ASSERT (FALSE); @@ -56,8 +55,6 @@ LibPcdGet8 ( return 0; } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -71,7 +68,7 @@ LibPcdGet8 ( UINT16 EFIAPI LibPcdGet16 ( - IN UINTN TokenNumber + IN UINTN TokenNumber ) { ASSERT (FALSE); @@ -79,8 +76,6 @@ LibPcdGet16 ( return 0; } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -94,7 +89,7 @@ LibPcdGet16 ( UINT32 EFIAPI LibPcdGet32 ( - IN UINTN TokenNumber + IN UINTN TokenNumber ) { ASSERT (FALSE); @@ -102,8 +97,6 @@ LibPcdGet32 ( return 0; } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -117,7 +110,7 @@ LibPcdGet32 ( UINT64 EFIAPI LibPcdGet64 ( - IN UINTN TokenNumber + IN UINTN TokenNumber ) { ASSERT (FALSE); @@ -125,8 +118,6 @@ LibPcdGet64 ( return 0; } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -140,7 +131,7 @@ LibPcdGet64 ( VOID * EFIAPI LibPcdGetPtr ( - IN UINTN TokenNumber + IN UINTN TokenNumber ) { ASSERT (FALSE); @@ -148,8 +139,6 @@ LibPcdGetPtr ( return 0; } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -163,7 +152,7 @@ LibPcdGetPtr ( BOOLEAN EFIAPI LibPcdGetBool ( - IN UINTN TokenNumber + IN UINTN TokenNumber ) { ASSERT (FALSE); @@ -171,8 +160,6 @@ LibPcdGetBool ( return 0; } - - /** This function provides a means by which to retrieve the size of a given PCD token. @@ -184,7 +171,7 @@ LibPcdGetBool ( UINTN EFIAPI LibPcdGetSize ( - IN UINTN TokenNumber + IN UINTN TokenNumber ) { ASSERT (FALSE); @@ -192,8 +179,6 @@ LibPcdGetSize ( return 0; } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -211,8 +196,8 @@ LibPcdGetSize ( UINT8 EFIAPI LibPcdGetEx8 ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ) { ASSERT (FALSE); @@ -220,8 +205,6 @@ LibPcdGetEx8 ( return 0; } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -239,8 +222,8 @@ LibPcdGetEx8 ( UINT16 EFIAPI LibPcdGetEx16 ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ) { ASSERT (FALSE); @@ -248,8 +231,6 @@ LibPcdGetEx16 ( return 0; } - - /** Returns the 32-bit value for the token specified by TokenNumber and Guid. If Guid is NULL, then ASSERT(). @@ -264,8 +245,8 @@ LibPcdGetEx16 ( UINT32 EFIAPI LibPcdGetEx32 ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ) { ASSERT (FALSE); @@ -273,8 +254,6 @@ LibPcdGetEx32 ( return 0; } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -292,8 +271,8 @@ LibPcdGetEx32 ( UINT64 EFIAPI LibPcdGetEx64 ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ) { ASSERT (FALSE); @@ -301,8 +280,6 @@ LibPcdGetEx64 ( return 0; } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -320,8 +297,8 @@ LibPcdGetEx64 ( VOID * EFIAPI LibPcdGetExPtr ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ) { ASSERT (FALSE); @@ -329,8 +306,6 @@ LibPcdGetExPtr ( return 0; } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -348,8 +323,8 @@ LibPcdGetExPtr ( BOOLEAN EFIAPI LibPcdGetExBool ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ) { ASSERT (FALSE); @@ -357,8 +332,6 @@ LibPcdGetExBool ( return 0; } - - /** This function provides a means by which to retrieve the size of a given PCD token. @@ -376,8 +349,8 @@ LibPcdGetExBool ( UINTN EFIAPI LibPcdGetExSize ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ) { ASSERT (FALSE); @@ -385,7 +358,6 @@ LibPcdGetExSize ( return 0; } - /** This function provides a means by which to set a value for a given PCD token. @@ -401,8 +373,8 @@ LibPcdGetExSize ( RETURN_STATUS EFIAPI LibPcdSet8S ( - IN UINTN TokenNumber, - IN UINT8 Value + IN UINTN TokenNumber, + IN UINT8 Value ) { ASSERT (FALSE); @@ -425,8 +397,8 @@ LibPcdSet8S ( RETURN_STATUS EFIAPI LibPcdSet16S ( - IN UINTN TokenNumber, - IN UINT16 Value + IN UINTN TokenNumber, + IN UINT16 Value ) { ASSERT (FALSE); @@ -449,8 +421,8 @@ LibPcdSet16S ( RETURN_STATUS EFIAPI LibPcdSet32S ( - IN UINTN TokenNumber, - IN UINT32 Value + IN UINTN TokenNumber, + IN UINT32 Value ) { ASSERT (FALSE); @@ -473,8 +445,8 @@ LibPcdSet32S ( RETURN_STATUS EFIAPI LibPcdSet64S ( - IN UINTN TokenNumber, - IN UINT64 Value + IN UINTN TokenNumber, + IN UINT64 Value ) { ASSERT (FALSE); @@ -507,9 +479,9 @@ LibPcdSet64S ( RETURN_STATUS EFIAPI LibPcdSetPtrS ( - IN UINTN TokenNumber, - IN OUT UINTN *SizeOfBuffer, - IN CONST VOID *Buffer + IN UINTN TokenNumber, + IN OUT UINTN *SizeOfBuffer, + IN CONST VOID *Buffer ) { ASSERT (FALSE); @@ -532,8 +504,8 @@ LibPcdSetPtrS ( RETURN_STATUS EFIAPI LibPcdSetBoolS ( - IN UINTN TokenNumber, - IN BOOLEAN Value + IN UINTN TokenNumber, + IN BOOLEAN Value ) { ASSERT (FALSE); @@ -560,9 +532,9 @@ LibPcdSetBoolS ( RETURN_STATUS EFIAPI LibPcdSetEx8S ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - IN UINT8 Value + IN CONST GUID *Guid, + IN UINTN TokenNumber, + IN UINT8 Value ) { ASSERT (FALSE); @@ -589,9 +561,9 @@ LibPcdSetEx8S ( RETURN_STATUS EFIAPI LibPcdSetEx16S ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - IN UINT16 Value + IN CONST GUID *Guid, + IN UINTN TokenNumber, + IN UINT16 Value ) { ASSERT (FALSE); @@ -618,9 +590,9 @@ LibPcdSetEx16S ( RETURN_STATUS EFIAPI LibPcdSetEx32S ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - IN UINT32 Value + IN CONST GUID *Guid, + IN UINTN TokenNumber, + IN UINT32 Value ) { ASSERT (FALSE); @@ -647,9 +619,9 @@ LibPcdSetEx32S ( RETURN_STATUS EFIAPI LibPcdSetEx64S ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - IN UINT64 Value + IN CONST GUID *Guid, + IN UINTN TokenNumber, + IN UINT64 Value ) { ASSERT (FALSE); @@ -682,10 +654,10 @@ LibPcdSetEx64S ( RETURN_STATUS EFIAPI LibPcdSetExPtrS ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - IN OUT UINTN *SizeOfBuffer, - IN VOID *Buffer + IN CONST GUID *Guid, + IN UINTN TokenNumber, + IN OUT UINTN *SizeOfBuffer, + IN VOID *Buffer ) { ASSERT (FALSE); @@ -712,9 +684,9 @@ LibPcdSetExPtrS ( RETURN_STATUS EFIAPI LibPcdSetExBoolS ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - IN BOOLEAN Value + IN CONST GUID *Guid, + IN UINTN TokenNumber, + IN BOOLEAN Value ) { ASSERT (FALSE); @@ -742,16 +714,14 @@ LibPcdSetExBoolS ( VOID EFIAPI LibPcdCallbackOnSet ( - IN CONST GUID *Guid OPTIONAL, - IN UINTN TokenNumber, - IN PCD_CALLBACK NotificationFunction + IN CONST GUID *Guid OPTIONAL, + IN UINTN TokenNumber, + IN PCD_CALLBACK NotificationFunction ) { ASSERT (FALSE); } - - /** Disable a notification function that was established with LibPcdCallbackonSet(). @@ -769,16 +739,14 @@ LibPcdCallbackOnSet ( VOID EFIAPI LibPcdCancelCallback ( - IN CONST GUID *Guid OPTIONAL, - IN UINTN TokenNumber, - IN PCD_CALLBACK NotificationFunction + IN CONST GUID *Guid OPTIONAL, + IN UINTN TokenNumber, + IN PCD_CALLBACK NotificationFunction ) { ASSERT (FALSE); } - - /** Retrieves the next token in a token space. @@ -801,8 +769,8 @@ LibPcdCancelCallback ( UINTN EFIAPI LibPcdGetNextToken ( - IN CONST GUID *Guid OPTIONAL, - IN UINTN TokenNumber + IN CONST GUID *Guid OPTIONAL, + IN UINTN TokenNumber ) { ASSERT (FALSE); @@ -810,8 +778,6 @@ LibPcdGetNextToken ( return 0; } - - /** Used to retrieve the list of available PCD token space GUIDs. @@ -836,7 +802,6 @@ LibPcdGetNextTokenSpace ( return NULL; } - /** Sets a value of a patchable PCD entry that is type pointer. @@ -863,10 +828,10 @@ LibPcdGetNextTokenSpace ( VOID * EFIAPI LibPatchPcdSetPtr ( - OUT VOID *PatchVariable, - IN UINTN MaximumDatumSize, - IN OUT UINTN *SizeOfBuffer, - IN CONST VOID *Buffer + OUT VOID *PatchVariable, + IN UINTN MaximumDatumSize, + IN OUT UINTN *SizeOfBuffer, + IN CONST VOID *Buffer ) { ASSERT (PatchVariable != NULL); @@ -877,14 +842,15 @@ LibPatchPcdSetPtr ( } if ((*SizeOfBuffer > MaximumDatumSize) || - (*SizeOfBuffer == MAX_ADDRESS)) { + (*SizeOfBuffer == MAX_ADDRESS)) + { *SizeOfBuffer = MaximumDatumSize; return NULL; } CopyMem (PatchVariable, Buffer, *SizeOfBuffer); - return (VOID *) Buffer; + return (VOID *)Buffer; } /** @@ -913,10 +879,10 @@ LibPatchPcdSetPtr ( RETURN_STATUS EFIAPI LibPatchPcdSetPtrS ( - OUT VOID *PatchVariable, - IN UINTN MaximumDatumSize, - IN OUT UINTN *SizeOfBuffer, - IN CONST VOID *Buffer + OUT VOID *PatchVariable, + IN UINTN MaximumDatumSize, + IN OUT UINTN *SizeOfBuffer, + IN CONST VOID *Buffer ) { ASSERT (PatchVariable != NULL); @@ -927,7 +893,8 @@ LibPatchPcdSetPtrS ( } if ((*SizeOfBuffer > MaximumDatumSize) || - (*SizeOfBuffer == MAX_ADDRESS)) { + (*SizeOfBuffer == MAX_ADDRESS)) + { *SizeOfBuffer = MaximumDatumSize; return RETURN_INVALID_PARAMETER; } @@ -965,11 +932,11 @@ LibPatchPcdSetPtrS ( VOID * EFIAPI LibPatchPcdSetPtrAndSize ( - OUT VOID *PatchVariable, - OUT UINTN *SizeOfPatchVariable, - IN UINTN MaximumDatumSize, - IN OUT UINTN *SizeOfBuffer, - IN CONST VOID *Buffer + OUT VOID *PatchVariable, + OUT UINTN *SizeOfPatchVariable, + IN UINTN MaximumDatumSize, + IN OUT UINTN *SizeOfBuffer, + IN CONST VOID *Buffer ) { ASSERT (PatchVariable != NULL); @@ -981,7 +948,8 @@ LibPatchPcdSetPtrAndSize ( } if ((*SizeOfBuffer > MaximumDatumSize) || - (*SizeOfBuffer == MAX_ADDRESS)) { + (*SizeOfBuffer == MAX_ADDRESS)) + { *SizeOfBuffer = MaximumDatumSize; return NULL; } @@ -989,7 +957,7 @@ LibPatchPcdSetPtrAndSize ( CopyMem (PatchVariable, Buffer, *SizeOfBuffer); *SizeOfPatchVariable = *SizeOfBuffer; - return (VOID *) Buffer; + return (VOID *)Buffer; } /** @@ -1020,11 +988,11 @@ LibPatchPcdSetPtrAndSize ( RETURN_STATUS EFIAPI LibPatchPcdSetPtrAndSizeS ( - OUT VOID *PatchVariable, - OUT UINTN *SizeOfPatchVariable, - IN UINTN MaximumDatumSize, - IN OUT UINTN *SizeOfBuffer, - IN CONST VOID *Buffer + OUT VOID *PatchVariable, + OUT UINTN *SizeOfPatchVariable, + IN UINTN MaximumDatumSize, + IN OUT UINTN *SizeOfBuffer, + IN CONST VOID *Buffer ) { ASSERT (PatchVariable != NULL); @@ -1036,7 +1004,8 @@ LibPatchPcdSetPtrAndSizeS ( } if ((*SizeOfBuffer > MaximumDatumSize) || - (*SizeOfBuffer == MAX_ADDRESS)) { + (*SizeOfBuffer == MAX_ADDRESS)) + { *SizeOfBuffer = MaximumDatumSize; return RETURN_INVALID_PARAMETER; } @@ -1062,8 +1031,8 @@ LibPatchPcdSetPtrAndSizeS ( VOID EFIAPI LibPcdGetInfo ( - IN UINTN TokenNumber, - OUT PCD_INFO *PcdInfo + IN UINTN TokenNumber, + OUT PCD_INFO *PcdInfo ) { ASSERT (FALSE); @@ -1085,9 +1054,9 @@ LibPcdGetInfo ( VOID EFIAPI LibPcdGetInfoEx ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - OUT PCD_INFO *PcdInfo + IN CONST GUID *Guid, + IN UINTN TokenNumber, + OUT PCD_INFO *PcdInfo ) { ASSERT (FALSE); diff --git a/MdePkg/Library/BasePciCf8Lib/PciCf8Lib.c b/MdePkg/Library/BasePciCf8Lib/PciCf8Lib.c index ba4190a..0d96671 100644 --- a/MdePkg/Library/BasePciCf8Lib/PciCf8Lib.c +++ b/MdePkg/Library/BasePciCf8Lib/PciCf8Lib.c @@ -7,7 +7,6 @@ **/ - #include #include @@ -51,7 +50,7 @@ @param M Additional bits to assert to be zero. **/ -#define ASSERT_INVALID_PCI_ADDRESS(A,M) \ +#define ASSERT_INVALID_PCI_ADDRESS(A, M) \ ASSERT (((A) & (~0xffff0ff | (M))) == 0) /** @@ -105,7 +104,7 @@ PciCf8RegisterForRuntimeAccess ( UINT8 EFIAPI PciCf8Read8 ( - IN UINTN Address + IN UINTN Address ) { BOOLEAN InterruptState; @@ -114,7 +113,7 @@ PciCf8Read8 ( ASSERT_INVALID_PCI_ADDRESS (Address, 0); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoRead8 (PCI_CONFIGURATION_DATA_PORT + (UINT16)(Address & 3)); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, AddressPort); @@ -142,8 +141,8 @@ PciCf8Read8 ( UINT8 EFIAPI PciCf8Write8 ( - IN UINTN Address, - IN UINT8 Value + IN UINTN Address, + IN UINT8 Value ) { BOOLEAN InterruptState; @@ -152,7 +151,7 @@ PciCf8Write8 ( ASSERT_INVALID_PCI_ADDRESS (Address, 0); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoWrite8 ( PCI_CONFIGURATION_DATA_PORT + (UINT16)(Address & 3), @@ -187,8 +186,8 @@ PciCf8Write8 ( UINT8 EFIAPI PciCf8Or8 ( - IN UINTN Address, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 OrData ) { BOOLEAN InterruptState; @@ -197,7 +196,7 @@ PciCf8Or8 ( ASSERT_INVALID_PCI_ADDRESS (Address, 0); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoOr8 ( PCI_CONFIGURATION_DATA_PORT + (UINT16)(Address & 3), @@ -232,8 +231,8 @@ PciCf8Or8 ( UINT8 EFIAPI PciCf8And8 ( - IN UINTN Address, - IN UINT8 AndData + IN UINTN Address, + IN UINT8 AndData ) { BOOLEAN InterruptState; @@ -242,7 +241,7 @@ PciCf8And8 ( ASSERT_INVALID_PCI_ADDRESS (Address, 0); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoAnd8 ( PCI_CONFIGURATION_DATA_PORT + (UINT16)(Address & 3), @@ -279,9 +278,9 @@ PciCf8And8 ( UINT8 EFIAPI PciCf8AndThenOr8 ( - IN UINTN Address, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 AndData, + IN UINT8 OrData ) { BOOLEAN InterruptState; @@ -290,7 +289,7 @@ PciCf8AndThenOr8 ( ASSERT_INVALID_PCI_ADDRESS (Address, 0); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoAndThenOr8 ( PCI_CONFIGURATION_DATA_PORT + (UINT16)(Address & 3), @@ -327,9 +326,9 @@ PciCf8AndThenOr8 ( UINT8 EFIAPI PciCf8BitFieldRead8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { BOOLEAN InterruptState; @@ -338,7 +337,7 @@ PciCf8BitFieldRead8 ( ASSERT_INVALID_PCI_ADDRESS (Address, 0); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoBitFieldRead8 ( PCI_CONFIGURATION_DATA_PORT + (UINT16)(Address & 3), @@ -378,10 +377,10 @@ PciCf8BitFieldRead8 ( UINT8 EFIAPI PciCf8BitFieldWrite8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) { BOOLEAN InterruptState; @@ -390,7 +389,7 @@ PciCf8BitFieldWrite8 ( ASSERT_INVALID_PCI_ADDRESS (Address, 0); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoBitFieldWrite8 ( PCI_CONFIGURATION_DATA_PORT + (UINT16)(Address & 3), @@ -434,10 +433,10 @@ PciCf8BitFieldWrite8 ( UINT8 EFIAPI PciCf8BitFieldOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) { BOOLEAN InterruptState; @@ -446,7 +445,7 @@ PciCf8BitFieldOr8 ( ASSERT_INVALID_PCI_ADDRESS (Address, 0); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoBitFieldOr8 ( PCI_CONFIGURATION_DATA_PORT + (UINT16)(Address & 3), @@ -490,10 +489,10 @@ PciCf8BitFieldOr8 ( UINT8 EFIAPI PciCf8BitFieldAnd8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ) { BOOLEAN InterruptState; @@ -502,7 +501,7 @@ PciCf8BitFieldAnd8 ( ASSERT_INVALID_PCI_ADDRESS (Address, 0); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoBitFieldAnd8 ( PCI_CONFIGURATION_DATA_PORT + (UINT16)(Address & 3), @@ -549,12 +548,12 @@ PciCf8BitFieldAnd8 ( **/ UINT8 EFIAPI -PciCf8BitFieldAndThenOr8( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData +PciCf8BitFieldAndThenOr8 ( + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) { BOOLEAN InterruptState; @@ -563,7 +562,7 @@ PciCf8BitFieldAndThenOr8( ASSERT_INVALID_PCI_ADDRESS (Address, 0); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoBitFieldAndThenOr8 ( PCI_CONFIGURATION_DATA_PORT + (UINT16)(Address & 3), @@ -597,7 +596,7 @@ PciCf8BitFieldAndThenOr8( UINT16 EFIAPI PciCf8Read16 ( - IN UINTN Address + IN UINTN Address ) { BOOLEAN InterruptState; @@ -606,7 +605,7 @@ PciCf8Read16 ( ASSERT_INVALID_PCI_ADDRESS (Address, 1); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoRead16 (PCI_CONFIGURATION_DATA_PORT + (UINT16)(Address & 2)); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, AddressPort); @@ -635,8 +634,8 @@ PciCf8Read16 ( UINT16 EFIAPI PciCf8Write16 ( - IN UINTN Address, - IN UINT16 Value + IN UINTN Address, + IN UINT16 Value ) { BOOLEAN InterruptState; @@ -645,7 +644,7 @@ PciCf8Write16 ( ASSERT_INVALID_PCI_ADDRESS (Address, 1); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoWrite16 ( PCI_CONFIGURATION_DATA_PORT + (UINT16)(Address & 2), @@ -681,8 +680,8 @@ PciCf8Write16 ( UINT16 EFIAPI PciCf8Or16 ( - IN UINTN Address, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 OrData ) { BOOLEAN InterruptState; @@ -691,7 +690,7 @@ PciCf8Or16 ( ASSERT_INVALID_PCI_ADDRESS (Address, 1); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoOr16 ( PCI_CONFIGURATION_DATA_PORT + (UINT16)(Address & 2), @@ -727,8 +726,8 @@ PciCf8Or16 ( UINT16 EFIAPI PciCf8And16 ( - IN UINTN Address, - IN UINT16 AndData + IN UINTN Address, + IN UINT16 AndData ) { BOOLEAN InterruptState; @@ -737,7 +736,7 @@ PciCf8And16 ( ASSERT_INVALID_PCI_ADDRESS (Address, 1); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoAnd16 ( PCI_CONFIGURATION_DATA_PORT + (UINT16)(Address & 2), @@ -775,9 +774,9 @@ PciCf8And16 ( UINT16 EFIAPI PciCf8AndThenOr16 ( - IN UINTN Address, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 AndData, + IN UINT16 OrData ) { BOOLEAN InterruptState; @@ -786,7 +785,7 @@ PciCf8AndThenOr16 ( ASSERT_INVALID_PCI_ADDRESS (Address, 1); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoAndThenOr16 ( PCI_CONFIGURATION_DATA_PORT + (UINT16)(Address & 2), @@ -824,9 +823,9 @@ PciCf8AndThenOr16 ( UINT16 EFIAPI PciCf8BitFieldRead16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { BOOLEAN InterruptState; @@ -835,7 +834,7 @@ PciCf8BitFieldRead16 ( ASSERT_INVALID_PCI_ADDRESS (Address, 1); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoBitFieldRead16 ( PCI_CONFIGURATION_DATA_PORT + (UINT16)(Address & 2), @@ -876,10 +875,10 @@ PciCf8BitFieldRead16 ( UINT16 EFIAPI PciCf8BitFieldWrite16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ) { BOOLEAN InterruptState; @@ -888,7 +887,7 @@ PciCf8BitFieldWrite16 ( ASSERT_INVALID_PCI_ADDRESS (Address, 1); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoBitFieldWrite16 ( PCI_CONFIGURATION_DATA_PORT + (UINT16)(Address & 2), @@ -933,10 +932,10 @@ PciCf8BitFieldWrite16 ( UINT16 EFIAPI PciCf8BitFieldOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ) { BOOLEAN InterruptState; @@ -945,7 +944,7 @@ PciCf8BitFieldOr16 ( ASSERT_INVALID_PCI_ADDRESS (Address, 1); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoBitFieldOr16 ( PCI_CONFIGURATION_DATA_PORT + (UINT16)(Address & 2), @@ -990,10 +989,10 @@ PciCf8BitFieldOr16 ( UINT16 EFIAPI PciCf8BitFieldAnd16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ) { BOOLEAN InterruptState; @@ -1002,7 +1001,7 @@ PciCf8BitFieldAnd16 ( ASSERT_INVALID_PCI_ADDRESS (Address, 1); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoBitFieldAnd16 ( PCI_CONFIGURATION_DATA_PORT + (UINT16)(Address & 2), @@ -1050,12 +1049,12 @@ PciCf8BitFieldAnd16 ( **/ UINT16 EFIAPI -PciCf8BitFieldAndThenOr16( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData +PciCf8BitFieldAndThenOr16 ( + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ) { BOOLEAN InterruptState; @@ -1064,7 +1063,7 @@ PciCf8BitFieldAndThenOr16( ASSERT_INVALID_PCI_ADDRESS (Address, 1); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoBitFieldAndThenOr16 ( PCI_CONFIGURATION_DATA_PORT + (UINT16)(Address & 2), @@ -1098,7 +1097,7 @@ PciCf8BitFieldAndThenOr16( UINT32 EFIAPI PciCf8Read32 ( - IN UINTN Address + IN UINTN Address ) { BOOLEAN InterruptState; @@ -1107,7 +1106,7 @@ PciCf8Read32 ( ASSERT_INVALID_PCI_ADDRESS (Address, 3); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoRead32 (PCI_CONFIGURATION_DATA_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, AddressPort); @@ -1136,8 +1135,8 @@ PciCf8Read32 ( UINT32 EFIAPI PciCf8Write32 ( - IN UINTN Address, - IN UINT32 Value + IN UINTN Address, + IN UINT32 Value ) { BOOLEAN InterruptState; @@ -1146,7 +1145,7 @@ PciCf8Write32 ( ASSERT_INVALID_PCI_ADDRESS (Address, 3); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoWrite32 ( PCI_CONFIGURATION_DATA_PORT, @@ -1182,8 +1181,8 @@ PciCf8Write32 ( UINT32 EFIAPI PciCf8Or32 ( - IN UINTN Address, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 OrData ) { BOOLEAN InterruptState; @@ -1192,7 +1191,7 @@ PciCf8Or32 ( ASSERT_INVALID_PCI_ADDRESS (Address, 3); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoOr32 ( PCI_CONFIGURATION_DATA_PORT, @@ -1228,8 +1227,8 @@ PciCf8Or32 ( UINT32 EFIAPI PciCf8And32 ( - IN UINTN Address, - IN UINT32 AndData + IN UINTN Address, + IN UINT32 AndData ) { BOOLEAN InterruptState; @@ -1238,7 +1237,7 @@ PciCf8And32 ( ASSERT_INVALID_PCI_ADDRESS (Address, 3); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoAnd32 ( PCI_CONFIGURATION_DATA_PORT, @@ -1276,9 +1275,9 @@ PciCf8And32 ( UINT32 EFIAPI PciCf8AndThenOr32 ( - IN UINTN Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 AndData, + IN UINT32 OrData ) { BOOLEAN InterruptState; @@ -1287,7 +1286,7 @@ PciCf8AndThenOr32 ( ASSERT_INVALID_PCI_ADDRESS (Address, 3); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoAndThenOr32 ( PCI_CONFIGURATION_DATA_PORT, @@ -1325,9 +1324,9 @@ PciCf8AndThenOr32 ( UINT32 EFIAPI PciCf8BitFieldRead32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { BOOLEAN InterruptState; @@ -1336,7 +1335,7 @@ PciCf8BitFieldRead32 ( ASSERT_INVALID_PCI_ADDRESS (Address, 3); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoBitFieldRead32 ( PCI_CONFIGURATION_DATA_PORT, @@ -1377,10 +1376,10 @@ PciCf8BitFieldRead32 ( UINT32 EFIAPI PciCf8BitFieldWrite32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { BOOLEAN InterruptState; @@ -1389,7 +1388,7 @@ PciCf8BitFieldWrite32 ( ASSERT_INVALID_PCI_ADDRESS (Address, 3); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoBitFieldWrite32 ( PCI_CONFIGURATION_DATA_PORT, @@ -1434,10 +1433,10 @@ PciCf8BitFieldWrite32 ( UINT32 EFIAPI PciCf8BitFieldOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { BOOLEAN InterruptState; @@ -1446,7 +1445,7 @@ PciCf8BitFieldOr32 ( ASSERT_INVALID_PCI_ADDRESS (Address, 3); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoBitFieldOr32 ( PCI_CONFIGURATION_DATA_PORT, @@ -1491,10 +1490,10 @@ PciCf8BitFieldOr32 ( UINT32 EFIAPI PciCf8BitFieldAnd32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { BOOLEAN InterruptState; @@ -1503,7 +1502,7 @@ PciCf8BitFieldAnd32 ( ASSERT_INVALID_PCI_ADDRESS (Address, 3); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoBitFieldAnd32 ( PCI_CONFIGURATION_DATA_PORT, @@ -1551,12 +1550,12 @@ PciCf8BitFieldAnd32 ( **/ UINT32 EFIAPI -PciCf8BitFieldAndThenOr32( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData +PciCf8BitFieldAndThenOr32 ( + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { BOOLEAN InterruptState; @@ -1565,15 +1564,15 @@ PciCf8BitFieldAndThenOr32( ASSERT_INVALID_PCI_ADDRESS (Address, 3); InterruptState = SaveAndDisableInterrupts (); - AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); + AddressPort = IoRead32 (PCI_CONFIGURATION_ADDRESS_PORT); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, PCI_TO_CF8_ADDRESS (Address)); Result = IoBitFieldAndThenOr32 ( - PCI_CONFIGURATION_DATA_PORT, - StartBit, - EndBit, - AndData, - OrData - ); + PCI_CONFIGURATION_DATA_PORT, + StartBit, + EndBit, + AndData, + OrData + ); IoWrite32 (PCI_CONFIGURATION_ADDRESS_PORT, AddressPort); SetInterruptState (InterruptState); return Result; @@ -1606,12 +1605,12 @@ PciCf8BitFieldAndThenOr32( UINTN EFIAPI PciCf8ReadBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - OUT VOID *Buffer + IN UINTN StartAddress, + IN UINTN Size, + OUT VOID *Buffer ) { - UINTN ReturnValue; + UINTN ReturnValue; ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0); ASSERT (((StartAddress & 0xFFF) + Size) <= 0x100); @@ -1632,40 +1631,40 @@ PciCf8ReadBuffer ( // Read a byte if StartAddress is byte aligned // *(volatile UINT8 *)Buffer = PciCf8Read8 (StartAddress); - StartAddress += sizeof (UINT8); - Size -= sizeof (UINT8); - Buffer = (UINT8*)Buffer + 1; + StartAddress += sizeof (UINT8); + Size -= sizeof (UINT8); + Buffer = (UINT8 *)Buffer + 1; } - if (Size >= sizeof (UINT16) && (StartAddress & 2) != 0) { + if ((Size >= sizeof (UINT16)) && ((StartAddress & 2) != 0)) { // // Read a word if StartAddress is word aligned // - WriteUnaligned16 ((UINT16 *)Buffer, (UINT16) PciCf8Read16 (StartAddress)); + WriteUnaligned16 ((UINT16 *)Buffer, (UINT16)PciCf8Read16 (StartAddress)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } while (Size >= sizeof (UINT32)) { // // Read as many double words as possible // - WriteUnaligned32 ((UINT32 *)Buffer, (UINT32) PciCf8Read32 (StartAddress)); + WriteUnaligned32 ((UINT32 *)Buffer, (UINT32)PciCf8Read32 (StartAddress)); StartAddress += sizeof (UINT32); - Size -= sizeof (UINT32); - Buffer = (UINT32*)Buffer + 1; + Size -= sizeof (UINT32); + Buffer = (UINT32 *)Buffer + 1; } if (Size >= sizeof (UINT16)) { // // Read the last remaining word if exist // - WriteUnaligned16 ((UINT16 *)Buffer, (UINT16) PciCf8Read16 (StartAddress)); + WriteUnaligned16 ((UINT16 *)Buffer, (UINT16)PciCf8Read16 (StartAddress)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } if (Size >= sizeof (UINT8)) { @@ -1706,12 +1705,12 @@ PciCf8ReadBuffer ( UINTN EFIAPI PciCf8WriteBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - IN VOID *Buffer + IN UINTN StartAddress, + IN UINTN Size, + IN VOID *Buffer ) { - UINTN ReturnValue; + UINTN ReturnValue; ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0); ASSERT (((StartAddress & 0xFFF) + Size) <= 0x100); @@ -1731,47 +1730,47 @@ PciCf8WriteBuffer ( // // Write a byte if StartAddress is byte aligned // - PciCf8Write8 (StartAddress, *(UINT8*)Buffer); + PciCf8Write8 (StartAddress, *(UINT8 *)Buffer); StartAddress += sizeof (UINT8); - Size -= sizeof (UINT8); - Buffer = (UINT8*)Buffer + 1; + Size -= sizeof (UINT8); + Buffer = (UINT8 *)Buffer + 1; } - if (Size >= sizeof (UINT16) && (StartAddress & 2) != 0) { + if ((Size >= sizeof (UINT16)) && ((StartAddress & 2) != 0)) { // // Write a word if StartAddress is word aligned // - PciCf8Write16 (StartAddress, ReadUnaligned16 ((UINT16*)Buffer)); + PciCf8Write16 (StartAddress, ReadUnaligned16 ((UINT16 *)Buffer)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } while (Size >= sizeof (UINT32)) { // // Write as many double words as possible // - PciCf8Write32 (StartAddress, ReadUnaligned32 ((UINT32*)Buffer)); + PciCf8Write32 (StartAddress, ReadUnaligned32 ((UINT32 *)Buffer)); StartAddress += sizeof (UINT32); - Size -= sizeof (UINT32); - Buffer = (UINT32*)Buffer + 1; + Size -= sizeof (UINT32); + Buffer = (UINT32 *)Buffer + 1; } if (Size >= sizeof (UINT16)) { // // Write the last remaining word if exist // - PciCf8Write16 (StartAddress, ReadUnaligned16 ((UINT16*)Buffer)); + PciCf8Write16 (StartAddress, ReadUnaligned16 ((UINT16 *)Buffer)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } if (Size >= sizeof (UINT8)) { // // Write the last remaining byte if exist // - PciCf8Write8 (StartAddress, *(UINT8*)Buffer); + PciCf8Write8 (StartAddress, *(UINT8 *)Buffer); } return ReturnValue; diff --git a/MdePkg/Library/BasePciExpressLib/PciExpressLib.c b/MdePkg/Library/BasePciExpressLib/PciExpressLib.c index 910dd75..df937ec 100644 --- a/MdePkg/Library/BasePciExpressLib/PciExpressLib.c +++ b/MdePkg/Library/BasePciExpressLib/PciExpressLib.c @@ -10,7 +10,6 @@ **/ - #include #include @@ -19,7 +18,6 @@ #include #include - /** Assert the validity of a PCI address. A valid PCI address should contain 1's only in the low 28 bits. PcdPciExpressBaseSize limits the size to the real @@ -72,12 +70,12 @@ PciExpressRegisterForRuntimeAccess ( @return The base address of PCI Express. **/ -VOID* +VOID * GetPciExpressBaseAddress ( VOID ) { - return (VOID*)(UINTN) PcdGet64 (PcdPciExpressBaseAddress); + return (VOID *)(UINTN)PcdGet64 (PcdPciExpressBaseAddress); } /** @@ -95,7 +93,7 @@ PcdPciExpressBaseSize ( VOID ) { - return (UINTN) PcdGet64 (PcdPciExpressBaseSize); + return (UINTN)PcdGet64 (PcdPciExpressBaseSize); } /** @@ -117,14 +115,15 @@ PcdPciExpressBaseSize ( UINT8 EFIAPI PciExpressRead8 ( - IN UINTN Address + IN UINTN Address ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT8) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT8)-1; } - return MmioRead8 ((UINTN) GetPciExpressBaseAddress () + Address); + + return MmioRead8 ((UINTN)GetPciExpressBaseAddress () + Address); } /** @@ -147,15 +146,16 @@ PciExpressRead8 ( UINT8 EFIAPI PciExpressWrite8 ( - IN UINTN Address, - IN UINT8 Value + IN UINTN Address, + IN UINT8 Value ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT8) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT8)-1; } - return MmioWrite8 ((UINTN) GetPciExpressBaseAddress () + Address, Value); + + return MmioWrite8 ((UINTN)GetPciExpressBaseAddress () + Address, Value); } /** @@ -182,15 +182,16 @@ PciExpressWrite8 ( UINT8 EFIAPI PciExpressOr8 ( - IN UINTN Address, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 OrData ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT8) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT8)-1; } - return MmioOr8 ((UINTN) GetPciExpressBaseAddress () + Address, OrData); + + return MmioOr8 ((UINTN)GetPciExpressBaseAddress () + Address, OrData); } /** @@ -217,15 +218,16 @@ PciExpressOr8 ( UINT8 EFIAPI PciExpressAnd8 ( - IN UINTN Address, - IN UINT8 AndData + IN UINTN Address, + IN UINT8 AndData ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT8) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT8)-1; } - return MmioAnd8 ((UINTN) GetPciExpressBaseAddress () + Address, AndData); + + return MmioAnd8 ((UINTN)GetPciExpressBaseAddress () + Address, AndData); } /** @@ -254,17 +256,18 @@ PciExpressAnd8 ( UINT8 EFIAPI PciExpressAndThenOr8 ( - IN UINTN Address, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 AndData, + IN UINT8 OrData ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT8) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT8)-1; } + return MmioAndThenOr8 ( - (UINTN) GetPciExpressBaseAddress () + Address, + (UINTN)GetPciExpressBaseAddress () + Address, AndData, OrData ); @@ -296,17 +299,18 @@ PciExpressAndThenOr8 ( UINT8 EFIAPI PciExpressBitFieldRead8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT8) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT8)-1; } + return MmioBitFieldRead8 ( - (UINTN) GetPciExpressBaseAddress () + Address, + (UINTN)GetPciExpressBaseAddress () + Address, StartBit, EndBit ); @@ -340,18 +344,19 @@ PciExpressBitFieldRead8 ( UINT8 EFIAPI PciExpressBitFieldWrite8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT8) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT8)-1; } + return MmioBitFieldWrite8 ( - (UINTN) GetPciExpressBaseAddress () + Address, + (UINTN)GetPciExpressBaseAddress () + Address, StartBit, EndBit, Value @@ -389,18 +394,19 @@ PciExpressBitFieldWrite8 ( UINT8 EFIAPI PciExpressBitFieldOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT8) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT8)-1; } + return MmioBitFieldOr8 ( - (UINTN) GetPciExpressBaseAddress () + Address, + (UINTN)GetPciExpressBaseAddress () + Address, StartBit, EndBit, OrData @@ -438,18 +444,19 @@ PciExpressBitFieldOr8 ( UINT8 EFIAPI PciExpressBitFieldAnd8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT8) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT8)-1; } + return MmioBitFieldAnd8 ( - (UINTN) GetPciExpressBaseAddress () + Address, + (UINTN)GetPciExpressBaseAddress () + Address, StartBit, EndBit, AndData @@ -491,19 +498,20 @@ PciExpressBitFieldAnd8 ( UINT8 EFIAPI PciExpressBitFieldAndThenOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT8) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT8)-1; } + return MmioBitFieldAndThenOr8 ( - (UINTN) GetPciExpressBaseAddress () + Address, + (UINTN)GetPciExpressBaseAddress () + Address, StartBit, EndBit, AndData, @@ -531,14 +539,15 @@ PciExpressBitFieldAndThenOr8 ( UINT16 EFIAPI PciExpressRead16 ( - IN UINTN Address + IN UINTN Address ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT16) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT16)-1; } - return MmioRead16 ((UINTN) GetPciExpressBaseAddress () + Address); + + return MmioRead16 ((UINTN)GetPciExpressBaseAddress () + Address); } /** @@ -562,15 +571,16 @@ PciExpressRead16 ( UINT16 EFIAPI PciExpressWrite16 ( - IN UINTN Address, - IN UINT16 Value + IN UINTN Address, + IN UINT16 Value ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT16) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT16)-1; } - return MmioWrite16 ((UINTN) GetPciExpressBaseAddress () + Address, Value); + + return MmioWrite16 ((UINTN)GetPciExpressBaseAddress () + Address, Value); } /** @@ -598,15 +608,16 @@ PciExpressWrite16 ( UINT16 EFIAPI PciExpressOr16 ( - IN UINTN Address, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 OrData ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT16) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT16)-1; } - return MmioOr16 ((UINTN) GetPciExpressBaseAddress () + Address, OrData); + + return MmioOr16 ((UINTN)GetPciExpressBaseAddress () + Address, OrData); } /** @@ -634,15 +645,16 @@ PciExpressOr16 ( UINT16 EFIAPI PciExpressAnd16 ( - IN UINTN Address, - IN UINT16 AndData + IN UINTN Address, + IN UINT16 AndData ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT16) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT16)-1; } - return MmioAnd16 ((UINTN) GetPciExpressBaseAddress () + Address, AndData); + + return MmioAnd16 ((UINTN)GetPciExpressBaseAddress () + Address, AndData); } /** @@ -672,17 +684,18 @@ PciExpressAnd16 ( UINT16 EFIAPI PciExpressAndThenOr16 ( - IN UINTN Address, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 AndData, + IN UINT16 OrData ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT16) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT16)-1; } + return MmioAndThenOr16 ( - (UINTN) GetPciExpressBaseAddress () + Address, + (UINTN)GetPciExpressBaseAddress () + Address, AndData, OrData ); @@ -715,17 +728,18 @@ PciExpressAndThenOr16 ( UINT16 EFIAPI PciExpressBitFieldRead16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT16) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT16)-1; } + return MmioBitFieldRead16 ( - (UINTN) GetPciExpressBaseAddress () + Address, + (UINTN)GetPciExpressBaseAddress () + Address, StartBit, EndBit ); @@ -760,18 +774,19 @@ PciExpressBitFieldRead16 ( UINT16 EFIAPI PciExpressBitFieldWrite16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT16) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT16)-1; } + return MmioBitFieldWrite16 ( - (UINTN) GetPciExpressBaseAddress () + Address, + (UINTN)GetPciExpressBaseAddress () + Address, StartBit, EndBit, Value @@ -810,18 +825,19 @@ PciExpressBitFieldWrite16 ( UINT16 EFIAPI PciExpressBitFieldOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT16) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT16)-1; } + return MmioBitFieldOr16 ( - (UINTN) GetPciExpressBaseAddress () + Address, + (UINTN)GetPciExpressBaseAddress () + Address, StartBit, EndBit, OrData @@ -860,18 +876,19 @@ PciExpressBitFieldOr16 ( UINT16 EFIAPI PciExpressBitFieldAnd16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT16) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT16)-1; } + return MmioBitFieldAnd16 ( - (UINTN) GetPciExpressBaseAddress () + Address, + (UINTN)GetPciExpressBaseAddress () + Address, StartBit, EndBit, AndData @@ -914,19 +931,20 @@ PciExpressBitFieldAnd16 ( UINT16 EFIAPI PciExpressBitFieldAndThenOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT16) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT16)-1; } + return MmioBitFieldAndThenOr16 ( - (UINTN) GetPciExpressBaseAddress () + Address, + (UINTN)GetPciExpressBaseAddress () + Address, StartBit, EndBit, AndData, @@ -954,14 +972,15 @@ PciExpressBitFieldAndThenOr16 ( UINT32 EFIAPI PciExpressRead32 ( - IN UINTN Address + IN UINTN Address ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT32) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT32)-1; } - return MmioRead32 ((UINTN) GetPciExpressBaseAddress () + Address); + + return MmioRead32 ((UINTN)GetPciExpressBaseAddress () + Address); } /** @@ -985,15 +1004,16 @@ PciExpressRead32 ( UINT32 EFIAPI PciExpressWrite32 ( - IN UINTN Address, - IN UINT32 Value + IN UINTN Address, + IN UINT32 Value ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT32) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT32)-1; } - return MmioWrite32 ((UINTN) GetPciExpressBaseAddress () + Address, Value); + + return MmioWrite32 ((UINTN)GetPciExpressBaseAddress () + Address, Value); } /** @@ -1021,15 +1041,16 @@ PciExpressWrite32 ( UINT32 EFIAPI PciExpressOr32 ( - IN UINTN Address, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 OrData ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT32) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT32)-1; } - return MmioOr32 ((UINTN) GetPciExpressBaseAddress () + Address, OrData); + + return MmioOr32 ((UINTN)GetPciExpressBaseAddress () + Address, OrData); } /** @@ -1057,15 +1078,16 @@ PciExpressOr32 ( UINT32 EFIAPI PciExpressAnd32 ( - IN UINTN Address, - IN UINT32 AndData + IN UINTN Address, + IN UINT32 AndData ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT32) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT32)-1; } - return MmioAnd32 ((UINTN) GetPciExpressBaseAddress () + Address, AndData); + + return MmioAnd32 ((UINTN)GetPciExpressBaseAddress () + Address, AndData); } /** @@ -1095,17 +1117,18 @@ PciExpressAnd32 ( UINT32 EFIAPI PciExpressAndThenOr32 ( - IN UINTN Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 AndData, + IN UINT32 OrData ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT32) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT32)-1; } + return MmioAndThenOr32 ( - (UINTN) GetPciExpressBaseAddress () + Address, + (UINTN)GetPciExpressBaseAddress () + Address, AndData, OrData ); @@ -1138,17 +1161,18 @@ PciExpressAndThenOr32 ( UINT32 EFIAPI PciExpressBitFieldRead32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT32) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT32)-1; } + return MmioBitFieldRead32 ( - (UINTN) GetPciExpressBaseAddress () + Address, + (UINTN)GetPciExpressBaseAddress () + Address, StartBit, EndBit ); @@ -1183,18 +1207,19 @@ PciExpressBitFieldRead32 ( UINT32 EFIAPI PciExpressBitFieldWrite32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT32) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT32)-1; } + return MmioBitFieldWrite32 ( - (UINTN) GetPciExpressBaseAddress () + Address, + (UINTN)GetPciExpressBaseAddress () + Address, StartBit, EndBit, Value @@ -1233,18 +1258,19 @@ PciExpressBitFieldWrite32 ( UINT32 EFIAPI PciExpressBitFieldOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT32) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT32)-1; } + return MmioBitFieldOr32 ( - (UINTN) GetPciExpressBaseAddress () + Address, + (UINTN)GetPciExpressBaseAddress () + Address, StartBit, EndBit, OrData @@ -1283,18 +1309,19 @@ PciExpressBitFieldOr32 ( UINT32 EFIAPI PciExpressBitFieldAnd32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT32) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT32)-1; } + return MmioBitFieldAnd32 ( - (UINTN) GetPciExpressBaseAddress () + Address, + (UINTN)GetPciExpressBaseAddress () + Address, StartBit, EndBit, AndData @@ -1337,19 +1364,20 @@ PciExpressBitFieldAnd32 ( UINT32 EFIAPI PciExpressBitFieldAndThenOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { ASSERT_INVALID_PCI_ADDRESS (Address); - if (Address >= PcdPciExpressBaseSize()) { - return (UINT32) -1; + if (Address >= PcdPciExpressBaseSize ()) { + return (UINT32)-1; } + return MmioBitFieldAndThenOr32 ( - (UINTN) GetPciExpressBaseAddress () + Address, + (UINTN)GetPciExpressBaseAddress () + Address, StartBit, EndBit, AndData, @@ -1384,17 +1412,18 @@ PciExpressBitFieldAndThenOr32 ( UINTN EFIAPI PciExpressReadBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - OUT VOID *Buffer + IN UINTN StartAddress, + IN UINTN Size, + OUT VOID *Buffer ) { - UINTN ReturnValue; + UINTN ReturnValue; ASSERT_INVALID_PCI_ADDRESS (StartAddress); - if (StartAddress >= PcdPciExpressBaseSize()) { - return (UINTN) -1; + if (StartAddress >= PcdPciExpressBaseSize ()) { + return (UINTN)-1; } + ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000); if (Size == 0) { @@ -1413,41 +1442,41 @@ PciExpressReadBuffer ( // Read a byte if StartAddress is byte aligned // *(volatile UINT8 *)Buffer = PciExpressRead8 (StartAddress); - StartAddress += sizeof (UINT8); - Size -= sizeof (UINT8); - Buffer = (UINT8*)Buffer + 1; + StartAddress += sizeof (UINT8); + Size -= sizeof (UINT8); + Buffer = (UINT8 *)Buffer + 1; } - if (Size >= sizeof (UINT16) && (StartAddress & 2) != 0) { + if ((Size >= sizeof (UINT16)) && ((StartAddress & 2) != 0)) { // // Read a word if StartAddress is word aligned // - WriteUnaligned16 ((UINT16 *) Buffer, (UINT16) PciExpressRead16 (StartAddress)); + WriteUnaligned16 ((UINT16 *)Buffer, (UINT16)PciExpressRead16 (StartAddress)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } while (Size >= sizeof (UINT32)) { // // Read as many double words as possible // - WriteUnaligned32 ((UINT32 *) Buffer, (UINT32) PciExpressRead32 (StartAddress)); + WriteUnaligned32 ((UINT32 *)Buffer, (UINT32)PciExpressRead32 (StartAddress)); StartAddress += sizeof (UINT32); - Size -= sizeof (UINT32); - Buffer = (UINT32*)Buffer + 1; + Size -= sizeof (UINT32); + Buffer = (UINT32 *)Buffer + 1; } if (Size >= sizeof (UINT16)) { // // Read the last remaining word if exist // - WriteUnaligned16 ((UINT16 *) Buffer, (UINT16) PciExpressRead16 (StartAddress)); + WriteUnaligned16 ((UINT16 *)Buffer, (UINT16)PciExpressRead16 (StartAddress)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } if (Size >= sizeof (UINT8)) { @@ -1488,17 +1517,18 @@ PciExpressReadBuffer ( UINTN EFIAPI PciExpressWriteBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - IN VOID *Buffer + IN UINTN StartAddress, + IN UINTN Size, + IN VOID *Buffer ) { - UINTN ReturnValue; + UINTN ReturnValue; ASSERT_INVALID_PCI_ADDRESS (StartAddress); - if (StartAddress >= PcdPciExpressBaseSize()) { - return (UINTN) -1; + if (StartAddress >= PcdPciExpressBaseSize ()) { + return (UINTN)-1; } + ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000); if (Size == 0) { @@ -1516,47 +1546,47 @@ PciExpressWriteBuffer ( // // Write a byte if StartAddress is byte aligned // - PciExpressWrite8 (StartAddress, *(UINT8*)Buffer); + PciExpressWrite8 (StartAddress, *(UINT8 *)Buffer); StartAddress += sizeof (UINT8); - Size -= sizeof (UINT8); - Buffer = (UINT8*)Buffer + 1; + Size -= sizeof (UINT8); + Buffer = (UINT8 *)Buffer + 1; } - if (Size >= sizeof (UINT16) && (StartAddress & 2) != 0) { + if ((Size >= sizeof (UINT16)) && ((StartAddress & 2) != 0)) { // // Write a word if StartAddress is word aligned // - PciExpressWrite16 (StartAddress, ReadUnaligned16 ((UINT16*)Buffer)); + PciExpressWrite16 (StartAddress, ReadUnaligned16 ((UINT16 *)Buffer)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } while (Size >= sizeof (UINT32)) { // // Write as many double words as possible // - PciExpressWrite32 (StartAddress, ReadUnaligned32 ((UINT32*)Buffer)); + PciExpressWrite32 (StartAddress, ReadUnaligned32 ((UINT32 *)Buffer)); StartAddress += sizeof (UINT32); - Size -= sizeof (UINT32); - Buffer = (UINT32*)Buffer + 1; + Size -= sizeof (UINT32); + Buffer = (UINT32 *)Buffer + 1; } if (Size >= sizeof (UINT16)) { // // Write the last remaining word if exist // - PciExpressWrite16 (StartAddress, ReadUnaligned16 ((UINT16*)Buffer)); + PciExpressWrite16 (StartAddress, ReadUnaligned16 ((UINT16 *)Buffer)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } if (Size >= sizeof (UINT8)) { // // Write the last remaining byte if exist // - PciExpressWrite8 (StartAddress, *(UINT8*)Buffer); + PciExpressWrite8 (StartAddress, *(UINT8 *)Buffer); } return ReturnValue; diff --git a/MdePkg/Library/BasePciLibCf8/PciLib.c b/MdePkg/Library/BasePciLibCf8/PciLib.c index a2eb4d9..74cece0 100644 --- a/MdePkg/Library/BasePciLibCf8/PciLib.c +++ b/MdePkg/Library/BasePciLibCf8/PciLib.c @@ -7,7 +7,6 @@ **/ - #include #include @@ -61,7 +60,7 @@ PciRegisterForRuntimeAccess ( UINT8 EFIAPI PciRead8 ( - IN UINTN Address + IN UINTN Address ) { return PciCf8Read8 (Address); @@ -86,8 +85,8 @@ PciRead8 ( UINT8 EFIAPI PciWrite8 ( - IN UINTN Address, - IN UINT8 Value + IN UINTN Address, + IN UINT8 Value ) { return PciCf8Write8 (Address, Value); @@ -116,8 +115,8 @@ PciWrite8 ( UINT8 EFIAPI PciOr8 ( - IN UINTN Address, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 OrData ) { return PciCf8Or8 (Address, OrData); @@ -146,8 +145,8 @@ PciOr8 ( UINT8 EFIAPI PciAnd8 ( - IN UINTN Address, - IN UINT8 AndData + IN UINTN Address, + IN UINT8 AndData ) { return PciCf8And8 (Address, AndData); @@ -178,9 +177,9 @@ PciAnd8 ( UINT8 EFIAPI PciAndThenOr8 ( - IN UINTN Address, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 AndData, + IN UINT8 OrData ) { return PciCf8AndThenOr8 (Address, AndData, OrData); @@ -210,9 +209,9 @@ PciAndThenOr8 ( UINT8 EFIAPI PciBitFieldRead8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return PciCf8BitFieldRead8 (Address, StartBit, EndBit); @@ -245,10 +244,10 @@ PciBitFieldRead8 ( UINT8 EFIAPI PciBitFieldWrite8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) { return PciCf8BitFieldWrite8 (Address, StartBit, EndBit, Value); @@ -284,10 +283,10 @@ PciBitFieldWrite8 ( UINT8 EFIAPI PciBitFieldOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) { return PciCf8BitFieldOr8 (Address, StartBit, EndBit, OrData); @@ -323,10 +322,10 @@ PciBitFieldOr8 ( UINT8 EFIAPI PciBitFieldAnd8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ) { return PciCf8BitFieldAnd8 (Address, StartBit, EndBit, AndData); @@ -366,11 +365,11 @@ PciBitFieldAnd8 ( UINT8 EFIAPI PciBitFieldAndThenOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) { return PciCf8BitFieldAndThenOr8 (Address, StartBit, EndBit, AndData, OrData); @@ -395,7 +394,7 @@ PciBitFieldAndThenOr8 ( UINT16 EFIAPI PciRead16 ( - IN UINTN Address + IN UINTN Address ) { return PciCf8Read16 (Address); @@ -421,8 +420,8 @@ PciRead16 ( UINT16 EFIAPI PciWrite16 ( - IN UINTN Address, - IN UINT16 Value + IN UINTN Address, + IN UINT16 Value ) { return PciCf8Write16 (Address, Value); @@ -452,8 +451,8 @@ PciWrite16 ( UINT16 EFIAPI PciOr16 ( - IN UINTN Address, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 OrData ) { return PciCf8Or16 (Address, OrData); @@ -483,8 +482,8 @@ PciOr16 ( UINT16 EFIAPI PciAnd16 ( - IN UINTN Address, - IN UINT16 AndData + IN UINTN Address, + IN UINT16 AndData ) { return PciCf8And16 (Address, AndData); @@ -516,9 +515,9 @@ PciAnd16 ( UINT16 EFIAPI PciAndThenOr16 ( - IN UINTN Address, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 AndData, + IN UINT16 OrData ) { return PciCf8AndThenOr16 (Address, AndData, OrData); @@ -549,9 +548,9 @@ PciAndThenOr16 ( UINT16 EFIAPI PciBitFieldRead16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return PciCf8BitFieldRead16 (Address, StartBit, EndBit); @@ -585,10 +584,10 @@ PciBitFieldRead16 ( UINT16 EFIAPI PciBitFieldWrite16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ) { return PciCf8BitFieldWrite16 (Address, StartBit, EndBit, Value); @@ -625,10 +624,10 @@ PciBitFieldWrite16 ( UINT16 EFIAPI PciBitFieldOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ) { return PciCf8BitFieldOr16 (Address, StartBit, EndBit, OrData); @@ -665,10 +664,10 @@ PciBitFieldOr16 ( UINT16 EFIAPI PciBitFieldAnd16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ) { return PciCf8BitFieldAnd16 (Address, StartBit, EndBit, AndData); @@ -709,11 +708,11 @@ PciBitFieldAnd16 ( UINT16 EFIAPI PciBitFieldAndThenOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ) { return PciCf8BitFieldAndThenOr16 (Address, StartBit, EndBit, AndData, OrData); @@ -738,7 +737,7 @@ PciBitFieldAndThenOr16 ( UINT32 EFIAPI PciRead32 ( - IN UINTN Address + IN UINTN Address ) { return PciCf8Read32 (Address); @@ -764,8 +763,8 @@ PciRead32 ( UINT32 EFIAPI PciWrite32 ( - IN UINTN Address, - IN UINT32 Value + IN UINTN Address, + IN UINT32 Value ) { return PciCf8Write32 (Address, Value); @@ -795,8 +794,8 @@ PciWrite32 ( UINT32 EFIAPI PciOr32 ( - IN UINTN Address, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 OrData ) { return PciCf8Or32 (Address, OrData); @@ -826,8 +825,8 @@ PciOr32 ( UINT32 EFIAPI PciAnd32 ( - IN UINTN Address, - IN UINT32 AndData + IN UINTN Address, + IN UINT32 AndData ) { return PciCf8And32 (Address, AndData); @@ -859,9 +858,9 @@ PciAnd32 ( UINT32 EFIAPI PciAndThenOr32 ( - IN UINTN Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 AndData, + IN UINT32 OrData ) { return PciCf8AndThenOr32 (Address, AndData, OrData); @@ -892,9 +891,9 @@ PciAndThenOr32 ( UINT32 EFIAPI PciBitFieldRead32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return PciCf8BitFieldRead32 (Address, StartBit, EndBit); @@ -928,10 +927,10 @@ PciBitFieldRead32 ( UINT32 EFIAPI PciBitFieldWrite32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { return PciCf8BitFieldWrite32 (Address, StartBit, EndBit, Value); @@ -968,10 +967,10 @@ PciBitFieldWrite32 ( UINT32 EFIAPI PciBitFieldOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { return PciCf8BitFieldOr32 (Address, StartBit, EndBit, OrData); @@ -1008,10 +1007,10 @@ PciBitFieldOr32 ( UINT32 EFIAPI PciBitFieldAnd32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { return PciCf8BitFieldAnd32 (Address, StartBit, EndBit, AndData); @@ -1052,11 +1051,11 @@ PciBitFieldAnd32 ( UINT32 EFIAPI PciBitFieldAndThenOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { return PciCf8BitFieldAndThenOr32 (Address, StartBit, EndBit, AndData, OrData); @@ -1088,9 +1087,9 @@ PciBitFieldAndThenOr32 ( UINTN EFIAPI PciReadBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - OUT VOID *Buffer + IN UINTN StartAddress, + IN UINTN Size, + OUT VOID *Buffer ) { return PciCf8ReadBuffer (StartAddress, Size, Buffer); @@ -1123,9 +1122,9 @@ PciReadBuffer ( UINTN EFIAPI PciWriteBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - IN VOID *Buffer + IN UINTN StartAddress, + IN UINTN Size, + IN VOID *Buffer ) { return PciCf8WriteBuffer (StartAddress, Size, Buffer); diff --git a/MdePkg/Library/BasePciLibPciExpress/PciLib.c b/MdePkg/Library/BasePciLibPciExpress/PciLib.c index 00dd31c..1f037f7 100644 --- a/MdePkg/Library/BasePciLibPciExpress/PciLib.c +++ b/MdePkg/Library/BasePciLibPciExpress/PciLib.c @@ -7,7 +7,6 @@ **/ - #include #include @@ -61,7 +60,7 @@ PciRegisterForRuntimeAccess ( UINT8 EFIAPI PciRead8 ( - IN UINTN Address + IN UINTN Address ) { return PciExpressRead8 (Address); @@ -86,8 +85,8 @@ PciRead8 ( UINT8 EFIAPI PciWrite8 ( - IN UINTN Address, - IN UINT8 Value + IN UINTN Address, + IN UINT8 Value ) { return PciExpressWrite8 (Address, Value); @@ -116,8 +115,8 @@ PciWrite8 ( UINT8 EFIAPI PciOr8 ( - IN UINTN Address, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 OrData ) { return PciExpressOr8 (Address, OrData); @@ -146,8 +145,8 @@ PciOr8 ( UINT8 EFIAPI PciAnd8 ( - IN UINTN Address, - IN UINT8 AndData + IN UINTN Address, + IN UINT8 AndData ) { return PciExpressAnd8 (Address, AndData); @@ -178,9 +177,9 @@ PciAnd8 ( UINT8 EFIAPI PciAndThenOr8 ( - IN UINTN Address, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 AndData, + IN UINT8 OrData ) { return PciExpressAndThenOr8 (Address, AndData, OrData); @@ -210,9 +209,9 @@ PciAndThenOr8 ( UINT8 EFIAPI PciBitFieldRead8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return PciExpressBitFieldRead8 (Address, StartBit, EndBit); @@ -245,10 +244,10 @@ PciBitFieldRead8 ( UINT8 EFIAPI PciBitFieldWrite8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) { return PciExpressBitFieldWrite8 (Address, StartBit, EndBit, Value); @@ -284,10 +283,10 @@ PciBitFieldWrite8 ( UINT8 EFIAPI PciBitFieldOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) { return PciExpressBitFieldOr8 (Address, StartBit, EndBit, OrData); @@ -323,10 +322,10 @@ PciBitFieldOr8 ( UINT8 EFIAPI PciBitFieldAnd8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ) { return PciExpressBitFieldAnd8 (Address, StartBit, EndBit, AndData); @@ -366,11 +365,11 @@ PciBitFieldAnd8 ( UINT8 EFIAPI PciBitFieldAndThenOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) { return PciExpressBitFieldAndThenOr8 (Address, StartBit, EndBit, AndData, OrData); @@ -395,7 +394,7 @@ PciBitFieldAndThenOr8 ( UINT16 EFIAPI PciRead16 ( - IN UINTN Address + IN UINTN Address ) { return PciExpressRead16 (Address); @@ -421,8 +420,8 @@ PciRead16 ( UINT16 EFIAPI PciWrite16 ( - IN UINTN Address, - IN UINT16 Value + IN UINTN Address, + IN UINT16 Value ) { return PciExpressWrite16 (Address, Value); @@ -452,8 +451,8 @@ PciWrite16 ( UINT16 EFIAPI PciOr16 ( - IN UINTN Address, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 OrData ) { return PciExpressOr16 (Address, OrData); @@ -483,8 +482,8 @@ PciOr16 ( UINT16 EFIAPI PciAnd16 ( - IN UINTN Address, - IN UINT16 AndData + IN UINTN Address, + IN UINT16 AndData ) { return PciExpressAnd16 (Address, AndData); @@ -516,9 +515,9 @@ PciAnd16 ( UINT16 EFIAPI PciAndThenOr16 ( - IN UINTN Address, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 AndData, + IN UINT16 OrData ) { return PciExpressAndThenOr16 (Address, AndData, OrData); @@ -549,9 +548,9 @@ PciAndThenOr16 ( UINT16 EFIAPI PciBitFieldRead16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return PciExpressBitFieldRead16 (Address, StartBit, EndBit); @@ -585,10 +584,10 @@ PciBitFieldRead16 ( UINT16 EFIAPI PciBitFieldWrite16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ) { return PciExpressBitFieldWrite16 (Address, StartBit, EndBit, Value); @@ -625,10 +624,10 @@ PciBitFieldWrite16 ( UINT16 EFIAPI PciBitFieldOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ) { return PciExpressBitFieldOr16 (Address, StartBit, EndBit, OrData); @@ -665,10 +664,10 @@ PciBitFieldOr16 ( UINT16 EFIAPI PciBitFieldAnd16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ) { return PciExpressBitFieldAnd16 (Address, StartBit, EndBit, AndData); @@ -709,11 +708,11 @@ PciBitFieldAnd16 ( UINT16 EFIAPI PciBitFieldAndThenOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ) { return PciExpressBitFieldAndThenOr16 (Address, StartBit, EndBit, AndData, OrData); @@ -738,7 +737,7 @@ PciBitFieldAndThenOr16 ( UINT32 EFIAPI PciRead32 ( - IN UINTN Address + IN UINTN Address ) { return PciExpressRead32 (Address); @@ -764,8 +763,8 @@ PciRead32 ( UINT32 EFIAPI PciWrite32 ( - IN UINTN Address, - IN UINT32 Value + IN UINTN Address, + IN UINT32 Value ) { return PciExpressWrite32 (Address, Value); @@ -795,8 +794,8 @@ PciWrite32 ( UINT32 EFIAPI PciOr32 ( - IN UINTN Address, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 OrData ) { return PciExpressOr32 (Address, OrData); @@ -826,8 +825,8 @@ PciOr32 ( UINT32 EFIAPI PciAnd32 ( - IN UINTN Address, - IN UINT32 AndData + IN UINTN Address, + IN UINT32 AndData ) { return PciExpressAnd32 (Address, AndData); @@ -859,9 +858,9 @@ PciAnd32 ( UINT32 EFIAPI PciAndThenOr32 ( - IN UINTN Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 AndData, + IN UINT32 OrData ) { return PciExpressAndThenOr32 (Address, AndData, OrData); @@ -892,9 +891,9 @@ PciAndThenOr32 ( UINT32 EFIAPI PciBitFieldRead32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return PciExpressBitFieldRead32 (Address, StartBit, EndBit); @@ -928,10 +927,10 @@ PciBitFieldRead32 ( UINT32 EFIAPI PciBitFieldWrite32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { return PciExpressBitFieldWrite32 (Address, StartBit, EndBit, Value); @@ -968,10 +967,10 @@ PciBitFieldWrite32 ( UINT32 EFIAPI PciBitFieldOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { return PciExpressBitFieldOr32 (Address, StartBit, EndBit, OrData); @@ -1008,10 +1007,10 @@ PciBitFieldOr32 ( UINT32 EFIAPI PciBitFieldAnd32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { return PciExpressBitFieldAnd32 (Address, StartBit, EndBit, AndData); @@ -1052,11 +1051,11 @@ PciBitFieldAnd32 ( UINT32 EFIAPI PciBitFieldAndThenOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { return PciExpressBitFieldAndThenOr32 (Address, StartBit, EndBit, AndData, OrData); @@ -1088,9 +1087,9 @@ PciBitFieldAndThenOr32 ( UINTN EFIAPI PciReadBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - OUT VOID *Buffer + IN UINTN StartAddress, + IN UINTN Size, + OUT VOID *Buffer ) { return PciExpressReadBuffer (StartAddress, Size, Buffer); @@ -1123,9 +1122,9 @@ PciReadBuffer ( UINTN EFIAPI PciWriteBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - IN VOID *Buffer + IN UINTN StartAddress, + IN UINTN Size, + IN VOID *Buffer ) { return PciExpressWriteBuffer (StartAddress, Size, Buffer); diff --git a/MdePkg/Library/BasePciSegmentLibPci/PciSegmentLib.c b/MdePkg/Library/BasePciSegmentLibPci/PciSegmentLib.c index 95cab4a..5946bdc 100644 --- a/MdePkg/Library/BasePciSegmentLibPci/PciSegmentLib.c +++ b/MdePkg/Library/BasePciSegmentLibPci/PciSegmentLib.c @@ -22,7 +22,7 @@ @param M Additional bits to assert to be zero. **/ -#define ASSERT_INVALID_PCI_SEGMENT_ADDRESS(A,M) \ +#define ASSERT_INVALID_PCI_SEGMENT_ADDRESS(A, M) \ ASSERT (((A) & (0xfffffffff0000000ULL | (M))) == 0) /** @@ -30,7 +30,7 @@ @param A The address to convert. **/ -#define PCI_SEGMENT_TO_PCI_ADDRESS(A) ((UINTN) (UINT32) A) +#define PCI_SEGMENT_TO_PCI_ADDRESS(A) ((UINTN) (UINT32) A) /** Register a PCI device so PCI configuration registers may be accessed after @@ -76,7 +76,7 @@ PciSegmentRegisterForRuntimeAccess ( UINT8 EFIAPI PciSegmentRead8 ( - IN UINT64 Address + IN UINT64 Address ) { ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 0); @@ -101,8 +101,8 @@ PciSegmentRead8 ( UINT8 EFIAPI PciSegmentWrite8 ( - IN UINT64 Address, - IN UINT8 Value + IN UINT64 Address, + IN UINT8 Value ) { ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 0); @@ -130,11 +130,11 @@ PciSegmentWrite8 ( UINT8 EFIAPI PciSegmentOr8 ( - IN UINT64 Address, - IN UINT8 OrData + IN UINT64 Address, + IN UINT8 OrData ) { - return PciWrite8 (PCI_SEGMENT_TO_PCI_ADDRESS (Address), (UINT8) (PciSegmentRead8 (Address) | OrData)); + return PciWrite8 (PCI_SEGMENT_TO_PCI_ADDRESS (Address), (UINT8)(PciSegmentRead8 (Address) | OrData)); } /** @@ -156,11 +156,11 @@ PciSegmentOr8 ( UINT8 EFIAPI PciSegmentAnd8 ( - IN UINT64 Address, - IN UINT8 AndData + IN UINT64 Address, + IN UINT8 AndData ) { - return PciSegmentWrite8 (Address, (UINT8) (PciSegmentRead8 (Address) & AndData)); + return PciSegmentWrite8 (Address, (UINT8)(PciSegmentRead8 (Address) & AndData)); } /** @@ -186,12 +186,12 @@ PciSegmentAnd8 ( UINT8 EFIAPI PciSegmentAndThenOr8 ( - IN UINT64 Address, - IN UINT8 AndData, - IN UINT8 OrData + IN UINT64 Address, + IN UINT8 AndData, + IN UINT8 OrData ) { - return PciSegmentWrite8 (Address, (UINT8) ((PciSegmentRead8 (Address) & AndData) | OrData)); + return PciSegmentWrite8 (Address, (UINT8)((PciSegmentRead8 (Address) & AndData) | OrData)); } /** @@ -218,9 +218,9 @@ PciSegmentAndThenOr8 ( UINT8 EFIAPI PciSegmentBitFieldRead8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead8 (PciSegmentRead8 (Address), StartBit, EndBit); @@ -253,10 +253,10 @@ PciSegmentBitFieldRead8 ( UINT8 EFIAPI PciSegmentBitFieldWrite8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) { return PciSegmentWrite8 ( @@ -295,10 +295,10 @@ PciSegmentBitFieldWrite8 ( UINT8 EFIAPI PciSegmentBitFieldOr8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) { return PciSegmentWrite8 ( @@ -337,10 +337,10 @@ PciSegmentBitFieldOr8 ( UINT8 EFIAPI PciSegmentBitFieldAnd8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ) { return PciSegmentWrite8 ( @@ -382,11 +382,11 @@ PciSegmentBitFieldAnd8 ( UINT8 EFIAPI PciSegmentBitFieldAndThenOr8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) { return PciSegmentWrite8 ( @@ -412,7 +412,7 @@ PciSegmentBitFieldAndThenOr8 ( UINT16 EFIAPI PciSegmentRead16 ( - IN UINT64 Address + IN UINT64 Address ) { ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 1); @@ -438,8 +438,8 @@ PciSegmentRead16 ( UINT16 EFIAPI PciSegmentWrite16 ( - IN UINT64 Address, - IN UINT16 Value + IN UINT64 Address, + IN UINT16 Value ) { ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 1); @@ -470,11 +470,11 @@ PciSegmentWrite16 ( UINT16 EFIAPI PciSegmentOr16 ( - IN UINT64 Address, - IN UINT16 OrData + IN UINT64 Address, + IN UINT16 OrData ) { - return PciSegmentWrite16 (Address, (UINT16) (PciSegmentRead16 (Address) | OrData)); + return PciSegmentWrite16 (Address, (UINT16)(PciSegmentRead16 (Address) | OrData)); } /** @@ -498,11 +498,11 @@ PciSegmentOr16 ( UINT16 EFIAPI PciSegmentAnd16 ( - IN UINT64 Address, - IN UINT16 AndData + IN UINT64 Address, + IN UINT16 AndData ) { - return PciSegmentWrite16 (Address, (UINT16) (PciSegmentRead16 (Address) & AndData)); + return PciSegmentWrite16 (Address, (UINT16)(PciSegmentRead16 (Address) & AndData)); } /** @@ -529,12 +529,12 @@ PciSegmentAnd16 ( UINT16 EFIAPI PciSegmentAndThenOr16 ( - IN UINT64 Address, - IN UINT16 AndData, - IN UINT16 OrData + IN UINT64 Address, + IN UINT16 AndData, + IN UINT16 OrData ) { - return PciSegmentWrite16 (Address, (UINT16) ((PciSegmentRead16 (Address) & AndData) | OrData)); + return PciSegmentWrite16 (Address, (UINT16)((PciSegmentRead16 (Address) & AndData) | OrData)); } /** @@ -562,9 +562,9 @@ PciSegmentAndThenOr16 ( UINT16 EFIAPI PciSegmentBitFieldRead16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead16 (PciSegmentRead16 (Address), StartBit, EndBit); @@ -598,10 +598,10 @@ PciSegmentBitFieldRead16 ( UINT16 EFIAPI PciSegmentBitFieldWrite16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ) { return PciSegmentWrite16 ( @@ -641,10 +641,10 @@ PciSegmentBitFieldWrite16 ( UINT16 EFIAPI PciSegmentBitFieldOr16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ) { return PciSegmentWrite16 ( @@ -684,10 +684,10 @@ PciSegmentBitFieldOr16 ( UINT16 EFIAPI PciSegmentBitFieldAnd16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ) { return PciSegmentWrite16 ( @@ -730,11 +730,11 @@ PciSegmentBitFieldAnd16 ( UINT16 EFIAPI PciSegmentBitFieldAndThenOr16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ) { return PciSegmentWrite16 ( @@ -760,7 +760,7 @@ PciSegmentBitFieldAndThenOr16 ( UINT32 EFIAPI PciSegmentRead32 ( - IN UINT64 Address + IN UINT64 Address ) { ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 3); @@ -786,8 +786,8 @@ PciSegmentRead32 ( UINT32 EFIAPI PciSegmentWrite32 ( - IN UINT64 Address, - IN UINT32 Value + IN UINT64 Address, + IN UINT32 Value ) { ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 3); @@ -816,8 +816,8 @@ PciSegmentWrite32 ( UINT32 EFIAPI PciSegmentOr32 ( - IN UINT64 Address, - IN UINT32 OrData + IN UINT64 Address, + IN UINT32 OrData ) { return PciSegmentWrite32 (Address, PciSegmentRead32 (Address) | OrData); @@ -844,8 +844,8 @@ PciSegmentOr32 ( UINT32 EFIAPI PciSegmentAnd32 ( - IN UINT64 Address, - IN UINT32 AndData + IN UINT64 Address, + IN UINT32 AndData ) { return PciSegmentWrite32 (Address, PciSegmentRead32 (Address) & AndData); @@ -875,9 +875,9 @@ PciSegmentAnd32 ( UINT32 EFIAPI PciSegmentAndThenOr32 ( - IN UINT64 Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINT64 Address, + IN UINT32 AndData, + IN UINT32 OrData ) { return PciSegmentWrite32 (Address, (PciSegmentRead32 (Address) & AndData) | OrData); @@ -908,9 +908,9 @@ PciSegmentAndThenOr32 ( UINT32 EFIAPI PciSegmentBitFieldRead32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead32 (PciSegmentRead32 (Address), StartBit, EndBit); @@ -944,10 +944,10 @@ PciSegmentBitFieldRead32 ( UINT32 EFIAPI PciSegmentBitFieldWrite32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { return PciSegmentWrite32 ( @@ -986,10 +986,10 @@ PciSegmentBitFieldWrite32 ( UINT32 EFIAPI PciSegmentBitFieldOr32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { return PciSegmentWrite32 ( @@ -1028,10 +1028,10 @@ PciSegmentBitFieldOr32 ( UINT32 EFIAPI PciSegmentBitFieldAnd32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { return PciSegmentWrite32 ( @@ -1074,11 +1074,11 @@ PciSegmentBitFieldAnd32 ( UINT32 EFIAPI PciSegmentBitFieldAndThenOr32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { return PciSegmentWrite32 ( @@ -1113,12 +1113,12 @@ PciSegmentBitFieldAndThenOr32 ( UINTN EFIAPI PciSegmentReadBuffer ( - IN UINT64 StartAddress, - IN UINTN Size, - OUT VOID *Buffer + IN UINT64 StartAddress, + IN UINTN Size, + OUT VOID *Buffer ) { - UINTN ReturnValue; + UINTN ReturnValue; ASSERT_INVALID_PCI_SEGMENT_ADDRESS (StartAddress, 0); ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000); @@ -1139,19 +1139,19 @@ PciSegmentReadBuffer ( // Read a byte if StartAddress is byte aligned // *(volatile UINT8 *)Buffer = PciSegmentRead8 (StartAddress); - StartAddress += sizeof (UINT8); - Size -= sizeof (UINT8); - Buffer = (UINT8*)Buffer + 1; + StartAddress += sizeof (UINT8); + Size -= sizeof (UINT8); + Buffer = (UINT8 *)Buffer + 1; } - if (Size >= sizeof (UINT16) && (StartAddress & BIT1) != 0) { + if ((Size >= sizeof (UINT16)) && ((StartAddress & BIT1) != 0)) { // // Read a word if StartAddress is word aligned // WriteUnaligned16 (Buffer, PciSegmentRead16 (StartAddress)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } while (Size >= sizeof (UINT32)) { @@ -1160,8 +1160,8 @@ PciSegmentReadBuffer ( // WriteUnaligned32 (Buffer, PciSegmentRead32 (StartAddress)); StartAddress += sizeof (UINT32); - Size -= sizeof (UINT32); - Buffer = (UINT32*)Buffer + 1; + Size -= sizeof (UINT32); + Buffer = (UINT32 *)Buffer + 1; } if (Size >= sizeof (UINT16)) { @@ -1170,8 +1170,8 @@ PciSegmentReadBuffer ( // WriteUnaligned16 (Buffer, PciSegmentRead16 (StartAddress)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } if (Size >= sizeof (UINT8)) { @@ -1211,12 +1211,12 @@ PciSegmentReadBuffer ( UINTN EFIAPI PciSegmentWriteBuffer ( - IN UINT64 StartAddress, - IN UINTN Size, - IN VOID *Buffer + IN UINT64 StartAddress, + IN UINTN Size, + IN VOID *Buffer ) { - UINTN ReturnValue; + UINTN ReturnValue; ASSERT_INVALID_PCI_SEGMENT_ADDRESS (StartAddress, 0); ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000); @@ -1236,20 +1236,20 @@ PciSegmentWriteBuffer ( // // Write a byte if StartAddress is byte aligned // - PciSegmentWrite8 (StartAddress, *(UINT8*) Buffer); + PciSegmentWrite8 (StartAddress, *(UINT8 *)Buffer); StartAddress += sizeof (UINT8); - Size -= sizeof (UINT8); - Buffer = (UINT8*) Buffer + 1; + Size -= sizeof (UINT8); + Buffer = (UINT8 *)Buffer + 1; } - if (Size >= sizeof (UINT16) && (StartAddress & BIT1) != 0) { + if ((Size >= sizeof (UINT16)) && ((StartAddress & BIT1) != 0)) { // // Write a word if StartAddress is word aligned // PciSegmentWrite16 (StartAddress, ReadUnaligned16 (Buffer)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*) Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } while (Size >= sizeof (UINT32)) { @@ -1258,8 +1258,8 @@ PciSegmentWriteBuffer ( // PciSegmentWrite32 (StartAddress, ReadUnaligned32 (Buffer)); StartAddress += sizeof (UINT32); - Size -= sizeof (UINT32); - Buffer = (UINT32*) Buffer + 1; + Size -= sizeof (UINT32); + Buffer = (UINT32 *)Buffer + 1; } if (Size >= sizeof (UINT16)) { @@ -1268,15 +1268,15 @@ PciSegmentWriteBuffer ( // PciSegmentWrite16 (StartAddress, ReadUnaligned16 (Buffer)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*) Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } if (Size >= sizeof (UINT8)) { // // Write the last remaining byte if exist // - PciSegmentWrite8 (StartAddress, *(UINT8*) Buffer); + PciSegmentWrite8 (StartAddress, *(UINT8 *)Buffer); } return ReturnValue; diff --git a/MdePkg/Library/BasePeCoffGetEntryPointLib/PeCoffGetEntryPoint.c b/MdePkg/Library/BasePeCoffGetEntryPointLib/PeCoffGetEntryPoint.c index cf10fc5..00b645a 100644 --- a/MdePkg/Library/BasePeCoffGetEntryPointLib/PeCoffGetEntryPoint.c +++ b/MdePkg/Library/BasePeCoffGetEntryPointLib/PeCoffGetEntryPoint.c @@ -8,7 +8,6 @@ **/ - #include #include @@ -16,7 +15,7 @@ #include -#define PE_COFF_IMAGE_ALIGN_SIZE 4 +#define PE_COFF_IMAGE_ALIGN_SIZE 4 /** Retrieves and returns a pointer to the entry point to a PE/COFF image that has been loaded @@ -42,8 +41,8 @@ PeCoffLoaderGetEntryPoint ( OUT VOID **EntryPoint ) { - EFI_IMAGE_DOS_HEADER *DosHdr; - EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr; + EFI_IMAGE_DOS_HEADER *DosHdr; + EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr; ASSERT (Pe32Data != NULL); ASSERT (EntryPoint != NULL); @@ -53,7 +52,7 @@ PeCoffLoaderGetEntryPoint ( // // DOS image header is present, so read the PE header after the DOS image header. // - Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)((UINTN) Pe32Data + (UINTN) ((DosHdr->e_lfanew) & 0x0ffff)); + Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)((UINTN)Pe32Data + (UINTN)((DosHdr->e_lfanew) & 0x0ffff)); } else { // // DOS image header is not present, so PE header is at the image base. @@ -66,7 +65,7 @@ PeCoffLoaderGetEntryPoint ( // AddressOfEntryPoint is common for PE32 & PE32+ // if (Hdr.Te->Signature == EFI_TE_IMAGE_HEADER_SIGNATURE) { - *EntryPoint = (VOID *)((UINTN)Pe32Data + (UINTN)(Hdr.Te->AddressOfEntryPoint & 0x0ffffffff) + sizeof(EFI_TE_IMAGE_HEADER) - Hdr.Te->StrippedSize); + *EntryPoint = (VOID *)((UINTN)Pe32Data + (UINTN)(Hdr.Te->AddressOfEntryPoint & 0x0ffffffff) + sizeof (EFI_TE_IMAGE_HEADER) - Hdr.Te->StrippedSize); return RETURN_SUCCESS; } else if (Hdr.Pe32->Signature == EFI_IMAGE_NT_SIGNATURE) { *EntryPoint = (VOID *)((UINTN)Pe32Data + (UINTN)(Hdr.Pe32->OptionalHeader.AddressOfEntryPoint & 0x0ffffffff)); @@ -76,7 +75,6 @@ PeCoffLoaderGetEntryPoint ( return RETURN_UNSUPPORTED; } - /** Returns the machine type of a PE/COFF image. @@ -105,7 +103,7 @@ PeCoffLoaderGetMachineType ( // // DOS image header is present, so read the PE header after the DOS image header. // - Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)((UINTN) Pe32Data + (UINTN) ((DosHdr->e_lfanew) & 0x0ffff)); + Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)((UINTN)Pe32Data + (UINTN)((DosHdr->e_lfanew) & 0x0ffff)); } else { // // DOS image header is not present, so PE header is at the image base. @@ -115,7 +113,7 @@ PeCoffLoaderGetMachineType ( if (Hdr.Te->Signature == EFI_TE_IMAGE_HEADER_SIGNATURE) { return Hdr.Te->Machine; - } else if (Hdr.Pe32->Signature == EFI_IMAGE_NT_SIGNATURE) { + } else if (Hdr.Pe32->Signature == EFI_IMAGE_NT_SIGNATURE) { return Hdr.Pe32->FileHeader.Machine; } @@ -147,15 +145,15 @@ PeCoffLoaderGetPdbPointer ( IN VOID *Pe32Data ) { - EFI_IMAGE_DOS_HEADER *DosHdr; - EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr; - EFI_IMAGE_DATA_DIRECTORY *DirectoryEntry; - EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *DebugEntry; - UINTN DirCount; - VOID *CodeViewEntryPointer; - INTN TEImageAdjust; - UINT32 NumberOfRvaAndSizes; - UINT16 Magic; + EFI_IMAGE_DOS_HEADER *DosHdr; + EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr; + EFI_IMAGE_DATA_DIRECTORY *DirectoryEntry; + EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *DebugEntry; + UINTN DirCount; + VOID *CodeViewEntryPointer; + INTN TEImageAdjust; + UINT32 NumberOfRvaAndSizes; + UINT16 Magic; ASSERT (Pe32Data != NULL); @@ -169,7 +167,7 @@ PeCoffLoaderGetPdbPointer ( // // DOS image header is present, so read the PE header after the DOS image header. // - Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)((UINTN) Pe32Data + (UINTN) ((DosHdr->e_lfanew) & 0x0ffff)); + Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)((UINTN)Pe32Data + (UINTN)((DosHdr->e_lfanew) & 0x0ffff)); } else { // // DOS image header is not present, so PE header is at the image base. @@ -179,11 +177,11 @@ PeCoffLoaderGetPdbPointer ( if (Hdr.Te->Signature == EFI_TE_IMAGE_HEADER_SIGNATURE) { if (Hdr.Te->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG].VirtualAddress != 0) { - DirectoryEntry = &Hdr.Te->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG]; - TEImageAdjust = sizeof (EFI_TE_IMAGE_HEADER) - Hdr.Te->StrippedSize; - DebugEntry = (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *)((UINTN) Hdr.Te + - Hdr.Te->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG].VirtualAddress + - TEImageAdjust); + DirectoryEntry = &Hdr.Te->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG]; + TEImageAdjust = sizeof (EFI_TE_IMAGE_HEADER) - Hdr.Te->StrippedSize; + DebugEntry = (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *)((UINTN)Hdr.Te + + Hdr.Te->DataDirectory[EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG].VirtualAddress + + TEImageAdjust); } } else if (Hdr.Pe32->Signature == EFI_IMAGE_NT_SIGNATURE) { // @@ -192,24 +190,24 @@ PeCoffLoaderGetPdbPointer ( // generate PE32+ image with PE32 Magic. // switch (Hdr.Pe32->FileHeader.Machine) { - case IMAGE_FILE_MACHINE_I386: - // - // Assume PE32 image with IA32 Machine field. - // - Magic = EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC; - break; - case IMAGE_FILE_MACHINE_X64: - case IMAGE_FILE_MACHINE_IA64: - // - // Assume PE32+ image with x64 or IA64 Machine field - // - Magic = EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC; - break; - default: - // - // For unknow Machine field, use Magic in optional Header - // - Magic = Hdr.Pe32->OptionalHeader.Magic; + case IMAGE_FILE_MACHINE_I386: + // + // Assume PE32 image with IA32 Machine field. + // + Magic = EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC; + break; + case IMAGE_FILE_MACHINE_X64: + case IMAGE_FILE_MACHINE_IA64: + // + // Assume PE32+ image with x64 or IA64 Machine field + // + Magic = EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC; + break; + default: + // + // For unknow Machine field, use Magic in optional Header + // + Magic = Hdr.Pe32->OptionalHeader.Magic; } if (Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) { @@ -217,26 +215,26 @@ PeCoffLoaderGetPdbPointer ( // Use PE32 offset get Debug Directory Entry // NumberOfRvaAndSizes = Hdr.Pe32->OptionalHeader.NumberOfRvaAndSizes; - DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *)&(Hdr.Pe32->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_DEBUG]); - DebugEntry = (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *) ((UINTN) Pe32Data + DirectoryEntry->VirtualAddress); + DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *)&(Hdr.Pe32->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_DEBUG]); + DebugEntry = (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *)((UINTN)Pe32Data + DirectoryEntry->VirtualAddress); } else if (Hdr.Pe32->OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC) { // // Use PE32+ offset get Debug Directory Entry // NumberOfRvaAndSizes = Hdr.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes; - DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *)&(Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_DEBUG]); - DebugEntry = (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *) ((UINTN) Pe32Data + DirectoryEntry->VirtualAddress); + DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *)&(Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_DEBUG]); + DebugEntry = (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *)((UINTN)Pe32Data + DirectoryEntry->VirtualAddress); } if (NumberOfRvaAndSizes <= EFI_IMAGE_DIRECTORY_ENTRY_DEBUG) { DirectoryEntry = NULL; - DebugEntry = NULL; + DebugEntry = NULL; } } else { return NULL; } - if (DebugEntry == NULL || DirectoryEntry == NULL) { + if ((DebugEntry == NULL) || (DirectoryEntry == NULL)) { return NULL; } @@ -246,16 +244,16 @@ PeCoffLoaderGetPdbPointer ( for (DirCount = 0; DirCount < DirectoryEntry->Size; DirCount += sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY), DebugEntry++) { if (DebugEntry->Type == EFI_IMAGE_DEBUG_TYPE_CODEVIEW) { if (DebugEntry->SizeOfData > 0) { - CodeViewEntryPointer = (VOID *) ((UINTN) DebugEntry->RVA + ((UINTN)Pe32Data) + (UINTN)TEImageAdjust); - switch (* (UINT32 *) CodeViewEntryPointer) { - case CODEVIEW_SIGNATURE_NB10: - return (VOID *) ((CHAR8 *)CodeViewEntryPointer + sizeof (EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY)); - case CODEVIEW_SIGNATURE_RSDS: - return (VOID *) ((CHAR8 *)CodeViewEntryPointer + sizeof (EFI_IMAGE_DEBUG_CODEVIEW_RSDS_ENTRY)); - case CODEVIEW_SIGNATURE_MTOC: - return (VOID *) ((CHAR8 *)CodeViewEntryPointer + sizeof (EFI_IMAGE_DEBUG_CODEVIEW_MTOC_ENTRY)); - default: - break; + CodeViewEntryPointer = (VOID *)((UINTN)DebugEntry->RVA + ((UINTN)Pe32Data) + (UINTN)TEImageAdjust); + switch (*(UINT32 *)CodeViewEntryPointer) { + case CODEVIEW_SIGNATURE_NB10: + return (VOID *)((CHAR8 *)CodeViewEntryPointer + sizeof (EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY)); + case CODEVIEW_SIGNATURE_RSDS: + return (VOID *)((CHAR8 *)CodeViewEntryPointer + sizeof (EFI_IMAGE_DEBUG_CODEVIEW_RSDS_ENTRY)); + case CODEVIEW_SIGNATURE_MTOC: + return (VOID *)((CHAR8 *)CodeViewEntryPointer + sizeof (EFI_IMAGE_DEBUG_CODEVIEW_MTOC_ENTRY)); + default: + break; } } } @@ -279,12 +277,12 @@ PeCoffLoaderGetPdbPointer ( UINT32 EFIAPI PeCoffGetSizeOfHeaders ( - IN VOID *Pe32Data + IN VOID *Pe32Data ) { - EFI_IMAGE_DOS_HEADER *DosHdr; - EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr; - UINTN SizeOfHeaders; + EFI_IMAGE_DOS_HEADER *DosHdr; + EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr; + UINTN SizeOfHeaders; ASSERT (Pe32Data != NULL); @@ -293,7 +291,7 @@ PeCoffGetSizeOfHeaders ( // // DOS image header is present, so read the PE header after the DOS image header. // - Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)((UINTN) Pe32Data + (UINTN) ((DosHdr->e_lfanew) & 0x0ffff)); + Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)((UINTN)Pe32Data + (UINTN)((DosHdr->e_lfanew) & 0x0ffff)); } else { // // DOS image header is not present, so PE header is at the image base. @@ -309,7 +307,7 @@ PeCoffGetSizeOfHeaders ( SizeOfHeaders = 0; } - return (UINT32) SizeOfHeaders; + return (UINT32)SizeOfHeaders; } /** @@ -327,55 +325,57 @@ PeCoffGetSizeOfHeaders ( UINTN EFIAPI PeCoffSearchImageBase ( - IN UINTN Address + IN UINTN Address ) { - UINTN Pe32Data; + UINTN Pe32Data; Pe32Data = 0; DEBUG_CODE_BEGIN (); - EFI_IMAGE_DOS_HEADER *DosHdr; - EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr; + EFI_IMAGE_DOS_HEADER *DosHdr; + EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr; - // - // Find Image Base - // - Pe32Data = Address & ~(PE_COFF_IMAGE_ALIGN_SIZE - 1); - while (Pe32Data != 0) { - DosHdr = (EFI_IMAGE_DOS_HEADER *) Pe32Data; - if (DosHdr->e_magic == EFI_IMAGE_DOS_SIGNATURE) { - // - // DOS image header is present, so read the PE header after the DOS image header. - // - Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)(Pe32Data + (UINTN) ((DosHdr->e_lfanew) & 0x0ffff)); - // - // Make sure PE header address does not overflow and is less than the initial address. - // - if (((UINTN)Hdr.Pe32 > Pe32Data) && ((UINTN)Hdr.Pe32 < Address)) { - if (Hdr.Pe32->Signature == EFI_IMAGE_NT_SIGNATURE) { - break; - } - } - } else { - // - // DOS image header is not present, TE header is at the image base. - // - Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)Pe32Data; - if ((Hdr.Te->Signature == EFI_TE_IMAGE_HEADER_SIGNATURE) && - ((Hdr.Te->Machine == IMAGE_FILE_MACHINE_I386) || (Hdr.Te->Machine == IMAGE_FILE_MACHINE_IA64) || - (Hdr.Te->Machine == IMAGE_FILE_MACHINE_EBC) || (Hdr.Te->Machine == IMAGE_FILE_MACHINE_X64) || - (Hdr.Te->Machine == IMAGE_FILE_MACHINE_ARM64) || (Hdr.Te->Machine == IMAGE_FILE_MACHINE_ARMTHUMB_MIXED)) - ) { + // + // Find Image Base + // + Pe32Data = Address & ~(PE_COFF_IMAGE_ALIGN_SIZE - 1); + while (Pe32Data != 0) { + DosHdr = (EFI_IMAGE_DOS_HEADER *)Pe32Data; + if (DosHdr->e_magic == EFI_IMAGE_DOS_SIGNATURE) { + // + // DOS image header is present, so read the PE header after the DOS image header. + // + Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)(Pe32Data + (UINTN)((DosHdr->e_lfanew) & 0x0ffff)); + // + // Make sure PE header address does not overflow and is less than the initial address. + // + if (((UINTN)Hdr.Pe32 > Pe32Data) && ((UINTN)Hdr.Pe32 < Address)) { + if (Hdr.Pe32->Signature == EFI_IMAGE_NT_SIGNATURE) { break; } } - + } else { // - // Not found the image base, check the previous aligned address + // DOS image header is not present, TE header is at the image base. // - Pe32Data -= PE_COFF_IMAGE_ALIGN_SIZE; + Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)Pe32Data; + if ((Hdr.Te->Signature == EFI_TE_IMAGE_HEADER_SIGNATURE) && + ((Hdr.Te->Machine == IMAGE_FILE_MACHINE_I386) || (Hdr.Te->Machine == IMAGE_FILE_MACHINE_IA64) || + (Hdr.Te->Machine == IMAGE_FILE_MACHINE_EBC) || (Hdr.Te->Machine == IMAGE_FILE_MACHINE_X64) || + (Hdr.Te->Machine == IMAGE_FILE_MACHINE_ARM64) || (Hdr.Te->Machine == IMAGE_FILE_MACHINE_ARMTHUMB_MIXED)) + ) + { + break; + } } + + // + // Not found the image base, check the previous aligned address + // + Pe32Data -= PE_COFF_IMAGE_ALIGN_SIZE; + } + DEBUG_CODE_END (); return Pe32Data; diff --git a/MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c b/MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c index a851a44..595377b 100644 --- a/MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c +++ b/MdePkg/Library/BasePeCoffLib/Arm/PeCoffLoaderEx.c @@ -10,7 +10,6 @@ #include "BasePeCoffLibInternals.h" #include - /** Pass in a pointer to an ARM MOVT or MOVW immediate instruciton and return the immediate data encoded in the instruction. @@ -22,7 +21,7 @@ **/ UINT16 ThumbMovtImmediateAddress ( - IN UINT16 *Instruction + IN UINT16 *Instruction ) { UINT32 Movt; @@ -43,7 +42,6 @@ ThumbMovtImmediateAddress ( return Address; } - /** Update an ARM MOVT or MOVW immediate instruction immediate data. @@ -52,14 +50,14 @@ ThumbMovtImmediateAddress ( **/ VOID ThumbMovtImmediatePatch ( - IN OUT UINT16 *Instruction, - IN UINT16 Address + IN OUT UINT16 *Instruction, + IN UINT16 Address ) { UINT16 Patch; // First 16-bit chunk of instruciton - Patch = ((Address >> 12) & 0x000f); // imm4 + Patch = ((Address >> 12) & 0x000f); // imm4 Patch |= (((Address & BIT11) != 0) ? BIT10 : 0); // i // Mask out instruction bits and or in address *(Instruction) = (*Instruction & ~0x040f) | Patch; @@ -72,8 +70,6 @@ ThumbMovtImmediatePatch ( *Instruction = (*Instruction & ~0x70ff) | Patch; } - - /** Pass in a pointer to an ARM MOVW/MOVT instruciton pair and return the immediate data encoded in the two` instruction. @@ -85,7 +81,7 @@ ThumbMovtImmediatePatch ( **/ UINT32 ThumbMovwMovtImmediateAddress ( - IN UINT16 *Instructions + IN UINT16 *Instructions ) { UINT16 *Word; @@ -97,7 +93,6 @@ ThumbMovwMovtImmediateAddress ( return (ThumbMovtImmediateAddress (Top) << 16) + ThumbMovtImmediateAddress (Word); } - /** Update an ARM MOVW/MOVT immediate instruction instruction pair. @@ -106,8 +101,8 @@ ThumbMovwMovtImmediateAddress ( **/ VOID ThumbMovwMovtImmediatePatch ( - IN OUT UINT16 *Instructions, - IN UINT32 Address + IN OUT UINT16 *Instructions, + IN UINT32 Address ) { UINT16 *Word; @@ -120,8 +115,6 @@ ThumbMovwMovtImmediatePatch ( ThumbMovtImmediatePatch (Top, (UINT16)(Address >> 16)); } - - /** Performs an ARM-based specific relocation fixup and is a no-op on other instruction sets. @@ -136,36 +129,36 @@ ThumbMovwMovtImmediatePatch ( **/ RETURN_STATUS PeCoffLoaderRelocateImageEx ( - IN UINT16 *Reloc, - IN OUT CHAR8 *Fixup, - IN OUT CHAR8 **FixupData, - IN UINT64 Adjust + IN UINT16 *Reloc, + IN OUT CHAR8 *Fixup, + IN OUT CHAR8 **FixupData, + IN UINT64 Adjust ) { - UINT16 *Fixup16; - UINT32 FixupVal; + UINT16 *Fixup16; + UINT32 FixupVal; - Fixup16 = (UINT16 *) Fixup; + Fixup16 = (UINT16 *)Fixup; switch ((*Reloc) >> 12) { + case EFI_IMAGE_REL_BASED_ARM_MOV32T: + FixupVal = ThumbMovwMovtImmediateAddress (Fixup16) + (UINT32)Adjust; + ThumbMovwMovtImmediatePatch (Fixup16, FixupVal); + + if (*FixupData != NULL) { + *FixupData = ALIGN_POINTER (*FixupData, sizeof (UINT64)); + // Fixup16 is not aligned so we must copy it. Thumb instructions are streams of 16 bytes. + CopyMem (*FixupData, Fixup16, sizeof (UINT64)); + *FixupData = *FixupData + sizeof (UINT64); + } - case EFI_IMAGE_REL_BASED_ARM_MOV32T: - FixupVal = ThumbMovwMovtImmediateAddress (Fixup16) + (UINT32)Adjust; - ThumbMovwMovtImmediatePatch (Fixup16, FixupVal); - - if (*FixupData != NULL) { - *FixupData = ALIGN_POINTER(*FixupData, sizeof(UINT64)); - // Fixup16 is not aligned so we must copy it. Thumb instructions are streams of 16 bytes. - CopyMem (*FixupData, Fixup16, sizeof (UINT64)); - *FixupData = *FixupData + sizeof(UINT64); - } - break; - - case EFI_IMAGE_REL_BASED_ARM_MOV32A: - ASSERT (FALSE); - // break omitted - ARM instruction encoding not implemented - default: - return RETURN_UNSUPPORTED; + break; + + case EFI_IMAGE_REL_BASED_ARM_MOV32A: + ASSERT (FALSE); + // break omitted - ARM instruction encoding not implemented + default: + return RETURN_UNSUPPORTED; } return RETURN_SUCCESS; @@ -209,10 +202,10 @@ PeCoffLoaderImageFormatSupported ( **/ RETURN_STATUS PeHotRelocateImageEx ( - IN UINT16 *Reloc, - IN OUT CHAR8 *Fixup, - IN OUT CHAR8 **FixupData, - IN UINT64 Adjust + IN UINT16 *Reloc, + IN OUT CHAR8 *Fixup, + IN OUT CHAR8 **FixupData, + IN UINT64 Adjust ) { UINT16 *Fixup16; @@ -221,22 +214,22 @@ PeHotRelocateImageEx ( Fixup16 = (UINT16 *)Fixup; switch ((*Reloc) >> 12) { - - case EFI_IMAGE_REL_BASED_ARM_MOV32T: - *FixupData = ALIGN_POINTER (*FixupData, sizeof (UINT64)); - if (*(UINT64 *) (*FixupData) == ReadUnaligned64 ((UINT64 *)Fixup16)) { - FixupVal = ThumbMovwMovtImmediateAddress (Fixup16) + (UINT32)Adjust; - ThumbMovwMovtImmediatePatch (Fixup16, FixupVal); - } - *FixupData = *FixupData + sizeof(UINT64); - break; - - case EFI_IMAGE_REL_BASED_ARM_MOV32A: - ASSERT (FALSE); + case EFI_IMAGE_REL_BASED_ARM_MOV32T: + *FixupData = ALIGN_POINTER (*FixupData, sizeof (UINT64)); + if (*(UINT64 *)(*FixupData) == ReadUnaligned64 ((UINT64 *)Fixup16)) { + FixupVal = ThumbMovwMovtImmediateAddress (Fixup16) + (UINT32)Adjust; + ThumbMovwMovtImmediatePatch (Fixup16, FixupVal); + } + + *FixupData = *FixupData + sizeof (UINT64); + break; + + case EFI_IMAGE_REL_BASED_ARM_MOV32A: + ASSERT (FALSE); // break omitted - ARM instruction encoding not implemented - default: - DEBUG ((DEBUG_ERROR, "PeHotRelocateEx:unknown fixed type\n")); - return RETURN_UNSUPPORTED; + default: + DEBUG ((DEBUG_ERROR, "PeHotRelocateEx:unknown fixed type\n")); + return RETURN_UNSUPPORTED; } return RETURN_SUCCESS; diff --git a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c index 1102833..6d8d9fa 100644 --- a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c +++ b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c @@ -33,8 +33,8 @@ **/ VOID PeCoffLoaderAdjustOffsetForTeImage ( - EFI_IMAGE_SECTION_HEADER *SectionHeader, - UINT32 TeStrippedOffset + EFI_IMAGE_SECTION_HEADER *SectionHeader, + UINT32 TeStrippedOffset ) { SectionHeader->VirtualAddress -= TeStrippedOffset; @@ -62,33 +62,34 @@ PeCoffLoaderGetPeHeader ( OUT EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr ) { - RETURN_STATUS Status; - EFI_IMAGE_DOS_HEADER DosHdr; - UINTN Size; - UINTN ReadSize; - UINT32 SectionHeaderOffset; - UINT32 Index; - UINT32 HeaderWithoutDataDir; - CHAR8 BufferData; - UINTN NumberOfSections; + RETURN_STATUS Status; + EFI_IMAGE_DOS_HEADER DosHdr; + UINTN Size; + UINTN ReadSize; + UINT32 SectionHeaderOffset; + UINT32 Index; + UINT32 HeaderWithoutDataDir; + CHAR8 BufferData; + UINTN NumberOfSections; EFI_IMAGE_SECTION_HEADER SectionHeader; // // Read the DOS image header to check for its existence // - Size = sizeof (EFI_IMAGE_DOS_HEADER); + Size = sizeof (EFI_IMAGE_DOS_HEADER); ReadSize = Size; - Status = ImageContext->ImageRead ( - ImageContext->Handle, - 0, - &Size, - &DosHdr - ); + Status = ImageContext->ImageRead ( + ImageContext->Handle, + 0, + &Size, + &DosHdr + ); if (RETURN_ERROR (Status) || (Size != ReadSize)) { ImageContext->ImageError = IMAGE_ERROR_IMAGE_READ; if (Size != ReadSize) { Status = RETURN_UNSUPPORTED; } + return Status; } @@ -107,19 +108,20 @@ PeCoffLoaderGetPeHeader ( // determines if this is a PE32 or PE32+ image. The magic is in the same // location in both images. // - Size = sizeof (EFI_IMAGE_OPTIONAL_HEADER_UNION); + Size = sizeof (EFI_IMAGE_OPTIONAL_HEADER_UNION); ReadSize = Size; - Status = ImageContext->ImageRead ( - ImageContext->Handle, - ImageContext->PeCoffHeaderOffset, - &Size, - Hdr.Pe32 - ); + Status = ImageContext->ImageRead ( + ImageContext->Handle, + ImageContext->PeCoffHeaderOffset, + &Size, + Hdr.Pe32 + ); if (RETURN_ERROR (Status) || (Size != ReadSize)) { ImageContext->ImageError = IMAGE_ERROR_IMAGE_READ; if (Size != ReadSize) { Status = RETURN_UNSUPPORTED; } + return Status; } @@ -127,16 +129,16 @@ PeCoffLoaderGetPeHeader ( // Use Signature to figure out if we understand the image format // if (Hdr.Te->Signature == EFI_TE_IMAGE_HEADER_SIGNATURE) { - ImageContext->IsTeImage = TRUE; - ImageContext->Machine = Hdr.Te->Machine; - ImageContext->ImageType = (UINT16)(Hdr.Te->Subsystem); + ImageContext->IsTeImage = TRUE; + ImageContext->Machine = Hdr.Te->Machine; + ImageContext->ImageType = (UINT16)(Hdr.Te->Subsystem); // // For TeImage, SectionAlignment is undefined to be set to Zero // ImageSize can be calculated. // - ImageContext->ImageSize = 0; - ImageContext->SectionAlignment = 0; - ImageContext->SizeOfHeaders = sizeof (EFI_TE_IMAGE_HEADER) + (UINTN)Hdr.Te->BaseOfCode - (UINTN)Hdr.Te->StrippedSize; + ImageContext->ImageSize = 0; + ImageContext->SectionAlignment = 0; + ImageContext->SizeOfHeaders = sizeof (EFI_TE_IMAGE_HEADER) + (UINTN)Hdr.Te->BaseOfCode - (UINTN)Hdr.Te->StrippedSize; // // Check the StrippedSize. @@ -157,19 +159,20 @@ PeCoffLoaderGetPeHeader ( // // Read last byte of Hdr.Te->SizeOfHeaders from the file. // - Size = 1; + Size = 1; ReadSize = Size; - Status = ImageContext->ImageRead ( - ImageContext->Handle, - ImageContext->SizeOfHeaders - 1, - &Size, - &BufferData - ); + Status = ImageContext->ImageRead ( + ImageContext->Handle, + ImageContext->SizeOfHeaders - 1, + &Size, + &BufferData + ); if (RETURN_ERROR (Status) || (Size != ReadSize)) { ImageContext->ImageError = IMAGE_ERROR_IMAGE_READ; if (Size != ReadSize) { Status = RETURN_UNSUPPORTED; } + return Status; } @@ -177,14 +180,15 @@ PeCoffLoaderGetPeHeader ( // TE Image Data Directory Entry size is non-zero, but the Data Directory Virtual Address is zero. // This case is not a valid TE image. // - if ((Hdr.Te->DataDirectory[0].Size != 0 && Hdr.Te->DataDirectory[0].VirtualAddress == 0) || - (Hdr.Te->DataDirectory[1].Size != 0 && Hdr.Te->DataDirectory[1].VirtualAddress == 0)) { + if (((Hdr.Te->DataDirectory[0].Size != 0) && (Hdr.Te->DataDirectory[0].VirtualAddress == 0)) || + ((Hdr.Te->DataDirectory[1].Size != 0) && (Hdr.Te->DataDirectory[1].VirtualAddress == 0))) + { ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; return RETURN_UNSUPPORTED; } - } else if (Hdr.Pe32->Signature == EFI_IMAGE_NT_SIGNATURE) { + } else if (Hdr.Pe32->Signature == EFI_IMAGE_NT_SIGNATURE) { ImageContext->IsTeImage = FALSE; - ImageContext->Machine = Hdr.Pe32->FileHeader.Machine; + ImageContext->Machine = Hdr.Pe32->FileHeader.Machine; if (Hdr.Pe32->OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) { // @@ -202,7 +206,8 @@ PeCoffLoaderGetPeHeader ( // HeaderWithoutDataDir = sizeof (EFI_IMAGE_OPTIONAL_HEADER32) - sizeof (EFI_IMAGE_DATA_DIRECTORY) * EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES; if (((UINT32)Hdr.Pe32->FileHeader.SizeOfOptionalHeader - HeaderWithoutDataDir) != - Hdr.Pe32->OptionalHeader.NumberOfRvaAndSizes * sizeof (EFI_IMAGE_DATA_DIRECTORY)) { + Hdr.Pe32->OptionalHeader.NumberOfRvaAndSizes * sizeof (EFI_IMAGE_DATA_DIRECTORY)) + { ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; return RETURN_UNSUPPORTED; } @@ -215,6 +220,7 @@ PeCoffLoaderGetPeHeader ( ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; return RETURN_UNSUPPORTED; } + if ((Hdr.Pe32->OptionalHeader.SizeOfImage - SectionHeaderOffset) / EFI_IMAGE_SIZEOF_SECTION_HEADER <= Hdr.Pe32->FileHeader.NumberOfSections) { ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; return RETURN_UNSUPPORTED; @@ -227,10 +233,12 @@ PeCoffLoaderGetPeHeader ( ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; return RETURN_UNSUPPORTED; } + if (Hdr.Pe32->OptionalHeader.SizeOfHeaders >= Hdr.Pe32->OptionalHeader.SizeOfImage) { ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; return RETURN_UNSUPPORTED; } + if ((Hdr.Pe32->OptionalHeader.SizeOfHeaders - SectionHeaderOffset) / EFI_IMAGE_SIZEOF_SECTION_HEADER < (UINT32)Hdr.Pe32->FileHeader.NumberOfSections) { ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; return RETURN_UNSUPPORTED; @@ -239,19 +247,20 @@ PeCoffLoaderGetPeHeader ( // // 4.2 Read last byte of Hdr.Pe32.OptionalHeader.SizeOfHeaders from the file. // - Size = 1; + Size = 1; ReadSize = Size; - Status = ImageContext->ImageRead ( - ImageContext->Handle, - Hdr.Pe32->OptionalHeader.SizeOfHeaders - 1, - &Size, - &BufferData - ); + Status = ImageContext->ImageRead ( + ImageContext->Handle, + Hdr.Pe32->OptionalHeader.SizeOfHeaders - 1, + &Size, + &BufferData + ); if (RETURN_ERROR (Status) || (Size != ReadSize)) { ImageContext->ImageError = IMAGE_ERROR_IMAGE_READ; if (Size != ReadSize) { Status = RETURN_UNSUPPORTED; } + return Status; } @@ -265,8 +274,9 @@ PeCoffLoaderGetPeHeader ( // // Check the member data to avoid overflow. // - if ((UINT32) (~0) - Hdr.Pe32->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY].VirtualAddress < - Hdr.Pe32->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY].Size) { + if ((UINT32)(~0) - Hdr.Pe32->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY].VirtualAddress < + Hdr.Pe32->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY].Size) + { ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; return RETURN_UNSUPPORTED; } @@ -274,20 +284,21 @@ PeCoffLoaderGetPeHeader ( // // Read last byte of section header from file // - Size = 1; + Size = 1; ReadSize = Size; - Status = ImageContext->ImageRead ( - ImageContext->Handle, - Hdr.Pe32->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY].VirtualAddress + - Hdr.Pe32->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY].Size - 1, - &Size, - &BufferData - ); + Status = ImageContext->ImageRead ( + ImageContext->Handle, + Hdr.Pe32->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY].VirtualAddress + + Hdr.Pe32->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY].Size - 1, + &Size, + &BufferData + ); if (RETURN_ERROR (Status) || (Size != ReadSize)) { ImageContext->ImageError = IMAGE_ERROR_IMAGE_READ; if (Size != ReadSize) { Status = RETURN_UNSUPPORTED; } + return Status; } } @@ -296,11 +307,10 @@ PeCoffLoaderGetPeHeader ( // // Use PE32 offset // - ImageContext->ImageType = Hdr.Pe32->OptionalHeader.Subsystem; - ImageContext->ImageSize = (UINT64)Hdr.Pe32->OptionalHeader.SizeOfImage; - ImageContext->SectionAlignment = Hdr.Pe32->OptionalHeader.SectionAlignment; - ImageContext->SizeOfHeaders = Hdr.Pe32->OptionalHeader.SizeOfHeaders; - + ImageContext->ImageType = Hdr.Pe32->OptionalHeader.Subsystem; + ImageContext->ImageSize = (UINT64)Hdr.Pe32->OptionalHeader.SizeOfImage; + ImageContext->SectionAlignment = Hdr.Pe32->OptionalHeader.SectionAlignment; + ImageContext->SizeOfHeaders = Hdr.Pe32->OptionalHeader.SizeOfHeaders; } else if (Hdr.Pe32->OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC) { // // 1. Check FileHeader.NumberOfRvaAndSizes filed. @@ -309,6 +319,7 @@ PeCoffLoaderGetPeHeader ( ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; return RETURN_UNSUPPORTED; } + // // 2. Check the FileHeader.SizeOfOptionalHeader field. // OptionalHeader.NumberOfRvaAndSizes is not bigger than 16, so @@ -316,7 +327,8 @@ PeCoffLoaderGetPeHeader ( // HeaderWithoutDataDir = sizeof (EFI_IMAGE_OPTIONAL_HEADER64) - sizeof (EFI_IMAGE_DATA_DIRECTORY) * EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES; if (((UINT32)Hdr.Pe32Plus->FileHeader.SizeOfOptionalHeader - HeaderWithoutDataDir) != - Hdr.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes * sizeof (EFI_IMAGE_DATA_DIRECTORY)) { + Hdr.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes * sizeof (EFI_IMAGE_DATA_DIRECTORY)) + { ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; return RETURN_UNSUPPORTED; } @@ -329,6 +341,7 @@ PeCoffLoaderGetPeHeader ( ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; return RETURN_UNSUPPORTED; } + if ((Hdr.Pe32Plus->OptionalHeader.SizeOfImage - SectionHeaderOffset) / EFI_IMAGE_SIZEOF_SECTION_HEADER <= Hdr.Pe32Plus->FileHeader.NumberOfSections) { ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; return RETURN_UNSUPPORTED; @@ -341,10 +354,12 @@ PeCoffLoaderGetPeHeader ( ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; return RETURN_UNSUPPORTED; } + if (Hdr.Pe32Plus->OptionalHeader.SizeOfHeaders >= Hdr.Pe32Plus->OptionalHeader.SizeOfImage) { ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; return RETURN_UNSUPPORTED; } + if ((Hdr.Pe32Plus->OptionalHeader.SizeOfHeaders - SectionHeaderOffset) / EFI_IMAGE_SIZEOF_SECTION_HEADER < (UINT32)Hdr.Pe32Plus->FileHeader.NumberOfSections) { ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; return RETURN_UNSUPPORTED; @@ -353,19 +368,20 @@ PeCoffLoaderGetPeHeader ( // // 4.2 Read last byte of Hdr.Pe32Plus.OptionalHeader.SizeOfHeaders from the file. // - Size = 1; + Size = 1; ReadSize = Size; - Status = ImageContext->ImageRead ( - ImageContext->Handle, - Hdr.Pe32Plus->OptionalHeader.SizeOfHeaders - 1, - &Size, - &BufferData - ); + Status = ImageContext->ImageRead ( + ImageContext->Handle, + Hdr.Pe32Plus->OptionalHeader.SizeOfHeaders - 1, + &Size, + &BufferData + ); if (RETURN_ERROR (Status) || (Size != ReadSize)) { ImageContext->ImageError = IMAGE_ERROR_IMAGE_READ; if (Size != ReadSize) { Status = RETURN_UNSUPPORTED; } + return Status; } @@ -379,8 +395,9 @@ PeCoffLoaderGetPeHeader ( // // Check the member data to avoid overflow. // - if ((UINT32) (~0) - Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY].VirtualAddress < - Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY].Size) { + if ((UINT32)(~0) - Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY].VirtualAddress < + Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY].Size) + { ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; return RETURN_UNSUPPORTED; } @@ -388,20 +405,21 @@ PeCoffLoaderGetPeHeader ( // // Read last byte of section header from file // - Size = 1; + Size = 1; ReadSize = Size; - Status = ImageContext->ImageRead ( - ImageContext->Handle, - Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY].VirtualAddress + - Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY].Size - 1, - &Size, - &BufferData - ); + Status = ImageContext->ImageRead ( + ImageContext->Handle, + Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY].VirtualAddress + + Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_SECURITY].Size - 1, + &Size, + &BufferData + ); if (RETURN_ERROR (Status) || (Size != ReadSize)) { ImageContext->ImageError = IMAGE_ERROR_IMAGE_READ; if (Size != ReadSize) { Status = RETURN_UNSUPPORTED; } + return Status; } } @@ -410,10 +428,10 @@ PeCoffLoaderGetPeHeader ( // // Use PE32+ offset // - ImageContext->ImageType = Hdr.Pe32Plus->OptionalHeader.Subsystem; - ImageContext->ImageSize = (UINT64) Hdr.Pe32Plus->OptionalHeader.SizeOfImage; - ImageContext->SectionAlignment = Hdr.Pe32Plus->OptionalHeader.SectionAlignment; - ImageContext->SizeOfHeaders = Hdr.Pe32Plus->OptionalHeader.SizeOfHeaders; + ImageContext->ImageType = Hdr.Pe32Plus->OptionalHeader.Subsystem; + ImageContext->ImageSize = (UINT64)Hdr.Pe32Plus->OptionalHeader.SizeOfImage; + ImageContext->SectionAlignment = Hdr.Pe32Plus->OptionalHeader.SectionAlignment; + ImageContext->SizeOfHeaders = Hdr.Pe32Plus->OptionalHeader.SizeOfHeaders; } else { ImageContext->ImageError = IMAGE_ERROR_INVALID_MACHINE_TYPE; return RETURN_UNSUPPORTED; @@ -437,30 +455,31 @@ PeCoffLoaderGetPeHeader ( // Check each section field. // if (ImageContext->IsTeImage) { - SectionHeaderOffset = sizeof(EFI_TE_IMAGE_HEADER); - NumberOfSections = (UINTN) (Hdr.Te->NumberOfSections); + SectionHeaderOffset = sizeof (EFI_TE_IMAGE_HEADER); + NumberOfSections = (UINTN)(Hdr.Te->NumberOfSections); } else { SectionHeaderOffset = ImageContext->PeCoffHeaderOffset + sizeof (UINT32) + sizeof (EFI_IMAGE_FILE_HEADER) + Hdr.Pe32->FileHeader.SizeOfOptionalHeader; - NumberOfSections = (UINTN) (Hdr.Pe32->FileHeader.NumberOfSections); + NumberOfSections = (UINTN)(Hdr.Pe32->FileHeader.NumberOfSections); } for (Index = 0; Index < NumberOfSections; Index++) { // // Read section header from file // - Size = sizeof (EFI_IMAGE_SECTION_HEADER); + Size = sizeof (EFI_IMAGE_SECTION_HEADER); ReadSize = Size; - Status = ImageContext->ImageRead ( - ImageContext->Handle, - SectionHeaderOffset, - &Size, - &SectionHeader - ); + Status = ImageContext->ImageRead ( + ImageContext->Handle, + SectionHeaderOffset, + &Size, + &SectionHeader + ); if (RETURN_ERROR (Status) || (Size != ReadSize)) { ImageContext->ImageError = IMAGE_ERROR_IMAGE_READ; if (Size != ReadSize) { Status = RETURN_UNSUPPORTED; } + return Status; } @@ -475,8 +494,9 @@ PeCoffLoaderGetPeHeader ( // // Section data should bigger than the Pe header. // - if (SectionHeader.VirtualAddress < ImageContext->SizeOfHeaders || - SectionHeader.PointerToRawData < ImageContext->SizeOfHeaders) { + if ((SectionHeader.VirtualAddress < ImageContext->SizeOfHeaders) || + (SectionHeader.PointerToRawData < ImageContext->SizeOfHeaders)) + { ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; return RETURN_UNSUPPORTED; } @@ -484,7 +504,7 @@ PeCoffLoaderGetPeHeader ( // // Check the member data to avoid overflow. // - if ((UINT32) (~0) - SectionHeader.PointerToRawData < SectionHeader.SizeOfRawData) { + if ((UINT32)(~0) - SectionHeader.PointerToRawData < SectionHeader.SizeOfRawData) { ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; return RETURN_UNSUPPORTED; } @@ -493,19 +513,20 @@ PeCoffLoaderGetPeHeader ( // Base on the ImageRead function to check the section data field. // Read the last byte to make sure the data is in the image region. // - Size = 1; + Size = 1; ReadSize = Size; - Status = ImageContext->ImageRead ( - ImageContext->Handle, - SectionHeader.PointerToRawData + SectionHeader.SizeOfRawData - 1, - &Size, - &BufferData - ); + Status = ImageContext->ImageRead ( + ImageContext->Handle, + SectionHeader.PointerToRawData + SectionHeader.SizeOfRawData - 1, + &Size, + &BufferData + ); if (RETURN_ERROR (Status) || (Size != ReadSize)) { ImageContext->ImageError = IMAGE_ERROR_IMAGE_READ; if (Size != ReadSize) { Status = RETURN_UNSUPPORTED; } + return Status; } } @@ -519,7 +540,6 @@ PeCoffLoaderGetPeHeader ( return RETURN_SUCCESS; } - /** Retrieves information about a PE/COFF image. @@ -554,31 +574,32 @@ PeCoffLoaderGetImageInfo ( IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext ) { - RETURN_STATUS Status; - EFI_IMAGE_OPTIONAL_HEADER_UNION HdrData; - EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr; - EFI_IMAGE_DATA_DIRECTORY *DebugDirectoryEntry; - UINTN Size; - UINTN ReadSize; - UINTN Index; - UINTN DebugDirectoryEntryRva; - UINTN DebugDirectoryEntryFileOffset; - UINTN SectionHeaderOffset; - EFI_IMAGE_SECTION_HEADER SectionHeader; - EFI_IMAGE_DEBUG_DIRECTORY_ENTRY DebugEntry; - UINT32 NumberOfRvaAndSizes; - UINT32 TeStrippedOffset; + RETURN_STATUS Status; + EFI_IMAGE_OPTIONAL_HEADER_UNION HdrData; + EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr; + EFI_IMAGE_DATA_DIRECTORY *DebugDirectoryEntry; + UINTN Size; + UINTN ReadSize; + UINTN Index; + UINTN DebugDirectoryEntryRva; + UINTN DebugDirectoryEntryFileOffset; + UINTN SectionHeaderOffset; + EFI_IMAGE_SECTION_HEADER SectionHeader; + EFI_IMAGE_DEBUG_DIRECTORY_ENTRY DebugEntry; + UINT32 NumberOfRvaAndSizes; + UINT32 TeStrippedOffset; if (ImageContext == NULL) { return RETURN_INVALID_PARAMETER; } + // // Assume success // - ImageContext->ImageError = IMAGE_ERROR_SUCCESS; + ImageContext->ImageError = IMAGE_ERROR_SUCCESS; Hdr.Union = &HdrData; - Status = PeCoffLoaderGetPeHeader (ImageContext, Hdr); + Status = PeCoffLoaderGetPeHeader (ImageContext, Hdr); if (RETURN_ERROR (Status)) { return Status; } @@ -600,7 +621,7 @@ PeCoffLoaderGetImageInfo ( ImageContext->ImageAddress = Hdr.Pe32Plus->OptionalHeader.ImageBase; } } else { - TeStrippedOffset = (UINT32)Hdr.Te->StrippedSize - sizeof (EFI_TE_IMAGE_HEADER); + TeStrippedOffset = (UINT32)Hdr.Te->StrippedSize - sizeof (EFI_TE_IMAGE_HEADER); ImageContext->ImageAddress = (PHYSICAL_ADDRESS)(Hdr.Te->ImageBase + TeStrippedOffset); } @@ -652,7 +673,6 @@ PeCoffLoaderGetImageInfo ( } if (NumberOfRvaAndSizes > EFI_IMAGE_DIRECTORY_ENTRY_DEBUG) { - DebugDirectoryEntryRva = DebugDirectoryEntry->VirtualAddress; // @@ -671,25 +691,26 @@ PeCoffLoaderGetImageInfo ( // // Read section header from file // - Size = sizeof (EFI_IMAGE_SECTION_HEADER); + Size = sizeof (EFI_IMAGE_SECTION_HEADER); ReadSize = Size; - Status = ImageContext->ImageRead ( - ImageContext->Handle, - SectionHeaderOffset, - &Size, - &SectionHeader - ); + Status = ImageContext->ImageRead ( + ImageContext->Handle, + SectionHeaderOffset, + &Size, + &SectionHeader + ); if (RETURN_ERROR (Status) || (Size != ReadSize)) { ImageContext->ImageError = IMAGE_ERROR_IMAGE_READ; if (Size != ReadSize) { Status = RETURN_UNSUPPORTED; } + return Status; } - if (DebugDirectoryEntryRva >= SectionHeader.VirtualAddress && - DebugDirectoryEntryRva < SectionHeader.VirtualAddress + SectionHeader.Misc.VirtualSize) { - + if ((DebugDirectoryEntryRva >= SectionHeader.VirtualAddress) && + (DebugDirectoryEntryRva < SectionHeader.VirtualAddress + SectionHeader.Misc.VirtualSize)) + { DebugDirectoryEntryFileOffset = DebugDirectoryEntryRva - SectionHeader.VirtualAddress + SectionHeader.PointerToRawData; break; } @@ -702,19 +723,20 @@ PeCoffLoaderGetImageInfo ( // // Read next debug directory entry // - Size = sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY); + Size = sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY); ReadSize = Size; - Status = ImageContext->ImageRead ( - ImageContext->Handle, - DebugDirectoryEntryFileOffset + Index, - &Size, - &DebugEntry - ); + Status = ImageContext->ImageRead ( + ImageContext->Handle, + DebugDirectoryEntryFileOffset + Index, + &Size, + &DebugEntry + ); if (RETURN_ERROR (Status) || (Size != ReadSize)) { ImageContext->ImageError = IMAGE_ERROR_IMAGE_READ; if (Size != ReadSize) { Status = RETURN_UNSUPPORTED; } + return Status; } @@ -724,8 +746,8 @@ PeCoffLoaderGetImageInfo ( // ImageContext->ImageSize when DebugEntry.RVA == 0. // if (DebugEntry.Type == EFI_IMAGE_DEBUG_TYPE_CODEVIEW) { - ImageContext->DebugDirectoryEntryRva = (UINT32) (DebugDirectoryEntryRva + Index); - if (DebugEntry.RVA == 0 && DebugEntry.FileOffset != 0) { + ImageContext->DebugDirectoryEntryRva = (UINT32)(DebugDirectoryEntryRva + Index); + if ((DebugEntry.RVA == 0) && (DebugEntry.FileOffset != 0)) { ImageContext->ImageSize += DebugEntry.SizeOfData; } @@ -735,35 +757,36 @@ PeCoffLoaderGetImageInfo ( } } } else { + DebugDirectoryEntry = &Hdr.Te->DataDirectory[1]; + DebugDirectoryEntryRva = DebugDirectoryEntry->VirtualAddress; + SectionHeaderOffset = (UINTN)(sizeof (EFI_TE_IMAGE_HEADER)); - DebugDirectoryEntry = &Hdr.Te->DataDirectory[1]; - DebugDirectoryEntryRva = DebugDirectoryEntry->VirtualAddress; - SectionHeaderOffset = (UINTN)(sizeof (EFI_TE_IMAGE_HEADER)); - - DebugDirectoryEntryFileOffset = 0; + DebugDirectoryEntryFileOffset = 0; for (Index = 0; Index < Hdr.Te->NumberOfSections;) { // // Read section header from file // - Size = sizeof (EFI_IMAGE_SECTION_HEADER); + Size = sizeof (EFI_IMAGE_SECTION_HEADER); ReadSize = Size; - Status = ImageContext->ImageRead ( - ImageContext->Handle, - SectionHeaderOffset, - &Size, - &SectionHeader - ); + Status = ImageContext->ImageRead ( + ImageContext->Handle, + SectionHeaderOffset, + &Size, + &SectionHeader + ); if (RETURN_ERROR (Status) || (Size != ReadSize)) { ImageContext->ImageError = IMAGE_ERROR_IMAGE_READ; if (Size != ReadSize) { Status = RETURN_UNSUPPORTED; } + return Status; } - if (DebugDirectoryEntryRva >= SectionHeader.VirtualAddress && - DebugDirectoryEntryRva < SectionHeader.VirtualAddress + SectionHeader.Misc.VirtualSize) { + if ((DebugDirectoryEntryRva >= SectionHeader.VirtualAddress) && + (DebugDirectoryEntryRva < SectionHeader.VirtualAddress + SectionHeader.Misc.VirtualSize)) + { DebugDirectoryEntryFileOffset = DebugDirectoryEntryRva - SectionHeader.VirtualAddress + SectionHeader.PointerToRawData - @@ -773,9 +796,9 @@ PeCoffLoaderGetImageInfo ( // File offset of the debug directory was found, if this is not the last // section, then skip to the last section for calculating the image size. // - if (Index < (UINTN) Hdr.Te->NumberOfSections - 1) { + if (Index < (UINTN)Hdr.Te->NumberOfSections - 1) { SectionHeaderOffset += (Hdr.Te->NumberOfSections - 1 - Index) * sizeof (EFI_IMAGE_SECTION_HEADER); - Index = Hdr.Te->NumberOfSections - 1; + Index = Hdr.Te->NumberOfSections - 1; continue; } } @@ -802,24 +825,25 @@ PeCoffLoaderGetImageInfo ( // // Read next debug directory entry // - Size = sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY); + Size = sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY); ReadSize = Size; - Status = ImageContext->ImageRead ( - ImageContext->Handle, - DebugDirectoryEntryFileOffset + Index, - &Size, - &DebugEntry - ); + Status = ImageContext->ImageRead ( + ImageContext->Handle, + DebugDirectoryEntryFileOffset + Index, + &Size, + &DebugEntry + ); if (RETURN_ERROR (Status) || (Size != ReadSize)) { ImageContext->ImageError = IMAGE_ERROR_IMAGE_READ; if (Size != ReadSize) { Status = RETURN_UNSUPPORTED; } + return Status; } if (DebugEntry.Type == EFI_IMAGE_DEBUG_TYPE_CODEVIEW) { - ImageContext->DebugDirectoryEntryRva = (UINT32) (DebugDirectoryEntryRva + Index); + ImageContext->DebugDirectoryEntryRva = (UINT32)(DebugDirectoryEntryRva + Index); return RETURN_SUCCESS; } } @@ -829,7 +853,6 @@ PeCoffLoaderGetImageInfo ( return RETURN_SUCCESS; } - /** Converts an image address to the loaded address. @@ -842,9 +865,9 @@ PeCoffLoaderGetImageInfo ( **/ VOID * PeCoffLoaderImageAddress ( - IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext, - IN UINTN Address, - IN UINTN TeStrippedOffset + IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext, + IN UINTN Address, + IN UINTN TeStrippedOffset ) { // @@ -855,7 +878,7 @@ PeCoffLoaderImageAddress ( return NULL; } - return (CHAR8 *)((UINTN) ImageContext->ImageAddress + Address - TeStrippedOffset); + return (CHAR8 *)((UINTN)ImageContext->ImageAddress + Address - TeStrippedOffset); } /** @@ -894,24 +917,24 @@ PeCoffLoaderRelocateImage ( IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext ) { - RETURN_STATUS Status; - EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr; - EFI_IMAGE_DATA_DIRECTORY *RelocDir; - UINT64 Adjust; - EFI_IMAGE_BASE_RELOCATION *RelocBaseOrg; - EFI_IMAGE_BASE_RELOCATION *RelocBase; - EFI_IMAGE_BASE_RELOCATION *RelocBaseEnd; - UINT16 *Reloc; - UINT16 *RelocEnd; - CHAR8 *Fixup; - CHAR8 *FixupBase; - UINT16 *Fixup16; - UINT32 *Fixup32; - UINT64 *Fixup64; - CHAR8 *FixupData; - PHYSICAL_ADDRESS BaseAddress; - UINT32 NumberOfRvaAndSizes; - UINT32 TeStrippedOffset; + RETURN_STATUS Status; + EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr; + EFI_IMAGE_DATA_DIRECTORY *RelocDir; + UINT64 Adjust; + EFI_IMAGE_BASE_RELOCATION *RelocBaseOrg; + EFI_IMAGE_BASE_RELOCATION *RelocBase; + EFI_IMAGE_BASE_RELOCATION *RelocBaseEnd; + UINT16 *Reloc; + UINT16 *RelocEnd; + CHAR8 *Fixup; + CHAR8 *FixupBase; + UINT16 *Fixup16; + UINT32 *Fixup32; + UINT64 *Fixup64; + CHAR8 *FixupData; + PHYSICAL_ADDRESS BaseAddress; + UINT32 NumberOfRvaAndSizes; + UINT32 TeStrippedOffset; ASSERT (ImageContext != NULL); @@ -941,7 +964,7 @@ PeCoffLoaderRelocateImage ( } if (!(ImageContext->IsTeImage)) { - Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)((UINTN)ImageContext->ImageAddress + ImageContext->PeCoffHeaderOffset); + Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)((UINTN)ImageContext->ImageAddress + ImageContext->PeCoffHeaderOffset); TeStrippedOffset = 0; if (Hdr.Pe32->OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) { @@ -954,18 +977,18 @@ PeCoffLoaderRelocateImage ( } NumberOfRvaAndSizes = Hdr.Pe32->OptionalHeader.NumberOfRvaAndSizes; - RelocDir = &Hdr.Pe32->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC]; + RelocDir = &Hdr.Pe32->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC]; } else { // // Use PE32+ offset // - Adjust = (UINT64) BaseAddress - Hdr.Pe32Plus->OptionalHeader.ImageBase; + Adjust = (UINT64)BaseAddress - Hdr.Pe32Plus->OptionalHeader.ImageBase; if (Adjust != 0) { Hdr.Pe32Plus->OptionalHeader.ImageBase = (UINT64)BaseAddress; } NumberOfRvaAndSizes = Hdr.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes; - RelocDir = &Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC]; + RelocDir = &Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC]; } // @@ -978,11 +1001,11 @@ PeCoffLoaderRelocateImage ( RelocDir = NULL; } } else { - Hdr.Te = (EFI_TE_IMAGE_HEADER *)(UINTN)(ImageContext->ImageAddress); - TeStrippedOffset = (UINT32)Hdr.Te->StrippedSize - sizeof (EFI_TE_IMAGE_HEADER); - Adjust = (UINT64) (BaseAddress - (Hdr.Te->ImageBase + TeStrippedOffset)); + Hdr.Te = (EFI_TE_IMAGE_HEADER *)(UINTN)(ImageContext->ImageAddress); + TeStrippedOffset = (UINT32)Hdr.Te->StrippedSize - sizeof (EFI_TE_IMAGE_HEADER); + Adjust = (UINT64)(BaseAddress - (Hdr.Te->ImageBase + TeStrippedOffset)); if (Adjust != 0) { - Hdr.Te->ImageBase = (UINT64) (BaseAddress - TeStrippedOffset); + Hdr.Te->ImageBase = (UINT64)(BaseAddress - TeStrippedOffset); } // @@ -992,12 +1015,13 @@ PeCoffLoaderRelocateImage ( } if ((RelocDir != NULL) && (RelocDir->Size > 0)) { - RelocBase = (EFI_IMAGE_BASE_RELOCATION *) PeCoffLoaderImageAddress (ImageContext, RelocDir->VirtualAddress, TeStrippedOffset); - RelocBaseEnd = (EFI_IMAGE_BASE_RELOCATION *) PeCoffLoaderImageAddress (ImageContext, - RelocDir->VirtualAddress + RelocDir->Size - 1, - TeStrippedOffset - ); - if (RelocBase == NULL || RelocBaseEnd == NULL || (UINTN) RelocBaseEnd < (UINTN) RelocBase) { + RelocBase = (EFI_IMAGE_BASE_RELOCATION *)PeCoffLoaderImageAddress (ImageContext, RelocDir->VirtualAddress, TeStrippedOffset); + RelocBaseEnd = (EFI_IMAGE_BASE_RELOCATION *)PeCoffLoaderImageAddress ( + ImageContext, + RelocDir->VirtualAddress + RelocDir->Size - 1, + TeStrippedOffset + ); + if ((RelocBase == NULL) || (RelocBaseEnd == NULL) || ((UINTN)RelocBaseEnd < (UINTN)RelocBase)) { ImageContext->ImageError = IMAGE_ERROR_FAILED_RELOCATION; return RETURN_LOAD_ERROR; } @@ -1007,6 +1031,7 @@ PeCoffLoaderRelocateImage ( // RelocBase = RelocBaseEnd = NULL; } + RelocBaseOrg = RelocBase; // @@ -1017,9 +1042,8 @@ PeCoffLoaderRelocateImage ( // Run the relocation information and apply the fixups // FixupData = ImageContext->FixupData; - while ((UINTN) RelocBase < (UINTN) RelocBaseEnd) { - - Reloc = (UINT16 *) ((CHAR8 *) RelocBase + sizeof (EFI_IMAGE_BASE_RELOCATION)); + while ((UINTN)RelocBase < (UINTN)RelocBaseEnd) { + Reloc = (UINT16 *)((CHAR8 *)RelocBase + sizeof (EFI_IMAGE_BASE_RELOCATION)); // // Add check for RelocBase->SizeOfBlock field. // @@ -1027,16 +1051,18 @@ PeCoffLoaderRelocateImage ( ImageContext->ImageError = IMAGE_ERROR_FAILED_RELOCATION; return RETURN_LOAD_ERROR; } + if ((UINTN)RelocBase > MAX_ADDRESS - RelocBase->SizeOfBlock) { ImageContext->ImageError = IMAGE_ERROR_FAILED_RELOCATION; return RETURN_LOAD_ERROR; } - RelocEnd = (UINT16 *) ((CHAR8 *) RelocBase + RelocBase->SizeOfBlock); + RelocEnd = (UINT16 *)((CHAR8 *)RelocBase + RelocBase->SizeOfBlock); if ((UINTN)RelocEnd > (UINTN)RelocBaseOrg + RelocDir->Size) { ImageContext->ImageError = IMAGE_ERROR_FAILED_RELOCATION; return RETURN_LOAD_ERROR; } + FixupBase = PeCoffLoaderImageAddress (ImageContext, RelocBase->VirtualAddress, TeStrippedOffset); if (FixupBase == NULL) { ImageContext->ImageError = IMAGE_ERROR_FAILED_RELOCATION; @@ -1046,65 +1072,70 @@ PeCoffLoaderRelocateImage ( // // Run this relocation record // - while ((UINTN) Reloc < (UINTN) RelocEnd) { + while ((UINTN)Reloc < (UINTN)RelocEnd) { Fixup = PeCoffLoaderImageAddress (ImageContext, RelocBase->VirtualAddress + (*Reloc & 0xFFF), TeStrippedOffset); if (Fixup == NULL) { ImageContext->ImageError = IMAGE_ERROR_FAILED_RELOCATION; return RETURN_LOAD_ERROR; } + switch ((*Reloc) >> 12) { - case EFI_IMAGE_REL_BASED_ABSOLUTE: - break; + case EFI_IMAGE_REL_BASED_ABSOLUTE: + break; + + case EFI_IMAGE_REL_BASED_HIGH: + Fixup16 = (UINT16 *)Fixup; + *Fixup16 = (UINT16)(*Fixup16 + ((UINT16)((UINT32)Adjust >> 16))); + if (FixupData != NULL) { + *(UINT16 *)FixupData = *Fixup16; + FixupData = FixupData + sizeof (UINT16); + } - case EFI_IMAGE_REL_BASED_HIGH: - Fixup16 = (UINT16 *) Fixup; - *Fixup16 = (UINT16) (*Fixup16 + ((UINT16) ((UINT32) Adjust >> 16))); - if (FixupData != NULL) { - *(UINT16 *) FixupData = *Fixup16; - FixupData = FixupData + sizeof (UINT16); - } - break; + break; - case EFI_IMAGE_REL_BASED_LOW: - Fixup16 = (UINT16 *) Fixup; - *Fixup16 = (UINT16) (*Fixup16 + (UINT16) Adjust); - if (FixupData != NULL) { - *(UINT16 *) FixupData = *Fixup16; - FixupData = FixupData + sizeof (UINT16); - } - break; + case EFI_IMAGE_REL_BASED_LOW: + Fixup16 = (UINT16 *)Fixup; + *Fixup16 = (UINT16)(*Fixup16 + (UINT16)Adjust); + if (FixupData != NULL) { + *(UINT16 *)FixupData = *Fixup16; + FixupData = FixupData + sizeof (UINT16); + } - case EFI_IMAGE_REL_BASED_HIGHLOW: - Fixup32 = (UINT32 *) Fixup; - *Fixup32 = *Fixup32 + (UINT32) Adjust; - if (FixupData != NULL) { - FixupData = ALIGN_POINTER (FixupData, sizeof (UINT32)); - *(UINT32 *)FixupData = *Fixup32; - FixupData = FixupData + sizeof (UINT32); - } - break; + break; - case EFI_IMAGE_REL_BASED_DIR64: - Fixup64 = (UINT64 *) Fixup; - *Fixup64 = *Fixup64 + (UINT64) Adjust; - if (FixupData != NULL) { - FixupData = ALIGN_POINTER (FixupData, sizeof(UINT64)); - *(UINT64 *)(FixupData) = *Fixup64; - FixupData = FixupData + sizeof(UINT64); - } - break; + case EFI_IMAGE_REL_BASED_HIGHLOW: + Fixup32 = (UINT32 *)Fixup; + *Fixup32 = *Fixup32 + (UINT32)Adjust; + if (FixupData != NULL) { + FixupData = ALIGN_POINTER (FixupData, sizeof (UINT32)); + *(UINT32 *)FixupData = *Fixup32; + FixupData = FixupData + sizeof (UINT32); + } - default: - // - // The common code does not handle some of the stranger IPF relocations - // PeCoffLoaderRelocateImageEx () adds support for these complex fixups - // on IPF and is a No-Op on other architectures. - // - Status = PeCoffLoaderRelocateImageEx (Reloc, Fixup, &FixupData, Adjust); - if (RETURN_ERROR (Status)) { - ImageContext->ImageError = IMAGE_ERROR_FAILED_RELOCATION; - return Status; - } + break; + + case EFI_IMAGE_REL_BASED_DIR64: + Fixup64 = (UINT64 *)Fixup; + *Fixup64 = *Fixup64 + (UINT64)Adjust; + if (FixupData != NULL) { + FixupData = ALIGN_POINTER (FixupData, sizeof (UINT64)); + *(UINT64 *)(FixupData) = *Fixup64; + FixupData = FixupData + sizeof (UINT64); + } + + break; + + default: + // + // The common code does not handle some of the stranger IPF relocations + // PeCoffLoaderRelocateImageEx () adds support for these complex fixups + // on IPF and is a No-Op on other architectures. + // + Status = PeCoffLoaderRelocateImageEx (Reloc, Fixup, &FixupData, Adjust); + if (RETURN_ERROR (Status)) { + ImageContext->ImageError = IMAGE_ERROR_FAILED_RELOCATION; + return Status; + } } // @@ -1116,16 +1147,17 @@ PeCoffLoaderRelocateImage ( // // Next reloc block // - RelocBase = (EFI_IMAGE_BASE_RELOCATION *) RelocEnd; + RelocBase = (EFI_IMAGE_BASE_RELOCATION *)RelocEnd; } + ASSERT ((UINTN)FixupData <= (UINTN)ImageContext->FixupData + ImageContext->FixupDataSize); // // Adjust the EntryPoint to match the linked-to address // if (ImageContext->DestinationAddress != 0) { - ImageContext->EntryPoint -= (UINT64) ImageContext->ImageAddress; - ImageContext->EntryPoint += (UINT64) ImageContext->DestinationAddress; + ImageContext->EntryPoint -= (UINT64)ImageContext->ImageAddress; + ImageContext->EntryPoint += (UINT64)ImageContext->DestinationAddress; } } @@ -1173,27 +1205,27 @@ PeCoffLoaderLoadImage ( IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext ) { - RETURN_STATUS Status; - EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr; - PE_COFF_LOADER_IMAGE_CONTEXT CheckContext; - EFI_IMAGE_SECTION_HEADER *FirstSection; - EFI_IMAGE_SECTION_HEADER *Section; - UINTN NumberOfSections; - UINTN Index; - CHAR8 *Base; - CHAR8 *End; - EFI_IMAGE_DATA_DIRECTORY *DirectoryEntry; - EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *DebugEntry; - UINTN Size; - UINT32 TempDebugEntryRva; - UINT32 NumberOfRvaAndSizes; - EFI_IMAGE_RESOURCE_DIRECTORY *ResourceDirectory; - EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY *ResourceDirectoryEntry; - EFI_IMAGE_RESOURCE_DIRECTORY_STRING *ResourceDirectoryString; - EFI_IMAGE_RESOURCE_DATA_ENTRY *ResourceDataEntry; - CHAR16 *String; - UINT32 Offset; - UINT32 TeStrippedOffset; + RETURN_STATUS Status; + EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr; + PE_COFF_LOADER_IMAGE_CONTEXT CheckContext; + EFI_IMAGE_SECTION_HEADER *FirstSection; + EFI_IMAGE_SECTION_HEADER *Section; + UINTN NumberOfSections; + UINTN Index; + CHAR8 *Base; + CHAR8 *End; + EFI_IMAGE_DATA_DIRECTORY *DirectoryEntry; + EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *DebugEntry; + UINTN Size; + UINT32 TempDebugEntryRva; + UINT32 NumberOfRvaAndSizes; + EFI_IMAGE_RESOURCE_DIRECTORY *ResourceDirectory; + EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY *ResourceDirectoryEntry; + EFI_IMAGE_RESOURCE_DIRECTORY_STRING *ResourceDirectoryString; + EFI_IMAGE_RESOURCE_DATA_ENTRY *ResourceDataEntry; + CHAR16 *String; + UINT32 Offset; + UINT32 TeStrippedOffset; ASSERT (ImageContext != NULL); @@ -1221,6 +1253,7 @@ PeCoffLoaderLoadImage ( ImageContext->ImageError = IMAGE_ERROR_INVALID_IMAGE_SIZE; return RETURN_BUFFER_TOO_SMALL; } + if (ImageContext->ImageAddress == 0) { // // Image cannot be loaded into 0 address. @@ -1228,6 +1261,7 @@ PeCoffLoaderLoadImage ( ImageContext->ImageError = IMAGE_ERROR_INVALID_IMAGE_ADDRESS; return RETURN_INVALID_PARAMETER; } + // // If there's no relocations, then make sure it's not a runtime driver, // and that it's being loaded at the linked address. @@ -1241,6 +1275,7 @@ PeCoffLoaderLoadImage ( ImageContext->ImageError = IMAGE_ERROR_INVALID_SUBSYSTEM; return RETURN_LOAD_ERROR; } + // // If the image does not contain relocations, and the requested load address // is not the linked address, then return an error. @@ -1250,6 +1285,7 @@ PeCoffLoaderLoadImage ( return RETURN_INVALID_PARAMETER; } } + // // Make sure the allocated space has the proper section alignment // @@ -1259,43 +1295,44 @@ PeCoffLoaderLoadImage ( return RETURN_INVALID_PARAMETER; } } + // // Read the entire PE/COFF or TE header into memory // if (!(ImageContext->IsTeImage)) { Status = ImageContext->ImageRead ( - ImageContext->Handle, - 0, - &ImageContext->SizeOfHeaders, - (VOID *) (UINTN) ImageContext->ImageAddress - ); + ImageContext->Handle, + 0, + &ImageContext->SizeOfHeaders, + (VOID *)(UINTN)ImageContext->ImageAddress + ); Hdr.Pe32 = (EFI_IMAGE_NT_HEADERS32 *)((UINTN)ImageContext->ImageAddress + ImageContext->PeCoffHeaderOffset); - FirstSection = (EFI_IMAGE_SECTION_HEADER *) ( - (UINTN)ImageContext->ImageAddress + - ImageContext->PeCoffHeaderOffset + - sizeof(UINT32) + - sizeof(EFI_IMAGE_FILE_HEADER) + - Hdr.Pe32->FileHeader.SizeOfOptionalHeader - ); - NumberOfSections = (UINTN) (Hdr.Pe32->FileHeader.NumberOfSections); + FirstSection = (EFI_IMAGE_SECTION_HEADER *)( + (UINTN)ImageContext->ImageAddress + + ImageContext->PeCoffHeaderOffset + + sizeof (UINT32) + + sizeof (EFI_IMAGE_FILE_HEADER) + + Hdr.Pe32->FileHeader.SizeOfOptionalHeader + ); + NumberOfSections = (UINTN)(Hdr.Pe32->FileHeader.NumberOfSections); TeStrippedOffset = 0; } else { Status = ImageContext->ImageRead ( - ImageContext->Handle, - 0, - &ImageContext->SizeOfHeaders, - (void *)(UINTN)ImageContext->ImageAddress - ); - - Hdr.Te = (EFI_TE_IMAGE_HEADER *)(UINTN)(ImageContext->ImageAddress); - FirstSection = (EFI_IMAGE_SECTION_HEADER *) ( - (UINTN)ImageContext->ImageAddress + - sizeof(EFI_TE_IMAGE_HEADER) - ); - NumberOfSections = (UINTN) (Hdr.Te->NumberOfSections); - TeStrippedOffset = (UINT32) Hdr.Te->StrippedSize - sizeof (EFI_TE_IMAGE_HEADER); + ImageContext->Handle, + 0, + &ImageContext->SizeOfHeaders, + (void *)(UINTN)ImageContext->ImageAddress + ); + + Hdr.Te = (EFI_TE_IMAGE_HEADER *)(UINTN)(ImageContext->ImageAddress); + FirstSection = (EFI_IMAGE_SECTION_HEADER *)( + (UINTN)ImageContext->ImageAddress + + sizeof (EFI_TE_IMAGE_HEADER) + ); + NumberOfSections = (UINTN)(Hdr.Te->NumberOfSections); + TeStrippedOffset = (UINT32)Hdr.Te->StrippedSize - sizeof (EFI_TE_IMAGE_HEADER); } if (RETURN_ERROR (Status)) { @@ -1311,9 +1348,9 @@ PeCoffLoaderLoadImage ( // // Read the section // - Size = (UINTN) Section->Misc.VirtualSize; + Size = (UINTN)Section->Misc.VirtualSize; if ((Size == 0) || (Size > Section->SizeOfRawData)) { - Size = (UINTN) Section->SizeOfRawData; + Size = (UINTN)Section->SizeOfRawData; } // @@ -1332,11 +1369,11 @@ PeCoffLoaderLoadImage ( if (Section->SizeOfRawData > 0) { Status = ImageContext->ImageRead ( - ImageContext->Handle, - Section->PointerToRawData - TeStrippedOffset, - &Size, - Base - ); + ImageContext->Handle, + Section->PointerToRawData - TeStrippedOffset, + &Size, + Base + ); if (RETURN_ERROR (Status)) { ImageContext->ImageError = IMAGE_ERROR_IMAGE_READ; return Status; @@ -1404,13 +1441,13 @@ PeCoffLoaderLoadImage ( // Use PE32 offset // NumberOfRvaAndSizes = Hdr.Pe32->OptionalHeader.NumberOfRvaAndSizes; - DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *)&Hdr.Pe32->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC]; + DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *)&Hdr.Pe32->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC]; } else { // // Use PE32+ offset // NumberOfRvaAndSizes = Hdr.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes; - DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *)&Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC]; + DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *)&Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC]; } // @@ -1425,6 +1462,7 @@ PeCoffLoaderLoadImage ( DirectoryEntry = &Hdr.Te->DataDirectory[0]; ImageContext->FixupDataSize = DirectoryEntry->Size / sizeof (UINT16) * sizeof (UINT64); } + // // Consumer must allocate a buffer for the relocation fixup log. // Only used for runtime drivers. @@ -1436,17 +1474,17 @@ PeCoffLoaderLoadImage ( // if (ImageContext->DebugDirectoryEntryRva != 0) { DebugEntry = PeCoffLoaderImageAddress ( - ImageContext, - ImageContext->DebugDirectoryEntryRva, - TeStrippedOffset - ); + ImageContext, + ImageContext->DebugDirectoryEntryRva, + TeStrippedOffset + ); if (DebugEntry == NULL) { ImageContext->ImageError = IMAGE_ERROR_FAILED_RELOCATION; return RETURN_LOAD_ERROR; } TempDebugEntryRva = DebugEntry->RVA; - if (DebugEntry->RVA == 0 && DebugEntry->FileOffset != 0) { + if ((DebugEntry->RVA == 0) && (DebugEntry->FileOffset != 0)) { Section--; if ((UINTN)Section->SizeOfRawData < Section->Misc.VirtualSize) { TempDebugEntryRva = Section->VirtualAddress + Section->Misc.VirtualSize; @@ -1463,13 +1501,13 @@ PeCoffLoaderLoadImage ( } if (DebugEntry->RVA == 0) { - Size = DebugEntry->SizeOfData; + Size = DebugEntry->SizeOfData; Status = ImageContext->ImageRead ( - ImageContext->Handle, - DebugEntry->FileOffset - TeStrippedOffset, - &Size, - ImageContext->CodeView - ); + ImageContext->Handle, + DebugEntry->FileOffset - TeStrippedOffset, + &Size, + ImageContext->CodeView + ); // // Should we apply fix up to this field according to the size difference between PE and TE? // Because now we maintain TE header fields unfixed, this field will also remain as they are @@ -1484,33 +1522,36 @@ PeCoffLoaderLoadImage ( DebugEntry->RVA = TempDebugEntryRva; } - switch (*(UINT32 *) ImageContext->CodeView) { - case CODEVIEW_SIGNATURE_NB10: - if (DebugEntry->SizeOfData < sizeof (EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY)) { - ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; - return RETURN_UNSUPPORTED; - } - ImageContext->PdbPointer = (CHAR8 *)ImageContext->CodeView + sizeof (EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY); - break; + switch (*(UINT32 *)ImageContext->CodeView) { + case CODEVIEW_SIGNATURE_NB10: + if (DebugEntry->SizeOfData < sizeof (EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY)) { + ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; + return RETURN_UNSUPPORTED; + } - case CODEVIEW_SIGNATURE_RSDS: - if (DebugEntry->SizeOfData < sizeof (EFI_IMAGE_DEBUG_CODEVIEW_RSDS_ENTRY)) { - ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; - return RETURN_UNSUPPORTED; - } - ImageContext->PdbPointer = (CHAR8 *)ImageContext->CodeView + sizeof (EFI_IMAGE_DEBUG_CODEVIEW_RSDS_ENTRY); - break; + ImageContext->PdbPointer = (CHAR8 *)ImageContext->CodeView + sizeof (EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY); + break; - case CODEVIEW_SIGNATURE_MTOC: - if (DebugEntry->SizeOfData < sizeof (EFI_IMAGE_DEBUG_CODEVIEW_MTOC_ENTRY)) { - ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; - return RETURN_UNSUPPORTED; - } - ImageContext->PdbPointer = (CHAR8 *)ImageContext->CodeView + sizeof (EFI_IMAGE_DEBUG_CODEVIEW_MTOC_ENTRY); - break; + case CODEVIEW_SIGNATURE_RSDS: + if (DebugEntry->SizeOfData < sizeof (EFI_IMAGE_DEBUG_CODEVIEW_RSDS_ENTRY)) { + ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; + return RETURN_UNSUPPORTED; + } + + ImageContext->PdbPointer = (CHAR8 *)ImageContext->CodeView + sizeof (EFI_IMAGE_DEBUG_CODEVIEW_RSDS_ENTRY); + break; + + case CODEVIEW_SIGNATURE_MTOC: + if (DebugEntry->SizeOfData < sizeof (EFI_IMAGE_DEBUG_CODEVIEW_MTOC_ENTRY)) { + ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; + return RETURN_UNSUPPORTED; + } - default: - break; + ImageContext->PdbPointer = (CHAR8 *)ImageContext->CodeView + sizeof (EFI_IMAGE_DEBUG_CODEVIEW_MTOC_ENTRY); + break; + + default: + break; } } } @@ -1525,26 +1566,27 @@ PeCoffLoaderLoadImage ( // Use PE32 offset // NumberOfRvaAndSizes = Hdr.Pe32->OptionalHeader.NumberOfRvaAndSizes; - DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *)&Hdr.Pe32->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_RESOURCE]; + DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *)&Hdr.Pe32->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_RESOURCE]; } else { // // Use PE32+ offset // NumberOfRvaAndSizes = Hdr.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes; - DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *)&Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_RESOURCE]; + DirectoryEntry = (EFI_IMAGE_DATA_DIRECTORY *)&Hdr.Pe32Plus->OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_RESOURCE]; } - if (NumberOfRvaAndSizes > EFI_IMAGE_DIRECTORY_ENTRY_RESOURCE && DirectoryEntry->Size != 0) { + if ((NumberOfRvaAndSizes > EFI_IMAGE_DIRECTORY_ENTRY_RESOURCE) && (DirectoryEntry->Size != 0)) { Base = PeCoffLoaderImageAddress (ImageContext, DirectoryEntry->VirtualAddress, 0); if (Base != NULL) { - ResourceDirectory = (EFI_IMAGE_RESOURCE_DIRECTORY *) Base; - Offset = sizeof (EFI_IMAGE_RESOURCE_DIRECTORY) + sizeof (EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY) * - (ResourceDirectory->NumberOfNamedEntries + ResourceDirectory->NumberOfIdEntries); + ResourceDirectory = (EFI_IMAGE_RESOURCE_DIRECTORY *)Base; + Offset = sizeof (EFI_IMAGE_RESOURCE_DIRECTORY) + sizeof (EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY) * + (ResourceDirectory->NumberOfNamedEntries + ResourceDirectory->NumberOfIdEntries); if (Offset > DirectoryEntry->Size) { ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; return RETURN_UNSUPPORTED; } - ResourceDirectoryEntry = (EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY *) (ResourceDirectory + 1); + + ResourceDirectoryEntry = (EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY *)(ResourceDirectory + 1); for (Index = 0; Index < ResourceDirectory->NumberOfNamedEntries; Index++) { if (ResourceDirectoryEntry->u1.s.NameIsString) { @@ -1555,13 +1597,15 @@ PeCoffLoaderLoadImage ( ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; return RETURN_UNSUPPORTED; } - ResourceDirectoryString = (EFI_IMAGE_RESOURCE_DIRECTORY_STRING *) (Base + ResourceDirectoryEntry->u1.s.NameOffset); - String = &ResourceDirectoryString->String[0]; - if (ResourceDirectoryString->Length == 3 && - String[0] == L'H' && - String[1] == L'I' && - String[2] == L'I') { + ResourceDirectoryString = (EFI_IMAGE_RESOURCE_DIRECTORY_STRING *)(Base + ResourceDirectoryEntry->u1.s.NameOffset); + String = &ResourceDirectoryString->String[0]; + + if ((ResourceDirectoryString->Length == 3) && + (String[0] == L'H') && + (String[1] == L'I') && + (String[2] == L'I')) + { // // Resource Type "HII" found // @@ -1573,14 +1617,16 @@ PeCoffLoaderLoadImage ( ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; return RETURN_UNSUPPORTED; } - ResourceDirectory = (EFI_IMAGE_RESOURCE_DIRECTORY *) (Base + ResourceDirectoryEntry->u2.s.OffsetToDirectory); - Offset = ResourceDirectoryEntry->u2.s.OffsetToDirectory + sizeof (EFI_IMAGE_RESOURCE_DIRECTORY) + - sizeof (EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY) * (ResourceDirectory->NumberOfNamedEntries + ResourceDirectory->NumberOfIdEntries); + + ResourceDirectory = (EFI_IMAGE_RESOURCE_DIRECTORY *)(Base + ResourceDirectoryEntry->u2.s.OffsetToDirectory); + Offset = ResourceDirectoryEntry->u2.s.OffsetToDirectory + sizeof (EFI_IMAGE_RESOURCE_DIRECTORY) + + sizeof (EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY) * (ResourceDirectory->NumberOfNamedEntries + ResourceDirectory->NumberOfIdEntries); if (Offset > DirectoryEntry->Size) { ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; return RETURN_UNSUPPORTED; } - ResourceDirectoryEntry = (EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY *) (ResourceDirectory + 1); + + ResourceDirectoryEntry = (EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY *)(ResourceDirectory + 1); if (ResourceDirectoryEntry->u2.s.DataIsDirectory) { // @@ -1590,14 +1636,16 @@ PeCoffLoaderLoadImage ( ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; return RETURN_UNSUPPORTED; } - ResourceDirectory = (EFI_IMAGE_RESOURCE_DIRECTORY *) (Base + ResourceDirectoryEntry->u2.s.OffsetToDirectory); - Offset = ResourceDirectoryEntry->u2.s.OffsetToDirectory + sizeof (EFI_IMAGE_RESOURCE_DIRECTORY) + - sizeof (EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY) * (ResourceDirectory->NumberOfNamedEntries + ResourceDirectory->NumberOfIdEntries); + + ResourceDirectory = (EFI_IMAGE_RESOURCE_DIRECTORY *)(Base + ResourceDirectoryEntry->u2.s.OffsetToDirectory); + Offset = ResourceDirectoryEntry->u2.s.OffsetToDirectory + sizeof (EFI_IMAGE_RESOURCE_DIRECTORY) + + sizeof (EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY) * (ResourceDirectory->NumberOfNamedEntries + ResourceDirectory->NumberOfIdEntries); if (Offset > DirectoryEntry->Size) { ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; return RETURN_UNSUPPORTED; } - ResourceDirectoryEntry = (EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY *) (ResourceDirectory + 1); + + ResourceDirectoryEntry = (EFI_IMAGE_RESOURCE_DIRECTORY_ENTRY *)(ResourceDirectory + 1); } } @@ -1609,12 +1657,14 @@ PeCoffLoaderLoadImage ( ImageContext->ImageError = IMAGE_ERROR_UNSUPPORTED; return RETURN_UNSUPPORTED; } - ResourceDataEntry = (EFI_IMAGE_RESOURCE_DATA_ENTRY *) (Base + ResourceDirectoryEntry->u2.OffsetToData); - ImageContext->HiiResourceData = (PHYSICAL_ADDRESS) (UINTN) PeCoffLoaderImageAddress (ImageContext, ResourceDataEntry->OffsetToData, 0); + + ResourceDataEntry = (EFI_IMAGE_RESOURCE_DATA_ENTRY *)(Base + ResourceDirectoryEntry->u2.OffsetToData); + ImageContext->HiiResourceData = (PHYSICAL_ADDRESS)(UINTN)PeCoffLoaderImageAddress (ImageContext, ResourceDataEntry->OffsetToData, 0); break; } } } + ResourceDirectoryEntry++; } } @@ -1624,7 +1674,6 @@ PeCoffLoaderLoadImage ( return Status; } - /** Reapply fixups on a fixed up PE32/PE32+ image to allow virutal calling at EFI runtime. @@ -1651,44 +1700,44 @@ PeCoffLoaderLoadImage ( VOID EFIAPI PeCoffLoaderRelocateImageForRuntime ( - IN PHYSICAL_ADDRESS ImageBase, - IN PHYSICAL_ADDRESS VirtImageBase, - IN UINTN ImageSize, - IN VOID *RelocationData + IN PHYSICAL_ADDRESS ImageBase, + IN PHYSICAL_ADDRESS VirtImageBase, + IN UINTN ImageSize, + IN VOID *RelocationData ) { - CHAR8 *OldBase; - CHAR8 *NewBase; - EFI_IMAGE_DOS_HEADER *DosHdr; - EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr; - UINT32 NumberOfRvaAndSizes; - EFI_IMAGE_DATA_DIRECTORY *DataDirectory; - EFI_IMAGE_DATA_DIRECTORY *RelocDir; - EFI_IMAGE_BASE_RELOCATION *RelocBase; - EFI_IMAGE_BASE_RELOCATION *RelocBaseEnd; - EFI_IMAGE_BASE_RELOCATION *RelocBaseOrig; - UINT16 *Reloc; - UINT16 *RelocEnd; - CHAR8 *Fixup; - CHAR8 *FixupBase; - UINT16 *Fixup16; - UINT32 *Fixup32; - UINT64 *Fixup64; - CHAR8 *FixupData; - UINTN Adjust; - RETURN_STATUS Status; - PE_COFF_LOADER_IMAGE_CONTEXT ImageContext; - - if (RelocationData == NULL || ImageBase == 0x0 || VirtImageBase == 0x0) { + CHAR8 *OldBase; + CHAR8 *NewBase; + EFI_IMAGE_DOS_HEADER *DosHdr; + EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION Hdr; + UINT32 NumberOfRvaAndSizes; + EFI_IMAGE_DATA_DIRECTORY *DataDirectory; + EFI_IMAGE_DATA_DIRECTORY *RelocDir; + EFI_IMAGE_BASE_RELOCATION *RelocBase; + EFI_IMAGE_BASE_RELOCATION *RelocBaseEnd; + EFI_IMAGE_BASE_RELOCATION *RelocBaseOrig; + UINT16 *Reloc; + UINT16 *RelocEnd; + CHAR8 *Fixup; + CHAR8 *FixupBase; + UINT16 *Fixup16; + UINT32 *Fixup32; + UINT64 *Fixup64; + CHAR8 *FixupData; + UINTN Adjust; + RETURN_STATUS Status; + PE_COFF_LOADER_IMAGE_CONTEXT ImageContext; + + if ((RelocationData == NULL) || (ImageBase == 0x0) || (VirtImageBase == 0x0)) { return; } OldBase = (CHAR8 *)((UINTN)ImageBase); NewBase = (CHAR8 *)((UINTN)VirtImageBase); - Adjust = (UINTN) NewBase - (UINTN) OldBase; + Adjust = (UINTN)NewBase - (UINTN)OldBase; ImageContext.ImageAddress = ImageBase; - ImageContext.ImageSize = ImageSize; + ImageContext.ImageSize = ImageSize; // // Find the image's relocate dir info @@ -1710,7 +1759,7 @@ PeCoffLoaderRelocateImageForRuntime ( // // Not a valid PE image so Exit // - return ; + return; } if (Hdr.Pe32->OptionalHeader.Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC) { @@ -1718,13 +1767,13 @@ PeCoffLoaderRelocateImageForRuntime ( // Use PE32 offset // NumberOfRvaAndSizes = Hdr.Pe32->OptionalHeader.NumberOfRvaAndSizes; - DataDirectory = (EFI_IMAGE_DATA_DIRECTORY *)&(Hdr.Pe32->OptionalHeader.DataDirectory[0]); + DataDirectory = (EFI_IMAGE_DATA_DIRECTORY *)&(Hdr.Pe32->OptionalHeader.DataDirectory[0]); } else { // // Use PE32+ offset // NumberOfRvaAndSizes = Hdr.Pe32Plus->OptionalHeader.NumberOfRvaAndSizes; - DataDirectory = (EFI_IMAGE_DATA_DIRECTORY *)&(Hdr.Pe32Plus->OptionalHeader.DataDirectory[0]); + DataDirectory = (EFI_IMAGE_DATA_DIRECTORY *)&(Hdr.Pe32Plus->OptionalHeader.DataDirectory[0]); } // @@ -1734,18 +1783,20 @@ PeCoffLoaderRelocateImageForRuntime ( // is present in the image. You have to check the NumberOfRvaAndSizes in // the optional header to verify a desired directory entry is there. // - RelocBase = NULL; + RelocBase = NULL; RelocBaseEnd = NULL; if (NumberOfRvaAndSizes > EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC) { - RelocDir = DataDirectory + EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC; + RelocDir = DataDirectory + EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC; if ((RelocDir != NULL) && (RelocDir->Size > 0)) { - RelocBase = (EFI_IMAGE_BASE_RELOCATION *) PeCoffLoaderImageAddress (&ImageContext, RelocDir->VirtualAddress, 0); - RelocBaseEnd = (EFI_IMAGE_BASE_RELOCATION *) PeCoffLoaderImageAddress (&ImageContext, - RelocDir->VirtualAddress + RelocDir->Size - 1, - 0 - ); + RelocBase = (EFI_IMAGE_BASE_RELOCATION *)PeCoffLoaderImageAddress (&ImageContext, RelocDir->VirtualAddress, 0); + RelocBaseEnd = (EFI_IMAGE_BASE_RELOCATION *)PeCoffLoaderImageAddress ( + &ImageContext, + RelocDir->VirtualAddress + RelocDir->Size - 1, + 0 + ); } - if (RelocBase == NULL || RelocBaseEnd == NULL || (UINTN) RelocBaseEnd < (UINTN) RelocBase) { + + if ((RelocBase == NULL) || (RelocBaseEnd == NULL) || ((UINTN)RelocBaseEnd < (UINTN)RelocBase)) { // // relocation block is not valid, just return // @@ -1756,7 +1807,7 @@ PeCoffLoaderRelocateImageForRuntime ( // Cannot find relocations, cannot continue to relocate the image, ASSERT for this invalid image. // ASSERT (FALSE); - return ; + return; } // @@ -1772,9 +1823,9 @@ PeCoffLoaderRelocateImageForRuntime ( // by code will not be fixed up, since that would set them back to // defaults. // - FixupData = RelocationData; + FixupData = RelocationData; RelocBaseOrig = RelocBase; - while ((UINTN) RelocBase < (UINTN) RelocBaseEnd) { + while ((UINTN)RelocBase < (UINTN)RelocBaseEnd) { // // Add check for RelocBase->SizeOfBlock field. // @@ -1785,8 +1836,8 @@ PeCoffLoaderRelocateImageForRuntime ( return; } - Reloc = (UINT16 *) ((UINT8 *) RelocBase + sizeof (EFI_IMAGE_BASE_RELOCATION)); - RelocEnd = (UINT16 *) ((UINT8 *) RelocBase + RelocBase->SizeOfBlock); + Reloc = (UINT16 *)((UINT8 *)RelocBase + sizeof (EFI_IMAGE_BASE_RELOCATION)); + RelocEnd = (UINT16 *)((UINT8 *)RelocBase + RelocBase->SizeOfBlock); if ((UINTN)RelocEnd > (UINTN)RelocBaseOrig + RelocDir->Size) { return; } @@ -1799,78 +1850,78 @@ PeCoffLoaderRelocateImageForRuntime ( // // Run this relocation record // - while ((UINTN) Reloc < (UINTN) RelocEnd) { - + while ((UINTN)Reloc < (UINTN)RelocEnd) { Fixup = PeCoffLoaderImageAddress (&ImageContext, RelocBase->VirtualAddress + (*Reloc & 0xFFF), 0); if (Fixup == NULL) { return; } + switch ((*Reloc) >> 12) { + case EFI_IMAGE_REL_BASED_ABSOLUTE: + break; - case EFI_IMAGE_REL_BASED_ABSOLUTE: - break; + case EFI_IMAGE_REL_BASED_HIGH: + Fixup16 = (UINT16 *)Fixup; + if (*(UINT16 *)FixupData == *Fixup16) { + *Fixup16 = (UINT16)(*Fixup16 + ((UINT16)((UINT32)Adjust >> 16))); + } - case EFI_IMAGE_REL_BASED_HIGH: - Fixup16 = (UINT16 *) Fixup; - if (*(UINT16 *) FixupData == *Fixup16) { - *Fixup16 = (UINT16) (*Fixup16 + ((UINT16) ((UINT32) Adjust >> 16))); - } + FixupData = FixupData + sizeof (UINT16); + break; - FixupData = FixupData + sizeof (UINT16); - break; - - case EFI_IMAGE_REL_BASED_LOW: - Fixup16 = (UINT16 *) Fixup; - if (*(UINT16 *) FixupData == *Fixup16) { - *Fixup16 = (UINT16) (*Fixup16 + ((UINT16) Adjust & 0xffff)); - } + case EFI_IMAGE_REL_BASED_LOW: + Fixup16 = (UINT16 *)Fixup; + if (*(UINT16 *)FixupData == *Fixup16) { + *Fixup16 = (UINT16)(*Fixup16 + ((UINT16)Adjust & 0xffff)); + } - FixupData = FixupData + sizeof (UINT16); - break; + FixupData = FixupData + sizeof (UINT16); + break; - case EFI_IMAGE_REL_BASED_HIGHLOW: - Fixup32 = (UINT32 *) Fixup; - FixupData = ALIGN_POINTER (FixupData, sizeof (UINT32)); - if (*(UINT32 *) FixupData == *Fixup32) { - *Fixup32 = *Fixup32 + (UINT32) Adjust; - } + case EFI_IMAGE_REL_BASED_HIGHLOW: + Fixup32 = (UINT32 *)Fixup; + FixupData = ALIGN_POINTER (FixupData, sizeof (UINT32)); + if (*(UINT32 *)FixupData == *Fixup32) { + *Fixup32 = *Fixup32 + (UINT32)Adjust; + } - FixupData = FixupData + sizeof (UINT32); - break; + FixupData = FixupData + sizeof (UINT32); + break; - case EFI_IMAGE_REL_BASED_DIR64: - Fixup64 = (UINT64 *)Fixup; - FixupData = ALIGN_POINTER (FixupData, sizeof (UINT64)); - if (*(UINT64 *) FixupData == *Fixup64) { - *Fixup64 = *Fixup64 + (UINT64)Adjust; - } + case EFI_IMAGE_REL_BASED_DIR64: + Fixup64 = (UINT64 *)Fixup; + FixupData = ALIGN_POINTER (FixupData, sizeof (UINT64)); + if (*(UINT64 *)FixupData == *Fixup64) { + *Fixup64 = *Fixup64 + (UINT64)Adjust; + } - FixupData = FixupData + sizeof (UINT64); - break; + FixupData = FixupData + sizeof (UINT64); + break; - default: - // - // Only Itanium requires ConvertPeImage_Ex - // - Status = PeHotRelocateImageEx (Reloc, Fixup, &FixupData, Adjust); - if (RETURN_ERROR (Status)) { - return ; - } + default: + // + // Only Itanium requires ConvertPeImage_Ex + // + Status = PeHotRelocateImageEx (Reloc, Fixup, &FixupData, Adjust); + if (RETURN_ERROR (Status)) { + return; + } } + // // Next relocation record // Reloc += 1; } + // // next reloc block // - RelocBase = (EFI_IMAGE_BASE_RELOCATION *) RelocEnd; + RelocBase = (EFI_IMAGE_BASE_RELOCATION *)RelocEnd; } } } - /** Reads contents of a PE/COFF image from a buffer in system memory. @@ -1899,10 +1950,10 @@ PeCoffLoaderRelocateImageForRuntime ( RETURN_STATUS EFIAPI PeCoffLoaderImageReadFromMemory ( - IN VOID *FileHandle, - IN UINTN FileOffset, - IN OUT UINTN *ReadSize, - OUT VOID *Buffer + IN VOID *FileHandle, + IN UINTN FileOffset, + IN OUT UINTN *ReadSize, + OUT VOID *Buffer ) { ASSERT (ReadSize != NULL); diff --git a/MdePkg/Library/BasePeCoffLib/BasePeCoffLibInternals.h b/MdePkg/Library/BasePeCoffLib/BasePeCoffLibInternals.h index 3ee56e0..aa86a54 100644 --- a/MdePkg/Library/BasePeCoffLib/BasePeCoffLibInternals.h +++ b/MdePkg/Library/BasePeCoffLib/BasePeCoffLibInternals.h @@ -20,13 +20,12 @@ // // Macro definitions for RISC-V architecture. // -#define RV_X(x, s, n) (((x) >> (s)) & ((1<<(n))-1)) -#define RISCV_IMM_BITS 12 -#define RISCV_IMM_REACH (1LL<> (s)) & ((1<<(n))-1)) +#define RISCV_IMM_BITS 12 +#define RISCV_IMM_REACH (1LL<> 12) { - case EFI_IMAGE_REL_BASED_RISCV_HI20: + case EFI_IMAGE_REL_BASED_RISCV_HI20: *(UINT64 *)(*FixupData) = (UINT64)(UINTN)Fixup; break; - case EFI_IMAGE_REL_BASED_RISCV_LOW12I: + case EFI_IMAGE_REL_BASED_RISCV_LOW12I: RiscVHi20Fixup = (UINT32 *)(*(UINT64 *)(*FixupData)); if (RiscVHi20Fixup != NULL) { - - Value = (UINT32)(RV_X(*RiscVHi20Fixup, 12, 20) << 12); - Value2 = (UINT32)(RV_X(*(UINT32 *)Fixup, 20, 12)); + Value = (UINT32)(RV_X (*RiscVHi20Fixup, 12, 20) << 12); + Value2 = (UINT32)(RV_X (*(UINT32 *)Fixup, 20, 12)); if (Value2 & (RISCV_IMM_REACH/2)) { Value2 |= ~(RISCV_IMM_REACH-1); } - Value += Value2; - Value += (UINT32)Adjust; - Value2 = RISCV_CONST_HIGH_PART (Value); - *(UINT32 *)RiscVHi20Fixup = (RV_X (Value2, 12, 20) << 12) |\ - (RV_X (*(UINT32 *)RiscVHi20Fixup, 0, 12)); - *(UINT32 *)Fixup = (RV_X (Value, 0, 12) << 20) |\ + + Value += Value2; + Value += (UINT32)Adjust; + Value2 = RISCV_CONST_HIGH_PART (Value); + *(UINT32 *)RiscVHi20Fixup = (RV_X (Value2, 12, 20) << 12) | \ + (RV_X (*(UINT32 *)RiscVHi20Fixup, 0, 12)); + *(UINT32 *)Fixup = (RV_X (Value, 0, 12) << 20) | \ (RV_X (*(UINT32 *)Fixup, 0, 20)); } + break; - case EFI_IMAGE_REL_BASED_RISCV_LOW12S: + case EFI_IMAGE_REL_BASED_RISCV_LOW12S: RiscVHi20Fixup = (UINT32 *)(*(UINT64 *)(*FixupData)); if (RiscVHi20Fixup != NULL) { - Value = (UINT32)(RV_X(*RiscVHi20Fixup, 12, 20) << 12); - Value2 = (UINT32)(RV_X(*(UINT32 *)Fixup, 7, 5) | (RV_X(*(UINT32 *)Fixup, 25, 7) << 5)); + Value = (UINT32)(RV_X (*RiscVHi20Fixup, 12, 20) << 12); + Value2 = (UINT32)(RV_X (*(UINT32 *)Fixup, 7, 5) | (RV_X (*(UINT32 *)Fixup, 25, 7) << 5)); if (Value2 & (RISCV_IMM_REACH/2)) { Value2 |= ~(RISCV_IMM_REACH-1); } - Value += Value2; - Value += (UINT32)Adjust; - Value2 = RISCV_CONST_HIGH_PART (Value); + + Value += Value2; + Value += (UINT32)Adjust; + Value2 = RISCV_CONST_HIGH_PART (Value); *(UINT32 *)RiscVHi20Fixup = (RV_X (Value2, 12, 20) << 12) | \ - (RV_X (*(UINT32 *)RiscVHi20Fixup, 0, 12)); - Value2 = *(UINT32 *)Fixup & 0x01fff07f; - Value &= RISCV_IMM_REACH - 1; - *(UINT32 *)Fixup = Value2 | (UINT32)(((RV_X(Value, 0, 5) << 7) | (RV_X(Value, 5, 7) << 25))); + (RV_X (*(UINT32 *)RiscVHi20Fixup, 0, 12)); + Value2 = *(UINT32 *)Fixup & 0x01fff07f; + Value &= RISCV_IMM_REACH - 1; + *(UINT32 *)Fixup = Value2 | (UINT32)(((RV_X (Value, 0, 5) << 7) | (RV_X (Value, 5, 7) << 25))); } + break; - default: + default: return RETURN_UNSUPPORTED; - } + return RETURN_SUCCESS; } @@ -123,10 +126,10 @@ PeCoffLoaderImageFormatSupported ( **/ RETURN_STATUS PeHotRelocateImageEx ( - IN UINT16 *Reloc, - IN OUT CHAR8 *Fixup, - IN OUT CHAR8 **FixupData, - IN UINT64 Adjust + IN UINT16 *Reloc, + IN OUT CHAR8 *Fixup, + IN OUT CHAR8 **FixupData, + IN UINT64 Adjust ) { return RETURN_UNSUPPORTED; diff --git a/MdePkg/Library/BasePerformanceLibNull/PerformanceLib.c b/MdePkg/Library/BasePerformanceLibNull/PerformanceLib.c index 239ea55..61e9ec4 100644 --- a/MdePkg/Library/BasePerformanceLibNull/PerformanceLib.c +++ b/MdePkg/Library/BasePerformanceLibNull/PerformanceLib.c @@ -6,10 +6,8 @@ **/ - #include - #include #include #include @@ -124,12 +122,12 @@ EndPerformanceMeasurement ( UINTN EFIAPI GetPerformanceMeasurement ( - IN UINTN LogEntryKey, - OUT CONST VOID **Handle, - OUT CONST CHAR8 **Token, - OUT CONST CHAR8 **Module, - OUT UINT64 *StartTimeStamp, - OUT UINT64 *EndTimeStamp + IN UINTN LogEntryKey, + OUT CONST VOID **Handle, + OUT CONST CHAR8 **Token, + OUT CONST CHAR8 **Module, + OUT UINT64 *StartTimeStamp, + OUT UINT64 *EndTimeStamp ) { ASSERT (Handle != NULL); @@ -259,13 +257,13 @@ EndPerformanceMeasurementEx ( UINTN EFIAPI GetPerformanceMeasurementEx ( - IN UINTN LogEntryKey, - OUT CONST VOID **Handle, - OUT CONST CHAR8 **Token, - OUT CONST CHAR8 **Module, - OUT UINT64 *StartTimeStamp, - OUT UINT64 *EndTimeStamp, - OUT UINT32 *Identifier + IN UINTN LogEntryKey, + OUT CONST VOID **Handle, + OUT CONST CHAR8 **Token, + OUT CONST CHAR8 **Module, + OUT UINT64 *StartTimeStamp, + OUT UINT64 *EndTimeStamp, + OUT UINT32 *Identifier ) { ASSERT (Handle != NULL); @@ -296,7 +294,7 @@ PerformanceMeasurementEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdPerformanceLibraryPropertyMask) & PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdPerformanceLibraryPropertyMask) & PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED) != 0); } /** @@ -342,14 +340,15 @@ LogPerformanceMeasurement ( BOOLEAN EFIAPI LogPerformanceMeasurementEnabled ( - IN CONST UINTN Type + IN CONST UINTN Type ) { // // When Performance measurement is enabled and the type is not filtered, the performance can be logged. // - if (PerformanceMeasurementEnabled () && (PcdGet8(PcdPerformanceLibraryPropertyMask) & Type) == 0) { + if (PerformanceMeasurementEnabled () && ((PcdGet8 (PcdPerformanceLibraryPropertyMask) & Type) == 0)) { return TRUE; } + return FALSE; } diff --git a/MdePkg/Library/BasePostCodeLibDebug/PostCode.c b/MdePkg/Library/BasePostCodeLibDebug/PostCode.c index 1bb4ed5..57a3bd6 100644 --- a/MdePkg/Library/BasePostCodeLibDebug/PostCode.c +++ b/MdePkg/Library/BasePostCodeLibDebug/PostCode.c @@ -36,11 +36,10 @@ PostCode ( IN UINT32 Value ) { - DEBUG((DEBUG_INFO, "POST %08x\n", Value)); + DEBUG ((DEBUG_INFO, "POST %08x\n", Value)); return Value; } - /** Sends an 32-bit value to a POST and associated ASCII string. @@ -72,11 +71,10 @@ PostCodeWithDescription ( IN CONST CHAR8 *Description OPTIONAL ) { - DEBUG((DEBUG_INFO, "POST %08x - %s\n", Value, Description)); + DEBUG ((DEBUG_INFO, "POST %08x - %s\n", Value, Description)); return Value; } - /** Returns TRUE if POST Codes are enabled. @@ -95,10 +93,9 @@ PostCodeEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_ENABLED) != 0); } - /** Returns TRUE if POST code descriptions are enabled. @@ -117,5 +114,5 @@ PostCodeDescriptionEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED) != 0); } diff --git a/MdePkg/Library/BasePostCodeLibPort80/PostCode.c b/MdePkg/Library/BasePostCodeLibPort80/PostCode.c index bcba4a7..306906a 100644 --- a/MdePkg/Library/BasePostCodeLibPort80/PostCode.c +++ b/MdePkg/Library/BasePostCodeLibPort80/PostCode.c @@ -38,27 +38,26 @@ PostCode ( ) { switch (PcdGet8 (PcdPort80DataWidth)) { - case 8: - IoWrite8 (0x80, (UINT8)(Value)); - break; - case 16: - IoWrite16 (0x80, (UINT16)(Value)); - break; - case 32: - IoWrite32 (0x80, Value); - break; - default: - // - // Assert on the invalid data width - // - ASSERT (FALSE); - break; + case 8: + IoWrite8 (0x80, (UINT8)(Value)); + break; + case 16: + IoWrite16 (0x80, (UINT16)(Value)); + break; + case 32: + IoWrite32 (0x80, Value); + break; + default: + // + // Assert on the invalid data width + // + ASSERT (FALSE); + break; } return Value; } - /** Sends an 32-bit value to a POST and associated ASCII string. @@ -94,7 +93,6 @@ PostCodeWithDescription ( return Value; } - /** Returns TRUE if POST Codes are enabled. @@ -113,10 +111,9 @@ PostCodeEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_ENABLED) != 0); } - /** Returns TRUE if POST code descriptions are enabled. @@ -135,5 +132,5 @@ PostCodeDescriptionEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED) != 0); } diff --git a/MdePkg/Library/BasePrintLib/PrintLib.c b/MdePkg/Library/BasePrintLib/PrintLib.c index 8bfbab0..e6f4042 100644 --- a/MdePkg/Library/BasePrintLib/PrintLib.c +++ b/MdePkg/Library/BasePrintLib/PrintLib.c @@ -15,9 +15,9 @@ // A NULL VA_LIST can not be passed into BasePrintLibSPrintMarker() because some // compilers define VA_LIST to be a structure. // -VA_LIST gNullVaList; +VA_LIST gNullVaList; -#define ASSERT_UNICODE_BUFFER(Buffer) ASSERT ((((UINTN) (Buffer)) & 0x01) == 0) +#define ASSERT_UNICODE_BUFFER(Buffer) ASSERT ((((UINTN) (Buffer)) & 0x01) == 0) /** Produces a Null-terminated Unicode string in an output buffer based on @@ -174,8 +174,8 @@ UnicodeSPrint ( ... ) { - VA_LIST Marker; - UINTN NumberOfPrinted; + VA_LIST Marker; + UINTN NumberOfPrinted; VA_START (Marker, FormatString); NumberOfPrinted = UnicodeVSPrint (StartOfBuffer, BufferSize, FormatString, Marker); @@ -334,8 +334,8 @@ UnicodeSPrintAsciiFormat ( ... ) { - VA_LIST Marker; - UINTN NumberOfPrinted; + VA_LIST Marker; + UINTN NumberOfPrinted; VA_START (Marker, FormatString); NumberOfPrinted = UnicodeVSPrintAsciiFormat (StartOfBuffer, BufferSize, FormatString, Marker); @@ -343,7 +343,6 @@ UnicodeSPrintAsciiFormat ( return NumberOfPrinted; } - /** Converts a decimal value to a Null-terminated Unicode string. @@ -405,7 +404,7 @@ UnicodeValueToStringS ( IN UINTN Width ) { - ASSERT_UNICODE_BUFFER(Buffer); + ASSERT_UNICODE_BUFFER (Buffer); return BasePrintLibConvertValueToStringS ((CHAR8 *)Buffer, BufferSize, Flags, Value, Width, 2); } @@ -449,10 +448,10 @@ UnicodeValueToStringS ( UINTN EFIAPI AsciiVSPrint ( - OUT CHAR8 *StartOfBuffer, - IN UINTN BufferSize, - IN CONST CHAR8 *FormatString, - IN VA_LIST Marker + OUT CHAR8 *StartOfBuffer, + IN UINTN BufferSize, + IN CONST CHAR8 *FormatString, + IN VA_LIST Marker ) { return BasePrintLibSPrintMarker (StartOfBuffer, BufferSize, 0, FormatString, Marker, NULL); @@ -496,10 +495,10 @@ AsciiVSPrint ( UINTN EFIAPI AsciiBSPrint ( - OUT CHAR8 *StartOfBuffer, - IN UINTN BufferSize, - IN CONST CHAR8 *FormatString, - IN BASE_LIST Marker + OUT CHAR8 *StartOfBuffer, + IN UINTN BufferSize, + IN CONST CHAR8 *FormatString, + IN BASE_LIST Marker ) { return BasePrintLibSPrintMarker (StartOfBuffer, BufferSize, 0, FormatString, gNullVaList, Marker); @@ -552,8 +551,8 @@ AsciiSPrint ( ... ) { - VA_LIST Marker; - UINTN NumberOfPrinted; + VA_LIST Marker; + UINTN NumberOfPrinted; VA_START (Marker, FormatString); NumberOfPrinted = AsciiVSPrint (StartOfBuffer, BufferSize, FormatString, Marker); @@ -712,8 +711,8 @@ AsciiSPrintUnicodeFormat ( ... ) { - VA_LIST Marker; - UINTN NumberOfPrinted; + VA_LIST Marker; + UINTN NumberOfPrinted; VA_START (Marker, FormatString); NumberOfPrinted = AsciiVSPrintUnicodeFormat (StartOfBuffer, BufferSize, FormatString, Marker); @@ -773,11 +772,11 @@ AsciiSPrintUnicodeFormat ( RETURN_STATUS EFIAPI AsciiValueToStringS ( - IN OUT CHAR8 *Buffer, - IN UINTN BufferSize, - IN UINTN Flags, - IN INT64 Value, - IN UINTN Width + IN OUT CHAR8 *Buffer, + IN UINTN BufferSize, + IN UINTN Flags, + IN INT64 Value, + IN UINTN Width ) { return BasePrintLibConvertValueToStringS (Buffer, BufferSize, Flags, Value, Width, 1); @@ -803,7 +802,7 @@ AsciiValueToStringS ( UINTN EFIAPI SPrintLength ( - IN CONST CHAR16 *FormatString, + IN CONST CHAR16 *FormatString, IN VA_LIST Marker ) { @@ -829,8 +828,8 @@ SPrintLength ( UINTN EFIAPI SPrintLengthAsciiFormat ( - IN CONST CHAR8 *FormatString, - IN VA_LIST Marker + IN CONST CHAR8 *FormatString, + IN VA_LIST Marker ) { return BasePrintLibSPrintMarker (NULL, 0, OUTPUT_UNICODE | COUNT_ONLY_NO_PRINT, (CHAR8 *)FormatString, Marker, NULL); diff --git a/MdePkg/Library/BasePrintLib/PrintLibInternal.c b/MdePkg/Library/BasePrintLib/PrintLibInternal.c index f389682..42b598a 100644 --- a/MdePkg/Library/BasePrintLib/PrintLibInternal.c +++ b/MdePkg/Library/BasePrintLib/PrintLibInternal.c @@ -8,14 +8,14 @@ #include "PrintLibInternal.h" -#define WARNING_STATUS_NUMBER 5 -#define ERROR_STATUS_NUMBER 33 +#define WARNING_STATUS_NUMBER 5 +#define ERROR_STATUS_NUMBER 33 // // Safe print checks // -#define RSIZE_MAX (PcdGet32 (PcdMaximumUnicodeStringLength)) -#define ASCII_RSIZE_MAX (PcdGet32 (PcdMaximumAsciiStringLength)) +#define RSIZE_MAX (PcdGet32 (PcdMaximumUnicodeStringLength)) +#define ASCII_RSIZE_MAX (PcdGet32 (PcdMaximumAsciiStringLength)) #define SAFE_PRINT_CONSTRAINT_CHECK(Expression, RetVal) \ do { \ @@ -25,12 +25,12 @@ } \ } while (FALSE) -GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 mHexStr[] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}; +GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 mHexStr[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; // // Longest string: RETURN_WARN_BUFFER_TOO_SMALL => 24 characters plus NUL byte // -GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 mWarningString[][24+1] = { +GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 mWarningString[][24+1] = { "Success", // RETURN_SUCCESS = 0 "Warning Unknown Glyph", // RETURN_WARN_UNKNOWN_GLYPH = 1 "Warning Delete Failure", // RETURN_WARN_DELETE_FAILURE = 2 @@ -42,7 +42,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 mWarningString[][24+1] = { // // Longest string: RETURN_INCOMPATIBLE_VERSION => 20 characters plus NUL byte // -GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 mErrorString[][20+1] = { +GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 mErrorString[][20+1] = { "Load Error", // RETURN_LOAD_ERROR = 1 | MAX_BIT "Invalid Parameter", // RETURN_INVALID_PARAMETER = 2 | MAX_BIT "Unsupported", // RETURN_UNSUPPORTED = 3 | MAX_BIT @@ -78,7 +78,6 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 mErrorString[][20+1] = { "Compromised Data" // RETURN_COMPROMISED_DATA = 33 | MAX_BIT }; - /** Internal function that places the character into the Buffer. @@ -97,20 +96,21 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 mErrorString[][20+1] = { **/ CHAR8 * BasePrintLibFillBuffer ( - OUT CHAR8 *Buffer, - IN CHAR8 *EndBuffer, - IN INTN Length, - IN UINTN Character, - IN INTN Increment + OUT CHAR8 *Buffer, + IN CHAR8 *EndBuffer, + IN INTN Length, + IN UINTN Character, + IN INTN Increment ) { INTN Index; for (Index = 0; Index < Length && Buffer < EndBuffer; Index++) { - *Buffer = (CHAR8) Character; + *Buffer = (CHAR8)Character; if (Increment != 1) { *(Buffer + 1) = (CHAR8)(Character >> 8); } + Buffer += Increment; } @@ -143,7 +143,7 @@ BasePrintLibValueToString ( // *Buffer = 0; do { - Value = (INT64)DivU64x32Remainder ((UINT64)Value, (UINT32)Radix, &Remainder); + Value = (INT64)DivU64x32Remainder ((UINT64)Value, (UINT32)Radix, &Remainder); *(++Buffer) = mHexStr[Remainder]; } while (Value != 0); @@ -193,11 +193,11 @@ BasePrintLibValueToString ( **/ UINTN BasePrintLibConvertValueToString ( - IN OUT CHAR8 *Buffer, - IN UINTN Flags, - IN INT64 Value, - IN UINTN Width, - IN UINTN Increment + IN OUT CHAR8 *Buffer, + IN UINTN Flags, + IN INT64 Value, + IN UINTN Width, + IN UINTN Increment ) { CHAR8 *OriginalBuffer; @@ -229,15 +229,17 @@ BasePrintLibConvertValueToString ( // // Width is 0 or COMMA_TYPE is set, PREFIX_ZERO is ignored. // - if (Width == 0 || (Flags & COMMA_TYPE) != 0) { - Flags &= ~((UINTN) PREFIX_ZERO); + if ((Width == 0) || ((Flags & COMMA_TYPE) != 0)) { + Flags &= ~((UINTN)PREFIX_ZERO); } + // // If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed. // if (Width == 0) { Width = MAXIMUM_VALUE_CHARACTERS - 1; } + // // Set the tag for the end of the input Buffer. // @@ -247,7 +249,7 @@ BasePrintLibConvertValueToString ( // Convert decimal negative // if ((Value < 0) && ((Flags & RADIX_HEX) == 0)) { - Value = -Value; + Value = -Value; Buffer = BasePrintLibFillBuffer (Buffer, EndBuffer, 1, '-', Increment); Width--; } @@ -255,9 +257,9 @@ BasePrintLibConvertValueToString ( // // Count the length of the value string. // - Radix = ((Flags & RADIX_HEX) == 0)? 10 : 16; + Radix = ((Flags & RADIX_HEX) == 0) ? 10 : 16; ValueBufferPtr = BasePrintLibValueToString (ValueBuffer, Value, Radix); - Count = ValueBufferPtr - ValueBuffer; + Count = ValueBufferPtr - ValueBuffer; // // Append Zero @@ -273,6 +275,7 @@ BasePrintLibConvertValueToString ( if (Digits != 0) { Digits = 3 - Digits; } + for (Index = 0; Index < Count; Index++) { Buffer = BasePrintLibFillBuffer (Buffer, EndBuffer, 1, *ValueBufferPtr--, Increment); if ((Flags & COMMA_TYPE) != 0) { @@ -347,12 +350,12 @@ BasePrintLibConvertValueToString ( **/ RETURN_STATUS BasePrintLibConvertValueToStringS ( - IN OUT CHAR8 *Buffer, - IN UINTN BufferSize, - IN UINTN Flags, - IN INT64 Value, - IN UINTN Width, - IN UINTN Increment + IN OUT CHAR8 *Buffer, + IN UINTN BufferSize, + IN UINTN Flags, + IN INT64 Value, + IN UINTN Width, + IN UINTN Increment ) { CHAR8 *EndBuffer; @@ -403,9 +406,10 @@ BasePrintLibConvertValueToStringS ( // // Width is 0 or COMMA_TYPE is set, PREFIX_ZERO is ignored. // - if (Width == 0 || (Flags & COMMA_TYPE) != 0) { - Flags &= ~((UINTN) PREFIX_ZERO); + if ((Width == 0) || ((Flags & COMMA_TYPE) != 0)) { + Flags &= ~((UINTN)PREFIX_ZERO); } + // // If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed. // @@ -417,7 +421,7 @@ BasePrintLibConvertValueToStringS ( // Count the characters of the output string. // Count = 0; - Radix = ((Flags & RADIX_HEX) == 0)? 10 : 16; + Radix = ((Flags & RADIX_HEX) == 0) ? 10 : 16; if ((Flags & PREFIX_ZERO) != 0) { Count = Width; @@ -428,6 +432,7 @@ BasePrintLibConvertValueToStringS ( } else { ValueBufferPtr = BasePrintLibValueToString (ValueBuffer, Value, Radix); } + Digits = ValueBufferPtr - ValueBuffer; Count += Digits; @@ -452,7 +457,7 @@ BasePrintLibConvertValueToStringS ( // Convert decimal negative // if ((Value < 0) && ((Flags & RADIX_HEX) == 0)) { - Value = -Value; + Value = -Value; Buffer = BasePrintLibFillBuffer (Buffer, EndBuffer, 1, '-', Increment); Width--; } @@ -461,7 +466,7 @@ BasePrintLibConvertValueToStringS ( // Count the length of the value string. // ValueBufferPtr = BasePrintLibValueToString (ValueBuffer, Value, Radix); - Count = ValueBufferPtr - ValueBuffer; + Count = ValueBufferPtr - ValueBuffer; // // Append Zero @@ -477,6 +482,7 @@ BasePrintLibConvertValueToStringS ( if (Digits != 0) { Digits = 3 - Digits; } + for (Index = 0; Index < Count; Index++) { Buffer = BasePrintLibFillBuffer (Buffer, EndBuffer, 1, *ValueBufferPtr--, Increment); if ((Flags & COMMA_TYPE) != 0) { @@ -536,36 +542,36 @@ BasePrintLibSPrintMarker ( IN BASE_LIST BaseListMarker OPTIONAL ) { - CHAR8 *OriginalBuffer; - CHAR8 *EndBuffer; - CHAR8 ValueBuffer[MAXIMUM_VALUE_CHARACTERS]; - UINT32 BytesPerOutputCharacter; - UINTN BytesPerFormatCharacter; - UINTN FormatMask; - UINTN FormatCharacter; - UINTN Width; - UINTN Precision; - INT64 Value; - CONST CHAR8 *ArgumentString; - UINTN Character; - GUID *TmpGuid; - TIME *TmpTime; - UINTN Count; - UINTN ArgumentMask; - INTN BytesPerArgumentCharacter; - UINTN ArgumentCharacter; - BOOLEAN Done; - UINTN Index; - CHAR8 Prefix; - BOOLEAN ZeroPad; - BOOLEAN Comma; - UINTN Digits; - UINTN Radix; - RETURN_STATUS Status; - UINT32 GuidData1; - UINT16 GuidData2; - UINT16 GuidData3; - UINTN LengthToReturn; + CHAR8 *OriginalBuffer; + CHAR8 *EndBuffer; + CHAR8 ValueBuffer[MAXIMUM_VALUE_CHARACTERS]; + UINT32 BytesPerOutputCharacter; + UINTN BytesPerFormatCharacter; + UINTN FormatMask; + UINTN FormatCharacter; + UINTN Width; + UINTN Precision; + INT64 Value; + CONST CHAR8 *ArgumentString; + UINTN Character; + GUID *TmpGuid; + TIME *TmpTime; + UINTN Count; + UINTN ArgumentMask; + INTN BytesPerArgumentCharacter; + UINTN ArgumentCharacter; + BOOLEAN Done; + UINTN Index; + CHAR8 Prefix; + BOOLEAN ZeroPad; + BOOLEAN Comma; + UINTN Digits; + UINTN Radix; + RETURN_STATUS Status; + UINT32 GuidData1; + UINT16 GuidData2; + UINT16 GuidData3; + UINTN LengthToReturn; // // If you change this code be sure to match the 2 versions of this function. @@ -597,11 +603,13 @@ BasePrintLibSPrintMarker ( if (RSIZE_MAX != 0) { SAFE_PRINT_CONSTRAINT_CHECK ((BufferSize <= RSIZE_MAX), 0); } + BytesPerOutputCharacter = 2; } else { if (ASCII_RSIZE_MAX != 0) { SAFE_PRINT_CONSTRAINT_CHECK ((BufferSize <= ASCII_RSIZE_MAX), 0); } + BytesPerOutputCharacter = 1; } @@ -613,14 +621,16 @@ BasePrintLibSPrintMarker ( if (RSIZE_MAX != 0) { SAFE_PRINT_CONSTRAINT_CHECK ((StrnLenS ((CHAR16 *)Format, RSIZE_MAX + 1) <= RSIZE_MAX), 0); } + BytesPerFormatCharacter = 2; - FormatMask = 0xffff; + FormatMask = 0xffff; } else { if (ASCII_RSIZE_MAX != 0) { SAFE_PRINT_CONSTRAINT_CHECK ((AsciiStrnLenS (Format, ASCII_RSIZE_MAX + 1) <= ASCII_RSIZE_MAX), 0); } + BytesPerFormatCharacter = 1; - FormatMask = 0xff; + FormatMask = 0xff; } if ((Flags & COUNT_ONLY_NO_PRINT) != 0) { @@ -637,7 +647,7 @@ BasePrintLibSPrintMarker ( } LengthToReturn = 0; - EndBuffer = NULL; + EndBuffer = NULL; OriginalBuffer = NULL; // @@ -665,10 +675,11 @@ BasePrintLibSPrintMarker ( if ((Buffer != NULL) && (Buffer >= EndBuffer)) { break; } + // // Clear all the flag bits except those that may have been passed in // - Flags &= (UINTN) (OUTPUT_UNICODE | FORMAT_UNICODE | COUNT_ONLY_NO_PRINT); + Flags &= (UINTN)(OUTPUT_UNICODE | FORMAT_UNICODE | COUNT_ONLY_NO_PRINT); // // Set the default width to zero, and the default precision to 1 @@ -682,344 +693,415 @@ BasePrintLibSPrintMarker ( Digits = 0; switch (FormatCharacter) { - case '%': - // - // Parse Flags and Width - // - for (Done = FALSE; !Done; ) { - Format += BytesPerFormatCharacter; - FormatCharacter = ((*Format & 0xff) | ((BytesPerFormatCharacter == 1) ? 0 : (*(Format + 1) << 8))) & FormatMask; + case '%': + // + // Parse Flags and Width + // + for (Done = FALSE; !Done; ) { + Format += BytesPerFormatCharacter; + FormatCharacter = ((*Format & 0xff) | ((BytesPerFormatCharacter == 1) ? 0 : (*(Format + 1) << 8))) & FormatMask; + switch (FormatCharacter) { + case '.': + Flags |= PRECISION; + break; + case '-': + Flags |= LEFT_JUSTIFY; + break; + case '+': + Flags |= PREFIX_SIGN; + break; + case ' ': + Flags |= PREFIX_BLANK; + break; + case ',': + Flags |= COMMA_TYPE; + break; + case 'L': + case 'l': + Flags |= LONG_TYPE; + break; + case '*': + if ((Flags & PRECISION) == 0) { + Flags |= PAD_TO_WIDTH; + if (BaseListMarker == NULL) { + Width = VA_ARG (VaListMarker, UINTN); + } else { + Width = BASE_ARG (BaseListMarker, UINTN); + } + } else { + if (BaseListMarker == NULL) { + Precision = VA_ARG (VaListMarker, UINTN); + } else { + Precision = BASE_ARG (BaseListMarker, UINTN); + } + } + + break; + case '0': + if ((Flags & PRECISION) == 0) { + Flags |= PREFIX_ZERO; + } + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + for (Count = 0; ((FormatCharacter >= '0') && (FormatCharacter <= '9')); ) { + Count = (Count * 10) + FormatCharacter - '0'; + Format += BytesPerFormatCharacter; + FormatCharacter = ((*Format & 0xff) | ((BytesPerFormatCharacter == 1) ? 0 : (*(Format + 1) << 8))) & FormatMask; + } + + Format -= BytesPerFormatCharacter; + if ((Flags & PRECISION) == 0) { + Flags |= PAD_TO_WIDTH; + Width = Count; + } else { + Precision = Count; + } + + break; + + case '\0': + // + // Make no output if Format string terminates unexpectedly when + // looking up for flag, width, precision and type. + // + Format -= BytesPerFormatCharacter; + Precision = 0; + // + // break skipped on purpose. + // + default: + Done = TRUE; + break; + } + } + + // + // Handle each argument type + // switch (FormatCharacter) { - case '.': - Flags |= PRECISION; - break; - case '-': - Flags |= LEFT_JUSTIFY; - break; - case '+': - Flags |= PREFIX_SIGN; - break; - case ' ': - Flags |= PREFIX_BLANK; - break; - case ',': - Flags |= COMMA_TYPE; - break; - case 'L': - case 'l': - Flags |= LONG_TYPE; - break; - case '*': - if ((Flags & PRECISION) == 0) { - Flags |= PAD_TO_WIDTH; - if (BaseListMarker == NULL) { - Width = VA_ARG (VaListMarker, UINTN); - } else { - Width = BASE_ARG (BaseListMarker, UINTN); - } - } else { - if (BaseListMarker == NULL) { - Precision = VA_ARG (VaListMarker, UINTN); - } else { - Precision = BASE_ARG (BaseListMarker, UINTN); + case 'p': + // + // Flag space, +, 0, L & l are invalid for type p. + // + Flags &= ~((UINTN)(PREFIX_BLANK | PREFIX_SIGN | PREFIX_ZERO | LONG_TYPE)); + if (sizeof (VOID *) > 4) { + Flags |= LONG_TYPE; } - } - break; - case '0': - if ((Flags & PRECISION) == 0) { - Flags |= PREFIX_ZERO; - } - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - for (Count = 0; ((FormatCharacter >= '0') && (FormatCharacter <= '9')); ){ - Count = (Count * 10) + FormatCharacter - '0'; - Format += BytesPerFormatCharacter; - FormatCharacter = ((*Format & 0xff) | ((BytesPerFormatCharacter == 1) ? 0 : (*(Format + 1) << 8))) & FormatMask; - } - Format -= BytesPerFormatCharacter; - if ((Flags & PRECISION) == 0) { - Flags |= PAD_TO_WIDTH; - Width = Count; - } else { - Precision = Count; - } - break; - case '\0': // - // Make no output if Format string terminates unexpectedly when - // looking up for flag, width, precision and type. + // break skipped on purpose + // + case 'X': + Flags |= PREFIX_ZERO; // - Format -= BytesPerFormatCharacter; - Precision = 0; + // break skipped on purpose // - // break skipped on purpose. + case 'x': + Flags |= RADIX_HEX; // - default: - Done = TRUE; - break; - } - } + // break skipped on purpose + // + case 'u': + if ((Flags & RADIX_HEX) == 0) { + Flags &= ~((UINTN)(PREFIX_SIGN)); + Flags |= UNSIGNED_TYPE; + } - // - // Handle each argument type - // - switch (FormatCharacter) { - case 'p': - // - // Flag space, +, 0, L & l are invalid for type p. - // - Flags &= ~((UINTN) (PREFIX_BLANK | PREFIX_SIGN | PREFIX_ZERO | LONG_TYPE)); - if (sizeof (VOID *) > 4) { - Flags |= LONG_TYPE; - } - // - // break skipped on purpose - // - case 'X': - Flags |= PREFIX_ZERO; - // - // break skipped on purpose - // - case 'x': - Flags |= RADIX_HEX; - // - // break skipped on purpose - // - case 'u': - if ((Flags & RADIX_HEX) == 0) { - Flags &= ~((UINTN) (PREFIX_SIGN)); - Flags |= UNSIGNED_TYPE; - } - // - // break skipped on purpose - // - case 'd': - if ((Flags & LONG_TYPE) == 0) { // - // 'd', 'u', 'x', and 'X' that are not preceded by 'l' or 'L' are assumed to be type "int". - // This assumption is made so the format string definition is compatible with the ANSI C - // Specification for formatted strings. It is recommended that the Base Types be used - // everywhere, but in this one case, compliance with ANSI C is more important, and - // provides an implementation that is compatible with that largest possible set of CPU - // architectures. This is why the type "int" is used in this one case. + // break skipped on purpose // - if (BaseListMarker == NULL) { - Value = VA_ARG (VaListMarker, int); - } else { - Value = BASE_ARG (BaseListMarker, int); - } - } else { - if (BaseListMarker == NULL) { - Value = VA_ARG (VaListMarker, INT64); - } else { - Value = BASE_ARG (BaseListMarker, INT64); - } - } - if ((Flags & PREFIX_BLANK) != 0) { - Prefix = ' '; - } - if ((Flags & PREFIX_SIGN) != 0) { - Prefix = '+'; - } - if ((Flags & COMMA_TYPE) != 0) { - Comma = TRUE; - } - if ((Flags & RADIX_HEX) == 0) { - Radix = 10; - if (Comma) { - Flags &= ~((UINTN) PREFIX_ZERO); - Precision = 1; - } - if (Value < 0 && (Flags & UNSIGNED_TYPE) == 0) { - Flags |= PREFIX_SIGN; - Prefix = '-'; - Value = -Value; - } else if ((Flags & UNSIGNED_TYPE) != 0 && (Flags & LONG_TYPE) == 0) { + case 'd': + if ((Flags & LONG_TYPE) == 0) { + // + // 'd', 'u', 'x', and 'X' that are not preceded by 'l' or 'L' are assumed to be type "int". + // This assumption is made so the format string definition is compatible with the ANSI C + // Specification for formatted strings. It is recommended that the Base Types be used + // everywhere, but in this one case, compliance with ANSI C is more important, and + // provides an implementation that is compatible with that largest possible set of CPU + // architectures. This is why the type "int" is used in this one case. + // + if (BaseListMarker == NULL) { + Value = VA_ARG (VaListMarker, int); + } else { + Value = BASE_ARG (BaseListMarker, int); + } + } else { + if (BaseListMarker == NULL) { + Value = VA_ARG (VaListMarker, INT64); + } else { + Value = BASE_ARG (BaseListMarker, INT64); + } + } + + if ((Flags & PREFIX_BLANK) != 0) { + Prefix = ' '; + } + + if ((Flags & PREFIX_SIGN) != 0) { + Prefix = '+'; + } + + if ((Flags & COMMA_TYPE) != 0) { + Comma = TRUE; + } + + if ((Flags & RADIX_HEX) == 0) { + Radix = 10; + if (Comma) { + Flags &= ~((UINTN)PREFIX_ZERO); + Precision = 1; + } + + if ((Value < 0) && ((Flags & UNSIGNED_TYPE) == 0)) { + Flags |= PREFIX_SIGN; + Prefix = '-'; + Value = -Value; + } else if (((Flags & UNSIGNED_TYPE) != 0) && ((Flags & LONG_TYPE) == 0)) { + // + // 'd', 'u', 'x', and 'X' that are not preceded by 'l' or 'L' are assumed to be type "int". + // This assumption is made so the format string definition is compatible with the ANSI C + // Specification for formatted strings. It is recommended that the Base Types be used + // everywhere, but in this one case, compliance with ANSI C is more important, and + // provides an implementation that is compatible with that largest possible set of CPU + // architectures. This is why the type "unsigned int" is used in this one case. + // + Value = (unsigned int)Value; + } + } else { + Radix = 16; + Comma = FALSE; + if (((Flags & LONG_TYPE) == 0) && (Value < 0)) { + // + // 'd', 'u', 'x', and 'X' that are not preceded by 'l' or 'L' are assumed to be type "int". + // This assumption is made so the format string definition is compatible with the ANSI C + // Specification for formatted strings. It is recommended that the Base Types be used + // everywhere, but in this one case, compliance with ANSI C is more important, and + // provides an implementation that is compatible with that largest possible set of CPU + // architectures. This is why the type "unsigned int" is used in this one case. + // + Value = (unsigned int)Value; + } + } + // - // 'd', 'u', 'x', and 'X' that are not preceded by 'l' or 'L' are assumed to be type "int". - // This assumption is made so the format string definition is compatible with the ANSI C - // Specification for formatted strings. It is recommended that the Base Types be used - // everywhere, but in this one case, compliance with ANSI C is more important, and - // provides an implementation that is compatible with that largest possible set of CPU - // architectures. This is why the type "unsigned int" is used in this one case. + // Convert Value to a reversed string // - Value = (unsigned int)Value; - } - } else { - Radix = 16; - Comma = FALSE; - if ((Flags & LONG_TYPE) == 0 && Value < 0) { + Count = BasePrintLibValueToString (ValueBuffer, Value, Radix) - ValueBuffer; + if ((Value == 0) && (Precision == 0)) { + Count = 0; + } + + ArgumentString = (CHAR8 *)ValueBuffer + Count; + + Digits = Count % 3; + if (Digits != 0) { + Digits = 3 - Digits; + } + + if (Comma && (Count != 0)) { + Count += ((Count - 1) / 3); + } + + if (Prefix != 0) { + Count++; + Precision++; + } + + Flags |= ARGUMENT_REVERSED; + ZeroPad = TRUE; + if ((Flags & PREFIX_ZERO) != 0) { + if ((Flags & LEFT_JUSTIFY) == 0) { + if ((Flags & PAD_TO_WIDTH) != 0) { + if ((Flags & PRECISION) == 0) { + Precision = Width; + } + } + } + } + + break; + + case 's': + case 'S': + Flags |= ARGUMENT_UNICODE; + // + // break skipped on purpose + // + case 'a': + if (BaseListMarker == NULL) { + ArgumentString = VA_ARG (VaListMarker, CHAR8 *); + } else { + ArgumentString = BASE_ARG (BaseListMarker, CHAR8 *); + } + + if (ArgumentString == NULL) { + Flags &= ~((UINTN)ARGUMENT_UNICODE); + ArgumentString = ""; + } + // - // 'd', 'u', 'x', and 'X' that are not preceded by 'l' or 'L' are assumed to be type "int". - // This assumption is made so the format string definition is compatible with the ANSI C - // Specification for formatted strings. It is recommended that the Base Types be used - // everywhere, but in this one case, compliance with ANSI C is more important, and - // provides an implementation that is compatible with that largest possible set of CPU - // architectures. This is why the type "unsigned int" is used in this one case. + // Set the default precision for string to be zero if not specified. // - Value = (unsigned int)Value; - } - } - // - // Convert Value to a reversed string - // - Count = BasePrintLibValueToString (ValueBuffer, Value, Radix) - ValueBuffer; - if (Value == 0 && Precision == 0) { - Count = 0; - } - ArgumentString = (CHAR8 *)ValueBuffer + Count; + if ((Flags & PRECISION) == 0) { + Precision = 0; + } - Digits = Count % 3; - if (Digits != 0) { - Digits = 3 - Digits; - } - if (Comma && Count != 0) { - Count += ((Count - 1) / 3); - } - if (Prefix != 0) { - Count++; - Precision++; - } - Flags |= ARGUMENT_REVERSED; - ZeroPad = TRUE; - if ((Flags & PREFIX_ZERO) != 0) { - if ((Flags & LEFT_JUSTIFY) == 0) { - if ((Flags & PAD_TO_WIDTH) != 0) { - if ((Flags & PRECISION) == 0) { - Precision = Width; + break; + + case 'c': + if (BaseListMarker == NULL) { + Character = VA_ARG (VaListMarker, UINTN) & 0xffff; + } else { + Character = BASE_ARG (BaseListMarker, UINTN) & 0xffff; + } + + ArgumentString = (CHAR8 *)&Character; + Flags |= ARGUMENT_UNICODE; + break; + + case 'g': + if (BaseListMarker == NULL) { + TmpGuid = VA_ARG (VaListMarker, GUID *); + } else { + TmpGuid = BASE_ARG (BaseListMarker, GUID *); + } + + if (TmpGuid == NULL) { + ArgumentString = ""; + } else { + GuidData1 = ReadUnaligned32 (&(TmpGuid->Data1)); + GuidData2 = ReadUnaligned16 (&(TmpGuid->Data2)); + GuidData3 = ReadUnaligned16 (&(TmpGuid->Data3)); + BasePrintLibSPrint ( + ValueBuffer, + MAXIMUM_VALUE_CHARACTERS, + 0, + "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", + GuidData1, + GuidData2, + GuidData3, + TmpGuid->Data4[0], + TmpGuid->Data4[1], + TmpGuid->Data4[2], + TmpGuid->Data4[3], + TmpGuid->Data4[4], + TmpGuid->Data4[5], + TmpGuid->Data4[6], + TmpGuid->Data4[7] + ); + ArgumentString = ValueBuffer; + } + + break; + + case 't': + if (BaseListMarker == NULL) { + TmpTime = VA_ARG (VaListMarker, TIME *); + } else { + TmpTime = BASE_ARG (BaseListMarker, TIME *); + } + + if (TmpTime == NULL) { + ArgumentString = ""; + } else { + BasePrintLibSPrint ( + ValueBuffer, + MAXIMUM_VALUE_CHARACTERS, + 0, + "%02d/%02d/%04d %02d:%02d", + TmpTime->Month, + TmpTime->Day, + TmpTime->Year, + TmpTime->Hour, + TmpTime->Minute + ); + ArgumentString = ValueBuffer; + } + + break; + + case 'r': + if (BaseListMarker == NULL) { + Status = VA_ARG (VaListMarker, RETURN_STATUS); + } else { + Status = BASE_ARG (BaseListMarker, RETURN_STATUS); + } + + ArgumentString = ValueBuffer; + if (RETURN_ERROR (Status)) { + // + // Clear error bit + // + Index = Status & ~MAX_BIT; + if ((Index > 0) && (Index <= ERROR_STATUS_NUMBER)) { + ArgumentString = mErrorString[Index - 1]; + } + } else { + Index = Status; + if (Index <= WARNING_STATUS_NUMBER) { + ArgumentString = mWarningString[Index]; } } - } - } - break; - case 's': - case 'S': - Flags |= ARGUMENT_UNICODE; - // - // break skipped on purpose - // - case 'a': - if (BaseListMarker == NULL) { - ArgumentString = VA_ARG (VaListMarker, CHAR8 *); - } else { - ArgumentString = BASE_ARG (BaseListMarker, CHAR8 *); - } - if (ArgumentString == NULL) { - Flags &= ~((UINTN) ARGUMENT_UNICODE); - ArgumentString = ""; - } - // - // Set the default precision for string to be zero if not specified. - // - if ((Flags & PRECISION) == 0) { - Precision = 0; - } - break; + if (ArgumentString == ValueBuffer) { + BasePrintLibSPrint ((CHAR8 *)ValueBuffer, MAXIMUM_VALUE_CHARACTERS, 0, "%08X", Status); + } - case 'c': - if (BaseListMarker == NULL) { - Character = VA_ARG (VaListMarker, UINTN) & 0xffff; - } else { - Character = BASE_ARG (BaseListMarker, UINTN) & 0xffff; - } - ArgumentString = (CHAR8 *)&Character; - Flags |= ARGUMENT_UNICODE; - break; + break; - case 'g': - if (BaseListMarker == NULL) { - TmpGuid = VA_ARG (VaListMarker, GUID *); - } else { - TmpGuid = BASE_ARG (BaseListMarker, GUID *); - } - if (TmpGuid == NULL) { - ArgumentString = ""; - } else { - GuidData1 = ReadUnaligned32 (&(TmpGuid->Data1)); - GuidData2 = ReadUnaligned16 (&(TmpGuid->Data2)); - GuidData3 = ReadUnaligned16 (&(TmpGuid->Data3)); - BasePrintLibSPrint ( - ValueBuffer, - MAXIMUM_VALUE_CHARACTERS, - 0, - "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", - GuidData1, - GuidData2, - GuidData3, - TmpGuid->Data4[0], - TmpGuid->Data4[1], - TmpGuid->Data4[2], - TmpGuid->Data4[3], - TmpGuid->Data4[4], - TmpGuid->Data4[5], - TmpGuid->Data4[6], - TmpGuid->Data4[7] - ); - ArgumentString = ValueBuffer; - } - break; + case '\r': + Format += BytesPerFormatCharacter; + FormatCharacter = ((*Format & 0xff) | ((BytesPerFormatCharacter == 1) ? 0 : (*(Format + 1) << 8))) & FormatMask; + if (FormatCharacter == '\n') { + // + // Translate '\r\n' to '\r\n' + // + ArgumentString = "\r\n"; + } else { + // + // Translate '\r' to '\r' + // + ArgumentString = "\r"; + Format -= BytesPerFormatCharacter; + } - case 't': - if (BaseListMarker == NULL) { - TmpTime = VA_ARG (VaListMarker, TIME *); - } else { - TmpTime = BASE_ARG (BaseListMarker, TIME *); - } - if (TmpTime == NULL) { - ArgumentString = ""; - } else { - BasePrintLibSPrint ( - ValueBuffer, - MAXIMUM_VALUE_CHARACTERS, - 0, - "%02d/%02d/%04d %02d:%02d", - TmpTime->Month, - TmpTime->Day, - TmpTime->Year, - TmpTime->Hour, - TmpTime->Minute - ); - ArgumentString = ValueBuffer; - } - break; + break; - case 'r': - if (BaseListMarker == NULL) { - Status = VA_ARG (VaListMarker, RETURN_STATUS); - } else { - Status = BASE_ARG (BaseListMarker, RETURN_STATUS); - } - ArgumentString = ValueBuffer; - if (RETURN_ERROR (Status)) { - // - // Clear error bit - // - Index = Status & ~MAX_BIT; - if (Index > 0 && Index <= ERROR_STATUS_NUMBER) { - ArgumentString = mErrorString [Index - 1]; - } - } else { - Index = Status; - if (Index <= WARNING_STATUS_NUMBER) { - ArgumentString = mWarningString [Index]; - } - } - if (ArgumentString == ValueBuffer) { - BasePrintLibSPrint ((CHAR8 *) ValueBuffer, MAXIMUM_VALUE_CHARACTERS, 0, "%08X", Status); + case '\n': + // + // Translate '\n' to '\r\n' and '\n\r' to '\r\n' + // + ArgumentString = "\r\n"; + Format += BytesPerFormatCharacter; + FormatCharacter = ((*Format & 0xff) | ((BytesPerFormatCharacter == 1) ? 0 : (*(Format + 1) << 8))) & FormatMask; + if (FormatCharacter != '\r') { + Format -= BytesPerFormatCharacter; + } + + break; + + case '%': + default: + // + // if the type is '%' or unknown, then print it to the screen + // + ArgumentString = (CHAR8 *)&FormatCharacter; + Flags |= ARGUMENT_UNICODE; + break; } + break; case '\r': - Format += BytesPerFormatCharacter; + Format += BytesPerFormatCharacter; FormatCharacter = ((*Format & 0xff) | ((BytesPerFormatCharacter == 1) ? 0 : (*(Format + 1) << 8))) & FormatMask; if (FormatCharacter == '\n') { // @@ -1031,78 +1113,41 @@ BasePrintLibSPrintMarker ( // Translate '\r' to '\r' // ArgumentString = "\r"; - Format -= BytesPerFormatCharacter; + Format -= BytesPerFormatCharacter; } + break; case '\n': // // Translate '\n' to '\r\n' and '\n\r' to '\r\n' // - ArgumentString = "\r\n"; - Format += BytesPerFormatCharacter; + ArgumentString = "\r\n"; + Format += BytesPerFormatCharacter; FormatCharacter = ((*Format & 0xff) | ((BytesPerFormatCharacter == 1) ? 0 : (*(Format + 1) << 8))) & FormatMask; if (FormatCharacter != '\r') { - Format -= BytesPerFormatCharacter; + Format -= BytesPerFormatCharacter; } + break; - case '%': default: - // - // if the type is '%' or unknown, then print it to the screen - // ArgumentString = (CHAR8 *)&FormatCharacter; - Flags |= ARGUMENT_UNICODE; + Flags |= ARGUMENT_UNICODE; break; - } - break; - - case '\r': - Format += BytesPerFormatCharacter; - FormatCharacter = ((*Format & 0xff) | ((BytesPerFormatCharacter == 1) ? 0 : (*(Format + 1) << 8))) & FormatMask; - if (FormatCharacter == '\n') { - // - // Translate '\r\n' to '\r\n' - // - ArgumentString = "\r\n"; - } else { - // - // Translate '\r' to '\r' - // - ArgumentString = "\r"; - Format -= BytesPerFormatCharacter; - } - break; - - case '\n': - // - // Translate '\n' to '\r\n' and '\n\r' to '\r\n' - // - ArgumentString = "\r\n"; - Format += BytesPerFormatCharacter; - FormatCharacter = ((*Format & 0xff) | ((BytesPerFormatCharacter == 1) ? 0 : (*(Format + 1) << 8))) & FormatMask; - if (FormatCharacter != '\r') { - Format -= BytesPerFormatCharacter; - } - break; - - default: - ArgumentString = (CHAR8 *)&FormatCharacter; - Flags |= ARGUMENT_UNICODE; - break; } // // Retrieve the ArgumentString attriubutes // if ((Flags & ARGUMENT_UNICODE) != 0) { - ArgumentMask = 0xffff; + ArgumentMask = 0xffff; BytesPerArgumentCharacter = 2; } else { - ArgumentMask = 0xff; + ArgumentMask = 0xff; BytesPerArgumentCharacter = 1; } + if ((Flags & ARGUMENT_REVERSED) != 0) { BytesPerArgumentCharacter = -BytesPerArgumentCharacter; } else { @@ -1111,11 +1156,12 @@ BasePrintLibSPrintMarker ( // ArgumentString is either null-terminated, or it contains Precision characters // for (Count = 0; - (ArgumentString[Count * BytesPerArgumentCharacter] != '\0' || - (BytesPerArgumentCharacter > 1 && - ArgumentString[Count * BytesPerArgumentCharacter + 1]!= '\0')) && - (Count < Precision || ((Flags & PRECISION) == 0)); - Count++) { + (ArgumentString[Count * BytesPerArgumentCharacter] != '\0' || + (BytesPerArgumentCharacter > 1 && + ArgumentString[Count * BytesPerArgumentCharacter + 1] != '\0')) && + (Count < Precision || ((Flags & PRECISION) == 0)); + Count++) + { ArgumentCharacter = ((ArgumentString[Count * BytesPerArgumentCharacter] & 0xff) | ((ArgumentString[Count * BytesPerArgumentCharacter + 1]) << 8)) & ArgumentMask; if (ArgumentCharacter == 0) { break; @@ -1132,7 +1178,7 @@ BasePrintLibSPrintMarker ( // if ((Flags & (PAD_TO_WIDTH | LEFT_JUSTIFY)) == (PAD_TO_WIDTH)) { LengthToReturn += ((Width - Precision) * BytesPerOutputCharacter); - if ((Flags & COUNT_ONLY_NO_PRINT) == 0 && Buffer != NULL) { + if (((Flags & COUNT_ONLY_NO_PRINT) == 0) && (Buffer != NULL)) { Buffer = BasePrintLibFillBuffer (Buffer, EndBuffer, Width - Precision, ' ', BytesPerOutputCharacter); } } @@ -1140,22 +1186,24 @@ BasePrintLibSPrintMarker ( if (ZeroPad) { if (Prefix != 0) { LengthToReturn += (1 * BytesPerOutputCharacter); - if ((Flags & COUNT_ONLY_NO_PRINT) == 0 && Buffer != NULL) { + if (((Flags & COUNT_ONLY_NO_PRINT) == 0) && (Buffer != NULL)) { Buffer = BasePrintLibFillBuffer (Buffer, EndBuffer, 1, Prefix, BytesPerOutputCharacter); } } + LengthToReturn += ((Precision - Count) * BytesPerOutputCharacter); - if ((Flags & COUNT_ONLY_NO_PRINT) == 0 && Buffer != NULL) { + if (((Flags & COUNT_ONLY_NO_PRINT) == 0) && (Buffer != NULL)) { Buffer = BasePrintLibFillBuffer (Buffer, EndBuffer, Precision - Count, '0', BytesPerOutputCharacter); } } else { LengthToReturn += ((Precision - Count) * BytesPerOutputCharacter); - if ((Flags & COUNT_ONLY_NO_PRINT) == 0 && Buffer != NULL) { + if (((Flags & COUNT_ONLY_NO_PRINT) == 0) && (Buffer != NULL)) { Buffer = BasePrintLibFillBuffer (Buffer, EndBuffer, Precision - Count, ' ', BytesPerOutputCharacter); } + if (Prefix != 0) { LengthToReturn += (1 * BytesPerOutputCharacter); - if ((Flags & COUNT_ONLY_NO_PRINT) == 0 && Buffer != NULL) { + if (((Flags & COUNT_ONLY_NO_PRINT) == 0) && (Buffer != NULL)) { Buffer = BasePrintLibFillBuffer (Buffer, EndBuffer, 1, Prefix, BytesPerOutputCharacter); } } @@ -1174,14 +1222,16 @@ BasePrintLibSPrintMarker ( // while (Index < Count && (ArgumentString[0] != '\0' || - (BytesPerArgumentCharacter > 1 && ArgumentString[1] != '\0'))) { + (BytesPerArgumentCharacter > 1 && ArgumentString[1] != '\0'))) + { ArgumentCharacter = ((*ArgumentString & 0xff) | (((UINT8)*(ArgumentString + 1)) << 8)) & ArgumentMask; LengthToReturn += (1 * BytesPerOutputCharacter); - if ((Flags & COUNT_ONLY_NO_PRINT) == 0 && Buffer != NULL) { + if (((Flags & COUNT_ONLY_NO_PRINT) == 0) && (Buffer != NULL)) { Buffer = BasePrintLibFillBuffer (Buffer, EndBuffer, 1, ArgumentCharacter, BytesPerOutputCharacter); } - ArgumentString += BytesPerArgumentCharacter; + + ArgumentString += BytesPerArgumentCharacter; Index++; if (Comma) { Digits++; @@ -1190,7 +1240,7 @@ BasePrintLibSPrintMarker ( Index++; if (Index < Count) { LengthToReturn += (1 * BytesPerOutputCharacter); - if ((Flags & COUNT_ONLY_NO_PRINT) == 0 && Buffer != NULL) { + if (((Flags & COUNT_ONLY_NO_PRINT) == 0) && (Buffer != NULL)) { Buffer = BasePrintLibFillBuffer (Buffer, EndBuffer, 1, ',', BytesPerOutputCharacter); } } @@ -1203,7 +1253,7 @@ BasePrintLibSPrintMarker ( // if ((Flags & (PAD_TO_WIDTH | LEFT_JUSTIFY)) == (PAD_TO_WIDTH | LEFT_JUSTIFY)) { LengthToReturn += ((Width - Precision) * BytesPerOutputCharacter); - if ((Flags & COUNT_ONLY_NO_PRINT) == 0 && Buffer != NULL) { + if (((Flags & COUNT_ONLY_NO_PRINT) == 0) && (Buffer != NULL)) { Buffer = BasePrintLibFillBuffer (Buffer, EndBuffer, Width - Precision, ' ', BytesPerOutputCharacter); } } diff --git a/MdePkg/Library/BasePrintLib/PrintLibInternal.h b/MdePkg/Library/BasePrintLib/PrintLibInternal.h index 4ef7bc0..34d591c 100644 --- a/MdePkg/Library/BasePrintLib/PrintLibInternal.h +++ b/MdePkg/Library/BasePrintLib/PrintLibInternal.h @@ -15,37 +15,36 @@ #include #include - // // Print primitives // -#define PREFIX_SIGN BIT1 -#define PREFIX_BLANK BIT2 -#define LONG_TYPE BIT4 -#define OUTPUT_UNICODE BIT6 -#define FORMAT_UNICODE BIT8 -#define PAD_TO_WIDTH BIT9 -#define ARGUMENT_UNICODE BIT10 -#define PRECISION BIT11 -#define ARGUMENT_REVERSED BIT12 -#define COUNT_ONLY_NO_PRINT BIT13 -#define UNSIGNED_TYPE BIT14 +#define PREFIX_SIGN BIT1 +#define PREFIX_BLANK BIT2 +#define LONG_TYPE BIT4 +#define OUTPUT_UNICODE BIT6 +#define FORMAT_UNICODE BIT8 +#define PAD_TO_WIDTH BIT9 +#define ARGUMENT_UNICODE BIT10 +#define PRECISION BIT11 +#define ARGUMENT_REVERSED BIT12 +#define COUNT_ONLY_NO_PRINT BIT13 +#define UNSIGNED_TYPE BIT14 // // Record date and time information // typedef struct { - UINT16 Year; - UINT8 Month; - UINT8 Day; - UINT8 Hour; - UINT8 Minute; - UINT8 Second; - UINT8 Pad1; - UINT32 Nanosecond; - INT16 TimeZone; - UINT8 Daylight; - UINT8 Pad2; + UINT16 Year; + UINT8 Month; + UINT8 Day; + UINT8 Hour; + UINT8 Minute; + UINT8 Second; + UINT8 Pad1; + UINT32 Nanosecond; + INT16 TimeZone; + UINT8 Daylight; + UINT8 Pad2; } TIME; /** @@ -134,11 +133,11 @@ BasePrintLibSPrint ( **/ CHAR8 * BasePrintLibFillBuffer ( - OUT CHAR8 *Buffer, - IN CHAR8 *EndBuffer, - IN INTN Length, - IN UINTN Character, - IN INTN Increment + OUT CHAR8 *Buffer, + IN CHAR8 *EndBuffer, + IN INTN Length, + IN UINTN Character, + IN INTN Increment ); /** @@ -200,11 +199,11 @@ BasePrintLibValueToString ( **/ UINTN BasePrintLibConvertValueToString ( - IN OUT CHAR8 *Buffer, - IN UINTN Flags, - IN INT64 Value, - IN UINTN Width, - IN UINTN Increment + IN OUT CHAR8 *Buffer, + IN UINTN Flags, + IN INT64 Value, + IN UINTN Width, + IN UINTN Increment ); /** @@ -260,12 +259,12 @@ BasePrintLibConvertValueToString ( **/ RETURN_STATUS BasePrintLibConvertValueToStringS ( - IN OUT CHAR8 *Buffer, - IN UINTN BufferSize, - IN UINTN Flags, - IN INT64 Value, - IN UINTN Width, - IN UINTN Increment + IN OUT CHAR8 *Buffer, + IN UINTN BufferSize, + IN UINTN Flags, + IN INT64 Value, + IN UINTN Width, + IN UINTN Increment ); #endif diff --git a/MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLib.c b/MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLib.c index 48ef2d6..a1506a7 100644 --- a/MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLib.c +++ b/MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLib.c @@ -44,7 +44,6 @@ CodeTypeToPostCode ( return FALSE; } - /** Extracts ASSERT() information from a status code structure. @@ -92,7 +91,6 @@ ReportStatusCodeExtractAssertInfo ( return FALSE; } - /** Extracts DEBUG() information from a status code structure. @@ -139,7 +137,6 @@ ReportStatusCodeExtractDebugInfo ( return FALSE; } - /** Reports a status code. @@ -171,7 +168,6 @@ ReportStatusCode ( return EFI_SUCCESS; } - /** Reports a status code with a Device Path Protocol as the extended data. @@ -213,7 +209,6 @@ ReportStatusCodeWithDevicePath ( return EFI_SUCCESS; } - /** Reports a status code with an extended data buffer. @@ -261,7 +256,6 @@ ReportStatusCodeWithExtendedData ( return EFI_SUCCESS; } - /** Reports a status code with full parameters. @@ -318,7 +312,6 @@ ReportStatusCodeEx ( return EFI_SUCCESS; } - /** Returns TRUE if status codes of type EFI_PROGRESS_CODE are enabled @@ -340,7 +333,6 @@ ReportProgressCodeEnabled ( return FALSE; } - /** Returns TRUE if status codes of type EFI_ERROR_CODE are enabled @@ -362,7 +354,6 @@ ReportErrorCodeEnabled ( return FALSE; } - /** Returns TRUE if status codes of type EFI_DEBUG_CODE are enabled @@ -383,4 +374,3 @@ ReportDebugCodeEnabled ( { return FALSE; } - diff --git a/MdePkg/Library/BaseRngLib/AArch64/ArmRng.h b/MdePkg/Library/BaseRngLib/AArch64/ArmRng.h index e0a5673..2d6ef48 100644 --- a/MdePkg/Library/BaseRngLib/AArch64/ArmRng.h +++ b/MdePkg/Library/BaseRngLib/AArch64/ArmRng.h @@ -24,7 +24,7 @@ BOOLEAN EFIAPI ArmRndr ( - OUT UINT64 *Rand + OUT UINT64 *Rand ); /** diff --git a/MdePkg/Library/BaseRngLib/AArch64/Rndr.c b/MdePkg/Library/BaseRngLib/AArch64/Rndr.c index c9f8c81..20811bf 100644 --- a/MdePkg/Library/BaseRngLib/AArch64/Rndr.c +++ b/MdePkg/Library/BaseRngLib/AArch64/Rndr.c @@ -17,12 +17,12 @@ #include "ArmRng.h" #include "BaseRngLibInternals.h" -STATIC BOOLEAN mRndrSupported; +STATIC BOOLEAN mRndrSupported; // // Bit mask used to determine if RNDR instruction is supported. // -#define RNDR_MASK ((UINT64)MAX_UINT16 << 60U) +#define RNDR_MASK ((UINT64)MAX_UINT16 << 60U) /** The constructor function checks whether or not RNDR instruction is supported @@ -41,7 +41,8 @@ BaseRngLibConstructor ( VOID ) { - UINT64 Isar0; + UINT64 Isar0; + // // Determine RNDR support by examining bits 63:60 of the ISAR0 register returned by // MSR. A non-zero value indicates that the processor supports the RNDR instruction. @@ -66,10 +67,10 @@ BaseRngLibConstructor ( BOOLEAN EFIAPI ArchGetRandomNumber16 ( - OUT UINT16 *Rand + OUT UINT16 *Rand ) { - UINT64 Rand64; + UINT64 Rand64; if (ArchGetRandomNumber64 (&Rand64)) { *Rand = Rand64 & MAX_UINT16; @@ -91,10 +92,10 @@ ArchGetRandomNumber16 ( BOOLEAN EFIAPI ArchGetRandomNumber32 ( - OUT UINT32 *Rand + OUT UINT32 *Rand ) { - UINT64 Rand64; + UINT64 Rand64; if (ArchGetRandomNumber64 (&Rand64)) { *Rand = Rand64 & MAX_UINT32; @@ -116,7 +117,7 @@ ArchGetRandomNumber32 ( BOOLEAN EFIAPI ArchGetRandomNumber64 ( - OUT UINT64 *Rand + OUT UINT64 *Rand ) { return ArmRndr (Rand); diff --git a/MdePkg/Library/BaseRngLib/BaseRng.c b/MdePkg/Library/BaseRngLib/BaseRng.c index 5b63d8f..cbf405d 100644 --- a/MdePkg/Library/BaseRngLib/BaseRng.c +++ b/MdePkg/Library/BaseRngLib/BaseRng.c @@ -19,8 +19,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // Uses the recommended value defined in Section 7.3.17 of "Intel 64 and IA-32 // Architectures Software Developer's Manual". // -#define GETRANDOM_RETRY_LIMIT 10 - +#define GETRANDOM_RETRY_LIMIT 10 /** Generates a 16-bit random number. @@ -36,7 +35,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent BOOLEAN EFIAPI GetRandomNumber16 ( - OUT UINT16 *Rand + OUT UINT16 *Rand ) { UINT32 Index; @@ -77,7 +76,7 @@ GetRandomNumber16 ( BOOLEAN EFIAPI GetRandomNumber32 ( - OUT UINT32 *Rand + OUT UINT32 *Rand ) { UINT32 Index; @@ -118,7 +117,7 @@ GetRandomNumber32 ( BOOLEAN EFIAPI GetRandomNumber64 ( - OUT UINT64 *Rand + OUT UINT64 *Rand ) { UINT32 Index; @@ -159,7 +158,7 @@ GetRandomNumber64 ( BOOLEAN EFIAPI GetRandomNumber128 ( - OUT UINT64 *Rand + OUT UINT64 *Rand ) { ASSERT (Rand != NULL); diff --git a/MdePkg/Library/BaseRngLib/BaseRngLibInternals.h b/MdePkg/Library/BaseRngLib/BaseRngLibInternals.h index b6b4e9e..a9cbce1 100644 --- a/MdePkg/Library/BaseRngLib/BaseRngLibInternals.h +++ b/MdePkg/Library/BaseRngLib/BaseRngLibInternals.h @@ -22,7 +22,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent BOOLEAN EFIAPI ArchGetRandomNumber16 ( - OUT UINT16 *Rand + OUT UINT16 *Rand ); /** @@ -37,7 +37,7 @@ ArchGetRandomNumber16 ( BOOLEAN EFIAPI ArchGetRandomNumber32 ( - OUT UINT32 *Rand + OUT UINT32 *Rand ); /** @@ -52,7 +52,7 @@ ArchGetRandomNumber32 ( BOOLEAN EFIAPI ArchGetRandomNumber64 ( - OUT UINT64 *Rand + OUT UINT64 *Rand ); /** @@ -71,8 +71,8 @@ ArchIsRngSupported ( #if defined (MDE_CPU_AARCH64) // RNDR, Random Number -#define RNDR S3_3_C2_C4_0 +#define RNDR S3_3_C2_C4_0 #endif -#endif // BASE_RNGLIB_INTERNALS_H_ +#endif // BASE_RNGLIB_INTERNALS_H_ diff --git a/MdePkg/Library/BaseRngLib/Rand/RdRand.c b/MdePkg/Library/BaseRngLib/Rand/RdRand.c index 09fb875..070d41e 100644 --- a/MdePkg/Library/BaseRngLib/Rand/RdRand.c +++ b/MdePkg/Library/BaseRngLib/Rand/RdRand.c @@ -18,10 +18,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // // Bit mask used to determine if RdRand instruction is supported. // -#define RDRAND_MASK BIT30 +#define RDRAND_MASK BIT30 - -STATIC BOOLEAN mRdRandSupported; +STATIC BOOLEAN mRdRandSupported; /** The constructor function checks whether or not RDRAND instruction is supported @@ -66,7 +65,7 @@ BaseRngLibConstructor ( BOOLEAN EFIAPI ArchGetRandomNumber16 ( - OUT UINT16 *Rand + OUT UINT16 *Rand ) { return AsmRdRand16 (Rand); @@ -84,7 +83,7 @@ ArchGetRandomNumber16 ( BOOLEAN EFIAPI ArchGetRandomNumber32 ( - OUT UINT32 *Rand + OUT UINT32 *Rand ) { return AsmRdRand32 (Rand); @@ -102,7 +101,7 @@ ArchGetRandomNumber32 ( BOOLEAN EFIAPI ArchGetRandomNumber64 ( - OUT UINT64 *Rand + OUT UINT64 *Rand ) { return AsmRdRand64 (Rand); diff --git a/MdePkg/Library/BaseRngLibNull/BaseRngLibNull.c b/MdePkg/Library/BaseRngLibNull/BaseRngLibNull.c index cad3059..efba5c8 100644 --- a/MdePkg/Library/BaseRngLibNull/BaseRngLibNull.c +++ b/MdePkg/Library/BaseRngLibNull/BaseRngLibNull.c @@ -23,7 +23,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent BOOLEAN EFIAPI GetRandomNumber16 ( - OUT UINT16 *Rand + OUT UINT16 *Rand ) { ASSERT (FALSE); @@ -44,7 +44,7 @@ GetRandomNumber16 ( BOOLEAN EFIAPI GetRandomNumber32 ( - OUT UINT32 *Rand + OUT UINT32 *Rand ) { ASSERT (FALSE); @@ -65,7 +65,7 @@ GetRandomNumber32 ( BOOLEAN EFIAPI GetRandomNumber64 ( - OUT UINT64 *Rand + OUT UINT64 *Rand ) { ASSERT (FALSE); @@ -86,7 +86,7 @@ GetRandomNumber64 ( BOOLEAN EFIAPI GetRandomNumber128 ( - OUT UINT64 *Rand + OUT UINT64 *Rand ) { ASSERT (FALSE); diff --git a/MdePkg/Library/BaseRngLibTimerLib/RngLibTimer.c b/MdePkg/Library/BaseRngLibTimerLib/RngLibTimer.c index 54d29d9..980854d 100644 --- a/MdePkg/Library/BaseRngLibTimerLib/RngLibTimer.c +++ b/MdePkg/Library/BaseRngLibTimerLib/RngLibTimer.c @@ -11,7 +11,7 @@ #include #include -#define DEFAULT_DELAY_TIME_IN_MICROSECONDS 10 +#define DEFAULT_DELAY_TIME_IN_MICROSECONDS 10 /** Using the TimerLib GetPerformanceCounterProperties() we delay @@ -26,22 +26,22 @@ CalculateMinimumDecentDelayInMicroseconds ( VOID ) { - UINT64 CounterHz; + UINT64 CounterHz; // Get the counter properties CounterHz = GetPerformanceCounterProperties (NULL, NULL); // Make sure we won't divide by zero if (CounterHz == 0) { - ASSERT(CounterHz != 0); // Assert so the developer knows something is wrong + ASSERT (CounterHz != 0); // Assert so the developer knows something is wrong return DEFAULT_DELAY_TIME_IN_MICROSECONDS; } + // Calculate the minimum delay based on 1.5 microseconds divided by the hertz. // We calculate the length of a cycle (1/CounterHz) and multiply it by 1.5 microseconds // This ensures that the performance counter has increased by at least one - return (UINT32)(MAX (DivU64x64Remainder (1500000,CounterHz, NULL), 1)); + return (UINT32)(MAX (DivU64x64Remainder (1500000, CounterHz, NULL), 1)); } - /** Generates a 16-bit random number. @@ -56,11 +56,11 @@ CalculateMinimumDecentDelayInMicroseconds ( BOOLEAN EFIAPI GetRandomNumber16 ( - OUT UINT16 *Rand + OUT UINT16 *Rand ) { UINT32 Index; - UINT8 *RandPtr; + UINT8 *RandPtr; UINT32 DelayInMicroSeconds; ASSERT (Rand != NULL); @@ -68,15 +68,17 @@ GetRandomNumber16 ( if (Rand == NULL) { return FALSE; } + DelayInMicroSeconds = CalculateMinimumDecentDelayInMicroseconds (); - RandPtr = (UINT8*)Rand; + RandPtr = (UINT8 *)Rand; // Get 2 bytes of random ish data - for (Index = 0; Index < sizeof(UINT16); Index ++) { + for (Index = 0; Index < sizeof (UINT16); Index++) { *RandPtr = (UINT8)(GetPerformanceCounter () & 0xFF); // Delay to give the performance counter a chance to change MicroSecondDelay (DelayInMicroSeconds); RandPtr++; } + return TRUE; } @@ -94,11 +96,11 @@ GetRandomNumber16 ( BOOLEAN EFIAPI GetRandomNumber32 ( - OUT UINT32 *Rand + OUT UINT32 *Rand ) { UINT32 Index; - UINT8 *RandPtr; + UINT8 *RandPtr; UINT32 DelayInMicroSeconds; ASSERT (Rand != NULL); @@ -107,15 +109,16 @@ GetRandomNumber32 ( return FALSE; } - RandPtr = (UINT8 *) Rand; + RandPtr = (UINT8 *)Rand; DelayInMicroSeconds = CalculateMinimumDecentDelayInMicroseconds (); // Get 4 bytes of random ish data - for (Index = 0; Index < sizeof(UINT32); Index ++) { + for (Index = 0; Index < sizeof (UINT32); Index++) { *RandPtr = (UINT8)(GetPerformanceCounter () & 0xFF); // Delay to give the performance counter a chance to change MicroSecondDelay (DelayInMicroSeconds); RandPtr++; } + return TRUE; } @@ -133,11 +136,11 @@ GetRandomNumber32 ( BOOLEAN EFIAPI GetRandomNumber64 ( - OUT UINT64 *Rand + OUT UINT64 *Rand ) { UINT32 Index; - UINT8 *RandPtr; + UINT8 *RandPtr; UINT32 DelayInMicroSeconds; ASSERT (Rand != NULL); @@ -146,10 +149,10 @@ GetRandomNumber64 ( return FALSE; } - RandPtr = (UINT8 *)Rand; + RandPtr = (UINT8 *)Rand; DelayInMicroSeconds = CalculateMinimumDecentDelayInMicroseconds (); // Get 8 bytes of random ish data - for (Index = 0; Index < sizeof(UINT64); Index ++) { + for (Index = 0; Index < sizeof (UINT64); Index++) { *RandPtr = (UINT8)(GetPerformanceCounter () & 0xFF); // Delay to give the performance counter a chance to change MicroSecondDelay (DelayInMicroSeconds); @@ -173,7 +176,7 @@ GetRandomNumber64 ( BOOLEAN EFIAPI GetRandomNumber128 ( - OUT UINT64 *Rand + OUT UINT64 *Rand ) { ASSERT (Rand != NULL); diff --git a/MdePkg/Library/BaseS3BootScriptLibNull/BootScriptLib.c b/MdePkg/Library/BaseS3BootScriptLibNull/BootScriptLib.c index f150e8b..6436b95 100644 --- a/MdePkg/Library/BaseS3BootScriptLibNull/BootScriptLib.c +++ b/MdePkg/Library/BaseS3BootScriptLibNull/BootScriptLib.c @@ -7,7 +7,6 @@ **/ - #include #include @@ -25,10 +24,10 @@ RETURN_STATUS EFIAPI S3BootScriptSaveIoWrite ( - IN S3_BOOT_SCRIPT_LIB_WIDTH Width, - IN UINT64 Address, - IN UINTN Count, - IN VOID *Buffer + IN S3_BOOT_SCRIPT_LIB_WIDTH Width, + IN UINT64 Address, + IN UINTN Count, + IN VOID *Buffer ) { return RETURN_SUCCESS; @@ -48,10 +47,10 @@ S3BootScriptSaveIoWrite ( RETURN_STATUS EFIAPI S3BootScriptSaveIoReadWrite ( - IN S3_BOOT_SCRIPT_LIB_WIDTH Width, - IN UINT64 Address, - IN VOID *Data, - IN VOID *DataMask + IN S3_BOOT_SCRIPT_LIB_WIDTH Width, + IN UINT64 Address, + IN VOID *Data, + IN VOID *DataMask ) { return RETURN_SUCCESS; @@ -71,14 +70,15 @@ S3BootScriptSaveIoReadWrite ( RETURN_STATUS EFIAPI S3BootScriptSaveMemWrite ( - IN S3_BOOT_SCRIPT_LIB_WIDTH Width, - IN UINT64 Address, - IN UINTN Count, - IN VOID *Buffer + IN S3_BOOT_SCRIPT_LIB_WIDTH Width, + IN UINT64 Address, + IN UINTN Count, + IN VOID *Buffer ) { return RETURN_SUCCESS; } + /** Adds a record for a memory modify operation into a specified boot script table. @@ -93,14 +93,15 @@ S3BootScriptSaveMemWrite ( RETURN_STATUS EFIAPI S3BootScriptSaveMemReadWrite ( - IN S3_BOOT_SCRIPT_LIB_WIDTH Width, - IN UINT64 Address, - IN VOID *Data, - IN VOID *DataMask + IN S3_BOOT_SCRIPT_LIB_WIDTH Width, + IN UINT64 Address, + IN VOID *Data, + IN VOID *DataMask ) { return RETURN_SUCCESS; } + /** Adds a record for a PCI configuration space write operation into a specified boot script table. @@ -115,10 +116,10 @@ S3BootScriptSaveMemReadWrite ( RETURN_STATUS EFIAPI S3BootScriptSavePciCfgWrite ( - IN S3_BOOT_SCRIPT_LIB_WIDTH Width, - IN UINT64 Address, - IN UINTN Count, - IN VOID *Buffer + IN S3_BOOT_SCRIPT_LIB_WIDTH Width, + IN UINT64 Address, + IN UINTN Count, + IN VOID *Buffer ) { return RETURN_SUCCESS; @@ -138,14 +139,15 @@ S3BootScriptSavePciCfgWrite ( RETURN_STATUS EFIAPI S3BootScriptSavePciCfgReadWrite ( - IN S3_BOOT_SCRIPT_LIB_WIDTH Width, - IN UINT64 Address, - IN VOID *Data, - IN VOID *DataMask + IN S3_BOOT_SCRIPT_LIB_WIDTH Width, + IN UINT64 Address, + IN VOID *Data, + IN VOID *DataMask ) { return RETURN_SUCCESS; } + /** Adds a record for a PCI configuration space modify operation into a specified boot script table. @@ -161,15 +163,16 @@ S3BootScriptSavePciCfgReadWrite ( RETURN_STATUS EFIAPI S3BootScriptSavePciCfg2Write ( - IN S3_BOOT_SCRIPT_LIB_WIDTH Width, - IN UINT16 Segment, - IN UINT64 Address, - IN UINTN Count, - IN VOID *Buffer + IN S3_BOOT_SCRIPT_LIB_WIDTH Width, + IN UINT16 Segment, + IN UINT64 Address, + IN UINTN Count, + IN VOID *Buffer ) { return RETURN_SUCCESS; } + /** Adds a record for a PCI configuration space modify operation into a specified boot script table. @@ -185,15 +188,16 @@ S3BootScriptSavePciCfg2Write ( RETURN_STATUS EFIAPI S3BootScriptSavePciCfg2ReadWrite ( - IN S3_BOOT_SCRIPT_LIB_WIDTH Width, - IN UINT16 Segment, - IN UINT64 Address, - IN VOID *Data, - IN VOID *DataMask + IN S3_BOOT_SCRIPT_LIB_WIDTH Width, + IN UINT16 Segment, + IN UINT64 Address, + IN VOID *Data, + IN VOID *DataMask ) { return RETURN_SUCCESS; } + /** Adds a record for an SMBus command execution into a specified boot script table. @@ -209,14 +213,15 @@ S3BootScriptSavePciCfg2ReadWrite ( RETURN_STATUS EFIAPI S3BootScriptSaveSmbusExecute ( - IN UINTN SmBusAddress, - IN EFI_SMBUS_OPERATION Operation, - IN UINTN *Length, - IN VOID *Buffer + IN UINTN SmBusAddress, + IN EFI_SMBUS_OPERATION Operation, + IN UINTN *Length, + IN VOID *Buffer ) { return RETURN_SUCCESS; } + /** Adds a record for an execution stall on the processor into a specified boot script table. @@ -228,11 +233,12 @@ S3BootScriptSaveSmbusExecute ( RETURN_STATUS EFIAPI S3BootScriptSaveStall ( - IN UINTN Duration + IN UINTN Duration ) { return RETURN_SUCCESS; } + /** Adds a record for dispatching specified arbitrary code into a specified boot script table. @@ -244,11 +250,12 @@ S3BootScriptSaveStall ( RETURN_STATUS EFIAPI S3BootScriptSaveDispatch ( - IN VOID *EntryPoint + IN VOID *EntryPoint ) { return RETURN_SUCCESS; } + /** Adds a record for dispatching specified arbitrary code into a specified boot script table. @@ -261,8 +268,8 @@ S3BootScriptSaveDispatch ( RETURN_STATUS EFIAPI S3BootScriptSaveDispatch2 ( - IN VOID *EntryPoint, - IN VOID *Context + IN VOID *EntryPoint, + IN VOID *Context ) { return RETURN_SUCCESS; @@ -291,12 +298,12 @@ S3BootScriptSaveDispatch2 ( RETURN_STATUS EFIAPI S3BootScriptSaveMemPoll ( - IN S3_BOOT_SCRIPT_LIB_WIDTH Width, - IN UINT64 Address, - IN VOID *BitMask, - IN VOID *BitValue, - IN UINTN Duration, - IN UINT64 LoopTimes + IN S3_BOOT_SCRIPT_LIB_WIDTH Width, + IN UINT64 Address, + IN VOID *BitMask, + IN VOID *BitValue, + IN UINTN Duration, + IN UINT64 LoopTimes ) { return RETURN_SUCCESS; @@ -317,12 +324,13 @@ S3BootScriptSaveMemPoll ( RETURN_STATUS EFIAPI S3BootScriptSaveInformation ( - IN UINT32 InformationLength, - IN VOID *Information + IN UINT32 InformationLength, + IN VOID *Information ) { return RETURN_SUCCESS; } + /** Adds a record for I/O reads the I/O location and continues when the exit criteria is satisfied or after a defined duration. @@ -342,11 +350,11 @@ S3BootScriptSaveInformation ( RETURN_STATUS EFIAPI S3BootScriptSaveIoPoll ( - IN S3_BOOT_SCRIPT_LIB_WIDTH Width, - IN UINT64 Address, + IN S3_BOOT_SCRIPT_LIB_WIDTH Width, + IN UINT64 Address, IN VOID *Data, IN VOID *DataMask, - IN UINT64 Delay + IN UINT64 Delay ) { return RETURN_SUCCESS; @@ -371,15 +379,16 @@ S3BootScriptSaveIoPoll ( RETURN_STATUS EFIAPI S3BootScriptSavePciPoll ( - IN S3_BOOT_SCRIPT_LIB_WIDTH Width, - IN UINT64 Address, - IN VOID *Data, - IN VOID *DataMask, - IN UINT64 Delay - ) + IN S3_BOOT_SCRIPT_LIB_WIDTH Width, + IN UINT64 Address, + IN VOID *Data, + IN VOID *DataMask, + IN UINT64 Delay + ) { return RETURN_SUCCESS; } + /** Adds a record for PCI configuration space reads and continues when the exit criteria is satisfied or after a defined duration. @@ -403,16 +412,17 @@ S3BootScriptSavePciPoll ( RETURN_STATUS EFIAPI S3BootScriptSavePci2Poll ( - IN S3_BOOT_SCRIPT_LIB_WIDTH Width, - IN UINT16 Segment, - IN UINT64 Address, - IN VOID *Data, - IN VOID *DataMask, - IN UINT64 Delay + IN S3_BOOT_SCRIPT_LIB_WIDTH Width, + IN UINT16 Segment, + IN UINT64 Address, + IN VOID *Data, + IN VOID *DataMask, + IN UINT64 Delay ) { return RETURN_SUCCESS; } + /** Save ASCII string information specified by Buffer to boot script with opcode EFI_BOOT_SCRIPT_INFORMATION_OPCODE @@ -426,11 +436,12 @@ S3BootScriptSavePci2Poll ( RETURN_STATUS EFIAPI S3BootScriptSaveInformationAsciiString ( - IN CONST CHAR8 *String + IN CONST CHAR8 *String ) { return RETURN_SUCCESS; } + /** This is an function to close the S3 boot script table. The function could only be called in BOOT time phase. To comply with the Framework spec definition on @@ -456,7 +467,7 @@ S3BootScriptSaveInformationAsciiString ( @return the base address of the new copy of the boot script table. **/ -UINT8* +UINT8 * EFIAPI S3BootScriptCloseTable ( VOID @@ -464,6 +475,7 @@ S3BootScriptCloseTable ( { return 0; } + /** Executes the S3 boot script table. @@ -473,11 +485,12 @@ S3BootScriptCloseTable ( RETURN_STATUS EFIAPI S3BootScriptExecute ( - VOID + VOID ) { return RETURN_SUCCESS; } + /** Move the last boot script entry to the position @@ -496,12 +509,13 @@ S3BootScriptExecute ( RETURN_STATUS EFIAPI S3BootScriptMoveLastOpcode ( - IN BOOLEAN BeforeOrAfter, - IN OUT VOID **Position OPTIONAL -) + IN BOOLEAN BeforeOrAfter, + IN OUT VOID **Position OPTIONAL + ) { return RETURN_SUCCESS; } + /** Find a label within the boot script table and, if not present, optionally create it. @@ -527,14 +541,15 @@ S3BootScriptMoveLastOpcode ( RETURN_STATUS EFIAPI S3BootScriptLabel ( - IN BOOLEAN BeforeOrAfter, - IN BOOLEAN CreateIfNotFound, - IN OUT VOID **Position OPTIONAL, - IN CONST CHAR8 *Label + IN BOOLEAN BeforeOrAfter, + IN BOOLEAN CreateIfNotFound, + IN OUT VOID **Position OPTIONAL, + IN CONST CHAR8 *Label ) { return RETURN_SUCCESS; } + /** Compare two positions in the boot script table and return their relative position. @param Position1 The positions in the boot script table to compare @@ -552,9 +567,9 @@ S3BootScriptLabel ( RETURN_STATUS EFIAPI S3BootScriptCompare ( - IN UINT8 *Position1, - IN UINT8 *Position2, - OUT UINTN *RelativePosition + IN UINT8 *Position1, + IN UINT8 *Position2, + OUT UINTN *RelativePosition ) { return RETURN_SUCCESS; diff --git a/MdePkg/Library/BaseS3IoLib/S3IoLib.c b/MdePkg/Library/BaseS3IoLib/S3IoLib.c index c68a433..1525826 100644 --- a/MdePkg/Library/BaseS3IoLib/S3IoLib.c +++ b/MdePkg/Library/BaseS3IoLib/S3IoLib.c @@ -15,7 +15,6 @@ #include #include - /** Saves an I/O port value to the boot script. @@ -32,11 +31,11 @@ VOID InternalSaveIoWriteValueToBootScript ( IN S3_BOOT_SCRIPT_LIB_WIDTH Width, - IN UINTN Port, - IN VOID *Buffer + IN UINTN Port, + IN VOID *Buffer ) { - RETURN_STATUS Status; + RETURN_STATUS Status; Status = S3BootScriptSaveIoWrite ( Width, @@ -63,8 +62,8 @@ InternalSaveIoWriteValueToBootScript ( **/ UINT8 InternalSaveIoWrite8ValueToBootScript ( - IN UINTN Port, - IN UINT8 Value + IN UINTN Port, + IN UINT8 Value ) { InternalSaveIoWriteValueToBootScript (S3BootScriptWidthUint8, Port, &Value); @@ -90,7 +89,7 @@ InternalSaveIoWrite8ValueToBootScript ( UINT8 EFIAPI S3IoRead8 ( - IN UINTN Port + IN UINTN Port ) { return InternalSaveIoWrite8ValueToBootScript (Port, IoRead8 (Port)); @@ -115,8 +114,8 @@ S3IoRead8 ( UINT8 EFIAPI S3IoWrite8 ( - IN UINTN Port, - IN UINT8 Value + IN UINTN Port, + IN UINT8 Value ) { return InternalSaveIoWrite8ValueToBootScript (Port, IoWrite8 (Port, Value)); @@ -144,8 +143,8 @@ S3IoWrite8 ( UINT8 EFIAPI S3IoOr8 ( - IN UINTN Port, - IN UINT8 OrData + IN UINTN Port, + IN UINT8 OrData ) { return InternalSaveIoWrite8ValueToBootScript (Port, IoOr8 (Port, OrData)); @@ -173,8 +172,8 @@ S3IoOr8 ( UINT8 EFIAPI S3IoAnd8 ( - IN UINTN Port, - IN UINT8 AndData + IN UINTN Port, + IN UINT8 AndData ) { return InternalSaveIoWrite8ValueToBootScript (Port, IoAnd8 (Port, AndData)); @@ -204,9 +203,9 @@ S3IoAnd8 ( UINT8 EFIAPI S3IoAndThenOr8 ( - IN UINTN Port, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Port, + IN UINT8 AndData, + IN UINT8 OrData ) { return InternalSaveIoWrite8ValueToBootScript (Port, IoAndThenOr8 (Port, AndData, OrData)); @@ -236,9 +235,9 @@ S3IoAndThenOr8 ( UINT8 EFIAPI S3IoBitFieldRead8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit ) { return InternalSaveIoWrite8ValueToBootScript (Port, IoBitFieldRead8 (Port, StartBit, EndBit)); @@ -272,10 +271,10 @@ S3IoBitFieldRead8 ( UINT8 EFIAPI S3IoBitFieldWrite8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) { return InternalSaveIoWrite8ValueToBootScript (Port, IoBitFieldWrite8 (Port, StartBit, EndBit, Value)); @@ -311,10 +310,10 @@ S3IoBitFieldWrite8 ( UINT8 EFIAPI S3IoBitFieldOr8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) { return InternalSaveIoWrite8ValueToBootScript (Port, IoBitFieldOr8 (Port, StartBit, EndBit, OrData)); @@ -350,10 +349,10 @@ S3IoBitFieldOr8 ( UINT8 EFIAPI S3IoBitFieldAnd8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ) { return InternalSaveIoWrite8ValueToBootScript (Port, IoBitFieldAnd8 (Port, StartBit, EndBit, AndData)); @@ -392,11 +391,11 @@ S3IoBitFieldAnd8 ( UINT8 EFIAPI S3IoBitFieldAndThenOr8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) { return InternalSaveIoWrite8ValueToBootScript (Port, IoBitFieldAndThenOr8 (Port, StartBit, EndBit, AndData, OrData)); @@ -418,8 +417,8 @@ S3IoBitFieldAndThenOr8 ( **/ UINT16 InternalSaveIoWrite16ValueToBootScript ( - IN UINTN Port, - IN UINT16 Value + IN UINTN Port, + IN UINT16 Value ) { InternalSaveIoWriteValueToBootScript (S3BootScriptWidthUint16, Port, &Value); @@ -445,7 +444,7 @@ InternalSaveIoWrite16ValueToBootScript ( UINT16 EFIAPI S3IoRead16 ( - IN UINTN Port + IN UINTN Port ) { return InternalSaveIoWrite16ValueToBootScript (Port, IoRead16 (Port)); @@ -470,8 +469,8 @@ S3IoRead16 ( UINT16 EFIAPI S3IoWrite16 ( - IN UINTN Port, - IN UINT16 Value + IN UINTN Port, + IN UINT16 Value ) { return InternalSaveIoWrite16ValueToBootScript (Port, IoWrite16 (Port, Value)); @@ -499,8 +498,8 @@ S3IoWrite16 ( UINT16 EFIAPI S3IoOr16 ( - IN UINTN Port, - IN UINT16 OrData + IN UINTN Port, + IN UINT16 OrData ) { return InternalSaveIoWrite16ValueToBootScript (Port, IoOr16 (Port, OrData)); @@ -528,8 +527,8 @@ S3IoOr16 ( UINT16 EFIAPI S3IoAnd16 ( - IN UINTN Port, - IN UINT16 AndData + IN UINTN Port, + IN UINT16 AndData ) { return InternalSaveIoWrite16ValueToBootScript (Port, IoAnd16 (Port, AndData)); @@ -559,9 +558,9 @@ S3IoAnd16 ( UINT16 EFIAPI S3IoAndThenOr16 ( - IN UINTN Port, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Port, + IN UINT16 AndData, + IN UINT16 OrData ) { return InternalSaveIoWrite16ValueToBootScript (Port, IoAndThenOr16 (Port, AndData, OrData)); @@ -591,9 +590,9 @@ S3IoAndThenOr16 ( UINT16 EFIAPI S3IoBitFieldRead16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit ) { return InternalSaveIoWrite16ValueToBootScript (Port, IoBitFieldRead16 (Port, StartBit, EndBit)); @@ -627,10 +626,10 @@ S3IoBitFieldRead16 ( UINT16 EFIAPI S3IoBitFieldWrite16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ) { return InternalSaveIoWrite16ValueToBootScript (Port, IoBitFieldWrite16 (Port, StartBit, EndBit, Value)); @@ -666,10 +665,10 @@ S3IoBitFieldWrite16 ( UINT16 EFIAPI S3IoBitFieldOr16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ) { return InternalSaveIoWrite16ValueToBootScript (Port, IoBitFieldOr16 (Port, StartBit, EndBit, OrData)); @@ -705,10 +704,10 @@ S3IoBitFieldOr16 ( UINT16 EFIAPI S3IoBitFieldAnd16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ) { return InternalSaveIoWrite16ValueToBootScript (Port, IoBitFieldAnd16 (Port, StartBit, EndBit, AndData)); @@ -748,11 +747,11 @@ S3IoBitFieldAnd16 ( UINT16 EFIAPI S3IoBitFieldAndThenOr16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ) { return InternalSaveIoWrite16ValueToBootScript (Port, IoBitFieldAndThenOr16 (Port, StartBit, EndBit, AndData, OrData)); @@ -774,8 +773,8 @@ S3IoBitFieldAndThenOr16 ( **/ UINT32 InternalSaveIoWrite32ValueToBootScript ( - IN UINTN Port, - IN UINT32 Value + IN UINTN Port, + IN UINT32 Value ) { InternalSaveIoWriteValueToBootScript (S3BootScriptWidthUint32, Port, &Value); @@ -801,7 +800,7 @@ InternalSaveIoWrite32ValueToBootScript ( UINT32 EFIAPI S3IoRead32 ( - IN UINTN Port + IN UINTN Port ) { return InternalSaveIoWrite32ValueToBootScript (Port, IoRead32 (Port)); @@ -826,8 +825,8 @@ S3IoRead32 ( UINT32 EFIAPI S3IoWrite32 ( - IN UINTN Port, - IN UINT32 Value + IN UINTN Port, + IN UINT32 Value ) { return InternalSaveIoWrite32ValueToBootScript (Port, IoWrite32 (Port, Value)); @@ -855,8 +854,8 @@ S3IoWrite32 ( UINT32 EFIAPI S3IoOr32 ( - IN UINTN Port, - IN UINT32 OrData + IN UINTN Port, + IN UINT32 OrData ) { return InternalSaveIoWrite32ValueToBootScript (Port, IoOr32 (Port, OrData)); @@ -884,8 +883,8 @@ S3IoOr32 ( UINT32 EFIAPI S3IoAnd32 ( - IN UINTN Port, - IN UINT32 AndData + IN UINTN Port, + IN UINT32 AndData ) { return InternalSaveIoWrite32ValueToBootScript (Port, IoAnd32 (Port, AndData)); @@ -915,9 +914,9 @@ S3IoAnd32 ( UINT32 EFIAPI S3IoAndThenOr32 ( - IN UINTN Port, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Port, + IN UINT32 AndData, + IN UINT32 OrData ) { return InternalSaveIoWrite32ValueToBootScript (Port, IoAndThenOr32 (Port, AndData, OrData)); @@ -947,9 +946,9 @@ S3IoAndThenOr32 ( UINT32 EFIAPI S3IoBitFieldRead32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit ) { return InternalSaveIoWrite32ValueToBootScript (Port, IoBitFieldRead32 (Port, StartBit, EndBit)); @@ -983,10 +982,10 @@ S3IoBitFieldRead32 ( UINT32 EFIAPI S3IoBitFieldWrite32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { return InternalSaveIoWrite32ValueToBootScript (Port, IoBitFieldWrite32 (Port, StartBit, EndBit, Value)); @@ -1022,10 +1021,10 @@ S3IoBitFieldWrite32 ( UINT32 EFIAPI S3IoBitFieldOr32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { return InternalSaveIoWrite32ValueToBootScript (Port, IoBitFieldOr32 (Port, StartBit, EndBit, OrData)); @@ -1061,10 +1060,10 @@ S3IoBitFieldOr32 ( UINT32 EFIAPI S3IoBitFieldAnd32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { return InternalSaveIoWrite32ValueToBootScript (Port, IoBitFieldAnd32 (Port, StartBit, EndBit, AndData)); @@ -1104,11 +1103,11 @@ S3IoBitFieldAnd32 ( UINT32 EFIAPI S3IoBitFieldAndThenOr32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { return InternalSaveIoWrite32ValueToBootScript (Port, IoBitFieldAndThenOr32 (Port, StartBit, EndBit, AndData, OrData)); @@ -1130,8 +1129,8 @@ S3IoBitFieldAndThenOr32 ( **/ UINT64 InternalSaveIoWrite64ValueToBootScript ( - IN UINTN Port, - IN UINT64 Value + IN UINTN Port, + IN UINT64 Value ) { InternalSaveIoWriteValueToBootScript (S3BootScriptWidthUint64, Port, &Value); @@ -1157,7 +1156,7 @@ InternalSaveIoWrite64ValueToBootScript ( UINT64 EFIAPI S3IoRead64 ( - IN UINTN Port + IN UINTN Port ) { return InternalSaveIoWrite64ValueToBootScript (Port, IoRead64 (Port)); @@ -1182,8 +1181,8 @@ S3IoRead64 ( UINT64 EFIAPI S3IoWrite64 ( - IN UINTN Port, - IN UINT64 Value + IN UINTN Port, + IN UINT64 Value ) { return InternalSaveIoWrite64ValueToBootScript (Port, IoWrite64 (Port, Value)); @@ -1211,8 +1210,8 @@ S3IoWrite64 ( UINT64 EFIAPI S3IoOr64 ( - IN UINTN Port, - IN UINT64 OrData + IN UINTN Port, + IN UINT64 OrData ) { return InternalSaveIoWrite64ValueToBootScript (Port, IoOr64 (Port, OrData)); @@ -1240,8 +1239,8 @@ S3IoOr64 ( UINT64 EFIAPI S3IoAnd64 ( - IN UINTN Port, - IN UINT64 AndData + IN UINTN Port, + IN UINT64 AndData ) { return InternalSaveIoWrite64ValueToBootScript (Port, IoAnd64 (Port, AndData)); @@ -1271,9 +1270,9 @@ S3IoAnd64 ( UINT64 EFIAPI S3IoAndThenOr64 ( - IN UINTN Port, - IN UINT64 AndData, - IN UINT64 OrData + IN UINTN Port, + IN UINT64 AndData, + IN UINT64 OrData ) { return InternalSaveIoWrite64ValueToBootScript (Port, IoAndThenOr64 (Port, AndData, OrData)); @@ -1303,9 +1302,9 @@ S3IoAndThenOr64 ( UINT64 EFIAPI S3IoBitFieldRead64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit ) { return InternalSaveIoWrite64ValueToBootScript (Port, IoBitFieldRead64 (Port, StartBit, EndBit)); @@ -1339,10 +1338,10 @@ S3IoBitFieldRead64 ( UINT64 EFIAPI S3IoBitFieldWrite64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 Value + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 Value ) { return InternalSaveIoWrite64ValueToBootScript (Port, IoBitFieldWrite64 (Port, StartBit, EndBit, Value)); @@ -1378,10 +1377,10 @@ S3IoBitFieldWrite64 ( UINT64 EFIAPI S3IoBitFieldOr64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 OrData ) { return InternalSaveIoWrite64ValueToBootScript (Port, IoBitFieldOr64 (Port, StartBit, EndBit, OrData)); @@ -1417,10 +1416,10 @@ S3IoBitFieldOr64 ( UINT64 EFIAPI S3IoBitFieldAnd64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData ) { return InternalSaveIoWrite64ValueToBootScript (Port, IoBitFieldAnd64 (Port, StartBit, EndBit, AndData)); @@ -1460,11 +1459,11 @@ S3IoBitFieldAnd64 ( UINT64 EFIAPI S3IoBitFieldAndThenOr64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData, - IN UINT64 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData, + IN UINT64 OrData ) { return InternalSaveIoWrite64ValueToBootScript (Port, IoBitFieldAndThenOr64 (Port, StartBit, EndBit, AndData, OrData)); @@ -1486,11 +1485,11 @@ S3IoBitFieldAndThenOr64 ( VOID InternalSaveMmioWriteValueToBootScript ( IN S3_BOOT_SCRIPT_LIB_WIDTH Width, - IN UINTN Address, - IN VOID *Buffer + IN UINTN Address, + IN VOID *Buffer ) { - RETURN_STATUS Status; + RETURN_STATUS Status; Status = S3BootScriptSaveMemWrite ( Width, @@ -1517,8 +1516,8 @@ InternalSaveMmioWriteValueToBootScript ( **/ UINT8 InternalSaveMmioWrite8ValueToBootScript ( - IN UINTN Address, - IN UINT8 Value + IN UINTN Address, + IN UINT8 Value ) { InternalSaveMmioWriteValueToBootScript (S3BootScriptWidthUint8, Address, &Value); @@ -1544,7 +1543,7 @@ InternalSaveMmioWrite8ValueToBootScript ( UINT8 EFIAPI S3MmioRead8 ( - IN UINTN Address + IN UINTN Address ) { return InternalSaveMmioWrite8ValueToBootScript (Address, MmioRead8 (Address)); @@ -1569,8 +1568,8 @@ S3MmioRead8 ( UINT8 EFIAPI S3MmioWrite8 ( - IN UINTN Address, - IN UINT8 Value + IN UINTN Address, + IN UINT8 Value ) { return InternalSaveMmioWrite8ValueToBootScript (Address, MmioWrite8 (Address, Value)); @@ -1598,8 +1597,8 @@ S3MmioWrite8 ( UINT8 EFIAPI S3MmioOr8 ( - IN UINTN Address, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 OrData ) { return InternalSaveMmioWrite8ValueToBootScript (Address, MmioOr8 (Address, OrData)); @@ -1627,8 +1626,8 @@ S3MmioOr8 ( UINT8 EFIAPI S3MmioAnd8 ( - IN UINTN Address, - IN UINT8 AndData + IN UINTN Address, + IN UINT8 AndData ) { return InternalSaveMmioWrite8ValueToBootScript (Address, MmioAnd8 (Address, AndData)); @@ -1658,9 +1657,9 @@ S3MmioAnd8 ( UINT8 EFIAPI S3MmioAndThenOr8 ( - IN UINTN Address, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 AndData, + IN UINT8 OrData ) { return InternalSaveMmioWrite8ValueToBootScript (Address, MmioAndThenOr8 (Address, AndData, OrData)); @@ -1690,9 +1689,9 @@ S3MmioAndThenOr8 ( UINT8 EFIAPI S3MmioBitFieldRead8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return InternalSaveMmioWrite8ValueToBootScript (Address, MmioBitFieldRead8 (Address, StartBit, EndBit)); @@ -1725,10 +1724,10 @@ S3MmioBitFieldRead8 ( UINT8 EFIAPI S3MmioBitFieldWrite8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) { return InternalSaveMmioWrite8ValueToBootScript (Address, MmioBitFieldWrite8 (Address, StartBit, EndBit, Value)); @@ -1765,10 +1764,10 @@ S3MmioBitFieldWrite8 ( UINT8 EFIAPI S3MmioBitFieldOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) { return InternalSaveMmioWrite8ValueToBootScript (Address, MmioBitFieldOr8 (Address, StartBit, EndBit, OrData)); @@ -1805,10 +1804,10 @@ S3MmioBitFieldOr8 ( UINT8 EFIAPI S3MmioBitFieldAnd8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ) { return InternalSaveMmioWrite8ValueToBootScript (Address, MmioBitFieldAnd8 (Address, StartBit, EndBit, AndData)); @@ -1848,11 +1847,11 @@ S3MmioBitFieldAnd8 ( UINT8 EFIAPI S3MmioBitFieldAndThenOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) { return InternalSaveMmioWrite8ValueToBootScript (Address, MmioBitFieldAndThenOr8 (Address, StartBit, EndBit, AndData, OrData)); @@ -1874,8 +1873,8 @@ S3MmioBitFieldAndThenOr8 ( **/ UINT16 InternalSaveMmioWrite16ValueToBootScript ( - IN UINTN Address, - IN UINT16 Value + IN UINTN Address, + IN UINT16 Value ) { InternalSaveMmioWriteValueToBootScript (S3BootScriptWidthUint16, Address, &Value); @@ -1901,7 +1900,7 @@ InternalSaveMmioWrite16ValueToBootScript ( UINT16 EFIAPI S3MmioRead16 ( - IN UINTN Address + IN UINTN Address ) { return InternalSaveMmioWrite16ValueToBootScript (Address, MmioRead16 (Address)); @@ -1927,8 +1926,8 @@ S3MmioRead16 ( UINT16 EFIAPI S3MmioWrite16 ( - IN UINTN Address, - IN UINT16 Value + IN UINTN Address, + IN UINT16 Value ) { return InternalSaveMmioWrite16ValueToBootScript (Address, MmioWrite16 (Address, Value)); @@ -1956,8 +1955,8 @@ S3MmioWrite16 ( UINT16 EFIAPI S3MmioOr16 ( - IN UINTN Address, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 OrData ) { return InternalSaveMmioWrite16ValueToBootScript (Address, MmioOr16 (Address, OrData)); @@ -1985,8 +1984,8 @@ S3MmioOr16 ( UINT16 EFIAPI S3MmioAnd16 ( - IN UINTN Address, - IN UINT16 AndData + IN UINTN Address, + IN UINT16 AndData ) { return InternalSaveMmioWrite16ValueToBootScript (Address, MmioAnd16 (Address, AndData)); @@ -2016,9 +2015,9 @@ S3MmioAnd16 ( UINT16 EFIAPI S3MmioAndThenOr16 ( - IN UINTN Address, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 AndData, + IN UINT16 OrData ) { return InternalSaveMmioWrite16ValueToBootScript (Address, MmioAndThenOr16 (Address, AndData, OrData)); @@ -2048,9 +2047,9 @@ S3MmioAndThenOr16 ( UINT16 EFIAPI S3MmioBitFieldRead16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return InternalSaveMmioWrite16ValueToBootScript (Address, MmioBitFieldRead16 (Address, StartBit, EndBit)); @@ -2083,10 +2082,10 @@ S3MmioBitFieldRead16 ( UINT16 EFIAPI S3MmioBitFieldWrite16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ) { return InternalSaveMmioWrite16ValueToBootScript (Address, MmioBitFieldWrite16 (Address, StartBit, EndBit, Value)); @@ -2123,10 +2122,10 @@ S3MmioBitFieldWrite16 ( UINT16 EFIAPI S3MmioBitFieldOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ) { return InternalSaveMmioWrite16ValueToBootScript (Address, MmioBitFieldOr16 (Address, StartBit, EndBit, OrData)); @@ -2163,10 +2162,10 @@ S3MmioBitFieldOr16 ( UINT16 EFIAPI S3MmioBitFieldAnd16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ) { return InternalSaveMmioWrite16ValueToBootScript (Address, MmioBitFieldAnd16 (Address, StartBit, EndBit, AndData)); @@ -2206,11 +2205,11 @@ S3MmioBitFieldAnd16 ( UINT16 EFIAPI S3MmioBitFieldAndThenOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ) { return InternalSaveMmioWrite16ValueToBootScript (Address, MmioBitFieldAndThenOr16 (Address, StartBit, EndBit, AndData, OrData)); @@ -2232,8 +2231,8 @@ S3MmioBitFieldAndThenOr16 ( **/ UINT32 InternalSaveMmioWrite32ValueToBootScript ( - IN UINTN Address, - IN UINT32 Value + IN UINTN Address, + IN UINT32 Value ) { InternalSaveMmioWriteValueToBootScript (S3BootScriptWidthUint32, Address, &Value); @@ -2259,7 +2258,7 @@ InternalSaveMmioWrite32ValueToBootScript ( UINT32 EFIAPI S3MmioRead32 ( - IN UINTN Address + IN UINTN Address ) { return InternalSaveMmioWrite32ValueToBootScript (Address, MmioRead32 (Address)); @@ -2284,8 +2283,8 @@ S3MmioRead32 ( UINT32 EFIAPI S3MmioWrite32 ( - IN UINTN Address, - IN UINT32 Value + IN UINTN Address, + IN UINT32 Value ) { return InternalSaveMmioWrite32ValueToBootScript (Address, MmioWrite32 (Address, Value)); @@ -2313,8 +2312,8 @@ S3MmioWrite32 ( UINT32 EFIAPI S3MmioOr32 ( - IN UINTN Address, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 OrData ) { return InternalSaveMmioWrite32ValueToBootScript (Address, MmioOr32 (Address, OrData)); @@ -2342,8 +2341,8 @@ S3MmioOr32 ( UINT32 EFIAPI S3MmioAnd32 ( - IN UINTN Address, - IN UINT32 AndData + IN UINTN Address, + IN UINT32 AndData ) { return InternalSaveMmioWrite32ValueToBootScript (Address, MmioAnd32 (Address, AndData)); @@ -2373,9 +2372,9 @@ S3MmioAnd32 ( UINT32 EFIAPI S3MmioAndThenOr32 ( - IN UINTN Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 AndData, + IN UINT32 OrData ) { return InternalSaveMmioWrite32ValueToBootScript (Address, MmioAndThenOr32 (Address, AndData, OrData)); @@ -2405,9 +2404,9 @@ S3MmioAndThenOr32 ( UINT32 EFIAPI S3MmioBitFieldRead32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return InternalSaveMmioWrite32ValueToBootScript (Address, MmioBitFieldRead32 (Address, StartBit, EndBit)); @@ -2440,10 +2439,10 @@ S3MmioBitFieldRead32 ( UINT32 EFIAPI S3MmioBitFieldWrite32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { return InternalSaveMmioWrite32ValueToBootScript (Address, MmioBitFieldWrite32 (Address, StartBit, EndBit, Value)); @@ -2480,10 +2479,10 @@ S3MmioBitFieldWrite32 ( UINT32 EFIAPI S3MmioBitFieldOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { return InternalSaveMmioWrite32ValueToBootScript (Address, MmioBitFieldOr32 (Address, StartBit, EndBit, OrData)); @@ -2520,10 +2519,10 @@ S3MmioBitFieldOr32 ( UINT32 EFIAPI S3MmioBitFieldAnd32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { return InternalSaveMmioWrite32ValueToBootScript (Address, MmioBitFieldAnd32 (Address, StartBit, EndBit, AndData)); @@ -2563,11 +2562,11 @@ S3MmioBitFieldAnd32 ( UINT32 EFIAPI S3MmioBitFieldAndThenOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { return InternalSaveMmioWrite32ValueToBootScript (Address, MmioBitFieldAndThenOr32 (Address, StartBit, EndBit, AndData, OrData)); @@ -2589,8 +2588,8 @@ S3MmioBitFieldAndThenOr32 ( **/ UINT64 InternalSaveMmioWrite64ValueToBootScript ( - IN UINTN Address, - IN UINT64 Value + IN UINTN Address, + IN UINT64 Value ) { InternalSaveMmioWriteValueToBootScript (S3BootScriptWidthUint64, Address, &Value); @@ -2616,7 +2615,7 @@ InternalSaveMmioWrite64ValueToBootScript ( UINT64 EFIAPI S3MmioRead64 ( - IN UINTN Address + IN UINTN Address ) { return InternalSaveMmioWrite64ValueToBootScript (Address, MmioRead64 (Address)); @@ -2641,8 +2640,8 @@ S3MmioRead64 ( UINT64 EFIAPI S3MmioWrite64 ( - IN UINTN Address, - IN UINT64 Value + IN UINTN Address, + IN UINT64 Value ) { return InternalSaveMmioWrite64ValueToBootScript (Address, MmioWrite64 (Address, Value)); @@ -2670,8 +2669,8 @@ S3MmioWrite64 ( UINT64 EFIAPI S3MmioOr64 ( - IN UINTN Address, - IN UINT64 OrData + IN UINTN Address, + IN UINT64 OrData ) { return InternalSaveMmioWrite64ValueToBootScript (Address, MmioOr64 (Address, OrData)); @@ -2699,8 +2698,8 @@ S3MmioOr64 ( UINT64 EFIAPI S3MmioAnd64 ( - IN UINTN Address, - IN UINT64 AndData + IN UINTN Address, + IN UINT64 AndData ) { return InternalSaveMmioWrite64ValueToBootScript (Address, MmioAnd64 (Address, AndData)); @@ -2730,9 +2729,9 @@ S3MmioAnd64 ( UINT64 EFIAPI S3MmioAndThenOr64 ( - IN UINTN Address, - IN UINT64 AndData, - IN UINT64 OrData + IN UINTN Address, + IN UINT64 AndData, + IN UINT64 OrData ) { return InternalSaveMmioWrite64ValueToBootScript (Address, MmioAndThenOr64 (Address, AndData, OrData)); @@ -2762,9 +2761,9 @@ S3MmioAndThenOr64 ( UINT64 EFIAPI S3MmioBitFieldRead64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return InternalSaveMmioWrite64ValueToBootScript (Address, MmioBitFieldRead64 (Address, StartBit, EndBit)); @@ -2797,10 +2796,10 @@ S3MmioBitFieldRead64 ( UINT64 EFIAPI S3MmioBitFieldWrite64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 Value ) { return InternalSaveMmioWrite64ValueToBootScript (Address, MmioBitFieldWrite64 (Address, StartBit, EndBit, Value)); @@ -2837,10 +2836,10 @@ S3MmioBitFieldWrite64 ( UINT64 EFIAPI S3MmioBitFieldOr64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 OrData ) { return InternalSaveMmioWrite64ValueToBootScript (Address, MmioBitFieldOr64 (Address, StartBit, EndBit, OrData)); @@ -2877,10 +2876,10 @@ S3MmioBitFieldOr64 ( UINT64 EFIAPI S3MmioBitFieldAnd64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData ) { return InternalSaveMmioWrite64ValueToBootScript (Address, MmioBitFieldAnd64 (Address, StartBit, EndBit, AndData)); @@ -2920,11 +2919,11 @@ S3MmioBitFieldAnd64 ( UINT64 EFIAPI S3MmioBitFieldAndThenOr64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData, - IN UINT64 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData, + IN UINT64 OrData ) { return InternalSaveMmioWrite64ValueToBootScript (Address, MmioBitFieldAndThenOr64 (Address, StartBit, EndBit, AndData, OrData)); @@ -2952,12 +2951,12 @@ S3MmioBitFieldAndThenOr64 ( UINT8 * EFIAPI S3MmioReadBuffer8 ( - IN UINTN StartAddress, - IN UINTN Length, - OUT UINT8 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT8 *Buffer ) { - UINT8 *ReturnBuffer; + UINT8 *ReturnBuffer; RETURN_STATUS Status; ReturnBuffer = MmioReadBuffer8 (StartAddress, Length, Buffer); @@ -2999,13 +2998,13 @@ S3MmioReadBuffer8 ( UINT16 * EFIAPI S3MmioReadBuffer16 ( - IN UINTN StartAddress, - IN UINTN Length, - OUT UINT16 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT16 *Buffer ) { - UINT16 *ReturnBuffer; - RETURN_STATUS Status; + UINT16 *ReturnBuffer; + RETURN_STATUS Status; ReturnBuffer = MmioReadBuffer16 (StartAddress, Length, Buffer); @@ -3046,12 +3045,12 @@ S3MmioReadBuffer16 ( UINT32 * EFIAPI S3MmioReadBuffer32 ( - IN UINTN StartAddress, - IN UINTN Length, - OUT UINT32 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT32 *Buffer ) { - UINT32 *ReturnBuffer; + UINT32 *ReturnBuffer; RETURN_STATUS Status; ReturnBuffer = MmioReadBuffer32 (StartAddress, Length, Buffer); @@ -3093,12 +3092,12 @@ S3MmioReadBuffer32 ( UINT64 * EFIAPI S3MmioReadBuffer64 ( - IN UINTN StartAddress, - IN UINTN Length, - OUT UINT64 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT64 *Buffer ) { - UINT64 *ReturnBuffer; + UINT64 *ReturnBuffer; RETURN_STATUS Status; ReturnBuffer = MmioReadBuffer64 (StartAddress, Length, Buffer); @@ -3114,7 +3113,6 @@ S3MmioReadBuffer64 ( return ReturnBuffer; } - /** Copy data from system memory to MMIO region by using 8-bit access and saves the value in the S3 script to be replayed on S3 resume. @@ -3137,12 +3135,12 @@ S3MmioReadBuffer64 ( UINT8 * EFIAPI S3MmioWriteBuffer8 ( - IN UINTN StartAddress, - IN UINTN Length, - IN CONST UINT8 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT8 *Buffer ) { - UINT8 *ReturnBuffer; + UINT8 *ReturnBuffer; RETURN_STATUS Status; ReturnBuffer = MmioWriteBuffer8 (StartAddress, Length, Buffer); @@ -3185,12 +3183,12 @@ S3MmioWriteBuffer8 ( UINT16 * EFIAPI S3MmioWriteBuffer16 ( - IN UINTN StartAddress, - IN UINTN Length, - IN CONST UINT16 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT16 *Buffer ) { - UINT16 *ReturnBuffer; + UINT16 *ReturnBuffer; RETURN_STATUS Status; ReturnBuffer = MmioWriteBuffer16 (StartAddress, Length, Buffer); @@ -3206,7 +3204,6 @@ S3MmioWriteBuffer16 ( return ReturnBuffer; } - /** Copy data from system memory to MMIO region by using 32-bit access and saves the value in the S3 script to be replayed on S3 resume. @@ -3234,12 +3231,12 @@ S3MmioWriteBuffer16 ( UINT32 * EFIAPI S3MmioWriteBuffer32 ( - IN UINTN StartAddress, - IN UINTN Length, - IN CONST UINT32 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT32 *Buffer ) { - UINT32 *ReturnBuffer; + UINT32 *ReturnBuffer; RETURN_STATUS Status; ReturnBuffer = MmioWriteBuffer32 (StartAddress, Length, Buffer); @@ -3282,12 +3279,12 @@ S3MmioWriteBuffer32 ( UINT64 * EFIAPI S3MmioWriteBuffer64 ( - IN UINTN StartAddress, - IN UINTN Length, - IN CONST UINT64 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT64 *Buffer ) { - UINT64 *ReturnBuffer; + UINT64 *ReturnBuffer; RETURN_STATUS Status; ReturnBuffer = MmioWriteBuffer64 (StartAddress, Length, Buffer); @@ -3302,4 +3299,3 @@ S3MmioWriteBuffer64 ( return ReturnBuffer; } - diff --git a/MdePkg/Library/BaseS3PciLib/S3PciLib.c b/MdePkg/Library/BaseS3PciLib/S3PciLib.c index cae12a1..6530d38 100644 --- a/MdePkg/Library/BaseS3PciLib/S3PciLib.c +++ b/MdePkg/Library/BaseS3PciLib/S3PciLib.c @@ -9,7 +9,6 @@ **/ - #include #include @@ -37,15 +36,15 @@ VOID InternalSavePciWriteValueToBootScript ( IN S3_BOOT_SCRIPT_LIB_WIDTH Width, - IN UINTN Address, - IN VOID *Buffer + IN UINTN Address, + IN VOID *Buffer ) { - RETURN_STATUS Status; + RETURN_STATUS Status; Status = S3BootScriptSavePciCfgWrite ( Width, - PCILIB_TO_COMMON_ADDRESS(Address), + PCILIB_TO_COMMON_ADDRESS (Address), 1, Buffer ); @@ -69,8 +68,8 @@ InternalSavePciWriteValueToBootScript ( **/ UINT8 InternalSavePciWrite8ValueToBootScript ( - IN UINTN Address, - IN UINT8 Value + IN UINTN Address, + IN UINT8 Value ) { InternalSavePciWriteValueToBootScript (S3BootScriptWidthUint8, Address, &Value); @@ -97,7 +96,7 @@ InternalSavePciWrite8ValueToBootScript ( UINT8 EFIAPI S3PciRead8 ( - IN UINTN Address + IN UINTN Address ) { return InternalSavePciWrite8ValueToBootScript (Address, PciRead8 (Address)); @@ -123,8 +122,8 @@ S3PciRead8 ( UINT8 EFIAPI S3PciWrite8 ( - IN UINTN Address, - IN UINT8 Value + IN UINTN Address, + IN UINT8 Value ) { return InternalSavePciWrite8ValueToBootScript (Address, PciWrite8 (Address, Value)); @@ -153,8 +152,8 @@ S3PciWrite8 ( UINT8 EFIAPI S3PciOr8 ( - IN UINTN Address, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 OrData ) { return InternalSavePciWrite8ValueToBootScript (Address, PciOr8 (Address, OrData)); @@ -183,8 +182,8 @@ S3PciOr8 ( UINT8 EFIAPI S3PciAnd8 ( - IN UINTN Address, - IN UINT8 AndData + IN UINTN Address, + IN UINT8 AndData ) { return InternalSavePciWrite8ValueToBootScript (Address, PciAnd8 (Address, AndData)); @@ -216,9 +215,9 @@ S3PciAnd8 ( UINT8 EFIAPI S3PciAndThenOr8 ( - IN UINTN Address, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 AndData, + IN UINT8 OrData ) { return InternalSavePciWrite8ValueToBootScript (Address, PciAndThenOr8 (Address, AndData, OrData)); @@ -249,9 +248,9 @@ S3PciAndThenOr8 ( UINT8 EFIAPI S3PciBitFieldRead8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return InternalSavePciWrite8ValueToBootScript (Address, PciBitFieldRead8 (Address, StartBit, EndBit)); @@ -285,10 +284,10 @@ S3PciBitFieldRead8 ( UINT8 EFIAPI S3PciBitFieldWrite8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) { return InternalSavePciWrite8ValueToBootScript (Address, PciBitFieldWrite8 (Address, StartBit, EndBit, Value)); @@ -325,10 +324,10 @@ S3PciBitFieldWrite8 ( UINT8 EFIAPI S3PciBitFieldOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) { return InternalSavePciWrite8ValueToBootScript (Address, PciBitFieldOr8 (Address, StartBit, EndBit, OrData)); @@ -365,10 +364,10 @@ S3PciBitFieldOr8 ( UINT8 EFIAPI S3PciBitFieldAnd8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ) { return InternalSavePciWrite8ValueToBootScript (Address, PciBitFieldAnd8 (Address, StartBit, EndBit, AndData)); @@ -408,11 +407,11 @@ S3PciBitFieldAnd8 ( UINT8 EFIAPI S3PciBitFieldAndThenOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) { return InternalSavePciWrite8ValueToBootScript (Address, PciBitFieldAndThenOr8 (Address, StartBit, EndBit, AndData, OrData)); @@ -435,8 +434,8 @@ S3PciBitFieldAndThenOr8 ( **/ UINT16 InternalSavePciWrite16ValueToBootScript ( - IN UINTN Address, - IN UINT16 Value + IN UINTN Address, + IN UINT16 Value ) { InternalSavePciWriteValueToBootScript (S3BootScriptWidthUint16, Address, &Value); @@ -464,7 +463,7 @@ InternalSavePciWrite16ValueToBootScript ( UINT16 EFIAPI S3PciRead16 ( - IN UINTN Address + IN UINTN Address ) { return InternalSavePciWrite16ValueToBootScript (Address, PciRead16 (Address)); @@ -491,8 +490,8 @@ S3PciRead16 ( UINT16 EFIAPI S3PciWrite16 ( - IN UINTN Address, - IN UINT16 Value + IN UINTN Address, + IN UINT16 Value ) { return InternalSavePciWrite16ValueToBootScript (Address, PciWrite16 (Address, Value)); @@ -522,8 +521,8 @@ S3PciWrite16 ( UINT16 EFIAPI S3PciOr16 ( - IN UINTN Address, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 OrData ) { return InternalSavePciWrite16ValueToBootScript (Address, PciOr16 (Address, OrData)); @@ -553,8 +552,8 @@ S3PciOr16 ( UINT16 EFIAPI S3PciAnd16 ( - IN UINTN Address, - IN UINT16 AndData + IN UINTN Address, + IN UINT16 AndData ) { return InternalSavePciWrite16ValueToBootScript (Address, PciAnd16 (Address, AndData)); @@ -587,9 +586,9 @@ S3PciAnd16 ( UINT16 EFIAPI S3PciAndThenOr16 ( - IN UINTN Address, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 AndData, + IN UINT16 OrData ) { return InternalSavePciWrite16ValueToBootScript (Address, PciAndThenOr16 (Address, AndData, OrData)); @@ -621,9 +620,9 @@ S3PciAndThenOr16 ( UINT16 EFIAPI S3PciBitFieldRead16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return InternalSavePciWrite16ValueToBootScript (Address, PciBitFieldRead16 (Address, StartBit, EndBit)); @@ -658,10 +657,10 @@ S3PciBitFieldRead16 ( UINT16 EFIAPI S3PciBitFieldWrite16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ) { return InternalSavePciWrite16ValueToBootScript (Address, PciBitFieldWrite16 (Address, StartBit, EndBit, Value)); @@ -699,10 +698,10 @@ S3PciBitFieldWrite16 ( UINT16 EFIAPI S3PciBitFieldOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ) { return InternalSavePciWrite16ValueToBootScript (Address, PciBitFieldOr16 (Address, StartBit, EndBit, OrData)); @@ -740,10 +739,10 @@ S3PciBitFieldOr16 ( UINT16 EFIAPI S3PciBitFieldAnd16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ) { return InternalSavePciWrite16ValueToBootScript (Address, PciBitFieldAnd16 (Address, StartBit, EndBit, AndData)); @@ -784,11 +783,11 @@ S3PciBitFieldAnd16 ( UINT16 EFIAPI S3PciBitFieldAndThenOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ) { return InternalSavePciWrite16ValueToBootScript (Address, PciBitFieldAndThenOr16 (Address, StartBit, EndBit, AndData, OrData)); @@ -811,8 +810,8 @@ S3PciBitFieldAndThenOr16 ( **/ UINT32 InternalSavePciWrite32ValueToBootScript ( - IN UINTN Address, - IN UINT32 Value + IN UINTN Address, + IN UINT32 Value ) { InternalSavePciWriteValueToBootScript (S3BootScriptWidthUint32, Address, &Value); @@ -840,7 +839,7 @@ InternalSavePciWrite32ValueToBootScript ( UINT32 EFIAPI S3PciRead32 ( - IN UINTN Address + IN UINTN Address ) { return InternalSavePciWrite32ValueToBootScript (Address, PciRead32 (Address)); @@ -867,8 +866,8 @@ S3PciRead32 ( UINT32 EFIAPI S3PciWrite32 ( - IN UINTN Address, - IN UINT32 Value + IN UINTN Address, + IN UINT32 Value ) { return InternalSavePciWrite32ValueToBootScript (Address, PciWrite32 (Address, Value)); @@ -898,8 +897,8 @@ S3PciWrite32 ( UINT32 EFIAPI S3PciOr32 ( - IN UINTN Address, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 OrData ) { return InternalSavePciWrite32ValueToBootScript (Address, PciOr32 (Address, OrData)); @@ -929,8 +928,8 @@ S3PciOr32 ( UINT32 EFIAPI S3PciAnd32 ( - IN UINTN Address, - IN UINT32 AndData + IN UINTN Address, + IN UINT32 AndData ) { return InternalSavePciWrite32ValueToBootScript (Address, PciAnd32 (Address, AndData)); @@ -963,9 +962,9 @@ S3PciAnd32 ( UINT32 EFIAPI S3PciAndThenOr32 ( - IN UINTN Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 AndData, + IN UINT32 OrData ) { return InternalSavePciWrite32ValueToBootScript (Address, PciAndThenOr32 (Address, AndData, OrData)); @@ -997,9 +996,9 @@ S3PciAndThenOr32 ( UINT32 EFIAPI S3PciBitFieldRead32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return InternalSavePciWrite32ValueToBootScript (Address, PciBitFieldRead32 (Address, StartBit, EndBit)); @@ -1034,10 +1033,10 @@ S3PciBitFieldRead32 ( UINT32 EFIAPI S3PciBitFieldWrite32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { return InternalSavePciWrite32ValueToBootScript (Address, PciBitFieldWrite32 (Address, StartBit, EndBit, Value)); @@ -1075,10 +1074,10 @@ S3PciBitFieldWrite32 ( UINT32 EFIAPI S3PciBitFieldOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { return InternalSavePciWrite32ValueToBootScript (Address, PciBitFieldOr32 (Address, StartBit, EndBit, OrData)); @@ -1116,10 +1115,10 @@ S3PciBitFieldOr32 ( UINT32 EFIAPI S3PciBitFieldAnd32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { return InternalSavePciWrite32ValueToBootScript (Address, PciBitFieldAnd32 (Address, StartBit, EndBit, AndData)); @@ -1160,11 +1159,11 @@ S3PciBitFieldAnd32 ( UINT32 EFIAPI S3PciBitFieldAndThenOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { return InternalSavePciWrite32ValueToBootScript (Address, PciBitFieldAndThenOr32 (Address, StartBit, EndBit, AndData, OrData)); @@ -1197,12 +1196,12 @@ S3PciBitFieldAndThenOr32 ( UINTN EFIAPI S3PciReadBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - OUT VOID *Buffer + IN UINTN StartAddress, + IN UINTN Size, + OUT VOID *Buffer ) { - RETURN_STATUS Status; + RETURN_STATUS Status; Status = S3BootScriptSavePciCfgWrite ( S3BootScriptWidthUint8, @@ -1210,7 +1209,7 @@ S3PciReadBuffer ( PciReadBuffer (StartAddress, Size, Buffer), Buffer ); - ASSERT (Status == RETURN_SUCCESS); + ASSERT (Status == RETURN_SUCCESS); return Size; } @@ -1243,12 +1242,12 @@ S3PciReadBuffer ( UINTN EFIAPI S3PciWriteBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - IN VOID *Buffer + IN UINTN StartAddress, + IN UINTN Size, + IN VOID *Buffer ) { - RETURN_STATUS Status; + RETURN_STATUS Status; Status = S3BootScriptSavePciCfgWrite ( S3BootScriptWidthUint8, diff --git a/MdePkg/Library/BaseS3PciSegmentLib/S3PciSegmentLib.c b/MdePkg/Library/BaseS3PciSegmentLib/S3PciSegmentLib.c index 60d7ba2..28a64c1 100644 --- a/MdePkg/Library/BaseS3PciSegmentLib/S3PciSegmentLib.c +++ b/MdePkg/Library/BaseS3PciSegmentLib/S3PciSegmentLib.c @@ -8,7 +8,6 @@ **/ - #include #include @@ -46,11 +45,11 @@ VOID InternalSavePciSegmentWriteValueToBootScript ( IN S3_BOOT_SCRIPT_LIB_WIDTH Width, - IN UINT64 Address, - IN VOID *Buffer + IN UINT64 Address, + IN VOID *Buffer ) { - RETURN_STATUS Status; + RETURN_STATUS Status; Status = S3BootScriptSavePciCfg2Write ( Width, @@ -79,8 +78,8 @@ InternalSavePciSegmentWriteValueToBootScript ( **/ UINT8 InternalSavePciSegmentWrite8ValueToBootScript ( - IN UINT64 Address, - IN UINT8 Value + IN UINT64 Address, + IN UINT8 Value ) { InternalSavePciSegmentWriteValueToBootScript (S3BootScriptWidthUint8, Address, &Value); @@ -105,7 +104,7 @@ InternalSavePciSegmentWrite8ValueToBootScript ( UINT8 EFIAPI S3PciSegmentRead8 ( - IN UINT64 Address + IN UINT64 Address ) { return InternalSavePciSegmentWrite8ValueToBootScript (Address, PciSegmentRead8 (Address)); @@ -129,8 +128,8 @@ S3PciSegmentRead8 ( UINT8 EFIAPI S3PciSegmentWrite8 ( - IN UINT64 Address, - IN UINT8 Value + IN UINT64 Address, + IN UINT8 Value ) { return InternalSavePciSegmentWrite8ValueToBootScript (Address, PciSegmentWrite8 (Address, Value)); @@ -157,8 +156,8 @@ S3PciSegmentWrite8 ( UINT8 EFIAPI S3PciSegmentOr8 ( - IN UINT64 Address, - IN UINT8 OrData + IN UINT64 Address, + IN UINT8 OrData ) { return InternalSavePciSegmentWrite8ValueToBootScript (Address, PciSegmentOr8 (Address, OrData)); @@ -184,8 +183,8 @@ S3PciSegmentOr8 ( UINT8 EFIAPI S3PciSegmentAnd8 ( - IN UINT64 Address, - IN UINT8 AndData + IN UINT64 Address, + IN UINT8 AndData ) { return InternalSavePciSegmentWrite8ValueToBootScript (Address, PciSegmentAnd8 (Address, AndData)); @@ -215,9 +214,9 @@ S3PciSegmentAnd8 ( UINT8 EFIAPI S3PciSegmentAndThenOr8 ( - IN UINT64 Address, - IN UINT8 AndData, - IN UINT8 OrData + IN UINT64 Address, + IN UINT8 AndData, + IN UINT8 OrData ) { return InternalSavePciSegmentWrite8ValueToBootScript (Address, PciSegmentAndThenOr8 (Address, AndData, OrData)); @@ -248,9 +247,9 @@ S3PciSegmentAndThenOr8 ( UINT8 EFIAPI S3PciSegmentBitFieldRead8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return InternalSavePciSegmentWrite8ValueToBootScript (Address, PciSegmentBitFieldRead8 (Address, StartBit, EndBit)); @@ -284,10 +283,10 @@ S3PciSegmentBitFieldRead8 ( UINT8 EFIAPI S3PciSegmentBitFieldWrite8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) { return InternalSavePciSegmentWrite8ValueToBootScript (Address, PciSegmentBitFieldWrite8 (Address, StartBit, EndBit, Value)); @@ -324,10 +323,10 @@ S3PciSegmentBitFieldWrite8 ( UINT8 EFIAPI S3PciSegmentBitFieldOr8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) { return InternalSavePciSegmentWrite8ValueToBootScript (Address, PciSegmentBitFieldOr8 (Address, StartBit, EndBit, OrData)); @@ -364,10 +363,10 @@ S3PciSegmentBitFieldOr8 ( UINT8 EFIAPI S3PciSegmentBitFieldAnd8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ) { return InternalSavePciSegmentWrite8ValueToBootScript (Address, PciSegmentBitFieldAnd8 (Address, StartBit, EndBit, AndData)); @@ -407,11 +406,11 @@ S3PciSegmentBitFieldAnd8 ( UINT8 EFIAPI S3PciSegmentBitFieldAndThenOr8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) { return InternalSavePciSegmentWrite8ValueToBootScript (Address, PciSegmentBitFieldAndThenOr8 (Address, StartBit, EndBit, AndData, OrData)); @@ -434,8 +433,8 @@ S3PciSegmentBitFieldAndThenOr8 ( **/ UINT16 InternalSavePciSegmentWrite16ValueToBootScript ( - IN UINT64 Address, - IN UINT16 Value + IN UINT64 Address, + IN UINT16 Value ) { InternalSavePciSegmentWriteValueToBootScript (S3BootScriptWidthUint16, Address, &Value); @@ -461,7 +460,7 @@ InternalSavePciSegmentWrite16ValueToBootScript ( UINT16 EFIAPI S3PciSegmentRead16 ( - IN UINT64 Address + IN UINT64 Address ) { return InternalSavePciSegmentWrite16ValueToBootScript (Address, PciSegmentRead16 (Address)); @@ -486,8 +485,8 @@ S3PciSegmentRead16 ( UINT16 EFIAPI S3PciSegmentWrite16 ( - IN UINT64 Address, - IN UINT16 Value + IN UINT64 Address, + IN UINT16 Value ) { return InternalSavePciSegmentWrite16ValueToBootScript (Address, PciSegmentWrite16 (Address, Value)); @@ -516,8 +515,8 @@ S3PciSegmentWrite16 ( UINT16 EFIAPI S3PciSegmentOr16 ( - IN UINT64 Address, - IN UINT16 OrData + IN UINT64 Address, + IN UINT16 OrData ) { return InternalSavePciSegmentWrite16ValueToBootScript (Address, PciSegmentOr16 (Address, OrData)); @@ -545,8 +544,8 @@ S3PciSegmentOr16 ( UINT16 EFIAPI S3PciSegmentAnd16 ( - IN UINT64 Address, - IN UINT16 AndData + IN UINT64 Address, + IN UINT16 AndData ) { return InternalSavePciSegmentWrite16ValueToBootScript (Address, PciSegmentAnd16 (Address, AndData)); @@ -577,9 +576,9 @@ S3PciSegmentAnd16 ( UINT16 EFIAPI S3PciSegmentAndThenOr16 ( - IN UINT64 Address, - IN UINT16 AndData, - IN UINT16 OrData + IN UINT64 Address, + IN UINT16 AndData, + IN UINT16 OrData ) { return InternalSavePciSegmentWrite16ValueToBootScript (Address, PciSegmentAndThenOr16 (Address, AndData, OrData)); @@ -611,9 +610,9 @@ S3PciSegmentAndThenOr16 ( UINT16 EFIAPI S3PciSegmentBitFieldRead16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return InternalSavePciSegmentWrite16ValueToBootScript (Address, PciSegmentBitFieldRead16 (Address, StartBit, EndBit)); @@ -648,10 +647,10 @@ S3PciSegmentBitFieldRead16 ( UINT16 EFIAPI S3PciSegmentBitFieldWrite16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ) { return InternalSavePciSegmentWrite16ValueToBootScript (Address, PciSegmentBitFieldWrite16 (Address, StartBit, EndBit, Value)); @@ -689,10 +688,10 @@ S3PciSegmentBitFieldWrite16 ( UINT16 EFIAPI S3PciSegmentBitFieldOr16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ) { return InternalSavePciSegmentWrite16ValueToBootScript (Address, PciSegmentBitFieldOr16 (Address, StartBit, EndBit, OrData)); @@ -730,10 +729,10 @@ S3PciSegmentBitFieldOr16 ( UINT16 EFIAPI S3PciSegmentBitFieldAnd16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ) { return InternalSavePciSegmentWrite16ValueToBootScript (Address, PciSegmentBitFieldAnd16 (Address, StartBit, EndBit, AndData)); @@ -773,18 +772,16 @@ S3PciSegmentBitFieldAnd16 ( UINT16 EFIAPI S3PciSegmentBitFieldAndThenOr16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ) { return InternalSavePciSegmentWrite16ValueToBootScript (Address, PciSegmentBitFieldAndThenOr16 (Address, StartBit, EndBit, AndData, OrData)); } - - /** Saves a 32-bit PCI configuration value to the boot script. @@ -802,8 +799,8 @@ S3PciSegmentBitFieldAndThenOr16 ( **/ UINT32 InternalSavePciSegmentWrite32ValueToBootScript ( - IN UINT64 Address, - IN UINT32 Value + IN UINT64 Address, + IN UINT32 Value ) { InternalSavePciSegmentWriteValueToBootScript (S3BootScriptWidthUint32, Address, &Value); @@ -829,7 +826,7 @@ InternalSavePciSegmentWrite32ValueToBootScript ( UINT32 EFIAPI S3PciSegmentRead32 ( - IN UINT64 Address + IN UINT64 Address ) { return InternalSavePciSegmentWrite32ValueToBootScript (Address, PciSegmentRead32 (Address)); @@ -854,8 +851,8 @@ S3PciSegmentRead32 ( UINT32 EFIAPI S3PciSegmentWrite32 ( - IN UINT64 Address, - IN UINT32 Value + IN UINT64 Address, + IN UINT32 Value ) { return InternalSavePciSegmentWrite32ValueToBootScript (Address, PciSegmentWrite32 (Address, Value)); @@ -884,8 +881,8 @@ S3PciSegmentWrite32 ( UINT32 EFIAPI S3PciSegmentOr32 ( - IN UINT64 Address, - IN UINT32 OrData + IN UINT64 Address, + IN UINT32 OrData ) { return InternalSavePciSegmentWrite32ValueToBootScript (Address, PciSegmentOr32 (Address, OrData)); @@ -913,8 +910,8 @@ S3PciSegmentOr32 ( UINT32 EFIAPI S3PciSegmentAnd32 ( - IN UINT64 Address, - IN UINT32 AndData + IN UINT64 Address, + IN UINT32 AndData ) { return InternalSavePciSegmentWrite32ValueToBootScript (Address, PciSegmentAnd32 (Address, AndData)); @@ -945,9 +942,9 @@ S3PciSegmentAnd32 ( UINT32 EFIAPI S3PciSegmentAndThenOr32 ( - IN UINT64 Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINT64 Address, + IN UINT32 AndData, + IN UINT32 OrData ) { return InternalSavePciSegmentWrite32ValueToBootScript (Address, PciSegmentAndThenOr32 (Address, AndData, OrData)); @@ -979,9 +976,9 @@ S3PciSegmentAndThenOr32 ( UINT32 EFIAPI S3PciSegmentBitFieldRead32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return InternalSavePciSegmentWrite32ValueToBootScript (Address, PciSegmentBitFieldRead32 (Address, StartBit, EndBit)); @@ -1016,10 +1013,10 @@ S3PciSegmentBitFieldRead32 ( UINT32 EFIAPI S3PciSegmentBitFieldWrite32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { return InternalSavePciSegmentWrite32ValueToBootScript (Address, PciSegmentBitFieldWrite32 (Address, StartBit, EndBit, Value)); @@ -1057,10 +1054,10 @@ S3PciSegmentBitFieldWrite32 ( UINT32 EFIAPI S3PciSegmentBitFieldOr32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { return InternalSavePciSegmentWrite32ValueToBootScript (Address, PciSegmentBitFieldOr32 (Address, StartBit, EndBit, OrData)); @@ -1098,10 +1095,10 @@ S3PciSegmentBitFieldOr32 ( UINT32 EFIAPI S3PciSegmentBitFieldAnd32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { return InternalSavePciSegmentWrite32ValueToBootScript (Address, PciSegmentBitFieldAnd32 (Address, StartBit, EndBit, AndData)); @@ -1141,11 +1138,11 @@ S3PciSegmentBitFieldAnd32 ( UINT32 EFIAPI S3PciSegmentBitFieldAndThenOr32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { return InternalSavePciSegmentWrite32ValueToBootScript (Address, PciSegmentBitFieldAndThenOr32 (Address, StartBit, EndBit, AndData, OrData)); @@ -1178,12 +1175,12 @@ S3PciSegmentBitFieldAndThenOr32 ( UINTN EFIAPI S3PciSegmentReadBuffer ( - IN UINT64 StartAddress, - IN UINTN Size, - OUT VOID *Buffer + IN UINT64 StartAddress, + IN UINTN Size, + OUT VOID *Buffer ) { - RETURN_STATUS Status; + RETURN_STATUS Status; Status = S3BootScriptSavePciCfg2Write ( S3BootScriptWidthUint8, @@ -1224,12 +1221,12 @@ S3PciSegmentReadBuffer ( UINTN EFIAPI S3PciSegmentWriteBuffer ( - IN UINT64 StartAddress, - IN UINTN Size, - IN VOID *Buffer + IN UINT64 StartAddress, + IN UINTN Size, + IN VOID *Buffer ) { - RETURN_STATUS Status; + RETURN_STATUS Status; Status = S3BootScriptSavePciCfg2Write ( S3BootScriptWidthUint8, diff --git a/MdePkg/Library/BaseS3SmbusLib/S3SmbusLib.c b/MdePkg/Library/BaseS3SmbusLib/S3SmbusLib.c index 1a3c2bc..3ba28ed 100644 --- a/MdePkg/Library/BaseS3SmbusLib/S3SmbusLib.c +++ b/MdePkg/Library/BaseS3SmbusLib/S3SmbusLib.c @@ -9,7 +9,6 @@ **/ - #include #include @@ -36,18 +35,18 @@ **/ VOID InternalSaveSmBusExecToBootScript ( - IN EFI_SMBUS_OPERATION SmbusOperation, - IN UINTN SmBusAddress, - IN UINTN Length, - IN OUT VOID *Buffer + IN EFI_SMBUS_OPERATION SmbusOperation, + IN UINTN SmBusAddress, + IN UINTN Length, + IN OUT VOID *Buffer ) { - RETURN_STATUS Status; + RETURN_STATUS Status; Status = S3BootScriptSaveSmbusExecute ( SmBusAddress, SmbusOperation, - &Length, + &Length, Buffer ); ASSERT (Status == RETURN_SUCCESS); @@ -74,8 +73,8 @@ InternalSaveSmBusExecToBootScript ( VOID EFIAPI S3SmBusQuickRead ( - IN UINTN SmBusAddress, - OUT RETURN_STATUS *Status OPTIONAL + IN UINTN SmBusAddress, + OUT RETURN_STATUS *Status OPTIONAL ) { SmBusQuickRead (SmBusAddress, Status); @@ -104,8 +103,8 @@ S3SmBusQuickRead ( VOID EFIAPI S3SmBusQuickWrite ( - IN UINTN SmBusAddress, - OUT RETURN_STATUS *Status OPTIONAL + IN UINTN SmBusAddress, + OUT RETURN_STATUS *Status OPTIONAL ) { SmBusQuickWrite (SmBusAddress, Status); @@ -140,7 +139,7 @@ S3SmBusReceiveByte ( OUT RETURN_STATUS *Status OPTIONAL ) { - UINT8 Byte; + UINT8 Byte; Byte = SmBusReceiveByte (SmBusAddress, Status); @@ -178,7 +177,7 @@ S3SmBusSendByte ( OUT RETURN_STATUS *Status OPTIONAL ) { - UINT8 Byte; + UINT8 Byte; Byte = SmBusSendByte (SmBusAddress, Value, Status); @@ -213,7 +212,7 @@ S3SmBusReadDataByte ( OUT RETURN_STATUS *Status OPTIONAL ) { - UINT8 Byte; + UINT8 Byte; Byte = SmBusReadDataByte (SmBusAddress, Status); @@ -251,7 +250,7 @@ S3SmBusWriteDataByte ( OUT RETURN_STATUS *Status OPTIONAL ) { - UINT8 Byte; + UINT8 Byte; Byte = SmBusWriteDataByte (SmBusAddress, Value, Status); @@ -403,7 +402,7 @@ S3SmBusReadBlock ( OUT RETURN_STATUS *Status OPTIONAL ) { - UINTN Length; + UINTN Length; Length = SmBusReadBlock (SmBusAddress, Buffer, Status); @@ -485,7 +484,7 @@ S3SmBusBlockProcessCall ( OUT RETURN_STATUS *Status OPTIONAL ) { - UINTN Length; + UINTN Length; Length = SmBusBlockProcessCall (SmBusAddress, WriteBuffer, ReadBuffer, Status); diff --git a/MdePkg/Library/BaseS3StallLib/S3StallLib.c b/MdePkg/Library/BaseS3StallLib/S3StallLib.c index f1f3388..ea886ca 100644 --- a/MdePkg/Library/BaseS3StallLib/S3StallLib.c +++ b/MdePkg/Library/BaseS3StallLib/S3StallLib.c @@ -16,7 +16,6 @@ #include #include - /** Stalls the CPU for at least the given number of microseconds and and saves the value in the S3 script to be replayed on S3 resume. @@ -31,15 +30,13 @@ UINTN EFIAPI S3Stall ( - IN UINTN MicroSeconds + IN UINTN MicroSeconds ) { - RETURN_STATUS Status; + RETURN_STATUS Status; Status = S3BootScriptSaveStall (MicroSecondDelay (MicroSeconds)); ASSERT (Status == RETURN_SUCCESS); return MicroSeconds; } - - diff --git a/MdePkg/Library/BaseSafeIntLib/SafeIntLib.c b/MdePkg/Library/BaseSafeIntLib/SafeIntLib.c index eec8ac1..13fe84d 100644 --- a/MdePkg/Library/BaseSafeIntLib/SafeIntLib.c +++ b/MdePkg/Library/BaseSafeIntLib/SafeIntLib.c @@ -13,11 +13,10 @@ #include #include - // // Magnitude of MIN_INT64 as expressed by a UINT64 number. // -#define MIN_INT64_MAGNITUDE (((UINT64)(- (MIN_INT64 + 1))) + 1) +#define MIN_INT64_MAGNITUDE (((UINT64)(- (MIN_INT64 + 1))) + 1) // // Conversion functions @@ -69,10 +68,10 @@ SafeInt8ToUint8 ( if (Operand >= 0) { *Result = (UINT8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -113,10 +112,10 @@ SafeInt8ToChar8 ( if (Operand >= 0) { *Result = (CHAR8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = CHAR8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -157,10 +156,10 @@ SafeInt8ToUint16 ( if (Operand >= 0) { *Result = (UINT16)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT16_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -201,10 +200,10 @@ SafeInt8ToUint32 ( if (Operand >= 0) { *Result = (UINT32)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT32_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -245,10 +244,10 @@ SafeInt8ToUintn ( if (Operand >= 0) { *Result = (UINTN)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINTN_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -289,10 +288,10 @@ SafeInt8ToUint64 ( if (Operand >= 0) { *Result = (UINT64)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT64_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -333,10 +332,10 @@ SafeUint8ToInt8 ( if (Operand <= MAX_INT8) { *Result = (INT8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = INT8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -377,10 +376,10 @@ SafeUint8ToChar8 ( if (Operand <= MAX_INT8) { *Result = (CHAR8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = CHAR8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -421,10 +420,10 @@ SafeInt16ToInt8 ( if ((Operand >= MIN_INT8) && (Operand <= MAX_INT8)) { *Result = (INT8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = INT8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -465,10 +464,10 @@ SafeInt16ToChar8 ( if ((Operand >= 0) && (Operand <= MAX_INT8)) { *Result = (CHAR8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = CHAR8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -509,10 +508,10 @@ SafeInt16ToUint8 ( if ((Operand >= 0) && (Operand <= MAX_UINT8)) { *Result = (UINT8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -553,10 +552,10 @@ SafeInt16ToUint16 ( if (Operand >= 0) { *Result = (UINT16)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT16_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -597,10 +596,10 @@ SafeInt16ToUint32 ( if (Operand >= 0) { *Result = (UINT32)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT32_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -641,10 +640,10 @@ SafeInt16ToUintn ( if (Operand >= 0) { *Result = (UINTN)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINTN_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -685,10 +684,10 @@ SafeInt16ToUint64 ( if (Operand >= 0) { *Result = (UINT64)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT64_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -729,10 +728,10 @@ SafeUint16ToInt8 ( if (Operand <= MAX_INT8) { *Result = (INT8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = INT8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -773,10 +772,10 @@ SafeUint16ToChar8 ( if (Operand <= MAX_INT8) { *Result = (INT8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = CHAR8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -817,10 +816,10 @@ SafeUint16ToUint8 ( if (Operand <= MAX_UINT8) { *Result = (UINT8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -861,10 +860,10 @@ SafeUint16ToInt16 ( if (Operand <= MAX_INT16) { *Result = (INT16)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = INT16_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -905,10 +904,10 @@ SafeInt32ToInt8 ( if ((Operand >= MIN_INT8) && (Operand <= MAX_INT8)) { *Result = (INT8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = INT8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -949,10 +948,10 @@ SafeInt32ToChar8 ( if ((Operand >= 0) && (Operand <= MAX_INT8)) { *Result = (CHAR8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = CHAR8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -993,10 +992,10 @@ SafeInt32ToUint8 ( if ((Operand >= 0) && (Operand <= MAX_UINT8)) { *Result = (UINT8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -1037,10 +1036,10 @@ SafeInt32ToInt16 ( if ((Operand >= MIN_INT16) && (Operand <= MAX_INT16)) { *Result = (INT16)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = INT16_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -1081,10 +1080,10 @@ SafeInt32ToUint16 ( if ((Operand >= 0) && (Operand <= MAX_UINT16)) { *Result = (UINT16)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT16_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -1125,10 +1124,10 @@ SafeInt32ToUint32 ( if (Operand >= 0) { *Result = (UINT32)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT32_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -1169,10 +1168,10 @@ SafeInt32ToUint64 ( if (Operand >= 0) { *Result = (UINT64)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT64_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -1213,10 +1212,10 @@ SafeUint32ToInt8 ( if (Operand <= MAX_INT8) { *Result = (INT8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = INT8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -1257,10 +1256,10 @@ SafeUint32ToChar8 ( if (Operand <= MAX_INT8) { *Result = (INT8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = CHAR8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -1301,10 +1300,10 @@ SafeUint32ToUint8 ( if (Operand <= MAX_UINT8) { *Result = (UINT8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -1345,10 +1344,10 @@ SafeUint32ToInt16 ( if (Operand <= MAX_INT16) { *Result = (INT16)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = INT16_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -1389,10 +1388,10 @@ SafeUint32ToUint16 ( if (Operand <= MAX_UINT16) { *Result = (UINT16)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT16_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -1433,10 +1432,10 @@ SafeUint32ToInt32 ( if (Operand <= MAX_INT32) { *Result = (INT32)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = INT32_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -1477,10 +1476,10 @@ SafeIntnToInt8 ( if ((Operand >= MIN_INT8) && (Operand <= MAX_INT8)) { *Result = (INT8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = INT8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -1521,10 +1520,10 @@ SafeIntnToChar8 ( if ((Operand >= 0) && (Operand <= MAX_INT8)) { *Result = (CHAR8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = CHAR8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -1565,10 +1564,10 @@ SafeIntnToUint8 ( if ((Operand >= 0) && (Operand <= MAX_UINT8)) { *Result = (UINT8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -1609,10 +1608,10 @@ SafeIntnToInt16 ( if ((Operand >= MIN_INT16) && (Operand <= MAX_INT16)) { *Result = (INT16)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = INT16_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -1653,10 +1652,10 @@ SafeIntnToUint16 ( if ((Operand >= 0) && (Operand <= MAX_UINT16)) { *Result = (UINT16)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT16_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -1697,10 +1696,10 @@ SafeIntnToUintn ( if (Operand >= 0) { *Result = (UINTN)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINTN_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -1741,10 +1740,10 @@ SafeIntnToUint64 ( if (Operand >= 0) { *Result = (UINT64)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT64_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -1785,10 +1784,10 @@ SafeUintnToInt8 ( if (Operand <= MAX_INT8) { *Result = (INT8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = INT8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -1829,10 +1828,10 @@ SafeUintnToChar8 ( if (Operand <= MAX_INT8) { *Result = (INT8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = CHAR8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -1873,10 +1872,10 @@ SafeUintnToUint8 ( if (Operand <= MAX_UINT8) { *Result = (UINT8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -1917,10 +1916,10 @@ SafeUintnToInt16 ( if (Operand <= MAX_INT16) { *Result = (INT16)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = INT16_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -1961,10 +1960,10 @@ SafeUintnToUint16 ( if (Operand <= MAX_UINT16) { *Result = (UINT16)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT16_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -2005,10 +2004,10 @@ SafeUintnToInt32 ( if (Operand <= MAX_INT32) { *Result = (INT32)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = INT32_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -2049,10 +2048,10 @@ SafeUintnToIntn ( if (Operand <= MAX_INTN) { *Result = (INTN)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = INTN_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -2093,10 +2092,10 @@ SafeInt64ToInt8 ( if ((Operand >= MIN_INT8) && (Operand <= MAX_INT8)) { *Result = (INT8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = INT8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -2137,10 +2136,10 @@ SafeInt64ToChar8 ( if ((Operand >= 0) && (Operand <= MAX_INT8)) { *Result = (CHAR8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = CHAR8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -2181,10 +2180,10 @@ SafeInt64ToUint8 ( if ((Operand >= 0) && (Operand <= MAX_UINT8)) { *Result = (UINT8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -2225,10 +2224,10 @@ SafeInt64ToInt16 ( if ((Operand >= MIN_INT16) && (Operand <= MAX_INT16)) { *Result = (INT16)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = INT16_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -2269,10 +2268,10 @@ SafeInt64ToUint16 ( if ((Operand >= 0) && (Operand <= MAX_UINT16)) { *Result = (UINT16)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT16_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -2313,10 +2312,10 @@ SafeInt64ToInt32 ( if ((Operand >= MIN_INT32) && (Operand <= MAX_INT32)) { *Result = (INT32)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = INT32_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -2357,10 +2356,10 @@ SafeInt64ToUint32 ( if ((Operand >= 0) && (Operand <= MAX_UINT32)) { *Result = (UINT32)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT32_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -2401,10 +2400,10 @@ SafeInt64ToUint64 ( if (Operand >= 0) { *Result = (UINT64)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT64_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -2445,10 +2444,10 @@ SafeUint64ToInt8 ( if (Operand <= MAX_INT8) { *Result = (INT8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = INT8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -2489,10 +2488,10 @@ SafeUint64ToChar8 ( if (Operand <= MAX_INT8) { *Result = (INT8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = CHAR8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -2533,10 +2532,10 @@ SafeUint64ToUint8 ( if (Operand <= MAX_UINT8) { *Result = (UINT8)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -2577,10 +2576,10 @@ SafeUint64ToInt16 ( if (Operand <= MAX_INT16) { *Result = (INT16)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = INT16_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -2621,10 +2620,10 @@ SafeUint64ToUint16 ( if (Operand <= MAX_UINT16) { *Result = (UINT16)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT16_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -2665,10 +2664,10 @@ SafeUint64ToInt32 ( if (Operand <= MAX_INT32) { *Result = (INT32)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = INT32_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -2709,10 +2708,10 @@ SafeUint64ToUint32 ( if (Operand <= MAX_UINT32) { *Result = (UINT32)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT32_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -2753,10 +2752,10 @@ SafeUint64ToIntn ( if (Operand <= MAX_INTN) { *Result = (INTN)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = INTN_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -2797,10 +2796,10 @@ SafeUint64ToInt64 ( if (Operand <= MAX_INT64) { *Result = (INT64)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = INT64_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -2847,10 +2846,10 @@ SafeUint8Add ( if (((UINT8)(Augend + Addend)) >= Augend) { *Result = (UINT8)(Augend + Addend); - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -2893,10 +2892,10 @@ SafeUint16Add ( if (((UINT16)(Augend + Addend)) >= Augend) { *Result = (UINT16)(Augend + Addend); - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT16_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -2939,10 +2938,10 @@ SafeUint32Add ( if ((Augend + Addend) >= Augend) { *Result = (Augend + Addend); - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT32_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -2985,10 +2984,10 @@ SafeUint64Add ( if ((Augend + Addend) >= Augend) { *Result = (Augend + Addend); - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT64_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -3035,10 +3034,10 @@ SafeUint8Sub ( if (Minuend >= Subtrahend) { *Result = (UINT8)(Minuend - Subtrahend); - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT8_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -3081,10 +3080,10 @@ SafeUint16Sub ( if (Minuend >= Subtrahend) { *Result = (UINT16)(Minuend - Subtrahend); - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT16_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -3127,10 +3126,10 @@ SafeUint32Sub ( if (Minuend >= Subtrahend) { *Result = (Minuend - Subtrahend); - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT32_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -3173,10 +3172,10 @@ SafeUint64Sub ( if (Minuend >= Subtrahend) { *Result = (Minuend - Subtrahend); - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT64_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -3289,7 +3288,7 @@ SafeUint32Mult ( { UINT64 IntermediateResult; - IntermediateResult = ((UINT64) Multiplicand) *((UINT64) Multiplier); + IntermediateResult = ((UINT64)Multiplicand) *((UINT64)Multiplier); return SafeUint64ToUint32 (IntermediateResult, Result); } @@ -3337,11 +3336,11 @@ SafeUint64Mult ( return RETURN_INVALID_PARAMETER; } - ProductAD = 0; - ProductBC = 0; - ProductBD = 0; + ProductAD = 0; + ProductBC = 0; + ProductBD = 0; UnsignedResult = 0; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; // // 64x64 into 128 is like 32.32 x 32.32. @@ -3368,13 +3367,14 @@ SafeUint64Mult ( DwordD = (UINT32)Multiplier; *Result = (((UINT64)DwordB) *(UINT64)DwordD); - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { // // a * c must be 0 or there would be bits set in the high 64-bits // if ((DwordA == 0) || - (DwordC == 0)) { + (DwordC == 0)) + { DwordD = (UINT32)Multiplier; // @@ -3401,7 +3401,7 @@ SafeUint64Mult ( if (!RETURN_ERROR (SafeUint64Add (UnsignedResult, ProductBD, &UnsignedResult))) { *Result = UnsignedResult; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } } } @@ -3412,6 +3412,7 @@ SafeUint64Mult ( if (RETURN_ERROR (Status)) { *Result = UINT64_ERROR; } + return Status; } @@ -3509,11 +3510,12 @@ SafeChar8Add ( Augend32 = (INT32)Augend; Addend32 = (INT32)Addend; - if (Augend32 < 0 || Augend32 > MAX_INT8) { + if ((Augend32 < 0) || (Augend32 > MAX_INT8)) { *Result = CHAR8_ERROR; return RETURN_BUFFER_TOO_SMALL; } - if (Addend32 < 0 || Addend32 > MAX_INT8) { + + if ((Addend32 < 0) || (Addend32 > MAX_INT8)) { *Result = CHAR8_ERROR; return RETURN_BUFFER_TOO_SMALL; } @@ -3666,12 +3668,13 @@ SafeInt64Add ( // 0 >= (MIN_INT64 - Addend) > MIN_INT64 // if (((Addend > 0) && (Augend > (MAX_INT64 - Addend))) || - ((Addend < 0) && (Augend < (MIN_INT64 - Addend)))) { + ((Addend < 0) && (Augend < (MIN_INT64 - Addend)))) + { *Result = INT64_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } else { *Result = Augend + Addend; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } return Status; @@ -3751,11 +3754,12 @@ SafeChar8Sub ( Minuend32 = (INT32)Minuend; Subtrahend32 = (INT32)Subtrahend; - if (Minuend32 < 0 || Minuend32 > MAX_INT8) { + if ((Minuend32 < 0) || (Minuend32 > MAX_INT8)) { *Result = CHAR8_ERROR; return RETURN_BUFFER_TOO_SMALL; } - if (Subtrahend32 < 0 || Subtrahend32 > MAX_INT8) { + + if ((Subtrahend32 < 0) || (Subtrahend32 > MAX_INT8)) { *Result = CHAR8_ERROR; return RETURN_BUFFER_TOO_SMALL; } @@ -3901,12 +3905,13 @@ SafeInt64Sub ( // -1 = (MAX_INT64 + MIN_INT64) <= (MAX_INT64 + Subtrahend) < MAX_INT64 // if (((Subtrahend > 0) && (Minuend < (MIN_INT64 + Subtrahend))) || - ((Subtrahend < 0) && (Minuend > (MAX_INT64 + Subtrahend)))) { + ((Subtrahend < 0) && (Minuend > (MAX_INT64 + Subtrahend)))) + { *Result = INT64_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } else { *Result = Minuend - Subtrahend; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } return Status; @@ -3986,11 +3991,12 @@ SafeChar8Mult ( Multiplicand32 = (INT32)Multiplicand; Multiplier32 = (INT32)Multiplier; - if (Multiplicand32 < 0 || Multiplicand32 > MAX_INT8) { + if ((Multiplicand32 < 0) || (Multiplicand32 > MAX_INT8)) { *Result = CHAR8_ERROR; return RETURN_BUFFER_TOO_SMALL; } - if (Multiplier32 < 0 || Multiplier32 > MAX_INT8) { + + if ((Multiplier32 < 0) || (Multiplier32 > MAX_INT8)) { *Result = CHAR8_ERROR; return RETURN_BUFFER_TOO_SMALL; } @@ -4107,7 +4113,7 @@ SafeInt64Mult ( // // Avoid negating the most negative number. // - UnsignedMultiplicand = ((UINT64)(- (Multiplicand + 1))) + 1; + UnsignedMultiplicand = ((UINT64)(-(Multiplicand + 1))) + 1; } else { UnsignedMultiplicand = (UINT64)Multiplicand; } @@ -4116,7 +4122,7 @@ SafeInt64Mult ( // // Avoid negating the most negative number. // - UnsignedMultiplier = ((UINT64)(- (Multiplier + 1))) + 1; + UnsignedMultiplier = ((UINT64)(-(Multiplier + 1))) + 1; } else { UnsignedMultiplier = (UINT64)Multiplier; } @@ -4126,16 +4132,16 @@ SafeInt64Mult ( if ((Multiplicand < 0) != (Multiplier < 0)) { if (UnsignedResult > MIN_INT64_MAGNITUDE) { *Result = INT64_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } else if (UnsignedResult == MIN_INT64_MAGNITUDE) { *Result = MIN_INT64; } else { - *Result = - ((INT64)UnsignedResult); + *Result = -((INT64)UnsignedResult); } } else { if (UnsignedResult > MAX_INT64) { *Result = INT64_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } else { *Result = (INT64)UnsignedResult; } @@ -4143,6 +4149,6 @@ SafeInt64Mult ( } else { *Result = INT64_ERROR; } + return Status; } - diff --git a/MdePkg/Library/BaseSafeIntLib/SafeIntLib32.c b/MdePkg/Library/BaseSafeIntLib/SafeIntLib32.c index 39bf1c3..a3900fb 100644 --- a/MdePkg/Library/BaseSafeIntLib/SafeIntLib32.c +++ b/MdePkg/Library/BaseSafeIntLib/SafeIntLib32.c @@ -143,10 +143,10 @@ SafeIntnToUint32 ( if (Operand >= 0) { *Result = (UINT32)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT32_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -309,7 +309,7 @@ SafeUint64ToUintn ( OUT UINTN *Result ) { - return SafeUint64ToUint32 ((UINT64) Operand, (UINT32 *)Result); + return SafeUint64ToUint32 ((UINT64)Operand, (UINT32 *)Result); } /** @@ -349,10 +349,10 @@ SafeUintnAdd ( if ((Augend + Addend) >= Augend) { *Result = (Augend + Addend); - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINTN_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -395,10 +395,10 @@ SafeUintnSub ( if (Minuend >= Subtrahend) { *Result = (Minuend - Subtrahend); - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINTN_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; @@ -435,7 +435,7 @@ SafeUintnMult ( { UINT64 IntermediateResult; - IntermediateResult = ((UINT64) Multiplicand) *((UINT64) Multiplier); + IntermediateResult = ((UINT64)Multiplicand) *((UINT64)Multiplier); return SafeUint64ToUintn (IntermediateResult, Result); } @@ -535,4 +535,3 @@ SafeIntnMult ( { return SafeInt64ToIntn (MultS64x64 (Multiplicand, Multiplier), Result); } - diff --git a/MdePkg/Library/BaseSafeIntLib/SafeIntLib64.c b/MdePkg/Library/BaseSafeIntLib/SafeIntLib64.c index 44e0a62..bf216c2 100644 --- a/MdePkg/Library/BaseSafeIntLib/SafeIntLib64.c +++ b/MdePkg/Library/BaseSafeIntLib/SafeIntLib64.c @@ -39,7 +39,7 @@ SafeInt32ToUintn ( OUT UINTN *Result ) { - return SafeInt32ToUint64 (Operand, (UINT64 *) Result); + return SafeInt32ToUint64 (Operand, (UINT64 *)Result); } /** @@ -104,7 +104,7 @@ SafeIntnToInt32 ( OUT INT32 *Result ) { - return SafeInt64ToInt32 ((INT64) Operand, Result); + return SafeInt64ToInt32 ((INT64)Operand, Result); } /** @@ -488,4 +488,3 @@ SafeIntnMult ( { return SafeInt64Mult ((INT64)Multiplicand, (INT64)Multiplier, (INT64 *)Result); } - diff --git a/MdePkg/Library/BaseSafeIntLib/SafeIntLibEbc.c b/MdePkg/Library/BaseSafeIntLib/SafeIntLibEbc.c index de28bec..93071cd 100644 --- a/MdePkg/Library/BaseSafeIntLib/SafeIntLibEbc.c +++ b/MdePkg/Library/BaseSafeIntLib/SafeIntLibEbc.c @@ -42,7 +42,8 @@ SafeInt32ToUintn ( if (sizeof (UINTN) == sizeof (UINT32)) { return SafeInt32ToUint32 (Operand, (UINT32 *)Result); } - return SafeInt32ToUint64 (Operand, (UINT64 *) Result); + + return SafeInt32ToUint64 (Operand, (UINT64 *)Result); } /** @@ -79,6 +80,7 @@ SafeUint32ToIntn ( if (sizeof (UINTN) == sizeof (UINT32)) { return SafeUint32ToInt32 (Operand, (INT32 *)Result); } + *Result = Operand; return RETURN_SUCCESS; } @@ -118,7 +120,8 @@ SafeIntnToInt32 ( *Result = (INT32)Operand; return RETURN_SUCCESS; } - return SafeInt64ToInt32 ((INT64) Operand, Result); + + return SafeInt64ToInt32 ((INT64)Operand, Result); } /** @@ -157,14 +160,15 @@ SafeIntnToUint32 ( if (sizeof (UINTN) == sizeof (UINT32)) { if (Operand >= 0) { *Result = (UINT32)Operand; - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINT32_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; } + return SafeInt64ToUint32 ((INT64)Operand, Result); } @@ -203,6 +207,7 @@ SafeUintnToUint32 ( *Result = (UINT32)Operand; return RETURN_SUCCESS; } + return SafeUint64ToUint32 ((UINT64)Operand, Result); } @@ -241,6 +246,7 @@ SafeUintnToInt64 ( *Result = (INT64)Operand; return RETURN_SUCCESS; } + return SafeUint64ToInt64 ((UINT64)Operand, Result); } @@ -278,6 +284,7 @@ SafeInt64ToIntn ( if (sizeof (UINTN) == sizeof (UINT32)) { return SafeInt64ToInt32 (Operand, (INT32 *)Result); } + *Result = (INTN)Operand; return RETURN_SUCCESS; } @@ -312,6 +319,7 @@ SafeInt64ToUintn ( if (sizeof (UINTN) == sizeof (UINT32)) { return SafeInt64ToUint32 (Operand, (UINT32 *)Result); } + return SafeInt64ToUint64 (Operand, (UINT64 *)Result); } @@ -347,8 +355,9 @@ SafeUint64ToUintn ( } if (sizeof (UINTN) == sizeof (UINT32)) { - return SafeUint64ToUint32 ((UINT64) Operand, (UINT32 *)Result); + return SafeUint64ToUint32 ((UINT64)Operand, (UINT32 *)Result); } + *Result = Operand; return RETURN_SUCCESS; } @@ -391,14 +400,15 @@ SafeUintnAdd ( if (sizeof (UINTN) == sizeof (UINT32)) { if ((UINT32)(Augend + Addend) >= Augend) { *Result = (Augend + Addend); - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINTN_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; } + return SafeUint64Add ((UINT64)Augend, (UINT64)Addend, (UINT64 *)Result); } @@ -440,14 +450,15 @@ SafeUintnSub ( if (sizeof (UINTN) == sizeof (UINT32)) { if (Minuend >= Subtrahend) { *Result = (Minuend - Subtrahend); - Status = RETURN_SUCCESS; + Status = RETURN_SUCCESS; } else { *Result = UINTN_ERROR; - Status = RETURN_BUFFER_TOO_SMALL; + Status = RETURN_BUFFER_TOO_SMALL; } return Status; } + return SafeUint64Sub ((UINT64)Minuend, (UINT64)Subtrahend, (UINT64 *)Result); } @@ -483,10 +494,11 @@ SafeUintnMult ( UINT64 IntermediateResult; if (sizeof (UINTN) == sizeof (UINT32)) { - IntermediateResult = ((UINT64) Multiplicand) *((UINT64) Multiplier); + IntermediateResult = ((UINT64)Multiplicand) *((UINT64)Multiplier); return SafeUint64ToUintn (IntermediateResult, Result); } + return SafeUint64Mult ((UINT64)Multiplicand, (UINT64)Multiplier, (UINT64 *)Result); } @@ -522,6 +534,7 @@ SafeIntnAdd ( if (sizeof (UINTN) == sizeof (UINT32)) { return SafeInt64ToIntn (((INT64)Augend) + ((INT64)Addend), Result); } + return SafeInt64Add ((INT64)Augend, (INT64)Addend, (INT64 *)Result); } @@ -557,6 +570,7 @@ SafeIntnSub ( if (sizeof (UINTN) == sizeof (UINT32)) { return SafeInt64ToIntn (((INT64)Minuend) - ((INT64)Subtrahend), Result); } + return SafeInt64Sub ((INT64)Minuend, (INT64)Subtrahend, (INT64 *)Result); } @@ -592,6 +606,6 @@ SafeIntnMult ( if (sizeof (UINTN) == sizeof (UINT32)) { return SafeInt64ToIntn (((INT64)Multiplicand) *((INT64)Multiplier), Result); } + return SafeInt64Mult ((INT64)Multiplicand, (INT64)Multiplier, (INT64 *)Result); } - diff --git a/MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.c b/MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.c index 4f70827..f42e90c 100644 --- a/MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.c +++ b/MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.c @@ -6,7 +6,6 @@ **/ - #include #include @@ -50,14 +49,13 @@ SerialPortInitialize ( UINTN EFIAPI SerialPortWrite ( - IN UINT8 *Buffer, - IN UINTN NumberOfBytes -) + IN UINT8 *Buffer, + IN UINTN NumberOfBytes + ) { return 0; } - /** Read data from serial device and save the datas in buffer. @@ -77,9 +75,9 @@ SerialPortWrite ( UINTN EFIAPI SerialPortRead ( - OUT UINT8 *Buffer, - IN UINTN NumberOfBytes -) + OUT UINT8 *Buffer, + IN UINTN NumberOfBytes + ) { return 0; } @@ -117,7 +115,7 @@ SerialPortPoll ( RETURN_STATUS EFIAPI SerialPortSetControl ( - IN UINT32 Control + IN UINT32 Control ) { return RETURN_UNSUPPORTED; @@ -136,7 +134,7 @@ SerialPortSetControl ( RETURN_STATUS EFIAPI SerialPortGetControl ( - OUT UINT32 *Control + OUT UINT32 *Control ) { return RETURN_UNSUPPORTED; @@ -178,14 +176,13 @@ SerialPortGetControl ( RETURN_STATUS EFIAPI SerialPortSetAttributes ( - IN OUT UINT64 *BaudRate, - IN OUT UINT32 *ReceiveFifoDepth, - IN OUT UINT32 *Timeout, - IN OUT EFI_PARITY_TYPE *Parity, - IN OUT UINT8 *DataBits, - IN OUT EFI_STOP_BITS_TYPE *StopBits + IN OUT UINT64 *BaudRate, + IN OUT UINT32 *ReceiveFifoDepth, + IN OUT UINT32 *Timeout, + IN OUT EFI_PARITY_TYPE *Parity, + IN OUT UINT8 *DataBits, + IN OUT EFI_STOP_BITS_TYPE *StopBits ) { return RETURN_UNSUPPORTED; } - diff --git a/MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.c b/MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.c index 42da5c0..5393d96 100644 --- a/MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.c +++ b/MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.c @@ -37,8 +37,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent VOID EFIAPI SmBusQuickRead ( - IN UINTN SmBusAddress, - OUT RETURN_STATUS *Status OPTIONAL + IN UINTN SmBusAddress, + OUT RETURN_STATUS *Status OPTIONAL ) { ASSERT (!SMBUS_LIB_PEC (SmBusAddress)); @@ -77,8 +77,8 @@ SmBusQuickRead ( VOID EFIAPI SmBusQuickWrite ( - IN UINTN SmBusAddress, - OUT RETURN_STATUS *Status OPTIONAL + IN UINTN SmBusAddress, + OUT RETURN_STATUS *Status OPTIONAL ) { ASSERT (!SMBUS_LIB_PEC (SmBusAddress)); @@ -130,6 +130,7 @@ SmBusReceiveByte ( if (Status != NULL) { *Status = RETURN_UNSUPPORTED; } + return 0; } @@ -175,6 +176,7 @@ SmBusSendByte ( if (Status != NULL) { *Status = RETURN_UNSUPPORTED; } + return 0; } @@ -216,6 +218,7 @@ SmBusReadDataByte ( if (Status != NULL) { *Status = RETURN_UNSUPPORTED; } + return 0; } @@ -260,6 +263,7 @@ SmBusWriteDataByte ( if (Status != NULL) { *Status = RETURN_UNSUPPORTED; } + return 0; } @@ -301,6 +305,7 @@ SmBusReadDataWord ( if (Status != NULL) { *Status = RETURN_UNSUPPORTED; } + return 0; } @@ -345,6 +350,7 @@ SmBusWriteDataWord ( if (Status != NULL) { *Status = RETURN_UNSUPPORTED; } + return 0; } @@ -389,6 +395,7 @@ SmBusProcessCall ( if (Status != NULL) { *Status = RETURN_UNSUPPORTED; } + return 0; } @@ -437,6 +444,7 @@ SmBusReadBlock ( if (Status != NULL) { *Status = RETURN_UNSUPPORTED; } + return 0; } @@ -483,6 +491,7 @@ SmBusWriteBlock ( if (Status != NULL) { *Status = RETURN_UNSUPPORTED; } + return 0; } @@ -534,5 +543,6 @@ SmBusBlockProcessCall ( if (Status != NULL) { *Status = RETURN_UNSUPPORTED; } + return 0; } diff --git a/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c index d3efb8e..0d29186 100644 --- a/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c +++ b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckGcc.c @@ -17,10 +17,10 @@ #include /// "canary" value that is inserted by the compiler into the stack frame. -VOID *__stack_chk_guard = (VOID*)0x0AFF; +VOID *__stack_chk_guard = (VOID *)0x0AFF; // If ASLR was enabled we could use -//void (*__stack_chk_guard)(void) = __stack_chk_fail; +// void (*__stack_chk_guard)(void) = __stack_chk_fail; /** Error path for compiler generated stack "canary" value check code. If the @@ -29,12 +29,12 @@ VOID *__stack_chk_guard = (VOID*)0x0AFF; **/ VOID __stack_chk_fail ( - VOID - ) + VOID + ) { - UINT8 DebugPropertyMask; + UINT8 DebugPropertyMask; - DEBUG ((DEBUG_ERROR, "STACK FAULT: Buffer Overflow in function %a.\n", __builtin_return_address(0))); + DEBUG ((DEBUG_ERROR, "STACK FAULT: Buffer Overflow in function %a.\n", __builtin_return_address (0))); // // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings even if @@ -44,6 +44,6 @@ __stack_chk_fail ( if ((DebugPropertyMask & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) { CpuBreakpoint (); } else if ((DebugPropertyMask & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) { - CpuDeadLoop (); + CpuDeadLoop (); } } diff --git a/MdePkg/Library/BaseStackCheckLib/BaseStackCheckNull.c b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckNull.c index 7032b78..3293200 100644 --- a/MdePkg/Library/BaseStackCheckLib/BaseStackCheckNull.c +++ b/MdePkg/Library/BaseStackCheckLib/BaseStackCheckNull.c @@ -6,4 +6,4 @@ **/ -extern int __BaseStackCheckNull; +extern int __BaseStackCheckNull; diff --git a/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLibInternals.h b/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLibInternals.h index 4e2bcbc..9a67079 100644 --- a/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLibInternals.h +++ b/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLibInternals.h @@ -31,10 +31,9 @@ UINT32 EFIAPI InternalSyncIncrement ( - IN volatile UINT32 *Value + IN volatile UINT32 *Value ); - /** Performs an atomic decrement of an 32-bit unsigned integer. @@ -50,10 +49,9 @@ InternalSyncIncrement ( UINT32 EFIAPI InternalSyncDecrement ( - IN volatile UINT32 *Value + IN volatile UINT32 *Value ); - /** Performs an atomic compare exchange operation on a 16-bit unsigned integer. @@ -74,12 +72,11 @@ InternalSyncDecrement ( UINT16 EFIAPI InternalSyncCompareExchange16 ( - IN volatile UINT16 *Value, - IN UINT16 CompareValue, - IN UINT16 ExchangeValue + IN volatile UINT16 *Value, + IN UINT16 CompareValue, + IN UINT16 ExchangeValue ); - /** Performs an atomic compare exchange operation on a 32-bit unsigned integer. @@ -100,12 +97,11 @@ InternalSyncCompareExchange16 ( UINT32 EFIAPI InternalSyncCompareExchange32 ( - IN volatile UINT32 *Value, - IN UINT32 CompareValue, - IN UINT32 ExchangeValue + IN volatile UINT32 *Value, + IN UINT32 CompareValue, + IN UINT32 ExchangeValue ); - /** Performs an atomic compare exchange operation on a 64-bit unsigned integer. @@ -125,9 +121,9 @@ InternalSyncCompareExchange32 ( UINT64 EFIAPI InternalSyncCompareExchange64 ( - IN volatile UINT64 *Value, - IN UINT64 CompareValue, - IN UINT64 ExchangeValue + IN volatile UINT64 *Value, + IN UINT64 CompareValue, + IN UINT64 ExchangeValue ); /** diff --git a/MdePkg/Library/BaseSynchronizationLib/Ebc/Synchronization.c b/MdePkg/Library/BaseSynchronizationLib/Ebc/Synchronization.c index a45f509..11898d7 100644 --- a/MdePkg/Library/BaseSynchronizationLib/Ebc/Synchronization.c +++ b/MdePkg/Library/BaseSynchronizationLib/Ebc/Synchronization.c @@ -28,13 +28,13 @@ UINT16 EFIAPI InternalSyncCompareExchange16 ( - IN volatile UINT16 *Value, - IN UINT16 CompareValue, - IN UINT16 ExchangeValue + IN volatile UINT16 *Value, + IN UINT16 CompareValue, + IN UINT16 ExchangeValue ) { return *Value != CompareValue ? *Value : - ((*Value = ExchangeValue), CompareValue); + ((*Value = ExchangeValue), CompareValue); } /** @@ -59,13 +59,13 @@ InternalSyncCompareExchange16 ( UINT32 EFIAPI InternalSyncCompareExchange32 ( - IN volatile UINT32 *Value, - IN UINT32 CompareValue, - IN UINT32 ExchangeValue + IN volatile UINT32 *Value, + IN UINT32 CompareValue, + IN UINT32 ExchangeValue ) { return *Value != CompareValue ? *Value : - ((*Value = ExchangeValue), CompareValue); + ((*Value = ExchangeValue), CompareValue); } /** @@ -87,13 +87,13 @@ InternalSyncCompareExchange32 ( UINT64 EFIAPI InternalSyncCompareExchange64 ( - IN volatile UINT64 *Value, - IN UINT64 CompareValue, - IN UINT64 ExchangeValue + IN volatile UINT64 *Value, + IN UINT64 CompareValue, + IN UINT64 ExchangeValue ) { return *Value != CompareValue ? *Value : - ((*Value = ExchangeValue), CompareValue); + ((*Value = ExchangeValue), CompareValue); } /** @@ -112,7 +112,7 @@ InternalSyncCompareExchange64 ( UINT32 EFIAPI InternalSyncIncrement ( - IN volatile UINT32 *Value + IN volatile UINT32 *Value ) { return ++*Value; @@ -134,7 +134,7 @@ InternalSyncIncrement ( UINT32 EFIAPI InternalSyncDecrement ( - IN volatile UINT32 *Value + IN volatile UINT32 *Value ) { return --*Value; diff --git a/MdePkg/Library/BaseSynchronizationLib/Ia32/GccInline.c b/MdePkg/Library/BaseSynchronizationLib/Ia32/GccInline.c index 1d15287..c400dd5 100644 --- a/MdePkg/Library/BaseSynchronizationLib/Ia32/GccInline.c +++ b/MdePkg/Library/BaseSynchronizationLib/Ia32/GccInline.c @@ -7,8 +7,6 @@ **/ - - /** Performs an atomic increment of an 32-bit unsigned integer. @@ -24,7 +22,7 @@ UINT32 EFIAPI InternalSyncIncrement ( - IN volatile UINT32 *Value + IN volatile UINT32 *Value ) { UINT32 Result; @@ -39,12 +37,11 @@ InternalSyncIncrement ( : // no inputs that aren't also outputs : "memory", "cc" - ); + ); return Result; } - /** Performs an atomic decrement of an 32-bit unsigned integer. @@ -60,10 +57,10 @@ InternalSyncIncrement ( UINT32 EFIAPI InternalSyncDecrement ( - IN volatile UINT32 *Value + IN volatile UINT32 *Value ) { - UINT32 Result; + UINT32 Result; __asm__ __volatile__ ( "movl $-1, %%eax \n\t" @@ -75,12 +72,11 @@ InternalSyncDecrement ( : // no inputs that aren't also outputs : "memory", "cc" - ); + ); return Result; } - /** Performs an atomic compare exchange operation on a 16-bit unsigned integer. @@ -102,9 +98,9 @@ InternalSyncDecrement ( UINT16 EFIAPI InternalSyncCompareExchange16 ( - IN OUT volatile UINT16 *Value, - IN UINT16 CompareValue, - IN UINT16 ExchangeValue + IN OUT volatile UINT16 *Value, + IN UINT16 CompareValue, + IN UINT16 ExchangeValue ) { __asm__ __volatile__ ( @@ -115,12 +111,11 @@ InternalSyncCompareExchange16 ( : "q" (ExchangeValue) // %2 : "memory", "cc" - ); + ); return CompareValue; } - /** Performs an atomic compare exchange operation on a 32-bit unsigned integer. @@ -142,9 +137,9 @@ InternalSyncCompareExchange16 ( UINT32 EFIAPI InternalSyncCompareExchange32 ( - IN OUT volatile UINT32 *Value, - IN UINT32 CompareValue, - IN UINT32 ExchangeValue + IN OUT volatile UINT32 *Value, + IN UINT32 CompareValue, + IN UINT32 ExchangeValue ) { __asm__ __volatile__ ( @@ -155,12 +150,11 @@ InternalSyncCompareExchange32 ( : "q" (ExchangeValue) // %2 : "memory", "cc" - ); + ); return CompareValue; } - /** Performs an atomic compare exchange operation on a 64-bit unsigned integer. @@ -181,9 +175,9 @@ InternalSyncCompareExchange32 ( UINT64 EFIAPI InternalSyncCompareExchange64 ( - IN OUT volatile UINT64 *Value, - IN UINT64 CompareValue, - IN UINT64 ExchangeValue + IN OUT volatile UINT64 *Value, + IN UINT64 CompareValue, + IN UINT64 ExchangeValue ) { __asm__ __volatile__ ( @@ -195,7 +189,7 @@ InternalSyncCompareExchange64 ( "c" ((UINT32) (ExchangeValue >> 32)) // %3 : "memory", "cc" - ); + ); return CompareValue; } diff --git a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange16.c b/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange16.c index fef9d3b..4fbbb9f 100644 --- a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange16.c +++ b/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange16.c @@ -7,9 +7,6 @@ **/ - - - /** Performs an atomic compare exchange operation on a 16-bit unsigned integer. @@ -30,9 +27,9 @@ UINT16 EFIAPI InternalSyncCompareExchange16 ( - IN volatile UINT16 *Value, - IN UINT16 CompareValue, - IN UINT16 ExchangeValue + IN volatile UINT16 *Value, + IN UINT16 CompareValue, + IN UINT16 ExchangeValue ) { _asm { @@ -42,4 +39,3 @@ InternalSyncCompareExchange16 ( lock cmpxchg [ecx], dx } } - diff --git a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange32.c b/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange32.c index 1aa1c8e..cbd4992 100644 --- a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange32.c +++ b/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange32.c @@ -6,9 +6,6 @@ **/ - - - /** Performs an atomic compare exchange operation on a 32-bit unsigned integer. @@ -29,9 +26,9 @@ UINT32 EFIAPI InternalSyncCompareExchange32 ( - IN volatile UINT32 *Value, - IN UINT32 CompareValue, - IN UINT32 ExchangeValue + IN volatile UINT32 *Value, + IN UINT32 CompareValue, + IN UINT32 ExchangeValue ) { _asm { @@ -41,4 +38,3 @@ InternalSyncCompareExchange32 ( lock cmpxchg [ecx], edx } } - diff --git a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange64.c b/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange64.c index 33cb2a0..310e3bd 100644 --- a/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange64.c +++ b/MdePkg/Library/BaseSynchronizationLib/Ia32/InterlockedCompareExchange64.c @@ -6,9 +6,6 @@ **/ - - - /** Performs an atomic compare exchange operation on a 64-bit unsigned integer. @@ -28,9 +25,9 @@ UINT64 EFIAPI InternalSyncCompareExchange64 ( - IN volatile UINT64 *Value, - IN UINT64 CompareValue, - IN UINT64 ExchangeValue + IN volatile UINT64 *Value, + IN UINT64 CompareValue, + IN UINT64 ExchangeValue ) { _asm { diff --git a/MdePkg/Library/BaseSynchronizationLib/Ia32/InternalGetSpinLockProperties.c b/MdePkg/Library/BaseSynchronizationLib/Ia32/InternalGetSpinLockProperties.c index 3e270a1..aba0825 100644 --- a/MdePkg/Library/BaseSynchronizationLib/Ia32/InternalGetSpinLockProperties.c +++ b/MdePkg/Library/BaseSynchronizationLib/Ia32/InternalGetSpinLockProperties.c @@ -44,7 +44,7 @@ InternalGetSpinLockProperties ( // In processors based on Intel NetBurst microarchitecture, use two cache lines // ModelId = ModelId | ((RegEax >> 12) & 0xf0); - if (ModelId <= 0x04 || ModelId == 0x06) { + if ((ModelId <= 0x04) || (ModelId == 0x06)) { CacheLineSize *= 2; } } @@ -55,4 +55,3 @@ InternalGetSpinLockProperties ( return CacheLineSize; } - diff --git a/MdePkg/Library/BaseSynchronizationLib/InterlockedDecrementMsc.c b/MdePkg/Library/BaseSynchronizationLib/InterlockedDecrementMsc.c index 7317bc2..69db307 100644 --- a/MdePkg/Library/BaseSynchronizationLib/InterlockedDecrementMsc.c +++ b/MdePkg/Library/BaseSynchronizationLib/InterlockedDecrementMsc.c @@ -10,9 +10,10 @@ Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics. **/ -long _InterlockedDecrement( - long * lpAddend -); +long +_InterlockedDecrement ( + long *lpAddend + ); #pragma intrinsic(_InterlockedDecrement) @@ -32,9 +33,8 @@ long _InterlockedDecrement( UINT32 EFIAPI InternalSyncDecrement ( - IN volatile UINT32 *Value + IN volatile UINT32 *Value ) { return _InterlockedDecrement ((long *)(Value)); } - diff --git a/MdePkg/Library/BaseSynchronizationLib/InterlockedIncrementMsc.c b/MdePkg/Library/BaseSynchronizationLib/InterlockedIncrementMsc.c index bb51ec5..f8b0eaa 100644 --- a/MdePkg/Library/BaseSynchronizationLib/InterlockedIncrementMsc.c +++ b/MdePkg/Library/BaseSynchronizationLib/InterlockedIncrementMsc.c @@ -10,9 +10,10 @@ Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics. **/ -long _InterlockedIncrement( - long * lpAddend -); +long +_InterlockedIncrement ( + long *lpAddend + ); #pragma intrinsic(_InterlockedIncrement) @@ -32,9 +33,8 @@ long _InterlockedIncrement( UINT32 EFIAPI InternalSyncIncrement ( - IN volatile UINT32 *Value + IN volatile UINT32 *Value ) { return _InterlockedIncrement ((long *)(Value)); } - diff --git a/MdePkg/Library/BaseSynchronizationLib/Synchronization.c b/MdePkg/Library/BaseSynchronizationLib/Synchronization.c index 3f7a0c7..54eb19d 100644 --- a/MdePkg/Library/BaseSynchronizationLib/Synchronization.c +++ b/MdePkg/Library/BaseSynchronizationLib/Synchronization.c @@ -8,8 +8,8 @@ #include "BaseSynchronizationLibInternals.h" -#define SPIN_LOCK_RELEASED ((UINTN) 1) -#define SPIN_LOCK_ACQUIRED ((UINTN) 2) +#define SPIN_LOCK_RELEASED ((UINTN) 1) +#define SPIN_LOCK_ACQUIRED ((UINTN) 2) /** Retrieves the architecture specific spin lock alignment requirements for @@ -55,7 +55,7 @@ GetSpinLockProperties ( SPIN_LOCK * EFIAPI InitializeSpinLock ( - OUT SPIN_LOCK *SpinLock + OUT SPIN_LOCK *SpinLock ) { ASSERT (SpinLock != NULL); @@ -86,7 +86,7 @@ InitializeSpinLock ( SPIN_LOCK * EFIAPI AcquireSpinLock ( - IN OUT SPIN_LOCK *SpinLock + IN OUT SPIN_LOCK *SpinLock ) { UINT64 Current; @@ -106,7 +106,7 @@ AcquireSpinLock ( // // Get the current timer value // - Current = GetPerformanceCounter(); + Current = GetPerformanceCounter (); // // Initialize local variables @@ -130,23 +130,27 @@ AcquireSpinLock ( if (Cycle < 0) { Cycle = -Cycle; } + Cycle++; while (!AcquireSpinLockOrFail (SpinLock)) { CpuPause (); Previous = Current; - Current = GetPerformanceCounter(); - Delta = (INT64) (Current - Previous); + Current = GetPerformanceCounter (); + Delta = (INT64)(Current - Previous); if (Start > End) { Delta = -Delta; } + if (Delta < 0) { Delta += Cycle; } + Total += Delta; ASSERT (Total < Timeout); } } + return SpinLock; } @@ -170,10 +174,10 @@ AcquireSpinLock ( BOOLEAN EFIAPI AcquireSpinLockOrFail ( - IN OUT SPIN_LOCK *SpinLock + IN OUT SPIN_LOCK *SpinLock ) { - SPIN_LOCK LockValue; + SPIN_LOCK LockValue; ASSERT (SpinLock != NULL); @@ -181,12 +185,12 @@ AcquireSpinLockOrFail ( ASSERT (SPIN_LOCK_ACQUIRED == LockValue || SPIN_LOCK_RELEASED == LockValue); return (BOOLEAN)( - InterlockedCompareExchangePointer ( - (VOID**)SpinLock, - (VOID*)SPIN_LOCK_RELEASED, - (VOID*)SPIN_LOCK_ACQUIRED - ) == (VOID*)SPIN_LOCK_RELEASED - ); + InterlockedCompareExchangePointer ( + (VOID **)SpinLock, + (VOID *)SPIN_LOCK_RELEASED, + (VOID *)SPIN_LOCK_ACQUIRED + ) == (VOID *)SPIN_LOCK_RELEASED + ); } /** @@ -206,10 +210,10 @@ AcquireSpinLockOrFail ( SPIN_LOCK * EFIAPI ReleaseSpinLock ( - IN OUT SPIN_LOCK *SpinLock + IN OUT SPIN_LOCK *SpinLock ) { - SPIN_LOCK LockValue; + SPIN_LOCK LockValue; ASSERT (SpinLock != NULL); @@ -237,7 +241,7 @@ ReleaseSpinLock ( UINT32 EFIAPI InterlockedIncrement ( - IN volatile UINT32 *Value + IN volatile UINT32 *Value ) { ASSERT (Value != NULL); @@ -261,7 +265,7 @@ InterlockedIncrement ( UINT32 EFIAPI InterlockedDecrement ( - IN volatile UINT32 *Value + IN volatile UINT32 *Value ) { ASSERT (Value != NULL); @@ -290,9 +294,9 @@ InterlockedDecrement ( UINT16 EFIAPI InterlockedCompareExchange16 ( - IN OUT volatile UINT16 *Value, - IN UINT16 CompareValue, - IN UINT16 ExchangeValue + IN OUT volatile UINT16 *Value, + IN UINT16 CompareValue, + IN UINT16 ExchangeValue ) { ASSERT (Value != NULL); @@ -321,9 +325,9 @@ InterlockedCompareExchange16 ( UINT32 EFIAPI InterlockedCompareExchange32 ( - IN OUT volatile UINT32 *Value, - IN UINT32 CompareValue, - IN UINT32 ExchangeValue + IN OUT volatile UINT32 *Value, + IN UINT32 CompareValue, + IN UINT32 ExchangeValue ) { ASSERT (Value != NULL); @@ -351,9 +355,9 @@ InterlockedCompareExchange32 ( UINT64 EFIAPI InterlockedCompareExchange64 ( - IN OUT volatile UINT64 *Value, - IN UINT64 CompareValue, - IN UINT64 ExchangeValue + IN OUT volatile UINT64 *Value, + IN UINT64 CompareValue, + IN UINT64 ExchangeValue ) { ASSERT (Value != NULL); @@ -381,9 +385,9 @@ InterlockedCompareExchange64 ( VOID * EFIAPI InterlockedCompareExchangePointer ( - IN OUT VOID * volatile *Value, - IN VOID *CompareValue, - IN VOID *ExchangeValue + IN OUT VOID *volatile *Value, + IN VOID *CompareValue, + IN VOID *ExchangeValue ) { UINT8 SizeOfValue; @@ -392,17 +396,17 @@ InterlockedCompareExchangePointer ( switch (SizeOfValue) { case sizeof (UINT32): - return (VOID*)(UINTN)InterlockedCompareExchange32 ( - (volatile UINT32 *)Value, - (UINT32)(UINTN)CompareValue, - (UINT32)(UINTN)ExchangeValue - ); + return (VOID *)(UINTN)InterlockedCompareExchange32 ( + (volatile UINT32 *)Value, + (UINT32)(UINTN)CompareValue, + (UINT32)(UINTN)ExchangeValue + ); case sizeof (UINT64): - return (VOID*)(UINTN)InterlockedCompareExchange64 ( - (volatile UINT64 *)Value, - (UINT64)(UINTN)CompareValue, - (UINT64)(UINTN)ExchangeValue - ); + return (VOID *)(UINTN)InterlockedCompareExchange64 ( + (volatile UINT64 *)Value, + (UINT64)(UINTN)CompareValue, + (UINT64)(UINTN)ExchangeValue + ); default: ASSERT (FALSE); return NULL; diff --git a/MdePkg/Library/BaseSynchronizationLib/SynchronizationGcc.c b/MdePkg/Library/BaseSynchronizationLib/SynchronizationGcc.c index 466775e..9f47983 100644 --- a/MdePkg/Library/BaseSynchronizationLib/SynchronizationGcc.c +++ b/MdePkg/Library/BaseSynchronizationLib/SynchronizationGcc.c @@ -12,10 +12,10 @@ // // GCC inline assembly for Read Write Barrier // -#define _ReadWriteBarrier() do { __asm__ __volatile__ ("": : : "memory"); } while(0) +#define _ReadWriteBarrier() do { __asm__ __volatile__ ("": : : "memory"); } while(0) -#define SPIN_LOCK_RELEASED ((UINTN) 1) -#define SPIN_LOCK_ACQUIRED ((UINTN) 2) +#define SPIN_LOCK_RELEASED ((UINTN) 1) +#define SPIN_LOCK_ACQUIRED ((UINTN) 2) /** Retrieves the architecture specific spin lock alignment requirements for @@ -61,14 +61,14 @@ GetSpinLockProperties ( SPIN_LOCK * EFIAPI InitializeSpinLock ( - OUT SPIN_LOCK *SpinLock + OUT SPIN_LOCK *SpinLock ) { ASSERT (SpinLock != NULL); - _ReadWriteBarrier(); + _ReadWriteBarrier (); *SpinLock = SPIN_LOCK_RELEASED; - _ReadWriteBarrier(); + _ReadWriteBarrier (); return SpinLock; } @@ -96,7 +96,7 @@ InitializeSpinLock ( SPIN_LOCK * EFIAPI AcquireSpinLock ( - IN OUT SPIN_LOCK *SpinLock + IN OUT SPIN_LOCK *SpinLock ) { UINT64 Current; @@ -116,7 +116,7 @@ AcquireSpinLock ( // // Get the current timer value // - Current = GetPerformanceCounter(); + Current = GetPerformanceCounter (); // // Initialize local variables @@ -140,23 +140,27 @@ AcquireSpinLock ( if (Cycle < 0) { Cycle = -Cycle; } + Cycle++; while (!AcquireSpinLockOrFail (SpinLock)) { CpuPause (); Previous = Current; - Current = GetPerformanceCounter(); - Delta = (INT64) (Current - Previous); + Current = GetPerformanceCounter (); + Delta = (INT64)(Current - Previous); if (Start > End) { Delta = -Delta; } + if (Delta < 0) { Delta += Cycle; } + Total += Delta; ASSERT (Total < Timeout); } } + return SpinLock; } @@ -180,11 +184,11 @@ AcquireSpinLock ( BOOLEAN EFIAPI AcquireSpinLockOrFail ( - IN OUT SPIN_LOCK *SpinLock + IN OUT SPIN_LOCK *SpinLock ) { - SPIN_LOCK LockValue; - VOID *Result; + SPIN_LOCK LockValue; + VOID *Result; ASSERT (SpinLock != NULL); @@ -193,13 +197,13 @@ AcquireSpinLockOrFail ( _ReadWriteBarrier (); Result = InterlockedCompareExchangePointer ( - (VOID**)SpinLock, - (VOID*)SPIN_LOCK_RELEASED, - (VOID*)SPIN_LOCK_ACQUIRED - ); + (VOID **)SpinLock, + (VOID *)SPIN_LOCK_RELEASED, + (VOID *)SPIN_LOCK_ACQUIRED + ); _ReadWriteBarrier (); - return (BOOLEAN) (Result == (VOID*) SPIN_LOCK_RELEASED); + return (BOOLEAN)(Result == (VOID *)SPIN_LOCK_RELEASED); } /** @@ -219,10 +223,10 @@ AcquireSpinLockOrFail ( SPIN_LOCK * EFIAPI ReleaseSpinLock ( - IN OUT SPIN_LOCK *SpinLock + IN OUT SPIN_LOCK *SpinLock ) { - SPIN_LOCK LockValue; + SPIN_LOCK LockValue; ASSERT (SpinLock != NULL); @@ -253,7 +257,7 @@ ReleaseSpinLock ( UINT32 EFIAPI InterlockedIncrement ( - IN volatile UINT32 *Value + IN volatile UINT32 *Value ) { ASSERT (Value != NULL); @@ -277,7 +281,7 @@ InterlockedIncrement ( UINT32 EFIAPI InterlockedDecrement ( - IN volatile UINT32 *Value + IN volatile UINT32 *Value ) { ASSERT (Value != NULL); @@ -306,9 +310,9 @@ InterlockedDecrement ( UINT16 EFIAPI InterlockedCompareExchange16 ( - IN OUT volatile UINT16 *Value, - IN UINT16 CompareValue, - IN UINT16 ExchangeValue + IN OUT volatile UINT16 *Value, + IN UINT16 CompareValue, + IN UINT16 ExchangeValue ) { ASSERT (Value != NULL); @@ -337,9 +341,9 @@ InterlockedCompareExchange16 ( UINT32 EFIAPI InterlockedCompareExchange32 ( - IN OUT volatile UINT32 *Value, - IN UINT32 CompareValue, - IN UINT32 ExchangeValue + IN OUT volatile UINT32 *Value, + IN UINT32 CompareValue, + IN UINT32 ExchangeValue ) { ASSERT (Value != NULL); @@ -367,9 +371,9 @@ InterlockedCompareExchange32 ( UINT64 EFIAPI InterlockedCompareExchange64 ( - IN OUT volatile UINT64 *Value, - IN UINT64 CompareValue, - IN UINT64 ExchangeValue + IN OUT volatile UINT64 *Value, + IN UINT64 CompareValue, + IN UINT64 ExchangeValue ) { ASSERT (Value != NULL); @@ -397,9 +401,9 @@ InterlockedCompareExchange64 ( VOID * EFIAPI InterlockedCompareExchangePointer ( - IN OUT VOID * volatile *Value, - IN VOID *CompareValue, - IN VOID *ExchangeValue + IN OUT VOID *volatile *Value, + IN VOID *CompareValue, + IN VOID *ExchangeValue ) { UINT8 SizeOfValue; @@ -408,17 +412,17 @@ InterlockedCompareExchangePointer ( switch (SizeOfValue) { case sizeof (UINT32): - return (VOID*)(UINTN)InterlockedCompareExchange32 ( - (volatile UINT32 *)Value, - (UINT32)(UINTN)CompareValue, - (UINT32)(UINTN)ExchangeValue - ); + return (VOID *)(UINTN)InterlockedCompareExchange32 ( + (volatile UINT32 *)Value, + (UINT32)(UINTN)CompareValue, + (UINT32)(UINTN)ExchangeValue + ); case sizeof (UINT64): - return (VOID*)(UINTN)InterlockedCompareExchange64 ( - (volatile UINT64 *)Value, - (UINT64)(UINTN)CompareValue, - (UINT64)(UINTN)ExchangeValue - ); + return (VOID *)(UINTN)InterlockedCompareExchange64 ( + (volatile UINT64 *)Value, + (UINT64)(UINTN)CompareValue, + (UINT64)(UINTN)ExchangeValue + ); default: ASSERT (FALSE); return NULL; diff --git a/MdePkg/Library/BaseSynchronizationLib/SynchronizationMsc.c b/MdePkg/Library/BaseSynchronizationLib/SynchronizationMsc.c index 12b01ff..f99895a 100644 --- a/MdePkg/Library/BaseSynchronizationLib/SynchronizationMsc.c +++ b/MdePkg/Library/BaseSynchronizationLib/SynchronizationMsc.c @@ -12,12 +12,15 @@ Microsoft Visual Studio 7.1 Function Prototypes for read write barrier Intrinsics. **/ -void _ReadWriteBarrier (void); -#pragma intrinsic(_ReadWriteBarrier) +void +_ReadWriteBarrier ( + void + ); +#pragma intrinsic(_ReadWriteBarrier) -#define SPIN_LOCK_RELEASED ((UINTN) 1) -#define SPIN_LOCK_ACQUIRED ((UINTN) 2) +#define SPIN_LOCK_RELEASED ((UINTN) 1) +#define SPIN_LOCK_ACQUIRED ((UINTN) 2) /** Retrieves the architecture specific spin lock alignment requirements for @@ -63,14 +66,14 @@ GetSpinLockProperties ( SPIN_LOCK * EFIAPI InitializeSpinLock ( - OUT SPIN_LOCK *SpinLock + OUT SPIN_LOCK *SpinLock ) { ASSERT (SpinLock != NULL); - _ReadWriteBarrier(); + _ReadWriteBarrier (); *SpinLock = SPIN_LOCK_RELEASED; - _ReadWriteBarrier(); + _ReadWriteBarrier (); return SpinLock; } @@ -98,7 +101,7 @@ InitializeSpinLock ( SPIN_LOCK * EFIAPI AcquireSpinLock ( - IN OUT SPIN_LOCK *SpinLock + IN OUT SPIN_LOCK *SpinLock ) { UINT64 Current; @@ -118,7 +121,7 @@ AcquireSpinLock ( // // Get the current timer value // - Current = GetPerformanceCounter(); + Current = GetPerformanceCounter (); // // Initialize local variables @@ -142,23 +145,27 @@ AcquireSpinLock ( if (Cycle < 0) { Cycle = -Cycle; } + Cycle++; while (!AcquireSpinLockOrFail (SpinLock)) { CpuPause (); Previous = Current; - Current = GetPerformanceCounter(); - Delta = (INT64) (Current - Previous); + Current = GetPerformanceCounter (); + Delta = (INT64)(Current - Previous); if (Start > End) { Delta = -Delta; } + if (Delta < 0) { Delta += Cycle; } + Total += Delta; ASSERT (Total < Timeout); } } + return SpinLock; } @@ -182,11 +189,11 @@ AcquireSpinLock ( BOOLEAN EFIAPI AcquireSpinLockOrFail ( - IN OUT SPIN_LOCK *SpinLock + IN OUT SPIN_LOCK *SpinLock ) { - SPIN_LOCK LockValue; - VOID *Result; + SPIN_LOCK LockValue; + VOID *Result; ASSERT (SpinLock != NULL); @@ -195,13 +202,13 @@ AcquireSpinLockOrFail ( _ReadWriteBarrier (); Result = InterlockedCompareExchangePointer ( - (VOID**)SpinLock, - (VOID*)SPIN_LOCK_RELEASED, - (VOID*)SPIN_LOCK_ACQUIRED - ); + (VOID **)SpinLock, + (VOID *)SPIN_LOCK_RELEASED, + (VOID *)SPIN_LOCK_ACQUIRED + ); _ReadWriteBarrier (); - return (BOOLEAN) (Result == (VOID*) SPIN_LOCK_RELEASED); + return (BOOLEAN)(Result == (VOID *)SPIN_LOCK_RELEASED); } /** @@ -221,10 +228,10 @@ AcquireSpinLockOrFail ( SPIN_LOCK * EFIAPI ReleaseSpinLock ( - IN OUT SPIN_LOCK *SpinLock + IN OUT SPIN_LOCK *SpinLock ) { - SPIN_LOCK LockValue; + SPIN_LOCK LockValue; ASSERT (SpinLock != NULL); @@ -255,7 +262,7 @@ ReleaseSpinLock ( UINT32 EFIAPI InterlockedIncrement ( - IN volatile UINT32 *Value + IN volatile UINT32 *Value ) { ASSERT (Value != NULL); @@ -279,7 +286,7 @@ InterlockedIncrement ( UINT32 EFIAPI InterlockedDecrement ( - IN volatile UINT32 *Value + IN volatile UINT32 *Value ) { ASSERT (Value != NULL); @@ -308,9 +315,9 @@ InterlockedDecrement ( UINT16 EFIAPI InterlockedCompareExchange16 ( - IN OUT volatile UINT16 *Value, - IN UINT16 CompareValue, - IN UINT16 ExchangeValue + IN OUT volatile UINT16 *Value, + IN UINT16 CompareValue, + IN UINT16 ExchangeValue ) { ASSERT (Value != NULL); @@ -339,9 +346,9 @@ InterlockedCompareExchange16 ( UINT32 EFIAPI InterlockedCompareExchange32 ( - IN OUT volatile UINT32 *Value, - IN UINT32 CompareValue, - IN UINT32 ExchangeValue + IN OUT volatile UINT32 *Value, + IN UINT32 CompareValue, + IN UINT32 ExchangeValue ) { ASSERT (Value != NULL); @@ -369,9 +376,9 @@ InterlockedCompareExchange32 ( UINT64 EFIAPI InterlockedCompareExchange64 ( - IN OUT volatile UINT64 *Value, - IN UINT64 CompareValue, - IN UINT64 ExchangeValue + IN OUT volatile UINT64 *Value, + IN UINT64 CompareValue, + IN UINT64 ExchangeValue ) { ASSERT (Value != NULL); @@ -399,28 +406,28 @@ InterlockedCompareExchange64 ( VOID * EFIAPI InterlockedCompareExchangePointer ( - IN OUT VOID * volatile *Value, - IN VOID *CompareValue, - IN VOID *ExchangeValue + IN OUT VOID *volatile *Value, + IN VOID *CompareValue, + IN VOID *ExchangeValue ) { UINT8 SizeOfValue; - SizeOfValue = (UINT8) sizeof (*Value); + SizeOfValue = (UINT8)sizeof (*Value); switch (SizeOfValue) { case sizeof (UINT32): - return (VOID*)(UINTN)InterlockedCompareExchange32 ( - (volatile UINT32*)Value, - (UINT32)(UINTN)CompareValue, - (UINT32)(UINTN)ExchangeValue - ); + return (VOID *)(UINTN)InterlockedCompareExchange32 ( + (volatile UINT32 *)Value, + (UINT32)(UINTN)CompareValue, + (UINT32)(UINTN)ExchangeValue + ); case sizeof (UINT64): - return (VOID*)(UINTN)InterlockedCompareExchange64 ( - (volatile UINT64*)Value, - (UINT64)(UINTN)CompareValue, - (UINT64)(UINTN)ExchangeValue - ); + return (VOID *)(UINTN)InterlockedCompareExchange64 ( + (volatile UINT64 *)Value, + (UINT64)(UINTN)CompareValue, + (UINT64)(UINTN)ExchangeValue + ); default: ASSERT (FALSE); return NULL; diff --git a/MdePkg/Library/BaseSynchronizationLib/X64/GccInline.c b/MdePkg/Library/BaseSynchronizationLib/X64/GccInline.c index be19219..3a26935 100644 --- a/MdePkg/Library/BaseSynchronizationLib/X64/GccInline.c +++ b/MdePkg/Library/BaseSynchronizationLib/X64/GccInline.c @@ -7,8 +7,6 @@ **/ - - /** Performs an atomic increment of an 32-bit unsigned integer. @@ -24,7 +22,7 @@ UINT32 EFIAPI InternalSyncIncrement ( - IN volatile UINT32 *Value + IN volatile UINT32 *Value ) { UINT32 Result; @@ -39,12 +37,11 @@ InternalSyncIncrement ( : // no inputs that aren't also outputs : "memory", "cc" - ); + ); return Result; } - /** Performs an atomic decrement of an 32-bit unsigned integer. @@ -60,10 +57,10 @@ InternalSyncIncrement ( UINT32 EFIAPI InternalSyncDecrement ( - IN volatile UINT32 *Value + IN volatile UINT32 *Value ) { - UINT32 Result; + UINT32 Result; __asm__ __volatile__ ( "movl $-1, %%eax \n\t" @@ -75,12 +72,11 @@ InternalSyncDecrement ( : // no inputs that aren't also outputs : "memory", "cc" - ); + ); return Result; } - /** Performs an atomic compare exchange operation on a 16-bit unsigned integer. @@ -102,9 +98,9 @@ InternalSyncDecrement ( UINT16 EFIAPI InternalSyncCompareExchange16 ( - IN OUT volatile UINT16 *Value, - IN UINT16 CompareValue, - IN UINT16 ExchangeValue + IN OUT volatile UINT16 *Value, + IN UINT16 CompareValue, + IN UINT16 ExchangeValue ) { __asm__ __volatile__ ( @@ -115,12 +111,11 @@ InternalSyncCompareExchange16 ( : "r" (ExchangeValue) // %2 : "memory", "cc" - ); + ); return CompareValue; } - /** Performs an atomic compare exchange operation on a 32-bit unsigned integer. @@ -142,9 +137,9 @@ InternalSyncCompareExchange16 ( UINT32 EFIAPI InternalSyncCompareExchange32 ( - IN OUT volatile UINT32 *Value, - IN UINT32 CompareValue, - IN UINT32 ExchangeValue + IN OUT volatile UINT32 *Value, + IN UINT32 CompareValue, + IN UINT32 ExchangeValue ) { __asm__ __volatile__ ( @@ -155,12 +150,11 @@ InternalSyncCompareExchange32 ( : "r" (ExchangeValue) // %2 : "memory", "cc" - ); + ); return CompareValue; } - /** Performs an atomic compare exchange operation on a 64-bit unsigned integer. @@ -181,9 +175,9 @@ InternalSyncCompareExchange32 ( UINT64 EFIAPI InternalSyncCompareExchange64 ( - IN OUT volatile UINT64 *Value, - IN UINT64 CompareValue, - IN UINT64 ExchangeValue + IN OUT volatile UINT64 *Value, + IN UINT64 CompareValue, + IN UINT64 ExchangeValue ) { __asm__ __volatile__ ( @@ -194,7 +188,7 @@ InternalSyncCompareExchange64 ( : "r" (ExchangeValue) // %2 : "memory", "cc" - ); + ); return CompareValue; } diff --git a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange16.c b/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange16.c index 4bbf190..3692dc5 100644 --- a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange16.c +++ b/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange16.c @@ -11,11 +11,12 @@ Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics. **/ -__int16 _InterlockedCompareExchange16( - __int16 volatile * Destination, - __int16 Exchange, - __int16 Comperand -); +__int16 +_InterlockedCompareExchange16 ( + __int16 volatile *Destination, + __int16 Exchange, + __int16 Comperand + ); #pragma intrinsic(_InterlockedCompareExchange16) @@ -38,11 +39,10 @@ __int16 _InterlockedCompareExchange16( UINT16 EFIAPI InternalSyncCompareExchange16 ( - IN volatile UINT16 *Value, - IN UINT16 CompareValue, - IN UINT16 ExchangeValue + IN volatile UINT16 *Value, + IN UINT16 CompareValue, + IN UINT16 ExchangeValue ) { return _InterlockedCompareExchange16 (Value, ExchangeValue, CompareValue); } - diff --git a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange32.c b/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange32.c index c693a06..3a4cc23 100644 --- a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange32.c +++ b/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange32.c @@ -10,11 +10,12 @@ Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics. **/ -long _InterlockedCompareExchange( - long volatile * Destination, - long Exchange, - long Comperand -); +long +_InterlockedCompareExchange ( + long volatile *Destination, + long Exchange, + long Comperand + ); #pragma intrinsic(_InterlockedCompareExchange) @@ -38,11 +39,10 @@ long _InterlockedCompareExchange( UINT32 EFIAPI InternalSyncCompareExchange32 ( - IN volatile UINT32 *Value, - IN UINT32 CompareValue, - IN UINT32 ExchangeValue + IN volatile UINT32 *Value, + IN UINT32 CompareValue, + IN UINT32 ExchangeValue ) { return _InterlockedCompareExchange (Value, ExchangeValue, CompareValue); } - diff --git a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange64.c b/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange64.c index 4b9167c..ef4e608 100644 --- a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange64.c +++ b/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange64.c @@ -10,11 +10,12 @@ Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics. **/ -__int64 _InterlockedCompareExchange64( - __int64 volatile * Destination, - __int64 Exchange, - __int64 Comperand -); +__int64 +_InterlockedCompareExchange64 ( + __int64 volatile *Destination, + __int64 Exchange, + __int64 Comperand + ); #pragma intrinsic(_InterlockedCompareExchange64) @@ -37,11 +38,10 @@ __int64 _InterlockedCompareExchange64( UINT64 EFIAPI InternalSyncCompareExchange64 ( - IN volatile UINT64 *Value, - IN UINT64 CompareValue, - IN UINT64 ExchangeValue + IN volatile UINT64 *Value, + IN UINT64 CompareValue, + IN UINT64 ExchangeValue ) { return _InterlockedCompareExchange64 (Value, ExchangeValue, CompareValue); } - diff --git a/MdePkg/Library/BaseTimerLibNullTemplate/TimerLibNull.c b/MdePkg/Library/BaseTimerLibNullTemplate/TimerLibNull.c index ee8d306..58f5fb5 100644 --- a/MdePkg/Library/BaseTimerLibNullTemplate/TimerLibNull.c +++ b/MdePkg/Library/BaseTimerLibNullTemplate/TimerLibNull.c @@ -23,7 +23,7 @@ UINTN EFIAPI MicroSecondDelay ( - IN UINTN MicroSeconds + IN UINTN MicroSeconds ) { ASSERT (FALSE); @@ -43,7 +43,7 @@ MicroSecondDelay ( UINTN EFIAPI NanoSecondDelay ( - IN UINTN NanoSeconds + IN UINTN NanoSeconds ) { ASSERT (FALSE); @@ -97,8 +97,8 @@ GetPerformanceCounter ( UINT64 EFIAPI GetPerformanceCounterProperties ( - OUT UINT64 *StartValue OPTIONAL, - OUT UINT64 *EndValue OPTIONAL + OUT UINT64 *StartValue OPTIONAL, + OUT UINT64 *EndValue OPTIONAL ) { ASSERT (FALSE); @@ -120,7 +120,7 @@ GetPerformanceCounterProperties ( UINT64 EFIAPI GetTimeInNanoSecond ( - IN UINT64 Ticks + IN UINT64 Ticks ) { ASSERT (FALSE); diff --git a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c index 28b4bf9..2f0a0c8 100644 --- a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c +++ b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c @@ -27,37 +27,35 @@ FillBuf ( // // Left shift NumOfBits of bits in advance // - Sd->mBitBuf = (UINT32) LShiftU64 (((UINT64)Sd->mBitBuf), NumOfBits); + Sd->mBitBuf = (UINT32)LShiftU64 (((UINT64)Sd->mBitBuf), NumOfBits); // // Copy data needed in bytes into mSbuBitBuf // while (NumOfBits > Sd->mBitCount) { - NumOfBits = (UINT16) (NumOfBits - Sd->mBitCount); - Sd->mBitBuf |= (UINT32) LShiftU64 (((UINT64)Sd->mSubBitBuf), NumOfBits); + NumOfBits = (UINT16)(NumOfBits - Sd->mBitCount); + Sd->mBitBuf |= (UINT32)LShiftU64 (((UINT64)Sd->mSubBitBuf), NumOfBits); if (Sd->mCompSize > 0) { // // Get 1 byte into SubBitBuf // Sd->mCompSize--; - Sd->mSubBitBuf = Sd->mSrcBase[Sd->mInBuf++]; - Sd->mBitCount = 8; - + Sd->mSubBitBuf = Sd->mSrcBase[Sd->mInBuf++]; + Sd->mBitCount = 8; } else { // // No more bits from the source, just pad zero bit. // - Sd->mSubBitBuf = 0; - Sd->mBitCount = 8; - + Sd->mSubBitBuf = 0; + Sd->mBitCount = 8; } } // // Calculate additional bit count read to update mBitCount // - Sd->mBitCount = (UINT16) (Sd->mBitCount - NumOfBits); + Sd->mBitCount = (UINT16)(Sd->mBitCount - NumOfBits); // // Copy NumOfBits of bits from mSubBitBuf into mBitBuf @@ -89,7 +87,7 @@ GetBits ( // // Pop NumOfBits of Bits from Left // - OutBits = (UINT32) (Sd->mBitBuf >> (BITBUFSIZ - NumOfBits)); + OutBits = (UINT32)(Sd->mBitBuf >> (BITBUFSIZ - NumOfBits)); // // Fill up mBitBuf from source @@ -153,8 +151,9 @@ MakeTable ( for (Index = 0; Index < NumOfChar; Index++) { if (BitLen[Index] > 16) { - return (UINT16) BAD_TABLE; + return (UINT16)BAD_TABLE; } + Count[BitLen[Index]]++; } @@ -162,71 +161,67 @@ MakeTable ( Start[1] = 0; for (Index = 1; Index <= 16; Index++) { - WordOfStart = Start[Index]; - WordOfCount = Count[Index]; - Start[Index + 1] = (UINT16) (WordOfStart + (WordOfCount << (16 - Index))); + WordOfStart = Start[Index]; + WordOfCount = Count[Index]; + Start[Index + 1] = (UINT16)(WordOfStart + (WordOfCount << (16 - Index))); } if (Start[17] != 0) { /*(1U << 16)*/ - return (UINT16) BAD_TABLE; + return (UINT16)BAD_TABLE; } - JuBits = (UINT16) (16 - TableBits); + JuBits = (UINT16)(16 - TableBits); Weight[0] = 0; for (Index = 1; Index <= TableBits; Index++) { Start[Index] >>= JuBits; - Weight[Index] = (UINT16) (1U << (TableBits - Index)); + Weight[Index] = (UINT16)(1U << (TableBits - Index)); } while (Index <= 16) { - Weight[Index] = (UINT16) (1U << (16 - Index)); + Weight[Index] = (UINT16)(1U << (16 - Index)); Index++; } - Index = (UINT16) (Start[TableBits + 1] >> JuBits); + Index = (UINT16)(Start[TableBits + 1] >> JuBits); if (Index != 0) { - Index3 = (UINT16) (1U << TableBits); + Index3 = (UINT16)(1U << TableBits); if (Index < Index3) { SetMem16 (Table + Index, (Index3 - Index) * sizeof (*Table), 0); } } - Avail = NumOfChar; - Mask = (UINT16) (1U << (15 - TableBits)); - MaxTableLength = (UINT16) (1U << TableBits); + Avail = NumOfChar; + Mask = (UINT16)(1U << (15 - TableBits)); + MaxTableLength = (UINT16)(1U << TableBits); for (Char = 0; Char < NumOfChar; Char++) { - Len = BitLen[Char]; - if (Len == 0 || Len >= 17) { + if ((Len == 0) || (Len >= 17)) { continue; } - NextCode = (UINT16) (Start[Len] + Weight[Len]); + NextCode = (UINT16)(Start[Len] + Weight[Len]); if (Len <= TableBits) { - - if (Start[Len] >= NextCode || NextCode > MaxTableLength){ - return (UINT16) BAD_TABLE; + if ((Start[Len] >= NextCode) || (NextCode > MaxTableLength)) { + return (UINT16)BAD_TABLE; } for (Index = Start[Len]; Index < NextCode; Index++) { Table[Index] = Char; } - } else { - Index3 = Start[Len]; Pointer = &Table[Index3 >> JuBits]; - Index = (UINT16) (Len - TableBits); + Index = (UINT16)(Len - TableBits); while (Index != 0) { - if (*Pointer == 0 && Avail < (2 * NC - 1)) { + if ((*Pointer == 0) && (Avail < (2 * NC - 1))) { Sd->mRight[Avail] = Sd->mLeft[Avail] = 0; - *Pointer = Avail++; + *Pointer = Avail++; } if (*Pointer < (2 * NC - 1)) { @@ -242,11 +237,11 @@ MakeTable ( } *Pointer = Char; - } Start[Len] = NextCode; } + // // Succeeds // @@ -278,7 +273,6 @@ DecodeP ( Mask = 1U << (BITBUFSIZ - 1 - 8); do { - if ((Sd->mBitBuf & Mask) != 0) { Val = Sd->mRight[Val]; } else { @@ -288,6 +282,7 @@ DecodeP ( Mask >>= 1; } while (Val >= MAXNP); } + // // Advance what we have read // @@ -295,7 +290,7 @@ DecodeP ( Pos = Val; if (Val > 1) { - Pos = (UINT32) ((1U << (Val - 1)) + GetBits (Sd, (UINT16) (Val - 1))); + Pos = (UINT32)((1U << (Val - 1)) + GetBits (Sd, (UINT16)(Val - 1))); } return Pos; @@ -333,15 +328,15 @@ ReadPTLen ( // // Read Extra Set Code Length Array size // - Number = (UINT16) GetBits (Sd, nbit); + Number = (UINT16)GetBits (Sd, nbit); if (Number == 0) { // // This represents only Huffman code used // - CharC = (UINT16) GetBits (Sd, nbit); + CharC = (UINT16)GetBits (Sd, nbit); - SetMem16 (&Sd->mPTTable[0] , sizeof (Sd->mPTTable), CharC); + SetMem16 (&Sd->mPTTable[0], sizeof (Sd->mPTTable), CharC); SetMem (Sd->mPTLen, nn, 0); @@ -351,8 +346,7 @@ ReadPTLen ( Index = 0; while (Index < Number && Index < NPT) { - - CharC = (UINT16) (Sd->mBitBuf >> (BITBUFSIZ - 3)); + CharC = (UINT16)(Sd->mBitBuf >> (BITBUFSIZ - 3)); // // If a code length is less than 7, then it is encoded as a 3-bit @@ -367,9 +361,9 @@ ReadPTLen ( } } - FillBuf (Sd, (UINT16) ((CharC < 7) ? 3 : CharC - 3)); + FillBuf (Sd, (UINT16)((CharC < 7) ? 3 : CharC - 3)); - Sd->mPTLen[Index++] = (UINT8) CharC; + Sd->mPTLen[Index++] = (UINT8)CharC; // // For Code&Len Set, @@ -378,8 +372,8 @@ ReadPTLen ( // zero lengths after the third length. // if (Index == Special) { - CharC = (UINT16) GetBits (Sd, 2); - while ((INT16) (--CharC) >= 0 && Index < NPT) { + CharC = (UINT16)GetBits (Sd, 2); + while ((INT16)(--CharC) >= 0 && Index < NPT) { Sd->mPTLen[Index++] = 0; } } @@ -406,23 +400,23 @@ ReadCLen ( SCRATCH_DATA *Sd ) { - UINT16 Number; - UINT16 CharC; - UINT16 Index; - UINT32 Mask; + UINT16 Number; + UINT16 CharC; + UINT16 Index; + UINT32 Mask; - Number = (UINT16) GetBits (Sd, CBIT); + Number = (UINT16)GetBits (Sd, CBIT); if (Number == 0) { // // This represents only Huffman code used // - CharC = (UINT16) GetBits (Sd, CBIT); + CharC = (UINT16)GetBits (Sd, CBIT); SetMem (Sd->mCLen, NC, 0); SetMem16 (&Sd->mCTable[0], sizeof (Sd->mCTable), CharC); - return ; + return; } Index = 0; @@ -432,7 +426,6 @@ ReadCLen ( Mask = 1U << (BITBUFSIZ - 1 - 8); do { - if (Mask & Sd->mBitBuf) { CharC = Sd->mRight[CharC]; } else { @@ -440,32 +433,28 @@ ReadCLen ( } Mask >>= 1; - } while (CharC >= NT); } + // // Advance what we have read // FillBuf (Sd, Sd->mPTLen[CharC]); if (CharC <= 2) { - if (CharC == 0) { CharC = 1; } else if (CharC == 1) { - CharC = (UINT16) (GetBits (Sd, 4) + 3); + CharC = (UINT16)(GetBits (Sd, 4) + 3); } else if (CharC == 2) { - CharC = (UINT16) (GetBits (Sd, CBIT) + 20); + CharC = (UINT16)(GetBits (Sd, CBIT) + 20); } - while ((INT16) (--CharC) >= 0 && Index < NC) { + while ((INT16)(--CharC) >= 0 && Index < NC) { Sd->mCLen[Index++] = 0; } - } else { - - Sd->mCLen[Index++] = (UINT8) (CharC - 2); - + Sd->mCLen[Index++] = (UINT8)(CharC - 2); } } @@ -473,7 +462,7 @@ ReadCLen ( MakeTable (Sd, NC, Sd->mCLen, 12, Sd->mCTable); - return ; + return; } /** @@ -501,7 +490,7 @@ DecodeC ( // Starting a new block // Read BlockSize from block header // - Sd->mBlockSize = (UINT16) GetBits (Sd, 16); + Sd->mBlockSize = (UINT16)GetBits (Sd, 16); // // Read in the Extra Set Code Length Array, @@ -522,7 +511,7 @@ DecodeC ( // Read in the Position Set Code Length Array, // Generate the Huffman code mapping table for the Position Set. // - Sd->mBadTableFlag = ReadPTLen (Sd, MAXNP, Sd->mPBit, (UINT16) (-1)); + Sd->mBadTableFlag = ReadPTLen (Sd, MAXNP, Sd->mPBit, (UINT16)(-1)); if (Sd->mBadTableFlag != 0) { return 0; } @@ -547,6 +536,7 @@ DecodeC ( Mask >>= 1; } while (Index2 >= NC); } + // // Advance what we have read // @@ -570,11 +560,11 @@ Decode ( UINT32 DataIdx; UINT16 CharC; - BytesRemain = (UINT16) (-1); + BytesRemain = (UINT16)(-1); - DataIdx = 0; + DataIdx = 0; - for (;;) { + for ( ; ;) { // // Get one code from mBitBuf // @@ -593,14 +583,13 @@ Decode ( // // Write orignal character into mDstBase // - Sd->mDstBase[Sd->mOutBuf++] = (UINT8) CharC; + Sd->mDstBase[Sd->mOutBuf++] = (UINT8)CharC; } - } else { // // Process a Pointer // - CharC = (UINT16) (CharC - (BIT8 - THRESHOLD)); + CharC = (UINT16)(CharC - (BIT8 - THRESHOLD)); // // Get string length @@ -610,25 +599,28 @@ Decode ( // // Locate string position // - DataIdx = Sd->mOutBuf - DecodeP (Sd) - 1; + DataIdx = Sd->mOutBuf - DecodeP (Sd) - 1; // // Write BytesRemain of bytes into mDstBase // BytesRemain--; - while ((INT16) (BytesRemain) >= 0) { + while ((INT16)(BytesRemain) >= 0) { if (Sd->mOutBuf >= Sd->mOrigSize) { goto Done; } + if (DataIdx >= Sd->mOrigSize) { - Sd->mBadTableFlag = (UINT16) BAD_TABLE; + Sd->mBadTableFlag = (UINT16)BAD_TABLE; goto Done; } + Sd->mDstBase[Sd->mOutBuf++] = Sd->mDstBase[DataIdx++]; BytesRemain--; } + // // Once mOutBuf is fully filled, directly return // @@ -639,7 +631,7 @@ Decode ( } Done: - return ; + return; } /** @@ -700,12 +692,12 @@ UefiDecompressGetInfo ( return RETURN_INVALID_PARAMETER; } - CompressedSize = ReadUnaligned32 ((UINT32 *)Source); - if (SourceSize < (CompressedSize + 8) || (CompressedSize + 8) < 8) { + CompressedSize = ReadUnaligned32 ((UINT32 *)Source); + if ((SourceSize < (CompressedSize + 8)) || ((CompressedSize + 8) < 8)) { return RETURN_INVALID_PARAMETER; } - *ScratchSize = sizeof (SCRATCH_DATA); + *ScratchSize = sizeof (SCRATCH_DATA); *DestinationSize = ReadUnaligned32 ((UINT32 *)Source + 1); return RETURN_SUCCESS; @@ -750,24 +742,24 @@ UefiTianoDecompress ( IN UINT32 Version ) { - UINT32 CompSize; - UINT32 OrigSize; - SCRATCH_DATA *Sd; - CONST UINT8 *Src; - UINT8 *Dst; + UINT32 CompSize; + UINT32 OrigSize; + SCRATCH_DATA *Sd; + CONST UINT8 *Src; + UINT8 *Dst; ASSERT (Source != NULL); ASSERT (Destination != NULL); ASSERT (Scratch != NULL); ASSERT (Version == 1 || Version == 2); - Src = Source; - Dst = Destination; + Src = Source; + Dst = Destination; - Sd = (SCRATCH_DATA *) Scratch; + Sd = (SCRATCH_DATA *)Scratch; - CompSize = Src[0] + (Src[1] << 8) + (Src[2] << 16) + (Src[3] << 24); - OrigSize = Src[4] + (Src[5] << 8) + (Src[6] << 16) + (Src[7] << 24); + CompSize = Src[0] + (Src[1] << 8) + (Src[2] << 16) + (Src[3] << 24); + OrigSize = Src[4] + (Src[5] << 8) + (Src[6] << 16) + (Src[7] << 24); // // If compressed file size is 0, return @@ -785,17 +777,18 @@ UefiTianoDecompress ( // For Tiano de/compression algorithm(Version 2), mPBit = 5 // switch (Version) { - case 1 : + case 1: Sd->mPBit = 4; break; - case 2 : + case 2: Sd->mPBit = 5; break; default: ASSERT (FALSE); } - Sd->mSrcBase = (UINT8 *)Src; - Sd->mDstBase = Dst; + + Sd->mSrcBase = (UINT8 *)Src; + Sd->mDstBase = Dst; // // CompSize and OrigSize are calculated in bytes // diff --git a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLibInternals.h b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLibInternals.h index 4df3fa3..cb08c2b 100644 --- a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLibInternals.h +++ b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLibInternals.h @@ -17,55 +17,55 @@ // // Decompression algorithm begins here // -#define BITBUFSIZ 32 -#define MAXMATCH 256 -#define THRESHOLD 3 -#define CODE_BIT 16 -#define BAD_TABLE - 1 +#define BITBUFSIZ 32 +#define MAXMATCH 256 +#define THRESHOLD 3 +#define CODE_BIT 16 +#define BAD_TABLE - 1 // // C: Char&Len Set; P: Position Set; T: exTra Set // -#define NC (0xff + MAXMATCH + 2 - THRESHOLD) -#define CBIT 9 -#define MAXPBIT 5 -#define TBIT 5 -#define MAXNP ((1U << MAXPBIT) - 1) -#define NT (CODE_BIT + 3) +#define NC (0xff + MAXMATCH + 2 - THRESHOLD) +#define CBIT 9 +#define MAXPBIT 5 +#define TBIT 5 +#define MAXNP ((1U << MAXPBIT) - 1) +#define NT (CODE_BIT + 3) #if NT > MAXNP -#define NPT NT +#define NPT NT #else -#define NPT MAXNP +#define NPT MAXNP #endif typedef struct { - UINT8 *mSrcBase; // The starting address of compressed data - UINT8 *mDstBase; // The starting address of decompressed data - UINT32 mOutBuf; - UINT32 mInBuf; - - UINT16 mBitCount; - UINT32 mBitBuf; - UINT32 mSubBitBuf; - UINT16 mBlockSize; - UINT32 mCompSize; - UINT32 mOrigSize; - - UINT16 mBadTableFlag; - - UINT16 mLeft[2 * NC - 1]; - UINT16 mRight[2 * NC - 1]; - UINT8 mCLen[NC]; - UINT8 mPTLen[NPT]; - UINT16 mCTable[4096]; - UINT16 mPTTable[256]; + UINT8 *mSrcBase; // The starting address of compressed data + UINT8 *mDstBase; // The starting address of decompressed data + UINT32 mOutBuf; + UINT32 mInBuf; + + UINT16 mBitCount; + UINT32 mBitBuf; + UINT32 mSubBitBuf; + UINT16 mBlockSize; + UINT32 mCompSize; + UINT32 mOrigSize; + + UINT16 mBadTableFlag; + + UINT16 mLeft[2 * NC - 1]; + UINT16 mRight[2 * NC - 1]; + UINT8 mCLen[NC]; + UINT8 mPTLen[NPT]; + UINT16 mCTable[4096]; + UINT16 mPTTable[256]; /// /// The length of the field 'Position Set Code Length Array Size' in Block Header. /// For UEFI 2.0 de/compression algorithm, mPBit = 4. /// For Tiano de/compression algorithm, mPBit = 5. /// - UINT8 mPBit; + UINT8 mPBit; } SCRATCH_DATA; /** @@ -245,4 +245,5 @@ UefiTianoDecompress ( IN OUT VOID *Scratch, IN UINT32 Version ); + #endif diff --git a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiTianoCustomDecompressLib.c b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiTianoCustomDecompressLib.c index 59e3b08..503e3ca 100644 --- a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiTianoCustomDecompressLib.c +++ b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiTianoCustomDecompressLib.c @@ -62,41 +62,47 @@ TianoDecompressGetInfo ( if (IS_SECTION2 (InputSection)) { if (!CompareGuid ( - &gTianoCustomDecompressGuid, - &(((EFI_GUID_DEFINED_SECTION2 *) InputSection)->SectionDefinitionGuid))) { + &gTianoCustomDecompressGuid, + &(((EFI_GUID_DEFINED_SECTION2 *)InputSection)->SectionDefinitionGuid) + )) + { return RETURN_INVALID_PARAMETER; } + // // Get guid attribute of guid section. // - *SectionAttribute = ((EFI_GUID_DEFINED_SECTION2 *) InputSection)->Attributes; + *SectionAttribute = ((EFI_GUID_DEFINED_SECTION2 *)InputSection)->Attributes; // // Call Tiano GetInfo to get the required size info. // return UefiDecompressGetInfo ( - (UINT8 *) InputSection + ((EFI_GUID_DEFINED_SECTION2 *) InputSection)->DataOffset, - SECTION2_SIZE (InputSection) - ((EFI_GUID_DEFINED_SECTION2 *) InputSection)->DataOffset, + (UINT8 *)InputSection + ((EFI_GUID_DEFINED_SECTION2 *)InputSection)->DataOffset, + SECTION2_SIZE (InputSection) - ((EFI_GUID_DEFINED_SECTION2 *)InputSection)->DataOffset, OutputBufferSize, ScratchBufferSize ); } else { if (!CompareGuid ( - &gTianoCustomDecompressGuid, - &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) { + &gTianoCustomDecompressGuid, + &(((EFI_GUID_DEFINED_SECTION *)InputSection)->SectionDefinitionGuid) + )) + { return RETURN_INVALID_PARAMETER; } + // // Get guid attribute of guid section. // - *SectionAttribute = ((EFI_GUID_DEFINED_SECTION *) InputSection)->Attributes; + *SectionAttribute = ((EFI_GUID_DEFINED_SECTION *)InputSection)->Attributes; // // Call Tiano GetInfo to get the required size info. // return UefiDecompressGetInfo ( - (UINT8 *) InputSection + ((EFI_GUID_DEFINED_SECTION *) InputSection)->DataOffset, - SECTION_SIZE (InputSection) - ((EFI_GUID_DEFINED_SECTION *) InputSection)->DataOffset, + (UINT8 *)InputSection + ((EFI_GUID_DEFINED_SECTION *)InputSection)->DataOffset, + SECTION_SIZE (InputSection) - ((EFI_GUID_DEFINED_SECTION *)InputSection)->DataOffset, OutputBufferSize, ScratchBufferSize ); @@ -150,8 +156,10 @@ TianoDecompress ( if (IS_SECTION2 (InputSection)) { if (!CompareGuid ( - &gTianoCustomDecompressGuid, - &(((EFI_GUID_DEFINED_SECTION2 *) InputSection)->SectionDefinitionGuid))) { + &gTianoCustomDecompressGuid, + &(((EFI_GUID_DEFINED_SECTION2 *)InputSection)->SectionDefinitionGuid) + )) + { return RETURN_INVALID_PARAMETER; } @@ -164,15 +172,17 @@ TianoDecompress ( // Call Tiano Decompress to get the raw data // return UefiTianoDecompress ( - (UINT8 *) InputSection + ((EFI_GUID_DEFINED_SECTION2 *) InputSection)->DataOffset, + (UINT8 *)InputSection + ((EFI_GUID_DEFINED_SECTION2 *)InputSection)->DataOffset, *OutputBuffer, ScratchBuffer, 2 - ); + ); } else { if (!CompareGuid ( - &gTianoCustomDecompressGuid, - &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) { + &gTianoCustomDecompressGuid, + &(((EFI_GUID_DEFINED_SECTION *)InputSection)->SectionDefinitionGuid) + )) + { return RETURN_INVALID_PARAMETER; } @@ -185,11 +195,11 @@ TianoDecompress ( // Call Tiano Decompress to get the raw data // return UefiTianoDecompress ( - (UINT8 *) InputSection + ((EFI_GUID_DEFINED_SECTION *) InputSection)->DataOffset, + (UINT8 *)InputSection + ((EFI_GUID_DEFINED_SECTION *)InputSection)->DataOffset, *OutputBuffer, ScratchBuffer, 2 - ); + ); } } @@ -203,11 +213,11 @@ RETURN_STATUS EFIAPI TianoDecompressLibConstructor ( VOID -) + ) { return ExtractGuidedSectionRegisterHandlers ( - &gTianoCustomDecompressGuid, - TianoDecompressGetInfo, - TianoDecompress - ); + &gTianoCustomDecompressGuid, + TianoDecompressGetInfo, + TianoDecompress + ); } diff --git a/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.c b/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.c index 3dda352..3ac7cfb 100644 --- a/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.c +++ b/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.c @@ -6,10 +6,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ - #include - #include #include #include @@ -17,7 +15,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // // Cache copy of HobList pointer. // -VOID *gHobList = NULL; +VOID *gHobList = NULL; /** The entry point of PE/COFF Image for the DXE Core. @@ -50,11 +48,10 @@ _ModuleEntryPoint ( // // Should never return // - ASSERT(FALSE); + ASSERT (FALSE); CpuDeadLoop (); } - /** Required by the EBC compiler and identical in functionality to _ModuleEntryPoint(). diff --git a/MdePkg/Library/DxeCoreHobLib/HobLib.c b/MdePkg/Library/DxeCoreHobLib/HobLib.c index f071313..ff31947 100644 --- a/MdePkg/Library/DxeCoreHobLib/HobLib.c +++ b/MdePkg/Library/DxeCoreHobLib/HobLib.c @@ -59,15 +59,15 @@ GetHobList ( VOID * EFIAPI GetNextHob ( - IN UINT16 Type, - IN CONST VOID *HobStart + IN UINT16 Type, + IN CONST VOID *HobStart ) { EFI_PEI_HOB_POINTERS Hob; ASSERT (HobStart != NULL); - Hob.Raw = (UINT8 *) HobStart; + Hob.Raw = (UINT8 *)HobStart; // // Parse the HOB list until end of list or matching type is found. // @@ -75,8 +75,10 @@ GetNextHob ( if (Hob.Header->HobType == Type) { return Hob.Raw; } + Hob.Raw = GET_NEXT_HOB (Hob); } + return NULL; } @@ -96,10 +98,10 @@ GetNextHob ( VOID * EFIAPI GetFirstHob ( - IN UINT16 Type + IN UINT16 Type ) { - VOID *HobList; + VOID *HobList; HobList = GetHobList (); return GetNextHob (Type, HobList); @@ -130,19 +132,21 @@ GetFirstHob ( VOID * EFIAPI GetNextGuidHob ( - IN CONST EFI_GUID *Guid, - IN CONST VOID *HobStart + IN CONST EFI_GUID *Guid, + IN CONST VOID *HobStart ) { EFI_PEI_HOB_POINTERS GuidHob; - GuidHob.Raw = (UINT8 *) HobStart; + GuidHob.Raw = (UINT8 *)HobStart; while ((GuidHob.Raw = GetNextHob (EFI_HOB_TYPE_GUID_EXTENSION, GuidHob.Raw)) != NULL) { if (CompareGuid (Guid, &GuidHob.Guid->Name)) { break; } + GuidHob.Raw = GET_NEXT_HOB (GuidHob); } + return GuidHob.Raw; } @@ -167,10 +171,10 @@ GetNextGuidHob ( VOID * EFIAPI GetFirstGuidHob ( - IN CONST EFI_GUID *Guid + IN CONST EFI_GUID *Guid ) { - VOID *HobList; + VOID *HobList; HobList = GetHobList (); return GetNextGuidHob (Guid, HobList); @@ -195,11 +199,11 @@ GetBootModeHob ( VOID ) { - EFI_HOB_HANDOFF_INFO_TABLE *HandOffHob; + EFI_HOB_HANDOFF_INFO_TABLE *HandOffHob; - HandOffHob = (EFI_HOB_HANDOFF_INFO_TABLE *) GetHobList (); + HandOffHob = (EFI_HOB_HANDOFF_INFO_TABLE *)GetHobList (); - return HandOffHob->BootMode; + return HandOffHob->BootMode; } /** @@ -221,10 +225,10 @@ GetBootModeHob ( VOID EFIAPI BuildModuleHob ( - IN CONST EFI_GUID *ModuleName, - IN EFI_PHYSICAL_ADDRESS MemoryAllocationModule, - IN UINT64 ModuleLength, - IN EFI_PHYSICAL_ADDRESS EntryPoint + IN CONST EFI_GUID *ModuleName, + IN EFI_PHYSICAL_ADDRESS MemoryAllocationModule, + IN UINT64 ModuleLength, + IN EFI_PHYSICAL_ADDRESS EntryPoint ) { // @@ -320,8 +324,8 @@ BuildResourceDescriptorHob ( VOID * EFIAPI BuildGuidHob ( - IN CONST EFI_GUID *Guid, - IN UINTN DataLength + IN CONST EFI_GUID *Guid, + IN UINTN DataLength ) { // @@ -359,9 +363,9 @@ BuildGuidHob ( VOID * EFIAPI BuildGuidDataHob ( - IN CONST EFI_GUID *Guid, - IN VOID *Data, - IN UINTN DataLength + IN CONST EFI_GUID *Guid, + IN VOID *Data, + IN UINTN DataLength ) { // @@ -388,8 +392,8 @@ BuildGuidDataHob ( VOID EFIAPI BuildFvHob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length ) { // @@ -417,10 +421,10 @@ BuildFvHob ( VOID EFIAPI BuildFv2Hob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length, - IN CONST EFI_GUID *FvName, - IN CONST EFI_GUID *FileName + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length, + IN CONST EFI_GUID *FvName, + IN CONST EFI_GUID *FileName ) { ASSERT (FALSE); @@ -450,12 +454,12 @@ BuildFv2Hob ( VOID EFIAPI BuildFv3Hob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length, - IN UINT32 AuthenticationStatus, - IN BOOLEAN ExtractedFv, - IN CONST EFI_GUID *FvName OPTIONAL, - IN CONST EFI_GUID *FileName OPTIONAL + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length, + IN UINT32 AuthenticationStatus, + IN BOOLEAN ExtractedFv, + IN CONST EFI_GUID *FvName OPTIONAL, + IN CONST EFI_GUID *FileName OPTIONAL ) { ASSERT (FALSE); @@ -478,8 +482,8 @@ BuildFv3Hob ( VOID EFIAPI BuildCvHob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length ) { // @@ -504,8 +508,8 @@ BuildCvHob ( VOID EFIAPI BuildCpuHob ( - IN UINT8 SizeOfMemorySpace, - IN UINT8 SizeOfIoSpace + IN UINT8 SizeOfMemorySpace, + IN UINT8 SizeOfIoSpace ) { // @@ -530,8 +534,8 @@ BuildCpuHob ( VOID EFIAPI BuildStackHob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length ) { // @@ -557,9 +561,9 @@ BuildStackHob ( VOID EFIAPI BuildBspStoreHob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length, - IN EFI_MEMORY_TYPE MemoryType + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length, + IN EFI_MEMORY_TYPE MemoryType ) { // @@ -585,9 +589,9 @@ BuildBspStoreHob ( VOID EFIAPI BuildMemoryAllocationHob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length, - IN EFI_MEMORY_TYPE MemoryType + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length, + IN EFI_MEMORY_TYPE MemoryType ) { // diff --git a/MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.c b/MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.c index 995ef1d..2634d2f 100644 --- a/MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.c +++ b/MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.c @@ -14,14 +14,14 @@ #include #include -#define EXTRACT_HANDLER_TABLE_SIZE 0x10 +#define EXTRACT_HANDLER_TABLE_SIZE 0x10 -UINT32 mNumberOfExtractHandler = 0; -UINT32 mMaxNumberOfExtractHandler = 0; +UINT32 mNumberOfExtractHandler = 0; +UINT32 mMaxNumberOfExtractHandler = 0; -GUID *mExtractHandlerGuidTable = NULL; -EXTRACT_GUIDED_SECTION_DECODE_HANDLER *mExtractDecodeHandlerTable = NULL; -EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER *mExtractGetInfoHandlerTable = NULL; +GUID *mExtractHandlerGuidTable = NULL; +EXTRACT_GUIDED_SECTION_DECODE_HANDLER *mExtractDecodeHandlerTable = NULL; +EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER *mExtractGetInfoHandlerTable = NULL; /** Reallocates more global memory to store the registered guid and Handler list. @@ -42,7 +42,7 @@ ReallocateExtractHandlerTable ( mMaxNumberOfExtractHandler * sizeof (GUID), (mMaxNumberOfExtractHandler + EXTRACT_HANDLER_TABLE_SIZE) * sizeof (GUID), mExtractHandlerGuidTable - ); + ); if (mExtractHandlerGuidTable == NULL) { goto Done; @@ -52,10 +52,10 @@ ReallocateExtractHandlerTable ( // Reallocate memory for Decode handler Table // mExtractDecodeHandlerTable = ReallocatePool ( - mMaxNumberOfExtractHandler * sizeof (EXTRACT_GUIDED_SECTION_DECODE_HANDLER), - (mMaxNumberOfExtractHandler + EXTRACT_HANDLER_TABLE_SIZE) * sizeof (EXTRACT_GUIDED_SECTION_DECODE_HANDLER), - mExtractDecodeHandlerTable - ); + mMaxNumberOfExtractHandler * sizeof (EXTRACT_GUIDED_SECTION_DECODE_HANDLER), + (mMaxNumberOfExtractHandler + EXTRACT_HANDLER_TABLE_SIZE) * sizeof (EXTRACT_GUIDED_SECTION_DECODE_HANDLER), + mExtractDecodeHandlerTable + ); if (mExtractDecodeHandlerTable == NULL) { goto Done; @@ -65,10 +65,10 @@ ReallocateExtractHandlerTable ( // Reallocate memory for GetInfo handler Table // mExtractGetInfoHandlerTable = ReallocatePool ( - mMaxNumberOfExtractHandler * sizeof (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER), - (mMaxNumberOfExtractHandler + EXTRACT_HANDLER_TABLE_SIZE) * sizeof (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER), - mExtractGetInfoHandlerTable - ); + mMaxNumberOfExtractHandler * sizeof (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER), + (mMaxNumberOfExtractHandler + EXTRACT_HANDLER_TABLE_SIZE) * sizeof (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER), + mExtractGetInfoHandlerTable + ); if (mExtractGetInfoHandlerTable == NULL) { goto Done; @@ -84,15 +84,18 @@ Done: if (mExtractHandlerGuidTable != NULL) { FreePool (mExtractHandlerGuidTable); } + if (mExtractDecodeHandlerTable != NULL) { FreePool (mExtractDecodeHandlerTable); } + if (mExtractGetInfoHandlerTable != NULL) { FreePool (mExtractGetInfoHandlerTable); } return RETURN_OUT_OF_RESOURCES; } + /** Constructor allocates the global memory to store the registered guid and Handler list. @@ -170,8 +173,8 @@ ExtractGuidedSectionRegisterHandlers ( IN EXTRACT_GUIDED_SECTION_DECODE_HANDLER DecodeHandler ) { - UINT32 Index; - VOID *GuidData; + UINT32 Index; + VOID *GuidData; // // Check input parameter. @@ -183,13 +186,13 @@ ExtractGuidedSectionRegisterHandlers ( // // Search the match registered GetInfo handler for the input guided section. // - for (Index = 0; Index < mNumberOfExtractHandler; Index ++) { + for (Index = 0; Index < mNumberOfExtractHandler; Index++) { if (CompareGuid (&mExtractHandlerGuidTable[Index], SectionGuid)) { // // If the guided handler has been registered before, only update its handler. // - mExtractDecodeHandlerTable [Index] = DecodeHandler; - mExtractGetInfoHandlerTable [Index] = GetInfoHandler; + mExtractDecodeHandlerTable[Index] = DecodeHandler; + mExtractGetInfoHandlerTable[Index] = GetInfoHandler; return RETURN_SUCCESS; } } @@ -206,17 +209,17 @@ ExtractGuidedSectionRegisterHandlers ( // // Register new Handler and guid value. // - CopyGuid (&mExtractHandlerGuidTable [mNumberOfExtractHandler], SectionGuid); - mExtractDecodeHandlerTable [mNumberOfExtractHandler] = DecodeHandler; - mExtractGetInfoHandlerTable [mNumberOfExtractHandler++] = GetInfoHandler; + CopyGuid (&mExtractHandlerGuidTable[mNumberOfExtractHandler], SectionGuid); + mExtractDecodeHandlerTable[mNumberOfExtractHandler] = DecodeHandler; + mExtractGetInfoHandlerTable[mNumberOfExtractHandler++] = GetInfoHandler; // // Install the Guided Section GUID configuration table to record the GUID itself. // Then the content of the configuration table buffer will be the same as the GUID value itself. // - GuidData = AllocateCopyPool (sizeof (GUID), (VOID *) SectionGuid); + GuidData = AllocateCopyPool (sizeof (GUID), (VOID *)SectionGuid); if (GuidData != NULL) { - gBS->InstallConfigurationTable ((EFI_GUID *) SectionGuid, GuidData); + gBS->InstallConfigurationTable ((EFI_GUID *)SectionGuid, GuidData); } return RETURN_SUCCESS; @@ -265,8 +268,8 @@ ExtractGuidedSectionGetInfo ( OUT UINT16 *SectionAttribute ) { - UINT32 Index; - EFI_GUID *SectionDefinitionGuid; + UINT32 Index; + EFI_GUID *SectionDefinitionGuid; ASSERT (InputSection != NULL); ASSERT (OutputBufferSize != NULL); @@ -274,25 +277,25 @@ ExtractGuidedSectionGetInfo ( ASSERT (SectionAttribute != NULL); if (IS_SECTION2 (InputSection)) { - SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION2 *) InputSection)->SectionDefinitionGuid); + SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION2 *)InputSection)->SectionDefinitionGuid); } else { - SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid); + SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION *)InputSection)->SectionDefinitionGuid); } // // Search the match registered GetInfo handler for the input guided section. // - for (Index = 0; Index < mNumberOfExtractHandler; Index ++) { + for (Index = 0; Index < mNumberOfExtractHandler; Index++) { if (CompareGuid (&mExtractHandlerGuidTable[Index], SectionDefinitionGuid)) { // // Call the match handler to getinfo for the input section data. // - return mExtractGetInfoHandlerTable [Index] ( - InputSection, - OutputBufferSize, - ScratchBufferSize, - SectionAttribute - ); + return mExtractGetInfoHandlerTable[Index]( + InputSection, + OutputBufferSize, + ScratchBufferSize, + SectionAttribute + ); } } @@ -346,8 +349,8 @@ ExtractGuidedSectionDecode ( OUT UINT32 *AuthenticationStatus ) { - UINT32 Index; - EFI_GUID *SectionDefinitionGuid; + UINT32 Index; + EFI_GUID *SectionDefinitionGuid; // // Check the input parameters @@ -357,25 +360,25 @@ ExtractGuidedSectionDecode ( ASSERT (AuthenticationStatus != NULL); if (IS_SECTION2 (InputSection)) { - SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION2 *) InputSection)->SectionDefinitionGuid); + SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION2 *)InputSection)->SectionDefinitionGuid); } else { - SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid); + SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION *)InputSection)->SectionDefinitionGuid); } // // Search the match registered extract handler for the input guided section. // - for (Index = 0; Index < mNumberOfExtractHandler; Index ++) { + for (Index = 0; Index < mNumberOfExtractHandler; Index++) { if (CompareGuid (&mExtractHandlerGuidTable[Index], SectionDefinitionGuid)) { // // Call the match handler to extract raw data for the input section data. // - return mExtractDecodeHandlerTable [Index] ( - InputSection, - OutputBuffer, - ScratchBuffer, - AuthenticationStatus - ); + return mExtractDecodeHandlerTable[Index]( + InputSection, + OutputBuffer, + ScratchBuffer, + AuthenticationStatus + ); } } @@ -420,7 +423,7 @@ ExtractGuidedSectionGetHandlers ( OUT EXTRACT_GUIDED_SECTION_DECODE_HANDLER *DecodeHandler OPTIONAL ) { - UINT32 Index; + UINT32 Index; // // Check input parameter. @@ -430,20 +433,22 @@ ExtractGuidedSectionGetHandlers ( // // Search the match registered GetInfo handler for the input guided section. // - for (Index = 0; Index < mNumberOfExtractHandler; Index ++) { + for (Index = 0; Index < mNumberOfExtractHandler; Index++) { if (CompareGuid (&mExtractHandlerGuidTable[Index], SectionGuid)) { - // // If the guided handler has been registered before, then return the registered handlers. // if (GetInfoHandler != NULL) { *GetInfoHandler = mExtractGetInfoHandlerTable[Index]; } + if (DecodeHandler != NULL) { *DecodeHandler = mExtractDecodeHandlerTable[Index]; } + return RETURN_SUCCESS; } } + return RETURN_NOT_FOUND; } diff --git a/MdePkg/Library/DxeHobLib/HobLib.c b/MdePkg/Library/DxeHobLib/HobLib.c index 2039e5d..ed38674 100644 --- a/MdePkg/Library/DxeHobLib/HobLib.c +++ b/MdePkg/Library/DxeHobLib/HobLib.c @@ -48,6 +48,7 @@ GetHobList ( ASSERT_EFI_ERROR (Status); ASSERT (mHobList != NULL); } + return mHobList; } @@ -93,15 +94,15 @@ HobLibConstructor ( VOID * EFIAPI GetNextHob ( - IN UINT16 Type, - IN CONST VOID *HobStart + IN UINT16 Type, + IN CONST VOID *HobStart ) { EFI_PEI_HOB_POINTERS Hob; ASSERT (HobStart != NULL); - Hob.Raw = (UINT8 *) HobStart; + Hob.Raw = (UINT8 *)HobStart; // // Parse the HOB list until end of list or matching type is found. // @@ -109,8 +110,10 @@ GetNextHob ( if (Hob.Header->HobType == Type) { return Hob.Raw; } + Hob.Raw = GET_NEXT_HOB (Hob); } + return NULL; } @@ -130,10 +133,10 @@ GetNextHob ( VOID * EFIAPI GetFirstHob ( - IN UINT16 Type + IN UINT16 Type ) { - VOID *HobList; + VOID *HobList; HobList = GetHobList (); return GetNextHob (Type, HobList); @@ -164,19 +167,21 @@ GetFirstHob ( VOID * EFIAPI GetNextGuidHob ( - IN CONST EFI_GUID *Guid, - IN CONST VOID *HobStart + IN CONST EFI_GUID *Guid, + IN CONST VOID *HobStart ) { EFI_PEI_HOB_POINTERS GuidHob; - GuidHob.Raw = (UINT8 *) HobStart; + GuidHob.Raw = (UINT8 *)HobStart; while ((GuidHob.Raw = GetNextHob (EFI_HOB_TYPE_GUID_EXTENSION, GuidHob.Raw)) != NULL) { if (CompareGuid (Guid, &GuidHob.Guid->Name)) { break; } + GuidHob.Raw = GET_NEXT_HOB (GuidHob); } + return GuidHob.Raw; } @@ -201,10 +206,10 @@ GetNextGuidHob ( VOID * EFIAPI GetFirstGuidHob ( - IN CONST EFI_GUID *Guid + IN CONST EFI_GUID *Guid ) { - VOID *HobList; + VOID *HobList; HobList = GetHobList (); return GetNextGuidHob (Guid, HobList); @@ -229,11 +234,11 @@ GetBootModeHob ( VOID ) { - EFI_HOB_HANDOFF_INFO_TABLE *HandOffHob; + EFI_HOB_HANDOFF_INFO_TABLE *HandOffHob; - HandOffHob = (EFI_HOB_HANDOFF_INFO_TABLE *) GetHobList (); + HandOffHob = (EFI_HOB_HANDOFF_INFO_TABLE *)GetHobList (); - return HandOffHob->BootMode; + return HandOffHob->BootMode; } /** @@ -255,10 +260,10 @@ GetBootModeHob ( VOID EFIAPI BuildModuleHob ( - IN CONST EFI_GUID *ModuleName, - IN EFI_PHYSICAL_ADDRESS MemoryAllocationModule, - IN UINT64 ModuleLength, - IN EFI_PHYSICAL_ADDRESS EntryPoint + IN CONST EFI_GUID *ModuleName, + IN EFI_PHYSICAL_ADDRESS MemoryAllocationModule, + IN UINT64 ModuleLength, + IN EFI_PHYSICAL_ADDRESS EntryPoint ) { // @@ -354,8 +359,8 @@ BuildResourceDescriptorHob ( VOID * EFIAPI BuildGuidHob ( - IN CONST EFI_GUID *Guid, - IN UINTN DataLength + IN CONST EFI_GUID *Guid, + IN UINTN DataLength ) { // @@ -393,9 +398,9 @@ BuildGuidHob ( VOID * EFIAPI BuildGuidDataHob ( - IN CONST EFI_GUID *Guid, - IN VOID *Data, - IN UINTN DataLength + IN CONST EFI_GUID *Guid, + IN VOID *Data, + IN UINTN DataLength ) { // @@ -422,8 +427,8 @@ BuildGuidDataHob ( VOID EFIAPI BuildFvHob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length ) { // @@ -451,10 +456,10 @@ BuildFvHob ( VOID EFIAPI BuildFv2Hob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length, - IN CONST EFI_GUID *FvName, - IN CONST EFI_GUID *FileName + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length, + IN CONST EFI_GUID *FvName, + IN CONST EFI_GUID *FileName ) { ASSERT (FALSE); @@ -484,12 +489,12 @@ BuildFv2Hob ( VOID EFIAPI BuildFv3Hob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length, - IN UINT32 AuthenticationStatus, - IN BOOLEAN ExtractedFv, - IN CONST EFI_GUID *FvName OPTIONAL, - IN CONST EFI_GUID *FileName OPTIONAL + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length, + IN UINT32 AuthenticationStatus, + IN BOOLEAN ExtractedFv, + IN CONST EFI_GUID *FvName OPTIONAL, + IN CONST EFI_GUID *FileName OPTIONAL ) { ASSERT (FALSE); @@ -512,8 +517,8 @@ BuildFv3Hob ( VOID EFIAPI BuildCvHob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length ) { // @@ -538,8 +543,8 @@ BuildCvHob ( VOID EFIAPI BuildCpuHob ( - IN UINT8 SizeOfMemorySpace, - IN UINT8 SizeOfIoSpace + IN UINT8 SizeOfMemorySpace, + IN UINT8 SizeOfIoSpace ) { // @@ -564,8 +569,8 @@ BuildCpuHob ( VOID EFIAPI BuildStackHob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length ) { // @@ -591,9 +596,9 @@ BuildStackHob ( VOID EFIAPI BuildBspStoreHob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length, - IN EFI_MEMORY_TYPE MemoryType + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length, + IN EFI_MEMORY_TYPE MemoryType ) { // @@ -619,9 +624,9 @@ BuildBspStoreHob ( VOID EFIAPI BuildMemoryAllocationHob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length, - IN EFI_MEMORY_TYPE MemoryType + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length, + IN EFI_MEMORY_TYPE MemoryType ) { // diff --git a/MdePkg/Library/DxeHstiLib/HstiAip.c b/MdePkg/Library/DxeHstiLib/HstiAip.c index 1a3dfc1..a2454ff 100644 --- a/MdePkg/Library/DxeHstiLib/HstiAip.c +++ b/MdePkg/Library/DxeHstiLib/HstiAip.c @@ -43,16 +43,18 @@ HstiAipGetInfo ( if ((This == NULL) || (InformationBlock == NULL) || (InformationBlockSize == NULL)) { return EFI_INVALID_PARAMETER; } + if (!CompareGuid (InformationType, &gAdapterInfoPlatformSecurityGuid)) { return EFI_UNSUPPORTED; } - HstiAip = HSTI_AIP_PRIVATE_DATA_FROM_THIS(This); + HstiAip = HSTI_AIP_PRIVATE_DATA_FROM_THIS (This); *InformationBlock = AllocateCopyPool (HstiAip->HstiSize, HstiAip->Hsti); if (*InformationBlock == NULL) { return EFI_OUT_OF_RESOURCES; } + *InformationBlockSize = HstiAip->HstiSize; return EFI_SUCCESS; } @@ -93,6 +95,7 @@ HstiAipSetInfo ( if ((This == NULL) || (InformationBlock == NULL)) { return EFI_INVALID_PARAMETER; } + if (!CompareGuid (InformationType, &gAdapterInfoPlatformSecurityGuid)) { return EFI_UNSUPPORTED; } @@ -101,16 +104,17 @@ HstiAipSetInfo ( return EFI_VOLUME_CORRUPTED; } - HstiAip = HSTI_AIP_PRIVATE_DATA_FROM_THIS(This); + HstiAip = HSTI_AIP_PRIVATE_DATA_FROM_THIS (This); if (InformationBlockSize > HstiAip->HstiMaxSize) { NewHsti = AllocateZeroPool (InformationBlockSize); if (NewHsti == NULL) { return EFI_OUT_OF_RESOURCES; } + FreePool (HstiAip->Hsti); - HstiAip->Hsti = NewHsti; - HstiAip->HstiSize = 0; + HstiAip->Hsti = NewHsti; + HstiAip->HstiSize = 0; HstiAip->HstiMaxSize = InformationBlockSize; } @@ -153,16 +157,17 @@ HstiAipGetSupportedTypes ( return EFI_INVALID_PARAMETER; } - *InfoTypesBuffer = AllocateCopyPool (sizeof(gAdapterInfoPlatformSecurityGuid), &gAdapterInfoPlatformSecurityGuid); + *InfoTypesBuffer = AllocateCopyPool (sizeof (gAdapterInfoPlatformSecurityGuid), &gAdapterInfoPlatformSecurityGuid); if (*InfoTypesBuffer == NULL) { return EFI_OUT_OF_RESOURCES; } + *InfoTypesBufferCount = 1; return EFI_SUCCESS; } -EFI_ADAPTER_INFORMATION_PROTOCOL mAdapterInformationProtocol = { +EFI_ADAPTER_INFORMATION_PROTOCOL mAdapterInformationProtocol = { HstiAipGetInfo, HstiAipSetInfo, HstiAipGetSupportedTypes, diff --git a/MdePkg/Library/DxeHstiLib/HstiDxe.c b/MdePkg/Library/DxeHstiLib/HstiDxe.c index 3f4d8eb..d895599 100644 --- a/MdePkg/Library/DxeHstiLib/HstiDxe.c +++ b/MdePkg/Library/DxeHstiLib/HstiDxe.c @@ -25,10 +25,10 @@ **/ VOID * InternalHstiFindAip ( - IN UINT32 Role, - IN CHAR16 *ImplementationID OPTIONAL, - OUT VOID **HstiData OPTIONAL, - OUT UINTN *HstiSize OPTIONAL + IN UINT32 Role, + IN CHAR16 *ImplementationID OPTIONAL, + OUT VOID **HstiData OPTIONAL, + OUT UINTN *HstiSize OPTIONAL ) { EFI_STATUS Status; @@ -55,9 +55,9 @@ InternalHstiFindAip ( return NULL; } - Hsti = NULL; - Aip = NULL; - InformationBlock = NULL; + Hsti = NULL; + Aip = NULL; + InformationBlock = NULL; InformationBlockSize = 0; for (Index = 0; Index < NoHandles; Index++) { Status = gBS->HandleProtocol ( @@ -88,6 +88,7 @@ InternalHstiFindAip ( break; } } + FreePool (InfoTypesBuffer); if (AipCandidate == NULL) { @@ -97,7 +98,7 @@ InternalHstiFindAip ( // // Check HSTI Role // - Aip = AipCandidate; + Aip = AipCandidate; Status = Aip->GetInformation ( Aip, &gAdapterInfoPlatformSecurityGuid, @@ -110,7 +111,8 @@ InternalHstiFindAip ( Hsti = InformationBlock; if ((Hsti->Role == Role) && - ((ImplementationID == NULL) || (StrCmp (ImplementationID, Hsti->ImplementationID) == 0))) { + ((ImplementationID == NULL) || (StrCmp (ImplementationID, Hsti->ImplementationID) == 0))) + { break; } else { Hsti = NULL; @@ -118,6 +120,7 @@ InternalHstiFindAip ( continue; } } + FreePool (Handles); if (Hsti == NULL) { @@ -127,9 +130,11 @@ InternalHstiFindAip ( if (HstiData != NULL) { *HstiData = InformationBlock; } + if (HstiSize != NULL) { *HstiSize = InformationBlockSize; } + return Aip; } @@ -144,8 +149,8 @@ InternalHstiFindAip ( **/ BOOLEAN InternalHstiIsValidTable ( - IN VOID *HstiData, - IN UINTN HstiSize + IN VOID *HstiData, + IN UINTN HstiSize ) { ADAPTER_INFO_PLATFORM_SECURITY *Hsti; @@ -164,11 +169,13 @@ InternalHstiIsValidTable ( DEBUG ((DEBUG_ERROR, "HstiData == NULL\n")); return FALSE; } - if (HstiSize < sizeof(ADAPTER_INFO_PLATFORM_SECURITY)) { + + if (HstiSize < sizeof (ADAPTER_INFO_PLATFORM_SECURITY)) { DEBUG ((DEBUG_ERROR, "HstiSize < sizeof(ADAPTER_INFO_PLATFORM_SECURITY)\n")); return FALSE; } - if (((HstiSize - sizeof(ADAPTER_INFO_PLATFORM_SECURITY)) / 3) < Hsti->SecurityFeaturesSize) { + + if (((HstiSize - sizeof (ADAPTER_INFO_PLATFORM_SECURITY)) / 3) < Hsti->SecurityFeaturesSize) { DEBUG ((DEBUG_ERROR, "((HstiSize - sizeof(ADAPTER_INFO_PLATFORM_SECURITY)) / 3) < SecurityFeaturesSize\n")); return FALSE; } @@ -185,7 +192,8 @@ InternalHstiIsValidTable ( // Check Role // if ((Hsti->Role < PLATFORM_SECURITY_ROLE_PLATFORM_REFERENCE) || - (Hsti->Role > PLATFORM_SECURITY_ROLE_IMPLEMENTOR_ODM)) { + (Hsti->Role > PLATFORM_SECURITY_ROLE_IMPLEMENTOR_ODM)) + { DEBUG ((DEBUG_ERROR, "Role < PLATFORM_SECURITY_ROLE_PLATFORM_REFERENCE ||\n")); DEBUG ((DEBUG_ERROR, "Role > PLATFORM_SECURITY_ROLE_IMPLEMENTOR_ODM\n")); return FALSE; @@ -194,18 +202,19 @@ InternalHstiIsValidTable ( // // Check ImplementationID // - for (Index = 0; Index < sizeof(Hsti->ImplementationID)/sizeof(Hsti->ImplementationID[0]); Index++) { + for (Index = 0; Index < sizeof (Hsti->ImplementationID)/sizeof (Hsti->ImplementationID[0]); Index++) { if (Hsti->ImplementationID[Index] == 0) { break; } } - if (Index == sizeof(Hsti->ImplementationID)/sizeof(Hsti->ImplementationID[0])) { + + if (Index == sizeof (Hsti->ImplementationID)/sizeof (Hsti->ImplementationID[0])) { DEBUG ((DEBUG_ERROR, "ImplementationID has no NUL CHAR\n")); return FALSE; } - ErrorStringSize = HstiSize - sizeof(ADAPTER_INFO_PLATFORM_SECURITY) - Hsti->SecurityFeaturesSize * 3; - ErrorString = (CHAR16 *)((UINTN)Hsti + sizeof(ADAPTER_INFO_PLATFORM_SECURITY) + Hsti->SecurityFeaturesSize * 3); + ErrorStringSize = HstiSize - sizeof (ADAPTER_INFO_PLATFORM_SECURITY) - Hsti->SecurityFeaturesSize * 3; + ErrorString = (CHAR16 *)((UINTN)Hsti + sizeof (ADAPTER_INFO_PLATFORM_SECURITY) + Hsti->SecurityFeaturesSize * 3); // // basic check for ErrorString @@ -214,6 +223,7 @@ InternalHstiIsValidTable ( DEBUG ((DEBUG_ERROR, "ErrorStringSize == 0\n")); return FALSE; } + if ((ErrorStringSize & BIT0) != 0) { DEBUG ((DEBUG_ERROR, "(ErrorStringSize & BIT0) != 0\n")); return FALSE; @@ -222,10 +232,10 @@ InternalHstiIsValidTable ( // // ErrorString might not be CHAR16 aligned. // - CopyMem (&ErrorChar, ErrorString, sizeof(ErrorChar)); + CopyMem (&ErrorChar, ErrorString, sizeof (ErrorChar)); for (ErrorStringLength = 0; (ErrorChar != 0) && (ErrorStringLength < (ErrorStringSize/2)); ErrorStringLength++) { ErrorString++; - CopyMem (&ErrorChar, ErrorString, sizeof(ErrorChar)); + CopyMem (&ErrorChar, ErrorString, sizeof (ErrorChar)); } // @@ -235,6 +245,7 @@ InternalHstiIsValidTable ( DEBUG ((DEBUG_ERROR, "ErrorString has no NUL CHAR\n")); return FALSE; } + if (ErrorStringLength == (ErrorStringSize/2)) { DEBUG ((DEBUG_ERROR, "ErrorString Length incorrect\n")); return FALSE; @@ -262,48 +273,50 @@ InternalHstiIsValidTable ( EFI_STATUS EFIAPI HstiLibSetTable ( - IN VOID *Hsti, - IN UINTN HstiSize + IN VOID *Hsti, + IN UINTN HstiSize ) { - EFI_STATUS Status; - EFI_HANDLE Handle; - HSTI_AIP_PRIVATE_DATA *HstiAip; - EFI_ADAPTER_INFORMATION_PROTOCOL *Aip; - UINT32 Role; - CHAR16 *ImplementationID; - UINT32 SecurityFeaturesSize; - UINT8 *SecurityFeaturesRequired; + EFI_STATUS Status; + EFI_HANDLE Handle; + HSTI_AIP_PRIVATE_DATA *HstiAip; + EFI_ADAPTER_INFORMATION_PROTOCOL *Aip; + UINT32 Role; + CHAR16 *ImplementationID; + UINT32 SecurityFeaturesSize; + UINT8 *SecurityFeaturesRequired; if (!InternalHstiIsValidTable (Hsti, HstiSize)) { return EFI_VOLUME_CORRUPTED; } - Role = ((ADAPTER_INFO_PLATFORM_SECURITY *)Hsti)->Role; + Role = ((ADAPTER_INFO_PLATFORM_SECURITY *)Hsti)->Role; ImplementationID = ((ADAPTER_INFO_PLATFORM_SECURITY *)Hsti)->ImplementationID; - Aip = InternalHstiFindAip (Role, ImplementationID, NULL, NULL); + Aip = InternalHstiFindAip (Role, ImplementationID, NULL, NULL); if (Aip != NULL) { return EFI_ALREADY_STARTED; } - HstiAip = AllocateZeroPool (sizeof(HSTI_AIP_PRIVATE_DATA)); + HstiAip = AllocateZeroPool (sizeof (HSTI_AIP_PRIVATE_DATA)); if (HstiAip == NULL) { return EFI_OUT_OF_RESOURCES; } + HstiAip->Hsti = AllocateCopyPool (HstiSize, Hsti); if (HstiAip->Hsti == NULL) { FreePool (HstiAip); return EFI_OUT_OF_RESOURCES; } + if (Role != PLATFORM_SECURITY_ROLE_PLATFORM_REFERENCE) { - SecurityFeaturesRequired = (UINT8 *)HstiAip->Hsti + sizeof(ADAPTER_INFO_PLATFORM_SECURITY); - SecurityFeaturesSize = ((ADAPTER_INFO_PLATFORM_SECURITY *)Hsti)->SecurityFeaturesSize; + SecurityFeaturesRequired = (UINT8 *)HstiAip->Hsti + sizeof (ADAPTER_INFO_PLATFORM_SECURITY); + SecurityFeaturesSize = ((ADAPTER_INFO_PLATFORM_SECURITY *)Hsti)->SecurityFeaturesSize; ZeroMem (SecurityFeaturesRequired, SecurityFeaturesSize); } HstiAip->Signature = HSTI_AIP_PRIVATE_SIGNATURE; - CopyMem (&HstiAip->Aip, &mAdapterInformationProtocol, sizeof(EFI_ADAPTER_INFORMATION_PROTOCOL)); - HstiAip->HstiSize = HstiSize; + CopyMem (&HstiAip->Aip, &mAdapterInformationProtocol, sizeof (EFI_ADAPTER_INFORMATION_PROTOCOL)); + HstiAip->HstiSize = HstiSize; HstiAip->HstiMaxSize = HstiSize; Handle = NULL; @@ -340,18 +353,19 @@ HstiLibSetTable ( EFI_STATUS EFIAPI HstiLibGetTable ( - IN UINT32 Role, - IN CHAR16 *ImplementationID OPTIONAL, - OUT VOID **Hsti, - OUT UINTN *HstiSize + IN UINT32 Role, + IN CHAR16 *ImplementationID OPTIONAL, + OUT VOID **Hsti, + OUT UINTN *HstiSize ) { - EFI_ADAPTER_INFORMATION_PROTOCOL *Aip; + EFI_ADAPTER_INFORMATION_PROTOCOL *Aip; Aip = InternalHstiFindAip (Role, ImplementationID, Hsti, HstiSize); if (Aip == NULL) { return EFI_NOT_FOUND; } + return EFI_SUCCESS; } @@ -374,18 +388,18 @@ HstiLibGetTable ( **/ EFI_STATUS InternalHstiRecordFeaturesVerified ( - IN UINT32 Role, - IN CHAR16 *ImplementationID OPTIONAL, - IN UINT32 ByteIndex, - IN UINT8 Bit, - IN BOOLEAN Set + IN UINT32 Role, + IN CHAR16 *ImplementationID OPTIONAL, + IN UINT32 ByteIndex, + IN UINT8 Bit, + IN BOOLEAN Set ) { - EFI_ADAPTER_INFORMATION_PROTOCOL *Aip; - ADAPTER_INFO_PLATFORM_SECURITY *Hsti; - UINTN HstiSize; - UINT8 *SecurityFeaturesVerified; - EFI_STATUS Status; + EFI_ADAPTER_INFORMATION_PROTOCOL *Aip; + ADAPTER_INFO_PLATFORM_SECURITY *Hsti; + UINTN HstiSize; + UINT8 *SecurityFeaturesVerified; + EFI_STATUS Status; Aip = InternalHstiFindAip (Role, ImplementationID, (VOID **)&Hsti, &HstiSize); if (Aip == NULL) { @@ -396,7 +410,7 @@ InternalHstiRecordFeaturesVerified ( return EFI_UNSUPPORTED; } - SecurityFeaturesVerified = (UINT8 *)((UINTN)Hsti + sizeof(ADAPTER_INFO_PLATFORM_SECURITY) + Hsti->SecurityFeaturesSize * 2); + SecurityFeaturesVerified = (UINT8 *)((UINTN)Hsti + sizeof (ADAPTER_INFO_PLATFORM_SECURITY) + Hsti->SecurityFeaturesSize * 2); if (Set) { SecurityFeaturesVerified[ByteIndex] = (UINT8)(SecurityFeaturesVerified[ByteIndex] | (Bit)); @@ -432,10 +446,10 @@ InternalHstiRecordFeaturesVerified ( EFI_STATUS EFIAPI HstiLibSetFeaturesVerified ( - IN UINT32 Role, - IN CHAR16 *ImplementationID OPTIONAL, - IN UINT32 ByteIndex, - IN UINT8 BitMask + IN UINT32 Role, + IN CHAR16 *ImplementationID OPTIONAL, + IN UINT32 ByteIndex, + IN UINT8 BitMask ) { return InternalHstiRecordFeaturesVerified ( @@ -465,10 +479,10 @@ HstiLibSetFeaturesVerified ( EFI_STATUS EFIAPI HstiLibClearFeaturesVerified ( - IN UINT32 Role, - IN CHAR16 *ImplementationID OPTIONAL, - IN UINT32 ByteIndex, - IN UINT8 BitMask + IN UINT32 Role, + IN CHAR16 *ImplementationID OPTIONAL, + IN UINT32 ByteIndex, + IN UINT8 BitMask ) { return InternalHstiRecordFeaturesVerified ( @@ -498,20 +512,20 @@ HstiLibClearFeaturesVerified ( **/ EFI_STATUS InternalHstiRecordErrorString ( - IN UINT32 Role, - IN CHAR16 *ImplementationID OPTIONAL, - IN CHAR16 *ErrorString, - IN BOOLEAN Append + IN UINT32 Role, + IN CHAR16 *ImplementationID OPTIONAL, + IN CHAR16 *ErrorString, + IN BOOLEAN Append ) { - EFI_ADAPTER_INFORMATION_PROTOCOL *Aip; - ADAPTER_INFO_PLATFORM_SECURITY *Hsti; - UINTN HstiSize; - UINTN StringSize; - VOID *NewHsti; - UINTN NewHstiSize; - UINTN Offset; - EFI_STATUS Status; + EFI_ADAPTER_INFORMATION_PROTOCOL *Aip; + ADAPTER_INFO_PLATFORM_SECURITY *Hsti; + UINTN HstiSize; + UINTN StringSize; + VOID *NewHsti; + UINTN NewHstiSize; + UINTN Offset; + EFI_STATUS Status; Aip = InternalHstiFindAip (Role, ImplementationID, (VOID **)&Hsti, &HstiSize); if (Aip == NULL) { @@ -519,14 +533,15 @@ InternalHstiRecordErrorString ( } if (Append) { - Offset = HstiSize - sizeof(CHAR16); + Offset = HstiSize - sizeof (CHAR16); } else { - Offset = sizeof(ADAPTER_INFO_PLATFORM_SECURITY) + Hsti->SecurityFeaturesSize * 3; + Offset = sizeof (ADAPTER_INFO_PLATFORM_SECURITY) + Hsti->SecurityFeaturesSize * 3; } + StringSize = StrSize (ErrorString); NewHstiSize = Offset + StringSize; - NewHsti = AllocatePool (NewHstiSize); + NewHsti = AllocatePool (NewHstiSize); if (NewHsti == NULL) { return EFI_OUT_OF_RESOURCES; } @@ -562,9 +577,9 @@ InternalHstiRecordErrorString ( EFI_STATUS EFIAPI HstiLibAppendErrorString ( - IN UINT32 Role, - IN CHAR16 *ImplementationID OPTIONAL, - IN CHAR16 *ErrorString + IN UINT32 Role, + IN CHAR16 *ImplementationID OPTIONAL, + IN CHAR16 *ErrorString ) { return InternalHstiRecordErrorString ( @@ -592,9 +607,9 @@ HstiLibAppendErrorString ( EFI_STATUS EFIAPI HstiLibSetErrorString ( - IN UINT32 Role, - IN CHAR16 *ImplementationID OPTIONAL, - IN CHAR16 *ErrorString + IN UINT32 Role, + IN CHAR16 *ImplementationID OPTIONAL, + IN CHAR16 *ErrorString ) { return InternalHstiRecordErrorString ( diff --git a/MdePkg/Library/DxeHstiLib/HstiDxe.h b/MdePkg/Library/DxeHstiLib/HstiDxe.h index 218297a..e655699 100644 --- a/MdePkg/Library/DxeHstiLib/HstiDxe.h +++ b/MdePkg/Library/DxeHstiLib/HstiDxe.h @@ -22,12 +22,12 @@ #define HSTI_AIP_PRIVATE_SIGNATURE SIGNATURE_32('H', 'S', 'T', 'I') typedef struct { - UINT32 Signature; - LIST_ENTRY Link; - EFI_ADAPTER_INFORMATION_PROTOCOL Aip; - VOID *Hsti; - UINTN HstiSize; - UINTN HstiMaxSize; + UINT32 Signature; + LIST_ENTRY Link; + EFI_ADAPTER_INFORMATION_PROTOCOL Aip; + VOID *Hsti; + UINTN HstiSize; + UINTN HstiMaxSize; } HSTI_AIP_PRIVATE_DATA; #define HSTI_AIP_PRIVATE_DATA_FROM_THIS(a) \ @@ -39,7 +39,7 @@ typedef struct { #define HSTI_DEFAULT_ERROR_STRING_LEN 255 -extern EFI_ADAPTER_INFORMATION_PROTOCOL mAdapterInformationProtocol; +extern EFI_ADAPTER_INFORMATION_PROTOCOL mAdapterInformationProtocol; /** Return if input HSTI data follows HSTI specification. @@ -52,8 +52,8 @@ extern EFI_ADAPTER_INFORMATION_PROTOCOL mAdapterInformationProtocol; **/ BOOLEAN InternalHstiIsValidTable ( - IN VOID *HstiData, - IN UINTN HstiSize + IN VOID *HstiData, + IN UINTN HstiSize ); #endif diff --git a/MdePkg/Library/DxeIoLibCpuIo2/DxeCpuIo2LibInternal.h b/MdePkg/Library/DxeIoLibCpuIo2/DxeCpuIo2LibInternal.h index b6797c3..5beff18 100644 --- a/MdePkg/Library/DxeIoLibCpuIo2/DxeCpuIo2LibInternal.h +++ b/MdePkg/Library/DxeIoLibCpuIo2/DxeCpuIo2LibInternal.h @@ -20,7 +20,6 @@ #include #include - /** Reads registers in the EFI CPU I/O space. @@ -136,8 +135,8 @@ IoWriteFifoWorker ( UINT64 EFIAPI MmioReadWorker ( - IN UINTN Address, - IN EFI_CPU_IO_PROTOCOL_WIDTH Width + IN UINTN Address, + IN EFI_CPU_IO_PROTOCOL_WIDTH Width ); /** @@ -158,9 +157,9 @@ MmioReadWorker ( UINT64 EFIAPI MmioWriteWorker ( - IN UINTN Address, - IN EFI_CPU_IO_PROTOCOL_WIDTH Width, - IN UINT64 Data + IN UINTN Address, + IN EFI_CPU_IO_PROTOCOL_WIDTH Width, + IN UINT64 Data ); #endif diff --git a/MdePkg/Library/DxeIoLibCpuIo2/IoHighLevel.c b/MdePkg/Library/DxeIoLibCpuIo2/IoHighLevel.c index ac4d3a6..94d4786 100644 --- a/MdePkg/Library/DxeIoLibCpuIo2/IoHighLevel.c +++ b/MdePkg/Library/DxeIoLibCpuIo2/IoHighLevel.c @@ -9,7 +9,6 @@ **/ - #include "DxeCpuIo2LibInternal.h" /** @@ -33,11 +32,11 @@ UINT8 EFIAPI IoOr8 ( - IN UINTN Port, - IN UINT8 OrData + IN UINTN Port, + IN UINT8 OrData ) { - return IoWrite8 (Port, (UINT8) (IoRead8 (Port) | OrData)); + return IoWrite8 (Port, (UINT8)(IoRead8 (Port) | OrData)); } /** @@ -61,11 +60,11 @@ IoOr8 ( UINT8 EFIAPI IoAnd8 ( - IN UINTN Port, - IN UINT8 AndData + IN UINTN Port, + IN UINT8 AndData ) { - return IoWrite8 (Port, (UINT8) (IoRead8 (Port) & AndData)); + return IoWrite8 (Port, (UINT8)(IoRead8 (Port) & AndData)); } /** @@ -91,12 +90,12 @@ IoAnd8 ( UINT8 EFIAPI IoAndThenOr8 ( - IN UINTN Port, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Port, + IN UINT8 AndData, + IN UINT8 OrData ) { - return IoWrite8 (Port, (UINT8) ((IoRead8 (Port) & AndData) | OrData)); + return IoWrite8 (Port, (UINT8)((IoRead8 (Port) & AndData) | OrData)); } /** @@ -122,9 +121,9 @@ IoAndThenOr8 ( UINT8 EFIAPI IoBitFieldRead8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead8 (IoRead8 (Port), StartBit, EndBit); @@ -157,10 +156,10 @@ IoBitFieldRead8 ( UINT8 EFIAPI IoBitFieldWrite8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) { return IoWrite8 ( @@ -198,10 +197,10 @@ IoBitFieldWrite8 ( UINT8 EFIAPI IoBitFieldOr8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) { return IoWrite8 ( @@ -239,10 +238,10 @@ IoBitFieldOr8 ( UINT8 EFIAPI IoBitFieldAnd8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ) { return IoWrite8 ( @@ -284,11 +283,11 @@ IoBitFieldAnd8 ( UINT8 EFIAPI IoBitFieldAndThenOr8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) { return IoWrite8 ( @@ -318,11 +317,11 @@ IoBitFieldAndThenOr8 ( UINT16 EFIAPI IoOr16 ( - IN UINTN Port, - IN UINT16 OrData + IN UINTN Port, + IN UINT16 OrData ) { - return IoWrite16 (Port, (UINT16) (IoRead16 (Port) | OrData)); + return IoWrite16 (Port, (UINT16)(IoRead16 (Port) | OrData)); } /** @@ -346,11 +345,11 @@ IoOr16 ( UINT16 EFIAPI IoAnd16 ( - IN UINTN Port, - IN UINT16 AndData + IN UINTN Port, + IN UINT16 AndData ) { - return IoWrite16 (Port, (UINT16) (IoRead16 (Port) & AndData)); + return IoWrite16 (Port, (UINT16)(IoRead16 (Port) & AndData)); } /** @@ -376,12 +375,12 @@ IoAnd16 ( UINT16 EFIAPI IoAndThenOr16 ( - IN UINTN Port, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Port, + IN UINT16 AndData, + IN UINT16 OrData ) { - return IoWrite16 (Port, (UINT16) ((IoRead16 (Port) & AndData) | OrData)); + return IoWrite16 (Port, (UINT16)((IoRead16 (Port) & AndData) | OrData)); } /** @@ -407,9 +406,9 @@ IoAndThenOr16 ( UINT16 EFIAPI IoBitFieldRead16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead16 (IoRead16 (Port), StartBit, EndBit); @@ -442,10 +441,10 @@ IoBitFieldRead16 ( UINT16 EFIAPI IoBitFieldWrite16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ) { return IoWrite16 ( @@ -483,10 +482,10 @@ IoBitFieldWrite16 ( UINT16 EFIAPI IoBitFieldOr16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ) { return IoWrite16 ( @@ -524,10 +523,10 @@ IoBitFieldOr16 ( UINT16 EFIAPI IoBitFieldAnd16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ) { return IoWrite16 ( @@ -569,11 +568,11 @@ IoBitFieldAnd16 ( UINT16 EFIAPI IoBitFieldAndThenOr16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ) { return IoWrite16 ( @@ -603,8 +602,8 @@ IoBitFieldAndThenOr16 ( UINT32 EFIAPI IoOr32 ( - IN UINTN Port, - IN UINT32 OrData + IN UINTN Port, + IN UINT32 OrData ) { return IoWrite32 (Port, IoRead32 (Port) | OrData); @@ -631,8 +630,8 @@ IoOr32 ( UINT32 EFIAPI IoAnd32 ( - IN UINTN Port, - IN UINT32 AndData + IN UINTN Port, + IN UINT32 AndData ) { return IoWrite32 (Port, IoRead32 (Port) & AndData); @@ -661,9 +660,9 @@ IoAnd32 ( UINT32 EFIAPI IoAndThenOr32 ( - IN UINTN Port, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Port, + IN UINT32 AndData, + IN UINT32 OrData ) { return IoWrite32 (Port, (IoRead32 (Port) & AndData) | OrData); @@ -692,9 +691,9 @@ IoAndThenOr32 ( UINT32 EFIAPI IoBitFieldRead32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead32 (IoRead32 (Port), StartBit, EndBit); @@ -727,10 +726,10 @@ IoBitFieldRead32 ( UINT32 EFIAPI IoBitFieldWrite32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { return IoWrite32 ( @@ -768,10 +767,10 @@ IoBitFieldWrite32 ( UINT32 EFIAPI IoBitFieldOr32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { return IoWrite32 ( @@ -809,10 +808,10 @@ IoBitFieldOr32 ( UINT32 EFIAPI IoBitFieldAnd32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { return IoWrite32 ( @@ -854,11 +853,11 @@ IoBitFieldAnd32 ( UINT32 EFIAPI IoBitFieldAndThenOr32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { return IoWrite32 ( @@ -888,8 +887,8 @@ IoBitFieldAndThenOr32 ( UINT64 EFIAPI IoOr64 ( - IN UINTN Port, - IN UINT64 OrData + IN UINTN Port, + IN UINT64 OrData ) { return IoWrite64 (Port, IoRead64 (Port) | OrData); @@ -916,8 +915,8 @@ IoOr64 ( UINT64 EFIAPI IoAnd64 ( - IN UINTN Port, - IN UINT64 AndData + IN UINTN Port, + IN UINT64 AndData ) { return IoWrite64 (Port, IoRead64 (Port) & AndData); @@ -946,9 +945,9 @@ IoAnd64 ( UINT64 EFIAPI IoAndThenOr64 ( - IN UINTN Port, - IN UINT64 AndData, - IN UINT64 OrData + IN UINTN Port, + IN UINT64 AndData, + IN UINT64 OrData ) { return IoWrite64 (Port, (IoRead64 (Port) & AndData) | OrData); @@ -977,9 +976,9 @@ IoAndThenOr64 ( UINT64 EFIAPI IoBitFieldRead64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead64 (IoRead64 (Port), StartBit, EndBit); @@ -1012,10 +1011,10 @@ IoBitFieldRead64 ( UINT64 EFIAPI IoBitFieldWrite64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 Value + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 Value ) { return IoWrite64 ( @@ -1053,10 +1052,10 @@ IoBitFieldWrite64 ( UINT64 EFIAPI IoBitFieldOr64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 OrData ) { return IoWrite64 ( @@ -1094,10 +1093,10 @@ IoBitFieldOr64 ( UINT64 EFIAPI IoBitFieldAnd64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData ) { return IoWrite64 ( @@ -1139,11 +1138,11 @@ IoBitFieldAnd64 ( UINT64 EFIAPI IoBitFieldAndThenOr64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData, - IN UINT64 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData, + IN UINT64 OrData ) { return IoWrite64 ( @@ -1173,11 +1172,11 @@ IoBitFieldAndThenOr64 ( UINT8 EFIAPI MmioOr8 ( - IN UINTN Address, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 OrData ) { - return MmioWrite8 (Address, (UINT8) (MmioRead8 (Address) | OrData)); + return MmioWrite8 (Address, (UINT8)(MmioRead8 (Address) | OrData)); } /** @@ -1201,11 +1200,11 @@ MmioOr8 ( UINT8 EFIAPI MmioAnd8 ( - IN UINTN Address, - IN UINT8 AndData + IN UINTN Address, + IN UINT8 AndData ) { - return MmioWrite8 (Address, (UINT8) (MmioRead8 (Address) & AndData)); + return MmioWrite8 (Address, (UINT8)(MmioRead8 (Address) & AndData)); } /** @@ -1232,12 +1231,12 @@ MmioAnd8 ( UINT8 EFIAPI MmioAndThenOr8 ( - IN UINTN Address, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 AndData, + IN UINT8 OrData ) { - return MmioWrite8 (Address, (UINT8) ((MmioRead8 (Address) & AndData) | OrData)); + return MmioWrite8 (Address, (UINT8)((MmioRead8 (Address) & AndData) | OrData)); } /** @@ -1263,9 +1262,9 @@ MmioAndThenOr8 ( UINT8 EFIAPI MmioBitFieldRead8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead8 (MmioRead8 (Address), StartBit, EndBit); @@ -1297,10 +1296,10 @@ MmioBitFieldRead8 ( UINT8 EFIAPI MmioBitFieldWrite8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) { return MmioWrite8 ( @@ -1339,10 +1338,10 @@ MmioBitFieldWrite8 ( UINT8 EFIAPI MmioBitFieldOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) { return MmioWrite8 ( @@ -1381,10 +1380,10 @@ MmioBitFieldOr8 ( UINT8 EFIAPI MmioBitFieldAnd8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ) { return MmioWrite8 ( @@ -1426,11 +1425,11 @@ MmioBitFieldAnd8 ( UINT8 EFIAPI MmioBitFieldAndThenOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) { return MmioWrite8 ( @@ -1460,11 +1459,11 @@ MmioBitFieldAndThenOr8 ( UINT16 EFIAPI MmioOr16 ( - IN UINTN Address, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 OrData ) { - return MmioWrite16 (Address, (UINT16) (MmioRead16 (Address) | OrData)); + return MmioWrite16 (Address, (UINT16)(MmioRead16 (Address) | OrData)); } /** @@ -1488,11 +1487,11 @@ MmioOr16 ( UINT16 EFIAPI MmioAnd16 ( - IN UINTN Address, - IN UINT16 AndData + IN UINTN Address, + IN UINT16 AndData ) { - return MmioWrite16 (Address, (UINT16) (MmioRead16 (Address) & AndData)); + return MmioWrite16 (Address, (UINT16)(MmioRead16 (Address) & AndData)); } /** @@ -1519,12 +1518,12 @@ MmioAnd16 ( UINT16 EFIAPI MmioAndThenOr16 ( - IN UINTN Address, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 AndData, + IN UINT16 OrData ) { - return MmioWrite16 (Address, (UINT16) ((MmioRead16 (Address) & AndData) | OrData)); + return MmioWrite16 (Address, (UINT16)((MmioRead16 (Address) & AndData) | OrData)); } /** @@ -1550,9 +1549,9 @@ MmioAndThenOr16 ( UINT16 EFIAPI MmioBitFieldRead16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead16 (MmioRead16 (Address), StartBit, EndBit); @@ -1584,10 +1583,10 @@ MmioBitFieldRead16 ( UINT16 EFIAPI MmioBitFieldWrite16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ) { return MmioWrite16 ( @@ -1626,10 +1625,10 @@ MmioBitFieldWrite16 ( UINT16 EFIAPI MmioBitFieldOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ) { return MmioWrite16 ( @@ -1668,10 +1667,10 @@ MmioBitFieldOr16 ( UINT16 EFIAPI MmioBitFieldAnd16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ) { return MmioWrite16 ( @@ -1713,11 +1712,11 @@ MmioBitFieldAnd16 ( UINT16 EFIAPI MmioBitFieldAndThenOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ) { return MmioWrite16 ( @@ -1747,8 +1746,8 @@ MmioBitFieldAndThenOr16 ( UINT32 EFIAPI MmioOr32 ( - IN UINTN Address, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 OrData ) { return MmioWrite32 (Address, MmioRead32 (Address) | OrData); @@ -1775,8 +1774,8 @@ MmioOr32 ( UINT32 EFIAPI MmioAnd32 ( - IN UINTN Address, - IN UINT32 AndData + IN UINTN Address, + IN UINT32 AndData ) { return MmioWrite32 (Address, MmioRead32 (Address) & AndData); @@ -1806,9 +1805,9 @@ MmioAnd32 ( UINT32 EFIAPI MmioAndThenOr32 ( - IN UINTN Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 AndData, + IN UINT32 OrData ) { return MmioWrite32 (Address, (MmioRead32 (Address) & AndData) | OrData); @@ -1837,9 +1836,9 @@ MmioAndThenOr32 ( UINT32 EFIAPI MmioBitFieldRead32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead32 (MmioRead32 (Address), StartBit, EndBit); @@ -1871,10 +1870,10 @@ MmioBitFieldRead32 ( UINT32 EFIAPI MmioBitFieldWrite32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { return MmioWrite32 ( @@ -1913,10 +1912,10 @@ MmioBitFieldWrite32 ( UINT32 EFIAPI MmioBitFieldOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { return MmioWrite32 ( @@ -1955,10 +1954,10 @@ MmioBitFieldOr32 ( UINT32 EFIAPI MmioBitFieldAnd32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { return MmioWrite32 ( @@ -2000,11 +1999,11 @@ MmioBitFieldAnd32 ( UINT32 EFIAPI MmioBitFieldAndThenOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { return MmioWrite32 ( @@ -2034,8 +2033,8 @@ MmioBitFieldAndThenOr32 ( UINT64 EFIAPI MmioOr64 ( - IN UINTN Address, - IN UINT64 OrData + IN UINTN Address, + IN UINT64 OrData ) { return MmioWrite64 (Address, MmioRead64 (Address) | OrData); @@ -2062,8 +2061,8 @@ MmioOr64 ( UINT64 EFIAPI MmioAnd64 ( - IN UINTN Address, - IN UINT64 AndData + IN UINTN Address, + IN UINT64 AndData ) { return MmioWrite64 (Address, MmioRead64 (Address) & AndData); @@ -2093,9 +2092,9 @@ MmioAnd64 ( UINT64 EFIAPI MmioAndThenOr64 ( - IN UINTN Address, - IN UINT64 AndData, - IN UINT64 OrData + IN UINTN Address, + IN UINT64 AndData, + IN UINT64 OrData ) { return MmioWrite64 (Address, (MmioRead64 (Address) & AndData) | OrData); @@ -2124,9 +2123,9 @@ MmioAndThenOr64 ( UINT64 EFIAPI MmioBitFieldRead64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead64 (MmioRead64 (Address), StartBit, EndBit); @@ -2158,10 +2157,10 @@ MmioBitFieldRead64 ( UINT64 EFIAPI MmioBitFieldWrite64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 Value ) { return MmioWrite64 ( @@ -2200,10 +2199,10 @@ MmioBitFieldWrite64 ( UINT64 EFIAPI MmioBitFieldOr64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 OrData ) { return MmioWrite64 ( @@ -2242,10 +2241,10 @@ MmioBitFieldOr64 ( UINT64 EFIAPI MmioBitFieldAnd64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData ) { return MmioWrite64 ( @@ -2287,11 +2286,11 @@ MmioBitFieldAnd64 ( UINT64 EFIAPI MmioBitFieldAndThenOr64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData, - IN UINT64 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData, + IN UINT64 OrData ) { return MmioWrite64 ( diff --git a/MdePkg/Library/DxeIoLibCpuIo2/IoLib.c b/MdePkg/Library/DxeIoLibCpuIo2/IoLib.c index 21f88d9..9849d06 100644 --- a/MdePkg/Library/DxeIoLibCpuIo2/IoLib.c +++ b/MdePkg/Library/DxeIoLibCpuIo2/IoLib.c @@ -30,13 +30,13 @@ EFI_CPU_IO2_PROTOCOL *mCpuIo = NULL; EFI_STATUS EFIAPI IoLibConstructor ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUS Status; - Status = gBS->LocateProtocol (&gEfiCpuIo2ProtocolGuid, NULL, (VOID **) &mCpuIo); + Status = gBS->LocateProtocol (&gEfiCpuIo2ProtocolGuid, NULL, (VOID **)&mCpuIo); ASSERT_EFI_ERROR (Status); return Status; @@ -247,7 +247,7 @@ MmioWriteWorker ( UINT8 EFIAPI IoRead8 ( - IN UINTN Port + IN UINTN Port ) { return (UINT8)IoReadWorker (Port, EfiCpuIoWidthUint8); @@ -271,8 +271,8 @@ IoRead8 ( UINT8 EFIAPI IoWrite8 ( - IN UINTN Port, - IN UINT8 Value + IN UINTN Port, + IN UINT8 Value ) { return (UINT8)IoWriteWorker (Port, EfiCpuIoWidthUint8, Value); @@ -297,7 +297,7 @@ IoWrite8 ( UINT16 EFIAPI IoRead16 ( - IN UINTN Port + IN UINTN Port ) { // @@ -327,8 +327,8 @@ IoRead16 ( UINT16 EFIAPI IoWrite16 ( - IN UINTN Port, - IN UINT16 Value + IN UINTN Port, + IN UINT16 Value ) { // @@ -357,7 +357,7 @@ IoWrite16 ( UINT32 EFIAPI IoRead32 ( - IN UINTN Port + IN UINTN Port ) { // @@ -387,8 +387,8 @@ IoRead32 ( UINT32 EFIAPI IoWrite32 ( - IN UINTN Port, - IN UINT32 Value + IN UINTN Port, + IN UINT32 Value ) { // @@ -417,7 +417,7 @@ IoWrite32 ( UINT64 EFIAPI IoRead64 ( - IN UINTN Port + IN UINTN Port ) { // @@ -447,8 +447,8 @@ IoRead64 ( UINT64 EFIAPI IoWrite64 ( - IN UINTN Port, - IN UINT64 Value + IN UINTN Port, + IN UINT64 Value ) { // @@ -478,9 +478,9 @@ IoWrite64 ( VOID EFIAPI IoReadFifo8 ( - IN UINTN Port, - IN UINTN Count, - OUT VOID *Buffer + IN UINTN Port, + IN UINTN Count, + OUT VOID *Buffer ) { IoReadFifoWorker (Port, EfiCpuIoWidthFifoUint8, Count, Buffer); @@ -506,9 +506,9 @@ IoReadFifo8 ( VOID EFIAPI IoWriteFifo8 ( - IN UINTN Port, - IN UINTN Count, - IN VOID *Buffer + IN UINTN Port, + IN UINTN Count, + IN VOID *Buffer ) { IoWriteFifoWorker (Port, EfiCpuIoWidthFifoUint8, Count, Buffer); @@ -534,9 +534,9 @@ IoWriteFifo8 ( VOID EFIAPI IoReadFifo16 ( - IN UINTN Port, - IN UINTN Count, - OUT VOID *Buffer + IN UINTN Port, + IN UINTN Count, + OUT VOID *Buffer ) { // @@ -566,9 +566,9 @@ IoReadFifo16 ( VOID EFIAPI IoWriteFifo16 ( - IN UINTN Port, - IN UINTN Count, - IN VOID *Buffer + IN UINTN Port, + IN UINTN Count, + IN VOID *Buffer ) { // @@ -598,9 +598,9 @@ IoWriteFifo16 ( VOID EFIAPI IoReadFifo32 ( - IN UINTN Port, - IN UINTN Count, - OUT VOID *Buffer + IN UINTN Port, + IN UINTN Count, + OUT VOID *Buffer ) { // @@ -630,9 +630,9 @@ IoReadFifo32 ( VOID EFIAPI IoWriteFifo32 ( - IN UINTN Port, - IN UINTN Count, - IN VOID *Buffer + IN UINTN Port, + IN UINTN Count, + IN VOID *Buffer ) { // @@ -659,7 +659,7 @@ IoWriteFifo32 ( UINT8 EFIAPI MmioRead8 ( - IN UINTN Address + IN UINTN Address ) { return (UINT8)MmioReadWorker (Address, EfiCpuIoWidthUint8); @@ -681,8 +681,8 @@ MmioRead8 ( UINT8 EFIAPI MmioWrite8 ( - IN UINTN Address, - IN UINT8 Value + IN UINTN Address, + IN UINT8 Value ) { return (UINT8)MmioWriteWorker (Address, EfiCpuIoWidthUint8, Value); @@ -707,7 +707,7 @@ MmioWrite8 ( UINT16 EFIAPI MmioRead16 ( - IN UINTN Address + IN UINTN Address ) { // @@ -735,8 +735,8 @@ MmioRead16 ( UINT16 EFIAPI MmioWrite16 ( - IN UINTN Address, - IN UINT16 Value + IN UINTN Address, + IN UINT16 Value ) { // @@ -765,7 +765,7 @@ MmioWrite16 ( UINT32 EFIAPI MmioRead32 ( - IN UINTN Address + IN UINTN Address ) { // @@ -793,8 +793,8 @@ MmioRead32 ( UINT32 EFIAPI MmioWrite32 ( - IN UINTN Address, - IN UINT32 Value + IN UINTN Address, + IN UINT32 Value ) { // @@ -823,7 +823,7 @@ MmioWrite32 ( UINT64 EFIAPI MmioRead64 ( - IN UINTN Address + IN UINTN Address ) { // @@ -851,8 +851,8 @@ MmioRead64 ( UINT64 EFIAPI MmioWrite64 ( - IN UINTN Address, - IN UINT64 Value + IN UINTN Address, + IN UINT64 Value ) { // diff --git a/MdePkg/Library/DxeIoLibCpuIo2/IoLibMmioBuffer.c b/MdePkg/Library/DxeIoLibCpuIo2/IoLibMmioBuffer.c index 2731bcd..a5d5e78 100644 --- a/MdePkg/Library/DxeIoLibCpuIo2/IoLibMmioBuffer.c +++ b/MdePkg/Library/DxeIoLibCpuIo2/IoLibMmioBuffer.c @@ -29,15 +29,15 @@ UINT8 * EFIAPI MmioReadBuffer8 ( - IN UINTN StartAddress, - IN UINTN Length, - OUT UINT8 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT8 *Buffer ) { - UINT8 *ReturnBuffer; + UINT8 *ReturnBuffer; ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ReturnBuffer = Buffer; @@ -74,27 +74,27 @@ MmioReadBuffer8 ( UINT16 * EFIAPI MmioReadBuffer16 ( - IN UINTN StartAddress, - IN UINTN Length, - OUT UINT16 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT16 *Buffer ) { - UINT16 *ReturnBuffer; + UINT16 *ReturnBuffer; ASSERT ((StartAddress & (sizeof (UINT16) - 1)) == 0); ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (UINT16) - 1)) == 0); - ASSERT (((UINTN) Buffer & (sizeof (UINT16) - 1)) == 0); + ASSERT (((UINTN)Buffer & (sizeof (UINT16) - 1)) == 0); ReturnBuffer = Buffer; while (Length > 0) { - *(Buffer++) = MmioRead16 (StartAddress); + *(Buffer++) = MmioRead16 (StartAddress); StartAddress += sizeof (UINT16); - Length -= sizeof (UINT16); + Length -= sizeof (UINT16); } return ReturnBuffer; @@ -125,27 +125,27 @@ MmioReadBuffer16 ( UINT32 * EFIAPI MmioReadBuffer32 ( - IN UINTN StartAddress, - IN UINTN Length, - OUT UINT32 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT32 *Buffer ) { - UINT32 *ReturnBuffer; + UINT32 *ReturnBuffer; ASSERT ((StartAddress & (sizeof (UINT32) - 1)) == 0); ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (UINT32) - 1)) == 0); - ASSERT (((UINTN) Buffer & (sizeof (UINT32) - 1)) == 0); + ASSERT (((UINTN)Buffer & (sizeof (UINT32) - 1)) == 0); ReturnBuffer = Buffer; while (Length > 0) { - *(Buffer++) = MmioRead32 (StartAddress); + *(Buffer++) = MmioRead32 (StartAddress); StartAddress += sizeof (UINT32); - Length -= sizeof (UINT32); + Length -= sizeof (UINT32); } return ReturnBuffer; @@ -177,33 +177,32 @@ MmioReadBuffer32 ( UINT64 * EFIAPI MmioReadBuffer64 ( - IN UINTN StartAddress, - IN UINTN Length, - OUT UINT64 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT64 *Buffer ) { - UINT64 *ReturnBuffer; + UINT64 *ReturnBuffer; ASSERT ((StartAddress & (sizeof (UINT64) - 1)) == 0); ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (UINT64) - 1)) == 0); - ASSERT (((UINTN) Buffer & (sizeof (UINT64) - 1)) == 0); + ASSERT (((UINTN)Buffer & (sizeof (UINT64) - 1)) == 0); ReturnBuffer = Buffer; while (Length > 0) { - *(Buffer++) = MmioRead64 (StartAddress); + *(Buffer++) = MmioRead64 (StartAddress); StartAddress += sizeof (UINT64); - Length -= sizeof (UINT64); + Length -= sizeof (UINT64); } return ReturnBuffer; } - /** Copy data from system memory to MMIO region by using 8-bit access. @@ -225,24 +224,23 @@ MmioReadBuffer64 ( UINT8 * EFIAPI MmioWriteBuffer8 ( - IN UINTN StartAddress, - IN UINTN Length, - IN CONST UINT8 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT8 *Buffer ) { - VOID* ReturnBuffer; + VOID *ReturnBuffer; ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); - ReturnBuffer = (UINT8 *) Buffer; + ReturnBuffer = (UINT8 *)Buffer; while (Length-- > 0) { - MmioWrite8 (StartAddress++, *(Buffer++)); + MmioWrite8 (StartAddress++, *(Buffer++)); } return ReturnBuffer; - } /** @@ -271,34 +269,33 @@ MmioWriteBuffer8 ( UINT16 * EFIAPI MmioWriteBuffer16 ( - IN UINTN StartAddress, - IN UINTN Length, - IN CONST UINT16 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT16 *Buffer ) { - UINT16 *ReturnBuffer; + UINT16 *ReturnBuffer; ASSERT ((StartAddress & (sizeof (UINT16) - 1)) == 0); ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (UINT16) - 1)) == 0); - ASSERT (((UINTN) Buffer & (sizeof (UINT16) - 1)) == 0); + ASSERT (((UINTN)Buffer & (sizeof (UINT16) - 1)) == 0); - ReturnBuffer = (UINT16 *) Buffer; + ReturnBuffer = (UINT16 *)Buffer; while (Length > 0) { MmioWrite16 (StartAddress, *(Buffer++)); StartAddress += sizeof (UINT16); - Length -= sizeof (UINT16); + Length -= sizeof (UINT16); } return ReturnBuffer; } - /** Copy data from system memory to MMIO region by using 32-bit access. @@ -325,28 +322,28 @@ MmioWriteBuffer16 ( UINT32 * EFIAPI MmioWriteBuffer32 ( - IN UINTN StartAddress, - IN UINTN Length, - IN CONST UINT32 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT32 *Buffer ) { - UINT32 *ReturnBuffer; + UINT32 *ReturnBuffer; ASSERT ((StartAddress & (sizeof (UINT32) - 1)) == 0); ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (UINT32) - 1)) == 0); - ASSERT (((UINTN) Buffer & (sizeof (UINT32) - 1)) == 0); + ASSERT (((UINTN)Buffer & (sizeof (UINT32) - 1)) == 0); - ReturnBuffer = (UINT32 *) Buffer; + ReturnBuffer = (UINT32 *)Buffer; while (Length > 0) { MmioWrite32 (StartAddress, *(Buffer++)); StartAddress += sizeof (UINT32); - Length -= sizeof (UINT32); + Length -= sizeof (UINT32); } return ReturnBuffer; @@ -378,30 +375,29 @@ MmioWriteBuffer32 ( UINT64 * EFIAPI MmioWriteBuffer64 ( - IN UINTN StartAddress, - IN UINTN Length, - IN CONST UINT64 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT64 *Buffer ) { - UINT64 *ReturnBuffer; + UINT64 *ReturnBuffer; ASSERT ((StartAddress & (sizeof (UINT64) - 1)) == 0); ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (UINT64) - 1)) == 0); - ASSERT (((UINTN) Buffer & (sizeof (UINT64) - 1)) == 0); + ASSERT (((UINTN)Buffer & (sizeof (UINT64) - 1)) == 0); - ReturnBuffer = (UINT64 *) Buffer; + ReturnBuffer = (UINT64 *)Buffer; while (Length > 0) { MmioWrite64 (StartAddress, *(Buffer++)); StartAddress += sizeof (UINT64); - Length -= sizeof (UINT64); + Length -= sizeof (UINT64); } return ReturnBuffer; } - diff --git a/MdePkg/Library/DxePcdLib/DxePcdLib.c b/MdePkg/Library/DxePcdLib/DxePcdLib.c index 21ebc88..b2a8bf2 100644 --- a/MdePkg/Library/DxePcdLib/DxePcdLib.c +++ b/MdePkg/Library/DxePcdLib/DxePcdLib.c @@ -7,7 +7,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ - #include #include @@ -20,10 +19,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include -PCD_PROTOCOL *mPcd = NULL; -EFI_PCD_PROTOCOL *mPiPcd = NULL; -GET_PCD_INFO_PROTOCOL *mPcdInfo = NULL; -EFI_GET_PCD_INFO_PROTOCOL *mPiPcdInfo = NULL; +PCD_PROTOCOL *mPcd = NULL; +EFI_PCD_PROTOCOL *mPiPcd = NULL; +GET_PCD_INFO_PROTOCOL *mPcdInfo = NULL; +EFI_GET_PCD_INFO_PROTOCOL *mPiPcdInfo = NULL; /** Retrieves the PI PCD protocol from the handle database. @@ -43,10 +42,11 @@ GetPiPcdProtocol ( // PI Pcd protocol defined in PI 1.2 vol3 should be installed before the module // access DynamicEx type PCD. // - Status = gBS->LocateProtocol (&gEfiPcdProtocolGuid, NULL, (VOID **) &mPiPcd); + Status = gBS->LocateProtocol (&gEfiPcdProtocolGuid, NULL, (VOID **)&mPiPcd); ASSERT_EFI_ERROR (Status); ASSERT (mPiPcd != NULL); } + return mPiPcd; } @@ -72,6 +72,7 @@ GetPcdProtocol ( ASSERT_EFI_ERROR (Status); ASSERT (mPcd != NULL); } + return mPcd; } @@ -92,6 +93,7 @@ GetPiPcdInfoProtocolPointer ( ASSERT_EFI_ERROR (Status); ASSERT (mPiPcdInfo != NULL); } + return mPiPcdInfo; } @@ -112,6 +114,7 @@ GetPcdInfoProtocolPointer ( ASSERT_EFI_ERROR (Status); ASSERT (mPcdInfo != NULL); } + return mPcdInfo; } @@ -129,16 +132,14 @@ GetPcdInfoProtocolPointer ( UINTN EFIAPI LibPcdSetSku ( - IN UINTN SkuId + IN UINTN SkuId ) { - GetPcdProtocol()->SetSku (SkuId); + GetPcdProtocol ()->SetSku (SkuId); return SkuId; } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -152,14 +153,12 @@ LibPcdSetSku ( UINT8 EFIAPI LibPcdGet8 ( - IN UINTN TokenNumber + IN UINTN TokenNumber ) { - return GetPcdProtocol()->Get8 (TokenNumber); + return GetPcdProtocol ()->Get8 (TokenNumber); } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -173,14 +172,12 @@ LibPcdGet8 ( UINT16 EFIAPI LibPcdGet16 ( - IN UINTN TokenNumber + IN UINTN TokenNumber ) { - return GetPcdProtocol()->Get16 (TokenNumber); + return GetPcdProtocol ()->Get16 (TokenNumber); } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -194,14 +191,12 @@ LibPcdGet16 ( UINT32 EFIAPI LibPcdGet32 ( - IN UINTN TokenNumber + IN UINTN TokenNumber ) { - return GetPcdProtocol()->Get32 (TokenNumber); + return GetPcdProtocol ()->Get32 (TokenNumber); } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -215,14 +210,12 @@ LibPcdGet32 ( UINT64 EFIAPI LibPcdGet64 ( - IN UINTN TokenNumber + IN UINTN TokenNumber ) { - return GetPcdProtocol()->Get64 (TokenNumber); + return GetPcdProtocol ()->Get64 (TokenNumber); } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -236,14 +229,12 @@ LibPcdGet64 ( VOID * EFIAPI LibPcdGetPtr ( - IN UINTN TokenNumber + IN UINTN TokenNumber ) { - return GetPcdProtocol()->GetPtr (TokenNumber); + return GetPcdProtocol ()->GetPtr (TokenNumber); } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -257,14 +248,12 @@ LibPcdGetPtr ( BOOLEAN EFIAPI LibPcdGetBool ( - IN UINTN TokenNumber + IN UINTN TokenNumber ) { - return GetPcdProtocol()->GetBool (TokenNumber); + return GetPcdProtocol ()->GetBool (TokenNumber); } - - /** This function provides a means by which to retrieve the size of a given PCD token. @@ -276,14 +265,12 @@ LibPcdGetBool ( UINTN EFIAPI LibPcdGetSize ( - IN UINTN TokenNumber + IN UINTN TokenNumber ) { - return GetPcdProtocol()->GetSize (TokenNumber); + return GetPcdProtocol ()->GetSize (TokenNumber); } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -301,16 +288,15 @@ LibPcdGetSize ( UINT8 EFIAPI LibPcdGetEx8 ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ) { ASSERT (Guid != NULL); - return GetPiPcdProtocol()->Get8 (Guid, TokenNumber); + return GetPiPcdProtocol ()->Get8 (Guid, TokenNumber); } - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -328,16 +314,15 @@ LibPcdGetEx8 ( UINT16 EFIAPI LibPcdGetEx16 ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ) { ASSERT (Guid != NULL); - return GetPiPcdProtocol()->Get16 (Guid, TokenNumber); + return GetPiPcdProtocol ()->Get16 (Guid, TokenNumber); } - /** Returns the 32-bit value for the token specified by TokenNumber and Guid. If Guid is NULL, then ASSERT(). @@ -352,17 +337,15 @@ LibPcdGetEx16 ( UINT32 EFIAPI LibPcdGetEx32 ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ) { ASSERT (Guid != NULL); - return GetPiPcdProtocol()->Get32 (Guid, TokenNumber); + return GetPiPcdProtocol ()->Get32 (Guid, TokenNumber); } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -380,17 +363,15 @@ LibPcdGetEx32 ( UINT64 EFIAPI LibPcdGetEx64 ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ) { ASSERT (Guid != NULL); - return GetPiPcdProtocol()->Get64 (Guid, TokenNumber); + return GetPiPcdProtocol ()->Get64 (Guid, TokenNumber); } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -408,17 +389,15 @@ LibPcdGetEx64 ( VOID * EFIAPI LibPcdGetExPtr ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ) { ASSERT (Guid != NULL); - return GetPiPcdProtocol()->GetPtr (Guid, TokenNumber); + return GetPiPcdProtocol ()->GetPtr (Guid, TokenNumber); } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -436,17 +415,15 @@ LibPcdGetExPtr ( BOOLEAN EFIAPI LibPcdGetExBool ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ) { ASSERT (Guid != NULL); - return GetPiPcdProtocol()->GetBool (Guid, TokenNumber); + return GetPiPcdProtocol ()->GetBool (Guid, TokenNumber); } - - /** This function provides a means by which to retrieve the size of a given PCD token. @@ -464,16 +441,15 @@ LibPcdGetExBool ( UINTN EFIAPI LibPcdGetExSize ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ) { ASSERT (Guid != NULL); - return GetPiPcdProtocol()->GetSize (Guid, TokenNumber); + return GetPiPcdProtocol ()->GetSize (Guid, TokenNumber); } - /** This function provides a means by which to set a value for a given PCD token. @@ -489,11 +465,11 @@ LibPcdGetExSize ( RETURN_STATUS EFIAPI LibPcdSet8S ( - IN UINTN TokenNumber, - IN UINT8 Value + IN UINTN TokenNumber, + IN UINT8 Value ) { - return GetPcdProtocol()->Set8 (TokenNumber, Value); + return GetPcdProtocol ()->Set8 (TokenNumber, Value); } /** @@ -511,11 +487,11 @@ LibPcdSet8S ( RETURN_STATUS EFIAPI LibPcdSet16S ( - IN UINTN TokenNumber, - IN UINT16 Value + IN UINTN TokenNumber, + IN UINT16 Value ) { - return GetPcdProtocol()->Set16 (TokenNumber, Value); + return GetPcdProtocol ()->Set16 (TokenNumber, Value); } /** @@ -533,11 +509,11 @@ LibPcdSet16S ( RETURN_STATUS EFIAPI LibPcdSet32S ( - IN UINTN TokenNumber, - IN UINT32 Value + IN UINTN TokenNumber, + IN UINT32 Value ) { - return GetPcdProtocol()->Set32 (TokenNumber, Value); + return GetPcdProtocol ()->Set32 (TokenNumber, Value); } /** @@ -555,11 +531,11 @@ LibPcdSet32S ( RETURN_STATUS EFIAPI LibPcdSet64S ( - IN UINTN TokenNumber, - IN UINT64 Value + IN UINTN TokenNumber, + IN UINT64 Value ) { - return GetPcdProtocol()->Set64 (TokenNumber, Value); + return GetPcdProtocol ()->Set64 (TokenNumber, Value); } /** @@ -587,9 +563,9 @@ LibPcdSet64S ( RETURN_STATUS EFIAPI LibPcdSetPtrS ( - IN UINTN TokenNumber, - IN OUT UINTN *SizeOfBuffer, - IN CONST VOID *Buffer + IN UINTN TokenNumber, + IN OUT UINTN *SizeOfBuffer, + IN CONST VOID *Buffer ) { ASSERT (SizeOfBuffer != NULL); @@ -598,7 +574,7 @@ LibPcdSetPtrS ( ASSERT (Buffer != NULL); } - return GetPcdProtocol()->SetPtr (TokenNumber, SizeOfBuffer, (VOID *) Buffer); + return GetPcdProtocol ()->SetPtr (TokenNumber, SizeOfBuffer, (VOID *)Buffer); } /** @@ -616,11 +592,11 @@ LibPcdSetPtrS ( RETURN_STATUS EFIAPI LibPcdSetBoolS ( - IN UINTN TokenNumber, - IN BOOLEAN Value + IN UINTN TokenNumber, + IN BOOLEAN Value ) { - return GetPcdProtocol()->SetBool (TokenNumber, Value); + return GetPcdProtocol ()->SetBool (TokenNumber, Value); } /** @@ -642,14 +618,14 @@ LibPcdSetBoolS ( RETURN_STATUS EFIAPI LibPcdSetEx8S ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - IN UINT8 Value + IN CONST GUID *Guid, + IN UINTN TokenNumber, + IN UINT8 Value ) { ASSERT (Guid != NULL); - return GetPiPcdProtocol()->Set8 (Guid, TokenNumber, Value); + return GetPiPcdProtocol ()->Set8 (Guid, TokenNumber, Value); } /** @@ -671,14 +647,14 @@ LibPcdSetEx8S ( RETURN_STATUS EFIAPI LibPcdSetEx16S ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - IN UINT16 Value + IN CONST GUID *Guid, + IN UINTN TokenNumber, + IN UINT16 Value ) { ASSERT (Guid != NULL); - return GetPiPcdProtocol()->Set16 (Guid, TokenNumber, Value); + return GetPiPcdProtocol ()->Set16 (Guid, TokenNumber, Value); } /** @@ -700,14 +676,14 @@ LibPcdSetEx16S ( RETURN_STATUS EFIAPI LibPcdSetEx32S ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - IN UINT32 Value + IN CONST GUID *Guid, + IN UINTN TokenNumber, + IN UINT32 Value ) { ASSERT (Guid != NULL); - return GetPiPcdProtocol()->Set32 (Guid, TokenNumber, Value); + return GetPiPcdProtocol ()->Set32 (Guid, TokenNumber, Value); } /** @@ -729,14 +705,14 @@ LibPcdSetEx32S ( RETURN_STATUS EFIAPI LibPcdSetEx64S ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - IN UINT64 Value + IN CONST GUID *Guid, + IN UINTN TokenNumber, + IN UINT64 Value ) { ASSERT (Guid != NULL); - return GetPiPcdProtocol()->Set64 (Guid, TokenNumber, Value); + return GetPiPcdProtocol ()->Set64 (Guid, TokenNumber, Value); } /** @@ -764,10 +740,10 @@ LibPcdSetEx64S ( RETURN_STATUS EFIAPI LibPcdSetExPtrS ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - IN OUT UINTN *SizeOfBuffer, - IN VOID *Buffer + IN CONST GUID *Guid, + IN UINTN TokenNumber, + IN OUT UINTN *SizeOfBuffer, + IN VOID *Buffer ) { ASSERT (Guid != NULL); @@ -778,7 +754,7 @@ LibPcdSetExPtrS ( ASSERT (Buffer != NULL); } - return GetPiPcdProtocol()->SetPtr (Guid, TokenNumber, SizeOfBuffer, Buffer); + return GetPiPcdProtocol ()->SetPtr (Guid, TokenNumber, SizeOfBuffer, Buffer); } /** @@ -800,14 +776,14 @@ LibPcdSetExPtrS ( RETURN_STATUS EFIAPI LibPcdSetExBoolS ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - IN BOOLEAN Value + IN CONST GUID *Guid, + IN UINTN TokenNumber, + IN BOOLEAN Value ) { ASSERT (Guid != NULL); - return GetPiPcdProtocol()->SetBool (Guid, TokenNumber, Value); + return GetPiPcdProtocol ()->SetBool (Guid, TokenNumber, Value); } /** @@ -829,23 +805,21 @@ LibPcdSetExBoolS ( VOID EFIAPI LibPcdCallbackOnSet ( - IN CONST GUID *Guid OPTIONAL, - IN UINTN TokenNumber, - IN PCD_CALLBACK NotificationFunction + IN CONST GUID *Guid OPTIONAL, + IN UINTN TokenNumber, + IN PCD_CALLBACK NotificationFunction ) { - EFI_STATUS Status; + EFI_STATUS Status; ASSERT (NotificationFunction != NULL); - Status = GetPiPcdProtocol()->CallbackOnSet (Guid, TokenNumber, (EFI_PCD_PROTOCOL_CALLBACK) NotificationFunction); + Status = GetPiPcdProtocol ()->CallbackOnSet (Guid, TokenNumber, (EFI_PCD_PROTOCOL_CALLBACK)NotificationFunction); ASSERT_EFI_ERROR (Status); return; } - - /** Disable a notification function that was established with LibPcdCallbackonSet(). @@ -862,23 +836,21 @@ LibPcdCallbackOnSet ( VOID EFIAPI LibPcdCancelCallback ( - IN CONST GUID *Guid OPTIONAL, - IN UINTN TokenNumber, - IN PCD_CALLBACK NotificationFunction + IN CONST GUID *Guid OPTIONAL, + IN UINTN TokenNumber, + IN PCD_CALLBACK NotificationFunction ) { - EFI_STATUS Status; + EFI_STATUS Status; ASSERT (NotificationFunction != NULL); - Status = GetPiPcdProtocol()->CancelCallback (Guid, TokenNumber, (EFI_PCD_PROTOCOL_CALLBACK) NotificationFunction); + Status = GetPiPcdProtocol ()->CancelCallback (Guid, TokenNumber, (EFI_PCD_PROTOCOL_CALLBACK)NotificationFunction); ASSERT_EFI_ERROR (Status); return; } - - /** Retrieves the next token in a token space. @@ -901,20 +873,18 @@ LibPcdCancelCallback ( UINTN EFIAPI LibPcdGetNextToken ( - IN CONST GUID *Guid OPTIONAL, - IN UINTN TokenNumber + IN CONST GUID *Guid OPTIONAL, + IN UINTN TokenNumber ) { - EFI_STATUS Status; + EFI_STATUS Status; - Status = GetPiPcdProtocol()->GetNextToken (Guid, &TokenNumber); + Status = GetPiPcdProtocol ()->GetNextToken (Guid, &TokenNumber); ASSERT (!EFI_ERROR (Status) || TokenNumber == 0); return TokenNumber; } - - /** Used to retrieve the list of available PCD token space GUIDs. @@ -934,12 +904,11 @@ LibPcdGetNextTokenSpace ( IN CONST GUID *TokenSpaceGuid ) { - GetPiPcdProtocol()->GetNextTokenSpace (&TokenSpaceGuid); + GetPiPcdProtocol ()->GetNextTokenSpace (&TokenSpaceGuid); return (GUID *)TokenSpaceGuid; } - /** Sets a value of a patchable PCD entry that is type pointer. @@ -966,10 +935,10 @@ LibPcdGetNextTokenSpace ( VOID * EFIAPI LibPatchPcdSetPtr ( - OUT VOID *PatchVariable, - IN UINTN MaximumDatumSize, - IN OUT UINTN *SizeOfBuffer, - IN CONST VOID *Buffer + OUT VOID *PatchVariable, + IN UINTN MaximumDatumSize, + IN OUT UINTN *SizeOfBuffer, + IN CONST VOID *Buffer ) { ASSERT (PatchVariable != NULL); @@ -980,14 +949,15 @@ LibPatchPcdSetPtr ( } if ((*SizeOfBuffer > MaximumDatumSize) || - (*SizeOfBuffer == MAX_ADDRESS)) { + (*SizeOfBuffer == MAX_ADDRESS)) + { *SizeOfBuffer = MaximumDatumSize; return NULL; } CopyMem (PatchVariable, Buffer, *SizeOfBuffer); - return (VOID *) Buffer; + return (VOID *)Buffer; } /** @@ -1016,10 +986,10 @@ LibPatchPcdSetPtr ( RETURN_STATUS EFIAPI LibPatchPcdSetPtrS ( - OUT VOID *PatchVariable, - IN UINTN MaximumDatumSize, - IN OUT UINTN *SizeOfBuffer, - IN CONST VOID *Buffer + OUT VOID *PatchVariable, + IN UINTN MaximumDatumSize, + IN OUT UINTN *SizeOfBuffer, + IN CONST VOID *Buffer ) { ASSERT (PatchVariable != NULL); @@ -1030,7 +1000,8 @@ LibPatchPcdSetPtrS ( } if ((*SizeOfBuffer > MaximumDatumSize) || - (*SizeOfBuffer == MAX_ADDRESS)) { + (*SizeOfBuffer == MAX_ADDRESS)) + { *SizeOfBuffer = MaximumDatumSize; return RETURN_INVALID_PARAMETER; } @@ -1040,7 +1011,6 @@ LibPatchPcdSetPtrS ( return RETURN_SUCCESS; } - /** Sets a value and size of a patchable PCD entry that is type pointer. @@ -1069,11 +1039,11 @@ LibPatchPcdSetPtrS ( VOID * EFIAPI LibPatchPcdSetPtrAndSize ( - OUT VOID *PatchVariable, - OUT UINTN *SizeOfPatchVariable, - IN UINTN MaximumDatumSize, - IN OUT UINTN *SizeOfBuffer, - IN CONST VOID *Buffer + OUT VOID *PatchVariable, + OUT UINTN *SizeOfPatchVariable, + IN UINTN MaximumDatumSize, + IN OUT UINTN *SizeOfBuffer, + IN CONST VOID *Buffer ) { ASSERT (PatchVariable != NULL); @@ -1085,7 +1055,8 @@ LibPatchPcdSetPtrAndSize ( } if ((*SizeOfBuffer > MaximumDatumSize) || - (*SizeOfBuffer == MAX_ADDRESS)) { + (*SizeOfBuffer == MAX_ADDRESS)) + { *SizeOfBuffer = MaximumDatumSize; return NULL; } @@ -1093,7 +1064,7 @@ LibPatchPcdSetPtrAndSize ( CopyMem (PatchVariable, Buffer, *SizeOfBuffer); *SizeOfPatchVariable = *SizeOfBuffer; - return (VOID *) Buffer; + return (VOID *)Buffer; } /** @@ -1124,11 +1095,11 @@ LibPatchPcdSetPtrAndSize ( RETURN_STATUS EFIAPI LibPatchPcdSetPtrAndSizeS ( - OUT VOID *PatchVariable, - OUT UINTN *SizeOfPatchVariable, - IN UINTN MaximumDatumSize, - IN OUT UINTN *SizeOfBuffer, - IN CONST VOID *Buffer + OUT VOID *PatchVariable, + OUT UINTN *SizeOfPatchVariable, + IN UINTN MaximumDatumSize, + IN OUT UINTN *SizeOfBuffer, + IN CONST VOID *Buffer ) { ASSERT (PatchVariable != NULL); @@ -1140,7 +1111,8 @@ LibPatchPcdSetPtrAndSizeS ( } if ((*SizeOfBuffer > MaximumDatumSize) || - (*SizeOfBuffer == MAX_ADDRESS)) { + (*SizeOfBuffer == MAX_ADDRESS)) + { *SizeOfBuffer = MaximumDatumSize; return RETURN_INVALID_PARAMETER; } @@ -1166,13 +1138,13 @@ LibPatchPcdSetPtrAndSizeS ( VOID EFIAPI LibPcdGetInfo ( - IN UINTN TokenNumber, - OUT PCD_INFO *PcdInfo + IN UINTN TokenNumber, + OUT PCD_INFO *PcdInfo ) { - EFI_STATUS Status; + EFI_STATUS Status; - Status = GetPcdInfoProtocolPointer()->GetInfo (TokenNumber, (EFI_PCD_INFO *) PcdInfo); + Status = GetPcdInfoProtocolPointer ()->GetInfo (TokenNumber, (EFI_PCD_INFO *)PcdInfo); ASSERT_EFI_ERROR (Status); } @@ -1192,14 +1164,14 @@ LibPcdGetInfo ( VOID EFIAPI LibPcdGetInfoEx ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - OUT PCD_INFO *PcdInfo + IN CONST GUID *Guid, + IN UINTN TokenNumber, + OUT PCD_INFO *PcdInfo ) { - EFI_STATUS Status; + EFI_STATUS Status; - Status = GetPiPcdInfoProtocolPointer()->GetInfo (Guid, TokenNumber, (EFI_PCD_INFO *) PcdInfo); + Status = GetPiPcdInfoProtocolPointer ()->GetInfo (Guid, TokenNumber, (EFI_PCD_INFO *)PcdInfo); ASSERT_EFI_ERROR (Status); } @@ -1216,5 +1188,5 @@ LibPcdGetSku ( VOID ) { - return GetPiPcdInfoProtocolPointer()->GetSku (); + return GetPiPcdInfoProtocolPointer ()->GetSku (); } diff --git a/MdePkg/Library/DxeRngLib/DxeRngLib.c b/MdePkg/Library/DxeRngLib/DxeRngLib.c index 9c3d67b..82129aa 100644 --- a/MdePkg/Library/DxeRngLib/DxeRngLib.c +++ b/MdePkg/Library/DxeRngLib/DxeRngLib.c @@ -37,46 +37,47 @@ GenerateRandomNumberViaNist800Algorithm ( RngProtocol = NULL; if (Buffer == NULL) { - DEBUG((DEBUG_ERROR, "%a: Buffer == NULL.\n", __FUNCTION__)); - return EFI_INVALID_PARAMETER; + DEBUG ((DEBUG_ERROR, "%a: Buffer == NULL.\n", __FUNCTION__)); + return EFI_INVALID_PARAMETER; } Status = gBS->LocateProtocol (&gEfiRngProtocolGuid, NULL, (VOID **)&RngProtocol); - if (EFI_ERROR (Status) || RngProtocol == NULL) { - DEBUG((DEBUG_ERROR, "%a: Could not locate RNG prototocol, Status = %r\n", __FUNCTION__, Status)); - return Status; + if (EFI_ERROR (Status) || (RngProtocol == NULL)) { + DEBUG ((DEBUG_ERROR, "%a: Could not locate RNG prototocol, Status = %r\n", __FUNCTION__, Status)); + return Status; } Status = RngProtocol->GetRNG (RngProtocol, &gEfiRngAlgorithmSp80090Ctr256Guid, BufferSize, Buffer); - DEBUG((DEBUG_INFO, "%a: GetRNG algorithm CTR-256 - Status = %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_INFO, "%a: GetRNG algorithm CTR-256 - Status = %r\n", __FUNCTION__, Status)); if (!EFI_ERROR (Status)) { return Status; } Status = RngProtocol->GetRNG (RngProtocol, &gEfiRngAlgorithmSp80090Hmac256Guid, BufferSize, Buffer); - DEBUG((DEBUG_INFO, "%a: GetRNG algorithm HMAC-256 - Status = %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_INFO, "%a: GetRNG algorithm HMAC-256 - Status = %r\n", __FUNCTION__, Status)); if (!EFI_ERROR (Status)) { return Status; } Status = RngProtocol->GetRNG (RngProtocol, &gEfiRngAlgorithmSp80090Hash256Guid, BufferSize, Buffer); - DEBUG((DEBUG_INFO, "%a: GetRNG algorithm Hash-256 - Status = %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_INFO, "%a: GetRNG algorithm Hash-256 - Status = %r\n", __FUNCTION__, Status)); if (!EFI_ERROR (Status)) { return Status; } + // If all the other methods have failed, use the default method from the RngProtocol Status = RngProtocol->GetRNG (RngProtocol, NULL, BufferSize, Buffer); - DEBUG((DEBUG_INFO, "%a: GetRNG algorithm Hash-256 - Status = %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_INFO, "%a: GetRNG algorithm Hash-256 - Status = %r\n", __FUNCTION__, Status)); if (!EFI_ERROR (Status)) { return Status; } + // If we get to this point, we have failed - DEBUG((DEBUG_ERROR, "%a: GetRNG() failed, staus = %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: GetRNG() failed, staus = %r\n", __FUNCTION__, Status)); return Status; }// GenerateRandomNumberViaNist800Algorithm() - /** Generates a 16-bit random number. @@ -94,17 +95,17 @@ GetRandomNumber16 ( OUT UINT16 *Rand ) { - EFI_STATUS Status; + EFI_STATUS Status; - if (Rand == NULL) - { + if (Rand == NULL) { return FALSE; } - Status = GenerateRandomNumberViaNist800Algorithm ((UINT8 *)Rand, sizeof(UINT16)); + Status = GenerateRandomNumberViaNist800Algorithm ((UINT8 *)Rand, sizeof (UINT16)); if (EFI_ERROR (Status)) { return FALSE; } + return TRUE; } @@ -122,19 +123,20 @@ GetRandomNumber16 ( BOOLEAN EFIAPI GetRandomNumber32 ( - OUT UINT32 *Rand + OUT UINT32 *Rand ) { - EFI_STATUS Status; + EFI_STATUS Status; if (Rand == NULL) { return FALSE; } - Status = GenerateRandomNumberViaNist800Algorithm ((UINT8*)Rand, sizeof(UINT32)); + Status = GenerateRandomNumberViaNist800Algorithm ((UINT8 *)Rand, sizeof (UINT32)); if (EFI_ERROR (Status)) { return FALSE; } + return TRUE; } @@ -152,19 +154,20 @@ GetRandomNumber32 ( BOOLEAN EFIAPI GetRandomNumber64 ( - OUT UINT64 *Rand + OUT UINT64 *Rand ) { - EFI_STATUS Status; + EFI_STATUS Status; if (Rand == NULL) { return FALSE; } - Status = GenerateRandomNumberViaNist800Algorithm ((UINT8*)Rand, sizeof(UINT64)); + Status = GenerateRandomNumberViaNist800Algorithm ((UINT8 *)Rand, sizeof (UINT64)); if (EFI_ERROR (Status)) { return FALSE; } + return TRUE; } @@ -182,18 +185,19 @@ GetRandomNumber64 ( BOOLEAN EFIAPI GetRandomNumber128 ( - OUT UINT64 *Rand + OUT UINT64 *Rand ) { - EFI_STATUS Status; + EFI_STATUS Status; if (Rand == NULL) { return FALSE; } - Status = GenerateRandomNumberViaNist800Algorithm ((UINT8*)Rand, 2 * sizeof(UINT64)); + Status = GenerateRandomNumberViaNist800Algorithm ((UINT8 *)Rand, 2 * sizeof (UINT64)); if (EFI_ERROR (Status)) { return FALSE; } + return TRUE; } diff --git a/MdePkg/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c b/MdePkg/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c index cc79843..11d188d 100644 --- a/MdePkg/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c +++ b/MdePkg/Library/DxeRuntimeDebugLibSerialPort/DebugLib.c @@ -20,8 +20,8 @@ #include #include -STATIC EFI_EVENT mEfiExitBootServicesEvent; -STATIC BOOLEAN mEfiAtRuntime = FALSE; +STATIC EFI_EVENT mEfiExitBootServicesEvent; +STATIC BOOLEAN mEfiAtRuntime = FALSE; // // Define the maximum debug and assert message length that this library supports @@ -32,7 +32,7 @@ STATIC BOOLEAN mEfiAtRuntime = FALSE; // VA_LIST can not initialize to NULL for all compiler, so we use this to // indicate a null VA_LIST // -VA_LIST mVaListNull; +VA_LIST mVaListNull; /** Set AtRuntime flag as TRUE after ExitBootServices. @@ -45,8 +45,8 @@ STATIC VOID EFIAPI ExitBootServicesEvent ( - IN EFI_EVENT Event, - IN VOID *Context + IN EFI_EVENT Event, + IN VOID *Context ) { mEfiAtRuntime = TRUE; @@ -70,16 +70,20 @@ DxeRuntimeDebugLibSerialPortConstructor ( IN EFI_SYSTEM_TABLE *SystemTable ) { - EFI_STATUS Status; + EFI_STATUS Status; Status = SerialPortInitialize (); if (EFI_ERROR (Status)) { return Status; } - return SystemTable->BootServices->CreateEvent (EVT_SIGNAL_EXIT_BOOT_SERVICES, - TPL_NOTIFY, ExitBootServicesEvent, NULL, - &mEfiExitBootServicesEvent); + return SystemTable->BootServices->CreateEvent ( + EVT_SIGNAL_EXIT_BOOT_SERVICES, + TPL_NOTIFY, + ExitBootServicesEvent, + NULL, + &mEfiExitBootServicesEvent + ); } /** @@ -125,14 +129,13 @@ DebugPrint ( ... ) { - VA_LIST Marker; + VA_LIST Marker; VA_START (Marker, Format); DebugVPrint (ErrorLevel, Format, Marker); VA_END (Marker); } - /** Prints a debug message to the debug output device if the specified error level is enabled base on Null-terminated format string and a @@ -152,13 +155,13 @@ DebugPrint ( **/ VOID DebugPrintMarker ( - IN UINTN ErrorLevel, - IN CONST CHAR8 *Format, - IN VA_LIST VaListMarker, - IN BASE_LIST BaseListMarker + IN UINTN ErrorLevel, + IN CONST CHAR8 *Format, + IN VA_LIST VaListMarker, + IN BASE_LIST BaseListMarker ) { - CHAR8 Buffer[MAX_DEBUG_MESSAGE_LENGTH]; + CHAR8 Buffer[MAX_DEBUG_MESSAGE_LENGTH]; if (mEfiAtRuntime) { return; @@ -191,7 +194,6 @@ DebugPrintMarker ( SerialPortWrite ((UINT8 *)Buffer, AsciiStrLen (Buffer)); } - /** Prints a debug message to the debug output device if the specified error level is enabled. @@ -210,15 +212,14 @@ DebugPrintMarker ( VOID EFIAPI DebugVPrint ( - IN UINTN ErrorLevel, - IN CONST CHAR8 *Format, - IN VA_LIST VaListMarker + IN UINTN ErrorLevel, + IN CONST CHAR8 *Format, + IN VA_LIST VaListMarker ) { DebugPrintMarker (ErrorLevel, Format, VaListMarker, NULL); } - /** Prints a debug message to the debug output device if the specified error level is enabled. @@ -239,15 +240,14 @@ DebugVPrint ( VOID EFIAPI DebugBPrint ( - IN UINTN ErrorLevel, - IN CONST CHAR8 *Format, - IN BASE_LIST BaseListMarker + IN UINTN ErrorLevel, + IN CONST CHAR8 *Format, + IN BASE_LIST BaseListMarker ) { DebugPrintMarker (ErrorLevel, Format, mVaListNull, BaseListMarker); } - /** Prints an assert message containing a filename, line number, and description. This may be followed by a breakpoint or a dead loop. @@ -282,8 +282,15 @@ DebugAssert ( // // Generate the ASSERT() message in Ascii format // - AsciiSPrint (Buffer, sizeof (Buffer), "ASSERT [%a] %a(%d): %a\n", - gEfiCallerBaseName, FileName, LineNumber, Description); + AsciiSPrint ( + Buffer, + sizeof (Buffer), + "ASSERT [%a] %a(%d): %a\n", + gEfiCallerBaseName, + FileName, + LineNumber, + Description + ); if (!mEfiAtRuntime) { // @@ -295,14 +302,13 @@ DebugAssert ( // // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings // - if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) { + if ((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) { CpuBreakpoint (); - } else if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) { + } else if ((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) { CpuDeadLoop (); } } - /** Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer. @@ -333,10 +339,9 @@ DebugClearMemory ( // // SetMem() checks for the the ASSERT() condition on Length and returns Buffer // - return SetMem (Buffer, Length, PcdGet8(PcdDebugClearMemoryValue)); + return SetMem (Buffer, Length, PcdGet8 (PcdDebugClearMemoryValue)); } - /** Returns TRUE if ASSERT() macros are enabled. @@ -353,10 +358,9 @@ DebugAssertEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0); } - /** Returns TRUE if DEBUG() macros are enabled. @@ -373,10 +377,9 @@ DebugPrintEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0); } - /** Returns TRUE if DEBUG_CODE() macros are enabled. @@ -393,10 +396,9 @@ DebugCodeEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0); } - /** Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled. @@ -413,7 +415,7 @@ DebugClearMemoryEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0); } /** @@ -428,8 +430,8 @@ DebugClearMemoryEnabled ( BOOLEAN EFIAPI DebugPrintLevelEnabled ( - IN CONST UINTN ErrorLevel + IN CONST UINTN ErrorLevel ) { - return (BOOLEAN) ((ErrorLevel & PcdGet32(PcdFixedDebugPrintErrorLevel)) != 0); + return (BOOLEAN)((ErrorLevel & PcdGet32 (PcdFixedDebugPrintErrorLevel)) != 0); } diff --git a/MdePkg/Library/DxeRuntimePciExpressLib/PciExpressLib.c b/MdePkg/Library/DxeRuntimePciExpressLib/PciExpressLib.c index cb80725..a9f3807 100644 --- a/MdePkg/Library/DxeRuntimePciExpressLib/PciExpressLib.c +++ b/MdePkg/Library/DxeRuntimePciExpressLib/PciExpressLib.c @@ -10,7 +10,6 @@ **/ - #include #include @@ -39,25 +38,25 @@ /// Define table for mapping PCI Express MMIO physical addresses to virtual addresses at OS runtime /// typedef struct { - UINTN PhysicalAddress; - UINTN VirtualAddress; + UINTN PhysicalAddress; + UINTN VirtualAddress; } PCI_EXPRESS_RUNTIME_REGISTRATION_TABLE; /// /// Set Virtual Address Map Event /// -EFI_EVENT mDxeRuntimePciExpressLibVirtualNotifyEvent = NULL; +EFI_EVENT mDxeRuntimePciExpressLibVirtualNotifyEvent = NULL; /// /// Module global that contains the base physical address and size of the PCI Express MMIO range. /// -UINTN mDxeRuntimePciExpressLibPciExpressBaseAddress = 0; -UINTN mDxeRuntimePciExpressLibPciExpressBaseSize = 0; +UINTN mDxeRuntimePciExpressLibPciExpressBaseAddress = 0; +UINTN mDxeRuntimePciExpressLibPciExpressBaseSize = 0; /// /// The number of PCI devices that have been registered for runtime access. /// -UINTN mDxeRuntimePciExpressLibNumberOfRuntimeRanges = 0; +UINTN mDxeRuntimePciExpressLibNumberOfRuntimeRanges = 0; /// /// The table of PCI devices that have been registered for runtime access. @@ -67,8 +66,7 @@ PCI_EXPRESS_RUNTIME_REGISTRATION_TABLE *mDxeRuntimePciExpressLibRegistrationTab /// /// The table index of the most recent virtual address lookup. /// -UINTN mDxeRuntimePciExpressLibLastRuntimeRange = 0; - +UINTN mDxeRuntimePciExpressLibLastRuntimeRange = 0; /** Convert the physical PCI Express MMIO addresses for all registered PCI devices @@ -98,13 +96,13 @@ DxeRuntimePciExpressLibVirtualNotify ( // virtual addresses. // for (Index = 0; Index < mDxeRuntimePciExpressLibNumberOfRuntimeRanges; Index++) { - EfiConvertPointer (0, (VOID **) &(mDxeRuntimePciExpressLibRegistrationTable[Index].VirtualAddress)); + EfiConvertPointer (0, (VOID **)&(mDxeRuntimePciExpressLibRegistrationTable[Index].VirtualAddress)); } // // Convert table pointer that is allocated from EfiRuntimeServicesData to a virtual address. // - EfiConvertPointer (0, (VOID **) &mDxeRuntimePciExpressLibRegistrationTable); + EfiConvertPointer (0, (VOID **)&mDxeRuntimePciExpressLibRegistrationTable); } /** @@ -130,8 +128,8 @@ DxeRuntimePciExpressLibConstructor ( // // Cache the physical address of the PCI Express MMIO range into a module global variable // - mDxeRuntimePciExpressLibPciExpressBaseAddress = (UINTN) PcdGet64 (PcdPciExpressBaseAddress); - mDxeRuntimePciExpressLibPciExpressBaseSize = (UINTN) PcdGet64 (PcdPciExpressBaseSize); + mDxeRuntimePciExpressLibPciExpressBaseAddress = (UINTN)PcdGet64 (PcdPciExpressBaseAddress); + mDxeRuntimePciExpressLibPciExpressBaseSize = (UINTN)PcdGet64 (PcdPciExpressBaseSize); // // Register SetVirtualAddressMap () notify function @@ -215,7 +213,7 @@ GetPciExpressAddress ( // Make sure the Address is in MMCONF address space // if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINTN) -1; + return (UINTN)-1; } // @@ -259,7 +257,7 @@ GetPciExpressAddress ( // // No match was found. This is a critical error at OS runtime, so ASSERT() and force a breakpoint. // - CpuBreakpoint(); + CpuBreakpoint (); // // Return the physical address @@ -310,7 +308,7 @@ PciExpressRegisterForRuntimeAccess ( // // Make sure Address is valid // - ASSERT_INVALID_PCI_ADDRESS (Address); + ASSERT_INVALID_PCI_ADDRESS (Address); // // Make sure the Address is in MMCONF address space @@ -363,7 +361,8 @@ PciExpressRegisterForRuntimeAccess ( if (NewTable == NULL) { return RETURN_OUT_OF_RESOURCES; } - mDxeRuntimePciExpressLibRegistrationTable = NewTable; + + mDxeRuntimePciExpressLibRegistrationTable = NewTable; mDxeRuntimePciExpressLibRegistrationTable[mDxeRuntimePciExpressLibNumberOfRuntimeRanges].PhysicalAddress = Address; mDxeRuntimePciExpressLibRegistrationTable[mDxeRuntimePciExpressLibNumberOfRuntimeRanges].VirtualAddress = Address; mDxeRuntimePciExpressLibNumberOfRuntimeRanges++; @@ -371,7 +370,6 @@ PciExpressRegisterForRuntimeAccess ( return RETURN_SUCCESS; } - /** Reads an 8-bit PCI configuration register. @@ -390,13 +388,14 @@ PciExpressRegisterForRuntimeAccess ( UINT8 EFIAPI PciExpressRead8 ( - IN UINTN Address + IN UINTN Address ) { ASSERT_INVALID_PCI_ADDRESS (Address); if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT8) -1; + return (UINT8)-1; } + return MmioRead8 (GetPciExpressAddress (Address)); } @@ -420,13 +419,14 @@ PciExpressRead8 ( UINT8 EFIAPI PciExpressWrite8 ( - IN UINTN Address, - IN UINT8 Value + IN UINTN Address, + IN UINT8 Value ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT8) -1; + return (UINT8)-1; } + return MmioWrite8 (GetPciExpressAddress (Address), Value); } @@ -454,13 +454,14 @@ PciExpressWrite8 ( UINT8 EFIAPI PciExpressOr8 ( - IN UINTN Address, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 OrData ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT8) -1; + return (UINT8)-1; } + return MmioOr8 (GetPciExpressAddress (Address), OrData); } @@ -488,13 +489,14 @@ PciExpressOr8 ( UINT8 EFIAPI PciExpressAnd8 ( - IN UINTN Address, - IN UINT8 AndData + IN UINTN Address, + IN UINT8 AndData ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT8) -1; + return (UINT8)-1; } + return MmioAnd8 (GetPciExpressAddress (Address), AndData); } @@ -524,14 +526,15 @@ PciExpressAnd8 ( UINT8 EFIAPI PciExpressAndThenOr8 ( - IN UINTN Address, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 AndData, + IN UINT8 OrData ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT8) -1; + return (UINT8)-1; } + return MmioAndThenOr8 ( GetPciExpressAddress (Address), AndData, @@ -564,14 +567,15 @@ PciExpressAndThenOr8 ( UINT8 EFIAPI PciExpressBitFieldRead8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT8) -1; + return (UINT8)-1; } + return MmioBitFieldRead8 ( GetPciExpressAddress (Address), StartBit, @@ -607,15 +611,16 @@ PciExpressBitFieldRead8 ( UINT8 EFIAPI PciExpressBitFieldWrite8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT8) -1; + return (UINT8)-1; } + return MmioBitFieldWrite8 ( GetPciExpressAddress (Address), StartBit, @@ -655,15 +660,16 @@ PciExpressBitFieldWrite8 ( UINT8 EFIAPI PciExpressBitFieldOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT8) -1; + return (UINT8)-1; } + return MmioBitFieldOr8 ( GetPciExpressAddress (Address), StartBit, @@ -703,15 +709,16 @@ PciExpressBitFieldOr8 ( UINT8 EFIAPI PciExpressBitFieldAnd8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT8) -1; + return (UINT8)-1; } + return MmioBitFieldAnd8 ( GetPciExpressAddress (Address), StartBit, @@ -755,16 +762,17 @@ PciExpressBitFieldAnd8 ( UINT8 EFIAPI PciExpressBitFieldAndThenOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT8) -1; + return (UINT8)-1; } + return MmioBitFieldAndThenOr8 ( GetPciExpressAddress (Address), StartBit, @@ -794,12 +802,13 @@ PciExpressBitFieldAndThenOr8 ( UINT16 EFIAPI PciExpressRead16 ( - IN UINTN Address + IN UINTN Address ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT16) -1; + return (UINT16)-1; } + return MmioRead16 (GetPciExpressAddress (Address)); } @@ -824,13 +833,14 @@ PciExpressRead16 ( UINT16 EFIAPI PciExpressWrite16 ( - IN UINTN Address, - IN UINT16 Value + IN UINTN Address, + IN UINT16 Value ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT16) -1; + return (UINT16)-1; } + return MmioWrite16 (GetPciExpressAddress (Address), Value); } @@ -859,13 +869,14 @@ PciExpressWrite16 ( UINT16 EFIAPI PciExpressOr16 ( - IN UINTN Address, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 OrData ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT16) -1; + return (UINT16)-1; } + return MmioOr16 (GetPciExpressAddress (Address), OrData); } @@ -894,13 +905,14 @@ PciExpressOr16 ( UINT16 EFIAPI PciExpressAnd16 ( - IN UINTN Address, - IN UINT16 AndData + IN UINTN Address, + IN UINT16 AndData ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT16) -1; + return (UINT16)-1; } + return MmioAnd16 (GetPciExpressAddress (Address), AndData); } @@ -931,14 +943,15 @@ PciExpressAnd16 ( UINT16 EFIAPI PciExpressAndThenOr16 ( - IN UINTN Address, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 AndData, + IN UINT16 OrData ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT16) -1; + return (UINT16)-1; } + return MmioAndThenOr16 ( GetPciExpressAddress (Address), AndData, @@ -972,14 +985,15 @@ PciExpressAndThenOr16 ( UINT16 EFIAPI PciExpressBitFieldRead16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT16) -1; + return (UINT16)-1; } + return MmioBitFieldRead16 ( GetPciExpressAddress (Address), StartBit, @@ -1016,15 +1030,16 @@ PciExpressBitFieldRead16 ( UINT16 EFIAPI PciExpressBitFieldWrite16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT16) -1; + return (UINT16)-1; } + return MmioBitFieldWrite16 ( GetPciExpressAddress (Address), StartBit, @@ -1065,15 +1080,16 @@ PciExpressBitFieldWrite16 ( UINT16 EFIAPI PciExpressBitFieldOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT16) -1; + return (UINT16)-1; } + return MmioBitFieldOr16 ( GetPciExpressAddress (Address), StartBit, @@ -1114,15 +1130,16 @@ PciExpressBitFieldOr16 ( UINT16 EFIAPI PciExpressBitFieldAnd16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT16) -1; + return (UINT16)-1; } + return MmioBitFieldAnd16 ( GetPciExpressAddress (Address), StartBit, @@ -1167,16 +1184,17 @@ PciExpressBitFieldAnd16 ( UINT16 EFIAPI PciExpressBitFieldAndThenOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT16) -1; + return (UINT16)-1; } + return MmioBitFieldAndThenOr16 ( GetPciExpressAddress (Address), StartBit, @@ -1206,12 +1224,13 @@ PciExpressBitFieldAndThenOr16 ( UINT32 EFIAPI PciExpressRead32 ( - IN UINTN Address + IN UINTN Address ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT32) -1; + return (UINT32)-1; } + return MmioRead32 (GetPciExpressAddress (Address)); } @@ -1236,13 +1255,14 @@ PciExpressRead32 ( UINT32 EFIAPI PciExpressWrite32 ( - IN UINTN Address, - IN UINT32 Value + IN UINTN Address, + IN UINT32 Value ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT32) -1; + return (UINT32)-1; } + return MmioWrite32 (GetPciExpressAddress (Address), Value); } @@ -1271,13 +1291,14 @@ PciExpressWrite32 ( UINT32 EFIAPI PciExpressOr32 ( - IN UINTN Address, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 OrData ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT32) -1; + return (UINT32)-1; } + return MmioOr32 (GetPciExpressAddress (Address), OrData); } @@ -1306,13 +1327,14 @@ PciExpressOr32 ( UINT32 EFIAPI PciExpressAnd32 ( - IN UINTN Address, - IN UINT32 AndData + IN UINTN Address, + IN UINT32 AndData ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT32) -1; + return (UINT32)-1; } + return MmioAnd32 (GetPciExpressAddress (Address), AndData); } @@ -1343,14 +1365,15 @@ PciExpressAnd32 ( UINT32 EFIAPI PciExpressAndThenOr32 ( - IN UINTN Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 AndData, + IN UINT32 OrData ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT32) -1; + return (UINT32)-1; } + return MmioAndThenOr32 ( GetPciExpressAddress (Address), AndData, @@ -1384,14 +1407,15 @@ PciExpressAndThenOr32 ( UINT32 EFIAPI PciExpressBitFieldRead32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT32) -1; + return (UINT32)-1; } + return MmioBitFieldRead32 ( GetPciExpressAddress (Address), StartBit, @@ -1428,15 +1452,16 @@ PciExpressBitFieldRead32 ( UINT32 EFIAPI PciExpressBitFieldWrite32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT32) -1; + return (UINT32)-1; } + return MmioBitFieldWrite32 ( GetPciExpressAddress (Address), StartBit, @@ -1477,15 +1502,16 @@ PciExpressBitFieldWrite32 ( UINT32 EFIAPI PciExpressBitFieldOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT32) -1; + return (UINT32)-1; } + return MmioBitFieldOr32 ( GetPciExpressAddress (Address), StartBit, @@ -1526,15 +1552,16 @@ PciExpressBitFieldOr32 ( UINT32 EFIAPI PciExpressBitFieldAnd32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT32) -1; + return (UINT32)-1; } + return MmioBitFieldAnd32 ( GetPciExpressAddress (Address), StartBit, @@ -1579,16 +1606,17 @@ PciExpressBitFieldAnd32 ( UINT32 EFIAPI PciExpressBitFieldAndThenOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { if (Address >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINT32) -1; + return (UINT32)-1; } + return MmioBitFieldAndThenOr32 ( GetPciExpressAddress (Address), StartBit, @@ -1625,12 +1653,12 @@ PciExpressBitFieldAndThenOr32 ( UINTN EFIAPI PciExpressReadBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - OUT VOID *Buffer + IN UINTN StartAddress, + IN UINTN Size, + OUT VOID *Buffer ) { - UINTN ReturnValue; + UINTN ReturnValue; // // Make sure Address is valid @@ -1642,7 +1670,7 @@ PciExpressReadBuffer ( // Make sure the Address is in MMCONF address space // if (StartAddress >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINTN) -1; + return (UINTN)-1; } if (Size == 0) { @@ -1661,41 +1689,41 @@ PciExpressReadBuffer ( // Read a byte if StartAddress is byte aligned // *(volatile UINT8 *)Buffer = PciExpressRead8 (StartAddress); - StartAddress += sizeof (UINT8); - Size -= sizeof (UINT8); - Buffer = (UINT8*)Buffer + 1; + StartAddress += sizeof (UINT8); + Size -= sizeof (UINT8); + Buffer = (UINT8 *)Buffer + 1; } - if (Size >= sizeof (UINT16) && (StartAddress & 2) != 0) { + if ((Size >= sizeof (UINT16)) && ((StartAddress & 2) != 0)) { // // Read a word if StartAddress is word aligned // - WriteUnaligned16 ((UINT16 *) Buffer, (UINT16) PciExpressRead16 (StartAddress)); + WriteUnaligned16 ((UINT16 *)Buffer, (UINT16)PciExpressRead16 (StartAddress)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } while (Size >= sizeof (UINT32)) { // // Read as many double words as possible // - WriteUnaligned32 ((UINT32 *) Buffer, (UINT32) PciExpressRead32 (StartAddress)); + WriteUnaligned32 ((UINT32 *)Buffer, (UINT32)PciExpressRead32 (StartAddress)); StartAddress += sizeof (UINT32); - Size -= sizeof (UINT32); - Buffer = (UINT32*)Buffer + 1; + Size -= sizeof (UINT32); + Buffer = (UINT32 *)Buffer + 1; } if (Size >= sizeof (UINT16)) { // // Read the last remaining word if exist // - WriteUnaligned16 ((UINT16 *) Buffer, (UINT16) PciExpressRead16 (StartAddress)); + WriteUnaligned16 ((UINT16 *)Buffer, (UINT16)PciExpressRead16 (StartAddress)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } if (Size >= sizeof (UINT8)) { @@ -1736,12 +1764,12 @@ PciExpressReadBuffer ( UINTN EFIAPI PciExpressWriteBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - IN VOID *Buffer + IN UINTN StartAddress, + IN UINTN Size, + IN VOID *Buffer ) { - UINTN ReturnValue; + UINTN ReturnValue; // // Make sure Address is valid @@ -1753,7 +1781,7 @@ PciExpressWriteBuffer ( // Make sure the Address is in MMCONF address space // if (StartAddress >= mDxeRuntimePciExpressLibPciExpressBaseSize) { - return (UINTN) -1; + return (UINTN)-1; } if (Size == 0) { @@ -1771,47 +1799,47 @@ PciExpressWriteBuffer ( // // Write a byte if StartAddress is byte aligned // - PciExpressWrite8 (StartAddress, *(UINT8*)Buffer); + PciExpressWrite8 (StartAddress, *(UINT8 *)Buffer); StartAddress += sizeof (UINT8); - Size -= sizeof (UINT8); - Buffer = (UINT8*)Buffer + 1; + Size -= sizeof (UINT8); + Buffer = (UINT8 *)Buffer + 1; } - if (Size >= sizeof (UINT16) && (StartAddress & 2) != 0) { + if ((Size >= sizeof (UINT16)) && ((StartAddress & 2) != 0)) { // // Write a word if StartAddress is word aligned // - PciExpressWrite16 (StartAddress, ReadUnaligned16 ((UINT16*)Buffer)); + PciExpressWrite16 (StartAddress, ReadUnaligned16 ((UINT16 *)Buffer)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } while (Size >= sizeof (UINT32)) { // // Write as many double words as possible // - PciExpressWrite32 (StartAddress, ReadUnaligned32 ((UINT32*)Buffer)); + PciExpressWrite32 (StartAddress, ReadUnaligned32 ((UINT32 *)Buffer)); StartAddress += sizeof (UINT32); - Size -= sizeof (UINT32); - Buffer = (UINT32*)Buffer + 1; + Size -= sizeof (UINT32); + Buffer = (UINT32 *)Buffer + 1; } if (Size >= sizeof (UINT16)) { // // Write the last remaining word if exist // - PciExpressWrite16 (StartAddress, ReadUnaligned16 ((UINT16*)Buffer)); + PciExpressWrite16 (StartAddress, ReadUnaligned16 ((UINT16 *)Buffer)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } if (Size >= sizeof (UINT8)) { // // Write the last remaining byte if exist // - PciExpressWrite8 (StartAddress, *(UINT8*)Buffer); + PciExpressWrite8 (StartAddress, *(UINT8 *)Buffer); } return ReturnValue; diff --git a/MdePkg/Library/DxeServicesLib/Allocate.c b/MdePkg/Library/DxeServicesLib/Allocate.c index efb6576..26f249b 100644 --- a/MdePkg/Library/DxeServicesLib/Allocate.c +++ b/MdePkg/Library/DxeServicesLib/Allocate.c @@ -33,8 +33,8 @@ AllocatePeiAccessiblePages ( IN UINTN Pages ) { - EFI_STATUS Status; - EFI_PHYSICAL_ADDRESS Memory; + EFI_STATUS Status; + EFI_PHYSICAL_ADDRESS Memory; if (Pages == 0) { return NULL; @@ -44,5 +44,6 @@ AllocatePeiAccessiblePages ( if (EFI_ERROR (Status)) { return NULL; } + return (VOID *)(UINTN)Memory; } diff --git a/MdePkg/Library/DxeServicesLib/DxeServicesLib.c b/MdePkg/Library/DxeServicesLib/DxeServicesLib.c index 3e3bbf6..8f5a15d 100644 --- a/MdePkg/Library/DxeServicesLib/DxeServicesLib.c +++ b/MdePkg/Library/DxeServicesLib/DxeServicesLib.c @@ -40,19 +40,19 @@ **/ EFI_HANDLE InternalImageHandleToFvHandle ( - EFI_HANDLE ImageHandle + EFI_HANDLE ImageHandle ) { - EFI_STATUS Status; - EFI_LOADED_IMAGE_PROTOCOL *LoadedImage; + EFI_STATUS Status; + EFI_LOADED_IMAGE_PROTOCOL *LoadedImage; ASSERT (ImageHandle != NULL); Status = gBS->HandleProtocol ( - ImageHandle, - &gEfiLoadedImageProtocolGuid, - (VOID **) &LoadedImage - ); + ImageHandle, + &gEfiLoadedImageProtocolGuid, + (VOID **)&LoadedImage + ); ASSERT_EFI_ERROR (Status); @@ -63,7 +63,6 @@ InternalImageHandleToFvHandle ( // protocol is installed. // return LoadedImage->DeviceHandle; - } /** @@ -111,17 +110,17 @@ InternalImageHandleToFvHandle ( **/ EFI_STATUS InternalGetSectionFromFv ( - IN EFI_HANDLE FvHandle, - IN CONST EFI_GUID *NameGuid, - IN EFI_SECTION_TYPE SectionType, - IN UINTN SectionInstance, - OUT VOID **Buffer, - OUT UINTN *Size + IN EFI_HANDLE FvHandle, + IN CONST EFI_GUID *NameGuid, + IN EFI_SECTION_TYPE SectionType, + IN UINTN SectionInstance, + OUT VOID **Buffer, + OUT UINTN *Size ) { - EFI_STATUS Status; - EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv; - UINT32 AuthenticationStatus; + EFI_STATUS Status; + EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv; + UINT32 AuthenticationStatus; ASSERT (NameGuid != NULL); ASSERT (Buffer != NULL); @@ -137,7 +136,7 @@ InternalGetSectionFromFv ( Status = gBS->HandleProtocol ( FvHandle, &gEfiFirmwareVolume2ProtocolGuid, - (VOID **) &Fv + (VOID **)&Fv ); if (EFI_ERROR (Status)) { return EFI_NOT_FOUND; @@ -146,17 +145,17 @@ InternalGetSectionFromFv ( // // Read desired section content in NameGuid file // - *Buffer = NULL; - *Size = 0; - Status = Fv->ReadSection ( - Fv, - NameGuid, - SectionType, - SectionInstance, - Buffer, - Size, - &AuthenticationStatus - ); + *Buffer = NULL; + *Size = 0; + Status = Fv->ReadSection ( + Fv, + NameGuid, + SectionType, + SectionInstance, + Buffer, + Size, + &AuthenticationStatus + ); if (EFI_ERROR (Status) && (SectionType == EFI_SECTION_TE)) { // @@ -229,23 +228,23 @@ InternalGetSectionFromFv ( EFI_STATUS EFIAPI GetSectionFromAnyFvByFileType ( - IN EFI_FV_FILETYPE FileType, - IN UINTN FileInstance, - IN EFI_SECTION_TYPE SectionType, - IN UINTN SectionInstance, - OUT VOID **Buffer, - OUT UINTN *Size + IN EFI_FV_FILETYPE FileType, + IN UINTN FileInstance, + IN EFI_SECTION_TYPE SectionType, + IN UINTN SectionInstance, + OUT VOID **Buffer, + OUT UINTN *Size ) { - EFI_STATUS Status; - EFI_HANDLE *HandleBuffer; - UINTN HandleCount; - UINTN IndexFv; - UINTN IndexFile; - UINTN Key; - EFI_GUID NameGuid; - EFI_FV_FILE_ATTRIBUTES Attributes; - EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv; + EFI_STATUS Status; + EFI_HANDLE *HandleBuffer; + UINTN HandleCount; + UINTN IndexFv; + UINTN IndexFile; + UINTN Key; + EFI_GUID NameGuid; + EFI_FV_FILE_ATTRIBUTES Attributes; + EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv; ASSERT (Buffer != NULL); ASSERT (Size != NULL); @@ -254,13 +253,13 @@ GetSectionFromAnyFvByFileType ( // Locate all available FVs. // HandleBuffer = NULL; - Status = gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiFirmwareVolume2ProtocolGuid, - NULL, - &HandleCount, - &HandleBuffer - ); + Status = gBS->LocateHandleBuffer ( + ByProtocol, + &gEfiFirmwareVolume2ProtocolGuid, + NULL, + &HandleCount, + &HandleBuffer + ); if (EFI_ERROR (Status)) { return Status; } @@ -282,13 +281,14 @@ GetSectionFromAnyFvByFileType ( // Use Firmware Volume 2 Protocol to search for a file of type FileType in all FVs. // IndexFile = FileInstance + 1; - Key = 0; + Key = 0; do { Status = Fv->GetNextFile (Fv, &Key, &FileType, &NameGuid, &Attributes, Size); if (EFI_ERROR (Status)) { break; } - IndexFile --; + + IndexFile--; } while (IndexFile > 0); // @@ -320,7 +320,7 @@ GetSectionFromAnyFvByFileType ( Done: if (HandleBuffer != NULL) { - FreePool(HandleBuffer); + FreePool (HandleBuffer); } return Status; @@ -372,18 +372,18 @@ Done: EFI_STATUS EFIAPI GetSectionFromAnyFv ( - IN CONST EFI_GUID *NameGuid, - IN EFI_SECTION_TYPE SectionType, - IN UINTN SectionInstance, - OUT VOID **Buffer, - OUT UINTN *Size + IN CONST EFI_GUID *NameGuid, + IN EFI_SECTION_TYPE SectionType, + IN UINTN SectionInstance, + OUT VOID **Buffer, + OUT UINTN *Size ) { - EFI_STATUS Status; - EFI_HANDLE *HandleBuffer; - UINTN HandleCount; - UINTN Index; - EFI_HANDLE FvHandle; + EFI_STATUS Status; + EFI_HANDLE *HandleBuffer; + UINTN HandleCount; + UINTN Index; + EFI_HANDLE FvHandle; // // Search the FV that contain the caller's FFS first. @@ -392,26 +392,26 @@ GetSectionFromAnyFv ( // will locate the FFS faster. // FvHandle = InternalImageHandleToFvHandle (gImageHandle); - Status = InternalGetSectionFromFv ( - FvHandle, - NameGuid, - SectionType, - SectionInstance, - Buffer, - Size - ); + Status = InternalGetSectionFromFv ( + FvHandle, + NameGuid, + SectionType, + SectionInstance, + Buffer, + Size + ); if (!EFI_ERROR (Status)) { return EFI_SUCCESS; } HandleBuffer = NULL; - Status = gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiFirmwareVolume2ProtocolGuid, - NULL, - &HandleCount, - &HandleBuffer - ); + Status = gBS->LocateHandleBuffer ( + ByProtocol, + &gEfiFirmwareVolume2ProtocolGuid, + NULL, + &HandleCount, + &HandleBuffer + ); if (EFI_ERROR (Status)) { goto Done; } @@ -434,7 +434,6 @@ GetSectionFromAnyFv ( goto Done; } } - } if (Index == HandleCount) { @@ -444,10 +443,10 @@ GetSectionFromAnyFv ( Done: if (HandleBuffer != NULL) { - FreePool(HandleBuffer); + FreePool (HandleBuffer); } - return Status; + return Status; } /** @@ -498,15 +497,15 @@ Done: EFI_STATUS EFIAPI GetSectionFromFv ( - IN CONST EFI_GUID *NameGuid, - IN EFI_SECTION_TYPE SectionType, - IN UINTN SectionInstance, - OUT VOID **Buffer, - OUT UINTN *Size - ) + IN CONST EFI_GUID *NameGuid, + IN EFI_SECTION_TYPE SectionType, + IN UINTN SectionInstance, + OUT VOID **Buffer, + OUT UINTN *Size + ) { return InternalGetSectionFromFv ( - InternalImageHandleToFvHandle(gImageHandle), + InternalImageHandleToFvHandle (gImageHandle), NameGuid, SectionType, SectionInstance, @@ -515,7 +514,6 @@ GetSectionFromFv ( ); } - /** Searches the FFS file the currently executing module was loaded from and returns the first matching FFS section. @@ -561,14 +559,14 @@ GetSectionFromFv ( EFI_STATUS EFIAPI GetSectionFromFfs ( - IN EFI_SECTION_TYPE SectionType, - IN UINTN SectionInstance, - OUT VOID **Buffer, - OUT UINTN *Size - ) + IN EFI_SECTION_TYPE SectionType, + IN UINTN SectionInstance, + OUT VOID **Buffer, + OUT UINTN *Size + ) { - return InternalGetSectionFromFv( - InternalImageHandleToFvHandle(gImageHandle), + return InternalGetSectionFromFv ( + InternalImageHandleToFvHandle (gImageHandle), &gEfiCallerIdGuid, SectionType, SectionInstance, @@ -577,7 +575,6 @@ GetSectionFromFfs ( ); } - /** Get the image file buffer data and buffer size by its device path. @@ -608,48 +605,48 @@ GetSectionFromFfs ( VOID * EFIAPI GetFileBufferByFilePath ( - IN BOOLEAN BootPolicy, - IN CONST EFI_DEVICE_PATH_PROTOCOL *FilePath, - OUT UINTN *FileSize, - OUT UINT32 *AuthenticationStatus + IN BOOLEAN BootPolicy, + IN CONST EFI_DEVICE_PATH_PROTOCOL *FilePath, + OUT UINTN *FileSize, + OUT UINT32 *AuthenticationStatus ) { - EFI_DEVICE_PATH_PROTOCOL *DevicePathNode; - EFI_DEVICE_PATH_PROTOCOL *OrigDevicePathNode; - EFI_DEVICE_PATH_PROTOCOL *TempDevicePathNode; - EFI_HANDLE Handle; - EFI_GUID *FvNameGuid; - EFI_FIRMWARE_VOLUME2_PROTOCOL *FwVol; - EFI_SECTION_TYPE SectionType; - UINT8 *ImageBuffer; - UINTN ImageBufferSize; - EFI_FV_FILETYPE Type; - EFI_FV_FILE_ATTRIBUTES Attrib; - EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *Volume; - EFI_FILE_HANDLE FileHandle; - EFI_FILE_HANDLE LastHandle; - EFI_FILE_INFO *FileInfo; - UINTN FileInfoSize; - EFI_LOAD_FILE_PROTOCOL *LoadFile; - EFI_LOAD_FILE2_PROTOCOL *LoadFile2; - EFI_STATUS Status; + EFI_DEVICE_PATH_PROTOCOL *DevicePathNode; + EFI_DEVICE_PATH_PROTOCOL *OrigDevicePathNode; + EFI_DEVICE_PATH_PROTOCOL *TempDevicePathNode; + EFI_HANDLE Handle; + EFI_GUID *FvNameGuid; + EFI_FIRMWARE_VOLUME2_PROTOCOL *FwVol; + EFI_SECTION_TYPE SectionType; + UINT8 *ImageBuffer; + UINTN ImageBufferSize; + EFI_FV_FILETYPE Type; + EFI_FV_FILE_ATTRIBUTES Attrib; + EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *Volume; + EFI_FILE_HANDLE FileHandle; + EFI_FILE_HANDLE LastHandle; + EFI_FILE_INFO *FileInfo; + UINTN FileInfoSize; + EFI_LOAD_FILE_PROTOCOL *LoadFile; + EFI_LOAD_FILE2_PROTOCOL *LoadFile2; + EFI_STATUS Status; // // Check input File device path. // - if (FilePath == NULL || FileSize == NULL || AuthenticationStatus == NULL) { + if ((FilePath == NULL) || (FileSize == NULL) || (AuthenticationStatus == NULL)) { return NULL; } // // Init local variable // - TempDevicePathNode = NULL; - FvNameGuid = NULL; - FileInfo = NULL; - FileHandle = NULL; - ImageBuffer = NULL; - ImageBufferSize = 0; + TempDevicePathNode = NULL; + FvNameGuid = NULL; + FileInfo = NULL; + FileHandle = NULL; + ImageBuffer = NULL; + ImageBufferSize = 0; *AuthenticationStatus = 0; // @@ -665,31 +662,31 @@ GetFileBufferByFilePath ( // Is so, this device path may contain a Image. // DevicePathNode = OrigDevicePathNode; - Status = gBS->LocateDevicePath (&gEfiFirmwareVolume2ProtocolGuid, &DevicePathNode, &Handle); + Status = gBS->LocateDevicePath (&gEfiFirmwareVolume2ProtocolGuid, &DevicePathNode, &Handle); if (!EFI_ERROR (Status)) { // // For FwVol File system there is only a single file name that is a GUID. // - FvNameGuid = EfiGetNameGuidFromFwVolDevicePathNode ((CONST MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *) DevicePathNode); + FvNameGuid = EfiGetNameGuidFromFwVolDevicePathNode ((CONST MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *)DevicePathNode); if (FvNameGuid == NULL) { Status = EFI_INVALID_PARAMETER; } else { // // Read image from the firmware file // - Status = gBS->HandleProtocol (Handle, &gEfiFirmwareVolume2ProtocolGuid, (VOID**)&FwVol); + Status = gBS->HandleProtocol (Handle, &gEfiFirmwareVolume2ProtocolGuid, (VOID **)&FwVol); if (!EFI_ERROR (Status)) { SectionType = EFI_SECTION_PE32; ImageBuffer = NULL; - Status = FwVol->ReadSection ( - FwVol, - FvNameGuid, - SectionType, - 0, - (VOID **)&ImageBuffer, - &ImageBufferSize, - AuthenticationStatus - ); + Status = FwVol->ReadSection ( + FwVol, + FvNameGuid, + SectionType, + 0, + (VOID **)&ImageBuffer, + &ImageBufferSize, + AuthenticationStatus + ); if (EFI_ERROR (Status)) { // // Try a raw file, since a PE32 SECTION does not exist @@ -698,19 +695,21 @@ GetFileBufferByFilePath ( FreePool (ImageBuffer); *AuthenticationStatus = 0; } + ImageBuffer = NULL; - Status = FwVol->ReadFile ( - FwVol, - FvNameGuid, - (VOID **)&ImageBuffer, - &ImageBufferSize, - &Type, - &Attrib, - AuthenticationStatus - ); + Status = FwVol->ReadFile ( + FwVol, + FvNameGuid, + (VOID **)&ImageBuffer, + &ImageBufferSize, + &Type, + &Attrib, + AuthenticationStatus + ); } } } + if (!EFI_ERROR (Status)) { goto Finish; } @@ -720,9 +719,9 @@ GetFileBufferByFilePath ( // Attempt to access the file via a file system interface // DevicePathNode = OrigDevicePathNode; - Status = gBS->LocateDevicePath (&gEfiSimpleFileSystemProtocolGuid, &DevicePathNode, &Handle); + Status = gBS->LocateDevicePath (&gEfiSimpleFileSystemProtocolGuid, &DevicePathNode, &Handle); if (!EFI_ERROR (Status)) { - Status = gBS->HandleProtocol (Handle, &gEfiSimpleFileSystemProtocolGuid, (VOID**)&Volume); + Status = gBS->HandleProtocol (Handle, &gEfiSimpleFileSystemProtocolGuid, (VOID **)&Volume); if (!EFI_ERROR (Status)) { // // Open the Volume to get the File System handle @@ -743,6 +742,7 @@ GetFileBufferByFilePath ( // Status = EFI_OUT_OF_RESOURCES; } + // // Parse each MEDIA_FILEPATH_DP node. There may be more than one, since the // directory information and filename can be separate. The goal is to inch @@ -750,8 +750,9 @@ GetFileBufferByFilePath ( // DevicePathNode = TempDevicePathNode; while (!EFI_ERROR (Status) && !IsDevicePathEnd (DevicePathNode)) { - if (DevicePathType (DevicePathNode) != MEDIA_DEVICE_PATH || - DevicePathSubType (DevicePathNode) != MEDIA_FILEPATH_DP) { + if ((DevicePathType (DevicePathNode) != MEDIA_DEVICE_PATH) || + (DevicePathSubType (DevicePathNode) != MEDIA_FILEPATH_DP)) + { Status = EFI_UNSUPPORTED; break; } @@ -760,12 +761,12 @@ GetFileBufferByFilePath ( FileHandle = NULL; Status = LastHandle->Open ( - LastHandle, - &FileHandle, - ((FILEPATH_DEVICE_PATH *) DevicePathNode)->PathName, - EFI_FILE_MODE_READ, - 0 - ); + LastHandle, + &FileHandle, + ((FILEPATH_DEVICE_PATH *)DevicePathNode)->PathName, + EFI_FILE_MODE_READ, + 0 + ); // // Close the previous node @@ -780,14 +781,14 @@ GetFileBufferByFilePath ( // We have found the file. Now we need to read it. Before we can read the file we need to // figure out how big the file is. // - FileInfo = NULL; + FileInfo = NULL; FileInfoSize = 0; - Status = FileHandle->GetInfo ( - FileHandle, - &gEfiFileInfoGuid, - &FileInfoSize, - FileInfo - ); + Status = FileHandle->GetInfo ( + FileHandle, + &gEfiFileInfoGuid, + &FileInfoSize, + FileInfo + ); if (Status == EFI_BUFFER_TOO_SMALL) { FileInfo = AllocatePool (FileInfoSize); @@ -795,11 +796,11 @@ GetFileBufferByFilePath ( Status = EFI_OUT_OF_RESOURCES; } else { Status = FileHandle->GetInfo ( - FileHandle, - &gEfiFileInfoGuid, - &FileInfoSize, - FileInfo - ); + FileHandle, + &gEfiFileInfoGuid, + &FileInfoSize, + FileInfo + ); } } @@ -821,20 +822,24 @@ GetFileBufferByFilePath ( } } } + // // Close the file and Free FileInfo and TempDevicePathNode since we are done // if (FileInfo != NULL) { FreePool (FileInfo); } + if (FileHandle != NULL) { FileHandle->Close (FileHandle); } + if (TempDevicePathNode != NULL) { FreePool (TempDevicePathNode); } } } + if (!EFI_ERROR (Status)) { goto Finish; } @@ -845,37 +850,38 @@ GetFileBufferByFilePath ( // if (!BootPolicy) { DevicePathNode = OrigDevicePathNode; - Status = gBS->LocateDevicePath (&gEfiLoadFile2ProtocolGuid, &DevicePathNode, &Handle); + Status = gBS->LocateDevicePath (&gEfiLoadFile2ProtocolGuid, &DevicePathNode, &Handle); if (!EFI_ERROR (Status)) { - Status = gBS->HandleProtocol (Handle, &gEfiLoadFile2ProtocolGuid, (VOID**)&LoadFile2); + Status = gBS->HandleProtocol (Handle, &gEfiLoadFile2ProtocolGuid, (VOID **)&LoadFile2); if (!EFI_ERROR (Status)) { // // Call LoadFile2 with the correct buffer size // ImageBufferSize = 0; ImageBuffer = NULL; - Status = LoadFile2->LoadFile ( - LoadFile2, - DevicePathNode, - FALSE, - &ImageBufferSize, - ImageBuffer - ); + Status = LoadFile2->LoadFile ( + LoadFile2, + DevicePathNode, + FALSE, + &ImageBufferSize, + ImageBuffer + ); if (Status == EFI_BUFFER_TOO_SMALL) { ImageBuffer = AllocatePool (ImageBufferSize); if (ImageBuffer == NULL) { Status = EFI_OUT_OF_RESOURCES; } else { Status = LoadFile2->LoadFile ( - LoadFile2, - DevicePathNode, - FALSE, - &ImageBufferSize, - ImageBuffer - ); + LoadFile2, + DevicePathNode, + FALSE, + &ImageBufferSize, + ImageBuffer + ); } } } + if (!EFI_ERROR (Status)) { goto Finish; } @@ -886,22 +892,22 @@ GetFileBufferByFilePath ( // Attempt to access the file via LoadFile interface // DevicePathNode = OrigDevicePathNode; - Status = gBS->LocateDevicePath (&gEfiLoadFileProtocolGuid, &DevicePathNode, &Handle); + Status = gBS->LocateDevicePath (&gEfiLoadFileProtocolGuid, &DevicePathNode, &Handle); if (!EFI_ERROR (Status)) { - Status = gBS->HandleProtocol (Handle, &gEfiLoadFileProtocolGuid, (VOID**)&LoadFile); + Status = gBS->HandleProtocol (Handle, &gEfiLoadFileProtocolGuid, (VOID **)&LoadFile); if (!EFI_ERROR (Status)) { // // Call LoadFile with the correct buffer size // ImageBufferSize = 0; ImageBuffer = NULL; - Status = LoadFile->LoadFile ( - LoadFile, - DevicePathNode, - BootPolicy, - &ImageBufferSize, - ImageBuffer - ); + Status = LoadFile->LoadFile ( + LoadFile, + DevicePathNode, + BootPolicy, + &ImageBufferSize, + ImageBuffer + ); if (Status == EFI_BUFFER_TOO_SMALL) { ImageBuffer = AllocatePool (ImageBufferSize); if (ImageBuffer == NULL) { @@ -926,6 +932,7 @@ Finish: FreePool (ImageBuffer); ImageBuffer = NULL; } + *FileSize = 0; } else { *FileSize = ImageBufferSize; @@ -978,15 +985,15 @@ GetFileDevicePathFromAnyFv ( OUT EFI_DEVICE_PATH_PROTOCOL **FvFileDevicePath ) { - EFI_STATUS Status; - EFI_HANDLE *HandleBuffer; - UINTN HandleCount; - UINTN Index; - EFI_HANDLE FvHandle; - EFI_DEVICE_PATH_PROTOCOL *FvDevicePath; - MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *TempFvFileDevicePath; - VOID *Buffer; - UINTN Size; + EFI_STATUS Status; + EFI_HANDLE *HandleBuffer; + UINTN HandleCount; + UINTN Index; + EFI_HANDLE FvHandle; + EFI_DEVICE_PATH_PROTOCOL *FvDevicePath; + MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *TempFvFileDevicePath; + VOID *Buffer; + UINTN Size; if (FvFileDevicePath == NULL) { return EFI_INVALID_PARAMETER; @@ -1005,14 +1012,14 @@ GetFileDevicePathFromAnyFv ( // will locate the FFS faster. // FvHandle = InternalImageHandleToFvHandle (gImageHandle); - Status = InternalGetSectionFromFv ( - FvHandle, - NameGuid, - SectionType, - SectionInstance, - &Buffer, - &Size - ); + Status = InternalGetSectionFromFv ( + FvHandle, + NameGuid, + SectionType, + SectionInstance, + &Buffer, + &Size + ); if (!EFI_ERROR (Status)) { goto Done; } @@ -1070,7 +1077,8 @@ Done: *FvFileDevicePath = NULL; return EFI_OUT_OF_RESOURCES; } - EfiInitializeFwVolDevicepathNode ((MEDIA_FW_VOL_FILEPATH_DEVICE_PATH*)TempFvFileDevicePath, NameGuid); + + EfiInitializeFwVolDevicepathNode ((MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *)TempFvFileDevicePath, NameGuid); SetDevicePathEndNode (NextDevicePathNode (TempFvFileDevicePath)); *FvFileDevicePath = AppendDevicePath ( FvDevicePath, diff --git a/MdePkg/Library/DxeServicesLib/X64/Allocate.c b/MdePkg/Library/DxeServicesLib/X64/Allocate.c index 41c4cea..cb08e6b 100644 --- a/MdePkg/Library/DxeServicesLib/X64/Allocate.c +++ b/MdePkg/Library/DxeServicesLib/X64/Allocate.c @@ -52,12 +52,13 @@ AllocatePeiAccessiblePages ( PhitHob = (EFI_HOB_HANDOFF_INFO_TABLE *)GetHobList (); if (PhitHob->EfiFreeMemoryTop <= MAX_UINT32) { AllocType = AllocateMaxAddress; - Memory = MAX_UINT32; + Memory = MAX_UINT32; } Status = gBS->AllocatePages (AllocType, MemoryType, Pages, &Memory); if (EFI_ERROR (Status)) { return NULL; } + return (VOID *)(UINTN)Memory; } diff --git a/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.c b/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.c index 9acb1b7..7c37989 100644 --- a/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.c +++ b/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.c @@ -26,7 +26,7 @@ // // Cache copy of the DXE Services Table // -EFI_DXE_SERVICES *gDS = NULL; +EFI_DXE_SERVICES *gDS = NULL; /** The constructor function caches the pointer of DXE Services Table. @@ -54,7 +54,7 @@ DxeServicesTableLibConstructor ( // // Cache copy of the DXE Services Table // - Status = EfiGetSystemConfigurationTable (&gEfiDxeServicesTableGuid, (VOID **) &gDS); + Status = EfiGetSystemConfigurationTable (&gEfiDxeServicesTableGuid, (VOID **)&gDS); ASSERT_EFI_ERROR (Status); ASSERT (gDS != NULL); diff --git a/MdePkg/Library/DxeSmbusLib/DxeSmbusLib.c b/MdePkg/Library/DxeSmbusLib/DxeSmbusLib.c index d9cca7e..3e6706d 100644 --- a/MdePkg/Library/DxeSmbusLib/DxeSmbusLib.c +++ b/MdePkg/Library/DxeSmbusLib/DxeSmbusLib.c @@ -7,14 +7,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ - #include "InternalSmbusLib.h" - // // Global variable to cache pointer to Smbus protocol. // -EFI_SMBUS_HC_PROTOCOL *mSmbus = NULL; +EFI_SMBUS_HC_PROTOCOL *mSmbus = NULL; /** The constructor function caches the pointer to Smbus protocol. @@ -31,13 +29,13 @@ EFI_SMBUS_HC_PROTOCOL *mSmbus = NULL; EFI_STATUS EFIAPI SmbusLibConstructor ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUS Status; - Status = gBS->LocateProtocol (&gEfiSmbusHcProtocolGuid, NULL, (VOID**) &mSmbus); + Status = gBS->LocateProtocol (&gEfiSmbusHcProtocolGuid, NULL, (VOID **)&mSmbus); ASSERT_EFI_ERROR (Status); ASSERT (mSmbus != NULL); @@ -69,11 +67,11 @@ SmbusLibConstructor ( **/ UINTN InternalSmBusExec ( - IN EFI_SMBUS_OPERATION SmbusOperation, - IN UINTN SmBusAddress, - IN UINTN Length, - IN OUT VOID *Buffer, - OUT RETURN_STATUS *Status OPTIONAL + IN EFI_SMBUS_OPERATION SmbusOperation, + IN UINTN SmBusAddress, + IN UINTN Length, + IN OUT VOID *Buffer, + OUT RETURN_STATUS *Status OPTIONAL ) { RETURN_STATUS ReturnStatus; diff --git a/MdePkg/Library/DxeSmbusLib/InternalSmbusLib.h b/MdePkg/Library/DxeSmbusLib/InternalSmbusLib.h index dac6c4c..0fbd577 100644 --- a/MdePkg/Library/DxeSmbusLib/InternalSmbusLib.h +++ b/MdePkg/Library/DxeSmbusLib/InternalSmbusLib.h @@ -10,7 +10,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #ifndef __INTERNAL_SMBUS_LIB_H_ #define __INTERNAL_SMBUS_LIB_H_ - #include #include @@ -25,6 +24,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent // // Declaration for internal functions // + /** Executes an SMBus operation to an SMBus controller. @@ -50,11 +50,11 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ UINTN InternalSmBusExec ( - IN EFI_SMBUS_OPERATION SmbusOperation, - IN UINTN SmBusAddress, - IN UINTN Length, - IN OUT VOID *Buffer, - OUT RETURN_STATUS *Status OPTIONAL + IN EFI_SMBUS_OPERATION SmbusOperation, + IN UINTN SmBusAddress, + IN UINTN Length, + IN OUT VOID *Buffer, + OUT RETURN_STATUS *Status OPTIONAL ); /** @@ -72,8 +72,8 @@ InternalSmBusExec ( EFI_STATUS EFIAPI SmbusLibConstructor ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable ); #endif diff --git a/MdePkg/Library/DxeSmbusLib/SmbusLib.c b/MdePkg/Library/DxeSmbusLib/SmbusLib.c index e16d349..effe3a4 100644 --- a/MdePkg/Library/DxeSmbusLib/SmbusLib.c +++ b/MdePkg/Library/DxeSmbusLib/SmbusLib.c @@ -38,8 +38,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent VOID EFIAPI SmBusQuickRead ( - IN UINTN SmBusAddress, - OUT RETURN_STATUS *Status OPTIONAL + IN UINTN SmBusAddress, + OUT RETURN_STATUS *Status OPTIONAL ) { ASSERT (!SMBUS_LIB_PEC (SmBusAddress)); @@ -79,8 +79,8 @@ SmBusQuickRead ( VOID EFIAPI SmBusQuickWrite ( - IN UINTN SmBusAddress, - OUT RETURN_STATUS *Status OPTIONAL + IN UINTN SmBusAddress, + OUT RETURN_STATUS *Status OPTIONAL ) { ASSERT (!SMBUS_LIB_PEC (SmBusAddress)); @@ -127,7 +127,7 @@ SmBusReceiveByte ( OUT RETURN_STATUS *Status OPTIONAL ) { - UINT8 Byte; + UINT8 Byte; ASSERT (SMBUS_LIB_COMMAND (SmBusAddress) == 0); ASSERT (SMBUS_LIB_LENGTH (SmBusAddress) == 0); @@ -176,13 +176,13 @@ SmBusSendByte ( OUT RETURN_STATUS *Status OPTIONAL ) { - UINT8 Byte; + UINT8 Byte; ASSERT (SMBUS_LIB_COMMAND (SmBusAddress) == 0); ASSERT (SMBUS_LIB_LENGTH (SmBusAddress) == 0); ASSERT (SMBUS_LIB_RESERVED (SmBusAddress) == 0); - Byte = Value; + Byte = Value; InternalSmBusExec (EfiSmbusSendByte, SmBusAddress, 1, &Byte, Status); return Value; @@ -223,7 +223,7 @@ SmBusReadDataByte ( OUT RETURN_STATUS *Status OPTIONAL ) { - UINT8 Byte; + UINT8 Byte; ASSERT (SMBUS_LIB_LENGTH (SmBusAddress) == 0); ASSERT (SMBUS_LIB_RESERVED (SmBusAddress) == 0); @@ -271,7 +271,7 @@ SmBusWriteDataByte ( OUT RETURN_STATUS *Status OPTIONAL ) { - UINT8 Byte; + UINT8 Byte; ASSERT (SMBUS_LIB_LENGTH (SmBusAddress) == 0); ASSERT (SMBUS_LIB_RESERVED (SmBusAddress) == 0); @@ -569,7 +569,7 @@ SmBusBlockProcessCall ( OUT RETURN_STATUS *Status OPTIONAL ) { - UINTN Length; + UINTN Length; ASSERT (WriteBuffer != NULL); ASSERT (ReadBuffer != NULL); diff --git a/MdePkg/Library/MmServicesTableLib/MmServicesTableLib.c b/MdePkg/Library/MmServicesTableLib/MmServicesTableLib.c index 27f9d52..9ba5168 100644 --- a/MdePkg/Library/MmServicesTableLib/MmServicesTableLib.c +++ b/MdePkg/Library/MmServicesTableLib/MmServicesTableLib.c @@ -12,7 +12,7 @@ #include #include -EFI_MM_SYSTEM_TABLE *gMmst = NULL; +EFI_MM_SYSTEM_TABLE *gMmst = NULL; /** The constructor function caches the pointer of the MM Services Table. @@ -30,8 +30,8 @@ MmServicesTableLibConstructor ( IN EFI_SYSTEM_TABLE *SystemTable ) { - EFI_STATUS Status; - EFI_MM_BASE_PROTOCOL *InternalMmBase; + EFI_STATUS Status; + EFI_MM_BASE_PROTOCOL *InternalMmBase; InternalMmBase = NULL; // diff --git a/MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.c b/MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.c index b205c91..4cc7b23 100644 --- a/MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.c +++ b/MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.c @@ -36,8 +36,8 @@ RETURN_STATUS EFIAPI MmUnblockMemoryRequest ( - IN PHYSICAL_ADDRESS UnblockAddress, - IN UINT64 NumberOfPages + IN PHYSICAL_ADDRESS UnblockAddress, + IN UINT64 NumberOfPages ) { return RETURN_UNSUPPORTED; diff --git a/MdePkg/Library/PciSegmentLibSegmentInfo/BasePciSegmentLib.c b/MdePkg/Library/PciSegmentLibSegmentInfo/BasePciSegmentLib.c index b0d51c4..deab86a 100644 --- a/MdePkg/Library/PciSegmentLibSegmentInfo/BasePciSegmentLib.c +++ b/MdePkg/Library/PciSegmentLibSegmentInfo/BasePciSegmentLib.c @@ -20,7 +20,7 @@ **/ UINTN PciSegmentLibVirtualAddress ( - IN UINTN Address + IN UINTN Address ) { return Address; @@ -59,6 +59,6 @@ PciSegmentRegisterForRuntimeAccess ( SegmentInfo = GetPciSegmentInfo (&Count); PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count); - ); + ); return RETURN_SUCCESS; } diff --git a/MdePkg/Library/PciSegmentLibSegmentInfo/DxeRuntimePciSegmentLib.c b/MdePkg/Library/PciSegmentLibSegmentInfo/DxeRuntimePciSegmentLib.c index 75931d4..a6860b4 100644 --- a/MdePkg/Library/PciSegmentLibSegmentInfo/DxeRuntimePciSegmentLib.c +++ b/MdePkg/Library/PciSegmentLibSegmentInfo/DxeRuntimePciSegmentLib.c @@ -22,19 +22,19 @@ /// Define table for mapping PCI Segment MMIO physical addresses to virtual addresses at OS runtime /// typedef struct { - UINTN PhysicalAddress; - UINTN VirtualAddress; + UINTN PhysicalAddress; + UINTN VirtualAddress; } PCI_SEGMENT_RUNTIME_REGISTRATION_TABLE; /// /// Set Virtual Address Map Event /// -EFI_EVENT mDxeRuntimePciSegmentLibVirtualNotifyEvent = NULL; +EFI_EVENT mDxeRuntimePciSegmentLibVirtualNotifyEvent = NULL; /// /// The number of PCI devices that have been registered for runtime access. /// -UINTN mDxeRuntimePciSegmentLibNumberOfRuntimeRanges = 0; +UINTN mDxeRuntimePciSegmentLibNumberOfRuntimeRanges = 0; /// /// The table of PCI devices that have been registered for runtime access. @@ -44,7 +44,7 @@ PCI_SEGMENT_RUNTIME_REGISTRATION_TABLE *mDxeRuntimePciSegmentLibRegistrationTab /// /// The table index of the most recent virtual address lookup. /// -UINTN mDxeRuntimePciSegmentLibLastRuntimeRange = 0; +UINTN mDxeRuntimePciSegmentLibLastRuntimeRange = 0; /** Convert the physical PCI Express MMIO addresses for all registered PCI devices @@ -60,8 +60,8 @@ DxeRuntimePciSegmentLibVirtualNotify ( IN VOID *Context ) { - UINTN Index; - EFI_STATUS Status; + UINTN Index; + EFI_STATUS Status; // // If there have been no runtime registrations, then just return @@ -75,14 +75,14 @@ DxeRuntimePciSegmentLibVirtualNotify ( // virtual addresses. // for (Index = 0; Index < mDxeRuntimePciSegmentLibNumberOfRuntimeRanges; Index++) { - Status = EfiConvertPointer (0, (VOID **) &(mDxeRuntimePciSegmentLibRegistrationTable[Index].VirtualAddress)); + Status = EfiConvertPointer (0, (VOID **)&(mDxeRuntimePciSegmentLibRegistrationTable[Index].VirtualAddress)); ASSERT_EFI_ERROR (Status); } // // Convert table pointer that is allocated from EfiRuntimeServicesData to a virtual address. // - Status = EfiConvertPointer (0, (VOID **) &mDxeRuntimePciSegmentLibRegistrationTable); + Status = EfiConvertPointer (0, (VOID **)&mDxeRuntimePciSegmentLibRegistrationTable); ASSERT_EFI_ERROR (Status); } @@ -194,7 +194,7 @@ PciSegmentRegisterForRuntimeAccess ( // Convert Address to a ECAM address at the beginning of the PCI Configuration // header for the specified PCI Bus/Dev/Func // - Address &= ~(UINTN)EFI_PAGE_MASK; + Address &= ~(UINTN)EFI_PAGE_MASK; SegmentInfo = GetPciSegmentInfo (&Count); EcamAddress = PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count); @@ -204,9 +204,11 @@ PciSegmentRegisterForRuntimeAccess ( if (EfiAtRuntime ()) { return RETURN_UNSUPPORTED; } + if (sizeof (UINTN) == sizeof (UINT32)) { ASSERT (EcamAddress < BASE_4GB); } + Address = (UINTN)EcamAddress; // @@ -246,7 +248,8 @@ PciSegmentRegisterForRuntimeAccess ( if (NewTable == NULL) { return RETURN_OUT_OF_RESOURCES; } - mDxeRuntimePciSegmentLibRegistrationTable = NewTable; + + mDxeRuntimePciSegmentLibRegistrationTable = NewTable; mDxeRuntimePciSegmentLibRegistrationTable[mDxeRuntimePciSegmentLibNumberOfRuntimeRanges].PhysicalAddress = Address; mDxeRuntimePciSegmentLibRegistrationTable[mDxeRuntimePciSegmentLibNumberOfRuntimeRanges].VirtualAddress = Address; mDxeRuntimePciSegmentLibNumberOfRuntimeRanges++; @@ -263,10 +266,11 @@ PciSegmentRegisterForRuntimeAccess ( **/ UINTN PciSegmentLibVirtualAddress ( - IN UINTN Address + IN UINTN Address ) { - UINTN Index; + UINTN Index; + // // If SetVirtualAddressMap() has not been called, then just return the physical address // diff --git a/MdePkg/Library/PciSegmentLibSegmentInfo/PciSegmentLibCommon.c b/MdePkg/Library/PciSegmentLibSegmentInfo/PciSegmentLibCommon.c index a76e9d9..c6cc32d 100644 --- a/MdePkg/Library/PciSegmentLibSegmentInfo/PciSegmentLibCommon.c +++ b/MdePkg/Library/PciSegmentLibSegmentInfo/PciSegmentLibCommon.c @@ -10,13 +10,13 @@ #include "PciSegmentLibCommon.h" typedef struct { - UINT32 Register : 12; - UINT32 Function : 3; - UINT32 Device : 5; - UINT32 Bus : 8; - UINT32 Reserved1 : 4; - UINT32 Segment : 16; - UINT32 Reserved2 : 16; + UINT32 Register : 12; + UINT32 Function : 3; + UINT32 Device : 5; + UINT32 Bus : 8; + UINT32 Reserved1 : 4; + UINT32 Segment : 16; + UINT32 Reserved2 : 16; } PCI_SEGMENT_LIB_ADDRESS_STRUCTURE; /** @@ -32,31 +32,34 @@ typedef struct { **/ UINTN PciSegmentLibGetEcamAddress ( - IN UINT64 Address, - IN CONST PCI_SEGMENT_INFO *SegmentInfo, - IN UINTN Count + IN UINT64 Address, + IN CONST PCI_SEGMENT_INFO *SegmentInfo, + IN UINTN Count ) { while (Count != 0) { if (SegmentInfo->SegmentNumber == ((PCI_SEGMENT_LIB_ADDRESS_STRUCTURE *)&Address)->Segment) { break; } + SegmentInfo++; Count--; } + ASSERT (Count != 0); ASSERT ( (((PCI_SEGMENT_LIB_ADDRESS_STRUCTURE *)&Address)->Reserved1 == 0) && (((PCI_SEGMENT_LIB_ADDRESS_STRUCTURE *)&Address)->Reserved2 == 0) - ); + ); ASSERT (((PCI_SEGMENT_LIB_ADDRESS_STRUCTURE *)&Address)->Bus >= SegmentInfo->StartBusNumber); ASSERT (((PCI_SEGMENT_LIB_ADDRESS_STRUCTURE *)&Address)->Bus <= SegmentInfo->EndBusNumber); Address = SegmentInfo->BaseAddress + PCI_ECAM_ADDRESS ( - ((PCI_SEGMENT_LIB_ADDRESS_STRUCTURE *)&Address)->Bus, - ((PCI_SEGMENT_LIB_ADDRESS_STRUCTURE *)&Address)->Device, - ((PCI_SEGMENT_LIB_ADDRESS_STRUCTURE *)&Address)->Function, - ((PCI_SEGMENT_LIB_ADDRESS_STRUCTURE *)&Address)->Register); + ((PCI_SEGMENT_LIB_ADDRESS_STRUCTURE *)&Address)->Bus, + ((PCI_SEGMENT_LIB_ADDRESS_STRUCTURE *)&Address)->Device, + ((PCI_SEGMENT_LIB_ADDRESS_STRUCTURE *)&Address)->Function, + ((PCI_SEGMENT_LIB_ADDRESS_STRUCTURE *)&Address)->Register + ); if (sizeof (UINTN) == sizeof (UINT32)) { ASSERT (Address < BASE_4GB); @@ -81,11 +84,11 @@ PciSegmentLibGetEcamAddress ( UINT8 EFIAPI PciSegmentRead8 ( - IN UINT64 Address + IN UINT64 Address ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioRead8 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count)); @@ -108,12 +111,12 @@ PciSegmentRead8 ( UINT8 EFIAPI PciSegmentWrite8 ( - IN UINT64 Address, - IN UINT8 Value + IN UINT64 Address, + IN UINT8 Value ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioWrite8 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), Value); @@ -139,12 +142,12 @@ PciSegmentWrite8 ( UINT8 EFIAPI PciSegmentOr8 ( - IN UINT64 Address, - IN UINT8 OrData + IN UINT64 Address, + IN UINT8 OrData ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioOr8 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), OrData); @@ -169,12 +172,12 @@ PciSegmentOr8 ( UINT8 EFIAPI PciSegmentAnd8 ( - IN UINT64 Address, - IN UINT8 AndData + IN UINT64 Address, + IN UINT8 AndData ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioAnd8 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), AndData); @@ -203,13 +206,13 @@ PciSegmentAnd8 ( UINT8 EFIAPI PciSegmentAndThenOr8 ( - IN UINT64 Address, - IN UINT8 AndData, - IN UINT8 OrData + IN UINT64 Address, + IN UINT8 AndData, + IN UINT8 OrData ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioAndThenOr8 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), AndData, OrData); @@ -239,13 +242,13 @@ PciSegmentAndThenOr8 ( UINT8 EFIAPI PciSegmentBitFieldRead8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioBitFieldRead8 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit); @@ -278,14 +281,14 @@ PciSegmentBitFieldRead8 ( UINT8 EFIAPI PciSegmentBitFieldWrite8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioBitFieldWrite8 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit, Value); @@ -321,14 +324,14 @@ PciSegmentBitFieldWrite8 ( UINT8 EFIAPI PciSegmentBitFieldOr8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioBitFieldOr8 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit, OrData); @@ -364,14 +367,14 @@ PciSegmentBitFieldOr8 ( UINT8 EFIAPI PciSegmentBitFieldAnd8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioBitFieldAnd8 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit, AndData); @@ -410,15 +413,15 @@ PciSegmentBitFieldAnd8 ( UINT8 EFIAPI PciSegmentBitFieldAndThenOr8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioBitFieldAndThenOr8 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit, AndData, OrData); @@ -441,11 +444,11 @@ PciSegmentBitFieldAndThenOr8 ( UINT16 EFIAPI PciSegmentRead16 ( - IN UINT64 Address + IN UINT64 Address ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioRead16 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count)); @@ -469,12 +472,12 @@ PciSegmentRead16 ( UINT16 EFIAPI PciSegmentWrite16 ( - IN UINT64 Address, - IN UINT16 Value + IN UINT64 Address, + IN UINT16 Value ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioWrite16 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), Value); @@ -503,12 +506,12 @@ PciSegmentWrite16 ( UINT16 EFIAPI PciSegmentOr16 ( - IN UINT64 Address, - IN UINT16 OrData + IN UINT64 Address, + IN UINT16 OrData ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioOr16 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), OrData); @@ -535,12 +538,12 @@ PciSegmentOr16 ( UINT16 EFIAPI PciSegmentAnd16 ( - IN UINT64 Address, - IN UINT16 AndData + IN UINT64 Address, + IN UINT16 AndData ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioAnd16 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), AndData); @@ -570,13 +573,13 @@ PciSegmentAnd16 ( UINT16 EFIAPI PciSegmentAndThenOr16 ( - IN UINT64 Address, - IN UINT16 AndData, - IN UINT16 OrData + IN UINT64 Address, + IN UINT16 AndData, + IN UINT16 OrData ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioAndThenOr16 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), AndData, OrData); @@ -607,13 +610,13 @@ PciSegmentAndThenOr16 ( UINT16 EFIAPI PciSegmentBitFieldRead16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioBitFieldRead16 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit); @@ -647,14 +650,14 @@ PciSegmentBitFieldRead16 ( UINT16 EFIAPI PciSegmentBitFieldWrite16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioBitFieldWrite16 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit, Value); @@ -691,14 +694,14 @@ PciSegmentBitFieldWrite16 ( UINT16 EFIAPI PciSegmentBitFieldOr16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioBitFieldOr16 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit, OrData); @@ -735,14 +738,14 @@ PciSegmentBitFieldOr16 ( UINT16 EFIAPI PciSegmentBitFieldAnd16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioBitFieldAnd16 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit, AndData); @@ -782,15 +785,16 @@ PciSegmentBitFieldAnd16 ( UINT16 EFIAPI PciSegmentBitFieldAndThenOr16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; + SegmentInfo = GetPciSegmentInfo (&Count); return MmioBitFieldAndThenOr16 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit, AndData, OrData); } @@ -812,11 +816,11 @@ PciSegmentBitFieldAndThenOr16 ( UINT32 EFIAPI PciSegmentRead32 ( - IN UINT64 Address + IN UINT64 Address ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioRead32 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count)); @@ -840,12 +844,12 @@ PciSegmentRead32 ( UINT32 EFIAPI PciSegmentWrite32 ( - IN UINT64 Address, - IN UINT32 Value + IN UINT64 Address, + IN UINT32 Value ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioWrite32 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), Value); @@ -872,12 +876,12 @@ PciSegmentWrite32 ( UINT32 EFIAPI PciSegmentOr32 ( - IN UINT64 Address, - IN UINT32 OrData + IN UINT64 Address, + IN UINT32 OrData ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioOr32 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), OrData); @@ -904,12 +908,12 @@ PciSegmentOr32 ( UINT32 EFIAPI PciSegmentAnd32 ( - IN UINT64 Address, - IN UINT32 AndData + IN UINT64 Address, + IN UINT32 AndData ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioAnd32 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), AndData); @@ -939,13 +943,13 @@ PciSegmentAnd32 ( UINT32 EFIAPI PciSegmentAndThenOr32 ( - IN UINT64 Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINT64 Address, + IN UINT32 AndData, + IN UINT32 OrData ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioAndThenOr32 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), AndData, OrData); @@ -976,13 +980,13 @@ PciSegmentAndThenOr32 ( UINT32 EFIAPI PciSegmentBitFieldRead32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioBitFieldRead32 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit); @@ -1016,14 +1020,14 @@ PciSegmentBitFieldRead32 ( UINT32 EFIAPI PciSegmentBitFieldWrite32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioBitFieldWrite32 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit, Value); @@ -1059,14 +1063,14 @@ PciSegmentBitFieldWrite32 ( UINT32 EFIAPI PciSegmentBitFieldOr32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioBitFieldOr32 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit, OrData); @@ -1102,14 +1106,14 @@ PciSegmentBitFieldOr32 ( UINT32 EFIAPI PciSegmentBitFieldAnd32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; SegmentInfo = GetPciSegmentInfo (&Count); return MmioBitFieldAnd32 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit, AndData); @@ -1149,15 +1153,16 @@ PciSegmentBitFieldAnd32 ( UINT32 EFIAPI PciSegmentBitFieldAndThenOr32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; + SegmentInfo = GetPciSegmentInfo (&Count); return MmioBitFieldAndThenOr32 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit, AndData, OrData); } @@ -1188,20 +1193,20 @@ PciSegmentBitFieldAndThenOr32 ( UINTN EFIAPI PciSegmentReadBuffer ( - IN UINT64 StartAddress, - IN UINTN Size, - OUT VOID *Buffer + IN UINT64 StartAddress, + IN UINTN Size, + OUT VOID *Buffer ) { - UINTN ReturnValue; - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; - UINTN Address; + UINTN ReturnValue; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; + UINTN Address; ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000); SegmentInfo = GetPciSegmentInfo (&Count); - Address = PciSegmentLibGetEcamAddress (StartAddress, SegmentInfo, Count); + Address = PciSegmentLibGetEcamAddress (StartAddress, SegmentInfo, Count); if (Size == 0) { return 0; @@ -1219,19 +1224,19 @@ PciSegmentReadBuffer ( // Read a byte if StartAddress is byte aligned // *(volatile UINT8 *)Buffer = MmioRead8 (Address); - Address += sizeof (UINT8); - Size -= sizeof (UINT8); - Buffer = (UINT8*)Buffer + 1; + Address += sizeof (UINT8); + Size -= sizeof (UINT8); + Buffer = (UINT8 *)Buffer + 1; } - if (Size >= sizeof (UINT16) && (Address & BIT1) != 0) { + if ((Size >= sizeof (UINT16)) && ((Address & BIT1) != 0)) { // // Read a word if StartAddress is word aligned // WriteUnaligned16 (Buffer, MmioRead16 (Address)); Address += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } while (Size >= sizeof (UINT32)) { @@ -1240,8 +1245,8 @@ PciSegmentReadBuffer ( // WriteUnaligned32 (Buffer, MmioRead32 (Address)); Address += sizeof (UINT32); - Size -= sizeof (UINT32); - Buffer = (UINT32*)Buffer + 1; + Size -= sizeof (UINT32); + Buffer = (UINT32 *)Buffer + 1; } if (Size >= sizeof (UINT16)) { @@ -1250,8 +1255,8 @@ PciSegmentReadBuffer ( // WriteUnaligned16 (Buffer, MmioRead16 (Address)); Address += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } if (Size >= sizeof (UINT8)) { @@ -1291,20 +1296,20 @@ PciSegmentReadBuffer ( UINTN EFIAPI PciSegmentWriteBuffer ( - IN UINT64 StartAddress, - IN UINTN Size, - IN VOID *Buffer + IN UINT64 StartAddress, + IN UINTN Size, + IN VOID *Buffer ) { - UINTN ReturnValue; - UINTN Count; - PCI_SEGMENT_INFO *SegmentInfo; - UINTN Address; + UINTN ReturnValue; + UINTN Count; + PCI_SEGMENT_INFO *SegmentInfo; + UINTN Address; ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000); SegmentInfo = GetPciSegmentInfo (&Count); - Address = PciSegmentLibGetEcamAddress (StartAddress, SegmentInfo, Count); + Address = PciSegmentLibGetEcamAddress (StartAddress, SegmentInfo, Count); if (Size == 0) { return 0; @@ -1321,20 +1326,20 @@ PciSegmentWriteBuffer ( // // Write a byte if StartAddress is byte aligned // - MmioWrite8 (Address, *(UINT8*)Buffer); + MmioWrite8 (Address, *(UINT8 *)Buffer); Address += sizeof (UINT8); - Size -= sizeof (UINT8); - Buffer = (UINT8*)Buffer + 1; + Size -= sizeof (UINT8); + Buffer = (UINT8 *)Buffer + 1; } - if (Size >= sizeof (UINT16) && (Address & BIT1) != 0) { + if ((Size >= sizeof (UINT16)) && ((Address & BIT1) != 0)) { // // Write a word if StartAddress is word aligned // MmioWrite16 (Address, ReadUnaligned16 (Buffer)); Address += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } while (Size >= sizeof (UINT32)) { @@ -1343,8 +1348,8 @@ PciSegmentWriteBuffer ( // MmioWrite32 (Address, ReadUnaligned32 (Buffer)); Address += sizeof (UINT32); - Size -= sizeof (UINT32); - Buffer = (UINT32*)Buffer + 1; + Size -= sizeof (UINT32); + Buffer = (UINT32 *)Buffer + 1; } if (Size >= sizeof (UINT16)) { @@ -1353,15 +1358,15 @@ PciSegmentWriteBuffer ( // MmioWrite16 (Address, ReadUnaligned16 (Buffer)); Address += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } if (Size >= sizeof (UINT8)) { // // Write the last remaining byte if exist // - MmioWrite8 (Address, *(UINT8*)Buffer); + MmioWrite8 (Address, *(UINT8 *)Buffer); } return ReturnValue; diff --git a/MdePkg/Library/PciSegmentLibSegmentInfo/PciSegmentLibCommon.h b/MdePkg/Library/PciSegmentLibSegmentInfo/PciSegmentLibCommon.h index 4668372..f103bf6 100644 --- a/MdePkg/Library/PciSegmentLibSegmentInfo/PciSegmentLibCommon.h +++ b/MdePkg/Library/PciSegmentLibSegmentInfo/PciSegmentLibCommon.h @@ -27,7 +27,7 @@ **/ UINTN PciSegmentLibVirtualAddress ( - IN UINTN Address + IN UINTN Address ); /** @@ -43,9 +43,9 @@ PciSegmentLibVirtualAddress ( **/ UINTN PciSegmentLibGetEcamAddress ( - IN UINT64 Address, - IN CONST PCI_SEGMENT_INFO *SegmentInfo, - IN UINTN Count + IN UINT64 Address, + IN CONST PCI_SEGMENT_INFO *SegmentInfo, + IN UINTN Count ); #endif diff --git a/MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.c b/MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.c index 85dee7f..6465011 100644 --- a/MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.c +++ b/MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.c @@ -6,7 +6,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ - #include // @@ -50,21 +49,20 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ VOID EFIAPI -_ModuleEntryPoint( +_ModuleEntryPoint ( IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData, IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList -) + ) { ProcessModuleEntryPointList (SecCoreData, PpiList, NULL); // // Should never return // - ASSERT(FALSE); + ASSERT (FALSE); CpuDeadLoop (); } - /** Required by the EBC compiler and identical in functionality to _ModuleEntryPoint(). diff --git a/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PostCode.c b/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PostCode.c index cccb706..bf2da0c 100644 --- a/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PostCode.c +++ b/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PostCode.c @@ -7,7 +7,6 @@ **/ - #include #include @@ -58,7 +57,6 @@ PostCode ( return Value; } - /** Sends an 32-bit value to a POST and associated ASCII string. @@ -107,7 +105,6 @@ PostCodeWithDescription ( return Value; } - /** Returns TRUE if POST Codes are enabled. @@ -126,10 +123,9 @@ PostCodeEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_ENABLED) != 0); } - /** Returns TRUE if POST code descriptions are enabled. @@ -148,6 +144,5 @@ PostCodeDescriptionEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdPostCodePropertyMask) & POST_CODE_PROPERTY_POST_CODE_DESCRIPTION_ENABLED) != 0); } - diff --git a/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c b/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c index 5d12016..c538f15 100644 --- a/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c +++ b/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c @@ -14,14 +14,14 @@ #include #include -#define PEI_EXTRACT_HANDLER_INFO_SIGNATURE SIGNATURE_32 ('P', 'E', 'H', 'I') +#define PEI_EXTRACT_HANDLER_INFO_SIGNATURE SIGNATURE_32 ('P', 'E', 'H', 'I') typedef struct { - UINT32 Signature; - UINT32 NumberOfExtractHandler; - GUID *ExtractHandlerGuidTable; - EXTRACT_GUIDED_SECTION_DECODE_HANDLER *ExtractDecodeHandlerTable; - EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER *ExtractGetInfoHandlerTable; + UINT32 Signature; + UINT32 NumberOfExtractHandler; + GUID *ExtractHandlerGuidTable; + EXTRACT_GUIDED_SECTION_DECODE_HANDLER *ExtractDecodeHandlerTable; + EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER *ExtractGetInfoHandlerTable; } PEI_EXTRACT_GUIDED_SECTION_HANDLER_INFO; /** @@ -35,11 +35,11 @@ typedef struct { **/ RETURN_STATUS PeiGetExtractGuidedSectionHandlerInfo ( - IN OUT PEI_EXTRACT_GUIDED_SECTION_HANDLER_INFO **InfoPointer + IN OUT PEI_EXTRACT_GUIDED_SECTION_HANDLER_INFO **InfoPointer ) { - PEI_EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo; - EFI_PEI_HOB_POINTERS Hob; + PEI_EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo; + EFI_PEI_HOB_POINTERS Hob; // // First try to get handler information from guid hob specified by CallerId. @@ -47,23 +47,24 @@ PeiGetExtractGuidedSectionHandlerInfo ( Hob.Raw = GetNextHob (EFI_HOB_TYPE_GUID_EXTENSION, GetHobList ()); while (Hob.Raw != NULL) { if (CompareGuid (&(Hob.Guid->Name), &gEfiCallerIdGuid)) { - HandlerInfo = (PEI_EXTRACT_GUIDED_SECTION_HANDLER_INFO *) GET_GUID_HOB_DATA (Hob.Guid); + HandlerInfo = (PEI_EXTRACT_GUIDED_SECTION_HANDLER_INFO *)GET_GUID_HOB_DATA (Hob.Guid); if (HandlerInfo->Signature == PEI_EXTRACT_HANDLER_INFO_SIGNATURE) { // // Update Table Pointer when hob start address is changed. // - if (HandlerInfo->ExtractHandlerGuidTable != (GUID *) (HandlerInfo + 1)) { - HandlerInfo->ExtractHandlerGuidTable = (GUID *) (HandlerInfo + 1); - HandlerInfo->ExtractDecodeHandlerTable = (EXTRACT_GUIDED_SECTION_DECODE_HANDLER *) ( - (UINT8 *)HandlerInfo->ExtractHandlerGuidTable + - PcdGet32 (PcdMaximumGuidedExtractHandler) * sizeof (GUID) - ); - HandlerInfo->ExtractGetInfoHandlerTable = (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER *) ( - (UINT8 *)HandlerInfo->ExtractDecodeHandlerTable + - PcdGet32 (PcdMaximumGuidedExtractHandler) * - sizeof (EXTRACT_GUIDED_SECTION_DECODE_HANDLER) - ); + if (HandlerInfo->ExtractHandlerGuidTable != (GUID *)(HandlerInfo + 1)) { + HandlerInfo->ExtractHandlerGuidTable = (GUID *)(HandlerInfo + 1); + HandlerInfo->ExtractDecodeHandlerTable = (EXTRACT_GUIDED_SECTION_DECODE_HANDLER *)( + (UINT8 *)HandlerInfo->ExtractHandlerGuidTable + + PcdGet32 (PcdMaximumGuidedExtractHandler) * sizeof (GUID) + ); + HandlerInfo->ExtractGetInfoHandlerTable = (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER *)( + (UINT8 *)HandlerInfo->ExtractDecodeHandlerTable + + PcdGet32 (PcdMaximumGuidedExtractHandler) * + sizeof (EXTRACT_GUIDED_SECTION_DECODE_HANDLER) + ); } + // // Return HandlerInfo pointer. // @@ -71,6 +72,7 @@ PeiGetExtractGuidedSectionHandlerInfo ( return EFI_SUCCESS; } } + Hob.Raw = GET_NEXT_HOB (Hob); Hob.Raw = GetNextHob (EFI_HOB_TYPE_GUID_EXTENSION, Hob.Raw); } @@ -79,11 +81,11 @@ PeiGetExtractGuidedSectionHandlerInfo ( // If Guid Hob is not found, Build CallerId Guid hob to store Handler Info // HandlerInfo = BuildGuidHob ( - &gEfiCallerIdGuid, - sizeof (PEI_EXTRACT_GUIDED_SECTION_HANDLER_INFO) + - PcdGet32 (PcdMaximumGuidedExtractHandler) * - (sizeof (GUID) + sizeof (EXTRACT_GUIDED_SECTION_DECODE_HANDLER) + sizeof (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER)) - ); + &gEfiCallerIdGuid, + sizeof (PEI_EXTRACT_GUIDED_SECTION_HANDLER_INFO) + + PcdGet32 (PcdMaximumGuidedExtractHandler) * + (sizeof (GUID) + sizeof (EXTRACT_GUIDED_SECTION_DECODE_HANDLER) + sizeof (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER)) + ); if (HandlerInfo == NULL) { // // No enough resource to build guid hob. @@ -91,21 +93,22 @@ PeiGetExtractGuidedSectionHandlerInfo ( *InfoPointer = NULL; return EFI_OUT_OF_RESOURCES; } + // // Init HandlerInfo structure // - HandlerInfo->Signature = PEI_EXTRACT_HANDLER_INFO_SIGNATURE; - HandlerInfo->NumberOfExtractHandler = 0; - HandlerInfo->ExtractHandlerGuidTable = (GUID *) (HandlerInfo + 1); - HandlerInfo->ExtractDecodeHandlerTable = (EXTRACT_GUIDED_SECTION_DECODE_HANDLER *) ( - (UINT8 *)HandlerInfo->ExtractHandlerGuidTable + - PcdGet32 (PcdMaximumGuidedExtractHandler) * sizeof (GUID) - ); - HandlerInfo->ExtractGetInfoHandlerTable = (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER *) ( - (UINT8 *)HandlerInfo->ExtractDecodeHandlerTable + - PcdGet32 (PcdMaximumGuidedExtractHandler) * - sizeof (EXTRACT_GUIDED_SECTION_DECODE_HANDLER) - ); + HandlerInfo->Signature = PEI_EXTRACT_HANDLER_INFO_SIGNATURE; + HandlerInfo->NumberOfExtractHandler = 0; + HandlerInfo->ExtractHandlerGuidTable = (GUID *)(HandlerInfo + 1); + HandlerInfo->ExtractDecodeHandlerTable = (EXTRACT_GUIDED_SECTION_DECODE_HANDLER *)( + (UINT8 *)HandlerInfo->ExtractHandlerGuidTable + + PcdGet32 (PcdMaximumGuidedExtractHandler) * sizeof (GUID) + ); + HandlerInfo->ExtractGetInfoHandlerTable = (EXTRACT_GUIDED_SECTION_GET_INFO_HANDLER *)( + (UINT8 *)HandlerInfo->ExtractDecodeHandlerTable + + PcdGet32 (PcdMaximumGuidedExtractHandler) * + sizeof (EXTRACT_GUIDED_SECTION_DECODE_HANDLER) + ); // // return the created HandlerInfo. // @@ -133,8 +136,8 @@ ExtractGuidedSectionGetGuidList ( OUT GUID **ExtractHandlerGuidTable ) { - EFI_STATUS Status; - PEI_EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo; + EFI_STATUS Status; + PEI_EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo; ASSERT (ExtractHandlerGuidTable != NULL); @@ -187,9 +190,9 @@ ExtractGuidedSectionRegisterHandlers ( IN EXTRACT_GUIDED_SECTION_DECODE_HANDLER DecodeHandler ) { - EFI_STATUS Status; - UINT32 Index; - PEI_EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo; + EFI_STATUS Status; + UINT32 Index; + PEI_EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo; // // Check input parameter @@ -198,8 +201,6 @@ ExtractGuidedSectionRegisterHandlers ( ASSERT (GetInfoHandler != NULL); ASSERT (DecodeHandler != NULL); - - // // Get the registered handler information // @@ -212,13 +213,13 @@ ExtractGuidedSectionRegisterHandlers ( // Search the match registered GetInfo handler for the input guided section. // ASSERT (HandlerInfo != NULL); - for (Index = 0; Index < HandlerInfo->NumberOfExtractHandler; Index ++) { + for (Index = 0; Index < HandlerInfo->NumberOfExtractHandler; Index++) { if (CompareGuid (HandlerInfo->ExtractHandlerGuidTable + Index, SectionGuid)) { // // If the guided handler has been registered before, only update its handler. // - HandlerInfo->ExtractDecodeHandlerTable [Index] = DecodeHandler; - HandlerInfo->ExtractGetInfoHandlerTable [Index] = GetInfoHandler; + HandlerInfo->ExtractDecodeHandlerTable[Index] = DecodeHandler; + HandlerInfo->ExtractGetInfoHandlerTable[Index] = GetInfoHandler; return RETURN_SUCCESS; } } @@ -234,16 +235,16 @@ ExtractGuidedSectionRegisterHandlers ( // Register new Handler and guid value. // CopyGuid (HandlerInfo->ExtractHandlerGuidTable + HandlerInfo->NumberOfExtractHandler, SectionGuid); - HandlerInfo->ExtractDecodeHandlerTable [HandlerInfo->NumberOfExtractHandler] = DecodeHandler; - HandlerInfo->ExtractGetInfoHandlerTable [HandlerInfo->NumberOfExtractHandler++] = GetInfoHandler; + HandlerInfo->ExtractDecodeHandlerTable[HandlerInfo->NumberOfExtractHandler] = DecodeHandler; + HandlerInfo->ExtractGetInfoHandlerTable[HandlerInfo->NumberOfExtractHandler++] = GetInfoHandler; // // Build the Guided Section GUID HOB to record the GUID itself. // Then the content of the GUIDed HOB will be the same as the GUID value itself. // BuildGuidDataHob ( - (EFI_GUID *) SectionGuid, - (VOID *) SectionGuid, + (EFI_GUID *)SectionGuid, + (VOID *)SectionGuid, sizeof (GUID) ); @@ -293,10 +294,10 @@ ExtractGuidedSectionGetInfo ( OUT UINT16 *SectionAttribute ) { - UINT32 Index; - EFI_STATUS Status; - PEI_EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo; - EFI_GUID *SectionDefinitionGuid; + UINT32 Index; + EFI_STATUS Status; + PEI_EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo; + EFI_GUID *SectionDefinitionGuid; // // Check input parameter @@ -315,26 +316,26 @@ ExtractGuidedSectionGetInfo ( } if (IS_SECTION2 (InputSection)) { - SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION2 *) InputSection)->SectionDefinitionGuid); + SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION2 *)InputSection)->SectionDefinitionGuid); } else { - SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid); + SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION *)InputSection)->SectionDefinitionGuid); } // // Search the match registered GetInfo handler for the input guided section. // ASSERT (HandlerInfo != NULL); - for (Index = 0; Index < HandlerInfo->NumberOfExtractHandler; Index ++) { + for (Index = 0; Index < HandlerInfo->NumberOfExtractHandler; Index++) { if (CompareGuid (HandlerInfo->ExtractHandlerGuidTable + Index, SectionDefinitionGuid)) { // // Call the match handler to get information for the input section data. // - return HandlerInfo->ExtractGetInfoHandlerTable [Index] ( - InputSection, - OutputBufferSize, - ScratchBufferSize, - SectionAttribute - ); + return HandlerInfo->ExtractGetInfoHandlerTable[Index]( + InputSection, + OutputBufferSize, + ScratchBufferSize, + SectionAttribute + ); } } @@ -388,10 +389,10 @@ ExtractGuidedSectionDecode ( OUT UINT32 *AuthenticationStatus ) { - UINT32 Index; - EFI_STATUS Status; - PEI_EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo; - EFI_GUID *SectionDefinitionGuid; + UINT32 Index; + EFI_STATUS Status; + PEI_EXTRACT_GUIDED_SECTION_HANDLER_INFO *HandlerInfo; + EFI_GUID *SectionDefinitionGuid; // // Check input parameter @@ -409,26 +410,26 @@ ExtractGuidedSectionDecode ( } if (IS_SECTION2 (InputSection)) { - SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION2 *) InputSection)->SectionDefinitionGuid); + SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION2 *)InputSection)->SectionDefinitionGuid); } else { - SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid); + SectionDefinitionGuid = &(((EFI_GUID_DEFINED_SECTION *)InputSection)->SectionDefinitionGuid); } // // Search the match registered Extract handler for the input guided section. // ASSERT (HandlerInfo != NULL); - for (Index = 0; Index < HandlerInfo->NumberOfExtractHandler; Index ++) { + for (Index = 0; Index < HandlerInfo->NumberOfExtractHandler; Index++) { if (CompareGuid (HandlerInfo->ExtractHandlerGuidTable + Index, SectionDefinitionGuid)) { // // Call the match handler to extract raw data for the input guided section. // - return HandlerInfo->ExtractDecodeHandlerTable [Index] ( - InputSection, - OutputBuffer, - ScratchBuffer, - AuthenticationStatus - ); + return HandlerInfo->ExtractDecodeHandlerTable[Index]( + InputSection, + OutputBuffer, + ScratchBuffer, + AuthenticationStatus + ); } } @@ -494,20 +495,22 @@ ExtractGuidedSectionGetHandlers ( // Search the match registered GetInfo handler for the input guided section. // ASSERT (HandlerInfo != NULL); - for (Index = 0; Index < HandlerInfo->NumberOfExtractHandler; Index ++) { + for (Index = 0; Index < HandlerInfo->NumberOfExtractHandler; Index++) { if (CompareGuid (HandlerInfo->ExtractHandlerGuidTable + Index, SectionGuid)) { - // // If the guided handler has been registered before, then return the registered handlers. // if (GetInfoHandler != NULL) { *GetInfoHandler = HandlerInfo->ExtractGetInfoHandlerTable[Index]; } + if (DecodeHandler != NULL) { *DecodeHandler = HandlerInfo->ExtractDecodeHandlerTable[Index]; } + return RETURN_SUCCESS; } } + return RETURN_NOT_FOUND; } diff --git a/MdePkg/Library/PeiHobLib/HobLib.c b/MdePkg/Library/PeiHobLib/HobLib.c index 2b110a8..4fecd19 100644 --- a/MdePkg/Library/PeiHobLib/HobLib.c +++ b/MdePkg/Library/PeiHobLib/HobLib.c @@ -37,8 +37,8 @@ GetHobList ( VOID ) { - EFI_STATUS Status; - VOID *HobList; + EFI_STATUS Status; + VOID *HobList; Status = PeiServicesGetHobList (&HobList); ASSERT_EFI_ERROR (Status); @@ -67,15 +67,15 @@ GetHobList ( VOID * EFIAPI GetNextHob ( - IN UINT16 Type, - IN CONST VOID *HobStart + IN UINT16 Type, + IN CONST VOID *HobStart ) { EFI_PEI_HOB_POINTERS Hob; ASSERT (HobStart != NULL); - Hob.Raw = (UINT8 *) HobStart; + Hob.Raw = (UINT8 *)HobStart; // // Parse the HOB list until end of list or matching type is found. // @@ -83,8 +83,10 @@ GetNextHob ( if (Hob.Header->HobType == Type) { return Hob.Raw; } + Hob.Raw = GET_NEXT_HOB (Hob); } + return NULL; } @@ -104,10 +106,10 @@ GetNextHob ( VOID * EFIAPI GetFirstHob ( - IN UINT16 Type + IN UINT16 Type ) { - VOID *HobList; + VOID *HobList; HobList = GetHobList (); return GetNextHob (Type, HobList); @@ -138,19 +140,21 @@ GetFirstHob ( VOID * EFIAPI GetNextGuidHob ( - IN CONST EFI_GUID *Guid, - IN CONST VOID *HobStart + IN CONST EFI_GUID *Guid, + IN CONST VOID *HobStart ) { EFI_PEI_HOB_POINTERS GuidHob; - GuidHob.Raw = (UINT8 *) HobStart; + GuidHob.Raw = (UINT8 *)HobStart; while ((GuidHob.Raw = GetNextHob (EFI_HOB_TYPE_GUID_EXTENSION, GuidHob.Raw)) != NULL) { if (CompareGuid (Guid, &GuidHob.Guid->Name)) { break; } + GuidHob.Raw = GET_NEXT_HOB (GuidHob); } + return GuidHob.Raw; } @@ -175,10 +179,10 @@ GetNextGuidHob ( VOID * EFIAPI GetFirstGuidHob ( - IN CONST EFI_GUID *Guid + IN CONST EFI_GUID *Guid ) { - VOID *HobList; + VOID *HobList; HobList = GetHobList (); return GetNextGuidHob (Guid, HobList); @@ -203,8 +207,8 @@ GetBootModeHob ( VOID ) { - EFI_STATUS Status; - EFI_BOOT_MODE BootMode; + EFI_STATUS Status; + EFI_BOOT_MODE BootMode; Status = PeiServicesGetBootMode (&BootMode); ASSERT_EFI_ERROR (Status); @@ -227,17 +231,18 @@ GetBootModeHob ( VOID * EFIAPI InternalPeiCreateHob ( - IN UINT16 Type, - IN UINT16 Length + IN UINT16 Type, + IN UINT16 Length ) { - EFI_STATUS Status; - VOID *Hob; + EFI_STATUS Status; + VOID *Hob; Status = PeiServicesCreateHob (Type, Length, &Hob); if (EFI_ERROR (Status)) { Hob = NULL; } + // // Assume the process of HOB building is always successful. // @@ -264,18 +269,20 @@ InternalPeiCreateHob ( VOID EFIAPI BuildModuleHob ( - IN CONST EFI_GUID *ModuleName, - IN EFI_PHYSICAL_ADDRESS MemoryAllocationModule, - IN UINT64 ModuleLength, - IN EFI_PHYSICAL_ADDRESS EntryPoint + IN CONST EFI_GUID *ModuleName, + IN EFI_PHYSICAL_ADDRESS MemoryAllocationModule, + IN UINT64 ModuleLength, + IN EFI_PHYSICAL_ADDRESS EntryPoint ) { EFI_HOB_MEMORY_ALLOCATION_MODULE *Hob; - ASSERT (((MemoryAllocationModule & (EFI_PAGE_SIZE - 1)) == 0) && - ((ModuleLength & (EFI_PAGE_SIZE - 1)) == 0)); + ASSERT ( + ((MemoryAllocationModule & (EFI_PAGE_SIZE - 1)) == 0) && + ((ModuleLength & (EFI_PAGE_SIZE - 1)) == 0) + ); - Hob = InternalPeiCreateHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, (UINT16) sizeof (EFI_HOB_MEMORY_ALLOCATION_MODULE)); + Hob = InternalPeiCreateHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, (UINT16)sizeof (EFI_HOB_MEMORY_ALLOCATION_MODULE)); if (Hob == NULL) { return; } @@ -322,7 +329,7 @@ BuildResourceDescriptorWithOwnerHob ( { EFI_HOB_RESOURCE_DESCRIPTOR *Hob; - Hob = InternalPeiCreateHob (EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, (UINT16) sizeof (EFI_HOB_RESOURCE_DESCRIPTOR)); + Hob = InternalPeiCreateHob (EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, (UINT16)sizeof (EFI_HOB_RESOURCE_DESCRIPTOR)); if (Hob == NULL) { return; } @@ -361,7 +368,7 @@ BuildResourceDescriptorHob ( { EFI_HOB_RESOURCE_DESCRIPTOR *Hob; - Hob = InternalPeiCreateHob (EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, (UINT16) sizeof (EFI_HOB_RESOURCE_DESCRIPTOR)); + Hob = InternalPeiCreateHob (EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, (UINT16)sizeof (EFI_HOB_RESOURCE_DESCRIPTOR)); if (Hob == NULL) { return; } @@ -398,11 +405,11 @@ BuildResourceDescriptorHob ( VOID * EFIAPI BuildGuidHob ( - IN CONST EFI_GUID *Guid, - IN UINTN DataLength + IN CONST EFI_GUID *Guid, + IN UINTN DataLength ) { - EFI_HOB_GUID_TYPE *Hob; + EFI_HOB_GUID_TYPE *Hob; // // Make sure Guid is valid @@ -414,10 +421,11 @@ BuildGuidHob ( // ASSERT (DataLength <= (0xFFF8 - sizeof (EFI_HOB_GUID_TYPE))); - Hob = InternalPeiCreateHob (EFI_HOB_TYPE_GUID_EXTENSION, (UINT16) (sizeof (EFI_HOB_GUID_TYPE) + DataLength)); + Hob = InternalPeiCreateHob (EFI_HOB_TYPE_GUID_EXTENSION, (UINT16)(sizeof (EFI_HOB_GUID_TYPE) + DataLength)); if (Hob == NULL) { return Hob; } + CopyGuid (&Hob->Name, Guid); return Hob + 1; } @@ -450,9 +458,9 @@ BuildGuidHob ( VOID * EFIAPI BuildGuidDataHob ( - IN CONST EFI_GUID *Guid, - IN VOID *Data, - IN UINTN DataLength + IN CONST EFI_GUID *Guid, + IN VOID *Data, + IN UINTN DataLength ) { VOID *HobData; @@ -479,15 +487,15 @@ BuildGuidDataHob ( **/ BOOLEAN InternalCheckFvAlignment ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length ) { - EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader; - UINT32 FvAlignment; + EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader; + UINT32 FvAlignment; FvAlignment = 0; - FwVolHeader = (EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) BaseAddress; + FwVolHeader = (EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)BaseAddress; // // If EFI_FVB2_WEAK_ALIGNMENT is set in the volume header then the first byte of the volume @@ -505,6 +513,7 @@ InternalCheckFvAlignment ( if (FvAlignment < 8) { FvAlignment = 8; } + if ((UINTN)BaseAddress % FvAlignment != 0) { // // FvImage buffer is not at its required alignment. @@ -540,8 +549,8 @@ InternalCheckFvAlignment ( VOID EFIAPI BuildFvHob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length ) { EFI_HOB_FIRMWARE_VOLUME *Hob; @@ -551,7 +560,7 @@ BuildFvHob ( return; } - Hob = InternalPeiCreateHob (EFI_HOB_TYPE_FV, (UINT16) sizeof (EFI_HOB_FIRMWARE_VOLUME)); + Hob = InternalPeiCreateHob (EFI_HOB_TYPE_FV, (UINT16)sizeof (EFI_HOB_FIRMWARE_VOLUME)); if (Hob == NULL) { return; } @@ -579,10 +588,10 @@ BuildFvHob ( VOID EFIAPI BuildFv2Hob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length, - IN CONST EFI_GUID *FvName, - IN CONST EFI_GUID *FileName + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length, + IN CONST EFI_GUID *FvName, + IN CONST EFI_GUID *FileName ) { EFI_HOB_FIRMWARE_VOLUME2 *Hob; @@ -592,7 +601,7 @@ BuildFv2Hob ( return; } - Hob = InternalPeiCreateHob (EFI_HOB_TYPE_FV2, (UINT16) sizeof (EFI_HOB_FIRMWARE_VOLUME2)); + Hob = InternalPeiCreateHob (EFI_HOB_TYPE_FV2, (UINT16)sizeof (EFI_HOB_FIRMWARE_VOLUME2)); if (Hob == NULL) { return; } @@ -627,12 +636,12 @@ BuildFv2Hob ( VOID EFIAPI BuildFv3Hob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length, - IN UINT32 AuthenticationStatus, - IN BOOLEAN ExtractedFv, - IN CONST EFI_GUID *FvName OPTIONAL, - IN CONST EFI_GUID *FileName OPTIONAL + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length, + IN UINT32 AuthenticationStatus, + IN BOOLEAN ExtractedFv, + IN CONST EFI_GUID *FvName OPTIONAL, + IN CONST EFI_GUID *FileName OPTIONAL ) { EFI_HOB_FIRMWARE_VOLUME3 *Hob; @@ -642,7 +651,7 @@ BuildFv3Hob ( return; } - Hob = InternalPeiCreateHob (EFI_HOB_TYPE_FV3, (UINT16) sizeof (EFI_HOB_FIRMWARE_VOLUME3)); + Hob = InternalPeiCreateHob (EFI_HOB_TYPE_FV3, (UINT16)sizeof (EFI_HOB_FIRMWARE_VOLUME3)); if (Hob == NULL) { return; } @@ -674,19 +683,19 @@ BuildFv3Hob ( VOID EFIAPI BuildCvHob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length ) { EFI_HOB_UEFI_CAPSULE *Hob; - Hob = InternalPeiCreateHob (EFI_HOB_TYPE_UEFI_CAPSULE, (UINT16) sizeof (EFI_HOB_UEFI_CAPSULE)); + Hob = InternalPeiCreateHob (EFI_HOB_TYPE_UEFI_CAPSULE, (UINT16)sizeof (EFI_HOB_UEFI_CAPSULE)); if (Hob == NULL) { return; } - Hob->BaseAddress = BaseAddress; - Hob->Length = Length; + Hob->BaseAddress = BaseAddress; + Hob->Length = Length; } /** @@ -705,13 +714,13 @@ BuildCvHob ( VOID EFIAPI BuildCpuHob ( - IN UINT8 SizeOfMemorySpace, - IN UINT8 SizeOfIoSpace + IN UINT8 SizeOfMemorySpace, + IN UINT8 SizeOfIoSpace ) { EFI_HOB_CPU *Hob; - Hob = InternalPeiCreateHob (EFI_HOB_TYPE_CPU, (UINT16) sizeof (EFI_HOB_CPU)); + Hob = InternalPeiCreateHob (EFI_HOB_TYPE_CPU, (UINT16)sizeof (EFI_HOB_CPU)); if (Hob == NULL) { return; } @@ -741,16 +750,18 @@ BuildCpuHob ( VOID EFIAPI BuildStackHob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length ) { EFI_HOB_MEMORY_ALLOCATION_STACK *Hob; - ASSERT (((BaseAddress & (EFI_PAGE_SIZE - 1)) == 0) && - ((Length & (EFI_PAGE_SIZE - 1)) == 0)); + ASSERT ( + ((BaseAddress & (EFI_PAGE_SIZE - 1)) == 0) && + ((Length & (EFI_PAGE_SIZE - 1)) == 0) + ); - Hob = InternalPeiCreateHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, (UINT16) sizeof (EFI_HOB_MEMORY_ALLOCATION_STACK)); + Hob = InternalPeiCreateHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, (UINT16)sizeof (EFI_HOB_MEMORY_ALLOCATION_STACK)); if (Hob == NULL) { return; } @@ -783,17 +794,19 @@ BuildStackHob ( VOID EFIAPI BuildBspStoreHob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length, - IN EFI_MEMORY_TYPE MemoryType + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length, + IN EFI_MEMORY_TYPE MemoryType ) { EFI_HOB_MEMORY_ALLOCATION_BSP_STORE *Hob; - ASSERT (((BaseAddress & (EFI_PAGE_SIZE - 1)) == 0) && - ((Length & (EFI_PAGE_SIZE - 1)) == 0)); + ASSERT ( + ((BaseAddress & (EFI_PAGE_SIZE - 1)) == 0) && + ((Length & (EFI_PAGE_SIZE - 1)) == 0) + ); - Hob = InternalPeiCreateHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, (UINT16) sizeof (EFI_HOB_MEMORY_ALLOCATION_BSP_STORE)); + Hob = InternalPeiCreateHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, (UINT16)sizeof (EFI_HOB_MEMORY_ALLOCATION_BSP_STORE)); if (Hob == NULL) { return; } @@ -826,17 +839,19 @@ BuildBspStoreHob ( VOID EFIAPI BuildMemoryAllocationHob ( - IN EFI_PHYSICAL_ADDRESS BaseAddress, - IN UINT64 Length, - IN EFI_MEMORY_TYPE MemoryType + IN EFI_PHYSICAL_ADDRESS BaseAddress, + IN UINT64 Length, + IN EFI_MEMORY_TYPE MemoryType ) { EFI_HOB_MEMORY_ALLOCATION *Hob; - ASSERT (((BaseAddress & (EFI_PAGE_SIZE - 1)) == 0) && - ((Length & (EFI_PAGE_SIZE - 1)) == 0)); + ASSERT ( + ((BaseAddress & (EFI_PAGE_SIZE - 1)) == 0) && + ((Length & (EFI_PAGE_SIZE - 1)) == 0) + ); - Hob = InternalPeiCreateHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, (UINT16) sizeof (EFI_HOB_MEMORY_ALLOCATION)); + Hob = InternalPeiCreateHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, (UINT16)sizeof (EFI_HOB_MEMORY_ALLOCATION)); if (Hob == NULL) { return; } diff --git a/MdePkg/Library/PeiIoLibCpuIo/IoHighLevel.c b/MdePkg/Library/PeiIoLibCpuIo/IoHighLevel.c index a136c4a..0495495 100644 --- a/MdePkg/Library/PeiIoLibCpuIo/IoHighLevel.c +++ b/MdePkg/Library/PeiIoLibCpuIo/IoHighLevel.c @@ -9,7 +9,6 @@ **/ - #include #include @@ -38,11 +37,11 @@ UINT8 EFIAPI IoOr8 ( - IN UINTN Port, - IN UINT8 OrData + IN UINTN Port, + IN UINT8 OrData ) { - return IoWrite8 (Port, (UINT8) (IoRead8 (Port) | OrData)); + return IoWrite8 (Port, (UINT8)(IoRead8 (Port) | OrData)); } /** @@ -66,11 +65,11 @@ IoOr8 ( UINT8 EFIAPI IoAnd8 ( - IN UINTN Port, - IN UINT8 AndData + IN UINTN Port, + IN UINT8 AndData ) { - return IoWrite8 (Port, (UINT8) (IoRead8 (Port) & AndData)); + return IoWrite8 (Port, (UINT8)(IoRead8 (Port) & AndData)); } /** @@ -96,12 +95,12 @@ IoAnd8 ( UINT8 EFIAPI IoAndThenOr8 ( - IN UINTN Port, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Port, + IN UINT8 AndData, + IN UINT8 OrData ) { - return IoWrite8 (Port, (UINT8) ((IoRead8 (Port) & AndData) | OrData)); + return IoWrite8 (Port, (UINT8)((IoRead8 (Port) & AndData) | OrData)); } /** @@ -127,9 +126,9 @@ IoAndThenOr8 ( UINT8 EFIAPI IoBitFieldRead8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead8 (IoRead8 (Port), StartBit, EndBit); @@ -161,10 +160,10 @@ IoBitFieldRead8 ( UINT8 EFIAPI IoBitFieldWrite8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) { return IoWrite8 ( @@ -202,10 +201,10 @@ IoBitFieldWrite8 ( UINT8 EFIAPI IoBitFieldOr8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) { return IoWrite8 ( @@ -243,10 +242,10 @@ IoBitFieldOr8 ( UINT8 EFIAPI IoBitFieldAnd8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ) { return IoWrite8 ( @@ -288,11 +287,11 @@ IoBitFieldAnd8 ( UINT8 EFIAPI IoBitFieldAndThenOr8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) { return IoWrite8 ( @@ -323,11 +322,11 @@ IoBitFieldAndThenOr8 ( UINT16 EFIAPI IoOr16 ( - IN UINTN Port, - IN UINT16 OrData + IN UINTN Port, + IN UINT16 OrData ) { - return IoWrite16 (Port, (UINT16) (IoRead16 (Port) | OrData)); + return IoWrite16 (Port, (UINT16)(IoRead16 (Port) | OrData)); } /** @@ -352,11 +351,11 @@ IoOr16 ( UINT16 EFIAPI IoAnd16 ( - IN UINTN Port, - IN UINT16 AndData + IN UINTN Port, + IN UINT16 AndData ) { - return IoWrite16 (Port, (UINT16) (IoRead16 (Port) & AndData)); + return IoWrite16 (Port, (UINT16)(IoRead16 (Port) & AndData)); } /** @@ -383,12 +382,12 @@ IoAnd16 ( UINT16 EFIAPI IoAndThenOr16 ( - IN UINTN Port, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Port, + IN UINT16 AndData, + IN UINT16 OrData ) { - return IoWrite16 (Port, (UINT16) ((IoRead16 (Port) & AndData) | OrData)); + return IoWrite16 (Port, (UINT16)((IoRead16 (Port) & AndData) | OrData)); } /** @@ -415,9 +414,9 @@ IoAndThenOr16 ( UINT16 EFIAPI IoBitFieldRead16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead16 (IoRead16 (Port), StartBit, EndBit); @@ -451,10 +450,10 @@ IoBitFieldRead16 ( UINT16 EFIAPI IoBitFieldWrite16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ) { return IoWrite16 ( @@ -493,10 +492,10 @@ IoBitFieldWrite16 ( UINT16 EFIAPI IoBitFieldOr16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ) { return IoWrite16 ( @@ -535,10 +534,10 @@ IoBitFieldOr16 ( UINT16 EFIAPI IoBitFieldAnd16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ) { return IoWrite16 ( @@ -581,11 +580,11 @@ IoBitFieldAnd16 ( UINT16 EFIAPI IoBitFieldAndThenOr16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ) { return IoWrite16 ( @@ -616,8 +615,8 @@ IoBitFieldAndThenOr16 ( UINT32 EFIAPI IoOr32 ( - IN UINTN Port, - IN UINT32 OrData + IN UINTN Port, + IN UINT32 OrData ) { return IoWrite32 (Port, IoRead32 (Port) | OrData); @@ -645,8 +644,8 @@ IoOr32 ( UINT32 EFIAPI IoAnd32 ( - IN UINTN Port, - IN UINT32 AndData + IN UINTN Port, + IN UINT32 AndData ) { return IoWrite32 (Port, IoRead32 (Port) & AndData); @@ -676,9 +675,9 @@ IoAnd32 ( UINT32 EFIAPI IoAndThenOr32 ( - IN UINTN Port, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Port, + IN UINT32 AndData, + IN UINT32 OrData ) { return IoWrite32 (Port, (IoRead32 (Port) & AndData) | OrData); @@ -708,9 +707,9 @@ IoAndThenOr32 ( UINT32 EFIAPI IoBitFieldRead32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead32 (IoRead32 (Port), StartBit, EndBit); @@ -744,10 +743,10 @@ IoBitFieldRead32 ( UINT32 EFIAPI IoBitFieldWrite32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { return IoWrite32 ( @@ -786,10 +785,10 @@ IoBitFieldWrite32 ( UINT32 EFIAPI IoBitFieldOr32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { return IoWrite32 ( @@ -828,10 +827,10 @@ IoBitFieldOr32 ( UINT32 EFIAPI IoBitFieldAnd32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { return IoWrite32 ( @@ -874,11 +873,11 @@ IoBitFieldAnd32 ( UINT32 EFIAPI IoBitFieldAndThenOr32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { return IoWrite32 ( @@ -909,8 +908,8 @@ IoBitFieldAndThenOr32 ( UINT64 EFIAPI IoOr64 ( - IN UINTN Port, - IN UINT64 OrData + IN UINTN Port, + IN UINT64 OrData ) { return IoWrite64 (Port, IoRead64 (Port) | OrData); @@ -938,8 +937,8 @@ IoOr64 ( UINT64 EFIAPI IoAnd64 ( - IN UINTN Port, - IN UINT64 AndData + IN UINTN Port, + IN UINT64 AndData ) { return IoWrite64 (Port, IoRead64 (Port) & AndData); @@ -969,9 +968,9 @@ IoAnd64 ( UINT64 EFIAPI IoAndThenOr64 ( - IN UINTN Port, - IN UINT64 AndData, - IN UINT64 OrData + IN UINTN Port, + IN UINT64 AndData, + IN UINT64 OrData ) { return IoWrite64 (Port, (IoRead64 (Port) & AndData) | OrData); @@ -1001,9 +1000,9 @@ IoAndThenOr64 ( UINT64 EFIAPI IoBitFieldRead64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead64 (IoRead64 (Port), StartBit, EndBit); @@ -1037,10 +1036,10 @@ IoBitFieldRead64 ( UINT64 EFIAPI IoBitFieldWrite64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 Value + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 Value ) { return IoWrite64 ( @@ -1079,10 +1078,10 @@ IoBitFieldWrite64 ( UINT64 EFIAPI IoBitFieldOr64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 OrData ) { return IoWrite64 ( @@ -1121,10 +1120,10 @@ IoBitFieldOr64 ( UINT64 EFIAPI IoBitFieldAnd64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData ) { return IoWrite64 ( @@ -1167,11 +1166,11 @@ IoBitFieldAnd64 ( UINT64 EFIAPI IoBitFieldAndThenOr64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData, - IN UINT64 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData, + IN UINT64 OrData ) { return IoWrite64 ( @@ -1201,11 +1200,11 @@ IoBitFieldAndThenOr64 ( UINT8 EFIAPI MmioOr8 ( - IN UINTN Address, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 OrData ) { - return MmioWrite8 (Address, (UINT8) (MmioRead8 (Address) | OrData)); + return MmioWrite8 (Address, (UINT8)(MmioRead8 (Address) | OrData)); } /** @@ -1229,11 +1228,11 @@ MmioOr8 ( UINT8 EFIAPI MmioAnd8 ( - IN UINTN Address, - IN UINT8 AndData + IN UINTN Address, + IN UINT8 AndData ) { - return MmioWrite8 (Address, (UINT8) (MmioRead8 (Address) & AndData)); + return MmioWrite8 (Address, (UINT8)(MmioRead8 (Address) & AndData)); } /** @@ -1260,12 +1259,12 @@ MmioAnd8 ( UINT8 EFIAPI MmioAndThenOr8 ( - IN UINTN Address, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 AndData, + IN UINT8 OrData ) { - return MmioWrite8 (Address, (UINT8) ((MmioRead8 (Address) & AndData) | OrData)); + return MmioWrite8 (Address, (UINT8)((MmioRead8 (Address) & AndData) | OrData)); } /** @@ -1291,9 +1290,9 @@ MmioAndThenOr8 ( UINT8 EFIAPI MmioBitFieldRead8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead8 (MmioRead8 (Address), StartBit, EndBit); @@ -1325,10 +1324,10 @@ MmioBitFieldRead8 ( UINT8 EFIAPI MmioBitFieldWrite8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) { return MmioWrite8 ( @@ -1367,10 +1366,10 @@ MmioBitFieldWrite8 ( UINT8 EFIAPI MmioBitFieldOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) { return MmioWrite8 ( @@ -1409,10 +1408,10 @@ MmioBitFieldOr8 ( UINT8 EFIAPI MmioBitFieldAnd8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ) { return MmioWrite8 ( @@ -1454,11 +1453,11 @@ MmioBitFieldAnd8 ( UINT8 EFIAPI MmioBitFieldAndThenOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) { return MmioWrite8 ( @@ -1489,11 +1488,11 @@ MmioBitFieldAndThenOr8 ( UINT16 EFIAPI MmioOr16 ( - IN UINTN Address, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 OrData ) { - return MmioWrite16 (Address, (UINT16) (MmioRead16 (Address) | OrData)); + return MmioWrite16 (Address, (UINT16)(MmioRead16 (Address) | OrData)); } /** @@ -1518,11 +1517,11 @@ MmioOr16 ( UINT16 EFIAPI MmioAnd16 ( - IN UINTN Address, - IN UINT16 AndData + IN UINTN Address, + IN UINT16 AndData ) { - return MmioWrite16 (Address, (UINT16) (MmioRead16 (Address) & AndData)); + return MmioWrite16 (Address, (UINT16)(MmioRead16 (Address) & AndData)); } /** @@ -1549,12 +1548,12 @@ MmioAnd16 ( UINT16 EFIAPI MmioAndThenOr16 ( - IN UINTN Address, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 AndData, + IN UINT16 OrData ) { - return MmioWrite16 (Address, (UINT16) ((MmioRead16 (Address) & AndData) | OrData)); + return MmioWrite16 (Address, (UINT16)((MmioRead16 (Address) & AndData) | OrData)); } /** @@ -1581,9 +1580,9 @@ MmioAndThenOr16 ( UINT16 EFIAPI MmioBitFieldRead16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead16 (MmioRead16 (Address), StartBit, EndBit); @@ -1616,10 +1615,10 @@ MmioBitFieldRead16 ( UINT16 EFIAPI MmioBitFieldWrite16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ) { return MmioWrite16 ( @@ -1659,10 +1658,10 @@ MmioBitFieldWrite16 ( UINT16 EFIAPI MmioBitFieldOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ) { return MmioWrite16 ( @@ -1702,10 +1701,10 @@ MmioBitFieldOr16 ( UINT16 EFIAPI MmioBitFieldAnd16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ) { return MmioWrite16 ( @@ -1748,11 +1747,11 @@ MmioBitFieldAnd16 ( UINT16 EFIAPI MmioBitFieldAndThenOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ) { return MmioWrite16 ( @@ -1783,8 +1782,8 @@ MmioBitFieldAndThenOr16 ( UINT32 EFIAPI MmioOr32 ( - IN UINTN Address, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 OrData ) { return MmioWrite32 (Address, MmioRead32 (Address) | OrData); @@ -1812,8 +1811,8 @@ MmioOr32 ( UINT32 EFIAPI MmioAnd32 ( - IN UINTN Address, - IN UINT32 AndData + IN UINTN Address, + IN UINT32 AndData ) { return MmioWrite32 (Address, MmioRead32 (Address) & AndData); @@ -1843,9 +1842,9 @@ MmioAnd32 ( UINT32 EFIAPI MmioAndThenOr32 ( - IN UINTN Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 AndData, + IN UINT32 OrData ) { return MmioWrite32 (Address, (MmioRead32 (Address) & AndData) | OrData); @@ -1875,9 +1874,9 @@ MmioAndThenOr32 ( UINT32 EFIAPI MmioBitFieldRead32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead32 (MmioRead32 (Address), StartBit, EndBit); @@ -1910,10 +1909,10 @@ MmioBitFieldRead32 ( UINT32 EFIAPI MmioBitFieldWrite32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { return MmioWrite32 ( @@ -1953,10 +1952,10 @@ MmioBitFieldWrite32 ( UINT32 EFIAPI MmioBitFieldOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { return MmioWrite32 ( @@ -1996,10 +1995,10 @@ MmioBitFieldOr32 ( UINT32 EFIAPI MmioBitFieldAnd32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { return MmioWrite32 ( @@ -2042,11 +2041,11 @@ MmioBitFieldAnd32 ( UINT32 EFIAPI MmioBitFieldAndThenOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { return MmioWrite32 ( @@ -2077,8 +2076,8 @@ MmioBitFieldAndThenOr32 ( UINT64 EFIAPI MmioOr64 ( - IN UINTN Address, - IN UINT64 OrData + IN UINTN Address, + IN UINT64 OrData ) { return MmioWrite64 (Address, MmioRead64 (Address) | OrData); @@ -2106,8 +2105,8 @@ MmioOr64 ( UINT64 EFIAPI MmioAnd64 ( - IN UINTN Address, - IN UINT64 AndData + IN UINTN Address, + IN UINT64 AndData ) { return MmioWrite64 (Address, MmioRead64 (Address) & AndData); @@ -2137,9 +2136,9 @@ MmioAnd64 ( UINT64 EFIAPI MmioAndThenOr64 ( - IN UINTN Address, - IN UINT64 AndData, - IN UINT64 OrData + IN UINTN Address, + IN UINT64 AndData, + IN UINT64 OrData ) { return MmioWrite64 (Address, (MmioRead64 (Address) & AndData) | OrData); @@ -2169,9 +2168,9 @@ MmioAndThenOr64 ( UINT64 EFIAPI MmioBitFieldRead64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead64 (MmioRead64 (Address), StartBit, EndBit); @@ -2204,10 +2203,10 @@ MmioBitFieldRead64 ( UINT64 EFIAPI MmioBitFieldWrite64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 Value ) { return MmioWrite64 ( @@ -2247,10 +2246,10 @@ MmioBitFieldWrite64 ( UINT64 EFIAPI MmioBitFieldOr64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 OrData ) { return MmioWrite64 ( @@ -2290,10 +2289,10 @@ MmioBitFieldOr64 ( UINT64 EFIAPI MmioBitFieldAnd64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData ) { return MmioWrite64 ( @@ -2336,11 +2335,11 @@ MmioBitFieldAnd64 ( UINT64 EFIAPI MmioBitFieldAndThenOr64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData, - IN UINT64 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData, + IN UINT64 OrData ) { return MmioWrite64 ( diff --git a/MdePkg/Library/PeiIoLibCpuIo/IoLib.c b/MdePkg/Library/PeiIoLibCpuIo/IoLib.c index 87002e4..5390ff7 100644 --- a/MdePkg/Library/PeiIoLibCpuIo/IoLib.c +++ b/MdePkg/Library/PeiIoLibCpuIo/IoLib.c @@ -8,7 +8,6 @@ **/ - #include #include @@ -16,7 +15,6 @@ #include #include - /** Reads registers in the EFI CPU I/O space. @@ -42,9 +40,9 @@ IoReadFifoWorker ( IN VOID *Buffer ) { - CONST EFI_PEI_SERVICES **PeiServices; - EFI_PEI_CPU_IO_PPI *CpuIo; - EFI_STATUS Status; + CONST EFI_PEI_SERVICES **PeiServices; + EFI_PEI_CPU_IO_PPI *CpuIo; + EFI_STATUS Status; PeiServices = GetPeiServicesTablePointer (); CpuIo = (*PeiServices)->CpuIo; @@ -79,9 +77,9 @@ IoWriteFifoWorker ( IN VOID *Buffer ) { - CONST EFI_PEI_SERVICES **PeiServices; - EFI_PEI_CPU_IO_PPI *CpuIo; - EFI_STATUS Status; + CONST EFI_PEI_SERVICES **PeiServices; + EFI_PEI_CPU_IO_PPI *CpuIo; + EFI_STATUS Status; PeiServices = GetPeiServicesTablePointer (); CpuIo = (*PeiServices)->CpuIo; @@ -108,17 +106,17 @@ IoWriteFifoWorker ( UINT8 EFIAPI IoRead8 ( - IN UINTN Port + IN UINTN Port ) { - CONST EFI_PEI_SERVICES **PeiServices; - EFI_PEI_CPU_IO_PPI *CpuIo; + CONST EFI_PEI_SERVICES **PeiServices; + EFI_PEI_CPU_IO_PPI *CpuIo; PeiServices = GetPeiServicesTablePointer (); CpuIo = (*PeiServices)->CpuIo; ASSERT (CpuIo != NULL); - return CpuIo->IoRead8 (PeiServices, CpuIo, (UINT64) Port); + return CpuIo->IoRead8 (PeiServices, CpuIo, (UINT64)Port); } /** @@ -139,18 +137,18 @@ IoRead8 ( UINT8 EFIAPI IoWrite8 ( - IN UINTN Port, - IN UINT8 Value + IN UINTN Port, + IN UINT8 Value ) { - CONST EFI_PEI_SERVICES **PeiServices; - EFI_PEI_CPU_IO_PPI *CpuIo; + CONST EFI_PEI_SERVICES **PeiServices; + EFI_PEI_CPU_IO_PPI *CpuIo; PeiServices = GetPeiServicesTablePointer (); CpuIo = (*PeiServices)->CpuIo; ASSERT (CpuIo != NULL); - CpuIo->IoWrite8 (PeiServices, CpuIo, (UINT64) Port, Value); + CpuIo->IoWrite8 (PeiServices, CpuIo, (UINT64)Port, Value); return Value; } @@ -172,11 +170,11 @@ IoWrite8 ( UINT16 EFIAPI IoRead16 ( - IN UINTN Port + IN UINTN Port ) { - CONST EFI_PEI_SERVICES **PeiServices; - EFI_PEI_CPU_IO_PPI *CpuIo; + CONST EFI_PEI_SERVICES **PeiServices; + EFI_PEI_CPU_IO_PPI *CpuIo; PeiServices = GetPeiServicesTablePointer (); CpuIo = (*PeiServices)->CpuIo; @@ -185,7 +183,7 @@ IoRead16 ( // Make sure Port is aligned on a 16-bit boundary. // ASSERT ((Port & 1) == 0); - return CpuIo->IoRead16 (PeiServices, CpuIo, (UINT64) Port); + return CpuIo->IoRead16 (PeiServices, CpuIo, (UINT64)Port); } /** @@ -207,12 +205,12 @@ IoRead16 ( UINT16 EFIAPI IoWrite16 ( - IN UINTN Port, - IN UINT16 Value + IN UINTN Port, + IN UINT16 Value ) { - CONST EFI_PEI_SERVICES **PeiServices; - EFI_PEI_CPU_IO_PPI *CpuIo; + CONST EFI_PEI_SERVICES **PeiServices; + EFI_PEI_CPU_IO_PPI *CpuIo; PeiServices = GetPeiServicesTablePointer (); CpuIo = (*PeiServices)->CpuIo; @@ -221,7 +219,7 @@ IoWrite16 ( // Make sure Port is aligned on a 16-bit boundary. // ASSERT ((Port & 1) == 0); - CpuIo->IoWrite16 (PeiServices, CpuIo, (UINT64) Port, Value); + CpuIo->IoWrite16 (PeiServices, CpuIo, (UINT64)Port, Value); return Value; } @@ -243,11 +241,11 @@ IoWrite16 ( UINT32 EFIAPI IoRead32 ( - IN UINTN Port + IN UINTN Port ) { - CONST EFI_PEI_SERVICES **PeiServices; - EFI_PEI_CPU_IO_PPI *CpuIo; + CONST EFI_PEI_SERVICES **PeiServices; + EFI_PEI_CPU_IO_PPI *CpuIo; PeiServices = GetPeiServicesTablePointer (); CpuIo = (*PeiServices)->CpuIo; @@ -256,7 +254,7 @@ IoRead32 ( // Make sure Port is aligned on a 32-bit boundary. // ASSERT ((Port & 3) == 0); - return CpuIo->IoRead32 (PeiServices, CpuIo, (UINT64) Port); + return CpuIo->IoRead32 (PeiServices, CpuIo, (UINT64)Port); } /** @@ -278,12 +276,12 @@ IoRead32 ( UINT32 EFIAPI IoWrite32 ( - IN UINTN Port, - IN UINT32 Value + IN UINTN Port, + IN UINT32 Value ) { - CONST EFI_PEI_SERVICES **PeiServices; - EFI_PEI_CPU_IO_PPI *CpuIo; + CONST EFI_PEI_SERVICES **PeiServices; + EFI_PEI_CPU_IO_PPI *CpuIo; PeiServices = GetPeiServicesTablePointer (); CpuIo = (*PeiServices)->CpuIo; @@ -292,7 +290,7 @@ IoWrite32 ( // Make sure Port is aligned on a 32-bit boundary. // ASSERT ((Port & 3) == 0); - CpuIo->IoWrite32 (PeiServices, CpuIo, (UINT64) Port, Value); + CpuIo->IoWrite32 (PeiServices, CpuIo, (UINT64)Port, Value); return Value; } @@ -314,11 +312,11 @@ IoWrite32 ( UINT64 EFIAPI IoRead64 ( - IN UINTN Port + IN UINTN Port ) { - CONST EFI_PEI_SERVICES **PeiServices; - EFI_PEI_CPU_IO_PPI *CpuIo; + CONST EFI_PEI_SERVICES **PeiServices; + EFI_PEI_CPU_IO_PPI *CpuIo; PeiServices = GetPeiServicesTablePointer (); CpuIo = (*PeiServices)->CpuIo; @@ -327,7 +325,7 @@ IoRead64 ( // Make sure Port is aligned on a 64-bit boundary. // ASSERT ((Port & 7) == 0); - return CpuIo->IoRead64 (PeiServices, CpuIo, (UINT64) Port); + return CpuIo->IoRead64 (PeiServices, CpuIo, (UINT64)Port); } /** @@ -349,12 +347,12 @@ IoRead64 ( UINT64 EFIAPI IoWrite64 ( - IN UINTN Port, - IN UINT64 Value + IN UINTN Port, + IN UINT64 Value ) { - CONST EFI_PEI_SERVICES **PeiServices; - EFI_PEI_CPU_IO_PPI *CpuIo; + CONST EFI_PEI_SERVICES **PeiServices; + EFI_PEI_CPU_IO_PPI *CpuIo; PeiServices = GetPeiServicesTablePointer (); CpuIo = (*PeiServices)->CpuIo; @@ -363,8 +361,8 @@ IoWrite64 ( // Make sure Port is aligned on a 64-bit boundary. // ASSERT ((Port & 7) == 0); - CpuIo->IoWrite64 (PeiServices, CpuIo, (UINT64) Port, Value); - return Value;; + CpuIo->IoWrite64 (PeiServices, CpuIo, (UINT64)Port, Value); + return Value; } /** @@ -387,9 +385,9 @@ IoWrite64 ( VOID EFIAPI IoReadFifo8 ( - IN UINTN Port, - IN UINTN Count, - OUT VOID *Buffer + IN UINTN Port, + IN UINTN Count, + OUT VOID *Buffer ) { IoReadFifoWorker (Port, EfiPeiCpuIoWidthFifoUint8, Count, Buffer); @@ -415,9 +413,9 @@ IoReadFifo8 ( VOID EFIAPI IoWriteFifo8 ( - IN UINTN Port, - IN UINTN Count, - IN VOID *Buffer + IN UINTN Port, + IN UINTN Count, + IN VOID *Buffer ) { IoWriteFifoWorker (Port, EfiPeiCpuIoWidthFifoUint8, Count, Buffer); @@ -443,9 +441,9 @@ IoWriteFifo8 ( VOID EFIAPI IoReadFifo16 ( - IN UINTN Port, - IN UINTN Count, - OUT VOID *Buffer + IN UINTN Port, + IN UINTN Count, + OUT VOID *Buffer ) { // @@ -475,9 +473,9 @@ IoReadFifo16 ( VOID EFIAPI IoWriteFifo16 ( - IN UINTN Port, - IN UINTN Count, - IN VOID *Buffer + IN UINTN Port, + IN UINTN Count, + IN VOID *Buffer ) { // @@ -507,9 +505,9 @@ IoWriteFifo16 ( VOID EFIAPI IoReadFifo32 ( - IN UINTN Port, - IN UINTN Count, - OUT VOID *Buffer + IN UINTN Port, + IN UINTN Count, + OUT VOID *Buffer ) { // @@ -539,9 +537,9 @@ IoReadFifo32 ( VOID EFIAPI IoWriteFifo32 ( - IN UINTN Port, - IN UINTN Count, - IN VOID *Buffer + IN UINTN Port, + IN UINTN Count, + IN VOID *Buffer ) { // @@ -568,17 +566,17 @@ IoWriteFifo32 ( UINT8 EFIAPI MmioRead8 ( - IN UINTN Address + IN UINTN Address ) { - CONST EFI_PEI_SERVICES **PeiServices; - EFI_PEI_CPU_IO_PPI *CpuIo; + CONST EFI_PEI_SERVICES **PeiServices; + EFI_PEI_CPU_IO_PPI *CpuIo; PeiServices = GetPeiServicesTablePointer (); CpuIo = (*PeiServices)->CpuIo; ASSERT (CpuIo != NULL); - return CpuIo->MemRead8 (PeiServices, CpuIo, (UINT64) Address); + return CpuIo->MemRead8 (PeiServices, CpuIo, (UINT64)Address); } /** @@ -599,18 +597,18 @@ MmioRead8 ( UINT8 EFIAPI MmioWrite8 ( - IN UINTN Address, - IN UINT8 Value + IN UINTN Address, + IN UINT8 Value ) { - CONST EFI_PEI_SERVICES **PeiServices; - EFI_PEI_CPU_IO_PPI *CpuIo; + CONST EFI_PEI_SERVICES **PeiServices; + EFI_PEI_CPU_IO_PPI *CpuIo; PeiServices = GetPeiServicesTablePointer (); CpuIo = (*PeiServices)->CpuIo; ASSERT (CpuIo != NULL); - CpuIo->MemWrite8 (PeiServices, CpuIo, (UINT64) Address, Value); + CpuIo->MemWrite8 (PeiServices, CpuIo, (UINT64)Address, Value); return Value; } @@ -632,11 +630,11 @@ MmioWrite8 ( UINT16 EFIAPI MmioRead16 ( - IN UINTN Address + IN UINTN Address ) { - CONST EFI_PEI_SERVICES **PeiServices; - EFI_PEI_CPU_IO_PPI *CpuIo; + CONST EFI_PEI_SERVICES **PeiServices; + EFI_PEI_CPU_IO_PPI *CpuIo; PeiServices = GetPeiServicesTablePointer (); CpuIo = (*PeiServices)->CpuIo; @@ -645,8 +643,7 @@ MmioRead16 ( // Make sure Address is aligned on a 16-bit boundary. // ASSERT ((Address & 1) == 0); - return CpuIo->MemRead16 (PeiServices, CpuIo, (UINT64) Address); - + return CpuIo->MemRead16 (PeiServices, CpuIo, (UINT64)Address); } /** @@ -668,12 +665,12 @@ MmioRead16 ( UINT16 EFIAPI MmioWrite16 ( - IN UINTN Address, - IN UINT16 Value + IN UINTN Address, + IN UINT16 Value ) { - CONST EFI_PEI_SERVICES **PeiServices; - EFI_PEI_CPU_IO_PPI *CpuIo; + CONST EFI_PEI_SERVICES **PeiServices; + EFI_PEI_CPU_IO_PPI *CpuIo; PeiServices = GetPeiServicesTablePointer (); CpuIo = (*PeiServices)->CpuIo; @@ -682,7 +679,7 @@ MmioWrite16 ( // Make sure Address is aligned on a 16-bit boundary. // ASSERT ((Address & 1) == 0); - CpuIo->MemWrite16 (PeiServices, CpuIo, (UINT64) Address, Value); + CpuIo->MemWrite16 (PeiServices, CpuIo, (UINT64)Address, Value); return Value; } @@ -704,11 +701,11 @@ MmioWrite16 ( UINT32 EFIAPI MmioRead32 ( - IN UINTN Address + IN UINTN Address ) { - CONST EFI_PEI_SERVICES **PeiServices; - EFI_PEI_CPU_IO_PPI *CpuIo; + CONST EFI_PEI_SERVICES **PeiServices; + EFI_PEI_CPU_IO_PPI *CpuIo; PeiServices = GetPeiServicesTablePointer (); CpuIo = (*PeiServices)->CpuIo; @@ -717,8 +714,7 @@ MmioRead32 ( // Make sure Address is aligned on a 32-bit boundary. // ASSERT ((Address & 3) == 0); - return CpuIo->MemRead32 (PeiServices, CpuIo, (UINT64) Address); - + return CpuIo->MemRead32 (PeiServices, CpuIo, (UINT64)Address); } /** @@ -740,12 +736,12 @@ MmioRead32 ( UINT32 EFIAPI MmioWrite32 ( - IN UINTN Address, - IN UINT32 Value + IN UINTN Address, + IN UINT32 Value ) { - CONST EFI_PEI_SERVICES **PeiServices; - EFI_PEI_CPU_IO_PPI *CpuIo; + CONST EFI_PEI_SERVICES **PeiServices; + EFI_PEI_CPU_IO_PPI *CpuIo; PeiServices = GetPeiServicesTablePointer (); CpuIo = (*PeiServices)->CpuIo; @@ -754,7 +750,7 @@ MmioWrite32 ( // Make sure Address is aligned on a 32-bit boundary. // ASSERT ((Address & 3) == 0); - CpuIo->MemWrite32 (PeiServices, CpuIo, (UINT64) Address, Value); + CpuIo->MemWrite32 (PeiServices, CpuIo, (UINT64)Address, Value); return Value; } @@ -776,11 +772,11 @@ MmioWrite32 ( UINT64 EFIAPI MmioRead64 ( - IN UINTN Address + IN UINTN Address ) { - CONST EFI_PEI_SERVICES **PeiServices; - EFI_PEI_CPU_IO_PPI *CpuIo; + CONST EFI_PEI_SERVICES **PeiServices; + EFI_PEI_CPU_IO_PPI *CpuIo; PeiServices = GetPeiServicesTablePointer (); CpuIo = (*PeiServices)->CpuIo; @@ -789,8 +785,7 @@ MmioRead64 ( // Make sure Address is aligned on a 64-bit boundary. // ASSERT ((Address & (sizeof (UINT64) - 1)) == 0); - return CpuIo->MemRead64 (PeiServices, CpuIo, (UINT64) Address); - + return CpuIo->MemRead64 (PeiServices, CpuIo, (UINT64)Address); } /** @@ -810,12 +805,12 @@ MmioRead64 ( UINT64 EFIAPI MmioWrite64 ( - IN UINTN Address, - IN UINT64 Value + IN UINTN Address, + IN UINT64 Value ) { - CONST EFI_PEI_SERVICES **PeiServices; - EFI_PEI_CPU_IO_PPI *CpuIo; + CONST EFI_PEI_SERVICES **PeiServices; + EFI_PEI_CPU_IO_PPI *CpuIo; PeiServices = GetPeiServicesTablePointer (); CpuIo = (*PeiServices)->CpuIo; @@ -824,6 +819,6 @@ MmioWrite64 ( // Make sure Address is aligned on a 64-bit boundary. // ASSERT ((Address & 7) == 0); - CpuIo->MemWrite64 (PeiServices, CpuIo, (UINT64) Address, Value); + CpuIo->MemWrite64 (PeiServices, CpuIo, (UINT64)Address, Value); return Value; } diff --git a/MdePkg/Library/PeiIoLibCpuIo/IoLibMmioBuffer.c b/MdePkg/Library/PeiIoLibCpuIo/IoLibMmioBuffer.c index f4ee7c3..3481338 100644 --- a/MdePkg/Library/PeiIoLibCpuIo/IoLibMmioBuffer.c +++ b/MdePkg/Library/PeiIoLibCpuIo/IoLibMmioBuffer.c @@ -7,7 +7,6 @@ **/ - #include #include @@ -36,15 +35,15 @@ UINT8 * EFIAPI MmioReadBuffer8 ( - IN UINTN StartAddress, - IN UINTN Length, - OUT UINT8 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT8 *Buffer ) { - UINT8 *ReturnBuffer; + UINT8 *ReturnBuffer; ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ReturnBuffer = Buffer; @@ -80,27 +79,27 @@ MmioReadBuffer8 ( UINT16 * EFIAPI MmioReadBuffer16 ( - IN UINTN StartAddress, - IN UINTN Length, - OUT UINT16 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT16 *Buffer ) { - UINT16 *ReturnBuffer; + UINT16 *ReturnBuffer; ASSERT ((StartAddress & (sizeof (UINT16) - 1)) == 0); ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (UINT16) - 1)) == 0); - ASSERT (((UINTN) Buffer & (sizeof (UINT16) - 1)) == 0); + ASSERT (((UINTN)Buffer & (sizeof (UINT16) - 1)) == 0); ReturnBuffer = Buffer; while (Length != 0) { - *(Buffer++) = MmioRead16 (StartAddress); + *(Buffer++) = MmioRead16 (StartAddress); StartAddress += sizeof (UINT16); - Length -= sizeof (UINT16); + Length -= sizeof (UINT16); } return ReturnBuffer; @@ -131,27 +130,27 @@ MmioReadBuffer16 ( UINT32 * EFIAPI MmioReadBuffer32 ( - IN UINTN StartAddress, - IN UINTN Length, - OUT UINT32 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT32 *Buffer ) { - UINT32 *ReturnBuffer; + UINT32 *ReturnBuffer; ASSERT ((StartAddress & (sizeof (UINT32) - 1)) == 0); ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (UINT32) - 1)) == 0); - ASSERT (((UINTN) Buffer & (sizeof (UINT32) - 1)) == 0); + ASSERT (((UINTN)Buffer & (sizeof (UINT32) - 1)) == 0); ReturnBuffer = Buffer; while (Length != 0) { - *(Buffer++) = MmioRead32 (StartAddress); + *(Buffer++) = MmioRead32 (StartAddress); StartAddress += sizeof (UINT32); - Length -= sizeof (UINT32); + Length -= sizeof (UINT32); } return ReturnBuffer; @@ -182,33 +181,32 @@ MmioReadBuffer32 ( UINT64 * EFIAPI MmioReadBuffer64 ( - IN UINTN StartAddress, - IN UINTN Length, - OUT UINT64 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT64 *Buffer ) { - UINT64 *ReturnBuffer; + UINT64 *ReturnBuffer; ASSERT ((StartAddress & (sizeof (UINT64) - 1)) == 0); ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (UINT64) - 1)) == 0); - ASSERT (((UINTN) Buffer & (sizeof (UINT64) - 1)) == 0); + ASSERT (((UINTN)Buffer & (sizeof (UINT64) - 1)) == 0); ReturnBuffer = Buffer; while (Length != 0) { - *(Buffer++) = MmioRead64 (StartAddress); + *(Buffer++) = MmioRead64 (StartAddress); StartAddress += sizeof (UINT64); - Length -= sizeof (UINT64); + Length -= sizeof (UINT64); } return ReturnBuffer; } - /** Copy data from system memory to MMIO region by using 8-bit access. @@ -230,24 +228,23 @@ MmioReadBuffer64 ( UINT8 * EFIAPI MmioWriteBuffer8 ( - IN UINTN StartAddress, - IN UINTN Length, - IN CONST UINT8 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT8 *Buffer ) { - VOID* ReturnBuffer; + VOID *ReturnBuffer; ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); - ReturnBuffer = (UINT8 *) Buffer; + ReturnBuffer = (UINT8 *)Buffer; while (Length-- != 0) { - MmioWrite8 (StartAddress++, *(Buffer++)); + MmioWrite8 (StartAddress++, *(Buffer++)); } return ReturnBuffer; - } /** @@ -276,34 +273,33 @@ MmioWriteBuffer8 ( UINT16 * EFIAPI MmioWriteBuffer16 ( - IN UINTN StartAddress, - IN UINTN Length, - IN CONST UINT16 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT16 *Buffer ) { - UINT16 *ReturnBuffer; + UINT16 *ReturnBuffer; ASSERT ((StartAddress & (sizeof (UINT16) - 1)) == 0); ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (UINT16) - 1)) == 0); - ASSERT (((UINTN) Buffer & (sizeof (UINT16) - 1)) == 0); + ASSERT (((UINTN)Buffer & (sizeof (UINT16) - 1)) == 0); - ReturnBuffer = (UINT16 *) Buffer; + ReturnBuffer = (UINT16 *)Buffer; while (Length != 0) { MmioWrite16 (StartAddress, *(Buffer++)); StartAddress += sizeof (UINT16); - Length -= sizeof (UINT16); + Length -= sizeof (UINT16); } return ReturnBuffer; } - /** Copy data from system memory to MMIO region by using 32-bit access. @@ -330,28 +326,28 @@ MmioWriteBuffer16 ( UINT32 * EFIAPI MmioWriteBuffer32 ( - IN UINTN StartAddress, - IN UINTN Length, - IN CONST UINT32 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT32 *Buffer ) { - UINT32 *ReturnBuffer; + UINT32 *ReturnBuffer; ASSERT ((StartAddress & (sizeof (UINT32) - 1)) == 0); ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (UINT32) - 1)) == 0); - ASSERT (((UINTN) Buffer & (sizeof (UINT32) - 1)) == 0); + ASSERT (((UINTN)Buffer & (sizeof (UINT32) - 1)) == 0); - ReturnBuffer = (UINT32 *) Buffer; + ReturnBuffer = (UINT32 *)Buffer; while (Length != 0) { MmioWrite32 (StartAddress, *(Buffer++)); StartAddress += sizeof (UINT32); - Length -= sizeof (UINT32); + Length -= sizeof (UINT32); } return ReturnBuffer; @@ -383,30 +379,29 @@ MmioWriteBuffer32 ( UINT64 * EFIAPI MmioWriteBuffer64 ( - IN UINTN StartAddress, - IN UINTN Length, - IN CONST UINT64 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT64 *Buffer ) { - UINT64 *ReturnBuffer; + UINT64 *ReturnBuffer; ASSERT ((StartAddress & (sizeof (UINT64) - 1)) == 0); ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (UINT64) - 1)) == 0); - ASSERT (((UINTN) Buffer & (sizeof (UINT64) - 1)) == 0); + ASSERT (((UINTN)Buffer & (sizeof (UINT64) - 1)) == 0); - ReturnBuffer = (UINT64 *) Buffer; + ReturnBuffer = (UINT64 *)Buffer; while (Length != 0) { MmioWrite64 (StartAddress, *(Buffer++)); StartAddress += sizeof (UINT64); - Length -= sizeof (UINT64); + Length -= sizeof (UINT64); } return ReturnBuffer; } - diff --git a/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c b/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c index b3f9df7..e540e06 100644 --- a/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c +++ b/MdePkg/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c @@ -7,17 +7,14 @@ **/ - #include - #include #include #include #include #include - /** Allocates one or more 4KB pages of a certain memory type. @@ -49,7 +46,7 @@ InternalAllocatePages ( return NULL; } - return (VOID *) (UINTN) Memory; + return (VOID *)(UINTN)Memory; } /** @@ -145,7 +142,7 @@ FreePages ( EFI_STATUS Status; ASSERT (Pages != 0); - Status = PeiServicesFreePages ((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer, Pages); + Status = PeiServicesFreePages ((EFI_PHYSICAL_ADDRESS)(UINTN)Buffer, Pages); ASSERT_EFI_ERROR (Status); } @@ -190,23 +187,25 @@ InternalAllocateAlignedPages ( if (Pages == 0) { return NULL; } + if (Alignment > EFI_PAGE_SIZE) { // // Calculate the total number of pages since alignment is larger than page size. // - AlignmentMask = Alignment - 1; - RealPages = Pages + EFI_SIZE_TO_PAGES (Alignment); + AlignmentMask = Alignment - 1; + RealPages = Pages + EFI_SIZE_TO_PAGES (Alignment); // // Make sure that Pages plus EFI_SIZE_TO_PAGES (Alignment) does not overflow. // ASSERT (RealPages > Pages); - Status = PeiServicesAllocatePages (MemoryType, RealPages, &Memory); + Status = PeiServicesAllocatePages (MemoryType, RealPages, &Memory); if (EFI_ERROR (Status)) { return NULL; } - AlignedMemory = ((UINTN) Memory + AlignmentMask) & ~AlignmentMask; - UnalignedPages = EFI_SIZE_TO_PAGES (AlignedMemory - (UINTN) Memory); + + AlignedMemory = ((UINTN)Memory + AlignmentMask) & ~AlignmentMask; + UnalignedPages = EFI_SIZE_TO_PAGES (AlignedMemory - (UINTN)Memory); if (UnalignedPages > 0) { // // Free first unaligned page(s). @@ -214,6 +213,7 @@ InternalAllocateAlignedPages ( Status = PeiServicesFreePages (Memory, UnalignedPages); ASSERT_EFI_ERROR (Status); } + Memory = AlignedMemory + EFI_PAGES_TO_SIZE (Pages); UnalignedPages = RealPages - Pages - UnalignedPages; if (UnalignedPages > 0) { @@ -231,9 +231,11 @@ InternalAllocateAlignedPages ( if (EFI_ERROR (Status)) { return NULL; } - AlignedMemory = (UINTN) Memory; + + AlignedMemory = (UINTN)Memory; } - return (VOID *) AlignedMemory; + + return (VOID *)AlignedMemory; } /** @@ -350,7 +352,7 @@ FreeAlignedPages ( EFI_STATUS Status; ASSERT (Pages != 0); - Status = PeiServicesFreePages ((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer, Pages); + Status = PeiServicesFreePages ((EFI_PHYSICAL_ADDRESS)(UINTN)Buffer, Pages); ASSERT_EFI_ERROR (Status); } @@ -399,13 +401,14 @@ AllocatePool ( IN UINTN AllocationSize ) { - EFI_STATUS Status; - VOID *Buffer; + EFI_STATUS Status; + VOID *Buffer; Status = PeiServicesAllocatePool (AllocationSize, &Buffer); if (EFI_ERROR (Status)) { Buffer = NULL; } + return Buffer; } @@ -477,6 +480,7 @@ InternalAllocateZeroPool ( if (Memory != NULL) { Memory = ZeroMem (Memory, AllocationSize); } + return Memory; } @@ -505,6 +509,7 @@ AllocateZeroPool ( if (Memory != NULL) { Memory = ZeroMem (Memory, AllocationSize); } + return Memory; } @@ -579,12 +584,13 @@ InternalAllocateCopyPool ( VOID *Memory; ASSERT (Buffer != NULL); - ASSERT (AllocationSize <= (MAX_ADDRESS - (UINTN) Buffer + 1)); + ASSERT (AllocationSize <= (MAX_ADDRESS - (UINTN)Buffer + 1)); Memory = InternalAllocatePool (PoolType, AllocationSize); if (Memory != NULL) { - Memory = CopyMem (Memory, Buffer, AllocationSize); + Memory = CopyMem (Memory, Buffer, AllocationSize); } + return Memory; } @@ -615,12 +621,13 @@ AllocateCopyPool ( VOID *Memory; ASSERT (Buffer != NULL); - ASSERT (AllocationSize <= (MAX_ADDRESS - (UINTN) Buffer + 1)); + ASSERT (AllocationSize <= (MAX_ADDRESS - (UINTN)Buffer + 1)); Memory = AllocatePool (AllocationSize); if (Memory != NULL) { - Memory = CopyMem (Memory, Buffer, AllocationSize); + Memory = CopyMem (Memory, Buffer, AllocationSize); } + return Memory; } @@ -711,10 +718,11 @@ InternalReallocatePool ( VOID *NewBuffer; NewBuffer = InternalAllocateZeroPool (PoolType, NewSize); - if (NewBuffer != NULL && OldBuffer != NULL) { + if ((NewBuffer != NULL) && (OldBuffer != NULL)) { CopyMem (NewBuffer, OldBuffer, MIN (OldSize, NewSize)); FreePool (OldBuffer); } + return NewBuffer; } @@ -831,12 +839,10 @@ ReallocateReservedPool ( VOID EFIAPI FreePool ( - IN VOID *Buffer + IN VOID *Buffer ) { // // PEI phase does not support to free pool, so leave it as NOP. // } - - diff --git a/MdePkg/Library/PeiMemoryLib/CompareMemWrapper.c b/MdePkg/Library/PeiMemoryLib/CompareMemWrapper.c index 6c539a6..5b65a1d 100644 --- a/MdePkg/Library/PeiMemoryLib/CompareMemWrapper.c +++ b/MdePkg/Library/PeiMemoryLib/CompareMemWrapper.c @@ -48,9 +48,10 @@ CompareMem ( IN UINTN Length ) { - if (Length == 0 || DestinationBuffer == SourceBuffer) { + if ((Length == 0) || (DestinationBuffer == SourceBuffer)) { return 0; } + ASSERT (DestinationBuffer != NULL); ASSERT (SourceBuffer != NULL); ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer)); diff --git a/MdePkg/Library/PeiMemoryLib/CopyMemWrapper.c b/MdePkg/Library/PeiMemoryLib/CopyMemWrapper.c index 438abf4..dc48904 100644 --- a/MdePkg/Library/PeiMemoryLib/CopyMemWrapper.c +++ b/MdePkg/Library/PeiMemoryLib/CopyMemWrapper.c @@ -47,11 +47,13 @@ CopyMem ( if (Length == 0) { return DestinationBuffer; } + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer)); ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)SourceBuffer)); if (DestinationBuffer == SourceBuffer) { return DestinationBuffer; } + return InternalMemCopyMem (DestinationBuffer, SourceBuffer, Length); } diff --git a/MdePkg/Library/PeiMemoryLib/MemLib.c b/MdePkg/Library/PeiMemoryLib/MemLib.c index 180c11b..2da7f15 100644 --- a/MdePkg/Library/PeiMemoryLib/MemLib.c +++ b/MdePkg/Library/PeiMemoryLib/MemLib.c @@ -23,14 +23,14 @@ VOID * EFIAPI InternalMemCopyMem ( - OUT VOID *Destination, - IN CONST VOID *Source, - IN UINTN Length + OUT VOID *Destination, + IN CONST VOID *Source, + IN UINTN Length ) { (*GetPeiServicesTablePointer ())->CopyMem ( Destination, - (VOID*)Source, + (VOID *)Source, Length ); return Destination; @@ -51,9 +51,9 @@ InternalMemCopyMem ( VOID * EFIAPI InternalMemSetMem ( - OUT VOID *Buffer, - IN UINTN Size, - IN UINT8 Value + OUT VOID *Buffer, + IN UINTN Size, + IN UINT8 Value ) { (*GetPeiServicesTablePointer ())->SetMem ( diff --git a/MdePkg/Library/PeiMemoryLib/MemLibGeneric.c b/MdePkg/Library/PeiMemoryLib/MemLibGeneric.c index f646850..8bc9321 100644 --- a/MdePkg/Library/PeiMemoryLib/MemLibGeneric.c +++ b/MdePkg/Library/PeiMemoryLib/MemLibGeneric.c @@ -26,14 +26,15 @@ VOID * EFIAPI InternalMemSetMem16 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT16 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT16 Value ) { - for (; Length != 0; Length--) { - ((UINT16*)Buffer)[Length - 1] = Value; + for ( ; Length != 0; Length--) { + ((UINT16 *)Buffer)[Length - 1] = Value; } + return Buffer; } @@ -50,14 +51,15 @@ InternalMemSetMem16 ( VOID * EFIAPI InternalMemSetMem32 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT32 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT32 Value ) { - for (; Length != 0; Length--) { - ((UINT32*)Buffer)[Length - 1] = Value; + for ( ; Length != 0; Length--) { + ((UINT32 *)Buffer)[Length - 1] = Value; } + return Buffer; } @@ -74,14 +76,15 @@ InternalMemSetMem32 ( VOID * EFIAPI InternalMemSetMem64 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT64 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT64 Value ) { - for (; Length != 0; Length--) { - ((UINT64*)Buffer)[Length - 1] = Value; + for ( ; Length != 0; Length--) { + ((UINT64 *)Buffer)[Length - 1] = Value; } + return Buffer; } @@ -97,8 +100,8 @@ InternalMemSetMem64 ( VOID * EFIAPI InternalMemZeroMem ( - OUT VOID *Buffer, - IN UINTN Length + OUT VOID *Buffer, + IN UINTN Length ) { return InternalMemSetMem (Buffer, Length, 0); @@ -120,17 +123,19 @@ InternalMemZeroMem ( INTN EFIAPI InternalMemCompareMem ( - IN CONST VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length + IN CONST VOID *DestinationBuffer, + IN CONST VOID *SourceBuffer, + IN UINTN Length ) { while ((--Length != 0) && - (*(INT8*)DestinationBuffer == *(INT8*)SourceBuffer)) { - DestinationBuffer = (INT8*)DestinationBuffer + 1; - SourceBuffer = (INT8*)SourceBuffer + 1; + (*(INT8 *)DestinationBuffer == *(INT8 *)SourceBuffer)) + { + DestinationBuffer = (INT8 *)DestinationBuffer + 1; + SourceBuffer = (INT8 *)SourceBuffer + 1; } - return (INTN)*(UINT8*)DestinationBuffer - (INTN)*(UINT8*)SourceBuffer; + + return (INTN)*(UINT8 *)DestinationBuffer - (INTN)*(UINT8 *)SourceBuffer; } /** @@ -147,19 +152,20 @@ InternalMemCompareMem ( CONST VOID * EFIAPI InternalMemScanMem8 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT8 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT8 Value ) { - CONST UINT8 *Pointer; + CONST UINT8 *Pointer; - Pointer = (CONST UINT8*)Buffer; + Pointer = (CONST UINT8 *)Buffer; do { if (*(Pointer++) == Value) { return --Pointer; } } while (--Length != 0); + return NULL; } @@ -177,19 +183,20 @@ InternalMemScanMem8 ( CONST VOID * EFIAPI InternalMemScanMem16 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT16 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT16 Value ) { - CONST UINT16 *Pointer; + CONST UINT16 *Pointer; - Pointer = (CONST UINT16*)Buffer; + Pointer = (CONST UINT16 *)Buffer; do { if (*(Pointer++) == Value) { return --Pointer; } } while (--Length != 0); + return NULL; } @@ -207,19 +214,20 @@ InternalMemScanMem16 ( CONST VOID * EFIAPI InternalMemScanMem32 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT32 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT32 Value ) { - CONST UINT32 *Pointer; + CONST UINT32 *Pointer; - Pointer = (CONST UINT32*)Buffer; + Pointer = (CONST UINT32 *)Buffer; do { if (*(Pointer++) == Value) { return --Pointer; } } while (--Length != 0); + return NULL; } @@ -237,19 +245,20 @@ InternalMemScanMem32 ( CONST VOID * EFIAPI InternalMemScanMem64 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT64 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT64 Value ) { - CONST UINT64 *Pointer; + CONST UINT64 *Pointer; - Pointer = (CONST UINT64*)Buffer; + Pointer = (CONST UINT64 *)Buffer; do { if (*(Pointer++) == Value) { return --Pointer; } } while (--Length != 0); + return NULL; } @@ -270,8 +279,8 @@ InternalMemIsZeroBuffer ( IN UINTN Length ) { - CONST UINT8 *BufferData; - UINTN Index; + CONST UINT8 *BufferData; + UINTN Index; BufferData = Buffer; for (Index = 0; Index < Length; Index++) { @@ -279,5 +288,6 @@ InternalMemIsZeroBuffer ( return FALSE; } } + return TRUE; } diff --git a/MdePkg/Library/PeiMemoryLib/MemLibGuid.c b/MdePkg/Library/PeiMemoryLib/MemLibGuid.c index 319487d..9ded5ca 100644 --- a/MdePkg/Library/PeiMemoryLib/MemLibGuid.c +++ b/MdePkg/Library/PeiMemoryLib/MemLibGuid.c @@ -42,12 +42,12 @@ CopyGuid ( ) { WriteUnaligned64 ( - (UINT64*)DestinationGuid, - ReadUnaligned64 ((CONST UINT64*)SourceGuid) + (UINT64 *)DestinationGuid, + ReadUnaligned64 ((CONST UINT64 *)SourceGuid) ); WriteUnaligned64 ( - (UINT64*)DestinationGuid + 1, - ReadUnaligned64 ((CONST UINT64*)SourceGuid + 1) + (UINT64 *)DestinationGuid + 1, + ReadUnaligned64 ((CONST UINT64 *)SourceGuid + 1) ); return DestinationGuid; } @@ -80,12 +80,12 @@ CompareGuid ( UINT64 HighPartOfGuid1; UINT64 HighPartOfGuid2; - LowPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1); - LowPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2); - HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1 + 1); - HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2 + 1); + LowPartOfGuid1 = ReadUnaligned64 ((CONST UINT64 *)Guid1); + LowPartOfGuid2 = ReadUnaligned64 ((CONST UINT64 *)Guid2); + HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64 *)Guid1 + 1); + HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64 *)Guid2 + 1); - return (BOOLEAN) (LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2); + return (BOOLEAN)(LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2); } /** @@ -118,20 +118,22 @@ ScanGuid ( IN CONST GUID *Guid ) { - CONST GUID *GuidPtr; + CONST GUID *GuidPtr; ASSERT (((UINTN)Buffer & (sizeof (Guid->Data1) - 1)) == 0); ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1)); ASSERT ((Length & (sizeof (*GuidPtr) - 1)) == 0); - GuidPtr = (GUID*)Buffer; + GuidPtr = (GUID *)Buffer; Buffer = GuidPtr + Length / sizeof (*GuidPtr); - while (GuidPtr < (CONST GUID*)Buffer) { + while (GuidPtr < (CONST GUID *)Buffer) { if (CompareGuid (GuidPtr, Guid)) { - return (VOID*)GuidPtr; + return (VOID *)GuidPtr; } + GuidPtr++; } + return NULL; } @@ -158,8 +160,8 @@ IsZeroGuid ( UINT64 LowPartOfGuid; UINT64 HighPartOfGuid; - LowPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid); - HighPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid + 1); + LowPartOfGuid = ReadUnaligned64 ((CONST UINT64 *)Guid); + HighPartOfGuid = ReadUnaligned64 ((CONST UINT64 *)Guid + 1); - return (BOOLEAN) (LowPartOfGuid == 0 && HighPartOfGuid == 0); + return (BOOLEAN)(LowPartOfGuid == 0 && HighPartOfGuid == 0); } diff --git a/MdePkg/Library/PeiMemoryLib/MemLibInternals.h b/MdePkg/Library/PeiMemoryLib/MemLibInternals.h index 43d555a..c5e1e4d 100644 --- a/MdePkg/Library/PeiMemoryLib/MemLibInternals.h +++ b/MdePkg/Library/PeiMemoryLib/MemLibInternals.h @@ -31,9 +31,9 @@ VOID * EFIAPI InternalMemCopyMem ( - OUT VOID *Destination, - IN CONST VOID *Source, - IN UINTN Length + OUT VOID *Destination, + IN CONST VOID *Source, + IN UINTN Length ); /** @@ -51,9 +51,9 @@ InternalMemCopyMem ( VOID * EFIAPI InternalMemSetMem ( - OUT VOID *Buffer, - IN UINTN Size, - IN UINT8 Value + OUT VOID *Buffer, + IN UINTN Size, + IN UINT8 Value ); /** @@ -69,9 +69,9 @@ InternalMemSetMem ( VOID * EFIAPI InternalMemSetMem16 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT16 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT16 Value ); /** @@ -87,9 +87,9 @@ InternalMemSetMem16 ( VOID * EFIAPI InternalMemSetMem32 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT32 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT32 Value ); /** @@ -105,9 +105,9 @@ InternalMemSetMem32 ( VOID * EFIAPI InternalMemSetMem64 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT64 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT64 Value ); /** @@ -122,8 +122,8 @@ InternalMemSetMem64 ( VOID * EFIAPI InternalMemZeroMem ( - OUT VOID *Buffer, - IN UINTN Length + OUT VOID *Buffer, + IN UINTN Length ); /** @@ -142,9 +142,9 @@ InternalMemZeroMem ( INTN EFIAPI InternalMemCompareMem ( - IN CONST VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length + IN CONST VOID *DestinationBuffer, + IN CONST VOID *SourceBuffer, + IN UINTN Length ); /** @@ -161,9 +161,9 @@ InternalMemCompareMem ( CONST VOID * EFIAPI InternalMemScanMem8 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT8 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT8 Value ); /** @@ -180,9 +180,9 @@ InternalMemScanMem8 ( CONST VOID * EFIAPI InternalMemScanMem16 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT16 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT16 Value ); /** @@ -199,9 +199,9 @@ InternalMemScanMem16 ( CONST VOID * EFIAPI InternalMemScanMem32 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT32 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT32 Value ); /** @@ -218,9 +218,9 @@ InternalMemScanMem32 ( CONST VOID * EFIAPI InternalMemScanMem64 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT64 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT64 Value ); /** diff --git a/MdePkg/Library/PeiMemoryLib/ScanMem16Wrapper.c b/MdePkg/Library/PeiMemoryLib/ScanMem16Wrapper.c index 8201313..7eeb1a4 100644 --- a/MdePkg/Library/PeiMemoryLib/ScanMem16Wrapper.c +++ b/MdePkg/Library/PeiMemoryLib/ScanMem16Wrapper.c @@ -57,5 +57,5 @@ ScanMem16 ( ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (Value) - 1)) == 0); - return (VOID*)InternalMemScanMem16 (Buffer, Length / sizeof (Value), Value); + return (VOID *)InternalMemScanMem16 (Buffer, Length / sizeof (Value), Value); } diff --git a/MdePkg/Library/PeiMemoryLib/ScanMem32Wrapper.c b/MdePkg/Library/PeiMemoryLib/ScanMem32Wrapper.c index 22c0c79..bdcee0e 100644 --- a/MdePkg/Library/PeiMemoryLib/ScanMem32Wrapper.c +++ b/MdePkg/Library/PeiMemoryLib/ScanMem32Wrapper.c @@ -56,5 +56,5 @@ ScanMem32 ( ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (Value) - 1)) == 0); - return (VOID*)InternalMemScanMem32 (Buffer, Length / sizeof (Value), Value); + return (VOID *)InternalMemScanMem32 (Buffer, Length / sizeof (Value), Value); } diff --git a/MdePkg/Library/PeiMemoryLib/ScanMem64Wrapper.c b/MdePkg/Library/PeiMemoryLib/ScanMem64Wrapper.c index a617d87..eb75390 100644 --- a/MdePkg/Library/PeiMemoryLib/ScanMem64Wrapper.c +++ b/MdePkg/Library/PeiMemoryLib/ScanMem64Wrapper.c @@ -57,5 +57,5 @@ ScanMem64 ( ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (Value) - 1)) == 0); - return (VOID*)InternalMemScanMem64 (Buffer, Length / sizeof (Value), Value); + return (VOID *)InternalMemScanMem64 (Buffer, Length / sizeof (Value), Value); } diff --git a/MdePkg/Library/PeiMemoryLib/ScanMem8Wrapper.c b/MdePkg/Library/PeiMemoryLib/ScanMem8Wrapper.c index f2bf7d6..aa0de64 100644 --- a/MdePkg/Library/PeiMemoryLib/ScanMem8Wrapper.c +++ b/MdePkg/Library/PeiMemoryLib/ScanMem8Wrapper.c @@ -49,10 +49,11 @@ ScanMem8 ( if (Length == 0) { return NULL; } + ASSERT (Buffer != NULL); ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); - return (VOID*)InternalMemScanMem8 (Buffer, Length, Value); + return (VOID *)InternalMemScanMem8 (Buffer, Length, Value); } /** @@ -90,4 +91,3 @@ ScanMemN ( return ScanMem32 (Buffer, Length, (UINT32)Value); } } - diff --git a/MdePkg/Library/PeiPcdLib/PeiPcdLib.c b/MdePkg/Library/PeiPcdLib/PeiPcdLib.c index 84edb9b..166d4a6 100644 --- a/MdePkg/Library/PeiPcdLib/PeiPcdLib.c +++ b/MdePkg/Library/PeiPcdLib/PeiPcdLib.c @@ -7,9 +7,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ - - - #include #include @@ -36,8 +33,8 @@ GetPcdPpiPointer ( VOID ) { - EFI_STATUS Status; - PCD_PPI *PcdPpi; + EFI_STATUS Status; + PCD_PPI *PcdPpi; Status = PeiServicesLocatePpi (&gPcdPpiGuid, 0, NULL, (VOID **)&PcdPpi); ASSERT_EFI_ERROR (Status); @@ -59,8 +56,8 @@ GetPiPcdPpiPointer ( VOID ) { - EFI_STATUS Status; - EFI_PEI_PCD_PPI *PiPcdPpi; + EFI_STATUS Status; + EFI_PEI_PCD_PPI *PiPcdPpi; Status = PeiServicesLocatePpi (&gEfiPeiPcdPpiGuid, 0, NULL, (VOID **)&PiPcdPpi); ASSERT_EFI_ERROR (Status); @@ -82,8 +79,8 @@ GetPcdInfoPpiPointer ( VOID ) { - EFI_STATUS Status; - GET_PCD_INFO_PPI *PcdInfoPpi; + EFI_STATUS Status; + GET_PCD_INFO_PPI *PcdInfoPpi; Status = PeiServicesLocatePpi (&gGetPcdInfoPpiGuid, 0, NULL, (VOID **)&PcdInfoPpi); ASSERT_EFI_ERROR (Status); @@ -128,16 +125,14 @@ GetPiPcdInfoPpiPointer ( UINTN EFIAPI LibPcdSetSku ( - IN UINTN SkuId + IN UINTN SkuId ) { - GetPiPcdPpiPointer()->SetSku (SkuId); + GetPiPcdPpiPointer ()->SetSku (SkuId); return SkuId; } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -151,14 +146,12 @@ LibPcdSetSku ( UINT8 EFIAPI LibPcdGet8 ( - IN UINTN TokenNumber + IN UINTN TokenNumber ) { return (GetPcdPpiPointer ())->Get8 (TokenNumber); } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -172,14 +165,12 @@ LibPcdGet8 ( UINT16 EFIAPI LibPcdGet16 ( - IN UINTN TokenNumber + IN UINTN TokenNumber ) { return (GetPcdPpiPointer ())->Get16 (TokenNumber); } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -193,14 +184,12 @@ LibPcdGet16 ( UINT32 EFIAPI LibPcdGet32 ( - IN UINTN TokenNumber + IN UINTN TokenNumber ) { return (GetPcdPpiPointer ())->Get32 (TokenNumber); } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -214,14 +203,12 @@ LibPcdGet32 ( UINT64 EFIAPI LibPcdGet64 ( - IN UINTN TokenNumber + IN UINTN TokenNumber ) { return (GetPcdPpiPointer ())->Get64 (TokenNumber); } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -235,14 +222,12 @@ LibPcdGet64 ( VOID * EFIAPI LibPcdGetPtr ( - IN UINTN TokenNumber + IN UINTN TokenNumber ) { return (GetPcdPpiPointer ())->GetPtr (TokenNumber); } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -256,14 +241,12 @@ LibPcdGetPtr ( BOOLEAN EFIAPI LibPcdGetBool ( - IN UINTN TokenNumber + IN UINTN TokenNumber ) { return (GetPcdPpiPointer ())->GetBool (TokenNumber); } - - /** This function provides a means by which to retrieve the size of a given PCD token. @@ -275,14 +258,12 @@ LibPcdGetBool ( UINTN EFIAPI LibPcdGetSize ( - IN UINTN TokenNumber + IN UINTN TokenNumber ) { return (GetPcdPpiPointer ())->GetSize (TokenNumber); } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -300,8 +281,8 @@ LibPcdGetSize ( UINT8 EFIAPI LibPcdGetEx8 ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ) { ASSERT (Guid != NULL); @@ -309,8 +290,6 @@ LibPcdGetEx8 ( return (GetPiPcdPpiPointer ())->Get8 (Guid, TokenNumber); } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -328,18 +307,15 @@ LibPcdGetEx8 ( UINT16 EFIAPI LibPcdGetEx16 ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ) { - ASSERT (Guid != NULL); return (GetPiPcdPpiPointer ())->Get16 (Guid, TokenNumber); } - - /** Returns the 32-bit value for the token specified by TokenNumber and Guid. If Guid is NULL, then ASSERT(). @@ -354,8 +330,8 @@ LibPcdGetEx16 ( UINT32 EFIAPI LibPcdGetEx32 ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ) { ASSERT (Guid != NULL); @@ -363,9 +339,6 @@ LibPcdGetEx32 ( return (GetPiPcdPpiPointer ())->Get32 (Guid, TokenNumber); } - - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -383,16 +356,14 @@ LibPcdGetEx32 ( UINT64 EFIAPI LibPcdGetEx64 ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ) { ASSERT (Guid != NULL); return (GetPiPcdPpiPointer ())->Get64 (Guid, TokenNumber); } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -410,8 +381,8 @@ LibPcdGetEx64 ( VOID * EFIAPI LibPcdGetExPtr ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ) { ASSERT (Guid != NULL); @@ -419,8 +390,6 @@ LibPcdGetExPtr ( return (GetPiPcdPpiPointer ())->GetPtr (Guid, TokenNumber); } - - /** This function provides a means by which to retrieve a value for a given PCD token. @@ -438,16 +407,14 @@ LibPcdGetExPtr ( BOOLEAN EFIAPI LibPcdGetExBool ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ) { ASSERT (Guid != NULL); return (GetPiPcdPpiPointer ())->GetBool (Guid, TokenNumber); } - - /** This function provides a means by which to retrieve the size of a given PCD token. @@ -465,15 +432,14 @@ LibPcdGetExBool ( UINTN EFIAPI LibPcdGetExSize ( - IN CONST GUID *Guid, - IN UINTN TokenNumber + IN CONST GUID *Guid, + IN UINTN TokenNumber ) { ASSERT (Guid != NULL); return (GetPiPcdPpiPointer ())->GetSize (Guid, TokenNumber); } - /** This function provides a means by which to set a value for a given PCD token. @@ -489,8 +455,8 @@ LibPcdGetExSize ( RETURN_STATUS EFIAPI LibPcdSet8S ( - IN UINTN TokenNumber, - IN UINT8 Value + IN UINTN TokenNumber, + IN UINT8 Value ) { return (GetPcdPpiPointer ())->Set8 (TokenNumber, Value); @@ -511,8 +477,8 @@ LibPcdSet8S ( RETURN_STATUS EFIAPI LibPcdSet16S ( - IN UINTN TokenNumber, - IN UINT16 Value + IN UINTN TokenNumber, + IN UINT16 Value ) { return (GetPcdPpiPointer ())->Set16 (TokenNumber, Value); @@ -533,8 +499,8 @@ LibPcdSet16S ( RETURN_STATUS EFIAPI LibPcdSet32S ( - IN UINTN TokenNumber, - IN UINT32 Value + IN UINTN TokenNumber, + IN UINT32 Value ) { return (GetPcdPpiPointer ())->Set32 (TokenNumber, Value); @@ -555,8 +521,8 @@ LibPcdSet32S ( RETURN_STATUS EFIAPI LibPcdSet64S ( - IN UINTN TokenNumber, - IN UINT64 Value + IN UINTN TokenNumber, + IN UINT64 Value ) { return (GetPcdPpiPointer ())->Set64 (TokenNumber, Value); @@ -587,9 +553,9 @@ LibPcdSet64S ( RETURN_STATUS EFIAPI LibPcdSetPtrS ( - IN UINTN TokenNumber, - IN OUT UINTN *SizeOfBuffer, - IN CONST VOID *Buffer + IN UINTN TokenNumber, + IN OUT UINTN *SizeOfBuffer, + IN CONST VOID *Buffer ) { ASSERT (SizeOfBuffer != NULL); @@ -598,7 +564,7 @@ LibPcdSetPtrS ( ASSERT (Buffer != NULL); } - return (GetPcdPpiPointer ())->SetPtr (TokenNumber, SizeOfBuffer, (VOID *) Buffer); + return (GetPcdPpiPointer ())->SetPtr (TokenNumber, SizeOfBuffer, (VOID *)Buffer); } /** @@ -616,8 +582,8 @@ LibPcdSetPtrS ( RETURN_STATUS EFIAPI LibPcdSetBoolS ( - IN UINTN TokenNumber, - IN BOOLEAN Value + IN UINTN TokenNumber, + IN BOOLEAN Value ) { return (GetPcdPpiPointer ())->SetBool (TokenNumber, Value); @@ -642,9 +608,9 @@ LibPcdSetBoolS ( RETURN_STATUS EFIAPI LibPcdSetEx8S ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - IN UINT8 Value + IN CONST GUID *Guid, + IN UINTN TokenNumber, + IN UINT8 Value ) { ASSERT (Guid != NULL); @@ -671,9 +637,9 @@ LibPcdSetEx8S ( RETURN_STATUS EFIAPI LibPcdSetEx16S ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - IN UINT16 Value + IN CONST GUID *Guid, + IN UINTN TokenNumber, + IN UINT16 Value ) { ASSERT (Guid != NULL); @@ -700,9 +666,9 @@ LibPcdSetEx16S ( RETURN_STATUS EFIAPI LibPcdSetEx32S ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - IN UINT32 Value + IN CONST GUID *Guid, + IN UINTN TokenNumber, + IN UINT32 Value ) { ASSERT (Guid != NULL); @@ -729,9 +695,9 @@ LibPcdSetEx32S ( RETURN_STATUS EFIAPI LibPcdSetEx64S ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - IN UINT64 Value + IN CONST GUID *Guid, + IN UINTN TokenNumber, + IN UINT64 Value ) { ASSERT (Guid != NULL); @@ -764,10 +730,10 @@ LibPcdSetEx64S ( RETURN_STATUS EFIAPI LibPcdSetExPtrS ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - IN OUT UINTN *SizeOfBuffer, - IN VOID *Buffer + IN CONST GUID *Guid, + IN UINTN TokenNumber, + IN OUT UINTN *SizeOfBuffer, + IN VOID *Buffer ) { ASSERT (Guid != NULL); @@ -800,9 +766,9 @@ LibPcdSetExPtrS ( RETURN_STATUS EFIAPI LibPcdSetExBoolS ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - IN BOOLEAN Value + IN CONST GUID *Guid, + IN UINTN TokenNumber, + IN BOOLEAN Value ) { ASSERT (Guid != NULL); @@ -829,24 +795,22 @@ LibPcdSetExBoolS ( VOID EFIAPI LibPcdCallbackOnSet ( - IN CONST GUID *Guid OPTIONAL, - IN UINTN TokenNumber, - IN PCD_CALLBACK NotificationFunction + IN CONST GUID *Guid OPTIONAL, + IN UINTN TokenNumber, + IN PCD_CALLBACK NotificationFunction ) { - EFI_STATUS Status; + EFI_STATUS Status; ASSERT (NotificationFunction != NULL); - Status = (GetPiPcdPpiPointer ())->CallbackOnSet (Guid, TokenNumber, (EFI_PEI_PCD_PPI_CALLBACK) NotificationFunction); + Status = (GetPiPcdPpiPointer ())->CallbackOnSet (Guid, TokenNumber, (EFI_PEI_PCD_PPI_CALLBACK)NotificationFunction); ASSERT_EFI_ERROR (Status); return; } - - /** Disable a notification function that was established with LibPcdCallbackonSet(). @@ -863,24 +827,22 @@ LibPcdCallbackOnSet ( VOID EFIAPI LibPcdCancelCallback ( - IN CONST GUID *Guid OPTIONAL, - IN UINTN TokenNumber, - IN PCD_CALLBACK NotificationFunction + IN CONST GUID *Guid OPTIONAL, + IN UINTN TokenNumber, + IN PCD_CALLBACK NotificationFunction ) { - EFI_STATUS Status; + EFI_STATUS Status; ASSERT (NotificationFunction != NULL); - Status = (GetPiPcdPpiPointer ())->CancelCallback (Guid, TokenNumber, (EFI_PEI_PCD_PPI_CALLBACK) NotificationFunction); + Status = (GetPiPcdPpiPointer ())->CancelCallback (Guid, TokenNumber, (EFI_PEI_PCD_PPI_CALLBACK)NotificationFunction); ASSERT_EFI_ERROR (Status); return; } - - /** Retrieves the next token in a token space. @@ -903,11 +865,11 @@ LibPcdCancelCallback ( UINTN EFIAPI LibPcdGetNextToken ( - IN CONST GUID *Guid OPTIONAL, - IN UINTN TokenNumber + IN CONST GUID *Guid OPTIONAL, + IN UINTN TokenNumber ) { - EFI_STATUS Status; + EFI_STATUS Status; Status = (GetPiPcdPpiPointer ())->GetNextToken (Guid, &TokenNumber); ASSERT (!EFI_ERROR (Status) || TokenNumber == 0); @@ -915,7 +877,6 @@ LibPcdGetNextToken ( return TokenNumber; } - /** Used to retrieve the list of available PCD token space GUIDs. @@ -937,11 +898,9 @@ LibPcdGetNextTokenSpace ( { (GetPiPcdPpiPointer ())->GetNextTokenSpace (&TokenSpaceGuid); - return (GUID *) TokenSpaceGuid; + return (GUID *)TokenSpaceGuid; } - - /** Sets a value of a patchable PCD entry that is type pointer. @@ -968,10 +927,10 @@ LibPcdGetNextTokenSpace ( VOID * EFIAPI LibPatchPcdSetPtr ( - OUT VOID *PatchVariable, - IN UINTN MaximumDatumSize, - IN OUT UINTN *SizeOfBuffer, - IN CONST VOID *Buffer + OUT VOID *PatchVariable, + IN UINTN MaximumDatumSize, + IN OUT UINTN *SizeOfBuffer, + IN CONST VOID *Buffer ) { ASSERT (PatchVariable != NULL); @@ -982,14 +941,15 @@ LibPatchPcdSetPtr ( } if ((*SizeOfBuffer > MaximumDatumSize) || - (*SizeOfBuffer == MAX_ADDRESS)) { + (*SizeOfBuffer == MAX_ADDRESS)) + { *SizeOfBuffer = MaximumDatumSize; return NULL; } CopyMem (PatchVariable, Buffer, *SizeOfBuffer); - return (VOID *) Buffer; + return (VOID *)Buffer; } /** @@ -1018,10 +978,10 @@ LibPatchPcdSetPtr ( RETURN_STATUS EFIAPI LibPatchPcdSetPtrS ( - OUT VOID *PatchVariable, - IN UINTN MaximumDatumSize, - IN OUT UINTN *SizeOfBuffer, - IN CONST VOID *Buffer + OUT VOID *PatchVariable, + IN UINTN MaximumDatumSize, + IN OUT UINTN *SizeOfBuffer, + IN CONST VOID *Buffer ) { ASSERT (PatchVariable != NULL); @@ -1032,7 +992,8 @@ LibPatchPcdSetPtrS ( } if ((*SizeOfBuffer > MaximumDatumSize) || - (*SizeOfBuffer == MAX_ADDRESS)) { + (*SizeOfBuffer == MAX_ADDRESS)) + { *SizeOfBuffer = MaximumDatumSize; return RETURN_INVALID_PARAMETER; } @@ -1042,7 +1003,6 @@ LibPatchPcdSetPtrS ( return RETURN_SUCCESS; } - /** Sets a value and size of a patchable PCD entry that is type pointer. @@ -1071,11 +1031,11 @@ LibPatchPcdSetPtrS ( VOID * EFIAPI LibPatchPcdSetPtrAndSize ( - OUT VOID *PatchVariable, - OUT UINTN *SizeOfPatchVariable, - IN UINTN MaximumDatumSize, - IN OUT UINTN *SizeOfBuffer, - IN CONST VOID *Buffer + OUT VOID *PatchVariable, + OUT UINTN *SizeOfPatchVariable, + IN UINTN MaximumDatumSize, + IN OUT UINTN *SizeOfBuffer, + IN CONST VOID *Buffer ) { ASSERT (PatchVariable != NULL); @@ -1087,7 +1047,8 @@ LibPatchPcdSetPtrAndSize ( } if ((*SizeOfBuffer > MaximumDatumSize) || - (*SizeOfBuffer == MAX_ADDRESS)) { + (*SizeOfBuffer == MAX_ADDRESS)) + { *SizeOfBuffer = MaximumDatumSize; return NULL; } @@ -1095,7 +1056,7 @@ LibPatchPcdSetPtrAndSize ( CopyMem (PatchVariable, Buffer, *SizeOfBuffer); *SizeOfPatchVariable = *SizeOfBuffer; - return (VOID *) Buffer; + return (VOID *)Buffer; } /** @@ -1126,11 +1087,11 @@ LibPatchPcdSetPtrAndSize ( RETURN_STATUS EFIAPI LibPatchPcdSetPtrAndSizeS ( - OUT VOID *PatchVariable, - OUT UINTN *SizeOfPatchVariable, - IN UINTN MaximumDatumSize, - IN OUT UINTN *SizeOfBuffer, - IN CONST VOID *Buffer + OUT VOID *PatchVariable, + OUT UINTN *SizeOfPatchVariable, + IN UINTN MaximumDatumSize, + IN OUT UINTN *SizeOfBuffer, + IN CONST VOID *Buffer ) { ASSERT (PatchVariable != NULL); @@ -1142,7 +1103,8 @@ LibPatchPcdSetPtrAndSizeS ( } if ((*SizeOfBuffer > MaximumDatumSize) || - (*SizeOfBuffer == MAX_ADDRESS)) { + (*SizeOfBuffer == MAX_ADDRESS)) + { *SizeOfBuffer = MaximumDatumSize; return RETURN_INVALID_PARAMETER; } @@ -1168,13 +1130,13 @@ LibPatchPcdSetPtrAndSizeS ( VOID EFIAPI LibPcdGetInfo ( - IN UINTN TokenNumber, - OUT PCD_INFO *PcdInfo + IN UINTN TokenNumber, + OUT PCD_INFO *PcdInfo ) { - EFI_STATUS Status; + EFI_STATUS Status; - Status = GetPcdInfoPpiPointer()->GetInfo (TokenNumber, (EFI_PCD_INFO *) PcdInfo); + Status = GetPcdInfoPpiPointer ()->GetInfo (TokenNumber, (EFI_PCD_INFO *)PcdInfo); ASSERT_EFI_ERROR (Status); } @@ -1194,14 +1156,14 @@ LibPcdGetInfo ( VOID EFIAPI LibPcdGetInfoEx ( - IN CONST GUID *Guid, - IN UINTN TokenNumber, - OUT PCD_INFO *PcdInfo + IN CONST GUID *Guid, + IN UINTN TokenNumber, + OUT PCD_INFO *PcdInfo ) { - EFI_STATUS Status; + EFI_STATUS Status; - Status = GetPiPcdInfoPpiPointer()->GetInfo (Guid, TokenNumber, (EFI_PCD_INFO *) PcdInfo); + Status = GetPiPcdInfoPpiPointer ()->GetInfo (Guid, TokenNumber, (EFI_PCD_INFO *)PcdInfo); ASSERT_EFI_ERROR (Status); } @@ -1218,5 +1180,5 @@ LibPcdGetSku ( VOID ) { - return GetPiPcdInfoPpiPointer()->GetSku (); + return GetPiPcdInfoPpiPointer ()->GetSku (); } diff --git a/MdePkg/Library/PeiPciLibPciCfg2/PciLib.c b/MdePkg/Library/PeiPciLibPciCfg2/PciLib.c index b9ed2d2..1882330 100644 --- a/MdePkg/Library/PeiPciLibPciCfg2/PciLib.c +++ b/MdePkg/Library/PeiPciLibPciCfg2/PciLib.c @@ -24,7 +24,7 @@ @param M Additional bits to assert to be zero. **/ -#define ASSERT_INVALID_PCI_ADDRESS(A,M) \ +#define ASSERT_INVALID_PCI_ADDRESS(A, M) \ ASSERT (((A) & (~0xfffffff | (M))) == 0) /** @@ -53,16 +53,16 @@ **/ UINT32 PeiPciLibPciCfg2ReadWorker ( - IN UINTN Address, - IN EFI_PEI_PCI_CFG_PPI_WIDTH Width + IN UINTN Address, + IN EFI_PEI_PCI_CFG_PPI_WIDTH Width ) { - EFI_STATUS Status; - UINT32 Data; - CONST EFI_PEI_PCI_CFG2_PPI *PciCfg2Ppi; - UINT64 PciCfg2Address; + EFI_STATUS Status; + UINT32 Data; + CONST EFI_PEI_PCI_CFG2_PPI *PciCfg2Ppi; + UINT64 PciCfg2Address; - Status = PeiServicesLocatePpi (&gEfiPciCfg2PpiGuid, 0, NULL, (VOID **) &PciCfg2Ppi); + Status = PeiServicesLocatePpi (&gEfiPciCfg2PpiGuid, 0, NULL, (VOID **)&PciCfg2Ppi); ASSERT_EFI_ERROR (Status); ASSERT (PciCfg2Ppi != NULL); @@ -96,16 +96,16 @@ PeiPciLibPciCfg2ReadWorker ( **/ UINT32 PeiPciLibPciCfg2WriteWorker ( - IN UINTN Address, - IN EFI_PEI_PCI_CFG_PPI_WIDTH Width, - IN UINT32 Data + IN UINTN Address, + IN EFI_PEI_PCI_CFG_PPI_WIDTH Width, + IN UINT32 Data ) { - EFI_STATUS Status; - CONST EFI_PEI_PCI_CFG2_PPI *PciCfg2Ppi; - UINT64 PciCfg2Address; + EFI_STATUS Status; + CONST EFI_PEI_PCI_CFG2_PPI *PciCfg2Ppi; + UINT64 PciCfg2Address; - Status = PeiServicesLocatePpi (&gEfiPciCfg2PpiGuid, 0, NULL, (VOID **) &PciCfg2Ppi); + Status = PeiServicesLocatePpi (&gEfiPciCfg2PpiGuid, 0, NULL, (VOID **)&PciCfg2Ppi); ASSERT_EFI_ERROR (Status); ASSERT (PciCfg2Ppi != NULL); @@ -170,12 +170,12 @@ PciRegisterForRuntimeAccess ( UINT8 EFIAPI PciRead8 ( - IN UINTN Address + IN UINTN Address ) { ASSERT_INVALID_PCI_ADDRESS (Address, 0); - return (UINT8) PeiPciLibPciCfg2ReadWorker (Address, EfiPeiPciCfgWidthUint8); + return (UINT8)PeiPciLibPciCfg2ReadWorker (Address, EfiPeiPciCfgWidthUint8); } /** @@ -197,13 +197,13 @@ PciRead8 ( UINT8 EFIAPI PciWrite8 ( - IN UINTN Address, - IN UINT8 Value + IN UINTN Address, + IN UINT8 Value ) { ASSERT_INVALID_PCI_ADDRESS (Address, 0); - return (UINT8) PeiPciLibPciCfg2WriteWorker (Address, EfiPeiPciCfgWidthUint8, Value); + return (UINT8)PeiPciLibPciCfg2WriteWorker (Address, EfiPeiPciCfgWidthUint8, Value); } /** @@ -229,11 +229,11 @@ PciWrite8 ( UINT8 EFIAPI PciOr8 ( - IN UINTN Address, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 OrData ) { - return PciWrite8 (Address, (UINT8) (PciRead8 (Address) | OrData)); + return PciWrite8 (Address, (UINT8)(PciRead8 (Address) | OrData)); } /** @@ -259,11 +259,11 @@ PciOr8 ( UINT8 EFIAPI PciAnd8 ( - IN UINTN Address, - IN UINT8 AndData + IN UINTN Address, + IN UINT8 AndData ) { - return PciWrite8 (Address, (UINT8) (PciRead8 (Address) & AndData)); + return PciWrite8 (Address, (UINT8)(PciRead8 (Address) & AndData)); } /** @@ -291,12 +291,12 @@ PciAnd8 ( UINT8 EFIAPI PciAndThenOr8 ( - IN UINTN Address, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 AndData, + IN UINT8 OrData ) { - return PciWrite8 (Address, (UINT8) ((PciRead8 (Address) & AndData) | OrData)); + return PciWrite8 (Address, (UINT8)((PciRead8 (Address) & AndData) | OrData)); } /** @@ -323,9 +323,9 @@ PciAndThenOr8 ( UINT8 EFIAPI PciBitFieldRead8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead8 (PciRead8 (Address), StartBit, EndBit); @@ -358,10 +358,10 @@ PciBitFieldRead8 ( UINT8 EFIAPI PciBitFieldWrite8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) { return PciWrite8 ( @@ -400,10 +400,10 @@ PciBitFieldWrite8 ( UINT8 EFIAPI PciBitFieldOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) { return PciWrite8 ( @@ -442,10 +442,10 @@ PciBitFieldOr8 ( UINT8 EFIAPI PciBitFieldAnd8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ) { return PciWrite8 ( @@ -488,11 +488,11 @@ PciBitFieldAnd8 ( UINT8 EFIAPI PciBitFieldAndThenOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) { return PciWrite8 ( @@ -520,12 +520,12 @@ PciBitFieldAndThenOr8 ( UINT16 EFIAPI PciRead16 ( - IN UINTN Address + IN UINTN Address ) { ASSERT_INVALID_PCI_ADDRESS (Address, 1); - return (UINT16) PeiPciLibPciCfg2ReadWorker (Address, EfiPeiPciCfgWidthUint16); + return (UINT16)PeiPciLibPciCfg2ReadWorker (Address, EfiPeiPciCfgWidthUint16); } /** @@ -548,13 +548,13 @@ PciRead16 ( UINT16 EFIAPI PciWrite16 ( - IN UINTN Address, - IN UINT16 Value + IN UINTN Address, + IN UINT16 Value ) { ASSERT_INVALID_PCI_ADDRESS (Address, 1); - return (UINT16) PeiPciLibPciCfg2WriteWorker (Address, EfiPeiPciCfgWidthUint16, Value); + return (UINT16)PeiPciLibPciCfg2WriteWorker (Address, EfiPeiPciCfgWidthUint16, Value); } /** @@ -581,11 +581,11 @@ PciWrite16 ( UINT16 EFIAPI PciOr16 ( - IN UINTN Address, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 OrData ) { - return PciWrite16 (Address, (UINT16) (PciRead16 (Address) | OrData)); + return PciWrite16 (Address, (UINT16)(PciRead16 (Address) | OrData)); } /** @@ -612,11 +612,11 @@ PciOr16 ( UINT16 EFIAPI PciAnd16 ( - IN UINTN Address, - IN UINT16 AndData + IN UINTN Address, + IN UINT16 AndData ) { - return PciWrite16 (Address, (UINT16) (PciRead16 (Address) & AndData)); + return PciWrite16 (Address, (UINT16)(PciRead16 (Address) & AndData)); } /** @@ -645,12 +645,12 @@ PciAnd16 ( UINT16 EFIAPI PciAndThenOr16 ( - IN UINTN Address, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 AndData, + IN UINT16 OrData ) { - return PciWrite16 (Address, (UINT16) ((PciRead16 (Address) & AndData) | OrData)); + return PciWrite16 (Address, (UINT16)((PciRead16 (Address) & AndData) | OrData)); } /** @@ -678,9 +678,9 @@ PciAndThenOr16 ( UINT16 EFIAPI PciBitFieldRead16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead16 (PciRead16 (Address), StartBit, EndBit); @@ -714,10 +714,10 @@ PciBitFieldRead16 ( UINT16 EFIAPI PciBitFieldWrite16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ) { return PciWrite16 ( @@ -757,10 +757,10 @@ PciBitFieldWrite16 ( UINT16 EFIAPI PciBitFieldOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ) { return PciWrite16 ( @@ -800,10 +800,10 @@ PciBitFieldOr16 ( UINT16 EFIAPI PciBitFieldAnd16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ) { return PciWrite16 ( @@ -847,11 +847,11 @@ PciBitFieldAnd16 ( UINT16 EFIAPI PciBitFieldAndThenOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ) { return PciWrite16 ( @@ -879,7 +879,7 @@ PciBitFieldAndThenOr16 ( UINT32 EFIAPI PciRead32 ( - IN UINTN Address + IN UINTN Address ) { ASSERT_INVALID_PCI_ADDRESS (Address, 3); @@ -907,8 +907,8 @@ PciRead32 ( UINT32 EFIAPI PciWrite32 ( - IN UINTN Address, - IN UINT32 Value + IN UINTN Address, + IN UINT32 Value ) { ASSERT_INVALID_PCI_ADDRESS (Address, 3); @@ -940,8 +940,8 @@ PciWrite32 ( UINT32 EFIAPI PciOr32 ( - IN UINTN Address, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 OrData ) { return PciWrite32 (Address, PciRead32 (Address) | OrData); @@ -971,8 +971,8 @@ PciOr32 ( UINT32 EFIAPI PciAnd32 ( - IN UINTN Address, - IN UINT32 AndData + IN UINTN Address, + IN UINT32 AndData ) { return PciWrite32 (Address, PciRead32 (Address) & AndData); @@ -1004,9 +1004,9 @@ PciAnd32 ( UINT32 EFIAPI PciAndThenOr32 ( - IN UINTN Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 AndData, + IN UINT32 OrData ) { return PciWrite32 (Address, (PciRead32 (Address) & AndData) | OrData); @@ -1037,9 +1037,9 @@ PciAndThenOr32 ( UINT32 EFIAPI PciBitFieldRead32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead32 (PciRead32 (Address), StartBit, EndBit); @@ -1073,10 +1073,10 @@ PciBitFieldRead32 ( UINT32 EFIAPI PciBitFieldWrite32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { return PciWrite32 ( @@ -1116,10 +1116,10 @@ PciBitFieldWrite32 ( UINT32 EFIAPI PciBitFieldOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { return PciWrite32 ( @@ -1159,10 +1159,10 @@ PciBitFieldOr32 ( UINT32 EFIAPI PciBitFieldAnd32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { return PciWrite32 ( @@ -1206,11 +1206,11 @@ PciBitFieldAnd32 ( UINT32 EFIAPI PciBitFieldAndThenOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { return PciWrite32 ( @@ -1245,12 +1245,12 @@ PciBitFieldAndThenOr32 ( UINTN EFIAPI PciReadBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - OUT VOID *Buffer + IN UINTN StartAddress, + IN UINTN Size, + OUT VOID *Buffer ) { - UINTN ReturnValue; + UINTN ReturnValue; ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0); ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000); @@ -1271,19 +1271,19 @@ PciReadBuffer ( // Read a byte if StartAddress is byte aligned // *(volatile UINT8 *)Buffer = PciRead8 (StartAddress); - StartAddress += sizeof (UINT8); - Size -= sizeof (UINT8); - Buffer = (UINT8*)Buffer + 1; + StartAddress += sizeof (UINT8); + Size -= sizeof (UINT8); + Buffer = (UINT8 *)Buffer + 1; } - if (Size >= sizeof (UINT16) && (StartAddress & BIT1) != 0) { + if ((Size >= sizeof (UINT16)) && ((StartAddress & BIT1) != 0)) { // // Read a word if StartAddress is word aligned // WriteUnaligned16 (Buffer, PciRead16 (StartAddress)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } while (Size >= sizeof (UINT32)) { @@ -1292,8 +1292,8 @@ PciReadBuffer ( // WriteUnaligned32 (Buffer, PciRead32 (StartAddress)); StartAddress += sizeof (UINT32); - Size -= sizeof (UINT32); - Buffer = (UINT32*)Buffer + 1; + Size -= sizeof (UINT32); + Buffer = (UINT32 *)Buffer + 1; } if (Size >= sizeof (UINT16)) { @@ -1302,8 +1302,8 @@ PciReadBuffer ( // WriteUnaligned16 (Buffer, PciRead16 (StartAddress)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } if (Size >= sizeof (UINT8)) { @@ -1343,12 +1343,12 @@ PciReadBuffer ( UINTN EFIAPI PciWriteBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - IN VOID *Buffer + IN UINTN StartAddress, + IN UINTN Size, + IN VOID *Buffer ) { - UINTN ReturnValue; + UINTN ReturnValue; ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0); ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000); @@ -1368,20 +1368,20 @@ PciWriteBuffer ( // // Write a byte if StartAddress is byte aligned // - PciWrite8 (StartAddress, *(UINT8*)Buffer); + PciWrite8 (StartAddress, *(UINT8 *)Buffer); StartAddress += sizeof (UINT8); - Size -= sizeof (UINT8); - Buffer = (UINT8*)Buffer + 1; + Size -= sizeof (UINT8); + Buffer = (UINT8 *)Buffer + 1; } - if (Size >= sizeof (UINT16) && (StartAddress & BIT1) != 0) { + if ((Size >= sizeof (UINT16)) && ((StartAddress & BIT1) != 0)) { // // Write a word if StartAddress is word aligned // PciWrite16 (StartAddress, ReadUnaligned16 (Buffer)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } while (Size >= sizeof (UINT32)) { @@ -1390,8 +1390,8 @@ PciWriteBuffer ( // PciWrite32 (StartAddress, ReadUnaligned32 (Buffer)); StartAddress += sizeof (UINT32); - Size -= sizeof (UINT32); - Buffer = (UINT32*)Buffer + 1; + Size -= sizeof (UINT32); + Buffer = (UINT32 *)Buffer + 1; } if (Size >= sizeof (UINT16)) { @@ -1400,15 +1400,15 @@ PciWriteBuffer ( // PciWrite16 (StartAddress, ReadUnaligned16 (Buffer)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } if (Size >= sizeof (UINT8)) { // // Write the last remaining byte if exist // - PciWrite8 (StartAddress, *(UINT8*)Buffer); + PciWrite8 (StartAddress, *(UINT8 *)Buffer); } return ReturnValue; diff --git a/MdePkg/Library/PeiPciSegmentLibPciCfg2/PciSegmentLib.c b/MdePkg/Library/PeiPciSegmentLibPciCfg2/PciSegmentLib.c index 1128c91..80cddbe 100644 --- a/MdePkg/Library/PeiPciSegmentLibPciCfg2/PciSegmentLib.c +++ b/MdePkg/Library/PeiPciSegmentLibPciCfg2/PciSegmentLib.c @@ -24,7 +24,7 @@ @param M Additional bits to assert to be zero. **/ -#define ASSERT_INVALID_PCI_SEGMENT_ADDRESS(A,M) \ +#define ASSERT_INVALID_PCI_SEGMENT_ADDRESS(A, M) \ ASSERT (((A) & (0xffff0000f0000000ULL | (M))) == 0) /** @@ -50,13 +50,13 @@ **/ EFI_PEI_PCI_CFG2_PPI * InternalGetPciCfg2Ppi ( - IN UINT64 Address + IN UINT64 Address ) { - EFI_STATUS Status; - UINTN Instance; - EFI_PEI_PCI_CFG2_PPI *PciCfg2Ppi; - UINT64 SegmentNumber; + EFI_STATUS Status; + UINTN Instance; + EFI_PEI_PCI_CFG2_PPI *PciCfg2Ppi; + UINT64 SegmentNumber; Instance = 0; PciCfg2Ppi = NULL; @@ -66,11 +66,11 @@ InternalGetPciCfg2Ppi ( // Loop through all instances of the PPI and match segment number // do { - Status = PeiServicesLocatePpi( + Status = PeiServicesLocatePpi ( &gEfiPciCfg2PpiGuid, Instance, NULL, - (VOID**) &PciCfg2Ppi + (VOID **)&PciCfg2Ppi ); ASSERT_EFI_ERROR (Status); Instance++; @@ -95,15 +95,15 @@ InternalGetPciCfg2Ppi ( **/ UINT32 PeiPciSegmentLibPciCfg2ReadWorker ( - IN UINT64 Address, - IN EFI_PEI_PCI_CFG_PPI_WIDTH Width + IN UINT64 Address, + IN EFI_PEI_PCI_CFG_PPI_WIDTH Width ) { - UINT32 Data; - CONST EFI_PEI_PCI_CFG2_PPI *PciCfg2Ppi; - UINT64 PciCfg2Address; + UINT32 Data; + CONST EFI_PEI_PCI_CFG2_PPI *PciCfg2Ppi; + UINT64 PciCfg2Address; - PciCfg2Ppi = InternalGetPciCfg2Ppi (Address); + PciCfg2Ppi = InternalGetPciCfg2Ppi (Address); PciCfg2Address = PCI_TO_PCICFG2_ADDRESS (Address); PciCfg2Ppi->Read ( GetPeiServicesTablePointer (), @@ -134,15 +134,15 @@ PeiPciSegmentLibPciCfg2ReadWorker ( **/ UINT32 PeiPciSegmentLibPciCfg2WriteWorker ( - IN UINT64 Address, - IN EFI_PEI_PCI_CFG_PPI_WIDTH Width, - IN UINT32 Data + IN UINT64 Address, + IN EFI_PEI_PCI_CFG_PPI_WIDTH Width, + IN UINT32 Data ) { - CONST EFI_PEI_PCI_CFG2_PPI *PciCfg2Ppi; - UINT64 PciCfg2Address; + CONST EFI_PEI_PCI_CFG2_PPI *PciCfg2Ppi; + UINT64 PciCfg2Address; - PciCfg2Ppi = InternalGetPciCfg2Ppi (Address); + PciCfg2Ppi = InternalGetPciCfg2Ppi (Address); PciCfg2Address = PCI_TO_PCICFG2_ADDRESS (Address); PciCfg2Ppi->Write ( GetPeiServicesTablePointer (), @@ -199,12 +199,12 @@ PciSegmentRegisterForRuntimeAccess ( UINT8 EFIAPI PciSegmentRead8 ( - IN UINT64 Address + IN UINT64 Address ) { ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 0); - return (UINT8) PeiPciSegmentLibPciCfg2ReadWorker (Address, EfiPeiPciCfgWidthUint8); + return (UINT8)PeiPciSegmentLibPciCfg2ReadWorker (Address, EfiPeiPciCfgWidthUint8); } /** @@ -224,13 +224,13 @@ PciSegmentRead8 ( UINT8 EFIAPI PciSegmentWrite8 ( - IN UINT64 Address, - IN UINT8 Value + IN UINT64 Address, + IN UINT8 Value ) { ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 0); - return (UINT8) PeiPciSegmentLibPciCfg2WriteWorker (Address, EfiPeiPciCfgWidthUint8, Value); + return (UINT8)PeiPciSegmentLibPciCfg2WriteWorker (Address, EfiPeiPciCfgWidthUint8, Value); } /** @@ -253,11 +253,11 @@ PciSegmentWrite8 ( UINT8 EFIAPI PciSegmentOr8 ( - IN UINT64 Address, - IN UINT8 OrData + IN UINT64 Address, + IN UINT8 OrData ) { - return PciSegmentWrite8 (Address, (UINT8) (PciSegmentRead8 (Address) | OrData)); + return PciSegmentWrite8 (Address, (UINT8)(PciSegmentRead8 (Address) | OrData)); } /** @@ -279,11 +279,11 @@ PciSegmentOr8 ( UINT8 EFIAPI PciSegmentAnd8 ( - IN UINT64 Address, - IN UINT8 AndData + IN UINT64 Address, + IN UINT8 AndData ) { - return PciSegmentWrite8 (Address, (UINT8) (PciSegmentRead8 (Address) & AndData)); + return PciSegmentWrite8 (Address, (UINT8)(PciSegmentRead8 (Address) & AndData)); } /** @@ -309,12 +309,12 @@ PciSegmentAnd8 ( UINT8 EFIAPI PciSegmentAndThenOr8 ( - IN UINT64 Address, - IN UINT8 AndData, - IN UINT8 OrData + IN UINT64 Address, + IN UINT8 AndData, + IN UINT8 OrData ) { - return PciSegmentWrite8 (Address, (UINT8) ((PciSegmentRead8 (Address) & AndData) | OrData)); + return PciSegmentWrite8 (Address, (UINT8)((PciSegmentRead8 (Address) & AndData) | OrData)); } /** @@ -341,9 +341,9 @@ PciSegmentAndThenOr8 ( UINT8 EFIAPI PciSegmentBitFieldRead8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead8 (PciSegmentRead8 (Address), StartBit, EndBit); @@ -376,10 +376,10 @@ PciSegmentBitFieldRead8 ( UINT8 EFIAPI PciSegmentBitFieldWrite8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) { return PciSegmentWrite8 ( @@ -418,10 +418,10 @@ PciSegmentBitFieldWrite8 ( UINT8 EFIAPI PciSegmentBitFieldOr8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) { return PciSegmentWrite8 ( @@ -460,10 +460,10 @@ PciSegmentBitFieldOr8 ( UINT8 EFIAPI PciSegmentBitFieldAnd8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ) { return PciSegmentWrite8 ( @@ -505,11 +505,11 @@ PciSegmentBitFieldAnd8 ( UINT8 EFIAPI PciSegmentBitFieldAndThenOr8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) { return PciSegmentWrite8 ( @@ -535,12 +535,12 @@ PciSegmentBitFieldAndThenOr8 ( UINT16 EFIAPI PciSegmentRead16 ( - IN UINT64 Address + IN UINT64 Address ) { ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 1); - return (UINT16) PeiPciSegmentLibPciCfg2ReadWorker (Address, EfiPeiPciCfgWidthUint16); + return (UINT16)PeiPciSegmentLibPciCfg2ReadWorker (Address, EfiPeiPciCfgWidthUint16); } /** @@ -561,13 +561,13 @@ PciSegmentRead16 ( UINT16 EFIAPI PciSegmentWrite16 ( - IN UINT64 Address, - IN UINT16 Value + IN UINT64 Address, + IN UINT16 Value ) { ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 1); - return (UINT16) PeiPciSegmentLibPciCfg2WriteWorker (Address, EfiPeiPciCfgWidthUint16, Value); + return (UINT16)PeiPciSegmentLibPciCfg2WriteWorker (Address, EfiPeiPciCfgWidthUint16, Value); } /** @@ -593,11 +593,11 @@ PciSegmentWrite16 ( UINT16 EFIAPI PciSegmentOr16 ( - IN UINT64 Address, - IN UINT16 OrData + IN UINT64 Address, + IN UINT16 OrData ) { - return PciSegmentWrite16 (Address, (UINT16) (PciSegmentRead16 (Address) | OrData)); + return PciSegmentWrite16 (Address, (UINT16)(PciSegmentRead16 (Address) | OrData)); } /** @@ -621,11 +621,11 @@ PciSegmentOr16 ( UINT16 EFIAPI PciSegmentAnd16 ( - IN UINT64 Address, - IN UINT16 AndData + IN UINT64 Address, + IN UINT16 AndData ) { - return PciSegmentWrite16 (Address, (UINT16) (PciSegmentRead16 (Address) & AndData)); + return PciSegmentWrite16 (Address, (UINT16)(PciSegmentRead16 (Address) & AndData)); } /** @@ -652,12 +652,12 @@ PciSegmentAnd16 ( UINT16 EFIAPI PciSegmentAndThenOr16 ( - IN UINT64 Address, - IN UINT16 AndData, - IN UINT16 OrData + IN UINT64 Address, + IN UINT16 AndData, + IN UINT16 OrData ) { - return PciSegmentWrite16 (Address, (UINT16) ((PciSegmentRead16 (Address) & AndData) | OrData)); + return PciSegmentWrite16 (Address, (UINT16)((PciSegmentRead16 (Address) & AndData) | OrData)); } /** @@ -685,9 +685,9 @@ PciSegmentAndThenOr16 ( UINT16 EFIAPI PciSegmentBitFieldRead16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead16 (PciSegmentRead16 (Address), StartBit, EndBit); @@ -721,10 +721,10 @@ PciSegmentBitFieldRead16 ( UINT16 EFIAPI PciSegmentBitFieldWrite16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ) { return PciSegmentWrite16 ( @@ -764,10 +764,10 @@ PciSegmentBitFieldWrite16 ( UINT16 EFIAPI PciSegmentBitFieldOr16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ) { return PciSegmentWrite16 ( @@ -807,10 +807,10 @@ PciSegmentBitFieldOr16 ( UINT16 EFIAPI PciSegmentBitFieldAnd16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ) { return PciSegmentWrite16 ( @@ -853,11 +853,11 @@ PciSegmentBitFieldAnd16 ( UINT16 EFIAPI PciSegmentBitFieldAndThenOr16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ) { return PciSegmentWrite16 ( @@ -883,7 +883,7 @@ PciSegmentBitFieldAndThenOr16 ( UINT32 EFIAPI PciSegmentRead32 ( - IN UINT64 Address + IN UINT64 Address ) { ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 3); @@ -909,8 +909,8 @@ PciSegmentRead32 ( UINT32 EFIAPI PciSegmentWrite32 ( - IN UINT64 Address, - IN UINT32 Value + IN UINT64 Address, + IN UINT32 Value ) { ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 3); @@ -939,8 +939,8 @@ PciSegmentWrite32 ( UINT32 EFIAPI PciSegmentOr32 ( - IN UINT64 Address, - IN UINT32 OrData + IN UINT64 Address, + IN UINT32 OrData ) { return PciSegmentWrite32 (Address, PciSegmentRead32 (Address) | OrData); @@ -967,8 +967,8 @@ PciSegmentOr32 ( UINT32 EFIAPI PciSegmentAnd32 ( - IN UINT64 Address, - IN UINT32 AndData + IN UINT64 Address, + IN UINT32 AndData ) { return PciSegmentWrite32 (Address, PciSegmentRead32 (Address) & AndData); @@ -998,9 +998,9 @@ PciSegmentAnd32 ( UINT32 EFIAPI PciSegmentAndThenOr32 ( - IN UINT64 Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINT64 Address, + IN UINT32 AndData, + IN UINT32 OrData ) { return PciSegmentWrite32 (Address, (PciSegmentRead32 (Address) & AndData) | OrData); @@ -1031,9 +1031,9 @@ PciSegmentAndThenOr32 ( UINT32 EFIAPI PciSegmentBitFieldRead32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead32 (PciSegmentRead32 (Address), StartBit, EndBit); @@ -1067,10 +1067,10 @@ PciSegmentBitFieldRead32 ( UINT32 EFIAPI PciSegmentBitFieldWrite32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { return PciSegmentWrite32 ( @@ -1109,10 +1109,10 @@ PciSegmentBitFieldWrite32 ( UINT32 EFIAPI PciSegmentBitFieldOr32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { return PciSegmentWrite32 ( @@ -1151,10 +1151,10 @@ PciSegmentBitFieldOr32 ( UINT32 EFIAPI PciSegmentBitFieldAnd32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { return PciSegmentWrite32 ( @@ -1197,11 +1197,11 @@ PciSegmentBitFieldAnd32 ( UINT32 EFIAPI PciSegmentBitFieldAndThenOr32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { return PciSegmentWrite32 ( @@ -1236,12 +1236,12 @@ PciSegmentBitFieldAndThenOr32 ( UINTN EFIAPI PciSegmentReadBuffer ( - IN UINT64 StartAddress, - IN UINTN Size, - OUT VOID *Buffer + IN UINT64 StartAddress, + IN UINTN Size, + OUT VOID *Buffer ) { - UINTN ReturnValue; + UINTN ReturnValue; ASSERT_INVALID_PCI_SEGMENT_ADDRESS (StartAddress, 0); ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000); @@ -1262,19 +1262,19 @@ PciSegmentReadBuffer ( // Read a byte if StartAddress is byte aligned // *(volatile UINT8 *)Buffer = PciSegmentRead8 (StartAddress); - StartAddress += sizeof (UINT8); - Size -= sizeof (UINT8); - Buffer = (UINT8*)Buffer + 1; + StartAddress += sizeof (UINT8); + Size -= sizeof (UINT8); + Buffer = (UINT8 *)Buffer + 1; } - if (Size >= sizeof (UINT16) && (StartAddress & BIT1) != 0) { + if ((Size >= sizeof (UINT16)) && ((StartAddress & BIT1) != 0)) { // // Read a word if StartAddress is word aligned // WriteUnaligned16 (Buffer, PciSegmentRead16 (StartAddress)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } while (Size >= sizeof (UINT32)) { @@ -1283,8 +1283,8 @@ PciSegmentReadBuffer ( // WriteUnaligned32 (Buffer, PciSegmentRead32 (StartAddress)); StartAddress += sizeof (UINT32); - Size -= sizeof (UINT32); - Buffer = (UINT32*)Buffer + 1; + Size -= sizeof (UINT32); + Buffer = (UINT32 *)Buffer + 1; } if (Size >= sizeof (UINT16)) { @@ -1293,8 +1293,8 @@ PciSegmentReadBuffer ( // WriteUnaligned16 (Buffer, PciSegmentRead16 (StartAddress)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } if (Size >= sizeof (UINT8)) { @@ -1307,7 +1307,6 @@ PciSegmentReadBuffer ( return ReturnValue; } - /** Copies the data in a caller supplied buffer to a specified range of PCI configuration space. @@ -1335,12 +1334,12 @@ PciSegmentReadBuffer ( UINTN EFIAPI PciSegmentWriteBuffer ( - IN UINT64 StartAddress, - IN UINTN Size, - IN VOID *Buffer + IN UINT64 StartAddress, + IN UINTN Size, + IN VOID *Buffer ) { - UINTN ReturnValue; + UINTN ReturnValue; ASSERT_INVALID_PCI_SEGMENT_ADDRESS (StartAddress, 0); ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000); @@ -1360,20 +1359,20 @@ PciSegmentWriteBuffer ( // // Write a byte if StartAddress is byte aligned // - PciSegmentWrite8 (StartAddress, *(UINT8*)Buffer); + PciSegmentWrite8 (StartAddress, *(UINT8 *)Buffer); StartAddress += sizeof (UINT8); - Size -= sizeof (UINT8); - Buffer = (UINT8*)Buffer + 1; + Size -= sizeof (UINT8); + Buffer = (UINT8 *)Buffer + 1; } - if (Size >= sizeof (UINT16) && (StartAddress & BIT1) != 0) { + if ((Size >= sizeof (UINT16)) && ((StartAddress & BIT1) != 0)) { // // Write a word if StartAddress is word aligned // PciSegmentWrite16 (StartAddress, ReadUnaligned16 (Buffer)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } while (Size >= sizeof (UINT32)) { @@ -1382,8 +1381,8 @@ PciSegmentWriteBuffer ( // PciSegmentWrite32 (StartAddress, ReadUnaligned32 (Buffer)); StartAddress += sizeof (UINT32); - Size -= sizeof (UINT32); - Buffer = (UINT32*)Buffer + 1; + Size -= sizeof (UINT32); + Buffer = (UINT32 *)Buffer + 1; } if (Size >= sizeof (UINT16)) { @@ -1392,15 +1391,15 @@ PciSegmentWriteBuffer ( // PciSegmentWrite16 (StartAddress, ReadUnaligned16 (Buffer)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } if (Size >= sizeof (UINT8)) { // // Write the last remaining byte if exist // - PciSegmentWrite8 (StartAddress, *(UINT8*)Buffer); + PciSegmentWrite8 (StartAddress, *(UINT8 *)Buffer); } return ReturnValue; diff --git a/MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.c b/MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.c index d283358..1a3abd8 100644 --- a/MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.c +++ b/MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.c @@ -6,16 +6,12 @@ **/ - - #include - #include #include #include - /** Declares the presence of permanent system memory in the platform. @@ -36,17 +32,16 @@ RETURN_STATUS EFIAPI PublishSystemMemory ( - IN PHYSICAL_ADDRESS MemoryBegin, - IN UINT64 MemoryLength + IN PHYSICAL_ADDRESS MemoryBegin, + IN UINT64 MemoryLength ) { - EFI_STATUS Status; + EFI_STATUS Status; ASSERT (MemoryLength > 0); ASSERT (MemoryLength <= (MAX_ADDRESS - MemoryBegin + 1)); - Status = PeiServicesInstallPeiMemory (MemoryBegin, MemoryLength); + Status = PeiServicesInstallPeiMemory (MemoryBegin, MemoryLength); - return (RETURN_STATUS) Status; + return (RETURN_STATUS)Status; } - diff --git a/MdePkg/Library/PeiServicesLib/PeiServicesLib.c b/MdePkg/Library/PeiServicesLib/PeiServicesLib.c index dce404f..98cc69c 100644 --- a/MdePkg/Library/PeiServicesLib/PeiServicesLib.c +++ b/MdePkg/Library/PeiServicesLib/PeiServicesLib.c @@ -6,7 +6,6 @@ **/ - #include #include @@ -34,7 +33,7 @@ EFI_STATUS EFIAPI PeiServicesInstallPpi ( - IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList + IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList ) { CONST EFI_PEI_SERVICES **PeiServices; @@ -61,11 +60,11 @@ PeiServicesInstallPpi ( EFI_STATUS EFIAPI PeiServicesReInstallPpi ( - IN CONST EFI_PEI_PPI_DESCRIPTOR *OldPpi, - IN CONST EFI_PEI_PPI_DESCRIPTOR *NewPpi + IN CONST EFI_PEI_PPI_DESCRIPTOR *OldPpi, + IN CONST EFI_PEI_PPI_DESCRIPTOR *NewPpi ) { - CONST EFI_PEI_SERVICES **PeiServices; + CONST EFI_PEI_SERVICES **PeiServices; PeiServices = GetPeiServicesTablePointer (); return (*PeiServices)->ReInstallPpi (PeiServices, OldPpi, NewPpi); @@ -87,13 +86,13 @@ PeiServicesReInstallPpi ( EFI_STATUS EFIAPI PeiServicesLocatePpi ( - IN CONST EFI_GUID *Guid, - IN UINTN Instance, - IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor OPTIONAL, - IN OUT VOID **Ppi + IN CONST EFI_GUID *Guid, + IN UINTN Instance, + IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor OPTIONAL, + IN OUT VOID **Ppi ) { - CONST EFI_PEI_SERVICES **PeiServices; + CONST EFI_PEI_SERVICES **PeiServices; PeiServices = GetPeiServicesTablePointer (); return (*PeiServices)->LocatePpi (PeiServices, Guid, Instance, PpiDescriptor, Ppi); @@ -120,7 +119,7 @@ PeiServicesNotifyPpi ( IN CONST EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList ) { - CONST EFI_PEI_SERVICES **PeiServices; + CONST EFI_PEI_SERVICES **PeiServices; PeiServices = GetPeiServicesTablePointer (); return (*PeiServices)->NotifyPpi (PeiServices, NotifyList); @@ -138,10 +137,10 @@ PeiServicesNotifyPpi ( EFI_STATUS EFIAPI PeiServicesGetBootMode ( - OUT EFI_BOOT_MODE *BootMode + OUT EFI_BOOT_MODE *BootMode ) { - CONST EFI_PEI_SERVICES **PeiServices; + CONST EFI_PEI_SERVICES **PeiServices; PeiServices = GetPeiServicesTablePointer (); return (*PeiServices)->GetBootMode (PeiServices, BootMode); @@ -158,10 +157,10 @@ PeiServicesGetBootMode ( EFI_STATUS EFIAPI PeiServicesSetBootMode ( - IN EFI_BOOT_MODE BootMode + IN EFI_BOOT_MODE BootMode ) { - CONST EFI_PEI_SERVICES **PeiServices; + CONST EFI_PEI_SERVICES **PeiServices; PeiServices = GetPeiServicesTablePointer (); return (*PeiServices)->SetBootMode (PeiServices, BootMode); @@ -180,10 +179,10 @@ PeiServicesSetBootMode ( EFI_STATUS EFIAPI PeiServicesGetHobList ( - OUT VOID **HobList + OUT VOID **HobList ) { - CONST EFI_PEI_SERVICES **PeiServices; + CONST EFI_PEI_SERVICES **PeiServices; PeiServices = GetPeiServicesTablePointer (); return (*PeiServices)->GetHobList (PeiServices, HobList); @@ -204,12 +203,12 @@ PeiServicesGetHobList ( EFI_STATUS EFIAPI PeiServicesCreateHob ( - IN UINT16 Type, - IN UINT16 Length, - OUT VOID **Hob + IN UINT16 Type, + IN UINT16 Length, + OUT VOID **Hob ) { - CONST EFI_PEI_SERVICES **PeiServices; + CONST EFI_PEI_SERVICES **PeiServices; PeiServices = GetPeiServicesTablePointer (); return (*PeiServices)->CreateHob (PeiServices, Type, Length, Hob); @@ -231,11 +230,11 @@ PeiServicesCreateHob ( EFI_STATUS EFIAPI PeiServicesFfsFindNextVolume ( - IN UINTN Instance, - IN OUT EFI_PEI_FV_HANDLE *VolumeHandle + IN UINTN Instance, + IN OUT EFI_PEI_FV_HANDLE *VolumeHandle ) { - CONST EFI_PEI_SERVICES **PeiServices; + CONST EFI_PEI_SERVICES **PeiServices; PeiServices = GetPeiServicesTablePointer (); return (*PeiServices)->FfsFindNextVolume (PeiServices, Instance, VolumeHandle); @@ -258,12 +257,12 @@ PeiServicesFfsFindNextVolume ( EFI_STATUS EFIAPI PeiServicesFfsFindNextFile ( - IN EFI_FV_FILETYPE SearchType, - IN EFI_PEI_FV_HANDLE VolumeHandle, - IN OUT EFI_PEI_FILE_HANDLE *FileHandle + IN EFI_FV_FILETYPE SearchType, + IN EFI_PEI_FV_HANDLE VolumeHandle, + IN OUT EFI_PEI_FILE_HANDLE *FileHandle ) { - CONST EFI_PEI_SERVICES **PeiServices; + CONST EFI_PEI_SERVICES **PeiServices; PeiServices = GetPeiServicesTablePointer (); return (*PeiServices)->FfsFindNextFile (PeiServices, SearchType, VolumeHandle, FileHandle); @@ -284,12 +283,12 @@ PeiServicesFfsFindNextFile ( EFI_STATUS EFIAPI PeiServicesFfsFindSectionData ( - IN EFI_SECTION_TYPE SectionType, - IN EFI_PEI_FILE_HANDLE FileHandle, - OUT VOID **SectionData + IN EFI_SECTION_TYPE SectionType, + IN EFI_PEI_FILE_HANDLE FileHandle, + OUT VOID **SectionData ) { - CONST EFI_PEI_SERVICES **PeiServices; + CONST EFI_PEI_SERVICES **PeiServices; PeiServices = GetPeiServicesTablePointer (); return (*PeiServices)->FfsFindSectionData (PeiServices, SectionType, FileHandle, SectionData); @@ -312,14 +311,14 @@ PeiServicesFfsFindSectionData ( EFI_STATUS EFIAPI PeiServicesFfsFindSectionData3 ( - IN EFI_SECTION_TYPE SectionType, - IN UINTN SectionInstance, - IN EFI_PEI_FILE_HANDLE FileHandle, - OUT VOID **SectionData, - OUT UINT32 *AuthenticationStatus + IN EFI_SECTION_TYPE SectionType, + IN UINTN SectionInstance, + IN EFI_PEI_FILE_HANDLE FileHandle, + OUT VOID **SectionData, + OUT UINT32 *AuthenticationStatus ) { - CONST EFI_PEI_SERVICES **PeiServices; + CONST EFI_PEI_SERVICES **PeiServices; PeiServices = GetPeiServicesTablePointer (); return (*PeiServices)->FindSectionData3 (PeiServices, SectionType, SectionInstance, FileHandle, SectionData, AuthenticationStatus); @@ -340,11 +339,11 @@ PeiServicesFfsFindSectionData3 ( EFI_STATUS EFIAPI PeiServicesInstallPeiMemory ( - IN EFI_PHYSICAL_ADDRESS MemoryBegin, - IN UINT64 MemoryLength + IN EFI_PHYSICAL_ADDRESS MemoryBegin, + IN UINT64 MemoryLength ) { - CONST EFI_PEI_SERVICES **PeiServices; + CONST EFI_PEI_SERVICES **PeiServices; PeiServices = GetPeiServicesTablePointer (); return (*PeiServices)->InstallPeiMemory (PeiServices, MemoryBegin, MemoryLength); @@ -367,12 +366,12 @@ PeiServicesInstallPeiMemory ( EFI_STATUS EFIAPI PeiServicesAllocatePages ( - IN EFI_MEMORY_TYPE MemoryType, - IN UINTN Pages, - OUT EFI_PHYSICAL_ADDRESS *Memory + IN EFI_MEMORY_TYPE MemoryType, + IN UINTN Pages, + OUT EFI_PHYSICAL_ADDRESS *Memory ) { - CONST EFI_PEI_SERVICES **PeiServices; + CONST EFI_PEI_SERVICES **PeiServices; PeiServices = GetPeiServicesTablePointer (); return (*PeiServices)->AllocatePages (PeiServices, MemoryType, Pages, Memory); @@ -393,11 +392,11 @@ PeiServicesAllocatePages ( EFI_STATUS EFIAPI PeiServicesFreePages ( - IN EFI_PHYSICAL_ADDRESS Memory, - IN UINTN Pages + IN EFI_PHYSICAL_ADDRESS Memory, + IN UINTN Pages ) { - CONST EFI_PEI_SERVICES **PeiServices; + CONST EFI_PEI_SERVICES **PeiServices; PeiServices = GetPeiServicesTablePointer (); return (*PeiServices)->FreePages (PeiServices, Memory, Pages); @@ -417,11 +416,11 @@ PeiServicesFreePages ( EFI_STATUS EFIAPI PeiServicesAllocatePool ( - IN UINTN Size, - OUT VOID **Buffer + IN UINTN Size, + OUT VOID **Buffer ) { - CONST EFI_PEI_SERVICES **PeiServices; + CONST EFI_PEI_SERVICES **PeiServices; PeiServices = GetPeiServicesTablePointer (); return (*PeiServices)->AllocatePool (PeiServices, Size, Buffer); @@ -440,7 +439,7 @@ PeiServicesResetSystem ( VOID ) { - CONST EFI_PEI_SERVICES **PeiServices; + CONST EFI_PEI_SERVICES **PeiServices; PeiServices = GetPeiServicesTablePointer (); return (*PeiServices)->ResetSystem (PeiServices); @@ -466,10 +465,10 @@ PeiServicesResetSystem ( EFI_STATUS EFIAPI PeiServicesRegisterForShadow ( - IN EFI_PEI_FILE_HANDLE FileHandle + IN EFI_PEI_FILE_HANDLE FileHandle ) { - return (*GetPeiServicesTablePointer())->RegisterForShadow (FileHandle); + return (*GetPeiServicesTablePointer ())->RegisterForShadow (FileHandle); } /** @@ -493,11 +492,11 @@ PeiServicesRegisterForShadow ( EFI_STATUS EFIAPI PeiServicesFfsGetFileInfo ( - IN CONST EFI_PEI_FILE_HANDLE FileHandle, - OUT EFI_FV_FILE_INFO *FileInfo + IN CONST EFI_PEI_FILE_HANDLE FileHandle, + OUT EFI_FV_FILE_INFO *FileInfo ) { - return (*GetPeiServicesTablePointer())->FfsGetFileInfo (FileHandle, FileInfo); + return (*GetPeiServicesTablePointer ())->FfsGetFileInfo (FileHandle, FileInfo); } /** @@ -518,11 +517,11 @@ PeiServicesFfsGetFileInfo ( EFI_STATUS EFIAPI PeiServicesFfsGetFileInfo2 ( - IN CONST EFI_PEI_FILE_HANDLE FileHandle, - OUT EFI_FV_FILE_INFO2 *FileInfo + IN CONST EFI_PEI_FILE_HANDLE FileHandle, + OUT EFI_FV_FILE_INFO2 *FileInfo ) { - return (*GetPeiServicesTablePointer())->FfsGetFileInfo2 (FileHandle, FileInfo); + return (*GetPeiServicesTablePointer ())->FfsGetFileInfo2 (FileHandle, FileInfo); } /** @@ -549,15 +548,14 @@ PeiServicesFfsGetFileInfo2 ( EFI_STATUS EFIAPI PeiServicesFfsFindFileByName ( - IN CONST EFI_GUID *FileName, - IN CONST EFI_PEI_FV_HANDLE VolumeHandle, - OUT EFI_PEI_FILE_HANDLE *FileHandle + IN CONST EFI_GUID *FileName, + IN CONST EFI_PEI_FV_HANDLE VolumeHandle, + OUT EFI_PEI_FILE_HANDLE *FileHandle ) { - return (*GetPeiServicesTablePointer())->FfsFindFileByName (FileName, VolumeHandle, FileHandle); + return (*GetPeiServicesTablePointer ())->FfsFindFileByName (FileName, VolumeHandle, FileHandle); } - /** This service is a wrapper for the PEI Service FfsGetVolumeInfo(), except the pointer to the PEI Services Table has been removed. See the Platform Initialization Pre-EFI Initialization Core Interface @@ -579,11 +577,11 @@ PeiServicesFfsFindFileByName ( EFI_STATUS EFIAPI PeiServicesFfsGetVolumeInfo ( - IN EFI_PEI_FV_HANDLE VolumeHandle, - OUT EFI_FV_INFO *VolumeInfo + IN EFI_PEI_FV_HANDLE VolumeHandle, + OUT EFI_FV_INFO *VolumeInfo ) { - return (*GetPeiServicesTablePointer())->FfsGetVolumeInfo (VolumeHandle, VolumeInfo); + return (*GetPeiServicesTablePointer ())->FfsGetVolumeInfo (VolumeHandle, VolumeInfo); } /** @@ -621,21 +619,21 @@ PeiServicesFfsGetVolumeInfo ( VOID EFIAPI InternalPeiServicesInstallFvInfoPpi ( - IN BOOLEAN InstallFvInfoPpi, - IN CONST EFI_GUID *FvFormat OPTIONAL, - IN CONST VOID *FvInfo, - IN UINT32 FvInfoSize, - IN CONST EFI_GUID *ParentFvName OPTIONAL, - IN CONST EFI_GUID *ParentFileName OPTIONAL, - IN UINT32 AuthenticationStatus + IN BOOLEAN InstallFvInfoPpi, + IN CONST EFI_GUID *FvFormat OPTIONAL, + IN CONST VOID *FvInfo, + IN UINT32 FvInfoSize, + IN CONST EFI_GUID *ParentFvName OPTIONAL, + IN CONST EFI_GUID *ParentFileName OPTIONAL, + IN UINT32 AuthenticationStatus ) { - EFI_STATUS Status; - EFI_PEI_FIRMWARE_VOLUME_INFO_PPI *FvInfoPpi; - EFI_PEI_PPI_DESCRIPTOR *FvInfoPpiDescriptor; - EFI_GUID *ParentFvNameValue; - EFI_GUID *ParentFileNameValue; - EFI_GUID *PpiGuid; + EFI_STATUS Status; + EFI_PEI_FIRMWARE_VOLUME_INFO_PPI *FvInfoPpi; + EFI_PEI_PPI_DESCRIPTOR *FvInfoPpiDescriptor; + EFI_GUID *ParentFvNameValue; + EFI_GUID *ParentFileNameValue; + EFI_GUID *PpiGuid; ParentFvNameValue = NULL; ParentFileNameValue = NULL; @@ -652,8 +650,8 @@ InternalPeiServicesInstallFvInfoPpi ( // FvInfoPpi = AllocateZeroPool (sizeof (EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI)); ASSERT (FvInfoPpi != NULL); - ((EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI *) FvInfoPpi)->AuthenticationStatus = AuthenticationStatus; - PpiGuid = &gEfiPeiFirmwareVolumeInfo2PpiGuid; + ((EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI *)FvInfoPpi)->AuthenticationStatus = AuthenticationStatus; + PpiGuid = &gEfiPeiFirmwareVolumeInfo2PpiGuid; } if (FvFormat != NULL) { @@ -669,15 +667,17 @@ InternalPeiServicesInstallFvInfoPpi ( // ((EFI_FIRMWARE_VOLUME_HEADER *) FvInfo)->FileSystemGuid can be just used for both // firmware file system 2 and 3 format. // - ASSERT (CompareGuid (&(((EFI_FIRMWARE_VOLUME_HEADER *) FvInfo)->FileSystemGuid), &gEfiFirmwareFileSystem2Guid)); + ASSERT (CompareGuid (&(((EFI_FIRMWARE_VOLUME_HEADER *)FvInfo)->FileSystemGuid), &gEfiFirmwareFileSystem2Guid)); } - FvInfoPpi->FvInfo = (VOID *) FvInfo; + + FvInfoPpi->FvInfo = (VOID *)FvInfo; FvInfoPpi->FvInfoSize = FvInfoSize; if (ParentFvName != NULL) { ParentFvNameValue = AllocateCopyPool (sizeof (EFI_GUID), ParentFvName); ASSERT (ParentFvNameValue != NULL); FvInfoPpi->ParentFvName = ParentFvNameValue; } + if (ParentFileName != NULL) { ParentFileNameValue = AllocateCopyPool (sizeof (EFI_GUID), ParentFileName); ASSERT (ParentFileNameValue != NULL); @@ -689,10 +689,9 @@ InternalPeiServicesInstallFvInfoPpi ( FvInfoPpiDescriptor->Guid = PpiGuid; FvInfoPpiDescriptor->Flags = EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST; - FvInfoPpiDescriptor->Ppi = (VOID *) FvInfoPpi; - Status = PeiServicesInstallPpi (FvInfoPpiDescriptor); + FvInfoPpiDescriptor->Ppi = (VOID *)FvInfoPpi; + Status = PeiServicesInstallPpi (FvInfoPpiDescriptor); ASSERT_EFI_ERROR (Status); - } /** @@ -728,11 +727,11 @@ InternalPeiServicesInstallFvInfoPpi ( VOID EFIAPI PeiServicesInstallFvInfoPpi ( - IN CONST EFI_GUID *FvFormat OPTIONAL, - IN CONST VOID *FvInfo, - IN UINT32 FvInfoSize, - IN CONST EFI_GUID *ParentFvName OPTIONAL, - IN CONST EFI_GUID *ParentFileName OPTIONAL + IN CONST EFI_GUID *FvFormat OPTIONAL, + IN CONST VOID *FvInfo, + IN UINT32 FvInfoSize, + IN CONST EFI_GUID *ParentFvName OPTIONAL, + IN CONST EFI_GUID *ParentFileName OPTIONAL ) { InternalPeiServicesInstallFvInfoPpi (TRUE, FvFormat, FvInfo, FvInfoSize, ParentFvName, ParentFileName, 0); @@ -772,12 +771,12 @@ PeiServicesInstallFvInfoPpi ( VOID EFIAPI PeiServicesInstallFvInfo2Ppi ( - IN CONST EFI_GUID *FvFormat OPTIONAL, - IN CONST VOID *FvInfo, - IN UINT32 FvInfoSize, - IN CONST EFI_GUID *ParentFvName OPTIONAL, - IN CONST EFI_GUID *ParentFileName OPTIONAL, - IN UINT32 AuthenticationStatus + IN CONST EFI_GUID *FvFormat OPTIONAL, + IN CONST VOID *FvInfo, + IN UINT32 FvInfoSize, + IN CONST EFI_GUID *ParentFvName OPTIONAL, + IN CONST EFI_GUID *ParentFileName OPTIONAL, + IN UINT32 AuthenticationStatus ) { InternalPeiServicesInstallFvInfoPpi (FALSE, FvFormat, FvInfo, FvInfoSize, ParentFvName, ParentFileName, AuthenticationStatus); @@ -799,11 +798,11 @@ PeiServicesInstallFvInfo2Ppi ( VOID EFIAPI PeiServicesResetSystem2 ( - IN EFI_RESET_TYPE ResetType, - IN EFI_STATUS ResetStatus, - IN UINTN DataSize, - IN VOID *ResetData OPTIONAL + IN EFI_RESET_TYPE ResetType, + IN EFI_STATUS ResetStatus, + IN UINTN DataSize, + IN VOID *ResetData OPTIONAL ) { - (*GetPeiServicesTablePointer())->ResetSystem2 (ResetType, ResetStatus, DataSize, ResetData); + (*GetPeiServicesTablePointer ())->ResetSystem2 (ResetType, ResetStatus, DataSize, ResetData); } diff --git a/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c b/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c index 831564d..04c283f 100644 --- a/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c +++ b/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c @@ -29,7 +29,7 @@ CONST EFI_PEI_SERVICES **gPeiServices; VOID EFIAPI SetPeiServicesTablePointer ( - IN CONST EFI_PEI_SERVICES ** PeiServicesTablePointer + IN CONST EFI_PEI_SERVICES **PeiServicesTablePointer ) { ASSERT (PeiServicesTablePointer != NULL); @@ -58,7 +58,6 @@ GetPeiServicesTablePointer ( return gPeiServices; } - /** The constructor function caches the pointer to PEI services. @@ -74,8 +73,8 @@ GetPeiServicesTablePointer ( EFI_STATUS EFIAPI PeiServicesTablePointerLibConstructor ( - IN EFI_PEI_FILE_HANDLE FileHandle, - IN CONST EFI_PEI_SERVICES **PeiServices + IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_SERVICES **PeiServices ) { gPeiServices = PeiServices; diff --git a/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c b/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c index dac31c9..df12d36 100644 --- a/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c +++ b/MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointer.c @@ -35,10 +35,10 @@ GetPeiServicesTablePointer ( ) { CONST EFI_PEI_SERVICES **PeiServices; - IA32_DESCRIPTOR Idtr; + IA32_DESCRIPTOR Idtr; AsmReadIdtr (&Idtr); - PeiServices = (CONST EFI_PEI_SERVICES **) (*(UINTN*)(Idtr.Base - sizeof (UINTN))); + PeiServices = (CONST EFI_PEI_SERVICES **)(*(UINTN *)(Idtr.Base - sizeof (UINTN))); ASSERT (PeiServices != NULL); return PeiServices; } @@ -59,14 +59,14 @@ GetPeiServicesTablePointer ( VOID EFIAPI SetPeiServicesTablePointer ( - IN CONST EFI_PEI_SERVICES ** PeiServicesTablePointer + IN CONST EFI_PEI_SERVICES **PeiServicesTablePointer ) { - IA32_DESCRIPTOR Idtr; + IA32_DESCRIPTOR Idtr; ASSERT (PeiServicesTablePointer != NULL); AsmReadIdtr (&Idtr); - (*(UINTN*)(Idtr.Base - sizeof (UINTN))) = (UINTN)PeiServicesTablePointer; + (*(UINTN *)(Idtr.Base - sizeof (UINTN))) = (UINTN)PeiServicesTablePointer; } /** @@ -91,35 +91,33 @@ MigratePeiServicesTablePointer ( VOID ) { - EFI_STATUS Status; - IA32_DESCRIPTOR Idtr; - EFI_PHYSICAL_ADDRESS IdtBase; + EFI_STATUS Status; + IA32_DESCRIPTOR Idtr; + EFI_PHYSICAL_ADDRESS IdtBase; CONST EFI_PEI_SERVICES **PeiServices; // // Get PEI Services Table pointer // AsmReadIdtr (&Idtr); - PeiServices = (CONST EFI_PEI_SERVICES **) (*(UINTN*)(Idtr.Base - sizeof (UINTN))); + PeiServices = (CONST EFI_PEI_SERVICES **)(*(UINTN *)(Idtr.Base - sizeof (UINTN))); ASSERT (PeiServices != NULL); // // Allocate the permanent memory. // Status = (*PeiServices)->AllocatePages ( - PeiServices, - EfiBootServicesCode, - EFI_SIZE_TO_PAGES(Idtr.Limit + 1 + sizeof (UINTN)), - &IdtBase - ); + PeiServices, + EfiBootServicesCode, + EFI_SIZE_TO_PAGES (Idtr.Limit + 1 + sizeof (UINTN)), + &IdtBase + ); ASSERT_EFI_ERROR (Status); // // Idt table needs to be migrated into memory. // - CopyMem ((VOID *) (UINTN) IdtBase, (VOID *) (Idtr.Base - sizeof (UINTN)), Idtr.Limit + 1 + sizeof (UINTN)); - Idtr.Base = (UINTN) IdtBase + sizeof (UINTN); + CopyMem ((VOID *)(UINTN)IdtBase, (VOID *)(Idtr.Base - sizeof (UINTN)), Idtr.Limit + 1 + sizeof (UINTN)); + Idtr.Base = (UINTN)IdtBase + sizeof (UINTN); AsmWriteIdtr (&Idtr); return; } - - diff --git a/MdePkg/Library/PeiSmbusLibSmbus2Ppi/InternalSmbusLib.h b/MdePkg/Library/PeiSmbusLibSmbus2Ppi/InternalSmbusLib.h index 1eb6bbe..b5052b8 100644 --- a/MdePkg/Library/PeiSmbusLibSmbus2Ppi/InternalSmbusLib.h +++ b/MdePkg/Library/PeiSmbusLibSmbus2Ppi/InternalSmbusLib.h @@ -10,7 +10,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #ifndef __INTERNAL_SMBUS_LIB_H_ #define __INTERNAL_SMBUS_LIB_H_ - #include #include @@ -64,11 +63,11 @@ InternalGetSmbusPpi ( **/ UINTN InternalSmBusExec ( - IN EFI_SMBUS_OPERATION SmbusOperation, - IN UINTN SmBusAddress, - IN UINTN Length, - IN OUT VOID *Buffer, - OUT RETURN_STATUS *Status OPTIONAL + IN EFI_SMBUS_OPERATION SmbusOperation, + IN UINTN SmBusAddress, + IN UINTN Length, + IN OUT VOID *Buffer, + OUT RETURN_STATUS *Status OPTIONAL ); #endif diff --git a/MdePkg/Library/PeiSmbusLibSmbus2Ppi/PeiSmbusLib.c b/MdePkg/Library/PeiSmbusLibSmbus2Ppi/PeiSmbusLib.c index 06a5f67..adcef6b 100644 --- a/MdePkg/Library/PeiSmbusLibSmbus2Ppi/PeiSmbusLib.c +++ b/MdePkg/Library/PeiSmbusLibSmbus2Ppi/PeiSmbusLib.c @@ -23,10 +23,10 @@ InternalGetSmbusPpi ( VOID ) { - EFI_STATUS Status; - EFI_PEI_SMBUS2_PPI *SmbusPpi; + EFI_STATUS Status; + EFI_PEI_SMBUS2_PPI *SmbusPpi; - Status = PeiServicesLocatePpi (&gEfiPeiSmbus2PpiGuid, 0, NULL, (VOID **) &SmbusPpi); + Status = PeiServicesLocatePpi (&gEfiPeiSmbus2PpiGuid, 0, NULL, (VOID **)&SmbusPpi); ASSERT_EFI_ERROR (Status); ASSERT (SmbusPpi != NULL); @@ -58,18 +58,18 @@ InternalGetSmbusPpi ( **/ UINTN InternalSmBusExec ( - IN EFI_SMBUS_OPERATION SmbusOperation, - IN UINTN SmBusAddress, - IN UINTN Length, - IN OUT VOID *Buffer, - OUT RETURN_STATUS *Status OPTIONAL + IN EFI_SMBUS_OPERATION SmbusOperation, + IN UINTN SmBusAddress, + IN UINTN Length, + IN OUT VOID *Buffer, + OUT RETURN_STATUS *Status OPTIONAL ) { EFI_PEI_SMBUS2_PPI *SmbusPpi; RETURN_STATUS ReturnStatus; EFI_SMBUS_DEVICE_ADDRESS SmbusDeviceAddress; - SmbusPpi = InternalGetSmbusPpi (); + SmbusPpi = InternalGetSmbusPpi (); SmbusDeviceAddress.SmbusDeviceAddress = SMBUS_LIB_SLAVE_ADDRESS (SmBusAddress); ReturnStatus = SmbusPpi->Execute ( diff --git a/MdePkg/Library/PeiSmbusLibSmbus2Ppi/SmbusLib.c b/MdePkg/Library/PeiSmbusLibSmbus2Ppi/SmbusLib.c index d644583..5b237ad 100644 --- a/MdePkg/Library/PeiSmbusLibSmbus2Ppi/SmbusLib.c +++ b/MdePkg/Library/PeiSmbusLibSmbus2Ppi/SmbusLib.c @@ -38,8 +38,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent VOID EFIAPI SmBusQuickRead ( - IN UINTN SmBusAddress, - OUT RETURN_STATUS *Status OPTIONAL + IN UINTN SmBusAddress, + OUT RETURN_STATUS *Status OPTIONAL ) { ASSERT (!SMBUS_LIB_PEC (SmBusAddress)); @@ -79,8 +79,8 @@ SmBusQuickRead ( VOID EFIAPI SmBusQuickWrite ( - IN UINTN SmBusAddress, - OUT RETURN_STATUS *Status OPTIONAL + IN UINTN SmBusAddress, + OUT RETURN_STATUS *Status OPTIONAL ) { ASSERT (!SMBUS_LIB_PEC (SmBusAddress)); @@ -127,7 +127,7 @@ SmBusReceiveByte ( OUT RETURN_STATUS *Status OPTIONAL ) { - UINT8 Byte; + UINT8 Byte; ASSERT (SMBUS_LIB_COMMAND (SmBusAddress) == 0); ASSERT (SMBUS_LIB_LENGTH (SmBusAddress) == 0); @@ -176,13 +176,13 @@ SmBusSendByte ( OUT RETURN_STATUS *Status OPTIONAL ) { - UINT8 Byte; + UINT8 Byte; ASSERT (SMBUS_LIB_COMMAND (SmBusAddress) == 0); ASSERT (SMBUS_LIB_LENGTH (SmBusAddress) == 0); ASSERT (SMBUS_LIB_RESERVED (SmBusAddress) == 0); - Byte = Value; + Byte = Value; InternalSmBusExec (EfiSmbusSendByte, SmBusAddress, 1, &Byte, Status); return Value; @@ -223,7 +223,7 @@ SmBusReadDataByte ( OUT RETURN_STATUS *Status OPTIONAL ) { - UINT8 Byte; + UINT8 Byte; ASSERT (SMBUS_LIB_LENGTH (SmBusAddress) == 0); ASSERT (SMBUS_LIB_RESERVED (SmBusAddress) == 0); @@ -271,7 +271,7 @@ SmBusWriteDataByte ( OUT RETURN_STATUS *Status OPTIONAL ) { - UINT8 Byte; + UINT8 Byte; ASSERT (SMBUS_LIB_LENGTH (SmBusAddress) == 0); ASSERT (SMBUS_LIB_RESERVED (SmBusAddress) == 0); @@ -561,7 +561,7 @@ SmBusBlockProcessCall ( OUT RETURN_STATUS *Status OPTIONAL ) { - UINTN Length; + UINTN Length; ASSERT (WriteBuffer != NULL); ASSERT (ReadBuffer != NULL); diff --git a/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c b/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c index 524c2aa..42aab62 100644 --- a/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c +++ b/MdePkg/Library/PeimEntryPoint/PeimEntryPoint.c @@ -6,10 +6,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ - #include - #include #include @@ -29,8 +27,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent EFI_STATUS EFIAPI _ModuleEntryPoint ( - IN EFI_PEI_FILE_HANDLE FileHandle, - IN CONST EFI_PEI_SERVICES **PeiServices + IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_SERVICES **PeiServices ) { if (_gPeimRevision != 0) { @@ -51,7 +49,6 @@ _ModuleEntryPoint ( return ProcessModuleEntryPointList (FileHandle, PeiServices); } - /** Required by the EBC compiler and identical in functionality to _ModuleEntryPoint(). @@ -67,8 +64,8 @@ _ModuleEntryPoint ( EFI_STATUS EFIAPI EfiMain ( - IN EFI_PEI_FILE_HANDLE FileHandle, - IN CONST EFI_PEI_SERVICES **PeiServices + IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_SERVICES **PeiServices ) { return _ModuleEntryPoint (FileHandle, PeiServices); diff --git a/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.c b/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.c index 7150f1e..24dc510 100644 --- a/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.c +++ b/MdePkg/Library/RegisterFilterLibNull/RegisterFilterLibNull.c @@ -81,13 +81,13 @@ FilterBeforeIoWrite ( return TRUE; } - /** - Trace IO Write operation after wirte IO port. - It is used to trace IO operation. +/** +Trace IO Write operation after wirte IO port. +It is used to trace IO operation. - @param[in] Width Signifies the width of the I/O operation. - @param[in] Address The base address of the I/O operation. - @param[in] Buffer The source buffer from which to Write data. +@param[in] Width Signifies the width of the I/O operation. +@param[in] Address The base address of the I/O operation. +@param[in] Buffer The source buffer from which to Write data. **/ VOID @@ -205,8 +205,8 @@ FilterAfterMmIoWrite ( BOOLEAN EFIAPI FilterBeforeMsrRead ( - IN UINT32 Index, - IN OUT UINT64 *Value + IN UINT32 Index, + IN OUT UINT64 *Value ) { return TRUE; @@ -222,8 +222,8 @@ FilterBeforeMsrRead ( VOID EFIAPI FilterAfterMsrRead ( - IN UINT32 Index, - IN UINT64 *Value + IN UINT32 Index, + IN UINT64 *Value ) { return; @@ -245,8 +245,8 @@ FilterAfterMsrRead ( BOOLEAN EFIAPI FilterBeforeMsrWrite ( - IN UINT32 Index, - IN UINT64 *Value + IN UINT32 Index, + IN UINT64 *Value ) { return TRUE; @@ -262,10 +262,9 @@ FilterBeforeMsrWrite ( VOID EFIAPI FilterAfterMsrWrite ( - IN UINT32 Index, - IN UINT64 *Value + IN UINT32 Index, + IN UINT64 *Value ) { return; } - diff --git a/MdePkg/Library/SecPeiDxeTimerLibCpu/X86TimerLib.c b/MdePkg/Library/SecPeiDxeTimerLibCpu/X86TimerLib.c index 9f61d4d..c605896 100644 --- a/MdePkg/Library/SecPeiDxeTimerLibCpu/X86TimerLib.c +++ b/MdePkg/Library/SecPeiDxeTimerLibCpu/X86TimerLib.c @@ -13,18 +13,18 @@ #include #include -#define APIC_SVR 0x0f0 -#define APIC_LVTERR 0x370 -#define APIC_TMICT 0x380 -#define APIC_TMCCT 0x390 -#define APIC_TDCR 0x3e0 +#define APIC_SVR 0x0f0 +#define APIC_LVTERR 0x370 +#define APIC_TMICT 0x380 +#define APIC_TMCCT 0x390 +#define APIC_TDCR 0x3e0 // // The following array is used in calculating the frequency of local APIC // timer. Refer to IA-32 developers' manual for more details. // GLOBAL_REMOVE_IF_UNREFERENCED -CONST UINT8 mTimerLibLocalApicDivisor[] = { +CONST UINT8 mTimerLibLocalApicDivisor[] = { 0x02, 0x04, 0x08, 0x10, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x01, @@ -48,10 +48,10 @@ InternalX86GetApicBase ( VOID ) { - UINTN MsrValue; - UINTN ApicBase; + UINTN MsrValue; + UINTN ApicBase; - MsrValue = (UINTN) AsmReadMsr64 (27); + MsrValue = (UINTN)AsmReadMsr64 (27); ApicBase = MsrValue & 0xffffff000ULL; // @@ -87,11 +87,11 @@ InternalX86GetApicBase ( UINT32 EFIAPI InternalX86GetTimerFrequency ( - IN UINTN ApicBase + IN UINTN ApicBase ) { return - PcdGet32(PcdFSBClock) / + PcdGet32 (PcdFSBClock) / mTimerLibLocalApicDivisor[MmioBitFieldRead32 (ApicBase + APIC_TDCR, 0, 3)]; } @@ -106,7 +106,7 @@ InternalX86GetTimerFrequency ( INT32 EFIAPI InternalX86GetTimerTick ( - IN UINTN ApicBase + IN UINTN ApicBase ) { return MmioRead32 (ApicBase + APIC_TMCCT); @@ -122,7 +122,7 @@ InternalX86GetTimerTick ( **/ UINT32 InternalX86GetInitTimerCount ( - IN UINTN ApicBase + IN UINTN ApicBase ) { return MmioRead32 (ApicBase + APIC_TMICT); @@ -144,14 +144,14 @@ InternalX86GetInitTimerCount ( VOID EFIAPI InternalX86Delay ( - IN UINTN ApicBase, - IN UINT32 Delay + IN UINTN ApicBase, + IN UINT32 Delay ) { - INT32 Ticks; - UINT32 Times; - UINT32 InitCount; - UINT32 StartTick; + INT32 Ticks; + UINT32 Times; + UINT32 InitCount; + UINT32 StartTick; // // In case Delay is too larger, separate it into several small delay slot. @@ -162,13 +162,13 @@ InternalX86Delay ( // InitCount = InternalX86GetInitTimerCount (ApicBase); ASSERT (InitCount != 0); - Times = Delay / (InitCount / 2); - Delay = Delay % (InitCount / 2); + Times = Delay / (InitCount / 2); + Delay = Delay % (InitCount / 2); // // Get Start Tick and do delay // - StartTick = InternalX86GetTimerTick (ApicBase); + StartTick = InternalX86GetTimerTick (ApicBase); do { // // Wait until time out by Delay value @@ -208,10 +208,10 @@ InternalX86Delay ( UINTN EFIAPI MicroSecondDelay ( - IN UINTN MicroSeconds + IN UINTN MicroSeconds ) { - UINTN ApicBase; + UINTN ApicBase; ApicBase = InternalX86GetApicBase (); InternalX86Delay ( @@ -240,10 +240,10 @@ MicroSecondDelay ( UINTN EFIAPI NanoSecondDelay ( - IN UINTN NanoSeconds + IN UINTN NanoSeconds ) { - UINTN ApicBase; + UINTN ApicBase; ApicBase = InternalX86GetApicBase (); InternalX86Delay ( @@ -305,11 +305,11 @@ GetPerformanceCounter ( UINT64 EFIAPI GetPerformanceCounterProperties ( - OUT UINT64 *StartValue OPTIONAL, - OUT UINT64 *EndValue OPTIONAL + OUT UINT64 *StartValue OPTIONAL, + OUT UINT64 *EndValue OPTIONAL ) { - UINTN ApicBase; + UINTN ApicBase; ApicBase = InternalX86GetApicBase (); @@ -321,7 +321,7 @@ GetPerformanceCounterProperties ( *EndValue = 0; } - return (UINT64) InternalX86GetTimerFrequency (ApicBase); + return (UINT64)InternalX86GetTimerFrequency (ApicBase); } /** @@ -338,7 +338,7 @@ GetPerformanceCounterProperties ( UINT64 EFIAPI GetTimeInNanoSecond ( - IN UINT64 Ticks + IN UINT64 Ticks ) { UINT64 Frequency; @@ -360,9 +360,9 @@ GetTimeInNanoSecond ( // Since 2^29 < 1,000,000,000 = 0x3B9ACA00 < 2^30, Remainder should < 2^(64-30) = 2^34, // i.e. highest bit set in Remainder should <= 33. // - Shift = MAX (0, HighBitSet64 (Remainder) - 33); - Remainder = RShiftU64 (Remainder, (UINTN) Shift); - Frequency = RShiftU64 (Frequency, (UINTN) Shift); + Shift = MAX (0, HighBitSet64 (Remainder) - 33); + Remainder = RShiftU64 (Remainder, (UINTN)Shift); + Frequency = RShiftU64 (Frequency, (UINTN)Shift); NanoSeconds += DivU64x64Remainder (MultU64x32 (Remainder, 1000000000u), Frequency, NULL); return NanoSeconds; diff --git a/MdePkg/Library/SmiHandlerProfileLibNull/SmiHandlerProfileLibNull.c b/MdePkg/Library/SmiHandlerProfileLibNull/SmiHandlerProfileLibNull.c index 87559a4..b7a5c96 100644 --- a/MdePkg/Library/SmiHandlerProfileLibNull/SmiHandlerProfileLibNull.c +++ b/MdePkg/Library/SmiHandlerProfileLibNull/SmiHandlerProfileLibNull.c @@ -32,11 +32,11 @@ EFI_STATUS EFIAPI SmiHandlerProfileRegisterHandler ( - IN EFI_GUID *HandlerGuid, - IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler, - IN PHYSICAL_ADDRESS CallerAddress, - IN VOID *Context OPTIONAL, - IN UINTN ContextSize OPTIONAL + IN EFI_GUID *HandlerGuid, + IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler, + IN PHYSICAL_ADDRESS CallerAddress, + IN VOID *Context OPTIONAL, + IN UINTN ContextSize OPTIONAL ) { return EFI_UNSUPPORTED; @@ -62,10 +62,10 @@ SmiHandlerProfileRegisterHandler ( EFI_STATUS EFIAPI SmiHandlerProfileUnregisterHandler ( - IN EFI_GUID *HandlerGuid, - IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler, - IN VOID *Context OPTIONAL, - IN UINTN ContextSize OPTIONAL + IN EFI_GUID *HandlerGuid, + IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler, + IN VOID *Context OPTIONAL, + IN UINTN ContextSize OPTIONAL ) { return EFI_UNSUPPORTED; diff --git a/MdePkg/Library/SmmIoLib/SmmIoLib.c b/MdePkg/Library/SmmIoLib/SmmIoLib.c index 31b1bb3..ad4bfff 100644 --- a/MdePkg/Library/SmmIoLib/SmmIoLib.c +++ b/MdePkg/Library/SmmIoLib/SmmIoLib.c @@ -10,7 +10,6 @@ **/ - #include #include @@ -24,15 +23,15 @@ #include #include -EFI_GCD_MEMORY_SPACE_DESCRIPTOR *mSmmIoLibGcdMemSpace = NULL; -UINTN mSmmIoLibGcdMemNumberOfDesc = 0; +EFI_GCD_MEMORY_SPACE_DESCRIPTOR *mSmmIoLibGcdMemSpace = NULL; +UINTN mSmmIoLibGcdMemNumberOfDesc = 0; EFI_PHYSICAL_ADDRESS mSmmIoLibInternalMaximumSupportMemAddress = 0; -VOID *mSmmIoLibRegistrationEndOfDxe; -VOID *mSmmIoLibRegistrationReadyToLock; +VOID *mSmmIoLibRegistrationEndOfDxe; +VOID *mSmmIoLibRegistrationReadyToLock; -BOOLEAN mSmmIoLibReadyToLock = FALSE; +BOOLEAN mSmmIoLibReadyToLock = FALSE; /** Calculate and save the maximum support address. @@ -43,25 +42,26 @@ SmmIoLibInternalCalculateMaximumSupportAddress ( VOID ) { - VOID *Hob; - UINT32 RegEax; - UINT8 MemPhysicalAddressBits; + VOID *Hob; + UINT32 RegEax; + UINT8 MemPhysicalAddressBits; // // Get physical address bits supported. // Hob = GetFirstHob (EFI_HOB_TYPE_CPU); if (Hob != NULL) { - MemPhysicalAddressBits = ((EFI_HOB_CPU *) Hob)->SizeOfMemorySpace; + MemPhysicalAddressBits = ((EFI_HOB_CPU *)Hob)->SizeOfMemorySpace; } else { AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL); if (RegEax >= 0x80000008) { AsmCpuid (0x80000008, &RegEax, NULL, NULL, NULL); - MemPhysicalAddressBits = (UINT8) RegEax; + MemPhysicalAddressBits = (UINT8)RegEax; } else { MemPhysicalAddressBits = 36; } } + // // IA-32e paging translates 48-bit linear addresses to 52-bit physical addresses. // @@ -98,9 +98,9 @@ SmmIsMmioValid ( IN EFI_GUID *Owner OPTIONAL ) { - UINTN Index; - EFI_GCD_MEMORY_SPACE_DESCRIPTOR *Desc; - BOOLEAN InValidRegion; + UINTN Index; + EFI_GCD_MEMORY_SPACE_DESCRIPTOR *Desc; + BOOLEAN InValidRegion; // // Check override. @@ -108,7 +108,8 @@ SmmIsMmioValid ( // if ((Length > mSmmIoLibInternalMaximumSupportMemAddress) || (BaseAddress > mSmmIoLibInternalMaximumSupportMemAddress) || - ((Length != 0) && (BaseAddress > (mSmmIoLibInternalMaximumSupportMemAddress - (Length - 1)))) ) { + ((Length != 0) && (BaseAddress > (mSmmIoLibInternalMaximumSupportMemAddress - (Length - 1))))) + { // // Overflow happen // @@ -127,11 +128,12 @@ SmmIsMmioValid ( // if (mSmmIoLibReadyToLock) { InValidRegion = FALSE; - for (Index = 0; Index < mSmmIoLibGcdMemNumberOfDesc; Index ++) { + for (Index = 0; Index < mSmmIoLibGcdMemNumberOfDesc; Index++) { Desc = &mSmmIoLibGcdMemSpace[Index]; if ((Desc->GcdMemoryType == EfiGcdMemoryTypeMemoryMappedIo) && (BaseAddress >= Desc->BaseAddress) && - ((BaseAddress + Length) <= (Desc->BaseAddress + Desc->Length))) { + ((BaseAddress + Length) <= (Desc->BaseAddress + Desc->Length))) + { InValidRegion = TRUE; } } @@ -146,6 +148,7 @@ SmmIsMmioValid ( return FALSE; } } + return TRUE; } @@ -166,22 +169,23 @@ MergeGcdMmioEntry ( IN OUT UINTN *NumberOfDescriptors ) { - EFI_GCD_MEMORY_SPACE_DESCRIPTOR *GcdMemoryMapEntry; - EFI_GCD_MEMORY_SPACE_DESCRIPTOR *GcdMemoryMapEnd; - EFI_GCD_MEMORY_SPACE_DESCRIPTOR *NewGcdMemoryMapEntry; - EFI_GCD_MEMORY_SPACE_DESCRIPTOR *NextGcdMemoryMapEntry; + EFI_GCD_MEMORY_SPACE_DESCRIPTOR *GcdMemoryMapEntry; + EFI_GCD_MEMORY_SPACE_DESCRIPTOR *GcdMemoryMapEnd; + EFI_GCD_MEMORY_SPACE_DESCRIPTOR *NewGcdMemoryMapEntry; + EFI_GCD_MEMORY_SPACE_DESCRIPTOR *NextGcdMemoryMapEntry; - GcdMemoryMapEntry = GcdMemoryMap; + GcdMemoryMapEntry = GcdMemoryMap; NewGcdMemoryMapEntry = GcdMemoryMap; - GcdMemoryMapEnd = (EFI_GCD_MEMORY_SPACE_DESCRIPTOR *) ((UINT8 *) GcdMemoryMap + (*NumberOfDescriptors) * sizeof(EFI_GCD_MEMORY_SPACE_DESCRIPTOR)); + GcdMemoryMapEnd = (EFI_GCD_MEMORY_SPACE_DESCRIPTOR *)((UINT8 *)GcdMemoryMap + (*NumberOfDescriptors) * sizeof (EFI_GCD_MEMORY_SPACE_DESCRIPTOR)); while ((UINTN)GcdMemoryMapEntry < (UINTN)GcdMemoryMapEnd) { - CopyMem (NewGcdMemoryMapEntry, GcdMemoryMapEntry, sizeof(EFI_GCD_MEMORY_SPACE_DESCRIPTOR)); + CopyMem (NewGcdMemoryMapEntry, GcdMemoryMapEntry, sizeof (EFI_GCD_MEMORY_SPACE_DESCRIPTOR)); NextGcdMemoryMapEntry = GcdMemoryMapEntry + 1; do { if (((UINTN)NextGcdMemoryMapEntry < (UINTN)GcdMemoryMapEnd) && (GcdMemoryMapEntry->GcdMemoryType == EfiGcdMemoryTypeMemoryMappedIo) && (NextGcdMemoryMapEntry->GcdMemoryType == EfiGcdMemoryTypeMemoryMappedIo) && - ((GcdMemoryMapEntry->BaseAddress + GcdMemoryMapEntry->Length) == NextGcdMemoryMapEntry->BaseAddress)) { + ((GcdMemoryMapEntry->BaseAddress + GcdMemoryMapEntry->Length) == NextGcdMemoryMapEntry->BaseAddress)) + { GcdMemoryMapEntry->Length += NextGcdMemoryMapEntry->Length; if (NewGcdMemoryMapEntry != GcdMemoryMapEntry) { NewGcdMemoryMapEntry->Length += NextGcdMemoryMapEntry->Length; @@ -195,13 +199,13 @@ MergeGcdMmioEntry ( } } while (TRUE); - GcdMemoryMapEntry = GcdMemoryMapEntry + 1; + GcdMemoryMapEntry = GcdMemoryMapEntry + 1; NewGcdMemoryMapEntry = NewGcdMemoryMapEntry + 1; } - *NumberOfDescriptors = ((UINTN)NewGcdMemoryMapEntry - (UINTN)GcdMemoryMap) / sizeof(EFI_GCD_MEMORY_SPACE_DESCRIPTOR); + *NumberOfDescriptors = ((UINTN)NewGcdMemoryMapEntry - (UINTN)GcdMemoryMap) / sizeof (EFI_GCD_MEMORY_SPACE_DESCRIPTOR); - return ; + return; } /** @@ -228,7 +232,6 @@ SmmIoLibInternalEndOfDxeNotify ( Status = gDS->GetMemorySpaceMap (&NumberOfDescriptors, &MemSpaceMap); if (!EFI_ERROR (Status)) { - MergeGcdMmioEntry (MemSpaceMap, &NumberOfDescriptors); mSmmIoLibGcdMemSpace = AllocateCopyPool (NumberOfDescriptors * sizeof (EFI_GCD_MEMORY_SPACE_DESCRIPTOR), MemSpaceMap); @@ -282,7 +285,7 @@ SmmIoLibConstructor ( IN EFI_SYSTEM_TABLE *SystemTable ) { - EFI_STATUS Status; + EFI_STATUS Status; // // Calculate and save maximum support address diff --git a/MdePkg/Library/SmmIoLibSmmCpuIo2/IoHighLevel.c b/MdePkg/Library/SmmIoLibSmmCpuIo2/IoHighLevel.c index 9262c88..501c971 100644 --- a/MdePkg/Library/SmmIoLibSmmCpuIo2/IoHighLevel.c +++ b/MdePkg/Library/SmmIoLibSmmCpuIo2/IoHighLevel.c @@ -38,11 +38,11 @@ UINT8 EFIAPI IoOr8 ( - IN UINTN Port, - IN UINT8 OrData + IN UINTN Port, + IN UINT8 OrData ) { - return IoWrite8 (Port, (UINT8) (IoRead8 (Port) | OrData)); + return IoWrite8 (Port, (UINT8)(IoRead8 (Port) | OrData)); } /** @@ -66,11 +66,11 @@ IoOr8 ( UINT8 EFIAPI IoAnd8 ( - IN UINTN Port, - IN UINT8 AndData + IN UINTN Port, + IN UINT8 AndData ) { - return IoWrite8 (Port, (UINT8) (IoRead8 (Port) & AndData)); + return IoWrite8 (Port, (UINT8)(IoRead8 (Port) & AndData)); } /** @@ -96,12 +96,12 @@ IoAnd8 ( UINT8 EFIAPI IoAndThenOr8 ( - IN UINTN Port, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Port, + IN UINT8 AndData, + IN UINT8 OrData ) { - return IoWrite8 (Port, (UINT8) ((IoRead8 (Port) & AndData) | OrData)); + return IoWrite8 (Port, (UINT8)((IoRead8 (Port) & AndData) | OrData)); } /** @@ -127,9 +127,9 @@ IoAndThenOr8 ( UINT8 EFIAPI IoBitFieldRead8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead8 (IoRead8 (Port), StartBit, EndBit); @@ -162,10 +162,10 @@ IoBitFieldRead8 ( UINT8 EFIAPI IoBitFieldWrite8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) { return IoWrite8 ( @@ -203,10 +203,10 @@ IoBitFieldWrite8 ( UINT8 EFIAPI IoBitFieldOr8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) { return IoWrite8 ( @@ -244,10 +244,10 @@ IoBitFieldOr8 ( UINT8 EFIAPI IoBitFieldAnd8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ) { return IoWrite8 ( @@ -289,11 +289,11 @@ IoBitFieldAnd8 ( UINT8 EFIAPI IoBitFieldAndThenOr8 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) { return IoWrite8 ( @@ -323,11 +323,11 @@ IoBitFieldAndThenOr8 ( UINT16 EFIAPI IoOr16 ( - IN UINTN Port, - IN UINT16 OrData + IN UINTN Port, + IN UINT16 OrData ) { - return IoWrite16 (Port, (UINT16) (IoRead16 (Port) | OrData)); + return IoWrite16 (Port, (UINT16)(IoRead16 (Port) | OrData)); } /** @@ -351,11 +351,11 @@ IoOr16 ( UINT16 EFIAPI IoAnd16 ( - IN UINTN Port, - IN UINT16 AndData + IN UINTN Port, + IN UINT16 AndData ) { - return IoWrite16 (Port, (UINT16) (IoRead16 (Port) & AndData)); + return IoWrite16 (Port, (UINT16)(IoRead16 (Port) & AndData)); } /** @@ -381,12 +381,12 @@ IoAnd16 ( UINT16 EFIAPI IoAndThenOr16 ( - IN UINTN Port, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Port, + IN UINT16 AndData, + IN UINT16 OrData ) { - return IoWrite16 (Port, (UINT16) ((IoRead16 (Port) & AndData) | OrData)); + return IoWrite16 (Port, (UINT16)((IoRead16 (Port) & AndData) | OrData)); } /** @@ -412,9 +412,9 @@ IoAndThenOr16 ( UINT16 EFIAPI IoBitFieldRead16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead16 (IoRead16 (Port), StartBit, EndBit); @@ -447,10 +447,10 @@ IoBitFieldRead16 ( UINT16 EFIAPI IoBitFieldWrite16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ) { return IoWrite16 ( @@ -488,10 +488,10 @@ IoBitFieldWrite16 ( UINT16 EFIAPI IoBitFieldOr16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ) { return IoWrite16 ( @@ -529,10 +529,10 @@ IoBitFieldOr16 ( UINT16 EFIAPI IoBitFieldAnd16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ) { return IoWrite16 ( @@ -574,11 +574,11 @@ IoBitFieldAnd16 ( UINT16 EFIAPI IoBitFieldAndThenOr16 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ) { return IoWrite16 ( @@ -608,8 +608,8 @@ IoBitFieldAndThenOr16 ( UINT32 EFIAPI IoOr32 ( - IN UINTN Port, - IN UINT32 OrData + IN UINTN Port, + IN UINT32 OrData ) { return IoWrite32 (Port, IoRead32 (Port) | OrData); @@ -636,8 +636,8 @@ IoOr32 ( UINT32 EFIAPI IoAnd32 ( - IN UINTN Port, - IN UINT32 AndData + IN UINTN Port, + IN UINT32 AndData ) { return IoWrite32 (Port, IoRead32 (Port) & AndData); @@ -666,9 +666,9 @@ IoAnd32 ( UINT32 EFIAPI IoAndThenOr32 ( - IN UINTN Port, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Port, + IN UINT32 AndData, + IN UINT32 OrData ) { return IoWrite32 (Port, (IoRead32 (Port) & AndData) | OrData); @@ -697,9 +697,9 @@ IoAndThenOr32 ( UINT32 EFIAPI IoBitFieldRead32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead32 (IoRead32 (Port), StartBit, EndBit); @@ -732,10 +732,10 @@ IoBitFieldRead32 ( UINT32 EFIAPI IoBitFieldWrite32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { return IoWrite32 ( @@ -773,10 +773,10 @@ IoBitFieldWrite32 ( UINT32 EFIAPI IoBitFieldOr32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { return IoWrite32 ( @@ -814,10 +814,10 @@ IoBitFieldOr32 ( UINT32 EFIAPI IoBitFieldAnd32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { return IoWrite32 ( @@ -859,11 +859,11 @@ IoBitFieldAnd32 ( UINT32 EFIAPI IoBitFieldAndThenOr32 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { return IoWrite32 ( @@ -893,8 +893,8 @@ IoBitFieldAndThenOr32 ( UINT64 EFIAPI IoOr64 ( - IN UINTN Port, - IN UINT64 OrData + IN UINTN Port, + IN UINT64 OrData ) { return IoWrite64 (Port, IoRead64 (Port) | OrData); @@ -921,8 +921,8 @@ IoOr64 ( UINT64 EFIAPI IoAnd64 ( - IN UINTN Port, - IN UINT64 AndData + IN UINTN Port, + IN UINT64 AndData ) { return IoWrite64 (Port, IoRead64 (Port) & AndData); @@ -951,9 +951,9 @@ IoAnd64 ( UINT64 EFIAPI IoAndThenOr64 ( - IN UINTN Port, - IN UINT64 AndData, - IN UINT64 OrData + IN UINTN Port, + IN UINT64 AndData, + IN UINT64 OrData ) { return IoWrite64 (Port, (IoRead64 (Port) & AndData) | OrData); @@ -982,9 +982,9 @@ IoAndThenOr64 ( UINT64 EFIAPI IoBitFieldRead64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead64 (IoRead64 (Port), StartBit, EndBit); @@ -1017,10 +1017,10 @@ IoBitFieldRead64 ( UINT64 EFIAPI IoBitFieldWrite64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 Value + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 Value ) { return IoWrite64 ( @@ -1058,10 +1058,10 @@ IoBitFieldWrite64 ( UINT64 EFIAPI IoBitFieldOr64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 OrData ) { return IoWrite64 ( @@ -1099,10 +1099,10 @@ IoBitFieldOr64 ( UINT64 EFIAPI IoBitFieldAnd64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData ) { return IoWrite64 ( @@ -1144,11 +1144,11 @@ IoBitFieldAnd64 ( UINT64 EFIAPI IoBitFieldAndThenOr64 ( - IN UINTN Port, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData, - IN UINT64 OrData + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData, + IN UINT64 OrData ) { return IoWrite64 ( @@ -1178,11 +1178,11 @@ IoBitFieldAndThenOr64 ( UINT8 EFIAPI MmioOr8 ( - IN UINTN Address, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 OrData ) { - return MmioWrite8 (Address, (UINT8) (MmioRead8 (Address) | OrData)); + return MmioWrite8 (Address, (UINT8)(MmioRead8 (Address) | OrData)); } /** @@ -1206,11 +1206,11 @@ MmioOr8 ( UINT8 EFIAPI MmioAnd8 ( - IN UINTN Address, - IN UINT8 AndData + IN UINTN Address, + IN UINT8 AndData ) { - return MmioWrite8 (Address, (UINT8) (MmioRead8 (Address) & AndData)); + return MmioWrite8 (Address, (UINT8)(MmioRead8 (Address) & AndData)); } /** @@ -1237,12 +1237,12 @@ MmioAnd8 ( UINT8 EFIAPI MmioAndThenOr8 ( - IN UINTN Address, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 AndData, + IN UINT8 OrData ) { - return MmioWrite8 (Address, (UINT8) ((MmioRead8 (Address) & AndData) | OrData)); + return MmioWrite8 (Address, (UINT8)((MmioRead8 (Address) & AndData) | OrData)); } /** @@ -1268,9 +1268,9 @@ MmioAndThenOr8 ( UINT8 EFIAPI MmioBitFieldRead8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead8 (MmioRead8 (Address), StartBit, EndBit); @@ -1302,10 +1302,10 @@ MmioBitFieldRead8 ( UINT8 EFIAPI MmioBitFieldWrite8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) { return MmioWrite8 ( @@ -1344,10 +1344,10 @@ MmioBitFieldWrite8 ( UINT8 EFIAPI MmioBitFieldOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) { return MmioWrite8 ( @@ -1386,10 +1386,10 @@ MmioBitFieldOr8 ( UINT8 EFIAPI MmioBitFieldAnd8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ) { return MmioWrite8 ( @@ -1431,11 +1431,11 @@ MmioBitFieldAnd8 ( UINT8 EFIAPI MmioBitFieldAndThenOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) { return MmioWrite8 ( @@ -1465,11 +1465,11 @@ MmioBitFieldAndThenOr8 ( UINT16 EFIAPI MmioOr16 ( - IN UINTN Address, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 OrData ) { - return MmioWrite16 (Address, (UINT16) (MmioRead16 (Address) | OrData)); + return MmioWrite16 (Address, (UINT16)(MmioRead16 (Address) | OrData)); } /** @@ -1493,11 +1493,11 @@ MmioOr16 ( UINT16 EFIAPI MmioAnd16 ( - IN UINTN Address, - IN UINT16 AndData + IN UINTN Address, + IN UINT16 AndData ) { - return MmioWrite16 (Address, (UINT16) (MmioRead16 (Address) & AndData)); + return MmioWrite16 (Address, (UINT16)(MmioRead16 (Address) & AndData)); } /** @@ -1524,12 +1524,12 @@ MmioAnd16 ( UINT16 EFIAPI MmioAndThenOr16 ( - IN UINTN Address, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 AndData, + IN UINT16 OrData ) { - return MmioWrite16 (Address, (UINT16) ((MmioRead16 (Address) & AndData) | OrData)); + return MmioWrite16 (Address, (UINT16)((MmioRead16 (Address) & AndData) | OrData)); } /** @@ -1555,9 +1555,9 @@ MmioAndThenOr16 ( UINT16 EFIAPI MmioBitFieldRead16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead16 (MmioRead16 (Address), StartBit, EndBit); @@ -1589,10 +1589,10 @@ MmioBitFieldRead16 ( UINT16 EFIAPI MmioBitFieldWrite16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ) { return MmioWrite16 ( @@ -1631,10 +1631,10 @@ MmioBitFieldWrite16 ( UINT16 EFIAPI MmioBitFieldOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ) { return MmioWrite16 ( @@ -1673,10 +1673,10 @@ MmioBitFieldOr16 ( UINT16 EFIAPI MmioBitFieldAnd16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ) { return MmioWrite16 ( @@ -1718,11 +1718,11 @@ MmioBitFieldAnd16 ( UINT16 EFIAPI MmioBitFieldAndThenOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ) { return MmioWrite16 ( @@ -1752,8 +1752,8 @@ MmioBitFieldAndThenOr16 ( UINT32 EFIAPI MmioOr32 ( - IN UINTN Address, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 OrData ) { return MmioWrite32 (Address, MmioRead32 (Address) | OrData); @@ -1780,8 +1780,8 @@ MmioOr32 ( UINT32 EFIAPI MmioAnd32 ( - IN UINTN Address, - IN UINT32 AndData + IN UINTN Address, + IN UINT32 AndData ) { return MmioWrite32 (Address, MmioRead32 (Address) & AndData); @@ -1811,9 +1811,9 @@ MmioAnd32 ( UINT32 EFIAPI MmioAndThenOr32 ( - IN UINTN Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 AndData, + IN UINT32 OrData ) { return MmioWrite32 (Address, (MmioRead32 (Address) & AndData) | OrData); @@ -1842,9 +1842,9 @@ MmioAndThenOr32 ( UINT32 EFIAPI MmioBitFieldRead32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead32 (MmioRead32 (Address), StartBit, EndBit); @@ -1876,10 +1876,10 @@ MmioBitFieldRead32 ( UINT32 EFIAPI MmioBitFieldWrite32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { return MmioWrite32 ( @@ -1918,10 +1918,10 @@ MmioBitFieldWrite32 ( UINT32 EFIAPI MmioBitFieldOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { return MmioWrite32 ( @@ -1960,10 +1960,10 @@ MmioBitFieldOr32 ( UINT32 EFIAPI MmioBitFieldAnd32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { return MmioWrite32 ( @@ -2005,11 +2005,11 @@ MmioBitFieldAnd32 ( UINT32 EFIAPI MmioBitFieldAndThenOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { return MmioWrite32 ( @@ -2039,8 +2039,8 @@ MmioBitFieldAndThenOr32 ( UINT64 EFIAPI MmioOr64 ( - IN UINTN Address, - IN UINT64 OrData + IN UINTN Address, + IN UINT64 OrData ) { return MmioWrite64 (Address, MmioRead64 (Address) | OrData); @@ -2067,8 +2067,8 @@ MmioOr64 ( UINT64 EFIAPI MmioAnd64 ( - IN UINTN Address, - IN UINT64 AndData + IN UINTN Address, + IN UINT64 AndData ) { return MmioWrite64 (Address, MmioRead64 (Address) & AndData); @@ -2098,9 +2098,9 @@ MmioAnd64 ( UINT64 EFIAPI MmioAndThenOr64 ( - IN UINTN Address, - IN UINT64 AndData, - IN UINT64 OrData + IN UINTN Address, + IN UINT64 AndData, + IN UINT64 OrData ) { return MmioWrite64 (Address, (MmioRead64 (Address) & AndData) | OrData); @@ -2129,9 +2129,9 @@ MmioAndThenOr64 ( UINT64 EFIAPI MmioBitFieldRead64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead64 (MmioRead64 (Address), StartBit, EndBit); @@ -2163,10 +2163,10 @@ MmioBitFieldRead64 ( UINT64 EFIAPI MmioBitFieldWrite64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 Value ) { return MmioWrite64 ( @@ -2205,10 +2205,10 @@ MmioBitFieldWrite64 ( UINT64 EFIAPI MmioBitFieldOr64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 OrData ) { return MmioWrite64 ( @@ -2247,10 +2247,10 @@ MmioBitFieldOr64 ( UINT64 EFIAPI MmioBitFieldAnd64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData ) { return MmioWrite64 ( @@ -2292,11 +2292,11 @@ MmioBitFieldAnd64 ( UINT64 EFIAPI MmioBitFieldAndThenOr64 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT64 AndData, - IN UINT64 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData, + IN UINT64 OrData ) { return MmioWrite64 ( diff --git a/MdePkg/Library/SmmIoLibSmmCpuIo2/IoLib.c b/MdePkg/Library/SmmIoLibSmmCpuIo2/IoLib.c index 9163890..d73a699 100644 --- a/MdePkg/Library/SmmIoLibSmmCpuIo2/IoLib.c +++ b/MdePkg/Library/SmmIoLibSmmCpuIo2/IoLib.c @@ -29,12 +29,12 @@ UINT64 EFIAPI IoReadWorker ( - IN UINTN Port, - IN EFI_SMM_IO_WIDTH Width + IN UINTN Port, + IN EFI_SMM_IO_WIDTH Width ) { - EFI_STATUS Status; - UINT64 Data; + EFI_STATUS Status; + UINT64 Data; Status = gSmst->SmmIo.Io.Read (&gSmst->SmmIo, Width, Port, 1, &Data); ASSERT_EFI_ERROR (Status); @@ -60,12 +60,12 @@ IoReadWorker ( UINT64 EFIAPI IoWriteWorker ( - IN UINTN Port, - IN EFI_SMM_IO_WIDTH Width, - IN UINT64 Data + IN UINTN Port, + IN EFI_SMM_IO_WIDTH Width, + IN UINT64 Data ) { - EFI_STATUS Status; + EFI_STATUS Status; Status = gSmst->SmmIo.Io.Write (&gSmst->SmmIo, Width, Port, 1, &Data); ASSERT_EFI_ERROR (Status); @@ -90,12 +90,12 @@ IoWriteWorker ( UINT64 EFIAPI MmioReadWorker ( - IN UINTN Address, - IN EFI_SMM_IO_WIDTH Width + IN UINTN Address, + IN EFI_SMM_IO_WIDTH Width ) { - EFI_STATUS Status; - UINT64 Data; + EFI_STATUS Status; + UINT64 Data; Status = gSmst->SmmIo.Mem.Read (&gSmst->SmmIo, Width, Address, 1, &Data); ASSERT_EFI_ERROR (Status); @@ -121,12 +121,12 @@ MmioReadWorker ( UINT64 EFIAPI MmioWriteWorker ( - IN UINTN Address, - IN EFI_SMM_IO_WIDTH Width, - IN UINT64 Data + IN UINTN Address, + IN EFI_SMM_IO_WIDTH Width, + IN UINT64 Data ) { - EFI_STATUS Status; + EFI_STATUS Status; Status = gSmst->SmmIo.Mem.Write (&gSmst->SmmIo, Width, Address, 1, &Data); ASSERT_EFI_ERROR (Status); @@ -151,7 +151,7 @@ MmioWriteWorker ( UINT8 EFIAPI IoRead8 ( - IN UINTN Port + IN UINTN Port ) { return (UINT8)IoReadWorker (Port, SMM_IO_UINT8); @@ -175,8 +175,8 @@ IoRead8 ( UINT8 EFIAPI IoWrite8 ( - IN UINTN Port, - IN UINT8 Value + IN UINTN Port, + IN UINT8 Value ) { return (UINT8)IoWriteWorker (Port, SMM_IO_UINT8, Value); @@ -201,7 +201,7 @@ IoWrite8 ( UINT16 EFIAPI IoRead16 ( - IN UINTN Port + IN UINTN Port ) { // @@ -231,8 +231,8 @@ IoRead16 ( UINT16 EFIAPI IoWrite16 ( - IN UINTN Port, - IN UINT16 Value + IN UINTN Port, + IN UINT16 Value ) { // @@ -261,7 +261,7 @@ IoWrite16 ( UINT32 EFIAPI IoRead32 ( - IN UINTN Port + IN UINTN Port ) { // @@ -291,8 +291,8 @@ IoRead32 ( UINT32 EFIAPI IoWrite32 ( - IN UINTN Port, - IN UINT32 Value + IN UINTN Port, + IN UINT32 Value ) { // @@ -321,7 +321,7 @@ IoWrite32 ( UINT64 EFIAPI IoRead64 ( - IN UINTN Port + IN UINTN Port ) { // @@ -351,8 +351,8 @@ IoRead64 ( UINT64 EFIAPI IoWrite64 ( - IN UINTN Port, - IN UINT64 Value + IN UINTN Port, + IN UINT64 Value ) { // @@ -382,12 +382,12 @@ IoWrite64 ( VOID EFIAPI IoReadFifo8 ( - IN UINTN Port, - IN UINTN Count, - OUT VOID *Buffer + IN UINTN Port, + IN UINTN Count, + OUT VOID *Buffer ) { - UINT8 *Buffer8; + UINT8 *Buffer8; Buffer8 = (UINT8 *)Buffer; while (Count-- > 0) { @@ -415,12 +415,12 @@ IoReadFifo8 ( VOID EFIAPI IoWriteFifo8 ( - IN UINTN Port, - IN UINTN Count, - IN VOID *Buffer + IN UINTN Port, + IN UINTN Count, + IN VOID *Buffer ) { - UINT8 *Buffer8; + UINT8 *Buffer8; Buffer8 = (UINT8 *)Buffer; while (Count-- > 0) { @@ -448,12 +448,12 @@ IoWriteFifo8 ( VOID EFIAPI IoReadFifo16 ( - IN UINTN Port, - IN UINTN Count, - OUT VOID *Buffer + IN UINTN Port, + IN UINTN Count, + OUT VOID *Buffer ) { - UINT16 *Buffer16; + UINT16 *Buffer16; // // Make sure Port is aligned on a 16-bit boundary. @@ -485,12 +485,12 @@ IoReadFifo16 ( VOID EFIAPI IoWriteFifo16 ( - IN UINTN Port, - IN UINTN Count, - IN VOID *Buffer + IN UINTN Port, + IN UINTN Count, + IN VOID *Buffer ) { - UINT16 *Buffer16; + UINT16 *Buffer16; // // Make sure Port is aligned on a 16-bit boundary. @@ -522,12 +522,12 @@ IoWriteFifo16 ( VOID EFIAPI IoReadFifo32 ( - IN UINTN Port, - IN UINTN Count, - OUT VOID *Buffer + IN UINTN Port, + IN UINTN Count, + OUT VOID *Buffer ) { - UINT32 *Buffer32; + UINT32 *Buffer32; // // Make sure Port is aligned on a 32-bit boundary. @@ -559,12 +559,12 @@ IoReadFifo32 ( VOID EFIAPI IoWriteFifo32 ( - IN UINTN Port, - IN UINTN Count, - IN VOID *Buffer + IN UINTN Port, + IN UINTN Count, + IN VOID *Buffer ) { - UINT32 *Buffer32; + UINT32 *Buffer32; // // Make sure Port is aligned on a 32-bit boundary. @@ -593,7 +593,7 @@ IoWriteFifo32 ( UINT8 EFIAPI MmioRead8 ( - IN UINTN Address + IN UINTN Address ) { return (UINT8)MmioReadWorker (Address, SMM_IO_UINT8); @@ -615,8 +615,8 @@ MmioRead8 ( UINT8 EFIAPI MmioWrite8 ( - IN UINTN Address, - IN UINT8 Value + IN UINTN Address, + IN UINT8 Value ) { return (UINT8)MmioWriteWorker (Address, SMM_IO_UINT8, Value); @@ -641,7 +641,7 @@ MmioWrite8 ( UINT16 EFIAPI MmioRead16 ( - IN UINTN Address + IN UINTN Address ) { // @@ -669,8 +669,8 @@ MmioRead16 ( UINT16 EFIAPI MmioWrite16 ( - IN UINTN Address, - IN UINT16 Value + IN UINTN Address, + IN UINT16 Value ) { // @@ -699,7 +699,7 @@ MmioWrite16 ( UINT32 EFIAPI MmioRead32 ( - IN UINTN Address + IN UINTN Address ) { // @@ -727,8 +727,8 @@ MmioRead32 ( UINT32 EFIAPI MmioWrite32 ( - IN UINTN Address, - IN UINT32 Value + IN UINTN Address, + IN UINT32 Value ) { // @@ -757,7 +757,7 @@ MmioWrite32 ( UINT64 EFIAPI MmioRead64 ( - IN UINTN Address + IN UINTN Address ) { // @@ -785,8 +785,8 @@ MmioRead64 ( UINT64 EFIAPI MmioWrite64 ( - IN UINTN Address, - IN UINT64 Value + IN UINTN Address, + IN UINT64 Value ) { // diff --git a/MdePkg/Library/SmmIoLibSmmCpuIo2/IoLibMmioBuffer.c b/MdePkg/Library/SmmIoLibSmmCpuIo2/IoLibMmioBuffer.c index 2436c05..5b8ef44 100644 --- a/MdePkg/Library/SmmIoLibSmmCpuIo2/IoLibMmioBuffer.c +++ b/MdePkg/Library/SmmIoLibSmmCpuIo2/IoLibMmioBuffer.c @@ -29,15 +29,15 @@ UINT8 * EFIAPI MmioReadBuffer8 ( - IN UINTN StartAddress, - IN UINTN Length, - OUT UINT8 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT8 *Buffer ) { - UINT8 *ReturnBuffer; + UINT8 *ReturnBuffer; ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ReturnBuffer = Buffer; @@ -74,27 +74,27 @@ MmioReadBuffer8 ( UINT16 * EFIAPI MmioReadBuffer16 ( - IN UINTN StartAddress, - IN UINTN Length, - OUT UINT16 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT16 *Buffer ) { - UINT16 *ReturnBuffer; + UINT16 *ReturnBuffer; ASSERT ((StartAddress & (sizeof (UINT16) - 1)) == 0); ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (UINT16) - 1)) == 0); - ASSERT (((UINTN) Buffer & (sizeof (UINT16) - 1)) == 0); + ASSERT (((UINTN)Buffer & (sizeof (UINT16) - 1)) == 0); ReturnBuffer = Buffer; while (Length > 0) { - *(Buffer++) = MmioRead16 (StartAddress); + *(Buffer++) = MmioRead16 (StartAddress); StartAddress += sizeof (UINT16); - Length -= sizeof (UINT16); + Length -= sizeof (UINT16); } return ReturnBuffer; @@ -125,27 +125,27 @@ MmioReadBuffer16 ( UINT32 * EFIAPI MmioReadBuffer32 ( - IN UINTN StartAddress, - IN UINTN Length, - OUT UINT32 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT32 *Buffer ) { - UINT32 *ReturnBuffer; + UINT32 *ReturnBuffer; ASSERT ((StartAddress & (sizeof (UINT32) - 1)) == 0); ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (UINT32) - 1)) == 0); - ASSERT (((UINTN) Buffer & (sizeof (UINT32) - 1)) == 0); + ASSERT (((UINTN)Buffer & (sizeof (UINT32) - 1)) == 0); ReturnBuffer = Buffer; while (Length > 0) { - *(Buffer++) = MmioRead32 (StartAddress); + *(Buffer++) = MmioRead32 (StartAddress); StartAddress += sizeof (UINT32); - Length -= sizeof (UINT32); + Length -= sizeof (UINT32); } return ReturnBuffer; @@ -177,33 +177,32 @@ MmioReadBuffer32 ( UINT64 * EFIAPI MmioReadBuffer64 ( - IN UINTN StartAddress, - IN UINTN Length, - OUT UINT64 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT64 *Buffer ) { - UINT64 *ReturnBuffer; + UINT64 *ReturnBuffer; ASSERT ((StartAddress & (sizeof (UINT64) - 1)) == 0); ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (UINT64) - 1)) == 0); - ASSERT (((UINTN) Buffer & (sizeof (UINT64) - 1)) == 0); + ASSERT (((UINTN)Buffer & (sizeof (UINT64) - 1)) == 0); ReturnBuffer = Buffer; while (Length > 0) { - *(Buffer++) = MmioRead64 (StartAddress); + *(Buffer++) = MmioRead64 (StartAddress); StartAddress += sizeof (UINT64); - Length -= sizeof (UINT64); + Length -= sizeof (UINT64); } return ReturnBuffer; } - /** Copy data from system memory to MMIO region by using 8-bit access. @@ -226,24 +225,23 @@ MmioReadBuffer64 ( UINT8 * EFIAPI MmioWriteBuffer8 ( - IN UINTN StartAddress, - IN UINTN Length, - IN CONST UINT8 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT8 *Buffer ) { - VOID* ReturnBuffer; + VOID *ReturnBuffer; ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); - ReturnBuffer = (UINT8 *) Buffer; + ReturnBuffer = (UINT8 *)Buffer; while (Length-- > 0) { - MmioWrite8 (StartAddress++, *(Buffer++)); + MmioWrite8 (StartAddress++, *(Buffer++)); } return ReturnBuffer; - } /** @@ -273,34 +271,33 @@ MmioWriteBuffer8 ( UINT16 * EFIAPI MmioWriteBuffer16 ( - IN UINTN StartAddress, - IN UINTN Length, - IN CONST UINT16 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT16 *Buffer ) { - UINT16 *ReturnBuffer; + UINT16 *ReturnBuffer; ASSERT ((StartAddress & (sizeof (UINT16) - 1)) == 0); ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (UINT16) - 1)) == 0); - ASSERT (((UINTN) Buffer & (sizeof (UINT16) - 1)) == 0); + ASSERT (((UINTN)Buffer & (sizeof (UINT16) - 1)) == 0); - ReturnBuffer = (UINT16 *) Buffer; + ReturnBuffer = (UINT16 *)Buffer; while (Length > 0) { MmioWrite16 (StartAddress, *(Buffer++)); StartAddress += sizeof (UINT16); - Length -= sizeof (UINT16); + Length -= sizeof (UINT16); } return ReturnBuffer; } - /** Copy data from system memory to MMIO region by using 32-bit access. @@ -328,28 +325,28 @@ MmioWriteBuffer16 ( UINT32 * EFIAPI MmioWriteBuffer32 ( - IN UINTN StartAddress, - IN UINTN Length, - IN CONST UINT32 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT32 *Buffer ) { - UINT32 *ReturnBuffer; + UINT32 *ReturnBuffer; ASSERT ((StartAddress & (sizeof (UINT32) - 1)) == 0); ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (UINT32) - 1)) == 0); - ASSERT (((UINTN) Buffer & (sizeof (UINT32) - 1)) == 0); + ASSERT (((UINTN)Buffer & (sizeof (UINT32) - 1)) == 0); - ReturnBuffer = (UINT32 *) Buffer; + ReturnBuffer = (UINT32 *)Buffer; while (Length > 0) { MmioWrite32 (StartAddress, *(Buffer++)); StartAddress += sizeof (UINT32); - Length -= sizeof (UINT32); + Length -= sizeof (UINT32); } return ReturnBuffer; @@ -382,30 +379,29 @@ MmioWriteBuffer32 ( UINT64 * EFIAPI MmioWriteBuffer64 ( - IN UINTN StartAddress, - IN UINTN Length, - IN CONST UINT64 *Buffer + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT64 *Buffer ) { - UINT64 *ReturnBuffer; + UINT64 *ReturnBuffer; ASSERT ((StartAddress & (sizeof (UINT64) - 1)) == 0); ASSERT ((Length - 1) <= (MAX_ADDRESS - StartAddress)); - ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN) Buffer)); + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (UINT64) - 1)) == 0); - ASSERT (((UINTN) Buffer & (sizeof (UINT64) - 1)) == 0); + ASSERT (((UINTN)Buffer & (sizeof (UINT64) - 1)) == 0); - ReturnBuffer = (UINT64 *) Buffer; + ReturnBuffer = (UINT64 *)Buffer; while (Length > 0) { MmioWrite64 (StartAddress, *(Buffer++)); StartAddress += sizeof (UINT64); - Length -= sizeof (UINT64); + Length -= sizeof (UINT64); } return ReturnBuffer; } - diff --git a/MdePkg/Library/SmmIoLibSmmCpuIo2/SmmCpuIoLibInternal.h b/MdePkg/Library/SmmIoLibSmmCpuIo2/SmmCpuIoLibInternal.h index 51953e3..7a71a5a 100644 --- a/MdePkg/Library/SmmIoLibSmmCpuIo2/SmmCpuIoLibInternal.h +++ b/MdePkg/Library/SmmIoLibSmmCpuIo2/SmmCpuIoLibInternal.h @@ -20,7 +20,6 @@ #include #include - /** Reads registers in the EFI CPU I/O space. @@ -38,8 +37,8 @@ UINT64 EFIAPI IoReadWorker ( - IN UINTN Port, - IN EFI_SMM_IO_WIDTH Width + IN UINTN Port, + IN EFI_SMM_IO_WIDTH Width ); /** @@ -60,9 +59,9 @@ IoReadWorker ( UINT64 EFIAPI IoWriteWorker ( - IN UINTN Port, - IN EFI_SMM_IO_WIDTH Width, - IN UINT64 Data + IN UINTN Port, + IN EFI_SMM_IO_WIDTH Width, + IN UINT64 Data ); /** @@ -82,8 +81,8 @@ IoWriteWorker ( UINT64 EFIAPI MmioReadWorker ( - IN UINTN Address, - IN EFI_SMM_IO_WIDTH Width + IN UINTN Address, + IN EFI_SMM_IO_WIDTH Width ); /** @@ -104,9 +103,9 @@ MmioReadWorker ( UINT64 EFIAPI MmioWriteWorker ( - IN UINTN Address, - IN EFI_SMM_IO_WIDTH Width, - IN UINT64 Data + IN UINTN Address, + IN EFI_SMM_IO_WIDTH Width, + IN UINT64 Data ); #endif diff --git a/MdePkg/Library/SmmLibNull/SmmLibNull.c b/MdePkg/Library/SmmLibNull/SmmLibNull.c index 28c4f2f..797ad38 100644 --- a/MdePkg/Library/SmmLibNull/SmmLibNull.c +++ b/MdePkg/Library/SmmLibNull/SmmLibNull.c @@ -24,7 +24,6 @@ TriggerBootServiceSoftwareSmi ( return; } - /** Triggers an SMI at run time. @@ -40,8 +39,6 @@ TriggerRuntimeSoftwareSmi ( return; } - - /** Test if a boot time software SMI happened. @@ -62,7 +59,6 @@ IsBootServiceSoftwareSmi ( return FALSE; } - /** Test if a run time software SMI happened. diff --git a/MdePkg/Library/SmmMemLib/SmmMemLib.c b/MdePkg/Library/SmmMemLib/SmmMemLib.c index d1fc9e3..ef087d0 100644 --- a/MdePkg/Library/SmmMemLib/SmmMemLib.c +++ b/MdePkg/Library/SmmMemLib/SmmMemLib.c @@ -11,7 +11,6 @@ **/ - #include #include @@ -35,27 +34,27 @@ #define EFI_MEMORY_INITIALIZED 0x0200000000000000ULL #define EFI_MEMORY_TESTED 0x0400000000000000ULL -EFI_SMRAM_DESCRIPTOR *mSmmMemLibInternalSmramRanges; -UINTN mSmmMemLibInternalSmramCount; +EFI_SMRAM_DESCRIPTOR *mSmmMemLibInternalSmramRanges; +UINTN mSmmMemLibInternalSmramCount; // // Maximum support address used to check input buffer // EFI_PHYSICAL_ADDRESS mSmmMemLibInternalMaximumSupportAddress = 0; -UINTN mMemoryMapEntryCount; -EFI_MEMORY_DESCRIPTOR *mMemoryMap; -UINTN mDescriptorSize; +UINTN mMemoryMapEntryCount; +EFI_MEMORY_DESCRIPTOR *mMemoryMap; +UINTN mDescriptorSize; -EFI_GCD_MEMORY_SPACE_DESCRIPTOR *mSmmMemLibGcdMemSpace = NULL; -UINTN mSmmMemLibGcdMemNumberOfDesc = 0; +EFI_GCD_MEMORY_SPACE_DESCRIPTOR *mSmmMemLibGcdMemSpace = NULL; +UINTN mSmmMemLibGcdMemNumberOfDesc = 0; EFI_MEMORY_ATTRIBUTES_TABLE *mSmmMemLibMemoryAttributesTable = NULL; -VOID *mRegistrationEndOfDxe; -VOID *mRegistrationReadyToLock; +VOID *mRegistrationEndOfDxe; +VOID *mRegistrationReadyToLock; -BOOLEAN mSmmMemLibSmmReadyToLock = FALSE; +BOOLEAN mSmmMemLibSmmReadyToLock = FALSE; /** Calculate and save the maximum support address. @@ -66,25 +65,26 @@ SmmMemLibInternalCalculateMaximumSupportAddress ( VOID ) { - VOID *Hob; - UINT32 RegEax; - UINT8 PhysicalAddressBits; + VOID *Hob; + UINT32 RegEax; + UINT8 PhysicalAddressBits; // // Get physical address bits supported. // Hob = GetFirstHob (EFI_HOB_TYPE_CPU); if (Hob != NULL) { - PhysicalAddressBits = ((EFI_HOB_CPU *) Hob)->SizeOfMemorySpace; + PhysicalAddressBits = ((EFI_HOB_CPU *)Hob)->SizeOfMemorySpace; } else { AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL); if (RegEax >= 0x80000008) { AsmCpuid (0x80000008, &RegEax, NULL, NULL, NULL); - PhysicalAddressBits = (UINT8) RegEax; + PhysicalAddressBits = (UINT8)RegEax; } else { PhysicalAddressBits = 36; } } + // // IA-32e paging translates 48-bit linear addresses to 52-bit physical addresses. // @@ -124,7 +124,8 @@ SmmIsBufferOutsideSmmValid ( // if ((Length > mSmmMemLibInternalMaximumSupportAddress) || (Buffer > mSmmMemLibInternalMaximumSupportAddress) || - ((Length != 0) && (Buffer > (mSmmMemLibInternalMaximumSupportAddress - (Length - 1)))) ) { + ((Length != 0) && (Buffer > (mSmmMemLibInternalMaximumSupportAddress - (Length - 1))))) + { // // Overflow happen // @@ -138,9 +139,10 @@ SmmIsBufferOutsideSmmValid ( return FALSE; } - for (Index = 0; Index < mSmmMemLibInternalSmramCount; Index ++) { + for (Index = 0; Index < mSmmMemLibInternalSmramCount; Index++) { if (((Buffer >= mSmmMemLibInternalSmramRanges[Index].CpuStart) && (Buffer < mSmmMemLibInternalSmramRanges[Index].CpuStart + mSmmMemLibInternalSmramRanges[Index].PhysicalSize)) || - ((mSmmMemLibInternalSmramRanges[Index].CpuStart >= Buffer) && (mSmmMemLibInternalSmramRanges[Index].CpuStart < Buffer + Length))) { + ((mSmmMemLibInternalSmramRanges[Index].CpuStart >= Buffer) && (mSmmMemLibInternalSmramRanges[Index].CpuStart < Buffer + Length))) + { DEBUG (( DEBUG_ERROR, "SmmIsBufferOutsideSmmValid: Overlap: Buffer (0x%lx) - Length (0x%lx), ", @@ -161,17 +163,19 @@ SmmIsBufferOutsideSmmValid ( // Check override for Valid Communication Region // if (mSmmMemLibSmmReadyToLock) { - EFI_MEMORY_DESCRIPTOR *MemoryMap; - BOOLEAN InValidCommunicationRegion; + EFI_MEMORY_DESCRIPTOR *MemoryMap; + BOOLEAN InValidCommunicationRegion; InValidCommunicationRegion = FALSE; - MemoryMap = mMemoryMap; + MemoryMap = mMemoryMap; for (Index = 0; Index < mMemoryMapEntryCount; Index++) { if ((Buffer >= MemoryMap->PhysicalStart) && - (Buffer + Length <= MemoryMap->PhysicalStart + LShiftU64 (MemoryMap->NumberOfPages, EFI_PAGE_SHIFT))) { + (Buffer + Length <= MemoryMap->PhysicalStart + LShiftU64 (MemoryMap->NumberOfPages, EFI_PAGE_SHIFT))) + { InValidCommunicationRegion = TRUE; } - MemoryMap = NEXT_MEMORY_DESCRIPTOR(MemoryMap, mDescriptorSize); + + MemoryMap = NEXT_MEMORY_DESCRIPTOR (MemoryMap, mDescriptorSize); } if (!InValidCommunicationRegion) { @@ -189,7 +193,8 @@ SmmIsBufferOutsideSmmValid ( // for (Index = 0; Index < mSmmMemLibGcdMemNumberOfDesc; Index++) { if (((Buffer >= mSmmMemLibGcdMemSpace[Index].BaseAddress) && (Buffer < mSmmMemLibGcdMemSpace[Index].BaseAddress + mSmmMemLibGcdMemSpace[Index].Length)) || - ((mSmmMemLibGcdMemSpace[Index].BaseAddress >= Buffer) && (mSmmMemLibGcdMemSpace[Index].BaseAddress < Buffer + Length))) { + ((mSmmMemLibGcdMemSpace[Index].BaseAddress >= Buffer) && (mSmmMemLibGcdMemSpace[Index].BaseAddress < Buffer + Length))) + { DEBUG (( DEBUG_ERROR, "SmmIsBufferOutsideSmmValid: In Untested Memory Region: Buffer (0x%lx) - Length (0x%lx)\n", @@ -204,14 +209,15 @@ SmmIsBufferOutsideSmmValid ( // Check UEFI runtime memory with EFI_MEMORY_RO as invalid communication buffer. // if (mSmmMemLibMemoryAttributesTable != NULL) { - EFI_MEMORY_DESCRIPTOR *Entry; + EFI_MEMORY_DESCRIPTOR *Entry; Entry = (EFI_MEMORY_DESCRIPTOR *)(mSmmMemLibMemoryAttributesTable + 1); for (Index = 0; Index < mSmmMemLibMemoryAttributesTable->NumberOfEntries; Index++) { - if (Entry->Type == EfiRuntimeServicesCode || Entry->Type == EfiRuntimeServicesData) { + if ((Entry->Type == EfiRuntimeServicesCode) || (Entry->Type == EfiRuntimeServicesData)) { if ((Entry->Attribute & EFI_MEMORY_RO) != 0) { if (((Buffer >= Entry->PhysicalStart) && (Buffer < Entry->PhysicalStart + LShiftU64 (Entry->NumberOfPages, EFI_PAGE_SHIFT))) || - ((Entry->PhysicalStart >= Buffer) && (Entry->PhysicalStart < Buffer + Length))) { + ((Entry->PhysicalStart >= Buffer) && (Entry->PhysicalStart < Buffer + Length))) + { DEBUG (( DEBUG_ERROR, "SmmIsBufferOutsideSmmValid: In RuntimeCode Region: Buffer (0x%lx) - Length (0x%lx)\n", @@ -222,10 +228,12 @@ SmmIsBufferOutsideSmmValid ( } } } + Entry = NEXT_MEMORY_DESCRIPTOR (Entry, mSmmMemLibMemoryAttributesTable->DescriptorSize); } } } + return TRUE; } @@ -258,6 +266,7 @@ SmmCopyMemToSmram ( DEBUG ((DEBUG_ERROR, "SmmCopyMemToSmram: Security Violation: Source (0x%x), Length (0x%x)\n", SourceBuffer, Length)); return EFI_SECURITY_VIOLATION; } + CopyMem (DestinationBuffer, SourceBuffer, Length); return EFI_SUCCESS; } @@ -291,6 +300,7 @@ SmmCopyMemFromSmram ( DEBUG ((DEBUG_ERROR, "SmmCopyMemFromSmram: Security Violation: Destination (0x%x), Length (0x%x)\n", DestinationBuffer, Length)); return EFI_SECURITY_VIOLATION; } + CopyMem (DestinationBuffer, SourceBuffer, Length); return EFI_SUCCESS; } @@ -325,10 +335,12 @@ SmmCopyMem ( DEBUG ((DEBUG_ERROR, "SmmCopyMem: Security Violation: Destination (0x%x), Length (0x%x)\n", DestinationBuffer, Length)); return EFI_SECURITY_VIOLATION; } + if (!SmmIsBufferOutsideSmmValid ((EFI_PHYSICAL_ADDRESS)(UINTN)SourceBuffer, Length)) { DEBUG ((DEBUG_ERROR, "SmmCopyMem: Security Violation: Source (0x%x), Length (0x%x)\n", SourceBuffer, Length)); return EFI_SECURITY_VIOLATION; } + CopyMem (DestinationBuffer, SourceBuffer, Length); return EFI_SUCCESS; } @@ -361,6 +373,7 @@ SmmSetMem ( DEBUG ((DEBUG_ERROR, "SmmSetMem: Security Violation: Source (0x%x), Length (0x%x)\n", Buffer, Length)); return EFI_SECURITY_VIOLATION; } + SetMem (Buffer, Length, Value); return EFI_SUCCESS; } @@ -381,15 +394,16 @@ SmmMemLibInternalGetGcdMemoryMap ( Status = gDS->GetMemorySpaceMap (&NumberOfDescriptors, &MemSpaceMap); if (EFI_ERROR (Status)) { - return ; + return; } mSmmMemLibGcdMemNumberOfDesc = 0; for (Index = 0; Index < NumberOfDescriptors; Index++) { - if (MemSpaceMap[Index].GcdMemoryType == EfiGcdMemoryTypeReserved && - (MemSpaceMap[Index].Capabilities & (EFI_MEMORY_PRESENT | EFI_MEMORY_INITIALIZED | EFI_MEMORY_TESTED)) == - (EFI_MEMORY_PRESENT | EFI_MEMORY_INITIALIZED) - ) { + if ((MemSpaceMap[Index].GcdMemoryType == EfiGcdMemoryTypeReserved) && + ((MemSpaceMap[Index].Capabilities & (EFI_MEMORY_PRESENT | EFI_MEMORY_INITIALIZED | EFI_MEMORY_TESTED)) == + (EFI_MEMORY_PRESENT | EFI_MEMORY_INITIALIZED)) + ) + { mSmmMemLibGcdMemNumberOfDesc++; } } @@ -399,19 +413,20 @@ SmmMemLibInternalGetGcdMemoryMap ( if (mSmmMemLibGcdMemSpace == NULL) { mSmmMemLibGcdMemNumberOfDesc = 0; gBS->FreePool (MemSpaceMap); - return ; + return; } mSmmMemLibGcdMemNumberOfDesc = 0; for (Index = 0; Index < NumberOfDescriptors; Index++) { - if (MemSpaceMap[Index].GcdMemoryType == EfiGcdMemoryTypeReserved && - (MemSpaceMap[Index].Capabilities & (EFI_MEMORY_PRESENT | EFI_MEMORY_INITIALIZED | EFI_MEMORY_TESTED)) == - (EFI_MEMORY_PRESENT | EFI_MEMORY_INITIALIZED) - ) { + if ((MemSpaceMap[Index].GcdMemoryType == EfiGcdMemoryTypeReserved) && + ((MemSpaceMap[Index].Capabilities & (EFI_MEMORY_PRESENT | EFI_MEMORY_INITIALIZED | EFI_MEMORY_TESTED)) == + (EFI_MEMORY_PRESENT | EFI_MEMORY_INITIALIZED)) + ) + { CopyMem ( &mSmmMemLibGcdMemSpace[mSmmMemLibGcdMemNumberOfDesc], &MemSpaceMap[Index], - sizeof(EFI_GCD_MEMORY_SPACE_DESCRIPTOR) + sizeof (EFI_GCD_MEMORY_SPACE_DESCRIPTOR) ); mSmmMemLibGcdMemNumberOfDesc++; } @@ -434,7 +449,7 @@ SmmMemLibInternalGetUefiMemoryAttributesTable ( Status = EfiGetSystemConfigurationTable (&gEfiMemoryAttributesTableGuid, (VOID **)&MemoryAttributesTable); if (!EFI_ERROR (Status) && (MemoryAttributesTable != NULL)) { - MemoryAttributesTableSize = sizeof(EFI_MEMORY_ATTRIBUTES_TABLE) + MemoryAttributesTable->DescriptorSize * MemoryAttributesTable->NumberOfEntries; + MemoryAttributesTableSize = sizeof (EFI_MEMORY_ATTRIBUTES_TABLE) + MemoryAttributesTable->DescriptorSize * MemoryAttributesTable->NumberOfEntries; mSmmMemLibMemoryAttributesTable = AllocateCopyPool (MemoryAttributesTableSize, MemoryAttributesTable); ASSERT (mSmmMemLibMemoryAttributesTable != NULL); } @@ -457,26 +472,26 @@ SmmLibInternalEndOfDxeNotify ( IN EFI_HANDLE Handle ) { - EFI_STATUS Status; - UINTN MapKey; - UINTN MemoryMapSize; - EFI_MEMORY_DESCRIPTOR *MemoryMap; - EFI_MEMORY_DESCRIPTOR *MemoryMapStart; - EFI_MEMORY_DESCRIPTOR *SmmMemoryMapStart; - UINTN MemoryMapEntryCount; - UINTN DescriptorSize; - UINT32 DescriptorVersion; - UINTN Index; + EFI_STATUS Status; + UINTN MapKey; + UINTN MemoryMapSize; + EFI_MEMORY_DESCRIPTOR *MemoryMap; + EFI_MEMORY_DESCRIPTOR *MemoryMapStart; + EFI_MEMORY_DESCRIPTOR *SmmMemoryMapStart; + UINTN MemoryMapEntryCount; + UINTN DescriptorSize; + UINT32 DescriptorVersion; + UINTN Index; MemoryMapSize = 0; - MemoryMap = NULL; - Status = gBS->GetMemoryMap ( - &MemoryMapSize, - MemoryMap, - &MapKey, - &DescriptorSize, - &DescriptorVersion - ); + MemoryMap = NULL; + Status = gBS->GetMemoryMap ( + &MemoryMapSize, + MemoryMap, + &MapKey, + &DescriptorSize, + &DescriptorVersion + ); ASSERT (Status == EFI_BUFFER_TOO_SMALL); do { @@ -484,12 +499,12 @@ SmmLibInternalEndOfDxeNotify ( ASSERT (MemoryMap != NULL); Status = gBS->GetMemoryMap ( - &MemoryMapSize, - MemoryMap, - &MapKey, - &DescriptorSize, - &DescriptorVersion - ); + &MemoryMapSize, + MemoryMap, + &MapKey, + &DescriptorSize, + &DescriptorVersion + ); if (EFI_ERROR (Status)) { gBS->FreePool (MemoryMap); } @@ -498,21 +513,23 @@ SmmLibInternalEndOfDxeNotify ( // // Get Count // - mDescriptorSize = DescriptorSize; - MemoryMapEntryCount = MemoryMapSize/DescriptorSize; - MemoryMapStart = MemoryMap; + mDescriptorSize = DescriptorSize; + MemoryMapEntryCount = MemoryMapSize/DescriptorSize; + MemoryMapStart = MemoryMap; mMemoryMapEntryCount = 0; for (Index = 0; Index < MemoryMapEntryCount; Index++) { switch (MemoryMap->Type) { - case EfiReservedMemoryType: - case EfiRuntimeServicesCode: - case EfiRuntimeServicesData: - case EfiACPIMemoryNVS: - mMemoryMapEntryCount++; - break; + case EfiReservedMemoryType: + case EfiRuntimeServicesCode: + case EfiRuntimeServicesData: + case EfiACPIMemoryNVS: + mMemoryMapEntryCount++; + break; } - MemoryMap = NEXT_MEMORY_DESCRIPTOR(MemoryMap, DescriptorSize); + + MemoryMap = NEXT_MEMORY_DESCRIPTOR (MemoryMap, DescriptorSize); } + MemoryMap = MemoryMapStart; // @@ -523,18 +540,20 @@ SmmLibInternalEndOfDxeNotify ( SmmMemoryMapStart = mMemoryMap; for (Index = 0; Index < MemoryMapEntryCount; Index++) { switch (MemoryMap->Type) { - case EfiReservedMemoryType: - case EfiRuntimeServicesCode: - case EfiRuntimeServicesData: - case EfiACPIMemoryNVS: - CopyMem (mMemoryMap, MemoryMap, DescriptorSize); - mMemoryMap = NEXT_MEMORY_DESCRIPTOR(mMemoryMap, DescriptorSize); - break; + case EfiReservedMemoryType: + case EfiRuntimeServicesCode: + case EfiRuntimeServicesData: + case EfiACPIMemoryNVS: + CopyMem (mMemoryMap, MemoryMap, DescriptorSize); + mMemoryMap = NEXT_MEMORY_DESCRIPTOR (mMemoryMap, DescriptorSize); + break; } - MemoryMap = NEXT_MEMORY_DESCRIPTOR(MemoryMap, DescriptorSize); + + MemoryMap = NEXT_MEMORY_DESCRIPTOR (MemoryMap, DescriptorSize); } + mMemoryMap = SmmMemoryMapStart; - MemoryMap = MemoryMapStart; + MemoryMap = MemoryMapStart; gBS->FreePool (MemoryMap); @@ -571,6 +590,7 @@ SmmLibInternalReadyToLockNotify ( mSmmMemLibSmmReadyToLock = TRUE; return EFI_SUCCESS; } + /** The constructor function initializes the Smm Mem library @@ -587,9 +607,9 @@ SmmMemLibConstructor ( IN EFI_SYSTEM_TABLE *SystemTable ) { - EFI_STATUS Status; - EFI_SMM_ACCESS2_PROTOCOL *SmmAccess; - UINTN Size; + EFI_STATUS Status; + EFI_SMM_ACCESS2_PROTOCOL *SmmAccess; + UINTN Size; // // Get SMRAM information @@ -597,7 +617,7 @@ SmmMemLibConstructor ( Status = gBS->LocateProtocol (&gEfiSmmAccess2ProtocolGuid, NULL, (VOID **)&SmmAccess); ASSERT_EFI_ERROR (Status); - Size = 0; + Size = 0; Status = SmmAccess->GetCapabilities (SmmAccess, &Size, NULL); ASSERT (Status == EFI_BUFFER_TOO_SMALL); diff --git a/MdePkg/Library/SmmMemoryAllocationLib/MemoryAllocationLib.c b/MdePkg/Library/SmmMemoryAllocationLib/MemoryAllocationLib.c index c0247a3..3ab2c1e 100644 --- a/MdePkg/Library/SmmMemoryAllocationLib/MemoryAllocationLib.c +++ b/MdePkg/Library/SmmMemoryAllocationLib/MemoryAllocationLib.c @@ -67,11 +67,11 @@ SmmMemoryAllocationLibConstructor ( // // Get SMRAM range information // - Size = 0; + Size = 0; Status = SmmAccess->GetCapabilities (SmmAccess, &Size, NULL); ASSERT (Status == EFI_BUFFER_TOO_SMALL); - mSmramRanges = (EFI_SMRAM_DESCRIPTOR *) AllocatePool (Size); + mSmramRanges = (EFI_SMRAM_DESCRIPTOR *)AllocatePool (Size); ASSERT (mSmramRanges != NULL); Status = SmmAccess->GetCapabilities (SmmAccess, &Size, mSmramRanges); @@ -114,14 +114,15 @@ SmmMemoryAllocationLibDestructor ( BOOLEAN EFIAPI BufferInSmram ( - IN VOID *Buffer + IN VOID *Buffer ) { UINTN Index; - for (Index = 0; Index < mSmramRangeCount; Index ++) { - if (((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer >= mSmramRanges[Index].CpuStart) && - ((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer < (mSmramRanges[Index].CpuStart + mSmramRanges[Index].PhysicalSize))) { + for (Index = 0; Index < mSmramRangeCount; Index++) { + if (((EFI_PHYSICAL_ADDRESS)(UINTN)Buffer >= mSmramRanges[Index].CpuStart) && + ((EFI_PHYSICAL_ADDRESS)(UINTN)Buffer < (mSmramRanges[Index].CpuStart + mSmramRanges[Index].PhysicalSize))) + { return TRUE; } } @@ -160,7 +161,8 @@ InternalAllocatePages ( if (EFI_ERROR (Status)) { return NULL; } - return (VOID *) (UINTN) Memory; + + return (VOID *)(UINTN)Memory; } /** @@ -261,14 +263,15 @@ FreePages ( // When Buffer is in SMRAM range, it should be allocated by gSmst->SmmAllocatePages() service. // So, gSmst->SmmFreePages() service is used to free it. // - Status = gSmst->SmmFreePages ((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer, Pages); + Status = gSmst->SmmFreePages ((EFI_PHYSICAL_ADDRESS)(UINTN)Buffer, Pages); } else { // // When Buffer is out of SMRAM range, it should be allocated by gBS->AllocatePages() service. // So, gBS->FreePages() service is used to free it. // - Status = gBS->FreePages ((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer, Pages); + Status = gBS->FreePages ((EFI_PHYSICAL_ADDRESS)(UINTN)Buffer, Pages); } + ASSERT_EFI_ERROR (Status); } @@ -313,23 +316,25 @@ InternalAllocateAlignedPages ( if (Pages == 0) { return NULL; } + if (Alignment > EFI_PAGE_SIZE) { // // Calculate the total number of pages since alignment is larger than page size. // - AlignmentMask = Alignment - 1; - RealPages = Pages + EFI_SIZE_TO_PAGES (Alignment); + AlignmentMask = Alignment - 1; + RealPages = Pages + EFI_SIZE_TO_PAGES (Alignment); // // Make sure that Pages plus EFI_SIZE_TO_PAGES (Alignment) does not overflow. // ASSERT (RealPages > Pages); - Status = gSmst->SmmAllocatePages (AllocateAnyPages, MemoryType, RealPages, &Memory); + Status = gSmst->SmmAllocatePages (AllocateAnyPages, MemoryType, RealPages, &Memory); if (EFI_ERROR (Status)) { return NULL; } - AlignedMemory = ((UINTN) Memory + AlignmentMask) & ~AlignmentMask; - UnalignedPages = EFI_SIZE_TO_PAGES (AlignedMemory - (UINTN) Memory); + + AlignedMemory = ((UINTN)Memory + AlignmentMask) & ~AlignmentMask; + UnalignedPages = EFI_SIZE_TO_PAGES (AlignedMemory - (UINTN)Memory); if (UnalignedPages > 0) { // // Free first unaligned page(s). @@ -337,6 +342,7 @@ InternalAllocateAlignedPages ( Status = gSmst->SmmFreePages (Memory, UnalignedPages); ASSERT_EFI_ERROR (Status); } + Memory = AlignedMemory + EFI_PAGES_TO_SIZE (Pages); UnalignedPages = RealPages - Pages - UnalignedPages; if (UnalignedPages > 0) { @@ -354,9 +360,11 @@ InternalAllocateAlignedPages ( if (EFI_ERROR (Status)) { return NULL; } - AlignedMemory = (UINTN) Memory; + + AlignedMemory = (UINTN)Memory; } - return (VOID *) AlignedMemory; + + return (VOID *)AlignedMemory; } /** @@ -478,14 +486,15 @@ FreeAlignedPages ( // When Buffer is in SMRAM range, it should be allocated by gSmst->SmmAllocatePages() service. // So, gSmst->SmmFreePages() service is used to free it. // - Status = gSmst->SmmFreePages ((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer, Pages); + Status = gSmst->SmmFreePages ((EFI_PHYSICAL_ADDRESS)(UINTN)Buffer, Pages); } else { // // When Buffer is out of SMRAM range, it should be allocated by gBS->AllocatePages() service. // So, gBS->FreePages() service is used to free it. // - Status = gBS->FreePages ((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer, Pages); + Status = gBS->FreePages ((EFI_PHYSICAL_ADDRESS)(UINTN)Buffer, Pages); } + ASSERT_EFI_ERROR (Status); } @@ -516,6 +525,7 @@ InternalAllocatePool ( if (EFI_ERROR (Status)) { Memory = NULL; } + return Memory; } @@ -611,6 +621,7 @@ InternalAllocateZeroPool ( if (Memory != NULL) { Memory = ZeroMem (Memory, AllocationSize); } + return Memory; } @@ -707,12 +718,13 @@ InternalAllocateCopyPool ( VOID *Memory; ASSERT (Buffer != NULL); - ASSERT (AllocationSize <= (MAX_ADDRESS - (UINTN) Buffer + 1)); + ASSERT (AllocationSize <= (MAX_ADDRESS - (UINTN)Buffer + 1)); Memory = InternalAllocatePool (PoolType, AllocationSize); if (Memory != NULL) { - Memory = CopyMem (Memory, Buffer, AllocationSize); + Memory = CopyMem (Memory, Buffer, AllocationSize); } + return Memory; } @@ -833,10 +845,11 @@ InternalReallocatePool ( VOID *NewBuffer; NewBuffer = InternalAllocateZeroPool (PoolType, NewSize); - if (NewBuffer != NULL && OldBuffer != NULL) { + if ((NewBuffer != NULL) && (OldBuffer != NULL)) { CopyMem (NewBuffer, OldBuffer, MIN (OldSize, NewSize)); FreePool (OldBuffer); } + return NewBuffer; } @@ -954,10 +967,10 @@ ReallocateReservedPool ( VOID EFIAPI FreePool ( - IN VOID *Buffer + IN VOID *Buffer ) { - EFI_STATUS Status; + EFI_STATUS Status; if (BufferInSmram (Buffer)) { // @@ -972,5 +985,6 @@ FreePool ( // Status = gBS->FreePool (Buffer); } + ASSERT_EFI_ERROR (Status); } diff --git a/MdePkg/Library/SmmPciExpressLib/PciExpressLib.c b/MdePkg/Library/SmmPciExpressLib/PciExpressLib.c index 97bd32c..d7876a9 100644 --- a/MdePkg/Library/SmmPciExpressLib/PciExpressLib.c +++ b/MdePkg/Library/SmmPciExpressLib/PciExpressLib.c @@ -22,8 +22,8 @@ /// /// Module global that contains the base physical address and size of the PCI Express MMIO range. /// -UINTN mSmmPciExpressLibPciExpressBaseAddress = 0; -UINTN mSmmPciExpressLibPciExpressBaseSize = 0; +UINTN mSmmPciExpressLibPciExpressBaseAddress = 0; +UINTN mSmmPciExpressLibPciExpressBaseSize = 0; /** The constructor function caches the PCI Express Base Address @@ -36,17 +36,17 @@ UINTN mSmmPciExpressLibPciExpressBaseSize = 0; EFI_STATUS EFIAPI SmmPciExpressLibConstructor ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ) + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) { - // - // Cache the physical address and size of the PCI Express MMIO range into a module global variable - // - mSmmPciExpressLibPciExpressBaseAddress = (UINTN) PcdGet64 (PcdPciExpressBaseAddress); - mSmmPciExpressLibPciExpressBaseSize = (UINTN) PcdGet64 (PcdPciExpressBaseSize); + // + // Cache the physical address and size of the PCI Express MMIO range into a module global variable + // + mSmmPciExpressLibPciExpressBaseAddress = (UINTN)PcdGet64 (PcdPciExpressBaseAddress); + mSmmPciExpressLibPciExpressBaseSize = (UINTN)PcdGet64 (PcdPciExpressBaseSize); - return EFI_SUCCESS; + return EFI_SUCCESS; } /** @@ -84,11 +84,11 @@ SmmPciExpressLibConstructor ( RETURN_STATUS EFIAPI PciExpressRegisterForRuntimeAccess ( - IN UINTN Address - ) + IN UINTN Address + ) { - ASSERT_INVALID_PCI_ADDRESS (Address); - return RETURN_UNSUPPORTED; + ASSERT_INVALID_PCI_ADDRESS (Address); + return RETURN_UNSUPPORTED; } /** @@ -109,20 +109,21 @@ PciExpressRegisterForRuntimeAccess ( **/ UINTN GetPciExpressAddress ( - IN UINTN Address - ) + IN UINTN Address + ) { - // - // Make sure Address is valid - // - ASSERT_INVALID_PCI_ADDRESS (Address); - // - // Make sure the Address is in MMCONF address space - // - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINTN) -1; - } - return mSmmPciExpressLibPciExpressBaseAddress + Address; + // + // Make sure Address is valid + // + ASSERT_INVALID_PCI_ADDRESS (Address); + // + // Make sure the Address is in MMCONF address space + // + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINTN)-1; + } + + return mSmmPciExpressLibPciExpressBaseAddress + Address; } /** @@ -144,13 +145,14 @@ GetPciExpressAddress ( UINT8 EFIAPI PciExpressRead8 ( - IN UINTN Address - ) + IN UINTN Address + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT8) -1; - } - return MmioRead8 (GetPciExpressAddress (Address)); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT8)-1; + } + + return MmioRead8 (GetPciExpressAddress (Address)); } /** @@ -173,14 +175,15 @@ PciExpressRead8 ( UINT8 EFIAPI PciExpressWrite8 ( - IN UINTN Address, - IN UINT8 Value - ) + IN UINTN Address, + IN UINT8 Value + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT8) -1; - } - return MmioWrite8 (GetPciExpressAddress (Address), Value); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT8)-1; + } + + return MmioWrite8 (GetPciExpressAddress (Address), Value); } /** @@ -207,14 +210,15 @@ PciExpressWrite8 ( UINT8 EFIAPI PciExpressOr8 ( - IN UINTN Address, - IN UINT8 OrData - ) + IN UINTN Address, + IN UINT8 OrData + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT8) -1; - } - return MmioOr8 (GetPciExpressAddress (Address), OrData); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT8)-1; + } + + return MmioOr8 (GetPciExpressAddress (Address), OrData); } /** @@ -241,14 +245,15 @@ PciExpressOr8 ( UINT8 EFIAPI PciExpressAnd8 ( - IN UINTN Address, - IN UINT8 AndData - ) + IN UINTN Address, + IN UINT8 AndData + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT8) -1; - } - return MmioAnd8 (GetPciExpressAddress (Address), AndData); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT8)-1; + } + + return MmioAnd8 (GetPciExpressAddress (Address), AndData); } /** @@ -277,19 +282,20 @@ PciExpressAnd8 ( UINT8 EFIAPI PciExpressAndThenOr8 ( - IN UINTN Address, - IN UINT8 AndData, - IN UINT8 OrData - ) + IN UINTN Address, + IN UINT8 AndData, + IN UINT8 OrData + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT8) -1; - } - return MmioAndThenOr8 ( - GetPciExpressAddress (Address), - AndData, - OrData - ); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT8)-1; + } + + return MmioAndThenOr8 ( + GetPciExpressAddress (Address), + AndData, + OrData + ); } /** @@ -317,19 +323,20 @@ PciExpressAndThenOr8 ( UINT8 EFIAPI PciExpressBitFieldRead8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit - ) + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT8) -1; - } - return MmioBitFieldRead8 ( - GetPciExpressAddress (Address), - StartBit, - EndBit - ); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT8)-1; + } + + return MmioBitFieldRead8 ( + GetPciExpressAddress (Address), + StartBit, + EndBit + ); } /** @@ -360,21 +367,22 @@ PciExpressBitFieldRead8 ( UINT8 EFIAPI PciExpressBitFieldWrite8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value - ) + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT8) -1; - } - return MmioBitFieldWrite8 ( - GetPciExpressAddress (Address), - StartBit, - EndBit, - Value - ); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT8)-1; + } + + return MmioBitFieldWrite8 ( + GetPciExpressAddress (Address), + StartBit, + EndBit, + Value + ); } /** @@ -408,21 +416,22 @@ PciExpressBitFieldWrite8 ( UINT8 EFIAPI PciExpressBitFieldOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData - ) + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT8) -1; - } - return MmioBitFieldOr8 ( - GetPciExpressAddress (Address), - StartBit, - EndBit, - OrData - ); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT8)-1; + } + + return MmioBitFieldOr8 ( + GetPciExpressAddress (Address), + StartBit, + EndBit, + OrData + ); } /** @@ -456,21 +465,22 @@ PciExpressBitFieldOr8 ( UINT8 EFIAPI PciExpressBitFieldAnd8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData - ) + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT8) -1; - } - return MmioBitFieldAnd8 ( - GetPciExpressAddress (Address), - StartBit, - EndBit, - AndData - ); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT8)-1; + } + + return MmioBitFieldAnd8 ( + GetPciExpressAddress (Address), + StartBit, + EndBit, + AndData + ); } /** @@ -508,23 +518,24 @@ PciExpressBitFieldAnd8 ( UINT8 EFIAPI PciExpressBitFieldAndThenOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData - ) + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT8) -1; - } - return MmioBitFieldAndThenOr8 ( - GetPciExpressAddress (Address), - StartBit, - EndBit, - AndData, - OrData - ); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT8)-1; + } + + return MmioBitFieldAndThenOr8 ( + GetPciExpressAddress (Address), + StartBit, + EndBit, + AndData, + OrData + ); } /** @@ -547,13 +558,14 @@ PciExpressBitFieldAndThenOr8 ( UINT16 EFIAPI PciExpressRead16 ( - IN UINTN Address - ) + IN UINTN Address + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT16) -1; - } - return MmioRead16 (GetPciExpressAddress (Address)); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT16)-1; + } + + return MmioRead16 (GetPciExpressAddress (Address)); } /** @@ -577,14 +589,15 @@ PciExpressRead16 ( UINT16 EFIAPI PciExpressWrite16 ( - IN UINTN Address, - IN UINT16 Value - ) + IN UINTN Address, + IN UINT16 Value + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT16) -1; - } - return MmioWrite16 (GetPciExpressAddress (Address), Value); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT16)-1; + } + + return MmioWrite16 (GetPciExpressAddress (Address), Value); } /** @@ -612,14 +625,15 @@ PciExpressWrite16 ( UINT16 EFIAPI PciExpressOr16 ( - IN UINTN Address, - IN UINT16 OrData - ) + IN UINTN Address, + IN UINT16 OrData + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT16) -1; - } - return MmioOr16 (GetPciExpressAddress (Address), OrData); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT16)-1; + } + + return MmioOr16 (GetPciExpressAddress (Address), OrData); } /** @@ -647,14 +661,15 @@ PciExpressOr16 ( UINT16 EFIAPI PciExpressAnd16 ( - IN UINTN Address, - IN UINT16 AndData - ) + IN UINTN Address, + IN UINT16 AndData + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT16) -1; - } - return MmioAnd16 (GetPciExpressAddress (Address), AndData); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT16)-1; + } + + return MmioAnd16 (GetPciExpressAddress (Address), AndData); } /** @@ -684,19 +699,20 @@ PciExpressAnd16 ( UINT16 EFIAPI PciExpressAndThenOr16 ( - IN UINTN Address, - IN UINT16 AndData, - IN UINT16 OrData - ) + IN UINTN Address, + IN UINT16 AndData, + IN UINT16 OrData + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT16) -1; - } - return MmioAndThenOr16 ( - GetPciExpressAddress (Address), - AndData, - OrData - ); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT16)-1; + } + + return MmioAndThenOr16 ( + GetPciExpressAddress (Address), + AndData, + OrData + ); } /** @@ -725,19 +741,20 @@ PciExpressAndThenOr16 ( UINT16 EFIAPI PciExpressBitFieldRead16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit - ) + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT16) -1; - } - return MmioBitFieldRead16 ( - GetPciExpressAddress (Address), - StartBit, - EndBit - ); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT16)-1; + } + + return MmioBitFieldRead16 ( + GetPciExpressAddress (Address), + StartBit, + EndBit + ); } /** @@ -769,21 +786,22 @@ PciExpressBitFieldRead16 ( UINT16 EFIAPI PciExpressBitFieldWrite16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value - ) + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT16) -1; - } - return MmioBitFieldWrite16 ( - GetPciExpressAddress (Address), - StartBit, - EndBit, - Value - ); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT16)-1; + } + + return MmioBitFieldWrite16 ( + GetPciExpressAddress (Address), + StartBit, + EndBit, + Value + ); } /** @@ -818,21 +836,22 @@ PciExpressBitFieldWrite16 ( UINT16 EFIAPI PciExpressBitFieldOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData - ) + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT16) -1; - } - return MmioBitFieldOr16 ( - GetPciExpressAddress (Address), - StartBit, - EndBit, - OrData - ); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT16)-1; + } + + return MmioBitFieldOr16 ( + GetPciExpressAddress (Address), + StartBit, + EndBit, + OrData + ); } /** @@ -867,21 +886,22 @@ PciExpressBitFieldOr16 ( UINT16 EFIAPI PciExpressBitFieldAnd16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData - ) + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT16) -1; - } - return MmioBitFieldAnd16 ( - GetPciExpressAddress (Address), - StartBit, - EndBit, - AndData - ); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT16)-1; + } + + return MmioBitFieldAnd16 ( + GetPciExpressAddress (Address), + StartBit, + EndBit, + AndData + ); } /** @@ -920,23 +940,24 @@ PciExpressBitFieldAnd16 ( UINT16 EFIAPI PciExpressBitFieldAndThenOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData - ) + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT16) -1; - } - return MmioBitFieldAndThenOr16 ( - GetPciExpressAddress (Address), - StartBit, - EndBit, - AndData, - OrData - ); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT16)-1; + } + + return MmioBitFieldAndThenOr16 ( + GetPciExpressAddress (Address), + StartBit, + EndBit, + AndData, + OrData + ); } /** @@ -959,13 +980,14 @@ PciExpressBitFieldAndThenOr16 ( UINT32 EFIAPI PciExpressRead32 ( - IN UINTN Address - ) + IN UINTN Address + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT32) -1; - } - return MmioRead32 (GetPciExpressAddress (Address)); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT32)-1; + } + + return MmioRead32 (GetPciExpressAddress (Address)); } /** @@ -989,14 +1011,15 @@ PciExpressRead32 ( UINT32 EFIAPI PciExpressWrite32 ( - IN UINTN Address, - IN UINT32 Value - ) + IN UINTN Address, + IN UINT32 Value + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT32) -1; - } - return MmioWrite32 (GetPciExpressAddress (Address), Value); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT32)-1; + } + + return MmioWrite32 (GetPciExpressAddress (Address), Value); } /** @@ -1024,14 +1047,15 @@ PciExpressWrite32 ( UINT32 EFIAPI PciExpressOr32 ( - IN UINTN Address, - IN UINT32 OrData - ) + IN UINTN Address, + IN UINT32 OrData + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT32) -1; - } - return MmioOr32 (GetPciExpressAddress (Address), OrData); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT32)-1; + } + + return MmioOr32 (GetPciExpressAddress (Address), OrData); } /** @@ -1059,14 +1083,15 @@ PciExpressOr32 ( UINT32 EFIAPI PciExpressAnd32 ( - IN UINTN Address, - IN UINT32 AndData - ) + IN UINTN Address, + IN UINT32 AndData + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT32) -1; - } - return MmioAnd32 (GetPciExpressAddress (Address), AndData); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT32)-1; + } + + return MmioAnd32 (GetPciExpressAddress (Address), AndData); } /** @@ -1096,19 +1121,20 @@ PciExpressAnd32 ( UINT32 EFIAPI PciExpressAndThenOr32 ( - IN UINTN Address, - IN UINT32 AndData, - IN UINT32 OrData - ) + IN UINTN Address, + IN UINT32 AndData, + IN UINT32 OrData + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT32) -1; - } - return MmioAndThenOr32 ( - GetPciExpressAddress (Address), - AndData, - OrData - ); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT32)-1; + } + + return MmioAndThenOr32 ( + GetPciExpressAddress (Address), + AndData, + OrData + ); } /** @@ -1137,19 +1163,20 @@ PciExpressAndThenOr32 ( UINT32 EFIAPI PciExpressBitFieldRead32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit - ) + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT32) -1; - } - return MmioBitFieldRead32 ( - GetPciExpressAddress (Address), - StartBit, - EndBit - ); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT32)-1; + } + + return MmioBitFieldRead32 ( + GetPciExpressAddress (Address), + StartBit, + EndBit + ); } /** @@ -1181,21 +1208,22 @@ PciExpressBitFieldRead32 ( UINT32 EFIAPI PciExpressBitFieldWrite32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value - ) + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT32) -1; - } - return MmioBitFieldWrite32 ( - GetPciExpressAddress (Address), - StartBit, - EndBit, - Value - ); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT32)-1; + } + + return MmioBitFieldWrite32 ( + GetPciExpressAddress (Address), + StartBit, + EndBit, + Value + ); } /** @@ -1230,21 +1258,22 @@ PciExpressBitFieldWrite32 ( UINT32 EFIAPI PciExpressBitFieldOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData - ) + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT32) -1; - } - return MmioBitFieldOr32 ( - GetPciExpressAddress (Address), - StartBit, - EndBit, - OrData - ); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT32)-1; + } + + return MmioBitFieldOr32 ( + GetPciExpressAddress (Address), + StartBit, + EndBit, + OrData + ); } /** @@ -1279,21 +1308,22 @@ PciExpressBitFieldOr32 ( UINT32 EFIAPI PciExpressBitFieldAnd32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData - ) + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT32) -1; - } - return MmioBitFieldAnd32 ( - GetPciExpressAddress (Address), - StartBit, - EndBit, - AndData - ); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT32)-1; + } + + return MmioBitFieldAnd32 ( + GetPciExpressAddress (Address), + StartBit, + EndBit, + AndData + ); } /** @@ -1332,23 +1362,24 @@ PciExpressBitFieldAnd32 ( UINT32 EFIAPI PciExpressBitFieldAndThenOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData - ) + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData + ) { - if (Address >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINT32) -1; - } - return MmioBitFieldAndThenOr32 ( - GetPciExpressAddress (Address), - StartBit, - EndBit, - AndData, - OrData - ); + if (Address >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINT32)-1; + } + + return MmioBitFieldAndThenOr32 ( + GetPciExpressAddress (Address), + StartBit, + EndBit, + AndData, + OrData + ); } /** @@ -1378,87 +1409,87 @@ PciExpressBitFieldAndThenOr32 ( UINTN EFIAPI PciExpressReadBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - OUT VOID *Buffer - ) + IN UINTN StartAddress, + IN UINTN Size, + OUT VOID *Buffer + ) { - UINTN ReturnValue; - - // - // Make sure Address is valid - // - ASSERT_INVALID_PCI_ADDRESS (StartAddress); - ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000); - - // - // Make sure the Address is in MMCONF address space - // - if (StartAddress >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINTN) -1; - } - - if (Size == 0) { - return Size; - } - - ASSERT (Buffer != NULL); - - // - // Save Size for return - // - ReturnValue = Size; - - if ((StartAddress & 1) != 0) { - // - // Read a byte if StartAddress is byte aligned - // - *(volatile UINT8 *)Buffer = PciExpressRead8 (StartAddress); - StartAddress += sizeof (UINT8); - Size -= sizeof (UINT8); - Buffer = (UINT8*)Buffer + 1; - } - - if (Size >= sizeof (UINT16) && (StartAddress & 2) != 0) { - // - // Read a word if StartAddress is word aligned - // - WriteUnaligned16 ((UINT16 *) Buffer, (UINT16) PciExpressRead16 (StartAddress)); - - StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; - } - - while (Size >= sizeof (UINT32)) { - // - // Read as many double words as possible - // - WriteUnaligned32 ((UINT32 *) Buffer, (UINT32) PciExpressRead32 (StartAddress)); - - StartAddress += sizeof (UINT32); - Size -= sizeof (UINT32); - Buffer = (UINT32*)Buffer + 1; - } - - if (Size >= sizeof (UINT16)) { - // - // Read the last remaining word if exist - // - WriteUnaligned16 ((UINT16 *) Buffer, (UINT16) PciExpressRead16 (StartAddress)); - StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; - } - - if (Size >= sizeof (UINT8)) { - // - // Read the last remaining byte if exist - // - *(volatile UINT8 *)Buffer = PciExpressRead8 (StartAddress); - } - - return ReturnValue; + UINTN ReturnValue; + + // + // Make sure Address is valid + // + ASSERT_INVALID_PCI_ADDRESS (StartAddress); + ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000); + + // + // Make sure the Address is in MMCONF address space + // + if (StartAddress >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINTN)-1; + } + + if (Size == 0) { + return Size; + } + + ASSERT (Buffer != NULL); + + // + // Save Size for return + // + ReturnValue = Size; + + if ((StartAddress & 1) != 0) { + // + // Read a byte if StartAddress is byte aligned + // + *(volatile UINT8 *)Buffer = PciExpressRead8 (StartAddress); + StartAddress += sizeof (UINT8); + Size -= sizeof (UINT8); + Buffer = (UINT8 *)Buffer + 1; + } + + if ((Size >= sizeof (UINT16)) && ((StartAddress & 2) != 0)) { + // + // Read a word if StartAddress is word aligned + // + WriteUnaligned16 ((UINT16 *)Buffer, (UINT16)PciExpressRead16 (StartAddress)); + + StartAddress += sizeof (UINT16); + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; + } + + while (Size >= sizeof (UINT32)) { + // + // Read as many double words as possible + // + WriteUnaligned32 ((UINT32 *)Buffer, (UINT32)PciExpressRead32 (StartAddress)); + + StartAddress += sizeof (UINT32); + Size -= sizeof (UINT32); + Buffer = (UINT32 *)Buffer + 1; + } + + if (Size >= sizeof (UINT16)) { + // + // Read the last remaining word if exist + // + WriteUnaligned16 ((UINT16 *)Buffer, (UINT16)PciExpressRead16 (StartAddress)); + StartAddress += sizeof (UINT16); + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; + } + + if (Size >= sizeof (UINT8)) { + // + // Read the last remaining byte if exist + // + *(volatile UINT8 *)Buffer = PciExpressRead8 (StartAddress); + } + + return ReturnValue; } /** @@ -1489,84 +1520,83 @@ PciExpressReadBuffer ( UINTN EFIAPI PciExpressWriteBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - IN VOID *Buffer - ) + IN UINTN StartAddress, + IN UINTN Size, + IN VOID *Buffer + ) { - UINTN ReturnValue; - - // - // Make sure Address is valid - // - ASSERT_INVALID_PCI_ADDRESS (StartAddress); - ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000); - - // - // Make sure the Address is in MMCONF address space - // - if (StartAddress >= mSmmPciExpressLibPciExpressBaseSize) { - return (UINTN) -1; - } - - - if (Size == 0) { - return 0; - } - - ASSERT (Buffer != NULL); - - // - // Save Size for return - // - ReturnValue = Size; - - if ((StartAddress & 1) != 0) { - // - // Write a byte if StartAddress is byte aligned - // - PciExpressWrite8 (StartAddress, *(UINT8*)Buffer); - StartAddress += sizeof (UINT8); - Size -= sizeof (UINT8); - Buffer = (UINT8*)Buffer + 1; - } - - if (Size >= sizeof (UINT16) && (StartAddress & 2) != 0) { - // - // Write a word if StartAddress is word aligned - // - PciExpressWrite16 (StartAddress, ReadUnaligned16 ((UINT16*)Buffer)); - StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; - } - - while (Size >= sizeof (UINT32)) { - // - // Write as many double words as possible - // - PciExpressWrite32 (StartAddress, ReadUnaligned32 ((UINT32*)Buffer)); - StartAddress += sizeof (UINT32); - Size -= sizeof (UINT32); - Buffer = (UINT32*)Buffer + 1; - } - - if (Size >= sizeof (UINT16)) { - // - // Write the last remaining word if exist - // - PciExpressWrite16 (StartAddress, ReadUnaligned16 ((UINT16*)Buffer)); - StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; - } - - if (Size >= sizeof (UINT8)) { - // - // Write the last remaining byte if exist - // - PciExpressWrite8 (StartAddress, *(UINT8*)Buffer); - } - - return ReturnValue; + UINTN ReturnValue; + + // + // Make sure Address is valid + // + ASSERT_INVALID_PCI_ADDRESS (StartAddress); + ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000); + + // + // Make sure the Address is in MMCONF address space + // + if (StartAddress >= mSmmPciExpressLibPciExpressBaseSize) { + return (UINTN)-1; + } + + if (Size == 0) { + return 0; + } + + ASSERT (Buffer != NULL); + + // + // Save Size for return + // + ReturnValue = Size; + + if ((StartAddress & 1) != 0) { + // + // Write a byte if StartAddress is byte aligned + // + PciExpressWrite8 (StartAddress, *(UINT8 *)Buffer); + StartAddress += sizeof (UINT8); + Size -= sizeof (UINT8); + Buffer = (UINT8 *)Buffer + 1; + } + + if ((Size >= sizeof (UINT16)) && ((StartAddress & 2) != 0)) { + // + // Write a word if StartAddress is word aligned + // + PciExpressWrite16 (StartAddress, ReadUnaligned16 ((UINT16 *)Buffer)); + StartAddress += sizeof (UINT16); + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; + } + + while (Size >= sizeof (UINT32)) { + // + // Write as many double words as possible + // + PciExpressWrite32 (StartAddress, ReadUnaligned32 ((UINT32 *)Buffer)); + StartAddress += sizeof (UINT32); + Size -= sizeof (UINT32); + Buffer = (UINT32 *)Buffer + 1; + } + + if (Size >= sizeof (UINT16)) { + // + // Write the last remaining word if exist + // + PciExpressWrite16 (StartAddress, ReadUnaligned16 ((UINT16 *)Buffer)); + StartAddress += sizeof (UINT16); + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; + } + + if (Size >= sizeof (UINT8)) { + // + // Write the last remaining byte if exist + // + PciExpressWrite8 (StartAddress, *(UINT8 *)Buffer); + } + + return ReturnValue; } diff --git a/MdePkg/Library/SmmPciLibPciRootBridgeIo/PciLib.c b/MdePkg/Library/SmmPciLibPciRootBridgeIo/PciLib.c index 49ea99c..1503ebb 100644 --- a/MdePkg/Library/SmmPciLibPciRootBridgeIo/PciLib.c +++ b/MdePkg/Library/SmmPciLibPciRootBridgeIo/PciLib.c @@ -12,7 +12,6 @@ #include #include - /** Assert the validity of a PCI address. A valid PCI address should contain 1's only in the low 28 bits. @@ -21,7 +20,7 @@ @param M Additional bits to assert to be zero. **/ -#define ASSERT_INVALID_PCI_ADDRESS(A,M) \ +#define ASSERT_INVALID_PCI_ADDRESS(A, M) \ ASSERT (((A) & (~0xfffffff | (M))) == 0) /** @@ -37,7 +36,7 @@ // // Global variable to cache pointer to PCI Root Bridge I/O protocol. // -EFI_SMM_PCI_ROOT_BRIDGE_IO_PROTOCOL *mSmmPciRootBridgeIo = NULL; +EFI_SMM_PCI_ROOT_BRIDGE_IO_PROTOCOL *mSmmPciRootBridgeIo = NULL; /** The constructor function caches the pointer to PCI Root Bridge I/O protocol. @@ -54,13 +53,13 @@ EFI_SMM_PCI_ROOT_BRIDGE_IO_PROTOCOL *mSmmPciRootBridgeIo = NULL; EFI_STATUS EFIAPI PciLibConstructor ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUS Status; - Status = gSmst->SmmLocateProtocol (&gEfiSmmPciRootBridgeIoProtocolGuid, NULL, (VOID**) &mSmmPciRootBridgeIo); + Status = gSmst->SmmLocateProtocol (&gEfiSmmPciRootBridgeIoProtocolGuid, NULL, (VOID **)&mSmmPciRootBridgeIo); ASSERT_EFI_ERROR (Status); ASSERT (mSmmPciRootBridgeIo != NULL); @@ -90,12 +89,12 @@ SmmPciLibPciRootBridgeIoReadWorker ( UINT32 Data; mSmmPciRootBridgeIo->Pci.Read ( - mSmmPciRootBridgeIo, - Width, - PCI_TO_PCI_ROOT_BRIDGE_IO_ADDRESS (Address), - 1, - &Data - ); + mSmmPciRootBridgeIo, + Width, + PCI_TO_PCI_ROOT_BRIDGE_IO_ADDRESS (Address), + 1, + &Data + ); return Data; } @@ -124,12 +123,12 @@ SmmPciLibPciRootBridgeIoWriteWorker ( ) { mSmmPciRootBridgeIo->Pci.Write ( - mSmmPciRootBridgeIo, - Width, - PCI_TO_PCI_ROOT_BRIDGE_IO_ADDRESS (Address), - 1, - &Data - ); + mSmmPciRootBridgeIo, + Width, + PCI_TO_PCI_ROOT_BRIDGE_IO_ADDRESS (Address), + 1, + &Data + ); return Data; } @@ -182,12 +181,12 @@ PciRegisterForRuntimeAccess ( UINT8 EFIAPI PciRead8 ( - IN UINTN Address + IN UINTN Address ) { ASSERT_INVALID_PCI_ADDRESS (Address, 0); - return (UINT8) SmmPciLibPciRootBridgeIoReadWorker (Address, EfiPciWidthUint8); + return (UINT8)SmmPciLibPciRootBridgeIoReadWorker (Address, EfiPciWidthUint8); } /** @@ -209,13 +208,13 @@ PciRead8 ( UINT8 EFIAPI PciWrite8 ( - IN UINTN Address, - IN UINT8 Value + IN UINTN Address, + IN UINT8 Value ) { ASSERT_INVALID_PCI_ADDRESS (Address, 0); - return (UINT8) SmmPciLibPciRootBridgeIoWriteWorker (Address, EfiPciWidthUint8, Value); + return (UINT8)SmmPciLibPciRootBridgeIoWriteWorker (Address, EfiPciWidthUint8, Value); } /** @@ -241,11 +240,11 @@ PciWrite8 ( UINT8 EFIAPI PciOr8 ( - IN UINTN Address, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 OrData ) { - return PciWrite8 (Address, (UINT8) (PciRead8 (Address) | OrData)); + return PciWrite8 (Address, (UINT8)(PciRead8 (Address) | OrData)); } /** @@ -271,11 +270,11 @@ PciOr8 ( UINT8 EFIAPI PciAnd8 ( - IN UINTN Address, - IN UINT8 AndData + IN UINTN Address, + IN UINT8 AndData ) { - return PciWrite8 (Address, (UINT8) (PciRead8 (Address) & AndData)); + return PciWrite8 (Address, (UINT8)(PciRead8 (Address) & AndData)); } /** @@ -303,12 +302,12 @@ PciAnd8 ( UINT8 EFIAPI PciAndThenOr8 ( - IN UINTN Address, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 AndData, + IN UINT8 OrData ) { - return PciWrite8 (Address, (UINT8) ((PciRead8 (Address) & AndData) | OrData)); + return PciWrite8 (Address, (UINT8)((PciRead8 (Address) & AndData) | OrData)); } /** @@ -335,9 +334,9 @@ PciAndThenOr8 ( UINT8 EFIAPI PciBitFieldRead8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead8 (PciRead8 (Address), StartBit, EndBit); @@ -370,10 +369,10 @@ PciBitFieldRead8 ( UINT8 EFIAPI PciBitFieldWrite8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) { return PciWrite8 ( @@ -412,10 +411,10 @@ PciBitFieldWrite8 ( UINT8 EFIAPI PciBitFieldOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) { return PciWrite8 ( @@ -454,10 +453,10 @@ PciBitFieldOr8 ( UINT8 EFIAPI PciBitFieldAnd8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ) { return PciWrite8 ( @@ -500,11 +499,11 @@ PciBitFieldAnd8 ( UINT8 EFIAPI PciBitFieldAndThenOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) { return PciWrite8 ( @@ -532,12 +531,12 @@ PciBitFieldAndThenOr8 ( UINT16 EFIAPI PciRead16 ( - IN UINTN Address + IN UINTN Address ) { ASSERT_INVALID_PCI_ADDRESS (Address, 1); - return (UINT16) SmmPciLibPciRootBridgeIoReadWorker (Address, EfiPciWidthUint16); + return (UINT16)SmmPciLibPciRootBridgeIoReadWorker (Address, EfiPciWidthUint16); } /** @@ -560,13 +559,13 @@ PciRead16 ( UINT16 EFIAPI PciWrite16 ( - IN UINTN Address, - IN UINT16 Value + IN UINTN Address, + IN UINT16 Value ) { ASSERT_INVALID_PCI_ADDRESS (Address, 1); - return (UINT16) SmmPciLibPciRootBridgeIoWriteWorker (Address, EfiPciWidthUint16, Value); + return (UINT16)SmmPciLibPciRootBridgeIoWriteWorker (Address, EfiPciWidthUint16, Value); } /** @@ -593,11 +592,11 @@ PciWrite16 ( UINT16 EFIAPI PciOr16 ( - IN UINTN Address, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 OrData ) { - return PciWrite16 (Address, (UINT16) (PciRead16 (Address) | OrData)); + return PciWrite16 (Address, (UINT16)(PciRead16 (Address) | OrData)); } /** @@ -624,11 +623,11 @@ PciOr16 ( UINT16 EFIAPI PciAnd16 ( - IN UINTN Address, - IN UINT16 AndData + IN UINTN Address, + IN UINT16 AndData ) { - return PciWrite16 (Address, (UINT16) (PciRead16 (Address) & AndData)); + return PciWrite16 (Address, (UINT16)(PciRead16 (Address) & AndData)); } /** @@ -657,12 +656,12 @@ PciAnd16 ( UINT16 EFIAPI PciAndThenOr16 ( - IN UINTN Address, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 AndData, + IN UINT16 OrData ) { - return PciWrite16 (Address, (UINT16) ((PciRead16 (Address) & AndData) | OrData)); + return PciWrite16 (Address, (UINT16)((PciRead16 (Address) & AndData) | OrData)); } /** @@ -690,9 +689,9 @@ PciAndThenOr16 ( UINT16 EFIAPI PciBitFieldRead16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead16 (PciRead16 (Address), StartBit, EndBit); @@ -726,10 +725,10 @@ PciBitFieldRead16 ( UINT16 EFIAPI PciBitFieldWrite16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ) { return PciWrite16 ( @@ -769,10 +768,10 @@ PciBitFieldWrite16 ( UINT16 EFIAPI PciBitFieldOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ) { return PciWrite16 ( @@ -812,10 +811,10 @@ PciBitFieldOr16 ( UINT16 EFIAPI PciBitFieldAnd16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ) { return PciWrite16 ( @@ -859,11 +858,11 @@ PciBitFieldAnd16 ( UINT16 EFIAPI PciBitFieldAndThenOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ) { return PciWrite16 ( @@ -891,7 +890,7 @@ PciBitFieldAndThenOr16 ( UINT32 EFIAPI PciRead32 ( - IN UINTN Address + IN UINTN Address ) { ASSERT_INVALID_PCI_ADDRESS (Address, 3); @@ -919,8 +918,8 @@ PciRead32 ( UINT32 EFIAPI PciWrite32 ( - IN UINTN Address, - IN UINT32 Value + IN UINTN Address, + IN UINT32 Value ) { ASSERT_INVALID_PCI_ADDRESS (Address, 3); @@ -952,8 +951,8 @@ PciWrite32 ( UINT32 EFIAPI PciOr32 ( - IN UINTN Address, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 OrData ) { return PciWrite32 (Address, PciRead32 (Address) | OrData); @@ -983,8 +982,8 @@ PciOr32 ( UINT32 EFIAPI PciAnd32 ( - IN UINTN Address, - IN UINT32 AndData + IN UINTN Address, + IN UINT32 AndData ) { return PciWrite32 (Address, PciRead32 (Address) & AndData); @@ -1016,9 +1015,9 @@ PciAnd32 ( UINT32 EFIAPI PciAndThenOr32 ( - IN UINTN Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 AndData, + IN UINT32 OrData ) { return PciWrite32 (Address, (PciRead32 (Address) & AndData) | OrData); @@ -1049,9 +1048,9 @@ PciAndThenOr32 ( UINT32 EFIAPI PciBitFieldRead32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead32 (PciRead32 (Address), StartBit, EndBit); @@ -1085,10 +1084,10 @@ PciBitFieldRead32 ( UINT32 EFIAPI PciBitFieldWrite32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { return PciWrite32 ( @@ -1128,10 +1127,10 @@ PciBitFieldWrite32 ( UINT32 EFIAPI PciBitFieldOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { return PciWrite32 ( @@ -1171,10 +1170,10 @@ PciBitFieldOr32 ( UINT32 EFIAPI PciBitFieldAnd32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { return PciWrite32 ( @@ -1218,11 +1217,11 @@ PciBitFieldAnd32 ( UINT32 EFIAPI PciBitFieldAndThenOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { return PciWrite32 ( @@ -1257,12 +1256,12 @@ PciBitFieldAndThenOr32 ( UINTN EFIAPI PciReadBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - OUT VOID *Buffer + IN UINTN StartAddress, + IN UINTN Size, + OUT VOID *Buffer ) { - UINTN ReturnValue; + UINTN ReturnValue; ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0); ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000); @@ -1283,19 +1282,19 @@ PciReadBuffer ( // Read a byte if StartAddress is byte aligned // *(volatile UINT8 *)Buffer = PciRead8 (StartAddress); - StartAddress += sizeof (UINT8); - Size -= sizeof (UINT8); - Buffer = (UINT8*)Buffer + 1; + StartAddress += sizeof (UINT8); + Size -= sizeof (UINT8); + Buffer = (UINT8 *)Buffer + 1; } - if (Size >= sizeof (UINT16) && (StartAddress & BIT1) != 0) { + if ((Size >= sizeof (UINT16)) && ((StartAddress & BIT1) != 0)) { // // Read a word if StartAddress is word aligned // WriteUnaligned16 (Buffer, PciRead16 (StartAddress)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } while (Size >= sizeof (UINT32)) { @@ -1304,8 +1303,8 @@ PciReadBuffer ( // WriteUnaligned32 (Buffer, PciRead32 (StartAddress)); StartAddress += sizeof (UINT32); - Size -= sizeof (UINT32); - Buffer = (UINT32*)Buffer + 1; + Size -= sizeof (UINT32); + Buffer = (UINT32 *)Buffer + 1; } if (Size >= sizeof (UINT16)) { @@ -1314,8 +1313,8 @@ PciReadBuffer ( // WriteUnaligned16 (Buffer, PciRead16 (StartAddress)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } if (Size >= sizeof (UINT8)) { @@ -1355,12 +1354,12 @@ PciReadBuffer ( UINTN EFIAPI PciWriteBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - IN VOID *Buffer + IN UINTN StartAddress, + IN UINTN Size, + IN VOID *Buffer ) { - UINTN ReturnValue; + UINTN ReturnValue; ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0); ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000); @@ -1380,20 +1379,20 @@ PciWriteBuffer ( // // Write a byte if StartAddress is byte aligned // - PciWrite8 (StartAddress, *(UINT8*)Buffer); + PciWrite8 (StartAddress, *(UINT8 *)Buffer); StartAddress += sizeof (UINT8); - Size -= sizeof (UINT8); - Buffer = (UINT8*)Buffer + 1; + Size -= sizeof (UINT8); + Buffer = (UINT8 *)Buffer + 1; } - if (Size >= sizeof (UINT16) && (StartAddress & BIT1) != 0) { + if ((Size >= sizeof (UINT16)) && ((StartAddress & BIT1) != 0)) { // // Write a word if StartAddress is word aligned // PciWrite16 (StartAddress, ReadUnaligned16 (Buffer)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } while (Size >= sizeof (UINT32)) { @@ -1402,8 +1401,8 @@ PciWriteBuffer ( // PciWrite32 (StartAddress, ReadUnaligned32 (Buffer)); StartAddress += sizeof (UINT32); - Size -= sizeof (UINT32); - Buffer = (UINT32*)Buffer + 1; + Size -= sizeof (UINT32); + Buffer = (UINT32 *)Buffer + 1; } if (Size >= sizeof (UINT16)) { @@ -1412,15 +1411,15 @@ PciWriteBuffer ( // PciWrite16 (StartAddress, ReadUnaligned16 (Buffer)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } if (Size >= sizeof (UINT8)) { // // Write the last remaining byte if exist // - PciWrite8 (StartAddress, *(UINT8*)Buffer); + PciWrite8 (StartAddress, *(UINT8 *)Buffer); } return ReturnValue; diff --git a/MdePkg/Library/SmmPeriodicSmiLib/SmmPeriodicSmiLib.c b/MdePkg/Library/SmmPeriodicSmiLib/SmmPeriodicSmiLib.c index 838fe42..ff143f0 100644 --- a/MdePkg/Library/SmmPeriodicSmiLib/SmmPeriodicSmiLib.c +++ b/MdePkg/Library/SmmPeriodicSmiLib/SmmPeriodicSmiLib.c @@ -38,104 +38,104 @@ typedef struct { /// /// Signature value that must be set to PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT_SIGNATURE /// - UINT32 Signature; + UINT32 Signature; /// /// The link entry to be inserted to the list of periodic SMI handlers. /// - LIST_ENTRY Link; + LIST_ENTRY Link; /// /// The dispatch function to called to invoke an enabled periodic SMI handler. /// - PERIODIC_SMI_LIBRARY_HANDLER DispatchFunction; + PERIODIC_SMI_LIBRARY_HANDLER DispatchFunction; /// /// The context to pass into DispatchFunction /// - VOID *Context; + VOID *Context; /// /// The tick period in 100 ns units that DispatchFunction should be called. /// - UINT64 TickPeriod; + UINT64 TickPeriod; /// /// The Cpu number that is required to execute DispatchFunction. If Cpu is /// set to PERIODIC_SMI_LIBRARY_ANY_CPU, then DispatchFunction may be executed /// on any CPU. /// - UINTN Cpu; + UINTN Cpu; /// /// The size, in bytes, of the stack allocated for a periodic SMI handler. /// This value must be a multiple of EFI_PAGE_SIZE. /// - UINTN StackSize; + UINTN StackSize; /// /// A pointer to the stack allocated using AllocatePages(). This field will /// be NULL if StackSize is 0. /// - VOID *Stack; + VOID *Stack; /// /// Spin lock used to wait for an AP to complete the execution of a periodic SMI handler /// - SPIN_LOCK DispatchLock; + SPIN_LOCK DispatchLock; /// /// The rate in Hz of the performance counter that is used to measure the /// amount of time that a periodic SMI handler executes. /// - UINT64 PerfomanceCounterRate; + UINT64 PerfomanceCounterRate; /// /// The start count value of the performance counter that is used to measure /// the amount of time that a periodic SMI handler executes. /// - UINT64 PerfomanceCounterStartValue; + UINT64 PerfomanceCounterStartValue; /// /// The end count value of the performance counter that is used to measure /// the amount of time that a periodic SMI handler executes. /// - UINT64 PerfomanceCounterEndValue; + UINT64 PerfomanceCounterEndValue; /// /// The context record passed into the Register() function of the SMM Periodic /// Timer Dispatch Protocol when a periodic SMI handler is enabled. /// - EFI_SMM_PERIODIC_TIMER_REGISTER_CONTEXT RegisterContext; + EFI_SMM_PERIODIC_TIMER_REGISTER_CONTEXT RegisterContext; /// /// The handle returned from the Register() function of the SMM Periodic /// Timer Dispatch Protocol when a periodic SMI handler is enabled. /// - EFI_HANDLE DispatchHandle; + EFI_HANDLE DispatchHandle; /// /// The total number of performance counter ticks that the periodic SMI handler /// has been executing in its current invocation. /// - UINT64 DispatchTotalTime; + UINT64 DispatchTotalTime; /// /// The performance counter value that was captured the last time that the /// periodic SMI handler called PeriodicSmiExecutionTime(). This allows the /// time value returned by PeriodicSmiExecutionTime() to be accurate even when /// the performance counter rolls over. /// - UINT64 DispatchCheckPointTime; + UINT64 DispatchCheckPointTime; /// /// Buffer used to save the context when control is transfer from this library /// to an enabled periodic SMI handler. This saved context is used when the /// periodic SMI handler exits or yields. /// - BASE_LIBRARY_JUMP_BUFFER DispatchJumpBuffer; + BASE_LIBRARY_JUMP_BUFFER DispatchJumpBuffer; /// /// Flag that is set to TRUE when a periodic SMI handler requests to yield /// using PeriodicSmiYield(). When this flag IS TRUE, YieldJumpBuffer is /// valid. When this flag is FALSE, YieldJumpBuffer is not valid. /// - BOOLEAN YieldFlag; + BOOLEAN YieldFlag; /// /// Buffer used to save the context when a periodic SMI handler requests to /// yield using PeriodicSmiYield(). This context is used to resume the /// execution of a periodic SMI handler the next time control is transferred /// to the periodic SMI handler that yielded. /// - BASE_LIBRARY_JUMP_BUFFER YieldJumpBuffer; + BASE_LIBRARY_JUMP_BUFFER YieldJumpBuffer; /// /// The amount of time, in 100 ns units, that have elapsed since the last /// time the periodic SMI handler was invoked. /// - UINT64 ElapsedTime; + UINT64 ElapsedTime; } PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT; /** @@ -154,7 +154,7 @@ typedef struct { /// /// Pointer to the SMM Periodic Timer Dispatch Protocol that was located in the constructor. /// -EFI_SMM_PERIODIC_TIMER_DISPATCH2_PROTOCOL *gSmmPeriodicTimerDispatch2 = NULL; +EFI_SMM_PERIODIC_TIMER_DISPATCH2_PROTOCOL *gSmmPeriodicTimerDispatch2 = NULL; /// /// Pointer to a table of supported periodic SMI tick periods in 100 ns units @@ -163,25 +163,25 @@ EFI_SMM_PERIODIC_TIMER_DISPATCH2_PROTOCOL *gSmmPeriodicTimerDispatch2 /// in based on the values returned from the SMM Periodic Timer Dispatch 2 Protocol /// function GetNextShorterInterval(). /// -UINT64 *gSmiTickPeriodTable = NULL; +UINT64 *gSmiTickPeriodTable = NULL; /// /// Linked list of free periodic SMI handlers that this library can use. /// -LIST_ENTRY gFreePeriodicSmiLibraryHandlers = - INITIALIZE_LIST_HEAD_VARIABLE (gFreePeriodicSmiLibraryHandlers); +LIST_ENTRY gFreePeriodicSmiLibraryHandlers = + INITIALIZE_LIST_HEAD_VARIABLE (gFreePeriodicSmiLibraryHandlers); /// /// Linked list of periodic SMI handlers that this library is currently managing. /// -LIST_ENTRY gPeriodicSmiLibraryHandlers = - INITIALIZE_LIST_HEAD_VARIABLE (gPeriodicSmiLibraryHandlers); +LIST_ENTRY gPeriodicSmiLibraryHandlers = + INITIALIZE_LIST_HEAD_VARIABLE (gPeriodicSmiLibraryHandlers); /// /// Pointer to the periodic SMI handler that is currently being executed. /// Is set to NULL if no periodic SMI handler is currently being executed. /// -PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT *gActivePeriodicSmiLibraryHandler = NULL; +PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT *gActivePeriodicSmiLibraryHandler = NULL; /** Internal worker function that returns a pointer to the @@ -226,7 +226,7 @@ GetActivePeriodicSmiLibraryHandler ( **/ PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT * LookupPeriodicSmiLibraryHandler ( - IN EFI_HANDLE DispatchHandle OPTIONAL + IN EFI_HANDLE DispatchHandle OPTIONAL ) { LIST_ENTRY *Link; @@ -243,9 +243,10 @@ LookupPeriodicSmiLibraryHandler ( // Search the periodic SMI handler entries for a a matching DispatchHandle // for ( Link = GetFirstNode (&gPeriodicSmiLibraryHandlers) - ; !IsNull (&gPeriodicSmiLibraryHandlers, Link) - ; Link = GetNextNode (&gPeriodicSmiLibraryHandlers, Link) - ) { + ; !IsNull (&gPeriodicSmiLibraryHandlers, Link) + ; Link = GetNextNode (&gPeriodicSmiLibraryHandlers, Link) + ) + { PeriodicSmiLibraryHandler = PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT_FROM_LINK (Link); if (PeriodicSmiLibraryHandler->DispatchHandle == DispatchHandle) { @@ -279,7 +280,7 @@ LookupPeriodicSmiLibraryHandler ( **/ PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT * SetActivePeriodicSmiLibraryHandler ( - IN EFI_HANDLE DispatchHandle OPTIONAL + IN EFI_HANDLE DispatchHandle OPTIONAL ) { if (DispatchHandle == NULL) { @@ -287,6 +288,7 @@ SetActivePeriodicSmiLibraryHandler ( } else { gActivePeriodicSmiLibraryHandler = LookupPeriodicSmiLibraryHandler (DispatchHandle); } + return gActivePeriodicSmiLibraryHandler; } @@ -298,7 +300,7 @@ SetActivePeriodicSmiLibraryHandler ( **/ VOID ReclaimPeriodicSmiLibraryHandler ( - PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT *PeriodicSmiLibraryHandler + PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT *PeriodicSmiLibraryHandler ) { ASSERT (PeriodicSmiLibraryHandler->DispatchHandle == NULL); @@ -309,6 +311,7 @@ ReclaimPeriodicSmiLibraryHandler ( ); PeriodicSmiLibraryHandler->Stack = NULL; } + RemoveEntryList (&PeriodicSmiLibraryHandler->Link); InsertHeadList (&gFreePeriodicSmiLibraryHandlers, &PeriodicSmiLibraryHandler->Link); } @@ -337,11 +340,12 @@ EnlargeFreePeriodicSmiLibraryHandlerList ( if (PeriodicSmiLibraryHandler == NULL) { break; } + PeriodicSmiLibraryHandler->Signature = PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT_SIGNATURE; InsertHeadList (&gFreePeriodicSmiLibraryHandlers, &PeriodicSmiLibraryHandler->Link); } - return (BOOLEAN) (Index > 0); + return (BOOLEAN)(Index > 0); } /** @@ -515,7 +519,7 @@ PeriodicSmiExit ( // Must never return // ASSERT (FALSE); - CpuDeadLoop(); + CpuDeadLoop (); } /** @@ -623,9 +627,9 @@ PeriodicSmiDispatchFunctionSwitchStack ( // periodic SMI handler was dispatched. // PeriodicSmiLibraryHandler->DispatchFunction ( - PeriodicSmiLibraryHandler->Context, - PeriodicSmiLibraryHandler->ElapsedTime - ); + PeriodicSmiLibraryHandler->Context, + PeriodicSmiLibraryHandler->ElapsedTime + ); // // If this DispatchFunction() returns, then unconditionally call PeriodicSmiExit() @@ -667,7 +671,7 @@ PeriodicSmiDispatchFunctionOnCpu ( // calculated. // PeriodicSmiLibraryHandler->DispatchTotalTime = 0; - PeriodicSmiLibraryHandler->DispatchCheckPointTime = GetPerformanceCounter(); + PeriodicSmiLibraryHandler->DispatchCheckPointTime = GetPerformanceCounter (); if (PeriodicSmiLibraryHandler->YieldFlag) { // @@ -682,9 +686,9 @@ PeriodicSmiDispatchFunctionOnCpu ( // elapsed since the previous time this periodic SMI handler was dispatched. // PeriodicSmiLibraryHandler->DispatchFunction ( - PeriodicSmiLibraryHandler->Context, - PeriodicSmiLibraryHandler->ElapsedTime - ); + PeriodicSmiLibraryHandler->Context, + PeriodicSmiLibraryHandler->ElapsedTime + ); // // If this DispatchFunction() returns, then unconditionally call PeriodicSmiExit() @@ -707,7 +711,7 @@ PeriodicSmiDispatchFunctionOnCpu ( // Must never return // ASSERT (FALSE); - CpuDeadLoop(); + CpuDeadLoop (); } /** @@ -794,7 +798,7 @@ PeriodicSmiDispatchFunction ( // PeriodicSmiLibraryHandler->ElapsedTime = 0; if (CommBuffer != NULL) { - TimerContext = (EFI_SMM_PERIODIC_TIMER_CONTEXT *)CommBuffer; + TimerContext = (EFI_SMM_PERIODIC_TIMER_CONTEXT *)CommBuffer; PeriodicSmiLibraryHandler->ElapsedTime = TimerContext->ElapsedTime; } @@ -802,7 +806,8 @@ PeriodicSmiDispatchFunction ( // Dispatch the periodic SMI handler // if ((PeriodicSmiLibraryHandler->Cpu == PERIODIC_SMI_LIBRARY_ANY_CPU) || - (PeriodicSmiLibraryHandler->Cpu == gSmst->CurrentlyExecutingCpu) ) { + (PeriodicSmiLibraryHandler->Cpu == gSmst->CurrentlyExecutingCpu)) + { // // Dispatch on the currently execution CPU if the CPU specified in PeriodicSmiEnable() // was PERIODIC_SMI_LIBRARY_ANY_CPU or the currently executing CPU matches the CPU @@ -922,18 +927,19 @@ PeriodicSmiEnable ( break; } } + if (gSmiTickPeriodTable[Index] == 0) { return EFI_UNSUPPORTED; } - if (Cpu != PERIODIC_SMI_LIBRARY_ANY_CPU && Cpu >= gSmst->NumberOfCpus) { + if ((Cpu != PERIODIC_SMI_LIBRARY_ANY_CPU) && (Cpu >= gSmst->NumberOfCpus)) { return EFI_INVALID_PARAMETER; } // // Find a free periodic SMI handler entry // - PeriodicSmiLibraryHandler = FindFreePeriodicSmiLibraryHandler(); + PeriodicSmiLibraryHandler = FindFreePeriodicSmiLibraryHandler (); if (PeriodicSmiLibraryHandler == NULL) { return EFI_OUT_OF_RESOURCES; } @@ -952,10 +958,12 @@ PeriodicSmiEnable ( if (PeriodicSmiLibraryHandler->Stack == NULL) { return EFI_OUT_OF_RESOURCES; } + ZeroMem (PeriodicSmiLibraryHandler->Stack, PeriodicSmiLibraryHandler->StackSize); } else { PeriodicSmiLibraryHandler->Stack = NULL; } + InitializeSpinLock (&PeriodicSmiLibraryHandler->DispatchLock); PeriodicSmiLibraryHandler->PerfomanceCounterRate = GetPerformanceCounterProperties ( &PeriodicSmiLibraryHandler->PerfomanceCounterStartValue, @@ -963,12 +971,12 @@ PeriodicSmiEnable ( ); PeriodicSmiLibraryHandler->RegisterContext.Period = TickPeriod; PeriodicSmiLibraryHandler->RegisterContext.SmiTickInterval = TickPeriod; - Status = gSmmPeriodicTimerDispatch2->Register ( - gSmmPeriodicTimerDispatch2, - PeriodicSmiDispatchFunction, - &PeriodicSmiLibraryHandler->RegisterContext, - &PeriodicSmiLibraryHandler->DispatchHandle - ); + Status = gSmmPeriodicTimerDispatch2->Register ( + gSmmPeriodicTimerDispatch2, + PeriodicSmiDispatchFunction, + &PeriodicSmiLibraryHandler->RegisterContext, + &PeriodicSmiLibraryHandler->DispatchHandle + ); if (EFI_ERROR (Status)) { PeriodicSmiLibraryHandler->DispatchHandle = NULL; ReclaimPeriodicSmiLibraryHandler (PeriodicSmiLibraryHandler); @@ -981,6 +989,7 @@ PeriodicSmiEnable ( if (DispatchHandle != NULL) { *DispatchHandle = PeriodicSmiLibraryHandler->DispatchHandle; } + return EFI_SUCCESS; } @@ -1080,7 +1089,7 @@ SmmPeriodicSmiLibConstructor ( // Dispatch 2 Protocol supports. // SmiTickInterval = NULL; - Count = 0; + Count = 0; do { Status = gSmmPeriodicTimerDispatch2->GetNextShorterInterval ( gSmmPeriodicTimerDispatch2, @@ -1099,16 +1108,17 @@ SmmPeriodicSmiLibConstructor ( // Fill in the table of supported periodic SMI tick periods. // SmiTickInterval = NULL; - Count = 0; + Count = 0; do { gSmiTickPeriodTable[Count] = 0; - Status = gSmmPeriodicTimerDispatch2->GetNextShorterInterval ( - gSmmPeriodicTimerDispatch2, - &SmiTickInterval - ); + Status = gSmmPeriodicTimerDispatch2->GetNextShorterInterval ( + gSmmPeriodicTimerDispatch2, + &SmiTickInterval + ); if (SmiTickInterval != NULL) { gSmiTickPeriodTable[Count] = *SmiTickInterval; } + Count++; } while (SmiTickInterval != NULL); @@ -1152,7 +1162,7 @@ SmmPeriodicSmiLibDestructor ( // for (Link = GetFirstNode (&gPeriodicSmiLibraryHandlers); !IsNull (&gPeriodicSmiLibraryHandlers, Link);) { PeriodicSmiLibraryHandler = PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT_FROM_LINK (Link); - Link = GetNextNode (&gPeriodicSmiLibraryHandlers, Link); + Link = GetNextNode (&gPeriodicSmiLibraryHandlers, Link); PeriodicSmiDisable (PeriodicSmiLibraryHandler->DispatchHandle); } @@ -1161,7 +1171,7 @@ SmmPeriodicSmiLibDestructor ( // for (Link = GetFirstNode (&gFreePeriodicSmiLibraryHandlers); !IsNull (&gFreePeriodicSmiLibraryHandlers, Link);) { PeriodicSmiLibraryHandler = PERIODIC_SMI_LIBRARY_HANDLER_CONTEXT_FROM_LINK (Link); - Link = RemoveEntryList (Link); + Link = RemoveEntryList (Link); FreePool (PeriodicSmiLibraryHandler); } diff --git a/MdePkg/Library/SmmServicesTableLib/SmmServicesTableLib.c b/MdePkg/Library/SmmServicesTableLib/SmmServicesTableLib.c index 0f611cd..73e76af 100644 --- a/MdePkg/Library/SmmServicesTableLib/SmmServicesTableLib.c +++ b/MdePkg/Library/SmmServicesTableLib/SmmServicesTableLib.c @@ -11,7 +11,7 @@ #include #include -EFI_SMM_SYSTEM_TABLE2 *gSmst = NULL; +EFI_SMM_SYSTEM_TABLE2 *gSmst = NULL; /** The constructor function caches the pointer of SMM Services Table. diff --git a/MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.c b/MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.c index d74c9bd..ff1c53b 100644 --- a/MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.c +++ b/MdePkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.c @@ -31,7 +31,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent EFI_STATUS EFIAPI _DriverUnloadHandler ( - EFI_HANDLE ImageHandle + EFI_HANDLE ImageHandle ) { EFI_STATUS Status; @@ -81,8 +81,8 @@ _DriverUnloadHandler ( EFI_STATUS EFIAPI _ModuleEntryPoint ( - IN EFI_HANDLE ImageHandle, - IN IN EFI_MM_SYSTEM_TABLE *MmSystemTable + IN EFI_HANDLE ImageHandle, + IN IN EFI_MM_SYSTEM_TABLE *MmSystemTable ) { EFI_STATUS Status; diff --git a/MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLib.c b/MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLib.c index 70b4d10..e3f677d 100644 --- a/MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLib.c +++ b/MdePkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLib.c @@ -11,7 +11,7 @@ #include #include -EFI_MM_SYSTEM_TABLE *gMmst = NULL; +EFI_MM_SYSTEM_TABLE *gMmst = NULL; /** The constructor function caches the pointer of the MM Services Table. diff --git a/MdePkg/Library/UefiApplicationEntryPoint/ApplicationEntryPoint.c b/MdePkg/Library/UefiApplicationEntryPoint/ApplicationEntryPoint.c index 324e88c..0a33e7a 100644 --- a/MdePkg/Library/UefiApplicationEntryPoint/ApplicationEntryPoint.c +++ b/MdePkg/Library/UefiApplicationEntryPoint/ApplicationEntryPoint.c @@ -12,7 +12,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include - /** Entry point to UEFI Application. @@ -37,7 +36,7 @@ _ModuleEntryPoint ( IN EFI_SYSTEM_TABLE *SystemTable ) { - EFI_STATUS Status; + EFI_STATUS Status; if (_gUefiDriverRevision != 0) { // @@ -69,7 +68,6 @@ _ModuleEntryPoint ( return Status; } - /** Invokes the library destructors for all dependent libraries and terminates the UEFI Application. @@ -92,7 +90,6 @@ Exit ( gBS->Exit (gImageHandle, Status, 0, NULL); } - /** Required by the EBC compiler and identical in functionality to _ModuleEntryPoint(). diff --git a/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c b/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c index 4fb6bc8..d4a70cb 100644 --- a/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c +++ b/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c @@ -7,7 +7,6 @@ **/ - #include #include diff --git a/MdePkg/Library/UefiDebugLibConOut/DebugLib.c b/MdePkg/Library/UefiDebugLibConOut/DebugLib.c index 8ea38ea..65c8dc2 100644 --- a/MdePkg/Library/UefiDebugLibConOut/DebugLib.c +++ b/MdePkg/Library/UefiDebugLibConOut/DebugLib.c @@ -24,10 +24,10 @@ // VA_LIST can not initialize to NULL for all compiler, so we use this to // indicate a null VA_LIST // -VA_LIST mVaListNull; +VA_LIST mVaListNull; -extern BOOLEAN mPostEBS; -extern EFI_SYSTEM_TABLE *mDebugST; +extern BOOLEAN mPostEBS; +extern EFI_SYSTEM_TABLE *mDebugST; /** Prints a debug message to the debug output device if the specified error level is enabled. @@ -59,7 +59,6 @@ DebugPrint ( VA_END (Marker); } - /** Prints a debug message to the debug output device if the specified error level is enabled base on Null-terminated format string and a @@ -79,13 +78,13 @@ DebugPrint ( **/ VOID DebugPrintMarker ( - IN UINTN ErrorLevel, - IN CONST CHAR8 *Format, - IN VA_LIST VaListMarker, - IN BASE_LIST BaseListMarker + IN UINTN ErrorLevel, + IN CONST CHAR8 *Format, + IN VA_LIST VaListMarker, + IN BASE_LIST BaseListMarker ) { - CHAR16 Buffer[MAX_DEBUG_MESSAGE_LENGTH]; + CHAR16 Buffer[MAX_DEBUG_MESSAGE_LENGTH]; if (!mPostEBS) { // @@ -109,7 +108,6 @@ DebugPrintMarker ( UnicodeBSPrintAsciiFormat (Buffer, sizeof (Buffer), Format, BaseListMarker); } - // // Send the print string to the Console Output device // @@ -119,7 +117,6 @@ DebugPrintMarker ( } } - /** Prints a debug message to the debug output device if the specified error level is enabled. @@ -138,15 +135,14 @@ DebugPrintMarker ( VOID EFIAPI DebugVPrint ( - IN UINTN ErrorLevel, - IN CONST CHAR8 *Format, - IN VA_LIST VaListMarker + IN UINTN ErrorLevel, + IN CONST CHAR8 *Format, + IN VA_LIST VaListMarker ) { DebugPrintMarker (ErrorLevel, Format, VaListMarker, NULL); } - /** Prints a debug message to the debug output device if the specified error level is enabled. @@ -167,15 +163,14 @@ DebugVPrint ( VOID EFIAPI DebugBPrint ( - IN UINTN ErrorLevel, - IN CONST CHAR8 *Format, - IN BASE_LIST BaseListMarker + IN UINTN ErrorLevel, + IN CONST CHAR8 *Format, + IN BASE_LIST BaseListMarker ) { DebugPrintMarker (ErrorLevel, Format, mVaListNull, BaseListMarker); } - /** Prints an assert message containing a filename, line number, and description. This may be followed by a breakpoint or a dead loop. @@ -233,15 +228,14 @@ DebugAssert ( // // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings // - if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) { + if ((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) { CpuBreakpoint (); - } else if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) { + } else if ((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) { CpuDeadLoop (); } } } - /** Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer. @@ -272,10 +266,9 @@ DebugClearMemory ( // // SetMem() checks for the the ASSERT() condition on Length and returns Buffer // - return SetMem (Buffer, Length, PcdGet8(PcdDebugClearMemoryValue)); + return SetMem (Buffer, Length, PcdGet8 (PcdDebugClearMemoryValue)); } - /** Returns TRUE if ASSERT() macros are enabled. @@ -292,10 +285,9 @@ DebugAssertEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0); } - /** Returns TRUE if DEBUG() macros are enabled. @@ -312,10 +304,9 @@ DebugPrintEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0); } - /** Returns TRUE if DEBUG_CODE() macros are enabled. @@ -332,10 +323,9 @@ DebugCodeEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0); } - /** Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled. @@ -352,7 +342,7 @@ DebugClearMemoryEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0); } /** @@ -367,8 +357,8 @@ DebugClearMemoryEnabled ( BOOLEAN EFIAPI DebugPrintLevelEnabled ( - IN CONST UINTN ErrorLevel + IN CONST UINTN ErrorLevel ) { - return (BOOLEAN) ((ErrorLevel & PcdGet32(PcdFixedDebugPrintErrorLevel)) != 0); + return (BOOLEAN)((ErrorLevel & PcdGet32 (PcdFixedDebugPrintErrorLevel)) != 0); } diff --git a/MdePkg/Library/UefiDebugLibConOut/DebugLibConstructor.c b/MdePkg/Library/UefiDebugLibConOut/DebugLibConstructor.c index b4ac17c..103f9f0 100644 --- a/MdePkg/Library/UefiDebugLibConOut/DebugLibConstructor.c +++ b/MdePkg/Library/UefiDebugLibConOut/DebugLibConstructor.c @@ -15,16 +15,16 @@ // // BOOLEAN value to indicate if it is at the post ExitBootServices pahse // -BOOLEAN mPostEBS = FALSE; +BOOLEAN mPostEBS = FALSE; -static EFI_EVENT mExitBootServicesEvent; +static EFI_EVENT mExitBootServicesEvent; // // Pointer to SystemTable // This library instance may have a cycle consume with UefiBootServicesTableLib // because of the constructors. // -EFI_SYSTEM_TABLE *mDebugST; +EFI_SYSTEM_TABLE *mDebugST; /** This routine sets the mPostEBS for exit boot servies true @@ -37,8 +37,8 @@ EFI_SYSTEM_TABLE *mDebugST; VOID EFIAPI ExitBootServicesCallback ( - EFI_EVENT Event, - VOID* Context + EFI_EVENT Event, + VOID *Context ) { mPostEBS = TRUE; @@ -57,20 +57,20 @@ ExitBootServicesCallback ( **/ EFI_STATUS EFIAPI -DxeDebugLibConstructor( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable +DxeDebugLibConstructor ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable ) { mDebugST = SystemTable; SystemTable->BootServices->CreateEvent ( - EVT_SIGNAL_EXIT_BOOT_SERVICES, - TPL_NOTIFY, - ExitBootServicesCallback, - NULL, - &mExitBootServicesEvent - ); + EVT_SIGNAL_EXIT_BOOT_SERVICES, + TPL_NOTIFY, + ExitBootServicesCallback, + NULL, + &mExitBootServicesEvent + ); return EFI_SUCCESS; } @@ -86,9 +86,9 @@ DxeDebugLibConstructor( **/ EFI_STATUS EFIAPI -DxeDebugLibDestructor( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable +DxeDebugLibDestructor ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable ) { if (mExitBootServicesEvent != NULL) { diff --git a/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLib.c b/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLib.c index cd7e2ab..c25199b 100644 --- a/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLib.c +++ b/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLib.c @@ -25,19 +25,18 @@ // // Define the timeout for EFI_DEBUGPORT_PROTOCOL.Write // -#define WRITE_TIMEOUT 1000 +#define WRITE_TIMEOUT 1000 - -EFI_DEBUGPORT_PROTOCOL *mDebugPort = NULL; +EFI_DEBUGPORT_PROTOCOL *mDebugPort = NULL; // // VA_LIST can not initialize to NULL for all compiler, so we use this to // indicate a null VA_LIST // -VA_LIST mVaListNull; +VA_LIST mVaListNull; -extern BOOLEAN mPostEBS; -extern EFI_BOOT_SERVICES *mDebugBS; +extern BOOLEAN mPostEBS; +extern EFI_BOOT_SERVICES *mDebugBS; /** Send message to DebugPort Protocol. @@ -55,20 +54,20 @@ UefiDebugLibDebugPortProtocolWrite ( IN UINTN BufferLength ) { - UINTN Length; - EFI_STATUS Status; + UINTN Length; + EFI_STATUS Status; if (!mPostEBS) { // // If mDebugPort is NULL, initialize first. // if (mDebugPort == NULL) { - Status = mDebugBS->LocateProtocol (&gEfiDebugPortProtocolGuid, NULL, (VOID **)&mDebugPort); - if (EFI_ERROR (Status)) { - return; - } + Status = mDebugBS->LocateProtocol (&gEfiDebugPortProtocolGuid, NULL, (VOID **)&mDebugPort); + if (EFI_ERROR (Status)) { + return; + } - mDebugPort->Reset (mDebugPort); + mDebugPort->Reset (mDebugPort); } // @@ -77,12 +76,12 @@ UefiDebugLibDebugPortProtocolWrite ( while (BufferLength > 0) { Length = BufferLength; - Status = mDebugPort->Write (mDebugPort, WRITE_TIMEOUT, &Length, (VOID *) Buffer); - if (EFI_ERROR (Status) || BufferLength < Length) { + Status = mDebugPort->Write (mDebugPort, WRITE_TIMEOUT, &Length, (VOID *)Buffer); + if (EFI_ERROR (Status) || (BufferLength < Length)) { break; } - Buffer += Length; + Buffer += Length; BufferLength -= Length; } } @@ -111,14 +110,13 @@ DebugPrint ( ... ) { - VA_LIST Marker; + VA_LIST Marker; VA_START (Marker, Format); DebugVPrint (ErrorLevel, Format, Marker); VA_END (Marker); } - /** Prints a debug message to the debug output device if the specified error level is enabled base on Null-terminated format string and a @@ -138,13 +136,13 @@ DebugPrint ( **/ VOID DebugPrintMarker ( - IN UINTN ErrorLevel, - IN CONST CHAR8 *Format, - IN VA_LIST VaListMarker, - IN BASE_LIST BaseListMarker + IN UINTN ErrorLevel, + IN CONST CHAR8 *Format, + IN VA_LIST VaListMarker, + IN BASE_LIST BaseListMarker ) { - CHAR8 Buffer[MAX_DEBUG_MESSAGE_LENGTH]; + CHAR8 Buffer[MAX_DEBUG_MESSAGE_LENGTH]; if (!mPostEBS) { // @@ -175,7 +173,6 @@ DebugPrintMarker ( } } - /** Prints a debug message to the debug output device if the specified error level is enabled. @@ -194,15 +191,14 @@ DebugPrintMarker ( VOID EFIAPI DebugVPrint ( - IN UINTN ErrorLevel, - IN CONST CHAR8 *Format, - IN VA_LIST VaListMarker + IN UINTN ErrorLevel, + IN CONST CHAR8 *Format, + IN VA_LIST VaListMarker ) { DebugPrintMarker (ErrorLevel, Format, VaListMarker, NULL); } - /** Prints a debug message to the debug output device if the specified error level is enabled. @@ -223,15 +219,14 @@ DebugVPrint ( VOID EFIAPI DebugBPrint ( - IN UINTN ErrorLevel, - IN CONST CHAR8 *Format, - IN BASE_LIST BaseListMarker + IN UINTN ErrorLevel, + IN CONST CHAR8 *Format, + IN BASE_LIST BaseListMarker ) { DebugPrintMarker (ErrorLevel, Format, mVaListNull, BaseListMarker); } - /** Prints an assert message containing a filename, line number, and description. This may be followed by a breakpoint or a dead loop. @@ -287,15 +282,14 @@ DebugAssert ( // // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings // - if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) { + if ((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) { CpuBreakpoint (); - } else if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) { + } else if ((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) { CpuDeadLoop (); } } } - /** Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer. @@ -326,10 +320,9 @@ DebugClearMemory ( // // SetMem() checks for the the ASSERT() condition on Length and returns Buffer // - return SetMem (Buffer, Length, PcdGet8(PcdDebugClearMemoryValue)); + return SetMem (Buffer, Length, PcdGet8 (PcdDebugClearMemoryValue)); } - /** Returns TRUE if ASSERT() macros are enabled. @@ -346,10 +339,9 @@ DebugAssertEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0); } - /** Returns TRUE if DEBUG() macros are enabled. @@ -366,10 +358,9 @@ DebugPrintEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0); } - /** Returns TRUE if DEBUG_CODE() macros are enabled. @@ -386,10 +377,9 @@ DebugCodeEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0); } - /** Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled. @@ -406,7 +396,7 @@ DebugClearMemoryEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0); } /** @@ -421,9 +411,8 @@ DebugClearMemoryEnabled ( BOOLEAN EFIAPI DebugPrintLevelEnabled ( - IN CONST UINTN ErrorLevel + IN CONST UINTN ErrorLevel ) { - return (BOOLEAN) ((ErrorLevel & PcdGet32(PcdFixedDebugPrintErrorLevel)) != 0); + return (BOOLEAN)((ErrorLevel & PcdGet32 (PcdFixedDebugPrintErrorLevel)) != 0); } - diff --git a/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLibConstructor.c b/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLibConstructor.c index 96fc1c4..298d17c 100644 --- a/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLibConstructor.c +++ b/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLibConstructor.c @@ -15,16 +15,16 @@ // // BOOLEAN value to indicate if it is at the post ExitBootServices pahse // -BOOLEAN mPostEBS = FALSE; +BOOLEAN mPostEBS = FALSE; -static EFI_EVENT mExitBootServicesEvent; +static EFI_EVENT mExitBootServicesEvent; // // Pointer to SystemTable // This library instance may have a cycle consume with UefiBootServicesTableLib // because of the constructors. // -EFI_BOOT_SERVICES *mDebugBS; +EFI_BOOT_SERVICES *mDebugBS; /** This routine sets the mPostEBS for exit boot servies true @@ -37,8 +37,8 @@ EFI_BOOT_SERVICES *mDebugBS; VOID EFIAPI ExitBootServicesCallback ( - EFI_EVENT Event, - VOID* Context + EFI_EVENT Event, + VOID *Context ) { mPostEBS = TRUE; @@ -57,9 +57,9 @@ ExitBootServicesCallback ( **/ EFI_STATUS EFIAPI -DxeDebugLibConstructor( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable +DxeDebugLibConstructor ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable ) { mDebugBS = SystemTable->BootServices; @@ -86,9 +86,9 @@ DxeDebugLibConstructor( **/ EFI_STATUS EFIAPI -DxeDebugLibDestructor( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable +DxeDebugLibDestructor ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable ) { if (mExitBootServicesEvent != NULL) { diff --git a/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c b/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c index fcfdafe..5b28cd1 100644 --- a/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c +++ b/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c @@ -6,7 +6,6 @@ **/ - #include #include @@ -21,15 +20,14 @@ // #define MAX_DEBUG_MESSAGE_LENGTH 0x100 - // // VA_LIST can not initialize to NULL for all compiler, so we use this to // indicate a null VA_LIST // -VA_LIST mVaListNull; +VA_LIST mVaListNull; -extern BOOLEAN mPostEBS; -extern EFI_SYSTEM_TABLE *mDebugST; +extern BOOLEAN mPostEBS; +extern EFI_SYSTEM_TABLE *mDebugST; /** Prints a debug message to the debug output device if the specified error level is enabled. @@ -54,14 +52,13 @@ DebugPrint ( ... ) { - VA_LIST Marker; + VA_LIST Marker; VA_START (Marker, Format); DebugVPrint (ErrorLevel, Format, Marker); VA_END (Marker); } - /** Prints a debug message to the debug output device if the specified error level is enabled base on Null-terminated format string and a @@ -81,13 +78,13 @@ DebugPrint ( **/ VOID DebugPrintMarker ( - IN UINTN ErrorLevel, - IN CONST CHAR8 *Format, - IN VA_LIST VaListMarker, - IN BASE_LIST BaseListMarker + IN UINTN ErrorLevel, + IN CONST CHAR8 *Format, + IN VA_LIST VaListMarker, + IN BASE_LIST BaseListMarker ) { - CHAR16 Buffer[MAX_DEBUG_MESSAGE_LENGTH]; + CHAR16 Buffer[MAX_DEBUG_MESSAGE_LENGTH]; if (!mPostEBS) { // @@ -120,7 +117,6 @@ DebugPrintMarker ( } } - /** Prints a debug message to the debug output device if the specified error level is enabled. @@ -139,15 +135,14 @@ DebugPrintMarker ( VOID EFIAPI DebugVPrint ( - IN UINTN ErrorLevel, - IN CONST CHAR8 *Format, - IN VA_LIST VaListMarker + IN UINTN ErrorLevel, + IN CONST CHAR8 *Format, + IN VA_LIST VaListMarker ) { DebugPrintMarker (ErrorLevel, Format, VaListMarker, NULL); } - /** Prints a debug message to the debug output device if the specified error level is enabled. @@ -168,15 +163,14 @@ DebugVPrint ( VOID EFIAPI DebugBPrint ( - IN UINTN ErrorLevel, - IN CONST CHAR8 *Format, - IN BASE_LIST BaseListMarker + IN UINTN ErrorLevel, + IN CONST CHAR8 *Format, + IN BASE_LIST BaseListMarker ) { DebugPrintMarker (ErrorLevel, Format, mVaListNull, BaseListMarker); } - /** Prints an assert message containing a filename, line number, and description. This may be followed by a breakpoint or a dead loop. @@ -234,15 +228,14 @@ DebugAssert ( // // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings // - if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) { + if ((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) { CpuBreakpoint (); - } else if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) { + } else if ((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) { CpuDeadLoop (); } } } - /** Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer. @@ -273,10 +266,9 @@ DebugClearMemory ( // // SetMem() checks for the the ASSERT() condition on Length and returns Buffer // - return SetMem (Buffer, Length, PcdGet8(PcdDebugClearMemoryValue)); + return SetMem (Buffer, Length, PcdGet8 (PcdDebugClearMemoryValue)); } - /** Returns TRUE if ASSERT() macros are enabled. @@ -293,10 +285,9 @@ DebugAssertEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0); } - /** Returns TRUE if DEBUG() macros are enabled. @@ -313,10 +304,9 @@ DebugPrintEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0); } - /** Returns TRUE if DEBUG_CODE() macros are enabled. @@ -333,10 +323,9 @@ DebugCodeEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0); } - /** Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled. @@ -353,7 +342,7 @@ DebugClearMemoryEnabled ( VOID ) { - return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0); + return (BOOLEAN)((PcdGet8 (PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0); } /** @@ -368,8 +357,8 @@ DebugClearMemoryEnabled ( BOOLEAN EFIAPI DebugPrintLevelEnabled ( - IN CONST UINTN ErrorLevel + IN CONST UINTN ErrorLevel ) { - return (BOOLEAN) ((ErrorLevel & PcdGet32(PcdFixedDebugPrintErrorLevel)) != 0); + return (BOOLEAN)((ErrorLevel & PcdGet32 (PcdFixedDebugPrintErrorLevel)) != 0); } diff --git a/MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c b/MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c index b4ac17c..103f9f0 100644 --- a/MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c +++ b/MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c @@ -15,16 +15,16 @@ // // BOOLEAN value to indicate if it is at the post ExitBootServices pahse // -BOOLEAN mPostEBS = FALSE; +BOOLEAN mPostEBS = FALSE; -static EFI_EVENT mExitBootServicesEvent; +static EFI_EVENT mExitBootServicesEvent; // // Pointer to SystemTable // This library instance may have a cycle consume with UefiBootServicesTableLib // because of the constructors. // -EFI_SYSTEM_TABLE *mDebugST; +EFI_SYSTEM_TABLE *mDebugST; /** This routine sets the mPostEBS for exit boot servies true @@ -37,8 +37,8 @@ EFI_SYSTEM_TABLE *mDebugST; VOID EFIAPI ExitBootServicesCallback ( - EFI_EVENT Event, - VOID* Context + EFI_EVENT Event, + VOID *Context ) { mPostEBS = TRUE; @@ -57,20 +57,20 @@ ExitBootServicesCallback ( **/ EFI_STATUS EFIAPI -DxeDebugLibConstructor( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable +DxeDebugLibConstructor ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable ) { mDebugST = SystemTable; SystemTable->BootServices->CreateEvent ( - EVT_SIGNAL_EXIT_BOOT_SERVICES, - TPL_NOTIFY, - ExitBootServicesCallback, - NULL, - &mExitBootServicesEvent - ); + EVT_SIGNAL_EXIT_BOOT_SERVICES, + TPL_NOTIFY, + ExitBootServicesCallback, + NULL, + &mExitBootServicesEvent + ); return EFI_SUCCESS; } @@ -86,9 +86,9 @@ DxeDebugLibConstructor( **/ EFI_STATUS EFIAPI -DxeDebugLibDestructor( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable +DxeDebugLibDestructor ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable ) { if (mExitBootServicesEvent != NULL) { diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c index 1515d2d..1aaa968 100644 --- a/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c +++ b/MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c @@ -38,8 +38,8 @@ UefiDevicePathLibStrDuplicate ( **/ CHAR16 * GetParamByNodeName ( - IN CHAR16 *Str, - IN CHAR16 *NodeName + IN CHAR16 *Str, + IN CHAR16 *NodeName ) { CHAR16 *ParamStr; @@ -65,14 +65,16 @@ GetParamByNodeName ( // ParamStr++; ParameterLength = 0; - StrPointer = ParamStr; + StrPointer = ParamStr; while (!IS_NULL (*StrPointer)) { if (IS_RIGHT_PARENTH (*StrPointer)) { break; } + StrPointer++; ParameterLength++; } + if (IS_NULL (*StrPointer)) { // // ')' not found @@ -84,6 +86,7 @@ GetParamByNodeName ( if (ParamStr == NULL) { return NULL; } + // // Terminate the parameter string // @@ -106,14 +109,14 @@ GetParamByNodeName ( **/ CHAR16 * SplitStr ( - IN OUT CHAR16 **List, - IN CHAR16 Separator + IN OUT CHAR16 **List, + IN CHAR16 Separator ) { CHAR16 *Str; CHAR16 *ReturnStr; - Str = *List; + Str = *List; ReturnStr = Str; if (IS_NULL (*Str)) { @@ -127,6 +130,7 @@ SplitStr ( if (*Str == Separator) { break; } + Str++; } @@ -156,7 +160,7 @@ SplitStr ( **/ CHAR16 * GetNextParamStr ( - IN OUT CHAR16 **List + IN OUT CHAR16 **List ) { // @@ -196,9 +200,11 @@ GetNextDeviceNodeStr ( if (!IS_SLASH (*Str) && !IS_COMMA (*Str) && !IS_LEFT_PARENTH (*Str) && - !IS_RIGHT_PARENTH (*Str)) { + !IS_RIGHT_PARENTH (*Str)) + { break; } + Str++; } @@ -231,7 +237,7 @@ GetNextDeviceNodeStr ( if (IS_COMMA (*Str)) { *IsInstanceEnd = TRUE; - *Str = L'\0'; + *Str = L'\0'; Str++; } else { *IsInstanceEnd = FALSE; @@ -246,7 +252,6 @@ GetNextDeviceNodeStr ( return ReturnStr; } - /** Return whether the integer string is a hex string. @@ -258,23 +263,24 @@ GetNextDeviceNodeStr ( **/ BOOLEAN IsHexStr ( - IN CHAR16 *Str + IN CHAR16 *Str ) { // // skip preceeding white space // while ((*Str != 0) && *Str == L' ') { - Str ++; + Str++; } + // // skip preceeding zeros // while ((*Str != 0) && *Str == L'0') { - Str ++; + Str++; } - return (BOOLEAN) (*Str == L'x' || *Str == L'X'); + return (BOOLEAN)(*Str == L'x' || *Str == L'X'); } /** @@ -329,16 +335,17 @@ Strtoi64 ( **/ VOID StrToAscii ( - IN CHAR16 *Str, - IN OUT CHAR8 **AsciiStr + IN CHAR16 *Str, + IN OUT CHAR8 **AsciiStr ) { - CHAR8 *Dest; + CHAR8 *Dest; Dest = *AsciiStr; while (!IS_NULL (*Str)) { - *(Dest++) = (CHAR8) *(Str++); + *(Dest++) = (CHAR8)*(Str++); } + *Dest = 0; // @@ -357,14 +364,14 @@ StrToAscii ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextGenericPath ( - IN UINT8 Type, - IN CHAR16 *TextDeviceNode + IN UINT8 Type, + IN CHAR16 *TextDeviceNode ) { - EFI_DEVICE_PATH_PROTOCOL *Node; - CHAR16 *SubtypeStr; - CHAR16 *DataStr; - UINTN DataLength; + EFI_DEVICE_PATH_PROTOCOL *Node; + CHAR16 *SubtypeStr; + CHAR16 *DataStr; + UINTN DataLength; SubtypeStr = GetNextParamStr (&TextDeviceNode); DataStr = GetNextParamStr (&TextDeviceNode); @@ -374,13 +381,14 @@ DevPathFromTextGenericPath ( } else { DataLength = StrLen (DataStr) / 2; } + Node = CreateDeviceNode ( Type, - (UINT8) Strtoi (SubtypeStr), - (UINT16) (sizeof (EFI_DEVICE_PATH_PROTOCOL) + DataLength) + (UINT8)Strtoi (SubtypeStr), + (UINT16)(sizeof (EFI_DEVICE_PATH_PROTOCOL) + DataLength) ); - StrHexToBytes (DataStr, DataLength * 2, (UINT8 *) (Node + 1), DataLength); + StrHexToBytes (DataStr, DataLength * 2, (UINT8 *)(Node + 1), DataLength); return Node; } @@ -394,14 +402,14 @@ DevPathFromTextGenericPath ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextPath ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { - CHAR16 *TypeStr; + CHAR16 *TypeStr; - TypeStr = GetNextParamStr (&TextDeviceNode); + TypeStr = GetNextParamStr (&TextDeviceNode); - return DevPathFromTextGenericPath ((UINT8) Strtoi (TypeStr), TextDeviceNode); + return DevPathFromTextGenericPath ((UINT8)Strtoi (TypeStr), TextDeviceNode); } /** @@ -414,7 +422,7 @@ DevPathFromTextPath ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextHardwarePath ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { return DevPathFromTextGenericPath (HARDWARE_DEVICE_PATH, TextDeviceNode); @@ -430,25 +438,25 @@ DevPathFromTextHardwarePath ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextPci ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { - CHAR16 *FunctionStr; - CHAR16 *DeviceStr; - PCI_DEVICE_PATH *Pci; + CHAR16 *FunctionStr; + CHAR16 *DeviceStr; + PCI_DEVICE_PATH *Pci; DeviceStr = GetNextParamStr (&TextDeviceNode); FunctionStr = GetNextParamStr (&TextDeviceNode); - Pci = (PCI_DEVICE_PATH *) CreateDeviceNode ( - HARDWARE_DEVICE_PATH, - HW_PCI_DP, - (UINT16) sizeof (PCI_DEVICE_PATH) - ); + Pci = (PCI_DEVICE_PATH *)CreateDeviceNode ( + HARDWARE_DEVICE_PATH, + HW_PCI_DP, + (UINT16)sizeof (PCI_DEVICE_PATH) + ); - Pci->Function = (UINT8) Strtoi (FunctionStr); - Pci->Device = (UINT8) Strtoi (DeviceStr); + Pci->Function = (UINT8)Strtoi (FunctionStr); + Pci->Device = (UINT8)Strtoi (DeviceStr); - return (EFI_DEVICE_PATH_PROTOCOL *) Pci; + return (EFI_DEVICE_PATH_PROTOCOL *)Pci; } /** @@ -461,22 +469,22 @@ DevPathFromTextPci ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextPcCard ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { CHAR16 *FunctionNumberStr; PCCARD_DEVICE_PATH *Pccard; FunctionNumberStr = GetNextParamStr (&TextDeviceNode); - Pccard = (PCCARD_DEVICE_PATH *) CreateDeviceNode ( - HARDWARE_DEVICE_PATH, - HW_PCCARD_DP, - (UINT16) sizeof (PCCARD_DEVICE_PATH) - ); + Pccard = (PCCARD_DEVICE_PATH *)CreateDeviceNode ( + HARDWARE_DEVICE_PATH, + HW_PCCARD_DP, + (UINT16)sizeof (PCCARD_DEVICE_PATH) + ); - Pccard->FunctionNumber = (UINT8) Strtoi (FunctionNumberStr); + Pccard->FunctionNumber = (UINT8)Strtoi (FunctionNumberStr); - return (EFI_DEVICE_PATH_PROTOCOL *) Pccard; + return (EFI_DEVICE_PATH_PROTOCOL *)Pccard; } /** @@ -489,7 +497,7 @@ DevPathFromTextPcCard ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextMemoryMapped ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { CHAR16 *MemoryTypeStr; @@ -500,17 +508,17 @@ DevPathFromTextMemoryMapped ( MemoryTypeStr = GetNextParamStr (&TextDeviceNode); StartingAddressStr = GetNextParamStr (&TextDeviceNode); EndingAddressStr = GetNextParamStr (&TextDeviceNode); - MemMap = (MEMMAP_DEVICE_PATH *) CreateDeviceNode ( + MemMap = (MEMMAP_DEVICE_PATH *)CreateDeviceNode ( HARDWARE_DEVICE_PATH, HW_MEMMAP_DP, - (UINT16) sizeof (MEMMAP_DEVICE_PATH) + (UINT16)sizeof (MEMMAP_DEVICE_PATH) ); - MemMap->MemoryType = (UINT32) Strtoi (MemoryTypeStr); + MemMap->MemoryType = (UINT32)Strtoi (MemoryTypeStr); Strtoi64 (StartingAddressStr, &MemMap->StartingAddress); Strtoi64 (EndingAddressStr, &MemMap->EndingAddress); - return (EFI_DEVICE_PATH_PROTOCOL *) MemMap; + return (EFI_DEVICE_PATH_PROTOCOL *)MemMap; } /** @@ -526,9 +534,9 @@ DevPathFromTextMemoryMapped ( **/ EFI_DEVICE_PATH_PROTOCOL * ConvertFromTextVendor ( - IN CHAR16 *TextDeviceNode, - IN UINT8 Type, - IN UINT8 SubType + IN CHAR16 *TextDeviceNode, + IN UINT8 Type, + IN UINT8 SubType ) { CHAR16 *GuidStr; @@ -543,18 +551,18 @@ ConvertFromTextVendor ( // // Two hex characters make up 1 buffer byte // - Length = (Length + 1) / 2; + Length = (Length + 1) / 2; - Vendor = (VENDOR_DEVICE_PATH *) CreateDeviceNode ( - Type, - SubType, - (UINT16) (sizeof (VENDOR_DEVICE_PATH) + Length) - ); + Vendor = (VENDOR_DEVICE_PATH *)CreateDeviceNode ( + Type, + SubType, + (UINT16)(sizeof (VENDOR_DEVICE_PATH) + Length) + ); StrToGuid (GuidStr, &Vendor->Guid); - StrHexToBytes (DataStr, Length * 2, (UINT8 *) (Vendor + 1), Length); + StrHexToBytes (DataStr, Length * 2, (UINT8 *)(Vendor + 1), Length); - return (EFI_DEVICE_PATH_PROTOCOL *) Vendor; + return (EFI_DEVICE_PATH_PROTOCOL *)Vendor; } /** @@ -567,7 +575,7 @@ ConvertFromTextVendor ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextVenHw ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { return ConvertFromTextVendor ( @@ -587,21 +595,21 @@ DevPathFromTextVenHw ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextCtrl ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { CHAR16 *ControllerStr; CONTROLLER_DEVICE_PATH *Controller; ControllerStr = GetNextParamStr (&TextDeviceNode); - Controller = (CONTROLLER_DEVICE_PATH *) CreateDeviceNode ( - HARDWARE_DEVICE_PATH, - HW_CONTROLLER_DP, - (UINT16) sizeof (CONTROLLER_DEVICE_PATH) - ); - Controller->ControllerNumber = (UINT32) Strtoi (ControllerStr); + Controller = (CONTROLLER_DEVICE_PATH *)CreateDeviceNode ( + HARDWARE_DEVICE_PATH, + HW_CONTROLLER_DP, + (UINT16)sizeof (CONTROLLER_DEVICE_PATH) + ); + Controller->ControllerNumber = (UINT32)Strtoi (ControllerStr); - return (EFI_DEVICE_PATH_PROTOCOL *) Controller; + return (EFI_DEVICE_PATH_PROTOCOL *)Controller; } /** @@ -614,28 +622,28 @@ DevPathFromTextCtrl ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextBmc ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { - CHAR16 *InterfaceTypeStr; - CHAR16 *BaseAddressStr; - BMC_DEVICE_PATH *BmcDp; + CHAR16 *InterfaceTypeStr; + CHAR16 *BaseAddressStr; + BMC_DEVICE_PATH *BmcDp; InterfaceTypeStr = GetNextParamStr (&TextDeviceNode); BaseAddressStr = GetNextParamStr (&TextDeviceNode); - BmcDp = (BMC_DEVICE_PATH *) CreateDeviceNode ( - HARDWARE_DEVICE_PATH, - HW_BMC_DP, - (UINT16) sizeof (BMC_DEVICE_PATH) - ); + BmcDp = (BMC_DEVICE_PATH *)CreateDeviceNode ( + HARDWARE_DEVICE_PATH, + HW_BMC_DP, + (UINT16)sizeof (BMC_DEVICE_PATH) + ); - BmcDp->InterfaceType = (UINT8) Strtoi (InterfaceTypeStr); + BmcDp->InterfaceType = (UINT8)Strtoi (InterfaceTypeStr); WriteUnaligned64 ( - (UINT64 *) (&BmcDp->BaseAddress), + (UINT64 *)(&BmcDp->BaseAddress), StrHexToUint64 (BaseAddressStr) ); - return (EFI_DEVICE_PATH_PROTOCOL *) BmcDp; + return (EFI_DEVICE_PATH_PROTOCOL *)BmcDp; } /** @@ -648,7 +656,7 @@ DevPathFromTextBmc ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextAcpiPath ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { return DevPathFromTextGenericPath (ACPI_DEVICE_PATH, TextDeviceNode); @@ -663,14 +671,14 @@ DevPathFromTextAcpiPath ( **/ UINT32 EisaIdFromText ( - IN CHAR16 *Text + IN CHAR16 *Text ) { return (((Text[0] - 'A' + 1) & 0x1f) << 10) - + (((Text[1] - 'A' + 1) & 0x1f) << 5) - + (((Text[2] - 'A' + 1) & 0x1f) << 0) - + (UINT32) (StrHexToUintn (&Text[3]) << 16) - ; + + (((Text[1] - 'A' + 1) & 0x1f) << 5) + + (((Text[2] - 'A' + 1) & 0x1f) << 0) + + (UINT32)(StrHexToUintn (&Text[3]) << 16) + ; } /** @@ -683,7 +691,7 @@ EisaIdFromText ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextAcpi ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { CHAR16 *HIDStr; @@ -692,16 +700,16 @@ DevPathFromTextAcpi ( HIDStr = GetNextParamStr (&TextDeviceNode); UIDStr = GetNextParamStr (&TextDeviceNode); - Acpi = (ACPI_HID_DEVICE_PATH *) CreateDeviceNode ( - ACPI_DEVICE_PATH, - ACPI_DP, - (UINT16) sizeof (ACPI_HID_DEVICE_PATH) - ); + Acpi = (ACPI_HID_DEVICE_PATH *)CreateDeviceNode ( + ACPI_DEVICE_PATH, + ACPI_DP, + (UINT16)sizeof (ACPI_HID_DEVICE_PATH) + ); Acpi->HID = EisaIdFromText (HIDStr); - Acpi->UID = (UINT32) Strtoi (UIDStr); + Acpi->UID = (UINT32)Strtoi (UIDStr); - return (EFI_DEVICE_PATH_PROTOCOL *) Acpi; + return (EFI_DEVICE_PATH_PROTOCOL *)Acpi; } /** @@ -715,7 +723,7 @@ DevPathFromTextAcpi ( **/ EFI_DEVICE_PATH_PROTOCOL * ConvertFromTextAcpi ( - IN CHAR16 *TextDeviceNode, + IN CHAR16 *TextDeviceNode, IN UINT32 PnPId ) { @@ -723,16 +731,16 @@ ConvertFromTextAcpi ( ACPI_HID_DEVICE_PATH *Acpi; UIDStr = GetNextParamStr (&TextDeviceNode); - Acpi = (ACPI_HID_DEVICE_PATH *) CreateDeviceNode ( - ACPI_DEVICE_PATH, - ACPI_DP, - (UINT16) sizeof (ACPI_HID_DEVICE_PATH) - ); + Acpi = (ACPI_HID_DEVICE_PATH *)CreateDeviceNode ( + ACPI_DEVICE_PATH, + ACPI_DP, + (UINT16)sizeof (ACPI_HID_DEVICE_PATH) + ); Acpi->HID = EFI_PNP_ID (PnPId); - Acpi->UID = (UINT32) Strtoi (UIDStr); + Acpi->UID = (UINT32)Strtoi (UIDStr); - return (EFI_DEVICE_PATH_PROTOCOL *) Acpi; + return (EFI_DEVICE_PATH_PROTOCOL *)Acpi; } /** @@ -745,7 +753,7 @@ ConvertFromTextAcpi ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextPciRoot ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { return ConvertFromTextAcpi (TextDeviceNode, 0x0a03); @@ -761,7 +769,7 @@ DevPathFromTextPciRoot ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextPcieRoot ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { return ConvertFromTextAcpi (TextDeviceNode, 0x0a08); @@ -777,7 +785,7 @@ DevPathFromTextPcieRoot ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextFloppy ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { return ConvertFromTextAcpi (TextDeviceNode, 0x0604); @@ -793,7 +801,7 @@ DevPathFromTextFloppy ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextKeyboard ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { return ConvertFromTextAcpi (TextDeviceNode, 0x0301); @@ -809,7 +817,7 @@ DevPathFromTextKeyboard ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextSerial ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { return ConvertFromTextAcpi (TextDeviceNode, 0x0501); @@ -825,7 +833,7 @@ DevPathFromTextSerial ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextParallelPort ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { return ConvertFromTextAcpi (TextDeviceNode, 0x0401); @@ -841,7 +849,7 @@ DevPathFromTextParallelPort ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextAcpiEx ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { CHAR16 *HIDStr; @@ -861,25 +869,25 @@ DevPathFromTextAcpiEx ( CIDSTRStr = GetNextParamStr (&TextDeviceNode); UIDSTRStr = GetNextParamStr (&TextDeviceNode); - Length = (UINT16) (sizeof (ACPI_EXTENDED_HID_DEVICE_PATH) + StrLen (HIDSTRStr) + 1); - Length = (UINT16) (Length + StrLen (UIDSTRStr) + 1); - Length = (UINT16) (Length + StrLen (CIDSTRStr) + 1); - AcpiEx = (ACPI_EXTENDED_HID_DEVICE_PATH *) CreateDeviceNode ( - ACPI_DEVICE_PATH, - ACPI_EXTENDED_DP, - Length - ); + Length = (UINT16)(sizeof (ACPI_EXTENDED_HID_DEVICE_PATH) + StrLen (HIDSTRStr) + 1); + Length = (UINT16)(Length + StrLen (UIDSTRStr) + 1); + Length = (UINT16)(Length + StrLen (CIDSTRStr) + 1); + AcpiEx = (ACPI_EXTENDED_HID_DEVICE_PATH *)CreateDeviceNode ( + ACPI_DEVICE_PATH, + ACPI_EXTENDED_DP, + Length + ); AcpiEx->HID = EisaIdFromText (HIDStr); AcpiEx->CID = EisaIdFromText (CIDStr); - AcpiEx->UID = (UINT32) Strtoi (UIDStr); + AcpiEx->UID = (UINT32)Strtoi (UIDStr); - AsciiStr = (CHAR8 *) ((UINT8 *)AcpiEx + sizeof (ACPI_EXTENDED_HID_DEVICE_PATH)); + AsciiStr = (CHAR8 *)((UINT8 *)AcpiEx + sizeof (ACPI_EXTENDED_HID_DEVICE_PATH)); StrToAscii (HIDSTRStr, &AsciiStr); StrToAscii (UIDSTRStr, &AsciiStr); StrToAscii (CIDSTRStr, &AsciiStr); - return (EFI_DEVICE_PATH_PROTOCOL *) AcpiEx; + return (EFI_DEVICE_PATH_PROTOCOL *)AcpiEx; } /** @@ -892,7 +900,7 @@ DevPathFromTextAcpiEx ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextAcpiExp ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { CHAR16 *HIDStr; @@ -905,12 +913,12 @@ DevPathFromTextAcpiExp ( HIDStr = GetNextParamStr (&TextDeviceNode); CIDStr = GetNextParamStr (&TextDeviceNode); UIDSTRStr = GetNextParamStr (&TextDeviceNode); - Length = (UINT16) (sizeof (ACPI_EXTENDED_HID_DEVICE_PATH) + StrLen (UIDSTRStr) + 3); - AcpiEx = (ACPI_EXTENDED_HID_DEVICE_PATH *) CreateDeviceNode ( - ACPI_DEVICE_PATH, - ACPI_EXTENDED_DP, - Length - ); + Length = (UINT16)(sizeof (ACPI_EXTENDED_HID_DEVICE_PATH) + StrLen (UIDSTRStr) + 3); + AcpiEx = (ACPI_EXTENDED_HID_DEVICE_PATH *)CreateDeviceNode ( + ACPI_DEVICE_PATH, + ACPI_EXTENDED_DP, + Length + ); AcpiEx->HID = EisaIdFromText (HIDStr); // @@ -918,14 +926,15 @@ DevPathFromTextAcpiExp ( // So when the CID parametr is not specified or specified as 0 in the text device node. // Set the CID to 0 in the ACPI extension device path structure. // - if (*CIDStr == L'\0' || *CIDStr == L'0') { + if ((*CIDStr == L'\0') || (*CIDStr == L'0')) { AcpiEx->CID = 0; } else { AcpiEx->CID = EisaIdFromText (CIDStr); } + AcpiEx->UID = 0; - AsciiStr = (CHAR8 *) ((UINT8 *)AcpiEx + sizeof (ACPI_EXTENDED_HID_DEVICE_PATH)); + AsciiStr = (CHAR8 *)((UINT8 *)AcpiEx + sizeof (ACPI_EXTENDED_HID_DEVICE_PATH)); // // HID string is NULL // @@ -940,7 +949,7 @@ DevPathFromTextAcpiExp ( // *AsciiStr = '\0'; - return (EFI_DEVICE_PATH_PROTOCOL *) AcpiEx; + return (EFI_DEVICE_PATH_PROTOCOL *)AcpiEx; } /** @@ -953,7 +962,7 @@ DevPathFromTextAcpiExp ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextAcpiAdr ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { CHAR16 *DisplayDeviceStr; @@ -961,11 +970,11 @@ DevPathFromTextAcpiAdr ( UINTN Index; UINTN Length; - AcpiAdr = (ACPI_ADR_DEVICE_PATH *) CreateDeviceNode ( - ACPI_DEVICE_PATH, - ACPI_ADR_DP, - (UINT16) sizeof (ACPI_ADR_DEVICE_PATH) - ); + AcpiAdr = (ACPI_ADR_DEVICE_PATH *)CreateDeviceNode ( + ACPI_DEVICE_PATH, + ACPI_ADR_DP, + (UINT16)sizeof (ACPI_ADR_DEVICE_PATH) + ); ASSERT (AcpiAdr != NULL); for (Index = 0; ; Index++) { @@ -973,6 +982,7 @@ DevPathFromTextAcpiAdr ( if (IS_NULL (*DisplayDeviceStr)) { break; } + if (Index > 0) { Length = DevicePathNodeLength (AcpiAdr); AcpiAdr = ReallocatePool ( @@ -984,10 +994,10 @@ DevPathFromTextAcpiAdr ( SetDevicePathNodeLength (AcpiAdr, Length + sizeof (UINT32)); } - (&AcpiAdr->ADR)[Index] = (UINT32) Strtoi (DisplayDeviceStr); + (&AcpiAdr->ADR)[Index] = (UINT32)Strtoi (DisplayDeviceStr); } - return (EFI_DEVICE_PATH_PROTOCOL *) AcpiAdr; + return (EFI_DEVICE_PATH_PROTOCOL *)AcpiAdr; } /** @@ -1000,7 +1010,7 @@ DevPathFromTextAcpiAdr ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextMsg ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { return DevPathFromTextGenericPath (MESSAGING_DEVICE_PATH, TextDeviceNode); @@ -1016,19 +1026,19 @@ DevPathFromTextMsg ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextAta ( -IN CHAR16 *TextDeviceNode -) + IN CHAR16 *TextDeviceNode + ) { - CHAR16 *PrimarySecondaryStr; - CHAR16 *SlaveMasterStr; - CHAR16 *LunStr; - ATAPI_DEVICE_PATH *Atapi; + CHAR16 *PrimarySecondaryStr; + CHAR16 *SlaveMasterStr; + CHAR16 *LunStr; + ATAPI_DEVICE_PATH *Atapi; - Atapi = (ATAPI_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_ATAPI_DP, - (UINT16) sizeof (ATAPI_DEVICE_PATH) - ); + Atapi = (ATAPI_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_ATAPI_DP, + (UINT16)sizeof (ATAPI_DEVICE_PATH) + ); PrimarySecondaryStr = GetNextParamStr (&TextDeviceNode); SlaveMasterStr = GetNextParamStr (&TextDeviceNode); @@ -1039,19 +1049,20 @@ IN CHAR16 *TextDeviceNode } else if (StrCmp (PrimarySecondaryStr, L"Secondary") == 0) { Atapi->PrimarySecondary = 1; } else { - Atapi->PrimarySecondary = (UINT8) Strtoi (PrimarySecondaryStr); + Atapi->PrimarySecondary = (UINT8)Strtoi (PrimarySecondaryStr); } + if (StrCmp (SlaveMasterStr, L"Master") == 0) { - Atapi->SlaveMaster = 0; + Atapi->SlaveMaster = 0; } else if (StrCmp (SlaveMasterStr, L"Slave") == 0) { - Atapi->SlaveMaster = 1; + Atapi->SlaveMaster = 1; } else { - Atapi->SlaveMaster = (UINT8) Strtoi (SlaveMasterStr); + Atapi->SlaveMaster = (UINT8)Strtoi (SlaveMasterStr); } - Atapi->Lun = (UINT16) Strtoi (LunStr); + Atapi->Lun = (UINT16)Strtoi (LunStr); - return (EFI_DEVICE_PATH_PROTOCOL *) Atapi; + return (EFI_DEVICE_PATH_PROTOCOL *)Atapi; } /** @@ -1064,7 +1075,7 @@ IN CHAR16 *TextDeviceNode **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextScsi ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { CHAR16 *PunStr; @@ -1073,16 +1084,16 @@ DevPathFromTextScsi ( PunStr = GetNextParamStr (&TextDeviceNode); LunStr = GetNextParamStr (&TextDeviceNode); - Scsi = (SCSI_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_SCSI_DP, - (UINT16) sizeof (SCSI_DEVICE_PATH) - ); + Scsi = (SCSI_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_SCSI_DP, + (UINT16)sizeof (SCSI_DEVICE_PATH) + ); - Scsi->Pun = (UINT16) Strtoi (PunStr); - Scsi->Lun = (UINT16) Strtoi (LunStr); + Scsi->Pun = (UINT16)Strtoi (PunStr); + Scsi->Lun = (UINT16)Strtoi (LunStr); - return (EFI_DEVICE_PATH_PROTOCOL *) Scsi; + return (EFI_DEVICE_PATH_PROTOCOL *)Scsi; } /** @@ -1095,7 +1106,7 @@ DevPathFromTextScsi ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextFibre ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { CHAR16 *WWNStr; @@ -1104,17 +1115,17 @@ DevPathFromTextFibre ( WWNStr = GetNextParamStr (&TextDeviceNode); LunStr = GetNextParamStr (&TextDeviceNode); - Fibre = (FIBRECHANNEL_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_FIBRECHANNEL_DP, - (UINT16) sizeof (FIBRECHANNEL_DEVICE_PATH) - ); + Fibre = (FIBRECHANNEL_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_FIBRECHANNEL_DP, + (UINT16)sizeof (FIBRECHANNEL_DEVICE_PATH) + ); Fibre->Reserved = 0; Strtoi64 (WWNStr, &Fibre->WWN); Strtoi64 (LunStr, &Fibre->Lun); - return (EFI_DEVICE_PATH_PROTOCOL *) Fibre; + return (EFI_DEVICE_PATH_PROTOCOL *)Fibre; } /** @@ -1127,7 +1138,7 @@ DevPathFromTextFibre ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextFibreEx ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { CHAR16 *WWNStr; @@ -1136,20 +1147,20 @@ DevPathFromTextFibreEx ( WWNStr = GetNextParamStr (&TextDeviceNode); LunStr = GetNextParamStr (&TextDeviceNode); - FibreEx = (FIBRECHANNELEX_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_FIBRECHANNELEX_DP, - (UINT16) sizeof (FIBRECHANNELEX_DEVICE_PATH) - ); + FibreEx = (FIBRECHANNELEX_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_FIBRECHANNELEX_DP, + (UINT16)sizeof (FIBRECHANNELEX_DEVICE_PATH) + ); FibreEx->Reserved = 0; - Strtoi64 (WWNStr, (UINT64 *) (&FibreEx->WWN)); - Strtoi64 (LunStr, (UINT64 *) (&FibreEx->Lun)); + Strtoi64 (WWNStr, (UINT64 *)(&FibreEx->WWN)); + Strtoi64 (LunStr, (UINT64 *)(&FibreEx->Lun)); - *(UINT64 *) (&FibreEx->WWN) = SwapBytes64 (*(UINT64 *) (&FibreEx->WWN)); - *(UINT64 *) (&FibreEx->Lun) = SwapBytes64 (*(UINT64 *) (&FibreEx->Lun)); + *(UINT64 *)(&FibreEx->WWN) = SwapBytes64 (*(UINT64 *)(&FibreEx->WWN)); + *(UINT64 *)(&FibreEx->Lun) = SwapBytes64 (*(UINT64 *)(&FibreEx->Lun)); - return (EFI_DEVICE_PATH_PROTOCOL *) FibreEx; + return (EFI_DEVICE_PATH_PROTOCOL *)FibreEx; } /** @@ -1162,23 +1173,23 @@ DevPathFromTextFibreEx ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromText1394 ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { - CHAR16 *GuidStr; - F1394_DEVICE_PATH *F1394DevPath; + CHAR16 *GuidStr; + F1394_DEVICE_PATH *F1394DevPath; - GuidStr = GetNextParamStr (&TextDeviceNode); - F1394DevPath = (F1394_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_1394_DP, - (UINT16) sizeof (F1394_DEVICE_PATH) - ); + GuidStr = GetNextParamStr (&TextDeviceNode); + F1394DevPath = (F1394_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_1394_DP, + (UINT16)sizeof (F1394_DEVICE_PATH) + ); F1394DevPath->Reserved = 0; F1394DevPath->Guid = StrHexToUint64 (GuidStr); - return (EFI_DEVICE_PATH_PROTOCOL *) F1394DevPath; + return (EFI_DEVICE_PATH_PROTOCOL *)F1394DevPath; } /** @@ -1191,25 +1202,25 @@ DevPathFromText1394 ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextUsb ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { - CHAR16 *PortStr; - CHAR16 *InterfaceStr; - USB_DEVICE_PATH *Usb; + CHAR16 *PortStr; + CHAR16 *InterfaceStr; + USB_DEVICE_PATH *Usb; - PortStr = GetNextParamStr (&TextDeviceNode); - InterfaceStr = GetNextParamStr (&TextDeviceNode); - Usb = (USB_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_USB_DP, - (UINT16) sizeof (USB_DEVICE_PATH) - ); + PortStr = GetNextParamStr (&TextDeviceNode); + InterfaceStr = GetNextParamStr (&TextDeviceNode); + Usb = (USB_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_USB_DP, + (UINT16)sizeof (USB_DEVICE_PATH) + ); - Usb->ParentPortNumber = (UINT8) Strtoi (PortStr); - Usb->InterfaceNumber = (UINT8) Strtoi (InterfaceStr); + Usb->ParentPortNumber = (UINT8)Strtoi (PortStr); + Usb->InterfaceNumber = (UINT8)Strtoi (InterfaceStr); - return (EFI_DEVICE_PATH_PROTOCOL *) Usb; + return (EFI_DEVICE_PATH_PROTOCOL *)Usb; } /** @@ -1222,22 +1233,22 @@ DevPathFromTextUsb ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextI2O ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { - CHAR16 *TIDStr; - I2O_DEVICE_PATH *I2ODevPath; + CHAR16 *TIDStr; + I2O_DEVICE_PATH *I2ODevPath; TIDStr = GetNextParamStr (&TextDeviceNode); - I2ODevPath = (I2O_DEVICE_PATH *) CreateDeviceNode ( + I2ODevPath = (I2O_DEVICE_PATH *)CreateDeviceNode ( MESSAGING_DEVICE_PATH, MSG_I2O_DP, - (UINT16) sizeof (I2O_DEVICE_PATH) + (UINT16)sizeof (I2O_DEVICE_PATH) ); - I2ODevPath->Tid = (UINT32) Strtoi (TIDStr); + I2ODevPath->Tid = (UINT32)Strtoi (TIDStr); - return (EFI_DEVICE_PATH_PROTOCOL *) I2ODevPath; + return (EFI_DEVICE_PATH_PROTOCOL *)I2ODevPath; } /** @@ -1250,7 +1261,7 @@ DevPathFromTextI2O ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextInfiniband ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { CHAR16 *FlagsStr; @@ -1265,19 +1276,19 @@ DevPathFromTextInfiniband ( SidStr = GetNextParamStr (&TextDeviceNode); TidStr = GetNextParamStr (&TextDeviceNode); DidStr = GetNextParamStr (&TextDeviceNode); - InfiniBand = (INFINIBAND_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_INFINIBAND_DP, - (UINT16) sizeof (INFINIBAND_DEVICE_PATH) - ); + InfiniBand = (INFINIBAND_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_INFINIBAND_DP, + (UINT16)sizeof (INFINIBAND_DEVICE_PATH) + ); - InfiniBand->ResourceFlags = (UINT32) Strtoi (FlagsStr); - StrToGuid (GuidStr, (EFI_GUID *) InfiniBand->PortGid); + InfiniBand->ResourceFlags = (UINT32)Strtoi (FlagsStr); + StrToGuid (GuidStr, (EFI_GUID *)InfiniBand->PortGid); Strtoi64 (SidStr, &InfiniBand->ServiceId); Strtoi64 (TidStr, &InfiniBand->TargetPortId); Strtoi64 (DidStr, &InfiniBand->DeviceId); - return (EFI_DEVICE_PATH_PROTOCOL *) InfiniBand; + return (EFI_DEVICE_PATH_PROTOCOL *)InfiniBand; } /** @@ -1290,14 +1301,14 @@ DevPathFromTextInfiniband ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextVenMsg ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { return ConvertFromTextVendor ( - TextDeviceNode, - MESSAGING_DEVICE_PATH, - MSG_VENDOR_DP - ); + TextDeviceNode, + MESSAGING_DEVICE_PATH, + MSG_VENDOR_DP + ); } /** @@ -1310,18 +1321,19 @@ DevPathFromTextVenMsg ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextVenPcAnsi ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { VENDOR_DEVICE_PATH *Vendor; - Vendor = (VENDOR_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_VENDOR_DP, - (UINT16) sizeof (VENDOR_DEVICE_PATH)); + Vendor = (VENDOR_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_VENDOR_DP, + (UINT16)sizeof (VENDOR_DEVICE_PATH) + ); CopyGuid (&Vendor->Guid, &gEfiPcAnsiGuid); - return (EFI_DEVICE_PATH_PROTOCOL *) Vendor; + return (EFI_DEVICE_PATH_PROTOCOL *)Vendor; } /** @@ -1334,18 +1346,19 @@ DevPathFromTextVenPcAnsi ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextVenVt100 ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { VENDOR_DEVICE_PATH *Vendor; - Vendor = (VENDOR_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_VENDOR_DP, - (UINT16) sizeof (VENDOR_DEVICE_PATH)); + Vendor = (VENDOR_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_VENDOR_DP, + (UINT16)sizeof (VENDOR_DEVICE_PATH) + ); CopyGuid (&Vendor->Guid, &gEfiVT100Guid); - return (EFI_DEVICE_PATH_PROTOCOL *) Vendor; + return (EFI_DEVICE_PATH_PROTOCOL *)Vendor; } /** @@ -1358,18 +1371,19 @@ DevPathFromTextVenVt100 ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextVenVt100Plus ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { VENDOR_DEVICE_PATH *Vendor; - Vendor = (VENDOR_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_VENDOR_DP, - (UINT16) sizeof (VENDOR_DEVICE_PATH)); + Vendor = (VENDOR_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_VENDOR_DP, + (UINT16)sizeof (VENDOR_DEVICE_PATH) + ); CopyGuid (&Vendor->Guid, &gEfiVT100PlusGuid); - return (EFI_DEVICE_PATH_PROTOCOL *) Vendor; + return (EFI_DEVICE_PATH_PROTOCOL *)Vendor; } /** @@ -1382,18 +1396,19 @@ DevPathFromTextVenVt100Plus ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextVenUtf8 ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { VENDOR_DEVICE_PATH *Vendor; - Vendor = (VENDOR_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_VENDOR_DP, - (UINT16) sizeof (VENDOR_DEVICE_PATH)); + Vendor = (VENDOR_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_VENDOR_DP, + (UINT16)sizeof (VENDOR_DEVICE_PATH) + ); CopyGuid (&Vendor->Guid, &gEfiVTUTF8Guid); - return (EFI_DEVICE_PATH_PROTOCOL *) Vendor; + return (EFI_DEVICE_PATH_PROTOCOL *)Vendor; } /** @@ -1406,18 +1421,18 @@ DevPathFromTextVenUtf8 ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextUartFlowCtrl ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { - CHAR16 *ValueStr; - UART_FLOW_CONTROL_DEVICE_PATH *UartFlowControl; + CHAR16 *ValueStr; + UART_FLOW_CONTROL_DEVICE_PATH *UartFlowControl; ValueStr = GetNextParamStr (&TextDeviceNode); - UartFlowControl = (UART_FLOW_CONTROL_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_VENDOR_DP, - (UINT16) sizeof (UART_FLOW_CONTROL_DEVICE_PATH) - ); + UartFlowControl = (UART_FLOW_CONTROL_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_VENDOR_DP, + (UINT16)sizeof (UART_FLOW_CONTROL_DEVICE_PATH) + ); CopyGuid (&UartFlowControl->Guid, &gEfiUartDevicePathGuid); if (StrCmp (ValueStr, L"XonXoff") == 0) { @@ -1428,7 +1443,7 @@ DevPathFromTextUartFlowCtrl ( UartFlowControl->FlowControlMap = 0; } - return (EFI_DEVICE_PATH_PROTOCOL *) UartFlowControl; + return (EFI_DEVICE_PATH_PROTOCOL *)UartFlowControl; } /** @@ -1441,20 +1456,20 @@ DevPathFromTextUartFlowCtrl ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextSAS ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { - CHAR16 *AddressStr; - CHAR16 *LunStr; - CHAR16 *RTPStr; - CHAR16 *SASSATAStr; - CHAR16 *LocationStr; - CHAR16 *ConnectStr; - CHAR16 *DriveBayStr; - CHAR16 *ReservedStr; - UINT16 Info; - UINT16 Uint16; - SAS_DEVICE_PATH *Sas; + CHAR16 *AddressStr; + CHAR16 *LunStr; + CHAR16 *RTPStr; + CHAR16 *SASSATAStr; + CHAR16 *LocationStr; + CHAR16 *ConnectStr; + CHAR16 *DriveBayStr; + CHAR16 *ReservedStr; + UINT16 Info; + UINT16 Uint16; + SAS_DEVICE_PATH *Sas; AddressStr = GetNextParamStr (&TextDeviceNode); LunStr = GetNextParamStr (&TextDeviceNode); @@ -1464,27 +1479,25 @@ DevPathFromTextSAS ( ConnectStr = GetNextParamStr (&TextDeviceNode); DriveBayStr = GetNextParamStr (&TextDeviceNode); ReservedStr = GetNextParamStr (&TextDeviceNode); - Sas = (SAS_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_VENDOR_DP, - (UINT16) sizeof (SAS_DEVICE_PATH) - ); + Sas = (SAS_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_VENDOR_DP, + (UINT16)sizeof (SAS_DEVICE_PATH) + ); CopyGuid (&Sas->Guid, &gEfiSasDevicePathGuid); Strtoi64 (AddressStr, &Sas->SasAddress); Strtoi64 (LunStr, &Sas->Lun); - Sas->RelativeTargetPort = (UINT16) Strtoi (RTPStr); + Sas->RelativeTargetPort = (UINT16)Strtoi (RTPStr); if (StrCmp (SASSATAStr, L"NoTopology") == 0) { Info = 0x0; - } else if ((StrCmp (SASSATAStr, L"SATA") == 0) || (StrCmp (SASSATAStr, L"SAS") == 0)) { - - Uint16 = (UINT16) Strtoi (DriveBayStr); + Uint16 = (UINT16)Strtoi (DriveBayStr); if (Uint16 == 0) { Info = 0x1; } else { - Info = (UINT16) (0x2 | ((Uint16 - 1) << 8)); + Info = (UINT16)(0x2 | ((Uint16 - 1) << 8)); } if (StrCmp (SASSATAStr, L"SATA") == 0) { @@ -1500,8 +1513,9 @@ DevPathFromTextSAS ( } else if (StrCmp (LocationStr, L"Internal") == 0) { Uint16 = 0; } else { - Uint16 = ((UINT16) Strtoi (LocationStr) & BIT0); + Uint16 = ((UINT16)Strtoi (LocationStr) & BIT0); } + Info |= (Uint16 << 5); // @@ -1513,18 +1527,18 @@ DevPathFromTextSAS ( } else if (StrCmp (ConnectStr, L"Direct") == 0) { Uint16 = 0; } else { - Uint16 = ((UINT16) Strtoi (ConnectStr) & (BIT0 | BIT1)); + Uint16 = ((UINT16)Strtoi (ConnectStr) & (BIT0 | BIT1)); } - Info |= (Uint16 << 6); + Info |= (Uint16 << 6); } else { - Info = (UINT16) Strtoi (SASSATAStr); + Info = (UINT16)Strtoi (SASSATAStr); } Sas->DeviceTopology = Info; - Sas->Reserved = (UINT32) Strtoi (ReservedStr); + Sas->Reserved = (UINT32)Strtoi (ReservedStr); - return (EFI_DEVICE_PATH_PROTOCOL *) Sas; + return (EFI_DEVICE_PATH_PROTOCOL *)Sas; } /** @@ -1537,21 +1551,21 @@ DevPathFromTextSAS ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextSasEx ( - IN CHAR16 *TextDeviceNode - ) -{ - CHAR16 *AddressStr; - CHAR16 *LunStr; - CHAR16 *RTPStr; - CHAR16 *SASSATAStr; - CHAR16 *LocationStr; - CHAR16 *ConnectStr; - CHAR16 *DriveBayStr; - UINT16 Info; - UINT16 Uint16; - UINT64 SasAddress; - UINT64 Lun; - SASEX_DEVICE_PATH *SasEx; + IN CHAR16 *TextDeviceNode + ) +{ + CHAR16 *AddressStr; + CHAR16 *LunStr; + CHAR16 *RTPStr; + CHAR16 *SASSATAStr; + CHAR16 *LocationStr; + CHAR16 *ConnectStr; + CHAR16 *DriveBayStr; + UINT16 Info; + UINT16 Uint16; + UINT64 SasAddress; + UINT64 Lun; + SASEX_DEVICE_PATH *SasEx; AddressStr = GetNextParamStr (&TextDeviceNode); LunStr = GetNextParamStr (&TextDeviceNode); @@ -1560,28 +1574,26 @@ DevPathFromTextSasEx ( LocationStr = GetNextParamStr (&TextDeviceNode); ConnectStr = GetNextParamStr (&TextDeviceNode); DriveBayStr = GetNextParamStr (&TextDeviceNode); - SasEx = (SASEX_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_SASEX_DP, - (UINT16) sizeof (SASEX_DEVICE_PATH) - ); + SasEx = (SASEX_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_SASEX_DP, + (UINT16)sizeof (SASEX_DEVICE_PATH) + ); Strtoi64 (AddressStr, &SasAddress); - Strtoi64 (LunStr, &Lun); - WriteUnaligned64 ((UINT64 *) &SasEx->SasAddress, SwapBytes64 (SasAddress)); - WriteUnaligned64 ((UINT64 *) &SasEx->Lun, SwapBytes64 (Lun)); - SasEx->RelativeTargetPort = (UINT16) Strtoi (RTPStr); + Strtoi64 (LunStr, &Lun); + WriteUnaligned64 ((UINT64 *)&SasEx->SasAddress, SwapBytes64 (SasAddress)); + WriteUnaligned64 ((UINT64 *)&SasEx->Lun, SwapBytes64 (Lun)); + SasEx->RelativeTargetPort = (UINT16)Strtoi (RTPStr); if (StrCmp (SASSATAStr, L"NoTopology") == 0) { Info = 0x0; - } else if ((StrCmp (SASSATAStr, L"SATA") == 0) || (StrCmp (SASSATAStr, L"SAS") == 0)) { - - Uint16 = (UINT16) Strtoi (DriveBayStr); + Uint16 = (UINT16)Strtoi (DriveBayStr); if (Uint16 == 0) { Info = 0x1; } else { - Info = (UINT16) (0x2 | ((Uint16 - 1) << 8)); + Info = (UINT16)(0x2 | ((Uint16 - 1) << 8)); } if (StrCmp (SASSATAStr, L"SATA") == 0) { @@ -1597,8 +1609,9 @@ DevPathFromTextSasEx ( } else if (StrCmp (LocationStr, L"Internal") == 0) { Uint16 = 0; } else { - Uint16 = ((UINT16) Strtoi (LocationStr) & BIT0); + Uint16 = ((UINT16)Strtoi (LocationStr) & BIT0); } + Info |= (Uint16 << 5); // @@ -1610,17 +1623,17 @@ DevPathFromTextSasEx ( } else if (StrCmp (ConnectStr, L"Direct") == 0) { Uint16 = 0; } else { - Uint16 = ((UINT16) Strtoi (ConnectStr) & (BIT0 | BIT1)); + Uint16 = ((UINT16)Strtoi (ConnectStr) & (BIT0 | BIT1)); } - Info |= (Uint16 << 6); + Info |= (Uint16 << 6); } else { - Info = (UINT16) Strtoi (SASSATAStr); + Info = (UINT16)Strtoi (SASSATAStr); } SasEx->DeviceTopology = Info; - return (EFI_DEVICE_PATH_PROTOCOL *) SasEx; + return (EFI_DEVICE_PATH_PROTOCOL *)SasEx; } /** @@ -1633,32 +1646,32 @@ DevPathFromTextSasEx ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextNVMe ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { - CHAR16 *NamespaceIdStr; - CHAR16 *NamespaceUuidStr; - NVME_NAMESPACE_DEVICE_PATH *Nvme; - UINT8 *Uuid; - UINTN Index; + CHAR16 *NamespaceIdStr; + CHAR16 *NamespaceUuidStr; + NVME_NAMESPACE_DEVICE_PATH *Nvme; + UINT8 *Uuid; + UINTN Index; NamespaceIdStr = GetNextParamStr (&TextDeviceNode); NamespaceUuidStr = GetNextParamStr (&TextDeviceNode); - Nvme = (NVME_NAMESPACE_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_NVME_NAMESPACE_DP, - (UINT16) sizeof (NVME_NAMESPACE_DEVICE_PATH) - ); + Nvme = (NVME_NAMESPACE_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_NVME_NAMESPACE_DP, + (UINT16)sizeof (NVME_NAMESPACE_DEVICE_PATH) + ); - Nvme->NamespaceId = (UINT32) Strtoi (NamespaceIdStr); - Uuid = (UINT8 *) &Nvme->NamespaceUuid; + Nvme->NamespaceId = (UINT32)Strtoi (NamespaceIdStr); + Uuid = (UINT8 *)&Nvme->NamespaceUuid; Index = sizeof (Nvme->NamespaceUuid) / sizeof (UINT8); while (Index-- != 0) { - Uuid[Index] = (UINT8) StrHexToUintn (SplitStr (&NamespaceUuidStr, L'-')); + Uuid[Index] = (UINT8)StrHexToUintn (SplitStr (&NamespaceUuidStr, L'-')); } - return (EFI_DEVICE_PATH_PROTOCOL *) Nvme; + return (EFI_DEVICE_PATH_PROTOCOL *)Nvme; } /** @@ -1671,25 +1684,25 @@ DevPathFromTextNVMe ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextUfs ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { - CHAR16 *PunStr; - CHAR16 *LunStr; - UFS_DEVICE_PATH *Ufs; + CHAR16 *PunStr; + CHAR16 *LunStr; + UFS_DEVICE_PATH *Ufs; PunStr = GetNextParamStr (&TextDeviceNode); LunStr = GetNextParamStr (&TextDeviceNode); - Ufs = (UFS_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_UFS_DP, - (UINT16) sizeof (UFS_DEVICE_PATH) - ); + Ufs = (UFS_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_UFS_DP, + (UINT16)sizeof (UFS_DEVICE_PATH) + ); - Ufs->Pun = (UINT8) Strtoi (PunStr); - Ufs->Lun = (UINT8) Strtoi (LunStr); + Ufs->Pun = (UINT8)Strtoi (PunStr); + Ufs->Lun = (UINT8)Strtoi (LunStr); - return (EFI_DEVICE_PATH_PROTOCOL *) Ufs; + return (EFI_DEVICE_PATH_PROTOCOL *)Ufs; } /** @@ -1702,22 +1715,22 @@ DevPathFromTextUfs ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextSd ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { - CHAR16 *SlotNumberStr; - SD_DEVICE_PATH *Sd; + CHAR16 *SlotNumberStr; + SD_DEVICE_PATH *Sd; SlotNumberStr = GetNextParamStr (&TextDeviceNode); - Sd = (SD_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_SD_DP, - (UINT16) sizeof (SD_DEVICE_PATH) - ); + Sd = (SD_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_SD_DP, + (UINT16)sizeof (SD_DEVICE_PATH) + ); - Sd->SlotNumber = (UINT8) Strtoi (SlotNumberStr); + Sd->SlotNumber = (UINT8)Strtoi (SlotNumberStr); - return (EFI_DEVICE_PATH_PROTOCOL *) Sd; + return (EFI_DEVICE_PATH_PROTOCOL *)Sd; } /** @@ -1730,22 +1743,22 @@ DevPathFromTextSd ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextEmmc ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { CHAR16 *SlotNumberStr; EMMC_DEVICE_PATH *Emmc; SlotNumberStr = GetNextParamStr (&TextDeviceNode); - Emmc = (EMMC_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_EMMC_DP, - (UINT16) sizeof (EMMC_DEVICE_PATH) - ); + Emmc = (EMMC_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_EMMC_DP, + (UINT16)sizeof (EMMC_DEVICE_PATH) + ); - Emmc->SlotNumber = (UINT8) Strtoi (SlotNumberStr); + Emmc->SlotNumber = (UINT8)Strtoi (SlotNumberStr); - return (EFI_DEVICE_PATH_PROTOCOL *) Emmc; + return (EFI_DEVICE_PATH_PROTOCOL *)Emmc; } /** @@ -1758,20 +1771,20 @@ DevPathFromTextEmmc ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextDebugPort ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { VENDOR_DEVICE_PATH *Vend; - Vend = (VENDOR_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_VENDOR_DP, - (UINT16) sizeof (VENDOR_DEVICE_PATH) - ); + Vend = (VENDOR_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_VENDOR_DP, + (UINT16)sizeof (VENDOR_DEVICE_PATH) + ); CopyGuid (&Vend->Guid, &gEfiDebugPortProtocolGuid); - return (EFI_DEVICE_PATH_PROTOCOL *) Vend; + return (EFI_DEVICE_PATH_PROTOCOL *)Vend; } /** @@ -1784,7 +1797,7 @@ DevPathFromTextDebugPort ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextMAC ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { CHAR16 *AddressStr; @@ -1792,27 +1805,26 @@ DevPathFromTextMAC ( UINTN Length; MAC_ADDR_DEVICE_PATH *MACDevPath; - AddressStr = GetNextParamStr (&TextDeviceNode); - IfTypeStr = GetNextParamStr (&TextDeviceNode); - MACDevPath = (MAC_ADDR_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_MAC_ADDR_DP, - (UINT16) sizeof (MAC_ADDR_DEVICE_PATH) - ); + AddressStr = GetNextParamStr (&TextDeviceNode); + IfTypeStr = GetNextParamStr (&TextDeviceNode); + MACDevPath = (MAC_ADDR_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_MAC_ADDR_DP, + (UINT16)sizeof (MAC_ADDR_DEVICE_PATH) + ); - MACDevPath->IfType = (UINT8) Strtoi (IfTypeStr); + MACDevPath->IfType = (UINT8)Strtoi (IfTypeStr); Length = sizeof (EFI_MAC_ADDRESS); - if (MACDevPath->IfType == 0x01 || MACDevPath->IfType == 0x00) { + if ((MACDevPath->IfType == 0x01) || (MACDevPath->IfType == 0x00)) { Length = 6; } StrHexToBytes (AddressStr, Length * 2, MACDevPath->MacAddress.Addr, Length); - return (EFI_DEVICE_PATH_PROTOCOL *) MACDevPath; + return (EFI_DEVICE_PATH_PROTOCOL *)MACDevPath; } - /** Converts a text format to the network protocol ID. @@ -1823,7 +1835,7 @@ DevPathFromTextMAC ( **/ UINTN NetworkProtocolFromText ( - IN CHAR16 *Text + IN CHAR16 *Text ) { if (StrCmp (Text, L"UDP") == 0) { @@ -1837,7 +1849,6 @@ NetworkProtocolFromText ( return Strtoi (Text); } - /** Converts a text device path node to IPV4 device path structure. @@ -1848,7 +1859,7 @@ NetworkProtocolFromText ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextIPv4 ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { CHAR16 *RemoteIPStr; @@ -1859,20 +1870,20 @@ DevPathFromTextIPv4 ( CHAR16 *SubnetMaskStr; IPv4_DEVICE_PATH *IPv4; - RemoteIPStr = GetNextParamStr (&TextDeviceNode); - ProtocolStr = GetNextParamStr (&TextDeviceNode); - TypeStr = GetNextParamStr (&TextDeviceNode); - LocalIPStr = GetNextParamStr (&TextDeviceNode); - GatewayIPStr = GetNextParamStr (&TextDeviceNode); - SubnetMaskStr = GetNextParamStr (&TextDeviceNode); - IPv4 = (IPv4_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_IPv4_DP, - (UINT16) sizeof (IPv4_DEVICE_PATH) - ); + RemoteIPStr = GetNextParamStr (&TextDeviceNode); + ProtocolStr = GetNextParamStr (&TextDeviceNode); + TypeStr = GetNextParamStr (&TextDeviceNode); + LocalIPStr = GetNextParamStr (&TextDeviceNode); + GatewayIPStr = GetNextParamStr (&TextDeviceNode); + SubnetMaskStr = GetNextParamStr (&TextDeviceNode); + IPv4 = (IPv4_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_IPv4_DP, + (UINT16)sizeof (IPv4_DEVICE_PATH) + ); StrToIpv4Address (RemoteIPStr, NULL, &IPv4->RemoteIpAddress, NULL); - IPv4->Protocol = (UINT16) NetworkProtocolFromText (ProtocolStr); + IPv4->Protocol = (UINT16)NetworkProtocolFromText (ProtocolStr); if (StrCmp (TypeStr, L"Static") == 0) { IPv4->StaticIpAddress = TRUE; } else { @@ -1881,17 +1892,17 @@ DevPathFromTextIPv4 ( StrToIpv4Address (LocalIPStr, NULL, &IPv4->LocalIpAddress, NULL); if (!IS_NULL (*GatewayIPStr) && !IS_NULL (*SubnetMaskStr)) { - StrToIpv4Address (GatewayIPStr, NULL, &IPv4->GatewayIpAddress, NULL); - StrToIpv4Address (SubnetMaskStr, NULL, &IPv4->SubnetMask, NULL); + StrToIpv4Address (GatewayIPStr, NULL, &IPv4->GatewayIpAddress, NULL); + StrToIpv4Address (SubnetMaskStr, NULL, &IPv4->SubnetMask, NULL); } else { ZeroMem (&IPv4->GatewayIpAddress, sizeof (IPv4->GatewayIpAddress)); - ZeroMem (&IPv4->SubnetMask, sizeof (IPv4->SubnetMask)); + ZeroMem (&IPv4->SubnetMask, sizeof (IPv4->SubnetMask)); } - IPv4->LocalPort = 0; - IPv4->RemotePort = 0; + IPv4->LocalPort = 0; + IPv4->RemotePort = 0; - return (EFI_DEVICE_PATH_PROTOCOL *) IPv4; + return (EFI_DEVICE_PATH_PROTOCOL *)IPv4; } /** @@ -1904,7 +1915,7 @@ DevPathFromTextIPv4 ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextIPv6 ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { CHAR16 *RemoteIPStr; @@ -1915,20 +1926,20 @@ DevPathFromTextIPv6 ( CHAR16 *PrefixLengthStr; IPv6_DEVICE_PATH *IPv6; - RemoteIPStr = GetNextParamStr (&TextDeviceNode); - ProtocolStr = GetNextParamStr (&TextDeviceNode); - TypeStr = GetNextParamStr (&TextDeviceNode); - LocalIPStr = GetNextParamStr (&TextDeviceNode); - PrefixLengthStr = GetNextParamStr (&TextDeviceNode); - GatewayIPStr = GetNextParamStr (&TextDeviceNode); - IPv6 = (IPv6_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_IPv6_DP, - (UINT16) sizeof (IPv6_DEVICE_PATH) - ); + RemoteIPStr = GetNextParamStr (&TextDeviceNode); + ProtocolStr = GetNextParamStr (&TextDeviceNode); + TypeStr = GetNextParamStr (&TextDeviceNode); + LocalIPStr = GetNextParamStr (&TextDeviceNode); + PrefixLengthStr = GetNextParamStr (&TextDeviceNode); + GatewayIPStr = GetNextParamStr (&TextDeviceNode); + IPv6 = (IPv6_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_IPv6_DP, + (UINT16)sizeof (IPv6_DEVICE_PATH) + ); StrToIpv6Address (RemoteIPStr, NULL, &IPv6->RemoteIpAddress, NULL); - IPv6->Protocol = (UINT16) NetworkProtocolFromText (ProtocolStr); + IPv6->Protocol = (UINT16)NetworkProtocolFromText (ProtocolStr); if (StrCmp (TypeStr, L"Static") == 0) { IPv6->IpAddressOrigin = 0; } else if (StrCmp (TypeStr, L"StatelessAutoConfigure") == 0) { @@ -1940,16 +1951,16 @@ DevPathFromTextIPv6 ( StrToIpv6Address (LocalIPStr, NULL, &IPv6->LocalIpAddress, NULL); if (!IS_NULL (*GatewayIPStr) && !IS_NULL (*PrefixLengthStr)) { StrToIpv6Address (GatewayIPStr, NULL, &IPv6->GatewayIpAddress, NULL); - IPv6->PrefixLength = (UINT8) Strtoi (PrefixLengthStr); + IPv6->PrefixLength = (UINT8)Strtoi (PrefixLengthStr); } else { ZeroMem (&IPv6->GatewayIpAddress, sizeof (IPv6->GatewayIpAddress)); IPv6->PrefixLength = 0; } - IPv6->LocalPort = 0; - IPv6->RemotePort = 0; + IPv6->LocalPort = 0; + IPv6->RemotePort = 0; - return (EFI_DEVICE_PATH_PROTOCOL *) IPv6; + return (EFI_DEVICE_PATH_PROTOCOL *)IPv6; } /** @@ -1962,7 +1973,7 @@ DevPathFromTextIPv6 ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextUart ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { CHAR16 *BaudStr; @@ -1971,65 +1982,66 @@ DevPathFromTextUart ( CHAR16 *StopBitsStr; UART_DEVICE_PATH *Uart; - BaudStr = GetNextParamStr (&TextDeviceNode); - DataBitsStr = GetNextParamStr (&TextDeviceNode); - ParityStr = GetNextParamStr (&TextDeviceNode); - StopBitsStr = GetNextParamStr (&TextDeviceNode); - Uart = (UART_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_UART_DP, - (UINT16) sizeof (UART_DEVICE_PATH) - ); + BaudStr = GetNextParamStr (&TextDeviceNode); + DataBitsStr = GetNextParamStr (&TextDeviceNode); + ParityStr = GetNextParamStr (&TextDeviceNode); + StopBitsStr = GetNextParamStr (&TextDeviceNode); + Uart = (UART_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_UART_DP, + (UINT16)sizeof (UART_DEVICE_PATH) + ); if (StrCmp (BaudStr, L"DEFAULT") == 0) { Uart->BaudRate = 115200; } else { Strtoi64 (BaudStr, &Uart->BaudRate); } - Uart->DataBits = (UINT8) ((StrCmp (DataBitsStr, L"DEFAULT") == 0) ? 8 : Strtoi (DataBitsStr)); + + Uart->DataBits = (UINT8)((StrCmp (DataBitsStr, L"DEFAULT") == 0) ? 8 : Strtoi (DataBitsStr)); switch (*ParityStr) { - case L'D': - Uart->Parity = 0; - break; + case L'D': + Uart->Parity = 0; + break; - case L'N': - Uart->Parity = 1; - break; + case L'N': + Uart->Parity = 1; + break; - case L'E': - Uart->Parity = 2; - break; + case L'E': + Uart->Parity = 2; + break; - case L'O': - Uart->Parity = 3; - break; + case L'O': + Uart->Parity = 3; + break; - case L'M': - Uart->Parity = 4; - break; + case L'M': + Uart->Parity = 4; + break; - case L'S': - Uart->Parity = 5; - break; + case L'S': + Uart->Parity = 5; + break; - default: - Uart->Parity = (UINT8) Strtoi (ParityStr); - break; + default: + Uart->Parity = (UINT8)Strtoi (ParityStr); + break; } if (StrCmp (StopBitsStr, L"D") == 0) { - Uart->StopBits = (UINT8) 0; + Uart->StopBits = (UINT8)0; } else if (StrCmp (StopBitsStr, L"1") == 0) { - Uart->StopBits = (UINT8) 1; + Uart->StopBits = (UINT8)1; } else if (StrCmp (StopBitsStr, L"1.5") == 0) { - Uart->StopBits = (UINT8) 2; + Uart->StopBits = (UINT8)2; } else if (StrCmp (StopBitsStr, L"2") == 0) { - Uart->StopBits = (UINT8) 3; + Uart->StopBits = (UINT8)3; } else { - Uart->StopBits = (UINT8) Strtoi (StopBitsStr); + Uart->StopBits = (UINT8)Strtoi (StopBitsStr); } - return (EFI_DEVICE_PATH_PROTOCOL *) Uart; + return (EFI_DEVICE_PATH_PROTOCOL *)Uart; } /** @@ -2043,41 +2055,42 @@ DevPathFromTextUart ( **/ EFI_DEVICE_PATH_PROTOCOL * ConvertFromTextUsbClass ( - IN CHAR16 *TextDeviceNode, - IN USB_CLASS_TEXT *UsbClassText + IN CHAR16 *TextDeviceNode, + IN USB_CLASS_TEXT *UsbClassText ) { - CHAR16 *VIDStr; - CHAR16 *PIDStr; - CHAR16 *ClassStr; - CHAR16 *SubClassStr; - CHAR16 *ProtocolStr; - USB_CLASS_DEVICE_PATH *UsbClass; + CHAR16 *VIDStr; + CHAR16 *PIDStr; + CHAR16 *ClassStr; + CHAR16 *SubClassStr; + CHAR16 *ProtocolStr; + USB_CLASS_DEVICE_PATH *UsbClass; - UsbClass = (USB_CLASS_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_USB_CLASS_DP, - (UINT16) sizeof (USB_CLASS_DEVICE_PATH) - ); + UsbClass = (USB_CLASS_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_USB_CLASS_DP, + (UINT16)sizeof (USB_CLASS_DEVICE_PATH) + ); - VIDStr = GetNextParamStr (&TextDeviceNode); - PIDStr = GetNextParamStr (&TextDeviceNode); + VIDStr = GetNextParamStr (&TextDeviceNode); + PIDStr = GetNextParamStr (&TextDeviceNode); if (UsbClassText->ClassExist) { ClassStr = GetNextParamStr (&TextDeviceNode); if (*ClassStr == L'\0') { UsbClass->DeviceClass = 0xFF; } else { - UsbClass->DeviceClass = (UINT8) Strtoi (ClassStr); + UsbClass->DeviceClass = (UINT8)Strtoi (ClassStr); } } else { UsbClass->DeviceClass = UsbClassText->Class; } + if (UsbClassText->SubClassExist) { SubClassStr = GetNextParamStr (&TextDeviceNode); if (*SubClassStr == L'\0') { UsbClass->DeviceSubClass = 0xFF; } else { - UsbClass->DeviceSubClass = (UINT8) Strtoi (SubClassStr); + UsbClass->DeviceSubClass = (UINT8)Strtoi (SubClassStr); } } else { UsbClass->DeviceSubClass = UsbClassText->SubClass; @@ -2086,25 +2099,26 @@ ConvertFromTextUsbClass ( ProtocolStr = GetNextParamStr (&TextDeviceNode); if (*VIDStr == L'\0') { - UsbClass->VendorId = 0xFFFF; + UsbClass->VendorId = 0xFFFF; } else { - UsbClass->VendorId = (UINT16) Strtoi (VIDStr); + UsbClass->VendorId = (UINT16)Strtoi (VIDStr); } + if (*PIDStr == L'\0') { - UsbClass->ProductId = 0xFFFF; + UsbClass->ProductId = 0xFFFF; } else { - UsbClass->ProductId = (UINT16) Strtoi (PIDStr); + UsbClass->ProductId = (UINT16)Strtoi (PIDStr); } + if (*ProtocolStr == L'\0') { - UsbClass->DeviceProtocol = 0xFF; + UsbClass->DeviceProtocol = 0xFF; } else { - UsbClass->DeviceProtocol = (UINT8) Strtoi (ProtocolStr); + UsbClass->DeviceProtocol = (UINT8)Strtoi (ProtocolStr); } - return (EFI_DEVICE_PATH_PROTOCOL *) UsbClass; + return (EFI_DEVICE_PATH_PROTOCOL *)UsbClass; } - /** Converts a text device path node to USB class device path structure. @@ -2115,7 +2129,7 @@ ConvertFromTextUsbClass ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextUsbClass ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { USB_CLASS_TEXT UsbClassText; @@ -2136,7 +2150,7 @@ DevPathFromTextUsbClass ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextUsbAudio ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { USB_CLASS_TEXT UsbClassText; @@ -2158,7 +2172,7 @@ DevPathFromTextUsbAudio ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextUsbCDCControl ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { USB_CLASS_TEXT UsbClassText; @@ -2180,7 +2194,7 @@ DevPathFromTextUsbCDCControl ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextUsbHID ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { USB_CLASS_TEXT UsbClassText; @@ -2202,7 +2216,7 @@ DevPathFromTextUsbHID ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextUsbImage ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { USB_CLASS_TEXT UsbClassText; @@ -2224,7 +2238,7 @@ DevPathFromTextUsbImage ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextUsbPrinter ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { USB_CLASS_TEXT UsbClassText; @@ -2246,7 +2260,7 @@ DevPathFromTextUsbPrinter ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextUsbMassStorage ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { USB_CLASS_TEXT UsbClassText; @@ -2268,7 +2282,7 @@ DevPathFromTextUsbMassStorage ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextUsbHub ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { USB_CLASS_TEXT UsbClassText; @@ -2290,7 +2304,7 @@ DevPathFromTextUsbHub ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextUsbCDCData ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { USB_CLASS_TEXT UsbClassText; @@ -2312,7 +2326,7 @@ DevPathFromTextUsbCDCData ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextUsbSmartCard ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { USB_CLASS_TEXT UsbClassText; @@ -2334,7 +2348,7 @@ DevPathFromTextUsbSmartCard ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextUsbVideo ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { USB_CLASS_TEXT UsbClassText; @@ -2356,7 +2370,7 @@ DevPathFromTextUsbVideo ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextUsbDiagnostic ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { USB_CLASS_TEXT UsbClassText; @@ -2378,7 +2392,7 @@ DevPathFromTextUsbDiagnostic ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextUsbWireless ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { USB_CLASS_TEXT UsbClassText; @@ -2400,7 +2414,7 @@ DevPathFromTextUsbWireless ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextUsbDeviceFirmwareUpdate ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { USB_CLASS_TEXT UsbClassText; @@ -2423,7 +2437,7 @@ DevPathFromTextUsbDeviceFirmwareUpdate ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextUsbIrdaBridge ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { USB_CLASS_TEXT UsbClassText; @@ -2446,7 +2460,7 @@ DevPathFromTextUsbIrdaBridge ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextUsbTestAndMeasurement ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { USB_CLASS_TEXT UsbClassText; @@ -2469,7 +2483,7 @@ DevPathFromTextUsbTestAndMeasurement ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextUsbWwid ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { CHAR16 *VIDStr; @@ -2479,39 +2493,41 @@ DevPathFromTextUsbWwid ( USB_WWID_DEVICE_PATH *UsbWwid; UINTN SerialNumberStrLen; - VIDStr = GetNextParamStr (&TextDeviceNode); - PIDStr = GetNextParamStr (&TextDeviceNode); - InterfaceNumStr = GetNextParamStr (&TextDeviceNode); - SerialNumberStr = GetNextParamStr (&TextDeviceNode); - SerialNumberStrLen = StrLen (SerialNumberStr); - if (SerialNumberStrLen >= 2 && - SerialNumberStr[0] == L'\"' && - SerialNumberStr[SerialNumberStrLen - 1] == L'\"' - ) { + VIDStr = GetNextParamStr (&TextDeviceNode); + PIDStr = GetNextParamStr (&TextDeviceNode); + InterfaceNumStr = GetNextParamStr (&TextDeviceNode); + SerialNumberStr = GetNextParamStr (&TextDeviceNode); + SerialNumberStrLen = StrLen (SerialNumberStr); + if ((SerialNumberStrLen >= 2) && + (SerialNumberStr[0] == L'\"') && + (SerialNumberStr[SerialNumberStrLen - 1] == L'\"') + ) + { SerialNumberStr[SerialNumberStrLen - 1] = L'\0'; SerialNumberStr++; SerialNumberStrLen -= 2; } - UsbWwid = (USB_WWID_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_USB_WWID_DP, - (UINT16) (sizeof (USB_WWID_DEVICE_PATH) + SerialNumberStrLen * sizeof (CHAR16)) - ); - UsbWwid->VendorId = (UINT16) Strtoi (VIDStr); - UsbWwid->ProductId = (UINT16) Strtoi (PIDStr); - UsbWwid->InterfaceNumber = (UINT16) Strtoi (InterfaceNumStr); + + UsbWwid = (USB_WWID_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_USB_WWID_DP, + (UINT16)(sizeof (USB_WWID_DEVICE_PATH) + SerialNumberStrLen * sizeof (CHAR16)) + ); + UsbWwid->VendorId = (UINT16)Strtoi (VIDStr); + UsbWwid->ProductId = (UINT16)Strtoi (PIDStr); + UsbWwid->InterfaceNumber = (UINT16)Strtoi (InterfaceNumStr); // // There is no memory allocated in UsbWwid for the '\0' in SerialNumberStr. // Therefore, the '\0' will not be copied. // CopyMem ( - (UINT8 *) UsbWwid + sizeof (USB_WWID_DEVICE_PATH), + (UINT8 *)UsbWwid + sizeof (USB_WWID_DEVICE_PATH), SerialNumberStr, SerialNumberStrLen * sizeof (CHAR16) ); - return (EFI_DEVICE_PATH_PROTOCOL *) UsbWwid; + return (EFI_DEVICE_PATH_PROTOCOL *)UsbWwid; } /** @@ -2524,22 +2540,22 @@ DevPathFromTextUsbWwid ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextUnit ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { - CHAR16 *LunStr; - DEVICE_LOGICAL_UNIT_DEVICE_PATH *LogicalUnit; + CHAR16 *LunStr; + DEVICE_LOGICAL_UNIT_DEVICE_PATH *LogicalUnit; LunStr = GetNextParamStr (&TextDeviceNode); - LogicalUnit = (DEVICE_LOGICAL_UNIT_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_DEVICE_LOGICAL_UNIT_DP, - (UINT16) sizeof (DEVICE_LOGICAL_UNIT_DEVICE_PATH) - ); + LogicalUnit = (DEVICE_LOGICAL_UNIT_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_DEVICE_LOGICAL_UNIT_DP, + (UINT16)sizeof (DEVICE_LOGICAL_UNIT_DEVICE_PATH) + ); - LogicalUnit->Lun = (UINT8) Strtoi (LunStr); + LogicalUnit->Lun = (UINT8)Strtoi (LunStr); - return (EFI_DEVICE_PATH_PROTOCOL *) LogicalUnit; + return (EFI_DEVICE_PATH_PROTOCOL *)LogicalUnit; } /** @@ -2552,20 +2568,20 @@ DevPathFromTextUnit ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextiSCSI ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { - UINT16 Options; - CHAR16 *NameStr; - CHAR16 *PortalGroupStr; - CHAR16 *LunStr; - CHAR16 *HeaderDigestStr; - CHAR16 *DataDigestStr; - CHAR16 *AuthenticationStr; - CHAR16 *ProtocolStr; - CHAR8 *AsciiStr; - ISCSI_DEVICE_PATH_WITH_NAME *ISCSIDevPath; - UINT64 Lun; + UINT16 Options; + CHAR16 *NameStr; + CHAR16 *PortalGroupStr; + CHAR16 *LunStr; + CHAR16 *HeaderDigestStr; + CHAR16 *DataDigestStr; + CHAR16 *AuthenticationStr; + CHAR16 *ProtocolStr; + CHAR8 *AsciiStr; + ISCSI_DEVICE_PATH_WITH_NAME *ISCSIDevPath; + UINT64 Lun; NameStr = GetNextParamStr (&TextDeviceNode); PortalGroupStr = GetNextParamStr (&TextDeviceNode); @@ -2574,18 +2590,18 @@ DevPathFromTextiSCSI ( DataDigestStr = GetNextParamStr (&TextDeviceNode); AuthenticationStr = GetNextParamStr (&TextDeviceNode); ProtocolStr = GetNextParamStr (&TextDeviceNode); - ISCSIDevPath = (ISCSI_DEVICE_PATH_WITH_NAME *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_ISCSI_DP, - (UINT16) (sizeof (ISCSI_DEVICE_PATH_WITH_NAME) + StrLen (NameStr)) - ); + ISCSIDevPath = (ISCSI_DEVICE_PATH_WITH_NAME *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_ISCSI_DP, + (UINT16)(sizeof (ISCSI_DEVICE_PATH_WITH_NAME) + StrLen (NameStr)) + ); AsciiStr = ISCSIDevPath->TargetName; StrToAscii (NameStr, &AsciiStr); - ISCSIDevPath->TargetPortalGroupTag = (UINT16) Strtoi (PortalGroupStr); + ISCSIDevPath->TargetPortalGroupTag = (UINT16)Strtoi (PortalGroupStr); Strtoi64 (LunStr, &Lun); - WriteUnaligned64 ((UINT64 *) &ISCSIDevPath->Lun, SwapBytes64 (Lun)); + WriteUnaligned64 ((UINT64 *)&ISCSIDevPath->Lun, SwapBytes64 (Lun)); Options = 0x0000; if (StrCmp (HeaderDigestStr, L"CRC32C") == 0) { @@ -2604,7 +2620,7 @@ DevPathFromTextiSCSI ( Options |= 0x1000; } - ISCSIDevPath->LoginOption = (UINT16) Options; + ISCSIDevPath->LoginOption = (UINT16)Options; if (IS_NULL (*ProtocolStr) || (StrCmp (ProtocolStr, L"TCP") == 0)) { ISCSIDevPath->NetworkProtocol = 0; @@ -2615,7 +2631,7 @@ DevPathFromTextiSCSI ( ISCSIDevPath->NetworkProtocol = 1; } - return (EFI_DEVICE_PATH_PROTOCOL *) ISCSIDevPath; + return (EFI_DEVICE_PATH_PROTOCOL *)ISCSIDevPath; } /** @@ -2628,22 +2644,22 @@ DevPathFromTextiSCSI ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextVlan ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { CHAR16 *VlanStr; VLAN_DEVICE_PATH *Vlan; VlanStr = GetNextParamStr (&TextDeviceNode); - Vlan = (VLAN_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_VLAN_DP, - (UINT16) sizeof (VLAN_DEVICE_PATH) - ); + Vlan = (VLAN_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_VLAN_DP, + (UINT16)sizeof (VLAN_DEVICE_PATH) + ); - Vlan->VlanId = (UINT16) Strtoi (VlanStr); + Vlan->VlanId = (UINT16)Strtoi (VlanStr); - return (EFI_DEVICE_PATH_PROTOCOL *) Vlan; + return (EFI_DEVICE_PATH_PROTOCOL *)Vlan; } /** @@ -2656,25 +2672,25 @@ DevPathFromTextVlan ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextBluetooth ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { - CHAR16 *BluetoothStr; - BLUETOOTH_DEVICE_PATH *BluetoothDp; + CHAR16 *BluetoothStr; + BLUETOOTH_DEVICE_PATH *BluetoothDp; BluetoothStr = GetNextParamStr (&TextDeviceNode); - BluetoothDp = (BLUETOOTH_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_BLUETOOTH_DP, - (UINT16) sizeof (BLUETOOTH_DEVICE_PATH) - ); + BluetoothDp = (BLUETOOTH_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_BLUETOOTH_DP, + (UINT16)sizeof (BLUETOOTH_DEVICE_PATH) + ); StrHexToBytes ( BluetoothStr, sizeof (BLUETOOTH_ADDRESS) * 2, BluetoothDp->BD_ADDR.Address, sizeof (BLUETOOTH_ADDRESS) ); - return (EFI_DEVICE_PATH_PROTOCOL *) BluetoothDp; + return (EFI_DEVICE_PATH_PROTOCOL *)BluetoothDp; } /** @@ -2687,20 +2703,20 @@ DevPathFromTextBluetooth ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextWiFi ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { - CHAR16 *SSIdStr; - CHAR8 AsciiStr[33]; - UINTN DataLen; - WIFI_DEVICE_PATH *WiFiDp; + CHAR16 *SSIdStr; + CHAR8 AsciiStr[33]; + UINTN DataLen; + WIFI_DEVICE_PATH *WiFiDp; SSIdStr = GetNextParamStr (&TextDeviceNode); - WiFiDp = (WIFI_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_WIFI_DP, - (UINT16) sizeof (WIFI_DEVICE_PATH) - ); + WiFiDp = (WIFI_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_WIFI_DP, + (UINT16)sizeof (WIFI_DEVICE_PATH) + ); if (NULL != SSIdStr) { DataLen = StrLen (SSIdStr); @@ -2713,7 +2729,7 @@ DevPathFromTextWiFi ( CopyMem (WiFiDp->SSId, AsciiStr, DataLen); } - return (EFI_DEVICE_PATH_PROTOCOL *) WiFiDp; + return (EFI_DEVICE_PATH_PROTOCOL *)WiFiDp; } /** @@ -2726,27 +2742,29 @@ DevPathFromTextWiFi ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextBluetoothLE ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { - CHAR16 *BluetoothLeAddrStr; - CHAR16 *BluetoothLeAddrTypeStr; - BLUETOOTH_LE_DEVICE_PATH *BluetoothLeDp; + CHAR16 *BluetoothLeAddrStr; + CHAR16 *BluetoothLeAddrTypeStr; + BLUETOOTH_LE_DEVICE_PATH *BluetoothLeDp; BluetoothLeAddrStr = GetNextParamStr (&TextDeviceNode); BluetoothLeAddrTypeStr = GetNextParamStr (&TextDeviceNode); - BluetoothLeDp = (BLUETOOTH_LE_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_BLUETOOTH_LE_DP, - (UINT16) sizeof (BLUETOOTH_LE_DEVICE_PATH) - ); + BluetoothLeDp = (BLUETOOTH_LE_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_BLUETOOTH_LE_DP, + (UINT16)sizeof (BLUETOOTH_LE_DEVICE_PATH) + ); - BluetoothLeDp->Address.Type = (UINT8) Strtoi (BluetoothLeAddrTypeStr); + BluetoothLeDp->Address.Type = (UINT8)Strtoi (BluetoothLeAddrTypeStr); StrHexToBytes ( - BluetoothLeAddrStr, sizeof (BluetoothLeDp->Address.Address) * 2, - BluetoothLeDp->Address.Address, sizeof (BluetoothLeDp->Address.Address) + BluetoothLeAddrStr, + sizeof (BluetoothLeDp->Address.Address) * 2, + BluetoothLeDp->Address.Address, + sizeof (BluetoothLeDp->Address.Address) ); - return (EFI_DEVICE_PATH_PROTOCOL *) BluetoothLeDp; + return (EFI_DEVICE_PATH_PROTOCOL *)BluetoothLeDp; } /** @@ -2759,17 +2777,16 @@ DevPathFromTextBluetoothLE ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextDns ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { - CHAR16 *DeviceNodeStr; - CHAR16 *DeviceNodeStrPtr; - UINT32 DnsServerIpCount; - UINT16 DnsDeviceNodeLength; - DNS_DEVICE_PATH *DnsDeviceNode; - UINT32 DnsServerIpIndex; - CHAR16 *DnsServerIp; - + CHAR16 *DeviceNodeStr; + CHAR16 *DeviceNodeStrPtr; + UINT32 DnsServerIpCount; + UINT16 DnsDeviceNodeLength; + DNS_DEVICE_PATH *DnsDeviceNode; + UINT32 DnsServerIpIndex; + CHAR16 *DnsServerIp; // // Count the DNS server address number. @@ -2784,7 +2801,7 @@ DevPathFromTextDns ( DnsServerIpCount = 0; while (DeviceNodeStrPtr != NULL && *DeviceNodeStrPtr != L'\0') { GetNextParamStr (&DeviceNodeStrPtr); - DnsServerIpCount ++; + DnsServerIpCount++; } FreePool (DeviceNodeStr); @@ -2801,12 +2818,12 @@ DevPathFromTextDns ( // // Create the DNS DeviceNode. // - DnsDeviceNodeLength = (UINT16) (sizeof (EFI_DEVICE_PATH_PROTOCOL) + sizeof (UINT8) + DnsServerIpCount * sizeof (EFI_IP_ADDRESS)); - DnsDeviceNode = (DNS_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_DNS_DP, - DnsDeviceNodeLength - ); + DnsDeviceNodeLength = (UINT16)(sizeof (EFI_DEVICE_PATH_PROTOCOL) + sizeof (UINT8) + DnsServerIpCount * sizeof (EFI_IP_ADDRESS)); + DnsDeviceNode = (DNS_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_DNS_DP, + DnsDeviceNodeLength + ); if (DnsDeviceNode == NULL) { return NULL; } @@ -2832,13 +2849,13 @@ DevPathFromTextDns ( for (DnsServerIpIndex = 0; DnsServerIpIndex < DnsServerIpCount; DnsServerIpIndex++) { DnsServerIp = GetNextParamStr (&TextDeviceNode); if (DnsDeviceNode->IsIPv6 == 0x00) { - StrToIpv4Address (DnsServerIp, NULL, &(DnsDeviceNode->DnsServerIp[DnsServerIpIndex].v4), NULL); + StrToIpv4Address (DnsServerIp, NULL, &(DnsDeviceNode->DnsServerIp[DnsServerIpIndex].v4), NULL); } else { StrToIpv6Address (DnsServerIp, NULL, &(DnsDeviceNode->DnsServerIp[DnsServerIpIndex].v6), NULL); } } - return (EFI_DEVICE_PATH_PROTOCOL *) DnsDeviceNode; + return (EFI_DEVICE_PATH_PROTOCOL *)DnsDeviceNode; } /** @@ -2851,26 +2868,26 @@ DevPathFromTextDns ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextUri ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { CHAR16 *UriStr; UINTN UriLength; URI_DEVICE_PATH *Uri; - UriStr = GetNextParamStr (&TextDeviceNode); + UriStr = GetNextParamStr (&TextDeviceNode); UriLength = StrnLenS (UriStr, MAX_UINT16 - sizeof (URI_DEVICE_PATH)); - Uri = (URI_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_URI_DP, - (UINT16) (sizeof (URI_DEVICE_PATH) + UriLength) - ); + Uri = (URI_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_URI_DP, + (UINT16)(sizeof (URI_DEVICE_PATH) + UriLength) + ); while (UriLength-- != 0) { - Uri->Uri[UriLength] = (CHAR8) UriStr[UriLength]; + Uri->Uri[UriLength] = (CHAR8)UriStr[UriLength]; } - return (EFI_DEVICE_PATH_PROTOCOL *) Uri; + return (EFI_DEVICE_PATH_PROTOCOL *)Uri; } /** @@ -2883,7 +2900,7 @@ DevPathFromTextUri ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextMediaPath ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { return DevPathFromTextGenericPath (MEDIA_DEVICE_PATH, TextDeviceNode); @@ -2899,52 +2916,52 @@ DevPathFromTextMediaPath ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextHD ( - IN CHAR16 *TextDeviceNode - ) -{ - CHAR16 *PartitionStr; - CHAR16 *TypeStr; - CHAR16 *SignatureStr; - CHAR16 *StartStr; - CHAR16 *SizeStr; - UINT32 Signature32; - HARDDRIVE_DEVICE_PATH *Hd; - - PartitionStr = GetNextParamStr (&TextDeviceNode); - TypeStr = GetNextParamStr (&TextDeviceNode); - SignatureStr = GetNextParamStr (&TextDeviceNode); - StartStr = GetNextParamStr (&TextDeviceNode); - SizeStr = GetNextParamStr (&TextDeviceNode); - Hd = (HARDDRIVE_DEVICE_PATH *) CreateDeviceNode ( - MEDIA_DEVICE_PATH, - MEDIA_HARDDRIVE_DP, - (UINT16) sizeof (HARDDRIVE_DEVICE_PATH) - ); + IN CHAR16 *TextDeviceNode + ) +{ + CHAR16 *PartitionStr; + CHAR16 *TypeStr; + CHAR16 *SignatureStr; + CHAR16 *StartStr; + CHAR16 *SizeStr; + UINT32 Signature32; + HARDDRIVE_DEVICE_PATH *Hd; + + PartitionStr = GetNextParamStr (&TextDeviceNode); + TypeStr = GetNextParamStr (&TextDeviceNode); + SignatureStr = GetNextParamStr (&TextDeviceNode); + StartStr = GetNextParamStr (&TextDeviceNode); + SizeStr = GetNextParamStr (&TextDeviceNode); + Hd = (HARDDRIVE_DEVICE_PATH *)CreateDeviceNode ( + MEDIA_DEVICE_PATH, + MEDIA_HARDDRIVE_DP, + (UINT16)sizeof (HARDDRIVE_DEVICE_PATH) + ); - Hd->PartitionNumber = (UINT32) Strtoi (PartitionStr); + Hd->PartitionNumber = (UINT32)Strtoi (PartitionStr); ZeroMem (Hd->Signature, 16); - Hd->MBRType = (UINT8) 0; + Hd->MBRType = (UINT8)0; if (StrCmp (TypeStr, L"MBR") == 0) { Hd->SignatureType = SIGNATURE_TYPE_MBR; Hd->MBRType = 0x01; - Signature32 = (UINT32) Strtoi (SignatureStr); + Signature32 = (UINT32)Strtoi (SignatureStr); CopyMem (Hd->Signature, &Signature32, sizeof (UINT32)); } else if (StrCmp (TypeStr, L"GPT") == 0) { Hd->SignatureType = SIGNATURE_TYPE_GUID; Hd->MBRType = 0x02; - StrToGuid (SignatureStr, (EFI_GUID *) Hd->Signature); + StrToGuid (SignatureStr, (EFI_GUID *)Hd->Signature); } else { - Hd->SignatureType = (UINT8) Strtoi (TypeStr); + Hd->SignatureType = (UINT8)Strtoi (TypeStr); } Strtoi64 (StartStr, &Hd->PartitionStart); Strtoi64 (SizeStr, &Hd->PartitionSize); - return (EFI_DEVICE_PATH_PROTOCOL *) Hd; + return (EFI_DEVICE_PATH_PROTOCOL *)Hd; } /** @@ -2957,28 +2974,28 @@ DevPathFromTextHD ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextCDROM ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { - CHAR16 *EntryStr; - CHAR16 *StartStr; - CHAR16 *SizeStr; - CDROM_DEVICE_PATH *CDROMDevPath; + CHAR16 *EntryStr; + CHAR16 *StartStr; + CHAR16 *SizeStr; + CDROM_DEVICE_PATH *CDROMDevPath; - EntryStr = GetNextParamStr (&TextDeviceNode); - StartStr = GetNextParamStr (&TextDeviceNode); - SizeStr = GetNextParamStr (&TextDeviceNode); - CDROMDevPath = (CDROM_DEVICE_PATH *) CreateDeviceNode ( - MEDIA_DEVICE_PATH, - MEDIA_CDROM_DP, - (UINT16) sizeof (CDROM_DEVICE_PATH) - ); + EntryStr = GetNextParamStr (&TextDeviceNode); + StartStr = GetNextParamStr (&TextDeviceNode); + SizeStr = GetNextParamStr (&TextDeviceNode); + CDROMDevPath = (CDROM_DEVICE_PATH *)CreateDeviceNode ( + MEDIA_DEVICE_PATH, + MEDIA_CDROM_DP, + (UINT16)sizeof (CDROM_DEVICE_PATH) + ); - CDROMDevPath->BootEntry = (UINT32) Strtoi (EntryStr); + CDROMDevPath->BootEntry = (UINT32)Strtoi (EntryStr); Strtoi64 (StartStr, &CDROMDevPath->PartitionStart); Strtoi64 (SizeStr, &CDROMDevPath->PartitionSize); - return (EFI_DEVICE_PATH_PROTOCOL *) CDROMDevPath; + return (EFI_DEVICE_PATH_PROTOCOL *)CDROMDevPath; } /** @@ -2991,7 +3008,7 @@ DevPathFromTextCDROM ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextVenMedia ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { return ConvertFromTextVendor ( @@ -3011,20 +3028,20 @@ DevPathFromTextVenMedia ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextFilePath ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { FILEPATH_DEVICE_PATH *File; - File = (FILEPATH_DEVICE_PATH *) CreateDeviceNode ( - MEDIA_DEVICE_PATH, - MEDIA_FILEPATH_DP, - (UINT16) (sizeof (FILEPATH_DEVICE_PATH) + StrLen (TextDeviceNode) * 2) - ); + File = (FILEPATH_DEVICE_PATH *)CreateDeviceNode ( + MEDIA_DEVICE_PATH, + MEDIA_FILEPATH_DP, + (UINT16)(sizeof (FILEPATH_DEVICE_PATH) + StrLen (TextDeviceNode) * 2) + ); StrCpyS (File->PathName, StrLen (TextDeviceNode) + 1, TextDeviceNode); - return (EFI_DEVICE_PATH_PROTOCOL *) File; + return (EFI_DEVICE_PATH_PROTOCOL *)File; } /** @@ -3037,22 +3054,22 @@ DevPathFromTextFilePath ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextMedia ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { CHAR16 *GuidStr; MEDIA_PROTOCOL_DEVICE_PATH *Media; GuidStr = GetNextParamStr (&TextDeviceNode); - Media = (MEDIA_PROTOCOL_DEVICE_PATH *) CreateDeviceNode ( - MEDIA_DEVICE_PATH, - MEDIA_PROTOCOL_DP, - (UINT16) sizeof (MEDIA_PROTOCOL_DEVICE_PATH) - ); + Media = (MEDIA_PROTOCOL_DEVICE_PATH *)CreateDeviceNode ( + MEDIA_DEVICE_PATH, + MEDIA_PROTOCOL_DP, + (UINT16)sizeof (MEDIA_PROTOCOL_DEVICE_PATH) + ); StrToGuid (GuidStr, &Media->Protocol); - return (EFI_DEVICE_PATH_PROTOCOL *) Media; + return (EFI_DEVICE_PATH_PROTOCOL *)Media; } /** @@ -3065,22 +3082,22 @@ DevPathFromTextMedia ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextFv ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { CHAR16 *GuidStr; MEDIA_FW_VOL_DEVICE_PATH *Fv; GuidStr = GetNextParamStr (&TextDeviceNode); - Fv = (MEDIA_FW_VOL_DEVICE_PATH *) CreateDeviceNode ( - MEDIA_DEVICE_PATH, - MEDIA_PIWG_FW_VOL_DP, - (UINT16) sizeof (MEDIA_FW_VOL_DEVICE_PATH) - ); + Fv = (MEDIA_FW_VOL_DEVICE_PATH *)CreateDeviceNode ( + MEDIA_DEVICE_PATH, + MEDIA_PIWG_FW_VOL_DP, + (UINT16)sizeof (MEDIA_FW_VOL_DEVICE_PATH) + ); StrToGuid (GuidStr, &Fv->FvName); - return (EFI_DEVICE_PATH_PROTOCOL *) Fv; + return (EFI_DEVICE_PATH_PROTOCOL *)Fv; } /** @@ -3093,22 +3110,22 @@ DevPathFromTextFv ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextFvFile ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { CHAR16 *GuidStr; MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *FvFile; GuidStr = GetNextParamStr (&TextDeviceNode); - FvFile = (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *) CreateDeviceNode ( - MEDIA_DEVICE_PATH, - MEDIA_PIWG_FW_FILE_DP, - (UINT16) sizeof (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH) - ); + FvFile = (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *)CreateDeviceNode ( + MEDIA_DEVICE_PATH, + MEDIA_PIWG_FW_FILE_DP, + (UINT16)sizeof (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH) + ); StrToGuid (GuidStr, &FvFile->FvFileName); - return (EFI_DEVICE_PATH_PROTOCOL *) FvFile; + return (EFI_DEVICE_PATH_PROTOCOL *)FvFile; } /** @@ -3121,25 +3138,25 @@ DevPathFromTextFvFile ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextRelativeOffsetRange ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { - CHAR16 *StartingOffsetStr; - CHAR16 *EndingOffsetStr; - MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH *Offset; + CHAR16 *StartingOffsetStr; + CHAR16 *EndingOffsetStr; + MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH *Offset; StartingOffsetStr = GetNextParamStr (&TextDeviceNode); EndingOffsetStr = GetNextParamStr (&TextDeviceNode); - Offset = (MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH *) CreateDeviceNode ( - MEDIA_DEVICE_PATH, - MEDIA_RELATIVE_OFFSET_RANGE_DP, - (UINT16) sizeof (MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH) - ); + Offset = (MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH *)CreateDeviceNode ( + MEDIA_DEVICE_PATH, + MEDIA_RELATIVE_OFFSET_RANGE_DP, + (UINT16)sizeof (MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH) + ); Strtoi64 (StartingOffsetStr, &Offset->StartingOffset); Strtoi64 (EndingOffsetStr, &Offset->EndingOffset); - return (EFI_DEVICE_PATH_PROTOCOL *) Offset; + return (EFI_DEVICE_PATH_PROTOCOL *)Offset; } /** @@ -3152,35 +3169,35 @@ DevPathFromTextRelativeOffsetRange ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextRamDisk ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { - CHAR16 *StartingAddrStr; - CHAR16 *EndingAddrStr; - CHAR16 *TypeGuidStr; - CHAR16 *InstanceStr; - MEDIA_RAM_DISK_DEVICE_PATH *RamDisk; - UINT64 StartingAddr; - UINT64 EndingAddr; + CHAR16 *StartingAddrStr; + CHAR16 *EndingAddrStr; + CHAR16 *TypeGuidStr; + CHAR16 *InstanceStr; + MEDIA_RAM_DISK_DEVICE_PATH *RamDisk; + UINT64 StartingAddr; + UINT64 EndingAddr; StartingAddrStr = GetNextParamStr (&TextDeviceNode); EndingAddrStr = GetNextParamStr (&TextDeviceNode); InstanceStr = GetNextParamStr (&TextDeviceNode); TypeGuidStr = GetNextParamStr (&TextDeviceNode); - RamDisk = (MEDIA_RAM_DISK_DEVICE_PATH *) CreateDeviceNode ( - MEDIA_DEVICE_PATH, - MEDIA_RAM_DISK_DP, - (UINT16) sizeof (MEDIA_RAM_DISK_DEVICE_PATH) - ); + RamDisk = (MEDIA_RAM_DISK_DEVICE_PATH *)CreateDeviceNode ( + MEDIA_DEVICE_PATH, + MEDIA_RAM_DISK_DP, + (UINT16)sizeof (MEDIA_RAM_DISK_DEVICE_PATH) + ); Strtoi64 (StartingAddrStr, &StartingAddr); - WriteUnaligned64 ((UINT64 *) &(RamDisk->StartingAddr[0]), StartingAddr); + WriteUnaligned64 ((UINT64 *)&(RamDisk->StartingAddr[0]), StartingAddr); Strtoi64 (EndingAddrStr, &EndingAddr); - WriteUnaligned64 ((UINT64 *) &(RamDisk->EndingAddr[0]), EndingAddr); - RamDisk->Instance = (UINT16) Strtoi (InstanceStr); + WriteUnaligned64 ((UINT64 *)&(RamDisk->EndingAddr[0]), EndingAddr); + RamDisk->Instance = (UINT16)Strtoi (InstanceStr); StrToGuid (TypeGuidStr, &RamDisk->TypeGuid); - return (EFI_DEVICE_PATH_PROTOCOL *) RamDisk; + return (EFI_DEVICE_PATH_PROTOCOL *)RamDisk; } /** @@ -3193,34 +3210,34 @@ DevPathFromTextRamDisk ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextVirtualDisk ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { - CHAR16 *StartingAddrStr; - CHAR16 *EndingAddrStr; - CHAR16 *InstanceStr; - MEDIA_RAM_DISK_DEVICE_PATH *RamDisk; - UINT64 StartingAddr; - UINT64 EndingAddr; + CHAR16 *StartingAddrStr; + CHAR16 *EndingAddrStr; + CHAR16 *InstanceStr; + MEDIA_RAM_DISK_DEVICE_PATH *RamDisk; + UINT64 StartingAddr; + UINT64 EndingAddr; StartingAddrStr = GetNextParamStr (&TextDeviceNode); EndingAddrStr = GetNextParamStr (&TextDeviceNode); InstanceStr = GetNextParamStr (&TextDeviceNode); - RamDisk = (MEDIA_RAM_DISK_DEVICE_PATH *) CreateDeviceNode ( - MEDIA_DEVICE_PATH, - MEDIA_RAM_DISK_DP, - (UINT16) sizeof (MEDIA_RAM_DISK_DEVICE_PATH) - ); + RamDisk = (MEDIA_RAM_DISK_DEVICE_PATH *)CreateDeviceNode ( + MEDIA_DEVICE_PATH, + MEDIA_RAM_DISK_DP, + (UINT16)sizeof (MEDIA_RAM_DISK_DEVICE_PATH) + ); Strtoi64 (StartingAddrStr, &StartingAddr); - WriteUnaligned64 ((UINT64 *) &(RamDisk->StartingAddr[0]), StartingAddr); + WriteUnaligned64 ((UINT64 *)&(RamDisk->StartingAddr[0]), StartingAddr); Strtoi64 (EndingAddrStr, &EndingAddr); - WriteUnaligned64 ((UINT64 *) &(RamDisk->EndingAddr[0]), EndingAddr); - RamDisk->Instance = (UINT16) Strtoi (InstanceStr); + WriteUnaligned64 ((UINT64 *)&(RamDisk->EndingAddr[0]), EndingAddr); + RamDisk->Instance = (UINT16)Strtoi (InstanceStr); CopyGuid (&RamDisk->TypeGuid, &gEfiVirtualDiskGuid); - return (EFI_DEVICE_PATH_PROTOCOL *) RamDisk; + return (EFI_DEVICE_PATH_PROTOCOL *)RamDisk; } /** @@ -3233,34 +3250,34 @@ DevPathFromTextVirtualDisk ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextVirtualCd ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { - CHAR16 *StartingAddrStr; - CHAR16 *EndingAddrStr; - CHAR16 *InstanceStr; - MEDIA_RAM_DISK_DEVICE_PATH *RamDisk; - UINT64 StartingAddr; - UINT64 EndingAddr; + CHAR16 *StartingAddrStr; + CHAR16 *EndingAddrStr; + CHAR16 *InstanceStr; + MEDIA_RAM_DISK_DEVICE_PATH *RamDisk; + UINT64 StartingAddr; + UINT64 EndingAddr; StartingAddrStr = GetNextParamStr (&TextDeviceNode); EndingAddrStr = GetNextParamStr (&TextDeviceNode); InstanceStr = GetNextParamStr (&TextDeviceNode); - RamDisk = (MEDIA_RAM_DISK_DEVICE_PATH *) CreateDeviceNode ( - MEDIA_DEVICE_PATH, - MEDIA_RAM_DISK_DP, - (UINT16) sizeof (MEDIA_RAM_DISK_DEVICE_PATH) - ); + RamDisk = (MEDIA_RAM_DISK_DEVICE_PATH *)CreateDeviceNode ( + MEDIA_DEVICE_PATH, + MEDIA_RAM_DISK_DP, + (UINT16)sizeof (MEDIA_RAM_DISK_DEVICE_PATH) + ); Strtoi64 (StartingAddrStr, &StartingAddr); - WriteUnaligned64 ((UINT64 *) &(RamDisk->StartingAddr[0]), StartingAddr); + WriteUnaligned64 ((UINT64 *)&(RamDisk->StartingAddr[0]), StartingAddr); Strtoi64 (EndingAddrStr, &EndingAddr); - WriteUnaligned64 ((UINT64 *) &(RamDisk->EndingAddr[0]), EndingAddr); - RamDisk->Instance = (UINT16) Strtoi (InstanceStr); + WriteUnaligned64 ((UINT64 *)&(RamDisk->EndingAddr[0]), EndingAddr); + RamDisk->Instance = (UINT16)Strtoi (InstanceStr); CopyGuid (&RamDisk->TypeGuid, &gEfiVirtualCdGuid); - return (EFI_DEVICE_PATH_PROTOCOL *) RamDisk; + return (EFI_DEVICE_PATH_PROTOCOL *)RamDisk; } /** @@ -3273,34 +3290,34 @@ DevPathFromTextVirtualCd ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextPersistentVirtualDisk ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { - CHAR16 *StartingAddrStr; - CHAR16 *EndingAddrStr; - CHAR16 *InstanceStr; - MEDIA_RAM_DISK_DEVICE_PATH *RamDisk; - UINT64 StartingAddr; - UINT64 EndingAddr; + CHAR16 *StartingAddrStr; + CHAR16 *EndingAddrStr; + CHAR16 *InstanceStr; + MEDIA_RAM_DISK_DEVICE_PATH *RamDisk; + UINT64 StartingAddr; + UINT64 EndingAddr; StartingAddrStr = GetNextParamStr (&TextDeviceNode); EndingAddrStr = GetNextParamStr (&TextDeviceNode); InstanceStr = GetNextParamStr (&TextDeviceNode); - RamDisk = (MEDIA_RAM_DISK_DEVICE_PATH *) CreateDeviceNode ( - MEDIA_DEVICE_PATH, - MEDIA_RAM_DISK_DP, - (UINT16) sizeof (MEDIA_RAM_DISK_DEVICE_PATH) - ); + RamDisk = (MEDIA_RAM_DISK_DEVICE_PATH *)CreateDeviceNode ( + MEDIA_DEVICE_PATH, + MEDIA_RAM_DISK_DP, + (UINT16)sizeof (MEDIA_RAM_DISK_DEVICE_PATH) + ); Strtoi64 (StartingAddrStr, &StartingAddr); - WriteUnaligned64 ((UINT64 *) &(RamDisk->StartingAddr[0]), StartingAddr); + WriteUnaligned64 ((UINT64 *)&(RamDisk->StartingAddr[0]), StartingAddr); Strtoi64 (EndingAddrStr, &EndingAddr); - WriteUnaligned64 ((UINT64 *) &(RamDisk->EndingAddr[0]), EndingAddr); - RamDisk->Instance = (UINT16) Strtoi (InstanceStr); + WriteUnaligned64 ((UINT64 *)&(RamDisk->EndingAddr[0]), EndingAddr); + RamDisk->Instance = (UINT16)Strtoi (InstanceStr); CopyGuid (&RamDisk->TypeGuid, &gEfiPersistentVirtualDiskGuid); - return (EFI_DEVICE_PATH_PROTOCOL *) RamDisk; + return (EFI_DEVICE_PATH_PROTOCOL *)RamDisk; } /** @@ -3313,34 +3330,34 @@ DevPathFromTextPersistentVirtualDisk ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextPersistentVirtualCd ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { - CHAR16 *StartingAddrStr; - CHAR16 *EndingAddrStr; - CHAR16 *InstanceStr; - MEDIA_RAM_DISK_DEVICE_PATH *RamDisk; - UINT64 StartingAddr; - UINT64 EndingAddr; + CHAR16 *StartingAddrStr; + CHAR16 *EndingAddrStr; + CHAR16 *InstanceStr; + MEDIA_RAM_DISK_DEVICE_PATH *RamDisk; + UINT64 StartingAddr; + UINT64 EndingAddr; StartingAddrStr = GetNextParamStr (&TextDeviceNode); EndingAddrStr = GetNextParamStr (&TextDeviceNode); InstanceStr = GetNextParamStr (&TextDeviceNode); - RamDisk = (MEDIA_RAM_DISK_DEVICE_PATH *) CreateDeviceNode ( - MEDIA_DEVICE_PATH, - MEDIA_RAM_DISK_DP, - (UINT16) sizeof (MEDIA_RAM_DISK_DEVICE_PATH) - ); + RamDisk = (MEDIA_RAM_DISK_DEVICE_PATH *)CreateDeviceNode ( + MEDIA_DEVICE_PATH, + MEDIA_RAM_DISK_DP, + (UINT16)sizeof (MEDIA_RAM_DISK_DEVICE_PATH) + ); Strtoi64 (StartingAddrStr, &StartingAddr); - WriteUnaligned64 ((UINT64 *) &(RamDisk->StartingAddr[0]), StartingAddr); + WriteUnaligned64 ((UINT64 *)&(RamDisk->StartingAddr[0]), StartingAddr); Strtoi64 (EndingAddrStr, &EndingAddr); - WriteUnaligned64 ((UINT64 *) &(RamDisk->EndingAddr[0]), EndingAddr); - RamDisk->Instance = (UINT16) Strtoi (InstanceStr); + WriteUnaligned64 ((UINT64 *)&(RamDisk->EndingAddr[0]), EndingAddr); + RamDisk->Instance = (UINT16)Strtoi (InstanceStr); CopyGuid (&RamDisk->TypeGuid, &gEfiPersistentVirtualCdGuid); - return (EFI_DEVICE_PATH_PROTOCOL *) RamDisk; + return (EFI_DEVICE_PATH_PROTOCOL *)RamDisk; } /** @@ -3353,7 +3370,7 @@ DevPathFromTextPersistentVirtualCd ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextBbsPath ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { return DevPathFromTextGenericPath (BBS_DEVICE_PATH, TextDeviceNode); @@ -3369,23 +3386,23 @@ DevPathFromTextBbsPath ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextBBS ( - IN CHAR16 *TextDeviceNode - ) -{ - CHAR16 *TypeStr; - CHAR16 *IdStr; - CHAR16 *FlagsStr; - CHAR8 *AsciiStr; - BBS_BBS_DEVICE_PATH *Bbs; - - TypeStr = GetNextParamStr (&TextDeviceNode); - IdStr = GetNextParamStr (&TextDeviceNode); - FlagsStr = GetNextParamStr (&TextDeviceNode); - Bbs = (BBS_BBS_DEVICE_PATH *) CreateDeviceNode ( - BBS_DEVICE_PATH, - BBS_BBS_DP, - (UINT16) (sizeof (BBS_BBS_DEVICE_PATH) + StrLen (IdStr)) - ); + IN CHAR16 *TextDeviceNode + ) +{ + CHAR16 *TypeStr; + CHAR16 *IdStr; + CHAR16 *FlagsStr; + CHAR8 *AsciiStr; + BBS_BBS_DEVICE_PATH *Bbs; + + TypeStr = GetNextParamStr (&TextDeviceNode); + IdStr = GetNextParamStr (&TextDeviceNode); + FlagsStr = GetNextParamStr (&TextDeviceNode); + Bbs = (BBS_BBS_DEVICE_PATH *)CreateDeviceNode ( + BBS_DEVICE_PATH, + BBS_BBS_DP, + (UINT16)(sizeof (BBS_BBS_DEVICE_PATH) + StrLen (IdStr)) + ); if (StrCmp (TypeStr, L"Floppy") == 0) { Bbs->DeviceType = BBS_TYPE_FLOPPY; @@ -3400,15 +3417,15 @@ DevPathFromTextBBS ( } else if (StrCmp (TypeStr, L"Network") == 0) { Bbs->DeviceType = BBS_TYPE_EMBEDDED_NETWORK; } else { - Bbs->DeviceType = (UINT16) Strtoi (TypeStr); + Bbs->DeviceType = (UINT16)Strtoi (TypeStr); } AsciiStr = Bbs->String; StrToAscii (IdStr, &AsciiStr); - Bbs->StatusFlag = (UINT16) Strtoi (FlagsStr); + Bbs->StatusFlag = (UINT16)Strtoi (FlagsStr); - return (EFI_DEVICE_PATH_PROTOCOL *) Bbs; + return (EFI_DEVICE_PATH_PROTOCOL *)Bbs; } /** @@ -3421,24 +3438,24 @@ DevPathFromTextBBS ( **/ EFI_DEVICE_PATH_PROTOCOL * DevPathFromTextSata ( - IN CHAR16 *TextDeviceNode + IN CHAR16 *TextDeviceNode ) { - SATA_DEVICE_PATH *Sata; - CHAR16 *Param1; - CHAR16 *Param2; - CHAR16 *Param3; + SATA_DEVICE_PATH *Sata; + CHAR16 *Param1; + CHAR16 *Param2; + CHAR16 *Param3; Param1 = GetNextParamStr (&TextDeviceNode); Param2 = GetNextParamStr (&TextDeviceNode); Param3 = GetNextParamStr (&TextDeviceNode); - Sata = (SATA_DEVICE_PATH *) CreateDeviceNode ( - MESSAGING_DEVICE_PATH, - MSG_SATA_DP, - (UINT16) sizeof (SATA_DEVICE_PATH) - ); - Sata->HBAPortNumber = (UINT16) Strtoi (Param1); + Sata = (SATA_DEVICE_PATH *)CreateDeviceNode ( + MESSAGING_DEVICE_PATH, + MSG_SATA_DP, + (UINT16)sizeof (SATA_DEVICE_PATH) + ); + Sata->HBAPortNumber = (UINT16)Strtoi (Param1); // // According to UEFI spec, if PMPN is not provided, the default is 0xFFFF @@ -3446,105 +3463,106 @@ DevPathFromTextSata ( if (*Param2 == L'\0' ) { Sata->PortMultiplierPortNumber = 0xFFFF; } else { - Sata->PortMultiplierPortNumber = (UINT16) Strtoi (Param2); - } - Sata->Lun = (UINT16) Strtoi (Param3); - - return (EFI_DEVICE_PATH_PROTOCOL *) Sata; -} - -GLOBAL_REMOVE_IF_UNREFERENCED DEVICE_PATH_FROM_TEXT_TABLE mUefiDevicePathLibDevPathFromTextTable[] = { - {L"Path", DevPathFromTextPath }, - - {L"HardwarePath", DevPathFromTextHardwarePath }, - {L"Pci", DevPathFromTextPci }, - {L"PcCard", DevPathFromTextPcCard }, - {L"MemoryMapped", DevPathFromTextMemoryMapped }, - {L"VenHw", DevPathFromTextVenHw }, - {L"Ctrl", DevPathFromTextCtrl }, - {L"BMC", DevPathFromTextBmc }, - - {L"AcpiPath", DevPathFromTextAcpiPath }, - {L"Acpi", DevPathFromTextAcpi }, - {L"PciRoot", DevPathFromTextPciRoot }, - {L"PcieRoot", DevPathFromTextPcieRoot }, - {L"Floppy", DevPathFromTextFloppy }, - {L"Keyboard", DevPathFromTextKeyboard }, - {L"Serial", DevPathFromTextSerial }, - {L"ParallelPort", DevPathFromTextParallelPort }, - {L"AcpiEx", DevPathFromTextAcpiEx }, - {L"AcpiExp", DevPathFromTextAcpiExp }, - {L"AcpiAdr", DevPathFromTextAcpiAdr }, - - {L"Msg", DevPathFromTextMsg }, - {L"Ata", DevPathFromTextAta }, - {L"Scsi", DevPathFromTextScsi }, - {L"Fibre", DevPathFromTextFibre }, - {L"FibreEx", DevPathFromTextFibreEx }, - {L"I1394", DevPathFromText1394 }, - {L"USB", DevPathFromTextUsb }, - {L"I2O", DevPathFromTextI2O }, - {L"Infiniband", DevPathFromTextInfiniband }, - {L"VenMsg", DevPathFromTextVenMsg }, - {L"VenPcAnsi", DevPathFromTextVenPcAnsi }, - {L"VenVt100", DevPathFromTextVenVt100 }, - {L"VenVt100Plus", DevPathFromTextVenVt100Plus }, - {L"VenUtf8", DevPathFromTextVenUtf8 }, - {L"UartFlowCtrl", DevPathFromTextUartFlowCtrl }, - {L"SAS", DevPathFromTextSAS }, - {L"SasEx", DevPathFromTextSasEx }, - {L"NVMe", DevPathFromTextNVMe }, - {L"UFS", DevPathFromTextUfs }, - {L"SD", DevPathFromTextSd }, - {L"eMMC", DevPathFromTextEmmc }, - {L"DebugPort", DevPathFromTextDebugPort }, - {L"MAC", DevPathFromTextMAC }, - {L"IPv4", DevPathFromTextIPv4 }, - {L"IPv6", DevPathFromTextIPv6 }, - {L"Uart", DevPathFromTextUart }, - {L"UsbClass", DevPathFromTextUsbClass }, - {L"UsbAudio", DevPathFromTextUsbAudio }, - {L"UsbCDCControl", DevPathFromTextUsbCDCControl }, - {L"UsbHID", DevPathFromTextUsbHID }, - {L"UsbImage", DevPathFromTextUsbImage }, - {L"UsbPrinter", DevPathFromTextUsbPrinter }, - {L"UsbMassStorage", DevPathFromTextUsbMassStorage }, - {L"UsbHub", DevPathFromTextUsbHub }, - {L"UsbCDCData", DevPathFromTextUsbCDCData }, - {L"UsbSmartCard", DevPathFromTextUsbSmartCard }, - {L"UsbVideo", DevPathFromTextUsbVideo }, - {L"UsbDiagnostic", DevPathFromTextUsbDiagnostic }, - {L"UsbWireless", DevPathFromTextUsbWireless }, - {L"UsbDeviceFirmwareUpdate", DevPathFromTextUsbDeviceFirmwareUpdate }, - {L"UsbIrdaBridge", DevPathFromTextUsbIrdaBridge }, - {L"UsbTestAndMeasurement", DevPathFromTextUsbTestAndMeasurement }, - {L"UsbWwid", DevPathFromTextUsbWwid }, - {L"Unit", DevPathFromTextUnit }, - {L"iSCSI", DevPathFromTextiSCSI }, - {L"Vlan", DevPathFromTextVlan }, - {L"Dns", DevPathFromTextDns }, - {L"Uri", DevPathFromTextUri }, - {L"Bluetooth", DevPathFromTextBluetooth }, - {L"Wi-Fi", DevPathFromTextWiFi }, - {L"BluetoothLE", DevPathFromTextBluetoothLE }, - {L"MediaPath", DevPathFromTextMediaPath }, - {L"HD", DevPathFromTextHD }, - {L"CDROM", DevPathFromTextCDROM }, - {L"VenMedia", DevPathFromTextVenMedia }, - {L"Media", DevPathFromTextMedia }, - {L"Fv", DevPathFromTextFv }, - {L"FvFile", DevPathFromTextFvFile }, - {L"Offset", DevPathFromTextRelativeOffsetRange }, - {L"RamDisk", DevPathFromTextRamDisk }, - {L"VirtualDisk", DevPathFromTextVirtualDisk }, - {L"VirtualCD", DevPathFromTextVirtualCd }, - {L"PersistentVirtualDisk", DevPathFromTextPersistentVirtualDisk }, - {L"PersistentVirtualCD", DevPathFromTextPersistentVirtualCd }, - - {L"BbsPath", DevPathFromTextBbsPath }, - {L"BBS", DevPathFromTextBBS }, - {L"Sata", DevPathFromTextSata }, - {NULL, NULL} + Sata->PortMultiplierPortNumber = (UINT16)Strtoi (Param2); + } + + Sata->Lun = (UINT16)Strtoi (Param3); + + return (EFI_DEVICE_PATH_PROTOCOL *)Sata; +} + +GLOBAL_REMOVE_IF_UNREFERENCED DEVICE_PATH_FROM_TEXT_TABLE mUefiDevicePathLibDevPathFromTextTable[] = { + { L"Path", DevPathFromTextPath }, + + { L"HardwarePath", DevPathFromTextHardwarePath }, + { L"Pci", DevPathFromTextPci }, + { L"PcCard", DevPathFromTextPcCard }, + { L"MemoryMapped", DevPathFromTextMemoryMapped }, + { L"VenHw", DevPathFromTextVenHw }, + { L"Ctrl", DevPathFromTextCtrl }, + { L"BMC", DevPathFromTextBmc }, + + { L"AcpiPath", DevPathFromTextAcpiPath }, + { L"Acpi", DevPathFromTextAcpi }, + { L"PciRoot", DevPathFromTextPciRoot }, + { L"PcieRoot", DevPathFromTextPcieRoot }, + { L"Floppy", DevPathFromTextFloppy }, + { L"Keyboard", DevPathFromTextKeyboard }, + { L"Serial", DevPathFromTextSerial }, + { L"ParallelPort", DevPathFromTextParallelPort }, + { L"AcpiEx", DevPathFromTextAcpiEx }, + { L"AcpiExp", DevPathFromTextAcpiExp }, + { L"AcpiAdr", DevPathFromTextAcpiAdr }, + + { L"Msg", DevPathFromTextMsg }, + { L"Ata", DevPathFromTextAta }, + { L"Scsi", DevPathFromTextScsi }, + { L"Fibre", DevPathFromTextFibre }, + { L"FibreEx", DevPathFromTextFibreEx }, + { L"I1394", DevPathFromText1394 }, + { L"USB", DevPathFromTextUsb }, + { L"I2O", DevPathFromTextI2O }, + { L"Infiniband", DevPathFromTextInfiniband }, + { L"VenMsg", DevPathFromTextVenMsg }, + { L"VenPcAnsi", DevPathFromTextVenPcAnsi }, + { L"VenVt100", DevPathFromTextVenVt100 }, + { L"VenVt100Plus", DevPathFromTextVenVt100Plus }, + { L"VenUtf8", DevPathFromTextVenUtf8 }, + { L"UartFlowCtrl", DevPathFromTextUartFlowCtrl }, + { L"SAS", DevPathFromTextSAS }, + { L"SasEx", DevPathFromTextSasEx }, + { L"NVMe", DevPathFromTextNVMe }, + { L"UFS", DevPathFromTextUfs }, + { L"SD", DevPathFromTextSd }, + { L"eMMC", DevPathFromTextEmmc }, + { L"DebugPort", DevPathFromTextDebugPort }, + { L"MAC", DevPathFromTextMAC }, + { L"IPv4", DevPathFromTextIPv4 }, + { L"IPv6", DevPathFromTextIPv6 }, + { L"Uart", DevPathFromTextUart }, + { L"UsbClass", DevPathFromTextUsbClass }, + { L"UsbAudio", DevPathFromTextUsbAudio }, + { L"UsbCDCControl", DevPathFromTextUsbCDCControl }, + { L"UsbHID", DevPathFromTextUsbHID }, + { L"UsbImage", DevPathFromTextUsbImage }, + { L"UsbPrinter", DevPathFromTextUsbPrinter }, + { L"UsbMassStorage", DevPathFromTextUsbMassStorage }, + { L"UsbHub", DevPathFromTextUsbHub }, + { L"UsbCDCData", DevPathFromTextUsbCDCData }, + { L"UsbSmartCard", DevPathFromTextUsbSmartCard }, + { L"UsbVideo", DevPathFromTextUsbVideo }, + { L"UsbDiagnostic", DevPathFromTextUsbDiagnostic }, + { L"UsbWireless", DevPathFromTextUsbWireless }, + { L"UsbDeviceFirmwareUpdate", DevPathFromTextUsbDeviceFirmwareUpdate }, + { L"UsbIrdaBridge", DevPathFromTextUsbIrdaBridge }, + { L"UsbTestAndMeasurement", DevPathFromTextUsbTestAndMeasurement }, + { L"UsbWwid", DevPathFromTextUsbWwid }, + { L"Unit", DevPathFromTextUnit }, + { L"iSCSI", DevPathFromTextiSCSI }, + { L"Vlan", DevPathFromTextVlan }, + { L"Dns", DevPathFromTextDns }, + { L"Uri", DevPathFromTextUri }, + { L"Bluetooth", DevPathFromTextBluetooth }, + { L"Wi-Fi", DevPathFromTextWiFi }, + { L"BluetoothLE", DevPathFromTextBluetoothLE }, + { L"MediaPath", DevPathFromTextMediaPath }, + { L"HD", DevPathFromTextHD }, + { L"CDROM", DevPathFromTextCDROM }, + { L"VenMedia", DevPathFromTextVenMedia }, + { L"Media", DevPathFromTextMedia }, + { L"Fv", DevPathFromTextFv }, + { L"FvFile", DevPathFromTextFvFile }, + { L"Offset", DevPathFromTextRelativeOffsetRange }, + { L"RamDisk", DevPathFromTextRamDisk }, + { L"VirtualDisk", DevPathFromTextVirtualDisk }, + { L"VirtualCD", DevPathFromTextVirtualCd }, + { L"PersistentVirtualDisk", DevPathFromTextPersistentVirtualDisk }, + { L"PersistentVirtualCD", DevPathFromTextPersistentVirtualCd }, + + { L"BbsPath", DevPathFromTextBbsPath }, + { L"BBS", DevPathFromTextBBS }, + { L"Sata", DevPathFromTextSata }, + { NULL, NULL } }; /** @@ -3561,14 +3579,14 @@ GLOBAL_REMOVE_IF_UNREFERENCED DEVICE_PATH_FROM_TEXT_TABLE mUefiDevicePathLibDevP EFI_DEVICE_PATH_PROTOCOL * EFIAPI UefiDevicePathLibConvertTextToDeviceNode ( - IN CONST CHAR16 *TextDeviceNode + IN CONST CHAR16 *TextDeviceNode ) { - DEVICE_PATH_FROM_TEXT FromText; - CHAR16 *ParamStr; - EFI_DEVICE_PATH_PROTOCOL *DeviceNode; - CHAR16 *DeviceNodeStr; - UINTN Index; + DEVICE_PATH_FROM_TEXT FromText; + CHAR16 *ParamStr; + EFI_DEVICE_PATH_PROTOCOL *DeviceNode; + CHAR16 *DeviceNodeStr; + UINTN Index; if ((TextDeviceNode == NULL) || (IS_NULL (*TextDeviceNode))) { return NULL; @@ -3591,7 +3609,7 @@ UefiDevicePathLibConvertTextToDeviceNode ( // // A file path // - FromText = DevPathFromTextFilePath; + FromText = DevPathFromTextFilePath; DeviceNode = FromText (DeviceNodeStr); } else { DeviceNode = FromText (ParamStr); @@ -3618,28 +3636,28 @@ UefiDevicePathLibConvertTextToDeviceNode ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI UefiDevicePathLibConvertTextToDevicePath ( - IN CONST CHAR16 *TextDevicePath + IN CONST CHAR16 *TextDevicePath ) { - EFI_DEVICE_PATH_PROTOCOL *DeviceNode; - EFI_DEVICE_PATH_PROTOCOL *NewDevicePath; - CHAR16 *DevicePathStr; - CHAR16 *Str; - CHAR16 *DeviceNodeStr; - BOOLEAN IsInstanceEnd; - EFI_DEVICE_PATH_PROTOCOL *DevicePath; + EFI_DEVICE_PATH_PROTOCOL *DeviceNode; + EFI_DEVICE_PATH_PROTOCOL *NewDevicePath; + CHAR16 *DevicePathStr; + CHAR16 *Str; + CHAR16 *DeviceNodeStr; + BOOLEAN IsInstanceEnd; + EFI_DEVICE_PATH_PROTOCOL *DevicePath; if ((TextDevicePath == NULL) || (IS_NULL (*TextDevicePath))) { return NULL; } - DevicePath = (EFI_DEVICE_PATH_PROTOCOL *) AllocatePool (END_DEVICE_PATH_LENGTH); + DevicePath = (EFI_DEVICE_PATH_PROTOCOL *)AllocatePool (END_DEVICE_PATH_LENGTH); ASSERT (DevicePath != NULL); SetDevicePathEndNode (DevicePath); DevicePathStr = UefiDevicePathLibStrDuplicate (TextDevicePath); - Str = DevicePathStr; + Str = DevicePathStr; while ((DeviceNodeStr = GetNextDeviceNodeStr (&Str, &IsInstanceEnd)) != NULL) { DeviceNode = UefiDevicePathLibConvertTextToDeviceNode (DeviceNodeStr); @@ -3649,7 +3667,7 @@ UefiDevicePathLibConvertTextToDevicePath ( DevicePath = NewDevicePath; if (IsInstanceEnd) { - DeviceNode = (EFI_DEVICE_PATH_PROTOCOL *) AllocatePool (END_DEVICE_PATH_LENGTH); + DeviceNode = (EFI_DEVICE_PATH_PROTOCOL *)AllocatePool (END_DEVICE_PATH_LENGTH); ASSERT (DeviceNode != NULL); SetDevicePathEndNode (DeviceNode); DeviceNode->SubType = END_INSTANCE_DEVICE_PATH_SUBTYPE; diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c index fb65ebd..dd90dfa 100644 --- a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c +++ b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c @@ -26,27 +26,28 @@ SPDX-License-Identifier: BSD-2-Clause-Patent CHAR16 * EFIAPI UefiDevicePathLibCatPrint ( - IN OUT POOL_PRINT *Str, - IN CHAR16 *Fmt, + IN OUT POOL_PRINT *Str, + IN CHAR16 *Fmt, ... ) { - UINTN Count; - VA_LIST Args; + UINTN Count; + VA_LIST Args; VA_START (Args, Fmt); Count = SPrintLength (Fmt, Args); - VA_END(Args); + VA_END (Args); if ((Str->Count + (Count + 1)) * sizeof (CHAR16) > Str->Capacity) { Str->Capacity = (Str->Count + (Count + 1) * 2) * sizeof (CHAR16); - Str->Str = ReallocatePool ( - Str->Count * sizeof (CHAR16), - Str->Capacity, - Str->Str - ); + Str->Str = ReallocatePool ( + Str->Count * sizeof (CHAR16), + Str->Capacity, + Str->Str + ); ASSERT (Str->Str != NULL); } + VA_START (Args, Fmt); UnicodeVSPrint (&Str->Str[Str->Count], Str->Capacity - Str->Count * sizeof (CHAR16), Fmt, Args); Str->Count += Count; @@ -76,7 +77,7 @@ DevPathToTextPci ( IN BOOLEAN AllowShortcuts ) { - PCI_DEVICE_PATH *Pci; + PCI_DEVICE_PATH *Pci; Pci = DevPath; UefiDevicePathLibCatPrint (Str, L"Pci(0x%x,0x%x)", Pci->Device, Pci->Function); @@ -170,94 +171,95 @@ DevPathToTextVendor ( UINT32 FlowControlMap; UINT16 Info; - Vendor = (VENDOR_DEVICE_PATH *) DevPath; + Vendor = (VENDOR_DEVICE_PATH *)DevPath; switch (DevicePathType (&Vendor->Header)) { - case HARDWARE_DEVICE_PATH: - Type = L"Hw"; - break; - - case MESSAGING_DEVICE_PATH: - Type = L"Msg"; - if (AllowShortcuts) { - if (CompareGuid (&Vendor->Guid, &gEfiPcAnsiGuid)) { - UefiDevicePathLibCatPrint (Str, L"VenPcAnsi()"); - return ; - } else if (CompareGuid (&Vendor->Guid, &gEfiVT100Guid)) { - UefiDevicePathLibCatPrint (Str, L"VenVt100()"); - return ; - } else if (CompareGuid (&Vendor->Guid, &gEfiVT100PlusGuid)) { - UefiDevicePathLibCatPrint (Str, L"VenVt100Plus()"); - return ; - } else if (CompareGuid (&Vendor->Guid, &gEfiVTUTF8Guid)) { - UefiDevicePathLibCatPrint (Str, L"VenUtf8()"); - return ; - } else if (CompareGuid (&Vendor->Guid, &gEfiUartDevicePathGuid)) { - FlowControlMap = (((UART_FLOW_CONTROL_DEVICE_PATH *) Vendor)->FlowControlMap); - switch (FlowControlMap & 0x00000003) { - case 0: - UefiDevicePathLibCatPrint (Str, L"UartFlowCtrl(%s)", L"None"); - break; - - case 1: - UefiDevicePathLibCatPrint (Str, L"UartFlowCtrl(%s)", L"Hardware"); - break; - - case 2: - UefiDevicePathLibCatPrint (Str, L"UartFlowCtrl(%s)", L"XonXoff"); - break; - - default: - break; - } + case HARDWARE_DEVICE_PATH: + Type = L"Hw"; + break; - return ; - } else if (CompareGuid (&Vendor->Guid, &gEfiSasDevicePathGuid)) { - UefiDevicePathLibCatPrint ( - Str, - L"SAS(0x%lx,0x%lx,0x%x,", - ((SAS_DEVICE_PATH *) Vendor)->SasAddress, - ((SAS_DEVICE_PATH *) Vendor)->Lun, - ((SAS_DEVICE_PATH *) Vendor)->RelativeTargetPort - ); - Info = (((SAS_DEVICE_PATH *) Vendor)->DeviceTopology); - if (((Info & 0x0f) == 0) && ((Info & BIT7) == 0)) { - UefiDevicePathLibCatPrint (Str, L"NoTopology,0,0,0,"); - } else if (((Info & 0x0f) <= 2) && ((Info & BIT7) == 0)) { + case MESSAGING_DEVICE_PATH: + Type = L"Msg"; + if (AllowShortcuts) { + if (CompareGuid (&Vendor->Guid, &gEfiPcAnsiGuid)) { + UefiDevicePathLibCatPrint (Str, L"VenPcAnsi()"); + return; + } else if (CompareGuid (&Vendor->Guid, &gEfiVT100Guid)) { + UefiDevicePathLibCatPrint (Str, L"VenVt100()"); + return; + } else if (CompareGuid (&Vendor->Guid, &gEfiVT100PlusGuid)) { + UefiDevicePathLibCatPrint (Str, L"VenVt100Plus()"); + return; + } else if (CompareGuid (&Vendor->Guid, &gEfiVTUTF8Guid)) { + UefiDevicePathLibCatPrint (Str, L"VenUtf8()"); + return; + } else if (CompareGuid (&Vendor->Guid, &gEfiUartDevicePathGuid)) { + FlowControlMap = (((UART_FLOW_CONTROL_DEVICE_PATH *)Vendor)->FlowControlMap); + switch (FlowControlMap & 0x00000003) { + case 0: + UefiDevicePathLibCatPrint (Str, L"UartFlowCtrl(%s)", L"None"); + break; + + case 1: + UefiDevicePathLibCatPrint (Str, L"UartFlowCtrl(%s)", L"Hardware"); + break; + + case 2: + UefiDevicePathLibCatPrint (Str, L"UartFlowCtrl(%s)", L"XonXoff"); + break; + + default: + break; + } + + return; + } else if (CompareGuid (&Vendor->Guid, &gEfiSasDevicePathGuid)) { UefiDevicePathLibCatPrint ( Str, - L"%s,%s,%s,", - ((Info & BIT4) != 0) ? L"SATA" : L"SAS", - ((Info & BIT5) != 0) ? L"External" : L"Internal", - ((Info & BIT6) != 0) ? L"Expanded" : L"Direct" + L"SAS(0x%lx,0x%lx,0x%x,", + ((SAS_DEVICE_PATH *)Vendor)->SasAddress, + ((SAS_DEVICE_PATH *)Vendor)->Lun, + ((SAS_DEVICE_PATH *)Vendor)->RelativeTargetPort ); - if ((Info & 0x0f) == 1) { - UefiDevicePathLibCatPrint (Str, L"0,"); + Info = (((SAS_DEVICE_PATH *)Vendor)->DeviceTopology); + if (((Info & 0x0f) == 0) && ((Info & BIT7) == 0)) { + UefiDevicePathLibCatPrint (Str, L"NoTopology,0,0,0,"); + } else if (((Info & 0x0f) <= 2) && ((Info & BIT7) == 0)) { + UefiDevicePathLibCatPrint ( + Str, + L"%s,%s,%s,", + ((Info & BIT4) != 0) ? L"SATA" : L"SAS", + ((Info & BIT5) != 0) ? L"External" : L"Internal", + ((Info & BIT6) != 0) ? L"Expanded" : L"Direct" + ); + if ((Info & 0x0f) == 1) { + UefiDevicePathLibCatPrint (Str, L"0,"); + } else { + // + // Value 0x0 thru 0xFF -> Drive 1 thru Drive 256 + // + UefiDevicePathLibCatPrint (Str, L"0x%x,", ((Info >> 8) & 0xff) + 1); + } } else { - // - // Value 0x0 thru 0xFF -> Drive 1 thru Drive 256 - // - UefiDevicePathLibCatPrint (Str, L"0x%x,", ((Info >> 8) & 0xff) + 1); + UefiDevicePathLibCatPrint (Str, L"0x%x,0,0,0,", Info); } - } else { - UefiDevicePathLibCatPrint (Str, L"0x%x,0,0,0,", Info); - } - UefiDevicePathLibCatPrint (Str, L"0x%x)", ((SAS_DEVICE_PATH *) Vendor)->Reserved); - return ; - } else if (CompareGuid (&Vendor->Guid, &gEfiDebugPortProtocolGuid)) { - UefiDevicePathLibCatPrint (Str, L"DebugPort()"); - return ; + UefiDevicePathLibCatPrint (Str, L"0x%x)", ((SAS_DEVICE_PATH *)Vendor)->Reserved); + return; + } else if (CompareGuid (&Vendor->Guid, &gEfiDebugPortProtocolGuid)) { + UefiDevicePathLibCatPrint (Str, L"DebugPort()"); + return; + } } - } - break; - case MEDIA_DEVICE_PATH: - Type = L"Media"; - break; + break; + + case MEDIA_DEVICE_PATH: + Type = L"Media"; + break; - default: - Type = L"?"; - break; + default: + Type = L"?"; + break; } DataLength = DevicePathNodeLength (&Vendor->Header) - sizeof (VENDOR_DEVICE_PATH); @@ -265,7 +267,7 @@ DevPathToTextVendor ( if (DataLength != 0) { UefiDevicePathLibCatPrint (Str, L","); for (Index = 0; Index < DataLength; Index++) { - UefiDevicePathLibCatPrint (Str, L"%02x", ((VENDOR_DEVICE_PATH_WITH_DATA *) Vendor)->VendorDefinedData[Index]); + UefiDevicePathLibCatPrint (Str, L"%02x", ((VENDOR_DEVICE_PATH_WITH_DATA *)Vendor)->VendorDefinedData[Index]); } } @@ -324,14 +326,14 @@ DevPathToTextBmc ( IN BOOLEAN AllowShortcuts ) { - BMC_DEVICE_PATH *Bmc; + BMC_DEVICE_PATH *Bmc; Bmc = DevPath; UefiDevicePathLibCatPrint ( Str, L"BMC(0x%x,0x%lx)", Bmc->InterfaceType, - ReadUnaligned64 ((UINT64 *) (&Bmc->BaseAddress)) + ReadUnaligned64 ((UINT64 *)(&Bmc->BaseAddress)) ); } @@ -361,33 +363,33 @@ DevPathToTextAcpi ( Acpi = DevPath; if ((Acpi->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) { switch (EISA_ID_TO_NUM (Acpi->HID)) { - case 0x0a03: - UefiDevicePathLibCatPrint (Str, L"PciRoot(0x%x)", Acpi->UID); - break; + case 0x0a03: + UefiDevicePathLibCatPrint (Str, L"PciRoot(0x%x)", Acpi->UID); + break; - case 0x0a08: - UefiDevicePathLibCatPrint (Str, L"PcieRoot(0x%x)", Acpi->UID); - break; + case 0x0a08: + UefiDevicePathLibCatPrint (Str, L"PcieRoot(0x%x)", Acpi->UID); + break; - case 0x0604: - UefiDevicePathLibCatPrint (Str, L"Floppy(0x%x)", Acpi->UID); - break; + case 0x0604: + UefiDevicePathLibCatPrint (Str, L"Floppy(0x%x)", Acpi->UID); + break; - case 0x0301: - UefiDevicePathLibCatPrint (Str, L"Keyboard(0x%x)", Acpi->UID); - break; + case 0x0301: + UefiDevicePathLibCatPrint (Str, L"Keyboard(0x%x)", Acpi->UID); + break; - case 0x0501: - UefiDevicePathLibCatPrint (Str, L"Serial(0x%x)", Acpi->UID); - break; + case 0x0501: + UefiDevicePathLibCatPrint (Str, L"Serial(0x%x)", Acpi->UID); + break; - case 0x0401: - UefiDevicePathLibCatPrint (Str, L"ParallelPort(0x%x)", Acpi->UID); - break; + case 0x0401: + UefiDevicePathLibCatPrint (Str, L"ParallelPort(0x%x)", Acpi->UID); + break; - default: - UefiDevicePathLibCatPrint (Str, L"Acpi(PNP%04x,0x%x)", EISA_ID_TO_NUM (Acpi->HID), Acpi->UID); - break; + default: + UefiDevicePathLibCatPrint (Str, L"Acpi(PNP%04x,0x%x)", EISA_ID_TO_NUM (Acpi->HID), Acpi->UID); + break; } } else { UefiDevicePathLibCatPrint (Str, L"Acpi(0x%08x,0x%x)", Acpi->HID, Acpi->UID); @@ -423,27 +425,30 @@ DevPathToTextAcpiEx ( CHAR16 CIDText[11]; AcpiEx = DevPath; - HIDStr = (CHAR8 *) (((UINT8 *) AcpiEx) + sizeof (ACPI_EXTENDED_HID_DEVICE_PATH)); + HIDStr = (CHAR8 *)(((UINT8 *)AcpiEx) + sizeof (ACPI_EXTENDED_HID_DEVICE_PATH)); UIDStr = HIDStr + AsciiStrLen (HIDStr) + 1; CIDStr = UIDStr + AsciiStrLen (UIDStr) + 1; if (DisplayOnly) { if ((EISA_ID_TO_NUM (AcpiEx->HID) == 0x0A03) || - (EISA_ID_TO_NUM (AcpiEx->CID) == 0x0A03 && EISA_ID_TO_NUM (AcpiEx->HID) != 0x0A08)) { + ((EISA_ID_TO_NUM (AcpiEx->CID) == 0x0A03) && (EISA_ID_TO_NUM (AcpiEx->HID) != 0x0A08))) + { if (AcpiEx->UID == 0) { UefiDevicePathLibCatPrint (Str, L"PciRoot(%a)", UIDStr); } else { UefiDevicePathLibCatPrint (Str, L"PciRoot(0x%x)", AcpiEx->UID); } + return; } - if (EISA_ID_TO_NUM (AcpiEx->HID) == 0x0A08 || EISA_ID_TO_NUM (AcpiEx->CID) == 0x0A08) { + if ((EISA_ID_TO_NUM (AcpiEx->HID) == 0x0A08) || (EISA_ID_TO_NUM (AcpiEx->CID) == 0x0A08)) { if (AcpiEx->UID == 0) { UefiDevicePathLibCatPrint (Str, L"PcieRoot(%a)", UIDStr); } else { UefiDevicePathLibCatPrint (Str, L"PcieRoot(0x%x)", AcpiEx->UID); } + return; } } @@ -480,7 +485,7 @@ DevPathToTextAcpiEx ( L"AcpiExp(%s,0,%a)", HIDText, UIDStr - ); + ); } else { UefiDevicePathLibCatPrint ( Str, @@ -488,7 +493,7 @@ DevPathToTextAcpiEx ( HIDText, CIDText, UIDStr - ); + ); } } else { if (DisplayOnly) { @@ -548,19 +553,20 @@ DevPathToTextAcpiAdr ( IN BOOLEAN AllowShortcuts ) { - ACPI_ADR_DEVICE_PATH *AcpiAdr; - UINT16 Index; - UINT16 Length; - UINT16 AdditionalAdrCount; + ACPI_ADR_DEVICE_PATH *AcpiAdr; + UINT16 Index; + UINT16 Length; + UINT16 AdditionalAdrCount; AcpiAdr = DevPath; - Length = (UINT16) DevicePathNodeLength ((EFI_DEVICE_PATH_PROTOCOL *) AcpiAdr); - AdditionalAdrCount = (UINT16) ((Length - 8) / 4); + Length = (UINT16)DevicePathNodeLength ((EFI_DEVICE_PATH_PROTOCOL *)AcpiAdr); + AdditionalAdrCount = (UINT16)((Length - 8) / 4); UefiDevicePathLibCatPrint (Str, L"AcpiAdr(0x%x", AcpiAdr->ADR); for (Index = 0; Index < AdditionalAdrCount; Index++) { - UefiDevicePathLibCatPrint (Str, L",0x%x", *(UINT32 *) ((UINT8 *) AcpiAdr + 8 + Index * 4)); + UefiDevicePathLibCatPrint (Str, L",0x%x", *(UINT32 *)((UINT8 *)AcpiAdr + 8 + Index * 4)); } + UefiDevicePathLibCatPrint (Str, L")"); } @@ -585,7 +591,7 @@ DevPathToTextAtapi ( IN BOOLEAN AllowShortcuts ) { - ATAPI_DEVICE_PATH *Atapi; + ATAPI_DEVICE_PATH *Atapi; Atapi = DevPath; @@ -685,10 +691,12 @@ DevPathToTextFibreEx ( for (Index = 0; Index < sizeof (FibreEx->WWN) / sizeof (FibreEx->WWN[0]); Index++) { UefiDevicePathLibCatPrint (Str, L"%02x", FibreEx->WWN[Index]); } + UefiDevicePathLibCatPrint (Str, L",0x"); for (Index = 0; Index < sizeof (FibreEx->Lun) / sizeof (FibreEx->Lun[0]); Index++) { UefiDevicePathLibCatPrint (Str, L"%02x", FibreEx->Lun[Index]); } + UefiDevicePathLibCatPrint (Str, L")"); } @@ -722,10 +730,12 @@ DevPathToTextSasEx ( for (Index = 0; Index < sizeof (SasEx->SasAddress) / sizeof (SasEx->SasAddress[0]); Index++) { UefiDevicePathLibCatPrint (Str, L"%02x", SasEx->SasAddress[Index]); } + UefiDevicePathLibCatPrint (Str, L",0x"); for (Index = 0; Index < sizeof (SasEx->Lun) / sizeof (SasEx->Lun[0]); Index++) { UefiDevicePathLibCatPrint (Str, L"%02x", SasEx->Lun[Index]); } + UefiDevicePathLibCatPrint (Str, L",0x%x,", SasEx->RelativeTargetPort); if (((SasEx->DeviceTopology & 0x0f) == 0) && ((SasEx->DeviceTopology & BIT7) == 0)) { @@ -751,8 +761,7 @@ DevPathToTextSasEx ( } UefiDevicePathLibCatPrint (Str, L")"); - return ; - + return; } /** @@ -776,17 +785,23 @@ DevPathToTextNVMe ( IN BOOLEAN AllowShortcuts ) { - NVME_NAMESPACE_DEVICE_PATH *Nvme; - UINT8 *Uuid; + NVME_NAMESPACE_DEVICE_PATH *Nvme; + UINT8 *Uuid; Nvme = DevPath; - Uuid = (UINT8 *) &Nvme->NamespaceUuid; + Uuid = (UINT8 *)&Nvme->NamespaceUuid; UefiDevicePathLibCatPrint ( Str, L"NVMe(0x%x,%02x-%02x-%02x-%02x-%02x-%02x-%02x-%02x)", Nvme->NamespaceId, - Uuid[7], Uuid[6], Uuid[5], Uuid[4], - Uuid[3], Uuid[2], Uuid[1], Uuid[0] + Uuid[7], + Uuid[6], + Uuid[5], + Uuid[4], + Uuid[3], + Uuid[2], + Uuid[1], + Uuid[0] ); } @@ -838,7 +853,7 @@ DevPathToTextSd ( IN BOOLEAN AllowShortcuts ) { - SD_DEVICE_PATH *Sd; + SD_DEVICE_PATH *Sd; Sd = DevPath; UefiDevicePathLibCatPrint ( @@ -869,7 +884,7 @@ DevPathToTextEmmc ( IN BOOLEAN AllowShortcuts ) { - EMMC_DEVICE_PATH *Emmc; + EMMC_DEVICE_PATH *Emmc; Emmc = DevPath; UefiDevicePathLibCatPrint ( @@ -900,7 +915,7 @@ DevPathToText1394 ( IN BOOLEAN AllowShortcuts ) { - F1394_DEVICE_PATH *F1394DevPath; + F1394_DEVICE_PATH *F1394DevPath; F1394DevPath = DevPath; // @@ -930,7 +945,7 @@ DevPathToTextUsb ( IN BOOLEAN AllowShortcuts ) { - USB_DEVICE_PATH *Usb; + USB_DEVICE_PATH *Usb; Usb = DevPath; UefiDevicePathLibCatPrint (Str, L"USB(0x%x,0x%x)", Usb->ParentPortNumber, Usb->InterfaceNumber); @@ -964,15 +979,15 @@ DevPathToTextUsbWWID ( UsbWWId = DevPath; - SerialNumberStr = (CHAR16 *) ((UINT8 *) UsbWWId + sizeof (USB_WWID_DEVICE_PATH)); - Length = (UINT16) ((DevicePathNodeLength ((EFI_DEVICE_PATH_PROTOCOL *) UsbWWId) - sizeof (USB_WWID_DEVICE_PATH)) / sizeof (CHAR16)); - if (Length >= 1 && SerialNumberStr [Length - 1] != 0) { + SerialNumberStr = (CHAR16 *)((UINT8 *)UsbWWId + sizeof (USB_WWID_DEVICE_PATH)); + Length = (UINT16)((DevicePathNodeLength ((EFI_DEVICE_PATH_PROTOCOL *)UsbWWId) - sizeof (USB_WWID_DEVICE_PATH)) / sizeof (CHAR16)); + if ((Length >= 1) && (SerialNumberStr[Length - 1] != 0)) { // // In case no NULL terminator in SerialNumber, create a new one with NULL terminator // NewStr = AllocateCopyPool ((Length + 1) * sizeof (CHAR16), SerialNumberStr); ASSERT (NewStr != NULL); - NewStr [Length] = 0; + NewStr[Length] = 0; SerialNumberStr = NewStr; } @@ -1007,7 +1022,7 @@ DevPathToTextLogicalUnit ( IN BOOLEAN AllowShortcuts ) { - DEVICE_LOGICAL_UNIT_DEVICE_PATH *LogicalUnit; + DEVICE_LOGICAL_UNIT_DEVICE_PATH *LogicalUnit; LogicalUnit = DevPath; UefiDevicePathLibCatPrint (Str, L"Unit(0x%x)", LogicalUnit->Lun); @@ -1034,65 +1049,64 @@ DevPathToTextUsbClass ( IN BOOLEAN AllowShortcuts ) { - USB_CLASS_DEVICE_PATH *UsbClass; - BOOLEAN IsKnownSubClass; - + USB_CLASS_DEVICE_PATH *UsbClass; + BOOLEAN IsKnownSubClass; UsbClass = DevPath; IsKnownSubClass = TRUE; switch (UsbClass->DeviceClass) { - case USB_CLASS_AUDIO: - UefiDevicePathLibCatPrint (Str, L"UsbAudio"); - break; + case USB_CLASS_AUDIO: + UefiDevicePathLibCatPrint (Str, L"UsbAudio"); + break; - case USB_CLASS_CDCCONTROL: - UefiDevicePathLibCatPrint (Str, L"UsbCDCControl"); - break; + case USB_CLASS_CDCCONTROL: + UefiDevicePathLibCatPrint (Str, L"UsbCDCControl"); + break; - case USB_CLASS_HID: - UefiDevicePathLibCatPrint (Str, L"UsbHID"); - break; + case USB_CLASS_HID: + UefiDevicePathLibCatPrint (Str, L"UsbHID"); + break; - case USB_CLASS_IMAGE: - UefiDevicePathLibCatPrint (Str, L"UsbImage"); - break; + case USB_CLASS_IMAGE: + UefiDevicePathLibCatPrint (Str, L"UsbImage"); + break; - case USB_CLASS_PRINTER: - UefiDevicePathLibCatPrint (Str, L"UsbPrinter"); - break; + case USB_CLASS_PRINTER: + UefiDevicePathLibCatPrint (Str, L"UsbPrinter"); + break; - case USB_CLASS_MASS_STORAGE: - UefiDevicePathLibCatPrint (Str, L"UsbMassStorage"); - break; + case USB_CLASS_MASS_STORAGE: + UefiDevicePathLibCatPrint (Str, L"UsbMassStorage"); + break; - case USB_CLASS_HUB: - UefiDevicePathLibCatPrint (Str, L"UsbHub"); - break; + case USB_CLASS_HUB: + UefiDevicePathLibCatPrint (Str, L"UsbHub"); + break; - case USB_CLASS_CDCDATA: - UefiDevicePathLibCatPrint (Str, L"UsbCDCData"); - break; + case USB_CLASS_CDCDATA: + UefiDevicePathLibCatPrint (Str, L"UsbCDCData"); + break; - case USB_CLASS_SMART_CARD: - UefiDevicePathLibCatPrint (Str, L"UsbSmartCard"); - break; + case USB_CLASS_SMART_CARD: + UefiDevicePathLibCatPrint (Str, L"UsbSmartCard"); + break; - case USB_CLASS_VIDEO: - UefiDevicePathLibCatPrint (Str, L"UsbVideo"); - break; + case USB_CLASS_VIDEO: + UefiDevicePathLibCatPrint (Str, L"UsbVideo"); + break; - case USB_CLASS_DIAGNOSTIC: - UefiDevicePathLibCatPrint (Str, L"UsbDiagnostic"); - break; + case USB_CLASS_DIAGNOSTIC: + UefiDevicePathLibCatPrint (Str, L"UsbDiagnostic"); + break; - case USB_CLASS_WIRELESS: - UefiDevicePathLibCatPrint (Str, L"UsbWireless"); - break; + case USB_CLASS_WIRELESS: + UefiDevicePathLibCatPrint (Str, L"UsbWireless"); + break; - default: - IsKnownSubClass = FALSE; - break; + default: + IsKnownSubClass = FALSE; + break; } if (IsKnownSubClass) { @@ -1170,7 +1184,7 @@ DevPathToTextSata ( IN BOOLEAN AllowShortcuts ) { - SATA_DEVICE_PATH *Sata; + SATA_DEVICE_PATH *Sata; Sata = DevPath; UefiDevicePathLibCatPrint ( @@ -1203,7 +1217,7 @@ DevPathToTextI2O ( IN BOOLEAN AllowShortcuts ) { - I2O_DEVICE_PATH *I2ODevPath; + I2O_DEVICE_PATH *I2ODevPath; I2ODevPath = DevPath; UefiDevicePathLibCatPrint (Str, L"I2O(0x%x)", I2ODevPath->Tid); @@ -1237,7 +1251,7 @@ DevPathToTextMacAddr ( MacDevPath = DevPath; HwAddressSize = sizeof (EFI_MAC_ADDRESS); - if (MacDevPath->IfType == 0x01 || MacDevPath->IfType == 0x00) { + if ((MacDevPath->IfType == 0x01) || (MacDevPath->IfType == 0x00)) { HwAddressSize = 6; } @@ -1280,8 +1294,8 @@ CatNetworkProtocol ( **/ VOID CatIPv4Address ( - IN OUT POOL_PRINT *Str, - IN EFI_IPv4_ADDRESS *Address + IN OUT POOL_PRINT *Str, + IN EFI_IPv4_ADDRESS *Address ) { UefiDevicePathLibCatPrint (Str, L"%d.%d.%d.%d", Address->Addr[0], Address->Addr[1], Address->Addr[2], Address->Addr[3]); @@ -1295,21 +1309,30 @@ CatIPv4Address ( **/ VOID CatIPv6Address ( - IN OUT POOL_PRINT *Str, - IN EFI_IPv6_ADDRESS *Address + IN OUT POOL_PRINT *Str, + IN EFI_IPv6_ADDRESS *Address ) { UefiDevicePathLibCatPrint ( - Str, L"%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x", - Address->Addr[0], Address->Addr[1], - Address->Addr[2], Address->Addr[3], - Address->Addr[4], Address->Addr[5], - Address->Addr[6], Address->Addr[7], - Address->Addr[8], Address->Addr[9], - Address->Addr[10], Address->Addr[11], - Address->Addr[12], Address->Addr[13], - Address->Addr[14], Address->Addr[15] - ); + Str, + L"%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x", + Address->Addr[0], + Address->Addr[1], + Address->Addr[2], + Address->Addr[3], + Address->Addr[4], + Address->Addr[5], + Address->Addr[6], + Address->Addr[7], + Address->Addr[8], + Address->Addr[9], + Address->Addr[10], + Address->Addr[11], + Address->Addr[12], + Address->Addr[13], + Address->Addr[14], + Address->Addr[15] + ); } /** @@ -1341,7 +1364,7 @@ DevPathToTextIPv4 ( if (DisplayOnly) { UefiDevicePathLibCatPrint (Str, L")"); - return ; + return; } UefiDevicePathLibCatPrint (Str, L","); @@ -1355,6 +1378,7 @@ DevPathToTextIPv4 ( UefiDevicePathLibCatPrint (Str, L","); CatIPv4Address (Str, &IPDevPath->SubnetMask); } + UefiDevicePathLibCatPrint (Str, L")"); } @@ -1386,7 +1410,7 @@ DevPathToTextIPv6 ( CatIPv6Address (Str, &IPDevPath->RemoteIpAddress); if (DisplayOnly) { UefiDevicePathLibCatPrint (Str, L")"); - return ; + return; } UefiDevicePathLibCatPrint (Str, L","); @@ -1410,6 +1434,7 @@ DevPathToTextIPv6 ( UefiDevicePathLibCatPrint (Str, L",0x%x,", IPDevPath->PrefixLength); CatIPv6Address (Str, &IPDevPath->GatewayIpAddress); } + UefiDevicePathLibCatPrint (Str, L")"); } @@ -1474,33 +1499,33 @@ DevPathToTextUart ( Uart = DevPath; switch (Uart->Parity) { - case 0: - Parity = 'D'; - break; + case 0: + Parity = 'D'; + break; - case 1: - Parity = 'N'; - break; + case 1: + Parity = 'N'; + break; - case 2: - Parity = 'E'; - break; + case 2: + Parity = 'E'; + break; - case 3: - Parity = 'O'; - break; + case 3: + Parity = 'O'; + break; - case 4: - Parity = 'M'; - break; + case 4: + Parity = 'M'; + break; - case 5: - Parity = 'S'; - break; + case 5: + Parity = 'S'; + break; - default: - Parity = 'x'; - break; + default: + Parity = 'x'; + break; } if (Uart->BaudRate == 0) { @@ -1518,25 +1543,25 @@ DevPathToTextUart ( UefiDevicePathLibCatPrint (Str, L"%c,", Parity); switch (Uart->StopBits) { - case 0: - UefiDevicePathLibCatPrint (Str, L"D)"); - break; + case 0: + UefiDevicePathLibCatPrint (Str, L"D)"); + break; - case 1: - UefiDevicePathLibCatPrint (Str, L"1)"); - break; + case 1: + UefiDevicePathLibCatPrint (Str, L"1)"); + break; - case 2: - UefiDevicePathLibCatPrint (Str, L"1.5)"); - break; + case 2: + UefiDevicePathLibCatPrint (Str, L"1.5)"); + break; - case 3: - UefiDevicePathLibCatPrint (Str, L"2)"); - break; + case 3: + UefiDevicePathLibCatPrint (Str, L"2)"); + break; - default: - UefiDevicePathLibCatPrint (Str, L"x)"); - break; + default: + UefiDevicePathLibCatPrint (Str, L"x)"); + break; } } @@ -1561,9 +1586,9 @@ DevPathToTextiSCSI ( IN BOOLEAN AllowShortcuts ) { - ISCSI_DEVICE_PATH_WITH_NAME *ISCSIDevPath; - UINT16 Options; - UINTN Index; + ISCSI_DEVICE_PATH_WITH_NAME *ISCSIDevPath; + UINT16 Options; + UINTN Index; ISCSIDevPath = DevPath; UefiDevicePathLibCatPrint ( @@ -1575,6 +1600,7 @@ DevPathToTextiSCSI ( for (Index = 0; Index < sizeof (ISCSIDevPath->Lun) / sizeof (UINT8); Index++) { UefiDevicePathLibCatPrint (Str, L"%02x", ((UINT8 *)&ISCSIDevPath->Lun)[Index]); } + Options = ISCSIDevPath->LoginOption; UefiDevicePathLibCatPrint (Str, L",%s,", (((Options >> 1) & 0x0001) != 0) ? L"CRC32C" : L"None"); UefiDevicePathLibCatPrint (Str, L"%s,", (((Options >> 3) & 0x0001) != 0) ? L"CRC32C" : L"None"); @@ -1584,7 +1610,6 @@ DevPathToTextiSCSI ( UefiDevicePathLibCatPrint (Str, L"%s,", L"CHAP_UNI"); } else { UefiDevicePathLibCatPrint (Str, L"%s,", L"CHAP_BI"); - } UefiDevicePathLibCatPrint (Str, L"%s)", (ISCSIDevPath->NetworkProtocol == 0) ? L"TCP" : L"reserved"); @@ -1674,8 +1699,8 @@ DevPathToTextWiFi ( IN BOOLEAN AllowShortcuts ) { - WIFI_DEVICE_PATH *WiFi; - UINT8 SSId[33]; + WIFI_DEVICE_PATH *WiFi; + UINT8 SSId[33]; WiFi = DevPath; @@ -1747,8 +1772,8 @@ DevPathToTextDns ( UINT32 DnsServerIpCount; UINT32 DnsServerIpIndex; - DnsDevPath = DevPath; - DnsServerIpCount = (UINT32) (DevicePathNodeLength(DnsDevPath) - sizeof (EFI_DEVICE_PATH_PROTOCOL) - sizeof (DnsDevPath->IsIPv6)) / sizeof (EFI_IP_ADDRESS); + DnsDevPath = DevPath; + DnsServerIpCount = (UINT32)(DevicePathNodeLength (DnsDevPath) - sizeof (EFI_DEVICE_PATH_PROTOCOL) - sizeof (DnsDevPath->IsIPv6)) / sizeof (EFI_IP_ADDRESS); UefiDevicePathLibCatPrint (Str, L"Dns("); @@ -1788,16 +1813,16 @@ DevPathToTextUri ( IN BOOLEAN AllowShortcuts ) { - URI_DEVICE_PATH *Uri; - UINTN UriLength; - CHAR8 *UriStr; + URI_DEVICE_PATH *Uri; + UINTN UriLength; + CHAR8 *UriStr; // // Uri in the device path may not be null terminated. // Uri = DevPath; UriLength = DevicePathNodeLength (Uri) - sizeof (URI_DEVICE_PATH); - UriStr = AllocatePool (UriLength + 1); + UriStr = AllocatePool (UriLength + 1); ASSERT (UriStr != NULL); CopyMem (UriStr, Uri->Uri, UriLength); @@ -1827,38 +1852,38 @@ DevPathToTextHardDrive ( IN BOOLEAN AllowShortcuts ) { - HARDDRIVE_DEVICE_PATH *Hd; + HARDDRIVE_DEVICE_PATH *Hd; Hd = DevPath; switch (Hd->SignatureType) { - case SIGNATURE_TYPE_MBR: - UefiDevicePathLibCatPrint ( - Str, - L"HD(%d,%s,0x%08x,", - Hd->PartitionNumber, - L"MBR", - *((UINT32 *) (&(Hd->Signature[0]))) - ); - break; + case SIGNATURE_TYPE_MBR: + UefiDevicePathLibCatPrint ( + Str, + L"HD(%d,%s,0x%08x,", + Hd->PartitionNumber, + L"MBR", + *((UINT32 *)(&(Hd->Signature[0]))) + ); + break; - case SIGNATURE_TYPE_GUID: - UefiDevicePathLibCatPrint ( - Str, - L"HD(%d,%s,%g,", - Hd->PartitionNumber, - L"GPT", - (EFI_GUID *) &(Hd->Signature[0]) - ); - break; + case SIGNATURE_TYPE_GUID: + UefiDevicePathLibCatPrint ( + Str, + L"HD(%d,%s,%g,", + Hd->PartitionNumber, + L"GPT", + (EFI_GUID *)&(Hd->Signature[0]) + ); + break; - default: - UefiDevicePathLibCatPrint ( - Str, - L"HD(%d,%d,0,", - Hd->PartitionNumber, - Hd->SignatureType - ); - break; + default: + UefiDevicePathLibCatPrint ( + Str, + L"HD(%d,%d,0,", + Hd->PartitionNumber, + Hd->SignatureType + ); + break; } UefiDevicePathLibCatPrint (Str, L"0x%lx,0x%lx)", Hd->PartitionStart, Hd->PartitionSize); @@ -1885,12 +1910,12 @@ DevPathToTextCDROM ( IN BOOLEAN AllowShortcuts ) { - CDROM_DEVICE_PATH *Cd; + CDROM_DEVICE_PATH *Cd; Cd = DevPath; if (DisplayOnly) { UefiDevicePathLibCatPrint (Str, L"CDROM(0x%x)", Cd->BootEntry); - return ; + return; } UefiDevicePathLibCatPrint (Str, L"CDROM(0x%x,0x%lx,0x%lx)", Cd->BootEntry, Cd->PartitionStart, Cd->PartitionSize); @@ -2019,13 +2044,13 @@ DevPathToTextFvFile ( **/ VOID DevPathRelativeOffsetRange ( - IN OUT POOL_PRINT *Str, - IN VOID *DevPath, - IN BOOLEAN DisplayOnly, - IN BOOLEAN AllowShortcuts + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts ) { - MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH *Offset; + MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH *Offset; Offset = DevPath; UefiDevicePathLibCatPrint ( @@ -2051,13 +2076,13 @@ DevPathRelativeOffsetRange ( **/ VOID DevPathToTextRamDisk ( - IN OUT POOL_PRINT *Str, - IN VOID *DevPath, - IN BOOLEAN DisplayOnly, - IN BOOLEAN AllowShortcuts + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts ) { - MEDIA_RAM_DISK_DEVICE_PATH *RamDisk; + MEDIA_RAM_DISK_DEVICE_PATH *RamDisk; RamDisk = DevPath; @@ -2126,38 +2151,38 @@ DevPathToTextBBS ( IN BOOLEAN AllowShortcuts ) { - BBS_BBS_DEVICE_PATH *Bbs; - CHAR16 *Type; + BBS_BBS_DEVICE_PATH *Bbs; + CHAR16 *Type; Bbs = DevPath; switch (Bbs->DeviceType) { - case BBS_TYPE_FLOPPY: - Type = L"Floppy"; - break; + case BBS_TYPE_FLOPPY: + Type = L"Floppy"; + break; - case BBS_TYPE_HARDDRIVE: - Type = L"HD"; - break; + case BBS_TYPE_HARDDRIVE: + Type = L"HD"; + break; - case BBS_TYPE_CDROM: - Type = L"CDROM"; - break; + case BBS_TYPE_CDROM: + Type = L"CDROM"; + break; - case BBS_TYPE_PCMCIA: - Type = L"PCMCIA"; - break; + case BBS_TYPE_PCMCIA: + Type = L"PCMCIA"; + break; - case BBS_TYPE_USB: - Type = L"USB"; - break; + case BBS_TYPE_USB: + Type = L"USB"; + break; - case BBS_TYPE_EMBEDDED_NETWORK: - Type = L"Network"; - break; + case BBS_TYPE_EMBEDDED_NETWORK: + Type = L"Network"; + break; - default: - Type = NULL; - break; + default: + Type = NULL; + break; } if (Type != NULL) { @@ -2168,7 +2193,7 @@ DevPathToTextBBS ( if (DisplayOnly) { UefiDevicePathLibCatPrint (Str, L")"); - return ; + return; } UefiDevicePathLibCatPrint (Str, L",0x%x)", Bbs->StatusFlag); @@ -2198,13 +2223,13 @@ DevPathToTextEndInstance ( UefiDevicePathLibCatPrint (Str, L","); } -GLOBAL_REMOVE_IF_UNREFERENCED const DEVICE_PATH_TO_TEXT_GENERIC_TABLE mUefiDevicePathLibToTextTableGeneric[] = { - {HARDWARE_DEVICE_PATH, L"HardwarePath" }, - {ACPI_DEVICE_PATH, L"AcpiPath" }, - {MESSAGING_DEVICE_PATH, L"Msg" }, - {MEDIA_DEVICE_PATH, L"MediaPath" }, - {BBS_DEVICE_PATH, L"BbsPath" }, - {0, NULL} +GLOBAL_REMOVE_IF_UNREFERENCED const DEVICE_PATH_TO_TEXT_GENERIC_TABLE mUefiDevicePathLibToTextTableGeneric[] = { + { HARDWARE_DEVICE_PATH, L"HardwarePath" }, + { ACPI_DEVICE_PATH, L"AcpiPath" }, + { MESSAGING_DEVICE_PATH, L"Msg" }, + { MEDIA_DEVICE_PATH, L"MediaPath" }, + { BBS_DEVICE_PATH, L"BbsPath" }, + { 0, NULL } }; /** @@ -2228,8 +2253,8 @@ DevPathToTextNodeGeneric ( IN BOOLEAN AllowShortcuts ) { - EFI_DEVICE_PATH_PROTOCOL *Node; - UINTN Index; + EFI_DEVICE_PATH_PROTOCOL *Node; + UINTN Index; Node = DevPath; @@ -2254,65 +2279,65 @@ DevPathToTextNodeGeneric ( Index = sizeof (EFI_DEVICE_PATH_PROTOCOL); if (Index < DevicePathNodeLength (Node)) { UefiDevicePathLibCatPrint (Str, L","); - for (; Index < DevicePathNodeLength (Node); Index++) { - UefiDevicePathLibCatPrint (Str, L"%02x", ((UINT8 *) Node)[Index]); + for ( ; Index < DevicePathNodeLength (Node); Index++) { + UefiDevicePathLibCatPrint (Str, L"%02x", ((UINT8 *)Node)[Index]); } } UefiDevicePathLibCatPrint (Str, L")"); } -GLOBAL_REMOVE_IF_UNREFERENCED const DEVICE_PATH_TO_TEXT_TABLE mUefiDevicePathLibToTextTable[] = { - {HARDWARE_DEVICE_PATH, HW_PCI_DP, DevPathToTextPci }, - {HARDWARE_DEVICE_PATH, HW_PCCARD_DP, DevPathToTextPccard }, - {HARDWARE_DEVICE_PATH, HW_MEMMAP_DP, DevPathToTextMemMap }, - {HARDWARE_DEVICE_PATH, HW_VENDOR_DP, DevPathToTextVendor }, - {HARDWARE_DEVICE_PATH, HW_CONTROLLER_DP, DevPathToTextController }, - {HARDWARE_DEVICE_PATH, HW_BMC_DP, DevPathToTextBmc }, - {ACPI_DEVICE_PATH, ACPI_DP, DevPathToTextAcpi }, - {ACPI_DEVICE_PATH, ACPI_EXTENDED_DP, DevPathToTextAcpiEx }, - {ACPI_DEVICE_PATH, ACPI_ADR_DP, DevPathToTextAcpiAdr }, - {MESSAGING_DEVICE_PATH, MSG_ATAPI_DP, DevPathToTextAtapi }, - {MESSAGING_DEVICE_PATH, MSG_SCSI_DP, DevPathToTextScsi }, - {MESSAGING_DEVICE_PATH, MSG_FIBRECHANNEL_DP, DevPathToTextFibre }, - {MESSAGING_DEVICE_PATH, MSG_FIBRECHANNELEX_DP, DevPathToTextFibreEx }, - {MESSAGING_DEVICE_PATH, MSG_SASEX_DP, DevPathToTextSasEx }, - {MESSAGING_DEVICE_PATH, MSG_NVME_NAMESPACE_DP, DevPathToTextNVMe }, - {MESSAGING_DEVICE_PATH, MSG_UFS_DP, DevPathToTextUfs }, - {MESSAGING_DEVICE_PATH, MSG_SD_DP, DevPathToTextSd }, - {MESSAGING_DEVICE_PATH, MSG_EMMC_DP, DevPathToTextEmmc }, - {MESSAGING_DEVICE_PATH, MSG_1394_DP, DevPathToText1394 }, - {MESSAGING_DEVICE_PATH, MSG_USB_DP, DevPathToTextUsb }, - {MESSAGING_DEVICE_PATH, MSG_USB_WWID_DP, DevPathToTextUsbWWID }, - {MESSAGING_DEVICE_PATH, MSG_DEVICE_LOGICAL_UNIT_DP, DevPathToTextLogicalUnit }, - {MESSAGING_DEVICE_PATH, MSG_USB_CLASS_DP, DevPathToTextUsbClass }, - {MESSAGING_DEVICE_PATH, MSG_SATA_DP, DevPathToTextSata }, - {MESSAGING_DEVICE_PATH, MSG_I2O_DP, DevPathToTextI2O }, - {MESSAGING_DEVICE_PATH, MSG_MAC_ADDR_DP, DevPathToTextMacAddr }, - {MESSAGING_DEVICE_PATH, MSG_IPv4_DP, DevPathToTextIPv4 }, - {MESSAGING_DEVICE_PATH, MSG_IPv6_DP, DevPathToTextIPv6 }, - {MESSAGING_DEVICE_PATH, MSG_INFINIBAND_DP, DevPathToTextInfiniBand }, - {MESSAGING_DEVICE_PATH, MSG_UART_DP, DevPathToTextUart }, - {MESSAGING_DEVICE_PATH, MSG_VENDOR_DP, DevPathToTextVendor }, - {MESSAGING_DEVICE_PATH, MSG_ISCSI_DP, DevPathToTextiSCSI }, - {MESSAGING_DEVICE_PATH, MSG_VLAN_DP, DevPathToTextVlan }, - {MESSAGING_DEVICE_PATH, MSG_DNS_DP, DevPathToTextDns }, - {MESSAGING_DEVICE_PATH, MSG_URI_DP, DevPathToTextUri }, - {MESSAGING_DEVICE_PATH, MSG_BLUETOOTH_DP, DevPathToTextBluetooth }, - {MESSAGING_DEVICE_PATH, MSG_WIFI_DP, DevPathToTextWiFi }, - {MESSAGING_DEVICE_PATH, MSG_BLUETOOTH_LE_DP, DevPathToTextBluetoothLE }, - {MEDIA_DEVICE_PATH, MEDIA_HARDDRIVE_DP, DevPathToTextHardDrive }, - {MEDIA_DEVICE_PATH, MEDIA_CDROM_DP, DevPathToTextCDROM }, - {MEDIA_DEVICE_PATH, MEDIA_VENDOR_DP, DevPathToTextVendor }, - {MEDIA_DEVICE_PATH, MEDIA_PROTOCOL_DP, DevPathToTextMediaProtocol }, - {MEDIA_DEVICE_PATH, MEDIA_FILEPATH_DP, DevPathToTextFilePath }, - {MEDIA_DEVICE_PATH, MEDIA_PIWG_FW_VOL_DP, DevPathToTextFv }, - {MEDIA_DEVICE_PATH, MEDIA_PIWG_FW_FILE_DP, DevPathToTextFvFile }, - {MEDIA_DEVICE_PATH, MEDIA_RELATIVE_OFFSET_RANGE_DP, DevPathRelativeOffsetRange }, - {MEDIA_DEVICE_PATH, MEDIA_RAM_DISK_DP, DevPathToTextRamDisk }, - {BBS_DEVICE_PATH, BBS_BBS_DP, DevPathToTextBBS }, - {END_DEVICE_PATH_TYPE, END_INSTANCE_DEVICE_PATH_SUBTYPE, DevPathToTextEndInstance }, - {0, 0, NULL} +GLOBAL_REMOVE_IF_UNREFERENCED const DEVICE_PATH_TO_TEXT_TABLE mUefiDevicePathLibToTextTable[] = { + { HARDWARE_DEVICE_PATH, HW_PCI_DP, DevPathToTextPci }, + { HARDWARE_DEVICE_PATH, HW_PCCARD_DP, DevPathToTextPccard }, + { HARDWARE_DEVICE_PATH, HW_MEMMAP_DP, DevPathToTextMemMap }, + { HARDWARE_DEVICE_PATH, HW_VENDOR_DP, DevPathToTextVendor }, + { HARDWARE_DEVICE_PATH, HW_CONTROLLER_DP, DevPathToTextController }, + { HARDWARE_DEVICE_PATH, HW_BMC_DP, DevPathToTextBmc }, + { ACPI_DEVICE_PATH, ACPI_DP, DevPathToTextAcpi }, + { ACPI_DEVICE_PATH, ACPI_EXTENDED_DP, DevPathToTextAcpiEx }, + { ACPI_DEVICE_PATH, ACPI_ADR_DP, DevPathToTextAcpiAdr }, + { MESSAGING_DEVICE_PATH, MSG_ATAPI_DP, DevPathToTextAtapi }, + { MESSAGING_DEVICE_PATH, MSG_SCSI_DP, DevPathToTextScsi }, + { MESSAGING_DEVICE_PATH, MSG_FIBRECHANNEL_DP, DevPathToTextFibre }, + { MESSAGING_DEVICE_PATH, MSG_FIBRECHANNELEX_DP, DevPathToTextFibreEx }, + { MESSAGING_DEVICE_PATH, MSG_SASEX_DP, DevPathToTextSasEx }, + { MESSAGING_DEVICE_PATH, MSG_NVME_NAMESPACE_DP, DevPathToTextNVMe }, + { MESSAGING_DEVICE_PATH, MSG_UFS_DP, DevPathToTextUfs }, + { MESSAGING_DEVICE_PATH, MSG_SD_DP, DevPathToTextSd }, + { MESSAGING_DEVICE_PATH, MSG_EMMC_DP, DevPathToTextEmmc }, + { MESSAGING_DEVICE_PATH, MSG_1394_DP, DevPathToText1394 }, + { MESSAGING_DEVICE_PATH, MSG_USB_DP, DevPathToTextUsb }, + { MESSAGING_DEVICE_PATH, MSG_USB_WWID_DP, DevPathToTextUsbWWID }, + { MESSAGING_DEVICE_PATH, MSG_DEVICE_LOGICAL_UNIT_DP, DevPathToTextLogicalUnit }, + { MESSAGING_DEVICE_PATH, MSG_USB_CLASS_DP, DevPathToTextUsbClass }, + { MESSAGING_DEVICE_PATH, MSG_SATA_DP, DevPathToTextSata }, + { MESSAGING_DEVICE_PATH, MSG_I2O_DP, DevPathToTextI2O }, + { MESSAGING_DEVICE_PATH, MSG_MAC_ADDR_DP, DevPathToTextMacAddr }, + { MESSAGING_DEVICE_PATH, MSG_IPv4_DP, DevPathToTextIPv4 }, + { MESSAGING_DEVICE_PATH, MSG_IPv6_DP, DevPathToTextIPv6 }, + { MESSAGING_DEVICE_PATH, MSG_INFINIBAND_DP, DevPathToTextInfiniBand }, + { MESSAGING_DEVICE_PATH, MSG_UART_DP, DevPathToTextUart }, + { MESSAGING_DEVICE_PATH, MSG_VENDOR_DP, DevPathToTextVendor }, + { MESSAGING_DEVICE_PATH, MSG_ISCSI_DP, DevPathToTextiSCSI }, + { MESSAGING_DEVICE_PATH, MSG_VLAN_DP, DevPathToTextVlan }, + { MESSAGING_DEVICE_PATH, MSG_DNS_DP, DevPathToTextDns }, + { MESSAGING_DEVICE_PATH, MSG_URI_DP, DevPathToTextUri }, + { MESSAGING_DEVICE_PATH, MSG_BLUETOOTH_DP, DevPathToTextBluetooth }, + { MESSAGING_DEVICE_PATH, MSG_WIFI_DP, DevPathToTextWiFi }, + { MESSAGING_DEVICE_PATH, MSG_BLUETOOTH_LE_DP, DevPathToTextBluetoothLE }, + { MEDIA_DEVICE_PATH, MEDIA_HARDDRIVE_DP, DevPathToTextHardDrive }, + { MEDIA_DEVICE_PATH, MEDIA_CDROM_DP, DevPathToTextCDROM }, + { MEDIA_DEVICE_PATH, MEDIA_VENDOR_DP, DevPathToTextVendor }, + { MEDIA_DEVICE_PATH, MEDIA_PROTOCOL_DP, DevPathToTextMediaProtocol }, + { MEDIA_DEVICE_PATH, MEDIA_FILEPATH_DP, DevPathToTextFilePath }, + { MEDIA_DEVICE_PATH, MEDIA_PIWG_FW_VOL_DP, DevPathToTextFv }, + { MEDIA_DEVICE_PATH, MEDIA_PIWG_FW_FILE_DP, DevPathToTextFvFile }, + { MEDIA_DEVICE_PATH, MEDIA_RELATIVE_OFFSET_RANGE_DP, DevPathRelativeOffsetRange }, + { MEDIA_DEVICE_PATH, MEDIA_RAM_DISK_DP, DevPathToTextRamDisk }, + { BBS_DEVICE_PATH, BBS_BBS_DP, DevPathToTextBBS }, + { END_DEVICE_PATH_TYPE, END_INSTANCE_DEVICE_PATH_SUBTYPE, DevPathToTextEndInstance }, + { 0, 0, NULL } }; /** @@ -2338,9 +2363,9 @@ UefiDevicePathLibConvertDeviceNodeToText ( IN BOOLEAN AllowShortcuts ) { - POOL_PRINT Str; - UINTN Index; - DEVICE_PATH_TO_TEXT ToText; + POOL_PRINT Str; + UINTN Index; + DEVICE_PATH_TO_TEXT ToText; if (DeviceNode == NULL) { return NULL; @@ -2354,9 +2379,10 @@ UefiDevicePathLibConvertDeviceNodeToText ( // ToText = DevPathToTextNodeGeneric; for (Index = 0; mUefiDevicePathLibToTextTable[Index].Function != NULL; Index++) { - if (DevicePathType (DeviceNode) == mUefiDevicePathLibToTextTable[Index].Type && - DevicePathSubType (DeviceNode) == mUefiDevicePathLibToTextTable[Index].SubType - ) { + if ((DevicePathType (DeviceNode) == mUefiDevicePathLibToTextTable[Index].Type) && + (DevicePathSubType (DeviceNode) == mUefiDevicePathLibToTextTable[Index].SubType) + ) + { ToText = mUefiDevicePathLibToTextTable[Index].Function; break; } @@ -2365,7 +2391,7 @@ UefiDevicePathLibConvertDeviceNodeToText ( // // Print this node // - ToText (&Str, (VOID *) DeviceNode, DisplayOnly, AllowShortcuts); + ToText (&Str, (VOID *)DeviceNode, DisplayOnly, AllowShortcuts); ASSERT (Str.Str != NULL); return Str.Str; @@ -2389,16 +2415,16 @@ UefiDevicePathLibConvertDeviceNodeToText ( CHAR16 * EFIAPI UefiDevicePathLibConvertDevicePathToText ( - IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, - IN BOOLEAN DisplayOnly, - IN BOOLEAN AllowShortcuts + IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts ) { - POOL_PRINT Str; - EFI_DEVICE_PATH_PROTOCOL *Node; - EFI_DEVICE_PATH_PROTOCOL *AlignedNode; - UINTN Index; - DEVICE_PATH_TO_TEXT ToText; + POOL_PRINT Str; + EFI_DEVICE_PATH_PROTOCOL *Node; + EFI_DEVICE_PATH_PROTOCOL *AlignedNode; + UINTN Index; + DEVICE_PATH_TO_TEXT ToText; if (DevicePath == NULL) { return NULL; @@ -2409,7 +2435,7 @@ UefiDevicePathLibConvertDevicePathToText ( // // Process each device path node // - Node = (EFI_DEVICE_PATH_PROTOCOL *) DevicePath; + Node = (EFI_DEVICE_PATH_PROTOCOL *)DevicePath; while (!IsDevicePathEnd (Node)) { // // Find the handler to dump this device path node @@ -2417,14 +2443,15 @@ UefiDevicePathLibConvertDevicePathToText ( // ToText = DevPathToTextNodeGeneric; for (Index = 0; mUefiDevicePathLibToTextTable[Index].Function != NULL; Index += 1) { - - if (DevicePathType (Node) == mUefiDevicePathLibToTextTable[Index].Type && - DevicePathSubType (Node) == mUefiDevicePathLibToTextTable[Index].SubType - ) { + if ((DevicePathType (Node) == mUefiDevicePathLibToTextTable[Index].Type) && + (DevicePathSubType (Node) == mUefiDevicePathLibToTextTable[Index].SubType) + ) + { ToText = mUefiDevicePathLibToTextTable[Index].Function; break; } } + // // Put a path separator in if needed // diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c b/MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c index b9aa462..5ee3e9a 100644 --- a/MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c +++ b/MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c @@ -46,18 +46,18 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST EFI_DEVICE_PATH_PROTOCOL mUefiDevicePathLib BOOLEAN EFIAPI IsDevicePathValid ( - IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, - IN UINTN MaxSize + IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, + IN UINTN MaxSize ) { - UINTN Count; - UINTN Size; - UINTN NodeLength; + UINTN Count; + UINTN Size; + UINTN NodeLength; // - //Validate the input whether exists and its size big enough to touch the first node + // Validate the input whether exists and its size big enough to touch the first node // - if (DevicePath == NULL || (MaxSize > 0 && MaxSize < END_DEVICE_PATH_LENGTH)) { + if ((DevicePath == NULL) || ((MaxSize > 0) && (MaxSize < END_DEVICE_PATH_LENGTH))) { return FALSE; } @@ -74,6 +74,7 @@ IsDevicePathValid ( if (NodeLength > MAX_UINTN - Size) { return FALSE; } + Size += NodeLength; // @@ -93,9 +94,10 @@ IsDevicePathValid ( // // FilePath must be a NULL-terminated string. // - if (DevicePathType (DevicePath) == MEDIA_DEVICE_PATH && - DevicePathSubType (DevicePath) == MEDIA_FILEPATH_DP && - *(CHAR16 *)((UINT8 *)DevicePath + NodeLength - 2) != 0) { + if ((DevicePathType (DevicePath) == MEDIA_DEVICE_PATH) && + (DevicePathSubType (DevicePath) == MEDIA_FILEPATH_DP) && + (*(CHAR16 *)((UINT8 *)DevicePath + NodeLength - 2) != 0)) + { return FALSE; } } @@ -103,10 +105,9 @@ IsDevicePathValid ( // // Only return TRUE when the End Device Path node is valid. // - return (BOOLEAN) (DevicePathNodeLength (DevicePath) == END_DEVICE_PATH_LENGTH); + return (BOOLEAN)(DevicePathNodeLength (DevicePath) == END_DEVICE_PATH_LENGTH); } - /** Returns the Type field of a device path node. @@ -197,7 +198,7 @@ NextDevicePathNode ( ) { ASSERT (Node != NULL); - return (EFI_DEVICE_PATH_PROTOCOL *)((UINT8 *)(Node) + DevicePathNodeLength(Node)); + return (EFI_DEVICE_PATH_PROTOCOL *)((UINT8 *)(Node) + DevicePathNodeLength (Node)); } /** @@ -227,7 +228,7 @@ IsDevicePathEndType ( ) { ASSERT (Node != NULL); - return (BOOLEAN) (DevicePathType (Node) == END_DEVICE_PATH_TYPE); + return (BOOLEAN)(DevicePathType (Node) == END_DEVICE_PATH_TYPE); } /** @@ -254,7 +255,7 @@ IsDevicePathEnd ( ) { ASSERT (Node != NULL); - return (BOOLEAN) (IsDevicePathEndType (Node) && DevicePathSubType(Node) == END_ENTIRE_DEVICE_PATH_SUBTYPE); + return (BOOLEAN)(IsDevicePathEndType (Node) && DevicePathSubType (Node) == END_ENTIRE_DEVICE_PATH_SUBTYPE); } /** @@ -281,7 +282,7 @@ IsDevicePathEndInstance ( ) { ASSERT (Node != NULL); - return (BOOLEAN) (IsDevicePathEndType (Node) && DevicePathSubType(Node) == END_INSTANCE_DEVICE_PATH_SUBTYPE); + return (BOOLEAN)(IsDevicePathEndType (Node) && DevicePathSubType (Node) == END_INSTANCE_DEVICE_PATH_SUBTYPE); } /** @@ -380,7 +381,7 @@ UefiDevicePathLibGetDevicePathSize ( // // Compute the size and add back in the size of the end device path structure // - return ((UINTN) DevicePath - (UINTN) Start) + DevicePathNodeLength (DevicePath); + return ((UINTN)DevicePath - (UINTN)Start) + DevicePathNodeLength (DevicePath); } /** @@ -405,7 +406,7 @@ UefiDevicePathLibDuplicateDevicePath ( IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath ) { - UINTN Size; + UINTN Size; // // Compute the size @@ -478,9 +479,9 @@ UefiDevicePathLibAppendDevicePath ( // Allocate space for the combined device path. It only has one end node of // length EFI_DEVICE_PATH_PROTOCOL. // - Size1 = GetDevicePathSize (FirstDevicePath); - Size2 = GetDevicePathSize (SecondDevicePath); - Size = Size1 + Size2 - END_DEVICE_PATH_LENGTH; + Size1 = GetDevicePathSize (FirstDevicePath); + Size2 = GetDevicePathSize (SecondDevicePath); + Size = Size1 + Size2 - END_DEVICE_PATH_LENGTH; NewDevicePath = AllocatePool (Size); @@ -489,8 +490,8 @@ UefiDevicePathLibAppendDevicePath ( // // Over write FirstDevicePath EndNode and do the copy // - DevicePath2 = (EFI_DEVICE_PATH_PROTOCOL *) ((CHAR8 *) NewDevicePath + - (Size1 - END_DEVICE_PATH_LENGTH)); + DevicePath2 = (EFI_DEVICE_PATH_PROTOCOL *)((CHAR8 *)NewDevicePath + + (Size1 - END_DEVICE_PATH_LENGTH)); CopyMem (DevicePath2, SecondDevicePath, Size2); } @@ -540,6 +541,7 @@ UefiDevicePathLibAppendDevicePathNode ( if (DevicePathNode == NULL) { return DuplicateDevicePath ((DevicePath != NULL) ? DevicePath : &mUefiDevicePathLibEndDevicePath); } + // // Build a Node that has a terminator on it // @@ -549,6 +551,7 @@ UefiDevicePathLibAppendDevicePathNode ( if (TempDevicePath == NULL) { return NULL; } + TempDevicePath = CopyMem (TempDevicePath, DevicePathNode, NodeLength); // // Add and end device path node to convert Node to device path @@ -612,20 +615,19 @@ UefiDevicePathLibAppendDevicePathInstance ( return NULL; } - SrcSize = GetDevicePathSize (DevicePath); - InstanceSize = GetDevicePathSize (DevicePathInstance); + SrcSize = GetDevicePathSize (DevicePath); + InstanceSize = GetDevicePathSize (DevicePathInstance); NewDevicePath = AllocatePool (SrcSize + InstanceSize); if (NewDevicePath != NULL) { - - TempDevicePath = CopyMem (NewDevicePath, DevicePath, SrcSize);; + TempDevicePath = CopyMem (NewDevicePath, DevicePath, SrcSize); while (!IsDevicePathEnd (TempDevicePath)) { TempDevicePath = NextDevicePathNode (TempDevicePath); } - TempDevicePath->SubType = END_INSTANCE_DEVICE_PATH_SUBTYPE; - TempDevicePath = NextDevicePathNode (TempDevicePath); + TempDevicePath->SubType = END_INSTANCE_DEVICE_PATH_SUBTYPE; + TempDevicePath = NextDevicePathNode (TempDevicePath); CopyMem (TempDevicePath, DevicePathInstance, InstanceSize); } @@ -663,8 +665,8 @@ UefiDevicePathLibAppendDevicePathInstance ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI UefiDevicePathLibGetNextDevicePathInstance ( - IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath, - OUT UINTN *Size + IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath, + OUT UINTN *Size ) { EFI_DEVICE_PATH_PROTOCOL *DevPath; @@ -673,7 +675,7 @@ UefiDevicePathLibGetNextDevicePathInstance ( ASSERT (Size != NULL); - if (DevicePath == NULL || *DevicePath == NULL) { + if ((DevicePath == NULL) || (*DevicePath == NULL)) { *Size = 0; return NULL; } @@ -693,15 +695,15 @@ UefiDevicePathLibGetNextDevicePathInstance ( // // Compute the size of the device path instance // - *Size = ((UINTN) DevPath - (UINTN) (*DevicePath)) + sizeof (EFI_DEVICE_PATH_PROTOCOL); + *Size = ((UINTN)DevPath - (UINTN)(*DevicePath)) + sizeof (EFI_DEVICE_PATH_PROTOCOL); // // Make a copy and return the device path instance // - Temp = DevPath->SubType; - DevPath->SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE; - ReturnValue = DuplicateDevicePath (*DevicePath); - DevPath->SubType = Temp; + Temp = DevPath->SubType; + DevPath->SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE; + ReturnValue = DuplicateDevicePath (*DevicePath); + DevPath->SubType = Temp; // // If DevPath is the end of an entire device path, then another instance @@ -738,12 +740,12 @@ UefiDevicePathLibGetNextDevicePathInstance ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI UefiDevicePathLibCreateDeviceNode ( - IN UINT8 NodeType, - IN UINT8 NodeSubType, - IN UINT16 NodeLength + IN UINT8 NodeType, + IN UINT8 NodeSubType, + IN UINT16 NodeLength ) { - EFI_DEVICE_PATH_PROTOCOL *DevicePath; + EFI_DEVICE_PATH_PROTOCOL *DevicePath; if (NodeLength < sizeof (EFI_DEVICE_PATH_PROTOCOL)) { // @@ -754,9 +756,9 @@ UefiDevicePathLibCreateDeviceNode ( DevicePath = AllocateZeroPool (NodeLength); if (DevicePath != NULL) { - DevicePath->Type = NodeType; - DevicePath->SubType = NodeSubType; - SetDevicePathNodeLength (DevicePath, NodeLength); + DevicePath->Type = NodeType; + DevicePath->SubType = NodeSubType; + SetDevicePathNodeLength (DevicePath, NodeLength); } return DevicePath; @@ -783,7 +785,7 @@ UefiDevicePathLibIsDevicePathMultiInstance ( IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath ) { - CONST EFI_DEVICE_PATH_PROTOCOL *Node; + CONST EFI_DEVICE_PATH_PROTOCOL *Node; if (DevicePath == NULL) { return FALSE; @@ -805,7 +807,6 @@ UefiDevicePathLibIsDevicePathMultiInstance ( return FALSE; } - /** Allocates a device path for a file and appends it to an existing device path. @@ -830,8 +831,8 @@ UefiDevicePathLibIsDevicePathMultiInstance ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI FileDevicePath ( - IN EFI_HANDLE Device OPTIONAL, - IN CONST CHAR16 *FileName + IN EFI_HANDLE Device OPTIONAL, + IN CONST CHAR16 *FileName ) { UINTN Size; @@ -841,10 +842,10 @@ FileDevicePath ( DevicePath = NULL; - Size = StrSize (FileName); + Size = StrSize (FileName); FileDevicePath = AllocatePool (Size + SIZE_OF_FILEPATH_DEVICE_PATH + END_DEVICE_PATH_LENGTH); if (FileDevicePath != NULL) { - FilePath = (FILEPATH_DEVICE_PATH *) FileDevicePath; + FilePath = (FILEPATH_DEVICE_PATH *)FileDevicePath; FilePath->Header.Type = MEDIA_DEVICE_PATH; FilePath->Header.SubType = MEDIA_FILEPATH_DP; CopyMem (&FilePath->PathName, FileName, Size); diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesDxeSmm.c b/MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesDxeSmm.c index 7f3b607..ddd1395 100644 --- a/MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesDxeSmm.c +++ b/MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesDxeSmm.c @@ -16,7 +16,6 @@ #include "UefiDevicePathLib.h" - /** Retrieves the device path protocol from a handle. @@ -33,7 +32,7 @@ EFI_DEVICE_PATH_PROTOCOL * EFIAPI DevicePathFromHandle ( - IN EFI_HANDLE Handle + IN EFI_HANDLE Handle ) { EFI_DEVICE_PATH_PROTOCOL *DevicePath; @@ -42,10 +41,11 @@ DevicePathFromHandle ( Status = gBS->HandleProtocol ( Handle, &gEfiDevicePathProtocolGuid, - (VOID *) &DevicePath + (VOID *)&DevicePath ); if (EFI_ERROR (Status)) { DevicePath = NULL; } + return DevicePath; } diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesStandaloneMm.c b/MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesStandaloneMm.c index 930e778..096f835 100644 --- a/MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesStandaloneMm.c +++ b/MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesStandaloneMm.c @@ -16,7 +16,6 @@ #include "UefiDevicePathLib.h" - /** Retrieves the device path protocol from a handle. @@ -33,7 +32,7 @@ EFI_DEVICE_PATH_PROTOCOL * EFIAPI DevicePathFromHandle ( - IN EFI_HANDLE Handle + IN EFI_HANDLE Handle ) { return NULL; diff --git a/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.c b/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.c index af4b219..a67d1cb 100644 --- a/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.c +++ b/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.c @@ -13,7 +13,6 @@ **/ - #include "UefiDevicePathLib.h" /** @@ -199,8 +198,8 @@ AppendDevicePathInstance ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI GetNextDevicePathInstance ( - IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath, - OUT UINTN *Size + IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath, + OUT UINTN *Size ) { return UefiDevicePathLibGetNextDevicePathInstance (DevicePath, Size); @@ -228,9 +227,9 @@ GetNextDevicePathInstance ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI CreateDeviceNode ( - IN UINT8 NodeType, - IN UINT8 NodeSubType, - IN UINT16 NodeLength + IN UINT8 NodeType, + IN UINT8 NodeSubType, + IN UINT16 NodeLength ) { return UefiDevicePathLibCreateDeviceNode (NodeType, NodeSubType, NodeLength); @@ -304,9 +303,9 @@ ConvertDeviceNodeToText ( CHAR16 * EFIAPI ConvertDevicePathToText ( - IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, - IN BOOLEAN DisplayOnly, - IN BOOLEAN AllowShortcuts + IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts ) { return UefiDevicePathLibConvertDevicePathToText (DevicePath, DisplayOnly, AllowShortcuts); @@ -326,7 +325,7 @@ ConvertDevicePathToText ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI ConvertTextToDeviceNode ( - IN CONST CHAR16 *TextDeviceNode + IN CONST CHAR16 *TextDeviceNode ) { return UefiDevicePathLibConvertTextToDeviceNode (TextDeviceNode); @@ -347,7 +346,7 @@ ConvertTextToDeviceNode ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI ConvertTextToDevicePath ( - IN CONST CHAR16 *TextDevicePath + IN CONST CHAR16 *TextDevicePath ) { return UefiDevicePathLibConvertTextToDevicePath (TextDevicePath); diff --git a/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.h b/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.h index 04b2375..8f759f1 100644 --- a/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.h +++ b/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.h @@ -24,28 +24,27 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include -#define IS_COMMA(a) ((a) == L',') -#define IS_HYPHEN(a) ((a) == L'-') -#define IS_DOT(a) ((a) == L'.') -#define IS_LEFT_PARENTH(a) ((a) == L'(') -#define IS_RIGHT_PARENTH(a) ((a) == L')') -#define IS_SLASH(a) ((a) == L'/') -#define IS_NULL(a) ((a) == L'\0') - +#define IS_COMMA(a) ((a) == L',') +#define IS_HYPHEN(a) ((a) == L'-') +#define IS_DOT(a) ((a) == L'.') +#define IS_LEFT_PARENTH(a) ((a) == L'(') +#define IS_RIGHT_PARENTH(a) ((a) == L')') +#define IS_SLASH(a) ((a) == L'/') +#define IS_NULL(a) ((a) == L'\0') // // Private Data structure // typedef struct { - CHAR16 *Str; - UINTN Count; - UINTN Capacity; + CHAR16 *Str; + UINTN Count; + UINTN Capacity; } POOL_PRINT; typedef EFI_DEVICE_PATH_PROTOCOL * (*DEVICE_PATH_FROM_TEXT) ( - IN CHAR16 *Str + IN CHAR16 *Str ); typedef @@ -58,90 +57,90 @@ VOID ); typedef struct { - UINT8 Type; - UINT8 SubType; - DEVICE_PATH_TO_TEXT Function; + UINT8 Type; + UINT8 SubType; + DEVICE_PATH_TO_TEXT Function; } DEVICE_PATH_TO_TEXT_TABLE; typedef struct { - UINT8 Type; - CHAR16 *Text; + UINT8 Type; + CHAR16 *Text; } DEVICE_PATH_TO_TEXT_GENERIC_TABLE; typedef struct { - CHAR16 *DevicePathNodeText; - DEVICE_PATH_FROM_TEXT Function; + CHAR16 *DevicePathNodeText; + DEVICE_PATH_FROM_TEXT Function; } DEVICE_PATH_FROM_TEXT_TABLE; typedef struct { - BOOLEAN ClassExist; - UINT8 Class; - BOOLEAN SubClassExist; - UINT8 SubClass; + BOOLEAN ClassExist; + UINT8 Class; + BOOLEAN SubClassExist; + UINT8 SubClass; } USB_CLASS_TEXT; -#define USB_CLASS_AUDIO 1 -#define USB_CLASS_CDCCONTROL 2 -#define USB_CLASS_HID 3 -#define USB_CLASS_IMAGE 6 -#define USB_CLASS_PRINTER 7 -#define USB_CLASS_MASS_STORAGE 8 -#define USB_CLASS_HUB 9 -#define USB_CLASS_CDCDATA 10 -#define USB_CLASS_SMART_CARD 11 -#define USB_CLASS_VIDEO 14 -#define USB_CLASS_DIAGNOSTIC 220 -#define USB_CLASS_WIRELESS 224 - -#define USB_CLASS_RESERVE 254 -#define USB_SUBCLASS_FW_UPDATE 1 -#define USB_SUBCLASS_IRDA_BRIDGE 2 -#define USB_SUBCLASS_TEST 3 - -#define RFC_1700_UDP_PROTOCOL 17 -#define RFC_1700_TCP_PROTOCOL 6 +#define USB_CLASS_AUDIO 1 +#define USB_CLASS_CDCCONTROL 2 +#define USB_CLASS_HID 3 +#define USB_CLASS_IMAGE 6 +#define USB_CLASS_PRINTER 7 +#define USB_CLASS_MASS_STORAGE 8 +#define USB_CLASS_HUB 9 +#define USB_CLASS_CDCDATA 10 +#define USB_CLASS_SMART_CARD 11 +#define USB_CLASS_VIDEO 14 +#define USB_CLASS_DIAGNOSTIC 220 +#define USB_CLASS_WIRELESS 224 + +#define USB_CLASS_RESERVE 254 +#define USB_SUBCLASS_FW_UPDATE 1 +#define USB_SUBCLASS_IRDA_BRIDGE 2 +#define USB_SUBCLASS_TEST 3 + +#define RFC_1700_UDP_PROTOCOL 17 +#define RFC_1700_TCP_PROTOCOL 6 #pragma pack(1) typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - EFI_GUID Guid; - UINT8 VendorDefinedData[1]; + EFI_DEVICE_PATH_PROTOCOL Header; + EFI_GUID Guid; + UINT8 VendorDefinedData[1]; } VENDOR_DEFINED_HARDWARE_DEVICE_PATH; typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - EFI_GUID Guid; - UINT8 VendorDefinedData[1]; + EFI_DEVICE_PATH_PROTOCOL Header; + EFI_GUID Guid; + UINT8 VendorDefinedData[1]; } VENDOR_DEFINED_MESSAGING_DEVICE_PATH; typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - EFI_GUID Guid; - UINT8 VendorDefinedData[1]; + EFI_DEVICE_PATH_PROTOCOL Header; + EFI_GUID Guid; + UINT8 VendorDefinedData[1]; } VENDOR_DEFINED_MEDIA_DEVICE_PATH; typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - UINT32 Hid; - UINT32 Uid; - UINT32 Cid; - CHAR8 HidUidCidStr[3]; + EFI_DEVICE_PATH_PROTOCOL Header; + UINT32 Hid; + UINT32 Uid; + UINT32 Cid; + CHAR8 HidUidCidStr[3]; } ACPI_EXTENDED_HID_DEVICE_PATH_WITH_STR; typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - UINT16 NetworkProtocol; - UINT16 LoginOption; - UINT64 Lun; - UINT16 TargetPortalGroupTag; - CHAR8 TargetName[1]; + EFI_DEVICE_PATH_PROTOCOL Header; + UINT16 NetworkProtocol; + UINT16 LoginOption; + UINT64 Lun; + UINT16 TargetPortalGroupTag; + CHAR8 TargetName[1]; } ISCSI_DEVICE_PATH_WITH_NAME; typedef struct { - EFI_DEVICE_PATH_PROTOCOL Header; - EFI_GUID Guid; - UINT8 VendorDefinedData[1]; + EFI_DEVICE_PATH_PROTOCOL Header; + EFI_GUID Guid; + UINT8 VendorDefinedData[1]; } VENDOR_DEVICE_PATH_WITH_DATA; #pragma pack() @@ -314,8 +313,8 @@ UefiDevicePathLibAppendDevicePathInstance ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI UefiDevicePathLibGetNextDevicePathInstance ( - IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath, - OUT UINTN *Size + IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath, + OUT UINTN *Size ); /** @@ -340,9 +339,9 @@ UefiDevicePathLibGetNextDevicePathInstance ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI UefiDevicePathLibCreateDeviceNode ( - IN UINT8 NodeType, - IN UINT8 NodeSubType, - IN UINT16 NodeLength + IN UINT8 NodeType, + IN UINT8 NodeSubType, + IN UINT16 NodeLength ); /** @@ -366,7 +365,6 @@ UefiDevicePathLibIsDevicePathMultiInstance ( IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath ); - /** Converts a device path to its text representation. @@ -385,9 +383,9 @@ UefiDevicePathLibIsDevicePathMultiInstance ( CHAR16 * EFIAPI UefiDevicePathLibConvertDevicePathToText ( - IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, - IN BOOLEAN DisplayOnly, - IN BOOLEAN AllowShortcuts + IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts ); /** @@ -427,7 +425,7 @@ UefiDevicePathLibConvertDeviceNodeToText ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI UefiDevicePathLibConvertTextToDeviceNode ( - IN CONST CHAR16 *TextDeviceNode + IN CONST CHAR16 *TextDeviceNode ); /** @@ -445,7 +443,7 @@ UefiDevicePathLibConvertTextToDeviceNode ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI UefiDevicePathLibConvertTextToDevicePath ( - IN CONST CHAR16 *TextDevicePath + IN CONST CHAR16 *TextDevicePath ); #endif diff --git a/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibOptionalDevicePathProtocol.c b/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibOptionalDevicePathProtocol.c index e1e6294..dfe2112 100644 --- a/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibOptionalDevicePathProtocol.c +++ b/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibOptionalDevicePathProtocol.c @@ -13,12 +13,11 @@ **/ - #include "UefiDevicePathLib.h" -GLOBAL_REMOVE_IF_UNREFERENCED EFI_DEVICE_PATH_UTILITIES_PROTOCOL *mDevicePathLibDevicePathUtilities = NULL; -GLOBAL_REMOVE_IF_UNREFERENCED EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *mDevicePathLibDevicePathToText = NULL; -GLOBAL_REMOVE_IF_UNREFERENCED EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL *mDevicePathLibDevicePathFromText = NULL; +GLOBAL_REMOVE_IF_UNREFERENCED EFI_DEVICE_PATH_UTILITIES_PROTOCOL *mDevicePathLibDevicePathUtilities = NULL; +GLOBAL_REMOVE_IF_UNREFERENCED EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *mDevicePathLibDevicePathToText = NULL; +GLOBAL_REMOVE_IF_UNREFERENCED EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL *mDevicePathLibDevicePathFromText = NULL; /** The constructor function caches the pointer to DevicePathUtilites protocol, @@ -37,16 +36,16 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL *mDevicePathLib EFI_STATUS EFIAPI UefiDevicePathLibOptionalDevicePathProtocolConstructor ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable ) { - EFI_STATUS Status; + EFI_STATUS Status; Status = gBS->LocateProtocol ( &gEfiDevicePathUtilitiesProtocolGuid, NULL, - (VOID**) &mDevicePathLibDevicePathUtilities + (VOID **)&mDevicePathLibDevicePathUtilities ); ASSERT_EFI_ERROR (Status); ASSERT (mDevicePathLibDevicePathUtilities != NULL); @@ -256,8 +255,8 @@ AppendDevicePathInstance ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI GetNextDevicePathInstance ( - IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath, - OUT UINTN *Size + IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath, + OUT UINTN *Size ) { if (mDevicePathLibDevicePathUtilities != NULL) { @@ -289,9 +288,9 @@ GetNextDevicePathInstance ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI CreateDeviceNode ( - IN UINT8 NodeType, - IN UINT8 NodeSubType, - IN UINT16 NodeLength + IN UINT8 NodeType, + IN UINT8 NodeSubType, + IN UINT16 NodeLength ) { if (mDevicePathLibDevicePathUtilities != NULL) { @@ -338,15 +337,16 @@ IsDevicePathMultiInstance ( **/ VOID * UefiDevicePathLibLocateProtocol ( - EFI_GUID *ProtocolGuid + EFI_GUID *ProtocolGuid ) { - EFI_STATUS Status; - VOID *Protocol; + EFI_STATUS Status; + VOID *Protocol; + Status = gBS->LocateProtocol ( ProtocolGuid, NULL, - (VOID**) &Protocol + (VOID **)&Protocol ); if (EFI_ERROR (Status)) { return NULL; @@ -381,6 +381,7 @@ ConvertDeviceNodeToText ( if (mDevicePathLibDevicePathToText == NULL) { mDevicePathLibDevicePathToText = UefiDevicePathLibLocateProtocol (&gEfiDevicePathToTextProtocolGuid); } + if (mDevicePathLibDevicePathToText != NULL) { return mDevicePathLibDevicePathToText->ConvertDeviceNodeToText (DeviceNode, DisplayOnly, AllowShortcuts); } @@ -406,14 +407,15 @@ ConvertDeviceNodeToText ( CHAR16 * EFIAPI ConvertDevicePathToText ( - IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, - IN BOOLEAN DisplayOnly, - IN BOOLEAN AllowShortcuts + IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts ) { if (mDevicePathLibDevicePathToText == NULL) { mDevicePathLibDevicePathToText = UefiDevicePathLibLocateProtocol (&gEfiDevicePathToTextProtocolGuid); } + if (mDevicePathLibDevicePathToText != NULL) { return mDevicePathLibDevicePathToText->ConvertDevicePathToText (DevicePath, DisplayOnly, AllowShortcuts); } @@ -435,12 +437,13 @@ ConvertDevicePathToText ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI ConvertTextToDeviceNode ( - IN CONST CHAR16 *TextDeviceNode + IN CONST CHAR16 *TextDeviceNode ) { if (mDevicePathLibDevicePathFromText == NULL) { mDevicePathLibDevicePathFromText = UefiDevicePathLibLocateProtocol (&gEfiDevicePathFromTextProtocolGuid); } + if (mDevicePathLibDevicePathFromText != NULL) { return mDevicePathLibDevicePathFromText->ConvertTextToDeviceNode (TextDeviceNode); } @@ -463,12 +466,13 @@ ConvertTextToDeviceNode ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI ConvertTextToDevicePath ( - IN CONST CHAR16 *TextDevicePath + IN CONST CHAR16 *TextDevicePath ) { if (mDevicePathLibDevicePathFromText == NULL) { mDevicePathLibDevicePathFromText = UefiDevicePathLibLocateProtocol (&gEfiDevicePathFromTextProtocolGuid); } + if (mDevicePathLibDevicePathFromText != NULL) { return mDevicePathLibDevicePathFromText->ConvertTextToDevicePath (TextDevicePath); } diff --git a/MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLib.c b/MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLib.c index 8fdd949..4ff9308 100644 --- a/MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLib.c +++ b/MdePkg/Library/UefiDevicePathLibDevicePathProtocol/UefiDevicePathLib.c @@ -7,7 +7,6 @@ **/ - #include #include @@ -22,9 +21,9 @@ #include #include -GLOBAL_REMOVE_IF_UNREFERENCED EFI_DEVICE_PATH_UTILITIES_PROTOCOL *mDevicePathLibDevicePathUtilities = NULL; -GLOBAL_REMOVE_IF_UNREFERENCED EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *mDevicePathLibDevicePathToText = NULL; -GLOBAL_REMOVE_IF_UNREFERENCED EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL *mDevicePathLibDevicePathFromText = NULL; +GLOBAL_REMOVE_IF_UNREFERENCED EFI_DEVICE_PATH_UTILITIES_PROTOCOL *mDevicePathLibDevicePathUtilities = NULL; +GLOBAL_REMOVE_IF_UNREFERENCED EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *mDevicePathLibDevicePathToText = NULL; +GLOBAL_REMOVE_IF_UNREFERENCED EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL *mDevicePathLibDevicePathFromText = NULL; // // Template for an end-of-device path node. @@ -53,16 +52,16 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST EFI_DEVICE_PATH_PROTOCOL mUefiDevicePathLib EFI_STATUS EFIAPI DevicePathLibConstructor ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable ) { - EFI_STATUS Status; + EFI_STATUS Status; Status = gBS->LocateProtocol ( &gEfiDevicePathUtilitiesProtocolGuid, NULL, - (VOID**) &mDevicePathLibDevicePathUtilities + (VOID **)&mDevicePathLibDevicePathUtilities ); ASSERT_EFI_ERROR (Status); ASSERT (mDevicePathLibDevicePathUtilities != NULL); @@ -87,13 +86,13 @@ DevicePathLibConstructor ( BOOLEAN EFIAPI IsDevicePathValid ( - IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, - IN UINTN MaxSize + IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, + IN UINTN MaxSize ) { - UINTN Count; - UINTN Size; - UINTN NodeLength; + UINTN Count; + UINTN Size; + UINTN NodeLength; ASSERT (DevicePath != NULL); @@ -117,6 +116,7 @@ IsDevicePathValid ( if (NodeLength > MAX_UINTN - Size) { return FALSE; } + Size += NodeLength; // @@ -136,9 +136,10 @@ IsDevicePathValid ( // // FilePath must be a NULL-terminated string. // - if (DevicePathType (DevicePath) == MEDIA_DEVICE_PATH && - DevicePathSubType (DevicePath) == MEDIA_FILEPATH_DP && - *(CHAR16 *)((UINT8 *)DevicePath + NodeLength - 2) != 0) { + if ((DevicePathType (DevicePath) == MEDIA_DEVICE_PATH) && + (DevicePathSubType (DevicePath) == MEDIA_FILEPATH_DP) && + (*(CHAR16 *)((UINT8 *)DevicePath + NodeLength - 2) != 0)) + { return FALSE; } } @@ -146,7 +147,7 @@ IsDevicePathValid ( // // Only return TRUE when the End Device Path node is valid. // - return (BOOLEAN) (DevicePathNodeLength (DevicePath) == END_DEVICE_PATH_LENGTH); + return (BOOLEAN)(DevicePathNodeLength (DevicePath) == END_DEVICE_PATH_LENGTH); } /** @@ -239,7 +240,7 @@ NextDevicePathNode ( ) { ASSERT (Node != NULL); - return (EFI_DEVICE_PATH_PROTOCOL *)((UINT8 *)(Node) + DevicePathNodeLength(Node)); + return (EFI_DEVICE_PATH_PROTOCOL *)((UINT8 *)(Node) + DevicePathNodeLength (Node)); } /** @@ -268,7 +269,7 @@ IsDevicePathEndType ( ) { ASSERT (Node != NULL); - return (BOOLEAN) (DevicePathType (Node) == END_DEVICE_PATH_TYPE); + return (BOOLEAN)(DevicePathType (Node) == END_DEVICE_PATH_TYPE); } /** @@ -294,7 +295,7 @@ IsDevicePathEnd ( ) { ASSERT (Node != NULL); - return (BOOLEAN) (IsDevicePathEndType (Node) && DevicePathSubType(Node) == END_ENTIRE_DEVICE_PATH_SUBTYPE); + return (BOOLEAN)(IsDevicePathEndType (Node) && DevicePathSubType (Node) == END_ENTIRE_DEVICE_PATH_SUBTYPE); } /** @@ -322,7 +323,7 @@ IsDevicePathEndInstance ( ) { ASSERT (Node != NULL); - return (BOOLEAN) (IsDevicePathEndType (Node) && DevicePathSubType(Node) == END_INSTANCE_DEVICE_PATH_SUBTYPE); + return (BOOLEAN)(IsDevicePathEndType (Node) && DevicePathSubType (Node) == END_INSTANCE_DEVICE_PATH_SUBTYPE); } /** @@ -564,8 +565,8 @@ AppendDevicePathInstance ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI GetNextDevicePathInstance ( - IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath, - OUT UINTN *Size + IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath, + OUT UINTN *Size ) { ASSERT (Size != NULL); @@ -594,9 +595,9 @@ GetNextDevicePathInstance ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI CreateDeviceNode ( - IN UINT8 NodeType, - IN UINT8 NodeSubType, - IN UINT16 NodeLength + IN UINT8 NodeType, + IN UINT8 NodeSubType, + IN UINT16 NodeLength ) { return mDevicePathLibDevicePathUtilities->CreateDeviceNode (NodeType, NodeSubType, NodeLength); @@ -642,7 +643,7 @@ IsDevicePathMultiInstance ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI DevicePathFromHandle ( - IN EFI_HANDLE Handle + IN EFI_HANDLE Handle ) { EFI_DEVICE_PATH_PROTOCOL *DevicePath; @@ -651,11 +652,12 @@ DevicePathFromHandle ( Status = gBS->HandleProtocol ( Handle, &gEfiDevicePathProtocolGuid, - (VOID *) &DevicePath + (VOID *)&DevicePath ); if (EFI_ERROR (Status)) { DevicePath = NULL; } + return DevicePath; } @@ -684,8 +686,8 @@ DevicePathFromHandle ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI FileDevicePath ( - IN EFI_HANDLE Device OPTIONAL, - IN CONST CHAR16 *FileName + IN EFI_HANDLE Device OPTIONAL, + IN CONST CHAR16 *FileName ) { UINTN Size; @@ -695,10 +697,10 @@ FileDevicePath ( DevicePath = NULL; - Size = StrSize (FileName); + Size = StrSize (FileName); FileDevicePath = AllocatePool (Size + SIZE_OF_FILEPATH_DEVICE_PATH + END_DEVICE_PATH_LENGTH); if (FileDevicePath != NULL) { - FilePath = (FILEPATH_DEVICE_PATH *) FileDevicePath; + FilePath = (FILEPATH_DEVICE_PATH *)FileDevicePath; FilePath->Header.Type = MEDIA_DEVICE_PATH; FilePath->Header.SubType = MEDIA_FILEPATH_DP; CopyMem (&FilePath->PathName, FileName, Size); @@ -725,15 +727,16 @@ FileDevicePath ( **/ VOID * UefiDevicePathLibLocateProtocol ( - EFI_GUID *ProtocolGuid + EFI_GUID *ProtocolGuid ) { - EFI_STATUS Status; - VOID *Protocol; + EFI_STATUS Status; + VOID *Protocol; + Status = gBS->LocateProtocol ( ProtocolGuid, NULL, - (VOID**) &Protocol + (VOID **)&Protocol ); if (EFI_ERROR (Status)) { return NULL; @@ -768,6 +771,7 @@ ConvertDeviceNodeToText ( if (mDevicePathLibDevicePathToText == NULL) { mDevicePathLibDevicePathToText = UefiDevicePathLibLocateProtocol (&gEfiDevicePathToTextProtocolGuid); } + if (mDevicePathLibDevicePathToText != NULL) { return mDevicePathLibDevicePathToText->ConvertDeviceNodeToText (DeviceNode, DisplayOnly, AllowShortcuts); } else { @@ -793,14 +797,15 @@ ConvertDeviceNodeToText ( CHAR16 * EFIAPI ConvertDevicePathToText ( - IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, - IN BOOLEAN DisplayOnly, - IN BOOLEAN AllowShortcuts + IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts ) { if (mDevicePathLibDevicePathToText == NULL) { mDevicePathLibDevicePathToText = UefiDevicePathLibLocateProtocol (&gEfiDevicePathToTextProtocolGuid); } + if (mDevicePathLibDevicePathToText != NULL) { return mDevicePathLibDevicePathToText->ConvertDevicePathToText (DevicePath, DisplayOnly, AllowShortcuts); } else { @@ -822,12 +827,13 @@ ConvertDevicePathToText ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI ConvertTextToDeviceNode ( - IN CONST CHAR16 *TextDeviceNode + IN CONST CHAR16 *TextDeviceNode ) { if (mDevicePathLibDevicePathFromText == NULL) { mDevicePathLibDevicePathFromText = UefiDevicePathLibLocateProtocol (&gEfiDevicePathFromTextProtocolGuid); } + if (mDevicePathLibDevicePathFromText != NULL) { return mDevicePathLibDevicePathFromText->ConvertTextToDeviceNode (TextDeviceNode); } else { @@ -850,12 +856,13 @@ ConvertTextToDeviceNode ( EFI_DEVICE_PATH_PROTOCOL * EFIAPI ConvertTextToDevicePath ( - IN CONST CHAR16 *TextDevicePath + IN CONST CHAR16 *TextDevicePath ) { if (mDevicePathLibDevicePathFromText == NULL) { mDevicePathLibDevicePathFromText = UefiDevicePathLibLocateProtocol (&gEfiDevicePathFromTextProtocolGuid); } + if (mDevicePathLibDevicePathFromText != NULL) { return mDevicePathLibDevicePathFromText->ConvertTextToDevicePath (TextDevicePath); } else { diff --git a/MdePkg/Library/UefiDriverEntryPoint/DriverEntryPoint.c b/MdePkg/Library/UefiDriverEntryPoint/DriverEntryPoint.c index c3ccf0f..dc6445b 100644 --- a/MdePkg/Library/UefiDriverEntryPoint/DriverEntryPoint.c +++ b/MdePkg/Library/UefiDriverEntryPoint/DriverEntryPoint.c @@ -6,8 +6,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ - - #include #include @@ -17,7 +15,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include - /** Unloads an image from memory. @@ -32,7 +29,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent EFI_STATUS EFIAPI _DriverUnloadHandler ( - EFI_HANDLE ImageHandle + EFI_HANDLE ImageHandle ) { EFI_STATUS Status; @@ -57,7 +54,6 @@ _DriverUnloadHandler ( return Status; } - /** The entry point of PE/COFF Image for a DXE Driver, DXE Runtime Driver, DXE SMM Driver, or UEFI Driver. @@ -139,7 +135,6 @@ _ModuleEntryPoint ( return Status; } - /** Required by the EBC compiler and identical in functionality to _ModuleEntryPoint(). diff --git a/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c b/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c index ab34e6c..86678e9 100644 --- a/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c +++ b/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c @@ -21,10 +21,10 @@ #include #include -CONST UINT16 gUnicodeFileTag = EFI_UNICODE_BYTE_ORDER_MARK; +CONST UINT16 gUnicodeFileTag = EFI_UNICODE_BYTE_ORDER_MARK; -#define MAX_FILE_NAME_LEN 522 // (20 * (6+5+2))+1) unicode characters from EFI FAT spec (doubled for bytes) -#define FIND_XXXXX_FILE_BUFFER_SIZE (SIZE_OF_EFI_FILE_INFO + MAX_FILE_NAME_LEN) +#define MAX_FILE_NAME_LEN 522// (20 * (6+5+2))+1) unicode characters from EFI FAT spec (doubled for bytes) +#define FIND_XXXXX_FILE_BUFFER_SIZE (SIZE_OF_EFI_FILE_INFO + MAX_FILE_NAME_LEN) /** This function will retrieve the information about the file for the handle @@ -40,15 +40,15 @@ CONST UINT16 gUnicodeFileTag = EFI_UNICODE_BYTE_ORDER_MARK; @return the information about the file **/ -EFI_FILE_INFO* +EFI_FILE_INFO * EFIAPI FileHandleGetInfo ( - IN EFI_FILE_HANDLE FileHandle + IN EFI_FILE_HANDLE FileHandle ) { - EFI_FILE_INFO *FileInfo; - UINTN FileInfoSize; - EFI_STATUS Status; + EFI_FILE_INFO *FileInfo; + UINTN FileInfoSize; + EFI_STATUS Status; if (FileHandle == NULL) { return (NULL); @@ -58,33 +58,38 @@ FileHandleGetInfo ( // Get the required size to allocate // FileInfoSize = 0; - FileInfo = NULL; - Status = FileHandle->GetInfo(FileHandle, + FileInfo = NULL; + Status = FileHandle->GetInfo ( + FileHandle, &gEfiFileInfoGuid, &FileInfoSize, - NULL); - if (Status == EFI_BUFFER_TOO_SMALL){ + NULL + ); + if (Status == EFI_BUFFER_TOO_SMALL) { // // error is expected. getting size to allocate // - FileInfo = AllocateZeroPool(FileInfoSize); + FileInfo = AllocateZeroPool (FileInfoSize); if (FileInfo != NULL) { // // now get the information // - Status = FileHandle->GetInfo(FileHandle, - &gEfiFileInfoGuid, - &FileInfoSize, - FileInfo); + Status = FileHandle->GetInfo ( + FileHandle, + &gEfiFileInfoGuid, + &FileInfoSize, + FileInfo + ); // // if we got an error free the memory and return NULL // - if (EFI_ERROR(Status)) { - FreePool(FileInfo); + if (EFI_ERROR (Status)) { + FreePool (FileInfo); FileInfo = NULL; } } } + return (FileInfo); } @@ -110,22 +115,23 @@ FileHandleGetInfo ( EFI_STATUS EFIAPI FileHandleSetInfo ( - IN EFI_FILE_HANDLE FileHandle, - IN CONST EFI_FILE_INFO *FileInfo + IN EFI_FILE_HANDLE FileHandle, + IN CONST EFI_FILE_INFO *FileInfo ) { - - if (FileHandle == NULL || FileInfo == NULL) { + if ((FileHandle == NULL) || (FileInfo == NULL)) { return (EFI_INVALID_PARAMETER); } // // Set the info // - return (FileHandle->SetInfo(FileHandle, - &gEfiFileInfoGuid, - (UINTN)FileInfo->Size, - (EFI_FILE_INFO*)FileInfo)); + return (FileHandle->SetInfo ( + FileHandle, + &gEfiFileInfoGuid, + (UINTN)FileInfo->Size, + (EFI_FILE_INFO *)FileInfo + )); } /** @@ -159,10 +165,10 @@ FileHandleSetInfo ( **/ EFI_STATUS EFIAPI -FileHandleRead( - IN EFI_FILE_HANDLE FileHandle, - IN OUT UINTN *BufferSize, - OUT VOID *Buffer +FileHandleRead ( + IN EFI_FILE_HANDLE FileHandle, + IN OUT UINTN *BufferSize, + OUT VOID *Buffer ) { if (FileHandle == NULL) { @@ -172,10 +178,9 @@ FileHandleRead( // // Perform the read based on EFI_FILE_PROTOCOL // - return (FileHandle->Read(FileHandle, BufferSize, Buffer)); + return (FileHandle->Read (FileHandle, BufferSize, Buffer)); } - /** Write data to a file. @@ -202,10 +207,10 @@ FileHandleRead( **/ EFI_STATUS EFIAPI -FileHandleWrite( - IN EFI_FILE_HANDLE FileHandle, - IN OUT UINTN *BufferSize, - IN VOID *Buffer +FileHandleWrite ( + IN EFI_FILE_HANDLE FileHandle, + IN OUT UINTN *BufferSize, + IN VOID *Buffer ) { if (FileHandle == NULL) { @@ -215,7 +220,7 @@ FileHandleWrite( // // Perform the write based on EFI_FILE_PROTOCOL // - return (FileHandle->Write(FileHandle, BufferSize, Buffer)); + return (FileHandle->Write (FileHandle, BufferSize, Buffer)); } /** @@ -232,10 +237,10 @@ FileHandleWrite( EFI_STATUS EFIAPI FileHandleClose ( - IN EFI_FILE_HANDLE FileHandle + IN EFI_FILE_HANDLE FileHandle ) { - EFI_STATUS Status; + EFI_STATUS Status; if (FileHandle == NULL) { return (EFI_INVALID_PARAMETER); @@ -244,7 +249,7 @@ FileHandleClose ( // // Perform the Close based on EFI_FILE_PROTOCOL // - Status = FileHandle->Close(FileHandle); + Status = FileHandle->Close (FileHandle); return Status; } @@ -265,10 +270,10 @@ FileHandleClose ( EFI_STATUS EFIAPI FileHandleDelete ( - IN EFI_FILE_HANDLE FileHandle + IN EFI_FILE_HANDLE FileHandle ) { - EFI_STATUS Status; + EFI_STATUS Status; if (FileHandle == NULL) { return (EFI_INVALID_PARAMETER); @@ -277,7 +282,7 @@ FileHandleDelete ( // // Perform the Delete based on EFI_FILE_PROTOCOL // - Status = FileHandle->Delete(FileHandle); + Status = FileHandle->Delete (FileHandle); return Status; } @@ -303,8 +308,8 @@ FileHandleDelete ( EFI_STATUS EFIAPI FileHandleSetPosition ( - IN EFI_FILE_HANDLE FileHandle, - IN UINT64 Position + IN EFI_FILE_HANDLE FileHandle, + IN UINT64 Position ) { if (FileHandle == NULL) { @@ -314,7 +319,7 @@ FileHandleSetPosition ( // // Perform the SetPosition based on EFI_FILE_PROTOCOL // - return (FileHandle->SetPosition(FileHandle, Position)); + return (FileHandle->SetPosition (FileHandle, Position)); } /** @@ -335,19 +340,20 @@ FileHandleSetPosition ( EFI_STATUS EFIAPI FileHandleGetPosition ( - IN EFI_FILE_HANDLE FileHandle, - OUT UINT64 *Position + IN EFI_FILE_HANDLE FileHandle, + OUT UINT64 *Position ) { - if (Position == NULL || FileHandle == NULL) { + if ((Position == NULL) || (FileHandle == NULL)) { return (EFI_INVALID_PARAMETER); } // // Perform the GetPosition based on EFI_FILE_PROTOCOL // - return (FileHandle->GetPosition(FileHandle, Position)); + return (FileHandle->GetPosition (FileHandle, Position)); } + /** Flushes data on a file @@ -365,7 +371,7 @@ FileHandleGetPosition ( EFI_STATUS EFIAPI FileHandleFlush ( - IN EFI_FILE_HANDLE FileHandle + IN EFI_FILE_HANDLE FileHandle ) { if (FileHandle == NULL) { @@ -375,7 +381,7 @@ FileHandleFlush ( // // Perform the Flush based on EFI_FILE_PROTOCOL // - return (FileHandle->Flush(FileHandle)); + return (FileHandle->Flush (FileHandle)); } /** @@ -394,10 +400,10 @@ FileHandleFlush ( EFI_STATUS EFIAPI FileHandleIsDirectory ( - IN EFI_FILE_HANDLE DirHandle + IN EFI_FILE_HANDLE DirHandle ) { - EFI_FILE_INFO *DirInfo; + EFI_FILE_INFO *DirInfo; if (DirHandle == NULL) { return (EFI_INVALID_PARAMETER); @@ -417,6 +423,7 @@ FileHandleIsDirectory ( // return (EFI_INVALID_PARAMETER); } + if ((DirInfo->Attribute & EFI_FILE_DIRECTORY) == 0) { // // Attributes say this is not a directory @@ -424,6 +431,7 @@ FileHandleIsDirectory ( FreePool (DirInfo); return (EFI_NOT_FOUND); } + // // all good... // @@ -456,22 +464,22 @@ FileHandleIsDirectory ( EFI_STATUS EFIAPI FileHandleFindFirstFile ( - IN EFI_FILE_HANDLE DirHandle, - OUT EFI_FILE_INFO **Buffer + IN EFI_FILE_HANDLE DirHandle, + OUT EFI_FILE_INFO **Buffer ) { - EFI_STATUS Status; - UINTN BufferSize; + EFI_STATUS Status; + UINTN BufferSize; - if (Buffer == NULL || DirHandle == NULL) { + if ((Buffer == NULL) || (DirHandle == NULL)) { return (EFI_INVALID_PARAMETER); } // // verify that DirHandle is a directory // - Status = FileHandleIsDirectory(DirHandle); - if (EFI_ERROR(Status)) { + Status = FileHandleIsDirectory (DirHandle); + if (EFI_ERROR (Status)) { return (Status); } @@ -479,17 +487,17 @@ FileHandleFindFirstFile ( // Allocate a buffer sized to struct size + enough for the string at the end // BufferSize = FIND_XXXXX_FILE_BUFFER_SIZE; - *Buffer = AllocateZeroPool(BufferSize); - if (*Buffer == NULL){ + *Buffer = AllocateZeroPool (BufferSize); + if (*Buffer == NULL) { return (EFI_OUT_OF_RESOURCES); } // // reset to the beginning of the directory // - Status = FileHandleSetPosition(DirHandle, 0); - if (EFI_ERROR(Status)) { - FreePool(*Buffer); + Status = FileHandleSetPosition (DirHandle, 0); + if (EFI_ERROR (Status)) { + FreePool (*Buffer); *Buffer = NULL; return (Status); } @@ -498,15 +506,17 @@ FileHandleFindFirstFile ( // read in the info about the first file // Status = FileHandleRead (DirHandle, &BufferSize, *Buffer); - ASSERT(Status != EFI_BUFFER_TOO_SMALL); - if (EFI_ERROR(Status) || BufferSize == 0) { - FreePool(*Buffer); + ASSERT (Status != EFI_BUFFER_TOO_SMALL); + if (EFI_ERROR (Status) || (BufferSize == 0)) { + FreePool (*Buffer); *Buffer = NULL; if (BufferSize == 0) { return (EFI_NOT_FOUND); } + return (Status); } + return (EFI_SUCCESS); } @@ -530,16 +540,16 @@ FileHandleFindFirstFile ( **/ EFI_STATUS EFIAPI -FileHandleFindNextFile( - IN EFI_FILE_HANDLE DirHandle, - OUT EFI_FILE_INFO *Buffer, - OUT BOOLEAN *NoFile +FileHandleFindNextFile ( + IN EFI_FILE_HANDLE DirHandle, + OUT EFI_FILE_INFO *Buffer, + OUT BOOLEAN *NoFile ) { - EFI_STATUS Status; - UINTN BufferSize; + EFI_STATUS Status; + UINTN BufferSize; - if (DirHandle == NULL || Buffer == NULL || NoFile == NULL) { + if ((DirHandle == NULL) || (Buffer == NULL) || (NoFile == NULL)) { return (EFI_INVALID_PARAMETER); } @@ -552,8 +562,8 @@ FileHandleFindNextFile( // read in the info about the next file // Status = FileHandleRead (DirHandle, &BufferSize, Buffer); - ASSERT(Status != EFI_BUFFER_TOO_SMALL); - if (EFI_ERROR(Status)) { + ASSERT (Status != EFI_BUFFER_TOO_SMALL); + if (EFI_ERROR (Status)) { return (Status); } @@ -561,7 +571,7 @@ FileHandleFindNextFile( // If we read 0 bytes (but did not have erros) we already read in the last file. // if (BufferSize == 0) { - FreePool(Buffer); + FreePool (Buffer); *NoFile = TRUE; } @@ -585,20 +595,20 @@ FileHandleFindNextFile( EFI_STATUS EFIAPI FileHandleGetSize ( - IN EFI_FILE_HANDLE FileHandle, - OUT UINT64 *Size + IN EFI_FILE_HANDLE FileHandle, + OUT UINT64 *Size ) { - EFI_FILE_INFO *FileInfo; + EFI_FILE_INFO *FileInfo; - if (FileHandle == NULL || Size == NULL) { + if ((FileHandle == NULL) || (Size == NULL)) { return (EFI_INVALID_PARAMETER); } // // get the FileInfo structure // - FileInfo = FileHandleGetInfo(FileHandle); + FileInfo = FileHandleGetInfo (FileHandle); if (FileInfo == NULL) { return (EFI_DEVICE_ERROR); } @@ -611,7 +621,7 @@ FileHandleGetSize ( // // free the FileInfo memory // - FreePool(FileInfo); + FreePool (FileInfo); return (EFI_SUCCESS); } @@ -632,12 +642,12 @@ FileHandleGetSize ( EFI_STATUS EFIAPI FileHandleSetSize ( - IN EFI_FILE_HANDLE FileHandle, - IN UINT64 Size + IN EFI_FILE_HANDLE FileHandle, + IN UINT64 Size ) { - EFI_FILE_INFO *FileInfo; - EFI_STATUS Status; + EFI_FILE_INFO *FileInfo; + EFI_STATUS Status; if (FileHandle == NULL) { return (EFI_INVALID_PARAMETER); @@ -646,7 +656,7 @@ FileHandleSetSize ( // // get the FileInfo structure // - FileInfo = FileHandleGetInfo(FileHandle); + FileInfo = FileHandleGetInfo (FileHandle); if (FileInfo == NULL) { return (EFI_DEVICE_ERROR); } @@ -656,11 +666,11 @@ FileHandleSetSize ( // FileInfo->FileSize = Size; - Status = FileHandleSetInfo(FileHandle, FileInfo); + Status = FileHandleSetInfo (FileHandle, FileInfo); // // free the FileInfo memory // - FreePool(FileInfo); + FreePool (FileInfo); return (Status); } @@ -697,18 +707,18 @@ FileHandleSetSize ( @return Destination return the resultant string. **/ -CHAR16* +CHAR16 * EFIAPI StrnCatGrowLeft ( - IN OUT CHAR16 **Destination, - IN OUT UINTN *CurrentSize, - IN CONST CHAR16 *Source, - IN UINTN Count + IN OUT CHAR16 **Destination, + IN OUT UINTN *CurrentSize, + IN CONST CHAR16 *Source, + IN UINTN Count ) { - UINTN DestinationStartSize; - UINTN NewSize; - UINTN CopySize; + UINTN DestinationStartSize; + UINTN NewSize; + UINTN CopySize; if (Destination == NULL) { return (NULL); @@ -725,19 +735,19 @@ StrnCatGrowLeft ( // allow for NULL pointers address as Destination // if (*Destination != NULL) { - ASSERT(CurrentSize != 0); - DestinationStartSize = StrSize(*Destination); - ASSERT(DestinationStartSize <= *CurrentSize); + ASSERT (CurrentSize != 0); + DestinationStartSize = StrSize (*Destination); + ASSERT (DestinationStartSize <= *CurrentSize); } else { DestinationStartSize = 0; -// ASSERT(*CurrentSize == 0); + // ASSERT(*CurrentSize == 0); } // // Append all of Source? // if (Count == 0) { - Count = StrSize(Source); + Count = StrSize (Source); } // @@ -748,18 +758,20 @@ StrnCatGrowLeft ( while (NewSize < (DestinationStartSize + Count)) { NewSize += 2 * Count; } - *Destination = ReallocatePool(*CurrentSize, NewSize, *Destination); + + *Destination = ReallocatePool (*CurrentSize, NewSize, *Destination); *CurrentSize = NewSize; } else { - *Destination = AllocateZeroPool(Count+sizeof(CHAR16)); + *Destination = AllocateZeroPool (Count+sizeof (CHAR16)); } + if (*Destination == NULL) { return NULL; } - CopySize = StrSize(*Destination); - CopyMem((*Destination)+((Count-2)/sizeof(CHAR16)), *Destination, CopySize); - CopyMem(*Destination, Source, Count-2); + CopySize = StrSize (*Destination); + CopyMem ((*Destination)+((Count-2)/sizeof (CHAR16)), *Destination, CopySize); + CopyMem (*Destination, Source, Count-2); return (*Destination); } @@ -783,35 +795,35 @@ StrnCatGrowLeft ( EFI_STATUS EFIAPI FileHandleGetFileName ( - IN CONST EFI_FILE_HANDLE Handle, - OUT CHAR16 **FullFileName + IN CONST EFI_FILE_HANDLE Handle, + OUT CHAR16 **FullFileName ) { - EFI_STATUS Status; - UINTN Size; - EFI_FILE_HANDLE CurrentHandle; - EFI_FILE_HANDLE NextHigherHandle; - EFI_FILE_INFO *FileInfo; + EFI_STATUS Status; + UINTN Size; + EFI_FILE_HANDLE CurrentHandle; + EFI_FILE_HANDLE NextHigherHandle; + EFI_FILE_INFO *FileInfo; Size = 0; // // Check our parameters // - if (FullFileName == NULL || Handle == NULL) { + if ((FullFileName == NULL) || (Handle == NULL)) { return (EFI_INVALID_PARAMETER); } *FullFileName = NULL; CurrentHandle = NULL; - Status = Handle->Open(Handle, &CurrentHandle, L".", EFI_FILE_MODE_READ, 0); - if (!EFI_ERROR(Status)) { + Status = Handle->Open (Handle, &CurrentHandle, L".", EFI_FILE_MODE_READ, 0); + if (!EFI_ERROR (Status)) { // // Reverse out the current directory on the device // - for (;;) { - FileInfo = FileHandleGetInfo(CurrentHandle); + for ( ; ;) { + FileInfo = FileHandleGetInfo (CurrentHandle); if (FileInfo == NULL) { Status = EFI_OUT_OF_RESOURCES; break; @@ -836,24 +848,26 @@ FileHandleGetFileName ( // Status = EFI_SUCCESS; if (*FullFileName == NULL) { - ASSERT((*FullFileName == NULL && Size == 0) || (*FullFileName != NULL)); - *FullFileName = StrnCatGrowLeft(FullFileName, &Size, L"\\", 0); + ASSERT ((*FullFileName == NULL && Size == 0) || (*FullFileName != NULL)); + *FullFileName = StrnCatGrowLeft (FullFileName, &Size, L"\\", 0); } - FreePool(FileInfo); + + FreePool (FileInfo); break; } else { if (*FullFileName == NULL) { - ASSERT((*FullFileName == NULL && Size == 0) || (*FullFileName != NULL)); - *FullFileName = StrnCatGrowLeft(FullFileName, &Size, L"\\", 0); + ASSERT ((*FullFileName == NULL && Size == 0) || (*FullFileName != NULL)); + *FullFileName = StrnCatGrowLeft (FullFileName, &Size, L"\\", 0); } - ASSERT((*FullFileName == NULL && Size == 0) || (*FullFileName != NULL)); - *FullFileName = StrnCatGrowLeft(FullFileName, &Size, FileInfo->FileName, 0); - *FullFileName = StrnCatGrowLeft(FullFileName, &Size, L"\\", 0); - FreePool(FileInfo); + + ASSERT ((*FullFileName == NULL && Size == 0) || (*FullFileName != NULL)); + *FullFileName = StrnCatGrowLeft (FullFileName, &Size, FileInfo->FileName, 0); + *FullFileName = StrnCatGrowLeft (FullFileName, &Size, L"\\", 0); + FreePool (FileInfo); } } - FileHandleClose(CurrentHandle); + FileHandleClose (CurrentHandle); // // Move to the parent directory // @@ -861,24 +875,25 @@ FileHandleGetFileName ( } } else if (Status == EFI_NOT_FOUND) { Status = EFI_SUCCESS; - ASSERT((*FullFileName == NULL && Size == 0) || (*FullFileName != NULL)); - *FullFileName = StrnCatGrowLeft(FullFileName, &Size, L"\\", 0); + ASSERT ((*FullFileName == NULL && Size == 0) || (*FullFileName != NULL)); + *FullFileName = StrnCatGrowLeft (FullFileName, &Size, L"\\", 0); } - if (*FullFileName != NULL && - (*FullFileName)[StrLen(*FullFileName) - 1] == L'\\' && - StrLen(*FullFileName) > 1 && - FileHandleIsDirectory(Handle) == EFI_NOT_FOUND - ) { - (*FullFileName)[StrLen(*FullFileName) - 1] = CHAR_NULL; + if ((*FullFileName != NULL) && + ((*FullFileName)[StrLen (*FullFileName) - 1] == L'\\') && + (StrLen (*FullFileName) > 1) && + (FileHandleIsDirectory (Handle) == EFI_NOT_FOUND) + ) + { + (*FullFileName)[StrLen (*FullFileName) - 1] = CHAR_NULL; } if (CurrentHandle != NULL) { CurrentHandle->Close (CurrentHandle); } - if (EFI_ERROR(Status) && *FullFileName != NULL) { - FreePool(*FullFileName); + if (EFI_ERROR (Status) && (*FullFileName != NULL)) { + FreePool (*FullFileName); } return (Status); @@ -898,30 +913,32 @@ FileHandleGetFileName ( @sa FileHandleReadLine **/ -CHAR16* +CHAR16 * EFIAPI -FileHandleReturnLine( - IN EFI_FILE_HANDLE Handle, - IN OUT BOOLEAN *Ascii +FileHandleReturnLine ( + IN EFI_FILE_HANDLE Handle, + IN OUT BOOLEAN *Ascii ) { - CHAR16 *RetVal; - UINTN Size; - EFI_STATUS Status; + CHAR16 *RetVal; + UINTN Size; + EFI_STATUS Status; - Size = 0; + Size = 0; RetVal = NULL; - Status = FileHandleReadLine(Handle, RetVal, &Size, FALSE, Ascii); + Status = FileHandleReadLine (Handle, RetVal, &Size, FALSE, Ascii); if (Status == EFI_BUFFER_TOO_SMALL) { - RetVal = AllocateZeroPool(Size); - Status = FileHandleReadLine(Handle, RetVal, &Size, FALSE, Ascii); + RetVal = AllocateZeroPool (Size); + Status = FileHandleReadLine (Handle, RetVal, &Size, FALSE, Ascii); } - ASSERT_EFI_ERROR(Status); - if (EFI_ERROR(Status) && (RetVal != NULL)) { - FreePool(RetVal); + + ASSERT_EFI_ERROR (Status); + if (EFI_ERROR (Status) && (RetVal != NULL)) { + FreePool (RetVal); RetVal = NULL; } + return (RetVal); } @@ -955,12 +972,12 @@ FileHandleReturnLine( **/ EFI_STATUS EFIAPI -FileHandleReadLine( - IN EFI_FILE_HANDLE Handle, - IN OUT CHAR16 *Buffer, - IN OUT UINTN *Size, - IN BOOLEAN Truncate, - IN OUT BOOLEAN *Ascii +FileHandleReadLine ( + IN EFI_FILE_HANDLE Handle, + IN OUT CHAR16 *Buffer, + IN OUT UINTN *Size, + IN BOOLEAN Truncate, + IN OUT BOOLEAN *Ascii ) { EFI_STATUS Status; @@ -972,14 +989,15 @@ FileHandleReadLine( UINTN OldSize; UINT64 OriginalFilePosition; - if (Handle == NULL - ||Size == NULL - ||(Buffer==NULL&&*Size!=0) - ){ + if ( (Handle == NULL) + || (Size == NULL) + || ((Buffer == NULL) && (*Size != 0)) + ) + { return (EFI_INVALID_PARAMETER); } - if (Buffer != NULL && *Size != 0) { + if ((Buffer != NULL) && (*Size != 0)) { *Buffer = CHAR_NULL; } @@ -991,65 +1009,70 @@ FileHandleReadLine( return EFI_SUCCESS; } - FileHandleGetPosition(Handle, &OriginalFilePosition); + FileHandleGetPosition (Handle, &OriginalFilePosition); if (OriginalFilePosition == 0) { - CharSize = sizeof(CHAR16); - Status = FileHandleRead(Handle, &CharSize, &CharBuffer); - ASSERT_EFI_ERROR(Status); + CharSize = sizeof (CHAR16); + Status = FileHandleRead (Handle, &CharSize, &CharBuffer); + ASSERT_EFI_ERROR (Status); if (CharBuffer == gUnicodeFileTag) { *Ascii = FALSE; } else { *Ascii = TRUE; - FileHandleSetPosition(Handle, OriginalFilePosition); + FileHandleSetPosition (Handle, OriginalFilePosition); } } CrCount = 0; - for (CountSoFar = 0;;CountSoFar++){ + for (CountSoFar = 0; ; CountSoFar++) { CharBuffer = 0; if (*Ascii) { - CharSize = sizeof(CHAR8); + CharSize = sizeof (CHAR8); } else { - CharSize = sizeof(CHAR16); + CharSize = sizeof (CHAR16); } - Status = FileHandleRead(Handle, &CharSize, &CharBuffer); - if ( EFI_ERROR(Status) - || CharSize == 0 - || (CharBuffer == L'\n' && !(*Ascii)) - || (CharBuffer == '\n' && *Ascii) - ){ + + Status = FileHandleRead (Handle, &CharSize, &CharBuffer); + if ( EFI_ERROR (Status) + || (CharSize == 0) + || ((CharBuffer == L'\n') && !(*Ascii)) + || ((CharBuffer == '\n') && *Ascii) + ) + { break; } else if ( - (CharBuffer == L'\r' && !(*Ascii)) || - (CharBuffer == '\r' && *Ascii) - ) { + ((CharBuffer == L'\r') && !(*Ascii)) || + ((CharBuffer == '\r') && *Ascii) + ) + { CrCount++; continue; } + // // if we have space save it... // - if ((CountSoFar+1-CrCount)*sizeof(CHAR16) < *Size){ - ASSERT(Buffer != NULL); - ((CHAR16*)Buffer)[CountSoFar-CrCount] = CharBuffer; - ((CHAR16*)Buffer)[CountSoFar+1-CrCount] = CHAR_NULL; + if ((CountSoFar+1-CrCount)*sizeof (CHAR16) < *Size) { + ASSERT (Buffer != NULL); + ((CHAR16 *)Buffer)[CountSoFar-CrCount] = CharBuffer; + ((CHAR16 *)Buffer)[CountSoFar+1-CrCount] = CHAR_NULL; } } // // if we ran out of space tell when... // - if ((CountSoFar+1-CrCount)*sizeof(CHAR16) > *Size){ + if ((CountSoFar+1-CrCount)*sizeof (CHAR16) > *Size) { OldSize = *Size; - *Size = (CountSoFar+1-CrCount)*sizeof(CHAR16); + *Size = (CountSoFar+1-CrCount)*sizeof (CHAR16); if (!Truncate) { - if (Buffer != NULL && OldSize != 0) { - ZeroMem(Buffer, OldSize); + if ((Buffer != NULL) && (OldSize != 0)) { + ZeroMem (Buffer, OldSize); } - FileHandleSetPosition(Handle, OriginalFilePosition); + + FileHandleSetPosition (Handle, OriginalFilePosition); return (EFI_BUFFER_TOO_SMALL); } else { - DEBUG((DEBUG_WARN, "The line was truncated in FileHandleReadLine")); + DEBUG ((DEBUG_WARN, "The line was truncated in FileHandleReadLine")); return (EFI_SUCCESS); } } @@ -1080,9 +1103,9 @@ FileHandleReadLine( **/ EFI_STATUS EFIAPI -FileHandleWriteLine( - IN EFI_FILE_HANDLE Handle, - IN CHAR16 *Buffer +FileHandleWriteLine ( + IN EFI_FILE_HANDLE Handle, + IN CHAR16 *Buffer ) { EFI_STATUS Status; @@ -1103,21 +1126,21 @@ FileHandleWriteLine( return (EFI_INVALID_PARAMETER); } - Ascii = FALSE; + Ascii = FALSE; AsciiBuffer = NULL; - Status = FileHandleGetPosition(Handle, &OriginalFilePosition); - if (EFI_ERROR(Status)) { + Status = FileHandleGetPosition (Handle, &OriginalFilePosition); + if (EFI_ERROR (Status)) { return Status; } - Status = FileHandleSetPosition(Handle, 0); - if (EFI_ERROR(Status)) { + Status = FileHandleSetPosition (Handle, 0); + if (EFI_ERROR (Status)) { return Status; } - Status = FileHandleGetSize(Handle, &FileSize); - if (EFI_ERROR(Status)) { + Status = FileHandleGetSize (Handle, &FileSize); + if (EFI_ERROR (Status)) { return Status; } @@ -1125,7 +1148,7 @@ FileHandleWriteLine( Ascii = TRUE; } else { CharSize = sizeof (CHAR16); - Status = FileHandleRead (Handle, &CharSize, &CharBuffer); + Status = FileHandleRead (Handle, &CharSize, &CharBuffer); ASSERT_EFI_ERROR (Status); if (CharBuffer == gUnicodeFileTag) { Ascii = FALSE; @@ -1134,52 +1157,57 @@ FileHandleWriteLine( } } - Status = FileHandleSetPosition(Handle, OriginalFilePosition); - if (EFI_ERROR(Status)) { + Status = FileHandleSetPosition (Handle, OriginalFilePosition); + if (EFI_ERROR (Status)) { return Status; } if (Ascii) { - Size = ( StrSize(Buffer) / sizeof(CHAR16) ) * sizeof(CHAR8); - AsciiBuffer = (CHAR8 *)AllocateZeroPool(Size); + Size = (StrSize (Buffer) / sizeof (CHAR16)) * sizeof (CHAR8); + AsciiBuffer = (CHAR8 *)AllocateZeroPool (Size); if (AsciiBuffer == NULL) { return EFI_OUT_OF_RESOURCES; } + UnicodeStrToAsciiStrS (Buffer, AsciiBuffer, Size); for (Index = 0; Index < Size; Index++) { if ((AsciiBuffer[Index] & BIT7) != 0) { - FreePool(AsciiBuffer); + FreePool (AsciiBuffer); return EFI_INVALID_PARAMETER; } } - Size = AsciiStrSize(AsciiBuffer) - sizeof(CHAR8); - Status = FileHandleWrite(Handle, &Size, AsciiBuffer); - if (EFI_ERROR(Status)) { + Size = AsciiStrSize (AsciiBuffer) - sizeof (CHAR8); + Status = FileHandleWrite (Handle, &Size, AsciiBuffer); + if (EFI_ERROR (Status)) { FreePool (AsciiBuffer); return (Status); } - Size = AsciiStrSize("\r\n") - sizeof(CHAR8); - Status = FileHandleWrite(Handle, &Size, "\r\n"); + + Size = AsciiStrSize ("\r\n") - sizeof (CHAR8); + Status = FileHandleWrite (Handle, &Size, "\r\n"); } else { if (OriginalFilePosition == 0) { - Status = FileHandleSetPosition (Handle, sizeof(CHAR16)); - if (EFI_ERROR(Status)) { + Status = FileHandleSetPosition (Handle, sizeof (CHAR16)); + if (EFI_ERROR (Status)) { return Status; } } - Size = StrSize(Buffer) - sizeof(CHAR16); - Status = FileHandleWrite(Handle, &Size, Buffer); - if (EFI_ERROR(Status)) { + + Size = StrSize (Buffer) - sizeof (CHAR16); + Status = FileHandleWrite (Handle, &Size, Buffer); + if (EFI_ERROR (Status)) { return (Status); } - Size = StrSize(L"\r\n") - sizeof(CHAR16); - Status = FileHandleWrite(Handle, &Size, L"\r\n"); + + Size = StrSize (L"\r\n") - sizeof (CHAR16); + Status = FileHandleWrite (Handle, &Size, L"\r\n"); } if (AsciiBuffer != NULL) { FreePool (AsciiBuffer); } + return Status; } @@ -1197,15 +1225,15 @@ FileHandleWriteLine( **/ EFI_STATUS EFIAPI -FileHandlePrintLine( +FileHandlePrintLine ( IN EFI_FILE_HANDLE Handle, IN CONST CHAR16 *Format, ... ) { - VA_LIST Marker; - CHAR16 *Buffer; - EFI_STATUS Status; + VA_LIST Marker; + CHAR16 *Buffer; + EFI_STATUS Status; // // Get a buffer to print into @@ -1225,12 +1253,12 @@ FileHandlePrintLine( // // Print buffer into file // - Status = FileHandleWriteLine(Handle, Buffer); + Status = FileHandleWriteLine (Handle, Buffer); // // Cleanup and return // - FreePool(Buffer); + FreePool (Buffer); return (Status); } @@ -1248,26 +1276,26 @@ FileHandlePrintLine( **/ BOOLEAN EFIAPI -FileHandleEof( - IN EFI_FILE_HANDLE Handle +FileHandleEof ( + IN EFI_FILE_HANDLE Handle ) { - EFI_FILE_INFO *Info; - UINT64 Pos; - BOOLEAN RetVal; + EFI_FILE_INFO *Info; + UINT64 Pos; + BOOLEAN RetVal; if (Handle == NULL) { return (FALSE); } - FileHandleGetPosition(Handle, &Pos); + FileHandleGetPosition (Handle, &Pos); Info = FileHandleGetInfo (Handle); if (Info == NULL) { return (FALSE); } - FileHandleSetPosition(Handle, Pos); + FileHandleSetPosition (Handle, Pos); if (Pos == Info->FileSize) { RetVal = TRUE; diff --git a/MdePkg/Library/UefiLib/Acpi.c b/MdePkg/Library/UefiLib/Acpi.c index d4f7fc8..397fde2 100644 --- a/MdePkg/Library/UefiLib/Acpi.c +++ b/MdePkg/Library/UefiLib/Acpi.c @@ -30,18 +30,18 @@ **/ EFI_ACPI_COMMON_HEADER * ScanTableInSDT ( - IN EFI_ACPI_DESCRIPTION_HEADER *Sdt, - IN UINTN TablePointerSize, - IN UINT32 Signature, - IN EFI_ACPI_COMMON_HEADER *PreviousTable OPTIONAL, - OUT BOOLEAN *PreviousTableLocated OPTIONAL + IN EFI_ACPI_DESCRIPTION_HEADER *Sdt, + IN UINTN TablePointerSize, + IN UINT32 Signature, + IN EFI_ACPI_COMMON_HEADER *PreviousTable OPTIONAL, + OUT BOOLEAN *PreviousTableLocated OPTIONAL ) { - UINTN Index; - UINTN EntryCount; - UINT64 EntryPtr; - UINTN BasePtr; - EFI_ACPI_COMMON_HEADER *Table; + UINTN Index; + UINTN EntryCount; + UINT64 EntryPtr; + UINTN BasePtr; + EFI_ACPI_COMMON_HEADER *Table; if (PreviousTableLocated != NULL) { ASSERT (PreviousTable != NULL); @@ -57,7 +57,7 @@ ScanTableInSDT ( EntryCount = (Sdt->Length - sizeof (EFI_ACPI_DESCRIPTION_HEADER)) / TablePointerSize; BasePtr = (UINTN)(Sdt + 1); - for (Index = 0; Index < EntryCount; Index ++) { + for (Index = 0; Index < EntryCount; Index++) { EntryPtr = 0; CopyMem (&EntryPtr, (VOID *)(BasePtr + Index * TablePointerSize), TablePointerSize); Table = (EFI_ACPI_COMMON_HEADER *)((UINTN)(EntryPtr)); @@ -77,7 +77,6 @@ ScanTableInSDT ( // return Table; } - } } @@ -97,8 +96,8 @@ LocateAcpiFacsFromFadt ( IN EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE *Fadt ) { - EFI_ACPI_COMMON_HEADER *Facs; - UINT64 Data64; + EFI_ACPI_COMMON_HEADER *Facs; + UINT64 Data64; if (Fadt == NULL) { return NULL; @@ -107,13 +106,14 @@ LocateAcpiFacsFromFadt ( if (Fadt->Header.Revision < EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION) { Facs = (EFI_ACPI_COMMON_HEADER *)(UINTN)Fadt->FirmwareCtrl; } else { - CopyMem (&Data64, &Fadt->XFirmwareCtrl, sizeof(UINT64)); + CopyMem (&Data64, &Fadt->XFirmwareCtrl, sizeof (UINT64)); if (Data64 != 0) { Facs = (EFI_ACPI_COMMON_HEADER *)(UINTN)Data64; } else { Facs = (EFI_ACPI_COMMON_HEADER *)(UINTN)Fadt->FirmwareCtrl; } } + return Facs; } @@ -130,8 +130,8 @@ LocateAcpiDsdtFromFadt ( IN EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE *Fadt ) { - EFI_ACPI_COMMON_HEADER *Dsdt; - UINT64 Data64; + EFI_ACPI_COMMON_HEADER *Dsdt; + UINT64 Data64; if (Fadt == NULL) { return NULL; @@ -140,13 +140,14 @@ LocateAcpiDsdtFromFadt ( if (Fadt->Header.Revision < EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION) { Dsdt = (EFI_ACPI_COMMON_HEADER *)(UINTN)Fadt->Dsdt; } else { - CopyMem (&Data64, &Fadt->XDsdt, sizeof(UINT64)); + CopyMem (&Data64, &Fadt->XDsdt, sizeof (UINT64)); if (Data64 != 0) { Dsdt = (EFI_ACPI_COMMON_HEADER *)(UINTN)Data64; } else { Dsdt = (EFI_ACPI_COMMON_HEADER *)(UINTN)Fadt->Dsdt; } } + return Dsdt; } @@ -170,10 +171,10 @@ LocateAcpiDsdtFromFadt ( **/ EFI_ACPI_COMMON_HEADER * LocateAcpiTableInAcpiConfigurationTable ( - IN EFI_GUID *AcpiGuid, - IN UINT32 Signature, - IN EFI_ACPI_COMMON_HEADER *PreviousTable OPTIONAL, - OUT BOOLEAN *PreviousTableLocated OPTIONAL + IN EFI_GUID *AcpiGuid, + IN UINT32 Signature, + IN EFI_ACPI_COMMON_HEADER *PreviousTable OPTIONAL, + OUT BOOLEAN *PreviousTableLocated OPTIONAL ) { EFI_STATUS Status; @@ -194,7 +195,7 @@ LocateAcpiTableInAcpiConfigurationTable ( // // Get ACPI ConfigurationTable (RSD_PTR) // - Status = EfiGetSystemConfigurationTable(AcpiGuid, (VOID **)&Rsdp); + Status = EfiGetSystemConfigurationTable (AcpiGuid, (VOID **)&Rsdp); if (EFI_ERROR (Status) || (Rsdp == NULL)) { return NULL; } @@ -205,20 +206,20 @@ LocateAcpiTableInAcpiConfigurationTable ( // Search XSDT // if (Rsdp->Revision >= EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION) { - Xsdt = (EFI_ACPI_DESCRIPTION_HEADER *)(UINTN) Rsdp->XsdtAddress; + Xsdt = (EFI_ACPI_DESCRIPTION_HEADER *)(UINTN)Rsdp->XsdtAddress; if (Signature == EFI_ACPI_2_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE) { ASSERT (PreviousTable == NULL); // // It is to locate DSDT, // need to locate FADT first. // - Fadt = (EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE *) ScanTableInSDT ( - Xsdt, - sizeof (UINT64), - EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE, - NULL, - NULL - ); + Fadt = (EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE *)ScanTableInSDT ( + Xsdt, + sizeof (UINT64), + EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE, + NULL, + NULL + ); Table = LocateAcpiDsdtFromFadt (Fadt); } else if (Signature == EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE) { ASSERT (PreviousTable == NULL); @@ -226,13 +227,13 @@ LocateAcpiTableInAcpiConfigurationTable ( // It is to locate FACS, // need to locate FADT first. // - Fadt = (EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE *) ScanTableInSDT ( - Xsdt, - sizeof (UINT64), - EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE, - NULL, - NULL - ); + Fadt = (EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE *)ScanTableInSDT ( + Xsdt, + sizeof (UINT64), + EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE, + NULL, + NULL + ); Table = LocateAcpiFacsFromFadt (Fadt); } else { Table = ScanTableInSDT ( @@ -248,7 +249,8 @@ LocateAcpiTableInAcpiConfigurationTable ( if (Table != NULL) { return Table; } else if ((PreviousTableLocated != NULL) && - *PreviousTableLocated) { + *PreviousTableLocated) + { // // PreviousTable could be located in XSDT, // but next table could not be located in XSDT. @@ -259,20 +261,20 @@ LocateAcpiTableInAcpiConfigurationTable ( // // Search RSDT // - Rsdt = (EFI_ACPI_DESCRIPTION_HEADER *)(UINTN) Rsdp->RsdtAddress; + Rsdt = (EFI_ACPI_DESCRIPTION_HEADER *)(UINTN)Rsdp->RsdtAddress; if (Signature == EFI_ACPI_2_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE) { ASSERT (PreviousTable == NULL); // // It is to locate DSDT, // need to locate FADT first. // - Fadt = (EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE *) ScanTableInSDT ( - Rsdt, - sizeof (UINT32), - EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE, - NULL, - NULL - ); + Fadt = (EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE *)ScanTableInSDT ( + Rsdt, + sizeof (UINT32), + EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE, + NULL, + NULL + ); Table = LocateAcpiDsdtFromFadt (Fadt); } else if (Signature == EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE) { ASSERT (PreviousTable == NULL); @@ -280,13 +282,13 @@ LocateAcpiTableInAcpiConfigurationTable ( // It is to locate FACS, // need to locate FADT first. // - Fadt = (EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE *) ScanTableInSDT ( - Rsdt, - sizeof (UINT32), - EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE, - NULL, - NULL - ); + Fadt = (EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE *)ScanTableInSDT ( + Rsdt, + sizeof (UINT32), + EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE, + NULL, + NULL + ); Table = LocateAcpiFacsFromFadt (Fadt); } else { Table = ScanTableInSDT ( @@ -339,13 +341,13 @@ LocateAcpiTableInAcpiConfigurationTable ( EFI_ACPI_COMMON_HEADER * EFIAPI EfiLocateNextAcpiTable ( - IN UINT32 Signature, - IN EFI_ACPI_COMMON_HEADER *PreviousTable OPTIONAL + IN UINT32 Signature, + IN EFI_ACPI_COMMON_HEADER *PreviousTable OPTIONAL ) { - EFI_ACPI_COMMON_HEADER *Table; - BOOLEAN TempPreviousTableLocated; - BOOLEAN *PreviousTableLocated; + EFI_ACPI_COMMON_HEADER *Table; + BOOLEAN TempPreviousTableLocated; + BOOLEAN *PreviousTableLocated; if (PreviousTable != NULL) { if (PreviousTable->Signature != Signature) { @@ -355,7 +357,8 @@ EfiLocateNextAcpiTable ( return NULL; } else if ((Signature == EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE) || (Signature == EFI_ACPI_2_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE) || - (Signature == EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE)) { + (Signature == EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE)) + { // // There is only one FADT/DSDT/FACS table, // so don't try to locate next one. @@ -363,7 +366,7 @@ EfiLocateNextAcpiTable ( return NULL; } - PreviousTableLocated = &TempPreviousTableLocated; + PreviousTableLocated = &TempPreviousTableLocated; *PreviousTableLocated = FALSE; } else { PreviousTableLocated = NULL; @@ -378,7 +381,8 @@ EfiLocateNextAcpiTable ( if (Table != NULL) { return Table; } else if ((PreviousTableLocated != NULL) && - *PreviousTableLocated) { + *PreviousTableLocated) + { // // PreviousTable could be located in gEfiAcpi20TableGuid system // configuration table, but next table could not be located in @@ -415,7 +419,7 @@ EfiLocateNextAcpiTable ( EFI_ACPI_COMMON_HEADER * EFIAPI EfiLocateFirstAcpiTable ( - IN UINT32 Signature + IN UINT32 Signature ) { return EfiLocateNextAcpiTable (Signature, NULL); diff --git a/MdePkg/Library/UefiLib/Console.c b/MdePkg/Library/UefiLib/Console.c index e5b0484..c37e3d0 100644 --- a/MdePkg/Library/UefiLib/Console.c +++ b/MdePkg/Library/UefiLib/Console.c @@ -6,24 +6,22 @@ **/ - - - #include "UefiLibInternal.h" typedef struct { - CHAR16 WChar; - UINT32 Width; + CHAR16 WChar; + UINT32 Width; } UNICODE_WIDTH_ENTRY; -#define NARROW_CHAR 0xFFF0 -#define WIDE_CHAR 0xFFF1 +#define NARROW_CHAR 0xFFF0 +#define WIDE_CHAR 0xFFF1 -GLOBAL_REMOVE_IF_UNREFERENCED CONST UNICODE_WIDTH_ENTRY mUnicodeWidthTable[] = { +GLOBAL_REMOVE_IF_UNREFERENCED CONST UNICODE_WIDTH_ENTRY mUnicodeWidthTable[] = { // // General script area // - {(CHAR16)0x1FFF, 1}, + { (CHAR16)0x1FFF, 1 }, + /* * Merge the blocks and replace them with the above entry as they fall to * the same category and they are all narrow glyph. This will reduce search @@ -70,7 +68,8 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST UNICODE_WIDTH_ENTRY mUnicodeWidthTable[] = { // // Symbol area // - {(CHAR16)0x2FFF, 1}, + { (CHAR16)0x2FFF, 1 }, + /* * Merge the blocks and replace them with the above entry as they fall to * the same category and they are all narrow glyph. This will reduce search @@ -102,7 +101,8 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST UNICODE_WIDTH_ENTRY mUnicodeWidthTable[] = { // // CJK phonetics and symbol area // - {(CHAR16)0x33FF, 2}, + { (CHAR16)0x33FF, 2 }, + /* * Merge the blocks and replace them with the above entry as they fall to * the same category and they are all wide glyph. This will reduce search @@ -125,7 +125,8 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST UNICODE_WIDTH_ENTRY mUnicodeWidthTable[] = { // // CJK ideograph area // - {(CHAR16)0x9FFF, 2}, + { (CHAR16)0x9FFF, 2 }, + /* * Merge the blocks and replace them with the above entry as they fall to * the same category and they are all wide glyph. This will reduce search @@ -142,12 +143,13 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST UNICODE_WIDTH_ENTRY mUnicodeWidthTable[] = { // // Reserved // - {(CHAR16)0xABFF, 0}, // Reserved. 0xA000-0xA490 as Yi syllables. 0xA490-0xA4D0 + { (CHAR16)0xABFF, 0 }, // Reserved. 0xA000-0xA490 as Yi syllables. 0xA490-0xA4D0 // as Yi radicals in ver3.0. 0xA000-0xABFF // // Hangul syllables // - {(CHAR16)0xD7FF, 2}, + { (CHAR16)0xD7FF, 2 }, + /* * Merge the blocks and replace them with the above entry as they fall to * the same category and they are all wide glyph. This will reduce search @@ -163,26 +165,26 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST UNICODE_WIDTH_ENTRY mUnicodeWidthTable[] = { // // Surrogates area // - {(CHAR16)0xDFFF, 0}, // Surrogates, not used now. 0xD800-0xDFFF + { (CHAR16)0xDFFF, 0 }, // Surrogates, not used now. 0xD800-0xDFFF // // Private use area // - {(CHAR16)0xF8FF, 0}, // Private use area. 0xE000-0xF8FF + { (CHAR16)0xF8FF, 0 }, // Private use area. 0xE000-0xF8FF // // Compatibility area and specials // - {(CHAR16)0xFAFF, 2}, // CJK compatibility ideographs. 0xF900-0xFAFF - {(CHAR16)0xFB4F, 1}, // Alphabetic presentation forms. 0xFB00-0xFB4F - {(CHAR16)0xFDFF, 1}, // Arabic presentation forms-A. 0xFB50-0xFDFF - {(CHAR16)0xFE1F, 0}, // Reserved. As variation selectors in ver3.0. 0xFE00-0xFE1F - {(CHAR16)0xFE2F, 1}, // Combining half marks. 0xFE20-0xFE2F - {(CHAR16)0xFE4F, 2}, // CJK compatibility forms. 0xFE30-0xFE4F - {(CHAR16)0xFE6F, 1}, // Small Form Variants. 0xFE50-0xFE6F - {(CHAR16)0xFEFF, 1}, // Arabic presentation forms-B. 0xFE70-0xFEFF - {(CHAR16)0xFFEF, 1}, // Half width and full width forms. 0xFF00-0xFFEF - {(CHAR16)0xFFFF, 0}, // Speicials. 0xFFF0-0xFFFF + { (CHAR16)0xFAFF, 2 }, // CJK compatibility ideographs. 0xF900-0xFAFF + { (CHAR16)0xFB4F, 1 }, // Alphabetic presentation forms. 0xFB00-0xFB4F + { (CHAR16)0xFDFF, 1 }, // Arabic presentation forms-A. 0xFB50-0xFDFF + { (CHAR16)0xFE1F, 0 }, // Reserved. As variation selectors in ver3.0. 0xFE00-0xFE1F + { (CHAR16)0xFE2F, 1 }, // Combining half marks. 0xFE20-0xFE2F + { (CHAR16)0xFE4F, 2 }, // CJK compatibility forms. 0xFE30-0xFE4F + { (CHAR16)0xFE6F, 1 }, // Small Form Variants. 0xFE50-0xFE6F + { (CHAR16)0xFEFF, 1 }, // Arabic presentation forms-B. 0xFE70-0xFEFF + { (CHAR16)0xFFEF, 1 }, // Half width and full width forms. 0xFF00-0xFFEF + { (CHAR16)0xFFFF, 0 }, // Speicials. 0xFFF0-0xFFFF }; /** @@ -204,14 +206,14 @@ GetGlyphWidth ( IN CHAR16 UnicodeChar ) { - UINTN Index; - UINTN Low; - UINTN High; - CONST UNICODE_WIDTH_ENTRY *Item; - - Item = NULL; - Low = 0; - High = (sizeof (mUnicodeWidthTable)) / (sizeof (UNICODE_WIDTH_ENTRY)) - 1; + UINTN Index; + UINTN Low; + UINTN High; + CONST UNICODE_WIDTH_ENTRY *Item; + + Item = NULL; + Low = 0; + High = (sizeof (mUnicodeWidthTable)) / (sizeof (UNICODE_WIDTH_ENTRY)) - 1; while (Low <= High) { Index = (Low + High) >> 1; Item = &(mUnicodeWidthTable[Index]); @@ -264,8 +266,8 @@ UnicodeStringDisplayLength ( IN CONST CHAR16 *String ) { - UINTN Length; - UINTN Width; + UINTN Length; + UINTN Width; if (String == NULL) { return 0; @@ -304,32 +306,32 @@ UnicodeStringDisplayLength ( **/ UINTN UefiLibGetStringWidth ( - IN CHAR16 *String, - IN BOOLEAN LimitLen, - IN UINTN MaxWidth, - OUT UINTN *Offset + IN CHAR16 *String, + IN BOOLEAN LimitLen, + IN UINTN MaxWidth, + OUT UINTN *Offset ) { - UINTN Index; - UINTN Count; - UINTN IncrementValue; + UINTN Index; + UINTN Count; + UINTN IncrementValue; if (String == NULL) { return 0; } - Index = 0; - Count = 0; - IncrementValue = 1; + Index = 0; + Count = 0; + IncrementValue = 1; do { // // Advance to the null-terminator or to the first width directive // - for (;(String[Index] != NARROW_CHAR) && (String[Index] != WIDE_CHAR) && (String[Index] != 0); Index++) { + for ( ; (String[Index] != NARROW_CHAR) && (String[Index] != WIDE_CHAR) && (String[Index] != 0); Index++) { Count = Count + IncrementValue; - if (LimitLen && Count > MaxWidth) { + if (LimitLen && (Count > MaxWidth)) { break; } } @@ -341,7 +343,7 @@ UefiLibGetStringWidth ( break; } - if (LimitLen && Count > MaxWidth) { + if (LimitLen && (Count > MaxWidth)) { *Offset = Index; break; } @@ -415,12 +417,13 @@ CreatePopUp ( // number of lines in the popup // VA_START (Args, Key); - MaxLength = 0; + MaxLength = 0; NumberOfLines = 0; while ((String = VA_ARG (Args, CHAR16 *)) != NULL) { MaxLength = MAX (MaxLength, UefiLibGetStringWidth (String, FALSE, 0, NULL) / 2); NumberOfLines++; } + VA_END (Args); // @@ -518,8 +521,10 @@ CreatePopUp ( ConOut->OutputString (ConOut, TmpString); FreePool (TmpString); } + NumberOfLines--; } + VA_END (Args); // @@ -540,9 +545,9 @@ CreatePopUp ( // // Restore the cursor visibility, position, and attributes // - ConOut->EnableCursor (ConOut, SavedConsoleMode.CursorVisible); + ConOut->EnableCursor (ConOut, SavedConsoleMode.CursorVisible); ConOut->SetCursorPosition (ConOut, SavedConsoleMode.CursorColumn, SavedConsoleMode.CursorRow); - ConOut->SetAttribute (ConOut, SavedConsoleMode.Attribute); + ConOut->SetAttribute (ConOut, SavedConsoleMode.Attribute); // // Wait for a keystroke @@ -560,6 +565,7 @@ CreatePopUp ( if (Status != EFI_NOT_READY) { continue; } + gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &EventIndex); } } diff --git a/MdePkg/Library/UefiLib/UefiDriverModel.c b/MdePkg/Library/UefiLib/UefiDriverModel.c index deaf9a7..fdcf4f9 100644 --- a/MdePkg/Library/UefiLib/UefiDriverModel.c +++ b/MdePkg/Library/UefiLib/UefiDriverModel.c @@ -8,7 +8,6 @@ **/ - #include "UefiLibInternal.h" /** @@ -54,7 +53,8 @@ EfiLibInstallDriverBinding ( Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, + &gEfiDriverBindingProtocolGuid, + DriverBinding, NULL ); // @@ -65,8 +65,6 @@ EfiLibInstallDriverBinding ( return Status; } - - /** Uninstalls a Driver Binding Protocol instance. @@ -91,7 +89,8 @@ EfiLibUninstallDriverBinding ( Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, + &gEfiDriverBindingProtocolGuid, + DriverBinding, NULL ); // @@ -102,8 +101,6 @@ EfiLibUninstallDriverBinding ( return Status; } - - /** Installs and completes the initialization of a Driver Binding Protocol instance and optionally installs the Component Name, Driver Configuration and Driver Diagnostics Protocols. @@ -152,74 +149,94 @@ EfiLibInstallAllDriverProtocols ( DriverBinding->ImageHandle = ImageHandle; DriverBinding->DriverBindingHandle = DriverBindingHandle; - if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) { + if ((DriverDiagnostics == NULL) || FeaturePcdGet (PcdDriverDiagnosticsDisable)) { if (DriverConfiguration == NULL) { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, + &gEfiDriverBindingProtocolGuid, + DriverBinding, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, NULL ); } } else { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, NULL ); } } } else { if (DriverConfiguration == NULL) { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } } else { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - Status = gBS->InstallMultipleProtocolInterfaces ( + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } @@ -234,8 +251,6 @@ EfiLibInstallAllDriverProtocols ( return Status; } - - /** Uninstalls a Driver Binding Protocol instance and optionally uninstalls the Component Name, Driver Configuration and Driver Diagnostics Protocols. @@ -265,74 +280,94 @@ EfiLibUninstallAllDriverProtocols ( ASSERT (DriverBinding != NULL); - if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) { + if ((DriverDiagnostics == NULL) || FeaturePcdGet (PcdDriverDiagnosticsDisable)) { if (DriverConfiguration == NULL) { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, + &gEfiDriverBindingProtocolGuid, + DriverBinding, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, NULL ); } } else { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, NULL ); } } } else { if (DriverConfiguration == NULL) { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } } else { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - Status = gBS->UninstallMultipleProtocolInterfaces ( + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } @@ -347,8 +382,6 @@ EfiLibUninstallAllDriverProtocols ( return Status; } - - /** Installs Driver Binding Protocol with optional Component Name and Component Name 2 Protocols. @@ -375,12 +408,12 @@ EfiLibUninstallAllDriverProtocols ( EFI_STATUS EFIAPI EfiLibInstallDriverBindingComponentName2 ( - IN CONST EFI_HANDLE ImageHandle, - IN CONST EFI_SYSTEM_TABLE *SystemTable, - IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, - IN EFI_HANDLE DriverBindingHandle, - IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, - IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL + IN CONST EFI_HANDLE ImageHandle, + IN CONST EFI_SYSTEM_TABLE *SystemTable, + IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, + IN EFI_HANDLE DriverBindingHandle, + IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, + IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL ) { EFI_STATUS Status; @@ -393,37 +426,45 @@ EfiLibInstallDriverBindingComponentName2 ( DriverBinding->ImageHandle = ImageHandle; DriverBinding->DriverBindingHandle = DriverBindingHandle; - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, + &gEfiDriverBindingProtocolGuid, + DriverBinding, NULL ); - } else { + } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, NULL ); - } + } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { - Status = gBS->InstallMultipleProtocolInterfaces ( - &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - NULL - ); - } else { - Status = gBS->InstallMultipleProtocolInterfaces ( - &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - NULL - ); + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { + Status = gBS->InstallMultipleProtocolInterfaces ( + &DriverBinding->DriverBindingHandle, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + NULL + ); + } else { + Status = gBS->InstallMultipleProtocolInterfaces ( + &DriverBinding->DriverBindingHandle, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + NULL + ); } } @@ -435,8 +476,6 @@ EfiLibInstallDriverBindingComponentName2 ( return Status; } - - /** Uninstalls Driver Binding Protocol with optional Component Name and Component Name 2 Protocols. @@ -454,46 +493,54 @@ EfiLibInstallDriverBindingComponentName2 ( EFI_STATUS EFIAPI EfiLibUninstallDriverBindingComponentName2 ( - IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, - IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, - IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL + IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, + IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, + IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL ) { EFI_STATUS Status; ASSERT (DriverBinding != NULL); - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, + &gEfiDriverBindingProtocolGuid, + DriverBinding, NULL ); - } else { + } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, NULL ); - } + } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { - Status = gBS->UninstallMultipleProtocolInterfaces ( - DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - NULL - ); - } else { - Status = gBS->UninstallMultipleProtocolInterfaces ( - DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - NULL - ); + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { + Status = gBS->UninstallMultipleProtocolInterfaces ( + DriverBinding->DriverBindingHandle, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + NULL + ); + } else { + Status = gBS->UninstallMultipleProtocolInterfaces ( + DriverBinding->DriverBindingHandle, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + NULL + ); } } @@ -505,8 +552,6 @@ EfiLibUninstallDriverBindingComponentName2 ( return Status; } - - /** Installs Driver Binding Protocol with optional Component Name, Component Name 2, Driver Configuration, Driver Configuration 2, Driver Diagnostics, and Driver Diagnostics 2 Protocols. @@ -539,16 +584,16 @@ EfiLibUninstallDriverBindingComponentName2 ( EFI_STATUS EFIAPI EfiLibInstallAllDriverProtocols2 ( - IN CONST EFI_HANDLE ImageHandle, - IN CONST EFI_SYSTEM_TABLE *SystemTable, - IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, - IN EFI_HANDLE DriverBindingHandle, - IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, - IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL, - IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration OPTIONAL, - IN CONST EFI_DRIVER_CONFIGURATION2_PROTOCOL *DriverConfiguration2 OPTIONAL, - IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL, - IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 OPTIONAL + IN CONST EFI_HANDLE ImageHandle, + IN CONST EFI_SYSTEM_TABLE *SystemTable, + IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, + IN EFI_HANDLE DriverBindingHandle, + IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, + IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL, + IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration OPTIONAL, + IN CONST EFI_DRIVER_CONFIGURATION2_PROTOCOL *DriverConfiguration2 OPTIONAL, + IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL, + IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 OPTIONAL ) { EFI_STATUS Status; @@ -563,157 +608,205 @@ EfiLibInstallAllDriverProtocols2 ( if (DriverConfiguration2 == NULL) { if (DriverConfiguration == NULL) { - if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) { - if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((DriverDiagnostics == NULL) || FeaturePcdGet (PcdDriverDiagnosticsDisable)) { + if ((DriverDiagnostics2 == NULL) || FeaturePcdGet (PcdDriverDiagnostics2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, + &gEfiDriverBindingProtocolGuid, + DriverBinding, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, NULL ); } } } else { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } } } } else { - if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((DriverDiagnostics2 == NULL) || FeaturePcdGet (PcdDriverDiagnostics2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } } } else { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } @@ -721,173 +814,237 @@ EfiLibInstallAllDriverProtocols2 ( } } } else { - if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) { - if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((DriverDiagnostics == NULL) || FeaturePcdGet (PcdDriverDiagnosticsDisable)) { + if ((DriverDiagnostics2 == NULL) || FeaturePcdGet (PcdDriverDiagnostics2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, NULL ); } } } else { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } } } } else { - if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((DriverDiagnostics2 == NULL) || FeaturePcdGet (PcdDriverDiagnostics2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } } } else { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } @@ -897,173 +1054,237 @@ EfiLibInstallAllDriverProtocols2 ( } } else { if (DriverConfiguration == NULL) { - if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) { - if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((DriverDiagnostics == NULL) || FeaturePcdGet (PcdDriverDiagnosticsDisable)) { + if ((DriverDiagnostics2 == NULL) || FeaturePcdGet (PcdDriverDiagnostics2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, NULL ); } } } else { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } } } } else { - if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((DriverDiagnostics2 == NULL) || FeaturePcdGet (PcdDriverDiagnostics2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } } } else { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } @@ -1071,189 +1292,269 @@ EfiLibInstallAllDriverProtocols2 ( } } } else { - if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) { - if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((DriverDiagnostics == NULL) || FeaturePcdGet (PcdDriverDiagnosticsDisable)) { + if ((DriverDiagnostics2 == NULL) || FeaturePcdGet (PcdDriverDiagnostics2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, NULL ); } } } else { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } } } } else { - if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((DriverDiagnostics2 == NULL) || FeaturePcdGet (PcdDriverDiagnostics2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } } } else { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->InstallMultipleProtocolInterfaces ( &DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } @@ -1271,8 +1572,6 @@ EfiLibInstallAllDriverProtocols2 ( return Status; } - - /** Uninstalls Driver Binding Protocol with optional Component Name, Component Name 2, Driver Configuration, Driver Configuration 2, Driver Diagnostics, and Driver Diagnostics 2 Protocols. @@ -1296,13 +1595,13 @@ EfiLibInstallAllDriverProtocols2 ( EFI_STATUS EFIAPI EfiLibUninstallAllDriverProtocols2 ( - IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, - IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, - IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL, - IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration OPTIONAL, - IN CONST EFI_DRIVER_CONFIGURATION2_PROTOCOL *DriverConfiguration2 OPTIONAL, - IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL, - IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 OPTIONAL + IN EFI_DRIVER_BINDING_PROTOCOL *DriverBinding, + IN CONST EFI_COMPONENT_NAME_PROTOCOL *ComponentName OPTIONAL, + IN CONST EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2 OPTIONAL, + IN CONST EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration OPTIONAL, + IN CONST EFI_DRIVER_CONFIGURATION2_PROTOCOL *DriverConfiguration2 OPTIONAL, + IN CONST EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics OPTIONAL, + IN CONST EFI_DRIVER_DIAGNOSTICS2_PROTOCOL *DriverDiagnostics2 OPTIONAL ) { EFI_STATUS Status; @@ -1311,157 +1610,205 @@ EfiLibUninstallAllDriverProtocols2 ( if (DriverConfiguration2 == NULL) { if (DriverConfiguration == NULL) { - if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) { - if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((DriverDiagnostics == NULL) || FeaturePcdGet (PcdDriverDiagnosticsDisable)) { + if ((DriverDiagnostics2 == NULL) || FeaturePcdGet (PcdDriverDiagnostics2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, + &gEfiDriverBindingProtocolGuid, + DriverBinding, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, NULL ); } } } else { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } } } } else { - if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((DriverDiagnostics2 == NULL) || FeaturePcdGet (PcdDriverDiagnostics2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } } } else { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } @@ -1469,173 +1816,237 @@ EfiLibUninstallAllDriverProtocols2 ( } } } else { - if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) { - if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((DriverDiagnostics == NULL) || FeaturePcdGet (PcdDriverDiagnosticsDisable)) { + if ((DriverDiagnostics2 == NULL) || FeaturePcdGet (PcdDriverDiagnostics2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, NULL ); } } } else { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } } } } else { - if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((DriverDiagnostics2 == NULL) || FeaturePcdGet (PcdDriverDiagnostics2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } } } else { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } @@ -1645,173 +2056,237 @@ EfiLibUninstallAllDriverProtocols2 ( } } else { if (DriverConfiguration == NULL) { - if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) { - if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((DriverDiagnostics == NULL) || FeaturePcdGet (PcdDriverDiagnosticsDisable)) { + if ((DriverDiagnostics2 == NULL) || FeaturePcdGet (PcdDriverDiagnostics2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, NULL ); } } } else { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } } } } else { - if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((DriverDiagnostics2 == NULL) || FeaturePcdGet (PcdDriverDiagnostics2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } } } else { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } @@ -1819,189 +2294,269 @@ EfiLibUninstallAllDriverProtocols2 ( } } } else { - if (DriverDiagnostics == NULL || FeaturePcdGet(PcdDriverDiagnosticsDisable)) { - if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((DriverDiagnostics == NULL) || FeaturePcdGet (PcdDriverDiagnosticsDisable)) { + if ((DriverDiagnostics2 == NULL) || FeaturePcdGet (PcdDriverDiagnostics2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, NULL ); } } } else { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } } } } else { - if (DriverDiagnostics2 == NULL || FeaturePcdGet(PcdDriverDiagnostics2Disable)) { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((DriverDiagnostics2 == NULL) || FeaturePcdGet (PcdDriverDiagnostics2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, NULL ); } } } else { - if (ComponentName == NULL || FeaturePcdGet(PcdComponentNameDisable)) { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { + if ((ComponentName == NULL) || FeaturePcdGet (PcdComponentNameDisable)) { + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } else { Status = gBS->UninstallMultipleProtocolInterfaces ( DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } } else { - if (ComponentName2 == NULL || FeaturePcdGet(PcdComponentName2Disable)) { - Status = gBS->UninstallMultipleProtocolInterfaces ( - DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, - NULL - ); - } else { - Status = gBS->UninstallMultipleProtocolInterfaces ( - DriverBinding->DriverBindingHandle, - &gEfiDriverBindingProtocolGuid, DriverBinding, - &gEfiComponentNameProtocolGuid, ComponentName, - &gEfiComponentName2ProtocolGuid, ComponentName2, - &gEfiDriverConfigurationProtocolGuid, DriverConfiguration, - &gEfiDriverConfiguration2ProtocolGuid, DriverConfiguration2, - &gEfiDriverDiagnosticsProtocolGuid, DriverDiagnostics, - &gEfiDriverDiagnostics2ProtocolGuid, DriverDiagnostics2, + if ((ComponentName2 == NULL) || FeaturePcdGet (PcdComponentName2Disable)) { + Status = gBS->UninstallMultipleProtocolInterfaces ( + DriverBinding->DriverBindingHandle, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, + NULL + ); + } else { + Status = gBS->UninstallMultipleProtocolInterfaces ( + DriverBinding->DriverBindingHandle, + &gEfiDriverBindingProtocolGuid, + DriverBinding, + &gEfiComponentNameProtocolGuid, + ComponentName, + &gEfiComponentName2ProtocolGuid, + ComponentName2, + &gEfiDriverConfigurationProtocolGuid, + DriverConfiguration, + &gEfiDriverConfiguration2ProtocolGuid, + DriverConfiguration2, + &gEfiDriverDiagnosticsProtocolGuid, + DriverDiagnostics, + &gEfiDriverDiagnostics2ProtocolGuid, + DriverDiagnostics2, NULL ); } diff --git a/MdePkg/Library/UefiLib/UefiLib.c b/MdePkg/Library/UefiLib/UefiLib.c index c2d143e..95d0319 100644 --- a/MdePkg/Library/UefiLib/UefiLib.c +++ b/MdePkg/Library/UefiLib/UefiLib.c @@ -10,7 +10,6 @@ **/ - #include "UefiLibInternal.h" /** @@ -54,10 +53,10 @@ CompareIso639LanguageCode ( UINT32 Name1; UINT32 Name2; - Name1 = ReadUnaligned24 ((CONST UINT32 *) Language1); - Name2 = ReadUnaligned24 ((CONST UINT32 *) Language2); + Name1 = ReadUnaligned24 ((CONST UINT32 *)Language1); + Name2 = ReadUnaligned24 ((CONST UINT32 *)Language2); - return (BOOLEAN) (Name1 == Name2); + return (BOOLEAN)(Name1 == Name2); } /** @@ -92,7 +91,7 @@ EfiGetSystemConfigurationTable ( ASSERT (Table != NULL); SystemTable = gST; - *Table = NULL; + *Table = NULL; for (Index = 0; Index < SystemTable->NumberOfTableEntries; Index++) { if (CompareGuid (TableGuid, &(SystemTable->ConfigurationTable[Index].VendorGuid))) { *Table = SystemTable->ConfigurationTable[Index].VendorTable; @@ -132,7 +131,7 @@ EfiGetSystemConfigurationTable ( **/ EFI_EVENT EFIAPI -EfiCreateProtocolNotifyEvent( +EfiCreateProtocolNotifyEvent ( IN EFI_GUID *ProtocolGuid, IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction, @@ -226,7 +225,7 @@ EfiNamedEventListen ( EVT_NOTIFY_SIGNAL, NotifyTpl, NotifyFunction, - (VOID *) NotifyContext, + (VOID *)NotifyContext, &Event ); ASSERT_EFI_ERROR (Status); @@ -246,7 +245,7 @@ EfiNamedEventListen ( // Status = gBS->RegisterProtocolNotify ( - (EFI_GUID *) Name, + (EFI_GUID *)Name, Event, RegistrationLocal ); @@ -277,12 +276,12 @@ EfiNamedEventSignal ( EFI_STATUS Status; EFI_HANDLE Handle; - ASSERT(Name != NULL); + ASSERT (Name != NULL); Handle = NULL; Status = gBS->InstallProtocolInterface ( &Handle, - (EFI_GUID *) Name, + (EFI_GUID *)Name, EFI_NATIVE_INTERFACE, NULL ); @@ -290,7 +289,7 @@ EfiNamedEventSignal ( Status = gBS->UninstallProtocolInterface ( Handle, - (EFI_GUID *) Name, + (EFI_GUID *)Name, NULL ); ASSERT_EFI_ERROR (Status); @@ -313,11 +312,11 @@ EfiNamedEventSignal ( EFI_STATUS EFIAPI EfiEventGroupSignal ( - IN CONST EFI_GUID *EventGroup + IN CONST EFI_GUID *EventGroup ) { - EFI_STATUS Status; - EFI_EVENT Event; + EFI_STATUS Status; + EFI_EVENT Event; if (EventGroup == NULL) { return EFI_INVALID_PARAMETER; @@ -353,8 +352,8 @@ EfiEventGroupSignal ( VOID EFIAPI EfiEventEmptyFunction ( - IN EFI_EVENT Event, - IN VOID *Context + IN EFI_EVENT Event, + IN VOID *Context ) { } @@ -377,7 +376,7 @@ EfiGetCurrentTpl ( VOID ) { - EFI_TPL Tpl; + EFI_TPL Tpl; Tpl = gBS->RaiseTPL (TPL_HIGH_LEVEL); gBS->RestoreTPL (Tpl); @@ -385,7 +384,6 @@ EfiGetCurrentTpl ( return Tpl; } - /** Initializes a basic mutual exclusion lock. @@ -406,15 +404,15 @@ EFI_LOCK * EFIAPI EfiInitializeLock ( IN OUT EFI_LOCK *Lock, - IN EFI_TPL Priority + IN EFI_TPL Priority ) { ASSERT (Lock != NULL); ASSERT (Priority <= TPL_HIGH_LEVEL); - Lock->Tpl = Priority; - Lock->OwnerTpl = TPL_APPLICATION; - Lock->Lock = EfiLockReleased ; + Lock->Tpl = Priority; + Lock->OwnerTpl = TPL_APPLICATION; + Lock->Lock = EfiLockReleased; return Lock; } @@ -466,7 +464,6 @@ EfiAcquireLockOrFail ( IN EFI_LOCK *Lock ) { - ASSERT (Lock != NULL); ASSERT (Lock->Lock != EfiLockUninitialized); @@ -503,7 +500,7 @@ EfiReleaseLock ( IN EFI_LOCK *Lock ) { - EFI_TPL Tpl; + EFI_TPL Tpl; ASSERT (Lock != NULL); ASSERT (Lock->Lock == EfiLockAcquired); @@ -541,19 +538,19 @@ EfiReleaseLock ( EFI_STATUS EFIAPI EfiTestManagedDevice ( - IN CONST EFI_HANDLE ControllerHandle, - IN CONST EFI_HANDLE DriverBindingHandle, - IN CONST EFI_GUID *ProtocolGuid + IN CONST EFI_HANDLE ControllerHandle, + IN CONST EFI_HANDLE DriverBindingHandle, + IN CONST EFI_GUID *ProtocolGuid ) { - EFI_STATUS Status; - VOID *ManagedInterface; + EFI_STATUS Status; + VOID *ManagedInterface; ASSERT (ProtocolGuid != NULL); Status = gBS->OpenProtocol ( ControllerHandle, - (EFI_GUID *) ProtocolGuid, + (EFI_GUID *)ProtocolGuid, &ManagedInterface, DriverBindingHandle, ControllerHandle, @@ -562,7 +559,7 @@ EfiTestManagedDevice ( if (!EFI_ERROR (Status)) { gBS->CloseProtocol ( ControllerHandle, - (EFI_GUID *) ProtocolGuid, + (EFI_GUID *)ProtocolGuid, DriverBindingHandle, ControllerHandle ); @@ -598,15 +595,15 @@ EfiTestManagedDevice ( EFI_STATUS EFIAPI EfiTestChildHandle ( - IN CONST EFI_HANDLE ControllerHandle, - IN CONST EFI_HANDLE ChildHandle, - IN CONST EFI_GUID *ProtocolGuid + IN CONST EFI_HANDLE ControllerHandle, + IN CONST EFI_HANDLE ChildHandle, + IN CONST EFI_GUID *ProtocolGuid ) { - EFI_STATUS Status; - EFI_OPEN_PROTOCOL_INFORMATION_ENTRY *OpenInfoBuffer; - UINTN EntryCount; - UINTN Index; + EFI_STATUS Status; + EFI_OPEN_PROTOCOL_INFORMATION_ENTRY *OpenInfoBuffer; + UINTN EntryCount; + UINTN Index; ASSERT (ProtocolGuid != NULL); @@ -616,7 +613,7 @@ EfiTestChildHandle ( // Status = gBS->OpenProtocolInformation ( ControllerHandle, - (EFI_GUID *) ProtocolGuid, + (EFI_GUID *)ProtocolGuid, &OpenInfoBuffer, &EntryCount ); @@ -630,7 +627,8 @@ EfiTestChildHandle ( Status = EFI_UNSUPPORTED; for (Index = 0; Index < EntryCount; Index++) { if ((OpenInfoBuffer[Index].ControllerHandle == ChildHandle) && - (OpenInfoBuffer[Index].Attributes & EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER) != 0) { + ((OpenInfoBuffer[Index].Attributes & EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER) != 0)) + { Status = EFI_SUCCESS; break; } @@ -653,18 +651,23 @@ EfiTestChildHandle ( EFI_STATUS EFIAPI IsLanguageSupported ( - IN CONST CHAR8 *SupportedLanguages, - IN CONST CHAR8 *TargetLanguage + IN CONST CHAR8 *SupportedLanguages, + IN CONST CHAR8 *TargetLanguage ) { - UINTN Index; + UINTN Index; + while (*SupportedLanguages != 0) { - for (Index = 0; SupportedLanguages[Index] != 0 && SupportedLanguages[Index] != ';'; Index++); - if ((AsciiStrnCmp(SupportedLanguages, TargetLanguage, Index) == 0) && (TargetLanguage[Index] == 0)) { + for (Index = 0; SupportedLanguages[Index] != 0 && SupportedLanguages[Index] != ';'; Index++) { + } + + if ((AsciiStrnCmp (SupportedLanguages, TargetLanguage, Index) == 0) && (TargetLanguage[Index] == 0)) { return EFI_SUCCESS; } + SupportedLanguages += Index; - for (; *SupportedLanguages != 0 && *SupportedLanguages == ';'; SupportedLanguages++); + for ( ; *SupportedLanguages != 0 && *SupportedLanguages == ';'; SupportedLanguages++) { + } } return EFI_UNSUPPORTED; @@ -712,7 +715,7 @@ LookupUnicodeString ( // // Make sure the parameters are valid // - if (Language == NULL || UnicodeString == NULL) { + if ((Language == NULL) || (UnicodeString == NULL)) { return EFI_INVALID_PARAMETER; } @@ -720,7 +723,7 @@ LookupUnicodeString ( // If there are no supported languages, or the Unicode String Table is empty, then the // Unicode String specified by Language is not supported by this Unicode String Table // - if (SupportedLanguages == NULL || UnicodeStringTable == NULL) { + if ((SupportedLanguages == NULL) || (UnicodeStringTable == NULL)) { return EFI_UNSUPPORTED; } @@ -729,13 +732,11 @@ LookupUnicodeString ( // while (*SupportedLanguages != 0) { if (CompareIso639LanguageCode (Language, SupportedLanguages)) { - // // Search the Unicode String Table for the matching Language specifier // while (UnicodeStringTable->Language != NULL) { if (CompareIso639LanguageCode (Language, UnicodeStringTable->Language)) { - // // A matching string was found, so return it // @@ -755,8 +756,6 @@ LookupUnicodeString ( return EFI_UNSUPPORTED; } - - /** This function looks up a Unicode string in UnicodeStringTable. @@ -807,14 +806,14 @@ LookupUnicodeString2 ( IN BOOLEAN Iso639Language ) { - BOOLEAN Found; - UINTN Index; - CHAR8 *LanguageString; + BOOLEAN Found; + UINTN Index; + CHAR8 *LanguageString; // // Make sure the parameters are valid // - if (Language == NULL || UnicodeString == NULL) { + if ((Language == NULL) || (UnicodeString == NULL)) { return EFI_INVALID_PARAMETER; } @@ -822,7 +821,7 @@ LookupUnicodeString2 ( // If there are no supported languages, or the Unicode String Table is empty, then the // Unicode String specified by Language is not supported by this Unicode String Table // - if (SupportedLanguages == NULL || UnicodeStringTable == NULL) { + if ((SupportedLanguages == NULL) || (UnicodeStringTable == NULL)) { return EFI_UNSUPPORTED; } @@ -836,13 +835,13 @@ LookupUnicodeString2 ( Found = TRUE; break; } + SupportedLanguages += 3; } } else { - Found = !IsLanguageSupported(SupportedLanguages, Language); + Found = !IsLanguageSupported (SupportedLanguages, Language); } - // // If Language is not a member of SupportedLanguages, then return EFI_UNSUPPORTED // @@ -856,21 +855,25 @@ LookupUnicodeString2 ( while (UnicodeStringTable->Language != NULL) { LanguageString = UnicodeStringTable->Language; while (0 != *LanguageString) { - for (Index = 0 ;LanguageString[Index] != 0 && LanguageString[Index] != ';'; Index++); - if (AsciiStrnCmp(LanguageString, Language, Index) == 0) { + for (Index = 0; LanguageString[Index] != 0 && LanguageString[Index] != ';'; Index++) { + } + + if (AsciiStrnCmp (LanguageString, Language, Index) == 0) { *UnicodeString = UnicodeStringTable->UnicodeString; return EFI_SUCCESS; } + LanguageString += Index; - for (Index = 0 ;LanguageString[Index] != 0 && LanguageString[Index] == ';'; Index++); + for (Index = 0; LanguageString[Index] != 0 && LanguageString[Index] == ';'; Index++) { + } } + UnicodeStringTable++; } return EFI_UNSUPPORTED; } - /** This function adds a Unicode string to UnicodeStringTable. @@ -921,7 +924,7 @@ AddUnicodeString ( // // Make sure the parameter are valid // - if (Language == NULL || UnicodeString == NULL || UnicodeStringTable == NULL) { + if ((Language == NULL) || (UnicodeString == NULL) || (UnicodeStringTable == NULL)) { return EFI_INVALID_PARAMETER; } @@ -944,7 +947,6 @@ AddUnicodeString ( // while (*SupportedLanguages != 0) { if (CompareIso639LanguageCode (Language, SupportedLanguages)) { - // // Determine the size of the Unicode String Table by looking for a NULL Language entry // @@ -977,10 +979,10 @@ AddUnicodeString ( // if (*UnicodeStringTable != NULL) { CopyMem ( - NewUnicodeStringTable, - *UnicodeStringTable, - NumberOfEntries * sizeof (EFI_UNICODE_STRING_TABLE) - ); + NewUnicodeStringTable, + *UnicodeStringTable, + NumberOfEntries * sizeof (EFI_UNICODE_STRING_TABLE) + ); } // @@ -995,16 +997,16 @@ AddUnicodeString ( // // Compute the length of the Unicode String // - for (UnicodeStringLength = 0; UnicodeString[UnicodeStringLength] != 0; UnicodeStringLength++) - ; + for (UnicodeStringLength = 0; UnicodeString[UnicodeStringLength] != 0; UnicodeStringLength++) { + } // // Allocate space for a copy of the Unicode String // NewUnicodeStringTable[NumberOfEntries].UnicodeString = AllocateCopyPool ( - (UnicodeStringLength + 1) * sizeof (CHAR16), - UnicodeString - ); + (UnicodeStringLength + 1) * sizeof (CHAR16), + UnicodeString + ); if (NewUnicodeStringTable[NumberOfEntries].UnicodeString == NULL) { FreePool (NewUnicodeStringTable[NumberOfEntries].Language); FreePool (NewUnicodeStringTable); @@ -1014,8 +1016,8 @@ AddUnicodeString ( // // Mark the end of the Unicode String Table // - NewUnicodeStringTable[NumberOfEntries + 1].Language = NULL; - NewUnicodeStringTable[NumberOfEntries + 1].UnicodeString = NULL; + NewUnicodeStringTable[NumberOfEntries + 1].Language = NULL; + NewUnicodeStringTable[NumberOfEntries + 1].UnicodeString = NULL; // // Free the old Unicode String Table @@ -1038,7 +1040,6 @@ AddUnicodeString ( return EFI_UNSUPPORTED; } - /** This function adds the Null-terminated Unicode string specified by UnicodeString to UnicodeStringTable. @@ -1102,7 +1103,7 @@ AddUnicodeString2 ( // // Make sure the parameter are valid // - if (Language == NULL || UnicodeString == NULL || UnicodeStringTable == NULL) { + if ((Language == NULL) || (UnicodeString == NULL) || (UnicodeStringTable == NULL)) { return EFI_INVALID_PARAMETER; } @@ -1130,11 +1131,13 @@ AddUnicodeString2 ( Found = TRUE; break; } + SupportedLanguages += 3; } } else { - Found = !IsLanguageSupported(SupportedLanguages, Language); + Found = !IsLanguageSupported (SupportedLanguages, Language); } + // // If Language is not a member of SupportedLanguages, then return EFI_UNSUPPORTED // @@ -1152,14 +1155,18 @@ AddUnicodeString2 ( LanguageString = OldUnicodeStringTable->Language; while (*LanguageString != 0) { - for (Index = 0; LanguageString[Index] != 0 && LanguageString[Index] != ';'; Index++); + for (Index = 0; LanguageString[Index] != 0 && LanguageString[Index] != ';'; Index++) { + } if (AsciiStrnCmp (Language, LanguageString, Index) == 0) { return EFI_ALREADY_STARTED; } + LanguageString += Index; - for (; *LanguageString != 0 && *LanguageString == ';'; LanguageString++); + for ( ; *LanguageString != 0 && *LanguageString == ';'; LanguageString++) { + } } + OldUnicodeStringTable++; NumberOfEntries++; } @@ -1190,7 +1197,7 @@ AddUnicodeString2 ( // // Allocate space for a copy of the Language specifier // - NewUnicodeStringTable[NumberOfEntries].Language = AllocateCopyPool (AsciiStrSize(Language), Language); + NewUnicodeStringTable[NumberOfEntries].Language = AllocateCopyPool (AsciiStrSize (Language), Language); if (NewUnicodeStringTable[NumberOfEntries].Language == NULL) { FreePool (NewUnicodeStringTable); return EFI_OUT_OF_RESOURCES; @@ -1199,7 +1206,8 @@ AddUnicodeString2 ( // // Compute the length of the Unicode String // - for (UnicodeStringLength = 0; UnicodeString[UnicodeStringLength] != 0; UnicodeStringLength++); + for (UnicodeStringLength = 0; UnicodeString[UnicodeStringLength] != 0; UnicodeStringLength++) { + } // // Allocate space for a copy of the Unicode String @@ -1214,8 +1222,8 @@ AddUnicodeString2 ( // // Mark the end of the Unicode String Table // - NewUnicodeStringTable[NumberOfEntries + 1].Language = NULL; - NewUnicodeStringTable[NumberOfEntries + 1].UnicodeString = NULL; + NewUnicodeStringTable[NumberOfEntries + 1].Language = NULL; + NewUnicodeStringTable[NumberOfEntries + 1].UnicodeString = NULL; // // Free the old Unicode String Table @@ -1250,7 +1258,7 @@ FreeUnicodeStringTable ( IN EFI_UNICODE_STRING_TABLE *UnicodeStringTable ) { - UINTN Index; + UINTN Index; // // If the Unicode String Table is NULL, then it is already freed @@ -1263,7 +1271,6 @@ FreeUnicodeStringTable ( // Loop through the Unicode String Table until we reach the end of table marker // for (Index = 0; UnicodeStringTable[Index].Language != NULL; Index++) { - // // Free the Language string from the Unicode String Table // @@ -1285,7 +1292,6 @@ FreeUnicodeStringTable ( return EFI_SUCCESS; } - /** Returns the status whether get the variable success. The function retrieves variable through the UEFI Runtime Service GetVariable(). The @@ -1326,10 +1332,10 @@ GetVariable2 ( BufferSize = 0; *Value = NULL; if (Size != NULL) { - *Size = 0; + *Size = 0; } - Status = gRT->GetVariable ((CHAR16 *) Name, (EFI_GUID *) Guid, NULL, &BufferSize, *Value); + Status = gRT->GetVariable ((CHAR16 *)Name, (EFI_GUID *)Guid, NULL, &BufferSize, *Value); if (Status != EFI_BUFFER_TOO_SMALL) { return Status; } @@ -1346,9 +1352,9 @@ GetVariable2 ( // // Get the variable data. // - Status = gRT->GetVariable ((CHAR16 *) Name, (EFI_GUID *) Guid, NULL, &BufferSize, *Value); + Status = gRT->GetVariable ((CHAR16 *)Name, (EFI_GUID *)Guid, NULL, &BufferSize, *Value); if (EFI_ERROR (Status)) { - FreePool(*Value); + FreePool (*Value); *Value = NULL; } @@ -1384,24 +1390,24 @@ GetVariable2 ( **/ EFI_STATUS EFIAPI -GetVariable3( - IN CONST CHAR16 *Name, - IN CONST EFI_GUID *Guid, - OUT VOID **Value, - OUT UINTN *Size OPTIONAL, - OUT UINT32 *Attr OPTIONAL +GetVariable3 ( + IN CONST CHAR16 *Name, + IN CONST EFI_GUID *Guid, + OUT VOID **Value, + OUT UINTN *Size OPTIONAL, + OUT UINT32 *Attr OPTIONAL ) { EFI_STATUS Status; UINTN BufferSize; - ASSERT(Name != NULL && Guid != NULL && Value != NULL); + ASSERT (Name != NULL && Guid != NULL && Value != NULL); // // Try to get the variable size. // BufferSize = 0; - *Value = NULL; + *Value = NULL; if (Size != NULL) { *Size = 0; } @@ -1410,7 +1416,7 @@ GetVariable3( *Attr = 0; } - Status = gRT->GetVariable((CHAR16 *)Name, (EFI_GUID *)Guid, Attr, &BufferSize, *Value); + Status = gRT->GetVariable ((CHAR16 *)Name, (EFI_GUID *)Guid, Attr, &BufferSize, *Value); if (Status != EFI_BUFFER_TOO_SMALL) { return Status; } @@ -1418,8 +1424,8 @@ GetVariable3( // // Allocate buffer to get the variable. // - *Value = AllocatePool(BufferSize); - ASSERT(*Value != NULL); + *Value = AllocatePool (BufferSize); + ASSERT (*Value != NULL); if (*Value == NULL) { return EFI_OUT_OF_RESOURCES; } @@ -1427,9 +1433,9 @@ GetVariable3( // // Get the variable data. // - Status = gRT->GetVariable((CHAR16 *)Name, (EFI_GUID *)Guid, Attr, &BufferSize, *Value); - if (EFI_ERROR(Status)) { - FreePool(*Value); + Status = gRT->GetVariable ((CHAR16 *)Name, (EFI_GUID *)Guid, Attr, &BufferSize, *Value); + if (EFI_ERROR (Status)) { + FreePool (*Value); *Value = NULL; } @@ -1462,9 +1468,9 @@ GetVariable3( EFI_STATUS EFIAPI GetEfiGlobalVariable2 ( - IN CONST CHAR16 *Name, - OUT VOID **Value, - OUT UINTN *Size OPTIONAL + IN CONST CHAR16 *Name, + OUT VOID **Value, + OUT UINTN *Size OPTIONAL ) { return GetVariable2 (Name, &gEfiGlobalVariableGuid, Value, Size); @@ -1540,7 +1546,8 @@ GetBestLanguage ( // If in RFC 4646 mode, then determine the length of the first RFC 4646 language code in Language // if (Iso639Language == 0) { - for (LanguageLength = 0; Language[LanguageLength] != 0 && Language[LanguageLength] != ';'; LanguageLength++); + for (LanguageLength = 0; Language[LanguageLength] != 0 && Language[LanguageLength] != ';'; LanguageLength++) { + } } // @@ -1558,11 +1565,15 @@ GetBestLanguage ( // // Skip ';' characters in Supported // - for (; *Supported != '\0' && *Supported == ';'; Supported++); + for ( ; *Supported != '\0' && *Supported == ';'; Supported++) { + } + // // Determine the length of the next language code in Supported // - for (CompareLength = 0; Supported[CompareLength] != 0 && Supported[CompareLength] != ';'; CompareLength++); + for (CompareLength = 0; Supported[CompareLength] != 0 && Supported[CompareLength] != ';'; CompareLength++) { + } + // // If Language is longer than the Supported, then skip to the next language // @@ -1570,6 +1581,7 @@ GetBestLanguage ( continue; } } + // // See if the first LanguageLength characters in Supported match Language // @@ -1582,6 +1594,7 @@ GetBestLanguage ( if (BestLanguage == NULL) { return NULL; } + return CopyMem (BestLanguage, Supported, CompareLength); } } @@ -1595,10 +1608,12 @@ GetBestLanguage ( // // If RFC 4646 mode, then trim Language from the right to the next '-' character // - for (LanguageLength--; LanguageLength > 0 && Language[LanguageLength] != '-'; LanguageLength--); + for (LanguageLength--; LanguageLength > 0 && Language[LanguageLength] != '-'; LanguageLength--) { + } } } } + VA_END (Args); // @@ -1646,7 +1661,7 @@ EfiLocateProtocolBuffer ( // // Check input parameters // - if (Protocol == NULL || NoProtocols == NULL || Buffer == NULL) { + if ((Protocol == NULL) || (NoProtocols == NULL) || (Buffer == NULL)) { return EFI_INVALID_PARAMETER; } @@ -1654,7 +1669,7 @@ EfiLocateProtocolBuffer ( // Initialze output parameters // *NoProtocols = 0; - *Buffer = NULL; + *Buffer = NULL; // // Retrieve the array of handles that support Protocol @@ -1685,6 +1700,7 @@ EfiLocateProtocolBuffer ( gBS->FreePool (HandleBuffer); return EFI_OUT_OF_RESOURCES; } + ZeroMem (*Buffer, NoHandles * sizeof (VOID *)); // @@ -1794,18 +1810,19 @@ EfiOpenFileByDevicePath ( IN UINT64 Attributes ) { - EFI_STATUS Status; - EFI_HANDLE FileSystemHandle; - EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *FileSystem; - EFI_FILE_PROTOCOL *LastFile; - FILEPATH_DEVICE_PATH *FilePathNode; - CHAR16 *AlignedPathName; - CHAR16 *PathName; - EFI_FILE_PROTOCOL *NextFile; + EFI_STATUS Status; + EFI_HANDLE FileSystemHandle; + EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *FileSystem; + EFI_FILE_PROTOCOL *LastFile; + FILEPATH_DEVICE_PATH *FilePathNode; + CHAR16 *AlignedPathName; + CHAR16 *PathName; + EFI_FILE_PROTOCOL *NextFile; if (File == NULL) { return EFI_INVALID_PARAMETER; } + *File = NULL; if (FilePath == NULL) { @@ -1823,6 +1840,7 @@ EfiOpenFileByDevicePath ( if (EFI_ERROR (Status)) { return Status; } + Status = gBS->OpenProtocol ( FileSystemHandle, &gEfiSimpleFileSystemProtocolGuid, @@ -1848,11 +1866,13 @@ EfiOpenFileByDevicePath ( // Traverse the device path nodes relative to the filesystem. // while (!IsDevicePathEnd (*FilePath)) { - if (DevicePathType (*FilePath) != MEDIA_DEVICE_PATH || - DevicePathSubType (*FilePath) != MEDIA_FILEPATH_DP) { + if ((DevicePathType (*FilePath) != MEDIA_DEVICE_PATH) || + (DevicePathSubType (*FilePath) != MEDIA_FILEPATH_DP)) + { Status = EFI_INVALID_PARAMETER; goto CloseLastFile; } + FilePathNode = (FILEPATH_DEVICE_PATH *)*FilePath; // @@ -1862,7 +1882,7 @@ EfiOpenFileByDevicePath ( // if ((UINTN)FilePathNode->PathName % sizeof *FilePathNode->PathName == 0) { AlignedPathName = NULL; - PathName = FilePathNode->PathName; + PathName = FilePathNode->PathName; } else { AlignedPathName = AllocateCopyPool ( (DevicePathNodeLength (FilePathNode) - @@ -1873,6 +1893,7 @@ EfiOpenFileByDevicePath ( Status = EFI_OUT_OF_RESOURCES; goto CloseLastFile; } + PathName = AlignedPathName; } @@ -1894,6 +1915,7 @@ EfiOpenFileByDevicePath ( if (AlignedPathName != NULL) { FreePool (AlignedPathName); } + if (EFI_ERROR (Status)) { goto CloseLastFile; } @@ -1902,7 +1924,7 @@ EfiOpenFileByDevicePath ( // Advance to the next device path node. // LastFile->Close (LastFile); - LastFile = NextFile; + LastFile = NextFile; *FilePath = NextDevicePathNode (FilePathNode); } diff --git a/MdePkg/Library/UefiLib/UefiLibInternal.h b/MdePkg/Library/UefiLib/UefiLibInternal.h index 60b5297..4365282 100644 --- a/MdePkg/Library/UefiLib/UefiLibInternal.h +++ b/MdePkg/Library/UefiLib/UefiLibInternal.h @@ -8,7 +8,6 @@ #ifndef __UEFI_LIB_INTERNAL_H_ #define __UEFI_LIB_INTERNAL_H_ - #include #include #include diff --git a/MdePkg/Library/UefiLib/UefiLibPrint.c b/MdePkg/Library/UefiLib/UefiLibPrint.c index 41db7bd..39edeb7 100644 --- a/MdePkg/Library/UefiLib/UefiLibPrint.c +++ b/MdePkg/Library/UefiLib/UefiLibPrint.c @@ -9,7 +9,7 @@ #include "UefiLibInternal.h" -GLOBAL_REMOVE_IF_UNREFERENCED EFI_GRAPHICS_OUTPUT_BLT_PIXEL mEfiColors[16] = { +GLOBAL_REMOVE_IF_UNREFERENCED EFI_GRAPHICS_OUTPUT_BLT_PIXEL mEfiColors[16] = { { 0x00, 0x00, 0x00, 0x00 }, { 0x98, 0x00, 0x00, 0x00 }, { 0x00, 0x98, 0x00, 0x00 }, @@ -59,17 +59,17 @@ InternalPrint ( UINTN BufferSize; ASSERT (Format != NULL); - ASSERT (((UINTN) Format & BIT0) == 0); + ASSERT (((UINTN)Format & BIT0) == 0); ASSERT (Console != NULL); BufferSize = (PcdGet32 (PcdUefiLibMaxPrintBufferSize) + 1) * sizeof (CHAR16); - Buffer = (CHAR16 *) AllocatePool(BufferSize); + Buffer = (CHAR16 *)AllocatePool (BufferSize); ASSERT (Buffer != NULL); Return = UnicodeVSPrint (Buffer, BufferSize, Format, Marker); - if (Console != NULL && Return > 0) { + if ((Console != NULL) && (Return > 0)) { // // To be extra safe make sure Console has been initialized // @@ -111,8 +111,8 @@ Print ( ... ) { - VA_LIST Marker; - UINTN Return; + VA_LIST Marker; + UINTN Return; VA_START (Marker, Format); @@ -150,19 +150,18 @@ ErrorPrint ( ... ) { - VA_LIST Marker; - UINTN Return; + VA_LIST Marker; + UINTN Return; VA_START (Marker, Format); - Return = InternalPrint( Format, gST->StdErr, Marker); + Return = InternalPrint (Format, gST->StdErr, Marker); VA_END (Marker); return Return; } - /** Internal function which prints a formatted ASCII string to the console output device specified by Console @@ -199,7 +198,7 @@ AsciiInternalPrint ( BufferSize = (PcdGet32 (PcdUefiLibMaxPrintBufferSize) + 1) * sizeof (CHAR16); - Buffer = (CHAR16 *) AllocatePool(BufferSize); + Buffer = (CHAR16 *)AllocatePool (BufferSize); ASSERT (Buffer != NULL); Return = UnicodeVSPrintAsciiFormat (Buffer, BufferSize, Format, Marker); @@ -245,13 +244,14 @@ AsciiPrint ( ... ) { - VA_LIST Marker; - UINTN Return; + VA_LIST Marker; + UINTN Return; + ASSERT (Format != NULL); VA_START (Marker, Format); - Return = AsciiInternalPrint( Format, gST->ConOut, Marker); + Return = AsciiInternalPrint (Format, gST->ConOut, Marker); VA_END (Marker); @@ -284,14 +284,14 @@ AsciiErrorPrint ( ... ) { - VA_LIST Marker; - UINTN Return; + VA_LIST Marker; + UINTN Return; ASSERT (Format != NULL); VA_START (Marker, Format); - Return = AsciiInternalPrint( Format, gST->StdErr, Marker); + Return = AsciiInternalPrint (Format, gST->StdErr, Marker); VA_END (Marker); @@ -333,45 +333,45 @@ AsciiErrorPrint ( **/ UINTN InternalPrintGraphic ( - IN UINTN PointX, - IN UINTN PointY, - IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Foreground, - IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Background, - IN CHAR16 *Buffer, - IN UINTN PrintNum + IN UINTN PointX, + IN UINTN PointY, + IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Foreground, + IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Background, + IN CHAR16 *Buffer, + IN UINTN PrintNum ) { - EFI_STATUS Status; - UINT32 HorizontalResolution; - UINT32 VerticalResolution; - UINT32 ColorDepth; - UINT32 RefreshRate; - EFI_HII_FONT_PROTOCOL *HiiFont; - EFI_IMAGE_OUTPUT *Blt; - EFI_FONT_DISPLAY_INFO FontInfo; - EFI_HII_ROW_INFO *RowInfoArray; - UINTN RowInfoArraySize; - EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput; - EFI_UGA_DRAW_PROTOCOL *UgaDraw; - EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *Sto; - EFI_HANDLE ConsoleHandle; - UINTN Width; - UINTN Height; - UINTN Delta; - - HorizontalResolution = 0; - VerticalResolution = 0; - Blt = NULL; - RowInfoArray = NULL; + EFI_STATUS Status; + UINT32 HorizontalResolution; + UINT32 VerticalResolution; + UINT32 ColorDepth; + UINT32 RefreshRate; + EFI_HII_FONT_PROTOCOL *HiiFont; + EFI_IMAGE_OUTPUT *Blt; + EFI_FONT_DISPLAY_INFO FontInfo; + EFI_HII_ROW_INFO *RowInfoArray; + UINTN RowInfoArraySize; + EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput; + EFI_UGA_DRAW_PROTOCOL *UgaDraw; + EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *Sto; + EFI_HANDLE ConsoleHandle; + UINTN Width; + UINTN Height; + UINTN Delta; + + HorizontalResolution = 0; + VerticalResolution = 0; + Blt = NULL; + RowInfoArray = NULL; ConsoleHandle = gST->ConsoleOutHandle; - ASSERT( ConsoleHandle != NULL); + ASSERT (ConsoleHandle != NULL); Status = gBS->HandleProtocol ( ConsoleHandle, &gEfiGraphicsOutputProtocolGuid, - (VOID **) &GraphicsOutput + (VOID **)&GraphicsOutput ); UgaDraw = NULL; @@ -384,9 +384,10 @@ InternalPrintGraphic ( Status = gBS->HandleProtocol ( ConsoleHandle, &gEfiUgaDrawProtocolGuid, - (VOID **) &UgaDraw + (VOID **)&UgaDraw ); } + if (EFI_ERROR (Status)) { goto Error; } @@ -394,7 +395,7 @@ InternalPrintGraphic ( Status = gBS->HandleProtocol ( ConsoleHandle, &gEfiSimpleTextOutProtocolGuid, - (VOID **) &Sto + (VOID **)&Sto ); if (EFI_ERROR (Status)) { @@ -403,25 +404,25 @@ InternalPrintGraphic ( if (GraphicsOutput != NULL) { HorizontalResolution = GraphicsOutput->Mode->Info->HorizontalResolution; - VerticalResolution = GraphicsOutput->Mode->Info->VerticalResolution; - } else if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) { + VerticalResolution = GraphicsOutput->Mode->Info->VerticalResolution; + } else if ((UgaDraw != NULL) && FeaturePcdGet (PcdUgaConsumeSupport)) { UgaDraw->GetMode (UgaDraw, &HorizontalResolution, &VerticalResolution, &ColorDepth, &RefreshRate); } else { goto Error; } - ASSERT ((HorizontalResolution != 0) && (VerticalResolution !=0)); + ASSERT ((HorizontalResolution != 0) && (VerticalResolution != 0)); - Status = gBS->LocateProtocol (&gEfiHiiFontProtocolGuid, NULL, (VOID **) &HiiFont); + Status = gBS->LocateProtocol (&gEfiHiiFontProtocolGuid, NULL, (VOID **)&HiiFont); if (EFI_ERROR (Status)) { goto Error; } - Blt = (EFI_IMAGE_OUTPUT *) AllocateZeroPool (sizeof (EFI_IMAGE_OUTPUT)); + Blt = (EFI_IMAGE_OUTPUT *)AllocateZeroPool (sizeof (EFI_IMAGE_OUTPUT)); ASSERT (Blt != NULL); - Blt->Width = (UINT16) (HorizontalResolution); - Blt->Height = (UINT16) (VerticalResolution); + Blt->Width = (UINT16)(HorizontalResolution); + Blt->Height = (UINT16)(VerticalResolution); ZeroMem (&FontInfo, sizeof (EFI_FONT_DISPLAY_INFO)); @@ -434,6 +435,7 @@ InternalPrintGraphic ( sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) ); } + if (Background != NULL) { CopyMem (&FontInfo.BackgroundColor, Background, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)); } else { @@ -448,25 +450,24 @@ InternalPrintGraphic ( Blt->Image.Screen = GraphicsOutput; Status = HiiFont->StringToImage ( - HiiFont, - EFI_HII_IGNORE_IF_NO_GLYPH | EFI_HII_OUT_FLAG_CLIP | - EFI_HII_OUT_FLAG_CLIP_CLEAN_X | EFI_HII_OUT_FLAG_CLIP_CLEAN_Y | - EFI_HII_IGNORE_LINE_BREAK | EFI_HII_DIRECT_TO_SCREEN, - Buffer, - &FontInfo, - &Blt, - PointX, - PointY, - &RowInfoArray, - &RowInfoArraySize, - NULL - ); + HiiFont, + EFI_HII_IGNORE_IF_NO_GLYPH | EFI_HII_OUT_FLAG_CLIP | + EFI_HII_OUT_FLAG_CLIP_CLEAN_X | EFI_HII_OUT_FLAG_CLIP_CLEAN_Y | + EFI_HII_IGNORE_LINE_BREAK | EFI_HII_DIRECT_TO_SCREEN, + Buffer, + &FontInfo, + &Blt, + PointX, + PointY, + &RowInfoArray, + &RowInfoArraySize, + NULL + ); if (EFI_ERROR (Status)) { goto Error; } - } else if (FeaturePcdGet (PcdUgaConsumeSupport)) { - ASSERT (UgaDraw!= NULL); + ASSERT (UgaDraw != NULL); // // Ensure Width * Height * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) doesn't overflow. @@ -475,7 +476,7 @@ InternalPrintGraphic ( goto Error; } - Blt->Image.Bitmap = AllocateZeroPool ((UINT32) Blt->Width * Blt->Height * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)); + Blt->Image.Bitmap = AllocateZeroPool ((UINT32)Blt->Width * Blt->Height * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)); ASSERT (Blt->Image.Bitmap != NULL); // @@ -483,19 +484,19 @@ InternalPrintGraphic ( // we ask StringToImage to print the string to blt buffer, then blt to device using UgaDraw. // Status = HiiFont->StringToImage ( - HiiFont, - EFI_HII_IGNORE_IF_NO_GLYPH | EFI_HII_OUT_FLAG_CLIP | - EFI_HII_OUT_FLAG_CLIP_CLEAN_X | EFI_HII_OUT_FLAG_CLIP_CLEAN_Y | - EFI_HII_IGNORE_LINE_BREAK, - Buffer, - &FontInfo, - &Blt, - PointX, - PointY, - &RowInfoArray, - &RowInfoArraySize, - NULL - ); + HiiFont, + EFI_HII_IGNORE_IF_NO_GLYPH | EFI_HII_OUT_FLAG_CLIP | + EFI_HII_OUT_FLAG_CLIP_CLEAN_X | EFI_HII_OUT_FLAG_CLIP_CLEAN_Y | + EFI_HII_IGNORE_LINE_BREAK, + Buffer, + &FontInfo, + &Blt, + PointX, + PointY, + &RowInfoArray, + &RowInfoArraySize, + NULL + ); if (!EFI_ERROR (Status)) { ASSERT (RowInfoArray != NULL); @@ -514,9 +515,10 @@ InternalPrintGraphic ( Height = 0; Delta = 0; } + Status = UgaDraw->Blt ( UgaDraw, - (EFI_UGA_PIXEL *) Blt->Image.Bitmap, + (EFI_UGA_PIXEL *)Blt->Image.Bitmap, EfiUgaBltBufferToVideo, PointX, PointY, @@ -529,10 +531,12 @@ InternalPrintGraphic ( } else { goto Error; } + FreePool (Blt->Image.Bitmap); } else { goto Error; } + // // Calculate the number of actual printed characters // @@ -550,6 +554,7 @@ Error: if (Blt != NULL) { FreePool (Blt); } + return 0; } @@ -598,28 +603,28 @@ Error: UINTN EFIAPI PrintXY ( - IN UINTN PointX, - IN UINTN PointY, - IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *ForeGround OPTIONAL, - IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BackGround OPTIONAL, - IN CONST CHAR16 *Format, + IN UINTN PointX, + IN UINTN PointY, + IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *ForeGround OPTIONAL, + IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BackGround OPTIONAL, + IN CONST CHAR16 *Format, ... ) { - VA_LIST Marker; - CHAR16 *Buffer; - UINTN BufferSize; - UINTN PrintNum; - UINTN ReturnNum; + VA_LIST Marker; + CHAR16 *Buffer; + UINTN BufferSize; + UINTN PrintNum; + UINTN ReturnNum; ASSERT (Format != NULL); - ASSERT (((UINTN) Format & BIT0) == 0); + ASSERT (((UINTN)Format & BIT0) == 0); VA_START (Marker, Format); BufferSize = (PcdGet32 (PcdUefiLibMaxPrintBufferSize) + 1) * sizeof (CHAR16); - Buffer = (CHAR16 *) AllocatePool (BufferSize); + Buffer = (CHAR16 *)AllocatePool (BufferSize); ASSERT (Buffer != NULL); PrintNum = UnicodeVSPrint (Buffer, BufferSize, Format, Marker); @@ -677,19 +682,19 @@ PrintXY ( UINTN EFIAPI AsciiPrintXY ( - IN UINTN PointX, - IN UINTN PointY, - IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *ForeGround OPTIONAL, - IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BackGround OPTIONAL, - IN CONST CHAR8 *Format, + IN UINTN PointX, + IN UINTN PointY, + IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *ForeGround OPTIONAL, + IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BackGround OPTIONAL, + IN CONST CHAR8 *Format, ... ) { - VA_LIST Marker; - CHAR16 *Buffer; - UINTN BufferSize; - UINTN PrintNum; - UINTN ReturnNum; + VA_LIST Marker; + CHAR16 *Buffer; + UINTN BufferSize; + UINTN PrintNum; + UINTN ReturnNum; ASSERT (Format != NULL); @@ -697,7 +702,7 @@ AsciiPrintXY ( BufferSize = (PcdGet32 (PcdUefiLibMaxPrintBufferSize) + 1) * sizeof (CHAR16); - Buffer = (CHAR16 *) AllocatePool (BufferSize); + Buffer = (CHAR16 *)AllocatePool (BufferSize); ASSERT (Buffer != NULL); PrintNum = UnicodeSPrintAsciiFormat (Buffer, BufferSize, Format, Marker); @@ -732,30 +737,30 @@ AsciiPrintXY ( @return Null-terminated Unicode string is that is the formatted string appended to String. **/ -CHAR16* +CHAR16 * EFIAPI CatVSPrint ( - IN CHAR16 *String OPTIONAL, + IN CHAR16 *String OPTIONAL, IN CONST CHAR16 *FormatString, IN VA_LIST Marker ) { - UINTN CharactersRequired; - UINTN SizeRequired; - CHAR16 *BufferToReturn; - VA_LIST ExtraMarker; + UINTN CharactersRequired; + UINTN SizeRequired; + CHAR16 *BufferToReturn; + VA_LIST ExtraMarker; VA_COPY (ExtraMarker, Marker); - CharactersRequired = SPrintLength(FormatString, ExtraMarker); + CharactersRequired = SPrintLength (FormatString, ExtraMarker); VA_END (ExtraMarker); if (String != NULL) { - SizeRequired = StrSize(String) + (CharactersRequired * sizeof(CHAR16)); + SizeRequired = StrSize (String) + (CharactersRequired * sizeof (CHAR16)); } else { - SizeRequired = sizeof(CHAR16) + (CharactersRequired * sizeof(CHAR16)); + SizeRequired = sizeof (CHAR16) + (CharactersRequired * sizeof (CHAR16)); } - BufferToReturn = AllocatePool(SizeRequired); + BufferToReturn = AllocatePool (SizeRequired); if (BufferToReturn == NULL) { return NULL; @@ -764,12 +769,12 @@ CatVSPrint ( } if (String != NULL) { - StrCpyS(BufferToReturn, SizeRequired / sizeof(CHAR16), String); + StrCpyS (BufferToReturn, SizeRequired / sizeof (CHAR16), String); } - UnicodeVSPrint(BufferToReturn + StrLen(BufferToReturn), (CharactersRequired+1) * sizeof(CHAR16), FormatString, Marker); + UnicodeVSPrint (BufferToReturn + StrLen (BufferToReturn), (CharactersRequired+1) * sizeof (CHAR16), FormatString, Marker); - ASSERT(StrSize(BufferToReturn)==SizeRequired); + ASSERT (StrSize (BufferToReturn) == SizeRequired); return (BufferToReturn); } @@ -800,16 +805,16 @@ CatVSPrint ( CHAR16 * EFIAPI CatSPrint ( - IN CHAR16 *String OPTIONAL, + IN CHAR16 *String OPTIONAL, IN CONST CHAR16 *FormatString, ... ) { - VA_LIST Marker; - CHAR16 *NewString; + VA_LIST Marker; + CHAR16 *NewString; VA_START (Marker, FormatString); - NewString = CatVSPrint(String, FormatString, Marker); + NewString = CatVSPrint (String, FormatString, Marker); VA_END (Marker); return NewString; } diff --git a/MdePkg/Library/UefiLib/UefiNotTiano.c b/MdePkg/Library/UefiLib/UefiNotTiano.c index 32cc26c..d84e91f 100644 --- a/MdePkg/Library/UefiLib/UefiNotTiano.c +++ b/MdePkg/Library/UefiLib/UefiNotTiano.c @@ -11,8 +11,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ - - #include "UefiLibInternal.h" /** @@ -97,6 +95,7 @@ EfiCreateEventLegacyBootEx ( } else { WorkerNotifyFunction = NotifyFunction; } + Status = gBS->CreateEventEx ( EVT_NOTIFY_SIGNAL, NotifyTpl, @@ -192,6 +191,7 @@ EfiCreateEventReadyToBootEx ( } else { WorkerNotifyFunction = NotifyFunction; } + Status = gBS->CreateEventEx ( EVT_NOTIFY_SIGNAL, NotifyTpl, @@ -205,7 +205,6 @@ EfiCreateEventReadyToBootEx ( return Status; } - /** Create, Signal, and Close the Ready to Boot event using EfiSignalEventReadyToBoot(). @@ -221,8 +220,8 @@ EfiSignalEventReadyToBoot ( VOID ) { - EFI_STATUS Status; - EFI_EVENT ReadyToBootEvent; + EFI_STATUS Status; + EFI_EVENT ReadyToBootEvent; Status = EfiCreateEventReadyToBoot (&ReadyToBootEvent); if (!EFI_ERROR (Status)) { @@ -246,8 +245,8 @@ EfiSignalEventLegacyBoot ( VOID ) { - EFI_STATUS Status; - EFI_EVENT LegacyBootEvent; + EFI_STATUS Status; + EFI_EVENT LegacyBootEvent; Status = EfiCreateEventLegacyBoot (&LegacyBootEvent); if (!EFI_ERROR (Status)) { @@ -256,7 +255,6 @@ EfiSignalEventLegacyBoot ( } } - /** Check to see if the Firmware Volume (FV) Media Device Path is valid @@ -283,15 +281,15 @@ EfiGetNameGuidFromFwVolDevicePathNode ( { ASSERT (FvDevicePathNode != NULL); - if (DevicePathType (&FvDevicePathNode->Header) == MEDIA_DEVICE_PATH && - DevicePathSubType (&FvDevicePathNode->Header) == MEDIA_PIWG_FW_FILE_DP) { - return (EFI_GUID *) &FvDevicePathNode->FvFileName; + if ((DevicePathType (&FvDevicePathNode->Header) == MEDIA_DEVICE_PATH) && + (DevicePathSubType (&FvDevicePathNode->Header) == MEDIA_PIWG_FW_FILE_DP)) + { + return (EFI_GUID *)&FvDevicePathNode->FvFileName; } return NULL; } - /** Initialize a Firmware Volume (FV) Media Device Path node. @@ -321,8 +319,8 @@ EfiInitializeFwVolDevicepathNode ( // // Use the new Device path that does not conflict with the UEFI // - FvDevicePathNode->Header.Type = MEDIA_DEVICE_PATH; - FvDevicePathNode->Header.SubType = MEDIA_PIWG_FW_FILE_DP; + FvDevicePathNode->Header.Type = MEDIA_DEVICE_PATH; + FvDevicePathNode->Header.SubType = MEDIA_PIWG_FW_FILE_DP; SetDevicePathNodeLength (&FvDevicePathNode->Header, sizeof (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH)); CopyGuid (&FvDevicePathNode->FvFileName, NameGuid); diff --git a/MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c b/MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c index 554b6a7..eb12266 100644 --- a/MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c +++ b/MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c @@ -7,10 +7,8 @@ **/ - #include - #include #include #include @@ -46,7 +44,8 @@ InternalAllocatePages ( if (EFI_ERROR (Status)) { return NULL; } - return (VOID *) (UINTN) Memory; + + return (VOID *)(UINTN)Memory; } /** @@ -142,7 +141,7 @@ FreePages ( EFI_STATUS Status; ASSERT (Pages != 0); - Status = gBS->FreePages ((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer, Pages); + Status = gBS->FreePages ((EFI_PHYSICAL_ADDRESS)(UINTN)Buffer, Pages); ASSERT_EFI_ERROR (Status); } @@ -186,23 +185,25 @@ InternalAllocateAlignedPages ( if (Pages == 0) { return NULL; } + if (Alignment > EFI_PAGE_SIZE) { // // Calculate the total number of pages since alignment is larger than page size. // - AlignmentMask = Alignment - 1; - RealPages = Pages + EFI_SIZE_TO_PAGES (Alignment); + AlignmentMask = Alignment - 1; + RealPages = Pages + EFI_SIZE_TO_PAGES (Alignment); // // Make sure that Pages plus EFI_SIZE_TO_PAGES (Alignment) does not overflow. // ASSERT (RealPages > Pages); - Status = gBS->AllocatePages (AllocateAnyPages, MemoryType, RealPages, &Memory); + Status = gBS->AllocatePages (AllocateAnyPages, MemoryType, RealPages, &Memory); if (EFI_ERROR (Status)) { return NULL; } - AlignedMemory = ((UINTN) Memory + AlignmentMask) & ~AlignmentMask; - UnalignedPages = EFI_SIZE_TO_PAGES (AlignedMemory - (UINTN) Memory); + + AlignedMemory = ((UINTN)Memory + AlignmentMask) & ~AlignmentMask; + UnalignedPages = EFI_SIZE_TO_PAGES (AlignedMemory - (UINTN)Memory); if (UnalignedPages > 0) { // // Free first unaligned page(s). @@ -210,6 +211,7 @@ InternalAllocateAlignedPages ( Status = gBS->FreePages (Memory, UnalignedPages); ASSERT_EFI_ERROR (Status); } + Memory = AlignedMemory + EFI_PAGES_TO_SIZE (Pages); UnalignedPages = RealPages - Pages - UnalignedPages; if (UnalignedPages > 0) { @@ -227,9 +229,11 @@ InternalAllocateAlignedPages ( if (EFI_ERROR (Status)) { return NULL; } - AlignedMemory = (UINTN) Memory; + + AlignedMemory = (UINTN)Memory; } - return (VOID *) AlignedMemory; + + return (VOID *)AlignedMemory; } /** @@ -343,7 +347,7 @@ FreeAlignedPages ( EFI_STATUS Status; ASSERT (Pages != 0); - Status = gBS->FreePages ((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer, Pages); + Status = gBS->FreePages ((EFI_PHYSICAL_ADDRESS)(UINTN)Buffer, Pages); ASSERT_EFI_ERROR (Status); } @@ -373,6 +377,7 @@ InternalAllocatePool ( if (EFI_ERROR (Status)) { Memory = NULL; } + return Memory; } @@ -465,6 +470,7 @@ InternalAllocateZeroPool ( if (Memory != NULL) { Memory = ZeroMem (Memory, AllocationSize); } + return Memory; } @@ -561,12 +567,13 @@ InternalAllocateCopyPool ( VOID *Memory; ASSERT (Buffer != NULL); - ASSERT (AllocationSize <= (MAX_ADDRESS - (UINTN) Buffer + 1)); + ASSERT (AllocationSize <= (MAX_ADDRESS - (UINTN)Buffer + 1)); Memory = InternalAllocatePool (PoolType, AllocationSize); if (Memory != NULL) { - Memory = CopyMem (Memory, Buffer, AllocationSize); + Memory = CopyMem (Memory, Buffer, AllocationSize); } + return Memory; } @@ -684,10 +691,11 @@ InternalReallocatePool ( VOID *NewBuffer; NewBuffer = InternalAllocateZeroPool (PoolType, NewSize); - if (NewBuffer != NULL && OldBuffer != NULL) { + if ((NewBuffer != NULL) && (OldBuffer != NULL)) { CopyMem (NewBuffer, OldBuffer, MIN (OldSize, NewSize)); FreePool (OldBuffer); } + return NewBuffer; } @@ -804,12 +812,11 @@ ReallocateReservedPool ( VOID EFIAPI FreePool ( - IN VOID *Buffer + IN VOID *Buffer ) { - EFI_STATUS Status; + EFI_STATUS Status; Status = gBS->FreePool (Buffer); ASSERT_EFI_ERROR (Status); } - diff --git a/MdePkg/Library/UefiMemoryLib/CompareMemWrapper.c b/MdePkg/Library/UefiMemoryLib/CompareMemWrapper.c index 6c539a6..5b65a1d 100644 --- a/MdePkg/Library/UefiMemoryLib/CompareMemWrapper.c +++ b/MdePkg/Library/UefiMemoryLib/CompareMemWrapper.c @@ -48,9 +48,10 @@ CompareMem ( IN UINTN Length ) { - if (Length == 0 || DestinationBuffer == SourceBuffer) { + if ((Length == 0) || (DestinationBuffer == SourceBuffer)) { return 0; } + ASSERT (DestinationBuffer != NULL); ASSERT (SourceBuffer != NULL); ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer)); diff --git a/MdePkg/Library/UefiMemoryLib/CopyMemWrapper.c b/MdePkg/Library/UefiMemoryLib/CopyMemWrapper.c index 438abf4..dc48904 100644 --- a/MdePkg/Library/UefiMemoryLib/CopyMemWrapper.c +++ b/MdePkg/Library/UefiMemoryLib/CopyMemWrapper.c @@ -47,11 +47,13 @@ CopyMem ( if (Length == 0) { return DestinationBuffer; } + ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer)); ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)SourceBuffer)); if (DestinationBuffer == SourceBuffer) { return DestinationBuffer; } + return InternalMemCopyMem (DestinationBuffer, SourceBuffer, Length); } diff --git a/MdePkg/Library/UefiMemoryLib/MemLib.c b/MdePkg/Library/UefiMemoryLib/MemLib.c index 983db8c..061281f 100644 --- a/MdePkg/Library/UefiMemoryLib/MemLib.c +++ b/MdePkg/Library/UefiMemoryLib/MemLib.c @@ -23,12 +23,12 @@ VOID * EFIAPI InternalMemCopyMem ( - OUT VOID *Destination, - IN CONST VOID *Source, - IN UINTN Length + OUT VOID *Destination, + IN CONST VOID *Source, + IN UINTN Length ) { - gBS->CopyMem (Destination, (VOID*)Source, Length); + gBS->CopyMem (Destination, (VOID *)Source, Length); return Destination; } @@ -47,9 +47,9 @@ InternalMemCopyMem ( VOID * EFIAPI InternalMemSetMem ( - OUT VOID *Buffer, - IN UINTN Size, - IN UINT8 Value + OUT VOID *Buffer, + IN UINTN Size, + IN UINT8 Value ) { gBS->SetMem (Buffer, Size, Value); diff --git a/MdePkg/Library/UefiMemoryLib/MemLibGeneric.c b/MdePkg/Library/UefiMemoryLib/MemLibGeneric.c index 73ef0d9..1808d3f 100644 --- a/MdePkg/Library/UefiMemoryLib/MemLibGeneric.c +++ b/MdePkg/Library/UefiMemoryLib/MemLibGeneric.c @@ -26,14 +26,15 @@ VOID * EFIAPI InternalMemSetMem16 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT16 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT16 Value ) { - for (; Length != 0; Length--) { - ((UINT16*)Buffer)[Length - 1] = Value; + for ( ; Length != 0; Length--) { + ((UINT16 *)Buffer)[Length - 1] = Value; } + return Buffer; } @@ -50,14 +51,15 @@ InternalMemSetMem16 ( VOID * EFIAPI InternalMemSetMem32 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT32 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT32 Value ) { - for (; Length != 0; Length--) { - ((UINT32*)Buffer)[Length - 1] = Value; + for ( ; Length != 0; Length--) { + ((UINT32 *)Buffer)[Length - 1] = Value; } + return Buffer; } @@ -74,14 +76,15 @@ InternalMemSetMem32 ( VOID * EFIAPI InternalMemSetMem64 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT64 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT64 Value ) { - for (; Length != 0; Length--) { - ((UINT64*)Buffer)[Length - 1] = Value; + for ( ; Length != 0; Length--) { + ((UINT64 *)Buffer)[Length - 1] = Value; } + return Buffer; } @@ -97,8 +100,8 @@ InternalMemSetMem64 ( VOID * EFIAPI InternalMemZeroMem ( - OUT VOID *Buffer, - IN UINTN Length + OUT VOID *Buffer, + IN UINTN Length ) { return InternalMemSetMem (Buffer, Length, 0); @@ -120,17 +123,19 @@ InternalMemZeroMem ( INTN EFIAPI InternalMemCompareMem ( - IN CONST VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length + IN CONST VOID *DestinationBuffer, + IN CONST VOID *SourceBuffer, + IN UINTN Length ) { while ((--Length != 0) && - (*(INT8*)DestinationBuffer == *(INT8*)SourceBuffer)) { - DestinationBuffer = (INT8*)DestinationBuffer + 1; - SourceBuffer = (INT8*)SourceBuffer + 1; + (*(INT8 *)DestinationBuffer == *(INT8 *)SourceBuffer)) + { + DestinationBuffer = (INT8 *)DestinationBuffer + 1; + SourceBuffer = (INT8 *)SourceBuffer + 1; } - return (INTN)*(UINT8*)DestinationBuffer - (INTN)*(UINT8*)SourceBuffer; + + return (INTN)*(UINT8 *)DestinationBuffer - (INTN)*(UINT8 *)SourceBuffer; } /** @@ -147,19 +152,20 @@ InternalMemCompareMem ( CONST VOID * EFIAPI InternalMemScanMem8 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT8 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT8 Value ) { - CONST UINT8 *Pointer; + CONST UINT8 *Pointer; - Pointer = (CONST UINT8*)Buffer; + Pointer = (CONST UINT8 *)Buffer; do { if (*(Pointer++) == Value) { return --Pointer; } } while (--Length != 0); + return NULL; } @@ -177,19 +183,20 @@ InternalMemScanMem8 ( CONST VOID * EFIAPI InternalMemScanMem16 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT16 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT16 Value ) { - CONST UINT16 *Pointer; + CONST UINT16 *Pointer; - Pointer = (CONST UINT16*)Buffer; + Pointer = (CONST UINT16 *)Buffer; do { if (*(Pointer++) == Value) { return --Pointer; } } while (--Length != 0); + return NULL; } @@ -207,19 +214,20 @@ InternalMemScanMem16 ( CONST VOID * EFIAPI InternalMemScanMem32 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT32 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT32 Value ) { - CONST UINT32 *Pointer; + CONST UINT32 *Pointer; - Pointer = (CONST UINT32*)Buffer; + Pointer = (CONST UINT32 *)Buffer; do { if (*(Pointer++) == Value) { return --Pointer; } } while (--Length != 0); + return NULL; } @@ -237,19 +245,20 @@ InternalMemScanMem32 ( CONST VOID * EFIAPI InternalMemScanMem64 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT64 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT64 Value ) { - CONST UINT64 *Pointer; + CONST UINT64 *Pointer; - Pointer = (CONST UINT64*)Buffer; + Pointer = (CONST UINT64 *)Buffer; do { if (*(Pointer++) == Value) { return --Pointer; } } while (--Length != 0); + return NULL; } @@ -270,8 +279,8 @@ InternalMemIsZeroBuffer ( IN UINTN Length ) { - CONST UINT8 *BufferData; - UINTN Index; + CONST UINT8 *BufferData; + UINTN Index; BufferData = Buffer; for (Index = 0; Index < Length; Index++) { @@ -279,5 +288,6 @@ InternalMemIsZeroBuffer ( return FALSE; } } + return TRUE; } diff --git a/MdePkg/Library/UefiMemoryLib/MemLibGuid.c b/MdePkg/Library/UefiMemoryLib/MemLibGuid.c index 319487d..9ded5ca 100644 --- a/MdePkg/Library/UefiMemoryLib/MemLibGuid.c +++ b/MdePkg/Library/UefiMemoryLib/MemLibGuid.c @@ -42,12 +42,12 @@ CopyGuid ( ) { WriteUnaligned64 ( - (UINT64*)DestinationGuid, - ReadUnaligned64 ((CONST UINT64*)SourceGuid) + (UINT64 *)DestinationGuid, + ReadUnaligned64 ((CONST UINT64 *)SourceGuid) ); WriteUnaligned64 ( - (UINT64*)DestinationGuid + 1, - ReadUnaligned64 ((CONST UINT64*)SourceGuid + 1) + (UINT64 *)DestinationGuid + 1, + ReadUnaligned64 ((CONST UINT64 *)SourceGuid + 1) ); return DestinationGuid; } @@ -80,12 +80,12 @@ CompareGuid ( UINT64 HighPartOfGuid1; UINT64 HighPartOfGuid2; - LowPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1); - LowPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2); - HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1 + 1); - HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2 + 1); + LowPartOfGuid1 = ReadUnaligned64 ((CONST UINT64 *)Guid1); + LowPartOfGuid2 = ReadUnaligned64 ((CONST UINT64 *)Guid2); + HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64 *)Guid1 + 1); + HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64 *)Guid2 + 1); - return (BOOLEAN) (LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2); + return (BOOLEAN)(LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2); } /** @@ -118,20 +118,22 @@ ScanGuid ( IN CONST GUID *Guid ) { - CONST GUID *GuidPtr; + CONST GUID *GuidPtr; ASSERT (((UINTN)Buffer & (sizeof (Guid->Data1) - 1)) == 0); ASSERT (Length <= (MAX_ADDRESS - (UINTN)Buffer + 1)); ASSERT ((Length & (sizeof (*GuidPtr) - 1)) == 0); - GuidPtr = (GUID*)Buffer; + GuidPtr = (GUID *)Buffer; Buffer = GuidPtr + Length / sizeof (*GuidPtr); - while (GuidPtr < (CONST GUID*)Buffer) { + while (GuidPtr < (CONST GUID *)Buffer) { if (CompareGuid (GuidPtr, Guid)) { - return (VOID*)GuidPtr; + return (VOID *)GuidPtr; } + GuidPtr++; } + return NULL; } @@ -158,8 +160,8 @@ IsZeroGuid ( UINT64 LowPartOfGuid; UINT64 HighPartOfGuid; - LowPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid); - HighPartOfGuid = ReadUnaligned64 ((CONST UINT64*) Guid + 1); + LowPartOfGuid = ReadUnaligned64 ((CONST UINT64 *)Guid); + HighPartOfGuid = ReadUnaligned64 ((CONST UINT64 *)Guid + 1); - return (BOOLEAN) (LowPartOfGuid == 0 && HighPartOfGuid == 0); + return (BOOLEAN)(LowPartOfGuid == 0 && HighPartOfGuid == 0); } diff --git a/MdePkg/Library/UefiMemoryLib/MemLibInternals.h b/MdePkg/Library/UefiMemoryLib/MemLibInternals.h index cda2a52..0713234 100644 --- a/MdePkg/Library/UefiMemoryLib/MemLibInternals.h +++ b/MdePkg/Library/UefiMemoryLib/MemLibInternals.h @@ -31,9 +31,9 @@ VOID * EFIAPI InternalMemCopyMem ( - OUT VOID *Destination, - IN CONST VOID *Source, - IN UINTN Length + OUT VOID *Destination, + IN CONST VOID *Source, + IN UINTN Length ); /** @@ -51,9 +51,9 @@ InternalMemCopyMem ( VOID * EFIAPI InternalMemSetMem ( - OUT VOID *Buffer, - IN UINTN Size, - IN UINT8 Value + OUT VOID *Buffer, + IN UINTN Size, + IN UINT8 Value ); /** @@ -69,9 +69,9 @@ InternalMemSetMem ( VOID * EFIAPI InternalMemSetMem16 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT16 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT16 Value ); /** @@ -87,9 +87,9 @@ InternalMemSetMem16 ( VOID * EFIAPI InternalMemSetMem32 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT32 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT32 Value ); /** @@ -105,9 +105,9 @@ InternalMemSetMem32 ( VOID * EFIAPI InternalMemSetMem64 ( - OUT VOID *Buffer, - IN UINTN Length, - IN UINT64 Value + OUT VOID *Buffer, + IN UINTN Length, + IN UINT64 Value ); /** @@ -122,8 +122,8 @@ InternalMemSetMem64 ( VOID * EFIAPI InternalMemZeroMem ( - OUT VOID *Buffer, - IN UINTN Length + OUT VOID *Buffer, + IN UINTN Length ); /** @@ -142,9 +142,9 @@ InternalMemZeroMem ( INTN EFIAPI InternalMemCompareMem ( - IN CONST VOID *DestinationBuffer, - IN CONST VOID *SourceBuffer, - IN UINTN Length + IN CONST VOID *DestinationBuffer, + IN CONST VOID *SourceBuffer, + IN UINTN Length ); /** @@ -161,9 +161,9 @@ InternalMemCompareMem ( CONST VOID * EFIAPI InternalMemScanMem8 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT8 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT8 Value ); /** @@ -180,9 +180,9 @@ InternalMemScanMem8 ( CONST VOID * EFIAPI InternalMemScanMem16 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT16 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT16 Value ); /** @@ -199,9 +199,9 @@ InternalMemScanMem16 ( CONST VOID * EFIAPI InternalMemScanMem32 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT32 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT32 Value ); /** @@ -218,9 +218,9 @@ InternalMemScanMem32 ( CONST VOID * EFIAPI InternalMemScanMem64 ( - IN CONST VOID *Buffer, - IN UINTN Length, - IN UINT64 Value + IN CONST VOID *Buffer, + IN UINTN Length, + IN UINT64 Value ); /** diff --git a/MdePkg/Library/UefiMemoryLib/ScanMem16Wrapper.c b/MdePkg/Library/UefiMemoryLib/ScanMem16Wrapper.c index 8201313..7eeb1a4 100644 --- a/MdePkg/Library/UefiMemoryLib/ScanMem16Wrapper.c +++ b/MdePkg/Library/UefiMemoryLib/ScanMem16Wrapper.c @@ -57,5 +57,5 @@ ScanMem16 ( ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (Value) - 1)) == 0); - return (VOID*)InternalMemScanMem16 (Buffer, Length / sizeof (Value), Value); + return (VOID *)InternalMemScanMem16 (Buffer, Length / sizeof (Value), Value); } diff --git a/MdePkg/Library/UefiMemoryLib/ScanMem32Wrapper.c b/MdePkg/Library/UefiMemoryLib/ScanMem32Wrapper.c index 22c0c79..bdcee0e 100644 --- a/MdePkg/Library/UefiMemoryLib/ScanMem32Wrapper.c +++ b/MdePkg/Library/UefiMemoryLib/ScanMem32Wrapper.c @@ -56,5 +56,5 @@ ScanMem32 ( ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (Value) - 1)) == 0); - return (VOID*)InternalMemScanMem32 (Buffer, Length / sizeof (Value), Value); + return (VOID *)InternalMemScanMem32 (Buffer, Length / sizeof (Value), Value); } diff --git a/MdePkg/Library/UefiMemoryLib/ScanMem64Wrapper.c b/MdePkg/Library/UefiMemoryLib/ScanMem64Wrapper.c index a617d87..eb75390 100644 --- a/MdePkg/Library/UefiMemoryLib/ScanMem64Wrapper.c +++ b/MdePkg/Library/UefiMemoryLib/ScanMem64Wrapper.c @@ -57,5 +57,5 @@ ScanMem64 ( ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); ASSERT ((Length & (sizeof (Value) - 1)) == 0); - return (VOID*)InternalMemScanMem64 (Buffer, Length / sizeof (Value), Value); + return (VOID *)InternalMemScanMem64 (Buffer, Length / sizeof (Value), Value); } diff --git a/MdePkg/Library/UefiMemoryLib/ScanMem8Wrapper.c b/MdePkg/Library/UefiMemoryLib/ScanMem8Wrapper.c index f2bf7d6..aa0de64 100644 --- a/MdePkg/Library/UefiMemoryLib/ScanMem8Wrapper.c +++ b/MdePkg/Library/UefiMemoryLib/ScanMem8Wrapper.c @@ -49,10 +49,11 @@ ScanMem8 ( if (Length == 0) { return NULL; } + ASSERT (Buffer != NULL); ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Buffer)); - return (VOID*)InternalMemScanMem8 (Buffer, Length, Value); + return (VOID *)InternalMemScanMem8 (Buffer, Length, Value); } /** @@ -90,4 +91,3 @@ ScanMemN ( return ScanMem32 (Buffer, Length, (UINT32)Value); } } - diff --git a/MdePkg/Library/UefiPciLibPciRootBridgeIo/PciLib.c b/MdePkg/Library/UefiPciLibPciRootBridgeIo/PciLib.c index 57eb37c..f4e9882 100644 --- a/MdePkg/Library/UefiPciLibPciRootBridgeIo/PciLib.c +++ b/MdePkg/Library/UefiPciLibPciRootBridgeIo/PciLib.c @@ -21,7 +21,7 @@ @param M Additional bits to assert to be zero. **/ -#define ASSERT_INVALID_PCI_ADDRESS(A,M) \ +#define ASSERT_INVALID_PCI_ADDRESS(A, M) \ ASSERT (((A) & (~0xfffffff | (M))) == 0) /** @@ -37,7 +37,7 @@ // // Global varible to cache pointer to PCI Root Bridge I/O protocol. // -EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *mPciRootBridgeIo = NULL; +EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *mPciRootBridgeIo = NULL; /** The constructor function caches the pointer to PCI Root Bridge I/O protocol. @@ -54,13 +54,13 @@ EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *mPciRootBridgeIo = NULL; EFI_STATUS EFIAPI PciLibConstructor ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUS Status; - Status = gBS->LocateProtocol (&gEfiPciRootBridgeIoProtocolGuid, NULL, (VOID**) &mPciRootBridgeIo); + Status = gBS->LocateProtocol (&gEfiPciRootBridgeIoProtocolGuid, NULL, (VOID **)&mPciRootBridgeIo); ASSERT_EFI_ERROR (Status); ASSERT (mPciRootBridgeIo != NULL); @@ -182,12 +182,12 @@ PciRegisterForRuntimeAccess ( UINT8 EFIAPI PciRead8 ( - IN UINTN Address + IN UINTN Address ) { ASSERT_INVALID_PCI_ADDRESS (Address, 0); - return (UINT8) DxePciLibPciRootBridgeIoReadWorker (Address, EfiPciWidthUint8); + return (UINT8)DxePciLibPciRootBridgeIoReadWorker (Address, EfiPciWidthUint8); } /** @@ -209,13 +209,13 @@ PciRead8 ( UINT8 EFIAPI PciWrite8 ( - IN UINTN Address, - IN UINT8 Value + IN UINTN Address, + IN UINT8 Value ) { ASSERT_INVALID_PCI_ADDRESS (Address, 0); - return (UINT8) DxePciLibPciRootBridgeIoWriteWorker (Address, EfiPciWidthUint8, Value); + return (UINT8)DxePciLibPciRootBridgeIoWriteWorker (Address, EfiPciWidthUint8, Value); } /** @@ -241,11 +241,11 @@ PciWrite8 ( UINT8 EFIAPI PciOr8 ( - IN UINTN Address, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 OrData ) { - return PciWrite8 (Address, (UINT8) (PciRead8 (Address) | OrData)); + return PciWrite8 (Address, (UINT8)(PciRead8 (Address) | OrData)); } /** @@ -271,11 +271,11 @@ PciOr8 ( UINT8 EFIAPI PciAnd8 ( - IN UINTN Address, - IN UINT8 AndData + IN UINTN Address, + IN UINT8 AndData ) { - return PciWrite8 (Address, (UINT8) (PciRead8 (Address) & AndData)); + return PciWrite8 (Address, (UINT8)(PciRead8 (Address) & AndData)); } /** @@ -303,12 +303,12 @@ PciAnd8 ( UINT8 EFIAPI PciAndThenOr8 ( - IN UINTN Address, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINT8 AndData, + IN UINT8 OrData ) { - return PciWrite8 (Address, (UINT8) ((PciRead8 (Address) & AndData) | OrData)); + return PciWrite8 (Address, (UINT8)((PciRead8 (Address) & AndData) | OrData)); } /** @@ -335,9 +335,9 @@ PciAndThenOr8 ( UINT8 EFIAPI PciBitFieldRead8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead8 (PciRead8 (Address), StartBit, EndBit); @@ -370,10 +370,10 @@ PciBitFieldRead8 ( UINT8 EFIAPI PciBitFieldWrite8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) { return PciWrite8 ( @@ -412,10 +412,10 @@ PciBitFieldWrite8 ( UINT8 EFIAPI PciBitFieldOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) { return PciWrite8 ( @@ -454,10 +454,10 @@ PciBitFieldOr8 ( UINT8 EFIAPI PciBitFieldAnd8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ) { return PciWrite8 ( @@ -500,11 +500,11 @@ PciBitFieldAnd8 ( UINT8 EFIAPI PciBitFieldAndThenOr8 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) { return PciWrite8 ( @@ -532,12 +532,12 @@ PciBitFieldAndThenOr8 ( UINT16 EFIAPI PciRead16 ( - IN UINTN Address + IN UINTN Address ) { ASSERT_INVALID_PCI_ADDRESS (Address, 1); - return (UINT16) DxePciLibPciRootBridgeIoReadWorker (Address, EfiPciWidthUint16); + return (UINT16)DxePciLibPciRootBridgeIoReadWorker (Address, EfiPciWidthUint16); } /** @@ -560,13 +560,13 @@ PciRead16 ( UINT16 EFIAPI PciWrite16 ( - IN UINTN Address, - IN UINT16 Value + IN UINTN Address, + IN UINT16 Value ) { ASSERT_INVALID_PCI_ADDRESS (Address, 1); - return (UINT16) DxePciLibPciRootBridgeIoWriteWorker (Address, EfiPciWidthUint16, Value); + return (UINT16)DxePciLibPciRootBridgeIoWriteWorker (Address, EfiPciWidthUint16, Value); } /** @@ -593,11 +593,11 @@ PciWrite16 ( UINT16 EFIAPI PciOr16 ( - IN UINTN Address, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 OrData ) { - return PciWrite16 (Address, (UINT16) (PciRead16 (Address) | OrData)); + return PciWrite16 (Address, (UINT16)(PciRead16 (Address) | OrData)); } /** @@ -624,11 +624,11 @@ PciOr16 ( UINT16 EFIAPI PciAnd16 ( - IN UINTN Address, - IN UINT16 AndData + IN UINTN Address, + IN UINT16 AndData ) { - return PciWrite16 (Address, (UINT16) (PciRead16 (Address) & AndData)); + return PciWrite16 (Address, (UINT16)(PciRead16 (Address) & AndData)); } /** @@ -657,12 +657,12 @@ PciAnd16 ( UINT16 EFIAPI PciAndThenOr16 ( - IN UINTN Address, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINT16 AndData, + IN UINT16 OrData ) { - return PciWrite16 (Address, (UINT16) ((PciRead16 (Address) & AndData) | OrData)); + return PciWrite16 (Address, (UINT16)((PciRead16 (Address) & AndData) | OrData)); } /** @@ -690,9 +690,9 @@ PciAndThenOr16 ( UINT16 EFIAPI PciBitFieldRead16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead16 (PciRead16 (Address), StartBit, EndBit); @@ -726,10 +726,10 @@ PciBitFieldRead16 ( UINT16 EFIAPI PciBitFieldWrite16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ) { return PciWrite16 ( @@ -769,10 +769,10 @@ PciBitFieldWrite16 ( UINT16 EFIAPI PciBitFieldOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ) { return PciWrite16 ( @@ -812,10 +812,10 @@ PciBitFieldOr16 ( UINT16 EFIAPI PciBitFieldAnd16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ) { return PciWrite16 ( @@ -859,11 +859,11 @@ PciBitFieldAnd16 ( UINT16 EFIAPI PciBitFieldAndThenOr16 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ) { return PciWrite16 ( @@ -891,7 +891,7 @@ PciBitFieldAndThenOr16 ( UINT32 EFIAPI PciRead32 ( - IN UINTN Address + IN UINTN Address ) { ASSERT_INVALID_PCI_ADDRESS (Address, 3); @@ -919,8 +919,8 @@ PciRead32 ( UINT32 EFIAPI PciWrite32 ( - IN UINTN Address, - IN UINT32 Value + IN UINTN Address, + IN UINT32 Value ) { ASSERT_INVALID_PCI_ADDRESS (Address, 3); @@ -952,8 +952,8 @@ PciWrite32 ( UINT32 EFIAPI PciOr32 ( - IN UINTN Address, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 OrData ) { return PciWrite32 (Address, PciRead32 (Address) | OrData); @@ -983,8 +983,8 @@ PciOr32 ( UINT32 EFIAPI PciAnd32 ( - IN UINTN Address, - IN UINT32 AndData + IN UINTN Address, + IN UINT32 AndData ) { return PciWrite32 (Address, PciRead32 (Address) & AndData); @@ -1016,9 +1016,9 @@ PciAnd32 ( UINT32 EFIAPI PciAndThenOr32 ( - IN UINTN Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINT32 AndData, + IN UINT32 OrData ) { return PciWrite32 (Address, (PciRead32 (Address) & AndData) | OrData); @@ -1049,9 +1049,9 @@ PciAndThenOr32 ( UINT32 EFIAPI PciBitFieldRead32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead32 (PciRead32 (Address), StartBit, EndBit); @@ -1085,10 +1085,10 @@ PciBitFieldRead32 ( UINT32 EFIAPI PciBitFieldWrite32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { return PciWrite32 ( @@ -1128,10 +1128,10 @@ PciBitFieldWrite32 ( UINT32 EFIAPI PciBitFieldOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { return PciWrite32 ( @@ -1171,10 +1171,10 @@ PciBitFieldOr32 ( UINT32 EFIAPI PciBitFieldAnd32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { return PciWrite32 ( @@ -1218,11 +1218,11 @@ PciBitFieldAnd32 ( UINT32 EFIAPI PciBitFieldAndThenOr32 ( - IN UINTN Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { return PciWrite32 ( @@ -1257,12 +1257,12 @@ PciBitFieldAndThenOr32 ( UINTN EFIAPI PciReadBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - OUT VOID *Buffer + IN UINTN StartAddress, + IN UINTN Size, + OUT VOID *Buffer ) { - UINTN ReturnValue; + UINTN ReturnValue; ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0); ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000); @@ -1283,19 +1283,19 @@ PciReadBuffer ( // Read a byte if StartAddress is byte aligned // *(volatile UINT8 *)Buffer = PciRead8 (StartAddress); - StartAddress += sizeof (UINT8); - Size -= sizeof (UINT8); - Buffer = (UINT8*)Buffer + 1; + StartAddress += sizeof (UINT8); + Size -= sizeof (UINT8); + Buffer = (UINT8 *)Buffer + 1; } - if (Size >= sizeof (UINT16) && (StartAddress & BIT1) != 0) { + if ((Size >= sizeof (UINT16)) && ((StartAddress & BIT1) != 0)) { // // Read a word if StartAddress is word aligned // WriteUnaligned16 (Buffer, PciRead16 (StartAddress)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } while (Size >= sizeof (UINT32)) { @@ -1304,8 +1304,8 @@ PciReadBuffer ( // WriteUnaligned32 (Buffer, PciRead32 (StartAddress)); StartAddress += sizeof (UINT32); - Size -= sizeof (UINT32); - Buffer = (UINT32*)Buffer + 1; + Size -= sizeof (UINT32); + Buffer = (UINT32 *)Buffer + 1; } if (Size >= sizeof (UINT16)) { @@ -1314,8 +1314,8 @@ PciReadBuffer ( // WriteUnaligned16 (Buffer, PciRead16 (StartAddress)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } if (Size >= sizeof (UINT8)) { @@ -1355,12 +1355,12 @@ PciReadBuffer ( UINTN EFIAPI PciWriteBuffer ( - IN UINTN StartAddress, - IN UINTN Size, - IN VOID *Buffer + IN UINTN StartAddress, + IN UINTN Size, + IN VOID *Buffer ) { - UINTN ReturnValue; + UINTN ReturnValue; ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0); ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000); @@ -1380,20 +1380,20 @@ PciWriteBuffer ( // // Write a byte if StartAddress is byte aligned // - PciWrite8 (StartAddress, *(UINT8*)Buffer); + PciWrite8 (StartAddress, *(UINT8 *)Buffer); StartAddress += sizeof (UINT8); - Size -= sizeof (UINT8); - Buffer = (UINT8*)Buffer + 1; + Size -= sizeof (UINT8); + Buffer = (UINT8 *)Buffer + 1; } - if (Size >= sizeof (UINT16) && (StartAddress & BIT1) != 0) { + if ((Size >= sizeof (UINT16)) && ((StartAddress & BIT1) != 0)) { // // Write a word if StartAddress is word aligned // PciWrite16 (StartAddress, ReadUnaligned16 (Buffer)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } while (Size >= sizeof (UINT32)) { @@ -1402,8 +1402,8 @@ PciWriteBuffer ( // PciWrite32 (StartAddress, ReadUnaligned32 (Buffer)); StartAddress += sizeof (UINT32); - Size -= sizeof (UINT32); - Buffer = (UINT32*)Buffer + 1; + Size -= sizeof (UINT32); + Buffer = (UINT32 *)Buffer + 1; } if (Size >= sizeof (UINT16)) { @@ -1412,15 +1412,15 @@ PciWriteBuffer ( // PciWrite16 (StartAddress, ReadUnaligned16 (Buffer)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } if (Size >= sizeof (UINT8)) { // // Write the last remaining byte if exist // - PciWrite8 (StartAddress, *(UINT8*)Buffer); + PciWrite8 (StartAddress, *(UINT8 *)Buffer); } return ReturnValue; diff --git a/MdePkg/Library/UefiPciSegmentLibPciRootBridgeIo/PciSegmentLib.c b/MdePkg/Library/UefiPciSegmentLibPciRootBridgeIo/PciSegmentLib.c index 65f2fa3..c798836 100644 --- a/MdePkg/Library/UefiPciSegmentLibPciRootBridgeIo/PciSegmentLib.c +++ b/MdePkg/Library/UefiPciSegmentLibPciRootBridgeIo/PciSegmentLib.c @@ -11,8 +11,8 @@ // // Global variable to record data of PCI Root Bridge I/O Protocol instances // -PCI_ROOT_BRIDGE_DATA *mPciRootBridgeData = NULL; -UINTN mNumberOfPciRootBridges = 0; +PCI_ROOT_BRIDGE_DATA *mPciRootBridgeData = NULL; +UINTN mNumberOfPciRootBridges = 0; /** The constructor function caches data of PCI Root Bridge I/O Protocol instances. @@ -30,16 +30,16 @@ UINTN mNumberOfPciRootBridges = 0; EFI_STATUS EFIAPI PciSegmentLibConstructor ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable ) { - EFI_STATUS Status; - UINTN Index; - UINTN HandleCount; - EFI_HANDLE *HandleBuffer; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo; - EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *Descriptors; + EFI_STATUS Status; + UINTN Index; + UINTN HandleCount; + EFI_HANDLE *HandleBuffer; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo; + EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *Descriptors; HandleCount = 0; HandleBuffer = NULL; @@ -68,14 +68,14 @@ PciSegmentLibConstructor ( Status = gBS->HandleProtocol ( HandleBuffer[Index], &gEfiPciRootBridgeIoProtocolGuid, - (VOID **) &PciRootBridgeIo + (VOID **)&PciRootBridgeIo ); ASSERT_EFI_ERROR (Status); mPciRootBridgeData[Index].PciRootBridgeIo = PciRootBridgeIo; mPciRootBridgeData[Index].SegmentNumber = PciRootBridgeIo->SegmentNumber; - Status = PciRootBridgeIo->Configuration (PciRootBridgeIo, (VOID **) &Descriptors); + Status = PciRootBridgeIo->Configuration (PciRootBridgeIo, (VOID **)&Descriptors); ASSERT_EFI_ERROR (Status); while (Descriptors->Desc != ACPI_END_TAG_DESCRIPTOR) { @@ -84,12 +84,14 @@ PciSegmentLibConstructor ( mPciRootBridgeData[Index].MaxBusNumber = Descriptors->AddrRangeMax; break; } + Descriptors++; } + ASSERT (Descriptors->Desc != ACPI_END_TAG_DESCRIPTOR); } - FreePool(HandleBuffer); + FreePool (HandleBuffer); return EFI_SUCCESS; } @@ -109,8 +111,8 @@ PciSegmentLibConstructor ( EFI_STATUS EFIAPI PciSegmentLibDestructor ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable ) { FreePool (mPciRootBridgeData); @@ -132,12 +134,12 @@ PciSegmentLibDestructor ( **/ EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * PciSegmentLibSearchForRootBridge ( - IN UINT64 Address + IN UINT64 Address ) { - UINTN Index; - UINT64 SegmentNumber; - UINT64 BusNumber; + UINTN Index; + UINT64 SegmentNumber; + UINT64 BusNumber; for (Index = 0; Index < mNumberOfPciRootBridges; Index++) { // @@ -149,11 +151,12 @@ PciSegmentLibSearchForRootBridge ( // Matches the bus number of address with bus number range of protocol instance. // BusNumber = BitFieldRead64 (Address, 20, 27); - if (BusNumber >= mPciRootBridgeData[Index].MinBusNumber && BusNumber <= mPciRootBridgeData[Index].MaxBusNumber) { + if ((BusNumber >= mPciRootBridgeData[Index].MinBusNumber) && (BusNumber <= mPciRootBridgeData[Index].MaxBusNumber)) { return mPciRootBridgeData[Index].PciRootBridgeIo; } } } + return NULL; } @@ -177,8 +180,8 @@ DxePciSegmentLibPciRootBridgeIoReadWorker ( IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width ) { - UINT32 Data; - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo; + UINT32 Data; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo; PciRootBridgeIo = PciSegmentLibSearchForRootBridge (Address); ASSERT (PciRootBridgeIo != NULL); @@ -217,7 +220,7 @@ DxePciSegmentLibPciRootBridgeIoWriteWorker ( IN UINT32 Data ) { - EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo; + EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo; PciRootBridgeIo = PciSegmentLibSearchForRootBridge (Address); ASSERT (PciRootBridgeIo != NULL); @@ -277,12 +280,12 @@ PciSegmentRegisterForRuntimeAccess ( UINT8 EFIAPI PciSegmentRead8 ( - IN UINT64 Address + IN UINT64 Address ) { ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 0); - return (UINT8) DxePciSegmentLibPciRootBridgeIoReadWorker (Address, EfiPciWidthUint8); + return (UINT8)DxePciSegmentLibPciRootBridgeIoReadWorker (Address, EfiPciWidthUint8); } /** @@ -302,13 +305,13 @@ PciSegmentRead8 ( UINT8 EFIAPI PciSegmentWrite8 ( - IN UINT64 Address, - IN UINT8 Value + IN UINT64 Address, + IN UINT8 Value ) { ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 0); - return (UINT8) DxePciSegmentLibPciRootBridgeIoWriteWorker (Address, EfiPciWidthUint8, Value); + return (UINT8)DxePciSegmentLibPciRootBridgeIoWriteWorker (Address, EfiPciWidthUint8, Value); } /** @@ -331,11 +334,11 @@ PciSegmentWrite8 ( UINT8 EFIAPI PciSegmentOr8 ( - IN UINT64 Address, - IN UINT8 OrData + IN UINT64 Address, + IN UINT8 OrData ) { - return PciSegmentWrite8 (Address, (UINT8) (PciSegmentRead8 (Address) | OrData)); + return PciSegmentWrite8 (Address, (UINT8)(PciSegmentRead8 (Address) | OrData)); } /** @@ -357,11 +360,11 @@ PciSegmentOr8 ( UINT8 EFIAPI PciSegmentAnd8 ( - IN UINT64 Address, - IN UINT8 AndData + IN UINT64 Address, + IN UINT8 AndData ) { - return PciSegmentWrite8 (Address, (UINT8) (PciSegmentRead8 (Address) & AndData)); + return PciSegmentWrite8 (Address, (UINT8)(PciSegmentRead8 (Address) & AndData)); } /** @@ -387,12 +390,12 @@ PciSegmentAnd8 ( UINT8 EFIAPI PciSegmentAndThenOr8 ( - IN UINT64 Address, - IN UINT8 AndData, - IN UINT8 OrData + IN UINT64 Address, + IN UINT8 AndData, + IN UINT8 OrData ) { - return PciSegmentWrite8 (Address, (UINT8) ((PciSegmentRead8 (Address) & AndData) | OrData)); + return PciSegmentWrite8 (Address, (UINT8)((PciSegmentRead8 (Address) & AndData) | OrData)); } /** @@ -419,9 +422,9 @@ PciSegmentAndThenOr8 ( UINT8 EFIAPI PciSegmentBitFieldRead8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead8 (PciSegmentRead8 (Address), StartBit, EndBit); @@ -454,10 +457,10 @@ PciSegmentBitFieldRead8 ( UINT8 EFIAPI PciSegmentBitFieldWrite8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 Value + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) { return PciSegmentWrite8 ( @@ -496,10 +499,10 @@ PciSegmentBitFieldWrite8 ( UINT8 EFIAPI PciSegmentBitFieldOr8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) { return PciSegmentWrite8 ( @@ -538,10 +541,10 @@ PciSegmentBitFieldOr8 ( UINT8 EFIAPI PciSegmentBitFieldAnd8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData ) { return PciSegmentWrite8 ( @@ -583,11 +586,11 @@ PciSegmentBitFieldAnd8 ( UINT8 EFIAPI PciSegmentBitFieldAndThenOr8 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT8 AndData, - IN UINT8 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) { return PciSegmentWrite8 ( @@ -613,12 +616,12 @@ PciSegmentBitFieldAndThenOr8 ( UINT16 EFIAPI PciSegmentRead16 ( - IN UINT64 Address + IN UINT64 Address ) { ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 1); - return (UINT16) DxePciSegmentLibPciRootBridgeIoReadWorker (Address, EfiPciWidthUint16); + return (UINT16)DxePciSegmentLibPciRootBridgeIoReadWorker (Address, EfiPciWidthUint16); } /** @@ -639,13 +642,13 @@ PciSegmentRead16 ( UINT16 EFIAPI PciSegmentWrite16 ( - IN UINT64 Address, - IN UINT16 Value + IN UINT64 Address, + IN UINT16 Value ) { ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 1); - return (UINT16) DxePciSegmentLibPciRootBridgeIoWriteWorker (Address, EfiPciWidthUint16, Value); + return (UINT16)DxePciSegmentLibPciRootBridgeIoWriteWorker (Address, EfiPciWidthUint16, Value); } /** @@ -671,11 +674,11 @@ PciSegmentWrite16 ( UINT16 EFIAPI PciSegmentOr16 ( - IN UINT64 Address, - IN UINT16 OrData + IN UINT64 Address, + IN UINT16 OrData ) { - return PciSegmentWrite16 (Address, (UINT16) (PciSegmentRead16 (Address) | OrData)); + return PciSegmentWrite16 (Address, (UINT16)(PciSegmentRead16 (Address) | OrData)); } /** @@ -699,11 +702,11 @@ PciSegmentOr16 ( UINT16 EFIAPI PciSegmentAnd16 ( - IN UINT64 Address, - IN UINT16 AndData + IN UINT64 Address, + IN UINT16 AndData ) { - return PciSegmentWrite16 (Address, (UINT16) (PciSegmentRead16 (Address) & AndData)); + return PciSegmentWrite16 (Address, (UINT16)(PciSegmentRead16 (Address) & AndData)); } /** @@ -730,12 +733,12 @@ PciSegmentAnd16 ( UINT16 EFIAPI PciSegmentAndThenOr16 ( - IN UINT64 Address, - IN UINT16 AndData, - IN UINT16 OrData + IN UINT64 Address, + IN UINT16 AndData, + IN UINT16 OrData ) { - return PciSegmentWrite16 (Address, (UINT16) ((PciSegmentRead16 (Address) & AndData) | OrData)); + return PciSegmentWrite16 (Address, (UINT16)((PciSegmentRead16 (Address) & AndData) | OrData)); } /** @@ -763,9 +766,9 @@ PciSegmentAndThenOr16 ( UINT16 EFIAPI PciSegmentBitFieldRead16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead16 (PciSegmentRead16 (Address), StartBit, EndBit); @@ -799,10 +802,10 @@ PciSegmentBitFieldRead16 ( UINT16 EFIAPI PciSegmentBitFieldWrite16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 Value + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value ) { return PciSegmentWrite16 ( @@ -842,10 +845,10 @@ PciSegmentBitFieldWrite16 ( UINT16 EFIAPI PciSegmentBitFieldOr16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData ) { return PciSegmentWrite16 ( @@ -885,10 +888,10 @@ PciSegmentBitFieldOr16 ( UINT16 EFIAPI PciSegmentBitFieldAnd16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData ) { return PciSegmentWrite16 ( @@ -931,11 +934,11 @@ PciSegmentBitFieldAnd16 ( UINT16 EFIAPI PciSegmentBitFieldAndThenOr16 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT16 AndData, - IN UINT16 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData ) { return PciSegmentWrite16 ( @@ -961,7 +964,7 @@ PciSegmentBitFieldAndThenOr16 ( UINT32 EFIAPI PciSegmentRead32 ( - IN UINT64 Address + IN UINT64 Address ) { ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 3); @@ -987,8 +990,8 @@ PciSegmentRead32 ( UINT32 EFIAPI PciSegmentWrite32 ( - IN UINT64 Address, - IN UINT32 Value + IN UINT64 Address, + IN UINT32 Value ) { ASSERT_INVALID_PCI_SEGMENT_ADDRESS (Address, 3); @@ -1017,8 +1020,8 @@ PciSegmentWrite32 ( UINT32 EFIAPI PciSegmentOr32 ( - IN UINT64 Address, - IN UINT32 OrData + IN UINT64 Address, + IN UINT32 OrData ) { return PciSegmentWrite32 (Address, PciSegmentRead32 (Address) | OrData); @@ -1045,8 +1048,8 @@ PciSegmentOr32 ( UINT32 EFIAPI PciSegmentAnd32 ( - IN UINT64 Address, - IN UINT32 AndData + IN UINT64 Address, + IN UINT32 AndData ) { return PciSegmentWrite32 (Address, PciSegmentRead32 (Address) & AndData); @@ -1076,9 +1079,9 @@ PciSegmentAnd32 ( UINT32 EFIAPI PciSegmentAndThenOr32 ( - IN UINT64 Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINT64 Address, + IN UINT32 AndData, + IN UINT32 OrData ) { return PciSegmentWrite32 (Address, (PciSegmentRead32 (Address) & AndData) | OrData); @@ -1109,9 +1112,9 @@ PciSegmentAndThenOr32 ( UINT32 EFIAPI PciSegmentBitFieldRead32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit ) { return BitFieldRead32 (PciSegmentRead32 (Address), StartBit, EndBit); @@ -1145,10 +1148,10 @@ PciSegmentBitFieldRead32 ( UINT32 EFIAPI PciSegmentBitFieldWrite32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 Value + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value ) { return PciSegmentWrite32 ( @@ -1187,10 +1190,10 @@ PciSegmentBitFieldWrite32 ( UINT32 EFIAPI PciSegmentBitFieldOr32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData ) { return PciSegmentWrite32 ( @@ -1229,10 +1232,10 @@ PciSegmentBitFieldOr32 ( UINT32 EFIAPI PciSegmentBitFieldAnd32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData ) { return PciSegmentWrite32 ( @@ -1275,11 +1278,11 @@ PciSegmentBitFieldAnd32 ( UINT32 EFIAPI PciSegmentBitFieldAndThenOr32 ( - IN UINT64 Address, - IN UINTN StartBit, - IN UINTN EndBit, - IN UINT32 AndData, - IN UINT32 OrData + IN UINT64 Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData ) { return PciSegmentWrite32 ( @@ -1314,12 +1317,12 @@ PciSegmentBitFieldAndThenOr32 ( UINTN EFIAPI PciSegmentReadBuffer ( - IN UINT64 StartAddress, - IN UINTN Size, - OUT VOID *Buffer + IN UINT64 StartAddress, + IN UINTN Size, + OUT VOID *Buffer ) { - UINTN ReturnValue; + UINTN ReturnValue; ASSERT_INVALID_PCI_SEGMENT_ADDRESS (StartAddress, 0); ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000); @@ -1340,19 +1343,19 @@ PciSegmentReadBuffer ( // Read a byte if StartAddress is byte aligned // *(volatile UINT8 *)Buffer = PciSegmentRead8 (StartAddress); - StartAddress += sizeof (UINT8); - Size -= sizeof (UINT8); - Buffer = (UINT8*)Buffer + 1; + StartAddress += sizeof (UINT8); + Size -= sizeof (UINT8); + Buffer = (UINT8 *)Buffer + 1; } - if (Size >= sizeof (UINT16) && (StartAddress & BIT1) != 0) { + if ((Size >= sizeof (UINT16)) && ((StartAddress & BIT1) != 0)) { // // Read a word if StartAddress is word aligned // WriteUnaligned16 (Buffer, PciSegmentRead16 (StartAddress)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } while (Size >= sizeof (UINT32)) { @@ -1361,8 +1364,8 @@ PciSegmentReadBuffer ( // WriteUnaligned32 (Buffer, PciSegmentRead32 (StartAddress)); StartAddress += sizeof (UINT32); - Size -= sizeof (UINT32); - Buffer = (UINT32*)Buffer + 1; + Size -= sizeof (UINT32); + Buffer = (UINT32 *)Buffer + 1; } if (Size >= sizeof (UINT16)) { @@ -1371,8 +1374,8 @@ PciSegmentReadBuffer ( // WriteUnaligned16 (Buffer, PciSegmentRead16 (StartAddress)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } if (Size >= sizeof (UINT8)) { @@ -1412,12 +1415,12 @@ PciSegmentReadBuffer ( UINTN EFIAPI PciSegmentWriteBuffer ( - IN UINT64 StartAddress, - IN UINTN Size, - IN VOID *Buffer + IN UINT64 StartAddress, + IN UINTN Size, + IN VOID *Buffer ) { - UINTN ReturnValue; + UINTN ReturnValue; ASSERT_INVALID_PCI_SEGMENT_ADDRESS (StartAddress, 0); ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000); @@ -1437,20 +1440,20 @@ PciSegmentWriteBuffer ( // // Write a byte if StartAddress is byte aligned // - PciSegmentWrite8 (StartAddress, *(UINT8*)Buffer); + PciSegmentWrite8 (StartAddress, *(UINT8 *)Buffer); StartAddress += sizeof (UINT8); - Size -= sizeof (UINT8); - Buffer = (UINT8*)Buffer + 1; + Size -= sizeof (UINT8); + Buffer = (UINT8 *)Buffer + 1; } - if (Size >= sizeof (UINT16) && (StartAddress & BIT1) != 0) { + if ((Size >= sizeof (UINT16)) && ((StartAddress & BIT1) != 0)) { // // Write a word if StartAddress is word aligned // PciSegmentWrite16 (StartAddress, ReadUnaligned16 (Buffer)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } while (Size >= sizeof (UINT32)) { @@ -1459,8 +1462,8 @@ PciSegmentWriteBuffer ( // PciSegmentWrite32 (StartAddress, ReadUnaligned32 (Buffer)); StartAddress += sizeof (UINT32); - Size -= sizeof (UINT32); - Buffer = (UINT32*)Buffer + 1; + Size -= sizeof (UINT32); + Buffer = (UINT32 *)Buffer + 1; } if (Size >= sizeof (UINT16)) { @@ -1469,15 +1472,15 @@ PciSegmentWriteBuffer ( // PciSegmentWrite16 (StartAddress, ReadUnaligned16 (Buffer)); StartAddress += sizeof (UINT16); - Size -= sizeof (UINT16); - Buffer = (UINT16*)Buffer + 1; + Size -= sizeof (UINT16); + Buffer = (UINT16 *)Buffer + 1; } if (Size >= sizeof (UINT8)) { // // Write the last remaining byte if exist // - PciSegmentWrite8 (StartAddress, *(UINT8*)Buffer); + PciSegmentWrite8 (StartAddress, *(UINT8 *)Buffer); } return ReturnValue; diff --git a/MdePkg/Library/UefiPciSegmentLibPciRootBridgeIo/PciSegmentLib.h b/MdePkg/Library/UefiPciSegmentLibPciRootBridgeIo/PciSegmentLib.h index 693702f..8c2f6b4 100644 --- a/MdePkg/Library/UefiPciSegmentLibPciRootBridgeIo/PciSegmentLib.h +++ b/MdePkg/Library/UefiPciSegmentLibPciRootBridgeIo/PciSegmentLib.h @@ -9,7 +9,6 @@ #ifndef __DXE_PCI_SEGMENT_LIB__ #define __DXE_PCI_SEGMENT_LIB__ - #include #include @@ -35,7 +34,7 @@ typedef struct { @param M Additional bits to assert to be zero. **/ -#define ASSERT_INVALID_PCI_SEGMENT_ADDRESS(A,M) \ +#define ASSERT_INVALID_PCI_SEGMENT_ADDRESS(A, M) \ ASSERT (((A) & (0xffff0000f0000000ULL | (M))) == 0) /** diff --git a/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c b/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c index a2eadaf..ffc4cf4 100644 --- a/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c +++ b/MdePkg/Library/UefiRuntimeLib/RuntimeLib.c @@ -21,11 +21,11 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// /// Driver Lib Module Globals /// -EFI_EVENT mEfiVirtualNotifyEvent; -EFI_EVENT mEfiExitBootServicesEvent; -BOOLEAN mEfiGoneVirtual = FALSE; -BOOLEAN mEfiAtRuntime = FALSE; -EFI_RUNTIME_SERVICES *mInternalRT; +EFI_EVENT mEfiVirtualNotifyEvent; +EFI_EVENT mEfiExitBootServicesEvent; +BOOLEAN mEfiGoneVirtual = FALSE; +BOOLEAN mEfiAtRuntime = FALSE; +EFI_RUNTIME_SERVICES *mInternalRT; /** Set AtRuntime flag as TRUE after ExitBootServices. @@ -37,8 +37,8 @@ EFI_RUNTIME_SERVICES *mInternalRT; VOID EFIAPI RuntimeLibExitBootServicesEvent ( - IN EFI_EVENT Event, - IN VOID *Context + IN EFI_EVENT Event, + IN VOID *Context ) { mEfiAtRuntime = TRUE; @@ -55,14 +55,14 @@ RuntimeLibExitBootServicesEvent ( VOID EFIAPI RuntimeLibVirtualNotifyEvent ( - IN EFI_EVENT Event, - IN VOID *Context + IN EFI_EVENT Event, + IN VOID *Context ) { // // Update global for Runtime Services Table and IO // - EfiConvertPointer (0, (VOID **) &mInternalRT); + EfiConvertPointer (0, (VOID **)&mInternalRT); mEfiGoneVirtual = TRUE; } @@ -80,8 +80,8 @@ RuntimeLibVirtualNotifyEvent ( EFI_STATUS EFIAPI RuntimeDriverLibConstruct ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUS Status; @@ -192,7 +192,6 @@ EfiGoneVirtual ( return mEfiGoneVirtual; } - /** This service is a wrapper for the UEFI Runtime Service ResetSystem(). @@ -225,16 +224,15 @@ EfiGoneVirtual ( VOID EFIAPI EfiResetSystem ( - IN EFI_RESET_TYPE ResetType, - IN EFI_STATUS ResetStatus, - IN UINTN DataSize, - IN VOID *ResetData OPTIONAL + IN EFI_RESET_TYPE ResetType, + IN EFI_STATUS ResetStatus, + IN UINTN DataSize, + IN VOID *ResetData OPTIONAL ) { mInternalRT->ResetSystem (ResetType, ResetStatus, DataSize, ResetData); } - /** This service is a wrapper for the UEFI Runtime Service GetTime(). @@ -259,14 +257,13 @@ EfiResetSystem ( EFI_STATUS EFIAPI EfiGetTime ( - OUT EFI_TIME *Time, - OUT EFI_TIME_CAPABILITIES *Capabilities OPTIONAL + OUT EFI_TIME *Time, + OUT EFI_TIME_CAPABILITIES *Capabilities OPTIONAL ) { return mInternalRT->GetTime (Time, Capabilities); } - /** This service is a wrapper for the UEFI Runtime Service SetTime(). @@ -292,13 +289,12 @@ EfiGetTime ( EFI_STATUS EFIAPI EfiSetTime ( - IN EFI_TIME *Time + IN EFI_TIME *Time ) { return mInternalRT->SetTime (Time); } - /** This service is a wrapper for the UEFI Runtime Service GetWakeupTime(). @@ -323,16 +319,14 @@ EfiSetTime ( EFI_STATUS EFIAPI EfiGetWakeupTime ( - OUT BOOLEAN *Enabled, - OUT BOOLEAN *Pending, - OUT EFI_TIME *Time + OUT BOOLEAN *Enabled, + OUT BOOLEAN *Pending, + OUT EFI_TIME *Time ) { return mInternalRT->GetWakeupTime (Enabled, Pending, Time); } - - /** This service is a wrapper for the UEFI Runtime Service SetWakeupTime() @@ -358,14 +352,13 @@ EfiGetWakeupTime ( EFI_STATUS EFIAPI EfiSetWakeupTime ( - IN BOOLEAN Enable, - IN EFI_TIME *Time OPTIONAL + IN BOOLEAN Enable, + IN EFI_TIME *Time OPTIONAL ) { return mInternalRT->SetWakeupTime (Enable, Time); } - /** This service is a wrapper for the UEFI Runtime Service GetVariable(). @@ -399,17 +392,16 @@ EfiSetWakeupTime ( EFI_STATUS EFIAPI EfiGetVariable ( - IN CHAR16 *VariableName, - IN EFI_GUID *VendorGuid, - OUT UINT32 *Attributes OPTIONAL, - IN OUT UINTN *DataSize, - OUT VOID *Data + IN CHAR16 *VariableName, + IN EFI_GUID *VendorGuid, + OUT UINT32 *Attributes OPTIONAL, + IN OUT UINTN *DataSize, + OUT VOID *Data ) { return mInternalRT->GetVariable (VariableName, VendorGuid, Attributes, DataSize, Data); } - /** This service is a wrapper for the UEFI Runtime Service GetNextVariableName(). @@ -443,15 +435,14 @@ EfiGetVariable ( EFI_STATUS EFIAPI EfiGetNextVariableName ( - IN OUT UINTN *VariableNameSize, - IN OUT CHAR16 *VariableName, - IN OUT EFI_GUID *VendorGuid + IN OUT UINTN *VariableNameSize, + IN OUT CHAR16 *VariableName, + IN OUT EFI_GUID *VendorGuid ) { return mInternalRT->GetNextVariableName (VariableNameSize, VariableName, VendorGuid); } - /** This service is a wrapper for the UEFI Runtime Service GetNextVariableName() @@ -484,17 +475,16 @@ EfiGetNextVariableName ( EFI_STATUS EFIAPI EfiSetVariable ( - IN CHAR16 *VariableName, - IN EFI_GUID *VendorGuid, - IN UINT32 Attributes, - IN UINTN DataSize, - IN VOID *Data + IN CHAR16 *VariableName, + IN EFI_GUID *VendorGuid, + IN UINT32 Attributes, + IN UINTN DataSize, + IN VOID *Data ) { return mInternalRT->SetVariable (VariableName, VendorGuid, Attributes, DataSize, Data); } - /** This service is a wrapper for the UEFI Runtime Service GetNextHighMonotonicCount(). @@ -514,13 +504,12 @@ EfiSetVariable ( EFI_STATUS EFIAPI EfiGetNextHighMonotonicCount ( - OUT UINT32 *HighCount + OUT UINT32 *HighCount ) { return mInternalRT->GetNextHighMonotonicCount (HighCount); } - /** This service is a wrapper for the UEFI Runtime Service ConvertPointer(). @@ -542,14 +531,13 @@ EfiGetNextHighMonotonicCount ( EFI_STATUS EFIAPI EfiConvertPointer ( - IN UINTN DebugDisposition, - IN OUT VOID **Address + IN UINTN DebugDisposition, + IN OUT VOID **Address ) { return gRT->ConvertPointer (DebugDisposition, Address); } - /** Determines the new virtual address that is to be used on subsequent memory accesses. @@ -575,14 +563,13 @@ EfiConvertPointer ( EFI_STATUS EFIAPI EfiConvertFunctionPointer ( - IN UINTN DebugDisposition, - IN OUT VOID **Address + IN UINTN DebugDisposition, + IN OUT VOID **Address ) { return EfiConvertPointer (DebugDisposition, Address); } - /** Convert the standard Lib double linked list to a virtual mapping. @@ -600,8 +587,8 @@ EfiConvertFunctionPointer ( EFI_STATUS EFIAPI EfiConvertList ( - IN UINTN DebugDisposition, - IN OUT LIST_ENTRY *ListHead + IN UINTN DebugDisposition, + IN OUT LIST_ENTRY *ListHead ) { LIST_ENTRY *Link; @@ -623,20 +610,20 @@ EfiConvertList ( EfiConvertPointer ( Link->ForwardLink == ListHead ? DebugDisposition : 0, - (VOID **) &Link->ForwardLink + (VOID **)&Link->ForwardLink ); EfiConvertPointer ( Link->BackLink == ListHead ? DebugDisposition : 0, - (VOID **) &Link->BackLink + (VOID **)&Link->BackLink ); Link = NextLink; } while (Link != ListHead); + return EFI_SUCCESS; } - /** This service is a wrapper for the UEFI Runtime Service SetVirtualAddressMap(). @@ -666,21 +653,20 @@ EfiConvertList ( EFI_STATUS EFIAPI EfiSetVirtualAddressMap ( - IN UINTN MemoryMapSize, - IN UINTN DescriptorSize, - IN UINT32 DescriptorVersion, - IN CONST EFI_MEMORY_DESCRIPTOR *VirtualMap + IN UINTN MemoryMapSize, + IN UINTN DescriptorSize, + IN UINT32 DescriptorVersion, + IN CONST EFI_MEMORY_DESCRIPTOR *VirtualMap ) { return mInternalRT->SetVirtualAddressMap ( MemoryMapSize, DescriptorSize, DescriptorVersion, - (EFI_MEMORY_DESCRIPTOR *) VirtualMap + (EFI_MEMORY_DESCRIPTOR *)VirtualMap ); } - /** This service is a wrapper for the UEFI Runtime Service UpdateCapsule(). @@ -718,9 +704,9 @@ EfiSetVirtualAddressMap ( EFI_STATUS EFIAPI EfiUpdateCapsule ( - IN EFI_CAPSULE_HEADER **CapsuleHeaderArray, - IN UINTN CapsuleCount, - IN EFI_PHYSICAL_ADDRESS ScatterGatherList OPTIONAL + IN EFI_CAPSULE_HEADER **CapsuleHeaderArray, + IN UINTN CapsuleCount, + IN EFI_PHYSICAL_ADDRESS ScatterGatherList OPTIONAL ) { return mInternalRT->UpdateCapsule ( @@ -730,7 +716,6 @@ EfiUpdateCapsule ( ); } - /** This service is a wrapper for the UEFI Runtime Service QueryCapsuleCapabilities(). @@ -768,10 +753,10 @@ EfiUpdateCapsule ( EFI_STATUS EFIAPI EfiQueryCapsuleCapabilities ( - IN EFI_CAPSULE_HEADER **CapsuleHeaderArray, - IN UINTN CapsuleCount, - OUT UINT64 *MaximumCapsuleSize, - OUT EFI_RESET_TYPE *ResetType + IN EFI_CAPSULE_HEADER **CapsuleHeaderArray, + IN UINTN CapsuleCount, + OUT UINT64 *MaximumCapsuleSize, + OUT EFI_RESET_TYPE *ResetType ) { return mInternalRT->QueryCapsuleCapabilities ( @@ -782,7 +767,6 @@ EfiQueryCapsuleCapabilities ( ); } - /** This service is a wrapper for the UEFI Runtime Service QueryVariableInfo(). diff --git a/MdePkg/Library/UefiScsiLib/UefiScsiLib.c b/MdePkg/Library/UefiScsiLib/UefiScsiLib.c index 28c7dd6..a33cadd 100644 --- a/MdePkg/Library/UefiScsiLib/UefiScsiLib.c +++ b/MdePkg/Library/UefiScsiLib/UefiScsiLib.c @@ -6,7 +6,6 @@ **/ - #include #include #include @@ -17,10 +16,9 @@ #include - - // - // Scsi Command Length - // +// +// Scsi Command Length +// #define EFI_SCSI_OP_LENGTH_SIX 0x6 #define EFI_SCSI_OP_LENGTH_TEN 0xa #define EFI_SCSI_OP_LENGTH_TWELVE 0xc @@ -35,32 +33,30 @@ typedef struct { /// The SCSI request packet to send to the SCSI controller specified by /// the device handle. /// - EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; + EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; /// /// The length of the output sense data. /// - UINT8 *SenseDataLength; + UINT8 *SenseDataLength; /// /// The status of the SCSI host adapter. /// - UINT8 *HostAdapterStatus; + UINT8 *HostAdapterStatus; /// /// The status of the target SCSI device. /// - UINT8 *TargetStatus; + UINT8 *TargetStatus; /// /// The length of the data buffer for the SCSI read/write command. /// - UINT32 *DataLength; + UINT32 *DataLength; /// /// The caller event to be signaled when the SCSI read/write command /// completes. /// - EFI_EVENT CallerEvent; + EFI_EVENT CallerEvent; } EFI_SCSI_LIB_ASYNC_CONTEXT; - - /** Execute Test Unit Ready SCSI command on a specific SCSI target. @@ -135,13 +131,13 @@ ScsiTestUnitReadyCommand ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus ) { - EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; - EFI_STATUS Status; - UINT8 Cdb[EFI_SCSI_OP_LENGTH_SIX]; + EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; + EFI_STATUS Status; + UINT8 Cdb[EFI_SCSI_OP_LENGTH_SIX]; ASSERT (SenseDataLength != NULL); ASSERT (HostAdapterStatus != NULL); @@ -151,30 +147,29 @@ ScsiTestUnitReadyCommand ( ZeroMem (&CommandPacket, sizeof (EFI_SCSI_IO_SCSI_REQUEST_PACKET)); ZeroMem (Cdb, EFI_SCSI_OP_LENGTH_SIX); - CommandPacket.Timeout = Timeout; - CommandPacket.InDataBuffer = NULL; - CommandPacket.InTransferLength= 0; - CommandPacket.OutDataBuffer = NULL; - CommandPacket.OutTransferLength= 0; - CommandPacket.SenseData = SenseData; - CommandPacket.Cdb = Cdb; + CommandPacket.Timeout = Timeout; + CommandPacket.InDataBuffer = NULL; + CommandPacket.InTransferLength = 0; + CommandPacket.OutDataBuffer = NULL; + CommandPacket.OutTransferLength = 0; + CommandPacket.SenseData = SenseData; + CommandPacket.Cdb = Cdb; // // Fill Cdb for Test Unit Ready Command // Cdb[0] = EFI_SCSI_OP_TEST_UNIT_READY; - CommandPacket.CdbLength = (UINT8) EFI_SCSI_OP_LENGTH_SIX; + CommandPacket.CdbLength = (UINT8)EFI_SCSI_OP_LENGTH_SIX; CommandPacket.SenseDataLength = *SenseDataLength; - Status = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL); + Status = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL); - *HostAdapterStatus = CommandPacket.HostAdapterStatus; - *TargetStatus = CommandPacket.TargetStatus; - *SenseDataLength = CommandPacket.SenseDataLength; + *HostAdapterStatus = CommandPacket.HostAdapterStatus; + *TargetStatus = CommandPacket.TargetStatus; + *SenseDataLength = CommandPacket.SenseDataLength; return Status; } - /** Execute Inquiry SCSI command on a specific SCSI target. @@ -271,17 +266,17 @@ ScsiInquiryCommandEx ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN OUT VOID *InquiryDataBuffer OPTIONAL, IN OUT UINT32 *InquiryDataLength, IN BOOLEAN EnableVitalProductData, IN UINT8 PageCode ) { - EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; - EFI_STATUS Status; - UINT8 Cdb[EFI_SCSI_OP_LENGTH_SIX]; + EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; + EFI_STATUS Status; + UINT8 Cdb[EFI_SCSI_OP_LENGTH_SIX]; ASSERT (SenseDataLength != NULL); ASSERT (HostAdapterStatus != NULL); @@ -292,14 +287,14 @@ ScsiInquiryCommandEx ( ZeroMem (&CommandPacket, sizeof (EFI_SCSI_IO_SCSI_REQUEST_PACKET)); ZeroMem (Cdb, EFI_SCSI_OP_LENGTH_SIX); - CommandPacket.Timeout = Timeout; - CommandPacket.InDataBuffer = InquiryDataBuffer; - CommandPacket.InTransferLength= *InquiryDataLength; - CommandPacket.SenseData = SenseData; - CommandPacket.SenseDataLength = *SenseDataLength; - CommandPacket.Cdb = Cdb; + CommandPacket.Timeout = Timeout; + CommandPacket.InDataBuffer = InquiryDataBuffer; + CommandPacket.InTransferLength = *InquiryDataLength; + CommandPacket.SenseData = SenseData; + CommandPacket.SenseDataLength = *SenseDataLength; + CommandPacket.Cdb = Cdb; - Cdb[0] = EFI_SCSI_OP_INQUIRY; + Cdb[0] = EFI_SCSI_OP_INQUIRY; if (EnableVitalProductData) { Cdb[1] |= 0x01; Cdb[2] = PageCode; @@ -309,21 +304,20 @@ ScsiInquiryCommandEx ( *InquiryDataLength = 0xff; } - Cdb[4] = (UINT8) (*InquiryDataLength); - CommandPacket.CdbLength = (UINT8) EFI_SCSI_OP_LENGTH_SIX; + Cdb[4] = (UINT8)(*InquiryDataLength); + CommandPacket.CdbLength = (UINT8)EFI_SCSI_OP_LENGTH_SIX; CommandPacket.DataDirection = EFI_SCSI_DATA_IN; - Status = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL); + Status = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL); - *HostAdapterStatus = CommandPacket.HostAdapterStatus; - *TargetStatus = CommandPacket.TargetStatus; - *SenseDataLength = CommandPacket.SenseDataLength; - *InquiryDataLength = CommandPacket.InTransferLength; + *HostAdapterStatus = CommandPacket.HostAdapterStatus; + *TargetStatus = CommandPacket.TargetStatus; + *SenseDataLength = CommandPacket.SenseDataLength; + *InquiryDataLength = CommandPacket.InTransferLength; return Status; } - /** Execute Inquiry SCSI command on a specific SCSI target. @@ -418,8 +412,8 @@ ScsiInquiryCommand ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN OUT VOID *InquiryDataBuffer OPTIONAL, IN OUT UINT32 *InquiryDataLength, IN BOOLEAN EnableVitalProductData @@ -531,22 +525,22 @@ ScsiInquiryCommand ( EFI_STATUS EFIAPI ScsiModeSense10Command ( - IN EFI_SCSI_IO_PROTOCOL *ScsiIo, - IN UINT64 Timeout, - IN OUT VOID *SenseData OPTIONAL, - IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, - IN OUT VOID *DataBuffer OPTIONAL, - IN OUT UINT32 *DataLength, - IN UINT8 DBDField OPTIONAL, - IN UINT8 PageControl, - IN UINT8 PageCode + IN EFI_SCSI_IO_PROTOCOL *ScsiIo, + IN UINT64 Timeout, + IN OUT VOID *SenseData OPTIONAL, + IN OUT UINT8 *SenseDataLength, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, + IN OUT VOID *DataBuffer OPTIONAL, + IN OUT UINT32 *DataLength, + IN UINT8 DBDField OPTIONAL, + IN UINT8 PageControl, + IN UINT8 PageCode ) { - EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; - EFI_STATUS Status; - UINT8 Cdb[EFI_SCSI_OP_LENGTH_TEN]; + EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; + EFI_STATUS Status; + UINT8 Cdb[EFI_SCSI_OP_LENGTH_TEN]; ASSERT (SenseDataLength != NULL); ASSERT (HostAdapterStatus != NULL); @@ -557,41 +551,40 @@ ScsiModeSense10Command ( ZeroMem (&CommandPacket, sizeof (EFI_SCSI_IO_SCSI_REQUEST_PACKET)); ZeroMem (Cdb, EFI_SCSI_OP_LENGTH_TEN); - CommandPacket.Timeout = Timeout; - CommandPacket.InDataBuffer = DataBuffer; - CommandPacket.SenseData = SenseData; - CommandPacket.InTransferLength= *DataLength; - CommandPacket.Cdb = Cdb; + CommandPacket.Timeout = Timeout; + CommandPacket.InDataBuffer = DataBuffer; + CommandPacket.SenseData = SenseData; + CommandPacket.InTransferLength = *DataLength; + CommandPacket.Cdb = Cdb; // // Fill Cdb for Mode Sense (10) Command // - Cdb[0] = EFI_SCSI_OP_MODE_SEN10; + Cdb[0] = EFI_SCSI_OP_MODE_SEN10; // // DBDField is in Cdb[1] bit3 of (bit7..0) // - Cdb[1] = (UINT8) ((DBDField << 3) & 0x08); + Cdb[1] = (UINT8)((DBDField << 3) & 0x08); // // PageControl is in Cdb[2] bit7..6, PageCode is in Cdb[2] bit5..0 // - Cdb[2] = (UINT8) (((PageControl << 6) & 0xc0) | (PageCode & 0x3f)); - Cdb[7] = (UINT8) (*DataLength >> 8); - Cdb[8] = (UINT8) (*DataLength); + Cdb[2] = (UINT8)(((PageControl << 6) & 0xc0) | (PageCode & 0x3f)); + Cdb[7] = (UINT8)(*DataLength >> 8); + Cdb[8] = (UINT8)(*DataLength); CommandPacket.CdbLength = EFI_SCSI_OP_LENGTH_TEN; CommandPacket.DataDirection = EFI_SCSI_DATA_IN; CommandPacket.SenseDataLength = *SenseDataLength; - Status = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL); + Status = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL); - *HostAdapterStatus = CommandPacket.HostAdapterStatus; - *TargetStatus = CommandPacket.TargetStatus; - *SenseDataLength = CommandPacket.SenseDataLength; - *DataLength = CommandPacket.InTransferLength; + *HostAdapterStatus = CommandPacket.HostAdapterStatus; + *TargetStatus = CommandPacket.TargetStatus; + *SenseDataLength = CommandPacket.SenseDataLength; + *DataLength = CommandPacket.InTransferLength; return Status; } - /** Execute Request Sense SCSI command on a specific SCSI target. @@ -631,13 +624,13 @@ ScsiRequestSenseCommand ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus ) { - EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; - EFI_STATUS Status; - UINT8 Cdb[EFI_SCSI_OP_LENGTH_SIX]; + EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; + EFI_STATUS Status; + UINT8 Cdb[EFI_SCSI_OP_LENGTH_SIX]; ASSERT (SenseDataLength != NULL); ASSERT (HostAdapterStatus != NULL); @@ -647,31 +640,30 @@ ScsiRequestSenseCommand ( ZeroMem (&CommandPacket, sizeof (EFI_SCSI_IO_SCSI_REQUEST_PACKET)); ZeroMem (Cdb, EFI_SCSI_OP_LENGTH_SIX); - CommandPacket.Timeout = Timeout; - CommandPacket.InDataBuffer = SenseData; - CommandPacket.SenseData = NULL; - CommandPacket.InTransferLength= *SenseDataLength; - CommandPacket.Cdb = Cdb; + CommandPacket.Timeout = Timeout; + CommandPacket.InDataBuffer = SenseData; + CommandPacket.SenseData = NULL; + CommandPacket.InTransferLength = *SenseDataLength; + CommandPacket.Cdb = Cdb; // // Fill Cdb for Request Sense Command // - Cdb[0] = EFI_SCSI_OP_REQUEST_SENSE; - Cdb[4] = (UINT8) (*SenseDataLength); + Cdb[0] = EFI_SCSI_OP_REQUEST_SENSE; + Cdb[4] = (UINT8)(*SenseDataLength); - CommandPacket.CdbLength = (UINT8) EFI_SCSI_OP_LENGTH_SIX; + CommandPacket.CdbLength = (UINT8)EFI_SCSI_OP_LENGTH_SIX; CommandPacket.DataDirection = EFI_SCSI_DATA_IN; CommandPacket.SenseDataLength = 0; - Status = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL); + Status = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL); - *HostAdapterStatus = CommandPacket.HostAdapterStatus; - *TargetStatus = CommandPacket.TargetStatus; - *SenseDataLength = (UINT8) CommandPacket.InTransferLength; + *HostAdapterStatus = CommandPacket.HostAdapterStatus; + *TargetStatus = CommandPacket.TargetStatus; + *SenseDataLength = (UINT8)CommandPacket.InTransferLength; return Status; } - /** Execute Read Capacity SCSI command on a specific SCSI target. @@ -723,16 +715,16 @@ ScsiReadCapacityCommand ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN OUT VOID *DataBuffer OPTIONAL, IN OUT UINT32 *DataLength, IN BOOLEAN Pmi ) { - EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; - EFI_STATUS Status; - UINT8 Cdb[EFI_SCSI_OP_LENGTH_TEN]; + EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; + EFI_STATUS Status; + UINT8 Cdb[EFI_SCSI_OP_LENGTH_TEN]; ASSERT (SenseDataLength != NULL); ASSERT (HostAdapterStatus != NULL); @@ -743,15 +735,15 @@ ScsiReadCapacityCommand ( ZeroMem (&CommandPacket, sizeof (EFI_SCSI_IO_SCSI_REQUEST_PACKET)); ZeroMem (Cdb, EFI_SCSI_OP_LENGTH_TEN); - CommandPacket.Timeout = Timeout; - CommandPacket.InDataBuffer = DataBuffer; - CommandPacket.SenseData = SenseData; - CommandPacket.InTransferLength= *DataLength; - CommandPacket.Cdb = Cdb; + CommandPacket.Timeout = Timeout; + CommandPacket.InDataBuffer = DataBuffer; + CommandPacket.SenseData = SenseData; + CommandPacket.InTransferLength = *DataLength; + CommandPacket.Cdb = Cdb; // // Fill Cdb for Read Capacity Command // - Cdb[0] = EFI_SCSI_OP_READ_CAPACITY; + Cdb[0] = EFI_SCSI_OP_READ_CAPACITY; if (!Pmi) { // // Partial medium indicator,if Pmi is FALSE, the Cdb.2 ~ Cdb.5 MUST BE ZERO. @@ -765,17 +757,16 @@ ScsiReadCapacityCommand ( CommandPacket.DataDirection = EFI_SCSI_DATA_IN; CommandPacket.SenseDataLength = *SenseDataLength; - Status = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL); + Status = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL); - *HostAdapterStatus = CommandPacket.HostAdapterStatus; - *TargetStatus = CommandPacket.TargetStatus; - *SenseDataLength = CommandPacket.SenseDataLength; - *DataLength = CommandPacket.InTransferLength; + *HostAdapterStatus = CommandPacket.HostAdapterStatus; + *TargetStatus = CommandPacket.TargetStatus; + *SenseDataLength = CommandPacket.SenseDataLength; + *DataLength = CommandPacket.InTransferLength; return Status; } - /** Execute Read Capacity SCSI 16 command on a specific SCSI target. @@ -827,16 +818,16 @@ ScsiReadCapacity16Command ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN OUT VOID *DataBuffer OPTIONAL, IN OUT UINT32 *DataLength, IN BOOLEAN Pmi ) { - EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; - EFI_STATUS Status; - UINT8 Cdb[16]; + EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; + EFI_STATUS Status; + UINT8 Cdb[16]; ASSERT (SenseDataLength != NULL); ASSERT (HostAdapterStatus != NULL); @@ -847,16 +838,16 @@ ScsiReadCapacity16Command ( ZeroMem (&CommandPacket, sizeof (EFI_SCSI_IO_SCSI_REQUEST_PACKET)); ZeroMem (Cdb, 16); - CommandPacket.Timeout = Timeout; - CommandPacket.InDataBuffer = DataBuffer; - CommandPacket.SenseData = SenseData; - CommandPacket.InTransferLength= *DataLength; - CommandPacket.Cdb = Cdb; + CommandPacket.Timeout = Timeout; + CommandPacket.InDataBuffer = DataBuffer; + CommandPacket.SenseData = SenseData; + CommandPacket.InTransferLength = *DataLength; + CommandPacket.Cdb = Cdb; // // Fill Cdb for Read Capacity Command // - Cdb[0] = EFI_SCSI_OP_READ_CAPACITY16; - Cdb[1] = 0x10; + Cdb[0] = EFI_SCSI_OP_READ_CAPACITY16; + Cdb[1] = 0x10; if (!Pmi) { // // Partial medium indicator,if Pmi is FALSE, the Cdb.2 ~ Cdb.9 MUST BE ZERO. @@ -866,22 +857,21 @@ ScsiReadCapacity16Command ( Cdb[14] |= 0x01; } - Cdb[13] = 0x20; + Cdb[13] = 0x20; CommandPacket.CdbLength = 16; CommandPacket.DataDirection = EFI_SCSI_DATA_IN; CommandPacket.SenseDataLength = *SenseDataLength; - Status = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL); + Status = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL); - *HostAdapterStatus = CommandPacket.HostAdapterStatus; - *TargetStatus = CommandPacket.TargetStatus; - *SenseDataLength = CommandPacket.SenseDataLength; - *DataLength = CommandPacket.InTransferLength; + *HostAdapterStatus = CommandPacket.HostAdapterStatus; + *TargetStatus = CommandPacket.TargetStatus; + *SenseDataLength = CommandPacket.SenseDataLength; + *DataLength = CommandPacket.InTransferLength; return Status; } - /** Execute Read(10) SCSI command on a specific SCSI target. @@ -934,17 +924,17 @@ ScsiRead10Command ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN OUT VOID *DataBuffer OPTIONAL, IN OUT UINT32 *DataLength, IN UINT32 StartLba, IN UINT32 SectorSize ) { - EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; - EFI_STATUS Status; - UINT8 Cdb[EFI_SCSI_OP_LENGTH_TEN]; + EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; + EFI_STATUS Status; + UINT8 Cdb[EFI_SCSI_OP_LENGTH_TEN]; ASSERT (SenseDataLength != NULL); ASSERT (HostAdapterStatus != NULL); @@ -955,33 +945,32 @@ ScsiRead10Command ( ZeroMem (&CommandPacket, sizeof (EFI_SCSI_IO_SCSI_REQUEST_PACKET)); ZeroMem (Cdb, EFI_SCSI_OP_LENGTH_TEN); - CommandPacket.Timeout = Timeout; - CommandPacket.InDataBuffer = DataBuffer; - CommandPacket.SenseData = SenseData; - CommandPacket.InTransferLength= *DataLength; - CommandPacket.Cdb = Cdb; + CommandPacket.Timeout = Timeout; + CommandPacket.InDataBuffer = DataBuffer; + CommandPacket.SenseData = SenseData; + CommandPacket.InTransferLength = *DataLength; + CommandPacket.Cdb = Cdb; // // Fill Cdb for Read (10) Command // - Cdb[0] = EFI_SCSI_OP_READ10; + Cdb[0] = EFI_SCSI_OP_READ10; WriteUnaligned32 ((UINT32 *)&Cdb[2], SwapBytes32 (StartLba)); - WriteUnaligned16 ((UINT16 *)&Cdb[7], SwapBytes16 ((UINT16) SectorSize)); + WriteUnaligned16 ((UINT16 *)&Cdb[7], SwapBytes16 ((UINT16)SectorSize)); CommandPacket.CdbLength = EFI_SCSI_OP_LENGTH_TEN; CommandPacket.DataDirection = EFI_SCSI_DATA_IN; CommandPacket.SenseDataLength = *SenseDataLength; - Status = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL); + Status = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL); - *HostAdapterStatus = CommandPacket.HostAdapterStatus; - *TargetStatus = CommandPacket.TargetStatus; - *SenseDataLength = CommandPacket.SenseDataLength; - *DataLength = CommandPacket.InTransferLength; + *HostAdapterStatus = CommandPacket.HostAdapterStatus; + *TargetStatus = CommandPacket.TargetStatus; + *SenseDataLength = CommandPacket.SenseDataLength; + *DataLength = CommandPacket.InTransferLength; return Status; } - /** Execute Write(10) SCSI command on a specific SCSI target. @@ -1034,17 +1023,17 @@ ScsiWrite10Command ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN OUT VOID *DataBuffer OPTIONAL, IN OUT UINT32 *DataLength, IN UINT32 StartLba, IN UINT32 SectorSize ) { - EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; - EFI_STATUS Status; - UINT8 Cdb[EFI_SCSI_OP_LENGTH_TEN]; + EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; + EFI_STATUS Status; + UINT8 Cdb[EFI_SCSI_OP_LENGTH_TEN]; ASSERT (SenseDataLength != NULL); ASSERT (HostAdapterStatus != NULL); @@ -1063,21 +1052,21 @@ ScsiWrite10Command ( // // Fill Cdb for Write (10) Command // - Cdb[0] = EFI_SCSI_OP_WRITE10; - Cdb[1] = EFI_SCSI_BLOCK_FUA; + Cdb[0] = EFI_SCSI_OP_WRITE10; + Cdb[1] = EFI_SCSI_BLOCK_FUA; WriteUnaligned32 ((UINT32 *)&Cdb[2], SwapBytes32 (StartLba)); - WriteUnaligned16 ((UINT16 *)&Cdb[7], SwapBytes16 ((UINT16) SectorSize)); + WriteUnaligned16 ((UINT16 *)&Cdb[7], SwapBytes16 ((UINT16)SectorSize)); CommandPacket.CdbLength = EFI_SCSI_OP_LENGTH_TEN; CommandPacket.DataDirection = EFI_SCSI_DATA_OUT; CommandPacket.SenseDataLength = *SenseDataLength; - Status = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL); + Status = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL); - *HostAdapterStatus = CommandPacket.HostAdapterStatus; - *TargetStatus = CommandPacket.TargetStatus; - *SenseDataLength = CommandPacket.SenseDataLength; - *DataLength = CommandPacket.OutTransferLength; + *HostAdapterStatus = CommandPacket.HostAdapterStatus; + *TargetStatus = CommandPacket.TargetStatus; + *SenseDataLength = CommandPacket.SenseDataLength; + *DataLength = CommandPacket.OutTransferLength; return Status; } @@ -1134,17 +1123,17 @@ ScsiRead16Command ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN OUT VOID *DataBuffer OPTIONAL, IN OUT UINT32 *DataLength, IN UINT64 StartLba, IN UINT32 SectorSize ) { - EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; - EFI_STATUS Status; - UINT8 Cdb[EFI_SCSI_OP_LENGTH_SIXTEEN]; + EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; + EFI_STATUS Status; + UINT8 Cdb[EFI_SCSI_OP_LENGTH_SIXTEEN]; ASSERT (SenseDataLength != NULL); ASSERT (HostAdapterStatus != NULL); @@ -1163,7 +1152,7 @@ ScsiRead16Command ( // // Fill Cdb for Read (16) Command // - Cdb[0] = EFI_SCSI_OP_READ16; + Cdb[0] = EFI_SCSI_OP_READ16; WriteUnaligned64 ((UINT64 *)&Cdb[2], SwapBytes64 (StartLba)); WriteUnaligned32 ((UINT32 *)&Cdb[10], SwapBytes32 (SectorSize)); @@ -1171,17 +1160,16 @@ ScsiRead16Command ( CommandPacket.DataDirection = EFI_SCSI_DATA_IN; CommandPacket.SenseDataLength = *SenseDataLength; - Status = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL); + Status = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL); - *HostAdapterStatus = CommandPacket.HostAdapterStatus; - *TargetStatus = CommandPacket.TargetStatus; - *SenseDataLength = CommandPacket.SenseDataLength; - *DataLength = CommandPacket.InTransferLength; + *HostAdapterStatus = CommandPacket.HostAdapterStatus; + *TargetStatus = CommandPacket.TargetStatus; + *SenseDataLength = CommandPacket.SenseDataLength; + *DataLength = CommandPacket.InTransferLength; return Status; } - /** Execute Write(16) SCSI command on a specific SCSI target. @@ -1234,17 +1222,17 @@ ScsiWrite16Command ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN OUT VOID *DataBuffer OPTIONAL, IN OUT UINT32 *DataLength, IN UINT64 StartLba, IN UINT32 SectorSize ) { - EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; - EFI_STATUS Status; - UINT8 Cdb[EFI_SCSI_OP_LENGTH_SIXTEEN]; + EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; + EFI_STATUS Status; + UINT8 Cdb[EFI_SCSI_OP_LENGTH_SIXTEEN]; ASSERT (SenseDataLength != NULL); ASSERT (HostAdapterStatus != NULL); @@ -1263,8 +1251,8 @@ ScsiWrite16Command ( // // Fill Cdb for Write (16) Command // - Cdb[0] = EFI_SCSI_OP_WRITE16; - Cdb[1] = EFI_SCSI_BLOCK_FUA; + Cdb[0] = EFI_SCSI_OP_WRITE16; + Cdb[1] = EFI_SCSI_BLOCK_FUA; WriteUnaligned64 ((UINT64 *)&Cdb[2], SwapBytes64 (StartLba)); WriteUnaligned32 ((UINT32 *)&Cdb[10], SwapBytes32 (SectorSize)); @@ -1272,17 +1260,16 @@ ScsiWrite16Command ( CommandPacket.DataDirection = EFI_SCSI_DATA_OUT; CommandPacket.SenseDataLength = *SenseDataLength; - Status = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL); + Status = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL); - *HostAdapterStatus = CommandPacket.HostAdapterStatus; - *TargetStatus = CommandPacket.TargetStatus; - *SenseDataLength = CommandPacket.SenseDataLength; - *DataLength = CommandPacket.OutTransferLength; + *HostAdapterStatus = CommandPacket.HostAdapterStatus; + *TargetStatus = CommandPacket.TargetStatus; + *SenseDataLength = CommandPacket.SenseDataLength; + *DataLength = CommandPacket.OutTransferLength; return Status; } - /** Execute Security Protocol In SCSI command on a specific SCSI target. @@ -1338,19 +1325,19 @@ ScsiSecurityProtocolInCommand ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN UINT8 SecurityProtocol, IN UINT16 SecurityProtocolSpecific, IN BOOLEAN Inc512, IN UINTN DataLength, IN OUT VOID *DataBuffer OPTIONAL, - OUT UINTN *TransferLength + OUT UINTN *TransferLength ) { - EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; - EFI_STATUS Status; - UINT8 Cdb[EFI_SCSI_OP_LENGTH_TWELVE]; + EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; + EFI_STATUS Status; + UINT8 Cdb[EFI_SCSI_OP_LENGTH_TWELVE]; ASSERT (SenseDataLength != NULL); ASSERT (HostAdapterStatus != NULL); @@ -1362,43 +1349,43 @@ ScsiSecurityProtocolInCommand ( ZeroMem (&CommandPacket, sizeof (EFI_SCSI_IO_SCSI_REQUEST_PACKET)); ZeroMem (Cdb, EFI_SCSI_OP_LENGTH_TWELVE); - CommandPacket.Timeout = Timeout; - CommandPacket.InDataBuffer = DataBuffer; - CommandPacket.SenseData = SenseData; - CommandPacket.InTransferLength = (UINT32) DataLength; - CommandPacket.Cdb = Cdb; + CommandPacket.Timeout = Timeout; + CommandPacket.InDataBuffer = DataBuffer; + CommandPacket.SenseData = SenseData; + CommandPacket.InTransferLength = (UINT32)DataLength; + CommandPacket.Cdb = Cdb; // // Fill Cdb for Security Protocol In Command // - Cdb[0] = EFI_SCSI_OP_SECURITY_PROTOCOL_IN; - Cdb[1] = SecurityProtocol; + Cdb[0] = EFI_SCSI_OP_SECURITY_PROTOCOL_IN; + Cdb[1] = SecurityProtocol; WriteUnaligned16 ((UINT16 *)&Cdb[2], SwapBytes16 (SecurityProtocolSpecific)); if (Inc512) { if (DataLength % 512 != 0) { return EFI_INVALID_PARAMETER; } - Cdb[4] = BIT7; - WriteUnaligned32 ((UINT32 *)&Cdb[6], SwapBytes32 ((UINT32) DataLength / 512)); + + Cdb[4] = BIT7; + WriteUnaligned32 ((UINT32 *)&Cdb[6], SwapBytes32 ((UINT32)DataLength / 512)); } else { - WriteUnaligned32 ((UINT32 *)&Cdb[6], SwapBytes32 ((UINT32) DataLength)); + WriteUnaligned32 ((UINT32 *)&Cdb[6], SwapBytes32 ((UINT32)DataLength)); } CommandPacket.CdbLength = EFI_SCSI_OP_LENGTH_TWELVE; CommandPacket.DataDirection = EFI_SCSI_DATA_IN; CommandPacket.SenseDataLength = *SenseDataLength; - Status = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL); + Status = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL); - *HostAdapterStatus = CommandPacket.HostAdapterStatus; - *TargetStatus = CommandPacket.TargetStatus; - *SenseDataLength = CommandPacket.SenseDataLength; - *TransferLength = (UINTN) CommandPacket.InTransferLength; + *HostAdapterStatus = CommandPacket.HostAdapterStatus; + *TargetStatus = CommandPacket.TargetStatus; + *SenseDataLength = CommandPacket.SenseDataLength; + *TransferLength = (UINTN)CommandPacket.InTransferLength; return Status; } - /** Execute Security Protocol Out SCSI command on a specific SCSI target. @@ -1451,8 +1438,8 @@ ScsiSecurityProtocolOutCommand ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN UINT8 SecurityProtocol, IN UINT16 SecurityProtocolSpecific, IN BOOLEAN Inc512, @@ -1460,9 +1447,9 @@ ScsiSecurityProtocolOutCommand ( IN OUT VOID *DataBuffer OPTIONAL ) { - EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; - EFI_STATUS Status; - UINT8 Cdb[EFI_SCSI_OP_LENGTH_TWELVE]; + EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket; + EFI_STATUS Status; + UINT8 Cdb[EFI_SCSI_OP_LENGTH_TWELVE]; ASSERT (SenseDataLength != NULL); ASSERT (HostAdapterStatus != NULL); @@ -1476,39 +1463,39 @@ ScsiSecurityProtocolOutCommand ( CommandPacket.Timeout = Timeout; CommandPacket.OutDataBuffer = DataBuffer; CommandPacket.SenseData = SenseData; - CommandPacket.OutTransferLength = (UINT32) DataLength; + CommandPacket.OutTransferLength = (UINT32)DataLength; CommandPacket.Cdb = Cdb; // // Fill Cdb for Security Protocol Out Command // - Cdb[0] = EFI_SCSI_OP_SECURITY_PROTOCOL_OUT; - Cdb[1] = SecurityProtocol; + Cdb[0] = EFI_SCSI_OP_SECURITY_PROTOCOL_OUT; + Cdb[1] = SecurityProtocol; WriteUnaligned16 ((UINT16 *)&Cdb[2], SwapBytes16 (SecurityProtocolSpecific)); if (Inc512) { if (DataLength % 512 != 0) { return EFI_INVALID_PARAMETER; } - Cdb[4] = BIT7; - WriteUnaligned32 ((UINT32 *)&Cdb[6], SwapBytes32 ((UINT32) DataLength / 512)); + + Cdb[4] = BIT7; + WriteUnaligned32 ((UINT32 *)&Cdb[6], SwapBytes32 ((UINT32)DataLength / 512)); } else { - WriteUnaligned32 ((UINT32 *)&Cdb[6], SwapBytes32 ((UINT32) DataLength)); + WriteUnaligned32 ((UINT32 *)&Cdb[6], SwapBytes32 ((UINT32)DataLength)); } CommandPacket.CdbLength = EFI_SCSI_OP_LENGTH_TWELVE; CommandPacket.DataDirection = EFI_SCSI_DATA_OUT; CommandPacket.SenseDataLength = *SenseDataLength; - Status = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL); + Status = ScsiIo->ExecuteScsiCommand (ScsiIo, &CommandPacket, NULL); - *HostAdapterStatus = CommandPacket.HostAdapterStatus; - *TargetStatus = CommandPacket.TargetStatus; - *SenseDataLength = CommandPacket.SenseDataLength; + *HostAdapterStatus = CommandPacket.HostAdapterStatus; + *TargetStatus = CommandPacket.TargetStatus; + *SenseDataLength = CommandPacket.SenseDataLength; return Status; } - /** Internal helper notify function in which update the result of the non-blocking SCSI Read/Write commands and signal caller event. @@ -1524,36 +1511,36 @@ ScsiLibNotify ( IN VOID *Context ) { - EFI_SCSI_LIB_ASYNC_CONTEXT *LibContext; - EFI_SCSI_IO_SCSI_REQUEST_PACKET *CommandPacket; - EFI_EVENT CallerEvent; + EFI_SCSI_LIB_ASYNC_CONTEXT *LibContext; + EFI_SCSI_IO_SCSI_REQUEST_PACKET *CommandPacket; + EFI_EVENT CallerEvent; - LibContext = (EFI_SCSI_LIB_ASYNC_CONTEXT *) Context; + LibContext = (EFI_SCSI_LIB_ASYNC_CONTEXT *)Context; CommandPacket = &LibContext->CommandPacket; - CallerEvent = LibContext->CallerEvent; + CallerEvent = LibContext->CallerEvent; // // Update SCSI Read/Write operation results // - *LibContext->SenseDataLength = CommandPacket->SenseDataLength; - *LibContext->HostAdapterStatus = CommandPacket->HostAdapterStatus; - *LibContext->TargetStatus = CommandPacket->TargetStatus; + *LibContext->SenseDataLength = CommandPacket->SenseDataLength; + *LibContext->HostAdapterStatus = CommandPacket->HostAdapterStatus; + *LibContext->TargetStatus = CommandPacket->TargetStatus; if (CommandPacket->InDataBuffer != NULL) { - *LibContext->DataLength = CommandPacket->InTransferLength; + *LibContext->DataLength = CommandPacket->InTransferLength; } else { - *LibContext->DataLength = CommandPacket->OutTransferLength; + *LibContext->DataLength = CommandPacket->OutTransferLength; } if (CommandPacket->Cdb != NULL) { FreePool (CommandPacket->Cdb); } + FreePool (Context); gBS->CloseEvent (Event); gBS->SignalEvent (CallerEvent); } - /** Execute blocking/non-blocking Read(10) SCSI command on a specific SCSI target. @@ -1634,8 +1621,8 @@ ScsiRead10CommandEx ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN OUT VOID *DataBuffer OPTIONAL, IN OUT UINT32 *DataLength, IN UINT32 StartLba, @@ -1643,11 +1630,11 @@ ScsiRead10CommandEx ( IN EFI_EVENT Event OPTIONAL ) { - EFI_SCSI_LIB_ASYNC_CONTEXT *Context; - EFI_SCSI_IO_SCSI_REQUEST_PACKET *CommandPacket; - EFI_STATUS Status; - UINT8 *Cdb; - EFI_EVENT SelfEvent; + EFI_SCSI_LIB_ASYNC_CONTEXT *Context; + EFI_SCSI_IO_SCSI_REQUEST_PACKET *CommandPacket; + EFI_STATUS Status; + UINT8 *Cdb; + EFI_EVENT SelfEvent; if (Event == NULL) { return ScsiRead10Command ( @@ -1681,10 +1668,10 @@ ScsiRead10CommandEx ( goto ErrorExit; } - Context->SenseDataLength = SenseDataLength; - Context->HostAdapterStatus = HostAdapterStatus; - Context->TargetStatus = TargetStatus; - Context->CallerEvent = Event; + Context->SenseDataLength = SenseDataLength; + Context->HostAdapterStatus = HostAdapterStatus; + Context->TargetStatus = TargetStatus; + Context->CallerEvent = Event; CommandPacket = &Context->CommandPacket; CommandPacket->Timeout = Timeout; @@ -1695,13 +1682,13 @@ ScsiRead10CommandEx ( // // Fill Cdb for Read (10) Command // - Cdb[0] = EFI_SCSI_OP_READ10; + Cdb[0] = EFI_SCSI_OP_READ10; WriteUnaligned32 ((UINT32 *)&Cdb[2], SwapBytes32 (StartLba)); - WriteUnaligned16 ((UINT16 *)&Cdb[7], SwapBytes16 ((UINT16) SectorSize)); + WriteUnaligned16 ((UINT16 *)&Cdb[7], SwapBytes16 ((UINT16)SectorSize)); - CommandPacket->CdbLength = EFI_SCSI_OP_LENGTH_TEN; - CommandPacket->DataDirection = EFI_SCSI_DATA_IN; - CommandPacket->SenseDataLength = *SenseDataLength; + CommandPacket->CdbLength = EFI_SCSI_OP_LENGTH_TEN; + CommandPacket->DataDirection = EFI_SCSI_DATA_IN; + CommandPacket->SenseDataLength = *SenseDataLength; // // Create Event @@ -1713,12 +1700,12 @@ ScsiRead10CommandEx ( Context, &SelfEvent ); - if (EFI_ERROR(Status)) { + if (EFI_ERROR (Status)) { goto ErrorExit; } Status = ScsiIo->ExecuteScsiCommand (ScsiIo, CommandPacket, SelfEvent); - if (EFI_ERROR(Status)) { + if (EFI_ERROR (Status)) { // // Since ScsiLibNotify() will not be signaled if ExecuteScsiCommand() // returns with error, close the event here. @@ -1737,7 +1724,6 @@ ErrorExit: return Status; } - /** Execute blocking/non-blocking Write(10) SCSI command on a specific SCSI target. @@ -1818,8 +1804,8 @@ ScsiWrite10CommandEx ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN OUT VOID *DataBuffer OPTIONAL, IN OUT UINT32 *DataLength, IN UINT32 StartLba, @@ -1827,11 +1813,11 @@ ScsiWrite10CommandEx ( IN EFI_EVENT Event OPTIONAL ) { - EFI_SCSI_LIB_ASYNC_CONTEXT *Context; - EFI_SCSI_IO_SCSI_REQUEST_PACKET *CommandPacket; - EFI_STATUS Status; - UINT8 *Cdb; - EFI_EVENT SelfEvent; + EFI_SCSI_LIB_ASYNC_CONTEXT *Context; + EFI_SCSI_IO_SCSI_REQUEST_PACKET *CommandPacket; + EFI_STATUS Status; + UINT8 *Cdb; + EFI_EVENT SelfEvent; if (Event == NULL) { return ScsiWrite10Command ( @@ -1865,10 +1851,10 @@ ScsiWrite10CommandEx ( goto ErrorExit; } - Context->SenseDataLength = SenseDataLength; - Context->HostAdapterStatus = HostAdapterStatus; - Context->TargetStatus = TargetStatus; - Context->CallerEvent = Event; + Context->SenseDataLength = SenseDataLength; + Context->HostAdapterStatus = HostAdapterStatus; + Context->TargetStatus = TargetStatus; + Context->CallerEvent = Event; CommandPacket = &Context->CommandPacket; CommandPacket->Timeout = Timeout; @@ -1879,13 +1865,13 @@ ScsiWrite10CommandEx ( // // Fill Cdb for Write (10) Command // - Cdb[0] = EFI_SCSI_OP_WRITE10; + Cdb[0] = EFI_SCSI_OP_WRITE10; WriteUnaligned32 ((UINT32 *)&Cdb[2], SwapBytes32 (StartLba)); - WriteUnaligned16 ((UINT16 *)&Cdb[7], SwapBytes16 ((UINT16) SectorSize)); + WriteUnaligned16 ((UINT16 *)&Cdb[7], SwapBytes16 ((UINT16)SectorSize)); - CommandPacket->CdbLength = EFI_SCSI_OP_LENGTH_TEN; - CommandPacket->DataDirection = EFI_SCSI_DATA_OUT; - CommandPacket->SenseDataLength = *SenseDataLength; + CommandPacket->CdbLength = EFI_SCSI_OP_LENGTH_TEN; + CommandPacket->DataDirection = EFI_SCSI_DATA_OUT; + CommandPacket->SenseDataLength = *SenseDataLength; // // Create Event @@ -1897,12 +1883,12 @@ ScsiWrite10CommandEx ( Context, &SelfEvent ); - if (EFI_ERROR(Status)) { + if (EFI_ERROR (Status)) { goto ErrorExit; } Status = ScsiIo->ExecuteScsiCommand (ScsiIo, CommandPacket, SelfEvent); - if (EFI_ERROR(Status)) { + if (EFI_ERROR (Status)) { // // Since ScsiLibNotify() will not be signaled if ExecuteScsiCommand() // returns with error, close the event here. @@ -1921,7 +1907,6 @@ ErrorExit: return Status; } - /** Execute blocking/non-blocking Read(16) SCSI command on a specific SCSI target. @@ -2002,8 +1987,8 @@ ScsiRead16CommandEx ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN OUT VOID *DataBuffer OPTIONAL, IN OUT UINT32 *DataLength, IN UINT64 StartLba, @@ -2011,11 +1996,11 @@ ScsiRead16CommandEx ( IN EFI_EVENT Event OPTIONAL ) { - EFI_SCSI_LIB_ASYNC_CONTEXT *Context; - EFI_SCSI_IO_SCSI_REQUEST_PACKET *CommandPacket; - EFI_STATUS Status; - UINT8 *Cdb; - EFI_EVENT SelfEvent; + EFI_SCSI_LIB_ASYNC_CONTEXT *Context; + EFI_SCSI_IO_SCSI_REQUEST_PACKET *CommandPacket; + EFI_STATUS Status; + UINT8 *Cdb; + EFI_EVENT SelfEvent; if (Event == NULL) { return ScsiRead16Command ( @@ -2049,10 +2034,10 @@ ScsiRead16CommandEx ( goto ErrorExit; } - Context->SenseDataLength = SenseDataLength; - Context->HostAdapterStatus = HostAdapterStatus; - Context->TargetStatus = TargetStatus; - Context->CallerEvent = Event; + Context->SenseDataLength = SenseDataLength; + Context->HostAdapterStatus = HostAdapterStatus; + Context->TargetStatus = TargetStatus; + Context->CallerEvent = Event; CommandPacket = &Context->CommandPacket; CommandPacket->Timeout = Timeout; @@ -2063,13 +2048,13 @@ ScsiRead16CommandEx ( // // Fill Cdb for Read (16) Command // - Cdb[0] = EFI_SCSI_OP_READ16; + Cdb[0] = EFI_SCSI_OP_READ16; WriteUnaligned64 ((UINT64 *)&Cdb[2], SwapBytes64 (StartLba)); WriteUnaligned32 ((UINT32 *)&Cdb[10], SwapBytes32 (SectorSize)); - CommandPacket->CdbLength = EFI_SCSI_OP_LENGTH_SIXTEEN; - CommandPacket->DataDirection = EFI_SCSI_DATA_IN; - CommandPacket->SenseDataLength = *SenseDataLength; + CommandPacket->CdbLength = EFI_SCSI_OP_LENGTH_SIXTEEN; + CommandPacket->DataDirection = EFI_SCSI_DATA_IN; + CommandPacket->SenseDataLength = *SenseDataLength; // // Create Event @@ -2081,12 +2066,12 @@ ScsiRead16CommandEx ( Context, &SelfEvent ); - if (EFI_ERROR(Status)) { + if (EFI_ERROR (Status)) { goto ErrorExit; } Status = ScsiIo->ExecuteScsiCommand (ScsiIo, CommandPacket, SelfEvent); - if (EFI_ERROR(Status)) { + if (EFI_ERROR (Status)) { // // Since ScsiLibNotify() will not be signaled if ExecuteScsiCommand() // returns with error, close the event here. @@ -2105,7 +2090,6 @@ ErrorExit: return Status; } - /** Execute blocking/non-blocking Write(16) SCSI command on a specific SCSI target. @@ -2186,8 +2170,8 @@ ScsiWrite16CommandEx ( IN UINT64 Timeout, IN OUT VOID *SenseData OPTIONAL, IN OUT UINT8 *SenseDataLength, - OUT UINT8 *HostAdapterStatus, - OUT UINT8 *TargetStatus, + OUT UINT8 *HostAdapterStatus, + OUT UINT8 *TargetStatus, IN OUT VOID *DataBuffer OPTIONAL, IN OUT UINT32 *DataLength, IN UINT64 StartLba, @@ -2195,11 +2179,11 @@ ScsiWrite16CommandEx ( IN EFI_EVENT Event OPTIONAL ) { - EFI_SCSI_LIB_ASYNC_CONTEXT *Context; - EFI_SCSI_IO_SCSI_REQUEST_PACKET *CommandPacket; - EFI_STATUS Status; - UINT8 *Cdb; - EFI_EVENT SelfEvent; + EFI_SCSI_LIB_ASYNC_CONTEXT *Context; + EFI_SCSI_IO_SCSI_REQUEST_PACKET *CommandPacket; + EFI_STATUS Status; + UINT8 *Cdb; + EFI_EVENT SelfEvent; if (Event == NULL) { return ScsiWrite16Command ( @@ -2233,10 +2217,10 @@ ScsiWrite16CommandEx ( goto ErrorExit; } - Context->SenseDataLength = SenseDataLength; - Context->HostAdapterStatus = HostAdapterStatus; - Context->TargetStatus = TargetStatus; - Context->CallerEvent = Event; + Context->SenseDataLength = SenseDataLength; + Context->HostAdapterStatus = HostAdapterStatus; + Context->TargetStatus = TargetStatus; + Context->CallerEvent = Event; CommandPacket = &Context->CommandPacket; CommandPacket->Timeout = Timeout; @@ -2247,13 +2231,13 @@ ScsiWrite16CommandEx ( // // Fill Cdb for Write (16) Command // - Cdb[0] = EFI_SCSI_OP_WRITE16; + Cdb[0] = EFI_SCSI_OP_WRITE16; WriteUnaligned64 ((UINT64 *)&Cdb[2], SwapBytes64 (StartLba)); WriteUnaligned32 ((UINT32 *)&Cdb[10], SwapBytes32 (SectorSize)); - CommandPacket->CdbLength = EFI_SCSI_OP_LENGTH_SIXTEEN; - CommandPacket->DataDirection = EFI_SCSI_DATA_OUT; - CommandPacket->SenseDataLength = *SenseDataLength; + CommandPacket->CdbLength = EFI_SCSI_OP_LENGTH_SIXTEEN; + CommandPacket->DataDirection = EFI_SCSI_DATA_OUT; + CommandPacket->SenseDataLength = *SenseDataLength; // // Create Event @@ -2265,12 +2249,12 @@ ScsiWrite16CommandEx ( Context, &SelfEvent ); - if (EFI_ERROR(Status)) { + if (EFI_ERROR (Status)) { goto ErrorExit; } Status = ScsiIo->ExecuteScsiCommand (ScsiIo, CommandPacket, SelfEvent); - if (EFI_ERROR(Status)) { + if (EFI_ERROR (Status)) { // // Since ScsiLibNotify() will not be signaled if ExecuteScsiCommand() // returns with error, close the event here. diff --git a/MdePkg/Library/UefiUsbLib/Hid.c b/MdePkg/Library/UefiUsbLib/Hid.c index 1d65552..a03922c 100644 --- a/MdePkg/Library/UefiUsbLib/Hid.c +++ b/MdePkg/Library/UefiUsbLib/Hid.c @@ -45,23 +45,23 @@ EFI_STATUS EFIAPI UsbGetHidDescriptor ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT8 Interface, - OUT EFI_USB_HID_DESCRIPTOR *HidDescriptor + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT8 Interface, + OUT EFI_USB_HID_DESCRIPTOR *HidDescriptor ) { UINT32 Status; EFI_STATUS Result; EFI_USB_DEVICE_REQUEST Request; - ASSERT(UsbIo != NULL); - ASSERT(HidDescriptor != NULL); + ASSERT (UsbIo != NULL); + ASSERT (HidDescriptor != NULL); Request.RequestType = USB_HID_GET_DESCRIPTOR_REQ_TYPE; Request.Request = USB_REQ_GET_DESCRIPTOR; - Request.Value = (UINT16) (USB_DESC_TYPE_HID << 8); + Request.Value = (UINT16)(USB_DESC_TYPE_HID << 8); Request.Index = Interface; - Request.Length = (UINT16) sizeof (EFI_USB_HID_DESCRIPTOR); + Request.Length = (UINT16)sizeof (EFI_USB_HID_DESCRIPTOR); Result = UsbIo->UsbControlTransfer ( UsbIo, @@ -74,7 +74,6 @@ UsbGetHidDescriptor ( ); return Result; - } /** @@ -101,10 +100,10 @@ UsbGetHidDescriptor ( EFI_STATUS EFIAPI UsbGetReportDescriptor ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT8 Interface, - IN UINT16 DescriptorLength, - OUT UINT8 *DescriptorBuffer + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT8 Interface, + IN UINT16 DescriptorLength, + OUT UINT8 *DescriptorBuffer ) { UINT32 Status; @@ -119,7 +118,7 @@ UsbGetReportDescriptor ( // Request.RequestType = USB_HID_GET_DESCRIPTOR_REQ_TYPE; Request.Request = USB_REQ_GET_DESCRIPTOR; - Request.Value = (UINT16) (USB_DESC_TYPE_REPORT << 8); + Request.Value = (UINT16)(USB_DESC_TYPE_REPORT << 8); Request.Index = Interface; Request.Length = DescriptorLength; @@ -134,7 +133,6 @@ UsbGetReportDescriptor ( ); return Result; - } /** @@ -157,9 +155,9 @@ UsbGetReportDescriptor ( EFI_STATUS EFIAPI UsbGetProtocolRequest ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT8 Interface, - OUT UINT8 *Protocol + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT8 Interface, + OUT UINT8 *Protocol ) { UINT32 Status; @@ -173,10 +171,10 @@ UsbGetProtocolRequest ( // Fill Device request packet // Request.RequestType = USB_HID_CLASS_GET_REQ_TYPE; - Request.Request = EFI_USB_GET_PROTOCOL_REQUEST; - Request.Value = 0; - Request.Index = Interface; - Request.Length = 1; + Request.Request = EFI_USB_GET_PROTOCOL_REQUEST; + Request.Value = 0; + Request.Index = Interface; + Request.Length = 1; Result = UsbIo->UsbControlTransfer ( UsbIo, @@ -191,8 +189,6 @@ UsbGetProtocolRequest ( return Result; } - - /** Set the HID protocol of the specified USB HID interface. @@ -212,9 +208,9 @@ UsbGetProtocolRequest ( EFI_STATUS EFIAPI UsbSetProtocolRequest ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT8 Interface, - IN UINT8 Protocol + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT8 Interface, + IN UINT8 Protocol ) { UINT32 Status; @@ -227,10 +223,10 @@ UsbSetProtocolRequest ( // Fill Device request packet // Request.RequestType = USB_HID_CLASS_SET_REQ_TYPE; - Request.Request = EFI_USB_SET_PROTOCOL_REQUEST; - Request.Value = Protocol; - Request.Index = Interface; - Request.Length = 0; + Request.Request = EFI_USB_SET_PROTOCOL_REQUEST; + Request.Value = Protocol; + Request.Index = Interface; + Request.Length = 0; Result = UsbIo->UsbControlTransfer ( UsbIo, @@ -244,7 +240,6 @@ UsbSetProtocolRequest ( return Result; } - /** Set the idle rate of the specified USB HID report. @@ -265,10 +260,10 @@ UsbSetProtocolRequest ( EFI_STATUS EFIAPI UsbSetIdleRequest ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT8 Interface, - IN UINT8 ReportId, - IN UINT8 Duration + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT8 Interface, + IN UINT8 ReportId, + IN UINT8 Duration ) { UINT32 Status; @@ -280,10 +275,10 @@ UsbSetIdleRequest ( // Fill Device request packet // Request.RequestType = USB_HID_CLASS_SET_REQ_TYPE; - Request.Request = EFI_USB_SET_IDLE_REQUEST; - Request.Value = (UINT16) ((Duration << 8) | ReportId); - Request.Index = Interface; - Request.Length = 0; + Request.Request = EFI_USB_SET_IDLE_REQUEST; + Request.Value = (UINT16)((Duration << 8) | ReportId); + Request.Index = Interface; + Request.Length = 0; Result = UsbIo->UsbControlTransfer ( UsbIo, @@ -297,7 +292,6 @@ UsbSetIdleRequest ( return Result; } - /** Get the idle rate of the specified USB HID report. @@ -319,10 +313,10 @@ UsbSetIdleRequest ( EFI_STATUS EFIAPI UsbGetIdleRequest ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT8 Interface, - IN UINT8 ReportId, - OUT UINT8 *Duration + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT8 Interface, + IN UINT8 ReportId, + OUT UINT8 *Duration ) { UINT32 Status; @@ -335,10 +329,10 @@ UsbGetIdleRequest ( // Fill Device request packet // Request.RequestType = USB_HID_CLASS_GET_REQ_TYPE; - Request.Request = EFI_USB_GET_IDLE_REQUEST; - Request.Value = ReportId; - Request.Index = Interface; - Request.Length = 1; + Request.Request = EFI_USB_GET_IDLE_REQUEST; + Request.Value = ReportId; + Request.Index = Interface; + Request.Length = 1; Result = UsbIo->UsbControlTransfer ( UsbIo, @@ -353,8 +347,6 @@ UsbGetIdleRequest ( return Result; } - - /** Set the report descriptor of the specified USB HID interface. @@ -379,12 +371,12 @@ UsbGetIdleRequest ( EFI_STATUS EFIAPI UsbSetReportRequest ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT8 Interface, - IN UINT8 ReportId, - IN UINT8 ReportType, - IN UINT16 ReportLen, - IN UINT8 *Report + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT8 Interface, + IN UINT8 ReportId, + IN UINT8 ReportType, + IN UINT16 ReportLen, + IN UINT8 *Report ) { UINT32 Status; @@ -398,10 +390,10 @@ UsbSetReportRequest ( // Fill Device request packet // Request.RequestType = USB_HID_CLASS_SET_REQ_TYPE; - Request.Request = EFI_USB_SET_REPORT_REQUEST; - Request.Value = (UINT16) ((ReportType << 8) | ReportId); - Request.Index = Interface; - Request.Length = ReportLen; + Request.Request = EFI_USB_SET_REPORT_REQUEST; + Request.Value = (UINT16)((ReportType << 8) | ReportId); + Request.Index = Interface; + Request.Length = ReportLen; Result = UsbIo->UsbControlTransfer ( UsbIo, @@ -416,7 +408,6 @@ UsbSetReportRequest ( return Result; } - /** Get the report descriptor of the specified USB HID interface. @@ -444,12 +435,12 @@ UsbSetReportRequest ( EFI_STATUS EFIAPI UsbGetReportRequest ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT8 Interface, - IN UINT8 ReportId, - IN UINT8 ReportType, - IN UINT16 ReportLen, - OUT UINT8 *Report + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT8 Interface, + IN UINT8 ReportId, + IN UINT8 ReportType, + IN UINT16 ReportLen, + OUT UINT8 *Report ) { UINT32 Status; @@ -463,10 +454,10 @@ UsbGetReportRequest ( // Fill Device request packet // Request.RequestType = USB_HID_CLASS_GET_REQ_TYPE; - Request.Request = EFI_USB_GET_REPORT_REQUEST; - Request.Value = (UINT16) ((ReportType << 8) | ReportId); - Request.Index = Interface; - Request.Length = ReportLen; + Request.Request = EFI_USB_GET_REPORT_REQUEST; + Request.Value = (UINT16)((ReportType << 8) | ReportId); + Request.Index = Interface; + Request.Length = ReportLen; Result = UsbIo->UsbControlTransfer ( UsbIo, diff --git a/MdePkg/Library/UefiUsbLib/UefiUsbLibInternal.h b/MdePkg/Library/UefiUsbLib/UefiUsbLibInternal.h index 5909d96..185fc6d 100644 --- a/MdePkg/Library/UefiUsbLib/UefiUsbLibInternal.h +++ b/MdePkg/Library/UefiUsbLib/UefiUsbLibInternal.h @@ -20,5 +20,4 @@ #include - #endif diff --git a/MdePkg/Library/UefiUsbLib/UsbDxeLib.c b/MdePkg/Library/UefiUsbLib/UsbDxeLib.c index e75df8d..53b9098 100644 --- a/MdePkg/Library/UefiUsbLib/UsbDxeLib.c +++ b/MdePkg/Library/UefiUsbLib/UsbDxeLib.c @@ -10,7 +10,6 @@ #include "UefiUsbLibInternal.h" - /** Get the descriptor of the specified USB device. @@ -40,12 +39,12 @@ EFI_STATUS EFIAPI UsbGetDescriptor ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT16 Value, - IN UINT16 Index, - IN UINT16 DescriptorLength, - OUT VOID *Descriptor, - OUT UINT32 *Status + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT16 Value, + IN UINT16 Index, + IN UINT16 DescriptorLength, + OUT VOID *Descriptor, + OUT UINT32 *Status ) { EFI_USB_DEVICE_REQUEST DevReq; @@ -56,11 +55,11 @@ UsbGetDescriptor ( ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST)); - DevReq.RequestType = USB_DEV_GET_DESCRIPTOR_REQ_TYPE; - DevReq.Request = USB_REQ_GET_DESCRIPTOR; - DevReq.Value = Value; - DevReq.Index = Index; - DevReq.Length = DescriptorLength; + DevReq.RequestType = USB_DEV_GET_DESCRIPTOR_REQ_TYPE; + DevReq.Request = USB_REQ_GET_DESCRIPTOR; + DevReq.Value = Value; + DevReq.Index = Index; + DevReq.Length = DescriptorLength; return UsbIo->UsbControlTransfer ( UsbIo, @@ -73,7 +72,6 @@ UsbGetDescriptor ( ); } - /** Set the descriptor of the specified USB device. @@ -100,12 +98,12 @@ UsbGetDescriptor ( EFI_STATUS EFIAPI UsbSetDescriptor ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT16 Value, - IN UINT16 Index, - IN UINT16 DescriptorLength, - IN VOID *Descriptor, - OUT UINT32 *Status + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT16 Value, + IN UINT16 Index, + IN UINT16 DescriptorLength, + IN VOID *Descriptor, + OUT UINT32 *Status ) { EFI_USB_DEVICE_REQUEST DevReq; @@ -116,11 +114,11 @@ UsbSetDescriptor ( ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST)); - DevReq.RequestType = USB_DEV_SET_DESCRIPTOR_REQ_TYPE; - DevReq.Request = USB_REQ_SET_DESCRIPTOR; - DevReq.Value = Value; - DevReq.Index = Index; - DevReq.Length = DescriptorLength; + DevReq.RequestType = USB_DEV_SET_DESCRIPTOR_REQ_TYPE; + DevReq.Request = USB_REQ_SET_DESCRIPTOR; + DevReq.Value = Value; + DevReq.Index = Index; + DevReq.Length = DescriptorLength; return UsbIo->UsbControlTransfer ( UsbIo, @@ -133,7 +131,6 @@ UsbSetDescriptor ( ); } - /** Get the interface setting of the specified USB device. @@ -158,10 +155,10 @@ UsbSetDescriptor ( EFI_STATUS EFIAPI UsbGetInterface ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT16 Interface, - OUT UINT16 *AlternateSetting, - OUT UINT32 *Status + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT16 Interface, + OUT UINT16 *AlternateSetting, + OUT UINT32 *Status ) { EFI_USB_DEVICE_REQUEST DevReq; @@ -174,10 +171,10 @@ UsbGetInterface ( ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST)); - DevReq.RequestType = USB_DEV_GET_INTERFACE_REQ_TYPE; - DevReq.Request = USB_REQ_GET_INTERFACE; - DevReq.Index = Interface; - DevReq.Length = 1; + DevReq.RequestType = USB_DEV_GET_INTERFACE_REQ_TYPE; + DevReq.Request = USB_REQ_GET_INTERFACE; + DevReq.Index = Interface; + DevReq.Length = 1; return UsbIo->UsbControlTransfer ( UsbIo, @@ -190,7 +187,6 @@ UsbGetInterface ( ); } - /** Set the interface setting of the specified USB device. @@ -214,10 +210,10 @@ UsbGetInterface ( EFI_STATUS EFIAPI UsbSetInterface ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT16 Interface, - IN UINT16 AlternateSetting, - OUT UINT32 *Status + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT16 Interface, + IN UINT16 AlternateSetting, + OUT UINT32 *Status ) { EFI_USB_DEVICE_REQUEST DevReq; @@ -227,10 +223,10 @@ UsbSetInterface ( ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST)); - DevReq.RequestType = USB_DEV_SET_INTERFACE_REQ_TYPE; - DevReq.Request = USB_REQ_SET_INTERFACE; - DevReq.Value = AlternateSetting; - DevReq.Index = Interface; + DevReq.RequestType = USB_DEV_SET_INTERFACE_REQ_TYPE; + DevReq.Request = USB_REQ_SET_INTERFACE; + DevReq.Value = AlternateSetting; + DevReq.Index = Interface; return UsbIo->UsbControlTransfer ( UsbIo, @@ -243,7 +239,6 @@ UsbSetInterface ( ); } - /** Get the device configuration. @@ -267,9 +262,9 @@ UsbSetInterface ( EFI_STATUS EFIAPI UsbGetConfiguration ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - OUT UINT16 *ConfigurationValue, - OUT UINT32 *Status + IN EFI_USB_IO_PROTOCOL *UsbIo, + OUT UINT16 *ConfigurationValue, + OUT UINT32 *Status ) { EFI_USB_DEVICE_REQUEST DevReq; @@ -282,9 +277,9 @@ UsbGetConfiguration ( ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST)); - DevReq.RequestType = USB_DEV_GET_CONFIGURATION_REQ_TYPE; - DevReq.Request = USB_REQ_GET_CONFIG; - DevReq.Length = 1; + DevReq.RequestType = USB_DEV_GET_CONFIGURATION_REQ_TYPE; + DevReq.Request = USB_REQ_GET_CONFIG; + DevReq.Length = 1; return UsbIo->UsbControlTransfer ( UsbIo, @@ -297,7 +292,6 @@ UsbGetConfiguration ( ); } - /** Set the device configuration. @@ -320,9 +314,9 @@ UsbGetConfiguration ( EFI_STATUS EFIAPI UsbSetConfiguration ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT16 ConfigurationValue, - OUT UINT32 *Status + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT16 ConfigurationValue, + OUT UINT32 *Status ) { EFI_USB_DEVICE_REQUEST DevReq; @@ -332,9 +326,9 @@ UsbSetConfiguration ( ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST)); - DevReq.RequestType = USB_DEV_SET_CONFIGURATION_REQ_TYPE; - DevReq.Request = USB_REQ_SET_CONFIG; - DevReq.Value = ConfigurationValue; + DevReq.RequestType = USB_DEV_SET_CONFIGURATION_REQ_TYPE; + DevReq.Request = USB_REQ_SET_CONFIG; + DevReq.Value = ConfigurationValue; return UsbIo->UsbControlTransfer ( UsbIo, @@ -347,7 +341,6 @@ UsbSetConfiguration ( ); } - /** Set the specified feature of the specified device. @@ -374,11 +367,11 @@ UsbSetConfiguration ( EFI_STATUS EFIAPI UsbSetFeature ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN USB_TYPES_DEFINITION Recipient, - IN UINT16 Value, - IN UINT16 Target, - OUT UINT32 *Status + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN USB_TYPES_DEFINITION Recipient, + IN UINT16 Value, + IN UINT16 Target, + OUT UINT32 *Status ) { EFI_USB_DEVICE_REQUEST DevReq; @@ -389,29 +382,28 @@ UsbSetFeature ( ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST)); switch (Recipient) { + case USB_TARGET_DEVICE: + DevReq.RequestType = USB_DEV_SET_FEATURE_REQ_TYPE_D; + break; - case USB_TARGET_DEVICE: - DevReq.RequestType = USB_DEV_SET_FEATURE_REQ_TYPE_D; - break; - - case USB_TARGET_INTERFACE: - DevReq.RequestType = USB_DEV_SET_FEATURE_REQ_TYPE_I; - break; + case USB_TARGET_INTERFACE: + DevReq.RequestType = USB_DEV_SET_FEATURE_REQ_TYPE_I; + break; - case USB_TARGET_ENDPOINT: - DevReq.RequestType = USB_DEV_SET_FEATURE_REQ_TYPE_E; - break; + case USB_TARGET_ENDPOINT: + DevReq.RequestType = USB_DEV_SET_FEATURE_REQ_TYPE_E; + break; - default: - break; + default: + break; } + // // Fill device request, see USB1.1 spec // - DevReq.Request = USB_REQ_SET_FEATURE; - DevReq.Value = Value; - DevReq.Index = Target; - + DevReq.Request = USB_REQ_SET_FEATURE; + DevReq.Value = Value; + DevReq.Index = Target; return UsbIo->UsbControlTransfer ( UsbIo, @@ -424,7 +416,6 @@ UsbSetFeature ( ); } - /** Clear the specified feature of the specified device. @@ -451,11 +442,11 @@ UsbSetFeature ( EFI_STATUS EFIAPI UsbClearFeature ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN USB_TYPES_DEFINITION Recipient, - IN UINT16 Value, - IN UINT16 Target, - OUT UINT32 *Status + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN USB_TYPES_DEFINITION Recipient, + IN UINT16 Value, + IN UINT16 Target, + OUT UINT32 *Status ) { EFI_USB_DEVICE_REQUEST DevReq; @@ -463,33 +454,31 @@ UsbClearFeature ( ASSERT (UsbIo != NULL); ASSERT (Status != NULL); - ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST)); switch (Recipient) { + case USB_TARGET_DEVICE: + DevReq.RequestType = USB_DEV_CLEAR_FEATURE_REQ_TYPE_D; + break; - case USB_TARGET_DEVICE: - DevReq.RequestType = USB_DEV_CLEAR_FEATURE_REQ_TYPE_D; - break; - - case USB_TARGET_INTERFACE: - DevReq.RequestType = USB_DEV_CLEAR_FEATURE_REQ_TYPE_I; - break; + case USB_TARGET_INTERFACE: + DevReq.RequestType = USB_DEV_CLEAR_FEATURE_REQ_TYPE_I; + break; - case USB_TARGET_ENDPOINT: - DevReq.RequestType = USB_DEV_CLEAR_FEATURE_REQ_TYPE_E; - break; + case USB_TARGET_ENDPOINT: + DevReq.RequestType = USB_DEV_CLEAR_FEATURE_REQ_TYPE_E; + break; - default: - break; + default: + break; } + // // Fill device request, see USB1.1 spec // - DevReq.Request = USB_REQ_CLEAR_FEATURE; - DevReq.Value = Value; - DevReq.Index = Target; - + DevReq.Request = USB_REQ_CLEAR_FEATURE; + DevReq.Value = Value; + DevReq.Index = Target; return UsbIo->UsbControlTransfer ( UsbIo, @@ -502,7 +491,6 @@ UsbClearFeature ( ); } - /** Get the status of the specified device. @@ -530,11 +518,11 @@ UsbClearFeature ( EFI_STATUS EFIAPI UsbGetStatus ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN USB_TYPES_DEFINITION Recipient, - IN UINT16 Target, - OUT UINT16 *DeviceStatus, - OUT UINT32 *Status + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN USB_TYPES_DEFINITION Recipient, + IN UINT16 Target, + OUT UINT16 *DeviceStatus, + OUT UINT32 *Status ) { EFI_USB_DEVICE_REQUEST DevReq; @@ -546,29 +534,29 @@ UsbGetStatus ( ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST)); switch (Recipient) { + case USB_TARGET_DEVICE: + DevReq.RequestType = USB_DEV_GET_STATUS_REQ_TYPE_D; + break; - case USB_TARGET_DEVICE: - DevReq.RequestType = USB_DEV_GET_STATUS_REQ_TYPE_D; - break; - - case USB_TARGET_INTERFACE: - DevReq.RequestType = USB_DEV_GET_STATUS_REQ_TYPE_I; - break; + case USB_TARGET_INTERFACE: + DevReq.RequestType = USB_DEV_GET_STATUS_REQ_TYPE_I; + break; - case USB_TARGET_ENDPOINT: - DevReq.RequestType = USB_DEV_GET_STATUS_REQ_TYPE_E; - break; + case USB_TARGET_ENDPOINT: + DevReq.RequestType = USB_DEV_GET_STATUS_REQ_TYPE_E; + break; - default: - break; + default: + break; } + // // Fill device request, see USB1.1 spec // - DevReq.Request = USB_REQ_GET_STATUS; - DevReq.Value = 0; - DevReq.Index = Target; - DevReq.Length = 2; + DevReq.Request = USB_REQ_GET_STATUS; + DevReq.Value = 0; + DevReq.Index = Target; + DevReq.Length = 2; return UsbIo->UsbControlTransfer ( UsbIo, @@ -581,7 +569,6 @@ UsbGetStatus ( ); } - /** Clear halt feature of the specified usb endpoint. @@ -606,9 +593,9 @@ UsbGetStatus ( EFI_STATUS EFIAPI UsbClearEndpointHalt ( - IN EFI_USB_IO_PROTOCOL *UsbIo, - IN UINT8 Endpoint, - OUT UINT32 *Status + IN EFI_USB_IO_PROTOCOL *UsbIo, + IN UINT8 Endpoint, + OUT UINT32 *Status ) { EFI_STATUS Result; @@ -654,12 +641,12 @@ UsbClearEndpointHalt ( } Result = UsbClearFeature ( - UsbIo, - USB_TARGET_ENDPOINT, - USB_FEATURE_ENDPOINT_HALT, - EndpointDescriptor.EndpointAddress, - Status - ); + UsbIo, + USB_TARGET_ENDPOINT, + USB_FEATURE_ENDPOINT_HALT, + EndpointDescriptor.EndpointAddress, + Status + ); return Result; } diff --git a/MdePkg/Test/UnitTest/Include/Library/UnitTestHostBaseLib.h b/MdePkg/Test/UnitTest/Include/Library/UnitTestHostBaseLib.h index c545b34..fb9bfd3 100644 --- a/MdePkg/Test/UnitTest/Include/Library/UnitTestHostBaseLib.h +++ b/MdePkg/Test/UnitTest/Include/Library/UnitTestHostBaseLib.h @@ -495,76 +495,76 @@ VOID /// Common services /// typedef struct { - UNIT_TEST_HOST_BASE_LIB_VOID EnableInterrupts; - UNIT_TEST_HOST_BASE_LIB_VOID DisableInterrupts; - UNIT_TEST_HOST_BASE_LIB_VOID EnableDisableInterrupts; - UNIT_TEST_HOST_BASE_LIB_READ_BOOLEAN GetInterruptState; + UNIT_TEST_HOST_BASE_LIB_VOID EnableInterrupts; + UNIT_TEST_HOST_BASE_LIB_VOID DisableInterrupts; + UNIT_TEST_HOST_BASE_LIB_VOID EnableDisableInterrupts; + UNIT_TEST_HOST_BASE_LIB_READ_BOOLEAN GetInterruptState; } UNIT_TEST_HOST_BASE_LIB_COMMON; /// /// IA32/X64 services /// typedef struct { - UNIT_TEST_HOST_BASE_LIB_ASM_CPUID AsmCpuid; - UNIT_TEST_HOST_BASE_LIB_ASM_CPUID_EX AsmCpuidEx; - UNIT_TEST_HOST_BASE_LIB_VOID AsmDisableCache; - UNIT_TEST_HOST_BASE_LIB_VOID AsmEnableCache; - UNIT_TEST_HOST_BASE_LIB_ASM_READ_MSR_64 AsmReadMsr64; - UNIT_TEST_HOST_BASE_LIB_ASM_WRITE_MSR_64 AsmWriteMsr64; - UNIT_TEST_HOST_BASE_LIB_READ_UINTN AsmReadCr0; - UNIT_TEST_HOST_BASE_LIB_READ_UINTN AsmReadCr2; - UNIT_TEST_HOST_BASE_LIB_READ_UINTN AsmReadCr3; - UNIT_TEST_HOST_BASE_LIB_READ_UINTN AsmReadCr4; - UNIT_TEST_HOST_BASE_LIB_WRITE_UINTN AsmWriteCr0; - UNIT_TEST_HOST_BASE_LIB_WRITE_UINTN AsmWriteCr2; - UNIT_TEST_HOST_BASE_LIB_WRITE_UINTN AsmWriteCr3; - UNIT_TEST_HOST_BASE_LIB_WRITE_UINTN AsmWriteCr4; - UNIT_TEST_HOST_BASE_LIB_READ_UINTN AsmReadDr0; - UNIT_TEST_HOST_BASE_LIB_READ_UINTN AsmReadDr1; - UNIT_TEST_HOST_BASE_LIB_READ_UINTN AsmReadDr2; - UNIT_TEST_HOST_BASE_LIB_READ_UINTN AsmReadDr3; - UNIT_TEST_HOST_BASE_LIB_READ_UINTN AsmReadDr4; - UNIT_TEST_HOST_BASE_LIB_READ_UINTN AsmReadDr5; - UNIT_TEST_HOST_BASE_LIB_READ_UINTN AsmReadDr6; - UNIT_TEST_HOST_BASE_LIB_READ_UINTN AsmReadDr7; - UNIT_TEST_HOST_BASE_LIB_WRITE_UINTN AsmWriteDr0; - UNIT_TEST_HOST_BASE_LIB_WRITE_UINTN AsmWriteDr1; - UNIT_TEST_HOST_BASE_LIB_WRITE_UINTN AsmWriteDr2; - UNIT_TEST_HOST_BASE_LIB_WRITE_UINTN AsmWriteDr3; - UNIT_TEST_HOST_BASE_LIB_WRITE_UINTN AsmWriteDr4; - UNIT_TEST_HOST_BASE_LIB_WRITE_UINTN AsmWriteDr5; - UNIT_TEST_HOST_BASE_LIB_WRITE_UINTN AsmWriteDr6; - UNIT_TEST_HOST_BASE_LIB_WRITE_UINTN AsmWriteDr7; - UNIT_TEST_HOST_BASE_LIB_READ_UINT16 AsmReadCs; - UNIT_TEST_HOST_BASE_LIB_READ_UINT16 AsmReadDs; - UNIT_TEST_HOST_BASE_LIB_READ_UINT16 AsmReadEs; - UNIT_TEST_HOST_BASE_LIB_READ_UINT16 AsmReadFs; - UNIT_TEST_HOST_BASE_LIB_READ_UINT16 AsmReadGs; - UNIT_TEST_HOST_BASE_LIB_READ_UINT16 AsmReadSs; - UNIT_TEST_HOST_BASE_LIB_READ_UINT16 AsmReadTr; - UNIT_TEST_HOST_BASE_LIB_ASM_READ_IA32_DESCRIPTOR AsmReadGdtr; - UNIT_TEST_HOST_BASE_LIB_ASM_WRITE_IA32_DESCRIPTOR AsmWriteGdtr; - UNIT_TEST_HOST_BASE_LIB_ASM_READ_IA32_DESCRIPTOR AsmReadIdtr; - UNIT_TEST_HOST_BASE_LIB_ASM_WRITE_IA32_DESCRIPTOR AsmWriteIdtr; - UNIT_TEST_HOST_BASE_LIB_READ_UINT16 AsmReadLdtr; - UNIT_TEST_HOST_BASE_LIB_WRITE_UINT16 AsmWriteLdtr; - UNIT_TEST_HOST_BASE_LIB_ASM_READ_PMC AsmReadPmc; - UNIT_TEST_HOST_BASE_LIB_ASM_MONITOR AsmMonitor; - UNIT_TEST_HOST_BASE_LIB_ASM_MWAIT AsmMwait; - UNIT_TEST_HOST_BASE_LIB_VOID AsmWbinvd; - UNIT_TEST_HOST_BASE_LIB_VOID AsmInvd; - UNIT_TEST_HOST_BASE_LIB_ASM_FLUSH_CACHE_LINE AsmFlushCacheLine; - UNIT_TEST_HOST_BASE_LIB_ASM_PAGING_32 AsmEnablePaging32; - UNIT_TEST_HOST_BASE_LIB_ASM_PAGING_32 AsmDisablePaging32; - UNIT_TEST_HOST_BASE_LIB_ASM_ENABLE_PAGING_64 AsmEnablePaging64; - UNIT_TEST_HOST_BASE_LIB_ASM_DISABLE_PAGING_64 AsmDisablePaging64; - UNIT_TEST_HOST_BASE_LIB_ASM_GET_THUNK_16_PROPERTIES AsmGetThunk16Properties; - UNIT_TEST_HOST_BASE_LIB_ASM_THUNK_16 AsmPrepareThunk16; - UNIT_TEST_HOST_BASE_LIB_ASM_THUNK_16 AsmThunk16; - UNIT_TEST_HOST_BASE_LIB_ASM_THUNK_16 AsmPrepareAndThunk16; - UNIT_TEST_HOST_BASE_LIB_WRITE_UINT16 AsmWriteTr; - UNIT_TEST_HOST_BASE_LIB_VOID AsmLfence; - UNIT_TEST_HOST_BASE_LIB_ASM_PATCH_INSTRUCTION_X86 PatchInstructionX86; + UNIT_TEST_HOST_BASE_LIB_ASM_CPUID AsmCpuid; + UNIT_TEST_HOST_BASE_LIB_ASM_CPUID_EX AsmCpuidEx; + UNIT_TEST_HOST_BASE_LIB_VOID AsmDisableCache; + UNIT_TEST_HOST_BASE_LIB_VOID AsmEnableCache; + UNIT_TEST_HOST_BASE_LIB_ASM_READ_MSR_64 AsmReadMsr64; + UNIT_TEST_HOST_BASE_LIB_ASM_WRITE_MSR_64 AsmWriteMsr64; + UNIT_TEST_HOST_BASE_LIB_READ_UINTN AsmReadCr0; + UNIT_TEST_HOST_BASE_LIB_READ_UINTN AsmReadCr2; + UNIT_TEST_HOST_BASE_LIB_READ_UINTN AsmReadCr3; + UNIT_TEST_HOST_BASE_LIB_READ_UINTN AsmReadCr4; + UNIT_TEST_HOST_BASE_LIB_WRITE_UINTN AsmWriteCr0; + UNIT_TEST_HOST_BASE_LIB_WRITE_UINTN AsmWriteCr2; + UNIT_TEST_HOST_BASE_LIB_WRITE_UINTN AsmWriteCr3; + UNIT_TEST_HOST_BASE_LIB_WRITE_UINTN AsmWriteCr4; + UNIT_TEST_HOST_BASE_LIB_READ_UINTN AsmReadDr0; + UNIT_TEST_HOST_BASE_LIB_READ_UINTN AsmReadDr1; + UNIT_TEST_HOST_BASE_LIB_READ_UINTN AsmReadDr2; + UNIT_TEST_HOST_BASE_LIB_READ_UINTN AsmReadDr3; + UNIT_TEST_HOST_BASE_LIB_READ_UINTN AsmReadDr4; + UNIT_TEST_HOST_BASE_LIB_READ_UINTN AsmReadDr5; + UNIT_TEST_HOST_BASE_LIB_READ_UINTN AsmReadDr6; + UNIT_TEST_HOST_BASE_LIB_READ_UINTN AsmReadDr7; + UNIT_TEST_HOST_BASE_LIB_WRITE_UINTN AsmWriteDr0; + UNIT_TEST_HOST_BASE_LIB_WRITE_UINTN AsmWriteDr1; + UNIT_TEST_HOST_BASE_LIB_WRITE_UINTN AsmWriteDr2; + UNIT_TEST_HOST_BASE_LIB_WRITE_UINTN AsmWriteDr3; + UNIT_TEST_HOST_BASE_LIB_WRITE_UINTN AsmWriteDr4; + UNIT_TEST_HOST_BASE_LIB_WRITE_UINTN AsmWriteDr5; + UNIT_TEST_HOST_BASE_LIB_WRITE_UINTN AsmWriteDr6; + UNIT_TEST_HOST_BASE_LIB_WRITE_UINTN AsmWriteDr7; + UNIT_TEST_HOST_BASE_LIB_READ_UINT16 AsmReadCs; + UNIT_TEST_HOST_BASE_LIB_READ_UINT16 AsmReadDs; + UNIT_TEST_HOST_BASE_LIB_READ_UINT16 AsmReadEs; + UNIT_TEST_HOST_BASE_LIB_READ_UINT16 AsmReadFs; + UNIT_TEST_HOST_BASE_LIB_READ_UINT16 AsmReadGs; + UNIT_TEST_HOST_BASE_LIB_READ_UINT16 AsmReadSs; + UNIT_TEST_HOST_BASE_LIB_READ_UINT16 AsmReadTr; + UNIT_TEST_HOST_BASE_LIB_ASM_READ_IA32_DESCRIPTOR AsmReadGdtr; + UNIT_TEST_HOST_BASE_LIB_ASM_WRITE_IA32_DESCRIPTOR AsmWriteGdtr; + UNIT_TEST_HOST_BASE_LIB_ASM_READ_IA32_DESCRIPTOR AsmReadIdtr; + UNIT_TEST_HOST_BASE_LIB_ASM_WRITE_IA32_DESCRIPTOR AsmWriteIdtr; + UNIT_TEST_HOST_BASE_LIB_READ_UINT16 AsmReadLdtr; + UNIT_TEST_HOST_BASE_LIB_WRITE_UINT16 AsmWriteLdtr; + UNIT_TEST_HOST_BASE_LIB_ASM_READ_PMC AsmReadPmc; + UNIT_TEST_HOST_BASE_LIB_ASM_MONITOR AsmMonitor; + UNIT_TEST_HOST_BASE_LIB_ASM_MWAIT AsmMwait; + UNIT_TEST_HOST_BASE_LIB_VOID AsmWbinvd; + UNIT_TEST_HOST_BASE_LIB_VOID AsmInvd; + UNIT_TEST_HOST_BASE_LIB_ASM_FLUSH_CACHE_LINE AsmFlushCacheLine; + UNIT_TEST_HOST_BASE_LIB_ASM_PAGING_32 AsmEnablePaging32; + UNIT_TEST_HOST_BASE_LIB_ASM_PAGING_32 AsmDisablePaging32; + UNIT_TEST_HOST_BASE_LIB_ASM_ENABLE_PAGING_64 AsmEnablePaging64; + UNIT_TEST_HOST_BASE_LIB_ASM_DISABLE_PAGING_64 AsmDisablePaging64; + UNIT_TEST_HOST_BASE_LIB_ASM_GET_THUNK_16_PROPERTIES AsmGetThunk16Properties; + UNIT_TEST_HOST_BASE_LIB_ASM_THUNK_16 AsmPrepareThunk16; + UNIT_TEST_HOST_BASE_LIB_ASM_THUNK_16 AsmThunk16; + UNIT_TEST_HOST_BASE_LIB_ASM_THUNK_16 AsmPrepareAndThunk16; + UNIT_TEST_HOST_BASE_LIB_WRITE_UINT16 AsmWriteTr; + UNIT_TEST_HOST_BASE_LIB_VOID AsmLfence; + UNIT_TEST_HOST_BASE_LIB_ASM_PATCH_INSTRUCTION_X86 PatchInstructionX86; } UNIT_TEST_HOST_BASE_LIB_X86; /// @@ -573,8 +573,8 @@ typedef struct { /// can be added to the end of this structure. /// typedef struct { - UNIT_TEST_HOST_BASE_LIB_COMMON *Common; - UNIT_TEST_HOST_BASE_LIB_X86 *X86; + UNIT_TEST_HOST_BASE_LIB_COMMON *Common; + UNIT_TEST_HOST_BASE_LIB_X86 *X86; } UNIT_TEST_HOST_BASE_LIB; extern UNIT_TEST_HOST_BASE_LIB gUnitTestHostBaseLib; diff --git a/MdePkg/Test/UnitTest/Library/BaseLib/Base64UnitTest.c b/MdePkg/Test/UnitTest/Library/BaseLib/Base64UnitTest.c index 2c42664..9f2d2bd 100644 --- a/MdePkg/Test/UnitTest/Library/BaseLib/Base64UnitTest.c +++ b/MdePkg/Test/UnitTest/Library/BaseLib/Base64UnitTest.c @@ -31,37 +31,37 @@ */ typedef struct { - CHAR8 *TestInput; - CHAR8 *TestOutput; - EFI_STATUS ExpectedStatus; - VOID *BufferToFree; - UINTN ExpectedSize; + CHAR8 *TestInput; + CHAR8 *TestOutput; + EFI_STATUS ExpectedStatus; + VOID *BufferToFree; + UINTN ExpectedSize; } BASIC_TEST_CONTEXT; -#define B64_TEST_1 "" -#define BIN_TEST_1 "" +#define B64_TEST_1 "" +#define BIN_TEST_1 "" -#define B64_TEST_2 "Zg==" -#define BIN_TEST_2 "f" +#define B64_TEST_2 "Zg==" +#define BIN_TEST_2 "f" -#define B64_TEST_3 "Zm8=" -#define BIN_TEST_3 "fo" +#define B64_TEST_3 "Zm8=" +#define BIN_TEST_3 "fo" -#define B64_TEST_4 "Zm9v" -#define BIN_TEST_4 "foo" +#define B64_TEST_4 "Zm9v" +#define BIN_TEST_4 "foo" -#define B64_TEST_5 "Zm9vYg==" -#define BIN_TEST_5 "foob" +#define B64_TEST_5 "Zm9vYg==" +#define BIN_TEST_5 "foob" -#define B64_TEST_6 "Zm9vYmE=" -#define BIN_TEST_6 "fooba" +#define B64_TEST_6 "Zm9vYmE=" +#define BIN_TEST_6 "fooba" -#define B64_TEST_7 "Zm9vYmFy" -#define BIN_TEST_7 "foobar" +#define B64_TEST_7 "Zm9vYmFy" +#define BIN_TEST_7 "foobar" // Adds all white space - also ends the last quantum with only spaces afterwards -#define B64_TEST_8_IN " \t\v Zm9\r\nvYmFy \f " -#define BIN_TEST_8 "foobar" +#define B64_TEST_8_IN " \t\v Zm9\r\nvYmFy \f " +#define BIN_TEST_8 "foobar" // Not a quantum multiple of 4 #define B64_ERROR_1 "Zm9vymFy=" @@ -70,37 +70,37 @@ typedef struct { #define B64_ERROR_2 "Zm$vymFy" // Too many '=' characters -#define B64_ERROR_3 "Z===" +#define B64_ERROR_3 "Z===" // Poorly placed '=' -#define B64_ERROR_4 "Zm=vYmFy" +#define B64_ERROR_4 "Zm=vYmFy" -#define MAX_TEST_STRING_SIZE (200) +#define MAX_TEST_STRING_SIZE (200) // ------------------------------------------------ Input----------Output-----------Result-------Free--Expected Output Size -static BASIC_TEST_CONTEXT mBasicEncodeTest1 = {BIN_TEST_1, B64_TEST_1, EFI_SUCCESS, NULL, sizeof(B64_TEST_1)}; -static BASIC_TEST_CONTEXT mBasicEncodeTest2 = {BIN_TEST_2, B64_TEST_2, EFI_SUCCESS, NULL, sizeof(B64_TEST_2)}; -static BASIC_TEST_CONTEXT mBasicEncodeTest3 = {BIN_TEST_3, B64_TEST_3, EFI_SUCCESS, NULL, sizeof(B64_TEST_3)}; -static BASIC_TEST_CONTEXT mBasicEncodeTest4 = {BIN_TEST_4, B64_TEST_4, EFI_SUCCESS, NULL, sizeof(B64_TEST_4)}; -static BASIC_TEST_CONTEXT mBasicEncodeTest5 = {BIN_TEST_5, B64_TEST_5, EFI_SUCCESS, NULL, sizeof(B64_TEST_5)}; -static BASIC_TEST_CONTEXT mBasicEncodeTest6 = {BIN_TEST_6, B64_TEST_6, EFI_SUCCESS, NULL, sizeof(B64_TEST_6)}; -static BASIC_TEST_CONTEXT mBasicEncodeTest7 = {BIN_TEST_7, B64_TEST_7, EFI_SUCCESS, NULL, sizeof(B64_TEST_7)}; -static BASIC_TEST_CONTEXT mBasicEncodeError1 = {BIN_TEST_7, B64_TEST_1, EFI_BUFFER_TOO_SMALL, NULL, sizeof(B64_TEST_7)}; - -static BASIC_TEST_CONTEXT mBasicDecodeTest1 = {B64_TEST_1, BIN_TEST_1, EFI_SUCCESS, NULL, sizeof(BIN_TEST_1)-1}; -static BASIC_TEST_CONTEXT mBasicDecodeTest2 = {B64_TEST_2, BIN_TEST_2, EFI_SUCCESS, NULL, sizeof(BIN_TEST_2)-1}; -static BASIC_TEST_CONTEXT mBasicDecodeTest3 = {B64_TEST_3, BIN_TEST_3, EFI_SUCCESS, NULL, sizeof(BIN_TEST_3)-1}; -static BASIC_TEST_CONTEXT mBasicDecodeTest4 = {B64_TEST_4, BIN_TEST_4, EFI_SUCCESS, NULL, sizeof(BIN_TEST_4)-1}; -static BASIC_TEST_CONTEXT mBasicDecodeTest5 = {B64_TEST_5, BIN_TEST_5, EFI_SUCCESS, NULL, sizeof(BIN_TEST_5)-1}; -static BASIC_TEST_CONTEXT mBasicDecodeTest6 = {B64_TEST_6, BIN_TEST_6, EFI_SUCCESS, NULL, sizeof(BIN_TEST_6)-1}; -static BASIC_TEST_CONTEXT mBasicDecodeTest7 = {B64_TEST_7, BIN_TEST_7, EFI_SUCCESS, NULL, sizeof(BIN_TEST_7)-1}; -static BASIC_TEST_CONTEXT mBasicDecodeTest8 = {B64_TEST_8_IN, BIN_TEST_8, EFI_SUCCESS, NULL, sizeof(BIN_TEST_8)-1}; - -static BASIC_TEST_CONTEXT mBasicDecodeError1 = {B64_ERROR_1, B64_ERROR_1, EFI_INVALID_PARAMETER, NULL, 0}; -static BASIC_TEST_CONTEXT mBasicDecodeError2 = {B64_ERROR_2, B64_ERROR_2, EFI_INVALID_PARAMETER, NULL, 0}; -static BASIC_TEST_CONTEXT mBasicDecodeError3 = {B64_ERROR_3, B64_ERROR_3, EFI_INVALID_PARAMETER, NULL, 0}; -static BASIC_TEST_CONTEXT mBasicDecodeError4 = {B64_ERROR_4, B64_ERROR_4, EFI_INVALID_PARAMETER, NULL, 0}; -static BASIC_TEST_CONTEXT mBasicDecodeError5 = {B64_TEST_7, BIN_TEST_1, EFI_BUFFER_TOO_SMALL, NULL, sizeof(BIN_TEST_7)-1}; +static BASIC_TEST_CONTEXT mBasicEncodeTest1 = { BIN_TEST_1, B64_TEST_1, EFI_SUCCESS, NULL, sizeof (B64_TEST_1) }; +static BASIC_TEST_CONTEXT mBasicEncodeTest2 = { BIN_TEST_2, B64_TEST_2, EFI_SUCCESS, NULL, sizeof (B64_TEST_2) }; +static BASIC_TEST_CONTEXT mBasicEncodeTest3 = { BIN_TEST_3, B64_TEST_3, EFI_SUCCESS, NULL, sizeof (B64_TEST_3) }; +static BASIC_TEST_CONTEXT mBasicEncodeTest4 = { BIN_TEST_4, B64_TEST_4, EFI_SUCCESS, NULL, sizeof (B64_TEST_4) }; +static BASIC_TEST_CONTEXT mBasicEncodeTest5 = { BIN_TEST_5, B64_TEST_5, EFI_SUCCESS, NULL, sizeof (B64_TEST_5) }; +static BASIC_TEST_CONTEXT mBasicEncodeTest6 = { BIN_TEST_6, B64_TEST_6, EFI_SUCCESS, NULL, sizeof (B64_TEST_6) }; +static BASIC_TEST_CONTEXT mBasicEncodeTest7 = { BIN_TEST_7, B64_TEST_7, EFI_SUCCESS, NULL, sizeof (B64_TEST_7) }; +static BASIC_TEST_CONTEXT mBasicEncodeError1 = { BIN_TEST_7, B64_TEST_1, EFI_BUFFER_TOO_SMALL, NULL, sizeof (B64_TEST_7) }; + +static BASIC_TEST_CONTEXT mBasicDecodeTest1 = { B64_TEST_1, BIN_TEST_1, EFI_SUCCESS, NULL, sizeof (BIN_TEST_1)-1 }; +static BASIC_TEST_CONTEXT mBasicDecodeTest2 = { B64_TEST_2, BIN_TEST_2, EFI_SUCCESS, NULL, sizeof (BIN_TEST_2)-1 }; +static BASIC_TEST_CONTEXT mBasicDecodeTest3 = { B64_TEST_3, BIN_TEST_3, EFI_SUCCESS, NULL, sizeof (BIN_TEST_3)-1 }; +static BASIC_TEST_CONTEXT mBasicDecodeTest4 = { B64_TEST_4, BIN_TEST_4, EFI_SUCCESS, NULL, sizeof (BIN_TEST_4)-1 }; +static BASIC_TEST_CONTEXT mBasicDecodeTest5 = { B64_TEST_5, BIN_TEST_5, EFI_SUCCESS, NULL, sizeof (BIN_TEST_5)-1 }; +static BASIC_TEST_CONTEXT mBasicDecodeTest6 = { B64_TEST_6, BIN_TEST_6, EFI_SUCCESS, NULL, sizeof (BIN_TEST_6)-1 }; +static BASIC_TEST_CONTEXT mBasicDecodeTest7 = { B64_TEST_7, BIN_TEST_7, EFI_SUCCESS, NULL, sizeof (BIN_TEST_7)-1 }; +static BASIC_TEST_CONTEXT mBasicDecodeTest8 = { B64_TEST_8_IN, BIN_TEST_8, EFI_SUCCESS, NULL, sizeof (BIN_TEST_8)-1 }; + +static BASIC_TEST_CONTEXT mBasicDecodeError1 = { B64_ERROR_1, B64_ERROR_1, EFI_INVALID_PARAMETER, NULL, 0 }; +static BASIC_TEST_CONTEXT mBasicDecodeError2 = { B64_ERROR_2, B64_ERROR_2, EFI_INVALID_PARAMETER, NULL, 0 }; +static BASIC_TEST_CONTEXT mBasicDecodeError3 = { B64_ERROR_3, B64_ERROR_3, EFI_INVALID_PARAMETER, NULL, 0 }; +static BASIC_TEST_CONTEXT mBasicDecodeError4 = { B64_ERROR_4, B64_ERROR_4, EFI_INVALID_PARAMETER, NULL, 0 }; +static BASIC_TEST_CONTEXT mBasicDecodeError5 = { B64_TEST_7, BIN_TEST_1, EFI_BUFFER_TOO_SMALL, NULL, sizeof (BIN_TEST_7)-1 }; /** Simple clean up method to make sure tests clean up even if interrupted and fail @@ -117,7 +117,7 @@ CleanUpB64TestContext ( Btc = (BASIC_TEST_CONTEXT *)Context; if (Btc != NULL) { - //free string if set + // free string if set if (Btc->BufferToFree != NULL) { FreePool (Btc->BufferToFree); Btc->BufferToFree = NULL; @@ -159,7 +159,7 @@ RfcEncodeTest ( INTN CompareStatus; UINTN indx; - Btc = (BASIC_TEST_CONTEXT *) Context; + Btc = (BASIC_TEST_CONTEXT *)Context; binString = Btc->TestInput; b64String = Btc->TestOutput; @@ -168,21 +168,21 @@ RfcEncodeTest ( // string buffer. // - b64StringSize = AsciiStrnSizeS(b64String, MAX_TEST_STRING_SIZE); - BinSize = AsciiStrnLenS(binString, MAX_TEST_STRING_SIZE); - BinData = (UINT8 *) binString; + b64StringSize = AsciiStrnSizeS (b64String, MAX_TEST_STRING_SIZE); + BinSize = AsciiStrnLenS (binString, MAX_TEST_STRING_SIZE); + BinData = (UINT8 *)binString; - b64WorkString = (CHAR8 *) AllocatePool(b64StringSize); - UT_ASSERT_NOT_NULL(b64WorkString); + b64WorkString = (CHAR8 *)AllocatePool (b64StringSize); + UT_ASSERT_NOT_NULL (b64WorkString); Btc->BufferToFree = b64WorkString; - ReturnSize = b64StringSize; + ReturnSize = b64StringSize; - Status = Base64Encode(BinData, BinSize, b64WorkString, &ReturnSize); + Status = Base64Encode (BinData, BinSize, b64WorkString, &ReturnSize); - UT_ASSERT_STATUS_EQUAL(Status, Btc->ExpectedStatus); + UT_ASSERT_STATUS_EQUAL (Status, Btc->ExpectedStatus); - UT_ASSERT_EQUAL(ReturnSize, Btc->ExpectedSize); + UT_ASSERT_EQUAL (ReturnSize, Btc->ExpectedSize); if (!EFI_ERROR (Btc->ExpectedStatus)) { if (ReturnSize != 0) { @@ -192,12 +192,15 @@ RfcEncodeTest ( for (indx = 0; indx < ReturnSize; indx++) { UT_LOG_ERROR (" %2.2x", 0xff & b64String[indx]); } + UT_LOG_ERROR ("\n b64 work string:\n"); for (indx = 0; indx < ReturnSize; indx++) { UT_LOG_ERROR (" %2.2x", 0xff & b64WorkString[indx]); } + UT_LOG_ERROR ("\n"); } + UT_ASSERT_EQUAL (CompareStatus, 0); } } @@ -225,22 +228,22 @@ RfcEncodeTest ( STATIC UNIT_TEST_STATUS EFIAPI -RfcDecodeTest( +RfcDecodeTest ( IN UNIT_TEST_CONTEXT Context ) { - BASIC_TEST_CONTEXT *Btc; - CHAR8 *b64String; - CHAR8 *binString; + BASIC_TEST_CONTEXT *Btc; + CHAR8 *b64String; + CHAR8 *binString; EFI_STATUS Status; UINTN b64StringLen; UINTN ReturnSize; - UINT8 *BinData; + UINT8 *BinData; UINTN BinSize; INTN CompareStatus; UINTN indx; - Btc = (BASIC_TEST_CONTEXT *)Context; + Btc = (BASIC_TEST_CONTEXT *)Context; b64String = Btc->TestInput; binString = Btc->TestOutput; @@ -249,13 +252,13 @@ RfcDecodeTest( // b64StringLen = AsciiStrnLenS (b64String, MAX_TEST_STRING_SIZE); - BinSize = AsciiStrnLenS (binString, MAX_TEST_STRING_SIZE); + BinSize = AsciiStrnLenS (binString, MAX_TEST_STRING_SIZE); BinData = AllocatePool (BinSize); - UT_ASSERT_NOT_NULL(BinData); + UT_ASSERT_NOT_NULL (BinData); Btc->BufferToFree = BinData; - ReturnSize = BinSize; + ReturnSize = BinSize; Status = Base64Decode (b64String, b64StringLen, BinData, &ReturnSize); @@ -275,12 +278,15 @@ RfcDecodeTest( for (indx = 0; indx < ReturnSize; indx++) { UT_LOG_ERROR (" %2.2x", 0xff & binString[indx]); } + UT_LOG_ERROR ("\nBinData:\n"); for (indx = 0; indx < ReturnSize; indx++) { UT_LOG_ERROR (" %2.2x", 0xff & BinData[indx]); } + UT_LOG_ERROR ("\n"); } + UT_ASSERT_EQUAL (CompareStatus, 0); } } @@ -413,8 +419,8 @@ UnitTestingEntry ( // Status = InitUnitTestFramework (&Fw, UNIT_TEST_APP_NAME, gEfiCallerBaseName, UNIT_TEST_APP_VERSION); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "Failed in InitUnitTestFramework. Status = %r\n", Status)); - goto EXIT; + DEBUG ((DEBUG_ERROR, "Failed in InitUnitTestFramework. Status = %r\n", Status)); + goto EXIT; } // @@ -441,19 +447,19 @@ UnitTestingEntry ( // Status = CreateUnitTestSuite (&b64DecodeTests, Fw, "b64 Decode Ascii string to binary", "BaseLib.b64Decode", NULL, NULL); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "Failed in CreateUnitTestSuite for b64Decode Tests\n")); - Status = EFI_OUT_OF_RESOURCES; - goto EXIT; + DEBUG ((DEBUG_ERROR, "Failed in CreateUnitTestSuite for b64Decode Tests\n")); + Status = EFI_OUT_OF_RESOURCES; + goto EXIT; } - AddTestCase (b64DecodeTests, "RFC 4686 Test Vector - Empty", "Test1", RfcDecodeTest, NULL, CleanUpB64TestContext, &mBasicDecodeTest1); - AddTestCase (b64DecodeTests, "RFC 4686 Test Vector - f", "Test2", RfcDecodeTest, NULL, CleanUpB64TestContext, &mBasicDecodeTest2); - AddTestCase (b64DecodeTests, "RFC 4686 Test Vector - fo", "Test3", RfcDecodeTest, NULL, CleanUpB64TestContext, &mBasicDecodeTest3); - AddTestCase (b64DecodeTests, "RFC 4686 Test Vector - foo", "Test4", RfcDecodeTest, NULL, CleanUpB64TestContext, &mBasicDecodeTest4); - AddTestCase (b64DecodeTests, "RFC 4686 Test Vector - foob", "Test5", RfcDecodeTest, NULL, CleanUpB64TestContext, &mBasicDecodeTest5); - AddTestCase (b64DecodeTests, "RFC 4686 Test Vector - fooba", "Test6", RfcDecodeTest, NULL, CleanUpB64TestContext, &mBasicDecodeTest6); - AddTestCase (b64DecodeTests, "RFC 4686 Test Vector - foobar", "Test7", RfcDecodeTest, NULL, CleanUpB64TestContext, &mBasicDecodeTest7); - AddTestCase (b64DecodeTests, "Ignore Whitespace test", "Test8", RfcDecodeTest, NULL, CleanUpB64TestContext, &mBasicDecodeTest8); + AddTestCase (b64DecodeTests, "RFC 4686 Test Vector - Empty", "Test1", RfcDecodeTest, NULL, CleanUpB64TestContext, &mBasicDecodeTest1); + AddTestCase (b64DecodeTests, "RFC 4686 Test Vector - f", "Test2", RfcDecodeTest, NULL, CleanUpB64TestContext, &mBasicDecodeTest2); + AddTestCase (b64DecodeTests, "RFC 4686 Test Vector - fo", "Test3", RfcDecodeTest, NULL, CleanUpB64TestContext, &mBasicDecodeTest3); + AddTestCase (b64DecodeTests, "RFC 4686 Test Vector - foo", "Test4", RfcDecodeTest, NULL, CleanUpB64TestContext, &mBasicDecodeTest4); + AddTestCase (b64DecodeTests, "RFC 4686 Test Vector - foob", "Test5", RfcDecodeTest, NULL, CleanUpB64TestContext, &mBasicDecodeTest5); + AddTestCase (b64DecodeTests, "RFC 4686 Test Vector - fooba", "Test6", RfcDecodeTest, NULL, CleanUpB64TestContext, &mBasicDecodeTest6); + AddTestCase (b64DecodeTests, "RFC 4686 Test Vector - foobar", "Test7", RfcDecodeTest, NULL, CleanUpB64TestContext, &mBasicDecodeTest7); + AddTestCase (b64DecodeTests, "Ignore Whitespace test", "Test8", RfcDecodeTest, NULL, CleanUpB64TestContext, &mBasicDecodeTest8); AddTestCase (b64DecodeTests, "Not a quantum multiple of 4", "Error1", RfcDecodeTest, NULL, CleanUpB64TestContext, &mBasicDecodeError1); AddTestCase (b64DecodeTests, "Invalid characters in the string", "Error2", RfcDecodeTest, NULL, CleanUpB64TestContext, &mBasicDecodeError2); @@ -505,8 +511,8 @@ BaseLibUnitTestAppEntry ( **/ int main ( - int argc, - char *argv[] + int argc, + char *argv[] ) { return UnitTestingEntry (); diff --git a/MdePkg/Test/UnitTest/Library/BaseSafeIntLib/SafeIntLibUintnIntnUnitTests32.c b/MdePkg/Test/UnitTest/Library/BaseSafeIntLib/SafeIntLibUintnIntnUnitTests32.c index be5c0e1..35f5239 100644 --- a/MdePkg/Test/UnitTest/Library/BaseSafeIntLib/SafeIntLibUintnIntnUnitTests32.c +++ b/MdePkg/Test/UnitTest/Library/BaseSafeIntLib/SafeIntLibUintnIntnUnitTests32.c @@ -13,7 +13,7 @@ UNIT_TEST_STATUS EFIAPI TestSafeInt32ToUintn ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -24,17 +24,17 @@ TestSafeInt32ToUintn ( // If Operand is non-negative, then it's a cast // Operand = 0x5bababab; - Result = 0; - Status = SafeInt32ToUintn(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5bababab, Result); + Result = 0; + Status = SafeInt32ToUintn (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5bababab, Result); // // Otherwise should result in an error status // Operand = (-1537977259); - Status = SafeInt32ToUintn(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt32ToUintn (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -42,7 +42,7 @@ TestSafeInt32ToUintn ( UNIT_TEST_STATUS EFIAPI TestSafeUint32ToIntn ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -53,17 +53,17 @@ TestSafeUint32ToIntn ( // If Operand is <= MAX_INTN, then it's a cast // Operand = 0x5bababab; - Result = 0; - Status = SafeUint32ToIntn(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5bababab, Result); + Result = 0; + Status = SafeUint32ToIntn (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5bababab, Result); // // Otherwise should result in an error status // Operand = (0xabababab); - Status = SafeUint32ToIntn(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint32ToIntn (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -71,7 +71,7 @@ TestSafeUint32ToIntn ( UNIT_TEST_STATUS EFIAPI TestSafeIntnToInt32 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -82,10 +82,10 @@ TestSafeIntnToInt32 ( // INTN is same as INT32 in IA32, so this is just a cast // Operand = 0x5bababab; - Result = 0; - Status = SafeIntnToInt32(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5bababab, Result); + Result = 0; + Status = SafeIntnToInt32 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5bababab, Result); return UNIT_TEST_PASSED; } @@ -93,7 +93,7 @@ TestSafeIntnToInt32 ( UNIT_TEST_STATUS EFIAPI TestSafeIntnToUint32 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -104,17 +104,17 @@ TestSafeIntnToUint32 ( // If Operand is non-negative, then it's a cast // Operand = 0x5bababab; - Result = 0; - Status = SafeIntnToUint32(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5bababab, Result); + Result = 0; + Status = SafeIntnToUint32 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5bababab, Result); // // Otherwise should result in an error status // Operand = (-1537977259); - Status = SafeIntnToUint32(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnToUint32 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -122,7 +122,7 @@ TestSafeIntnToUint32 ( UNIT_TEST_STATUS EFIAPI TestSafeUintnToUint32 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -133,10 +133,10 @@ TestSafeUintnToUint32 ( // UINTN is same as UINT32 in IA32, so this is just a cast // Operand = 0xabababab; - Result = 0; - Status = SafeUintnToUint32(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0xabababab, Result); + Result = 0; + Status = SafeUintnToUint32 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0xabababab, Result); return UNIT_TEST_PASSED; } @@ -144,7 +144,7 @@ TestSafeUintnToUint32 ( UNIT_TEST_STATUS EFIAPI TestSafeUintnToIntn ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -155,17 +155,17 @@ TestSafeUintnToIntn ( // If Operand is <= MAX_INTN, then it's a cast // Operand = 0x5bababab; - Result = 0; - Status = SafeUintnToIntn(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5bababab, Result); + Result = 0; + Status = SafeUintnToIntn (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5bababab, Result); // // Otherwise should result in an error status // Operand = (0xabababab); - Status = SafeUintnToIntn(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUintnToIntn (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -173,7 +173,7 @@ TestSafeUintnToIntn ( UNIT_TEST_STATUS EFIAPI TestSafeUintnToInt64 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -185,10 +185,10 @@ TestSafeUintnToInt64 ( // INT64, so this is just a cast // Operand = 0xabababab; - Result = 0; - Status = SafeUintnToInt64(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0xabababab, Result); + Result = 0; + Status = SafeUintnToInt64 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0xabababab, Result); return UNIT_TEST_PASSED; } @@ -196,7 +196,7 @@ TestSafeUintnToInt64 ( UNIT_TEST_STATUS EFIAPI TestSafeInt64ToIntn ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -207,26 +207,26 @@ TestSafeInt64ToIntn ( // If Operand is between MIN_INTN and MAX_INTN2 inclusive, then it's a cast // Operand = 0x5bababab; - Result = 0; - Status = SafeInt64ToIntn(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5bababab, Result); + Result = 0; + Status = SafeInt64ToIntn (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5bababab, Result); Operand = (-1537977259); - Status = SafeInt64ToIntn(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL((-1537977259), Result); + Status = SafeInt64ToIntn (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL ((-1537977259), Result); // // Otherwise should result in an error status // Operand = (0x5babababefefefef); - Status = SafeInt64ToIntn(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt64ToIntn (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (-6605562033422200815); - Status = SafeInt64ToIntn(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt64ToIntn (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -234,7 +234,7 @@ TestSafeInt64ToIntn ( UNIT_TEST_STATUS EFIAPI TestSafeInt64ToUintn ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -245,21 +245,21 @@ TestSafeInt64ToUintn ( // If Operand is between 0 and MAX_UINTN inclusive, then it's a cast // Operand = 0xabababab; - Result = 0; - Status = SafeInt64ToUintn(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0xabababab, Result); + Result = 0; + Status = SafeInt64ToUintn (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0xabababab, Result); // // Otherwise should result in an error status // Operand = (0x5babababefefefef); - Status = SafeInt64ToUintn(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt64ToUintn (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (-6605562033422200815); - Status = SafeInt64ToUintn(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt64ToUintn (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -267,7 +267,7 @@ TestSafeInt64ToUintn ( UNIT_TEST_STATUS EFIAPI TestSafeUint64ToIntn ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -278,17 +278,17 @@ TestSafeUint64ToIntn ( // If Operand is <= MAX_INTN, then it's a cast // Operand = 0x5bababab; - Result = 0; - Status = SafeUint64ToIntn(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5bababab, Result); + Result = 0; + Status = SafeUint64ToIntn (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5bababab, Result); // // Otherwise should result in an error status // Operand = (0xababababefefefef); - Status = SafeUint64ToIntn(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint64ToIntn (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -296,7 +296,7 @@ TestSafeUint64ToIntn ( UNIT_TEST_STATUS EFIAPI TestSafeUint64ToUintn ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -307,17 +307,17 @@ TestSafeUint64ToUintn ( // If Operand is <= MAX_UINTN, then it's a cast // Operand = 0xabababab; - Result = 0; - Status = SafeUint64ToUintn(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0xabababab, Result); + Result = 0; + Status = SafeUint64ToUintn (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0xabababab, Result); // // Otherwise should result in an error status // Operand = (0xababababefefefef); - Status = SafeUint64ToUintn(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint64ToUintn (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -325,7 +325,7 @@ TestSafeUint64ToUintn ( UNIT_TEST_STATUS EFIAPI TestSafeUintnAdd ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -339,17 +339,17 @@ TestSafeUintnAdd ( Augend = 0x3a3a3a3a; Addend = 0x3a3a3a3a; Result = 0; - Status = SafeUintnAdd(Augend, Addend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x74747474, Result); + Status = SafeUintnAdd (Augend, Addend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x74747474, Result); // // Otherwise should result in an error status // Augend = 0xabababab; Addend = 0xbcbcbcbc; - Status = SafeUintnAdd(Augend, Addend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUintnAdd (Augend, Addend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -357,7 +357,7 @@ TestSafeUintnAdd ( UNIT_TEST_STATUS EFIAPI TestSafeIntnAdd ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -372,28 +372,28 @@ TestSafeIntnAdd ( Augend = 0x3a3a3a3a; Addend = 0x3a3a3a3a; Result = 0; - Status = SafeIntnAdd(Augend, Addend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x74747474, Result); + Status = SafeIntnAdd (Augend, Addend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x74747474, Result); Augend = (-976894522); Addend = (-976894522); - Status = SafeIntnAdd(Augend, Addend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL((-1953789044), Result); + Status = SafeIntnAdd (Augend, Addend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL ((-1953789044), Result); // // Otherwise should result in an error status // Augend = 0x5a5a5a5a; Addend = 0x5a5a5a5a; - Status = SafeIntnAdd(Augend, Addend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnAdd (Augend, Addend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Augend = (-1515870810); Addend = (-1515870810); - Status = SafeIntnAdd(Augend, Addend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnAdd (Augend, Addend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -401,7 +401,7 @@ TestSafeIntnAdd ( UNIT_TEST_STATUS EFIAPI TestSafeUintnSub ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -412,20 +412,20 @@ TestSafeUintnSub ( // // If Minuend >= Subtrahend, then it's subtraction // - Minuend = 0x5a5a5a5a; + Minuend = 0x5a5a5a5a; Subtrahend = 0x3b3b3b3b; - Result = 0; - Status = SafeUintnSub(Minuend, Subtrahend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x1f1f1f1f, Result); + Result = 0; + Status = SafeUintnSub (Minuend, Subtrahend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x1f1f1f1f, Result); // // Otherwise should result in an error status // - Minuend = 0x5a5a5a5a; + Minuend = 0x5a5a5a5a; Subtrahend = 0x6d6d6d6d; - Status = SafeUintnSub(Minuend, Subtrahend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUintnSub (Minuend, Subtrahend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -433,7 +433,7 @@ TestSafeUintnSub ( UNIT_TEST_STATUS EFIAPI TestSafeIntnSub ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -445,31 +445,31 @@ TestSafeIntnSub ( // If the result of subtractions doesn't overflow MAX_INTN or // underflow MIN_INTN, then it's subtraction // - Minuend = 0x5a5a5a5a; + Minuend = 0x5a5a5a5a; Subtrahend = 0x3a3a3a3a; - Result = 0; - Status = SafeIntnSub(Minuend, Subtrahend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x20202020, Result); + Result = 0; + Status = SafeIntnSub (Minuend, Subtrahend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x20202020, Result); - Minuend = 0x3a3a3a3a; + Minuend = 0x3a3a3a3a; Subtrahend = 0x5a5a5a5a; - Status = SafeIntnSub(Minuend, Subtrahend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL((-538976288), Result); + Status = SafeIntnSub (Minuend, Subtrahend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL ((-538976288), Result); // // Otherwise should result in an error status // - Minuend = (-2054847098); + Minuend = (-2054847098); Subtrahend = 2054847098; - Status = SafeIntnSub(Minuend, Subtrahend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnSub (Minuend, Subtrahend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); - Minuend = (2054847098); + Minuend = (2054847098); Subtrahend = (-2054847098); - Status = SafeIntnSub(Minuend, Subtrahend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnSub (Minuend, Subtrahend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -477,7 +477,7 @@ TestSafeIntnSub ( UNIT_TEST_STATUS EFIAPI TestSafeUintnMult ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -489,19 +489,19 @@ TestSafeUintnMult ( // If the result of multiplication doesn't overflow MAX_UINTN, it will succeed // Multiplicand = 0xa122a; - Multiplier = 0xd23; - Result = 0; - Status = SafeUintnMult(Multiplicand, Multiplier, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x844c9dbe, Result); + Multiplier = 0xd23; + Result = 0; + Status = SafeUintnMult (Multiplicand, Multiplier, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x844c9dbe, Result); // // Otherwise should result in an error status // Multiplicand = 0xa122a; - Multiplier = 0xed23; - Status = SafeUintnMult(Multiplicand, Multiplier, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Multiplier = 0xed23; + Status = SafeUintnMult (Multiplicand, Multiplier, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -509,7 +509,7 @@ TestSafeUintnMult ( UNIT_TEST_STATUS EFIAPI TestSafeIntnMult ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -522,19 +522,19 @@ TestSafeIntnMult ( // underflow MIN_UINTN, it will succeed // Multiplicand = 0x123456; - Multiplier = 0x678; - Result = 0; - Status = SafeIntnMult(Multiplicand, Multiplier, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x75c28c50, Result); + Multiplier = 0x678; + Result = 0; + Status = SafeIntnMult (Multiplicand, Multiplier, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x75c28c50, Result); // // Otherwise should result in an error status // Multiplicand = 0x123456; - Multiplier = 0xabc; - Status = SafeIntnMult(Multiplicand, Multiplier, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Multiplier = 0xabc; + Status = SafeIntnMult (Multiplicand, Multiplier, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } diff --git a/MdePkg/Test/UnitTest/Library/BaseSafeIntLib/SafeIntLibUintnIntnUnitTests64.c b/MdePkg/Test/UnitTest/Library/BaseSafeIntLib/SafeIntLibUintnIntnUnitTests64.c index 0fee298..24947b0 100644 --- a/MdePkg/Test/UnitTest/Library/BaseSafeIntLib/SafeIntLibUintnIntnUnitTests64.c +++ b/MdePkg/Test/UnitTest/Library/BaseSafeIntLib/SafeIntLibUintnIntnUnitTests64.c @@ -13,7 +13,7 @@ UNIT_TEST_STATUS EFIAPI TestSafeInt32ToUintn ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -24,17 +24,17 @@ TestSafeInt32ToUintn ( // If Operand is non-negative, then it's a cast // Operand = 0x5bababab; - Result = 0; - Status = SafeInt32ToUintn(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5bababab, Result); + Result = 0; + Status = SafeInt32ToUintn (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5bababab, Result); // // Otherwise should result in an error status // Operand = (-1537977259); - Status = SafeInt32ToUintn(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt32ToUintn (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -42,7 +42,7 @@ TestSafeInt32ToUintn ( UNIT_TEST_STATUS EFIAPI TestSafeUint32ToIntn ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -58,10 +58,10 @@ TestSafeUint32ToIntn ( // If Operand is non-negative, then it's a cast // Operand = 0xabababab; - Result = 0; - Status = SafeUint32ToIntn(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0xabababab, Result); + Result = 0; + Status = SafeUint32ToIntn (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0xabababab, Result); return UNIT_TEST_PASSED; } @@ -69,7 +69,7 @@ TestSafeUint32ToIntn ( UNIT_TEST_STATUS EFIAPI TestSafeIntnToInt32 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -80,26 +80,26 @@ TestSafeIntnToInt32 ( // If Operand is between MIN_INT32 and MAX_INT32 inclusive, then it's a cast // Operand = 0x5bababab; - Result = 0; - Status = SafeIntnToInt32(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5bababab, Result); + Result = 0; + Status = SafeIntnToInt32 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5bababab, Result); Operand = (-1537977259); - Status = SafeIntnToInt32(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL((-1537977259), Result); + Status = SafeIntnToInt32 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL ((-1537977259), Result); // // Otherwise should result in an error status // Operand = (0x5babababefefefef); - Status = SafeIntnToInt32(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnToInt32 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (-6605562033422200815); - Status = SafeIntnToInt32(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnToInt32 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -107,7 +107,7 @@ TestSafeIntnToInt32 ( UNIT_TEST_STATUS EFIAPI TestSafeIntnToUint32 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -118,21 +118,21 @@ TestSafeIntnToUint32 ( // If Operand is between 0 and MAX_UINT32 inclusive, then it's a cast // Operand = 0xabababab; - Result = 0; - Status = SafeIntnToUint32(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0xabababab, Result); + Result = 0; + Status = SafeIntnToUint32 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0xabababab, Result); // // Otherwise should result in an error status // Operand = (0x5babababefefefef); - Status = SafeIntnToUint32(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnToUint32 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (-6605562033422200815); - Status = SafeIntnToUint32(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnToUint32 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -140,7 +140,7 @@ TestSafeIntnToUint32 ( UNIT_TEST_STATUS EFIAPI TestSafeUintnToUint32 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -151,17 +151,17 @@ TestSafeUintnToUint32 ( // If Operand is <= MAX_UINT32, then it's a cast // Operand = 0xabababab; - Result = 0; - Status = SafeUintnToUint32(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0xabababab, Result); + Result = 0; + Status = SafeUintnToUint32 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0xabababab, Result); // // Otherwise should result in an error status // Operand = (0xababababefefefef); - Status = SafeUintnToUint32(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUintnToUint32 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -169,7 +169,7 @@ TestSafeUintnToUint32 ( UNIT_TEST_STATUS EFIAPI TestSafeUintnToIntn ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -180,17 +180,17 @@ TestSafeUintnToIntn ( // If Operand is <= MAX_INTN (0x7fff_ffff_ffff_ffff), then it's a cast // Operand = 0x5babababefefefef; - Result = 0; - Status = SafeUintnToIntn(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5babababefefefef, Result); + Result = 0; + Status = SafeUintnToIntn (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5babababefefefef, Result); // // Otherwise should result in an error status // Operand = (0xababababefefefef); - Status = SafeUintnToIntn(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUintnToIntn (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -198,7 +198,7 @@ TestSafeUintnToIntn ( UNIT_TEST_STATUS EFIAPI TestSafeUintnToInt64 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -209,17 +209,17 @@ TestSafeUintnToInt64 ( // If Operand is <= MAX_INT64, then it's a cast // Operand = 0x5babababefefefef; - Result = 0; - Status = SafeUintnToInt64(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5babababefefefef, Result); + Result = 0; + Status = SafeUintnToInt64 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5babababefefefef, Result); // // Otherwise should result in an error status // Operand = (0xababababefefefef); - Status = SafeUintnToInt64(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUintnToInt64 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -227,7 +227,7 @@ TestSafeUintnToInt64 ( UNIT_TEST_STATUS EFIAPI TestSafeInt64ToIntn ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -238,10 +238,10 @@ TestSafeInt64ToIntn ( // INTN is same as INT64 in x64, so this is just a cast // Operand = 0x5babababefefefef; - Result = 0; - Status = SafeInt64ToIntn(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5babababefefefef, Result); + Result = 0; + Status = SafeInt64ToIntn (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5babababefefefef, Result); return UNIT_TEST_PASSED; } @@ -249,7 +249,7 @@ TestSafeInt64ToIntn ( UNIT_TEST_STATUS EFIAPI TestSafeInt64ToUintn ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -260,17 +260,17 @@ TestSafeInt64ToUintn ( // If Operand is non-negative, then it's a cast // Operand = 0x5babababefefefef; - Result = 0; - Status = SafeInt64ToUintn(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5babababefefefef, Result); + Result = 0; + Status = SafeInt64ToUintn (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5babababefefefef, Result); // // Otherwise should result in an error status // Operand = (-6605562033422200815); - Status = SafeInt64ToUintn(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt64ToUintn (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -278,7 +278,7 @@ TestSafeInt64ToUintn ( UNIT_TEST_STATUS EFIAPI TestSafeUint64ToIntn ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -289,17 +289,17 @@ TestSafeUint64ToIntn ( // If Operand is <= MAX_INTN (0x7fff_ffff_ffff_ffff), then it's a cast // Operand = 0x5babababefefefef; - Result = 0; - Status = SafeUint64ToIntn(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5babababefefefef, Result); + Result = 0; + Status = SafeUint64ToIntn (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5babababefefefef, Result); // // Otherwise should result in an error status // Operand = (0xababababefefefef); - Status = SafeUint64ToIntn(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint64ToIntn (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -307,7 +307,7 @@ TestSafeUint64ToIntn ( UNIT_TEST_STATUS EFIAPI TestSafeUint64ToUintn ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -318,10 +318,10 @@ TestSafeUint64ToUintn ( // UINTN is same as UINT64 in x64, so this is just a cast // Operand = 0xababababefefefef; - Result = 0; - Status = SafeUint64ToUintn(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0xababababefefefef, Result); + Result = 0; + Status = SafeUint64ToUintn (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0xababababefefefef, Result); return UNIT_TEST_PASSED; } @@ -329,7 +329,7 @@ TestSafeUint64ToUintn ( UNIT_TEST_STATUS EFIAPI TestSafeUintnAdd ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -343,17 +343,17 @@ TestSafeUintnAdd ( Augend = 0x3a3a3a3a12121212; Addend = 0x3a3a3a3a12121212; Result = 0; - Status = SafeUintnAdd(Augend, Addend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x7474747424242424, Result); + Status = SafeUintnAdd (Augend, Addend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x7474747424242424, Result); // // Otherwise should result in an error status // Augend = 0xababababefefefef; Addend = 0xbcbcbcbcdededede; - Status = SafeUintnAdd(Augend, Addend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUintnAdd (Augend, Addend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -361,7 +361,7 @@ TestSafeUintnAdd ( UNIT_TEST_STATUS EFIAPI TestSafeIntnAdd ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -376,28 +376,28 @@ TestSafeIntnAdd ( Augend = 0x3a3a3a3a3a3a3a3a; Addend = 0x3a3a3a3a3a3a3a3a; Result = 0; - Status = SafeIntnAdd(Augend, Addend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x7474747474747474, Result); + Status = SafeIntnAdd (Augend, Addend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x7474747474747474, Result); Augend = (-4195730024608447034); Addend = (-4195730024608447034); - Status = SafeIntnAdd(Augend, Addend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL((-8391460049216894068), Result); + Status = SafeIntnAdd (Augend, Addend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL ((-8391460049216894068), Result); // // Otherwise should result in an error status // Augend = 0x5a5a5a5a5a5a5a5a; Addend = 0x5a5a5a5a5a5a5a5a; - Status = SafeIntnAdd(Augend, Addend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnAdd (Augend, Addend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Augend = (-6510615555426900570); Addend = (-6510615555426900570); - Status = SafeIntnAdd(Augend, Addend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnAdd (Augend, Addend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -405,7 +405,7 @@ TestSafeIntnAdd ( UNIT_TEST_STATUS EFIAPI TestSafeUintnSub ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -416,20 +416,20 @@ TestSafeUintnSub ( // // If Minuend >= Subtrahend, then it's subtraction // - Minuend = 0x5a5a5a5a5a5a5a5a; + Minuend = 0x5a5a5a5a5a5a5a5a; Subtrahend = 0x3b3b3b3b3b3b3b3b; - Result = 0; - Status = SafeUintnSub(Minuend, Subtrahend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x1f1f1f1f1f1f1f1f, Result); + Result = 0; + Status = SafeUintnSub (Minuend, Subtrahend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x1f1f1f1f1f1f1f1f, Result); // // Otherwise should result in an error status // - Minuend = 0x5a5a5a5a5a5a5a5a; + Minuend = 0x5a5a5a5a5a5a5a5a; Subtrahend = 0x6d6d6d6d6d6d6d6d; - Status = SafeUintnSub(Minuend, Subtrahend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUintnSub (Minuend, Subtrahend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -437,7 +437,7 @@ TestSafeUintnSub ( UNIT_TEST_STATUS EFIAPI TestSafeIntnSub ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -449,31 +449,31 @@ TestSafeIntnSub ( // If the result of subtractions doesn't overflow MAX_INTN or // underflow MIN_INTN, then it's subtraction // - Minuend = 0x5a5a5a5a5a5a5a5a; + Minuend = 0x5a5a5a5a5a5a5a5a; Subtrahend = 0x3a3a3a3a3a3a3a3a; - Result = 0; - Status = SafeIntnSub(Minuend, Subtrahend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x2020202020202020, Result); + Result = 0; + Status = SafeIntnSub (Minuend, Subtrahend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x2020202020202020, Result); - Minuend = 0x3a3a3a3a3a3a3a3a; + Minuend = 0x3a3a3a3a3a3a3a3a; Subtrahend = 0x5a5a5a5a5a5a5a5a; - Status = SafeIntnSub(Minuend, Subtrahend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL((-2314885530818453536), Result); + Status = SafeIntnSub (Minuend, Subtrahend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL ((-2314885530818453536), Result); // // Otherwise should result in an error status // - Minuend = (-8825501086245354106); + Minuend = (-8825501086245354106); Subtrahend = 8825501086245354106; - Status = SafeIntnSub(Minuend, Subtrahend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnSub (Minuend, Subtrahend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); - Minuend = (8825501086245354106); + Minuend = (8825501086245354106); Subtrahend = (-8825501086245354106); - Status = SafeIntnSub(Minuend, Subtrahend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnSub (Minuend, Subtrahend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -481,7 +481,7 @@ TestSafeIntnSub ( UNIT_TEST_STATUS EFIAPI TestSafeUintnMult ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -493,19 +493,19 @@ TestSafeUintnMult ( // If the result of multiplication doesn't overflow MAX_UINTN, it will succeed // Multiplicand = 0x123456789a; - Multiplier = 0x1234567; - Result = 0; - Status = SafeUintnMult(Multiplicand, Multiplier, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x14b66db9745a07f6, Result); + Multiplier = 0x1234567; + Result = 0; + Status = SafeUintnMult (Multiplicand, Multiplier, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x14b66db9745a07f6, Result); // // Otherwise should result in an error status // Multiplicand = 0x123456789a; - Multiplier = 0x12345678; - Status = SafeUintnMult(Multiplicand, Multiplier, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Multiplier = 0x12345678; + Status = SafeUintnMult (Multiplicand, Multiplier, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -513,7 +513,7 @@ TestSafeUintnMult ( UNIT_TEST_STATUS EFIAPI TestSafeIntnMult ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -526,19 +526,19 @@ TestSafeIntnMult ( // underflow MIN_UINTN, it will succeed // Multiplicand = 0x123456789; - Multiplier = 0x6789abcd; - Result = 0; - Status = SafeIntnMult(Multiplicand, Multiplier, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x75cd9045220d6bb5, Result); + Multiplier = 0x6789abcd; + Result = 0; + Status = SafeIntnMult (Multiplicand, Multiplier, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x75cd9045220d6bb5, Result); // // Otherwise should result in an error status // Multiplicand = 0x123456789; - Multiplier = 0xa789abcd; - Status = SafeIntnMult(Multiplicand, Multiplier, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Multiplier = 0xa789abcd; + Status = SafeIntnMult (Multiplicand, Multiplier, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } diff --git a/MdePkg/Test/UnitTest/Library/BaseSafeIntLib/TestBaseSafeIntLib.c b/MdePkg/Test/UnitTest/Library/BaseSafeIntLib/TestBaseSafeIntLib.c index 2b1a222..acb6083 100644 --- a/MdePkg/Test/UnitTest/Library/BaseSafeIntLib/TestBaseSafeIntLib.c +++ b/MdePkg/Test/UnitTest/Library/BaseSafeIntLib/TestBaseSafeIntLib.c @@ -9,8 +9,8 @@ #include "TestBaseSafeIntLib.h" -#define UNIT_TEST_NAME "Int Safe Lib Unit Test Application" -#define UNIT_TEST_VERSION "0.1" +#define UNIT_TEST_NAME "Int Safe Lib Unit Test Application" +#define UNIT_TEST_VERSION "0.1" // // Conversion function tests: @@ -18,7 +18,7 @@ UNIT_TEST_STATUS EFIAPI TestSafeInt8ToUint8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -29,17 +29,17 @@ TestSafeInt8ToUint8 ( // Positive UINT8 should result in just a cast // Operand = 0x5b; - Result = 0; - Status = SafeInt8ToUint8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b, Result); + Result = 0; + Status = SafeInt8ToUint8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b, Result); // // Negative number should result in an error status // Operand = (-56); - Status = SafeInt8ToUint8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt8ToUint8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -47,7 +47,7 @@ TestSafeInt8ToUint8 ( UNIT_TEST_STATUS EFIAPI TestSafeInt8ToUint16 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -58,17 +58,17 @@ TestSafeInt8ToUint16 ( // Positive UINT8 should result in just a cast // Operand = 0x5b; - Result = 0; - Status = SafeInt8ToUint16(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b, Result); + Result = 0; + Status = SafeInt8ToUint16 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b, Result); // // Negative number should result in an error status // Operand = (-56); - Status = SafeInt8ToUint16(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt8ToUint16 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -76,7 +76,7 @@ TestSafeInt8ToUint16 ( UNIT_TEST_STATUS EFIAPI TestSafeInt8ToUint32 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -87,17 +87,17 @@ TestSafeInt8ToUint32 ( // Positive UINT8 should result in just a cast // Operand = 0x5b; - Result = 0; - Status = SafeInt8ToUint32(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b, Result); + Result = 0; + Status = SafeInt8ToUint32 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b, Result); // // Negative number should result in an error status // Operand = (-56); - Status = SafeInt8ToUint32(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt8ToUint32 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -105,7 +105,7 @@ TestSafeInt8ToUint32 ( UNIT_TEST_STATUS EFIAPI TestSafeInt8ToUintn ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -116,17 +116,17 @@ TestSafeInt8ToUintn ( // Positive UINT8 should result in just a cast // Operand = 0x5b; - Result = 0; - Status = SafeInt8ToUintn(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b, Result); + Result = 0; + Status = SafeInt8ToUintn (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b, Result); // // Negative number should result in an error status // Operand = (-56); - Status = SafeInt8ToUintn(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt8ToUintn (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -134,7 +134,7 @@ TestSafeInt8ToUintn ( UNIT_TEST_STATUS EFIAPI TestSafeInt8ToUint64 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -145,17 +145,17 @@ TestSafeInt8ToUint64 ( // Positive UINT8 should result in just a cast // Operand = 0x5b; - Result = 0; - Status = SafeInt8ToUint64(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b, Result); + Result = 0; + Status = SafeInt8ToUint64 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b, Result); // // Negative number should result in an error status // Operand = (-56); - Status = SafeInt8ToUint64(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt8ToUint64 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -163,7 +163,7 @@ TestSafeInt8ToUint64 ( UNIT_TEST_STATUS EFIAPI TestSafeUint8ToInt8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -174,17 +174,17 @@ TestSafeUint8ToInt8 ( // Operand <= 0x7F (MAX_INT8) should result in a cast // Operand = 0x5b; - Result = 0; - Status = SafeUint8ToInt8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b, Result); + Result = 0; + Status = SafeUint8ToInt8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b, Result); // // Operand larger than 0x7f should result in an error status // Operand = 0xaf; - Status = SafeUint8ToInt8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint8ToInt8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -192,7 +192,7 @@ TestSafeUint8ToInt8 ( UNIT_TEST_STATUS EFIAPI TestSafeUint8ToChar8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -208,17 +208,17 @@ TestSafeUint8ToChar8 ( // Operand <= 0x7F (MAX_INT8) should result in a cast // Operand = 0x5b; - Result = 0; - Status = SafeUint8ToChar8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b, Result); + Result = 0; + Status = SafeUint8ToChar8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b, Result); // // Operand larger than 0x7f should result in an error status // Operand = 0xaf; - Status = SafeUint8ToChar8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint8ToChar8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -226,7 +226,7 @@ TestSafeUint8ToChar8 ( UNIT_TEST_STATUS EFIAPI TestSafeInt16ToInt8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -237,26 +237,26 @@ TestSafeInt16ToInt8 ( // If Operand is between MIN_INT8 and MAX_INT8 inclusive, then it's a cast // Operand = 0x5b; - Result = 0; - Status = SafeInt16ToInt8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b, Result); + Result = 0; + Status = SafeInt16ToInt8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b, Result); Operand = (-35); - Status = SafeInt16ToInt8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL((-35), Result); + Status = SafeInt16ToInt8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL ((-35), Result); // // Otherwise should result in an error status // Operand = 0x1234; - Status = SafeInt16ToInt8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt16ToInt8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (-17835); - Status = SafeInt16ToInt8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt16ToInt8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -264,7 +264,7 @@ TestSafeInt16ToInt8 ( UNIT_TEST_STATUS EFIAPI TestSafeInt16ToChar8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -280,37 +280,37 @@ TestSafeInt16ToChar8 ( // If Operand is between 0 and MAX_INT8 inclusive, then it's a cast // Operand = 0x5b; - Result = 0; - Status = SafeInt16ToChar8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b, Result); + Result = 0; + Status = SafeInt16ToChar8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b, Result); Operand = 0; - Result = 0; - Status = SafeInt16ToChar8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0, Result); + Result = 0; + Status = SafeInt16ToChar8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0, Result); Operand = MAX_INT8; - Result = 0; - Status = SafeInt16ToChar8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(MAX_INT8, Result); + Result = 0; + Status = SafeInt16ToChar8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (MAX_INT8, Result); // // Otherwise should result in an error status // Operand = (-35); - Status = SafeInt16ToChar8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt16ToChar8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = 0x1234; - Status = SafeInt16ToChar8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt16ToChar8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (-17835); - Status = SafeInt16ToChar8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt16ToChar8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -318,7 +318,7 @@ TestSafeInt16ToChar8 ( UNIT_TEST_STATUS EFIAPI TestSafeInt16ToUint8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -329,21 +329,21 @@ TestSafeInt16ToUint8 ( // If Operand is between 0 and MAX_INT8 inclusive, then it's a cast // Operand = 0x5b; - Result = 0; - Status = SafeInt16ToUint8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b, Result); + Result = 0; + Status = SafeInt16ToUint8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b, Result); // // Otherwise should result in an error status // Operand = 0x1234; - Status = SafeInt16ToUint8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt16ToUint8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (-17835); - Status = SafeInt16ToUint8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt16ToUint8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -351,26 +351,26 @@ TestSafeInt16ToUint8 ( UNIT_TEST_STATUS EFIAPI TestSafeInt16ToUint16 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; - INT16 Operand = 0x5b5b; - UINT16 Result = 0; + INT16 Operand = 0x5b5b; + UINT16 Result = 0; // // If Operand is non-negative, then it's a cast // - Status = SafeInt16ToUint16(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b5b, Result); + Status = SafeInt16ToUint16 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b5b, Result); // // Otherwise should result in an error status // Operand = (-17835); - Status = SafeInt16ToUint16(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt16ToUint16 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -378,7 +378,7 @@ TestSafeInt16ToUint16 ( UNIT_TEST_STATUS EFIAPI TestSafeInt16ToUint32 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -389,17 +389,17 @@ TestSafeInt16ToUint32 ( // If Operand is non-negative, then it's a cast // Operand = 0x5b5b; - Result = 0; - Status = SafeInt16ToUint32(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b5b, Result); + Result = 0; + Status = SafeInt16ToUint32 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b5b, Result); // // Otherwise should result in an error status // Operand = (-17835); - Status = SafeInt16ToUint32(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt16ToUint32 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -407,7 +407,7 @@ TestSafeInt16ToUint32 ( UNIT_TEST_STATUS EFIAPI TestSafeInt16ToUintn ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -418,17 +418,17 @@ TestSafeInt16ToUintn ( // If Operand is non-negative, then it's a cast // Operand = 0x5b5b; - Result = 0; - Status = SafeInt16ToUintn(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b5b, Result); + Result = 0; + Status = SafeInt16ToUintn (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b5b, Result); // // Otherwise should result in an error status // Operand = (-17835); - Status = SafeInt16ToUintn(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt16ToUintn (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -436,7 +436,7 @@ TestSafeInt16ToUintn ( UNIT_TEST_STATUS EFIAPI TestSafeInt16ToUint64 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -447,17 +447,17 @@ TestSafeInt16ToUint64 ( // If Operand is non-negative, then it's a cast // Operand = 0x5b5b; - Result = 0; - Status = SafeInt16ToUint64(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b5b, Result); + Result = 0; + Status = SafeInt16ToUint64 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b5b, Result); // // Otherwise should result in an error status // Operand = (-17835); - Status = SafeInt16ToUint64(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt16ToUint64 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -465,7 +465,7 @@ TestSafeInt16ToUint64 ( UNIT_TEST_STATUS EFIAPI TestSafeUint16ToInt8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -476,17 +476,17 @@ TestSafeUint16ToInt8 ( // If Operand is <= MAX_INT8, it's a cast // Operand = 0x5b; - Result = 0; - Status = SafeUint16ToInt8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b, Result); + Result = 0; + Status = SafeUint16ToInt8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b, Result); // // Otherwise should result in an error status // Operand = (0x5b5b); - Status = SafeUint16ToInt8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint16ToInt8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -494,7 +494,7 @@ TestSafeUint16ToInt8 ( UNIT_TEST_STATUS EFIAPI TestSafeUint16ToChar8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -508,17 +508,17 @@ TestSafeUint16ToChar8 ( // If Operand is <= MAX_INT8, it's a cast // Operand = 0x5b; - Result = 0; - Status = SafeUint16ToChar8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b, Result); + Result = 0; + Status = SafeUint16ToChar8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b, Result); // // Otherwise should result in an error status // Operand = (0x5b5b); - Status = SafeUint16ToChar8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint16ToChar8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -526,7 +526,7 @@ TestSafeUint16ToChar8 ( UNIT_TEST_STATUS EFIAPI TestSafeUint16ToUint8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -537,17 +537,17 @@ TestSafeUint16ToUint8 ( // If Operand is <= MAX_UINT8 (0xff), it's a cast // Operand = 0xab; - Result = 0; - Status = SafeUint16ToUint8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0xab, Result); + Result = 0; + Status = SafeUint16ToUint8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0xab, Result); // // Otherwise should result in an error status // Operand = (0x5b5b); - Status = SafeUint16ToUint8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint16ToUint8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -555,7 +555,7 @@ TestSafeUint16ToUint8 ( UNIT_TEST_STATUS EFIAPI TestSafeUint16ToInt16 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -566,17 +566,17 @@ TestSafeUint16ToInt16 ( // If Operand is <= MAX_INT16 (0x7fff), it's a cast // Operand = 0x5b5b; - Result = 0; - Status = SafeUint16ToInt16(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b5b, Result); + Result = 0; + Status = SafeUint16ToInt16 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b5b, Result); // // Otherwise should result in an error status // Operand = (0xabab); - Status = SafeUint16ToInt16(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint16ToInt16 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -584,7 +584,7 @@ TestSafeUint16ToInt16 ( UNIT_TEST_STATUS EFIAPI TestSafeInt32ToInt8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -595,26 +595,26 @@ TestSafeInt32ToInt8 ( // If Operand is between MIN_INT8 and MAX_INT8 inclusive, then it's a cast // Operand = 0x5b; - Result = 0; - Status = SafeInt32ToInt8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b, Result); + Result = 0; + Status = SafeInt32ToInt8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b, Result); Operand = (-57); - Status = SafeInt32ToInt8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL((-57), Result); + Status = SafeInt32ToInt8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL ((-57), Result); // // Otherwise should result in an error status // Operand = (0x5bababab); - Status = SafeInt32ToInt8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt32ToInt8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (-1537977259); - Status = SafeInt32ToInt8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt32ToInt8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -622,7 +622,7 @@ TestSafeInt32ToInt8 ( UNIT_TEST_STATUS EFIAPI TestSafeInt32ToChar8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -638,37 +638,37 @@ TestSafeInt32ToChar8 ( // If Operand is between 0 and MAX_INT8 inclusive, then it's a cast // Operand = 0x5b; - Result = 0; - Status = SafeInt32ToChar8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b, Result); + Result = 0; + Status = SafeInt32ToChar8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b, Result); Operand = 0; - Result = 0; - Status = SafeInt32ToChar8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0, Result); + Result = 0; + Status = SafeInt32ToChar8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0, Result); Operand = MAX_INT8; - Result = 0; - Status = SafeInt32ToChar8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(MAX_INT8, Result); + Result = 0; + Status = SafeInt32ToChar8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (MAX_INT8, Result); // // Otherwise should result in an error status // Operand = (-57); - Status = SafeInt32ToChar8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt32ToChar8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (0x5bababab); - Status = SafeInt32ToChar8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt32ToChar8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (-1537977259); - Status = SafeInt32ToChar8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt32ToChar8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -676,7 +676,7 @@ TestSafeInt32ToChar8 ( UNIT_TEST_STATUS EFIAPI TestSafeInt32ToUint8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -687,25 +687,25 @@ TestSafeInt32ToUint8 ( // If Operand is between 0 and MAX_INT8 inclusive, then it's a cast // Operand = 0x5b; - Result = 0; - Status = SafeInt32ToUint8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b, Result); + Result = 0; + Status = SafeInt32ToUint8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b, Result); // // Otherwise should result in an error status // Operand = (-57); - Status = SafeInt32ToUint8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt32ToUint8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (0x5bababab); - Status = SafeInt32ToUint8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt32ToUint8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (-1537977259); - Status = SafeInt32ToUint8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt32ToUint8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -713,7 +713,7 @@ TestSafeInt32ToUint8 ( UNIT_TEST_STATUS EFIAPI TestSafeInt32ToInt16 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -724,26 +724,26 @@ TestSafeInt32ToInt16 ( // If Operand is between MIN_INT16 and MAX_INT16 inclusive, then it's a cast // Operand = 0x5b5b; - Result = 0; - Status = SafeInt32ToInt16(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b5b, Result); + Result = 0; + Status = SafeInt32ToInt16 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b5b, Result); Operand = (-17857); - Status = SafeInt32ToInt16(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL((-17857), Result); + Status = SafeInt32ToInt16 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL ((-17857), Result); // // Otherwise should result in an error status // Operand = (0x5bababab); - Status = SafeInt32ToInt16(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt32ToInt16 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (-1537977259); - Status = SafeInt32ToInt16(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt32ToInt16 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -751,7 +751,7 @@ TestSafeInt32ToInt16 ( UNIT_TEST_STATUS EFIAPI TestSafeInt32ToUint16 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -762,25 +762,25 @@ TestSafeInt32ToUint16 ( // If Operand is between 0 and MAX_UINT16 inclusive, then it's a cast // Operand = 0xabab; - Result = 0; - Status = SafeInt32ToUint16(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0xabab, Result); + Result = 0; + Status = SafeInt32ToUint16 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0xabab, Result); // // Otherwise should result in an error status // Operand = (-17857); - Status = SafeInt32ToUint16(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt32ToUint16 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (0x5bababab); - Status = SafeInt32ToUint16(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt32ToUint16 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (-1537977259); - Status = SafeInt32ToUint16(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt32ToUint16 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -788,7 +788,7 @@ TestSafeInt32ToUint16 ( UNIT_TEST_STATUS EFIAPI TestSafeInt32ToUint32 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -799,17 +799,17 @@ TestSafeInt32ToUint32 ( // If Operand is non-negative, then it's a cast // Operand = 0x5bababab; - Result = 0; - Status = SafeInt32ToUint32(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5bababab, Result); + Result = 0; + Status = SafeInt32ToUint32 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5bababab, Result); // // Otherwise should result in an error status // Operand = (-1537977259); - Status = SafeInt32ToUint32(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt32ToUint32 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -817,7 +817,7 @@ TestSafeInt32ToUint32 ( UNIT_TEST_STATUS EFIAPI TestSafeInt32ToUint64 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -828,17 +828,17 @@ TestSafeInt32ToUint64 ( // If Operand is non-negative, then it's a cast // Operand = 0x5bababab; - Result = 0; - Status = SafeInt32ToUint64(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5bababab, Result); + Result = 0; + Status = SafeInt32ToUint64 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5bababab, Result); // // Otherwise should result in an error status // Operand = (-1537977259); - Status = SafeInt32ToUint64(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt32ToUint64 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -846,7 +846,7 @@ TestSafeInt32ToUint64 ( UNIT_TEST_STATUS EFIAPI TestSafeUint32ToInt8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -857,17 +857,17 @@ TestSafeUint32ToInt8 ( // If Operand is <= MAX_INT8, then it's a cast // Operand = 0x5b; - Result = 0; - Status = SafeUint32ToInt8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b, Result); + Result = 0; + Status = SafeUint32ToInt8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b, Result); // // Otherwise should result in an error status // Operand = (0x5bababab); - Status = SafeUint32ToInt8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint32ToInt8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -875,7 +875,7 @@ TestSafeUint32ToInt8 ( UNIT_TEST_STATUS EFIAPI TestSafeUint32ToChar8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -889,17 +889,17 @@ TestSafeUint32ToChar8 ( // If Operand is <= MAX_INT8, then it's a cast // Operand = 0x5b; - Result = 0; - Status = SafeUint32ToChar8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b, Result); + Result = 0; + Status = SafeUint32ToChar8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b, Result); // // Otherwise should result in an error status // Operand = (0x5bababab); - Status = SafeUint32ToChar8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint32ToChar8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -907,7 +907,7 @@ TestSafeUint32ToChar8 ( UNIT_TEST_STATUS EFIAPI TestSafeUint32ToUint8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -918,17 +918,17 @@ TestSafeUint32ToUint8 ( // If Operand is <= MAX_UINT8, then it's a cast // Operand = 0xab; - Result = 0; - Status = SafeUint32ToUint8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0xab, Result); + Result = 0; + Status = SafeUint32ToUint8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0xab, Result); // // Otherwise should result in an error status // Operand = (0xabababab); - Status = SafeUint32ToUint8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint32ToUint8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -936,7 +936,7 @@ TestSafeUint32ToUint8 ( UNIT_TEST_STATUS EFIAPI TestSafeUint32ToInt16 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -947,17 +947,17 @@ TestSafeUint32ToInt16 ( // If Operand is <= MAX_INT16, then it's a cast // Operand = 0x5bab; - Result = 0; - Status = SafeUint32ToInt16(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5bab, Result); + Result = 0; + Status = SafeUint32ToInt16 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5bab, Result); // // Otherwise should result in an error status // Operand = (0xabababab); - Status = SafeUint32ToInt16(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint32ToInt16 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -965,7 +965,7 @@ TestSafeUint32ToInt16 ( UNIT_TEST_STATUS EFIAPI TestSafeUint32ToUint16 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -976,17 +976,17 @@ TestSafeUint32ToUint16 ( // If Operand is <= MAX_UINT16, then it's a cast // Operand = 0xabab; - Result = 0; - Status = SafeUint32ToUint16(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0xabab, Result); + Result = 0; + Status = SafeUint32ToUint16 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0xabab, Result); // // Otherwise should result in an error status // Operand = (0xabababab); - Status = SafeUint32ToUint16(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint32ToUint16 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -994,7 +994,7 @@ TestSafeUint32ToUint16 ( UNIT_TEST_STATUS EFIAPI TestSafeUint32ToInt32 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1005,17 +1005,17 @@ TestSafeUint32ToInt32 ( // If Operand is <= MAX_INT32, then it's a cast // Operand = 0x5bababab; - Result = 0; - Status = SafeUint32ToInt32(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5bababab, Result); + Result = 0; + Status = SafeUint32ToInt32 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5bababab, Result); // // Otherwise should result in an error status // Operand = (0xabababab); - Status = SafeUint32ToInt32(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint32ToInt32 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1023,7 +1023,7 @@ TestSafeUint32ToInt32 ( UNIT_TEST_STATUS EFIAPI TestSafeIntnToInt8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1034,26 +1034,26 @@ TestSafeIntnToInt8 ( // If Operand is between MIN_INT8 and MAX_INT8 inclusive, then it's a cast // Operand = 0x5b; - Result = 0; - Status = SafeIntnToInt8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b, Result); + Result = 0; + Status = SafeIntnToInt8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b, Result); Operand = (-53); - Status = SafeIntnToInt8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL((-53), Result); + Status = SafeIntnToInt8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL ((-53), Result); // // Otherwise should result in an error status // Operand = (0x5bababab); - Status = SafeIntnToInt8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnToInt8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (-1537977259); - Status = SafeIntnToInt8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnToInt8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1061,7 +1061,7 @@ TestSafeIntnToInt8 ( UNIT_TEST_STATUS EFIAPI TestSafeIntnToChar8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1077,37 +1077,37 @@ TestSafeIntnToChar8 ( // If Operand is between MIN_INT8 and MAX_INT8 inclusive, then it's a cast // Operand = 0x5b; - Result = 0; - Status = SafeIntnToChar8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b, Result); + Result = 0; + Status = SafeIntnToChar8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b, Result); Operand = 0; - Result = 0; - Status = SafeIntnToChar8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0, Result); + Result = 0; + Status = SafeIntnToChar8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0, Result); Operand = MAX_INT8; - Result = 0; - Status = SafeIntnToChar8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(MAX_INT8, Result); + Result = 0; + Status = SafeIntnToChar8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (MAX_INT8, Result); // // Otherwise should result in an error status // Operand = (-53); - Status = SafeIntnToChar8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnToChar8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (0x5bababab); - Status = SafeIntnToChar8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnToChar8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (-1537977259); - Status = SafeIntnToChar8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnToChar8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1115,7 +1115,7 @@ TestSafeIntnToChar8 ( UNIT_TEST_STATUS EFIAPI TestSafeIntnToUint8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1126,21 +1126,21 @@ TestSafeIntnToUint8 ( // If Operand is between 0 and MAX_UINT8 inclusive, then it's a cast // Operand = 0xab; - Result = 0; - Status = SafeIntnToUint8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0xab, Result); + Result = 0; + Status = SafeIntnToUint8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0xab, Result); // // Otherwise should result in an error status // Operand = (0x5bababab); - Status = SafeIntnToUint8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnToUint8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (-1537977259); - Status = SafeIntnToUint8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnToUint8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1148,7 +1148,7 @@ TestSafeIntnToUint8 ( UNIT_TEST_STATUS EFIAPI TestSafeIntnToInt16 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1159,26 +1159,26 @@ TestSafeIntnToInt16 ( // If Operand is between MIN_INT16 and MAX_INT16 inclusive, then it's a cast // Operand = 0x5bab; - Result = 0; - Status = SafeIntnToInt16(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5bab, Result); + Result = 0; + Status = SafeIntnToInt16 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5bab, Result); Operand = (-23467); - Status = SafeIntnToInt16(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL((-23467), Result); + Status = SafeIntnToInt16 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL ((-23467), Result); // // Otherwise should result in an error status // Operand = (0x5bababab); - Status = SafeIntnToInt16(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnToInt16 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (-1537977259); - Status = SafeIntnToInt16(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnToInt16 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1186,7 +1186,7 @@ TestSafeIntnToInt16 ( UNIT_TEST_STATUS EFIAPI TestSafeIntnToUint16 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1197,21 +1197,21 @@ TestSafeIntnToUint16 ( // If Operand is between 0 and MAX_UINT16 inclusive, then it's a cast // Operand = 0xabab; - Result = 0; - Status = SafeIntnToUint16(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0xabab, Result); + Result = 0; + Status = SafeIntnToUint16 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0xabab, Result); // // Otherwise should result in an error status // Operand = (0x5bababab); - Status = SafeIntnToUint16(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnToUint16 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (-1537977259); - Status = SafeIntnToUint16(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnToUint16 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1219,7 +1219,7 @@ TestSafeIntnToUint16 ( UNIT_TEST_STATUS EFIAPI TestSafeIntnToUintn ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1230,17 +1230,17 @@ TestSafeIntnToUintn ( // If Operand is non-negative, then it's a cast // Operand = 0x5bababab; - Result = 0; - Status = SafeIntnToUintn(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5bababab, Result); + Result = 0; + Status = SafeIntnToUintn (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5bababab, Result); // // Otherwise should result in an error status // Operand = (-1537977259); - Status = SafeIntnToUintn(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnToUintn (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1248,7 +1248,7 @@ TestSafeIntnToUintn ( UNIT_TEST_STATUS EFIAPI TestSafeIntnToUint64 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1259,17 +1259,17 @@ TestSafeIntnToUint64 ( // If Operand is non-negative, then it's a cast // Operand = 0x5bababab; - Result = 0; - Status = SafeIntnToUint64(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5bababab, Result); + Result = 0; + Status = SafeIntnToUint64 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5bababab, Result); // // Otherwise should result in an error status // Operand = (-1537977259); - Status = SafeIntnToUint64(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeIntnToUint64 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1277,7 +1277,7 @@ TestSafeIntnToUint64 ( UNIT_TEST_STATUS EFIAPI TestSafeUintnToInt8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1288,17 +1288,17 @@ TestSafeUintnToInt8 ( // If Operand is <= MAX_INT8, then it's a cast // Operand = 0x5b; - Result = 0; - Status = SafeUintnToInt8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b, Result); + Result = 0; + Status = SafeUintnToInt8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b, Result); // // Otherwise should result in an error status // Operand = (0xabab); - Status = SafeUintnToInt8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUintnToInt8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1306,7 +1306,7 @@ TestSafeUintnToInt8 ( UNIT_TEST_STATUS EFIAPI TestSafeUintnToChar8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1320,17 +1320,17 @@ TestSafeUintnToChar8 ( // If Operand is <= MAX_INT8, then it's a cast // Operand = 0x5b; - Result = 0; - Status = SafeUintnToChar8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b, Result); + Result = 0; + Status = SafeUintnToChar8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b, Result); // // Otherwise should result in an error status // Operand = (0xabab); - Status = SafeUintnToChar8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUintnToChar8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1338,7 +1338,7 @@ TestSafeUintnToChar8 ( UNIT_TEST_STATUS EFIAPI TestSafeUintnToUint8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1349,17 +1349,17 @@ TestSafeUintnToUint8 ( // If Operand is <= MAX_UINT8, then it's a cast // Operand = 0xab; - Result = 0; - Status = SafeUintnToUint8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0xab, Result); + Result = 0; + Status = SafeUintnToUint8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0xab, Result); // // Otherwise should result in an error status // Operand = (0xabab); - Status = SafeUintnToUint8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUintnToUint8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1367,7 +1367,7 @@ TestSafeUintnToUint8 ( UNIT_TEST_STATUS EFIAPI TestSafeUintnToInt16 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1378,17 +1378,17 @@ TestSafeUintnToInt16 ( // If Operand is <= MAX_INT16, then it's a cast // Operand = 0x5bab; - Result = 0; - Status = SafeUintnToInt16(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5bab, Result); + Result = 0; + Status = SafeUintnToInt16 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5bab, Result); // // Otherwise should result in an error status // Operand = (0xabab); - Status = SafeUintnToInt16(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUintnToInt16 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1396,7 +1396,7 @@ TestSafeUintnToInt16 ( UNIT_TEST_STATUS EFIAPI TestSafeUintnToUint16 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1407,17 +1407,17 @@ TestSafeUintnToUint16 ( // If Operand is <= MAX_UINT16, then it's a cast // Operand = 0xabab; - Result = 0; - Status = SafeUintnToUint16(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0xabab, Result); + Result = 0; + Status = SafeUintnToUint16 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0xabab, Result); // // Otherwise should result in an error status // Operand = (0xabababab); - Status = SafeUintnToUint16(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUintnToUint16 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1425,7 +1425,7 @@ TestSafeUintnToUint16 ( UNIT_TEST_STATUS EFIAPI TestSafeUintnToInt32 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1436,17 +1436,17 @@ TestSafeUintnToInt32 ( // If Operand is <= MAX_INT32, then it's a cast // Operand = 0x5bababab; - Result = 0; - Status = SafeUintnToInt32(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5bababab, Result); + Result = 0; + Status = SafeUintnToInt32 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5bababab, Result); // // Otherwise should result in an error status // Operand = (0xabababab); - Status = SafeUintnToInt32(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUintnToInt32 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1454,7 +1454,7 @@ TestSafeUintnToInt32 ( UNIT_TEST_STATUS EFIAPI TestSafeInt64ToInt8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1465,26 +1465,26 @@ TestSafeInt64ToInt8 ( // If Operand is between MIN_INT8 and MAX_INT8 inclusive, then it's a cast // Operand = 0x5b; - Result = 0; - Status = SafeInt64ToInt8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b, Result); + Result = 0; + Status = SafeInt64ToInt8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b, Result); Operand = (-37); - Status = SafeInt64ToInt8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL((-37), Result); + Status = SafeInt64ToInt8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL ((-37), Result); // // Otherwise should result in an error status // Operand = (0x5babababefefefef); - Status = SafeInt64ToInt8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt64ToInt8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (-6605562033422200815); - Status = SafeInt64ToInt8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt64ToInt8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1492,7 +1492,7 @@ TestSafeInt64ToInt8 ( UNIT_TEST_STATUS EFIAPI TestSafeInt64ToChar8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1508,37 +1508,37 @@ TestSafeInt64ToChar8 ( // If Operand is between MIN_INT8 and MAX_INT8 inclusive, then it's a cast // Operand = 0x5b; - Result = 0; - Status = SafeInt64ToChar8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b, Result); + Result = 0; + Status = SafeInt64ToChar8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b, Result); Operand = 0; - Result = 0; - Status = SafeInt64ToChar8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0, Result); + Result = 0; + Status = SafeInt64ToChar8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0, Result); Operand = MAX_INT8; - Result = 0; - Status = SafeInt64ToChar8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(MAX_INT8, Result); + Result = 0; + Status = SafeInt64ToChar8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (MAX_INT8, Result); // // Otherwise should result in an error status // Operand = (-37); - Status = SafeInt64ToChar8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt64ToChar8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (0x5babababefefefef); - Status = SafeInt64ToChar8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt64ToChar8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (-6605562033422200815); - Status = SafeInt64ToChar8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt64ToChar8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1546,7 +1546,7 @@ TestSafeInt64ToChar8 ( UNIT_TEST_STATUS EFIAPI TestSafeInt64ToUint8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1557,21 +1557,21 @@ TestSafeInt64ToUint8 ( // If Operand is between 0 and MAX_UINT8 inclusive, then it's a cast // Operand = 0xab; - Result = 0; - Status = SafeInt64ToUint8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0xab, Result); + Result = 0; + Status = SafeInt64ToUint8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0xab, Result); // // Otherwise should result in an error status // Operand = (0x5babababefefefef); - Status = SafeInt64ToUint8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt64ToUint8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (-6605562033422200815); - Status = SafeInt64ToUint8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt64ToUint8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1579,7 +1579,7 @@ TestSafeInt64ToUint8 ( UNIT_TEST_STATUS EFIAPI TestSafeInt64ToInt16 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1590,26 +1590,26 @@ TestSafeInt64ToInt16 ( // If Operand is between MIN_INT16 and MAX_INT16 inclusive, then it's a cast // Operand = 0x5bab; - Result = 0; - Status = SafeInt64ToInt16(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5bab, Result); + Result = 0; + Status = SafeInt64ToInt16 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5bab, Result); Operand = (-23467); - Status = SafeInt64ToInt16(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL((-23467), Result); + Status = SafeInt64ToInt16 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL ((-23467), Result); // // Otherwise should result in an error status // Operand = (0x5babababefefefef); - Status = SafeInt64ToInt16(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt64ToInt16 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (-6605562033422200815); - Status = SafeInt64ToInt16(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt64ToInt16 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1617,7 +1617,7 @@ TestSafeInt64ToInt16 ( UNIT_TEST_STATUS EFIAPI TestSafeInt64ToUint16 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1628,21 +1628,21 @@ TestSafeInt64ToUint16 ( // If Operand is between 0 and MAX_UINT16 inclusive, then it's a cast // Operand = 0xabab; - Result = 0; - Status = SafeInt64ToUint16(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0xabab, Result); + Result = 0; + Status = SafeInt64ToUint16 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0xabab, Result); // // Otherwise should result in an error status // Operand = (0x5babababefefefef); - Status = SafeInt64ToUint16(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt64ToUint16 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (-6605562033422200815); - Status = SafeInt64ToUint16(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt64ToUint16 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1650,7 +1650,7 @@ TestSafeInt64ToUint16 ( UNIT_TEST_STATUS EFIAPI TestSafeInt64ToInt32 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1661,26 +1661,26 @@ TestSafeInt64ToInt32 ( // If Operand is between MIN_INT32 and MAX_INT32 inclusive, then it's a cast // Operand = 0x5bababab; - Result = 0; - Status = SafeInt64ToInt32(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5bababab, Result); + Result = 0; + Status = SafeInt64ToInt32 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5bababab, Result); Operand = (-1537977259); - Status = SafeInt64ToInt32(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL((-1537977259), Result); + Status = SafeInt64ToInt32 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL ((-1537977259), Result); // // Otherwise should result in an error status // Operand = (0x5babababefefefef); - Status = SafeInt64ToInt32(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt64ToInt32 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (-6605562033422200815); - Status = SafeInt64ToInt32(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt64ToInt32 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1688,7 +1688,7 @@ TestSafeInt64ToInt32 ( UNIT_TEST_STATUS EFIAPI TestSafeInt64ToUint32 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1699,21 +1699,21 @@ TestSafeInt64ToUint32 ( // If Operand is between 0 and MAX_UINT32 inclusive, then it's a cast // Operand = 0xabababab; - Result = 0; - Status = SafeInt64ToUint32(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0xabababab, Result); + Result = 0; + Status = SafeInt64ToUint32 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0xabababab, Result); // // Otherwise should result in an error status // Operand = (0x5babababefefefef); - Status = SafeInt64ToUint32(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt64ToUint32 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Operand = (-6605562033422200815); - Status = SafeInt64ToUint32(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt64ToUint32 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1721,7 +1721,7 @@ TestSafeInt64ToUint32 ( UNIT_TEST_STATUS EFIAPI TestSafeInt64ToUint64 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1732,17 +1732,17 @@ TestSafeInt64ToUint64 ( // If Operand is non-negative, then it's a cast // Operand = 0x5babababefefefef; - Result = 0; - Status = SafeInt64ToUint64(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5babababefefefef, Result); + Result = 0; + Status = SafeInt64ToUint64 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5babababefefefef, Result); // // Otherwise should result in an error status // Operand = (-6605562033422200815); - Status = SafeInt64ToUint64(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt64ToUint64 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1750,7 +1750,7 @@ TestSafeInt64ToUint64 ( UNIT_TEST_STATUS EFIAPI TestSafeUint64ToInt8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1761,17 +1761,17 @@ TestSafeUint64ToInt8 ( // If Operand is <= MAX_INT8, then it's a cast // Operand = 0x5b; - Result = 0; - Status = SafeUint64ToInt8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b, Result); + Result = 0; + Status = SafeUint64ToInt8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b, Result); // // Otherwise should result in an error status // Operand = (0xababababefefefef); - Status = SafeUint64ToInt8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint64ToInt8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1779,7 +1779,7 @@ TestSafeUint64ToInt8 ( UNIT_TEST_STATUS EFIAPI TestSafeUint64ToChar8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1793,17 +1793,17 @@ TestSafeUint64ToChar8 ( // If Operand is <= MAX_INT8, then it's a cast // Operand = 0x5b; - Result = 0; - Status = SafeUint64ToChar8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5b, Result); + Result = 0; + Status = SafeUint64ToChar8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5b, Result); // // Otherwise should result in an error status // Operand = (0xababababefefefef); - Status = SafeUint64ToChar8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint64ToChar8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1811,7 +1811,7 @@ TestSafeUint64ToChar8 ( UNIT_TEST_STATUS EFIAPI TestSafeUint64ToUint8 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1822,17 +1822,17 @@ TestSafeUint64ToUint8 ( // If Operand is <= MAX_UINT8, then it's a cast // Operand = 0xab; - Result = 0; - Status = SafeUint64ToUint8(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0xab, Result); + Result = 0; + Status = SafeUint64ToUint8 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0xab, Result); // // Otherwise should result in an error status // Operand = (0xababababefefefef); - Status = SafeUint64ToUint8(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint64ToUint8 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1840,7 +1840,7 @@ TestSafeUint64ToUint8 ( UNIT_TEST_STATUS EFIAPI TestSafeUint64ToInt16 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1851,17 +1851,17 @@ TestSafeUint64ToInt16 ( // If Operand is <= MAX_INT16, then it's a cast // Operand = 0x5bab; - Result = 0; - Status = SafeUint64ToInt16(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5bab, Result); + Result = 0; + Status = SafeUint64ToInt16 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5bab, Result); // // Otherwise should result in an error status // Operand = (0xababababefefefef); - Status = SafeUint64ToInt16(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint64ToInt16 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1869,7 +1869,7 @@ TestSafeUint64ToInt16 ( UNIT_TEST_STATUS EFIAPI TestSafeUint64ToUint16 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1880,17 +1880,17 @@ TestSafeUint64ToUint16 ( // If Operand is <= MAX_UINT16, then it's a cast // Operand = 0xabab; - Result = 0; - Status = SafeUint64ToUint16(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0xabab, Result); + Result = 0; + Status = SafeUint64ToUint16 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0xabab, Result); // // Otherwise should result in an error status // Operand = (0xababababefefefef); - Status = SafeUint64ToUint16(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint64ToUint16 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1898,7 +1898,7 @@ TestSafeUint64ToUint16 ( UNIT_TEST_STATUS EFIAPI TestSafeUint64ToInt32 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1909,17 +1909,17 @@ TestSafeUint64ToInt32 ( // If Operand is <= MAX_INT32, then it's a cast // Operand = 0x5bababab; - Result = 0; - Status = SafeUint64ToInt32(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5bababab, Result); + Result = 0; + Status = SafeUint64ToInt32 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5bababab, Result); // // Otherwise should result in an error status // Operand = (0xababababefefefef); - Status = SafeUint64ToInt32(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint64ToInt32 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1927,7 +1927,7 @@ TestSafeUint64ToInt32 ( UNIT_TEST_STATUS EFIAPI TestSafeUint64ToUint32 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1938,17 +1938,17 @@ TestSafeUint64ToUint32 ( // If Operand is <= MAX_UINT32, then it's a cast // Operand = 0xabababab; - Result = 0; - Status = SafeUint64ToUint32(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0xabababab, Result); + Result = 0; + Status = SafeUint64ToUint32 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0xabababab, Result); // // Otherwise should result in an error status // Operand = (0xababababefefefef); - Status = SafeUint64ToUint32(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint64ToUint32 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1956,7 +1956,7 @@ TestSafeUint64ToUint32 ( UNIT_TEST_STATUS EFIAPI TestSafeUint64ToInt64 ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -1967,17 +1967,17 @@ TestSafeUint64ToInt64 ( // If Operand is <= MAX_INT64, then it's a cast // Operand = 0x5babababefefefef; - Result = 0; - Status = SafeUint64ToInt64(Operand, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x5babababefefefef, Result); + Result = 0; + Status = SafeUint64ToInt64 (Operand, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x5babababefefefef, Result); // // Otherwise should result in an error status // Operand = (0xababababefefefef); - Status = SafeUint64ToInt64(Operand, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint64ToInt64 (Operand, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -1988,7 +1988,7 @@ TestSafeUint64ToInt64 ( UNIT_TEST_STATUS EFIAPI TestSafeUint8Add ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -2002,17 +2002,17 @@ TestSafeUint8Add ( Augend = 0x3a; Addend = 0x3a; Result = 0; - Status = SafeUint8Add(Augend, Addend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x74, Result); + Status = SafeUint8Add (Augend, Addend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x74, Result); // // Otherwise should result in an error status // Augend = 0xab; Addend = 0xbc; - Status = SafeUint8Add(Augend, Addend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint8Add (Augend, Addend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -2020,28 +2020,28 @@ TestSafeUint8Add ( UNIT_TEST_STATUS EFIAPI TestSafeUint16Add ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; - UINT16 Augend = 0x3a3a; - UINT16 Addend = 0x3a3a; - UINT16 Result = 0; + UINT16 Augend = 0x3a3a; + UINT16 Addend = 0x3a3a; + UINT16 Result = 0; // // If the result of addition doesn't overflow MAX_UINT16, then it's addition // - Status = SafeUint16Add(Augend, Addend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x7474, Result); + Status = SafeUint16Add (Augend, Addend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x7474, Result); // // Otherwise should result in an error status // Augend = 0xabab; Addend = 0xbcbc; - Status = SafeUint16Add(Augend, Addend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint16Add (Augend, Addend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -2049,7 +2049,7 @@ TestSafeUint16Add ( UNIT_TEST_STATUS EFIAPI TestSafeUint32Add ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -2063,17 +2063,17 @@ TestSafeUint32Add ( Augend = 0x3a3a3a3a; Addend = 0x3a3a3a3a; Result = 0; - Status = SafeUint32Add(Augend, Addend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x74747474, Result); + Status = SafeUint32Add (Augend, Addend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x74747474, Result); // // Otherwise should result in an error status // Augend = 0xabababab; Addend = 0xbcbcbcbc; - Status = SafeUint32Add(Augend, Addend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint32Add (Augend, Addend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -2081,7 +2081,7 @@ TestSafeUint32Add ( UNIT_TEST_STATUS EFIAPI TestSafeUint64Add ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -2095,17 +2095,17 @@ TestSafeUint64Add ( Augend = 0x3a3a3a3a12121212; Addend = 0x3a3a3a3a12121212; Result = 0; - Status = SafeUint64Add(Augend, Addend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x7474747424242424, Result); + Status = SafeUint64Add (Augend, Addend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x7474747424242424, Result); // // Otherwise should result in an error status // Augend = 0xababababefefefef; Addend = 0xbcbcbcbcdededede; - Status = SafeUint64Add(Augend, Addend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint64Add (Augend, Addend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -2113,7 +2113,7 @@ TestSafeUint64Add ( UNIT_TEST_STATUS EFIAPI TestSafeInt8Add ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -2128,37 +2128,36 @@ TestSafeInt8Add ( Augend = 0x3a; Addend = 0x3a; Result = 0; - Status = SafeInt8Add(Augend, Addend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x74, Result); + Status = SafeInt8Add (Augend, Addend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x74, Result); Augend = (-58); Addend = (-58); - Status = SafeInt8Add(Augend, Addend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL((-116), Result); + Status = SafeInt8Add (Augend, Addend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL ((-116), Result); // // Otherwise should result in an error status // Augend = 0x5a; Addend = 0x5a; - Status = SafeInt8Add(Augend, Addend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt8Add (Augend, Addend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Augend = (-90); Addend = (-90); - Status = SafeInt8Add(Augend, Addend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt8Add (Augend, Addend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; - } UNIT_TEST_STATUS EFIAPI TestSafeInt16Add ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -2173,28 +2172,28 @@ TestSafeInt16Add ( Augend = 0x3a3a; Addend = 0x3a3a; Result = 0; - Status = SafeInt16Add(Augend, Addend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x7474, Result); + Status = SafeInt16Add (Augend, Addend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x7474, Result); Augend = (-14906); Addend = (-14906); - Status = SafeInt16Add(Augend, Addend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL((-29812), Result); + Status = SafeInt16Add (Augend, Addend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL ((-29812), Result); // // Otherwise should result in an error status // Augend = 0x5a5a; Addend = 0x5a5a; - Status = SafeInt16Add(Augend, Addend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt16Add (Augend, Addend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Augend = (-23130); Addend = (-23130); - Status = SafeInt16Add(Augend, Addend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt16Add (Augend, Addend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -2202,7 +2201,7 @@ TestSafeInt16Add ( UNIT_TEST_STATUS EFIAPI TestSafeInt32Add ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -2217,28 +2216,28 @@ TestSafeInt32Add ( Augend = 0x3a3a3a3a; Addend = 0x3a3a3a3a; Result = 0; - Status = SafeInt32Add(Augend, Addend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x74747474, Result); + Status = SafeInt32Add (Augend, Addend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x74747474, Result); Augend = (-976894522); Addend = (-976894522); - Status = SafeInt32Add(Augend, Addend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL((-1953789044), Result); + Status = SafeInt32Add (Augend, Addend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL ((-1953789044), Result); // // Otherwise should result in an error status // Augend = 0x5a5a5a5a; Addend = 0x5a5a5a5a; - Status = SafeInt32Add(Augend, Addend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt32Add (Augend, Addend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Augend = (-1515870810); Addend = (-1515870810); - Status = SafeInt32Add(Augend, Addend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt32Add (Augend, Addend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -2246,7 +2245,7 @@ TestSafeInt32Add ( UNIT_TEST_STATUS EFIAPI TestSafeInt64Add ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -2261,28 +2260,28 @@ TestSafeInt64Add ( Augend = 0x3a3a3a3a3a3a3a3a; Addend = 0x3a3a3a3a3a3a3a3a; Result = 0; - Status = SafeInt64Add(Augend, Addend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x7474747474747474, Result); + Status = SafeInt64Add (Augend, Addend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x7474747474747474, Result); Augend = (-4195730024608447034); Addend = (-4195730024608447034); - Status = SafeInt64Add(Augend, Addend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL((-8391460049216894068), Result); + Status = SafeInt64Add (Augend, Addend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL ((-8391460049216894068), Result); // // Otherwise should result in an error status // Augend = 0x5a5a5a5a5a5a5a5a; Addend = 0x5a5a5a5a5a5a5a5a; - Status = SafeInt64Add(Augend, Addend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt64Add (Augend, Addend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); Augend = (-6510615555426900570); Addend = (-6510615555426900570); - Status = SafeInt64Add(Augend, Addend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt64Add (Augend, Addend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -2293,7 +2292,7 @@ TestSafeInt64Add ( UNIT_TEST_STATUS EFIAPI TestSafeUint8Sub ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -2304,20 +2303,20 @@ TestSafeUint8Sub ( // // If Minuend >= Subtrahend, then it's subtraction // - Minuend = 0x5a; + Minuend = 0x5a; Subtrahend = 0x3b; - Result = 0; - Status = SafeUint8Sub(Minuend, Subtrahend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x1f, Result); + Result = 0; + Status = SafeUint8Sub (Minuend, Subtrahend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x1f, Result); // // Otherwise should result in an error status // - Minuend = 0x5a; + Minuend = 0x5a; Subtrahend = 0x6d; - Status = SafeUint8Sub(Minuend, Subtrahend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint8Sub (Minuend, Subtrahend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -2325,7 +2324,7 @@ TestSafeUint8Sub ( UNIT_TEST_STATUS EFIAPI TestSafeUint16Sub ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -2336,20 +2335,20 @@ TestSafeUint16Sub ( // // If Minuend >= Subtrahend, then it's subtraction // - Minuend = 0x5a5a; + Minuend = 0x5a5a; Subtrahend = 0x3b3b; - Result = 0; - Status = SafeUint16Sub(Minuend, Subtrahend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x1f1f, Result); + Result = 0; + Status = SafeUint16Sub (Minuend, Subtrahend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x1f1f, Result); // // Otherwise should result in an error status // - Minuend = 0x5a5a; + Minuend = 0x5a5a; Subtrahend = 0x6d6d; - Status = SafeUint16Sub(Minuend, Subtrahend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint16Sub (Minuend, Subtrahend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -2357,7 +2356,7 @@ TestSafeUint16Sub ( UNIT_TEST_STATUS EFIAPI TestSafeUint32Sub ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -2368,20 +2367,20 @@ TestSafeUint32Sub ( // // If Minuend >= Subtrahend, then it's subtraction // - Minuend = 0x5a5a5a5a; + Minuend = 0x5a5a5a5a; Subtrahend = 0x3b3b3b3b; - Result = 0; - Status = SafeUint32Sub(Minuend, Subtrahend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x1f1f1f1f, Result); + Result = 0; + Status = SafeUint32Sub (Minuend, Subtrahend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x1f1f1f1f, Result); // // Otherwise should result in an error status // - Minuend = 0x5a5a5a5a; + Minuend = 0x5a5a5a5a; Subtrahend = 0x6d6d6d6d; - Status = SafeUint32Sub(Minuend, Subtrahend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint32Sub (Minuend, Subtrahend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -2389,7 +2388,7 @@ TestSafeUint32Sub ( UNIT_TEST_STATUS EFIAPI TestSafeUint64Sub ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -2400,20 +2399,20 @@ TestSafeUint64Sub ( // // If Minuend >= Subtrahend, then it's subtraction // - Minuend = 0x5a5a5a5a5a5a5a5a; + Minuend = 0x5a5a5a5a5a5a5a5a; Subtrahend = 0x3b3b3b3b3b3b3b3b; - Result = 0; - Status = SafeUint64Sub(Minuend, Subtrahend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x1f1f1f1f1f1f1f1f, Result); + Result = 0; + Status = SafeUint64Sub (Minuend, Subtrahend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x1f1f1f1f1f1f1f1f, Result); // // Otherwise should result in an error status // - Minuend = 0x5a5a5a5a5a5a5a5a; + Minuend = 0x5a5a5a5a5a5a5a5a; Subtrahend = 0x6d6d6d6d6d6d6d6d; - Status = SafeUint64Sub(Minuend, Subtrahend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeUint64Sub (Minuend, Subtrahend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -2421,7 +2420,7 @@ TestSafeUint64Sub ( UNIT_TEST_STATUS EFIAPI TestSafeInt8Sub ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -2433,31 +2432,31 @@ TestSafeInt8Sub ( // If the result of subtractions doesn't overflow MAX_INT8 or // underflow MIN_INT8, then it's subtraction // - Minuend = 0x5a; + Minuend = 0x5a; Subtrahend = 0x3a; - Result = 0; - Status = SafeInt8Sub(Minuend, Subtrahend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x20, Result); + Result = 0; + Status = SafeInt8Sub (Minuend, Subtrahend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x20, Result); - Minuend = 58; + Minuend = 58; Subtrahend = 78; - Status = SafeInt8Sub(Minuend, Subtrahend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL((-20), Result); + Status = SafeInt8Sub (Minuend, Subtrahend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL ((-20), Result); // // Otherwise should result in an error status // - Minuend = (-80); + Minuend = (-80); Subtrahend = 80; - Status = SafeInt8Sub(Minuend, Subtrahend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt8Sub (Minuend, Subtrahend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); - Minuend = (80); + Minuend = (80); Subtrahend = (-80); - Status = SafeInt8Sub(Minuend, Subtrahend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt8Sub (Minuend, Subtrahend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -2465,7 +2464,7 @@ TestSafeInt8Sub ( UNIT_TEST_STATUS EFIAPI TestSafeInt16Sub ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -2477,31 +2476,31 @@ TestSafeInt16Sub ( // If the result of subtractions doesn't overflow MAX_INT16 or // underflow MIN_INT16, then it's subtraction // - Minuend = 0x5a5a; + Minuend = 0x5a5a; Subtrahend = 0x3a3a; - Result = 0; - Status = SafeInt16Sub(Minuend, Subtrahend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x2020, Result); + Result = 0; + Status = SafeInt16Sub (Minuend, Subtrahend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x2020, Result); - Minuend = 0x3a3a; + Minuend = 0x3a3a; Subtrahend = 0x5a5a; - Status = SafeInt16Sub(Minuend, Subtrahend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL((-8224), Result); + Status = SafeInt16Sub (Minuend, Subtrahend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL ((-8224), Result); // // Otherwise should result in an error status // - Minuend = (-31354); + Minuend = (-31354); Subtrahend = 31354; - Status = SafeInt16Sub(Minuend, Subtrahend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt16Sub (Minuend, Subtrahend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); - Minuend = (31354); + Minuend = (31354); Subtrahend = (-31354); - Status = SafeInt16Sub(Minuend, Subtrahend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt16Sub (Minuend, Subtrahend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -2509,7 +2508,7 @@ TestSafeInt16Sub ( UNIT_TEST_STATUS EFIAPI TestSafeInt32Sub ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -2521,31 +2520,31 @@ TestSafeInt32Sub ( // If the result of subtractions doesn't overflow MAX_INT32 or // underflow MIN_INT32, then it's subtraction // - Minuend = 0x5a5a5a5a; + Minuend = 0x5a5a5a5a; Subtrahend = 0x3a3a3a3a; - Result = 0; - Status = SafeInt32Sub(Minuend, Subtrahend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x20202020, Result); + Result = 0; + Status = SafeInt32Sub (Minuend, Subtrahend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x20202020, Result); - Minuend = 0x3a3a3a3a; + Minuend = 0x3a3a3a3a; Subtrahend = 0x5a5a5a5a; - Status = SafeInt32Sub(Minuend, Subtrahend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL((-538976288), Result); + Status = SafeInt32Sub (Minuend, Subtrahend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL ((-538976288), Result); // // Otherwise should result in an error status // - Minuend = (-2054847098); + Minuend = (-2054847098); Subtrahend = 2054847098; - Status = SafeInt32Sub(Minuend, Subtrahend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt32Sub (Minuend, Subtrahend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); - Minuend = (2054847098); + Minuend = (2054847098); Subtrahend = (-2054847098); - Status = SafeInt32Sub(Minuend, Subtrahend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt32Sub (Minuend, Subtrahend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -2553,7 +2552,7 @@ TestSafeInt32Sub ( UNIT_TEST_STATUS EFIAPI TestSafeInt64Sub ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -2565,31 +2564,31 @@ TestSafeInt64Sub ( // If the result of subtractions doesn't overflow MAX_INT64 or // underflow MIN_INT64, then it's subtraction // - Minuend = 0x5a5a5a5a5a5a5a5a; + Minuend = 0x5a5a5a5a5a5a5a5a; Subtrahend = 0x3a3a3a3a3a3a3a3a; - Result = 0; - Status = SafeInt64Sub(Minuend, Subtrahend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x2020202020202020, Result); + Result = 0; + Status = SafeInt64Sub (Minuend, Subtrahend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x2020202020202020, Result); - Minuend = 0x3a3a3a3a3a3a3a3a; + Minuend = 0x3a3a3a3a3a3a3a3a; Subtrahend = 0x5a5a5a5a5a5a5a5a; - Status = SafeInt64Sub(Minuend, Subtrahend, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL((-2314885530818453536), Result); + Status = SafeInt64Sub (Minuend, Subtrahend, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL ((-2314885530818453536), Result); // // Otherwise should result in an error status // - Minuend = (-8825501086245354106); + Minuend = (-8825501086245354106); Subtrahend = 8825501086245354106; - Status = SafeInt64Sub(Minuend, Subtrahend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt64Sub (Minuend, Subtrahend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); - Minuend = (8825501086245354106); + Minuend = (8825501086245354106); Subtrahend = (-8825501086245354106); - Status = SafeInt64Sub(Minuend, Subtrahend, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Status = SafeInt64Sub (Minuend, Subtrahend, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -2600,7 +2599,7 @@ TestSafeInt64Sub ( UNIT_TEST_STATUS EFIAPI TestSafeUint8Mult ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -2612,19 +2611,19 @@ TestSafeUint8Mult ( // If the result of multiplication doesn't overflow MAX_UINT8, it will succeed // Multiplicand = 0x12; - Multiplier = 0xa; - Result = 0; - Status = SafeUint8Mult(Multiplicand, Multiplier, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0xb4, Result); + Multiplier = 0xa; + Result = 0; + Status = SafeUint8Mult (Multiplicand, Multiplier, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0xb4, Result); // // Otherwise should result in an error status // Multiplicand = 0x12; - Multiplier = 0x23; - Status = SafeUint8Mult(Multiplicand, Multiplier, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Multiplier = 0x23; + Status = SafeUint8Mult (Multiplicand, Multiplier, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -2632,7 +2631,7 @@ TestSafeUint8Mult ( UNIT_TEST_STATUS EFIAPI TestSafeUint16Mult ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -2644,19 +2643,19 @@ TestSafeUint16Mult ( // If the result of multiplication doesn't overflow MAX_UINT16, it will succeed // Multiplicand = 0x212; - Multiplier = 0x7a; - Result = 0; - Status = SafeUint16Mult(Multiplicand, Multiplier, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0xfc94, Result); + Multiplier = 0x7a; + Result = 0; + Status = SafeUint16Mult (Multiplicand, Multiplier, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0xfc94, Result); // // Otherwise should result in an error status // Multiplicand = 0x1234; - Multiplier = 0x213; - Status = SafeUint16Mult(Multiplicand, Multiplier, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Multiplier = 0x213; + Status = SafeUint16Mult (Multiplicand, Multiplier, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -2664,7 +2663,7 @@ TestSafeUint16Mult ( UNIT_TEST_STATUS EFIAPI TestSafeUint32Mult ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -2676,19 +2675,19 @@ TestSafeUint32Mult ( // If the result of multiplication doesn't overflow MAX_UINT32, it will succeed // Multiplicand = 0xa122a; - Multiplier = 0xd23; - Result = 0; - Status = SafeUint32Mult(Multiplicand, Multiplier, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x844c9dbe, Result); + Multiplier = 0xd23; + Result = 0; + Status = SafeUint32Mult (Multiplicand, Multiplier, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x844c9dbe, Result); // // Otherwise should result in an error status // Multiplicand = 0xa122a; - Multiplier = 0xed23; - Status = SafeUint32Mult(Multiplicand, Multiplier, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Multiplier = 0xed23; + Status = SafeUint32Mult (Multiplicand, Multiplier, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -2696,7 +2695,7 @@ TestSafeUint32Mult ( UNIT_TEST_STATUS EFIAPI TestSafeUint64Mult ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -2708,19 +2707,19 @@ TestSafeUint64Mult ( // If the result of multiplication doesn't overflow MAX_UINT64, it will succeed // Multiplicand = 0x123456789a; - Multiplier = 0x1234567; - Result = 0; - Status = SafeUint64Mult(Multiplicand, Multiplier, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x14b66db9745a07f6, Result); + Multiplier = 0x1234567; + Result = 0; + Status = SafeUint64Mult (Multiplicand, Multiplier, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x14b66db9745a07f6, Result); // // Otherwise should result in an error status // Multiplicand = 0x123456789a; - Multiplier = 0x12345678; - Status = SafeUint64Mult(Multiplicand, Multiplier, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Multiplier = 0x12345678; + Status = SafeUint64Mult (Multiplicand, Multiplier, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -2728,7 +2727,7 @@ TestSafeUint64Mult ( UNIT_TEST_STATUS EFIAPI TestSafeInt8Mult ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -2741,19 +2740,19 @@ TestSafeInt8Mult ( // underflow MIN_UINT8, it will succeed // Multiplicand = 0x12; - Multiplier = 0x7; - Result = 0; - Status = SafeInt8Mult(Multiplicand, Multiplier, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x7e, Result); + Multiplier = 0x7; + Result = 0; + Status = SafeInt8Mult (Multiplicand, Multiplier, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x7e, Result); // // Otherwise should result in an error status // Multiplicand = 0x12; - Multiplier = 0xa; - Status = SafeInt8Mult(Multiplicand, Multiplier, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Multiplier = 0xa; + Status = SafeInt8Mult (Multiplicand, Multiplier, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -2761,7 +2760,7 @@ TestSafeInt8Mult ( UNIT_TEST_STATUS EFIAPI TestSafeInt16Mult ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -2774,19 +2773,19 @@ TestSafeInt16Mult ( // underflow MIN_UINT16, it will succeed // Multiplicand = 0x123; - Multiplier = 0x67; - Result = 0; - Status = SafeInt16Mult(Multiplicand, Multiplier, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x7515, Result); + Multiplier = 0x67; + Result = 0; + Status = SafeInt16Mult (Multiplicand, Multiplier, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x7515, Result); // // Otherwise should result in an error status // Multiplicand = 0x123; - Multiplier = 0xab; - Status = SafeInt16Mult(Multiplicand, Multiplier, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Multiplier = 0xab; + Status = SafeInt16Mult (Multiplicand, Multiplier, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -2794,7 +2793,7 @@ TestSafeInt16Mult ( UNIT_TEST_STATUS EFIAPI TestSafeInt32Mult ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -2807,19 +2806,19 @@ TestSafeInt32Mult ( // underflow MIN_UINT32, it will succeed // Multiplicand = 0x123456; - Multiplier = 0x678; - Result = 0; - Status = SafeInt32Mult(Multiplicand, Multiplier, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x75c28c50, Result); + Multiplier = 0x678; + Result = 0; + Status = SafeInt32Mult (Multiplicand, Multiplier, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x75c28c50, Result); // // Otherwise should result in an error status // Multiplicand = 0x123456; - Multiplier = 0xabc; - Status = SafeInt32Mult(Multiplicand, Multiplier, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Multiplier = 0xabc; + Status = SafeInt32Mult (Multiplicand, Multiplier, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -2827,7 +2826,7 @@ TestSafeInt32Mult ( UNIT_TEST_STATUS EFIAPI TestSafeInt64Mult ( - IN UNIT_TEST_CONTEXT Context + IN UNIT_TEST_CONTEXT Context ) { EFI_STATUS Status; @@ -2840,19 +2839,19 @@ TestSafeInt64Mult ( // underflow MIN_UINT64, it will succeed // Multiplicand = 0x123456789; - Multiplier = 0x6789abcd; - Result = 0; - Status = SafeInt64Mult(Multiplicand, Multiplier, &Result); - UT_ASSERT_NOT_EFI_ERROR(Status); - UT_ASSERT_EQUAL(0x75cd9045220d6bb5, Result); + Multiplier = 0x6789abcd; + Result = 0; + Status = SafeInt64Mult (Multiplicand, Multiplier, &Result); + UT_ASSERT_NOT_EFI_ERROR (Status); + UT_ASSERT_EQUAL (0x75cd9045220d6bb5, Result); // // Otherwise should result in an error status // Multiplicand = 0x123456789; - Multiplier = 0xa789abcd; - Status = SafeInt64Mult(Multiplicand, Multiplier, &Result); - UT_ASSERT_EQUAL(RETURN_BUFFER_TOO_SMALL, Status); + Multiplier = 0xa789abcd; + Status = SafeInt64Mult (Multiplicand, Multiplier, &Result); + UT_ASSERT_EQUAL (RETURN_BUFFER_TOO_SMALL, Status); return UNIT_TEST_PASSED; } @@ -2874,19 +2873,19 @@ UefiTestMain ( UNIT_TEST_SUITE_HANDLE AdditionSubtractionTestSuite; UNIT_TEST_SUITE_HANDLE MultiplicationTestSuite; - Framework = NULL; - ConversionTestSuite = NULL; + Framework = NULL; + ConversionTestSuite = NULL; AdditionSubtractionTestSuite = NULL; - MultiplicationTestSuite = NULL; + MultiplicationTestSuite = NULL; - DEBUG((DEBUG_INFO, "%a v%a\n", UNIT_TEST_NAME, UNIT_TEST_VERSION)); + DEBUG ((DEBUG_INFO, "%a v%a\n", UNIT_TEST_NAME, UNIT_TEST_VERSION)); // // Start setting up the test framework for running the tests. // Status = InitUnitTestFramework (&Framework, UNIT_TEST_NAME, gEfiCallerBaseName, UNIT_TEST_VERSION); - if (EFI_ERROR(Status)) { - DEBUG((DEBUG_ERROR, "Failed in InitUnitTestFramework. Status = %r\n", Status)); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "Failed in InitUnitTestFramework. Status = %r\n", Status)); goto EXIT; } @@ -2894,141 +2893,144 @@ UefiTestMain ( // Test the conversion functions // Status = CreateUnitTestSuite (&ConversionTestSuite, Framework, "Int Safe Conversions Test Suite", "Common.SafeInt.Convert", NULL, NULL); - if (EFI_ERROR(Status)) { - DEBUG((DEBUG_ERROR, "Failed in CreateUnitTestSuite for Conversions Test Suite\n")); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "Failed in CreateUnitTestSuite for Conversions Test Suite\n")); Status = EFI_OUT_OF_RESOURCES; goto EXIT; } - AddTestCase(ConversionTestSuite, "Test SafeInt8ToUint8", "TestSafeInt8ToUint8", TestSafeInt8ToUint8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt8ToUint16", "TestSafeInt8ToUint16", TestSafeInt8ToUint16, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt8ToUint32", "TestSafeInt8ToUint32", TestSafeInt8ToUint32, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt8ToUintn", "TestSafeInt8ToUintn", TestSafeInt8ToUintn, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt8ToUint64", "TestSafeInt8ToUint64", TestSafeInt8ToUint64, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUint8ToInt8", "TestSafeUint8ToInt8", TestSafeUint8ToInt8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUint8ToChar8", "TestSafeUint8ToChar8", TestSafeUint8ToChar8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt16ToInt8", "TestSafeInt16ToInt8", TestSafeInt16ToInt8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt16ToChar8", "TestSafeInt16ToChar8", TestSafeInt16ToChar8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt16ToUint8", "TestSafeInt16ToUint8", TestSafeInt16ToUint8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt16ToUint16", "TestSafeInt16ToUint16", TestSafeInt16ToUint16, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt16ToUint32", "TestSafeInt16ToUint32", TestSafeInt16ToUint32, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt16ToUintn", "TestSafeInt16ToUintn", TestSafeInt16ToUintn, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt16ToUint64", "TestSafeInt16ToUint64", TestSafeInt16ToUint64, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUint16ToInt8", "TestSafeUint16ToInt8", TestSafeUint16ToInt8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUint16ToChar8", "TestSafeUint16ToChar8", TestSafeUint16ToChar8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUint16ToUint8", "TestSafeUint16ToUint8", TestSafeUint16ToUint8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUint16ToInt16", "TestSafeUint16ToInt16", TestSafeUint16ToInt16, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt32ToInt8", "TestSafeInt32ToInt8", TestSafeInt32ToInt8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt32ToChar8", "TestSafeInt32ToChar8", TestSafeInt32ToChar8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt32ToUint8", "TestSafeInt32ToUint8", TestSafeInt32ToUint8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt32ToInt16", "TestSafeInt32ToInt16", TestSafeInt32ToInt16, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt32ToUint16", "TestSafeInt32ToUint16", TestSafeInt32ToUint16, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt32ToUint32", "TestSafeInt32ToUint32", TestSafeInt32ToUint32, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt32ToUintn", "TestSafeInt32ToUintn", TestSafeInt32ToUintn, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt32ToUint64", "TestSafeInt32ToUint64", TestSafeInt32ToUint64, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUint32ToInt8", "TestSafeUint32ToInt8", TestSafeUint32ToInt8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUint32ToChar8", "TestSafeUint32ToChar8", TestSafeUint32ToChar8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUint32ToUint8", "TestSafeUint32ToUint8", TestSafeUint32ToUint8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUint32ToInt16", "TestSafeUint32ToInt16", TestSafeUint32ToInt16, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUint32ToUint16", "TestSafeUint32ToUint16", TestSafeUint32ToUint16, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUint32ToInt32", "TestSafeUint32ToInt32", TestSafeUint32ToInt32, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUint32ToIntn", "TestSafeUint32ToIntn", TestSafeUint32ToIntn, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeIntnToInt8", "TestSafeIntnToInt8", TestSafeIntnToInt8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeIntnToChar8", "TestSafeIntnToChar8", TestSafeIntnToChar8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeIntnToUint8", "TestSafeIntnToUint8", TestSafeIntnToUint8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeIntnToInt16", "TestSafeIntnToInt16", TestSafeIntnToInt16, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeIntnToUint16", "TestSafeIntnToUint16", TestSafeIntnToUint16, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeIntnToInt32", "TestSafeIntnToInt32", TestSafeIntnToInt32, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeIntnToUint32", "TestSafeIntnToUint32", TestSafeIntnToUint32, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeIntnToUintn", "TestSafeIntnToUintn", TestSafeIntnToUintn, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeIntnToUint64", "TestSafeIntnToUint64", TestSafeIntnToUint64, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUintnToInt8", "TestSafeUintnToInt8", TestSafeUintnToInt8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUintnToChar8", "TestSafeUintnToChar8", TestSafeUintnToChar8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUintnToUint8", "TestSafeUintnToUint8", TestSafeUintnToUint8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUintnToInt16", "TestSafeUintnToInt16", TestSafeUintnToInt16, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUintnToUint16", "TestSafeUintnToUint16", TestSafeUintnToUint16, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUintnToInt32", "TestSafeUintnToInt32", TestSafeUintnToInt32, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUintnToUint32", "TestSafeUintnToUint32", TestSafeUintnToUint32, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUintnToIntn", "TestSafeUintnToIntn", TestSafeUintnToIntn, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUintnToInt64", "TestSafeUintnToInt64", TestSafeUintnToInt64, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt64ToInt8", "TestSafeInt64ToInt8", TestSafeInt64ToInt8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt64ToChar8", "TestSafeInt64ToChar8", TestSafeInt64ToChar8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt64ToUint8", "TestSafeInt64ToUint8", TestSafeInt64ToUint8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt64ToInt16", "TestSafeInt64ToInt16", TestSafeInt64ToInt16, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt64ToUint16", "TestSafeInt64ToUint16", TestSafeInt64ToUint16, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt64ToInt32", "TestSafeInt64ToInt32", TestSafeInt64ToInt32, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt64ToUint32", "TestSafeInt64ToUint32", TestSafeInt64ToUint32, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt64ToIntn", "TestSafeInt64ToIntn", TestSafeInt64ToIntn, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt64ToUintn", "TestSafeInt64ToUintn", TestSafeInt64ToUintn, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeInt64ToUint64", "TestSafeInt64ToUint64", TestSafeInt64ToUint64, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUint64ToInt8", "TestSafeUint64ToInt8", TestSafeUint64ToInt8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUint64ToChar8", "TestSafeUint64ToChar8", TestSafeUint64ToChar8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUint64ToUint8", "TestSafeUint64ToUint8", TestSafeUint64ToUint8, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUint64ToInt16", "TestSafeUint64ToInt16", TestSafeUint64ToInt16, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUint64ToUint16", "TestSafeUint64ToUint16", TestSafeUint64ToUint16, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUint64ToInt32", "TestSafeUint64ToInt32", TestSafeUint64ToInt32, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUint64ToUint32", "TestSafeUint64ToUint32", TestSafeUint64ToUint32, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUint64ToIntn", "TestSafeUint64ToIntn", TestSafeUint64ToIntn, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUint64ToUintn", "TestSafeUint64ToUintn", TestSafeUint64ToUintn, NULL, NULL, NULL); - AddTestCase(ConversionTestSuite, "Test SafeUint64ToInt64", "TestSafeUint64ToInt64", TestSafeUint64ToInt64, NULL, NULL, NULL); + + AddTestCase (ConversionTestSuite, "Test SafeInt8ToUint8", "TestSafeInt8ToUint8", TestSafeInt8ToUint8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt8ToUint16", "TestSafeInt8ToUint16", TestSafeInt8ToUint16, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt8ToUint32", "TestSafeInt8ToUint32", TestSafeInt8ToUint32, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt8ToUintn", "TestSafeInt8ToUintn", TestSafeInt8ToUintn, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt8ToUint64", "TestSafeInt8ToUint64", TestSafeInt8ToUint64, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUint8ToInt8", "TestSafeUint8ToInt8", TestSafeUint8ToInt8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUint8ToChar8", "TestSafeUint8ToChar8", TestSafeUint8ToChar8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt16ToInt8", "TestSafeInt16ToInt8", TestSafeInt16ToInt8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt16ToChar8", "TestSafeInt16ToChar8", TestSafeInt16ToChar8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt16ToUint8", "TestSafeInt16ToUint8", TestSafeInt16ToUint8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt16ToUint16", "TestSafeInt16ToUint16", TestSafeInt16ToUint16, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt16ToUint32", "TestSafeInt16ToUint32", TestSafeInt16ToUint32, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt16ToUintn", "TestSafeInt16ToUintn", TestSafeInt16ToUintn, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt16ToUint64", "TestSafeInt16ToUint64", TestSafeInt16ToUint64, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUint16ToInt8", "TestSafeUint16ToInt8", TestSafeUint16ToInt8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUint16ToChar8", "TestSafeUint16ToChar8", TestSafeUint16ToChar8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUint16ToUint8", "TestSafeUint16ToUint8", TestSafeUint16ToUint8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUint16ToInt16", "TestSafeUint16ToInt16", TestSafeUint16ToInt16, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt32ToInt8", "TestSafeInt32ToInt8", TestSafeInt32ToInt8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt32ToChar8", "TestSafeInt32ToChar8", TestSafeInt32ToChar8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt32ToUint8", "TestSafeInt32ToUint8", TestSafeInt32ToUint8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt32ToInt16", "TestSafeInt32ToInt16", TestSafeInt32ToInt16, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt32ToUint16", "TestSafeInt32ToUint16", TestSafeInt32ToUint16, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt32ToUint32", "TestSafeInt32ToUint32", TestSafeInt32ToUint32, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt32ToUintn", "TestSafeInt32ToUintn", TestSafeInt32ToUintn, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt32ToUint64", "TestSafeInt32ToUint64", TestSafeInt32ToUint64, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUint32ToInt8", "TestSafeUint32ToInt8", TestSafeUint32ToInt8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUint32ToChar8", "TestSafeUint32ToChar8", TestSafeUint32ToChar8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUint32ToUint8", "TestSafeUint32ToUint8", TestSafeUint32ToUint8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUint32ToInt16", "TestSafeUint32ToInt16", TestSafeUint32ToInt16, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUint32ToUint16", "TestSafeUint32ToUint16", TestSafeUint32ToUint16, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUint32ToInt32", "TestSafeUint32ToInt32", TestSafeUint32ToInt32, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUint32ToIntn", "TestSafeUint32ToIntn", TestSafeUint32ToIntn, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeIntnToInt8", "TestSafeIntnToInt8", TestSafeIntnToInt8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeIntnToChar8", "TestSafeIntnToChar8", TestSafeIntnToChar8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeIntnToUint8", "TestSafeIntnToUint8", TestSafeIntnToUint8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeIntnToInt16", "TestSafeIntnToInt16", TestSafeIntnToInt16, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeIntnToUint16", "TestSafeIntnToUint16", TestSafeIntnToUint16, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeIntnToInt32", "TestSafeIntnToInt32", TestSafeIntnToInt32, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeIntnToUint32", "TestSafeIntnToUint32", TestSafeIntnToUint32, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeIntnToUintn", "TestSafeIntnToUintn", TestSafeIntnToUintn, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeIntnToUint64", "TestSafeIntnToUint64", TestSafeIntnToUint64, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUintnToInt8", "TestSafeUintnToInt8", TestSafeUintnToInt8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUintnToChar8", "TestSafeUintnToChar8", TestSafeUintnToChar8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUintnToUint8", "TestSafeUintnToUint8", TestSafeUintnToUint8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUintnToInt16", "TestSafeUintnToInt16", TestSafeUintnToInt16, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUintnToUint16", "TestSafeUintnToUint16", TestSafeUintnToUint16, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUintnToInt32", "TestSafeUintnToInt32", TestSafeUintnToInt32, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUintnToUint32", "TestSafeUintnToUint32", TestSafeUintnToUint32, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUintnToIntn", "TestSafeUintnToIntn", TestSafeUintnToIntn, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUintnToInt64", "TestSafeUintnToInt64", TestSafeUintnToInt64, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt64ToInt8", "TestSafeInt64ToInt8", TestSafeInt64ToInt8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt64ToChar8", "TestSafeInt64ToChar8", TestSafeInt64ToChar8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt64ToUint8", "TestSafeInt64ToUint8", TestSafeInt64ToUint8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt64ToInt16", "TestSafeInt64ToInt16", TestSafeInt64ToInt16, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt64ToUint16", "TestSafeInt64ToUint16", TestSafeInt64ToUint16, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt64ToInt32", "TestSafeInt64ToInt32", TestSafeInt64ToInt32, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt64ToUint32", "TestSafeInt64ToUint32", TestSafeInt64ToUint32, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt64ToIntn", "TestSafeInt64ToIntn", TestSafeInt64ToIntn, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt64ToUintn", "TestSafeInt64ToUintn", TestSafeInt64ToUintn, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeInt64ToUint64", "TestSafeInt64ToUint64", TestSafeInt64ToUint64, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUint64ToInt8", "TestSafeUint64ToInt8", TestSafeUint64ToInt8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUint64ToChar8", "TestSafeUint64ToChar8", TestSafeUint64ToChar8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUint64ToUint8", "TestSafeUint64ToUint8", TestSafeUint64ToUint8, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUint64ToInt16", "TestSafeUint64ToInt16", TestSafeUint64ToInt16, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUint64ToUint16", "TestSafeUint64ToUint16", TestSafeUint64ToUint16, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUint64ToInt32", "TestSafeUint64ToInt32", TestSafeUint64ToInt32, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUint64ToUint32", "TestSafeUint64ToUint32", TestSafeUint64ToUint32, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUint64ToIntn", "TestSafeUint64ToIntn", TestSafeUint64ToIntn, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUint64ToUintn", "TestSafeUint64ToUintn", TestSafeUint64ToUintn, NULL, NULL, NULL); + AddTestCase (ConversionTestSuite, "Test SafeUint64ToInt64", "TestSafeUint64ToInt64", TestSafeUint64ToInt64, NULL, NULL, NULL); // // Test the addition and subtraction functions // - Status = CreateUnitTestSuite(&AdditionSubtractionTestSuite, Framework, "Int Safe Add/Subtract Test Suite", "Common.SafeInt.AddSubtract", NULL, NULL); - if (EFI_ERROR(Status)) { - DEBUG((DEBUG_ERROR, "Failed in CreateUnitTestSuite for Int Safe Add/Subtract Test Suite\n")); + Status = CreateUnitTestSuite (&AdditionSubtractionTestSuite, Framework, "Int Safe Add/Subtract Test Suite", "Common.SafeInt.AddSubtract", NULL, NULL); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "Failed in CreateUnitTestSuite for Int Safe Add/Subtract Test Suite\n")); Status = EFI_OUT_OF_RESOURCES; goto EXIT; } - AddTestCase(AdditionSubtractionTestSuite, "Test SafeUint8Add", "TestSafeUint8Add", TestSafeUint8Add, NULL, NULL, NULL); - AddTestCase(AdditionSubtractionTestSuite, "Test SafeUint16Add", "TestSafeUint16Add", TestSafeUint16Add, NULL, NULL, NULL); - AddTestCase(AdditionSubtractionTestSuite, "Test SafeUint32Add", "TestSafeUint32Add", TestSafeUint32Add, NULL, NULL, NULL); - AddTestCase(AdditionSubtractionTestSuite, "Test SafeUintnAdd", "TestSafeUintnAdd", TestSafeUintnAdd, NULL, NULL, NULL); - AddTestCase(AdditionSubtractionTestSuite, "Test SafeUint64Add", "TestSafeUint64Add", TestSafeUint64Add, NULL, NULL, NULL); - AddTestCase(AdditionSubtractionTestSuite, "Test SafeInt8Add", "TestSafeInt8Add", TestSafeInt8Add, NULL, NULL, NULL); - AddTestCase(AdditionSubtractionTestSuite, "Test SafeInt16Add", "TestSafeInt16Add", TestSafeInt16Add, NULL, NULL, NULL); - AddTestCase(AdditionSubtractionTestSuite, "Test SafeInt32Add", "TestSafeInt32Add", TestSafeInt32Add, NULL, NULL, NULL); - AddTestCase(AdditionSubtractionTestSuite, "Test SafeIntnAdd", "TestSafeIntnAdd", TestSafeIntnAdd, NULL, NULL, NULL); - AddTestCase(AdditionSubtractionTestSuite, "Test SafeInt64Add", "TestSafeInt64Add", TestSafeInt64Add, NULL, NULL, NULL); - AddTestCase(AdditionSubtractionTestSuite, "Test SafeUint8Sub", "TestSafeUint8Sub", TestSafeUint8Sub, NULL, NULL, NULL); - AddTestCase(AdditionSubtractionTestSuite, "Test SafeUint16Sub", "TestSafeUint16Sub", TestSafeUint16Sub, NULL, NULL, NULL); - AddTestCase(AdditionSubtractionTestSuite, "Test SafeUint32Sub", "TestSafeUint32Sub", TestSafeUint32Sub, NULL, NULL, NULL); - AddTestCase(AdditionSubtractionTestSuite, "Test SafeUintnSub", "TestSafeUintnSub", TestSafeUintnSub, NULL, NULL, NULL); - AddTestCase(AdditionSubtractionTestSuite, "Test SafeUint64Sub", "TestSafeUint64Sub", TestSafeUint64Sub, NULL, NULL, NULL); - AddTestCase(AdditionSubtractionTestSuite, "Test SafeInt8Sub", "TestSafeInt8Sub", TestSafeInt8Sub, NULL, NULL, NULL); - AddTestCase(AdditionSubtractionTestSuite, "Test SafeInt16Sub", "TestSafeInt16Sub", TestSafeInt16Sub, NULL, NULL, NULL); - AddTestCase(AdditionSubtractionTestSuite, "Test SafeInt32Sub", "TestSafeInt32Sub", TestSafeInt32Sub, NULL, NULL, NULL); - AddTestCase(AdditionSubtractionTestSuite, "Test SafeIntnSub", "TestSafeIntnSub", TestSafeIntnSub, NULL, NULL, NULL); - AddTestCase(AdditionSubtractionTestSuite, "Test SafeInt64Sub", "TestSafeInt64Sub", TestSafeInt64Sub, NULL, NULL, NULL); + + AddTestCase (AdditionSubtractionTestSuite, "Test SafeUint8Add", "TestSafeUint8Add", TestSafeUint8Add, NULL, NULL, NULL); + AddTestCase (AdditionSubtractionTestSuite, "Test SafeUint16Add", "TestSafeUint16Add", TestSafeUint16Add, NULL, NULL, NULL); + AddTestCase (AdditionSubtractionTestSuite, "Test SafeUint32Add", "TestSafeUint32Add", TestSafeUint32Add, NULL, NULL, NULL); + AddTestCase (AdditionSubtractionTestSuite, "Test SafeUintnAdd", "TestSafeUintnAdd", TestSafeUintnAdd, NULL, NULL, NULL); + AddTestCase (AdditionSubtractionTestSuite, "Test SafeUint64Add", "TestSafeUint64Add", TestSafeUint64Add, NULL, NULL, NULL); + AddTestCase (AdditionSubtractionTestSuite, "Test SafeInt8Add", "TestSafeInt8Add", TestSafeInt8Add, NULL, NULL, NULL); + AddTestCase (AdditionSubtractionTestSuite, "Test SafeInt16Add", "TestSafeInt16Add", TestSafeInt16Add, NULL, NULL, NULL); + AddTestCase (AdditionSubtractionTestSuite, "Test SafeInt32Add", "TestSafeInt32Add", TestSafeInt32Add, NULL, NULL, NULL); + AddTestCase (AdditionSubtractionTestSuite, "Test SafeIntnAdd", "TestSafeIntnAdd", TestSafeIntnAdd, NULL, NULL, NULL); + AddTestCase (AdditionSubtractionTestSuite, "Test SafeInt64Add", "TestSafeInt64Add", TestSafeInt64Add, NULL, NULL, NULL); + AddTestCase (AdditionSubtractionTestSuite, "Test SafeUint8Sub", "TestSafeUint8Sub", TestSafeUint8Sub, NULL, NULL, NULL); + AddTestCase (AdditionSubtractionTestSuite, "Test SafeUint16Sub", "TestSafeUint16Sub", TestSafeUint16Sub, NULL, NULL, NULL); + AddTestCase (AdditionSubtractionTestSuite, "Test SafeUint32Sub", "TestSafeUint32Sub", TestSafeUint32Sub, NULL, NULL, NULL); + AddTestCase (AdditionSubtractionTestSuite, "Test SafeUintnSub", "TestSafeUintnSub", TestSafeUintnSub, NULL, NULL, NULL); + AddTestCase (AdditionSubtractionTestSuite, "Test SafeUint64Sub", "TestSafeUint64Sub", TestSafeUint64Sub, NULL, NULL, NULL); + AddTestCase (AdditionSubtractionTestSuite, "Test SafeInt8Sub", "TestSafeInt8Sub", TestSafeInt8Sub, NULL, NULL, NULL); + AddTestCase (AdditionSubtractionTestSuite, "Test SafeInt16Sub", "TestSafeInt16Sub", TestSafeInt16Sub, NULL, NULL, NULL); + AddTestCase (AdditionSubtractionTestSuite, "Test SafeInt32Sub", "TestSafeInt32Sub", TestSafeInt32Sub, NULL, NULL, NULL); + AddTestCase (AdditionSubtractionTestSuite, "Test SafeIntnSub", "TestSafeIntnSub", TestSafeIntnSub, NULL, NULL, NULL); + AddTestCase (AdditionSubtractionTestSuite, "Test SafeInt64Sub", "TestSafeInt64Sub", TestSafeInt64Sub, NULL, NULL, NULL); // // Test the multiplication functions // - Status = CreateUnitTestSuite(&MultiplicationTestSuite, Framework, "Int Safe Multiply Test Suite", "Common.SafeInt.Multiply", NULL, NULL); - if (EFI_ERROR(Status)) { - DEBUG((DEBUG_ERROR, "Failed in CreateUnitTestSuite for Int Safe Multiply Test Suite\n")); + Status = CreateUnitTestSuite (&MultiplicationTestSuite, Framework, "Int Safe Multiply Test Suite", "Common.SafeInt.Multiply", NULL, NULL); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "Failed in CreateUnitTestSuite for Int Safe Multiply Test Suite\n")); Status = EFI_OUT_OF_RESOURCES; goto EXIT; } - AddTestCase(MultiplicationTestSuite, "Test SafeUint8Mult", "TestSafeUint8Mult", TestSafeUint8Mult, NULL, NULL, NULL); - AddTestCase(MultiplicationTestSuite, "Test SafeUint16Mult", "TestSafeUint16Mult", TestSafeUint16Mult, NULL, NULL, NULL); - AddTestCase(MultiplicationTestSuite, "Test SafeUint32Mult", "TestSafeUint32Mult", TestSafeUint32Mult, NULL, NULL, NULL); - AddTestCase(MultiplicationTestSuite, "Test SafeUintnMult", "TestSafeUintnMult", TestSafeUintnMult, NULL, NULL, NULL); - AddTestCase(MultiplicationTestSuite, "Test SafeUint64Mult", "TestSafeUint64Mult", TestSafeUint64Mult, NULL, NULL, NULL); - AddTestCase(MultiplicationTestSuite, "Test SafeInt8Mult", "TestSafeInt8Mult", TestSafeInt8Mult, NULL, NULL, NULL); - AddTestCase(MultiplicationTestSuite, "Test SafeInt16Mult", "TestSafeInt16Mult", TestSafeInt16Mult, NULL, NULL, NULL); - AddTestCase(MultiplicationTestSuite, "Test SafeInt32Mult", "TestSafeInt32Mult", TestSafeInt32Mult, NULL, NULL, NULL); - AddTestCase(MultiplicationTestSuite, "Test SafeIntnMult", "TestSafeIntnMult", TestSafeIntnMult, NULL, NULL, NULL); - AddTestCase(MultiplicationTestSuite, "Test SafeInt64Mult", "TestSafeInt64Mult", TestSafeInt64Mult, NULL, NULL, NULL); + + AddTestCase (MultiplicationTestSuite, "Test SafeUint8Mult", "TestSafeUint8Mult", TestSafeUint8Mult, NULL, NULL, NULL); + AddTestCase (MultiplicationTestSuite, "Test SafeUint16Mult", "TestSafeUint16Mult", TestSafeUint16Mult, NULL, NULL, NULL); + AddTestCase (MultiplicationTestSuite, "Test SafeUint32Mult", "TestSafeUint32Mult", TestSafeUint32Mult, NULL, NULL, NULL); + AddTestCase (MultiplicationTestSuite, "Test SafeUintnMult", "TestSafeUintnMult", TestSafeUintnMult, NULL, NULL, NULL); + AddTestCase (MultiplicationTestSuite, "Test SafeUint64Mult", "TestSafeUint64Mult", TestSafeUint64Mult, NULL, NULL, NULL); + AddTestCase (MultiplicationTestSuite, "Test SafeInt8Mult", "TestSafeInt8Mult", TestSafeInt8Mult, NULL, NULL, NULL); + AddTestCase (MultiplicationTestSuite, "Test SafeInt16Mult", "TestSafeInt16Mult", TestSafeInt16Mult, NULL, NULL, NULL); + AddTestCase (MultiplicationTestSuite, "Test SafeInt32Mult", "TestSafeInt32Mult", TestSafeInt32Mult, NULL, NULL, NULL); + AddTestCase (MultiplicationTestSuite, "Test SafeIntnMult", "TestSafeIntnMult", TestSafeIntnMult, NULL, NULL, NULL); + AddTestCase (MultiplicationTestSuite, "Test SafeInt64Mult", "TestSafeInt64Mult", TestSafeInt64Mult, NULL, NULL, NULL); // // Execute the tests. // - Status = RunAllTestSuites(Framework); + Status = RunAllTestSuites (Framework); EXIT: if (Framework != NULL) { - FreeUnitTestFramework(Framework); + FreeUnitTestFramework (Framework); } return Status; @@ -3037,8 +3039,8 @@ EXIT: EFI_STATUS EFIAPI PeiEntryPoint ( - IN EFI_PEI_FILE_HANDLE FileHandle, - IN CONST EFI_PEI_SERVICES **PeiServices + IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_SERVICES **PeiServices ) { return UefiTestMain (); @@ -3056,8 +3058,8 @@ DxeEntryPoint ( int main ( - int argc, - char *argv[] + int argc, + char *argv[] ) { return UefiTestMain (); diff --git a/MdePkg/Test/UnitTest/Library/BaseSafeIntLib/TestBaseSafeIntLib.h b/MdePkg/Test/UnitTest/Library/BaseSafeIntLib/TestBaseSafeIntLib.h index 7957c99..9521ec4 100644 --- a/MdePkg/Test/UnitTest/Library/BaseSafeIntLib/TestBaseSafeIntLib.h +++ b/MdePkg/Test/UnitTest/Library/BaseSafeIntLib/TestBaseSafeIntLib.h @@ -20,104 +20,104 @@ UNIT_TEST_STATUS EFIAPI -TestSafeInt32ToUintn( - IN UNIT_TEST_CONTEXT Context +TestSafeInt32ToUintn ( + IN UNIT_TEST_CONTEXT Context ); UNIT_TEST_STATUS EFIAPI -TestSafeUint32ToIntn( - IN UNIT_TEST_CONTEXT Context +TestSafeUint32ToIntn ( + IN UNIT_TEST_CONTEXT Context ); UNIT_TEST_STATUS EFIAPI -TestSafeIntnToInt32( - IN UNIT_TEST_CONTEXT Context +TestSafeIntnToInt32 ( + IN UNIT_TEST_CONTEXT Context ); UNIT_TEST_STATUS EFIAPI -TestSafeIntnToUint32( - IN UNIT_TEST_CONTEXT Context +TestSafeIntnToUint32 ( + IN UNIT_TEST_CONTEXT Context ); UNIT_TEST_STATUS EFIAPI -TestSafeUintnToUint32( - IN UNIT_TEST_CONTEXT Context +TestSafeUintnToUint32 ( + IN UNIT_TEST_CONTEXT Context ); UNIT_TEST_STATUS EFIAPI -TestSafeUintnToIntn( - IN UNIT_TEST_CONTEXT Context +TestSafeUintnToIntn ( + IN UNIT_TEST_CONTEXT Context ); UNIT_TEST_STATUS EFIAPI -TestSafeUintnToInt64( - IN UNIT_TEST_CONTEXT Context +TestSafeUintnToInt64 ( + IN UNIT_TEST_CONTEXT Context ); UNIT_TEST_STATUS EFIAPI -TestSafeInt64ToIntn( - IN UNIT_TEST_CONTEXT Context +TestSafeInt64ToIntn ( + IN UNIT_TEST_CONTEXT Context ); UNIT_TEST_STATUS EFIAPI -TestSafeInt64ToUintn( - IN UNIT_TEST_CONTEXT Context +TestSafeInt64ToUintn ( + IN UNIT_TEST_CONTEXT Context ); UNIT_TEST_STATUS EFIAPI -TestSafeUint64ToIntn( - IN UNIT_TEST_CONTEXT Context +TestSafeUint64ToIntn ( + IN UNIT_TEST_CONTEXT Context ); UNIT_TEST_STATUS EFIAPI -TestSafeUint64ToUintn( - IN UNIT_TEST_CONTEXT Context +TestSafeUint64ToUintn ( + IN UNIT_TEST_CONTEXT Context ); UNIT_TEST_STATUS EFIAPI -TestSafeUintnAdd( - IN UNIT_TEST_CONTEXT Context +TestSafeUintnAdd ( + IN UNIT_TEST_CONTEXT Context ); UNIT_TEST_STATUS EFIAPI -TestSafeIntnAdd( - IN UNIT_TEST_CONTEXT Context +TestSafeIntnAdd ( + IN UNIT_TEST_CONTEXT Context ); UNIT_TEST_STATUS EFIAPI -TestSafeUintnSub( - IN UNIT_TEST_CONTEXT Context +TestSafeUintnSub ( + IN UNIT_TEST_CONTEXT Context ); UNIT_TEST_STATUS EFIAPI -TestSafeIntnSub( - IN UNIT_TEST_CONTEXT Context +TestSafeIntnSub ( + IN UNIT_TEST_CONTEXT Context ); UNIT_TEST_STATUS EFIAPI -TestSafeUintnMult( - IN UNIT_TEST_CONTEXT Context +TestSafeUintnMult ( + IN UNIT_TEST_CONTEXT Context ); UNIT_TEST_STATUS EFIAPI -TestSafeIntnMult( - IN UNIT_TEST_CONTEXT Context +TestSafeIntnMult ( + IN UNIT_TEST_CONTEXT Context ); #endif -- cgit v1.1