├── .github └── CODEOWNERS ├── .gitignore ├── AUTHORS ├── Bin ├── Hash2DxeCrypto.efi ├── LICENSE.Hash2DxeCrypto ├── LICENSE.OVMF ├── LICENSE.Pkcs7VerifyDxe ├── Makefile ├── OVMF.fd ├── Pkcs7VerifyDxe.efi ├── README └── flash ├── Conf └── SELoader.conf ├── Env.mk ├── Key ├── efi_sb_keys │ ├── DB.key │ ├── DB.pem │ ├── KEK.key │ ├── KEK.pem │ ├── PK.key │ ├── PK.pem │ ├── ms-DB.pem │ └── ms-KEK.pem └── mok_sb_keys │ ├── shim_cert.key │ ├── shim_cert.pem │ ├── vendor_cert.key │ └── vendor_cert.pem ├── LICENSE ├── LICENSE.edk2 ├── MAINTAINERS ├── Makefile ├── NEWS ├── README ├── Rules.mk ├── Src ├── Efi │ ├── BuildInfo.c.in │ ├── Include │ │ ├── BaseLibrary.h │ │ ├── Edk2 │ │ │ ├── AArch64 │ │ │ │ └── ProcessorBind.h │ │ │ ├── Arm │ │ │ │ └── ProcessorBind.h │ │ │ ├── Base.h │ │ │ ├── Ebc │ │ │ │ └── ProcessorBind.h │ │ │ ├── Guid │ │ │ │ ├── Acpi.h │ │ │ │ ├── Apriori.h │ │ │ │ ├── AprioriFileName.h │ │ │ │ ├── CapsuleReport.h │ │ │ │ ├── Cper.h │ │ │ │ ├── DebugImageInfoTable.h │ │ │ │ ├── DxeServices.h │ │ │ │ ├── EventGroup.h │ │ │ │ ├── EventLegacyBios.h │ │ │ │ ├── FileInfo.h │ │ │ │ ├── FileSystemInfo.h │ │ │ │ ├── FileSystemVolumeLabelInfo.h │ │ │ │ ├── FirmwareContentsSigned.h │ │ │ │ ├── FirmwareFileSystem2.h │ │ │ │ ├── FirmwareFileSystem3.h │ │ │ │ ├── FmpCapsule.h │ │ │ │ ├── GlobalVariable.h │ │ │ │ ├── Gpt.h │ │ │ │ ├── GraphicsInfoHob.h │ │ │ │ ├── HardwareErrorVariable.h │ │ │ │ ├── HiiFormMapMethodGuid.h │ │ │ │ ├── HiiKeyBoardLayout.h │ │ │ │ ├── HiiPlatformSetupFormset.h │ │ │ │ ├── HobList.h │ │ │ │ ├── ImageAuthentication.h │ │ │ │ ├── MdePkgTokenSpace.h │ │ │ │ ├── MemoryAllocationHob.h │ │ │ │ ├── MemoryAttributesTable.h │ │ │ │ ├── MemoryOverwriteControl.h │ │ │ │ ├── Mps.h │ │ │ │ ├── PcAnsi.h │ │ │ │ ├── PropertiesTable.h │ │ │ │ ├── SalSystemTable.h │ │ │ │ ├── SmBios.h │ │ │ │ ├── StatusCodeDataTypeId.h │ │ │ │ ├── SystemResourceTable.h │ │ │ │ ├── VectorHandoffTable.h │ │ │ │ └── WinCertificate.h │ │ │ ├── Ia32 │ │ │ │ └── ProcessorBind.h │ │ │ ├── IndustryStandard │ │ │ │ ├── Acpi.h │ │ │ │ ├── Acpi10.h │ │ │ │ ├── Acpi20.h │ │ │ │ ├── Acpi30.h │ │ │ │ ├── Acpi40.h │ │ │ │ ├── Acpi50.h │ │ │ │ ├── Acpi51.h │ │ │ │ ├── Acpi60.h │ │ │ │ ├── Acpi61.h │ │ │ │ ├── AcpiAml.h │ │ │ │ ├── AlertStandardFormatTable.h │ │ │ │ ├── Atapi.h │ │ │ │ ├── Bluetooth.h │ │ │ │ ├── Bmp.h │ │ │ │ ├── DebugPort2Table.h │ │ │ │ ├── DebugPortTable.h │ │ │ │ ├── Dhcp.h │ │ │ │ ├── DmaRemappingReportingTable.h │ │ │ │ ├── ElTorito.h │ │ │ │ ├── Emmc.h │ │ │ │ ├── HighPrecisionEventTimerTable.h │ │ │ │ ├── Hsti.h │ │ │ │ ├── Http11.h │ │ │ │ ├── IScsiBootFirmwareTable.h │ │ │ │ ├── Ipmi.h │ │ │ │ ├── IpmiNetFnApp.h │ │ │ │ ├── IpmiNetFnBridge.h │ │ │ │ ├── IpmiNetFnChassis.h │ │ │ │ ├── IpmiNetFnFirmware.h │ │ │ │ ├── IpmiNetFnGroupExtension.h │ │ │ │ ├── IpmiNetFnSensorEvent.h │ │ │ │ ├── IpmiNetFnStorage.h │ │ │ │ ├── IpmiNetFnTransport.h │ │ │ │ ├── LegacyBiosMpTable.h │ │ │ │ ├── LowPowerIdleTable.h │ │ │ │ ├── Mbr.h │ │ │ │ ├── MemoryMappedConfigurationSpaceAccessTable.h │ │ │ │ ├── MemoryOverwriteRequestControlLock.h │ │ │ │ ├── Nvme.h │ │ │ │ ├── Pal.h │ │ │ │ ├── Pci.h │ │ │ │ ├── Pci22.h │ │ │ │ ├── Pci23.h │ │ │ │ ├── Pci30.h │ │ │ │ ├── PciCodeId.h │ │ │ │ ├── PciExpress21.h │ │ │ │ ├── PciExpress30.h │ │ │ │ ├── PciExpress31.h │ │ │ │ ├── PeImage.h │ │ │ │ ├── Sal.h │ │ │ │ ├── Scsi.h │ │ │ │ ├── Sd.h │ │ │ │ ├── SdramSpd.h │ │ │ │ ├── SdramSpdDdr3.h │ │ │ │ ├── SdramSpdDdr4.h │ │ │ │ ├── SdramSpdLpDdr.h │ │ │ │ ├── SerialPortConsoleRedirectionTable.h │ │ │ │ ├── SmBios.h │ │ │ │ ├── SmBus.h │ │ │ │ ├── TcgPhysicalPresence.h │ │ │ │ ├── TcgStorageCore.h │ │ │ │ ├── TcgStorageOpal.h │ │ │ │ ├── TcpaAcpi.h │ │ │ │ ├── Tls1.h │ │ │ │ ├── Tpm12.h │ │ │ │ ├── Tpm20.h │ │ │ │ ├── Tpm2Acpi.h │ │ │ │ ├── TpmPtp.h │ │ │ │ ├── TpmTis.h │ │ │ │ ├── UefiTcgPlatform.h │ │ │ │ ├── Usb.h │ │ │ │ ├── WatchdogActionTable.h │ │ │ │ ├── WatchdogResourceTable.h │ │ │ │ ├── WindowsSmmSecurityMitigationTable.h │ │ │ │ └── WindowsUxCapsule.h │ │ │ ├── Ipf │ │ │ │ ├── IpfMacro.i │ │ │ │ └── ProcessorBind.h │ │ │ ├── Library │ │ │ │ ├── BaseLib.h │ │ │ │ ├── BaseMemoryLib.h │ │ │ │ ├── CacheMaintenanceLib.h │ │ │ │ ├── CpuLib.h │ │ │ │ ├── DebugLib.h │ │ │ │ ├── DebugPrintErrorLevelLib.h │ │ │ │ ├── DevicePathLib.h │ │ │ │ ├── DxeCoreEntryPoint.h │ │ │ │ ├── DxeServicesLib.h │ │ │ │ ├── DxeServicesTableLib.h │ │ │ │ ├── ExtendedSalLib.h │ │ │ │ ├── ExtractGuidedSectionLib.h │ │ │ │ ├── FileHandleLib.h │ │ │ │ ├── HobLib.h │ │ │ │ ├── HstiLib.h │ │ │ │ ├── IoLib.h │ │ │ │ ├── MemoryAllocationLib.h │ │ │ │ ├── OrderedCollectionLib.h │ │ │ │ ├── PalLib.h │ │ │ │ ├── PcdLib.h │ │ │ │ ├── PciCf8Lib.h │ │ │ │ ├── PciExpressLib.h │ │ │ │ ├── PciLib.h │ │ │ │ ├── PciSegmentLib.h │ │ │ │ ├── PeCoffExtraActionLib.h │ │ │ │ ├── PeCoffGetEntryPointLib.h │ │ │ │ ├── PeCoffLib.h │ │ │ │ ├── PeiCoreEntryPoint.h │ │ │ │ ├── PeiServicesLib.h │ │ │ │ ├── PeiServicesTablePointerLib.h │ │ │ │ ├── PeimEntryPoint.h │ │ │ │ ├── PerformanceLib.h │ │ │ │ ├── PostCodeLib.h │ │ │ │ ├── PrintLib.h │ │ │ │ ├── ReportStatusCodeLib.h │ │ │ │ ├── ResourcePublicationLib.h │ │ │ │ ├── RngLib.h │ │ │ │ ├── S3BootScriptLib.h │ │ │ │ ├── S3IoLib.h │ │ │ │ ├── S3PciLib.h │ │ │ │ ├── S3SmbusLib.h │ │ │ │ ├── S3StallLib.h │ │ │ │ ├── SalLib.h │ │ │ │ ├── SerialPortLib.h │ │ │ │ ├── SmbusLib.h │ │ │ │ ├── SmiHandlerProfileLib.h │ │ │ │ ├── SmmLib.h │ │ │ │ ├── SmmMemLib.h │ │ │ │ ├── SmmPeriodicSmiLib.h │ │ │ │ ├── SmmServicesTableLib.h │ │ │ │ ├── SynchronizationLib.h │ │ │ │ ├── TimerLib.h │ │ │ │ ├── UefiApplicationEntryPoint.h │ │ │ │ ├── UefiBootServicesTableLib.h │ │ │ │ ├── UefiDecompressLib.h │ │ │ │ ├── UefiDriverEntryPoint.h │ │ │ │ ├── UefiLib.h │ │ │ │ ├── UefiRuntimeLib.h │ │ │ │ ├── UefiRuntimeServicesTableLib.h │ │ │ │ ├── UefiScsiLib.h │ │ │ │ └── UefiUsbLib.h │ │ │ ├── Pi │ │ │ │ ├── PiBootMode.h │ │ │ │ ├── PiDependency.h │ │ │ │ ├── PiDxeCis.h │ │ │ │ ├── PiFirmwareFile.h │ │ │ │ ├── PiFirmwareVolume.h │ │ │ │ ├── PiHob.h │ │ │ │ ├── PiI2c.h │ │ │ │ ├── PiMultiPhase.h │ │ │ │ ├── PiPeiCis.h │ │ │ │ ├── PiS3BootScript.h │ │ │ │ ├── PiSmmCis.h │ │ │ │ ├── PiSmmCommunicationAcpiTable.h │ │ │ │ └── PiStatusCode.h │ │ │ ├── PiDxe.h │ │ │ ├── PiPei.h │ │ │ ├── PiSmm.h │ │ │ ├── Ppi │ │ │ │ ├── BlockIo.h │ │ │ │ ├── BlockIo2.h │ │ │ │ ├── BootInRecoveryMode.h │ │ │ │ ├── Capsule.h │ │ │ │ ├── CpuIo.h │ │ │ │ ├── Decompress.h │ │ │ │ ├── DeviceRecoveryModule.h │ │ │ │ ├── DxeIpl.h │ │ │ │ ├── EndOfPeiPhase.h │ │ │ │ ├── FirmwareVolume.h │ │ │ │ ├── FirmwareVolumeInfo.h │ │ │ │ ├── FirmwareVolumeInfo2.h │ │ │ │ ├── Graphics.h │ │ │ │ ├── GuidedSectionExtraction.h │ │ │ │ ├── I2cMaster.h │ │ │ │ ├── IsaHc.h │ │ │ │ ├── LoadFile.h │ │ │ │ ├── LoadImage.h │ │ │ │ ├── MasterBootMode.h │ │ │ │ ├── MemoryDiscovered.h │ │ │ │ ├── MpServices.h │ │ │ │ ├── Pcd.h │ │ │ │ ├── PcdInfo.h │ │ │ │ ├── PciCfg2.h │ │ │ │ ├── PiPcd.h │ │ │ │ ├── PiPcdInfo.h │ │ │ │ ├── ReadOnlyVariable2.h │ │ │ │ ├── RecoveryModule.h │ │ │ │ ├── ReportStatusCodeHandler.h │ │ │ │ ├── Reset.h │ │ │ │ ├── Reset2.h │ │ │ │ ├── S3Resume2.h │ │ │ │ ├── SecPlatformInformation.h │ │ │ │ ├── SecPlatformInformation2.h │ │ │ │ ├── Security2.h │ │ │ │ ├── Smbus2.h │ │ │ │ ├── Stall.h │ │ │ │ ├── StatusCode.h │ │ │ │ ├── SuperIo.h │ │ │ │ ├── TemporaryRamDone.h │ │ │ │ ├── TemporaryRamSupport.h │ │ │ │ └── VectorHandoffInfo.h │ │ │ ├── Protocol │ │ │ │ ├── AbsolutePointer.h │ │ │ │ ├── AcpiSystemDescriptionTable.h │ │ │ │ ├── AcpiTable.h │ │ │ │ ├── AdapterInformation.h │ │ │ │ ├── Arp.h │ │ │ │ ├── AtaPassThru.h │ │ │ │ ├── AuthenticationInfo.h │ │ │ │ ├── Bds.h │ │ │ │ ├── Bis.h │ │ │ │ ├── BlockIo.h │ │ │ │ ├── BlockIo2.h │ │ │ │ ├── BlockIoCrypto.h │ │ │ │ ├── BluetoothConfig.h │ │ │ │ ├── BluetoothHc.h │ │ │ │ ├── BluetoothIo.h │ │ │ │ ├── BootManagerPolicy.h │ │ │ │ ├── BusSpecificDriverOverride.h │ │ │ │ ├── Capsule.h │ │ │ │ ├── ComponentName.h │ │ │ │ ├── ComponentName2.h │ │ │ │ ├── Cpu.h │ │ │ │ ├── CpuIo2.h │ │ │ │ ├── DebugPort.h │ │ │ │ ├── DebugSupport.h │ │ │ │ ├── Decompress.h │ │ │ │ ├── DeferredImageLoad.h │ │ │ │ ├── DeviceIo.h │ │ │ │ ├── DevicePath.h │ │ │ │ ├── DevicePathFromText.h │ │ │ │ ├── DevicePathToText.h │ │ │ │ ├── DevicePathUtilities.h │ │ │ │ ├── Dhcp4.h │ │ │ │ ├── Dhcp6.h │ │ │ │ ├── DiskInfo.h │ │ │ │ ├── DiskIo.h │ │ │ │ ├── DiskIo2.h │ │ │ │ ├── Dns4.h │ │ │ │ ├── Dns6.h │ │ │ │ ├── DriverBinding.h │ │ │ │ ├── DriverConfiguration.h │ │ │ │ ├── DriverConfiguration2.h │ │ │ │ ├── DriverDiagnostics.h │ │ │ │ ├── DriverDiagnostics2.h │ │ │ │ ├── DriverFamilyOverride.h │ │ │ │ ├── DriverHealth.h │ │ │ │ ├── DriverSupportedEfiVersion.h │ │ │ │ ├── DxeSmmReadyToLock.h │ │ │ │ ├── Eap.h │ │ │ │ ├── EapConfiguration.h │ │ │ │ ├── EapManagement.h │ │ │ │ ├── EapManagement2.h │ │ │ │ ├── Ebc.h │ │ │ │ ├── EdidActive.h │ │ │ │ ├── EdidDiscovered.h │ │ │ │ ├── EdidOverride.h │ │ │ │ ├── EraseBlock.h │ │ │ │ ├── ExtendedSalBootService.h │ │ │ │ ├── ExtendedSalServiceClasses.h │ │ │ │ ├── FirmwareManagement.h │ │ │ │ ├── FirmwareVolume2.h │ │ │ │ ├── FirmwareVolumeBlock.h │ │ │ │ ├── FormBrowser2.h │ │ │ │ ├── Ftp4.h │ │ │ │ ├── GraphicsOutput.h │ │ │ │ ├── GuidedSectionExtraction.h │ │ │ │ ├── Hash.h │ │ │ │ ├── Hash2.h │ │ │ │ ├── HiiConfigAccess.h │ │ │ │ ├── HiiConfigKeyword.h │ │ │ │ ├── HiiConfigRouting.h │ │ │ │ ├── HiiDatabase.h │ │ │ │ ├── HiiFont.h │ │ │ │ ├── HiiImage.h │ │ │ │ ├── HiiImageDecoder.h │ │ │ │ ├── HiiImageEx.h │ │ │ │ ├── HiiPackageList.h │ │ │ │ ├── HiiString.h │ │ │ │ ├── Http.h │ │ │ │ ├── HttpUtilities.h │ │ │ │ ├── I2cBusConfigurationManagement.h │ │ │ │ ├── I2cEnumerate.h │ │ │ │ ├── I2cHost.h │ │ │ │ ├── I2cIo.h │ │ │ │ ├── I2cMaster.h │ │ │ │ ├── IScsiInitiatorName.h │ │ │ │ ├── IdeControllerInit.h │ │ │ │ ├── IncompatiblePciDeviceSupport.h │ │ │ │ ├── Ip4.h │ │ │ │ ├── Ip4Config.h │ │ │ │ ├── Ip4Config2.h │ │ │ │ ├── Ip6.h │ │ │ │ ├── Ip6Config.h │ │ │ │ ├── IpSec.h │ │ │ │ ├── IpSecConfig.h │ │ │ │ ├── IsaHc.h │ │ │ │ ├── Kms.h │ │ │ │ ├── LegacyRegion2.h │ │ │ │ ├── LoadFile.h │ │ │ │ ├── LoadFile2.h │ │ │ │ ├── LoadedImage.h │ │ │ │ ├── ManagedNetwork.h │ │ │ │ ├── McaInitPmi.h │ │ │ │ ├── Metronome.h │ │ │ │ ├── MonotonicCounter.h │ │ │ │ ├── MpService.h │ │ │ │ ├── Mtftp4.h │ │ │ │ ├── Mtftp6.h │ │ │ │ ├── NetworkInterfaceIdentifier.h │ │ │ │ ├── NvmExpressPassthru.h │ │ │ │ ├── Pcd.h │ │ │ │ ├── PcdInfo.h │ │ │ │ ├── PciEnumerationComplete.h │ │ │ │ ├── PciHostBridgeResourceAllocation.h │ │ │ │ ├── PciHotPlugInit.h │ │ │ │ ├── PciHotPlugRequest.h │ │ │ │ ├── PciIo.h │ │ │ │ ├── PciOverride.h │ │ │ │ ├── PciPlatform.h │ │ │ │ ├── PciRootBridgeIo.h │ │ │ │ ├── PiPcd.h │ │ │ │ ├── PiPcdInfo.h │ │ │ │ ├── Pkcs7Verify.h │ │ │ │ ├── PlatformDriverOverride.h │ │ │ │ ├── PlatformToDriverConfiguration.h │ │ │ │ ├── PxeBaseCode.h │ │ │ │ ├── PxeBaseCodeCallBack.h │ │ │ │ ├── RamDisk.h │ │ │ │ ├── RealTimeClock.h │ │ │ │ ├── RegularExpressionProtocol.h │ │ │ │ ├── ReportStatusCodeHandler.h │ │ │ │ ├── Reset.h │ │ │ │ ├── Rest.h │ │ │ │ ├── Rng.h │ │ │ │ ├── Runtime.h │ │ │ │ ├── S3SaveState.h │ │ │ │ ├── S3SmmSaveState.h │ │ │ │ ├── ScsiIo.h │ │ │ │ ├── ScsiPassThru.h │ │ │ │ ├── ScsiPassThruExt.h │ │ │ │ ├── SdMmcPassThru.h │ │ │ │ ├── Security.h │ │ │ │ ├── Security2.h │ │ │ │ ├── SecurityPolicy.h │ │ │ │ ├── SerialIo.h │ │ │ │ ├── ServiceBinding.h │ │ │ │ ├── Shell.h │ │ │ │ ├── ShellDynamicCommand.h │ │ │ │ ├── ShellParameters.h │ │ │ │ ├── SimpleFileSystem.h │ │ │ │ ├── SimpleNetwork.h │ │ │ │ ├── SimplePointer.h │ │ │ │ ├── SimpleTextIn.h │ │ │ │ ├── SimpleTextInEx.h │ │ │ │ ├── SimpleTextOut.h │ │ │ │ ├── SmartCardEdge.h │ │ │ │ ├── SmartCardReader.h │ │ │ │ ├── Smbios.h │ │ │ │ ├── SmbusHc.h │ │ │ │ ├── SmmAccess2.h │ │ │ │ ├── SmmBase2.h │ │ │ │ ├── SmmCommunication.h │ │ │ │ ├── SmmConfiguration.h │ │ │ │ ├── SmmControl2.h │ │ │ │ ├── SmmCpu.h │ │ │ │ ├── SmmCpuIo2.h │ │ │ │ ├── SmmEndOfDxe.h │ │ │ │ ├── SmmGpiDispatch2.h │ │ │ │ ├── SmmIoTrapDispatch2.h │ │ │ │ ├── SmmPciRootBridgeIo.h │ │ │ │ ├── SmmPeriodicTimerDispatch2.h │ │ │ │ ├── SmmPowerButtonDispatch2.h │ │ │ │ ├── SmmReadyToLock.h │ │ │ │ ├── SmmReportStatusCodeHandler.h │ │ │ │ ├── SmmStandbyButtonDispatch2.h │ │ │ │ ├── SmmStatusCode.h │ │ │ │ ├── SmmSwDispatch2.h │ │ │ │ ├── SmmSxDispatch2.h │ │ │ │ ├── SmmUsbDispatch2.h │ │ │ │ ├── StatusCode.h │ │ │ │ ├── StorageSecurityCommand.h │ │ │ │ ├── SuperIo.h │ │ │ │ ├── SuperIoControl.h │ │ │ │ ├── Supplicant.h │ │ │ │ ├── TapeIo.h │ │ │ │ ├── Tcg2Protocol.h │ │ │ │ ├── TcgService.h │ │ │ │ ├── Tcp4.h │ │ │ │ ├── Tcp6.h │ │ │ │ ├── Timer.h │ │ │ │ ├── Timestamp.h │ │ │ │ ├── Tls.h │ │ │ │ ├── TlsConfig.h │ │ │ │ ├── TrEEProtocol.h │ │ │ │ ├── Udp4.h │ │ │ │ ├── Udp6.h │ │ │ │ ├── UgaDraw.h │ │ │ │ ├── UgaIo.h │ │ │ │ ├── UnicodeCollation.h │ │ │ │ ├── Usb2HostController.h │ │ │ │ ├── UsbFunctionIo.h │ │ │ │ ├── UsbHostController.h │ │ │ │ ├── UsbIo.h │ │ │ │ ├── UserCredential.h │ │ │ │ ├── UserCredential2.h │ │ │ │ ├── UserManager.h │ │ │ │ ├── Variable.h │ │ │ │ ├── VariableWrite.h │ │ │ │ ├── VlanConfig.h │ │ │ │ ├── WatchdogTimer.h │ │ │ │ ├── WiFi.h │ │ │ │ └── WiFi2.h │ │ │ ├── Uefi.h │ │ │ ├── Uefi │ │ │ │ ├── UefiAcpiDataTable.h │ │ │ │ ├── UefiBaseType.h │ │ │ │ ├── UefiGpt.h │ │ │ │ ├── UefiInternalFormRepresentation.h │ │ │ │ ├── UefiMultiPhase.h │ │ │ │ ├── UefiPxe.h │ │ │ │ └── UefiSpec.h │ │ │ └── X64 │ │ │ │ └── ProcessorBind.h │ │ ├── Efi.h │ │ ├── EfiLibrary.h │ │ ├── GnuEfi.h │ │ ├── Mok2Verify.h │ │ ├── MokVerify.h │ │ └── SELoader.h │ ├── Lib │ │ ├── BaseLibrary │ │ │ ├── Makefile │ │ │ ├── MemCmp.c │ │ │ ├── MemCpy.c │ │ │ ├── MemDup.c │ │ │ ├── MemMove.c │ │ │ ├── MemSet.c │ │ │ ├── StrAppend.c │ │ │ ├── StrCaseCmp.c │ │ │ ├── StrChr.c │ │ │ ├── StrCmp.c │ │ │ ├── StrCpy.c │ │ │ ├── StrDup.c │ │ │ ├── StrEndsWith.c │ │ │ ├── StrLen.c │ │ │ ├── StrStr.c │ │ │ ├── StrnChr.c │ │ │ ├── StrnCpy.c │ │ │ ├── StrnLen.c │ │ │ ├── StrrChr.c │ │ │ └── StrrStr.c │ │ ├── Console.c │ │ ├── Device.c │ │ ├── DevicePath.c │ │ ├── EfiLibrary.c │ │ ├── File.c │ │ ├── Hash.c │ │ ├── Image.c │ │ ├── Internal.h │ │ ├── Makefile │ │ ├── Memory.c │ │ ├── Mok2Verify.c │ │ ├── MokVerify.c │ │ ├── Pkcs7Verify.c │ │ ├── Protocol.c │ │ ├── ResetSystem.c │ │ ├── Sap.c │ │ ├── Sap2.c │ │ ├── SecurityPolicy.c │ │ ├── Signature.c │ │ ├── Stall.c │ │ ├── UefiSecureBoot.c │ │ └── Variable.c │ ├── Makefile │ └── SELoader.c └── Makefile ├── TODO └── Version.mk /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @jiazhang0 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Src/Efi/BuildInfo.c 2 | *.o 3 | *.so 4 | *.a 5 | *.efi 6 | *.efi.debug 7 | *.signed 8 | *.p7b 9 | *.p7a 10 | *.p7s 11 | *.patch 12 | Bak 13 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Jia Zhang 2 | -------------------------------------------------------------------------------- /Bin/Hash2DxeCrypto.efi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiazhang0/SELoader/7df5b30af35cf9ed5229bbae507f6744438c661c/Bin/Hash2DxeCrypto.efi -------------------------------------------------------------------------------- /Bin/LICENSE.Hash2DxeCrypto: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Intel Corporation. All rights reserved.
2 | This program and the accompanying materials 3 | are licensed and made available under the terms and conditions of the BSD License 4 | which accompanies this distribution. The full text of the license may be found at 5 | http://opensource.org/licenses/bsd-license.php 6 | 7 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 8 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 9 | -------------------------------------------------------------------------------- /Bin/LICENSE.Pkcs7VerifyDxe: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Intel Corporation. All rights reserved.
2 | This program and the accompanying materials 3 | are licensed and made available under the terms and conditions of the BSD License 4 | which accompanies this distribution. The full text of the license may be found at 5 | http://opensource.org/licenses/bsd-license.php 6 | 7 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 8 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 9 | -------------------------------------------------------------------------------- /Bin/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/Env.mk 2 | include $(TOPDIR)/Rules.mk 3 | 4 | all: Pkcs7VerifyDxe.efi.signed Hash2DxeCrypto.efi.signed 5 | 6 | clean: 7 | @$(RM) -f *.efi.signed 8 | 9 | install: Pkcs7VerifyDxe.efi.signed Hash2DxeCrypto.efi.signed 10 | @$(INSTALL) -m 0600 Pkcs7VerifyDxe.efi.signed \ 11 | $(EFI_DESTDIR)/Pkcs7VerifyDxe.efi 12 | @$(INSTALL) -m 0600 Hash2DxeCrypto.efi.signed \ 13 | $(EFI_DESTDIR)/Hash2DxeCrypto.efi 14 | 15 | Pkcs7VerifyDxe.efi.signed: Pkcs7VerifyDxe.efi 16 | Hash2DxeCrypto.efi.signed: Hash2DxeCrypto.efi 17 | -------------------------------------------------------------------------------- /Bin/OVMF.fd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiazhang0/SELoader/7df5b30af35cf9ed5229bbae507f6744438c661c/Bin/OVMF.fd -------------------------------------------------------------------------------- /Bin/Pkcs7VerifyDxe.efi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiazhang0/SELoader/7df5b30af35cf9ed5229bbae507f6744438c661c/Bin/Pkcs7VerifyDxe.efi -------------------------------------------------------------------------------- /Bin/flash: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jiazhang0/SELoader/7df5b30af35cf9ed5229bbae507f6744438c661c/Bin/flash -------------------------------------------------------------------------------- /Conf/SELoader.conf: -------------------------------------------------------------------------------- 1 | ### Global settings ### 2 | [global] 3 | boot_list=kernel 4 | default_boot=kernel 5 | auth=yes 6 | 7 | [grub] 8 | title=Grub 9 | image=\EFI\BOOT\grubx64.efi 10 | auth=yes 11 | 12 | [kernel] 13 | title=Linux 14 | kernel=\bzImage.efi 15 | option=/dev/sdb2 rootwait ro 16 | auth=yes 17 | -------------------------------------------------------------------------------- /Env.mk: -------------------------------------------------------------------------------- 1 | CROSS_COMPILE ?= 2 | CC := $(CROSS_COMPILE)gcc 3 | LD := $(CROSS_COMPILE)ld 4 | AR := $(CROSS_COMPILE)ar 5 | OBJCOPY := $(CROSS_COMPILE)objcopy 6 | NM := $(CROSS_COMPILE)nm 7 | INSTALL ?= install 8 | OPENSSL ?= openssl 9 | GIT ?= git 10 | SBSIGN ?= sbsign 11 | RM ?= rm 12 | 13 | EXTRA_CFLAGS ?= 14 | EXTRA_LDFLAGS ?= 15 | 16 | DEBUG_BUILD ?= 17 | TRACE_BUILD ?= 18 | 19 | LIB_DIR := $(TOPDIR)/Src/Efi/Lib 20 | # Installation location for SELoader.efi 21 | EFI_DESTDIR ?= /boot/efi/EFI/BOOT 22 | 23 | prefix ?= /usr 24 | libdir ?= $(prefix)/lib 25 | bindir ?= $(prefix)/bin 26 | sbindir ?= $(prefix)/sbin 27 | includedir ?= $(prefix)/include 28 | 29 | gnuefi_libdir ?= $(libdir) 30 | GNU_EFI_VERSION ?= 308 31 | 32 | LIB_GCC ?= $(shell $(CC) -print-libgcc-file-name) 33 | 34 | LDFLAGS := --warn-common --no-undefined --fatal-warnings \ 35 | $(patsubst $(join -Wl,,)%,%,$(EXTRA_LDFLAGS)) 36 | CFLAGS := -std=gnu11 -Wall -Wsign-compare -Werror \ 37 | $(EXTRA_CFLAGS) $(addprefix $(join -Wl,,),$(LDFLAGS)) 38 | 39 | SIGNING_KEY ?= $(TOPDIR)/Key/mok_sb_keys/vendor_cert.key 40 | SIGNING_CERT ?= $(TOPDIR)/Key/mok_sb_keys/vendor_cert.pem 41 | 42 | ifneq ($(DEBUG_BUILD),) 43 | CFLAGS += -ggdb -DDEBUG_BUILD 44 | endif 45 | 46 | ifneq ($(TRACE_BUILD),) 47 | CFLAGS += -DTRACE_BUILD 48 | endif 49 | 50 | ifneq ($(EXPERIMENTAL_BUILD),) 51 | CFLAGS += -DEXPERIMENTAL_BUILD 52 | endif 53 | -------------------------------------------------------------------------------- /Key/efi_sb_keys/DB.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDfF4qPJKfy0Dgr 3 | lElYhh8531NMI4z+x1AlUK4DOnuBp/eFzV/0/FvOlcLMnyjxYkRK/+eszp7AcTiJ 4 | SX7sOiI1tQfbJNVaRE1/yRCnFlb/NX8LaEePGgvkZ4gDMJwrwXhxZqizeysczbt+ 5 | URSHjgNLt52MHiYp/vminfaCW+8Rvu1DzvtiMHm2OZzNSq2O2zTFMUh2j33sMtup 6 | e4LPTnGtnOm2ah1Jhw4ks2/ZnAtkFqKI4PUn3KOPPx0ojmKEcg8sy3sH/sNEgkmm 7 | dFX+kFC0Y78wNdWRFEozpcvaA80Khguk+KcQLOoxHikbaBQcrBvznQ+QuMuuMvXr 8 | VvgjU5ljAgMBAAECggEAMmhHToCh0iNqDa67w9zKQXFMiO+fdBHk8gmAyAn2zhz9 9 | uKXnAJvkwpDkKwfrYF8rvyaDWnB1PlZWx+5rV0TrZec5lzKDYpn8SNtNf/N0RMX5 10 | psIxKQxhk4IxIUdigiB87mKby7IQ07lInAoF8XsNE5axam+FgAe0sCGxCVNseT2W 11 | rH+7SiLAmVBKAHTxl7OAhgje7hYCrTZ6E16FXCR+riyu493Gny6LNq/MFrr4kYkF 12 | Qs3G0y1DRaQbjdrgI2N8zxLn2o99xONpHfcluEIfSKr04lWc2r/AOQccOnpQhsbG 13 | UGoFAzL+R1NYYaIEzvn17PgNne9MSPigWr4UwtySwQKBgQDyodeLTmi0a0sKoXCN 14 | GFGgYLV/gEu/zaOPqtGJAQj/xPEo+ErhyQxbOKeleSUyWc0clULkrPwQQdHp2yh1 15 | khWQbGmtyZKp3xf08MwvJa9lK60ETJIfXZ1GdZTDbZv9iXDCBwS8unhl0UsmAGNS 16 | Po5iOJzKNxcwi7P5wxkz8NYIfQKBgQDrYhkMmsxs/BVggeUn2eO/7nyHbJEt84cC 17 | zN1GGnHKp1VdJ5EmzxWyI95hA9EsFS+LALQqMB9kXgiiDLL+0WHis2LtPFvpd6aq 18 | bx4Pn1jWU0o0OnN1MSwkF499Zp8355QGI4xe1aLJ5qRorDIl2A1SKNlc5YJzBaTb 19 | dZR9yM2vXwKBgQDuD1la943IJ9WzEn9KEOhWAU1TUmAASxYGKkX4tKlNusAbwLJI 20 | ImkbP9VNiDW012NmfhTqJcgTc2EwoLVr1e+OirCNsU9TmO76hyDvyXv0OgxCQZbF 21 | a6aasVdLAEqjUqzt0tEVE6h5zgZ7vLm2wmYVfRJpXfBE0228y235Bn4aSQKBgChC 22 | Ifim7Tnir6FO9iunt61XE9NxvS73zOqssVfRJA8+KXqCTvAtUQ+j1OAQ8BCzGuuS 23 | Vj409tmKv70/oMm2dCB6//uFbE71GPtjf+e6IE6f9jwSlza/D0apBPC0wZylLgsS 24 | v2pk7a/Mk+gXM4iHeFfKBss9sd8MYxLp/Fi7JHrPAoGBANJA8sUMkrggCav1fwGu 25 | FpaZAnWrFi3n5yKXknelsNmuZrCgLDhr4DZ5S3rPPhq70WFyRyyNS4qrPK4ouFJZ 26 | WNWDUXLeLa5xZJ1xUCDiwZBi6UK8z1ZGMfxokICLtHyJjZmnvNs7BONY6zwaIfqm 27 | uv56ysxyvt+RseZ/UJREYbh3 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /Key/efi_sb_keys/DB.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIC8DCCAdigAwIBAgIBATANBgkqhkiG9w0BAQsFADAaMRgwFgYDVQQDDA9LRUsg 3 | Q2VydGlmaWNhdGUwHhcNMTcwNzA2MDYyMTIwWhcNMjcwNzA0MDYyMTIwWjAZMRcw 4 | FQYDVQQDDA5EQiBDZXJ0aWZpY2F0ZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC 5 | AQoCggEBAN8Xio8kp/LQOCuUSViGHznfU0wjjP7HUCVQrgM6e4Gn94XNX/T8W86V 6 | wsyfKPFiREr/56zOnsBxOIlJfuw6IjW1B9sk1VpETX/JEKcWVv81fwtoR48aC+Rn 7 | iAMwnCvBeHFmqLN7KxzNu35RFIeOA0u3nYweJin++aKd9oJb7xG+7UPO+2IwebY5 8 | nM1KrY7bNMUxSHaPfewy26l7gs9Oca2c6bZqHUmHDiSzb9mcC2QWoojg9Sfco48/ 9 | HSiOYoRyDyzLewf+w0SCSaZ0Vf6QULRjvzA11ZEUSjOly9oDzQqGC6T4pxAs6jEe 10 | KRtoFBysG/OdD5C4y64y9etW+CNTmWMCAwEAAaNCMEAwHQYDVR0OBBYEFDWu6Vu8 11 | qUbRqyHpT2SkMrpviHGZMB8GA1UdIwQYMBaAFJkbxMCnfKHBvNz73RU9fvmtwnxo 12 | MA0GCSqGSIb3DQEBCwUAA4IBAQAx00zLLopMYuQlNJNSDc+qJb4JyceicslPGNfP 13 | IFPxP3nZ3xHjymg0EYLhGqtXvKPyHdgTm79V2qwO+519MGmmx9OutyaGh4+v7MpW 14 | dNzj/FlXql/t4XkbuC6az2WgmyMC/gINRkA+ZBTvG1/crNALamwEyNBXx+Y0AFQe 15 | BvrgId0/tnbnphd4+KOkfv474InNJprUW6RqrZF7ErrGJYMNt75v62unH4O7UxzJ 16 | x0mvwrJGHHrvJBXEvW33/SGZGImVT4HGyMOAteu+Prwm0HoFms90xe5ru6ioJ+YM 17 | ZlO8HozHrdV6lYd/FWU4aHf4G23eihQvbDv7SzY3W3q2/qUU 18 | -----END CERTIFICATE----- 19 | -------------------------------------------------------------------------------- /Key/efi_sb_keys/KEK.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDMtV5Q3HiEEl/4 3 | EC6mHgHednYiooTvh8VGVnL4uFQT2EralZHJ+LdGVQt1E1/kf76kBf7unNQIo44w 4 | izxsWIiRNf3nxNOqHNDozeU/OxTQVh51jzmWpNGlfKALd4Ic4G6sS3B9R9hhy87Y 5 | SJOEP2hh6ZlHjr4z61AQIurJ1lFwz5s09qzyZ/OrC/TYx3nPPZNGL+nAoI83+gNQ 6 | 6buRytbeUXeTsHREdNxcDGC/61BIiDjv7dHJku/azSworjrVzPATxwXXzj2YbVNI 7 | xzxscdAI3zOeKNsYl86z6RgTlLA4vUGDLnyCkWnLCFDR5HVFOIj5C9jgLtgT0+Ro 8 | RHomWDcjAgMBAAECggEBAIVxAR9S6JinZbnNyqrsyqkarZ2cNW3zIkzck6vAdMZO 9 | 61SbxWJUaBxH2eUikRLhlwNTCUDAKJPNEiZgzS2PdM671Fyd+KBekmv/s53JRKMe 10 | UFKv34lsvWDT4Xw4Fi/+uQZFUvnHuKzfb2GbxdWig8e3v/xed2xey10JdeXGeGZB 11 | NAHL0v5VO75nNoqD5ihLMbCNWaQ2hhBqNl52Mq++7EZ08wbECGsNssTQ639qexJl 12 | mU2sghsWI1uxxLsYEV6UuFTNBlKLn5WXhl0w8CyzrTDbWqs2EnnYkmF2vBVE4aWX 13 | aCD/G5aj0SQi0Ujh6VJwyJn07L/zztaWsfvFWyWvc9kCgYEA8PMT8nHMe9qUhAx9 14 | /gZRNFAc8PNyLAqiey4nQBMKo0TUtRFCmbaE6n785HGohUSzoebSZ/OUEtrelYVD 15 | MNug/xheifQV0fPaM3gQfl8KzwkTXu4SisNHGqzstcp2yI6IEbtP9yhj7p28w4bT 16 | Rv3V7OuRUS+8SGdtmlC5hHH292cCgYEA2X7Gbw64kQbB99HW3pRzuH6m5fngljn6 17 | aWKIeCnoPIgrBV/BxQ8uFKoDa8np4BW5wgkBn6NJY0D3ZpGCFTWDd2ZW/1pKrnNU 18 | KagNxft/gFiIsGy0W8FVWhl+4GCEaTFuZcBoRR2WHX+eWJFzyjvwazLLw6xw9md7 19 | 77loGkgi2OUCgYEA1+8waC2eMT0Rrkm3vCkTK0vEtBeosVmShcw19tFZzjpIWkEu 20 | q60L70+A+oX1ngGU7rp6xBhiEoe9xMgaEDY0UYkYaI+r4m2klk26klZAzIx4pLG9 21 | QkiBd6GTvdPFojVCMonovzqeXGFWovA4dj3UMzBmGhkqpsSyUAKaT90GlG8CgYAI 22 | TMs7z78BYdWjJHHjupyT7Nlnq1qDwSCqRuVYWJkRPk0N/nKBl6u1hCtvQJxZPdsB 23 | 6aATPIL/c6o9Us45CvrCYrhtND/nWmVa1Zv48zkRZ8+HlA5p9f3Q22o5G9XRwd4p 24 | qecQxClHZOhhDuPxUspA/QZDqGADNz3GjzfG0PvrdQKBgFw3JQZn2FMiEMTtGMry 25 | 8fXvHv4VnISgWPyHJWbX2xaZo1JAsjHqq9tsq/FI3tbqszjLroCZHbPALpFINlkH 26 | ekND60cGMIbDktvGIObP5PVKwNvWUInmdpzEkM+Hr3kJBP0byTdsvazOSglDS8fn 27 | c15iicuPaRJpzmmrhQ2T+Vrl 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /Key/efi_sb_keys/KEK.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIC8DCCAdigAwIBAgIBATANBgkqhkiG9w0BAQsFADAZMRcwFQYDVQQDDA5QSyBD 3 | ZXJ0aWZpY2F0ZTAeFw0xNzA3MDYwNjIxMjBaFw0yNzA3MDQwNjIxMjBaMBoxGDAW 4 | BgNVBAMMD0tFSyBDZXJ0aWZpY2F0ZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC 5 | AQoCggEBAMy1XlDceIQSX/gQLqYeAd52diKihO+HxUZWcvi4VBPYStqVkcn4t0ZV 6 | C3UTX+R/vqQF/u6c1AijjjCLPGxYiJE1/efE06oc0OjN5T87FNBWHnWPOZak0aV8 7 | oAt3ghzgbqxLcH1H2GHLzthIk4Q/aGHpmUeOvjPrUBAi6snWUXDPmzT2rPJn86sL 8 | 9NjHec89k0Yv6cCgjzf6A1Dpu5HK1t5Rd5OwdER03FwMYL/rUEiIOO/t0cmS79rN 9 | LCiuOtXM8BPHBdfOPZhtU0jHPGxx0AjfM54o2xiXzrPpGBOUsDi9QYMufIKRacsI 10 | UNHkdUU4iPkL2OAu2BPT5GhEeiZYNyMCAwEAAaNCMEAwHQYDVR0OBBYEFJkbxMCn 11 | fKHBvNz73RU9fvmtwnxoMB8GA1UdIwQYMBaAFBd2uuWrjJPA+kncZ4lLkVcJbrj8 12 | MA0GCSqGSIb3DQEBCwUAA4IBAQCPeysFMUfxJkaKiGM95WA9pipu9PUvVih0hJaR 13 | g7RvMyfViGPaFizr1v4DRCoo9IVMoNAW0q+eHdauhrZatDRgHrcK2KQT+q3IQgoK 14 | jucHYJq4KsS8dV8+gf9YZ/RFWDjLYtI0ONab+pG8qoz/B28nlkf+tFtDpoX+fTts 15 | dZJ0BYOtJlfKUMzAD0PMjn6Hh3XBvyWp2MGE+vXU1Bkg1voRaShs1FWfWORaRMwB 16 | fVFGVVO3DGBJUf3jncWyn38Dl9Ey0lUg+C+oyYSHQfuyD5evdi5+OtVo5Gz14PI6 17 | Vs2JQMy5HBNzVM/KkKCXcRsIoHetgHJpyFvh7nz76pq5WOM4 18 | -----END CERTIFICATE----- 19 | -------------------------------------------------------------------------------- /Key/efi_sb_keys/PK.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCrrMqvXPNnwRmq 3 | j8JtLJenqBo/RjjisQdQrsYkmGifz7eyrawQF0bxpwmo+2pfcjjuWDFaEPAt9j4o 4 | YDeVrwwNohQ5pe0MT7zaA5TDlujwxIMboJ3KoDrMg1lOHM5M8bilEJd+NIq7wN38 5 | nFk59KeU9CAun4h9eUvk7F2iT3SRjkxlgrhOz+VjpS2kQiemXOci4RwSJful+1Lb 6 | O6xhId0ekEIC5/uULSLrQaA6+AsxrT1JD+kmcIp1D2symtPw3Yr4QBtTPX/IJOPM 7 | Vhq/Z0UE5gSoN9NRnyPhsBh6NxgF4AGqYkQjHnNA1BlmzBgB1vif6+6/Q8NRkThg 8 | BV1X2yATAgMBAAECggEBAKO64HPvipVhrUDmauAEr37O7Hl8V7SccgWZKpCsatxA 9 | F0rqKDgQezDtxmDLp9/v6CwpIKhtjyPGvfF0Eo9Hq481DWUNws8DHXIwCCmiO/ek 10 | 9AXdYaBmwK1ceEfvYTIxN5D2CgXrxoTapNzPoKmNlGaTjj3pGRvSG3fxlju+28YV 11 | CBj/y5zsQwl9W3f4O69qTQJKpbdAEq3eZ6Frvx7weGh6+gdjvm1M01tiOjy/c9Ql 12 | A8ELpEvMRhkwbQkGJ1SxSMP8cvxs5IR9ZVdP3G2bQTu+8r03MF4pRBgi3KhGEqRr 13 | 8uZoiCjO/BZpd3wqsq0akadubCsC9VoIYBS0XYOCC4ECgYEA4OfBfqpPWZ2Ib9H8 14 | bJVoQ4fugT0sCdsieF1zDHydr50fdUumSIHS1aaahf8kBJtVENTHCHGgaQ2Ts/wP 15 | HDiz7+5ay4us64kUZN9qaOjwoT376lllcwrxtaAS3HdJjchFygODba6boqC/flGx 16 | RbmY2KIsBOL1b6wVq7N7mwcp7GsCgYEAw2kDsDP8CnTAv06JzaVcUzYxpXkcHIcM 17 | zDTEdgoiHLFc/7CdQaHBep2GFY1ojRv+O04daIX0l1bPvBbZG/itEqU3sHfYh3ZE 18 | Y7XiqzJXH6tCYVwusAGiDTsQtu+u4TDtgtcFtDWSOkXzlhyZZp0/q4hyidnA+SBl 19 | lnM+v7HHhPkCgYA4b08pdpj0tsfurzV1FcSU9X4Opgfv7THoHCLrZjW3RGkJaNMv 20 | 7Iu4Gtc5en1SPpwI3iuXXdPPqJ2Ak2ZDQaM9OIVGACWC8OHSMhGkg5cmDsSw2H/R 21 | b1SZq7Iv6irlzfRdLaaEFkVteIK0stEV2u2UppT/IOhPflHtxNrmWtTVQwKBgDLP 22 | jp71lXbejvPvpxNrCQu2Dsi5Kh8c2q4Kln8e+Wm+kLEHqoxTVCze4uudvm7atYuU 23 | Lz9rfYMQlqmQw1lrmw07GrTvJMVscjH/LHZZe6AHdxY70wP/GLUaA6mdvzpc75VS 24 | 9e+68k/muoTw4M522wRuUWIY1f2xd9jcFJfh0UB5AoGAX88VSBbLTXaYzIf2/ua3 25 | Xb5SVvNhd+aMBEhl9D3t10rx3xO0BTDDrKfdrF1S11HLTqmAs8aTJIxXIVDAbma0 26 | m7vPnsPZsfDBlm2SqFCiwy8T7OyCfLARkZjA5QboWsPWReKmYQosaAe5aT+X9k0o 27 | eK7iUt/7sTNiTGL3zYyvc4M= 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /Key/efi_sb_keys/PK.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDBTCCAe2gAwIBAgIJANZMINkyjjzUMA0GCSqGSIb3DQEBCwUAMBkxFzAVBgNV 3 | BAMMDlBLIENlcnRpZmljYXRlMB4XDTE3MDcwNjA2MjEyMFoXDTI3MDcwNDA2MjEy 4 | MFowGTEXMBUGA1UEAwwOUEsgQ2VydGlmaWNhdGUwggEiMA0GCSqGSIb3DQEBAQUA 5 | A4IBDwAwggEKAoIBAQCrrMqvXPNnwRmqj8JtLJenqBo/RjjisQdQrsYkmGifz7ey 6 | rawQF0bxpwmo+2pfcjjuWDFaEPAt9j4oYDeVrwwNohQ5pe0MT7zaA5TDlujwxIMb 7 | oJ3KoDrMg1lOHM5M8bilEJd+NIq7wN38nFk59KeU9CAun4h9eUvk7F2iT3SRjkxl 8 | grhOz+VjpS2kQiemXOci4RwSJful+1LbO6xhId0ekEIC5/uULSLrQaA6+AsxrT1J 9 | D+kmcIp1D2symtPw3Yr4QBtTPX/IJOPMVhq/Z0UE5gSoN9NRnyPhsBh6NxgF4AGq 10 | YkQjHnNA1BlmzBgB1vif6+6/Q8NRkThgBV1X2yATAgMBAAGjUDBOMB0GA1UdDgQW 11 | BBQXdrrlq4yTwPpJ3GeJS5FXCW64/DAfBgNVHSMEGDAWgBQXdrrlq4yTwPpJ3GeJ 12 | S5FXCW64/DAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQBF3GHq4BoN 13 | c5u9a0SSrWREdFllpEO/t+h+jvd9EkXO2Vh0+dx7HcLzYPZ1tVuAP53/ZpB8Fw4z 14 | 8w4/miD8xC1c1Y6HeaIegHGNV03FvFSLXA3cz22dbKT0Zwgui0afX8cj1KdBcMBI 15 | Uize+EUXaPEMznw15F6Ygj/j5Z+A6AnIzW73Kiy6iqbn7nHi3gPpJ/Sx+erQA5M/ 16 | KUjGw382Ll/WyREB82cV9mikgryP8Qbv08W3Iq92EvC1QmMpURGJJ/Sq5z1hmRau 17 | za5CHf9xNf7B43ZnDZqnNd4IrWo2O6m+ngORbDkTvW5lMqyQmB8cgeL7KAi0Q6kf 18 | VlmnYzXKHPxp 19 | -----END CERTIFICATE----- 20 | -------------------------------------------------------------------------------- /Key/efi_sb_keys/ms-DB.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIGEDCCA/igAwIBAgIKYQjTxAAAAAAABDANBgkqhkiG9w0BAQsFADCBkTELMAkG 3 | A1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQx 4 | HjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjE7MDkGA1UEAxMyTWljcm9z 5 | b2Z0IENvcnBvcmF0aW9uIFRoaXJkIFBhcnR5IE1hcmtldHBsYWNlIFJvb3QwHhcN 6 | MTEwNjI3MjEyMjQ1WhcNMjYwNjI3MjEzMjQ1WjCBgTELMAkGA1UEBhMCVVMxEzAR 7 | BgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1p 8 | Y3Jvc29mdCBDb3Jwb3JhdGlvbjErMCkGA1UEAxMiTWljcm9zb2Z0IENvcnBvcmF0 9 | aW9uIFVFRkkgQ0EgMjAxMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB 10 | AKUIbEzHRQlqSwykwId/BnUMQwFUZOAWfwftkn0LsnO/DArGSkVhoMUWLZbT9Sug 11 | +01Jm0GAkDy5VP3mvNGdxKQYin9BilxZg2gyu4xHye5xvCFPmop8/0Q/jY8ysiZI 12 | rnW17slMHkoZfuSCmh14d00MsL32D9MW07z6K6VROF31+7rbeALb/+wKG5bVg7gZ 13 | E+m2wHtAe+EfKCfJ+u9WXhzmfpR+wPBEsnk55dqyYotNvzhw4mgkFMkzpAg31Vhp 14 | XtN87cEEUwjnTrAqh2MIYW9jFVnqsit51wxhZ4pb/V6th3+6hmdPcVgSIgQiIs6L 15 | 71RxAM5QNVh2lQjuarGiAdUCAwEAAaOCAXYwggFyMBIGCSsGAQQBgjcVAQQFAgMB 16 | AAEwIwYJKwYBBAGCNxUCBBYEFPjBa7d/d1NK8yU3HU6hJnsPIHCAMB0GA1UdDgQW 17 | BBQTrb9DCb2CcJyM1U8xbtUimIob1DAZBgkrBgEEAYI3FAIEDB4KAFMAdQBiAEMA 18 | QTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBRFZlJD 19 | 4X5YEb/WTp4jVQg7OiJqqDBcBgNVHR8EVTBTMFGgT6BNhktodHRwOi8vY3JsLm1p 20 | Y3Jvc29mdC5jb20vcGtpL2NybC9wcm9kdWN0cy9NaWNDb3JUaGlQYXJNYXJSb29f 21 | MjAxMC0xMC0wNS5jcmwwYAYIKwYBBQUHAQEEVDBSMFAGCCsGAQUFBzAChkRodHRw 22 | Oi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpL2NlcnRzL01pY0NvclRoaVBhck1hclJv 23 | b18yMDEwLTEwLTA1LmNydDANBgkqhkiG9w0BAQsFAAOCAgEANQhC/zDMzvd2DK0Q 24 | aFg1KUYydid87xJBJ0IbSqptgThIWRNV8+lYNKYWC4KqXa2C2oCDQQaPtB3yA7nz 25 | Gl0b8VCQ+bNVhEIoHCC9sq5RFMXArJeVIRyQ2w/8d56Vc5GIyr29UrkFUA3fV56g 26 | Ye0N5W0l2UAPF0DIzqNKwk2vmhIdCFSPvce8uSs9SSsfMvxqIWlPm8h+QjT8NgYX 27 | i48gQMCzmiV1J83JA6P2XdHnNlR6uVC10xLRB7+7dN/cHo+A1e0Y9C8UFmsv3maM 28 | sCPlx4TY7erBM4KtVksYLfFolQfNz/By8K673YaFmCwhTDMr8A9K8GiHtZJVMnWh 29 | aoJqPKMlEaTtrdcErsvYQFmghNGVTGKRIhp0HYw9Rw5EpuSwmzQ1sfq2U6gsgeyk 30 | BXHInbi66BtEZuRHVA6OVn+znxaYsobQaD6QI7UvXo9QhY3GjYJfQaH0Lg3gmdJs 31 | deS2abUhhvoH0fbiTdHarSx3Ux4lMjfHbFJylYaw8TVhahn1sjuBUFamMi3+oon5 32 | QoYnGFWhgspam/gwmFQUpkeWJS/IJuRBlBpcAj/lluOFWzw+P7tHFnJV4iUisdl7 33 | 5wMGKqP3HpBGwwAN1hmJ4w41J2IDcRWm79AnoKBZN2D4OJS44Hhw+LpMhoeU9uCu 34 | AkXuZcK2o35pFnUHkpv1prxZg1g= 35 | -----END CERTIFICATE----- 36 | -------------------------------------------------------------------------------- /Key/efi_sb_keys/ms-KEK.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIF6DCCA9CgAwIBAgIKYQrRiAAAAAAAAzANBgkqhkiG9w0BAQsFADCBkTELMAkG 3 | A1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQx 4 | HjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjE7MDkGA1UEAxMyTWljcm9z 5 | b2Z0IENvcnBvcmF0aW9uIFRoaXJkIFBhcnR5IE1hcmtldHBsYWNlIFJvb3QwHhcN 6 | MTEwNjI0MjA0MTI5WhcNMjYwNjI0MjA1MTI5WjCBgDELMAkGA1UEBhMCVVMxEzAR 7 | BgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1p 8 | Y3Jvc29mdCBDb3Jwb3JhdGlvbjEqMCgGA1UEAxMhTWljcm9zb2Z0IENvcnBvcmF0 9 | aW9uIEtFSyBDQSAyMDExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA 10 | xOi1ir+tVyawJsPq5/tXekQCXQcN2krldCrmsA/sbevsf7njWmMyfBEXTw7jC6c4 11 | FZOOxvXghLGamyzn9beR1gnh4sAEqKwwHN9I8wZQmmSnUX/IhU+PIIbO/i/hn/+C 12 | wO3pzc70U2piOgtDueIl/f4F+dTEFKsR4iOJjXC3pB1N7K7lnPoWwtfBy9ToxC/l 13 | me4kiwPsjfKL6sNK+0MREgt+tUeSbNzmBInr9TME6xABKnHl+YMTPP8lCS9odkb/ 14 | uk++3K1xKliq+w7SeT3km2U7zCkqn/xyWaLrrpLv9jUTgMYC7ORfzJ12ze9jksGv 15 | eUCEeYd/41Ko6J17B2mPFQIDAQABo4IBTzCCAUswEAYJKwYBBAGCNxUBBAMCAQAw 16 | HQYDVR0OBBYEFGL8Q82gPqTLZxLSW9lVrHvMtopfMBkGCSsGAQQBgjcUAgQMHgoA 17 | UwB1AGIAQwBBMAsGA1UdDwQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQY 18 | MBaAFEVmUkPhflgRv9ZOniNVCDs6ImqoMFwGA1UdHwRVMFMwUaBPoE2GS2h0dHA6 19 | Ly9jcmwubWljcm9zb2Z0LmNvbS9wa2kvY3JsL3Byb2R1Y3RzL01pY0NvclRoaVBh 20 | ck1hclJvb18yMDEwLTEwLTA1LmNybDBgBggrBgEFBQcBAQRUMFIwUAYIKwYBBQUH 21 | MAKGRGh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2kvY2VydHMvTWljQ29yVGhp 22 | UGFyTWFyUm9vXzIwMTAtMTAtMDUuY3J0MA0GCSqGSIb3DQEBCwUAA4ICAQDUhIj1 23 | FJQYAsoqPPsqkhwM16DR8ehSZqjuorV1epAAqi2kdlrqebe5N2pRexBk9uFk8gJn 24 | vveoG3i9us6IWGQM1lfIGaNfBdbbxtBpzkhLMrfrXdIw9cD1uLp4B6Mr/pvbNFaE 25 | 7ILKrkElcJxr6f6QD9eWH+XnlB+yKgyNS/8oKRB799d8pdF2uQXIee0PkJKcwv7f 26 | b35sD3vUwUXdNFGWOQ/lXlbYGAWW9AemQrOgd/0IGfJxVsyfhiOkh8um/Vh+1Gln 27 | FZF+gfJ/E+UNi4o8h4Tr4869Q+WtLYSTjmorWnxE+lKqgcgtHLvgUt8AEfiaPcFg 28 | sOEztaOI0WUZChrnrHykwYKHTjixLw3FFIdv/Y0uvDm25+bD4OTNJ4TvlELvKYuQ 29 | RkE7gRtn2PlDWWXLDbz9AJJP9HU7p6kk/FBBQHngLU8Kaid2blLtlml7rw/3hwXQ 30 | RcKtUxSBH/swBKo3NmHaSmkbNNho7dYCz2yUDNPPbCJ5rbHwvAOiRmCpxAfCIYLx 31 | /fLoeTJgv9ispSIUS8rB2EvrfT9XNbLmT3W0sGADIlOukXkd1ptBHxWGVHCy3g01 32 | D3ywNHK6l2A78HnrorIcXaIWuIfF6Rv2tZclbzif45H6inmYw2kOt6McIAWX+MoU 33 | rgDXxPPAFBB1azSgG7WZYPNcsMVXTjbSMoS/ng== 34 | -----END CERTIFICATE----- 35 | -------------------------------------------------------------------------------- /Key/mok_sb_keys/shim_cert.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCjFOt/PesBGe1H 3 | ZPTP8eBrGk5/r8X32LcQGY4SFkrLV3LpnXLJtCiCP/l4kdPwnaIQycg1NgBrOOEK 4 | JiCSe5aqa72PawSsid+TAU95y4JDno+0H5Y7pTHzCK8yIEC2pKw2ivNDVRNNcRFa 5 | ZPxU5UbjkI8NWVuygDHEetgQu8Mv5S3Dzce0+UCxvgfxbhF8eI8HyMZiVsjZ8eDb 6 | pHpsz1grTW4jyOhP1pSuw2xuHZonQ4sIFHp5wW0lVOugG4IpWNTxKJqGWgYUzZYU 7 | am5ObPsrc1QQK5VK3716rJutQaH3bFLB2hZLz8fIN3LQkapFE6/bVzzaHfTl33Lk 8 | FUJcKuD9AgMBAAECggEAcxunBY78uzBDrOrzaXs+fhp5YeL9hu0ueWywPNADRveY 9 | opCBnyFMnnLtcU7tG58H73WdnQFa1lO1c+Zpgzs8o1mc2QgeqnI+npKEOGGOto/K 10 | usa40azOTs7Iakcdpk0hSPZWsiXwk+7E4tr4yCt1F9bHQhLaiGm3twlGTLlbEgg+ 11 | hhLuFX2QQynP1C/eLHkW0ovqkpPMoniBnYTRh6fr0KDTkr/0c5erd4XN2WU0CWZ7 12 | NKfhxq41386qa7C0CirG9rJmsjFoAU+RPLcmPDk4jNeZv2Ubuf6/MKN+D6J7kxF9 13 | gD5rWx6SH4MhyRy7Qkh2jqJR2W+0IKdRGgMZuWAbQQKBgQDZGeoOEY9iaeJe0agR 14 | /Iu7OQSkzErRO3ZPacGKV9KrfcwZT80hpMP9uMc+eJaWikFSuNPXMoUAwVwIt3yN 15 | U3mLvlvz0K2pzW4h690U26tNyrZD0sIvtD8094nsh8G+LB3ugDEMdCemcQZ3qc/5 16 | qkcstBVQzPjUXCbvMa7+eEL7VQKBgQDATTecgQxaZa/V5Udil8JlK6AkS4392Vwq 17 | r6U/gYETvkUseaVs1wkTe/5itx5BWWlOqU9HYrraqhkr5wsB1gAha/LoJHpf6pQA 18 | 1ey7MkZ7b+a+XJvRa9hjgMkD+qxPvw8IgFRsTx4wg80Jpktd+Up82XEuaFFK0S5f 19 | JE2Ej13fCQKBgEsQjsD2iWE5wy+NxlMRwy6k9FoW2PenW6zxoB25Z/orsNo/oWm0 20 | kp+zuBB9mXPLsfJsPbL2oM42DSBmcQZcinYrB5gx2xoPEblg2DxSB9UJ9iNVSBc+ 21 | d2xU+rdx6SdcEa1ZXZw0vVDrW5UcffCRU7K9QXGCrbafdkbWIu+RnXdRAoGAeBxC 22 | zef0tUmqSClLKxOrAdH71m+yoolu/eJzjnTvEEvZnOvmHVM6ggcCXtoNdbfJBK7P 23 | q8DJAOcZjchjoaPutPFd6Q1PujUkeFkl4c6HI3ZDY0cos+duYsf/xhJ+KdkmJKMz 24 | F+ta6eaI3KwXivy4P7746ImTrO12z0o3eMKrWTECgYEAvTJTd0LScoqDf3WFtw6Q 25 | pFMb4cQZlTLrAR07gGhYDeriKtAR89D+mdaOQ+SxF9m6KYGhZ0Z6AatRqtPPnDXi 26 | Y6n0er1czbiN25ZsGuNclhuDoORg8oVoUa5mZXaCrE0icmiRRmk5Kph/Tbj8/o6P 27 | RWctcF1chdznrGfIHKIxV7M= 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /Key/mok_sb_keys/shim_cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDCTCCAfGgAwIBAgIJAKNVCEpNTSysMA0GCSqGSIb3DQEBCwUAMBsxGTAXBgNV 3 | BAMMEFNoaW0gQ2VydGlmaWNhdGUwHhcNMTcwNzA2MDYyMTIwWhcNMjcwNzA0MDYy 4 | MTIwWjAbMRkwFwYDVQQDDBBTaGltIENlcnRpZmljYXRlMIIBIjANBgkqhkiG9w0B 5 | AQEFAAOCAQ8AMIIBCgKCAQEAoxTrfz3rARntR2T0z/HgaxpOf6/F99i3EBmOEhZK 6 | y1dy6Z1yybQogj/5eJHT8J2iEMnINTYAazjhCiYgknuWqmu9j2sErInfkwFPecuC 7 | Q56PtB+WO6Ux8wivMiBAtqSsNorzQ1UTTXERWmT8VOVG45CPDVlbsoAxxHrYELvD 8 | L+Utw83HtPlAsb4H8W4RfHiPB8jGYlbI2fHg26R6bM9YK01uI8joT9aUrsNsbh2a 9 | J0OLCBR6ecFtJVTroBuCKVjU8SiahloGFM2WFGpuTmz7K3NUECuVSt+9eqybrUGh 10 | 92xSwdoWS8/HyDdy0JGqRROv21c82h305d9y5BVCXCrg/QIDAQABo1AwTjAdBgNV 11 | HQ4EFgQUtfi+ViMoUcVErE+hYlacRF26ulMwHwYDVR0jBBgwFoAUtfi+ViMoUcVE 12 | rE+hYlacRF26ulMwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAgp85 13 | TkndXh9wKL0bm8zdgIinFc1v2/ktgj2lMCGUrQmPSPa5sgxTD0dY2xSFqbVfrgK4 14 | /CPAaCm1mH74eZi5vKq6xopZehuOktQecRWAKty4sK03D/86SljjWm1AYKvLktVk 15 | O366dcxywUiJWDw1cx4KHJ0MqtRVbhUtk3zhZL+RD3QX0wcavAYAt0Weh2Dg6HiT 16 | QhVvNUaL2bKYZt3WC3VZ1/Y8bpELUlhOQhljDatUq5p5HIFxZY/TRB9GLZNmJ6rj 17 | ogizRvwGzAs+lN54vEQT+kJS5fiLGMmx8gYfk9mqkLErO6l2f/78loyoYHn3kDo6 18 | p0sBFq2xbHVtzieNPw== 19 | -----END CERTIFICATE----- 20 | -------------------------------------------------------------------------------- /Key/mok_sb_keys/vendor_cert.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDHYR3+Fnigq0Un 3 | MAtkEyrYaYCthUjqfLh+XeZzUcVEiQIY0sYQ9obC0rNTgd59o/4Ef+/DHp6gdecp 4 | 55aM/INwl4/9rwQie8CEk7WULQNsfpEnG6XgHbkCbwIoP4badM3jLoNjI06Y6E8s 5 | 12w93xs06EtRON+LH+YvzfD4IN/0mYPt5u1CJbcUvhAIGJ2mp+fopRcHeJmpd4Do 6 | ewtkVvDVMPD0xWE3LGIvrCVSz6CdJrrhNUts5Iy4E2TIv6o7IyqoXX6O1jMk5mUA 7 | 1V3C6Or3KQzVInnEsjp1rMW8kX5o0heGC1eKozXgKQ3zMpgXDplulmR2EhmZyFT+ 8 | syP2yQp1AgMBAAECggEALHZc8Ofj+LiZEFcngya/HEnS119s1lX/8rZQCRGIM3N2 9 | U0DVyLyhatsAALRqgIxMvoYlWtb+OvxwE6lAqqo5SaeTBdi8zE/aq/YgvS2YoN5M 10 | 0nLY9/TI6GEHEyCvmxIHRA2AYWBjS7gqx+42hkm10IOpIDDVsTno5GpBvaPfLbWU 11 | /esFvtZd6OYu18BI3DcP474I3uZoqW2wlBDLNLwdFX58E7tBQpaip4SPDs1nLvxi 12 | XqNrZuVFol1JMzUj+uF3OYd5xt6IcLNaigtUESlHXXn1g7uNJ1SoLyY0guPBLWBR 13 | uhjLjZtF2yqGLoPDWOGXMU/qVf0lmtN+ZPCBlwA+FQKBgQD+MhfoRdu2zOs+eIFi 14 | gecHVwXUv7KA4KXG+zDr1n928J6+Mg2dxfSXwiQc2Ph4wwBBN4CB/XY3eYMH2umo 15 | X3AR+uaViVRkkc6RRZpu052nIq/Nle3b2wQoSWMkpq6mCy4F5EEni7ax/yaE04Er 16 | Z52zflXt6Hc5U2RlQD5T7mPslwKBgQDIy2pXisOn6AsD51zJPoDw6jh69s8OJ6ng 17 | bpIKTC9pMHEHrzLrnBl7vf9PBmr1QibfNEfsMxNhG/iBNs19txmv7jW1mvNFk23z 18 | RWsQ6F54l9yZcYdQJImyv3PL+ytPCT0ouof29LKLt/H1jHhOdWAvt/hfVAnC1KNb 19 | 5jPRbNqG0wKBgDYNkOfjcwU8LgnqthisZuQ4rRTAbsTZAGd/oreDtTclk5v+KMcU 20 | AR8EOYmo2a1USgmUM89whmLlg+d3tZgIM1yfbcj+muOH3dUmZ+CJP0z7I0ckSqAl 21 | woyOjnaMuzazyeWW1AQEwaS4DQjRsPX54p74jm04saGPCho9vwM5/iWhAoGBAJi1 22 | 9Bu+Qo3Jsc73QB8h9UjEqc4DNXhLfCxfi5xfUtOKbvxsJ6r/XnY5CxpcBC6hcBTj 23 | myutsLhzYG1Nc71/6v5dieWjgg9RUBbrncEPKQJIZRMiP8oY78zNRNFHJioHGceH 24 | De8pLT2L2W5ptfnd1RiVr0U5Ee9mbxNuocxOIGjXAoGBALMOrGLRtBtIZtpgq89s 25 | 7DqjYE368DU7BvX9xoXdXyYMppWgOl1gDzGTciRNBtDNBnb3Ghgl5WwXstK/sJVW 26 | YbOGAgqI1Hjr87UsHVP2DsR7Rp3hOfPDkxV+3enOO3ToeaJHQU2niXk+OQMbAz9p 27 | KgPJV95YnQYwPFQ4z43KfjTz 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /Key/mok_sb_keys/vendor_cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDDTCCAfWgAwIBAgIJAIE/WGjlT4JGMA0GCSqGSIb3DQEBCwUAMB0xGzAZBgNV 3 | BAMMElZlbmRvciBDZXJ0aWZpY2F0ZTAeFw0xNzA3MDYwNjIxMjBaFw0yNzA3MDQw 4 | NjIxMjBaMB0xGzAZBgNVBAMMElZlbmRvciBDZXJ0aWZpY2F0ZTCCASIwDQYJKoZI 5 | hvcNAQEBBQADggEPADCCAQoCggEBAMdhHf4WeKCrRScwC2QTKthpgK2FSOp8uH5d 6 | 5nNRxUSJAhjSxhD2hsLSs1OB3n2j/gR/78MenqB15ynnloz8g3CXj/2vBCJ7wIST 7 | tZQtA2x+kScbpeAduQJvAig/htp0zeMug2MjTpjoTyzXbD3fGzToS1E434sf5i/N 8 | 8Pgg3/SZg+3m7UIltxS+EAgYnaan5+ilFwd4mal3gOh7C2RW8NUw8PTFYTcsYi+s 9 | JVLPoJ0muuE1S2zkjLgTZMi/qjsjKqhdfo7WMyTmZQDVXcLo6vcpDNUiecSyOnWs 10 | xbyRfmjSF4YLV4qjNeApDfMymBcOmW6WZHYSGZnIVP6zI/bJCnUCAwEAAaNQME4w 11 | HQYDVR0OBBYEFOda4u+vhfoucO/XL7DRxMzLlQ7tMB8GA1UdIwQYMBaAFOda4u+v 12 | hfoucO/XL7DRxMzLlQ7tMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEB 13 | AB28MEuqfVLcN/v6TZTvy5lOB7Bh/L5Q75hKPwHgTC8gDYkHjLY8TzhyiAkNmvln 14 | Ys3KOeUsl+eIJ4m68yehfxtgphTIGYwMeKF2BuHlM22Wb9PriBMbB5iSBZc3IbEF 15 | 5s9T6YfTHBwTtnw+VhmaO6gMeqSskOq3rEG80sJX3lesOdJCXbB4QQTy0o5xmbC6 16 | leMslnXN4VRQLShTjKO//LrtUlBN7jk0CRahhoU+b51qaexK/oUQRoRKJvv+OYiX 17 | 4SeRs7aGegnabmY2WZC0E+t0iSqbGwz/vqKihYVAfHjUK1aaLtoqzZQiVKnw4WbT 18 | CTsmI5APRaOAbE37MU0g08s= 19 | -----END CERTIFICATE----- 20 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017, Wind River Systems, Inc. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, are permitted 5 | provided that the following conditions are met: 6 | 7 | - Redistributions of source code must retain the above copyright notice, this list of 8 | conditions and the following disclaimer. 9 | - Redistributions in binary form must reproduce the above copyright notice, this list 10 | of conditions and the following disclaimer in the documentation and/or other materials 11 | provided with the distribution. 12 | - Neither the name of the copyright holder nor the names of its contributors may be used 13 | to endorse or promote products derived from this software without specific prior written 14 | permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS 17 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 18 | AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 19 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 22 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 23 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /LICENSE.edk2: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012, Intel Corporation. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in 11 | the documentation and/or other materials provided with the 12 | distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 15 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 16 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 17 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 18 | COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 19 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 20 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 22 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 24 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 | POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /MAINTAINERS: -------------------------------------------------------------------------------- 1 | Jia Zhang 2 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | include Version.mk 2 | include Env.mk 3 | 4 | TOPDIR := $(shell pwd) 5 | export TOPDIR 6 | 7 | SUBDIRS := Bin Src 8 | 9 | .DEFAULT_GOAL := all 10 | .PHONE: all clean install tag 11 | 12 | all clean install: 13 | @for x in $(SUBDIRS); do $(MAKE) -C $$x $@ || exit $?; done 14 | 15 | tag: 16 | @$(GIT) tag -a $(SEL_VERSION) -m $(SEL_VERSION) refs/heads/master 17 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | Version 0.4.6 2 | ============= 3 | Released: 2018-07-17 4 | 5 | - Fix compile errors with gnu-efi. 6 | - Initialize AllowedDB when PKCS7 protocol is provided by BIOS. 7 | - Rework SecurityPolicy. 8 | - Define EXPERIMENTAL_BUILD to exclude the experimental codes. 9 | - Update edk2 drivers. 10 | - Replace all sample keys. 11 | - Add .github/CODEOWNERS 12 | - Re-licensed under BSD 3-clause 13 | 14 | Version 0.4.5 15 | ============= 16 | Released: 2017-05-09 17 | 18 | - Improve the messages printed during the boot. 19 | - Fix build failures for ia32. 20 | - Fix invalid path delimiter in loaded image's path when launched from 21 | UEFI shell. 22 | 23 | Version 0.4.4 24 | ============= 25 | Released: 2017-04-10 26 | 27 | - Support UEFI Secure Boot only mode. 28 | 29 | Version 0.4.3 30 | ============= 31 | Released: 2017-04-09 32 | 33 | - Fix a critical system hang issue with KVM. 34 | - Add the pre-built OVMF image. 35 | 36 | Version 0.4.2 37 | ============= 38 | Released: 2017-04-04 39 | 40 | - Duplicate MOK Verify Protocol in order to verify the PE image during 41 | StartImage(). 42 | - Use MokListRT and MokListXRT as the whitelist and blacklist used by 43 | the EFI Pkcs7 Verify Protocol. 44 | 45 | Version 0.4.1 46 | ============= 47 | Released: 2017-03-31 48 | 49 | - Critical bug fixes. 50 | 51 | Version 0.4.0 52 | ============= 53 | Released: 2017-03-30 54 | 55 | - Support to use MokVerify Protocol to verify PE image. 56 | - Fully support .p7a/.p7b/.p7s signature. 57 | 58 | Version 0.3.0 59 | ============= 60 | Released: 2017-03-27 61 | 62 | - Mok2Verify now supports its first interface Mok2VerifyFile() to verify a 63 | file specified by the path parameter. 64 | 65 | Version 0.2.1 66 | ============= 67 | Released: 2017-03-18 68 | 69 | - Support the initial MOK2 Verify Protocol 70 | 71 | Version 0.2.0 72 | ============= 73 | Released: 2017-03-14 74 | 75 | - Support the SELoader signature format 76 | 77 | Version 0.1.2 78 | ============= 79 | Released: 2017-03-12 80 | 81 | - Implement the trace mode. 82 | 83 | Version 0.1.1 84 | ============= 85 | Released: 2017-03-10 86 | 87 | - Add the initial verification support for the PKCS#7 attached signature. 88 | 89 | Version 0.1.0 90 | ============= 91 | Released: 2017-03-08 92 | 93 | - Initial 0.1.0 release. 94 | -------------------------------------------------------------------------------- /Rules.mk: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/Version.mk 2 | 3 | .DEFAULT_GOAL := all 4 | .PHONE: all clean install 5 | 6 | SUFFIXES += .efi .efi.signed 7 | 8 | %.so: %.o 9 | $(LD) $(LDFLAGS) -o $@ --start-group $^ \ 10 | $(LIB_GCC) -lgnuefi -lefi --end-group 11 | @echo '--------------- List unresolved symbols ---------------' 12 | @! $(NM) $@ | grep -iw u 13 | @echo '-------------------------------------------------------' 14 | 15 | %.efi: %.so 16 | @$(OBJCOPY) -j .text -j .sdata -j .data \ 17 | -j .dynamic -j .dynsym -j .rel* \ 18 | -j .rela* -j .reloc -j .eh_frame \ 19 | -j .debug_info -j .debug_abbrev -j .debug_aranges \ 20 | -j .debug_line -j .debug_str -j .debug_ranges \ 21 | -j .note.gnu.build-id \ 22 | $^ $@.debug 23 | @$(OBJCOPY) -j .text -j .sdata -j .data -j .data.ident \ 24 | -j .dynamic -j .dynsym -j .rel* \ 25 | -j .rela* -j .reloc -j .eh_frame \ 26 | --target efi-app-$(ARCH) $^ $@ 27 | 28 | %.efi.signed: %.efi $(SIGNING_CERT) $(SIGNING_KEY) 29 | $(SBSIGN) --cert $(SIGNING_CERT) \ 30 | --key $(SIGNING_KEY) $< 2>/dev/null || { \ 31 | echo "Failed to sign $<"; \ 32 | exit 1; \ 33 | } 34 | -------------------------------------------------------------------------------- /Src/Efi/BuildInfo.c.in: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, Wind River Systems, Inc. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1) Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2) Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * 3) Neither the name of Wind River Systems nor the names of its contributors 15 | * may be used to endorse or promote products derived from this software 16 | * without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | * POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * Author: 31 | * Jia Zhang 32 | */ 33 | 34 | #include 35 | 36 | CONST CHAR16 *GitCommit = L"@@GIT_COMMIT@@"; 37 | CONST CHAR16 *BuildMachine = L"@@BUILD_MACHINE@@"; 38 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/Acpi.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | GUIDs used for ACPI entries in the EFI system table 3 | 4 | These GUIDs point the ACPI tables as defined in the ACPI specifications. 5 | ACPI 2.0 specification defines the ACPI 2.0 GUID. UEFI 2.0 defines the 6 | ACPI 2.0 Table GUID and ACPI Table GUID. 7 | 8 | Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
9 | This program and the accompanying materials 10 | are licensed and made available under the terms and conditions of the BSD License 11 | which accompanies this distribution. The full text of the license may be found at 12 | http://opensource.org/licenses/bsd-license.php 13 | 14 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 16 | 17 | @par Revision Reference: 18 | GUIDs defined in UEFI 2.0 spec. 19 | 20 | **/ 21 | 22 | #ifndef __ACPI_GUID_H__ 23 | #define __ACPI_GUID_H__ 24 | 25 | #define ACPI_TABLE_GUID \ 26 | { \ 27 | 0xeb9d2d30, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ 28 | } 29 | 30 | #define EFI_ACPI_TABLE_GUID \ 31 | { \ 32 | 0x8868e871, 0xe4f1, 0x11d3, {0xbc, 0x22, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \ 33 | } 34 | 35 | #define ACPI_10_TABLE_GUID ACPI_TABLE_GUID 36 | 37 | // 38 | // ACPI 2.0 or newer tables should use EFI_ACPI_TABLE_GUID. 39 | // 40 | #define EFI_ACPI_20_TABLE_GUID EFI_ACPI_TABLE_GUID 41 | 42 | extern EFI_GUID gEfiAcpiTableGuid; 43 | extern EFI_GUID gEfiAcpi10TableGuid; 44 | extern EFI_GUID gEfiAcpi20TableGuid; 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/Apriori.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | GUID used as an FV filename for A Priori file. The A Priori file contains a 3 | list of FV filenames that the DXE dispatcher will schedule reguardless of 4 | the dependency grammar. 5 | 6 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
7 | This program and the accompanying materials 8 | are licensed and made available under the terms and conditions of the BSD License 9 | which accompanies this distribution. The full text of the license may be found at 10 | http://opensource.org/licenses/bsd-license.php 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 14 | 15 | @par Revision Reference: 16 | GUID introduced in PI Version 1.0. 17 | 18 | **/ 19 | 20 | #ifndef __APRIORI_GUID_H__ 21 | #define __APRIORI_GUID_H__ 22 | 23 | #define EFI_APRIORI_GUID \ 24 | { \ 25 | 0xfc510ee7, 0xffdc, 0x11d4, {0xbd, 0x41, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } \ 26 | } 27 | 28 | extern EFI_GUID gAprioriGuid; 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/AprioriFileName.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | The GUID PEI_APRIORI_FILE_NAME_GUID definition is the file 3 | name of the PEI a priori file that is stored in a firmware 4 | volume. 5 | 6 | Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
7 | This program and the accompanying materials 8 | are licensed and made available under the terms and conditions of the BSD License 9 | which accompanies this distribution. The full text of the license may be found at 10 | http://opensource.org/licenses/bsd-license.php 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 14 | 15 | @par Revision Reference: 16 | GUID introduced in PI Version 1.0. 17 | 18 | **/ 19 | 20 | #ifndef __PEI_APRIORI_FILE_NAME_H__ 21 | #define __PEI_APRIORI_FILE_NAME_H__ 22 | 23 | #define PEI_APRIORI_FILE_NAME_GUID \ 24 | { 0x1b45cc0a, 0x156a, 0x428a, { 0x62, 0XAF, 0x49, 0x86, 0x4d, 0xa0, 0xe6, 0xe6 } } 25 | 26 | 27 | /// 28 | /// This file must be of type EFI_FV_FILETYPE_FREEFORM and must 29 | /// contain a single section of type EFI_SECTION_RAW. For details on 30 | /// firmware volumes, firmware file types, and firmware file section 31 | /// types. 32 | /// 33 | typedef struct { 34 | /// 35 | /// An array of zero or more EFI_GUID type entries that match the file names of PEIM 36 | /// modules in the same Firmware Volume. The maximum number of entries. 37 | /// 38 | EFI_GUID FileNamesWithinVolume[1]; 39 | } PEI_APRIORI_FILE_CONTENTS; 40 | 41 | extern EFI_GUID gPeiAprioriFileNameGuid; 42 | 43 | #endif 44 | 45 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/DxeServices.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | GUID used to identify the DXE Services Table 3 | 4 | Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials 6 | are licensed and made available under the terms and conditions of the BSD License 7 | which accompanies this distribution. The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | @par Revision Reference: 14 | GUID introduced in PI Version 1.0. 15 | 16 | **/ 17 | 18 | #ifndef __DXE_SERVICES_GUID_H__ 19 | #define __DXE_SERVICES_GUID_H__ 20 | 21 | #define DXE_SERVICES_TABLE_GUID \ 22 | { \ 23 | 0x5ad34ba, 0x6f02, 0x4214, {0x95, 0x2e, 0x4d, 0xa0, 0x39, 0x8e, 0x2b, 0xb9 } \ 24 | } 25 | 26 | extern EFI_GUID gEfiDxeServicesTableGuid; 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/EventGroup.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | GUIDs for gBS->CreateEventEx Event Groups. Defined in UEFI spec 2.0 and PI 1.2.1. 3 | 4 | Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials are licensed and made available under 6 | the terms and conditions of the BSD License that accompanies this distribution. 7 | The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php. 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | **/ 14 | 15 | #ifndef __EVENT_GROUP_GUID__ 16 | #define __EVENT_GROUP_GUID__ 17 | 18 | 19 | #define EFI_EVENT_GROUP_EXIT_BOOT_SERVICES \ 20 | { 0x27abf055, 0xb1b8, 0x4c26, { 0x80, 0x48, 0x74, 0x8f, 0x37, 0xba, 0xa2, 0xdf } } 21 | 22 | extern EFI_GUID gEfiEventExitBootServicesGuid; 23 | 24 | 25 | #define EFI_EVENT_GROUP_VIRTUAL_ADDRESS_CHANGE \ 26 | { 0x13fa7698, 0xc831, 0x49c7, { 0x87, 0xea, 0x8f, 0x43, 0xfc, 0xc2, 0x51, 0x96 } } 27 | 28 | extern EFI_GUID gEfiEventVirtualAddressChangeGuid; 29 | 30 | 31 | #define EFI_EVENT_GROUP_MEMORY_MAP_CHANGE \ 32 | { 0x78bee926, 0x692f, 0x48fd, { 0x9e, 0xdb, 0x1, 0x42, 0x2e, 0xf0, 0xd7, 0xab } } 33 | 34 | extern EFI_GUID gEfiEventMemoryMapChangeGuid; 35 | 36 | 37 | #define EFI_EVENT_GROUP_READY_TO_BOOT \ 38 | { 0x7ce88fb3, 0x4bd7, 0x4679, { 0x87, 0xa8, 0xa8, 0xd8, 0xde, 0xe5, 0x0d, 0x2b } } 39 | 40 | extern EFI_GUID gEfiEventReadyToBootGuid; 41 | 42 | #define EFI_EVENT_GROUP_DXE_DISPATCH_GUID \ 43 | { 0x7081e22f, 0xcac6, 0x4053, { 0x94, 0x68, 0x67, 0x57, 0x82, 0xcf, 0x88, 0xe5 }} 44 | 45 | extern EFI_GUID gEfiEventDxeDispatchGuid; 46 | 47 | #define EFI_END_OF_DXE_EVENT_GROUP_GUID \ 48 | { 0x2ce967a, 0xdd7e, 0x4ffc, { 0x9e, 0xe7, 0x81, 0xc, 0xf0, 0x47, 0x8, 0x80 } } 49 | 50 | extern EFI_GUID gEfiEndOfDxeEventGroupGuid; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/EventLegacyBios.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | GUID is the name of events used with CreateEventEx in order to be notified 3 | when the EFI boot manager is about to boot a legacy boot option. 4 | Events of this type are notificated just before Int19h is invoked. 5 | 6 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
7 | This program and the accompanying materials 8 | are licensed and made available under the terms and conditions of the BSD License 9 | which accompanies this distribution. The full text of the license may be found at 10 | http://opensource.org/licenses/bsd-license.php 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 14 | 15 | @par Revision Reference: 16 | GUID introduced in PI Version 1.0. 17 | 18 | **/ 19 | 20 | #ifndef __EVENT_LEGACY_BIOS_GUID_H__ 21 | #define __EVENT_LEGACY_BIOS_GUID_H__ 22 | 23 | #define EFI_EVENT_LEGACY_BOOT_GUID \ 24 | { 0x2a571201, 0x4966, 0x47f6, {0x8b, 0x86, 0xf3, 0x1e, 0x41, 0xf3, 0x2f, 0x10 } } 25 | 26 | extern EFI_GUID gEfiEventLegacyBootGuid; 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/FileSystemVolumeLabelInfo.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Provides a GUID and a data structure that can be used with EFI_FILE_PROTOCOL.GetInfo() 3 | or EFI_FILE_PROTOCOL.SetInfo() to get or set the system's volume label. 4 | This GUID is defined in UEFI specification. 5 | 6 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
7 | This program and the accompanying materials 8 | are licensed and made available under the terms and conditions of the BSD License 9 | which accompanies this distribution. The full text of the license may be found at 10 | http://opensource.org/licenses/bsd-license.php 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 14 | 15 | **/ 16 | 17 | #ifndef __FILE_SYSTEM_VOLUME_LABEL_INFO_H__ 18 | #define __FILE_SYSTEM_VOLUME_LABEL_INFO_H__ 19 | 20 | #define EFI_FILE_SYSTEM_VOLUME_LABEL_ID \ 21 | { \ 22 | 0xDB47D7D3, 0xFE81, 0x11d3, {0x9A, 0x35, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } \ 23 | } 24 | 25 | typedef struct { 26 | /// 27 | /// The Null-terminated string that is the volume's label. 28 | /// 29 | CHAR16 VolumeLabel[1]; 30 | } EFI_FILE_SYSTEM_VOLUME_LABEL; 31 | 32 | #define SIZE_OF_EFI_FILE_SYSTEM_VOLUME_LABEL \ 33 | OFFSET_OF (EFI_FILE_SYSTEM_VOLUME_LABEL, VolumeLabel) 34 | 35 | extern EFI_GUID gEfiFileSystemVolumeLabelInfoIdGuid; 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/FirmwareContentsSigned.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | GUID is used to define the signed section. 3 | 4 | Copyright (c) 2013, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials 6 | are licensed and made available under the terms and conditions of the BSD License 7 | which accompanies this distribution. The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | @par Revision Reference: 14 | GUID introduced in PI Version 1.2.1. 15 | 16 | **/ 17 | 18 | #ifndef __FIRMWARE_CONTENTS_SIGNED_GUID_H__ 19 | #define __FIRMWARE_CONTENTS_SIGNED_GUID_H__ 20 | 21 | #define EFI_FIRMWARE_CONTENTS_SIGNED_GUID \ 22 | { 0xf9d89e8, 0x9259, 0x4f76, {0xa5, 0xaf, 0xc, 0x89, 0xe3, 0x40, 0x23, 0xdf } } 23 | 24 | extern EFI_GUID gEfiFirmwareContentsSignedGuid; 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/FirmwareFileSystem2.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Guid used to define the Firmware File System 2. 3 | 4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials 6 | are licensed and made available under the terms and conditions of the BSD License 7 | which accompanies this distribution. The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | @par Revision Reference: 14 | GUIDs introduced in PI Version 1.0. 15 | 16 | **/ 17 | 18 | #ifndef __FIRMWARE_FILE_SYSTEM2_GUID_H__ 19 | #define __FIRMWARE_FILE_SYSTEM2_GUID_H__ 20 | 21 | /// 22 | /// The firmware volume header contains a data field for 23 | /// the file system GUID 24 | /// 25 | #define EFI_FIRMWARE_FILE_SYSTEM2_GUID \ 26 | { 0x8c8ce578, 0x8a3d, 0x4f1c, { 0x99, 0x35, 0x89, 0x61, 0x85, 0xc3, 0x2d, 0xd3 } } 27 | 28 | /// 29 | /// A Volume Top File (VTF) is a file that must be 30 | /// located such that the last byte of the file is 31 | /// also the last byte of the firmware volume 32 | /// 33 | #define EFI_FFS_VOLUME_TOP_FILE_GUID \ 34 | { 0x1BA0062E, 0xC779, 0x4582, { 0x85, 0x66, 0x33, 0x6A, 0xE8, 0xF7, 0x8F, 0x9 } } 35 | 36 | 37 | extern EFI_GUID gEfiFirmwareFileSystem2Guid; 38 | extern EFI_GUID gEfiFirmwareVolumeTopFileGuid; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/FirmwareFileSystem3.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Guid used to define the Firmware File System 3. 3 | 4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials 6 | are licensed and made available under the terms and conditions of the BSD License 7 | which accompanies this distribution. The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | @par Revision Reference: 14 | GUIDs introduced in PI Version 1.0. 15 | 16 | **/ 17 | 18 | #ifndef __FIRMWARE_FILE_SYSTEM3_GUID_H__ 19 | #define __FIRMWARE_FILE_SYSTEM3_GUID_H__ 20 | 21 | /// 22 | /// The firmware volume header contains a data field for the file system GUID 23 | /// {5473C07A-3DCB-4dca-BD6F-1E9689E7349A} 24 | /// 25 | #define EFI_FIRMWARE_FILE_SYSTEM3_GUID \ 26 | { 0x5473c07a, 0x3dcb, 0x4dca, { 0xbd, 0x6f, 0x1e, 0x96, 0x89, 0xe7, 0x34, 0x9a }} 27 | 28 | extern EFI_GUID gEfiFirmwareFileSystem3Guid; 29 | 30 | #endif // __FIRMWARE_FILE_SYSTEM3_GUID_H__ 31 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/Gpt.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Guids used for the GPT (GUID Partition Table) 3 | 4 | GPT defines a new disk partitioning scheme and also describes 5 | usage of the legacy Master Boot Record (MBR) partitioning scheme. 6 | 7 | Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.
8 | This program and the accompanying materials 9 | are licensed and made available under the terms and conditions of the BSD License 10 | which accompanies this distribution. The full text of the license may be found at 11 | http://opensource.org/licenses/bsd-license.php 12 | 13 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 15 | 16 | @par Revision Reference: 17 | GUIDs defined in UEFI 2.1 spec. 18 | 19 | **/ 20 | 21 | #ifndef __GPT_GUID_H__ 22 | #define __GPT_GUID_H__ 23 | 24 | #define EFI_PART_TYPE_UNUSED_GUID \ 25 | { \ 26 | 0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } \ 27 | } 28 | 29 | #define EFI_PART_TYPE_EFI_SYSTEM_PART_GUID \ 30 | { \ 31 | 0xc12a7328, 0xf81f, 0x11d2, {0xba, 0x4b, 0x00, 0xa0, 0xc9, 0x3e, 0xc9, 0x3b } \ 32 | } 33 | 34 | #define EFI_PART_TYPE_LEGACY_MBR_GUID \ 35 | { \ 36 | 0x024dee41, 0x33e7, 0x11d3, {0x9d, 0x69, 0x00, 0x08, 0xc7, 0x81, 0xf3, 0x9f } \ 37 | } 38 | 39 | extern EFI_GUID gEfiPartTypeUnusedGuid; 40 | extern EFI_GUID gEfiPartTypeSystemPartGuid; 41 | extern EFI_GUID gEfiPartTypeLegacyMbrGuid; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/GraphicsInfoHob.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Hob guid for Information about the graphics mode. 3 | 4 | Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials 6 | are licensed and made available under the terms and conditions of the BSD License 7 | which accompanies this distribution. The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | @par Revision Reference: 14 | This HOB is introduced in in PI Version 1.4. 15 | 16 | **/ 17 | 18 | #ifndef _GRAPHICS_INFO_HOB_GUID_H_ 19 | #define _GRAPHICS_INFO_HOB_GUID_H_ 20 | 21 | #include 22 | 23 | #define EFI_PEI_GRAPHICS_INFO_HOB_GUID \ 24 | { \ 25 | 0x39f62cce, 0x6825, 0x4669, { 0xbb, 0x56, 0x54, 0x1a, 0xba, 0x75, 0x3a, 0x07 } \ 26 | } 27 | 28 | #define EFI_PEI_GRAPHICS_DEVICE_INFO_HOB_GUID \ 29 | { \ 30 | 0xe5cb2ac9, 0xd35d, 0x4430, { 0x93, 0x6e, 0x1d, 0xe3, 0x32, 0x47, 0x8d, 0xe7 } \ 31 | } 32 | 33 | typedef struct { 34 | EFI_PHYSICAL_ADDRESS FrameBufferBase; 35 | UINT32 FrameBufferSize; 36 | EFI_GRAPHICS_OUTPUT_MODE_INFORMATION GraphicsMode; 37 | } EFI_PEI_GRAPHICS_INFO_HOB; 38 | 39 | typedef struct { 40 | UINT16 VendorId; ///< Ignore if the value is 0xFFFF. 41 | UINT16 DeviceId; ///< Ignore if the value is 0xFFFF. 42 | UINT16 SubsystemVendorId; ///< Ignore if the value is 0xFFFF. 43 | UINT16 SubsystemId; ///< Ignore if the value is 0xFFFF. 44 | UINT8 RevisionId; ///< Ignore if the value is 0xFF. 45 | UINT8 BarIndex; ///< Ignore if the value is 0xFF. 46 | } EFI_PEI_GRAPHICS_DEVICE_INFO_HOB; 47 | 48 | extern EFI_GUID gEfiGraphicsInfoHobGuid; 49 | extern EFI_GUID gEfiGraphicsDeviceInfoHobGuid; 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/HardwareErrorVariable.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | GUID for hardware error record variables. 3 | 4 | Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials 6 | are licensed and made available under the terms and conditions of the BSD License 7 | which accompanies this distribution. The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | @par Revision Reference: 14 | GUID defined in UEFI 2.1. 15 | 16 | **/ 17 | 18 | #ifndef _HARDWARE_ERROR_VARIABLE_GUID_H_ 19 | #define _HARDWARE_ERROR_VARIABLE_GUID_H_ 20 | 21 | #define EFI_HARDWARE_ERROR_VARIABLE \ 22 | { \ 23 | 0x414E6BDD, 0xE47B, 0x47cc, {0xB2, 0x44, 0xBB, 0x61, 0x02, 0x0C, 0xF5, 0x16} \ 24 | } 25 | 26 | extern EFI_GUID gEfiHardwareErrorVariableGuid; 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/HiiFormMapMethodGuid.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Guid used to identify HII FormMap configuration method. 3 | 4 | Copyright (c) 2009, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials 6 | are licensed and made available under the terms and conditions of the BSD License 7 | which accompanies this distribution. The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | @par Revision Reference: 14 | GUID defined in UEFI 2.2 spec. 15 | **/ 16 | 17 | #ifndef __EFI_HII_FORMMAP_GUID_H__ 18 | #define __EFI_HII_FORMMAP_GUID_H__ 19 | 20 | #define EFI_HII_STANDARD_FORM_GUID \ 21 | { 0x3bd2f4ec, 0xe524, 0x46e4, { 0xa9, 0xd8, 0x51, 0x1, 0x17, 0x42, 0x55, 0x62 } } 22 | 23 | extern EFI_GUID gEfiHiiStandardFormGuid; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/HiiKeyBoardLayout.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | HII keyboard layout GUID as defined in UEFI2.1 specification 4 | 5 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
6 | This program and the accompanying materials 7 | are licensed and made available under the terms and conditions of the BSD License 8 | which accompanies this distribution. The full text of the license may be found at 9 | http://opensource.org/licenses/bsd-license.php 10 | 11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | 14 | @par Revision Reference: 15 | GUIDs defined in UEFI 2.1 spec. 16 | 17 | **/ 18 | 19 | #ifndef __HII_KEYBOARD_LAYOUT_GUID_H__ 20 | #define __HII_KEYBOARD_LAYOUT_GUID_H__ 21 | 22 | #define EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID \ 23 | { 0x14982a4f, 0xb0ed, 0x45b8, { 0xa8, 0x11, 0x5a, 0x7a, 0x9b, 0xc2, 0x32, 0xdf }} 24 | 25 | extern EFI_GUID gEfiHiiKeyBoardLayoutGuid; 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/HiiPlatformSetupFormset.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | GUID indicates that the form set contains forms designed to be used 3 | for platform configuration and this form set will be displayed. 4 | 5 | Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
6 | This program and the accompanying materials are licensed and made available under 7 | the terms and conditions of the BSD License that accompanies this distribution. 8 | The full text of the license may be found at 9 | http://opensource.org/licenses/bsd-license.php. 10 | 11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | 14 | @par Revision Reference: 15 | GUID defined in UEFI 2.1. 16 | 17 | **/ 18 | 19 | #ifndef __HII_PLATFORM_SETUP_FORMSET_GUID_H__ 20 | #define __HII_PLATFORM_SETUP_FORMSET_GUID_H__ 21 | 22 | #define EFI_HII_PLATFORM_SETUP_FORMSET_GUID \ 23 | { 0x93039971, 0x8545, 0x4b04, { 0xb4, 0x5e, 0x32, 0xeb, 0x83, 0x26, 0x4, 0xe } } 24 | 25 | #define EFI_HII_DRIVER_HEALTH_FORMSET_GUID \ 26 | { 0xf22fc20c, 0x8cf4, 0x45eb, { 0x8e, 0x6, 0xad, 0x4e, 0x50, 0xb9, 0x5d, 0xd3 } } 27 | 28 | #define EFI_HII_USER_CREDENTIAL_FORMSET_GUID \ 29 | { 0x337f4407, 0x5aee, 0x4b83, { 0xb2, 0xa7, 0x4e, 0xad, 0xca, 0x30, 0x88, 0xcd } } 30 | 31 | extern EFI_GUID gEfiHiiPlatformSetupFormsetGuid; 32 | extern EFI_GUID gEfiHiiDriverHealthFormsetGuid; 33 | extern EFI_GUID gEfiHiiUserCredentialFormsetGuid; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/HobList.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | GUIDs used for HOB List entries 3 | 4 | These GUIDs point the HOB List passed from PEI to DXE. 5 | 6 | Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
7 | This program and the accompanying materials 8 | are licensed and made available under the terms and conditions of the BSD License 9 | which accompanies this distribution. The full text of the license may be found at 10 | http://opensource.org/licenses/bsd-license.php 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 14 | 15 | @par Revision Reference: 16 | GUID introduced in PI Version 1.0. 17 | 18 | **/ 19 | 20 | #ifndef __HOB_LIST_GUID_H__ 21 | #define __HOB_LIST_GUID_H__ 22 | 23 | #define HOB_LIST_GUID \ 24 | { \ 25 | 0x7739f24c, 0x93d7, 0x11d4, {0x9a, 0x3a, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ 26 | } 27 | 28 | extern EFI_GUID gEfiHobListGuid; 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/MdePkgTokenSpace.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | GUID for MdePkg PCD Token Space 3 | 4 | Copyright (c) 2009, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials 6 | are licensed and made available under the terms and conditions of the BSD License 7 | which accompanies this distribution. The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | **/ 14 | 15 | #ifndef _MDEPKG_TOKEN_SPACE_GUID_H_ 16 | #define _MDEPKG_TOKEN_SPACE_GUID_H_ 17 | 18 | #define MDEPKG_TOKEN_SPACE_GUID \ 19 | { \ 20 | 0x914AEBE7, 0x4635, 0x459b, { 0xAA, 0x1C, 0x11, 0xE2, 0x19, 0xB0, 0x3A, 0x10 } \ 21 | } 22 | 23 | extern EFI_GUID gEfiMdePkgTokenSpaceGuid; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/MemoryAllocationHob.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | GUIDs for HOBs used in memory allcation 3 | 4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials 6 | are licensed and made available under the terms and conditions of the BSD License 7 | which accompanies this distribution. The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | @par Revision Reference: 14 | GUIDs introduced in PI Version 1.0. 15 | 16 | **/ 17 | 18 | #ifndef __MEMORY_ALLOCATION_GUID_H__ 19 | #define __MEMORY_ALLOCATION_GUID_H__ 20 | 21 | #define EFI_HOB_MEMORY_ALLOC_BSP_STORE_GUID \ 22 | {0x564b33cd, 0xc92a, 0x4593, {0x90, 0xbf, 0x24, 0x73, 0xe4, 0x3c, 0x63, 0x22} }; 23 | 24 | #define EFI_HOB_MEMORY_ALLOC_STACK_GUID \ 25 | {0x4ed4bf27, 0x4092, 0x42e9, {0x80, 0x7d, 0x52, 0x7b, 0x1d, 0x0, 0xc9, 0xbd} } 26 | 27 | #define EFI_HOB_MEMORY_ALLOC_MODULE_GUID \ 28 | {0xf8e21975, 0x899, 0x4f58, {0xa4, 0xbe, 0x55, 0x25, 0xa9, 0xc6, 0xd7, 0x7a} } 29 | 30 | extern EFI_GUID gEfiHobMemoryAllocBspStoreGuid; 31 | extern EFI_GUID gEfiHobMemoryAllocStackGuid; 32 | extern EFI_GUID gEfiHobMemoryAllocModuleGuid; 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/MemoryAttributesTable.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | GUIDs used for UEFI Memory Attributes Table in the UEFI 2.6 specification. 3 | 4 | Copyright (c) 2016, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials 6 | are licensed and made available under the terms and conditions of the BSD License 7 | which accompanies this distribution. The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | **/ 14 | 15 | #ifndef __UEFI_MEMORY_ATTRIBUTES_TABLE_H__ 16 | #define __UEFI_MEMORY_ATTRIBUTES_TABLE_H__ 17 | 18 | #define EFI_MEMORY_ATTRIBUTES_TABLE_GUID {\ 19 | 0xdcfa911d, 0x26eb, 0x469f, {0xa2, 0x20, 0x38, 0xb7, 0xdc, 0x46, 0x12, 0x20} \ 20 | } 21 | 22 | typedef struct { 23 | UINT32 Version; 24 | UINT32 NumberOfEntries; 25 | UINT32 DescriptorSize; 26 | UINT32 Reserved; 27 | //EFI_MEMORY_DESCRIPTOR Entry[1]; 28 | } EFI_MEMORY_ATTRIBUTES_TABLE; 29 | 30 | #define EFI_MEMORY_ATTRIBUTES_TABLE_VERSION 0x00000001 31 | 32 | extern EFI_GUID gEfiMemoryAttributesTableGuid; 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/Mps.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | GUIDs used for MPS entries in the UEFI 2.0 system table 3 | ACPI is the primary means of exporting MPS information to the OS. MPS only was 4 | included to support Itanium-based platform power on. So don't use it if you don't have too. 5 | 6 | Copyright (c) 2006, Intel Corporation. All rights reserved.
7 | This program and the accompanying materials 8 | are licensed and made available under the terms and conditions of the BSD License 9 | which accompanies this distribution. The full text of the license may be found at 10 | http://opensource.org/licenses/bsd-license.php 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 14 | 15 | @par Revision Reference: 16 | GUIDs defined in UEFI 2.0 spec. 17 | 18 | **/ 19 | 20 | #ifndef __MPS_GUID_H__ 21 | #define __MPS_GUID_H__ 22 | 23 | #define EFI_MPS_TABLE_GUID \ 24 | { \ 25 | 0xeb9d2d2f, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ 26 | } 27 | 28 | // 29 | // GUID name defined in spec. 30 | // 31 | #define MPS_TABLE_GUID EFI_MPS_TABLE_GUID 32 | 33 | extern EFI_GUID gEfiMpsTableGuid; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/PcAnsi.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Terminal Device Path Vendor Guid. 3 | 4 | Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials 6 | are licensed and made available under the terms and conditions of the BSD License 7 | which accompanies this distribution. The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | @par Revision Reference: 14 | GUIDs defined in UEFI 2.0 spec. 15 | 16 | **/ 17 | 18 | #ifndef __PC_ANSI_H__ 19 | #define __PC_ANSI_H__ 20 | 21 | #define EFI_PC_ANSI_GUID \ 22 | { \ 23 | 0xe0c14753, 0xf9be, 0x11d2, {0x9a, 0x0c, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ 24 | } 25 | 26 | #define EFI_VT_100_GUID \ 27 | { \ 28 | 0xdfa66065, 0xb419, 0x11d3, {0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ 29 | } 30 | 31 | #define EFI_VT_100_PLUS_GUID \ 32 | { \ 33 | 0x7baec70b, 0x57e0, 0x4c76, {0x8e, 0x87, 0x2f, 0x9e, 0x28, 0x08, 0x83, 0x43 } \ 34 | } 35 | 36 | #define EFI_VT_UTF8_GUID \ 37 | { \ 38 | 0xad15a0d6, 0x8bec, 0x4acf, {0xa0, 0x73, 0xd0, 0x1d, 0xe7, 0x7e, 0x2d, 0x88 } \ 39 | } 40 | 41 | #define DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL \ 42 | { \ 43 | 0x37499a9d, 0x542f, 0x4c89, {0xa0, 0x26, 0x35, 0xda, 0x14, 0x20, 0x94, 0xe4 } \ 44 | } 45 | 46 | #define EFI_SAS_DEVICE_PATH_GUID \ 47 | { \ 48 | 0xd487ddb4, 0x008b, 0x11d9, {0xaf, 0xdc, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d } \ 49 | } 50 | 51 | extern EFI_GUID gEfiPcAnsiGuid; 52 | extern EFI_GUID gEfiVT100Guid; 53 | extern EFI_GUID gEfiVT100PlusGuid; 54 | extern EFI_GUID gEfiVTUTF8Guid; 55 | extern EFI_GUID gEfiUartDevicePathGuid; 56 | extern EFI_GUID gEfiSasDevicePathGuid; 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/PropertiesTable.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | GUIDs used for UEFI Properties Table in the UEFI 2.5 specification. 3 | 4 | Copyright (c) 2015, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials 6 | are licensed and made available under the terms and conditions of the BSD License 7 | which accompanies this distribution. The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | **/ 14 | 15 | #ifndef __EFI_PROPERTIES_TABLE_H__ 16 | #define __EFI_PROPERTIES_TABLE_H__ 17 | 18 | #define EFI_PROPERTIES_TABLE_GUID {\ 19 | 0x880aaca3, 0x4adc, 0x4a04, {0x90, 0x79, 0xb7, 0x47, 0x34, 0x8, 0x25, 0xe5} \ 20 | } 21 | 22 | typedef struct { 23 | UINT32 Version; 24 | UINT32 Length; 25 | UINT64 MemoryProtectionAttribute; 26 | } EFI_PROPERTIES_TABLE; 27 | 28 | #define EFI_PROPERTIES_TABLE_VERSION 0x00010000 29 | 30 | // 31 | // Memory attribute (Not defined bit is reserved) 32 | // 33 | #define EFI_PROPERTIES_RUNTIME_MEMORY_PROTECTION_NON_EXECUTABLE_PE_DATA 0x1 34 | 35 | extern EFI_GUID gEfiPropertiesTableGuid; 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/SalSystemTable.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | GUIDs used for SAL system table entries in the EFI system table. 3 | 4 | SAL System Table contains Itanium-based processor centric information about 5 | the system. 6 | 7 | Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
8 | This program and the accompanying materials 9 | are licensed and made available under the terms and conditions of the BSD License 10 | which accompanies this distribution. The full text of the license may be found at 11 | http://opensource.org/licenses/bsd-license.php 12 | 13 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 15 | 16 | @par Revision Reference: 17 | GUIDs defined in UEFI 2.0 spec. 18 | 19 | **/ 20 | 21 | #ifndef __SAL_SYSTEM_TABLE_GUID_H__ 22 | #define __SAL_SYSTEM_TABLE_GUID_H__ 23 | 24 | #define SAL_SYSTEM_TABLE_GUID \ 25 | { \ 26 | 0xeb9d2d32, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ 27 | } 28 | 29 | extern EFI_GUID gEfiSalSystemTableGuid; 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/SmBios.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | GUIDs used to locate the SMBIOS tables in the UEFI 2.5 system table. 3 | 4 | These GUIDs in the system table are the only legal ways to search for and 5 | locate the SMBIOS tables. Do not search the 0xF0000 segment to find SMBIOS 6 | tables. 7 | 8 | Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
9 | This program and the accompanying materials 10 | are licensed and made available under the terms and conditions of the BSD License 11 | which accompanies this distribution. The full text of the license may be found at 12 | http://opensource.org/licenses/bsd-license.php 13 | 14 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 16 | 17 | @par Revision Reference: 18 | GUIDs defined in UEFI 2.5 spec. 19 | 20 | **/ 21 | 22 | #ifndef __SMBIOS_GUID_H__ 23 | #define __SMBIOS_GUID_H__ 24 | 25 | #define SMBIOS_TABLE_GUID \ 26 | { \ 27 | 0xeb9d2d31, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ 28 | } 29 | 30 | #define SMBIOS3_TABLE_GUID \ 31 | { \ 32 | 0xf2fd1544, 0x9794, 0x4a2c, {0x99, 0x2e, 0xe5, 0xbb, 0xcf, 0x20, 0xe3, 0x94 } \ 33 | } 34 | 35 | extern EFI_GUID gEfiSmbiosTableGuid; 36 | extern EFI_GUID gEfiSmbios3TableGuid; 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Guid/VectorHandoffTable.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | GUID for system configuration table entry that points to the table 3 | in case an entity in DXE wishes to update/change the vector table contents. 4 | 5 | Copyright (c) 2013, Intel Corporation. All rights reserved.
6 | This program and the accompanying materials 7 | are licensed and made available under the terms and conditions of the BSD License 8 | which accompanies this distribution. The full text of the license may be found at 9 | http://opensource.org/licenses/bsd-license.php 10 | 11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | 14 | @par Revision Reference: 15 | GUID defined in PI 1.2.1 spec. 16 | **/ 17 | 18 | #ifndef __EFI_VECTOR_HANDOFF_TABLE_H__ 19 | #define __EFI_VECTOR_HANDOFF_TABLE_H__ 20 | 21 | #include 22 | 23 | // 24 | // System configuration table entry that points to the table 25 | // in case an entity in DXE wishes to update/change the vector 26 | // table contents. 27 | // 28 | #define EFI_VECTOR_HANDOF_TABLE_GUID \ 29 | { 0x996ec11c, 0x5397, 0x4e73, { 0xb5, 0x8f, 0x82, 0x7e, 0x52, 0x90, 0x6d, 0xef }} 30 | 31 | extern EFI_GUID gEfiVectorHandoffTableGuid; 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/IndustryStandard/Acpi.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | This file contains the latest ACPI definitions that are 3 | consumed by drivers that do not care about ACPI versions. 4 | 5 | Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
6 | This program and the accompanying materials 7 | are licensed and made available under the terms and conditions of the BSD License 8 | which accompanies this distribution. The full text of the license may be found at 9 | http://opensource.org/licenses/bsd-license.php 10 | 11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | 14 | **/ 15 | 16 | #ifndef _ACPI_H_ 17 | #define _ACPI_H_ 18 | 19 | #include 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/IndustryStandard/Bluetooth.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | This file contains the Bluetooth definitions that are consumed by drivers. 3 | These definitions are from Bluetooth Core Specification Version 4.0 June, 2010 4 | 5 | Copyright (c) 2015, Intel Corporation. All rights reserved.
6 | This program and the accompanying materials 7 | are licensed and made available under the terms and conditions of the BSD License 8 | which accompanies this distribution. The full text of the license may be found at 9 | http://opensource.org/licenses/bsd-license.php 10 | 11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | 14 | **/ 15 | 16 | #ifndef _BLUETOOTH_H_ 17 | #define _BLUETOOTH_H_ 18 | 19 | #pragma pack(1) 20 | 21 | /// 22 | /// BLUETOOTH_ADDRESS 23 | /// 24 | typedef struct { 25 | /// 26 | /// 48bit Bluetooth device address. 27 | /// 28 | UINT8 Address[6]; 29 | } BLUETOOTH_ADDRESS; 30 | 31 | /// 32 | /// BLUETOOTH_CLASS_OF_DEVICE. See Bluetooth specification for detail. 33 | /// 34 | typedef struct { 35 | UINT8 FormatType:2; 36 | UINT8 MinorDeviceClass: 6; 37 | UINT16 MajorDeviceClass: 5; 38 | UINT16 MajorServiceClass:11; 39 | } BLUETOOTH_CLASS_OF_DEVICE; 40 | 41 | #pragma pack() 42 | 43 | #define BLUETOOTH_HCI_COMMAND_LOCAL_READABLE_NAME_MAX_SIZE 248 44 | 45 | #define BLUETOOTH_HCI_LINK_KEY_SIZE 16 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/IndustryStandard/Bmp.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | This file defines BMP file header data structures. 3 | 4 | Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials 6 | are licensed and made available under the terms and conditions of the BSD License 7 | which accompanies this distribution. The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | **/ 14 | 15 | #ifndef _BMP_H_ 16 | #define _BMP_H_ 17 | 18 | #pragma pack(1) 19 | 20 | typedef struct { 21 | UINT8 Blue; 22 | UINT8 Green; 23 | UINT8 Red; 24 | UINT8 Reserved; 25 | } BMP_COLOR_MAP; 26 | 27 | typedef struct { 28 | CHAR8 CharB; 29 | CHAR8 CharM; 30 | UINT32 Size; 31 | UINT16 Reserved[2]; 32 | UINT32 ImageOffset; 33 | UINT32 HeaderSize; 34 | UINT32 PixelWidth; 35 | UINT32 PixelHeight; 36 | UINT16 Planes; ///< Must be 1 37 | UINT16 BitPerPixel; ///< 1, 4, 8, or 24 38 | UINT32 CompressionType; 39 | UINT32 ImageSize; ///< Compressed image size in bytes 40 | UINT32 XPixelsPerMeter; 41 | UINT32 YPixelsPerMeter; 42 | UINT32 NumberOfColors; 43 | UINT32 ImportantColors; 44 | } BMP_IMAGE_HEADER; 45 | 46 | #pragma pack() 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/IndustryStandard/DebugPortTable.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | ACPI debug port table definition, defined at 3 | Microsoft DebugPortSpecification. 4 | 5 | Copyright (c) 2012, Intel Corporation. All rights reserved.
6 | This program and the accompanying materials 7 | are licensed and made available under the terms and conditions of the BSD License 8 | which accompanies this distribution. The full text of the license may be found at 9 | http://opensource.org/licenses/bsd-license.php 10 | 11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | 14 | **/ 15 | 16 | 17 | #ifndef _DEBUG_PORT_TABLE_H_ 18 | #define _DEBUG_PORT_TABLE_H_ 19 | 20 | #include 21 | 22 | // 23 | // Ensure proper structure formats 24 | // 25 | #pragma pack(1) 26 | 27 | // 28 | // Debug Port Table definition. 29 | // 30 | typedef struct { 31 | EFI_ACPI_DESCRIPTION_HEADER Header; 32 | UINT8 InterfaceType; 33 | UINT8 Reserved_37[3]; 34 | EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE BaseAddress; 35 | } EFI_ACPI_DEBUG_PORT_DESCRIPTION_TABLE; 36 | 37 | #pragma pack() 38 | 39 | // 40 | // DBGP Revision (defined in spec) 41 | // 42 | #define EFI_ACPI_DEBUG_PORT_TABLE_REVISION 0x01 43 | 44 | // 45 | // Interface Type 46 | // 47 | #define EFI_ACPI_DBGP_INTERFACE_TYPE_FULL_16550 0 48 | #define EFI_ACPI_DBGP_INTERFACE_TYPE_16550_SUBSET_COMPATIBLE_WITH_MS_DBGP_SPEC 1 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/IndustryStandard/HighPrecisionEventTimerTable.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | ACPI high precision event timer table definition, at www.intel.com 3 | Specification name is IA-PC HPET (High Precision Event Timers) Specification. 4 | 5 | Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.
6 | This program and the accompanying materials 7 | are licensed and made available under the terms and conditions of the BSD License 8 | which accompanies this distribution. The full text of the license may be found at 9 | http://opensource.org/licenses/bsd-license.php 10 | 11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | **/ 14 | 15 | #ifndef _HIGH_PRECISION_EVENT_TIMER_TABLE_H_ 16 | #define _HIGH_PRECISION_EVENT_TIMER_TABLE_H_ 17 | 18 | #include 19 | 20 | // 21 | // Ensure proper structure formats 22 | // 23 | #pragma pack(1) 24 | 25 | /// 26 | /// High Precision Event Timer Table header definition. 27 | /// 28 | typedef struct { 29 | EFI_ACPI_DESCRIPTION_HEADER Header; 30 | UINT32 EventTimerBlockId; 31 | EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE BaseAddressLower32Bit; 32 | UINT8 HpetNumber; 33 | UINT16 MainCounterMinimumClockTickInPeriodicMode; 34 | UINT8 PageProtectionAndOemAttribute; 35 | } EFI_ACPI_HIGH_PRECISION_EVENT_TIMER_TABLE_HEADER; 36 | 37 | /// 38 | /// HPET Revision (defined in spec) 39 | /// 40 | #define EFI_ACPI_HIGH_PRECISION_EVENT_TIMER_TABLE_REVISION 0x01 41 | 42 | // 43 | // Page protection setting 44 | // Values 3 through 15 are reserved for use by the specification 45 | // 46 | #define EFI_ACPI_NO_PAGE_PROTECTION 0 47 | #define EFI_ACPI_4KB_PAGE_PROTECTION 1 48 | #define EFI_ACPI_64KB_PAGE_PROTECTION 2 49 | 50 | #pragma pack() 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/IndustryStandard/Ipmi.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | IPMI 2.0 definitions from the IPMI Specification Version 2.0, Revision 1.1. 3 | 4 | See IPMI specification, Appendix G, Command Assignments 5 | and Appendix H, Sub-function Assignments. 6 | 7 | Copyright (c) 1999 - 2015, Intel Corporation. All rights reserved.
8 | This program and the accompanying materials 9 | are licensed and made available under the terms and conditions of the BSD License 10 | which accompanies this distribution. The full text of the license may be found at 11 | http://opensource.org/licenses/bsd-license.php 12 | 13 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 15 | **/ 16 | 17 | #ifndef _IPMI_H_ 18 | #define _IPMI_H_ 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/IndustryStandard/IpmiNetFnFirmware.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | IPMI 2.0 definitions from the IPMI Specification Version 2.0, Revision 1.1. 3 | 4 | Copyright (c) 1999 - 2015, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials 6 | are licensed and made available under the terms and conditions of the BSD License 7 | which accompanies this distribution. The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | **/ 13 | 14 | #ifndef _IPMI_NET_FN_FIRMWARE_H_ 15 | #define _IPMI_NET_FN_FIRMWARE_H_ 16 | 17 | // 18 | // Net function definition for Firmware command 19 | // 20 | #define IPMI_NETFN_FIRMWARE 0x08 21 | 22 | // 23 | // All Firmware commands and their structure definitions to follow here 24 | // 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/IndustryStandard/IpmiNetFnGroupExtension.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | IPMI 2.0 definitions from the IPMI Specification Version 2.0, Revision 1.1. 3 | 4 | Copyright (c) 1999 - 2015, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials 6 | are licensed and made available under the terms and conditions of the BSD License 7 | which accompanies this distribution. The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | **/ 13 | 14 | #ifndef _IPMI_NET_FN_GROUP_EXTENSION_H_ 15 | #define _IPMI_NET_FN_GROUP_EXTENSION_H_ 16 | 17 | // 18 | // Net function definition for Group Extension command 19 | // 20 | #define IPMI_NETFN_GROUP_EXT 0x2C 21 | 22 | // 23 | // All Group Extension commands and their structure definitions to follow here 24 | // 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/IndustryStandard/IpmiNetFnSensorEvent.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | IPMI 2.0 definitions from the IPMI Specification Version 2.0, Revision 1.1. 3 | 4 | This file contains all NetFn Sensor/Event commands, including: 5 | Event Commands (Chapter 29) 6 | PEF and Alerting Commands (Chapter 30) 7 | Sensor Device Commands (Chapter 35) 8 | 9 | See IPMI specification, Appendix G, Command Assignments 10 | and Appendix H, Sub-function Assignments. 11 | 12 | Copyright (c) 1999 - 2015, Intel Corporation. All rights reserved.
13 | This program and the accompanying materials 14 | are licensed and made available under the terms and conditions of the BSD License 15 | which accompanies this distribution. The full text of the license may be found at 16 | http://opensource.org/licenses/bsd-license.php 17 | 18 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 20 | **/ 21 | 22 | #ifndef _IPMI_NET_FN_SENSOR_EVENT_H_ 23 | #define _IPMI_NET_FN_SENSOR_EVENT_H_ 24 | 25 | #pragma pack(1) 26 | // 27 | // Net function definition for Sensor command 28 | // 29 | #define IPMI_NETFN_SENSOR_EVENT 0x04 30 | 31 | // 32 | // All Sensor commands and their structure definitions to follow here 33 | // 34 | 35 | // 36 | // Definitions for Send Platform Event Message command 37 | // 38 | #define IPMI_SENSOR_PLATFORM_EVENT_MESSAGE 0x02 39 | 40 | typedef struct { 41 | UINT8 GeneratorId; 42 | UINT8 EvMRevision; 43 | UINT8 SensorType; 44 | UINT8 SensorNumber; 45 | UINT8 EventDirType; 46 | UINT8 OEMEvData1; 47 | UINT8 OEMEvData2; 48 | UINT8 OEMEvData3; 49 | } IPMI_PLATFORM_EVENT_MESSAGE_DATA_REQUEST; 50 | 51 | #pragma pack() 52 | #endif 53 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/IndustryStandard/Mbr.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Legacy Master Boot Record Format Definition. 3 | 4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials 6 | are licensed and made available under the terms and conditions of the BSD License 7 | which accompanies this distribution. The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | **/ 14 | 15 | #ifndef _MBR_H_ 16 | #define _MBR_H_ 17 | 18 | #define MBR_SIGNATURE 0xaa55 19 | 20 | #define EXTENDED_DOS_PARTITION 0x05 21 | #define EXTENDED_WINDOWS_PARTITION 0x0F 22 | 23 | #define MAX_MBR_PARTITIONS 4 24 | 25 | #define PMBR_GPT_PARTITION 0xEE 26 | #define EFI_PARTITION 0xEF 27 | 28 | #define MBR_SIZE 512 29 | 30 | #pragma pack(1) 31 | /// 32 | /// MBR Partition Entry 33 | /// 34 | typedef struct { 35 | UINT8 BootIndicator; 36 | UINT8 StartHead; 37 | UINT8 StartSector; 38 | UINT8 StartTrack; 39 | UINT8 OSIndicator; 40 | UINT8 EndHead; 41 | UINT8 EndSector; 42 | UINT8 EndTrack; 43 | UINT8 StartingLBA[4]; 44 | UINT8 SizeInLBA[4]; 45 | } MBR_PARTITION_RECORD; 46 | 47 | /// 48 | /// MBR Partition Table 49 | /// 50 | typedef struct { 51 | UINT8 BootStrapCode[440]; 52 | UINT8 UniqueMbrSignature[4]; 53 | UINT8 Unknown[2]; 54 | MBR_PARTITION_RECORD Partition[MAX_MBR_PARTITIONS]; 55 | UINT16 Signature; 56 | } MASTER_BOOT_RECORD; 57 | 58 | #pragma pack() 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/IndustryStandard/MemoryMappedConfigurationSpaceAccessTable.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | ACPI memory mapped configuration space access table definition, defined at 3 | in the PCI Firmware Specification, version 3.0. 4 | Specification is available at http://www.pcisig.com. 5 | 6 | Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.
7 | This program and the accompanying materials 8 | are licensed and made available under the terms and conditions of the BSD License 9 | which accompanies this distribution. The full text of the license may be found at 10 | http://opensource.org/licenses/bsd-license.php 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 14 | **/ 15 | 16 | #ifndef _MEMORY_MAPPED_CONFIGURATION_SPACE_ACCESS_TABLE_H_ 17 | #define _MEMORY_MAPPED_CONFIGURATION_SPACE_ACCESS_TABLE_H_ 18 | 19 | // 20 | // Ensure proper structure formats 21 | // 22 | #pragma pack(1) 23 | 24 | /// 25 | /// Memory Mapped Configuration Space Access Table (MCFG) 26 | /// This table is a basic description table header followed by 27 | /// a number of base address allocation structures. 28 | /// 29 | typedef struct { 30 | UINT64 BaseAddress; 31 | UINT16 PciSegmentGroupNumber; 32 | UINT8 StartBusNumber; 33 | UINT8 EndBusNumber; 34 | UINT32 Reserved; 35 | } EFI_ACPI_MEMORY_MAPPED_ENHANCED_CONFIGURATION_SPACE_BASE_ADDRESS_ALLOCATION_STRUCTURE; 36 | 37 | /// 38 | /// MCFG Table header definition. The rest of the table 39 | /// must be defined in a platform specific manner. 40 | /// 41 | typedef struct { 42 | EFI_ACPI_DESCRIPTION_HEADER Header; 43 | UINT64 Reserved; 44 | } EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_HEADER; 45 | 46 | /// 47 | /// MCFG Revision (defined in spec) 48 | /// 49 | #define EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_SPACE_ACCESS_TABLE_REVISION 0x01 50 | 51 | #pragma pack() 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/IndustryStandard/MemoryOverwriteRequestControlLock.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Support for Microsoft Secure MOR implementation, defined at 3 | Microsoft Secure MOR implementation. 4 | https://msdn.microsoft.com/en-us/library/windows/hardware/mt270973(v=vs.85).aspx 5 | 6 | Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
7 | This program and the accompanying materials 8 | are licensed and made available under the terms and conditions of the BSD License 9 | which accompanies this distribution. The full text of the license may be found at 10 | http://opensource.org/licenses/bsd-license.php 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 14 | 15 | **/ 16 | 17 | #ifndef __MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_H__ 18 | #define __MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_H__ 19 | 20 | #define MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_GUID \ 21 | { \ 22 | 0xBB983CCF, 0x151D, 0x40E1, {0xA0, 0x7B, 0x4A, 0x17, 0xBE, 0x16, 0x82, 0x92} \ 23 | } 24 | 25 | #define MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME L"MemoryOverwriteRequestControlLock" 26 | 27 | // 28 | // VendorGuid: {BB983CCF-151D-40E1-A07B-4A17BE168292} 29 | // Name: MemoryOverwriteRequestControlLock 30 | // Attributes: NV+BS+RT 31 | // GetVariable value in Data parameter: 0x0 (unlocked); 0x1 (locked without key); 0x2 (locked with key) 32 | // SetVariable value in Data parameter: 0x0 (unlocked); 0x1 (locked); 33 | // Revision 2 additionally accepts an 8-byte value that represents a shared secret key. 34 | // 35 | 36 | // 37 | // Note: Setting MemoryOverwriteRequestControlLock does not commit to flash (just changes the internal lock state). 38 | // Getting the variable returns the internal state and never exposes the key. 39 | // 40 | 41 | extern EFI_GUID gEfiMemoryOverwriteRequestControlLockGuid; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/IndustryStandard/Pci.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Support for the latest PCI standard. 3 | 4 | Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials are licensed and made available under 6 | the terms and conditions of the BSD License that accompanies this distribution. 7 | The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php. 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | **/ 14 | 15 | #ifndef _PCI_H_ 16 | #define _PCI_H_ 17 | 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/IndustryStandard/PciExpress30.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Support for the PCI Express 3.0 standard. 3 | 4 | This header file may not define all structures. Please extend as required. 5 | 6 | Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.
7 | This program and the accompanying materials 8 | are licensed and made available under the terms and conditions of the BSD License 9 | which accompanies this distribution. The full text of the license may be found at 10 | http://opensource.org/licenses/bsd-license.php 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 14 | 15 | **/ 16 | 17 | #ifndef _PCIEXPRESS30_H_ 18 | #define _PCIEXPRESS30_H_ 19 | 20 | #include 21 | 22 | #pragma pack(1) 23 | 24 | #define PCI_EXPRESS_EXTENDED_CAPABILITY_SECONDARY_PCIE_ID 0x0019 25 | #define PCI_EXPRESS_EXTENDED_CAPABILITY_SECONDARY_PCIE_VER1 0x1 26 | 27 | typedef union { 28 | struct { 29 | UINT32 PerformEqualization : 1; 30 | UINT32 LinkEqualizationRequestInterruptEnable : 1; 31 | UINT32 Reserved : 30; 32 | } Bits; 33 | UINT32 Uint32; 34 | } PCI_EXPRESS_REG_LINK_CONTROL3; 35 | 36 | typedef union { 37 | struct { 38 | UINT16 DownstreamPortTransmitterPreset : 4; 39 | UINT16 DownstreamPortReceiverPresetHint : 3; 40 | UINT16 Reserved : 1; 41 | UINT16 UpstreamPortTransmitterPreset : 4; 42 | UINT16 UpstreamPortReceiverPresetHint : 3; 43 | UINT16 Reserved2 : 1; 44 | } Bits; 45 | UINT16 Uint16; 46 | } PCI_EXPRESS_REG_LANE_EQUALIZATION_CONTROL; 47 | 48 | typedef struct { 49 | PCI_EXPRESS_EXTENDED_CAPABILITIES_HEADER Header; 50 | PCI_EXPRESS_REG_LINK_CONTROL3 LinkControl3; 51 | UINT32 LaneErrorStatus; 52 | PCI_EXPRESS_REG_LANE_EQUALIZATION_CONTROL EqualizationControl[2]; 53 | } PCI_EXPRESS_EXTENDED_CAPABILITIES_SECONDARY_PCIE; 54 | 55 | #pragma pack() 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/IndustryStandard/TcpaAcpi.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | TCPA ACPI table definition. 3 | 4 | Copyright (c) 2013, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials 6 | are licensed and made available under the terms and conditions of the BSD License 7 | which accompanies this distribution. The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | **/ 14 | 15 | #ifndef _TCPA_ACPI_H_ 16 | #define _TCPA_ACPI_H_ 17 | 18 | #include 19 | 20 | #pragma pack (1) 21 | 22 | typedef struct _EFI_TCG_CLIENT_ACPI_TABLE { 23 | EFI_ACPI_DESCRIPTION_HEADER Header; 24 | UINT16 PlatformClass; 25 | UINT32 Laml; 26 | UINT64 Lasa; 27 | } EFI_TCG_CLIENT_ACPI_TABLE; 28 | 29 | typedef struct _EFI_TCG_SERVER_ACPI_TABLE { 30 | EFI_ACPI_DESCRIPTION_HEADER Header; 31 | UINT16 PlatformClass; 32 | UINT16 Reserved0; 33 | UINT64 Laml; 34 | UINT64 Lasa; 35 | UINT16 SpecRev; 36 | UINT8 DeviceFlags; 37 | UINT8 InterruptFlags; 38 | UINT8 Gpe; 39 | UINT8 Reserved1[3]; 40 | UINT32 GlobalSysInt; 41 | EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE BaseAddress; 42 | UINT32 Reserved2; 43 | EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE ConfigAddress; 44 | UINT8 PciSegNum; 45 | UINT8 PciBusNum; 46 | UINT8 PciDevNum; 47 | UINT8 PciFuncNum; 48 | } EFI_TCG_SERVER_ACPI_TABLE; 49 | 50 | // 51 | // TCG Platform Type based on TCG ACPI Specification Version 1.00 52 | // 53 | #define TCG_PLATFORM_TYPE_CLIENT 0 54 | #define TCG_PLATFORM_TYPE_SERVER 1 55 | 56 | #pragma pack () 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/IndustryStandard/Tpm2Acpi.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | TPM2 ACPI table definition. 3 | 4 | Copyright (c) 2013 - 2017, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials 6 | are licensed and made available under the terms and conditions of the BSD License 7 | which accompanies this distribution. The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | **/ 14 | 15 | #ifndef _TPM2_ACPI_H_ 16 | #define _TPM2_ACPI_H_ 17 | 18 | #include 19 | 20 | #pragma pack (1) 21 | 22 | #define EFI_TPM2_ACPI_TABLE_REVISION_3 3 23 | #define EFI_TPM2_ACPI_TABLE_REVISION_4 4 24 | #define EFI_TPM2_ACPI_TABLE_REVISION EFI_TPM2_ACPI_TABLE_REVISION_4 25 | 26 | typedef struct { 27 | EFI_ACPI_DESCRIPTION_HEADER Header; 28 | // Flags field is replaced in version 4 and above 29 | // BIT0~15: PlatformClass This field is only valid for version 4 and above 30 | // BIT16~31: Reserved 31 | UINT32 Flags; 32 | UINT64 AddressOfControlArea; 33 | UINT32 StartMethod; 34 | //UINT8 PlatformSpecificParameters[]; 35 | } EFI_TPM2_ACPI_TABLE; 36 | 37 | #define EFI_TPM2_ACPI_TABLE_START_METHOD_ACPI 2 38 | #define EFI_TPM2_ACPI_TABLE_START_METHOD_TIS 6 39 | #define EFI_TPM2_ACPI_TABLE_START_METHOD_COMMAND_RESPONSE_BUFFER_INTERFACE 7 40 | #define EFI_TPM2_ACPI_TABLE_START_METHOD_COMMAND_RESPONSE_BUFFER_INTERFACE_WITH_ACPI 8 41 | 42 | typedef struct { 43 | UINT32 Reserved; 44 | UINT32 Error; 45 | UINT32 Cancel; 46 | UINT32 Start; 47 | UINT64 InterruptControl; 48 | UINT32 CommandSize; 49 | UINT64 Command; 50 | UINT32 ResponseSize; 51 | UINT64 Response; 52 | } EFI_TPM2_ACPI_CONTROL_AREA; 53 | 54 | #pragma pack () 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/IndustryStandard/WatchdogResourceTable.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | ACPI Watchdog Resource Table (WDRT) as defined at 3 | Microsoft Windows Hardware Developer Central. 4 | 5 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
6 | This program and the accompanying materials 7 | are licensed and made available under the terms and conditions of the BSD License 8 | which accompanies this distribution. The full text of the license may be found at 9 | http://opensource.org/licenses/bsd-license.php 10 | 11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | **/ 14 | 15 | #ifndef _WATCHDOG_RESOURCE_TABLE_H_ 16 | #define _WATCHDOG_RESOURCE_TABLE_H_ 17 | 18 | #include 19 | 20 | // 21 | // Ensure proper structure formats 22 | // 23 | #pragma pack(1) 24 | 25 | /// 26 | /// Watchdog Resource Table definition. 27 | /// 28 | typedef struct { 29 | EFI_ACPI_DESCRIPTION_HEADER Header; 30 | EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE ControlRegisterAddress; 31 | EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE CountRegisterAddress; 32 | UINT16 PCIDeviceID; 33 | UINT16 PCIVendorID; 34 | UINT8 PCIBusNumber; 35 | UINT8 PCIDeviceNumber; 36 | UINT8 PCIFunctionNumber; 37 | UINT8 PCISegment; 38 | UINT16 MaxCount; 39 | UINT8 Units; 40 | } EFI_ACPI_WATCHDOG_RESOURCE_1_0_TABLE; 41 | 42 | #pragma pack() 43 | 44 | // 45 | // WDRT Revision (defined in spec) 46 | // 47 | #define EFI_ACPI_WATCHDOG_RESOURCE_1_0_TABLE_REVISION 0x01 48 | 49 | // 50 | // WDRT 1.0 Count Unit 51 | // 52 | #define EFI_ACPI_WDRT_1_0_COUNT_UNIT_1_SEC_PER_COUNT 1 53 | #define EFI_ACPI_WDRT_1_0_COUNT_UNIT_100_MILLISEC_PER_COUNT 2 54 | #define EFI_ACPI_WDRT_1_0_COUNT_UNIT_10_MILLISEC_PER_COUNT 3 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/IndustryStandard/WindowsSmmSecurityMitigationTable.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Defines Windows SMM Security Mitigation Table 3 | @ https://msdn.microsoft.com/windows/hardware/drivers/bringup/acpi-system-description-tables#wsmt 4 | 5 | Copyright (c) 2016, Intel Corporation. All rights reserved.
6 | This program and the accompanying materials 7 | are licensed and made available under the terms and conditions of the BSD License 8 | which accompanies this distribution. The full text of the license may be found at 9 | http://opensource.org/licenses/bsd-license.php 10 | 11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | 14 | **/ 15 | 16 | 17 | #ifndef _WINDOWS_SMM_SECURITY_MITIGATION_TABLE_H_ 18 | #define _WINDOWS_SMM_SECURITY_MITIGATION_TABLE_H_ 19 | 20 | #include 21 | 22 | #define EFI_ACPI_WINDOWS_SMM_SECURITY_MITIGATION_TABLE_SIGNATURE SIGNATURE_32('W', 'S', 'M', 'T') 23 | 24 | #pragma pack(1) 25 | 26 | #define EFI_WSMT_TABLE_REVISION 1 27 | 28 | typedef struct { 29 | EFI_ACPI_DESCRIPTION_HEADER Header; 30 | UINT32 ProtectionFlags; 31 | } EFI_ACPI_WSMT_TABLE; 32 | 33 | #define EFI_WSMT_PROTECTION_FLAGS_FIXED_COMM_BUFFERS 0x1 34 | #define EFI_WSMT_PROTECTION_FLAGS_COMM_BUFFER_NESTED_PTR_PROTECTION 0x2 35 | #define EFI_WSMT_PROTECTION_FLAGS_SYSTEM_RESOURCE_PROTECTION 0x4 36 | 37 | #pragma pack() 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/IndustryStandard/WindowsUxCapsule.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Defines Windows UX Capsule GUID and layout defined at Microsoft 3 | Windows UEFI Firmware Update Platform specification 4 | 5 | Copyright (c) 2015, Intel Corporation. All rights reserved.
6 | This program and the accompanying materials 7 | are licensed and made available under the terms and conditions of the BSD License 8 | which accompanies this distribution. The full text of the license may be found at 9 | http://opensource.org/licenses/bsd-license.php 10 | 11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | 14 | **/ 15 | 16 | 17 | #ifndef _WINDOWS_UX_CAPSULE_GUID_H_ 18 | #define _WINDOWS_UX_CAPSULE_GUID_H_ 19 | 20 | #pragma pack(1) 21 | 22 | typedef struct { 23 | UINT8 Version; 24 | UINT8 Checksum; 25 | UINT8 ImageType; 26 | UINT8 Reserved; 27 | UINT32 Mode; 28 | UINT32 OffsetX; 29 | UINT32 OffsetY; 30 | //UINT8 Image[]; 31 | } DISPLAY_DISPLAY_PAYLOAD; 32 | 33 | typedef struct { 34 | EFI_CAPSULE_HEADER CapsuleHeader; 35 | DISPLAY_DISPLAY_PAYLOAD ImagePayload; 36 | } EFI_DISPLAY_CAPSULE; 37 | 38 | #pragma pack() 39 | 40 | #define WINDOWS_UX_CAPSULE_GUID \ 41 | { \ 42 | 0x3b8c8162, 0x188c, 0x46a4, { 0xae, 0xc9, 0xbe, 0x43, 0xf1, 0xd6, 0x56, 0x97} \ 43 | } 44 | 45 | extern EFI_GUID gWindowsUxCapsuleGuid; 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Ipf/IpfMacro.i: -------------------------------------------------------------------------------- 1 | // @file 2 | // Contains the macros required by calling procedures in Itanium-based assembly code. 3 | // 4 | // Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
5 | // This program and the accompanying materials 6 | // are licensed and made available under the terms and conditions of the BSD License 7 | // which accompanies this distribution. The full text of the license may be found at 8 | // http://opensource.org/licenses/bsd-license.php 9 | // 10 | // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | // 13 | 14 | #ifndef __IA64PROC_I__ 15 | #define __IA64PROC_I__ 16 | 17 | // 18 | // Delcare the begin of assembly function entry. 19 | // 20 | // @param name Name of function in assembly code. 21 | // 22 | #define PROCEDURE_ENTRY(name) .##text; \ 23 | .##type name, @function; \ 24 | .##proc name; \ 25 | name:: 26 | 27 | // 28 | // End of assembly function. 29 | // 30 | // @param name Name of function in assembly code. 31 | // 32 | #define PROCEDURE_EXIT(name) .##endp name 33 | 34 | // 35 | // NESTED_SETUP Requires number of locals (l) >= 3 36 | // 37 | #define NESTED_SETUP(i,l,o,r) \ 38 | alloc loc1=ar##.##pfs,i,l,o,r ;\ 39 | mov loc0=b0 40 | 41 | // 42 | // End of Nested 43 | // 44 | #define NESTED_RETURN \ 45 | mov b0=loc0 ;\ 46 | mov ar##.##pfs=loc1 ;;\ 47 | br##.##ret##.##dpnt b0;; 48 | 49 | // 50 | // Export assembly function as the global function. 51 | // 52 | // @param Function Name of function in assembly code. 53 | // 54 | #define GLOBAL_FUNCTION(Function) \ 55 | .##type Function, @function; \ 56 | .##globl Function 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Library/CpuLib.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Provides CPU architecture specific functions that can not be defined 3 | in the Base Library due to dependencies on the PAL Library 4 | 5 | The CPU Library provides services to flush CPU TLBs and place the CPU in a sleep state. 6 | The implementation of these services on Itanium processors requires the use of PAL Calls. 7 | PAL Calls require PEI and DXE specific mechanisms to look up PAL Entry Point. 8 | As a result, these services could not be defined in the Base Library. 9 | 10 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
11 | This program and the accompanying materials 12 | are licensed and made available under the terms and conditions of the BSD License 13 | which accompanies this distribution. The full text of the license may be found at 14 | http://opensource.org/licenses/bsd-license.php 15 | 16 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 17 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 18 | 19 | **/ 20 | 21 | #ifndef __CPU_LIB_H__ 22 | #define __CPU_LIB_H__ 23 | 24 | /** 25 | Places the CPU in a sleep state until an interrupt is received. 26 | 27 | Places the CPU in a sleep state until an interrupt is received. If interrupts 28 | are disabled prior to calling this function, then the CPU will be placed in a 29 | sleep state indefinitely. 30 | 31 | **/ 32 | VOID 33 | EFIAPI 34 | CpuSleep ( 35 | VOID 36 | ); 37 | 38 | /** 39 | Flushes all the Translation Lookaside Buffers(TLB) entries in a CPU. 40 | 41 | Flushes all the Translation Lookaside Buffers(TLB) entries in a CPU. 42 | 43 | **/ 44 | VOID 45 | EFIAPI 46 | CpuFlushTlb ( 47 | VOID 48 | ); 49 | 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Library/DebugPrintErrorLevelLib.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Debug Print Error Level Library class 3 | 4 | Copyright (c) 2011, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials 6 | are licensed and made available under the terms and conditions of the BSD License 7 | which accompanies this distribution. The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php. 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | **/ 14 | #ifndef _DEBUG_PRINT_ERROR_LEVEL_LIB_H_ 15 | #define _DEBUG_PRINT_ERROR_LEVEL_LIB_H_ 16 | 17 | /** 18 | Returns the debug print error level mask for the current module. 19 | 20 | @return Debug print error level mask for the current module. 21 | 22 | **/ 23 | UINT32 24 | EFIAPI 25 | GetDebugPrintErrorLevel ( 26 | VOID 27 | ); 28 | 29 | /** 30 | Sets the global debug print error level mask fpr the entire platform. 31 | 32 | @param ErrorLevel Global debug print error level 33 | 34 | @retval TRUE The debug print error level mask was successfully set. 35 | @retval FALSE The debug print error level mask could not be set. 36 | 37 | **/ 38 | BOOLEAN 39 | EFIAPI 40 | SetDebugPrintErrorLevel ( 41 | UINT32 ErrorLevel 42 | ); 43 | #endif 44 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Library/DxeServicesTableLib.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Provides a service to retrieve a pointer to the DXE Services Table. 3 | Only available to DXE module types. 4 | 5 | This library does not contain any functions or macros. It simply exports a global 6 | pointer to the DXE Services Table as defined in the Platform Initialization Driver 7 | Execution Environment Core Interface Specification. The library constructor must 8 | initialize this global pointer to the DX Services Table, so it is available at the 9 | module's entry point. Since there is overhead in looking up the pointer to the DXE 10 | Services Table, only those modules that actually require access to the DXE Services 11 | Table should use this library. This will typically be DXE Drivers that require GCD 12 | or Dispatcher services. 13 | 14 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
15 | This program and the accompanying materials 16 | are licensed and made available under the terms and conditions of the BSD License 17 | which accompanies this distribution. The full text of the license may be found at 18 | http://opensource.org/licenses/bsd-license.php 19 | 20 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 21 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 22 | 23 | **/ 24 | 25 | #ifndef __DXE_SERVICES_TABLE_LIB_H__ 26 | #define __DXE_SERVICES_TABLE_LIB_H__ 27 | 28 | /// 29 | /// Cache copy of the DXE Services Table 30 | /// 31 | extern EFI_DXE_SERVICES *gDS; 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Library/PeCoffExtraActionLib.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Provides services to perform additional actions when a PE/COFF image is loaded 3 | or unloaded. This is useful for environment where symbols need to be loaded 4 | and unloaded to support source level debugging. 5 | 6 | Copyright (c) 2009, Intel Corporation. All rights reserved.
7 | This program and the accompanying materials 8 | are licensed and made available under the terms and conditions of the BSD License 9 | which accompanies this distribution. The full text of the license may be found at 10 | http://opensource.org/licenses/bsd-license.php 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 14 | 15 | **/ 16 | 17 | #ifndef __PE_COFF_EXTRA_ACTION_LIB_H__ 18 | #define __PE_COFF_EXTRA_ACTION_LIB_H__ 19 | 20 | #include 21 | 22 | /** 23 | Performs additional actions after a PE/COFF image has been loaded and relocated. 24 | 25 | If ImageContext is NULL, then ASSERT(). 26 | 27 | @param ImageContext Pointer to the image context structure that describes the 28 | PE/COFF image that has already been loaded and relocated. 29 | 30 | **/ 31 | VOID 32 | EFIAPI 33 | PeCoffLoaderRelocateImageExtraAction ( 34 | IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext 35 | ); 36 | 37 | /** 38 | Performs additional actions just before a PE/COFF image is unloaded. Any resources 39 | that were allocated by PeCoffLoaderRelocateImageExtraAction() must be freed. 40 | 41 | If ImageContext is NULL, then ASSERT(). 42 | 43 | @param ImageContext Pointer to the image context structure that describes the 44 | PE/COFF image that is being unloaded. 45 | 46 | **/ 47 | VOID 48 | EFIAPI 49 | PeCoffLoaderUnloadImageExtraAction ( 50 | IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext 51 | ); 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Library/ResourcePublicationLib.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Provides a service to publish discovered system resources. 3 | 4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials 6 | are licensed and made available under the terms and conditions of the BSD License 7 | which accompanies this distribution. The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | **/ 14 | 15 | #ifndef __RESOURCE_PUBLICATION_LIB__ 16 | #define __RESOURCE_PUBLICATION_LIB__ 17 | 18 | /** 19 | Declares the presence of permanent system memory in the platform. 20 | 21 | Declares that the system memory buffer specified by MemoryBegin and MemoryLength 22 | as permanent memory that may be used for general purpose use by software. 23 | The amount of memory available to software may be less than MemoryLength 24 | if published memory has alignment restrictions. 25 | If MemoryLength is 0, then ASSERT(). 26 | If MemoryLength is greater than (MAX_ADDRESS - MemoryBegin + 1), then ASSERT(). 27 | 28 | @param MemoryBegin The start address of the memory being declared. 29 | @param MemoryLength The number of bytes of memory being declared. 30 | 31 | @retval RETURN_SUCCESS The memory buffer was published. 32 | @retval RETURN_OUT_OF_RESOURCES There are not enough resources to publish the memory buffer 33 | 34 | **/ 35 | RETURN_STATUS 36 | EFIAPI 37 | PublishSystemMemory ( 38 | IN PHYSICAL_ADDRESS MemoryBegin, 39 | IN UINT64 MemoryLength 40 | ); 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Library/S3StallLib.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Stall Services that perform stalls and also enable the Stall operatation 3 | to be replayed during an S3 resume. This library class maps directly on top 4 | of the Timer class. 5 | 6 | Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.
7 | 8 | This program and the accompanying materials 9 | are licensed and made available under the terms and conditions 10 | of the BSD License which accompanies this distribution. The 11 | full text of the license may be found at 12 | http://opensource.org/licenses/bsd-license.php 13 | 14 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 16 | 17 | **/ 18 | 19 | #ifndef __S3_STALL_LIB_H__ 20 | #define __S3_STALL_LIB_H__ 21 | 22 | /** 23 | Stalls the CPU for at least the given number of microseconds and saves 24 | the value in the S3 script to be replayed on S3 resume. 25 | 26 | Stalls the CPU for the number of microseconds specified by MicroSeconds. 27 | 28 | @param[in] MicroSeconds The minimum number of microseconds to delay. 29 | 30 | @return MicroSeconds. 31 | 32 | **/ 33 | UINTN 34 | EFIAPI 35 | S3Stall ( 36 | IN UINTN MicroSeconds 37 | ); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Library/SalLib.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Provides library services to make SAL Calls. 3 | 4 | Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials 6 | are licensed and made available under the terms and conditions of the BSD License 7 | which accompanies this distribution. The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | **/ 14 | 15 | #ifndef __SAL_LIB__ 16 | #define __SAL_LIB__ 17 | 18 | #include 19 | 20 | /** 21 | Makes a SAL procedure call. 22 | 23 | This is a wrapper function to make a SAL procedure call. 24 | No parameter checking is performed on the 8 input parameters, 25 | but there are some common rules that the caller should follow 26 | when making a SAL call. Any address passed to SAL as buffers 27 | for return parameters must be 8-byte aligned. Unaligned 28 | addresses may cause undefined results. For those parameters 29 | defined as reserved or some fields defined as reserved must be 30 | zero filled or the invalid argument return value may be returned 31 | or undefined result may occur during the execution of the procedure. 32 | This function is only available on Intel Itanium-based platforms. 33 | 34 | @param Index The SAL procedure Index number 35 | @param Arg2 The 2nd parameter for SAL procedure calls 36 | @param Arg3 The 3rd parameter for SAL procedure calls 37 | @param Arg4 The 4th parameter for SAL procedure calls 38 | @param Arg5 The 5th parameter for SAL procedure calls 39 | @param Arg6 The 6th parameter for SAL procedure calls 40 | @param Arg7 The 7th parameter for SAL procedure calls 41 | @param Arg8 The 8th parameter for SAL procedure calls 42 | 43 | @return SAL returned registers. 44 | 45 | **/ 46 | SAL_RETURN_REGS 47 | EFIAPI 48 | SalCall ( 49 | IN UINT64 Index, 50 | IN UINT64 Arg2, 51 | IN UINT64 Arg3, 52 | IN UINT64 Arg4, 53 | IN UINT64 Arg5, 54 | IN UINT64 Arg6, 55 | IN UINT64 Arg7, 56 | IN UINT64 Arg8 57 | ); 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Library/SmmServicesTableLib.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Provides a service to retrieve a pointer to the SMM Services Table. 3 | Only available to SMM module types. 4 | 5 | Copyright (c) 2009, Intel Corporation. All rights reserved.
6 | This program and the accompanying materials 7 | are licensed and made available under the terms and conditions of the BSD License 8 | which accompanies this distribution. The full text of the license may be found at 9 | http://opensource.org/licenses/bsd-license.php 10 | 11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | 14 | **/ 15 | 16 | #ifndef __SMM_SERVICES_TABLE_LIB_H__ 17 | #define __SMM_SERVICES_TABLE_LIB_H__ 18 | 19 | #include 20 | 21 | /// 22 | /// Cache pointer to the SMM Services Table 23 | /// 24 | extern EFI_SMM_SYSTEM_TABLE2 *gSmst; 25 | 26 | /** 27 | This function allows the caller to determine if the driver is executing in 28 | System Management Mode(SMM). 29 | 30 | This function returns TRUE if the driver is executing in SMM and FALSE if the 31 | driver is not executing in SMM. 32 | 33 | @retval TRUE The driver is executing in System Management Mode (SMM). 34 | @retval FALSE The driver is not executing in System Management Mode (SMM). 35 | 36 | **/ 37 | BOOLEAN 38 | EFIAPI 39 | InSmm ( 40 | VOID 41 | ); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Library/UefiBootServicesTableLib.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Provides a service to retrieve a pointer to the EFI Boot Services Table. 3 | Only available to DXE and UEFI module types. 4 | 5 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
6 | This program and the accompanying materials 7 | are licensed and made available under the terms and conditions of the BSD License 8 | which accompanies this distribution. The full text of the license may be found at 9 | http://opensource.org/licenses/bsd-license.php 10 | 11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | 14 | **/ 15 | 16 | #ifndef __UEFI_BOOT_SERVICES_TABLE_LIB_H__ 17 | #define __UEFI_BOOT_SERVICES_TABLE_LIB_H__ 18 | 19 | /// 20 | /// Cache the Image Handle 21 | /// 22 | extern EFI_HANDLE gImageHandle; 23 | 24 | /// 25 | /// Cache pointer to the EFI System Table 26 | /// 27 | extern EFI_SYSTEM_TABLE *gST; 28 | 29 | /// 30 | /// Cache pointer to the EFI Boot Services Table 31 | /// 32 | extern EFI_BOOT_SERVICES *gBS; 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Library/UefiRuntimeServicesTableLib.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Provides a service to retrieve a pointer to the EFI Runtime Services Table. 3 | 4 | This library does not contain any functions or macros. It simply exports the 5 | global variable gRT that is a pointer to the EFI Runtime Services Table as defined 6 | in the UEFI Specification. The global variable gRT must be preinitialized to NULL. 7 | The library constructor must set gRT to point at the EFI Runtime Services Table so 8 | it is available at the module's entry point. Since there is overhead in initializing 9 | this global variable, only those modules that actually require access to the EFI 10 | Runtime Services Table should use this library. 11 | Only available to DXE and UEFI module types. 12 | 13 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
14 | This program and the accompanying materials 15 | are licensed and made available under the terms and conditions of the BSD License 16 | which accompanies this distribution. The full text of the license may be found at 17 | http://opensource.org/licenses/bsd-license.php 18 | 19 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 20 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 21 | 22 | **/ 23 | 24 | #ifndef __UEFI_RUNTIME_SERVICES_TABLE_LIB_H__ 25 | #define __UEFI_RUNTIME_SERVICES_TABLE_LIB_H__ 26 | 27 | /// 28 | /// Cached copy of the EFI Runtime Services Table 29 | /// 30 | extern EFI_RUNTIME_SERVICES *gRT; 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Pi/PiBootMode.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Present the boot mode values in PI. 3 | 4 | Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials 6 | are licensed and made available under the terms and conditions of the BSD License 7 | which accompanies this distribution. The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | @par Revision Reference: 14 | PI Version 1.2.1A 15 | 16 | **/ 17 | 18 | #ifndef __PI_BOOT_MODE_H__ 19 | #define __PI_BOOT_MODE_H__ 20 | 21 | /// 22 | /// EFI boot mode 23 | /// 24 | typedef UINT32 EFI_BOOT_MODE; 25 | 26 | // 27 | // 0x21 - 0xf..f are reserved. 28 | // 29 | #define BOOT_WITH_FULL_CONFIGURATION 0x00 30 | #define BOOT_WITH_MINIMAL_CONFIGURATION 0x01 31 | #define BOOT_ASSUMING_NO_CONFIGURATION_CHANGES 0x02 32 | #define BOOT_WITH_FULL_CONFIGURATION_PLUS_DIAGNOSTICS 0x03 33 | #define BOOT_WITH_DEFAULT_SETTINGS 0x04 34 | #define BOOT_ON_S4_RESUME 0x05 35 | #define BOOT_ON_S5_RESUME 0x06 36 | #define BOOT_WITH_MFG_MODE_SETTINGS 0x07 37 | #define BOOT_ON_S2_RESUME 0x10 38 | #define BOOT_ON_S3_RESUME 0x11 39 | #define BOOT_ON_FLASH_UPDATE 0x12 40 | #define BOOT_IN_RECOVERY_MODE 0x20 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Pi/PiDependency.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Present the dependency expression values in PI. 3 | 4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials 6 | are licensed and made available under the terms and conditions of the BSD License 7 | which accompanies this distribution. The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | @par Revision Reference: 14 | PI Version 1.0 15 | 16 | **/ 17 | #ifndef __PI_DEPENDENCY_H__ 18 | #define __PI_DEPENDENCY_H__ 19 | 20 | /// 21 | /// If present, this must be the first and only opcode, 22 | /// EFI_DEP_BEFORE may be used by DXE and SMM drivers. 23 | /// 24 | #define EFI_DEP_BEFORE 0x00 25 | 26 | /// 27 | /// If present, this must be the first and only opcode, 28 | /// EFI_DEP_AFTER may be used by DXE and SMM drivers. 29 | /// 30 | #define EFI_DEP_AFTER 0x01 31 | 32 | #define EFI_DEP_PUSH 0x02 33 | #define EFI_DEP_AND 0x03 34 | #define EFI_DEP_OR 0x04 35 | #define EFI_DEP_NOT 0x05 36 | #define EFI_DEP_TRUE 0x06 37 | #define EFI_DEP_FALSE 0x07 38 | #define EFI_DEP_END 0x08 39 | 40 | 41 | /// 42 | /// If present, this must be the first opcode, 43 | /// EFI_DEP_SOR is only used by DXE driver. 44 | /// 45 | #define EFI_DEP_SOR 0x09 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Pi/PiSmmCommunicationAcpiTable.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | PI SMM Communication ACPI Table Definition. 3 | 4 | Copyright (c) 2011, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials are licensed and made available under 6 | the terms and conditions of the BSD License that accompanies this distribution. 7 | The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php. 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | **/ 14 | 15 | #ifndef __PI_SMM_COMMUNICATION_ACPI_TABLE__ 16 | #define __PI_SMM_COMMUNICATION_ACPI_TABLE__ 17 | 18 | #include 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/PiDxe.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | Root include file for Mde Package DXE_CORE, DXE, RUNTIME, SMM, SAL type modules. 4 | 5 | Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
6 | This program and the accompanying materials are licensed and made available under 7 | the terms and conditions of the BSD License that accompanies this distribution. 8 | The full text of the license may be found at 9 | http://opensource.org/licenses/bsd-license.php. 10 | 11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | 14 | **/ 15 | 16 | #ifndef __PI_DXE_H__ 17 | #define __PI_DXE_H__ 18 | 19 | #include 20 | #include 21 | 22 | #include 23 | 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/PiPei.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | Root include file for Mde Package SEC, PEIM, PEI_CORE type modules. 4 | 5 | This is the include file for any module of type PEIM. PEIM 6 | modules only use types defined via this include file and can 7 | be ported easily to any environment. 8 | 9 | Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
10 | This program and the accompanying materials are licensed and made available under 11 | the terms and conditions of the BSD License that accompanies this distribution. 12 | The full text of the license may be found at 13 | http://opensource.org/licenses/bsd-license.php. 14 | 15 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 16 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 17 | 18 | **/ 19 | 20 | #ifndef __PI_PEI_H__ 21 | #define __PI_PEI_H__ 22 | 23 | #include 24 | #include 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/PiSmm.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | Root include file for Mde Package SMM modules. 4 | 5 | Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
6 | This program and the accompanying materials are licensed and made available under 7 | the terms and conditions of the BSD License that accompanies this distribution. 8 | The full text of the license may be found at 9 | http://opensource.org/licenses/bsd-license.php. 10 | 11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | 14 | **/ 15 | 16 | #ifndef __PI_SMM_H__ 17 | #define __PI_SMM_H__ 18 | 19 | #include 20 | #include 21 | 22 | #include 23 | #include 24 | 25 | #endif 26 | 27 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Ppi/BootInRecoveryMode.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | This PPI is installed by the platform PEIM to designate that a recovery boot 3 | is in progress. 4 | 5 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
6 | This program and the accompanying materials 7 | are licensed and made available under the terms and conditions of the BSD License 8 | which accompanies this distribution. The full text of the license may be found at 9 | http://opensource.org/licenses/bsd-license.php 10 | 11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | 14 | @par Revision Reference: 15 | This PPI is introduced in PI Version 1.0. 16 | 17 | **/ 18 | 19 | #ifndef __BOOT_IN_RECOVERY_MODE_PPI_H__ 20 | #define __BOOT_IN_RECOVERY_MODE_PPI_H__ 21 | 22 | #define EFI_PEI_BOOT_IN_RECOVERY_MODE_PPI \ 23 | { \ 24 | 0x17ee496a, 0xd8e4, 0x4b9a, {0x94, 0xd1, 0xce, 0x82, 0x72, 0x30, 0x8, 0x50 } \ 25 | } 26 | 27 | 28 | extern EFI_GUID gEfiPeiBootInRecoveryModePpiGuid; 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Ppi/EndOfPeiPhase.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | This PPI will be installed at the end of PEI for all boot paths, including 3 | normal, recovery, and S3. It allows for PEIMs to possibly quiesce hardware, 4 | build handoff information for the next phase of execution, 5 | or provide some terminal processing behavior. 6 | 7 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
8 | This program and the accompanying materials 9 | are licensed and made available under the terms and conditions of the BSD License 10 | which accompanies this distribution. The full text of the license may be found at 11 | http://opensource.org/licenses/bsd-license.php 12 | 13 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 15 | 16 | @par Revision Reference: 17 | This PPI is introduced in PI Version 1.0. 18 | 19 | **/ 20 | 21 | #ifndef __END_OF_PEI_PHASE_PPI_H__ 22 | #define __END_OF_PEI_PHASE_PPI_H__ 23 | 24 | #define EFI_PEI_END_OF_PEI_PHASE_PPI_GUID \ 25 | { \ 26 | 0x605EA650, 0xC65C, 0x42e1, {0xBA, 0x80, 0x91, 0xA5, 0x2A, 0xB6, 0x18, 0xC6 } \ 27 | } 28 | 29 | extern EFI_GUID gEfiEndOfPeiSignalPpiGuid; 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Ppi/LoadImage.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | The file describes the PPI which notifies other drivers 3 | of the PEIM being initialized by the PEI Dispatcher. 4 | 5 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
6 | This program and the accompanying materials 7 | are licensed and made available under the terms and conditions of the BSD License 8 | which accompanies this distribution. The full text of the license may be found at 9 | http://opensource.org/licenses/bsd-license.php 10 | 11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | 14 | @par Revision Reference: 15 | This PPI is introduced in PI Version 1.0. 16 | 17 | **/ 18 | 19 | #ifndef __LOADED_IMAGE_PPI_H__ 20 | #define __LOADED_IMAGE_PPI_H__ 21 | 22 | #define EFI_PEI_LOADED_IMAGE_PPI_GUID \ 23 | { 0xc1fcd448, 0x6300, 0x4458, { 0xb8, 0x64, 0x28, 0xdf, 0x1, 0x53, 0x64, 0xbc } } 24 | 25 | 26 | typedef struct _EFI_PEI_LOADED_IMAGE_PPI EFI_PEI_LOADED_IMAGE_PPI; 27 | 28 | /// 29 | /// This interface is installed by the PEI Dispatcher after the image has been 30 | /// loaded and after all security checks have been performed, 31 | /// to notify other PEIMs of the files which are being loaded. 32 | /// 33 | struct _EFI_PEI_LOADED_IMAGE_PPI { 34 | /// 35 | /// Address of the image at the address where it will be executed. 36 | /// 37 | EFI_PHYSICAL_ADDRESS ImageAddress; 38 | /// 39 | /// Size of the image as it will be executed. 40 | /// 41 | UINT64 ImageSize; 42 | /// 43 | /// File handle from which the image was loaded. 44 | /// Can be NULL, indicating the image was not loaded from a handle. 45 | /// 46 | EFI_PEI_FILE_HANDLE FileHandle; 47 | }; 48 | 49 | 50 | extern EFI_GUID gEfiPeiLoadedImagePpiGuid; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Ppi/MasterBootMode.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | This file declares Boot Mode PPI. 3 | 4 | The Master Boot Mode PPI is installed by a PEIM to signal that a final 5 | boot has been determined and set. This signal is useful in that PEIMs 6 | with boot-mode-specific behavior can put this PPI in their dependency expression. 7 | 8 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
9 | This program and the accompanying materials 10 | are licensed and made available under the terms and conditions of the BSD License 11 | which accompanies this distribution. The full text of the license may be found at 12 | http://opensource.org/licenses/bsd-license.php 13 | 14 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 16 | 17 | @par Revision Reference: 18 | This PPI is introduced in PI Version 1.0. 19 | 20 | **/ 21 | 22 | #ifndef __MASTER_BOOT_MODE_PPI_H__ 23 | #define __MASTER_BOOT_MODE_PPI_H__ 24 | 25 | #define EFI_PEI_MASTER_BOOT_MODE_PEIM_PPI \ 26 | { \ 27 | 0x7408d748, 0xfc8c, 0x4ee6, {0x92, 0x88, 0xc4, 0xbe, 0xc0, 0x92, 0xa4, 0x10 } \ 28 | } 29 | 30 | extern EFI_GUID gEfiPeiMasterBootModePpiGuid; 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Ppi/MemoryDiscovered.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | This file declares Memory Discovered PPI. 3 | 4 | This PPI is published by the PEI Foundation when the main memory is installed. 5 | It is essentially a PPI with no associated interface. Its purpose is to be used 6 | as a signal for other PEIMs who can register for a notification on its installation. 7 | 8 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
9 | This program and the accompanying materials 10 | are licensed and made available under the terms and conditions of the BSD License 11 | which accompanies this distribution. The full text of the license may be found at 12 | http://opensource.org/licenses/bsd-license.php 13 | 14 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 16 | 17 | @par Revision Reference: 18 | This PPI is introduced in PI Version 1.0. 19 | 20 | **/ 21 | 22 | #ifndef __PEI_MEMORY_DISCOVERED_PPI_H__ 23 | #define __PEI_MEMORY_DISCOVERED_PPI_H__ 24 | 25 | #define EFI_PEI_PERMANENT_MEMORY_INSTALLED_PPI_GUID \ 26 | { \ 27 | 0xf894643d, 0xc449, 0x42d1, {0x8e, 0xa8, 0x85, 0xbd, 0xd8, 0xc6, 0x5b, 0xde } \ 28 | } 29 | 30 | extern EFI_GUID gEfiPeiMemoryDiscoveredPpiGuid; 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Ppi/Reset.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | This file declares Reset PPI used to reset the platform. 3 | 4 | This PPI is installed by some platform- or chipset-specific PEIM that 5 | abstracts the Reset Service to other agents. 6 | 7 | Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
8 | This program and the accompanying materials 9 | are licensed and made available under the terms and conditions of the BSD License 10 | which accompanies this distribution. The full text of the license may be found at 11 | http://opensource.org/licenses/bsd-license.php 12 | 13 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 15 | 16 | @par Revision Reference: 17 | This PPI is introduced in PI Version 1.0. 18 | 19 | **/ 20 | 21 | #ifndef __RESET_PPI_H__ 22 | #define __RESET_PPI_H__ 23 | 24 | #define EFI_PEI_RESET_PPI_GUID \ 25 | { \ 26 | 0xef398d58, 0x9dfd, 0x4103, {0xbf, 0x94, 0x78, 0xc6, 0xf4, 0xfe, 0x71, 0x2f } \ 27 | } 28 | 29 | // 30 | // EFI_PEI_RESET_PPI.ResetSystem() is equivalent to the 31 | // PEI Service ResetSystem(). 32 | // It is introduced in PIPeiCis.h. 33 | // 34 | 35 | /// 36 | /// This PPI provides provide a simple reset service. 37 | /// 38 | typedef struct { 39 | EFI_PEI_RESET_SYSTEM ResetSystem; 40 | } EFI_PEI_RESET_PPI; 41 | 42 | extern EFI_GUID gEfiPeiResetPpiGuid; 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Ppi/Reset2.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | This file declares Reset2 PPI used to reset the platform. 3 | 4 | This PPI is installed by some platform- or chipset-specific PEIM that 5 | abstracts the Reset Service to other agents. 6 | 7 | Copyright (c) 2015, Intel Corporation. All rights reserved.
8 | This program and the accompanying materials 9 | are licensed and made available under the terms and conditions of the BSD License 10 | which accompanies this distribution. The full text of the license may be found at 11 | http://opensource.org/licenses/bsd-license.php 12 | 13 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 15 | 16 | @par Revision Reference: 17 | This PPI is introduced in PI Version 1.4. 18 | 19 | **/ 20 | 21 | #ifndef __RESET2_PPI_H__ 22 | #define __RESET2_PPI_H__ 23 | 24 | #define EFI_PEI_RESET2_PPI_GUID \ 25 | { \ 26 | 0x6cc45765, 0xcce4, 0x42fd, {0xbc, 0x56, 0x1, 0x1a, 0xaa, 0xc6, 0xc9, 0xa8 } \ 27 | } 28 | 29 | /// 30 | /// This PPI provides provide a simple reset service. 31 | /// 32 | typedef struct _EFI_PEI_RESET2_PPI { 33 | EFI_PEI_RESET2_SYSTEM ResetSystem; 34 | } EFI_PEI_RESET2_PPI; 35 | 36 | extern EFI_GUID gEfiPeiReset2PpiGuid; 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Ppi/Stall.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | This file declares Stall PPI. 3 | 4 | This ppi abstracts the blocking stall service to other agents. 5 | 6 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
7 | This program and the accompanying materials 8 | are licensed and made available under the terms and conditions of the BSD License 9 | which accompanies this distribution. The full text of the license may be found at 10 | http://opensource.org/licenses/bsd-license.php 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 14 | 15 | @par Revision Reference: 16 | This PPI is introduced in PI Version 1.0. 17 | 18 | **/ 19 | 20 | #ifndef __STALL_PPI_H__ 21 | #define __STALL_PPI_H__ 22 | 23 | #define EFI_PEI_STALL_PPI_GUID \ 24 | { 0x1f4c6f90, 0xb06b, 0x48d8, {0xa2, 0x01, 0xba, 0xe5, 0xf1, 0xcd, 0x7d, 0x56 } } 25 | 26 | typedef struct _EFI_PEI_STALL_PPI EFI_PEI_STALL_PPI; 27 | 28 | /** 29 | The Stall() function provides a blocking stall for at least the number 30 | of microseconds stipulated in the final argument of the API. 31 | 32 | @param PeiServices An indirect pointer to the PEI Services Table 33 | published by the PEI Foundation. 34 | @param This Pointer to the local data for the interface. 35 | @param Microseconds Number of microseconds for which to stall. 36 | 37 | @retval EFI_SUCCESS The service provided at least the required delay. 38 | 39 | **/ 40 | typedef 41 | EFI_STATUS 42 | (EFIAPI *EFI_PEI_STALL)( 43 | IN CONST EFI_PEI_SERVICES **PeiServices, 44 | IN CONST EFI_PEI_STALL_PPI *This, 45 | IN UINTN Microseconds 46 | ); 47 | 48 | /// 49 | /// This service provides a simple, blocking stall with platform-specific resolution. 50 | /// 51 | struct _EFI_PEI_STALL_PPI { 52 | /// 53 | /// The resolution in microseconds of the stall services. 54 | /// 55 | UINTN Resolution; 56 | 57 | EFI_PEI_STALL Stall; 58 | }; 59 | 60 | extern EFI_GUID gEfiPeiStallPpiGuid; 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Ppi/StatusCode.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | This file declares Status Code PPI. 3 | This ppi provides a service that allows PEIMs to report status codes. 4 | 5 | Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
6 | This program and the accompanying materials 7 | are licensed and made available under the terms and conditions of the BSD License 8 | which accompanies this distribution. The full text of the license may be found at 9 | http://opensource.org/licenses/bsd-license.php 10 | 11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | 14 | @par Revision Reference: 15 | This PPI is introduced in PI Version 1.0. 16 | 17 | **/ 18 | 19 | #ifndef __STATUS_CODE_PPI_H__ 20 | #define __STATUS_CODE_PPI_H__ 21 | 22 | #define EFI_PEI_REPORT_PROGRESS_CODE_PPI_GUID \ 23 | { 0x229832d3, 0x7a30, 0x4b36, {0xb8, 0x27, 0xf4, 0xc, 0xb7, 0xd4, 0x54, 0x36 } } 24 | 25 | // 26 | // EFI_PEI_PROGRESS_CODE_PPI.ReportStatusCode() is equivalent to the 27 | // PEI Service ReportStatusCode(). 28 | // It is introduced in PIPeiCis.h. 29 | // 30 | 31 | /// 32 | /// This PPI provides the service to report status code. 33 | /// There can be only one instance of this service in the system. 34 | /// 35 | typedef struct { 36 | EFI_PEI_REPORT_STATUS_CODE ReportStatusCode; 37 | } EFI_PEI_PROGRESS_CODE_PPI; 38 | 39 | extern EFI_GUID gEfiPeiStatusCodePpiGuid; 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Ppi/TemporaryRamDone.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | This file declares Temporary RAM Done PPI. 3 | The PPI that provides a service to disable the use of Temporary RAM. 4 | 5 | Copyright (c) 2013, Intel Corporation. All rights reserved.
6 | This program and the accompanying materials 7 | are licensed and made available under the terms and conditions of the BSD License 8 | which accompanies this distribution. The full text of the license may be found at 9 | http://opensource.org/licenses/bsd-license.php 10 | 11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | 14 | @par Revision Reference: 15 | This PPI is introduced in PI Version 1.2.1. 16 | 17 | **/ 18 | 19 | #ifndef __TEMPORARY_RAM_DONE_H__ 20 | #define __TEMPORARY_RAM_DONE_H__ 21 | 22 | #define EFI_PEI_TEMPORARY_RAM_DONE_PPI_GUID \ 23 | { 0xceab683c, 0xec56, 0x4a2d, { 0xa9, 0x6, 0x40, 0x53, 0xfa, 0x4e, 0x9c, 0x16 } } 24 | 25 | /** 26 | TemporaryRamDone() disables the use of Temporary RAM. If present, this service is invoked 27 | by the PEI Foundation after the EFI_PEI_PERMANANT_MEMORY_INSTALLED_PPI is installed. 28 | 29 | @retval EFI_SUCCESS Use of Temporary RAM was disabled. 30 | @retval EFI_INVALID_PARAMETER Temporary RAM could not be disabled. 31 | 32 | **/ 33 | typedef 34 | EFI_STATUS 35 | (EFIAPI * EFI_PEI_TEMPORARY_RAM_DONE) ( 36 | VOID 37 | ); 38 | 39 | /// 40 | /// This is an optional PPI that may be produced by SEC or a PEIM. If present, it provide a service to 41 | /// disable the use of Temporary RAM. This service may only be called by the PEI Foundation after the 42 | /// transition from Temporary RAM to Permanent RAM is complete. This PPI provides an alternative 43 | /// to the Temporary RAM Migration PPI for system architectures that allow Temporary RAM and 44 | /// Permanent RAM to be enabled and accessed at the same time with no side effects. 45 | /// 46 | typedef struct _EFI_PEI_TEMPORARY_RAM_DONE_PPI { 47 | EFI_PEI_TEMPORARY_RAM_DONE TemporaryRamDone; 48 | } EFI_PEI_TEMPORARY_RAM_DONE_PPI; 49 | 50 | extern EFI_GUID gEfiTemporaryRamDonePpiGuid; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Protocol/Capsule.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Capsule Architectural Protocol as defined in PI1.0a Specification VOLUME 2 DXE 3 | 4 | The DXE Driver that produces this protocol must be a runtime driver. 5 | The driver is responsible for initializing the CapsuleUpdate() and 6 | QueryCapsuleCapabilities() fields of the UEFI Runtime Services Table. 7 | After the two fields of the UEFI Runtime Services Table have been initialized, 8 | the driver must install the EFI_CAPSULE_ARCH_PROTOCOL_GUID on a new handle 9 | with a NULL interface pointer. The installation of this protocol informs 10 | the DXE Foundation that the Capsule related services are now available and 11 | that the DXE Foundation must update the 32-bit CRC of the UEFI Runtime Services Table. 12 | 13 | Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
14 | This program and the accompanying materials 15 | are licensed and made available under the terms and conditions of the BSD License 16 | which accompanies this distribution. The full text of the license may be found at 17 | http://opensource.org/licenses/bsd-license.php 18 | 19 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 20 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 21 | 22 | **/ 23 | 24 | #ifndef __ARCH_PROTOCOL_CAPSULE_ARCH_H__ 25 | #define __ARCH_PROTOCOL_CAPSULE_ARCH_H__ 26 | 27 | // 28 | // Global ID for the Capsule Architectural Protocol 29 | // 30 | #define EFI_CAPSULE_ARCH_PROTOCOL_GUID \ 31 | { 0x5053697e, 0x2cbc, 0x4819, {0x90, 0xd9, 0x05, 0x80, 0xde, 0xee, 0x57, 0x54 }} 32 | 33 | extern EFI_GUID gEfiCapsuleArchProtocolGuid; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Protocol/DriverSupportedEfiVersion.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | The protocol provides information about the version of the EFI 3 | specification that a driver is following. This protocol is 4 | required for EFI drivers that are on PCI and other plug-in 5 | cards. 6 | 7 | Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
8 | This program and the accompanying materials 9 | are licensed and made available under the terms and conditions of the BSD License 10 | which accompanies this distribution. The full text of the license may be found at 11 | http://opensource.org/licenses/bsd-license.php 12 | 13 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | 18 | #ifndef __DRIVER_SUPPORTED_EFI_VERSION_H__ 19 | #define __DRIVER_SUPPORTED_EFI_VERSION_H__ 20 | 21 | #define EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL_GUID \ 22 | { 0x5c198761, 0x16a8, 0x4e69, { 0x97, 0x2c, 0x89, 0xd6, 0x79, 0x54, 0xf8, 0x1d } } 23 | 24 | 25 | /// 26 | /// The EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL provides a 27 | /// mechanism for an EFI driver to publish the version of the EFI 28 | /// specification it conforms to. This protocol must be placed on 29 | /// the driver's image handle when the driver's entry point is 30 | /// called. 31 | /// 32 | typedef struct _EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL { 33 | /// 34 | /// The size, in bytes, of the entire structure. Future versions of this 35 | /// specification may grow the size of the structure. 36 | /// 37 | UINT32 Length; 38 | /// 39 | /// The latest version of the UEFI specification that this driver conforms to. 40 | /// 41 | UINT32 FirmwareVersion; 42 | } EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL; 43 | 44 | extern EFI_GUID gEfiDriverSupportedEfiVersionProtocolGuid; 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Protocol/DxeSmmReadyToLock.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | DXE SMM Ready To Lock protocol introduced in the PI 1.2 specification. 3 | 4 | According to PI 1.4a specification, this UEFI protocol indicates that 5 | resources and services that should not be used by the third party code 6 | are about to be locked. 7 | This protocol is a mandatory protocol published by PI platform code. 8 | This protocol in tandem with the End of DXE Event facilitates transition 9 | of the platform from the environment where all of the components are 10 | under the authority of the platform manufacturer to the environment where 11 | third party extensible modules such as UEFI drivers and UEFI applications 12 | are executed. The protocol is published immediately after signaling of the 13 | End of DXE Event. PI modules that need to lock or protect their resources 14 | in anticipation of the invocation of 3rd party extensible modules should 15 | register for notification on installation of this protocol and effect the 16 | appropriate protections in their notification handlers. For example, PI 17 | platform code may choose to use notification handler to lock SMM by invoking 18 | EFI_SMM_ACCESS2_PROTOCOL.Lock() function. 19 | 20 | Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.
21 | This program and the accompanying materials 22 | are licensed and made available under the terms and conditions of the BSD License 23 | which accompanies this distribution. The full text of the license may be found at 24 | http://opensource.org/licenses/bsd-license.php 25 | 26 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 27 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 28 | 29 | **/ 30 | 31 | #ifndef _DXE_SMM_READY_TO_LOCK_H_ 32 | #define _DXE_SMM_READY_TO_LOCK_H_ 33 | 34 | #define EFI_DXE_SMM_READY_TO_LOCK_PROTOCOL_GUID \ 35 | { \ 36 | 0x60ff8964, 0xe906, 0x41d0, { 0xaf, 0xed, 0xf2, 0x41, 0xe9, 0x74, 0xe0, 0x8e } \ 37 | } 38 | 39 | extern EFI_GUID gEfiDxeSmmReadyToLockProtocolGuid; 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Protocol/EdidActive.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | EDID Active Protocol from the UEFI 2.0 specification. 3 | 4 | Placed on the video output device child handle that is actively displaying output. 5 | 6 | Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
7 | This program and the accompanying materials 8 | are licensed and made available under the terms and conditions of the BSD License 9 | which accompanies this distribution. The full text of the license may be found at 10 | http://opensource.org/licenses/bsd-license.php 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 14 | 15 | **/ 16 | 17 | #ifndef __EDID_ACTIVE_H__ 18 | #define __EDID_ACTIVE_H__ 19 | 20 | #define EFI_EDID_ACTIVE_PROTOCOL_GUID \ 21 | { \ 22 | 0xbd8c1056, 0x9f36, 0x44ec, {0x92, 0xa8, 0xa6, 0x33, 0x7f, 0x81, 0x79, 0x86 } \ 23 | } 24 | 25 | /// 26 | /// This protocol contains the EDID information for an active video output device. This is either the 27 | /// EDID information retrieved from the EFI_EDID_OVERRIDE_PROTOCOL if an override is 28 | /// available, or an identical copy of the EDID information from the 29 | /// EFI_EDID_DISCOVERED_PROTOCOL if no overrides are available. 30 | /// 31 | typedef struct { 32 | /// 33 | /// The size, in bytes, of the Edid buffer. 0 if no EDID information 34 | /// is available from the video output device. Otherwise, it must be a 35 | /// minimum of 128 bytes. 36 | /// 37 | UINT32 SizeOfEdid; 38 | 39 | /// 40 | /// A pointer to a read-only array of bytes that contains the EDID 41 | /// information for an active video output device. This pointer is 42 | /// NULL if no EDID information is available for the video output 43 | /// device. The minimum size of a valid Edid buffer is 128 bytes. 44 | /// EDID information is defined in the E-EDID EEPROM 45 | /// specification published by VESA (www.vesa.org). 46 | /// 47 | UINT8 *Edid; 48 | } EFI_EDID_ACTIVE_PROTOCOL; 49 | 50 | extern EFI_GUID gEfiEdidActiveProtocolGuid; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Protocol/EdidDiscovered.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | EDID Discovered Protocol from the UEFI 2.0 specification. 3 | 4 | This protocol is placed on the video output device child handle. It represents 5 | the EDID information being used for the output device represented by the child handle. 6 | 7 | Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
8 | This program and the accompanying materials 9 | are licensed and made available under the terms and conditions of the BSD License 10 | which accompanies this distribution. The full text of the license may be found at 11 | http://opensource.org/licenses/bsd-license.php 12 | 13 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 15 | 16 | **/ 17 | 18 | #ifndef __EDID_DISCOVERED_H__ 19 | #define __EDID_DISCOVERED_H__ 20 | 21 | #define EFI_EDID_DISCOVERED_PROTOCOL_GUID \ 22 | { \ 23 | 0x1c0c34f6, 0xd380, 0x41fa, {0xa0, 0x49, 0x8a, 0xd0, 0x6c, 0x1a, 0x66, 0xaa } \ 24 | } 25 | 26 | /// 27 | /// This protocol contains the EDID information retrieved from a video output device. 28 | /// 29 | typedef struct { 30 | /// 31 | /// The size, in bytes, of the Edid buffer. 0 if no EDID information 32 | /// is available from the video output device. Otherwise, it must be a 33 | /// minimum of 128 bytes. 34 | /// 35 | UINT32 SizeOfEdid; 36 | 37 | /// 38 | /// A pointer to a read-only array of bytes that contains the EDID 39 | /// information for an active video output device. This pointer is 40 | /// NULL if no EDID information is available for the video output 41 | /// device. The minimum size of a valid Edid buffer is 128 bytes. 42 | /// EDID information is defined in the E-EDID EEPROM 43 | /// specification published by VESA (www.vesa.org). 44 | /// 45 | UINT8 *Edid; 46 | } EFI_EDID_DISCOVERED_PROTOCOL; 47 | 48 | extern EFI_GUID gEfiEdidDiscoveredProtocolGuid; 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Protocol/HiiPackageList.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | EFI_HII_PACKAGE_LIST_PROTOCOL as defined in UEFI 2.1. 3 | Boot service LoadImage() installs EFI_HII_PACKAGE_LIST_PROTOCOL on the handle 4 | if the image contains a custom PE/COFF resource with the type 'HII'. 5 | The protocol's interface pointer points to the HII package list, which is 6 | contained in the resource's data. 7 | 8 | Copyright (c) 2009, Intel Corporation. All rights reserved.
9 | This program and the accompanying materials 10 | are licensed and made available under the terms and conditions of the BSD License 11 | which accompanies this distribution. The full text of the license may be found at 12 | http://opensource.org/licenses/bsd-license.php 13 | 14 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 16 | 17 | **/ 18 | 19 | #ifndef __HII_PACKAGE_LIST_H__ 20 | #define __HII_PACKAGE_LIST_H__ 21 | 22 | #define EFI_HII_PACKAGE_LIST_PROTOCOL_GUID \ 23 | { 0x6a1ee763, 0xd47a, 0x43b4, {0xaa, 0xbe, 0xef, 0x1d, 0xe2, 0xab, 0x56, 0xfc}} 24 | 25 | typedef EFI_HII_PACKAGE_LIST_HEADER * EFI_HII_PACKAGE_LIST_PROTOCOL; 26 | 27 | extern EFI_GUID gEfiHiiPackageListProtocolGuid; 28 | 29 | 30 | 31 | #endif 32 | 33 | 34 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Protocol/MonotonicCounter.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Monotonic Counter Architectural Protocol as defined in PI SPEC VOLUME 2 DXE 3 | 4 | This code provides the services required to access the system's monotonic counter 5 | 6 | Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
7 | This program and the accompanying materials are licensed and made available under 8 | the terms and conditions of the BSD License that accompanies this distribution. 9 | The full text of the license may be found at 10 | http://opensource.org/licenses/bsd-license.php. 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 14 | 15 | **/ 16 | 17 | #ifndef __ARCH_PROTOCOL_MONTONIC_COUNTER_H__ 18 | #define __ARCH_PROTOCOL_MONTONIC_COUNTER_H__ 19 | 20 | /// 21 | /// Global ID for the Monotonic Counter Architectural Protocol. 22 | /// 23 | #define EFI_MONOTONIC_COUNTER_ARCH_PROTOCOL_GUID \ 24 | {0x1da97072, 0xbddc, 0x4b30, {0x99, 0xf1, 0x72, 0xa0, 0xb5, 0x6f, 0xff, 0x2a} } 25 | 26 | extern EFI_GUID gEfiMonotonicCounterArchProtocolGuid; 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Protocol/PciEnumerationComplete.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | PCI Enumeration Complete Protocol as defined in the PI 1.1 specification. 3 | This protocol indicates that pci enumeration complete 4 | 5 | Copyright (c) 2009, Intel Corporation. All rights reserved.
6 | This program and the accompanying materials 7 | are licensed and made available under the terms and conditions of the BSD License 8 | which accompanies this distribution. The full text of the license may be found at 9 | http://opensource.org/licenses/bsd-license.php 10 | 11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 | 14 | @par Revision Reference: 15 | This Protocol is defined in UEFI Platform Initialization Specification 1.2 16 | Volume 5: Standards 17 | 18 | **/ 19 | 20 | #ifndef _PCI_ENUMERATION_COMPLETE_H_ 21 | #define _PCI_ENUMERATION_COMPLETE_H_ 22 | 23 | #define EFI_PCI_ENUMERATION_COMPLETE_GUID \ 24 | { \ 25 | 0x30cfe3e7, 0x3de1, 0x4586, { 0xbe, 0x20, 0xde, 0xab, 0xa1, 0xb3, 0xb7, 0x93 } \ 26 | } 27 | 28 | extern EFI_GUID gEfiPciEnumerationCompleteProtocolGuid; 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Protocol/PciOverride.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | This file declares EFI PCI Override protocol which provides the interface between 3 | the PCI bus driver/PCI Host Bridge Resource Allocation driver and an implementation's 4 | driver to describe the unique features of a platform. 5 | This protocol is optional. 6 | 7 | Copyright (c) 2009, Intel Corporation. All rights reserved.
8 | This program and the accompanying materials 9 | are licensed and made available under the terms and conditions of the BSD License 10 | which accompanies this distribution. The full text of the license may be found at 11 | http://opensource.org/licenses/bsd-license.php 12 | 13 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 15 | 16 | @par Revision Reference: 17 | This Protocol is defined in UEFI Platform Initialization Specification 1.2 18 | Volume 5: Standards 19 | 20 | **/ 21 | 22 | #ifndef _PCI_OVERRIDE_H_ 23 | #define _PCI_OVERRIDE_H_ 24 | 25 | /// 26 | /// EFI_PCI_OVERRIDE_PROTOCOL has the same structure with EFI_PCI_PLATFORM_PROTOCOL 27 | /// 28 | #include 29 | 30 | /// 31 | /// Global ID for the EFI_PCI_OVERRIDE_PROTOCOL 32 | /// 33 | #define EFI_PCI_OVERRIDE_GUID \ 34 | { \ 35 | 0xb5b35764, 0x460c, 0x4a06, {0x99, 0xfc, 0x77, 0xa1, 0x7c, 0x1b, 0x5c, 0xeb} \ 36 | } 37 | 38 | /// 39 | /// Declaration for EFI_PCI_OVERRIDE_PROTOCOL 40 | /// 41 | typedef EFI_PCI_PLATFORM_PROTOCOL EFI_PCI_OVERRIDE_PROTOCOL; 42 | 43 | 44 | extern EFI_GUID gEfiPciOverrideProtocolGuid; 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Protocol/RealTimeClock.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Real Time clock Architectural Protocol as defined in PI Specification VOLUME 2 DXE 3 | 4 | This code abstracts time and data functions. Used to provide 5 | Time and date related EFI runtime services. 6 | 7 | The GetTime (), SetTime (), GetWakeupTime (), and SetWakeupTime () UEFI 2.0 8 | services are added to the EFI system table and the 9 | EFI_REAL_TIME_CLOCK_ARCH_PROTOCOL_GUID protocol is registered with a NULL 10 | pointer. 11 | 12 | No CRC of the EFI system table is required, since that is done in the DXE core. 13 | 14 | Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
15 | This program and the accompanying materials 16 | are licensed and made available under the terms and conditions of the BSD License 17 | which accompanies this distribution. The full text of the license may be found at 18 | http://opensource.org/licenses/bsd-license.php 19 | 20 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 21 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 22 | 23 | **/ 24 | 25 | #ifndef __ARCH_PROTOCOL_REAL_TIME_CLOCK_H__ 26 | #define __ARCH_PROTOCOL_REAL_TIME_CLOCK_H__ 27 | 28 | /// 29 | /// Global ID for the Real Time Clock Architectural Protocol 30 | /// 31 | #define EFI_REAL_TIME_CLOCK_ARCH_PROTOCOL_GUID \ 32 | { 0x27CFAC87, 0x46CC, 0x11d4, {0x9A, 0x38, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } } 33 | 34 | extern EFI_GUID gEfiRealTimeClockArchProtocolGuid; 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Protocol/Reset.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Reset Architectural Protocol as defined in PI Specification VOLUME 2 DXE 3 | 4 | Used to provide ResetSystem runtime services 5 | 6 | The ResetSystem () UEFI 2.0 service is added to the EFI system table and the 7 | EFI_RESET_ARCH_PROTOCOL_GUID protocol is registered with a NULL pointer. 8 | 9 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
10 | This program and the accompanying materials 11 | are licensed and made available under the terms and conditions of the BSD License 12 | which accompanies this distribution. The full text of the license may be found at 13 | http://opensource.org/licenses/bsd-license.php 14 | 15 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 16 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 17 | 18 | **/ 19 | 20 | #ifndef __ARCH_PROTOCOL_RESET_H__ 21 | #define __ARCH_PROTOCOL_RESET_H__ 22 | 23 | /// 24 | /// Global ID for the Reset Architectural Protocol 25 | /// 26 | #define EFI_RESET_ARCH_PROTOCOL_GUID \ 27 | { 0x27CFAC88, 0x46CC, 0x11d4, {0x9A, 0x38, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } } 28 | 29 | extern EFI_GUID gEfiResetArchProtocolGuid; 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Protocol/SecurityPolicy.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | Security Policy protocol as defined in PI Specification VOLUME 2 DXE 3 | 4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials 6 | are licensed and made available under the terms and conditions of the BSD License 7 | which accompanies this distribution. The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | **/ 14 | 15 | #ifndef _SECURITY_POLICY_H_ 16 | #define _SECURITY_POLICY_H_ 17 | 18 | /// 19 | /// Security policy protocol GUID definition 20 | /// 21 | #define EFI_SECURITY_POLICY_PROTOCOL_GUID \ 22 | {0x78E4D245, 0xCD4D, 0x4a05, {0xA2, 0xBA, 0x47, 0x43, 0xE8, 0x6C, 0xFC, 0xAB} } 23 | 24 | extern EFI_GUID gEfiSecurityPolicyProtocolGuid; 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Protocol/ShellParameters.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | EFI Shell protocol as defined in the UEFI Shell 2.0 specification. 3 | 4 | Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials 6 | are licensed and made available under the terms and conditions of the BSD License 7 | which accompanies this distribution. The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | **/ 14 | 15 | #ifndef __EFI_SHELL_PARAMETERS_PROTOCOL_H__ 16 | #define __EFI_SHELL_PARAMETERS_PROTOCOL_H__ 17 | 18 | #include 19 | 20 | #define EFI_SHELL_PARAMETERS_PROTOCOL_GUID \ 21 | { \ 22 | 0x752f3136, 0x4e16, 0x4fdc, { 0xa2, 0x2a, 0xe5, 0xf4, 0x68, 0x12, 0xf4, 0xca } \ 23 | } 24 | 25 | typedef struct _EFI_SHELL_PARAMETERS_PROTOCOL { 26 | /// 27 | /// Points to an Argc-element array of points to NULL-terminated strings containing 28 | /// the command-line parameters. The first entry in the array is always the full file 29 | /// path of the executable. Any quotation marks that were used to preserve 30 | /// whitespace have been removed. 31 | /// 32 | CHAR16 **Argv; 33 | 34 | /// 35 | /// The number of elements in the Argv array. 36 | /// 37 | UINTN Argc; 38 | 39 | /// 40 | /// The file handle for the standard input for this executable. This may be different 41 | /// from the ConInHandle in EFI_SYSTEM_TABLE. 42 | /// 43 | SHELL_FILE_HANDLE StdIn; 44 | 45 | /// 46 | /// The file handle for the standard output for this executable. This may be different 47 | /// from the ConOutHandle in EFI_SYSTEM_TABLE. 48 | /// 49 | SHELL_FILE_HANDLE StdOut; 50 | 51 | /// 52 | /// The file handle for the standard error output for this executable. This may be 53 | /// different from the StdErrHandle in EFI_SYSTEM_TABLE. 54 | /// 55 | SHELL_FILE_HANDLE StdErr; 56 | } EFI_SHELL_PARAMETERS_PROTOCOL; 57 | 58 | extern EFI_GUID gEfiShellParametersProtocolGuid; 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Protocol/SmmEndOfDxe.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | SMM End Of Dxe protocol introduced in the PI 1.2.1 specification. 3 | 4 | According to PI 1.4a specification, this protocol indicates end of the 5 | execution phase when all of the components are under the authority of 6 | the platform manufacturer. 7 | This protocol is a mandatory protocol published by SMM Foundation code. 8 | This protocol is an SMM counterpart of the End of DXE Event. 9 | This protocol prorogates End of DXE notification into SMM environment. 10 | This protocol is installed prior to installation of the SMM Ready to Lock Protocol. 11 | 12 | Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.
13 | This program and the accompanying materials 14 | are licensed and made available under the terms and conditions of the BSD License 15 | which accompanies this distribution. The full text of the license may be found at 16 | http://opensource.org/licenses/bsd-license.php 17 | 18 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 19 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 20 | 21 | **/ 22 | 23 | #ifndef _SMM_END_OF_DXE_H_ 24 | #define _SMM_END_OF_DXE_H_ 25 | 26 | #define EFI_SMM_END_OF_DXE_PROTOCOL_GUID \ 27 | { \ 28 | 0x24e70042, 0xd5c5, 0x4260, { 0x8c, 0x39, 0xa, 0xd3, 0xaa, 0x32, 0xe9, 0x3d } \ 29 | } 30 | 31 | extern EFI_GUID gEfiSmmEndOfDxeProtocolGuid; 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Protocol/SmmPciRootBridgeIo.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | SMM PCI Root Bridge IO protocol as defined in the PI 1.2 specification. 3 | 4 | This protocol provides PCI I/O and memory access within SMM. 5 | 6 | Copyright (c) 2009, Intel Corporation. All rights reserved.
7 | This program and the accompanying materials 8 | are licensed and made available under the terms and conditions of the BSD License 9 | which accompanies this distribution. The full text of the license may be found at 10 | http://opensource.org/licenses/bsd-license.php 11 | 12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 14 | 15 | **/ 16 | 17 | #ifndef _SMM_PCI_ROOT_BRIDGE_IO_H_ 18 | #define _SMM_PCI_ROOT_BRIDGE_IO_H_ 19 | 20 | #include 21 | 22 | #define EFI_SMM_PCI_ROOT_BRIDGE_IO_PROTOCOL_GUID \ 23 | { \ 24 | 0x8bc1714d, 0xffcb, 0x41c3, { 0x89, 0xdc, 0x6c, 0x74, 0xd0, 0x6d, 0x98, 0xea } \ 25 | } 26 | 27 | /// 28 | /// This protocol provides the same functionality as the PCI Root Bridge I/O Protocol defined in the 29 | /// UEFI 2.1 Specifcation, section 13.2, except that the functions for Map() and Unmap() may return 30 | /// EFI_UNSUPPORTED. 31 | /// 32 | typedef EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL EFI_SMM_PCI_ROOT_BRIDGE_IO_PROTOCOL; 33 | 34 | extern EFI_GUID gEfiSmmPciRootBridgeIoProtocolGuid; 35 | 36 | #endif 37 | 38 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Protocol/SmmReadyToLock.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | SMM Ready To Lock protocol introduced in the PI 1.2 specification. 3 | 4 | According to PI 1.4a specification, this SMM protocol indicates that 5 | SMM resources and services that should not be used by the third party 6 | code are about to be locked. 7 | This protocol is a mandatory protocol published by the SMM Foundation 8 | code when the system is preparing to lock certain resources and interfaces 9 | in anticipation of the invocation of 3rd party extensible modules. 10 | This protocol is an SMM counterpart of the DXE SMM Ready to Lock Protocol. 11 | This protocol prorogates resource locking notification into SMM environment. 12 | This protocol is installed after installation of the SMM End of DXE Protocol. 13 | 14 | Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.
15 | This program and the accompanying materials 16 | are licensed and made available under the terms and conditions of the BSD License 17 | which accompanies this distribution. The full text of the license may be found at 18 | http://opensource.org/licenses/bsd-license.php 19 | 20 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 21 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 22 | 23 | **/ 24 | 25 | #ifndef _SMM_READY_TO_LOCK_H_ 26 | #define _SMM_READY_TO_LOCK_H_ 27 | 28 | #define EFI_SMM_READY_TO_LOCK_PROTOCOL_GUID \ 29 | { \ 30 | 0x47b7fa8c, 0xf4bd, 0x4af6, { 0x82, 0x00, 0x33, 0x30, 0x86, 0xf0, 0xd2, 0xc8 } \ 31 | } 32 | 33 | extern EFI_GUID gEfiSmmReadyToLockProtocolGuid; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Uefi.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | 3 | Root include file for Mde Package UEFI, UEFI_APPLICATION type modules. 4 | 5 | This is the include file for any module of type UEFI and UEFI_APPLICATION. Uefi modules only use 6 | types defined via this include file and can be ported easily to any 7 | environment. 8 | 9 | Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
10 | This program and the accompanying materials are licensed and made available under 11 | the terms and conditions of the BSD License that accompanies this distribution. 12 | The full text of the license may be found at 13 | http://opensource.org/licenses/bsd-license.php. 14 | 15 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 16 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 17 | 18 | **/ 19 | 20 | #ifndef __PI_UEFI_H__ 21 | #define __PI_UEFI_H__ 22 | 23 | #include 24 | #include 25 | 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /Src/Efi/Include/Edk2/Uefi/UefiAcpiDataTable.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | UEFI ACPI Data Table Definition. 3 | 4 | Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
5 | This program and the accompanying materials are licensed and made available under 6 | the terms and conditions of the BSD License that accompanies this distribution. 7 | The full text of the license may be found at 8 | http://opensource.org/licenses/bsd-license.php. 9 | 10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 12 | 13 | **/ 14 | 15 | #ifndef __UEFI_ACPI_DATA_TABLE_H__ 16 | #define __UEFI_ACPI_DATA_TABLE_H__ 17 | 18 | #include 19 | 20 | #pragma pack(1) 21 | typedef struct { 22 | EFI_ACPI_DESCRIPTION_HEADER Header; 23 | GUID Identifier; 24 | UINT16 DataOffset; 25 | } EFI_ACPI_DATA_TABLE; 26 | 27 | typedef struct { 28 | EFI_ACPI_DATA_TABLE UefiAcpiDataTable; 29 | UINT32 SwSmiNumber; 30 | UINT64 BufferPtrAddress; 31 | } EFI_SMM_COMMUNICATION_ACPI_TABLE; 32 | 33 | typedef struct { 34 | EFI_SMM_COMMUNICATION_ACPI_TABLE UefiSmmCommunicationAcpiTable; 35 | EFI_ACPI_6_0_GENERIC_ADDRESS_STRUCTURE InvocationRegister; 36 | } EFI_SMM_COMMUNICATION_ACPI_TABLE_2; 37 | 38 | /// 39 | /// To avoid confusion in interpreting frames, the communication buffer should always 40 | /// begin with EFI_SMM_COMMUNICATE_HEADER 41 | /// 42 | typedef struct { 43 | /// 44 | /// Allows for disambiguation of the message format. 45 | /// 46 | EFI_GUID HeaderGuid; 47 | /// 48 | /// Describes the size of Data (in bytes) and does not include the size of the header. 49 | /// 50 | UINTN MessageLength; 51 | /// 52 | /// Designates an array of bytes that is MessageLength in size. 53 | /// 54 | UINT8 Data[1]; 55 | } EFI_SMM_COMMUNICATE_HEADER; 56 | 57 | #pragma pack() 58 | 59 | #endif 60 | 61 | -------------------------------------------------------------------------------- /Src/Efi/Lib/BaseLibrary/Makefile: -------------------------------------------------------------------------------- 1 | LIB_NAME := libBaseLibrary 2 | LIB_TARGET := $(LIB_NAME).a 3 | 4 | OBJS_$(LIB_NAME) := \ 5 | MemCpy.o \ 6 | MemMove.o \ 7 | MemCmp.o \ 8 | MemSet.o \ 9 | MemDup.o \ 10 | StrDup.o \ 11 | StrAppend.o \ 12 | StrCaseCmp.o \ 13 | StrChr.o \ 14 | StrnChr.o \ 15 | StrrChr.o \ 16 | StrStr.o \ 17 | StrrStr.o \ 18 | StrEndsWith.o \ 19 | StrStr.o 20 | 21 | OBJS_$(LIB_NAME) += $(shell if [ $(GNU_EFI_VERSION) -lt 308 ]; \ 22 | then echo "StrnCpy.o StrnLen.o"; fi;) 23 | 24 | all: $(LIB_TARGET) Makefile 25 | 26 | clean: 27 | @$(RM) $(LIB_TARGET) $(OBJS_$(LIB_NAME)) \ 28 | $(addsuffix .*, $(LIB_TARGET)) 29 | 30 | $(LIB_TARGET): $(OBJS_$(LIB_NAME)) 31 | @$(AR) rcs $@ $^ 32 | -------------------------------------------------------------------------------- /Src/Efi/Lib/BaseLibrary/MemCmp.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, Wind River Systems, Inc. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1) Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2) Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * 3) Neither the name of Wind River Systems nor the names of its contributors 15 | * may be used to endorse or promote products derived from this software 16 | * without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | * POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * Author: 31 | * Jia Zhang 32 | */ 33 | 34 | #include 35 | 36 | INTN 37 | MemCmp(CONST VOID *FirstSource, CONST VOID *SecondSource, UINTN MaxLength) 38 | { 39 | if (FirstSource == SecondSource || !MaxLength) 40 | return 0; 41 | 42 | UINT8 FirstByte, SecondByte; 43 | 44 | while (MaxLength--) { 45 | FirstByte = *(UINT8 *)FirstSource; 46 | SecondByte = *(UINT8 *)SecondSource; 47 | 48 | if (FirstByte != SecondByte) 49 | break; 50 | 51 | ++FirstSource; 52 | ++SecondSource; 53 | } 54 | 55 | return FirstByte > SecondByte ? 1 : FirstByte < SecondByte ? -1 : 0; 56 | } 57 | -------------------------------------------------------------------------------- /Src/Efi/Lib/BaseLibrary/MemDup.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, Wind River Systems, Inc. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1) Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2) Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * 3) Neither the name of Wind River Systems nor the names of its contributors 15 | * may be used to endorse or promote products derived from this software 16 | * without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | * POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * Author: 31 | * Jia Zhang 32 | */ 33 | 34 | #include 35 | #include 36 | #include 37 | 38 | VOID * 39 | MemDup(CONST VOID *Source, UINTN Length) 40 | { 41 | VOID *Destination; 42 | EFI_STATUS Status = EfiMemoryAllocate(Length, &Destination); 43 | if (EFI_ERROR(Status)) 44 | return NULL; 45 | 46 | MemCpy(Destination, Source, Length); 47 | 48 | return Destination; 49 | } 50 | -------------------------------------------------------------------------------- /Src/Efi/Lib/BaseLibrary/StrAppend.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, Wind River Systems, Inc. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1) Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2) Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * 3) Neither the name of Wind River Systems nor the names of its contributors 15 | * may be used to endorse or promote products derived from this software 16 | * without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | * POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * Author: 31 | * Jia Zhang 32 | */ 33 | 34 | #include 35 | #include 36 | #include 37 | 38 | CHAR16 * 39 | StrAppend(CONST CHAR16 *Source, CONST CHAR16 *Suffix) 40 | { 41 | UINTN SourceLength = StrLen(Source); 42 | UINTN SuffixLength = StrLen(Suffix); 43 | UINTN Size = (SourceLength + SuffixLength + 1) * sizeof(CHAR16); 44 | CHAR16 *Destination; 45 | EFI_STATUS Status; 46 | 47 | Status = EfiMemoryAllocate(Size, (VOID **)&Destination); 48 | if (EFI_ERROR(Status)) 49 | return NULL; 50 | 51 | StrnCpy(Destination, Source, SourceLength); 52 | StrCpy(Destination + SourceLength, Suffix); 53 | 54 | return Destination; 55 | } 56 | -------------------------------------------------------------------------------- /Src/Efi/Lib/BaseLibrary/StrCaseCmp.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, Wind River Systems, Inc. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1) Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2) Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * 3) Neither the name of Wind River Systems nor the names of its contributors 15 | * may be used to endorse or promote products derived from this software 16 | * without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | * POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * Author: 31 | * Jia Zhang 32 | */ 33 | 34 | #include 35 | #include 36 | 37 | INTN 38 | StrCaseCmp(CONST CHAR16 *FirstString, CONST CHAR16 *SecondString, 39 | UINTN MaxLength) 40 | { 41 | CHAR16 FirstChar, SecChar; 42 | 43 | if (FirstString == SecondString || !MaxLength) 44 | return 0; 45 | 46 | do { 47 | FirstChar = *FirstString & ~0x20; 48 | SecChar = *SecondString & ~0x20; 49 | 50 | if (!--MaxLength || !FirstChar || !SecChar) 51 | break; 52 | 53 | ++FirstString; 54 | ++SecondString; 55 | } while (FirstChar == SecChar); 56 | 57 | return FirstChar > SecChar ? 1 : FirstChar < SecChar ? -1 : 0; 58 | } 59 | -------------------------------------------------------------------------------- /Src/Efi/Lib/BaseLibrary/StrChr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, Wind River Systems, Inc. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1) Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2) Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * 3) Neither the name of Wind River Systems nor the names of its contributors 15 | * may be used to endorse or promote products derived from this software 16 | * without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | * POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * Author: 31 | * Jia Zhang 32 | */ 33 | 34 | #include 35 | #include 36 | 37 | CHAR16 * 38 | StrChr(CONST CHAR16 *String, CHAR16 SearchChar) 39 | { 40 | if (SearchChar) { 41 | while (*String) { 42 | if (*String == SearchChar) 43 | return (CHAR16 *)String; 44 | 45 | ++String; 46 | } 47 | } else { 48 | /* The terminating null byte is considered part of the string */ 49 | return (CHAR16 *)String + StrLen(String); 50 | } 51 | 52 | return NULL; 53 | } 54 | -------------------------------------------------------------------------------- /Src/Efi/Lib/BaseLibrary/StrCmp.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, Wind River Systems, Inc. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1) Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2) Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * 3) Neither the name of Wind River Systems nor the names of its contributors 15 | * may be used to endorse or promote products derived from this software 16 | * without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | * POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * Author: 31 | * Jia Zhang 32 | */ 33 | 34 | #include 35 | #include 36 | 37 | INTN 38 | StrCmp(CONST CHAR16 *FirstString, CONST CHAR16 *SecondString) 39 | { 40 | if (FirstString == SecondString) 41 | return 0; 42 | 43 | CHAR16 FirstChar, SecChar; 44 | 45 | do { 46 | FirstChar = *FirstString; 47 | SecChar = *SecondString; 48 | 49 | if (!FirstChar || !SecChar) 50 | break; 51 | 52 | ++FirstString; 53 | ++SecondString; 54 | } while (FirstChar == SecChar); 55 | 56 | return FirstChar > SecChar ? 1 : FirstChar < SecChar ? -1 : 0; 57 | } 58 | -------------------------------------------------------------------------------- /Src/Efi/Lib/BaseLibrary/StrCpy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, Wind River Systems, Inc. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1) Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2) Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * 3) Neither the name of Wind River Systems nor the names of its contributors 15 | * may be used to endorse or promote products derived from this software 16 | * without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | * POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * Author: 31 | * Jia Zhang 32 | */ 33 | 34 | #include 35 | #include 36 | 37 | CHAR16 * 38 | StrCpy(CHAR16 *Destination, CONST CHAR16 *Source) 39 | { 40 | MemCpy(Destination, Source, StrLen(Source) + 1); 41 | 42 | return Destination; 43 | } 44 | -------------------------------------------------------------------------------- /Src/Efi/Lib/BaseLibrary/StrDup.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, Wind River Systems, Inc. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1) Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2) Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * 3) Neither the name of Wind River Systems nor the names of its contributors 15 | * may be used to endorse or promote products derived from this software 16 | * without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | * POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * Author: 31 | * Jia Zhang 32 | */ 33 | 34 | #include 35 | #include 36 | #include 37 | 38 | CHAR16 * 39 | StrDup(CONST CHAR16 *Source) 40 | { 41 | UINTN Size = (StrLen(Source) + 1) * sizeof(CHAR16); 42 | CHAR16 *Destination; 43 | EFI_STATUS Status; 44 | 45 | Status = EfiMemoryAllocate(Size, (VOID **)&Destination); 46 | if (EFI_ERROR(Status)) 47 | return NULL; 48 | 49 | StrCpy(Destination, Source); 50 | 51 | return Destination; 52 | } 53 | -------------------------------------------------------------------------------- /Src/Efi/Lib/BaseLibrary/StrEndsWith.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, Wind River Systems, Inc. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1) Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2) Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * 3) Neither the name of Wind River Systems nor the names of its contributors 15 | * may be used to endorse or promote products derived from this software 16 | * without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | * POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * Author: 31 | * Jia Zhang 32 | */ 33 | 34 | #include 35 | #include 36 | 37 | BOOLEAN 38 | StrEndsWith(CONST CHAR16 *String, CONST CHAR16 *SearchString) 39 | { 40 | /* The terminating null byte is not compared */ 41 | if (!*SearchString) 42 | return FALSE; 43 | 44 | UINTN StringLength = StrLen(String); 45 | UINTN SearchStringLength = StrLen(SearchString); 46 | 47 | if (SearchStringLength > StringLength) 48 | return FALSE; 49 | 50 | return !StrCmp(String + StringLength - SearchStringLength, 51 | SearchString); 52 | } 53 | -------------------------------------------------------------------------------- /Src/Efi/Lib/BaseLibrary/StrLen.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, Wind River Systems, Inc. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1) Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2) Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * 3) Neither the name of Wind River Systems nor the names of its contributors 15 | * may be used to endorse or promote products derived from this software 16 | * without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | * POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * Author: 31 | * Jia Zhang 32 | */ 33 | 34 | #include 35 | #include 36 | 37 | UINTN 38 | StrLen(CONST CHAR16 *String) 39 | { 40 | UINTN Len; 41 | 42 | for (Len = 0; *String++; ++Len) 43 | ; 44 | 45 | return Len; 46 | } 47 | -------------------------------------------------------------------------------- /Src/Efi/Lib/BaseLibrary/StrStr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, Wind River Systems, Inc. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1) Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2) Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * 3) Neither the name of Wind River Systems nor the names of its contributors 15 | * may be used to endorse or promote products derived from this software 16 | * without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | * POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * Author: 31 | * Jia Zhang 32 | */ 33 | 34 | #include 35 | #include 36 | 37 | CHAR16 * 38 | StrStr(CONST CHAR16 *String, CONST CHAR16 *SearchString) 39 | { 40 | /* The terminating null byte is not compared */ 41 | if (!*SearchString) 42 | return NULL; 43 | 44 | while (*String) { 45 | CONST CHAR16 *Str, *SearchStr; 46 | 47 | Str = String; 48 | SearchStr = SearchString; 49 | 50 | while (*SearchStr && *Str == *SearchStr) { 51 | ++Str; 52 | ++SearchStr; 53 | } 54 | 55 | if (SearchStr > SearchString && !*SearchStr) 56 | return (CHAR16 *)String; 57 | 58 | ++String; 59 | } 60 | 61 | return NULL; 62 | } 63 | -------------------------------------------------------------------------------- /Src/Efi/Lib/BaseLibrary/StrnChr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, Wind River Systems, Inc. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1) Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2) Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * 3) Neither the name of Wind River Systems nor the names of its contributors 15 | * may be used to endorse or promote products derived from this software 16 | * without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | * POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * Author: 31 | * Jia Zhang 32 | */ 33 | 34 | #include 35 | #include 36 | 37 | CHAR16 * 38 | StrnChr(CONST CHAR16 *String, UINTN MaxLength, CHAR16 SearchChar) 39 | { 40 | if (SearchChar) { 41 | while (*String && MaxLength) { 42 | if (*String == SearchChar) 43 | return (CHAR16 *)String; 44 | 45 | ++String; 46 | --MaxLength; 47 | } 48 | } else { 49 | /* The terminating null byte is considered part of the string */ 50 | if (MaxLength == StrLen(String)) 51 | return (CHAR16 *)String + MaxLength; 52 | } 53 | 54 | return NULL; 55 | } 56 | -------------------------------------------------------------------------------- /Src/Efi/Lib/BaseLibrary/StrnCpy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, Wind River Systems, Inc. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1) Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2) Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * 3) Neither the name of Wind River Systems nor the names of its contributors 15 | * may be used to endorse or promote products derived from this software 16 | * without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | * POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * Author: 31 | * Jia Zhang 32 | */ 33 | 34 | #include 35 | #include 36 | 37 | CHAR16 * 38 | StrnCpy(CHAR16 *Destination, CONST CHAR16 *Source, UINTN MaxLength) 39 | { 40 | UINTN Len; 41 | 42 | for (Len = 0; Len < MaxLength && Source[Len]; ++Len) 43 | Destination[Len] = Source[Len]; 44 | 45 | for (; Len < MaxLength; ++Len) 46 | Destination[Len] = 0; 47 | 48 | return Destination; 49 | } 50 | -------------------------------------------------------------------------------- /Src/Efi/Lib/BaseLibrary/StrnLen.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, Wind River Systems, Inc. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1) Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2) Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * 3) Neither the name of Wind River Systems nor the names of its contributors 15 | * may be used to endorse or promote products derived from this software 16 | * without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | * POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * Author: 31 | * Jia Zhang 32 | */ 33 | 34 | #include 35 | #include 36 | 37 | UINTN 38 | StrnLen(CONST CHAR16 *String, UINTN MaxLength) 39 | { 40 | UINTN Len; 41 | 42 | for (Len = 0; Len < MaxLength && *String++; ++Len) 43 | ; 44 | 45 | return Len; 46 | } 47 | -------------------------------------------------------------------------------- /Src/Efi/Lib/BaseLibrary/StrrChr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, Wind River Systems, Inc. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1) Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2) Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * 3) Neither the name of Wind River Systems nor the names of its contributors 15 | * may be used to endorse or promote products derived from this software 16 | * without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | * POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * Author: 31 | * Jia Zhang 32 | */ 33 | 34 | #include 35 | #include 36 | 37 | CHAR16 * 38 | StrrChr(CONST CHAR16 *String, CHAR16 SearchChar) 39 | { 40 | CHAR16 *Pos = 0; 41 | 42 | if (SearchChar) { 43 | while (*String) { 44 | if (*String == SearchChar) 45 | Pos = (CHAR16 *)String; 46 | ++String; 47 | } 48 | 49 | return Pos; 50 | } 51 | 52 | /* The terminating null byte is considered part of the string */ 53 | return (CHAR16 *)String + StrLen(String); 54 | } 55 | -------------------------------------------------------------------------------- /Src/Efi/Lib/Makefile: -------------------------------------------------------------------------------- 1 | LIB_NAME := libSELoader 2 | LIB_TARGET := $(LIB_NAME).a 3 | 4 | OBJS_$(LIB_NAME) := \ 5 | Memory.o \ 6 | File.o \ 7 | Protocol.o \ 8 | Image.o \ 9 | Variable.o \ 10 | Device.o \ 11 | DevicePath.o \ 12 | Stall.o \ 13 | Console.o \ 14 | ResetSystem.o \ 15 | Pkcs7Verify.o \ 16 | Hash.o \ 17 | Signature.o \ 18 | SecurityPolicy.o \ 19 | UefiSecureBoot.o \ 20 | MokVerify.o \ 21 | Mok2Verify.o \ 22 | Sap2.o \ 23 | EfiLibrary.o 24 | 25 | ifeq ($(EXPERIMENTAL_BUILD),true) 26 | OBJS_$(LIB_NAME) += Sap.o 27 | endif 28 | 29 | LIBS_$(LIB_NAME) := \ 30 | BaseLibrary/libBaseLibrary.a 31 | 32 | all: $(LIB_TARGET) $(LIBS_$(LIB_NAME)) Makefile 33 | 34 | clean: 35 | @$(RM) $(LIB_TARGET) $(OBJS_$(LIB_NAME)) \ 36 | $(addsuffix .*, $(LIB_TARGET)) 37 | @$(MAKE) -C BaseLibrary clean 38 | 39 | $(LIB_TARGET): $(OBJS_$(LIB_NAME)) 40 | @$(AR) rcs $@ $^ 41 | 42 | BaseLibrary/libBaseLibrary.a: 43 | @$(MAKE) -C BaseLibrary 44 | -------------------------------------------------------------------------------- /Src/Efi/Lib/Memory.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, Wind River Systems, Inc. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1) Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2) Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * 3) Neither the name of Wind River Systems nor the names of its contributors 15 | * may be used to endorse or promote products derived from this software 16 | * without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | * POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * Author: 31 | * Jia Zhang 32 | */ 33 | 34 | #include 35 | #include 36 | 37 | EFI_STATUS 38 | EfiMemoryAllocate(IN UINTN Size, OUT VOID **AllocatedBuffer) 39 | { 40 | return gBS->AllocatePool(EfiLoaderData, Size, AllocatedBuffer); 41 | } 42 | 43 | VOID 44 | EfiMemoryFree(VOID *Buffer) 45 | { 46 | gBS->FreePool(Buffer); 47 | } 48 | -------------------------------------------------------------------------------- /Src/Efi/Lib/ResetSystem.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, Wind River Systems, Inc. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1) Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2) Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * 3) Neither the name of Wind River Systems nor the names of its contributors 15 | * may be used to endorse or promote products derived from this software 16 | * without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | * POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * Author: 31 | * Jia Zhang 32 | */ 33 | 34 | #include 35 | #include 36 | 37 | VOID 38 | EfiResetSystemWarm(VOID) 39 | { 40 | gRT->ResetSystem(EfiResetWarm, EFI_SUCCESS, 0, NULL); 41 | } 42 | -------------------------------------------------------------------------------- /Src/Efi/Lib/Stall.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017, Wind River Systems, Inc. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * 1) Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * 10 | * 2) Redistributions in binary form must reproduce the above copyright notice, 11 | * this list of conditions and the following disclaimer in the documentation 12 | * and/or other materials provided with the distribution. 13 | * 14 | * 3) Neither the name of Wind River Systems nor the names of its contributors 15 | * may be used to endorse or promote products derived from this software 16 | * without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | * POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * Author: 31 | * Jia Zhang 32 | */ 33 | 34 | #include 35 | #include 36 | 37 | VOID 38 | EfiStallMicroseconds(UINTN Microseconds) 39 | { 40 | gBS->Stall(Microseconds); 41 | } 42 | 43 | VOID 44 | EfiStallMilliseconds(UINTN Milliseconds) 45 | { 46 | EfiStallMicroseconds(Milliseconds * 1000); 47 | } 48 | 49 | VOID 50 | EfiStallSeconds(UINTN Seconds) 51 | { 52 | EfiStallMicroseconds(Seconds * 1000 * 1000); 53 | } 54 | -------------------------------------------------------------------------------- /Src/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/Rules.mk 2 | 3 | SUBDIRS := Efi 4 | 5 | all clean install: 6 | @for x in $(SUBDIRS); do $(MAKE) -C $$x $@ || exit $?; done 7 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | - Support to transparently verify PE and non-PE file in MOK2 Verify Protocol 2 | - Finalize VerifyBuffer() and VerifyFileBuffer() interfaces 3 | - Implement the hook function for Security Architectural Protocol 4 | - Implement MOK Verify Protocol without shim 5 | -------------------------------------------------------------------------------- /Version.mk: -------------------------------------------------------------------------------- 1 | SEL_MAJOR_VERSION := 0 2 | SEL_MINOR_VERSION := 4 3 | SEL_REVISION := 6 4 | SEL_VERSION := $(SEL_MAJOR_VERSION).$(SEL_MINOR_VERSION).$(SEL_REVISION) 5 | --------------------------------------------------------------------------------